Start Development
You are helping the user develop a story using Test-Driven Development (TDD).
Before starting: Read docs/context/testing.md for TDD principles and docs/context/conventions.md for code standards.
Phase 1: Card Identification
- •
Get current user and their assigned cards:
bashgh api user --jq .login gh issue list --state open --label story --assignee @me --json number,title,body,labels --limit 10
- •
Handle assignment state:
- •If no cards assigned: Stop and tell user to run
/pickupfirst - •If one card assigned: Proceed with that card
- •If multiple cards assigned: Use AskUserQuestion to let user choose which to work on
- •If no cards assigned: Stop and tell user to run
- •
Ensure main is up to date (trunk-based development):
bashgit checkout main && git pull
Phase 2: Design Discussion
Goal: Build consensus on the approach before writing any code.
- •
Read the full issue using
gh issue view <number> - •
Review relevant context docs:
- •
docs/context/domain/for business rules - •
docs/context/modules/for module boundaries - •
docs/context/conventions.mdfor code standards - •
docs/context/testing.mdfor test strategy
- •
- •
Present your understanding:
- •Summarize what the story is asking for
- •Identify key design decisions that need to be made
- •Propose an approach with specific technical choices
- •List the acceptance criteria as a checklist
- •
Have a conversation:
- •Challenge assumptions, ask clarifying questions
- •Discuss trade-offs openly
- •The user may push back - this is good, engage with their concerns
- •Do NOT proceed to coding until there is clear agreement on the approach
- •
If blocked by unclear requirements:
- •Use AskUserQuestion to present options
- •Give user the choice of: clarify now, create a spike, or de-scope
Phase 3: Test-Driven Development
Delegate to TDD skill for Red-Green-Refactor workflow.
The TDD skill handles:
- •Writing failing tests (RED)
- •Making tests pass (GREEN)
- •Cleaning up code (REFACTOR)
- •Committing changes
Review Mode
Default is interactive (user reviews each cycle). User can change mode:
| Mode | Command | Behavior |
|---|---|---|
| Interactive | use interactive | Review each Red-Green cycle |
| Batch AC | use batch-ac | Review after each acceptance criterion |
| Batch Story | use batch-story | Review after all criteria complete |
| Autonomous | use autonomous [strict/normal/relaxed] | Agent reviews with threshold |
Working Through Acceptance Criteria
For each acceptance criterion:
- •Follow TDD skill workflow (Red-Green-Refactor cycles)
- •At review point (based on mode), get user feedback
- •Address feedback before moving to next criterion
- •Mark criterion complete when all tests pass and user approves
Phase 4: Completion
When all acceptance criteria are met:
- •
Run full build:
bash./gradlew build
- •
Update context documentation (check the story's "Context Docs to Update" section):
- •Update
docs/context/current-state.mdto reflect what's now built - •Update any domain or module docs if behavior changed
- •Commit documentation updates
- •Update
- •
Final commit with Closes footer: The last commit should include
Closes #<issue-number>in the footer to auto-close the story when pushed. - •
Push to main (trunk-based development):
bashgit push origin main
Story auto-closes via the
Closes #Nfooter. - •
Report completion to the user
Handling Blockers
If you discover a blocker (missing dependency, unclear requirement, technical issue):
STOP and use AskUserQuestion to present options:
- •Clarify the requirement now
- •Create a separate story/task for the blocker
- •De-scope and document as a limitation
- •Something else (let user specify)
Never proceed with assumptions when blocked. Give the user the choice.
Key Reminders
- •No code without a failing test first - non-negotiable
- •Tests must actually run - "this would fail" doesn't count
- •Small steps - each test covers one small piece
- •Conversation is key - challenge each other
- •When unsure, ask - don't proceed without clarity