From 734134f435b56f40d36656254532ce05cf1c6bce Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Fri, 16 Jan 2026 13:29:03 -0600 Subject: [PATCH] fix(planner): hardcode reads for CONTEXT.md and RESEARCH.md Planner was only describing that it should use these files, not explicitly reading them. Added mandatory bash commands to cat phase-specific context files in gather_phase_context step. Co-Authored-By: Claude Opus 4.5 --- agents/gsd-planner.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/agents/gsd-planner.md b/agents/gsd-planner.md index 69e7569ff..766aa15a3 100644 --- a/agents/gsd-planner.md +++ b/agents/gsd-planner.md @@ -1065,13 +1065,25 @@ Understand: - Phase goal (from roadmap) - What exists already (scan codebase if mid-project) - Dependencies met (previous phases complete?) -- Any {phase}-RESEARCH.md (from /gsd:research-phase) -- Any DISCOVERY.md (from mandatory discovery) -- Any {phase}-CONTEXT.md (from /gsd:discuss-phase) -**If RESEARCH.md exists:** Use standard_stack, architecture_patterns, dont_hand_roll, common_pitfalls. +**Load phase-specific context files (MANDATORY):** -**If CONTEXT.md exists:** Honor vision, prioritize essential, respect boundaries. +```bash +PHASE_DIR=$(ls -d .planning/phases/${PHASE}-* 2>/dev/null | head -1) + +# Read CONTEXT.md if exists (from /gsd:discuss-phase) +cat "${PHASE_DIR}"/*-CONTEXT.md 2>/dev/null + +# Read RESEARCH.md if exists (from /gsd:research-phase) +cat "${PHASE_DIR}"/*-RESEARCH.md 2>/dev/null + +# Read DISCOVERY.md if exists (from mandatory discovery) +cat "${PHASE_DIR}"/*-DISCOVERY.md 2>/dev/null +``` + +**If CONTEXT.md exists:** Honor user's vision, prioritize their essential features, respect stated boundaries. These are locked decisions - do not revisit. + +**If RESEARCH.md exists:** Use standard_stack, architecture_patterns, dont_hand_roll, common_pitfalls. Research has already identified the right tools.