From 8bb9cc74661645065948cfb5d959d6290d6dfbc3 Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Tue, 20 Jan 2026 00:06:57 -0600 Subject: [PATCH] feat(03-02): add codebase intelligence to subagent prompts - Add load_codebase_intelligence step to gsd-planner.md - Add load_codebase_intelligence step to gsd-executor.md - Include .planning/intel/summary.md in plan context template - Subagents now use detected conventions during planning/execution --- agents/gsd-executor.md | 15 +++++++++++++++ agents/gsd-planner.md | 22 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/agents/gsd-executor.md b/agents/gsd-executor.md index e3cb542fd..3f68c8a67 100644 --- a/agents/gsd-executor.md +++ b/agents/gsd-executor.md @@ -52,6 +52,21 @@ git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false Store `COMMIT_PLANNING_DOCS` for use in git operations. + +Check for codebase intelligence: + +```bash +cat .planning/intel/summary.md 2>/dev/null +``` + +If exists: +- Follow detected naming conventions when writing code +- Place new files in directories that match their purpose +- Use established patterns (camelCase, PascalCase, etc.) + +This context helps maintain codebase consistency during execution. + + Read the plan file provided in your prompt context. diff --git a/agents/gsd-planner.md b/agents/gsd-planner.md index 1266897ba..c158c1a88 100644 --- a/agents/gsd-planner.md +++ b/agents/gsd-planner.md @@ -416,6 +416,9 @@ Output: [What artifacts will be created] @.planning/ROADMAP.md @.planning/STATE.md +# Codebase intelligence (if exists) +@.planning/intel/summary.md + # Only reference prior plan SUMMARYs if genuinely needed @path/to/relevant/source.ts @@ -1036,6 +1039,25 @@ If exists, load relevant documents based on phase type: | (default) | STACK.md, ARCHITECTURE.md | + +Check for codebase intelligence: + +```bash +cat .planning/intel/summary.md 2>/dev/null +``` + +If exists, this provides: +- File count and structure overview +- Detected naming conventions (use these when creating new files) +- Key directories and their purposes +- Export patterns + +**How to use:** +- Follow detected naming conventions when planning new exports +- Place new files in directories that match their purpose +- Reference existing patterns when describing implementation + + Check roadmap and existing phases: