agent-health
Reads production/traces/agent-metrics.jsonl and displays a per-agent performance summary table for the current or a specified…
Diagnostic pipeline for complex/intermittent bugs. Uses diagnostics roles for Investigation, Verification, and Solution before Lead Programmer handoff. Use ONLY for non-obvious failures (root cause unclear, reproduction unstable, fixes reverted). NOT for trivial bugs with known
Claude Code
$ npx -y skills add tranhieutt/software_development_department --skill diagnose --agent claude-code
Codex
$ npx skills add tranhieutt/software_development_department --skill diagnose -a codex -y
Cursor
$ npx skills add tranhieutt/software_development_department --skill diagnose -a cursor -y
Gemini CLI
$ npx skills add tranhieutt/software_development_department --skill diagnose -a gemini-cli -y
GitHub Copilot
$ npx skills add tranhieutt/software_development_department --skill diagnose -a github-copilot -y
OpenCode
$ npx skills add tranhieutt/software_development_department --skill diagnose -a opencode -y
Windsurf
$ npx skills add tranhieutt/software_development_department --skill diagnose -a windsurf -y
name: diagnose type: reference description: "Diagnostic pipeline for complex/intermittent bugs. Uses diagnostics roles for Investigation, Verification, and Solution before Lead Programmer handoff. Use ONLY for non-obvious failures (root cause unclear, reproduction unstable, fixes reverted). NOT for trivial bugs with known cause — fix them directly." paths: [] effort: 4 allowed-tools: Read, Glob, Grep, Write, Edit, Bash, Task user-invocable: true when_to_use: "When a bug is reproducible but cause is unknown, when a 'fix' has been reverted 2+ times, or when a symptom appears in unfamiliar code. Do NOT use for typos, obvious nulls, or one-line logic errors."
Feedback Loop -> Investigation -> Verification -> Solution -> Lead Programmer
(signal) (hypothesis) (devil's adv.) (tradeoffs) (assign + exec)
repro/check command investigation.json verification.json solution.json implementation
(fast deterministic (root_cause, (status: confirmed | (3 options: (delegates to
pass/fail signal) evidence[], refuted | inconclusive, Quick/Strategic/ backend-developer,
confidence) reproduction_steps) Future-Proof) qa-engineer, etc.)Each stage produces a **required artifact** saved to `.investigations/<task_id>/` and a **handoff contract** (per Rule 16) to the next agent.
**Goal:** Build the fastest reliable pass/fail signal for the exact symptom before explaining the cause.
The feedback loop is the highest-leverage part of diagnosis. Do not proceed to root-cause analysis until there is a loop that can reproduce the user's symptom or a documented reason why no loop is possible.
Try these in roughly this order:
1. Failing test at the seam that reaches the bug. 2. CLI or script invocation with fixture input and expected output. 3. Curl/HTTP request against a running service. 4. Headless browser script with DOM, console, or network assertions. 5. Replay of a captured payload, event, HAR, log, or trace. 6. Throwaway harness that calls the affected code path in isolation. 7. Property/fuzz loop for broad wrong-output symptoms. 8. Bisection or differential loop between known-good and known-bad states.
Improve the loop before investigating:
raise intermittent reproduction frequency with stress runs.
Do not treat Stage 0 as warm-up. It is the main leverage point. A bad loop produces fake certainty, weak hypotheses, and symptom-only fixes.
If no credible loop can be built, stop and report what was tried. Ask for access to the reproducing environment, a captured artifact, or permission to add temporary instrumentation. Do not proceed on a vibe.
**Agent:** `diagnostics` (Investigation role) **Goal:** Produce ranked falsifiable root-cause hypotheses backed by empirical evidence.
currently be built
{
"task_id": "BUG-417",
"symptom": "POST /api/orders returns 500 when cart has ≥10 items",
"reproduction": {
"steps": ["...", "..."],
"frequency": "100% | intermittent (~30%) | once",
"environment": "staging-eu-west-1"
},
"feedback_loop": {
"command": "npm test -- checkout.e2e.test.ts",
"signal": "Fails with timeout before hydration marker appears",
"reliable": true
},
"ranked_hypotheses": [
{
"rank": 1,
"cause": "Test clicks #submit before React hydration completes on slow CI runners",
"prediction": "Waiting for the hydration marker will make the failure disappear without adding a fixed sleep"
},
{
"rank": 2,
"cause": "Submit button selector matches a hidden stale node",
"prediction": "Asserting the visible button count will expose multiple matching nodes"
}
],
"hypothesis": {
"root_cause": "OrderService.calculateTotal() N+1 query exhausts pool when cart.items.length > 9",
"confidence": "high | medium | low",
"falsifiable_by": "Run with pool_size=50; if error disappears, cause confirmed"
},
"evidence": [
{"type": "log", "ref": ".investigations/BUG-417/pg-pool-exhausted.log", "summary": "..."},
{"type": "code", "ref": "src/services/order.service.ts:142", "summary": "Unbounded .map+await"}
],
"unknowns": ["Why only eu-west-1?", "When did this start?"],
"next_agent": "diagnostics",
"next_stage": "verification"
}Reads production/traces/agent-metrics.jsonl and displays a per-agent performance summary table for the current or a specified…
Provides the vendored agent-style v0.3.5 prose rule pack as a portable Claude skill. Use when installing, syncing, applying, or…
Provides Angular best practices for components, modules, services, and reactive patterns. Use when working with Angular…
Records unexpected API behaviors, undocumented caveats, version bugs, or non-obvious workarounds into…
Defines REST and GraphQL API contracts including endpoints, request/response schemas, auth flows, and versioning strategy. Use…
Manages the ADR (Architecture Decision Record) registry. Use when recording tech-stack choices, design patterns, or…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.