refactor(discuss-phase): domain-aware gray areas and deeper probing
- Remove useless "None — you decide" skip option - Generate phase-specific gray areas based on domain analysis (UI features, CLI tools, APIs, organization tasks, etc.) - Increase probing depth: 4 questions per area before check - Make context.md categories flexible (emerge from discussion) - Add CLI and organization examples to context template Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,8 @@ Template for `.planning/phases/XX-name/{phase}-CONTEXT.md` - captures implementa
|
||||
|
||||
**Purpose:** Document decisions that downstream agents need. Researcher uses this to know WHAT to investigate. Planner uses this to know WHAT choices are locked vs flexible.
|
||||
|
||||
**Key principle:** Categories are NOT predefined. They emerge from what was actually discussed for THIS phase. A CLI phase has CLI-relevant sections, a UI phase has UI-relevant sections.
|
||||
|
||||
**Downstream consumers:**
|
||||
- `gsd-phase-researcher` — Reads decisions to focus research (e.g., "card layout" → research card component patterns)
|
||||
- `gsd-planner` — Reads decisions to create specific tasks (e.g., "infinite scroll" → task includes virtualization)
|
||||
@@ -28,11 +30,14 @@ Template for `.planning/phases/XX-name/{phase}-CONTEXT.md` - captures implementa
|
||||
<decisions>
|
||||
## Implementation Decisions
|
||||
|
||||
### [Category discussed, e.g., UI]
|
||||
### [Area 1 that was discussed]
|
||||
- [Specific decision made]
|
||||
- [Another decision if applicable]
|
||||
|
||||
### [Category discussed, e.g., Behavior]
|
||||
### [Area 2 that was discussed]
|
||||
- [Specific decision made]
|
||||
|
||||
### [Area 3 that was discussed]
|
||||
- [Specific decision made]
|
||||
|
||||
### Claude's Discretion
|
||||
@@ -65,6 +70,9 @@ Template for `.planning/phases/XX-name/{phase}-CONTEXT.md` - captures implementa
|
||||
```
|
||||
|
||||
<good_examples>
|
||||
|
||||
**Example 1: Visual feature (Post Feed)**
|
||||
|
||||
```markdown
|
||||
# Phase 3: Post Feed - Context
|
||||
|
||||
@@ -81,18 +89,17 @@ Display posts from followed users in a scrollable feed. Users can view posts and
|
||||
<decisions>
|
||||
## Implementation Decisions
|
||||
|
||||
### UI
|
||||
### Layout style
|
||||
- Card-based layout, not timeline or list
|
||||
- Each card shows: author avatar, name, timestamp, full post content, reaction counts
|
||||
- Cards have subtle shadows, rounded corners — modern feel
|
||||
- Show 10 posts initially, load more on scroll
|
||||
|
||||
### Behavior
|
||||
### Loading behavior
|
||||
- Infinite scroll, not pagination
|
||||
- Pull-to-refresh on mobile
|
||||
- New posts indicator at top ("3 new posts") rather than auto-inserting
|
||||
|
||||
### Empty State
|
||||
### Empty state
|
||||
- Friendly illustration + "Follow people to see posts here"
|
||||
- Suggest 3-5 accounts to follow based on interests
|
||||
|
||||
@@ -108,7 +115,6 @@ Display posts from followed users in a scrollable feed. Users can view posts and
|
||||
|
||||
- "I like how Twitter shows the new posts indicator without disrupting your scroll position"
|
||||
- Cards should feel like Linear's issue cards — clean, not cluttered
|
||||
- No infinite scroll fatigue — maybe show "You're all caught up" after ~50 posts
|
||||
|
||||
</specifics>
|
||||
|
||||
@@ -116,7 +122,6 @@ Display posts from followed users in a scrollable feed. Users can view posts and
|
||||
## Deferred Ideas
|
||||
|
||||
- Commenting on posts — Phase 5
|
||||
- Reaction picker (not just counts) — Phase 5
|
||||
- Bookmarking posts — add to backlog
|
||||
|
||||
</deferred>
|
||||
@@ -126,6 +131,131 @@ Display posts from followed users in a scrollable feed. Users can view posts and
|
||||
*Phase: 03-post-feed*
|
||||
*Context gathered: 2025-01-20*
|
||||
```
|
||||
|
||||
**Example 2: CLI tool (Database backup)**
|
||||
|
||||
```markdown
|
||||
# Phase 2: Backup Command - Context
|
||||
|
||||
**Gathered:** 2025-01-20
|
||||
**Status:** Ready for planning
|
||||
|
||||
<domain>
|
||||
## Phase Boundary
|
||||
|
||||
CLI command to backup database to local file or S3. Supports full and incremental backups. Restore command is a separate phase.
|
||||
|
||||
</domain>
|
||||
|
||||
<decisions>
|
||||
## Implementation Decisions
|
||||
|
||||
### Output format
|
||||
- JSON for programmatic use, table format for humans
|
||||
- Default to table, --json flag for JSON
|
||||
- Verbose mode (-v) shows progress, silent by default
|
||||
|
||||
### Flag design
|
||||
- Short flags for common options: -o (output), -v (verbose), -f (force)
|
||||
- Long flags for clarity: --incremental, --compress, --encrypt
|
||||
- Required: database connection string (positional or --db)
|
||||
|
||||
### Error recovery
|
||||
- Retry 3 times on network failure, then fail with clear message
|
||||
- --no-retry flag to fail fast
|
||||
- Partial backups are deleted on failure (no corrupt files)
|
||||
|
||||
### Claude's Discretion
|
||||
- Exact progress bar implementation
|
||||
- Compression algorithm choice
|
||||
- Temp file handling
|
||||
|
||||
</decisions>
|
||||
|
||||
<specifics>
|
||||
## Specific Ideas
|
||||
|
||||
- "I want it to feel like pg_dump — familiar to database people"
|
||||
- Should work in CI pipelines (exit codes, no interactive prompts)
|
||||
|
||||
</specifics>
|
||||
|
||||
<deferred>
|
||||
## Deferred Ideas
|
||||
|
||||
- Scheduled backups — separate phase
|
||||
- Backup rotation/retention — add to backlog
|
||||
|
||||
</deferred>
|
||||
|
||||
---
|
||||
|
||||
*Phase: 02-backup-command*
|
||||
*Context gathered: 2025-01-20*
|
||||
```
|
||||
|
||||
**Example 3: Organization task (Photo library)**
|
||||
|
||||
```markdown
|
||||
# Phase 1: Photo Organization - Context
|
||||
|
||||
**Gathered:** 2025-01-20
|
||||
**Status:** Ready for planning
|
||||
|
||||
<domain>
|
||||
## Phase Boundary
|
||||
|
||||
Organize existing photo library into structured folders. Handle duplicates and apply consistent naming. Tagging and search are separate phases.
|
||||
|
||||
</domain>
|
||||
|
||||
<decisions>
|
||||
## Implementation Decisions
|
||||
|
||||
### Grouping criteria
|
||||
- Primary grouping by year, then by month
|
||||
- Events detected by time clustering (photos within 2 hours = same event)
|
||||
- Event folders named by date + location if available
|
||||
|
||||
### Duplicate handling
|
||||
- Keep highest resolution version
|
||||
- Move duplicates to _duplicates folder (don't delete)
|
||||
- Log all duplicate decisions for review
|
||||
|
||||
### Naming convention
|
||||
- Format: YYYY-MM-DD_HH-MM-SS_originalname.ext
|
||||
- Preserve original filename as suffix for searchability
|
||||
- Handle name collisions with incrementing suffix
|
||||
|
||||
### Claude's Discretion
|
||||
- Exact clustering algorithm
|
||||
- How to handle photos with no EXIF data
|
||||
- Folder emoji usage
|
||||
|
||||
</decisions>
|
||||
|
||||
<specifics>
|
||||
## Specific Ideas
|
||||
|
||||
- "I want to be able to find photos by roughly when they were taken"
|
||||
- Don't delete anything — worst case, move to a review folder
|
||||
|
||||
</specifics>
|
||||
|
||||
<deferred>
|
||||
## Deferred Ideas
|
||||
|
||||
- Face detection grouping — future phase
|
||||
- Cloud sync — out of scope for now
|
||||
|
||||
</deferred>
|
||||
|
||||
---
|
||||
|
||||
*Phase: 01-photo-organization*
|
||||
*Context gathered: 2025-01-20*
|
||||
```
|
||||
|
||||
</good_examples>
|
||||
|
||||
<guidelines>
|
||||
@@ -133,11 +263,11 @@ Display posts from followed users in a scrollable feed. Users can view posts and
|
||||
|
||||
The output should answer: "What does the researcher need to investigate? What choices are locked for the planner?"
|
||||
|
||||
**Good content:**
|
||||
**Good content (concrete decisions):**
|
||||
- "Card-based layout, not timeline"
|
||||
- "Infinite scroll with pull-to-refresh"
|
||||
- "Show 10 posts initially"
|
||||
- "New posts indicator rather than auto-insert"
|
||||
- "Retry 3 times on network failure, then fail"
|
||||
- "Group by year, then by month"
|
||||
- "JSON for programmatic use, table for humans"
|
||||
|
||||
**Bad content (too vague):**
|
||||
- "Should feel modern and clean"
|
||||
@@ -148,7 +278,7 @@ The output should answer: "What does the researcher need to investigate? What ch
|
||||
**Sections explained:**
|
||||
|
||||
- **Domain** — The scope anchor. Copied/derived from ROADMAP.md. Fixed boundary.
|
||||
- **Decisions** — Organized by category (UI, UX, Behavior, etc.). Actual choices made.
|
||||
- **Decisions** — Organized by areas discussed (NOT predefined categories). Section headers come from the actual discussion — "Layout style", "Flag design", "Grouping criteria", etc.
|
||||
- **Claude's Discretion** — Explicit acknowledgment of what Claude can decide during implementation.
|
||||
- **Specifics** — Product references, examples, "like X but..." statements.
|
||||
- **Deferred** — Ideas captured but explicitly out of scope. Prevents scope creep while preserving good ideas.
|
||||
|
||||
Reference in New Issue
Block a user