feat: add gsd-pattern-mapper agent for codebase pattern analysis (#1861)

Add a new pattern mapper agent that analyzes the codebase for existing
patterns before planning, producing PATTERNS.md with per-file analog
assignments and code excerpts. Integrated into plan-phase workflow as
Step 7.8 (between research and planning), controlled by the
workflow.pattern_mapper config key (default: true).

Changes:
- New agent: agents/gsd-pattern-mapper.md
- New config key: workflow.pattern_mapper in VALID_CONFIG_KEYS and CONFIG_DEFAULTS
- init plan-phase: patterns_path field in JSON output
- plan-phase.md: Step 7.8 spawns pattern mapper, PATTERNS_PATH in planner files_to_read
- gsd-plan-checker.md: Dimension 12 (Pattern Compliance)
- model-profiles.cjs: gsd-pattern-mapper profile entry
- Tests: tests/pattern-mapper.test.cjs (5 tests)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-04-11 14:25:02 -04:00
parent 898dbf03e6
commit d59d635560
8 changed files with 547 additions and 1 deletions

View File

@@ -1196,6 +1196,7 @@ describe('E2E: Copilot full install verification', () => {
'gsd-integration-checker.agent.md',
'gsd-intel-updater.agent.md',
'gsd-nyquist-auditor.agent.md',
'gsd-pattern-mapper.agent.md',
'gsd-phase-researcher.agent.md',
'gsd-plan-checker.agent.md',
'gsd-planner.agent.md',