with one click
signal-trace
// Trace systemic brittleness from symptom to root cause. Data-flow analysis of hooks, state, and dispatch paths to find where signals break, race, or carry garbage. Produces single-gate fixes, not fallback chains.
// Trace systemic brittleness from symptom to root cause. Data-flow analysis of hooks, state, and dispatch paths to find where signals break, race, or carry garbage. Produces single-gate fixes, not fallback chains.
Analyze system health, surface patterns, manage improvement suggestions. Self-improvement flywheel for the hook/agent/dispatch system.
Multi-model deep research with comparative assessment (OpenAI + Perplexity + Gemini). Queries 3 deep research providers in parallel and produces a comparative synthesis.
Generate an interactive decision configurator from research or plan analysis. Presents options as explorable cards with trade-offs, costs, and filtering. Integrates with Planner to collect DEC-ID decisions.
Analyze a project's MASTER_PLAN.md to assess coherence, evolution trajectory, and intent alignment. Modes: default (full analysis), compare (delta between reckonings), operationalize (convert findings to actionable work via /decide), steer (strategic brainstorming grounded in findings).
| name | signal-trace |
| description | Trace systemic brittleness from symptom to root cause. Data-flow analysis of hooks, state, and dispatch paths to find where signals break, race, or carry garbage. Produces single-gate fixes, not fallback chains. |
| argument-hint | [symptom description — what misbehaved and how] |
| context | fork |
| agent | general-purpose |
| allowed-tools | Bash, Read, Grep, Glob, Agent, WebSearch |
When something misbehaves in the hook/agent/dispatch system, trace the actual data flow from producer to consumer. Find where signals break, race, or carry garbage. Produce a single-gate fix — never a fallback chain.
Execute these phases in order. Each phase produces concrete evidence. Do not skip phases or substitute guesses for data.
State the symptom precisely. Not "the tester was slow" but "the tester read implementer trace SDE-W2-2 from worktree X when it should have read SDE-W2-1 from worktree Y."
Identify the observable signal that was wrong:
Output: One sentence describing the broken signal.
Trace the code path that produces the broken signal. Not the docs, not the plan — the actual code.
Producer → [transforms/stores] → State → [retrieves/injects] → Consumer
For each node in the chain:
Key questions at each node:
Output: ASCII data flow diagram showing every node from producer to consumer.
Query actual production state to confirm the hypothesis. Never trust the mechanism trace alone — the code might work differently than you think.
The goal is a hard number: "X% of rows have empty trace_id" or "the marker was overwritten 3 times in 2 seconds."
Output: Quantified evidence proving or disproving the hypothesis.
Check the hook firing order. Many bugs come from:
For Claude Code hooks, the typical firing order:
SubagentStart → [agent runs] → SubagentStop → PostToolUse:Task
Check which hooks touch the same state, and in what order. If Hook A removes a marker and Hook B needs it, that's the bug — not "model behavior."
Output: Timeline showing hook firing order and state mutations at each step.
Connect the mechanism failure to the design history. Use git log/blame to answer:
The root cause is usually: System A was designed under assumption X. System B violated assumption X but nobody updated System A.
Output: One paragraph explaining why the bug exists, referencing specific commits/decisions.
Design the fix as ONE strong path. Never propose fallback tiers.
Rules:
Output: Specific code changes with rationale. File paths, line numbers, what to add/remove.
Present to the user:
| Anti-pattern | Signal |
|---|---|
| Ghost data | Producer writes, consumer reads, but a cleanup step between them destroys the signal |
| Single-valued race | Marker/key designed for sequential use, deployed under concurrency |
| Producer-consumer mismatch | Write happens in the wrong hook (doesn't have the data), correct hook exists but isn't wired |
| Fallback masking | Three-tier lookup hides the fact that Tier 1 always fails — Tier 3 does the work but nobody notices |
| Hand-wave diagnosis | "Model behavior" / "just Sonnet being thorough" when the actual cause is systemic |
/signal-trace The tester agent read the wrong implementer trace (SDE-W2-2 instead of W2-1) during wave dispatch. Previous session blamed "Sonnet being thorough."