Create New Track
You are creating a new track (feature, bug fix, or refactor) for Context-Driven Development.
Feature Description: $ARGUMENTS
Pre-Check
- •Verify Draft is initialized:
ls draft/product.md draft/tech-stack.md draft/workflow.md draft/tracks.md 2>/dev/null
If missing, tell user: "Project not initialized. Run /draft:init first."
- •Load context:
- •Read
draft/product.mdfor product vision - •Read
draft/tech-stack.mdfor technical constraints - •Read
draft/workflow.mdfor development standards
Step 1: Generate Track ID
Create a short, kebab-case ID from the description:
- •"Add user authentication" →
add-user-auth - •"Fix login bug" →
fix-login-bug - •If collision risk, append ISO date suffix:
add-user-auth-20250126
Red Flags - STOP if you're:
- •Writing spec without dialogue (assuming you understand requirements)
- •Copying requirements verbatim without clarifying questions
- •Creating plan before spec is approved
- •Skipping non-goals section ("everything is in scope")
- •Not referencing product.md and tech-stack.md for context
- •Rushing to get to implementation
The goal is understanding, not speed.
Step 2: Create Specification
Engage in dialogue to understand:
- •What - Exact scope and boundaries
- •Why - Business/user value
- •Acceptance Criteria - How we know it's done
- •Non-Goals - What's explicitly out of scope
Create draft/tracks/<track_id>/spec.md:
# Specification: [Title] **Track ID:** <track_id> **Created:** [ISO date] **Status:** [ ] Draft ## Summary [2-3 sentence description of what this track delivers] ## Background [Why this is needed, context from product.md] ## Requirements ### Functional 1. [Requirement 1] 2. [Requirement 2] 3. [Requirement 3] ### Non-Functional - Performance: [if applicable] - Security: [if applicable] - Accessibility: [if applicable] ## Acceptance Criteria - [ ] [Criterion 1] - [ ] [Criterion 2] - [ ] [Criterion 3] ## Non-Goals - [What's explicitly out of scope] ## Technical Approach [High-level approach based on tech-stack.md] ## Open Questions - [Question 1] - [Question 2]
Present for approval. Iterate until approved.
Step 3: Create Plan
Based on approved spec, create phased task breakdown.
Create draft/tracks/<track_id>/plan.md:
# Plan: [Title] **Track ID:** <track_id> **Spec:** ./spec.md **Status:** [ ] Not Started ## Overview [Brief summary linking to spec] --- ## Phase 1: [Phase Name] **Goal:** [What this phase achieves] **Verification:** [How to verify phase completion] ### Tasks - [ ] **Task 1.1:** [Description] - Files: `path/to/file.ts` - Test: `path/to/file.test.ts` - [ ] **Task 1.2:** [Description] - Files: `path/to/another.ts` - Test: `path/to/another.test.ts` --- ## Phase 2: [Phase Name] **Goal:** [What this phase achieves] **Verification:** [How to verify phase completion] ### Tasks - [ ] **Task 2.1:** [Description] - Depends on: Task 1.1, Task 1.2 - Files: `path/to/file.ts` --- ## Phase 3: Integration & Polish **Goal:** Final integration and cleanup **Verification:** All acceptance criteria from spec met ### Tasks - [ ] **Task 3.1:** Integration testing - [ ] **Task 3.2:** Documentation update - [ ] **Task 3.3:** Code review and cleanup --- ## Notes - [Important consideration] - [Risk or dependency]
Present for approval. Iterate until approved.
Step 4: Create Metadata
Create draft/tracks/<track_id>/metadata.json:
{
"id": "<track_id>",
"title": "[Title]",
"type": "feature|bugfix|refactor",
"status": "planning",
"created": "[ISO timestamp]",
"updated": "[ISO timestamp]",
"phases": {
"total": 3,
"completed": 0
},
"tasks": {
"total": 0,
"completed": 0
}
}
Step 5: Update Master Tracks List
Add to draft/tracks.md under Active:
## Active ### [track_id] - [Title] - **Status:** [ ] Planning - **Created:** [date] - **Phases:** 0/3 - **Path:** `./tracks/<track_id>/`
Completion
Announce: "Track created: <track_id>
Created:
- •draft/tracks/<track_id>/spec.md
- •draft/tracks/<track_id>/plan.md
- •draft/tracks/<track_id>/metadata.json
Updated:
- •draft/tracks.md
Next: Review the spec and plan, then run /draft:implement to begin."