Create SPEC.md for the next backlog item. Creates ./.gtd/
Core responsibilities:
Flow: Read Backlog ā Select Item ā Research ā Interview (HOW) ā Mirror ā Confirm ā Write
Required:
./.gtd/BACKLOG.md ā Must exist. Run /bootstrap first if missing.Output:
./.gtd/<task_name>/SPEC.mdAgents used:
research ā For understanding implementation constraintsThe BACKLOG.md defines WHAT to build. The Spec defines HOW to build it. You do not ask the user what they want. You tell them what's next.
If it's not in the Backlog, it doesn't get built. If the user wants something new, they must update the Backlog first.
If a parent item has sub-items, execute sub-items in order.
If no sub-items exist, prompt user to run /expand-backlog first.
The user has already decided WHAT via the architecture docs. Propose HOW, only ask about genuinely unclear items.
Summarize the implementation plan, not the requirements (those come from Backlog).
Check for BACKLOG.md:
if [ ! -f "./.gtd/BACKLOG.md" ]; then
echo "Error: No BACKLOG.md found. Run /bootstrap first."
exit 1
fi
Check argument:
If backlog_item argument provided:
./.gtd/BACKLOG.md[ ] or [~])If no argument (auto-detect):
Parse ./.gtd/BACKLOG.md:
[~] (in progress / expanded)[ ] (not started)Priority:
[~] status first (already being expanded)If no sub-items found but parent items exist:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
GTD āŗ NO EXECUTABLE SUB-ITEMS
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
No sub-items found. The next parent item needs expansion:
**{next-parent-item}** ā {description}
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā¶ Run: /expand-backlog {next-parent-item}
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
If sub-item found, display selection:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
GTD āŗ NEXT BACKLOG ITEM
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Based on BACKLOG.md, the next item to implement is:
**{parent}/{sub-item}** ā {description}
Parent: {parent-name}
Tech: {tech stack from parent}
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Proceeding with this item. Let me research the implementation...
Do NOT ask user to choose. The backlog order is the authority.
Trigger: Immediately after confirming the item. Concurrency: As many as needed.
Fill prompt and spawn:
<objective>
Investigate domain feasibility for backlog item: {item_name}
**Goal:** {description_from_backlog}
**Tech Stack:** {tech_from_backlog}
</objective>
<investigation_checklist>
1. Identify relevant existing code (based on parent service/tech)
2. Note dependencies and integration points
3. Identify technical constraints
4. Check for existing patterns to reuse
</investigation_checklist>
<output_format>
Feasibility Report with:
- Implementation Plan (Draft)
- Key Files
- Reference Implementation
- Identified Risks
</output_format>
Task(
prompt=filled_prompt,
subagent_type="researcher",
description="Researching backlog item {item_name}"
)
Purpose:
Propose your implementation plan, only ask about unclear items:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
GTD āŗ PROPOSED SPECIFICATION
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
For: **{parent}/{sub-item}**
**Goal:**
{what this delivers}
**Must Have:**
- {requirement 1}
- {requirement 2}
**Nice To Have:**
- {nice requirement 1}
- {nice requirement 2}
**Assumptions:**
- {assumption 1}
- {assumption 2}
**Approach:**
- {implementation approach}
**Tech:**
- {from parent backlog item}
**Unclear items (need your input):**
- {unclear item, if any ā or "None"}
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Please review. (ok / adjust: ...)
Wait for confirmation before writing SPEC.md.
Task name comes from backlog item name.
Summarize implementation plan:
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
GTD āŗ CONFIRMING SPECIFICATION
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
**Backlog Item:** {item_name}
**Task Name:** {task-name}
**Goal:** (from Backlog)
{description from backlog}
**Must Have:** (from Backlog responsibilities)
- {responsibility 1}
- {responsibility 2}
**Implementation Approach:**
- {approach based on interview}
**Tech Stack:** (from Backlog)
- {tech from backlog}
**Won't Have:** (this version)
- {exclusions based on MVP discussion}
**Constraints:**
- {from research}
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Is this correct? (yes/no/clarify)
Wait for explicit confirmation.
Bash:
mkdir -p ./.gtd/<task_name>
Write to ./.gtd/<task_name>/SPEC.md:
# Specification
**Status:** FINALIZED
**Created:** {date}
**Backlog Item:** {item_name}
## Goal
{What we're building ā copied from Backlog description}
## Requirements
### Must Have
(Copied from Backlog responsibilities)
- [ ] {Responsibility 1}
- [ ] {Responsibility 2}
### Nice to Have
- [ ] {Optional feature from interview}
### Won't Have (This Version)
- {Exclusion from MVP discussion}
## Tech Stack
(Copied from Backlog)
- {Technology 1}
- {Technology 2}
## Constraints
- {From research/interview}
## Implementation Notes
{Any specific approach decisions from interview}
## Open Questions
- {Any unresolved questions ā empty if none}
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
GTD āŗ SPEC COMPLETE ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Specification written to ./.gtd/<task_name>/SPEC.md
Backlog Item: {item_name}
Acceptance Criteria: {N} items defined
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā¶ Next Up
/roadmap ā create phases from this spec
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā