forge-dev-framework 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/forge/README.md +314 -0
- package/.claude/commands/forge/add-phase.md +89 -0
- package/.claude/commands/forge/complete-milestone.md +130 -0
- package/.claude/commands/forge/config.md +115 -0
- package/.claude/commands/forge/debug.md +173 -0
- package/.claude/commands/forge/discuss.md +125 -0
- package/.claude/commands/forge/execute.md +160 -0
- package/.claude/commands/forge/generate.md +120 -0
- package/.claude/commands/forge/help.md +123 -0
- package/.claude/commands/forge/init.md +85 -0
- package/.claude/commands/forge/insert-phase.md +98 -0
- package/.claude/commands/forge/new-milestone.md +114 -0
- package/.claude/commands/forge/new-project.md +103 -0
- package/.claude/commands/forge/pause-work.md +111 -0
- package/.claude/commands/forge/plan.md +144 -0
- package/.claude/commands/forge/quick.md +130 -0
- package/.claude/commands/forge/remove-phase.md +91 -0
- package/.claude/commands/forge/resume-work.md +122 -0
- package/.claude/commands/forge/status.md +87 -0
- package/.claude/commands/forge/verify.md +174 -0
- package/README.md +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge:init
|
|
3
|
+
description: Initialize FORGE in the current project directory. Use this when the user says "forge init" or wants to set up FORGE in an existing project.
|
|
4
|
+
argument-hint: [--quick]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<objective>
|
|
12
|
+
Initialize FORGE in the current project directory with complete project structure and configuration.
|
|
13
|
+
|
|
14
|
+
Purpose: Set up FORGE's multi-agent development system in an existing or new project.
|
|
15
|
+
Output: Complete FORGE directory structure, state engine, templates, and CLI configuration.
|
|
16
|
+
</objective>
|
|
17
|
+
|
|
18
|
+
<execution_context>
|
|
19
|
+
**Load these files NOW:**
|
|
20
|
+
|
|
21
|
+
- @CLAUDE.md (FORGE architecture)
|
|
22
|
+
- @ROADMAP.md (Implementation plan)
|
|
23
|
+
- @src/cli/init.ts (Init command implementation)
|
|
24
|
+
</execution_context>
|
|
25
|
+
|
|
26
|
+
<context>
|
|
27
|
+
**Target Directory:** Current working directory (process.cwd())
|
|
28
|
+
**Initialization Mode:** Standard or --quick (skip interactive prompts)
|
|
29
|
+
|
|
30
|
+
**Actions Performed:**
|
|
31
|
+
- Create state/, contracts/, .planning/, .claude/, src/ directories
|
|
32
|
+
- Copy CLAUDE.md template
|
|
33
|
+
- Initialize state/STATE.json
|
|
34
|
+
- Create .gitignore if needed
|
|
35
|
+
- Configure forge.config.json
|
|
36
|
+
</context>
|
|
37
|
+
|
|
38
|
+
<process>
|
|
39
|
+
**Execute the init command:**
|
|
40
|
+
|
|
41
|
+
1. **Directory Structure**
|
|
42
|
+
```bash
|
|
43
|
+
mkdir -p state/events
|
|
44
|
+
mkdir -p contracts
|
|
45
|
+
mkdir -p .planning
|
|
46
|
+
mkdir -p .claude/rules
|
|
47
|
+
mkdir -p src/{cli,commands,generators,git,utils}
|
|
48
|
+
mkdir -p .github/workflows
|
|
49
|
+
mkdir -p .worktrees
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
2. **Core Artifacts**
|
|
53
|
+
- Copy CLAUDE.md template → project root
|
|
54
|
+
- Create state/STATE.json with initial project state
|
|
55
|
+
- Create .planning/forge.config.json with default configuration
|
|
56
|
+
|
|
57
|
+
3. **Git Setup**
|
|
58
|
+
- Create/update .gitignore with FORGE patterns
|
|
59
|
+
- Initialize git repository if not exists
|
|
60
|
+
- Set up pre-commit hooks
|
|
61
|
+
|
|
62
|
+
4. **Dependencies**
|
|
63
|
+
- Create package.json if not exists
|
|
64
|
+
- Install FORGE dependencies: chalk, commander, execa, zod, handlebars
|
|
65
|
+
- Add build scripts: build, test, dev
|
|
66
|
+
|
|
67
|
+
5. **Verification**
|
|
68
|
+
- Run `npm run build` (if TypeScript)
|
|
69
|
+
- Check `forge status` output
|
|
70
|
+
- Verify directory structure
|
|
71
|
+
|
|
72
|
+
6. **Output**
|
|
73
|
+
- Show created files
|
|
74
|
+
- Display next steps
|
|
75
|
+
- Offer `forge help` for available commands
|
|
76
|
+
</process>
|
|
77
|
+
|
|
78
|
+
<deliverables>
|
|
79
|
+
- Complete FORGE directory structure
|
|
80
|
+
- state/STATE.json (initial state)
|
|
81
|
+
- .planning/forge.config.json (configuration)
|
|
82
|
+
- CLAUDE.md (project constitution)
|
|
83
|
+
- .gitignore with FORGE patterns
|
|
84
|
+
- package.json with dependencies
|
|
85
|
+
</deliverables>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge:insert-phase
|
|
3
|
+
description: Insert urgent work as decimal phase between existing phases
|
|
4
|
+
argument-hint: <after-phase> <description>
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<objective>
|
|
12
|
+
Insert urgent work as a decimal phase between existing phases in the roadmap.
|
|
13
|
+
|
|
14
|
+
Use when: Urgent bug fix, hotfix, or critical work must be done before continuing current work.
|
|
15
|
+
|
|
16
|
+
Decimal phase format: `X.Y` where X is parent phase, Y increments (0.1, 0.2, etc.)
|
|
17
|
+
</objective>
|
|
18
|
+
|
|
19
|
+
<execution_context>
|
|
20
|
+
@state/STATE.json
|
|
21
|
+
@ROADMAP.md
|
|
22
|
+
@CLAUDE.md
|
|
23
|
+
</execution_context>
|
|
24
|
+
|
|
25
|
+
<context>
|
|
26
|
+
**After Phase:** First argument (e.g., "72")
|
|
27
|
+
**Description:** Second argument
|
|
28
|
+
|
|
29
|
+
**Decimal Phase Assignment:**
|
|
30
|
+
1. Find existing decimal phases under parent
|
|
31
|
+
2. Calculate next decimal (0.1, 0.2, 0.3, etc.)
|
|
32
|
+
3. Insert into roadmap after parent phase
|
|
33
|
+
4. Update phase dependencies if needed
|
|
34
|
+
</context>
|
|
35
|
+
|
|
36
|
+
<process>
|
|
37
|
+
**Execute insert-phase workflow:**
|
|
38
|
+
|
|
39
|
+
1. **Parse Arguments**
|
|
40
|
+
- Extract parent phase number (e.g., "72")
|
|
41
|
+
- Extract phase description
|
|
42
|
+
|
|
43
|
+
2. **Load State**
|
|
44
|
+
- Read state/STATE.json
|
|
45
|
+
- Read ROADMAP.md
|
|
46
|
+
- Find parent phase entry
|
|
47
|
+
|
|
48
|
+
3. **Calculate Decimal Phase**
|
|
49
|
+
- Find existing decimals under parent (72.1, 72.2, etc.)
|
|
50
|
+
- Next decimal = highest + 0.1
|
|
51
|
+
- Example: If 72.1, 72.2 exist → next is 72.3
|
|
52
|
+
|
|
53
|
+
4. **Generate Slug**
|
|
54
|
+
- Create URL-safe slug from description
|
|
55
|
+
- Format: `<decimal-phase>-<slug>`
|
|
56
|
+
- Example: "Hotfix auth bug" → "72.3-hotfix-auth-bug"
|
|
57
|
+
|
|
58
|
+
5. **Create Directory Structure**
|
|
59
|
+
```bash
|
|
60
|
+
mkdir -p .planning/phases/<phase-slug>/
|
|
61
|
+
touch .planning/phases/<phase-slug>/CONTEXT.md
|
|
62
|
+
touch .planning/phases/<phase-slug>/PLAN.md
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
6. **Update ROADMAP.md**
|
|
66
|
+
- Insert new phase entry immediately after parent phase
|
|
67
|
+
- Use standard phase format with decimal number
|
|
68
|
+
- Note as "INSERTED" for visibility
|
|
69
|
+
|
|
70
|
+
7. **Update Dependencies**
|
|
71
|
+
- If parent phase had dependents, add decimal phase as new dependency
|
|
72
|
+
- Example: Phase 73 depends on 72, insert 72.3 → 73 now depends on 72.3
|
|
73
|
+
|
|
74
|
+
8. **Submit Event**
|
|
75
|
+
- Event type: PHASE_INSERTED
|
|
76
|
+
- Include: phaseId, parentPhaseId, milestoneId, description
|
|
77
|
+
- Write to state/events/
|
|
78
|
+
|
|
79
|
+
9. **Confirm**
|
|
80
|
+
- Show inserted phase info
|
|
81
|
+
- List any updated dependencies
|
|
82
|
+
- Suggest next: `forge discuss <phase>` or `forge plan <phase>`
|
|
83
|
+
</process>
|
|
84
|
+
|
|
85
|
+
<deliverables>
|
|
86
|
+
- .planning/phases/<phase-slug>/CONTEXT.md (empty template)
|
|
87
|
+
- .planning/phases/<phase-slug>/PLAN.md (empty template)
|
|
88
|
+
- ROADMAP.md updated with inserted phase
|
|
89
|
+
- Updated dependencies for subsequent phases
|
|
90
|
+
- Event: PHASE_INSERTED in state/events/
|
|
91
|
+
- STATE.json updated
|
|
92
|
+
</deliverables>
|
|
93
|
+
|
|
94
|
+
<next_steps>
|
|
95
|
+
- Run `forge discuss <phase>` to capture phase context
|
|
96
|
+
- Run `forge plan <phase>` to generate task breakdown
|
|
97
|
+
- Notify team of dependency changes
|
|
98
|
+
</next_steps>
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge:new-milestone
|
|
3
|
+
description: Start new milestone cycle — update ROADMAP.md and route to requirements
|
|
4
|
+
argument-hint: ""
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<objective>
|
|
12
|
+
Initialize a new milestone cycle in the ROADMAP.md after completing the previous one.
|
|
13
|
+
|
|
14
|
+
Updates ROADMAP.md structure and routes to requirements gathering for the new milestone.
|
|
15
|
+
</objective>
|
|
16
|
+
|
|
17
|
+
<execution_context>
|
|
18
|
+
@state/STATE.json
|
|
19
|
+
@ROADMAP.md
|
|
20
|
+
@CLAUDE.md
|
|
21
|
+
</execution_context>
|
|
22
|
+
|
|
23
|
+
<context>
|
|
24
|
+
**New Milestone Workflow:**
|
|
25
|
+
1. Validate previous milestone is complete
|
|
26
|
+
2. Get milestone details (name, goals)
|
|
27
|
+
3. Create new milestone section in ROADMAP.md
|
|
28
|
+
4. Update STATE.json
|
|
29
|
+
5. Route to requirements gathering
|
|
30
|
+
</context>
|
|
31
|
+
|
|
32
|
+
<process>
|
|
33
|
+
**Execute new-milestone workflow:**
|
|
34
|
+
|
|
35
|
+
1. **Validate Previous Milestone**
|
|
36
|
+
- Check STATE.json for current milestone status
|
|
37
|
+
- If "in_progress" → warn: "Previous milestone not complete. Continue?"
|
|
38
|
+
- If "completed" → proceed
|
|
39
|
+
|
|
40
|
+
2. **Gather Milestone Details**
|
|
41
|
+
Use AskUserQuestion:
|
|
42
|
+
- **Milestone Name**: What is this milestone called?
|
|
43
|
+
- **Milestone Goals**: What are the primary goals?
|
|
44
|
+
- **Success Criteria**: How do we know it's complete?
|
|
45
|
+
- **Estimated Duration**: How long will this take?
|
|
46
|
+
|
|
47
|
+
3. **Calculate Milestone Number**
|
|
48
|
+
- Find last milestone in ROADMAP.md
|
|
49
|
+
- Increment by 1 (e.g., M2 → M3)
|
|
50
|
+
|
|
51
|
+
4. **Update ROADMAP.md**
|
|
52
|
+
```markdown
|
|
53
|
+
## Milestone {number}: {name}
|
|
54
|
+
|
|
55
|
+
**Status:** 🚧 In Progress
|
|
56
|
+
**Started:** {date}
|
|
57
|
+
**Goals:** {goals}
|
|
58
|
+
|
|
59
|
+
### Success Criteria
|
|
60
|
+
- {criterion-1}
|
|
61
|
+
- {criterion-2}
|
|
62
|
+
|
|
63
|
+
### Phases
|
|
64
|
+
_Phases will be added here_
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
5. **Update STATE.json**
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"project": {
|
|
73
|
+
"currentMilestone": "M{number}",
|
|
74
|
+
"currentPhase": null,
|
|
75
|
+
"status": "in_progress"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
6. **Submit Events**
|
|
81
|
+
- Event type: MILESTONE_STARTED
|
|
82
|
+
- Include: milestoneId, name, goals
|
|
83
|
+
- Write to state/events/
|
|
84
|
+
|
|
85
|
+
7. **Create Milestone Directory**
|
|
86
|
+
```bash
|
|
87
|
+
mkdir -p .planning/phases/
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
8. **Route to Requirements**
|
|
91
|
+
- Suggest: Run `forge generate requirements` or manual requirements gathering
|
|
92
|
+
- Ask: "Do you want to gather requirements now?"
|
|
93
|
+
- Yes: Route to requirements workflow
|
|
94
|
+
- No: Complete, user can gather later
|
|
95
|
+
|
|
96
|
+
9. **Confirm**
|
|
97
|
+
- Show new milestone details
|
|
98
|
+
- Display ROADMAP.md structure
|
|
99
|
+
- Provide next steps
|
|
100
|
+
</process>
|
|
101
|
+
|
|
102
|
+
<deliverables>
|
|
103
|
+
- ROADMAP.md updated (new milestone section added)
|
|
104
|
+
- STATE.json updated (currentMilestone set)
|
|
105
|
+
- Event: MILESTONE_STARTED in state/events/
|
|
106
|
+
- .planning/phases/ ready for new phases
|
|
107
|
+
</deliverables>
|
|
108
|
+
|
|
109
|
+
<next_steps>
|
|
110
|
+
- Gather requirements: `forge generate requirements` or manual
|
|
111
|
+
- Add phases: `forge add-phase "description"`
|
|
112
|
+
- Discuss phase: `forge discuss <phase>`
|
|
113
|
+
- Plan phase: `forge plan <phase>`
|
|
114
|
+
</next_steps>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge:new-project
|
|
3
|
+
description: Initialize a new FORGE project with team coordination, state engine, and artifact generation. Use this when the user asks to "create a FORGE project", "start a new FORGE project", "initialize FORGE", or wants to use FORGE for multi-agent development.
|
|
4
|
+
argument-hint: [project-name]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- AskUserQuestion
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<objective>
|
|
13
|
+
Initialize a new FORGE project with complete project structure, state engine, team coordination system, and artifact generation capabilities.
|
|
14
|
+
|
|
15
|
+
Purpose: Set up a new multi-agent development project using FORGE's architecture.
|
|
16
|
+
Output: Complete FORGE project structure with CLAUDE.md, state engine, templates, and CLI commands.
|
|
17
|
+
</objective>
|
|
18
|
+
|
|
19
|
+
<execution_context>
|
|
20
|
+
**Load these files NOW (before proceeding):**
|
|
21
|
+
|
|
22
|
+
- @CLAUDE.md (FORGE's architecture and patterns)
|
|
23
|
+
- @ROADMAP.md (FORGE's implementation plan)
|
|
24
|
+
- @REQUIREMENTS.md (Milestone 1 acceptance criteria)
|
|
25
|
+
- @bin/forge.ts (CLI entry point)
|
|
26
|
+
</execution_context>
|
|
27
|
+
|
|
28
|
+
<context>
|
|
29
|
+
**Project Location:** Current working directory or specified project-name argument
|
|
30
|
+
**Project Type:** New FORGE multi-agent development project
|
|
31
|
+
|
|
32
|
+
**FORGE Capabilities:**
|
|
33
|
+
- Event-sourced state engine with single-writer merge
|
|
34
|
+
- Contract-first protocol for cross-agent coordination
|
|
35
|
+
- Template-based artifact generation (CLAUDE.md, REQUIREMENTS.md, etc.)
|
|
36
|
+
- Git worktree isolation for parallel task execution
|
|
37
|
+
- 5-6 task limit enforcement per phase
|
|
38
|
+
- Atomic commit enforcement with conventional format
|
|
39
|
+
</context>
|
|
40
|
+
|
|
41
|
+
<process>
|
|
42
|
+
**Follow this workflow to initialize a new FORGE project:**
|
|
43
|
+
|
|
44
|
+
1. **Project Setup**
|
|
45
|
+
- Create project directory if name provided
|
|
46
|
+
- Run `forge init` or initialize structure manually
|
|
47
|
+
- Create state/, contracts/, .planning/, .claude/rules/, src/ directories
|
|
48
|
+
|
|
49
|
+
2. **Core Artifacts**
|
|
50
|
+
- Generate CLAUDE.md with project constitution
|
|
51
|
+
- Create initial REQUIREMENTS.md with project-specific requirements
|
|
52
|
+
- Set up ROADMAP.md with milestone breakdown
|
|
53
|
+
- Create PLAN.md with dependency graph
|
|
54
|
+
|
|
55
|
+
3. **State Engine**
|
|
56
|
+
- Initialize state/STATE.json with project metadata
|
|
57
|
+
- Create state/STATE.schema.json for validation
|
|
58
|
+
- Set up state/events/ directory for append-only event log
|
|
59
|
+
|
|
60
|
+
4. **Team Configuration**
|
|
61
|
+
- Create .claude/rules/ with project-specific rules
|
|
62
|
+
- Set up CODEOWNERS for file ownership boundaries
|
|
63
|
+
- Configure agent roles and permissions
|
|
64
|
+
|
|
65
|
+
5. **Template System**
|
|
66
|
+
- Copy FORGE templates to src/templates/
|
|
67
|
+
- Configure token limits for artifacts
|
|
68
|
+
- Set up template engine integration
|
|
69
|
+
|
|
70
|
+
6. **Git Integration**
|
|
71
|
+
- Initialize git repository if needed
|
|
72
|
+
- Create .worktrees/ directory structure
|
|
73
|
+
- Set up pre-commit hooks for conventional commits
|
|
74
|
+
- Create .github/workflows/ for CI/CD
|
|
75
|
+
|
|
76
|
+
7. **Verification**
|
|
77
|
+
- Run `npm run build` to verify TypeScript compilation
|
|
78
|
+
- Run `npm test` to verify test suite
|
|
79
|
+
- Check `forge status` to confirm project initialization
|
|
80
|
+
|
|
81
|
+
8. **Handoff**
|
|
82
|
+
- Provide user with next steps (forge discuss, forge plan)
|
|
83
|
+
- Show available commands with `forge help`
|
|
84
|
+
- Explain how to use agent teams for development
|
|
85
|
+
</process>
|
|
86
|
+
|
|
87
|
+
<deliverables>
|
|
88
|
+
- Complete FORGE project structure
|
|
89
|
+
- CLAUDE.md with project constitution
|
|
90
|
+
- Initial REQUIREMENTS.md and ROADMAP.md
|
|
91
|
+
- Configured state engine with STATE.json
|
|
92
|
+
- Template system ready for artifact generation
|
|
93
|
+
- Git repository with proper hooks
|
|
94
|
+
- Build passing with zero errors
|
|
95
|
+
</deliverables>
|
|
96
|
+
|
|
97
|
+
<next_steps>
|
|
98
|
+
After project initialization:
|
|
99
|
+
1. Run `forge discuss <phase>` to capture project context
|
|
100
|
+
2. Run `forge plan <phase>` to generate atomic task breakdown
|
|
101
|
+
3. Use agent teams for parallel task execution
|
|
102
|
+
4. Track progress with `forge status`
|
|
103
|
+
</next_steps>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge:pause-work
|
|
3
|
+
description: Create context handoff when pausing work mid-phase
|
|
4
|
+
argument-hint: ""
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
<objective>
|
|
12
|
+
Create `.continue-here.md` handoff file to preserve complete work state across sessions.
|
|
13
|
+
|
|
14
|
+
Use when: You need to stop work mid-phase and want to resume later with full context preserved.
|
|
15
|
+
</objective>
|
|
16
|
+
|
|
17
|
+
<execution_context>
|
|
18
|
+
@state/STATE.json
|
|
19
|
+
@CLAUDE.md
|
|
20
|
+
</execution_context>
|
|
21
|
+
|
|
22
|
+
<context>
|
|
23
|
+
**Pause Work Workflow:**
|
|
24
|
+
1. Detect current phase from recent files
|
|
25
|
+
2. Gather complete state (position, completed work, remaining work, decisions, blockers)
|
|
26
|
+
3. Create handoff file with all context sections
|
|
27
|
+
4. Git commit as WIP
|
|
28
|
+
5. Provide resume instructions
|
|
29
|
+
</context>
|
|
30
|
+
|
|
31
|
+
<process>
|
|
32
|
+
**Execute pause-work workflow:**
|
|
33
|
+
|
|
34
|
+
1. **Detect Current Phase**
|
|
35
|
+
- Check git status for recent changes
|
|
36
|
+
- Identify phase from recent files
|
|
37
|
+
- Check STATE.json for current phase
|
|
38
|
+
|
|
39
|
+
2. **Gather State**
|
|
40
|
+
Use AskUserQuestion to capture:
|
|
41
|
+
- **Current Position**: What were you working on?
|
|
42
|
+
- **Completed Work**: What's done since last commit?
|
|
43
|
+
- **Remaining Work**: What's left to do?
|
|
44
|
+
- **Decisions Made**: Any decisions to remember?
|
|
45
|
+
- **Blockers**: Anything blocking progress?
|
|
46
|
+
- **Next Steps**: What to do when resuming?
|
|
47
|
+
|
|
48
|
+
3. **Create Handoff File**
|
|
49
|
+
```markdown
|
|
50
|
+
# Continue Here — {timestamp}
|
|
51
|
+
|
|
52
|
+
## Phase
|
|
53
|
+
**Phase:** {phase-name}
|
|
54
|
+
**Status:** {in-progress|blocked|waiting}
|
|
55
|
+
|
|
56
|
+
## Position
|
|
57
|
+
{current position in the work}
|
|
58
|
+
|
|
59
|
+
## Completed Work
|
|
60
|
+
- [x] {completed item 1}
|
|
61
|
+
- [x] {completed item 2}
|
|
62
|
+
|
|
63
|
+
## Remaining Work
|
|
64
|
+
- [ ] {remaining item 1}
|
|
65
|
+
- [ ] {remaining item 2}
|
|
66
|
+
|
|
67
|
+
## Decisions Made
|
|
68
|
+
{important decisions to remember}
|
|
69
|
+
|
|
70
|
+
## Blockers
|
|
71
|
+
{anything blocking progress}
|
|
72
|
+
|
|
73
|
+
## Next Steps
|
|
74
|
+
1. {first step}
|
|
75
|
+
2. {second step}
|
|
76
|
+
|
|
77
|
+
## Context Notes
|
|
78
|
+
{any other context}
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
**Paused:** {timestamp}
|
|
82
|
+
**Resume:** Run `forge resume-work`
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
4. **Git Commit**
|
|
86
|
+
- Stage all changes: `git add -A`
|
|
87
|
+
- Commit as WIP: `git commit -m "wip: pause work - {phase-name}"`
|
|
88
|
+
|
|
89
|
+
5. **Submit Event**
|
|
90
|
+
- Event type: WORK_PAUSED
|
|
91
|
+
- Include: phaseId, handoffFile, timestamp
|
|
92
|
+
- Write to state/events/
|
|
93
|
+
|
|
94
|
+
6. **Confirm**
|
|
95
|
+
- Show handoff file location
|
|
96
|
+
- Provide resume instructions
|
|
97
|
+
- Confirm git commit created
|
|
98
|
+
</process>
|
|
99
|
+
|
|
100
|
+
<deliverables>
|
|
101
|
+
- .continue-here.md (complete handoff file)
|
|
102
|
+
- Git commit: "wip: pause work - {phase-name}"
|
|
103
|
+
- Event: WORK_PAUSED in state/events/
|
|
104
|
+
- STATE.json updated
|
|
105
|
+
</deliverables>
|
|
106
|
+
|
|
107
|
+
<next_steps>
|
|
108
|
+
- When ready to continue: `forge resume-work`
|
|
109
|
+
- Handoff file will be automatically loaded
|
|
110
|
+
- All context preserved
|
|
111
|
+
</next_steps>
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge:plan
|
|
3
|
+
description: Generate research-backed atomic task breakdown for a phase. Use when user says "forge plan <phase>" or wants to create a detailed task plan.
|
|
4
|
+
argument-hint: <phase-name>
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- Task
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<objective>
|
|
13
|
+
Generate atomic task breakdown (5-6 tasks max) with dependency graph for a specific phase, backed by research and verified against requirements.
|
|
14
|
+
|
|
15
|
+
Purpose: Create executable plan with clear tasks, dependencies, and acceptance criteria.
|
|
16
|
+
Output: PLAN.md with task breakdown, Mermaid dependency graph, and verification criteria.
|
|
17
|
+
</objective>
|
|
18
|
+
|
|
19
|
+
<execution_context>
|
|
20
|
+
**Load these files NOW:**
|
|
21
|
+
|
|
22
|
+
- @CLAUDE.md (5-6 task limit rule)
|
|
23
|
+
- @REQUIREMENTS.md (Verification requirements)
|
|
24
|
+
- @ROADMAP.md (Milestone context)
|
|
25
|
+
- @.planning/phases/<phase>/CONTEXT.md (if exists)
|
|
26
|
+
- @state/STATE.json (Current state)
|
|
27
|
+
</execution_context>
|
|
28
|
+
|
|
29
|
+
<context>
|
|
30
|
+
**Phase:** $ARGUMENTS
|
|
31
|
+
**Task Limit:** 5-6 atomic tasks maximum (FORGE hard rule)
|
|
32
|
+
**Requirement:** Must verify against REQUIREMENTS.md
|
|
33
|
+
|
|
34
|
+
**Planning Constraints:**
|
|
35
|
+
- Tasks must be atomic (one concept, one owner)
|
|
36
|
+
- Dependencies explicit and acyclic
|
|
37
|
+
- Each task has clear acceptance criteria
|
|
38
|
+
- Total tasks ≤ 6 (break into sub-phases if needed)
|
|
39
|
+
</context>
|
|
40
|
+
|
|
41
|
+
<process>
|
|
42
|
+
**Execute planning workflow:**
|
|
43
|
+
|
|
44
|
+
1. **Context Loading**
|
|
45
|
+
- Read CONTEXT.md if exists (from forge discuss)
|
|
46
|
+
- Load REQUIREMENTS.md for verification
|
|
47
|
+
- Check STATE.json for current milestone
|
|
48
|
+
|
|
49
|
+
2. **Research Phase** (if gray areas identified)
|
|
50
|
+
```
|
|
51
|
+
Spawn research agents for unknowns:
|
|
52
|
+
- gs-phase-researcher → domain research
|
|
53
|
+
- Returns: RESEARCH.md with findings
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
3. **Task Generation** (5-6 task limit enforced)
|
|
57
|
+
|
|
58
|
+
For each task, define:
|
|
59
|
+
```
|
|
60
|
+
- ID: milestone-number-task (e.g., api-003, ui-002)
|
|
61
|
+
- Name: Clear, concise title
|
|
62
|
+
- Owner: Specialist role
|
|
63
|
+
- Type: feat, fix, test, docs, refactor
|
|
64
|
+
- Dependencies: Array of task IDs
|
|
65
|
+
- Files: Owned file paths
|
|
66
|
+
- Contracts: Required API contracts
|
|
67
|
+
- Acceptance: Given/When/Then criteria
|
|
68
|
+
- Verify: Test command or verification method
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
4. **Dependency Graph**
|
|
72
|
+
```mermaid
|
|
73
|
+
graph TD
|
|
74
|
+
api-001[Create user model] --> api-002[Implement user CRUD]
|
|
75
|
+
api-002 --> api-003[Add authentication]
|
|
76
|
+
core-001[Database setup] --> api-001
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
5. **Requirements Verification**
|
|
80
|
+
- Map each task to REQUIREMENTS.md entries
|
|
81
|
+
- Ensure all requirements covered
|
|
82
|
+
- Identify gaps and add tasks as needed
|
|
83
|
+
- Verify no requirement orphaned
|
|
84
|
+
|
|
85
|
+
6. **Write PLAN.md**
|
|
86
|
+
```markdown
|
|
87
|
+
# <Phase Name> Plan
|
|
88
|
+
|
|
89
|
+
## Overview
|
|
90
|
+
[Phase purpose and goals]
|
|
91
|
+
|
|
92
|
+
## Tasks (5-6 max)
|
|
93
|
+
| ID | Name | Owner | Dependencies | Status |
|
|
94
|
+
|----|------|-------|--------------|--------|
|
|
95
|
+
| api-001 | ... | backend | - | pending |
|
|
96
|
+
...
|
|
97
|
+
|
|
98
|
+
## Dependency Graph
|
|
99
|
+
[Mermaid graph]
|
|
100
|
+
|
|
101
|
+
## Requirements Coverage
|
|
102
|
+
- REQ-1: Covered by api-001, api-002
|
|
103
|
+
- REQ-2: Covered by core-001
|
|
104
|
+
...
|
|
105
|
+
|
|
106
|
+
## Definition of Done
|
|
107
|
+
- All tasks complete
|
|
108
|
+
- All tests passing
|
|
109
|
+
- Requirements verified
|
|
110
|
+
- Integration tested
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
7. **State Update**
|
|
114
|
+
- Submit PHASE_PLANNED event
|
|
115
|
+
- Update STATE.json with task list
|
|
116
|
+
- Add tasks to STATE.tasks array
|
|
117
|
+
|
|
118
|
+
8. **Route to Execution**
|
|
119
|
+
- Offer `forge execute <phase>` to run tasks
|
|
120
|
+
- Or show manual task assignment
|
|
121
|
+
</process>
|
|
122
|
+
|
|
123
|
+
<deliverables>
|
|
124
|
+
- .planning/phases/<phase>/PLAN.md (task breakdown)
|
|
125
|
+
- Event: PHASE_PLANNED in state/events/
|
|
126
|
+
- STATE.json updated with tasks
|
|
127
|
+
- Requirements coverage matrix
|
|
128
|
+
</deliverables>
|
|
129
|
+
|
|
130
|
+
<verification>
|
|
131
|
+
Before completing plan:
|
|
132
|
+
- ✅ Total tasks ≤ 6
|
|
133
|
+
- ✅ All tasks atomic (single owner)
|
|
134
|
+
- ✅ Dependency graph acyclic
|
|
135
|
+
- ✅ All requirements covered
|
|
136
|
+
- ✅ Acceptance criteria defined
|
|
137
|
+
- ✅ Verification methods specified
|
|
138
|
+
</verification>
|
|
139
|
+
|
|
140
|
+
<next_steps>
|
|
141
|
+
- Run `forge execute <phase>` to execute plan with agent teams
|
|
142
|
+
- Or manually assign tasks to specialists
|
|
143
|
+
- Track progress with `forge status`
|
|
144
|
+
</next_steps>
|