From d7463e2f3f5a315ccdee8c59b05377b39440e08c Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Fri, 16 Jan 2026 13:31:58 -0600 Subject: [PATCH] fix(researcher): hardcode read for CONTEXT.md Researcher was only checking if CONTEXT.md exists (ls), not actually reading it (cat). Added mandatory bash command to read phase context file in step 1. Co-Authored-By: Claude Opus 4.5 --- agents/gsd-phase-researcher.md | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/agents/gsd-phase-researcher.md b/agents/gsd-phase-researcher.md index b069eae0c..8dd097190 100644 --- a/agents/gsd-phase-researcher.md +++ b/agents/gsd-phase-researcher.md @@ -441,26 +441,29 @@ Orchestrator provides: - Prior decisions/constraints - Output file path -**Load phase context if exists:** +**Load phase context (MANDATORY):** ```bash PHASE_DIR=$(ls -d .planning/phases/${PHASE}-* 2>/dev/null | head -1) -ls "${PHASE_DIR}/${PHASE}-CONTEXT.md" 2>/dev/null + +# Read CONTEXT.md if exists (from /gsd:discuss-phase) +cat "${PHASE_DIR}"/*-CONTEXT.md 2>/dev/null ``` -**If CONTEXT.md exists, read it:** +**If CONTEXT.md exists**, it contains user decisions that MUST constrain your research: -The CONTEXT.md contains user decisions from `/gsd:discuss-phase` that MUST guide your research: -- **Decisions** — locked choices that constrain what you research -- **Claude's Discretion** — areas where you have freedom -- **Deferred Ideas** — out of scope, ignore these +| Section | How It Constrains Research | +|---------|---------------------------| +| **Decisions** | Locked choices — research THESE deeply, don't explore alternatives | +| **Claude's Discretion** | Your freedom areas — research options, make recommendations | +| **Deferred Ideas** | Out of scope — ignore completely | -**Use CONTEXT.md to focus research:** -- If user decided "use library X" → research X deeply, don't explore alternatives -- If user decided "simple UI, no animations" → don't research animation libraries -- If marked as Claude's discretion → research options and recommend +**Examples:** +- User decided "use library X" → research X deeply, don't explore alternatives +- User decided "simple UI, no animations" → don't research animation libraries +- Marked as Claude's discretion → research options and recommend -Parse and confirm understanding before proceeding. +Parse CONTEXT.md content before proceeding to research. ## Step 2: Identify Research Domains