Spec-driven development framework for AI coding assistants. Organize your work as changes with proposals, tasks, and specifications.
# Clone and setup
git clone <repo-url> task-magic
cd task-magic
./install.shOr manually:
cd cli && npm install && npm run build && npm link.ai/
βββ project.md # Project context & conventions
βββ AGENTS.md # AI instructions (read this!)
βββ CHANGES.md # Active changes overview
βββ specs/ # Built specifications
β βββ [capability]/
β βββ spec.md
βββ changes/ # Active change proposals
β βββ [change-name]/
β βββ proposal.md # Why and what
β βββ tasks.md # Implementation checklist
β βββ tasks/ # Task & section detail files (optional)
β βββ design.md # Technical decisions (optional)
β βββ specs/ # Spec deltas
βββ memory/ # Archive
βββ changes/ # Completed changes
βββ CHANGES_LOG.md # History log
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 1. PROPOSE PHASE β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β π€ User: β
β β Type /proposal command with your idea/request β
β β Example: "/proposal add user authentication feature" β
β β
β π€ AI: β
β β Analyze user's request β
β β Generate under .ai/changes/<change-id>/: β
β β’ proposal.md - Why & what changes β
β β’ tasks.md - Implementation checklist β
β β’ specs/ - Specification deltas (if needed) β
β β Run: task-magic validate <change-id> --strict β
β β Fix any validation errors before presenting β
β β
β π€ User: β
β β Review generated proposal β
β β Type /task-detail <id> for complex tasks or sections β
β β Approve, request modifications, or reject β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 2. IMPLEMENT PHASE β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β π€ User: β
β β Type /execute command to start implementation β
β β
β π€ AI: β
β β Read tasks.md and task detail files β
β β Implement each task one by one β
β β Update task status [x] when complete β
β β
β π€ User: β
β β Review code changes β
β β Test functionality β
β β Provide feedback or approve β
β β
β π€ AI: β
β β Address feedback if any β
β β Run: task-magic sync (update CHANGES.md) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 3. ARCHIVE PHASE β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β π€ User: β
β β Confirm all tasks complete β
β β Type /archive command β
β β
β π€ AI: β
β β Run: task-magic archive <change-id> --yes β
β β Move change to .ai/memory/changes/ β
β β Update CHANGES_LOG.md β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Use Cursor command
/proposal
# Or manually create .ai/changes/<change-id>/# Use Cursor command
/execute
# Track progress
task-magic task list
task-magic synctask-magic archive <change-id> --yes# Changes & Specs
task-magic list # List active changes
task-magic list --specs # List specifications
task-magic show <item> # Display details
task-magic validate <change> # Validate change (checks detail links)
task-magic validate <change> --strict # + check detail/section structure
task-magic archive <id> --yes # Archive completed change
# Tasks
task-magic task list # List tasks in a change
task-magic task show <id> # Show task details
task-magic task detail <id> # Create task detail file
# Project
task-magic init # Initialize new project
task-magic sync # Sync CHANGES.md| Command | Description |
|---|---|
/proposal |
Create a new change proposal |
/execute |
Implement an approved change |
/archive |
Archive a completed change |
/quick-fix |
Create minimal change for simple fixes |
/task-detail |
Add implementation details to a task or section |
## 1. Setup [HIGH]
- [ ] 1.1 Create database β [π details](tasks/1.1-create-db.md)
- [ ] 1.2 Implement API
- depends: 1.1
## 2. Frontend [MEDIUM]
- [x] 2.1 Create form component## Description
What this task accomplishes.
## Implementation Details
```typescript
// Copy-paste ready codepath/to/file.ts- Add function X
- Test case 1
### Section Detail File (`/task-detail 4`)
Creates `tasks/section-4-testing.md`:
```markdown
# Detail: Testing (Section 4)
## Context
Purpose of this section - testing/implementation/deployment.
## Prerequisites
- `cd build && source setup.sh`
- Required dependencies installed
## Steps
### 4.1: TC-1 Single Register
- **Action**: Run `./run_test single_reg`
- **Expected**: Uses broadcast (size=1 optimization)
- **Verify**: Output contains "5c: single register"
### 4.2: TC-2 Same Instruction
- **Action**: Run `./run_test suffix_compat`
- **Expected**: Both registers in same group
# Change: Brief description
## Why
Problem or opportunity being addressed.
## What Changes
- List of changes
- Mark **BREAKING** if applicable
## Impact
- Affected specs: capability-name
- Affected code: file paths## ADDED Requirements
### Requirement: Feature Name
The system SHALL provide...
#### Scenario: Success case
- **WHEN** user performs action
- **THEN** expected result- Keep changes focused - One logical change per proposal
- Write specs first - Define behavior before implementing
- Small tasks - Verifiable in <30 minutes
- Always validate -
task-magic validate <id> --strict - Archive promptly - Keep active changes list clean
.ai/AGENTS.md- Complete AI instructions.ai/project.md- Project conventions
# Build CLI
cd cli && npm run build
# Watch mode
cd cli && npm run dev
# Link globally
cd cli && npm linkMIT