reasoning-trace-recorder

Auto-invokes for every Claude turn during active T4 task execution. Emits append-only trace events (file_read, output_claim, tool_call, decision) to .claude/plans/traces/{TASK_ID}.jsonl. Source of grounding-discipline checks. Disable: AF_TRACE_DISABLED=true.

Best use case

reasoning-trace-recorder is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Auto-invokes for every Claude turn during active T4 task execution. Emits append-only trace events (file_read, output_claim, tool_call, decision) to .claude/plans/traces/{TASK_ID}.jsonl. Source of grounding-discipline checks. Disable: AF_TRACE_DISABLED=true.

Teams using reasoning-trace-recorder should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/reasoning-trace-recorder/SKILL.md --create-dirs "https://raw.githubusercontent.com/nguyenthienthanh/aura-frog/main/aura-frog/skills/reasoning-trace-recorder/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/reasoning-trace-recorder/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How reasoning-trace-recorder Compares

Feature / Agentreasoning-trace-recorderStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Auto-invokes for every Claude turn during active T4 task execution. Emits append-only trace events (file_read, output_claim, tool_call, decision) to .claude/plans/traces/{TASK_ID}.jsonl. Source of grounding-discipline checks. Disable: AF_TRACE_DISABLED=true.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

> **AI-consumed reference.** Optimized for Claude to read during execution.
> Human-readable explanation: see [docs/architecture/HIERARCHICAL_PLANNING.md](../../../docs/architecture/HIERARCHICAL_PLANNING.md)
> or [docs/getting-started/](../../../docs/getting-started/) depending on topic.


# Reasoning Trace Recorder

**STATUS — v3.7.0-alpha.2 (Milestone B).** Forensic reproducibility per spec goal §2.1.3.

## Behavior

1. Detect: if `.claude/plans/active.json` does NOT exist → exit silently
2. Read `.claude/plans/active.json` — if `active.task` is null → exit silently
3. For every emitted event from companion hooks/tools, append a line to `.claude/plans/traces/{TASK_ID}.jsonl`

## Event schema (one JSON per line)

```json
{
  "ts": "2026-04-29T14:32:01Z",
  "event_id": "TR-00101-007",
  "task_id": "TASK-00101",
  "type": "output_claim",
  "payload": {
    "claim": "src/auth/jwt.ts exports verifyToken",
    "grounded": true,
    "grounded_by": ["TR-00101-003"]
  }
}
```

## Event types

| Type | Emitted by | Required payload fields |
|------|-----------|-------------------------|
| `file_read` | Read tool / hook | `path`, `lines_read`, `sha256` |
| `output_claim` | Claude reasoning | `claim`, `grounded` (bool), `grounded_by` (array of event_ids) |
| `tool_call` | PreToolUse hook | `tool_name`, `args_hash` |
| `tool_result` | PostToolUse hook | `tool_name`, `exit_code`, `result_hash`, `duration_ms` |
| `decision` | master-planner | `decision`, `reasoning`, `confidence` |
| `phase_transition` | run-orchestrator | `from_phase`, `to_phase`, `gate_passed` |

## Grounding rule (per spec §11.1)

An `output_claim` is **grounded** when ≥1 prior `file_read` event in the same trace covers the file/function/symbol named in the claim.

If `grounded: false`, it is **flagged as potential hallucination** and surfaced via `/aura-frog:trace --hallucinations`.

## What this skill does NOT do

- Does NOT call an LLM
- Does NOT modify plan files (trace is independent of plan)
- Does NOT enforce grounding (that's grounding-discipline rule's job — this just records)
- Does NOT prune traces (retention is /aura-frog:plan-archive's responsibility)

## File location

```
.claude/plans/traces/{TASK_ID}.jsonl
```

One file per T4 task. Append-only; never edited or deleted by this skill.

## Storage budget

Per task target: ≤500 events (typical task: 50-100 events). If a task exceeds 1000 events, post-execute-update-node hook flags `event: trace_overflow` and surfaces in /aura-frog:trace.

## Tie-Ins

- **Spec:** §9.5, §11.1 (grounding-discipline)
- **Companion hook:** `hooks/tool-call-tracer.cjs` — emits tool_call/tool_result events
- **Companion hook:** `hooks/tdd-red-failure-tracker.cjs` — emits decision events for RED phase
- **Command:** `commands/trace.md` — reads traces for /aura-frog:trace output
- **Rule:** `rules/core/grounding-discipline.md` — defines grounded:bool semantics
- **Skill:** `failure-classifier` — reads recent trace events to score F2/F3

Related Skills

vue-expert

14
from nguyenthienthanh/aura-frog

Vue 3 gotchas and decision criteria. Covers reactivity traps, Composition API pitfalls, and Pinia patterns.

typescript-expert

14
from nguyenthienthanh/aura-frog

TypeScript gotchas and decision criteria covering nullish coalescing pitfalls (|| vs ??), strict tsconfig settings (noUncheckedIndexedAccess, exactOptionalPropertyTypes), type guard patterns, discriminated unions, and as const vs enum. Use when writing TypeScript, configuring tsconfig, implementing type guards, or debugging null/undefined errors.

tree-of-thoughts

14
from nguyenthienthanh/aura-frog

Branch, evaluate, prune, expand — structured search over solution space. Use for architecture with multi-step decisions, refactor planning, or complex debug hypothesis trees. Paper: Yao et al. 2023.

test-writer

14
from nguyenthienthanh/aura-frog

Write tests with TDD following structured patterns. Ensures consistent AAA structure, proper coverage targets, and framework-specific conventions. Without this skill, tests lack consistent naming, miss coverage targets, and skip anti-pattern checks.

stitch-design

14
from nguyenthienthanh/aura-frog

Generate UI designs using Google Stitch AI with optimized prompts

session-continuation

14
from nguyenthienthanh/aura-frog

Manage workflow state across sessions with handoff and resume. TOON-based state persistence.

sequential-thinking

14
from nguyenthienthanh/aura-frog

Structured thinking process for complex analysis. Supports revision, branching, and dynamic adjustment.

self-improve

14
from nguyenthienthanh/aura-frog

Apply learned improvements to the Aura Frog plugin. Updates rules, adjusts agent routing, modifies workflow configurations, and generates knowledge base entries.

self-healing-orchestrator

14
from nguyenthienthanh/aura-frog

Proposes patches for F2 (local-logic) and F3 (local-design) failures. NEVER applies without user approval. Confidence ≥0.7 to propose; below that, escalates raw findings. Counts toward replan_budget. Per-task: max 1; per-session: max 5.

self-consistency

14
from nguyenthienthanh/aura-frog

Generate N independent reasoning paths and vote on the answer. Use for architectural trade-offs, ambiguous design decisions, or when single-path reasoning risks locking onto the first plausible answer. Paper: Wang et al. 2022.

scalable-thinking

14
from nguyenthienthanh/aura-frog

Design for scale while keeping implementation simple (KISS).

run-orchestrator

14
from nguyenthienthanh/aura-frog

Execute 5-phase TDD workflow for complex features. Use when the user invokes /run, asks to build/create/implement a feature, requests a complex multi-file change, or types 'fasttrack:'. Enforces phase gates, sprint contracts, and builder!=reviewer discipline.