Prevent scope creep in discuss-phase command

Add explicit guardrails to ensure context gathering questions clarify
HOW to implement roadmap scope rather than suggesting WHAT to add.
Questions must never expand scope - if user adds scope, direct them
to update ROADMAP first instead.

Changes:
- Template: Replace "Secondary goals" with "Clarifications" (HOW, not WHAT ELSE)
- Workflow: Add CRITICAL block forbidding scope-expanding questions
- Workflow: Update decision gate to emphasize clarification over expansion
- Command: Add NO SCOPE CREEP rules

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2025-12-15 17:49:28 -06:00
parent 72349e6415
commit bcc58add6a
4 changed files with 35 additions and 18 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
node_modules/ node_modules/
package-lock.json package-lock.json
.DS_Store .DS_Store
TO-DOS.md

View File

@@ -32,10 +32,15 @@ Phase number: $ARGUMENTS (required)
4. Follow discuss-phase.md workflow: 4. Follow discuss-phase.md workflow:
- Present initial context from roadmap - Present initial context from roadmap
- Analyze gaps in: objectives, constraints, risks, success indicators, codebase context - Analyze gaps in: objectives, constraints, risks, success indicators, codebase context
- Ask 2-4 questions about genuine gaps (skip what roadmap provides) - Ask 2-4 CLARIFYING questions (never suggest additions or expansions)
- Present decision gate (ready / ask more / let me add context) - Present decision gate (ready / ask more / let me add context)
- Create CONTEXT.md using template - Create CONTEXT.md using template
5. Offer next steps (typically: plan the phase) 5. Offer next steps (typically: plan the phase)
CRITICAL - NO SCOPE CREEP:
- Questions clarify HOW to implement roadmap scope, not WHAT to add
- Never ask "should we also..." or "do you want to add..."
- If user adds scope, suggest updating ROADMAP first instead
</process> </process>
<success_criteria> <success_criteria>

View File

@@ -20,10 +20,10 @@ Template for `.planning/phases/XX-name/{phase}-CONTEXT.md` - phase context docum
[Clear, specific description of what this phase delivers] [Clear, specific description of what this phase delivers]
**Primary goal:** **Primary goal:**
[Main objective - what ships at the end] [Main objective from roadmap - what ships at the end]
**Secondary goals:** **Clarifications:**
[Supporting objectives or nice-to-haves] [Any clarified details about HOW the primary goal works - not additional features]
**Out of scope:** **Out of scope:**
[What this phase explicitly does NOT include - prevents scope creep] [What this phase explicitly does NOT include - prevents scope creep]
@@ -178,10 +178,10 @@ Implement JWT-based authentication with secure session management.
**Primary goal:** **Primary goal:**
Users can register, login, logout with JWT tokens stored in httpOnly cookies. Protected routes verify authentication. Users can register, login, logout with JWT tokens stored in httpOnly cookies. Protected routes verify authentication.
**Secondary goals:** **Clarifications:**
- Password reset flow via email - Tokens stored as httpOnly cookies (not localStorage) per security requirements
- Remember me functionality - "Protected routes" means API routes + page-level middleware redirects
- Session expiry and refresh - Password reset included per roadmap scope
**Out of scope:** **Out of scope:**
- OAuth providers (Google, GitHub) - deferred to Phase 4 - OAuth providers (Google, GitHub) - deferred to Phase 4

View File

@@ -99,17 +99,23 @@ Identify gaps where additional clarity would improve planning quality.
<initial_questions> <initial_questions>
Ask 2-4 questions based on actual gaps. Use AskUserQuestion with structured options. Ask 2-4 questions based on actual gaps. Use AskUserQuestion with structured options.
CRITICAL: Questions must CLARIFY roadmap scope, not EXPAND it.
- ASK: "How should X from the roadmap work?" (clarification)
- ASK: "What constraints affect implementation?" (context)
- ASK: "What existing code patterns should I follow?" (context)
- NEVER ASK: "What else should we add?" (scope creep)
- NEVER ASK: "Should we also include...?" (scope creep)
- NEVER SUGGEST: Additional features beyond roadmap
**If objectives are vague:** **If objectives are vague:**
header: "Phase Objectives" header: "Phase Objectives"
question: "What should Phase ${PHASE} accomplish?" question: "The roadmap says [X]. How should this work specifically?"
options: options:
- "Create new functionality" - Build something that doesn't exist yet - "Minimal implementation" - Core functionality only, simplest approach
- "Modify existing system" - Change or enhance what's already there - "Standard approach" - Follow common patterns for this type of work
- "Fix or refactor" - Address bugs or improve code quality - "Match existing patterns" - Do it the way similar things are done in codebase
- "Integrate external service" - Connect to API, library, or third-party - "I'll clarify" - Let me explain what I have in mind
- "Infrastructure or setup" - Database, deployment, configuration
- "Other" - Something different
**If constraints are unclear:** **If constraints are unclear:**
header: "Constraints" header: "Constraints"
@@ -180,13 +186,18 @@ If "Not sure" selected, offer to scan codebase:
Header: "Context Gathering" Header: "Context Gathering"
Options: Options:
1. "Create CONTEXT.md" - I have enough context, proceed 1. "Create CONTEXT.md" - I have enough context, proceed
2. "Ask more questions" - There are details I want to clarify 2. "Ask more questions" - I want to clarify how something should work
3. "Let me add context" - I want to provide additional information 3. "Let me add context" - I have information that affects implementation
``` ```
If "Ask more questions" → generate 2-3 contextual follow-ups based on accumulated context → return to gate. If "Ask more questions" → generate 2-3 CLARIFYING follow-ups (never suggest additions) → return to gate.
If "Let me add context" → receive input → return to gate. If "Let me add context" → receive input → return to gate.
Loop until "Create CONTEXT.md" selected. Loop until "Create CONTEXT.md" selected.
SCOPE CREEP PREVENTION:
- Follow-up questions must clarify roadmap items, not expand them
- If user adds scope during "Let me add context", note it for ROADMAP update instead
- CONTEXT.md documents HOW to implement roadmap scope, not WHAT additional things to add
</decision_gate> </decision_gate>
</step> </step>