Skip to content

extend: agent-doctor — find custom subagents that silently won't register (completes the silent-failure family)#8

Open
deemwario wants to merge 1 commit into
mainfrom
extend/agent-doctor-cycle19
Open

extend: agent-doctor — find custom subagents that silently won't register (completes the silent-failure family)#8
deemwario wants to merge 1 commit into
mainfrom
extend/agent-doctor-cycle19

Conversation

@deemwario

Copy link
Copy Markdown

Extend: agent-doctor — find custom subagents that silently won't register

#ossengine cycle 19extend the family, additive, no owner gate. Completes the "agent config that fails silently" family.

Why

A custom subagent (.claude/agents/<name>.md) with broken frontmatter just never shows up — no error, the agent silently isn't there. This is the 4th and final member of the silent-failure family:
hooklint (hooks) · mcp-doctor (MCP servers) · skill-doctor (skills) · agent-doctor (subagents).

What it does

Scans a .claude/agents dir (or a single .md) and flags:

  • NO_FRONTMATTER / NO_NAME / NO_DESCRIPTION (HIGH) — won't register, or won't be routed to (the model selects subagents by description)
  • NAME_MISMATCH / DUP_NAME (MED) — invocation confusion / collision
  • EMPTY_BODY (LOW) — no system-prompt body
  • TOOLS_MALFORMED (LOW, heuristic) — tools field that won't parse

Exit 0/1/2; --json for CI. Conservative + honest — it does not validate individual tool names (the registry varies) or judge prompt quality (disclaimer says so).

Verification (independently re-run)

  • test_agent-doctor.sh24/24 green.
  • Exit codes confirmed directly: findings→1, clean→0, missing/non-md→2. --json{agents_dir, agents_scanned, findings, summary}.
  • Catches NO_FRONTMATTER + NO_DESCRIPTION on synthetic fixtures.
  • Single-file python3, stdlib only. README house-style with the deemwar.com/contact CTA. MIT.

🤖 Generated with Claude Code

…ster

Completes the 'agent config that fails silently' family (hooklint=hooks,
mcp-doctor=MCP servers, skill-doctor=skills, agent-doctor=subagents). A
custom subagent (.claude/agents/<name>.md) with broken frontmatter just
never shows up — no error, the agent silently isn't there.

agent-doctor scans a .claude/agents dir (or a single .md) and flags:
no frontmatter / no name / no description (won't register or route),
name/filename mismatch, duplicate names, empty system-prompt body, and a
malformed tools field. Conservative + honest — it does NOT validate
individual tool names (the registry varies) or judge prompt quality.
Exit 0/1/2; --json for CI.

- single-file python3, stdlib only; test_agent-doctor.sh 24/24 green.
- house-style README with the deemwar.com/contact CTA. MIT.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant