docs(subagents): rewrite runbook for single-file markdown format#655
Merged
Conversation
PR #652 migrated sub-agent definitions from JSON+MD sidecar pairs to single markdown files with YAML frontmatter, added an optional Context parameter to spawn_agent, and enriched the [available-subagents] discovery context layer to include per-agent description, tools, and an example call. None of that was reflected in the runbook — anyone following the existing "Defining subagents" section would write a .json file the loader rejects. Rewrite docs/runbooks/subagents.md end to end: - Discovery section shows the new enriched block (per-agent description + tools + timeout + a how-to-delegate block with the context field example) instead of the old one-line form. - Invocation section documents all three spawn_agent arguments (agent, task, context) with one null-context and one context-populated example. Clarifies that Context is prefixed onto the subagent's first user message as a Context:/Task: block, and that the agent's system prompt stays verbatim from disk (not mutated by runtime context). - Defining subagents section replaces the JSON schema + companion-file walkthrough with a single markdown-with-frontmatter template. Documents every frontmatter field with required/default columns: name, description, tools, modelRole, timeoutSeconds, visibility (hyphenated or PascalCase), emitStructuredFindings. Adds a loader-behavior-fail-loud subsection listing every rejection reason the scanner can log. - Creating a custom agent walkthrough now writes a single .md file with frontmatter instead of a JSON+MD pair. - Limitations section gains an entry noting that per-agent model selection is not yet supported and is blocked on the multi-model provider follow-on. Also update IMPLEMENTATION_PLAN.md line 969 — the "Subagent Roadmap" entry still listed the JSON file format. Updated minimally to reference the new format and cite both #226 (original disk-based design) and #652 (migration to frontmatter). Historical references in RELEASE_NOTES.md are left alone — they accurately describe what shipped at #226 and shouldn't be retconned.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #652 migrated sub-agent definitions from JSON+MD sidecar pairs to single
.mdfiles with YAML frontmatter, added an optionalContextparameter tospawn_agent, and enriched the[available-subagents]discovery context layer to include per-agent description, tools, and an example call. None of that was reflected in the runbook — anyone following the existing "Defining subagents" section would write a.jsonfile the loader rejects.This PR rewrites
docs/runbooks/subagents.mdend to end and minimally updates one stale entry inIMPLEMENTATION_PLAN.md.What changed in the runbook
contextfield example) instead of the old one-line form.spawn_agentarguments (agent,task,context) with one null-context and one populated-context example. Clarifies that Context is prefixed onto the subagent's first user message as aContext:/Task:block, and that the agent's system prompt stays verbatim from disk (not mutated by runtime context).name,description,tools,modelRole,timeoutSeconds,visibility(accepts both hyphenateduser-facingand PascalCaseUserFacing),emitStructuredFindings. New loader behavior (fail loud) subsection enumerates every rejection reason the scanner can log, matching the contract pinned by test(subagents): consolidate anemic loader and actor tests #654's consolidated test..mdfile with frontmatter instead of a JSON+MD pair.IMPLEMENTATION_PLAN.md fix
Line 969 still listed the JSON file format in the "Subagent Roadmap" section. Updated minimally to reference the new format and cite both #226 (original disk-based design) and #652 (migration to frontmatter). The rest of the roadmap section is left alone — retconning historical entries would make the document less accurate.
What is NOT changed
RELEASE_NOTES.mdreferences to~/.netclaw/agents/<name>.jsonare historical — they accurately describe what shipped at feat(subagents): definition registry, spawn_agent tool, and file-based agents #226 and shouldn't be retconned.IMPLEMENTATION_PLAN.md(lines 972-985) that have also shipped (spawn_agenttool, discovery context layer) — that's housekeeping outside the scope of "fix stale format references."Test plan
Documentation-only change. No code touched, no tests to run. Existing CI (test + slopwatch + Docker build + smoke sandbox) will confirm nothing else regressed.
Related