forge-dev-framework 1.0.1 → 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.
- package/.claude/commands/forge/README.md +281 -0
- package/.claude/commands/forge/add-phase.md +90 -0
- package/.claude/commands/forge/complete-milestone.md +130 -0
- package/.claude/commands/forge/config.md +115 -0
- package/.claude/commands/forge/convert.md +31 -0
- package/.claude/commands/forge/debug.md +31 -0
- package/.claude/commands/forge/discuss.md +78 -0
- package/.claude/commands/forge/execute.md +85 -0
- package/.claude/commands/forge/generate.md +21 -0
- package/.claude/commands/forge/help.md +18 -0
- package/.claude/commands/forge/init.md +21 -0
- package/.claude/commands/forge/insert-phase.md +99 -0
- package/.claude/commands/forge/new-milestone.md +114 -0
- package/.claude/commands/forge/new-project.md +24 -0
- package/.claude/commands/forge/pause-work.md +111 -0
- package/.claude/commands/forge/plan.md +129 -0
- package/.claude/commands/forge/quick.md +41 -0
- package/.claude/commands/forge/remove-phase.md +92 -0
- package/.claude/commands/forge/resume.md +22 -0
- package/.claude/commands/forge/status.md +87 -0
- package/.claude/commands/forge/team-add.md +24 -0
- package/.claude/commands/forge/team-create.md +22 -0
- package/.claude/commands/forge/team-remove.md +24 -0
- package/.claude/commands/forge/team-start.md +22 -0
- package/.claude/commands/forge/team-view.md +18 -0
- package/.claude/commands/forge/verify.md +95 -0
- package/.claude/hooks/forge-context-cleanup.cjs +79 -0
- package/.claude/hooks/forge-event-guard.cjs +36 -0
- package/.claude/hooks/forge-size-guard.cjs +55 -0
- package/.claude/rules/api-patterns.md +13 -98
- package/.claude/rules/context-efficiency.md +10 -0
- package/.claude/rules/security-baseline.md +18 -204
- package/.claude/rules/testing-standards.md +16 -177
- package/.claude/rules/ui-conventions.md +17 -142
- package/README.md +1 -0
- package/bin/forge.js +5 -3
- package/dist/bin/forge.js +5 -3
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +15 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/convert.d.ts +6 -0
- package/dist/commands/convert.d.ts.map +1 -0
- package/dist/commands/convert.js +132 -0
- package/dist/commands/convert.js.map +1 -0
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +3 -2
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/index.d.ts +4 -4
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +4 -4
- package/dist/commands/index.js.map +1 -1
- package/dist/generators/gsd-converter.d.ts +100 -0
- package/dist/generators/gsd-converter.d.ts.map +1 -0
- package/dist/generators/gsd-converter.js +335 -0
- package/dist/generators/gsd-converter.js.map +1 -0
- package/dist/templates/.claude/rules/api-patterns.md.template +212 -0
- package/dist/templates/.claude/rules/security-baseline.md.template +322 -0
- package/dist/templates/.claude/rules/testing-standards.md.template +280 -0
- package/dist/templates/.claude/rules/ui-conventions.md.template +264 -0
- package/dist/templates/.planning/forge.config.json.template +75 -0
- package/dist/templates/CLAUDE.md.template +161 -0
- package/dist/templates/PLAN.md.template +177 -0
- package/dist/templates/PROJECT.md.template +156 -0
- package/dist/templates/REQUIREMENTS.md.template +221 -0
- package/dist/templates/ROADMAP.md.template +130 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -2
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +5 -5
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +5 -5
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/template-client.d.ts.map +1 -1
- package/dist/utils/template-client.js +3 -2
- package/dist/utils/template-client.js.map +1 -1
- package/package.json +6 -4
- package/dist/git/__tests__/worktree.test.d.ts +0 -5
- package/dist/git/__tests__/worktree.test.d.ts.map +0 -1
- package/dist/git/__tests__/worktree.test.js +0 -121
- package/dist/git/__tests__/worktree.test.js.map +0 -1
- package/dist/git/codeowners.d.ts +0 -101
- package/dist/git/codeowners.d.ts.map +0 -1
- package/dist/git/codeowners.js +0 -216
- package/dist/git/codeowners.js.map +0 -1
- package/dist/git/commit.d.ts +0 -135
- package/dist/git/commit.d.ts.map +0 -1
- package/dist/git/commit.js +0 -223
- package/dist/git/commit.js.map +0 -1
- package/dist/git/hooks/commit-msg.d.ts +0 -8
- package/dist/git/hooks/commit-msg.d.ts.map +0 -1
- package/dist/git/hooks/commit-msg.js +0 -34
- package/dist/git/hooks/commit-msg.js.map +0 -1
- package/dist/git/hooks/pre-commit.d.ts +0 -8
- package/dist/git/hooks/pre-commit.d.ts.map +0 -1
- package/dist/git/hooks/pre-commit.js +0 -34
- package/dist/git/hooks/pre-commit.js.map +0 -1
- package/dist/git/pre-commit-hooks.d.ts +0 -117
- package/dist/git/pre-commit-hooks.d.ts.map +0 -1
- package/dist/git/pre-commit-hooks.js +0 -270
- package/dist/git/pre-commit-hooks.js.map +0 -1
- package/dist/git/wipe-protocol.d.ts +0 -281
- package/dist/git/wipe-protocol.d.ts.map +0 -1
- package/dist/git/wipe-protocol.js +0 -237
- package/dist/git/wipe-protocol.js.map +0 -1
- package/dist/git/worktree.d.ts +0 -69
- package/dist/git/worktree.d.ts.map +0 -1
- package/dist/git/worktree.js +0 -202
- package/dist/git/worktree.js.map +0 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge:discuss
|
|
3
|
+
description: Capture project context and identify gray areas for a phase.
|
|
4
|
+
argument-hint: <phase-name>
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Glob
|
|
9
|
+
- Grep
|
|
10
|
+
- Bash
|
|
11
|
+
- AskUserQuestion
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
Extract implementation decisions for phase $ARGUMENTS that downstream agents (researcher, planner) need. The user is the visionary — you are the builder asking clarifying questions.
|
|
15
|
+
|
|
16
|
+
**Read first:** ROADMAP.md, REQUIREMENTS.md, state/STATE.json
|
|
17
|
+
|
|
18
|
+
**Steps:**
|
|
19
|
+
|
|
20
|
+
1. **Initialize** — Read ROADMAP.md, REQUIREMENTS.md, STATE.json. Validate the phase exists in the roadmap. Extract the phase goal and scope statement.
|
|
21
|
+
|
|
22
|
+
2. **Check existing** — If `.planning/phases/{phase}/CONTEXT.md` exists, use AskUserQuestion:
|
|
23
|
+
- "Update existing context" — re-run discussion, merge new answers
|
|
24
|
+
- "View current context" — display CONTEXT.md and stop
|
|
25
|
+
- "Skip (use existing)" — proceed to offering next command
|
|
26
|
+
|
|
27
|
+
3. **Analyze phase for gray areas** — Based on the phase goal from ROADMAP.md, identify 3-4 **concrete** gray areas specific to THIS phase. Do NOT use generic categories (UI, UX, Behavior). Instead, identify real decisions:
|
|
28
|
+
- For a visual feature → presentation choices, interaction patterns, layout decisions
|
|
29
|
+
- For a CLI tool → flag design, output format, error messaging style
|
|
30
|
+
- For an API → contract shape, auth strategy, error handling patterns
|
|
31
|
+
- For infrastructure → deployment strategy, monitoring approach, scaling model
|
|
32
|
+
- Each gray area should be a specific decision point, e.g. "Layout style", "Loading behavior", "Error recovery strategy"
|
|
33
|
+
|
|
34
|
+
4. **Present gray areas** — Use AskUserQuestion (multiSelect: true) with the 3-4 phase-specific gray areas. User picks which ones to discuss.
|
|
35
|
+
|
|
36
|
+
5. **Discuss selected areas** — For each selected area:
|
|
37
|
+
- Ask up to 4 questions via AskUserQuestion with concrete options (not abstract)
|
|
38
|
+
- Always include a "You decide (Claude's discretion)" option where reasonable — this captures areas where the planner has flexibility
|
|
39
|
+
- After 4 questions, ask: "More questions about [area], or move to next?"
|
|
40
|
+
- If user introduces scope creep (new capability beyond this phase), redirect: "That sounds like a new capability — I'll note it under Deferred Ideas for a future phase."
|
|
41
|
+
|
|
42
|
+
6. **Write CONTEXT.md** — Create `.planning/phases/{phase}/CONTEXT.md` with this structure:
|
|
43
|
+
|
|
44
|
+
```markdown
|
|
45
|
+
# Phase [X]: [Name] - Context
|
|
46
|
+
**Gathered:** [date]
|
|
47
|
+
**Status:** Ready for planning
|
|
48
|
+
|
|
49
|
+
## Phase Boundary
|
|
50
|
+
[Clear scope statement from ROADMAP.md — fixed, not negotiable]
|
|
51
|
+
|
|
52
|
+
## Implementation Decisions
|
|
53
|
+
### [Area 1 discussed]
|
|
54
|
+
- [Specific decision made]
|
|
55
|
+
- [Another decision]
|
|
56
|
+
### [Area 2 discussed]
|
|
57
|
+
- [Specific decision made]
|
|
58
|
+
|
|
59
|
+
## Claude's Discretion
|
|
60
|
+
[Areas where user said "you decide" — flexibility for planner/researcher]
|
|
61
|
+
- [Area]: [What Claude can choose freely]
|
|
62
|
+
|
|
63
|
+
## Specific Ideas
|
|
64
|
+
[Any references, inspirations, or "I want it like X" moments from discussion]
|
|
65
|
+
|
|
66
|
+
## Deferred Ideas
|
|
67
|
+
[Scope creep captured here — explicitly out of scope for this phase]
|
|
68
|
+
- [Idea]: [Why it was deferred]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
7. **Commit and offer next step** — Offer `/forge:plan {phase}` to proceed.
|
|
72
|
+
|
|
73
|
+
**Downstream contract — who reads CONTEXT.md and how:**
|
|
74
|
+
- **Researcher** reads CONTEXT.md to know WHAT to research:
|
|
75
|
+
- Locked decisions → research deeply, don't explore alternatives
|
|
76
|
+
- Claude's discretion → research options and recommend best approach
|
|
77
|
+
- Deferred ideas → ignore completely
|
|
78
|
+
- **Planner** reads CONTEXT.md to know WHAT choices are locked (implement exactly), flexible (can choose), and out of scope (must not include)
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge:execute
|
|
3
|
+
description: Execute all plans in a phase with wave-based parallelization.
|
|
4
|
+
argument-hint: <phase-name> [--gaps]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- TaskList
|
|
10
|
+
- TaskCreate
|
|
11
|
+
- TaskUpdate
|
|
12
|
+
- TaskGet
|
|
13
|
+
- SendMessage
|
|
14
|
+
- Task
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
Execute phase $ARGUMENTS by discovering all plan files, grouping by wave, and executing waves sequentially with plans within each wave in parallel.
|
|
18
|
+
|
|
19
|
+
**Flag support:** If `$ARGUMENTS` contains `--gaps`, only execute plans with `gap_closure: true` in their frontmatter. Parse the phase name by stripping `--gaps` from arguments.
|
|
20
|
+
|
|
21
|
+
**Read first:** All `.planning/phases/{phase}/*-PLAN.md` files, `.planning/phases/{phase}/CONTEXT.md`, state/STATE.json
|
|
22
|
+
|
|
23
|
+
**Steps:**
|
|
24
|
+
|
|
25
|
+
1. **Parse arguments and discover plans:**
|
|
26
|
+
- Extract phase name, check for `--gaps` flag
|
|
27
|
+
- Glob `.planning/phases/{phase}/*-PLAN.md` → parse YAML frontmatter of each
|
|
28
|
+
- Extract from each: plan number, wave, depends_on, autonomous, files_modified, gap_closure
|
|
29
|
+
- Skip plans that have a matching `*-SUMMARY.md` (already executed)
|
|
30
|
+
- If `--gaps`: only include plans where `gap_closure: true`
|
|
31
|
+
- If no plans found, error: suggest running `/forge:plan {phase}` first
|
|
32
|
+
- Report: "Found {N} plans in {M} waves ({K} incomplete)"
|
|
33
|
+
|
|
34
|
+
2. **Ensure FORGE team AND teammates are running:**
|
|
35
|
+
- Check `~/.claude/teams/forge/config.json` exists. If not, create team with TeamCreate.
|
|
36
|
+
- Read `.planning/AgentTeam.md` to get the list of teammates that should be active.
|
|
37
|
+
- Read `~/.claude/teams/forge/config.json` members list to see who is registered.
|
|
38
|
+
- 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.
|
|
39
|
+
- This ensures teammates are always running when any FORGE command executes, even after session restarts.
|
|
40
|
+
|
|
41
|
+
3. **Create EXECUTION.md** — `.planning/phases/{phase}/EXECUTION.md` with wave/plan status table:
|
|
42
|
+
```markdown
|
|
43
|
+
# {Phase} Execution Log
|
|
44
|
+
**Started:** [timestamp]
|
|
45
|
+
|
|
46
|
+
| Wave | Plan | Objective | Status | Commit |
|
|
47
|
+
|------|------|-----------|--------|--------|
|
|
48
|
+
| 1 | 01 | [from plan] | pending | — |
|
|
49
|
+
| 1 | 02 | [from plan] | pending | — |
|
|
50
|
+
| 2 | 03 | [from plan] | pending | — |
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
4. **Wave execution loop** (sequential between waves, parallel within):
|
|
54
|
+
For each wave in order:
|
|
55
|
+
- Describe what this wave builds (from plan objectives — substantive, not just plan numbers)
|
|
56
|
+
- Spawn one executor agent per plan via Task tool (subagent_type: "general-purpose"). Each executor:
|
|
57
|
+
- Reads their specific `{phase}-{NN}-PLAN.md`
|
|
58
|
+
- Reads CONTEXT.md for locked decisions and RESEARCH.md for technical guidance
|
|
59
|
+
- Executes tasks following the plan exactly
|
|
60
|
+
- Atomic commit per task: `type(phase-plan): description`
|
|
61
|
+
- Creates `{phase}-{NN}-SUMMARY.md` on completion with:
|
|
62
|
+
```markdown
|
|
63
|
+
# Plan {NN} Summary
|
|
64
|
+
**Completed:** [timestamp]
|
|
65
|
+
## What was built
|
|
66
|
+
## Files changed
|
|
67
|
+
## Commits
|
|
68
|
+
## Issues encountered (if any)
|
|
69
|
+
```
|
|
70
|
+
- Wait for all wave agents to complete
|
|
71
|
+
- Spot-check: verify SUMMARY.md exists for each plan, git commits present
|
|
72
|
+
- Update EXECUTION.md after each plan completes
|
|
73
|
+
- Report wave completion with what was built
|
|
74
|
+
- Proceed to next wave automatically (do NOT ask user between waves)
|
|
75
|
+
|
|
76
|
+
5. **Cross-domain work:** If a plan touches another teammate's files, use REQUEST_CONTRACT event → provider publishes to contracts/ → both work against contract
|
|
77
|
+
|
|
78
|
+
6. **State:** Agents write events to state/events/, State Steward merges → STATE.json
|
|
79
|
+
|
|
80
|
+
7. **On completion:**
|
|
81
|
+
- Aggregate all SUMMARY.md files into final EXECUTION.md status
|
|
82
|
+
- Submit phase completion events
|
|
83
|
+
- Offer `/forge:verify {phase}` to validate results
|
|
84
|
+
|
|
85
|
+
**Prefer existing teammates** over spawning new ones. Only spawn if the task domain is truly uncovered by current team members.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge:generate
|
|
3
|
+
description: Generate a FORGE artifact from templates.
|
|
4
|
+
argument-hint: <artifact-name> [-f]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Generate artifact $ARGUMENTS (claude, project, requirements, roadmap, plan, config, rules).
|
|
12
|
+
|
|
13
|
+
**Read:** state/STATE.json, src/templates/
|
|
14
|
+
|
|
15
|
+
**Artifact mapping:** claude→CLAUDE.md | requirements→REQUIREMENTS.md | roadmap→ROADMAP.md | plan→PLAN.md | config→.planning/forge.config.json | rules→.claude/rules/*.md
|
|
16
|
+
|
|
17
|
+
**Steps:**
|
|
18
|
+
|
|
19
|
+
1. Load context from STATE.json (projectName, version, tasks, milestones). Error if required fields missing.
|
|
20
|
+
2. Render template. Check token limits: CLAUDE.md ~2000, REQUIREMENTS.md ~4000, PLAN.md ~6000, rules ~1000 each.
|
|
21
|
+
3. Backup existing file (unless `-f` flag), write artifact, verify format.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge:help
|
|
3
|
+
description: Show FORGE command reference.
|
|
4
|
+
argument-hint: [command-name]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Show FORGE command reference. Read `.claude/commands/forge/README.md` for full details.
|
|
10
|
+
|
|
11
|
+
**Core:** `init`, `status`, `config`, `help`, `generate`
|
|
12
|
+
**Planning:** `discuss`, `plan`, `verify`
|
|
13
|
+
**Execution:** `execute`, `quick`, `debug`, `resume`, `pause-work`
|
|
14
|
+
**Team:** `team-create`, `team-start`, `team-view`, `team-add`, `team-remove`
|
|
15
|
+
**Roadmap:** `new-milestone`, `complete-milestone`, `add-phase`, `remove-phase`, `insert-phase`
|
|
16
|
+
**Migration:** `convert`, `new-project`
|
|
17
|
+
|
|
18
|
+
For specific command help, read the command's md file in `.claude/commands/forge/`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge:init
|
|
3
|
+
description: Initialize FORGE in the current project directory.
|
|
4
|
+
argument-hint: [--quick]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- TeamCreate
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Initialize FORGE in current directory. Use `--quick` to skip prompts.
|
|
13
|
+
|
|
14
|
+
**Steps:**
|
|
15
|
+
|
|
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`
|
|
@@ -0,0 +1,99 @@
|
|
|
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-number>` or `/forge:plan <phase-number>`
|
|
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-number>` to capture phase context
|
|
96
|
+
- Run `/forge:plan <phase-number>` to generate task breakdown
|
|
97
|
+
- Notify team of dependency changes
|
|
98
|
+
- Tip: Use `/clear` to start from a fresh context
|
|
99
|
+
</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,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge:new-project
|
|
3
|
+
description: Initialize a new FORGE project with team coordination and state engine.
|
|
4
|
+
argument-hint: [project-name]
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- TeamCreate
|
|
10
|
+
- AskUserQuestion
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
Create a new FORGE multi-agent development project.
|
|
14
|
+
|
|
15
|
+
**Steps:**
|
|
16
|
+
|
|
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`
|
|
@@ -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`
|
|
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`
|
|
109
|
+
- Handoff file will be automatically loaded
|
|
110
|
+
- All context preserved
|
|
111
|
+
</next_steps>
|