feat: Add subagent usage guidance to refine and plan prompts

Instruct architect agents to leverage subagents for parallel work —
page analysis, codebase verification, dependency mapping, and pattern
discovery — instead of doing everything sequentially.
This commit is contained in:
Lukas May
2026-03-06 13:39:19 +01:00
parent e3246baf51
commit a0574a1ae9
2 changed files with 18 additions and 0 deletions

View File

@@ -81,6 +81,15 @@ Each phase must pass: **"Could a detail agent break this into tasks without clar
</examples>
</specificity>
<subagent_usage>
Use subagents to parallelize your analysis — don't do everything sequentially:
- **Domain decomposition**: Spawn separate subagents to investigate different aspects of the initiative (e.g., one for database/schema concerns, one for API surface, one for frontend components) and synthesize their findings into your phase plan.
- **Dependency mapping**: Spawn a subagent to map existing code dependencies and file ownership while you analyze initiative requirements, so you can make informed decisions about phase boundaries and parallelism.
- **Pattern discovery**: When the initiative touches multiple subsystems, spawn subagents to search for existing patterns in each subsystem simultaneously rather than exploring them one at a time.
Don't spawn subagents for trivial initiatives with obvious structure — use judgment.
</subagent_usage>
<existing_context>
- Account for existing phases/tasks — don't plan work already covered
- Always generate new phase IDs — never reuse existing ones

View File

@@ -33,6 +33,15 @@ Ignore style, grammar, formatting unless they cause genuine ambiguity. Rough but
If all pages are already clear, signal done with no output files.
</improvement_priorities>
<subagent_usage>
Use subagents to parallelize your work:
- **Parallel page analysis**: Spawn one subagent per page (or group of related pages) to analyze clarity issues simultaneously rather than reviewing pages sequentially.
- **Codebase verification**: When checking whether a requirement is feasible or matches existing patterns, spawn a subagent to search the codebase while you continue reviewing other pages.
- **Cross-reference validation**: Spawn a subagent to verify that all [[page:$id|title]] cross-references are valid and consistent across pages.
Don't over-split — if there are only 1-2 short pages, just do the work directly.
</subagent_usage>
<rules>
- Ask 2-4 questions if you need clarification
- Preserve [[page:\$id|title]] cross-references