Skip to content

Sub-agent conventions: codify from latest official docs, then audit all plugins #1225

Closed as not planned

Description

@kyle-sexton

Intent

We suspect custom sub-agent features are going unleveraged because we do not have a complete picture of what the platform offers — preloaded/auto-loaded skills, conversation forking, per-agent status line (semantics currently unclear to us), and likely unknown unknowns beyond those. This issue closes that gap in two sequenced parts: first research and codify sub-agent conventions from the latest official documentation, then audit every plugin in this repo against them.

HARD RULE — pointer, not copy. The conventions doc (and this issue) must LINK to the upstream official documentation pages, never restate schema, field lists, or feature content inline. Restating creates maintenance burden and drifts as upstream evolves. Codify our decisions and conventions; point at upstream for the facts.

Part 1 — Research and codify sub-agent conventions

Exhaustive pass over the latest official Claude Code sub-agent documentation, plus every configuration page that ties into sub-agents (settings, plugin/skill surfaces, frontmatter references, etc.). Assume our current knowledge is stale; enumerate the full current feature surface, including capabilities we have never used.

Deliverable: codified conventions covering at minimum —

  1. Existence qualifier — a categorization for when a custom sub-agent earns its existence versus delegating to general-purpose/built-in agents.
  2. Frontmatter surface — the full YAML frontmatter surface for sub-agents and its usage patterns (as pointers to the upstream reference, with our conventions layered on top).
  3. Rationale and best practices — why/when guidance and a catalog of available features (again by pointer), including the ones prompting this issue: preloaded/auto-load skills, conversation forking, per-agent status line, and anything else discovered.

Part 2 — Audit all plugins (gated on Part 1)

Do not start until Part 1's conventions are codified. Then audit the full plugin inventory in this repo against them: every existing custom sub-agent (does it pass the existence qualifier? does it use the frontmatter surface correctly?) and every plugin that lacks sub-agents but would benefit under the new conventions. Output: a findings list with per-plugin dispositions; remediation can be follow-up issues.

Locked decisions (do not re-litigate)

  • One issue, two parts; Part 2 is gated on Part 1.
  • Conventions home: the existing plugin-authoring conventions surface in this repo — extend it, do not stand up a parallel surface (reuse-or-replace). Verify the actual current location at execution time.
  • Escalation (USER-RESERVED): if research shows the content is a cross-cutting org-wide standard rather than Claude-Code-specific, it routes to melodic-software/standards instead — but that call is reserved for the user; surface it before placing content there.
  • Pointer-not-copy (hard rule above) applies to all deliverables.

Cross-link

#1226 (git-history archaeology skill) consumes Part 1's existence qualifier for its sub-agent evaluation, so Part 1 should land before that issue finishes design.

Priority

MEDIUM-LOW (no exact label tier exists; priority: medium applied as nearest). Elevated only by the sequencing note above: Part 1 feeds the git-history archaeology skill issue's design.

Activity

  1. added
    needs-human
    on Jul 24, 2026
  2. kyle-sexton commented on Jul 24, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during the /work-items:work-loop autonomous drain cycle.

    Surfaced in the --autonomous frontier (unassigned, unblocked, not human-gated) but carries no role label — already triaged (priority set) yet never routed to agent-ready or needs-human. Content reads as structural/cross-cutting (convention, contract, or design-space work) rather than a scoped bug fix, so this cycle's admission gate classifies it C4-shaped or unclassified and routes it human-gated per the fail-closed default rather than admitting it to autonomous dispatch.

    Routing: added needs-human. No other state changed — priority and existing labels are left as-is. If this is actually scoped/delegable, re-label to agent-ready (+ status: ready) and it will be picked up by a later drain cycle.

  3. kyle-sexton commented on Jul 25, 2026

    @kyle-sexton
    MemberAuthor

    Proposed boundary, not a ruling — surfacing this so you can push back before anything is built against it.

    A parallel effort (context-engineering rightsizing) has two deliverables that looked, from a distance, like they might collide with this issue's Part 2 all-plugin audit. Its own decision record required reconciling with #1225 before building anything sweep-shaped, so I read this issue first-hand rather than working from a summary. The boundary doc is in #1280.

    Finding: no collision. The populations and the questions are different.

    • Part 2 here audits sub-agent definitions. Enumerated in the checkout: 7 agent .md files across 2 of 60 plugins (plugins/plugin-quality/agents/auditor.md and plugins/review/agents/ ×6), widening only to the "would this plugin benefit from one" question over the other 58.
    • The other effort operates on instruction surfaces — 188 SKILL.md files plus CLAUDE.md, .claude/rules/, prompt-type hook text, and output styles.

    The one place they touch the same files is claude-config:audit-instructions, which inventories agent definition markdown as one of its surfaces (plugins/claude-config/skills/audit-instructions/SKILL.md:78, :82, scope arg at :67). It reads those files for instruction content vs current model capability; this issue reads them for existence qualification and frontmatter conformance. Same files, orthogonal questions — neither effort blocks the other, and neither needs a new router to reach those 7 files.

    One thing worth your attention before Part 1 is written. The existence qualifier may have a partial incumbent. claude-config:audit-automation-gaps already treats subagents as an audited automation category (SKILL.md:3, :43) and already asks the existence question:

    Subagents — for each quality concern:

    • Would a subagent provide value over a hook or skill?
    • Does context isolation actually help?
    • Is there a plugin that already provides this?

    (plugins/claude-config/skills/audit-automation-gaps/context/gap-analysis.md:21-25)

    That is narrower than what deliverable 1 describes, and it is a gap-analysis lens rather than a codified qualifier — so this is not "already done." But it is prior art on the same question, and reconciling against it seems worth doing before writing a qualifier fresh. Entirely your call; flagging it, not claiming it.

    Nothing in #1280 changes this issue's scope, sequencing, or its locked decisions.

  4. kyle-sexton commented on Jul 26, 2026

    @kyle-sexton
    MemberAuthor

    Partial execution landed, and the pointer-not-copy rule is honored differently than this issue's original framing assumed

    Filed from the discovery-subagent-dispatch topic (PR #1425), which is substantially Part 2 of this issue, scoped to one plugin, plus the input for the rest.

    Part 1 — codify subagent conventions from current official docs. Done as research, against https://code.claude.com/docs/en/sub-agents, /skills, and /hooks, version-gated to a 2.1.219 floor because several of the facts are false rather than merely absent on releases still in the field. The load-bearing ones:

    • Background is the default subagent execution mode from 2.1.198; below that the whole "background filter is the default filter" premise fails.
    • Two tool filters narrow every subagent except a conversation fork, which skips both. AskUserQuestion, EnterPlanMode/ExitPlanMode, Workflow, and the Task tools are all unavailable to a non-fork subagent spawned through the Agent tool — teammates in agent teams keep the Task tools, so that carve-out has to be stated wherever the rule is applied.
    • Plugin-shipped agents ignore hooks, mcpServers, and permissionMode.
    • Declaring memory auto-enables Edit regardless of the tools list — verbatim: "Read, Write, and Edit tools are automatically enabled so the subagent can manage its memory files." A tool-cage claim made alongside memory: is false.
    • A missing or disabled skills: entry is skipped silently, logged to the debug log only.

    Three further behaviors were settled empirically rather than from docs, on a throwaway probe plugin with tools: [] so the agent could not have read the values it reported: ! shell substitution does fire on the preload path and is byte-identical to the Skill-tool path; allowed-tools grants do not fire on either the preload or the Skill-tool path in this build; and preload injects the SKILL.md body only, with ${CLAUDE_PLUGIN_ROOT} expanded, so supporting files stay lazy.

    On this issue's locked pointer-not-copy decision: #1425 does not add a conventions doc. The version-gated facts above live in the topic's own plan, and the shipped skill text points at upstream rather than restating it. The one place they would belong permanently is the Delegation mechanics section arriving with #1096 — which has not merged (verified against main: no such section, no check 21, no skill-quality/skills/check/reference/). Every reference to that doctrine in the topic is marked aspirational for exactly that reason.

    Part 2 — audit all plugins. Complete: 138 skills, 11 batches, zero skipped, verdicts DISPATCH-DEFAULT 22 / DISPATCH-OPTIONAL 44 / INLINE-ONLY 39 / NO-CHANGE 33. The evidence is now tracked at docs/topics/skill-dispatch-posture-sweep/ rather than sitting in a gitignored memory slice where it would have vanished on worktree cleanup.

    Applying those verdicts to the remaining plugins is #1426. Two accounting gaps are carried forward explicitly rather than smoothed over: 32 INLINE-ONLY rows upheld without an independent read, and 10 rows in no normalization bucket.

    One thing this work surfaced that this issue did not anticipate: playbooks:fable-5 ships a competing delegation rule that puts the burden of proof on the opposite side — filed as #1427. A fleet-wide audit applying one rule while the other ships is how the plugins end up internally inconsistent, so that conflict effectively gates #1426.

  5. added theissue type on Aug 13, 2026
  6. kyle-sexton commented on Aug 13, 2026

    @kyle-sexton
    MemberAuthor

    Frontier disposition (drain session)

    Ruling: Close as not planned for this drain wave (frontier consensus).

    Dual-panel drain ruling: advisory, superseded, folded into a program umbrella, or blocked on a host/design carrier without an actionable in-repo slice this session. Re-open with a concrete acceptance brief if a consumer needs the work.

    KEEP set for this wave: standing telemetry; host-physical Class C (#631 family); program umbrellas #530/#531/#532/#535; live design carriers #1500/#1553/#1668/#1695/#1716/#1681/#1718; #1360.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-human

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions