forge-dev-framework 1.1.0 → 1.2.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.
Files changed (107) hide show
  1. package/.claude/commands/forge/README.md +156 -189
  2. package/.claude/commands/forge/add-phase.md +4 -3
  3. package/.claude/commands/forge/complete-milestone.md +1 -1
  4. package/.claude/commands/forge/convert.md +31 -0
  5. package/.claude/commands/forge/debug.md +12 -154
  6. package/.claude/commands/forge/discuss.md +60 -107
  7. package/.claude/commands/forge/execute.md +67 -142
  8. package/.claude/commands/forge/generate.md +8 -107
  9. package/.claude/commands/forge/help.md +9 -114
  10. package/.claude/commands/forge/init.md +10 -74
  11. package/.claude/commands/forge/insert-phase.md +4 -3
  12. package/.claude/commands/forge/new-milestone.md +1 -1
  13. package/.claude/commands/forge/new-project.md +12 -91
  14. package/.claude/commands/forge/pause-work.md +2 -2
  15. package/.claude/commands/forge/plan.md +114 -129
  16. package/.claude/commands/forge/quick.md +17 -106
  17. package/.claude/commands/forge/remove-phase.md +3 -2
  18. package/.claude/commands/forge/resume.md +22 -0
  19. package/.claude/commands/forge/team-add.md +24 -0
  20. package/.claude/commands/forge/team-create.md +22 -0
  21. package/.claude/commands/forge/team-remove.md +24 -0
  22. package/.claude/commands/forge/team-start.md +22 -0
  23. package/.claude/commands/forge/team-view.md +18 -0
  24. package/.claude/commands/forge/verify.md +68 -147
  25. package/.claude/hooks/forge-context-cleanup.cjs +79 -0
  26. package/.claude/hooks/forge-event-guard.cjs +36 -0
  27. package/.claude/hooks/forge-size-guard.cjs +55 -0
  28. package/.claude/rules/api-patterns.md +13 -98
  29. package/.claude/rules/context-efficiency.md +10 -0
  30. package/.claude/rules/security-baseline.md +18 -204
  31. package/.claude/rules/testing-standards.md +16 -177
  32. package/.claude/rules/ui-conventions.md +17 -142
  33. package/bin/forge.js +5 -3
  34. package/dist/bin/forge.js +5 -3
  35. package/dist/cli/index.d.ts.map +1 -1
  36. package/dist/cli/index.js +15 -1
  37. package/dist/cli/index.js.map +1 -1
  38. package/dist/commands/convert.d.ts +6 -0
  39. package/dist/commands/convert.d.ts.map +1 -0
  40. package/dist/commands/convert.js +132 -0
  41. package/dist/commands/convert.js.map +1 -0
  42. package/dist/commands/generate.d.ts.map +1 -1
  43. package/dist/commands/generate.js +3 -2
  44. package/dist/commands/generate.js.map +1 -1
  45. package/dist/commands/index.d.ts +4 -4
  46. package/dist/commands/index.d.ts.map +1 -1
  47. package/dist/commands/index.js +4 -4
  48. package/dist/commands/index.js.map +1 -1
  49. package/dist/generators/gsd-converter.d.ts +100 -0
  50. package/dist/generators/gsd-converter.d.ts.map +1 -0
  51. package/dist/generators/gsd-converter.js +335 -0
  52. package/dist/generators/gsd-converter.js.map +1 -0
  53. package/dist/templates/.claude/rules/api-patterns.md.template +212 -0
  54. package/dist/templates/.claude/rules/security-baseline.md.template +322 -0
  55. package/dist/templates/.claude/rules/testing-standards.md.template +280 -0
  56. package/dist/templates/.claude/rules/ui-conventions.md.template +264 -0
  57. package/dist/templates/.planning/forge.config.json.template +75 -0
  58. package/dist/templates/CLAUDE.md.template +161 -0
  59. package/dist/templates/PLAN.md.template +177 -0
  60. package/dist/templates/PROJECT.md.template +156 -0
  61. package/dist/templates/REQUIREMENTS.md.template +221 -0
  62. package/dist/templates/ROADMAP.md.template +130 -0
  63. package/dist/types/index.d.ts +2 -2
  64. package/dist/types/index.d.ts.map +1 -1
  65. package/dist/types/index.js +2 -2
  66. package/dist/types/index.js.map +1 -1
  67. package/dist/utils/index.d.ts +5 -5
  68. package/dist/utils/index.d.ts.map +1 -1
  69. package/dist/utils/index.js +5 -5
  70. package/dist/utils/index.js.map +1 -1
  71. package/dist/utils/template-client.d.ts.map +1 -1
  72. package/dist/utils/template-client.js +3 -2
  73. package/dist/utils/template-client.js.map +1 -1
  74. package/package.json +6 -4
  75. package/.claude/commands/forge/resume-work.md +0 -122
  76. package/dist/git/__tests__/worktree.test.d.ts +0 -5
  77. package/dist/git/__tests__/worktree.test.d.ts.map +0 -1
  78. package/dist/git/__tests__/worktree.test.js +0 -121
  79. package/dist/git/__tests__/worktree.test.js.map +0 -1
  80. package/dist/git/codeowners.d.ts +0 -101
  81. package/dist/git/codeowners.d.ts.map +0 -1
  82. package/dist/git/codeowners.js +0 -216
  83. package/dist/git/codeowners.js.map +0 -1
  84. package/dist/git/commit.d.ts +0 -135
  85. package/dist/git/commit.d.ts.map +0 -1
  86. package/dist/git/commit.js +0 -223
  87. package/dist/git/commit.js.map +0 -1
  88. package/dist/git/hooks/commit-msg.d.ts +0 -8
  89. package/dist/git/hooks/commit-msg.d.ts.map +0 -1
  90. package/dist/git/hooks/commit-msg.js +0 -34
  91. package/dist/git/hooks/commit-msg.js.map +0 -1
  92. package/dist/git/hooks/pre-commit.d.ts +0 -8
  93. package/dist/git/hooks/pre-commit.d.ts.map +0 -1
  94. package/dist/git/hooks/pre-commit.js +0 -34
  95. package/dist/git/hooks/pre-commit.js.map +0 -1
  96. package/dist/git/pre-commit-hooks.d.ts +0 -117
  97. package/dist/git/pre-commit-hooks.d.ts.map +0 -1
  98. package/dist/git/pre-commit-hooks.js +0 -270
  99. package/dist/git/pre-commit-hooks.js.map +0 -1
  100. package/dist/git/wipe-protocol.d.ts +0 -281
  101. package/dist/git/wipe-protocol.d.ts.map +0 -1
  102. package/dist/git/wipe-protocol.js +0 -237
  103. package/dist/git/wipe-protocol.js.map +0 -1
  104. package/dist/git/worktree.d.ts +0 -69
  105. package/dist/git/worktree.d.ts.map +0 -1
  106. package/dist/git/worktree.js +0 -202
  107. package/dist/git/worktree.js.map +0 -1
@@ -1,85 +1,21 @@
1
1
  ---
2
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.
3
+ description: Initialize FORGE in the current project directory.
4
4
  argument-hint: [--quick]
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
8
8
  - Bash
9
+ - TeamCreate
9
10
  ---
10
11
 
11
- <objective>
12
- Initialize FORGE in the current project directory with complete project structure and configuration.
12
+ Initialize FORGE in current directory. Use `--quick` to skip prompts.
13
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>
14
+ **Steps:**
17
15
 
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>
16
+ 1. Create dirs: state/events, contracts, .planning, .claude/rules, src/{cli,commands,generators,git,utils}, .github/workflows, .worktrees
17
+ 2. Generate CLAUDE.md template, state/STATE.json, .planning/forge.config.json
18
+ 3. If no AgentTeam.md, analyze codebase via Explore subagent and generate one. Create team with TeamCreate.
19
+ 4. Git setup: .gitignore, init repo, pre-commit hooks
20
+ 5. Dependencies: package.json, install chalk/commander/execa/zod/handlebars
21
+ 6. Verify: `npm run build`, `/forge:status`
@@ -79,7 +79,7 @@ Decimal phase format: `X.Y` where X is parent phase, Y increments (0.1, 0.2, etc
79
79
  9. **Confirm**
80
80
  - Show inserted phase info
81
81
  - List any updated dependencies
82
- - Suggest next: `forge discuss <phase>` or `forge plan <phase>`
82
+ - Suggest next: `/forge:discuss <phase-number>` or `/forge:plan <phase-number>`
83
83
  </process>
84
84
 
85
85
  <deliverables>
@@ -92,7 +92,8 @@ Decimal phase format: `X.Y` where X is parent phase, Y increments (0.1, 0.2, etc
92
92
  </deliverables>
93
93
 
94
94
  <next_steps>
95
- - Run `forge discuss <phase>` to capture phase context
96
- - Run `forge plan <phase>` to generate task breakdown
95
+ - Run `/forge:discuss <phase-number>` to capture phase context
96
+ - Run `/forge:plan <phase-number>` to generate task breakdown
97
97
  - Notify team of dependency changes
98
+ - Tip: Use `/clear` to start from a fresh context
98
99
  </next_steps>
@@ -88,7 +88,7 @@ Updates ROADMAP.md structure and routes to requirements gathering for the new mi
88
88
  ```
89
89
 
90
90
  8. **Route to Requirements**
91
- - Suggest: Run `forge generate requirements` or manual requirements gathering
91
+ - Suggest: Run `/forge:generate requirements` or manual requirements gathering
92
92
  - Ask: "Do you want to gather requirements now?"
93
93
  - Yes: Route to requirements workflow
94
94
  - No: Complete, user can gather later
@@ -1,103 +1,24 @@
1
1
  ---
2
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.
3
+ description: Initialize a new FORGE project with team coordination and state engine.
4
4
  argument-hint: [project-name]
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
8
8
  - Bash
9
+ - TeamCreate
9
10
  - AskUserQuestion
10
11
  ---
11
12
 
12
- <objective>
13
- Initialize a new FORGE project with complete project structure, state engine, team coordination system, and artifact generation capabilities.
13
+ Create a new FORGE multi-agent development project.
14
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>
15
+ **Steps:**
18
16
 
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>
17
+ 1. Create project directory (if name provided), create FORGE structure: state/, contracts/, .planning/, .claude/rules/, src/
18
+ 2. Generate CLAUDE.md, REQUIREMENTS.md, ROADMAP.md, PLAN.md
19
+ 3. Initialize state/STATE.json, STATE.schema.json, state/events/
20
+ 4. Create FORGE team with TeamCreate, set up .claude/rules/ and CODEOWNERS
21
+ 5. Set up templates in src/templates/, configure token limits
22
+ 6. Git init, .worktrees/, pre-commit hooks, .github/workflows/
23
+ 7. Verify: `npm run build`, `npm test`, `/forge:status`
24
+ 8. Show next steps: `/forge:discuss` → `/forge:plan` → `/forge:execute`
@@ -79,7 +79,7 @@ Use when: You need to stop work mid-phase and want to resume later with full con
79
79
 
80
80
  ---
81
81
  **Paused:** {timestamp}
82
- **Resume:** Run `forge resume-work`
82
+ **Resume:** Run `/forge:resume`
83
83
  ```
84
84
 
85
85
  4. **Git Commit**
@@ -105,7 +105,7 @@ Use when: You need to stop work mid-phase and want to resume later with full con
105
105
  </deliverables>
106
106
 
107
107
  <next_steps>
108
- - When ready to continue: `forge resume-work`
108
+ - When ready to continue: `/forge:resume`
109
109
  - Handoff file will be automatically loaded
110
110
  - All context preserved
111
111
  </next_steps>
@@ -1,144 +1,129 @@
1
1
  ---
2
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>
3
+ description: Research-first multi-plan generation with wave-based execution ordering.
4
+ argument-hint: <phase-name> [--research] [--skip-research] [--gaps] [--skip-verify]
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
8
8
  - Bash
9
+ - Glob
10
+ - Grep
9
11
  - Task
12
+ - TaskCreate
13
+ - TeamCreate
14
+ - WebSearch
15
+ - WebFetch
16
+ - AskUserQuestion
10
17
  ---
11
18
 
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
19
+ Generate research-backed multi-plan breakdown for phase $ARGUMENTS. Each research finding that needs addressing becomes a separate plan file with 2-3 tasks. Plans are grouped into waves for parallel execution.
20
+
21
+ **Read first:** REQUIREMENTS.md, ROADMAP.md, .planning/phases/{phase}/CONTEXT.md (if exists), state/STATE.json
22
+
23
+ **Steps:**
24
+
25
+ 1. **Parse arguments** — Extract phase name and flags from `$ARGUMENTS`:
26
+ - `--research` — force re-run research even if RESEARCH.md exists
27
+ - `--skip-research` skip research step entirely
28
+ - `--gaps` — generate gap closure plans only (used after verify)
29
+ - `--skip-verify` skip plan verification step
30
+
31
+ 2. **Check for existing plans** — Look for `.planning/phases/{phase}/*-PLAN.md` files.
32
+ - If plan files exist, use AskUserQuestion with options:
33
+ a) "Add more plans" — continue numbering from highest existing plan number
34
+ b) "Verify existing plans" — route to `/forge:verify {phase}`
35
+ c) "Execute existing plans" — route to `/forge:execute {phase}`
36
+ d) "Replan from scratch" — delete existing plan files, regenerate from research
37
+ - If no plans exist, proceed to research.
38
+
39
+ 3. **Research phase** (unless `--skip-research` or `--gaps`):
40
+ - Check if `.planning/phases/{phase}/{phase}-RESEARCH.md` exists.
41
+ - If exists and no `--research` flag, ask: use existing research or re-run?
42
+ - If research needed, spawn a researcher agent via Task tool (subagent_type: "general-purpose"):
43
+ - **Researcher reads:** CONTEXT.md to constrain research scope:
44
+ - **Locked decisions** research these deeply, find best practices, don't explore alternatives
45
+ - **Claude's discretion** research multiple options, recommend one with rationale
46
+ - **Deferred ideas** → ignore completely, do not research
47
+ - **Researcher uses:** WebSearch (include current year in queries), WebFetch (official docs), Grep/Glob (codebase patterns to follow)
48
+ - **Researcher produces** `{phase}-RESEARCH.md` with sections:
49
+ ```
50
+ # {Phase} Research
51
+ ## User Constraints (from CONTEXT.md)
52
+ ## Summary
53
+ ## Recommended Stack (specific versions)
54
+ ## Architecture Patterns
55
+ ## Don't Hand-Roll (use existing libraries)
56
+ ## Common Pitfalls
57
+ ## Code Examples
58
+ ## Sources
59
+ [Each with confidence: HIGH | MEDIUM | LOW]
60
+ ```
61
+ - Each major research finding becomes a candidate for a separate plan
62
+
63
+ 4. **Generate multi-plan breakdown** — Spawn a planner agent via Task tool (subagent_type: "general-purpose"):
64
+ - **Planner reads:** CONTEXT.md (locked decisions), RESEARCH.md, REQUIREMENTS.md, STATE.json, existing codebase patterns
65
+ - **Planner decomposes** the phase into multiple plan files, each covering one coherent unit of work with 2-3 tasks
66
+ - **Each plan file** gets YAML frontmatter:
67
+ ```yaml
68
+ ---
69
+ phase: {phase-name}
70
+ plan: 01
71
+ wave: 1
72
+ depends_on: []
73
+ files_modified: [src/foo.ts, src/bar.ts]
74
+ autonomous: true
75
+ gap_closure: false
76
+ ---
77
+ ```
78
+ - **Plan body** contains:
79
+ - Objective (what this plan builds and why)
80
+ - Context references (which CONTEXT.md decisions apply)
81
+ - Tasks in XML format:
82
+ ```xml
83
+ <task name="descriptive-name" type="auto">
84
+ <files>src/foo.ts, src/bar.ts</files>
85
+ <action>What to implement, specifically</action>
86
+ <verify>npm test, specific checks</verify>
87
+ <done>Concrete completion criteria</done>
88
+ </task>
89
+ ```
90
+ - Success criteria for the plan as a whole
91
+ - **Write to:** `.planning/phases/{phase}/{phase}-01-PLAN.md`, `{phase}-02-PLAN.md`, etc.
92
+ - **Build dependency graph and assign waves:**
93
+ - Independent plans → same wave (can execute in parallel)
94
+ - Plans that depend on others → higher wave number
95
+ - `wave = max(waves[dep] for dep in depends_on) + 1`
96
+ - Wave 1 plans have no dependencies
97
+
98
+ 5. **Verify plans** (unless `--skip-verify`):
99
+ - Check: requirements coverage across all plans, task completeness, dependency correctness, no circular deps, scope matches CONTEXT.md (no deferred ideas included)
100
+ - If issues found, revision loop (max 3 iterations): targeted fixes, not full replan
101
+ - If passes, proceed
102
+
103
+ 6. **Present results:**
54
104
  ```
105
+ Phase {X}: {Name} — {N} plan(s) in {M} wave(s)
55
106
 
56
- 3. **Task Generation** (5-6 task limit enforced)
107
+ | Wave | Plans | What it builds |
108
+ |------|-------|----------------|
109
+ | 1 | 01, 02 | [objectives] |
110
+ | 2 | 03 | [objective] |
57
111
 
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
- ```
112
+ Research: {Completed | Used existing | Skipped}
113
+ Verification: {Passed | Skipped}
70
114
 
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
115
+ Next: /forge:execute {phase}
77
116
  ```
78
117
 
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>
118
+ **Plan frontmatter reference:**
119
+ ```yaml
120
+ ---
121
+ phase: M2-planning-engine # Phase identifier
122
+ plan: 01 # Sequential plan number
123
+ wave: 1 # Execution wave (parallel within wave)
124
+ depends_on: [] # Plan numbers this depends on
125
+ files_modified: [src/foo.ts] # Files this plan touches
126
+ autonomous: true # false if has checkpoints needing user input
127
+ gap_closure: false # true for gap remediation plans
128
+ ---
129
+ ```
@@ -10,121 +10,32 @@ allowed-tools:
10
10
  - Grep
11
11
  - Bash
12
12
  - Task
13
+ - TaskCreate
14
+ - TeamCreate
13
15
  - AskUserQuestion
14
16
  ---
15
17
 
16
- <objective>
17
- Execute small, ad-hoc tasks with FORGE guarantees (atomic commits, STATE.json tracking) while skipping optional workflows.
18
+ Execute quick ad-hoc task "$ARGUMENTS" with atomic commits and state tracking. Skips research/verification.
18
19
 
19
- Quick mode is the same system with a shorter path:
20
- - Spawns planner + executor(s)
21
- - Skips research, plan-checker, verifier
22
- - Quick tasks live in `.planning/quick/` separate from planned phases
23
- - Updates STATE.json "Quick Tasks Completed" table (NOT ROADMAP.md)
20
+ **Read:** state/STATE.json
24
21
 
25
- Use when: You know exactly what to do and the task is small enough to not need research or verification.
26
- </objective>
22
+ **Steps:**
27
23
 
28
- <execution_context>
29
- @state/STATE.json
30
- @CLAUDE.md
31
- </execution_context>
24
+ 1. Generate task ID `quick-{timestamp}`, create `.planning/quick/{taskId}/PLAN.md` with description, steps (1-3), and acceptance criteria
32
25
 
33
- <context>
34
- **Task Description:** $ARGUMENTS
26
+ 2. **Ensure FORGE team AND teammates are running:**
27
+ - Check `~/.claude/teams/forge/config.json` exists. If not, create team with TeamCreate.
28
+ - Read `.planning/AgentTeam.md` to get the list of teammates that should be active.
29
+ - Read `~/.claude/teams/forge/config.json` members list to see who is registered.
30
+ - For each teammate defined in AgentTeam.md that is NOT in the team config (or if team was just created), spawn them using the Task tool with `team_name: "forge"` and `name: "{teammate-name}"` and their full prompt from AgentTeam.md.
31
+ - This ensures teammates are always running when any FORGE command executes, even after session restarts.
35
32
 
36
- **Quick Task Workflow:**
37
- 1. Validate task is appropriate for quick mode
38
- 2. Create minimal task plan (1-3 atomic steps)
39
- 3. Execute task with atomic commits
40
- 4. Update STATE.json quick tasks table
41
- 5. Verify with basic validation
42
- </context>
33
+ 3. Validate quick mode fit (well-understood, small, 1-3 steps). If too big, suggest `/forge:plan`.
43
34
 
44
- <process>
45
- **Execute quick task workflow:**
35
+ 4. Execute steps: make changes → atomic commit `feat({taskId}): {desc}` → update PLAN.md checklist after each
46
36
 
47
- 1. **Validate Quick Mode Appropriateness**
48
- Ask: "Is this task appropriate for quick mode?"
49
- - Quick mode tasks should:
50
- - Be well-understood (no research needed)
51
- - Be small (1-3 atomic steps)
52
- - Not require verification workflows
37
+ 5. Optionally delegate to teammates via TaskCreate + Task if complex enough
53
38
 
54
- If task doesn't fit:
55
- - Suggest: Use `forge plan <phase>` for proper planning
56
- - Or: Continue with quick mode anyway
39
+ 6. Finalize PLAN.md (mark completed, list commits), update STATE.json `quickTasksCompleted` table, submit QUICK_TASK_COMPLETED event to state/events/
57
40
 
58
- 2. **Create Quick Task Entry**
59
- - Generate task ID: `quick-{timestamp}`
60
- - Create quick task directory:
61
- ```bash
62
- mkdir -p .planning/quick/{taskId}/
63
- ```
64
-
65
- 3. **Generate Minimal Task Plan**
66
- - Break task into 1-3 atomic steps
67
- - Define acceptance criteria
68
- - Identify files to change
69
- - Create simple plan in `.planning/quick/{taskId}/PLAN.md`
70
-
71
- 4. **Execute Task**
72
- For each step:
73
- - Read necessary files
74
- - Make changes (Edit or Write)
75
- - Run validation if applicable
76
- - **Atomic commit after each step:**
77
- ```bash
78
- git add <changed-files>
79
- git commit -m "feat({taskId}): {step-description}"
80
- ```
81
-
82
- 5. **Update STATE.json**
83
- Add to "quickTasksCompleted" table:
84
- ```json
85
- {
86
- "quickTasksCompleted": [
87
- {
88
- "taskId": "quick-{timestamp}",
89
- "description": "{task-description}",
90
- "completedAt": "{timestamp}",
91
- "commitHash": "{hash}"
92
- }
93
- ]
94
- }
95
- ```
96
-
97
- 6. **Submit Event**
98
- - Event type: QUICK_TASK_COMPLETED
99
- - Include: taskId, description, commitHash
100
- - Write to state/events/
101
-
102
- 7. **Verify**
103
- - Basic validation (does it work?)
104
- - No formal verification workflow in quick mode
105
-
106
- 8. **Confirm**
107
- - Show task completion summary
108
- - List commits made
109
- - Show updated STATE.json
110
- </process>
111
-
112
- <deliverables>
113
- - .planning/quick/{taskId}/PLAN.md (minimal plan)
114
- - Completed task with atomic commits
115
- - STATE.json updated (quickTasksCompleted table)
116
- - Event: QUICK_TASK_COMPLETED in state/events/
117
- </deliverables>
118
-
119
- <success_criteria>
120
- - [ ] Task completed successfully
121
- - [ ] Atomic commits for each step
122
- - [ ] STATE.json updated
123
- - [ ] Basic validation passed
124
- </success_criteria>
125
-
126
- <next_steps>
127
- - Continue with more quick tasks: `forge quick <description>`
128
- - Or plan a full phase: `forge plan <phase>`
129
- - Check progress: `forge status`
130
- </next_steps>
41
+ 7. Show completion summary with commits and PLAN.md location
@@ -85,7 +85,8 @@ Use when: Phase is no longer needed, duplicate, or superseded by another phase.
85
85
  </deliverables>
86
86
 
87
87
  <next_steps>
88
- - Review updated roadmap with `forge status`
88
+ - Review updated roadmap with `/forge:status`
89
89
  - Update any dependent phases manually if needed
90
- - Continue work with `forge execute <phase>`
90
+ - Continue work with `/forge:execute <phase-number>`
91
+ - Tip: Use `/clear` to start from a fresh context
91
92
  </next_steps>