fix(#672): add project skill discovery to subagent spawn points

Subagents now discover and read .agents/skills/ directory:
- Workflows: execute-phase, plan-phase, quick
- Agents: gsd-executor, gsd-planner, gsd-phase-researcher, gsd-plan-checker

Agents read SKILL.md (lightweight index) and load rules/*.md as needed,
avoiding full AGENTS.md files (100KB+ context cost).

Fixes: #672

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2026-02-19 10:31:56 -06:00
parent db1d003d86
commit 270b6c4aaa
7 changed files with 62 additions and 0 deletions

View File

@@ -13,6 +13,19 @@ Spawned by `/gsd:execute-phase` orchestrator.
Your job: Execute the plan completely, commit each task, create SUMMARY.md, update STATE.md.
</role>
<project_context>
Before executing, discover project context:
**Project skills:** Check `.agents/skills/` directory if it exists:
1. List available skills (subdirectories)
2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
3. Load specific `rules/*.md` files as needed during implementation
4. Do NOT load full `AGENTS.md` files (100KB+ context cost)
5. Follow skill rules relevant to your current task
This ensures project-specific patterns, conventions, and best practices are applied during execution.
</project_context>
<execution_flow>
<step name="load_project_state" priority="first">

View File

@@ -18,6 +18,19 @@ Spawned by `/gsd:plan-phase` (integrated) or `/gsd:research-phase` (standalone).
- Return structured result to orchestrator
</role>
<project_context>
Before researching, discover project context:
**Project skills:** Check `.agents/skills/` directory if it exists:
1. List available skills (subdirectories)
2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
3. Load specific `rules/*.md` files as needed during research
4. Do NOT load full `AGENTS.md` files (100KB+ context cost)
5. Research should account for project skill patterns
This ensures research aligns with project-specific conventions and libraries.
</project_context>
<upstream_input>
**CONTEXT.md** (if exists) — User decisions from `/gsd:discuss-phase`

View File

@@ -23,6 +23,19 @@ Goal-backward verification of PLANS before execution. Start from what the phase
You are NOT the executor or verifier — you verify plans WILL work before execution burns context.
</role>
<project_context>
Before verifying, discover project context:
**Project skills:** Check `.agents/skills/` directory if it exists:
1. List available skills (subdirectories)
2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
3. Load specific `rules/*.md` files as needed during verification
4. Do NOT load full `AGENTS.md` files (100KB+ context cost)
5. Verify plans account for project skill patterns
This ensures verification checks that plans follow project-specific conventions.
</project_context>
<upstream_input>
**CONTEXT.md** (if exists) — User decisions from `/gsd:discuss-phase`

View File

@@ -25,6 +25,19 @@ Your job: Produce PLAN.md files that Claude executors can implement without inte
- Return structured results to orchestrator
</role>
<project_context>
Before planning, discover project context:
**Project skills:** Check `.agents/skills/` directory if it exists:
1. List available skills (subdirectories)
2. Read `SKILL.md` for each skill (lightweight index ~130 lines)
3. Load specific `rules/*.md` files as needed during planning
4. Do NOT load full `AGENTS.md` files (100KB+ context cost)
5. Ensure plans account for project skill patterns and conventions
This ensures task actions reference the correct patterns and libraries for this project.
</project_context>
<context_fidelity>
## CRITICAL: User Decision Fidelity