forge-orkes 0.31.0 → 0.32.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/package.json +1 -1
- package/template/.claude/skills/chief-of-staff/SKILL.md +238 -0
- package/template/.claude/skills/discussing/SKILL.md +2 -0
- package/template/.claude/skills/forge/SKILL.md +31 -4
- package/template/.claude/skills/planning/SKILL.md +9 -0
- package/template/.forge/FORGE.md +57 -23
- package/template/.forge/migrations/0.32.0-chief-streams.md +159 -0
- package/template/.forge/releases.yml +85 -15
- package/template/.forge/templates/context.md +4 -0
- package/template/.forge/templates/migration-guide.md +1 -0
- package/template/.forge/templates/streams/active.yml +34 -0
- package/template/.forge/templates/streams/brief.md +47 -0
- package/template/.forge/templates/streams/stream.yml +56 -0
- package/template/.forge/templates/streams/work-package.yml +70 -0
package/package.json
CHANGED
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: chief-of-staff
|
|
3
|
+
description: "Coordinate multiple active Forge streams. Use for explicit stream intents, mid-flow pivots, delegated work, cross-stream conflict checks, and merge ordering."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Chief Of Staff
|
|
7
|
+
|
|
8
|
+
Project-level traffic control for concurrent Forge work. The Chief owns the
|
|
9
|
+
project stream registry, stream lifecycle, conflict checks, context switching,
|
|
10
|
+
delegation, merge order, and closeout.
|
|
11
|
+
|
|
12
|
+
Use this skill when the user explicitly asks about streams, Chief of Staff, or
|
|
13
|
+
parallel application work. Do not route ordinary single-feature work here by
|
|
14
|
+
default. Inside each stream, continue to use Forge's Quick, Standard, and Full
|
|
15
|
+
tiers for actual execution.
|
|
16
|
+
|
|
17
|
+
## Operating Model
|
|
18
|
+
|
|
19
|
+
Forge has three coordination layers:
|
|
20
|
+
|
|
21
|
+
| Layer | Owner | Purpose | Default context |
|
|
22
|
+
|-------|-------|---------|-----------------|
|
|
23
|
+
| Project | Project Chief | Active streams, conflicts, pivots, merge order | `.forge/streams/active.yml` |
|
|
24
|
+
| Stream | Stream Chief or lead session | One coherent line of application work | `.forge/streams/{stream}.yml` + `brief.md` |
|
|
25
|
+
| Work Package | Worker session | Delegated bounded task | `.forge/streams/{stream}/packages/{id}.yml` |
|
|
26
|
+
|
|
27
|
+
Workers never coordinate laterally. A worker reports to its stream chief or the
|
|
28
|
+
Project Chief. Scope expansion, shared-surface edits, and cross-stream conflict
|
|
29
|
+
questions return to the Chief before work continues.
|
|
30
|
+
|
|
31
|
+
## Stream States
|
|
32
|
+
|
|
33
|
+
- `draft` - described but not ready for active work
|
|
34
|
+
- `active` - currently being driven in this session
|
|
35
|
+
- `paused` - safe to resume later; context snapshot is current
|
|
36
|
+
- `delegated` - worker session or external session is carrying the stream
|
|
37
|
+
- `blocked` - cannot proceed until a dependency, decision, or conflict clears
|
|
38
|
+
- `ready` - implementation is ready for merge or verification
|
|
39
|
+
- `merged` - stream work has landed in the integration branch
|
|
40
|
+
- `closed` - final outcome recorded; no active coordination remains
|
|
41
|
+
|
|
42
|
+
## Context Loading
|
|
43
|
+
|
|
44
|
+
1. Read `.forge/streams/active.yml` first.
|
|
45
|
+
2. If missing, create it from `.forge/templates/streams/active.yml`.
|
|
46
|
+
3. Load only the selected stream's `.forge/streams/{stream}.yml`.
|
|
47
|
+
4. Load the selected stream's `brief.md` when the user needs status, handoff,
|
|
48
|
+
conflict context, or resume context.
|
|
49
|
+
5. Load work packages only when delegating, checking worker status, or closing
|
|
50
|
+
a stream.
|
|
51
|
+
|
|
52
|
+
Keep summaries in the registry short. Deep history belongs in stream briefs,
|
|
53
|
+
packages, plans, verification reports, commits, and archived artifacts.
|
|
54
|
+
|
|
55
|
+
## Supported Intents
|
|
56
|
+
|
|
57
|
+
| Intent | Examples | Action |
|
|
58
|
+
|--------|----------|--------|
|
|
59
|
+
| Show | "show streams", "active streams", "what is running?" | Summarize registry without loading all deep history |
|
|
60
|
+
| Start | "start stream X", "new stream for billing" | Snapshot current stream, create stream files, register stream |
|
|
61
|
+
| Pause | "pause stream X" | Update brief, mark paused, keep next action explicit |
|
|
62
|
+
| Resume | "resume stream X" | Load stream context, set active, surface blockers and ownership |
|
|
63
|
+
| Delegate | "delegate stream X", "farm this out" | Create or update a work package and handoff prompt |
|
|
64
|
+
| Adopt M10 | "adopt existing M10 worktrees", "migrate active orchestrating sessions" | Wrap live M10 worktrees as streams without teardown |
|
|
65
|
+
| Sync | "sync streams" | Refresh registry summaries from active stream briefs |
|
|
66
|
+
| Detect Conflicts | "detect conflicts", "check stream conflicts" | Compare ownership and dependencies |
|
|
67
|
+
| Merge Safe | "merge safe?", "what can land?" | Identify ready streams with no blocking conflicts |
|
|
68
|
+
| Close | "close stream X" | Record final status, archive/mark closed, clear active pointer if needed |
|
|
69
|
+
|
|
70
|
+
## Start Stream Flow
|
|
71
|
+
|
|
72
|
+
1. Read the registry.
|
|
73
|
+
2. If another stream is active, snapshot its current state:
|
|
74
|
+
- update `.forge/streams/{stream}/brief.md`
|
|
75
|
+
- set `next_action`
|
|
76
|
+
- mark it `paused`, `delegated`, or leave `active` only if work continues
|
|
77
|
+
3. Create a stable stream id from the goal, such as `billing-webhooks`.
|
|
78
|
+
4. Create:
|
|
79
|
+
- `.forge/streams/{id}.yml` from `.forge/templates/streams/stream.yml`
|
|
80
|
+
- `.forge/streams/{id}/brief.md` from `.forge/templates/streams/brief.md`
|
|
81
|
+
- `.forge/streams/{id}/packages/`
|
|
82
|
+
5. Add a compact entry to `.forge/streams/active.yml`.
|
|
83
|
+
6. Declare ownership:
|
|
84
|
+
- `owned_surfaces` for files or areas the stream may edit
|
|
85
|
+
- `shared_surfaces` for contracts, APIs, schemas, or docs touched with care
|
|
86
|
+
- `read_only_surfaces` for context only
|
|
87
|
+
- `forbidden_surfaces` for explicit exclusions
|
|
88
|
+
7. If ownership is uncertain, start read-only and ask for a narrower boundary.
|
|
89
|
+
8. Run conflict detection before making edits.
|
|
90
|
+
|
|
91
|
+
## Adopt Existing M10 Worktrees Flow
|
|
92
|
+
|
|
93
|
+
Use this when a repo already has `orchestrating` / M10 worktrees running and the
|
|
94
|
+
user asks to move to Chief/Streams. Do not teardown, merge, rebase, or remove
|
|
95
|
+
worktrees as part of adoption. Adoption only creates stream metadata around
|
|
96
|
+
existing M10 state.
|
|
97
|
+
|
|
98
|
+
1. Read or create `.forge/streams/active.yml`.
|
|
99
|
+
2. Discover live M10 worktrees from both sources:
|
|
100
|
+
- `git worktree list --porcelain` branches matching `refs/heads/forge/m-*`
|
|
101
|
+
- `.forge/state/milestone-*.yml` with
|
|
102
|
+
`lifecycle.worktree_mode: active` or `degraded`
|
|
103
|
+
3. For each discovered worktree, read its milestone state when available:
|
|
104
|
+
- milestone id and name
|
|
105
|
+
- `current.status`, `current.phase`, `current.phase_name`
|
|
106
|
+
- `lifecycle.worktree_path`
|
|
107
|
+
- `lifecycle.worktree_branch`
|
|
108
|
+
- `lifecycle.worktree_anchor`
|
|
109
|
+
- `lifecycle.session_id`
|
|
110
|
+
- `lifecycle.claim_session_id`
|
|
111
|
+
- blockers or refused/degraded reason
|
|
112
|
+
4. Create a stable stream id. Prefer a slug from milestone id + name, for
|
|
113
|
+
example `m16-chief-streams`. If only the branch is known, derive from the
|
|
114
|
+
branch suffix.
|
|
115
|
+
5. For each adopted stream, create if missing:
|
|
116
|
+
- `.forge/streams/{id}.yml`
|
|
117
|
+
- `.forge/streams/{id}/brief.md`
|
|
118
|
+
- `.forge/streams/{id}/packages/`
|
|
119
|
+
6. Populate the stream file:
|
|
120
|
+
- `stream.id`, `goal`, `status`, `tier`
|
|
121
|
+
- `runtime.branch` from `lifecycle.worktree_branch`
|
|
122
|
+
- `runtime.worktree` from `lifecycle.worktree_path`
|
|
123
|
+
- `runtime.worker_sessions` with the M10 session / claim ids
|
|
124
|
+
- `ownership.owned_surfaces`, `shared_surfaces`, and `read_only_surfaces`
|
|
125
|
+
as empty lists if unknown
|
|
126
|
+
- `blockers` from milestone blockers or degraded/refused notes
|
|
127
|
+
- `context.milestone` pointing at `.forge/state/milestone-{id}.yml`
|
|
128
|
+
7. Populate the stream brief with:
|
|
129
|
+
- current milestone/phase/status
|
|
130
|
+
- worktree path and branch
|
|
131
|
+
- known blockers
|
|
132
|
+
- unknown ownership surfaces marked as needing declaration
|
|
133
|
+
- next action from milestone state or "declare ownership and sync"
|
|
134
|
+
8. Add or update the compact entry in `.forge/streams/active.yml`.
|
|
135
|
+
9. Run conflict detection. Missing ownership is a conflict until clarified, but
|
|
136
|
+
it does not block adoption.
|
|
137
|
+
10. Ask before changing `.forge/project.yml`:
|
|
138
|
+
- If the user confirms Chief should be the front door, set
|
|
139
|
+
`orchestration.auto: false`.
|
|
140
|
+
- If not confirmed, leave legacy M10 auto-routing unchanged.
|
|
141
|
+
|
|
142
|
+
Adoption is idempotent. If a stream already references the same worktree branch
|
|
143
|
+
or path, update its summary and brief instead of creating a duplicate stream.
|
|
144
|
+
|
|
145
|
+
## Pause And Resume Flow
|
|
146
|
+
|
|
147
|
+
Pause:
|
|
148
|
+
1. Update the stream brief with current state, decisions, blockers, and next
|
|
149
|
+
action.
|
|
150
|
+
2. Set registry status to `paused`, unless work was handed to another session
|
|
151
|
+
and should be `delegated`.
|
|
152
|
+
3. Clear `current_stream` only if no stream remains active in this session.
|
|
153
|
+
|
|
154
|
+
Resume:
|
|
155
|
+
1. Load registry, stream file, and brief.
|
|
156
|
+
2. Surface status, blockers, owned surfaces, shared surfaces, and next action.
|
|
157
|
+
3. Set the stream to `active`.
|
|
158
|
+
4. Run conflict detection before continuing.
|
|
159
|
+
|
|
160
|
+
## Delegate Flow
|
|
161
|
+
|
|
162
|
+
1. Confirm the stream has a clear goal and ownership boundary.
|
|
163
|
+
2. Copy `.forge/templates/streams/work-package.yml` to
|
|
164
|
+
`.forge/streams/{stream}/packages/{id}.yml`.
|
|
165
|
+
3. Include goal, owned/read-only/forbidden surfaces, deliverables, verification
|
|
166
|
+
commands, stop conditions, and reporting target.
|
|
167
|
+
4. Mark the stream `delegated` if the worker owns the next action.
|
|
168
|
+
5. Tell the worker to report back to the Chief, not to other workers.
|
|
169
|
+
6. If the worker finds conflicts, missing contracts, blocked verification, or
|
|
170
|
+
scope expansion, they stop and report back before editing outside package
|
|
171
|
+
scope.
|
|
172
|
+
|
|
173
|
+
If the work-package template is not present yet, create the smallest package
|
|
174
|
+
shape that preserves goal, surfaces, deliverables, stop conditions, and next
|
|
175
|
+
reporting step. Phase 25 upgrades this to the full schema.
|
|
176
|
+
|
|
177
|
+
Delegation prompt must name the package path and the reporting target:
|
|
178
|
+
|
|
179
|
+
```text
|
|
180
|
+
Work from `.forge/streams/{stream}/packages/{id}.yml`.
|
|
181
|
+
Edit only `scope.owns`.
|
|
182
|
+
Read `scope.may_read` for context.
|
|
183
|
+
Do not touch `scope.must_not_touch`.
|
|
184
|
+
Report conflicts, missing contracts, blocked verification, or scope expansion
|
|
185
|
+
back to the Chief. Do not coordinate directly with other workers.
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Detect Conflicts
|
|
189
|
+
|
|
190
|
+
Compare all `active`, `delegated`, and `ready` streams:
|
|
191
|
+
|
|
192
|
+
- overlapping `owned_surfaces` means serialize, split, or block one stream
|
|
193
|
+
- `owned_surfaces` overlapping another stream's `shared_surfaces` requires a
|
|
194
|
+
reservation, contract, or explicit merge order
|
|
195
|
+
- overlapping `shared_surfaces` requires a named contract owner
|
|
196
|
+
- overlapping `read_only_surfaces` is safe
|
|
197
|
+
- missing ownership is a conflict until clarified
|
|
198
|
+
|
|
199
|
+
Record conflicts in both the registry and the affected stream files. Do not let
|
|
200
|
+
workers resolve cross-stream conflicts directly.
|
|
201
|
+
|
|
202
|
+
## Merge Safe Flow
|
|
203
|
+
|
|
204
|
+
Use "merge safe" to identify streams that can land:
|
|
205
|
+
|
|
206
|
+
1. Candidate stream status must be `ready`.
|
|
207
|
+
2. No blockers may be open.
|
|
208
|
+
3. Owned surfaces must not overlap another active or ready stream.
|
|
209
|
+
4. Shared surfaces must have a contract owner and documented validation.
|
|
210
|
+
5. Verification commands or manual validation must be listed.
|
|
211
|
+
6. Merge order must be explicit when more than one stream is ready.
|
|
212
|
+
|
|
213
|
+
If any condition fails, mark the stream blocked or keep it ready with a named
|
|
214
|
+
reason it cannot merge yet.
|
|
215
|
+
|
|
216
|
+
## Close Flow
|
|
217
|
+
|
|
218
|
+
1. Confirm final status: merged, intentionally abandoned, superseded, or split.
|
|
219
|
+
2. Record final outcome in the stream brief.
|
|
220
|
+
3. Update registry status to `closed`.
|
|
221
|
+
4. Clear `current_stream` if this was the active stream.
|
|
222
|
+
5. Keep closed stream history available until a later archive/compaction pass.
|
|
223
|
+
|
|
224
|
+
## Output Shape
|
|
225
|
+
|
|
226
|
+
Keep Chief responses short and operational:
|
|
227
|
+
|
|
228
|
+
```text
|
|
229
|
+
Streams:
|
|
230
|
+
- billing-webhooks — active — owns api/billing, shared db/schema — next: verify webhook retries
|
|
231
|
+
- settings-ui — paused — owns app/settings — next: resume form validation
|
|
232
|
+
|
|
233
|
+
Conflicts:
|
|
234
|
+
- billing-webhooks and reporting-export both touch db/schema. Contract owner needed before either merges.
|
|
235
|
+
|
|
236
|
+
Next:
|
|
237
|
+
- Continue billing-webhooks, or start a new stream with read-only ownership until boundaries are declared.
|
|
238
|
+
```
|
|
@@ -45,10 +45,12 @@ Never accumulate decisions in working memory. Never batch writes to convergence.
|
|
|
45
45
|
`context.md` is **shared mutable** state per FORGE.md State Ownership — writes follow two structural rules:
|
|
46
46
|
- **Scope to your milestone's block.** Different milestone blocks → git merges cleanly across worktrees.
|
|
47
47
|
- **Append-only within a block.** When superseding an older decision, *strike through* (`~~old decision~~`) and append the new line below — never rewrite in place. Same-line concurrent edits become impossible by construction; reading the history of a decision becomes possible by inspection.
|
|
48
|
+
- **Keep active context active.** Write current/open decisions to `.forge/context.md`. Do not rehydrate old milestone blocks from `.forge/context-archive.md` unless the user is amending that historical decision.
|
|
48
49
|
|
|
49
50
|
**On first decision of the session:**
|
|
50
51
|
- Check if `.forge/context.md` exists. If not → create it from `.forge/templates/context.md`
|
|
51
52
|
- Add a milestone heading inside `## Locked Decisions`: `### M{id} — {name} (drafting)` (use "M?" if no milestone yet)
|
|
53
|
+
- If the needed historical decision is archived, cite the archive in the new active decision instead of copying the whole block back.
|
|
52
54
|
- **Cross-tree liveness check (informational).** If editing an existing block for milestone `{id}`, run `git worktree list --porcelain | awk '/^branch / && $2 ~ /refs\/heads\/forge\/m-'"$id"'(-|$)/ {print}'`. Any hit means m{id} is **live in another worktree** — surface one line: *"m{id} is live in worktree at `{path}`. Edits land cleanly on main but won't be visible to that worktree until it rebases or pulls."* Proceed with the write — main is often the canonical author of `context.md`, this is a heads-up, not a block.
|
|
53
55
|
|
|
54
56
|
**On each confirmed decision:**
|
|
@@ -163,7 +163,12 @@ No `project.yml` + Standard/Full → **Step 2A**. State exists → **Step 2B**.
|
|
|
163
163
|
|
|
164
164
|
## Step 1.5: Lifecycle Operations
|
|
165
165
|
|
|
166
|
-
Before tier detection, check if user request matches lifecycle patterns:
|
|
166
|
+
Before tier detection, check if user request matches stream or lifecycle patterns:
|
|
167
|
+
- "show streams" / "active streams" / "what streams are active" / "stream status" → **Show Streams**
|
|
168
|
+
- "start stream {name}" / "new stream {name}" / "create stream {name}" / "pivot to {work}" → **Start Stream**
|
|
169
|
+
- "pause stream {id}" / "resume stream {id}" / "delegate stream {id}" / "sync streams" → **Manage Streams**
|
|
170
|
+
- "detect conflicts" / "check stream conflicts" / "merge safe" / "close stream {id}" → **Manage Streams**
|
|
171
|
+
- "Chief of Staff" / "Project Chief" / "use streams" / "parallel workstreams" → **Chief**
|
|
167
172
|
- "defer milestone {id}" / "defer {id}" / "pause milestone {id}" → **Defer**
|
|
168
173
|
- "resume milestone {id}" / "undefer {id}" / "reactivate milestone {id}" → **Resume**
|
|
169
174
|
- "delete milestone {id}" / "archive milestone {id}" / "remove milestone {id}" → **Delete** (see below)
|
|
@@ -171,6 +176,22 @@ Before tier detection, check if user request matches lifecycle patterns:
|
|
|
171
176
|
|
|
172
177
|
No match → fall through to Step 2B (tier detection).
|
|
173
178
|
|
|
179
|
+
### Chief / Stream Operations
|
|
180
|
+
|
|
181
|
+
1. Invoke `Skill(chief-of-staff)` directly.
|
|
182
|
+
2. Do not enter tier detection. The Chief is project-level traffic control, not
|
|
183
|
+
a replacement for Forge's Quick, Standard, or Full tiers.
|
|
184
|
+
3. Use Chief only for explicit stream intents, concurrent application work,
|
|
185
|
+
mid-flow pivots, delegated work, conflict detection, merge ordering, or
|
|
186
|
+
closing streams.
|
|
187
|
+
4. Ordinary single-stream feature work still follows normal tier detection.
|
|
188
|
+
Once inside a stream, the stream uses Quick/Standard/Full for execution.
|
|
189
|
+
|
|
190
|
+
Examples:
|
|
191
|
+
- "show streams" → `Skill(chief-of-staff)` summarizes `.forge/streams/active.yml`
|
|
192
|
+
- "start stream settings cleanup" → `Skill(chief-of-staff)` snapshots current stream, creates a new stream, and checks conflicts
|
|
193
|
+
- "merge safe?" → `Skill(chief-of-staff)` lists ready streams that can land without blocking conflicts
|
|
194
|
+
|
|
174
195
|
### Show Deferred
|
|
175
196
|
|
|
176
197
|
1. Invoke `Skill(deferred)` directly.
|
|
@@ -262,13 +283,17 @@ Tier + state → invoke via `Skill` tool. All phases use `Skill()`.
|
|
|
262
283
|
|
|
263
284
|
**CRITICAL: NEVER `EnterPlanMode`.** "Planning" = `Skill(planning)`. Native plan mode writes wrong format, bypasses gates + state.
|
|
264
285
|
|
|
265
|
-
**Experimental — M10 orchestration
|
|
286
|
+
**Experimental — M10 orchestration backend.** Chief/Streams is the preferred
|
|
287
|
+
user-facing orchestration model. M10 remains an optional backend for streams
|
|
288
|
+
that need worktree isolation, merge-queue discipline, or experimental file
|
|
289
|
+
claims. Route through `Skill(orchestrating)` first when **all** hold:
|
|
290
|
+
- **Selected:** Project Chief chooses M10 for a stream, user explicitly asks for multi-agent/worktree mode, or legacy `orchestration.auto` is enabled.
|
|
266
291
|
- **Installed:** `.claude/skills/orchestrating/` present + `forge-orchestrator` in `.mcp.json` + `.claude/hooks/forge-claim-check.sh` present.
|
|
267
|
-
- **Not opted out:** `orchestration.auto` in `project.yml` ≠ `false`
|
|
292
|
+
- **Not opted out:** `orchestration.auto` in `project.yml` ≠ `false` for legacy auto-routing; explicit Project Chief selection can still use M10 when installed.
|
|
268
293
|
- **Tier is Standard or Full.** Quick never auto-orchestrates (a worktree per typo is the wrong trade).
|
|
269
294
|
- **Not already in a session:** active milestone has no `lifecycle.worktree_mode: active|degraded` (don't re-bootstrap inside a live session).
|
|
270
295
|
|
|
271
|
-
`orchestrating` bootstrap stays the safety net — incompatible repo → it refuses, writes `worktree_mode: refused`, and `forge` continues single-agent. Absent install → standard routing. Manual `Skill(orchestrating)` still works for explicit control; set `orchestration.auto: false` in `project.yml` to opt
|
|
296
|
+
`orchestrating` bootstrap stays the safety net — incompatible repo → it refuses, writes `worktree_mode: refused`, and `forge` continues single-agent. Absent install → standard routing. Manual `Skill(orchestrating)` still works for explicit backend control; set `orchestration.auto: false` in `project.yml` to opt out of legacy auto-routing.
|
|
272
297
|
|
|
273
298
|
### Auto-Routing (Always Deterministic)
|
|
274
299
|
|
|
@@ -307,6 +332,7 @@ Where `{source}` = `skills.{name}` | `models.default` | `parent session`. Suppre
|
|
|
307
332
|
| discussing | sonnet | Conversation |
|
|
308
333
|
| testing | sonnet | Code gen (author) + audit judgment (analyst) — matches executing/reviewing. M9: author-mode refuses e2e without `e2e:true` + `validated:true`. |
|
|
309
334
|
| deferred | haiku | Read + format only |
|
|
335
|
+
| chief-of-staff | sonnet | Cross-stream coordination and conflict judgment |
|
|
310
336
|
|
|
311
337
|
| `current.status` | Route To |
|
|
312
338
|
|-------------------|----------|
|
|
@@ -322,6 +348,7 @@ Where `{source}` = `skills.{name}` | `models.default` | `parent session`. Suppre
|
|
|
322
348
|
| `deferred` | Milestone frozen. *"Resume milestone {id}" to reactivate.* |
|
|
323
349
|
| `quick-tasking` | `Skill(quick-tasking)` |
|
|
324
350
|
| (keyword: `deferred` / "show deferred") | `Skill(deferred)` — read-only aggregator |
|
|
351
|
+
| (keyword: `show streams` / `start stream` / `merge safe` / `Chief of Staff`) | `Skill(chief-of-staff)` — project stream coordination |
|
|
325
352
|
|
|
326
353
|
### Status Advancement Check
|
|
327
354
|
|
|
@@ -32,6 +32,11 @@ If you find yourself writing a plan that only touches `src/models/`, `src/db/`,
|
|
|
32
32
|
Read `.forge/context.md` **Needs Resolution**. If unchecked `- [ ]` items:
|
|
33
33
|
*"{N} items need input: [list]. For each: lock, defer, fix, or drop?"*
|
|
34
34
|
|
|
35
|
+
Load `.forge/context.md` as the active decision set. Consult
|
|
36
|
+
`.forge/context-archive.md` only when the current milestone, stream, or
|
|
37
|
+
requirement cites an older milestone decision (for example M9 e2e policy or M14
|
|
38
|
+
backlog lifecycle). Do not load archived decision blocks wholesale.
|
|
39
|
+
|
|
35
40
|
| Choice | Action |
|
|
36
41
|
|--------|--------|
|
|
37
42
|
| Lock | Record in Locked Decisions |
|
|
@@ -61,6 +66,10 @@ If missing, create `.forge/context.md` from template:
|
|
|
61
66
|
|
|
62
67
|
Must complete BEFORE plans. Plans reference context.md.
|
|
63
68
|
|
|
69
|
+
If a plan depends on an archived decision, cite the archive section in the plan
|
|
70
|
+
or active context summary; do not copy the historical block back into
|
|
71
|
+
`.forge/context.md`.
|
|
72
|
+
|
|
64
73
|
## Step 4: Structure Requirements
|
|
65
74
|
|
|
66
75
|
Resolve current milestone ID from `.forge/state/index.yml` (active milestone) or invocation context. Target file: `.forge/requirements/m{N}.yml`.
|
package/template/.forge/FORGE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Forge
|
|
2
2
|
|
|
3
|
-
Lean meta-prompting framework
|
|
3
|
+
Lean meta-prompting framework. Context engineering + constitutional governance on agent-native primitives.
|
|
4
4
|
|
|
5
5
|
## Critical: No Native Plan Mode
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ All phases: **invoke via `Skill` tool**, never native behavior. `planning` → `
|
|
|
11
11
|
## Core Principles
|
|
12
12
|
|
|
13
13
|
1. **Lean default, powerful when needed.** Quick → skip ceremony. Complex → full governance.
|
|
14
|
-
2. **
|
|
14
|
+
2. **Adapter-native.** Use each platform's built-ins through adapters. Avoid custom runtime unless the substrate truly needs it.
|
|
15
15
|
3. **Context is sacred.** Size-gate artifacts, lazy-load skills, fresh agents for isolated work.
|
|
16
16
|
4. **Decisions are contracts.** Lock before building. Honor or flag — never silently override.
|
|
17
17
|
5. **Verify goals, not tasks.** "Does it work?" > "Did we finish checklist?"
|
|
@@ -19,6 +19,24 @@ All phases: **invoke via `Skill` tool**, never native behavior. `planning` → `
|
|
|
19
19
|
7. **Pave desire paths.** Repeated deviations/corrections = signal → evolve framework.
|
|
20
20
|
8. **Disconfirm before commit.** Before locking a diagnosis, a solution, or a foundational choice, run the cheap pass that could break it. A conclusion reached without an attempt to refute it is a hypothesis, not a finding. Enforced at the three commit points: `debugging` (Confirmation Gate), `discussing`/`architecting` (option-space framing), `architecting` (Platform & Goal Validation).
|
|
21
21
|
|
|
22
|
+
## Core Protocol And Adapters
|
|
23
|
+
|
|
24
|
+
**Core protocol** lives in `.forge/`: project/constitution state, milestones, requirements, roadmap, context, streams, work packages, plans, verification, audits, and state ownership rules. The core protocol describes durable behavior, not one platform's tool names.
|
|
25
|
+
|
|
26
|
+
**Platform adapters** translate the protocol into a runtime. Each platform adapter maps core behavior to its tools: Claude Code skills/hooks, Codex/AGENTS behavior, manual multi-session handoffs, or future agent surfaces. Adapter mechanics stay in adapter files and skills; they should not become core requirements.
|
|
27
|
+
|
|
28
|
+
## Project Streams
|
|
29
|
+
|
|
30
|
+
Forge has three runtime coordination layers: Project, Stream, and Work Package.
|
|
31
|
+
|
|
32
|
+
| Layer | Purpose | Default Context |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| **Project** | Repo-wide traffic map: active streams, ownership, risks, merge order | `.forge/streams/active.yml` |
|
|
35
|
+
| **Stream** | One active line of work: goal, branch/worktree, state, blockers, next action | `.forge/streams/{stream}.yml` + `brief.md` |
|
|
36
|
+
| **Work Package** | Delegated bounded task inside a stream | `.forge/streams/{stream}/packages/{id}.yml` |
|
|
37
|
+
|
|
38
|
+
Use ordinary Quick/Standard/Full tiers inside a stream. Use Project Chief / Chief of Staff when coordinating multiple active streams or pivoting without dropping context. Workers never coordinate laterally; they report to the stream or project chief. M10 worktrees remain an optional backend for isolation/merge discipline, not the primary UX.
|
|
39
|
+
|
|
22
40
|
## Workflow Tiers
|
|
23
41
|
|
|
24
42
|
Auto-detects complexity. Override: "Use Quick/Standard/Full tier."
|
|
@@ -60,7 +78,7 @@ Auto-detects complexity. Override: "Use Quick/Standard/Full tier."
|
|
|
60
78
|
| Systematic debugging | `debugging` | When stuck |
|
|
61
79
|
| Upgrade Forge files | `upgrading` | On-demand |
|
|
62
80
|
| Cross-session memory | `beads-integration` | When Beads installed |
|
|
63
|
-
| Multi-agent
|
|
81
|
+
| Multi-agent backend (experimental) | `orchestrating` | Optional, usually selected by Chief/Streams |
|
|
64
82
|
|
|
65
83
|
> Experimental skills require opt-in install — see `packages/create-forge/experimental/m10/README.md`.
|
|
66
84
|
|
|
@@ -73,7 +91,25 @@ Auto-detects complexity. Override: "Use Quick/Standard/Full tier."
|
|
|
73
91
|
| `requirements/m{N}.yml` | 50 KB/file | Prevents scope creep |
|
|
74
92
|
| `plan.md` | 30 KB | Keeps executor context <50% |
|
|
75
93
|
| `constitution.md` | 10 KB | Gates must be scannable |
|
|
94
|
+
| `context.md` | 12 KB | Active decisions only; history archives to `context-archive.md` |
|
|
76
95
|
| `refactor-backlog.yml` | 150 KB | Working backlog stays scannable; terminal items archive to `refactor-backlog-archive.yml` (advisory — flags, never blocks) |
|
|
96
|
+
| `streams/active.yml` | 20 KB | Project Chief traffic map must stay cheap to load |
|
|
97
|
+
| `streams/{stream}.yml` | 15 KB | Stream state stays resumable without becoming history |
|
|
98
|
+
| `streams/{stream}/brief.md` | 8 KB | Stream context packet must fit into active session context |
|
|
99
|
+
| `streams/{stream}/packages/{id}.yml` | 10 KB | Delegated work contract stays bounded |
|
|
100
|
+
|
|
101
|
+
### Accumulating Artifacts
|
|
102
|
+
|
|
103
|
+
Every new accumulating artifact needs: owner, size gate, archive/compaction rule,
|
|
104
|
+
`derived` vs source-of-truth status, and migration behavior. Defaults:
|
|
105
|
+
|
|
106
|
+
- `roadmap.yml`, `requirements/*.yml`, `releases.yml` are source-of-truth; load
|
|
107
|
+
scoped slices, not whole history.
|
|
108
|
+
- `phases/`, `audits/`, `research/`, `archive/`, and `context-archive.md` are
|
|
109
|
+
historical; load only by milestone/stream/package/version.
|
|
110
|
+
- Runtime/generated files (`.mcp-server/*.db*`, logs, spike DBs) are excluded
|
|
111
|
+
from framework context and packages unless debugging them.
|
|
112
|
+
- Template copies sync mechanically; do not treat them as separate concepts.
|
|
77
113
|
|
|
78
114
|
### Fresh Agent Pattern
|
|
79
115
|
Task touches 20+ files or complex subsystem → spawn fresh executor with isolated context. Prevents context rot.
|
|
@@ -82,7 +118,9 @@ Task touches 20+ files or complex subsystem → spawn fresh executor with isolat
|
|
|
82
118
|
Each phase writes outputs to `.forge/` before completing. At phase boundaries, recommend `/clear`. Next phase loads from disk. Advisory — skip for short phases under 40% context.
|
|
83
119
|
|
|
84
120
|
### Lazy Loading
|
|
85
|
-
Skills load only when invoked.
|
|
121
|
+
Skills load only when invoked. Active context is `.forge/context.md`; consult
|
|
122
|
+
`.forge/context-archive.md` only when older decisions matter. Skill details stay
|
|
123
|
+
on demand. Base context ~300 lines.
|
|
86
124
|
|
|
87
125
|
## Model Routing
|
|
88
126
|
|
|
@@ -136,7 +174,12 @@ State lives in `.forge/`:
|
|
|
136
174
|
- `state/index.yml` — DERIVED registry rolled up from milestone files (id, name, status, last_updated). Never hand-edited; never written by worktree agents.
|
|
137
175
|
- `state/milestone-{id}.yml` — Per-milestone cursor (single source of truth): position, progress, decisions, blockers. One owner at a time.
|
|
138
176
|
- `state/desire-paths/` — Append-only framework-usage observations, one file per observation. Occurrence counts derived by globbing (no mutable counter). Each carries `scope: project | framework` (set at capture; absent ⇒ project). **`forge` boot is the single review owner**: at 3+ occurrences it surfaces a concrete fix from the co-located suggestion table, persists declines to `declined/` (no re-nag), and for `scope: framework` signals routes them upstream — a portable block to `upstream/` plus a `gh issue` offer against `forge.upstream_repo`. This closes Principle 7's capture→act loop; `verifying` captures but no longer surfaces. See [ADR-012](../docs/decisions/ADR-012-upstream-desire-path-feedback-channel.md).
|
|
139
|
-
- `context.md` —
|
|
177
|
+
- `context.md` — Active locked decisions + deferred ideas (target <=12KB)
|
|
178
|
+
- `context-archive.md` — Historical locked decisions; load only when relevant
|
|
179
|
+
- `streams/active.yml` — Compact Project Chief traffic map: active stream summaries only.
|
|
180
|
+
- `streams/{stream}.yml` — Per-stream state: lifecycle, ownership, shared surfaces, blockers, merge readiness.
|
|
181
|
+
- `streams/{stream}/brief.md` — Human-readable stream context packet loaded when resuming that stream.
|
|
182
|
+
- `streams/{stream}/packages/{id}.yml` — Work package contract for delegated workers or manual sessions.
|
|
140
183
|
- `research/milestone-{id}.md` — Research findings snapshot (dated, immutable)
|
|
141
184
|
- `phases/milestone-{id}/{phase}-{name}/plan-{NN}.md` — Task plans with must_haves frontmatter (`{id}`=milestone, `{phase}`=phase# preserved verbatim, `{name}`=kebab, `{NN}`=seq)
|
|
142
185
|
- `refactor-backlog.yml` — Refactoring catalog (actionable items only), worked via quick-tasking. Canonical status vocab: `pending | in_progress | done | dismissed | deferred`. Terminal items auto-archive on the next reviewing/quick-tasking write (compaction-on-write).
|
|
@@ -162,31 +205,22 @@ State-sync commits are separate from per-task code commits (which stay atomic du
|
|
|
162
205
|
|
|
163
206
|
### State Ownership (multi-worktree safety)
|
|
164
207
|
|
|
165
|
-
`.forge/` is
|
|
166
|
-
|
|
167
|
-
**Every `.forge/` artifact falls into one of five sharing classes.** The class determines the write rule across worktrees:
|
|
208
|
+
`.forge/` is code-like: it branches with the repo, syncs via git, and commits
|
|
209
|
+
with the work it describes. Every artifact has a sharing class:
|
|
168
210
|
|
|
169
211
|
| Class | Files | Write rule |
|
|
170
212
|
|---|---|---|
|
|
171
213
|
| **Single-owner mutable** | `state/milestone-{id}.yml`, `phases/milestone-{id}/`, `research/milestone-{id}.md` | Exactly one writer at a time — the worktree (or main session) currently driving that milestone. **Other worktrees never touch it**, not even to read-then-write — they pull from main if they need it. |
|
|
172
214
|
| **Derived** | `state/index.yml` | Never hand-edited. Regenerated by Rollup 1.0 from `milestone-*.yml`. Only the main/orchestrator session runs rollup. |
|
|
173
215
|
| **Append-only shared** | `releases.yml` (version reservations), `state/desire-paths/*` (one file per observation) | Many writers OK; structure prevents collision. `releases.yml` uses the Version Reservation Protocol (append + commit + push before depending on the slot); desire-paths use distinct filenames so two writers never touch the same file. |
|
|
174
|
-
| **Shared mutable** | `context.md`, `refactor-backlog.yml`, `requirements/m{N}.yml` (ID space `FR-`/`DEF-`/`NFR-` is globally shared even though each milestone owns its file) |
|
|
216
|
+
| **Shared mutable** | `context.md`, `refactor-backlog.yml`, `requirements/m{N}.yml` (ID space `FR-`/`DEF-`/`NFR-` is globally shared even though each milestone owns its file) | Write only to your milestone/stream block. Within a block, append-only; strike through instead of rewriting. |
|
|
175
217
|
| **Stable shared** | `project.yml`, `constitution.md`, `design-system.md`, `roadmap.yml`, `FORGE.md` | Rarely changes after init. Canonical on main. Worktrees lag and pull on rebase. No special protocol — git handles it because the conflict surface is tiny. |
|
|
176
218
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
-
|
|
182
|
-
|
|
183
|
-
**Why not global `.forge/`?** A common instinct is "make `.forge/` shared so context propagates automatically." It breaks four load-bearing invariants:
|
|
184
|
-
1. **Decisions are contracts** — they're versioned with the code they govern; severing them from branches breaks the contract.
|
|
185
|
-
2. **State survives machine loss** — the multi-laptop pull-from-any-clone story depends on `.forge/` being in git.
|
|
186
|
-
3. **History time-travel** — `git checkout` an old commit and you see the plan/decisions as they were; global state makes that impossible.
|
|
187
|
-
4. **Git is the concurrency detector** — without it, two sessions writing the same field becomes silent last-write-wins.
|
|
188
|
-
|
|
189
|
-
Per-worktree `.forge/` with a sharing taxonomy is the model. See [ADR-011](../docs/decisions/ADR-011-shared-state-taxonomy.md) for the longer version.
|
|
219
|
+
Cross-tree edits land on the current branch and are invisible to other worktrees
|
|
220
|
+
until they pull/rebase. `forge` surfaces live worktrees at boot; `discussing`
|
|
221
|
+
and `reviewing` warn before touching shared-mutable blocks; optional
|
|
222
|
+
`forge.worktree_rebase_check` detects stale shared files inside worktrees. See
|
|
223
|
+
[ADR-011](../docs/decisions/ADR-011-shared-state-taxonomy.md) for rationale.
|
|
190
224
|
|
|
191
225
|
### State Ownership rules (quick reference)
|
|
192
226
|
|
|
@@ -194,7 +228,7 @@ Per-worktree `.forge/` with a sharing taxonomy is the model. See [ADR-011](../do
|
|
|
194
228
|
- Worktree / parallel agents write **only** their own milestone file and **append** desire-path files. They **never** write `index.yml`.
|
|
195
229
|
- `index.yml` is **regenerated by rollup** (read every `milestone-*.yml` → rewrite the registry) by the main/orchestrator session — on `forge` resume and at `orchestrating` teardown. The rollup is deterministic + idempotent, so it **is** the reconcile step — never a hand-merge.
|
|
196
230
|
- For shared-mutable files: write only your milestone's block; within a block, append-only (strike through, don't rewrite).
|
|
197
|
-
- Same-milestone parallel work
|
|
231
|
+
- Same-milestone parallel work needs Chief/Streams contracts; M10 file claims are optional defense-in-depth.
|
|
198
232
|
|
|
199
233
|
### Version Reservation Protocol
|
|
200
234
|
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Migration Guide: Chief/Streams (Forge 0.32.0)
|
|
2
|
+
|
|
3
|
+
Adds Project Chief / Streams support to existing Forge projects. This migration
|
|
4
|
+
installs framework-owned stream templates and adapter routing, and offers active
|
|
5
|
+
context compaction. It must never overwrite user-owned runtime stream state in
|
|
6
|
+
`.forge/streams/`.
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
1. Upgrade framework files first so this guide and the new templates are present.
|
|
11
|
+
2. Commit or stash unrelated work.
|
|
12
|
+
3. If `.forge/streams/` already exists, treat it as user state and preserve it.
|
|
13
|
+
|
|
14
|
+
## Detection
|
|
15
|
+
|
|
16
|
+
Prints `MIGRATE` when stream templates, Chief routing, active-context
|
|
17
|
+
compaction support, or active M10 adoption appears missing. Silent + exit 0
|
|
18
|
+
means no migration needed.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
need=0
|
|
22
|
+
|
|
23
|
+
for f in \
|
|
24
|
+
.forge/templates/streams/active.yml \
|
|
25
|
+
.forge/templates/streams/stream.yml \
|
|
26
|
+
.forge/templates/streams/brief.md \
|
|
27
|
+
.forge/templates/streams/work-package.yml
|
|
28
|
+
do
|
|
29
|
+
[ -f "$f" ] || need=1
|
|
30
|
+
done
|
|
31
|
+
|
|
32
|
+
if [ -f .claude/skills/forge/SKILL.md ] && ! grep -q 'chief-of-staff' .claude/skills/forge/SKILL.md; then
|
|
33
|
+
need=1
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
if [ -f .claude/skills/chief-of-staff/SKILL.md ]; then
|
|
37
|
+
:
|
|
38
|
+
else
|
|
39
|
+
need=1
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
if [ -f .forge/context.md ] && [ ! -f .forge/context-archive.md ]; then
|
|
43
|
+
bytes=$(wc -c < .forge/context.md | tr -d ' ')
|
|
44
|
+
[ "$bytes" -gt 12288 ] && need=1
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
if [ ! -f .forge/streams/active.yml ] && grep -R "worktree_mode: \\(active\\|degraded\\)" .forge/state/milestone-*.yml >/dev/null 2>&1; then
|
|
48
|
+
need=1
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
if [ "$need" -eq 1 ]; then
|
|
52
|
+
echo "MIGRATE - Chief/Streams templates, routing, context compaction, or M10 adoption missing"
|
|
53
|
+
fi
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Migration Steps
|
|
57
|
+
|
|
58
|
+
### 1. Add Stream Templates
|
|
59
|
+
|
|
60
|
+
Copy the framework-owned templates from the upgraded Forge source into:
|
|
61
|
+
|
|
62
|
+
- `.forge/templates/streams/active.yml`
|
|
63
|
+
- `.forge/templates/streams/stream.yml`
|
|
64
|
+
- `.forge/templates/streams/brief.md`
|
|
65
|
+
- `.forge/templates/streams/work-package.yml`
|
|
66
|
+
|
|
67
|
+
Create parent directories if needed. Do not copy anything into `.forge/streams/`
|
|
68
|
+
unless the user explicitly asks to instantiate a real stream.
|
|
69
|
+
|
|
70
|
+
### 2. Add Chief Skill And Routing
|
|
71
|
+
|
|
72
|
+
Copy the Chief skill into the platform adapter used by the project:
|
|
73
|
+
|
|
74
|
+
- Claude adapter: `.claude/skills/chief-of-staff/SKILL.md`
|
|
75
|
+
- Codex/AGENTS adapter, if present in that project: `.agents/skills/chief-of-staff/SKILL.md`
|
|
76
|
+
|
|
77
|
+
Update the Forge entry skill for the active adapter so stream intents route to
|
|
78
|
+
Chief before tier detection. Required intent examples:
|
|
79
|
+
|
|
80
|
+
- `show streams`
|
|
81
|
+
- `start stream`
|
|
82
|
+
- `pause stream`
|
|
83
|
+
- `resume stream`
|
|
84
|
+
- `delegate stream`
|
|
85
|
+
- `sync streams`
|
|
86
|
+
- `detect conflicts`
|
|
87
|
+
- `merge safe`
|
|
88
|
+
- `close stream`
|
|
89
|
+
- `Chief of Staff`
|
|
90
|
+
|
|
91
|
+
### 3. Preserve Runtime State
|
|
92
|
+
|
|
93
|
+
If `.forge/streams/` already exists, inspect it but never overwrite it. Runtime
|
|
94
|
+
stream files are user/project state, not framework templates. If a runtime file
|
|
95
|
+
is missing a field, add it only after showing the diff to the user.
|
|
96
|
+
|
|
97
|
+
### 4. Adopt Existing M10 Worktrees When Present
|
|
98
|
+
|
|
99
|
+
If `.forge/state/milestone-*.yml` contains `lifecycle.worktree_mode: active` or
|
|
100
|
+
`degraded`, adopt those M10 sessions as streams. Do not teardown, merge, rebase,
|
|
101
|
+
remove, or rename existing worktrees as part of migration.
|
|
102
|
+
|
|
103
|
+
For each active M10 worktree:
|
|
104
|
+
|
|
105
|
+
1. Read the milestone state and `git worktree list --porcelain`.
|
|
106
|
+
2. Create or update `.forge/streams/active.yml`.
|
|
107
|
+
3. Create or update:
|
|
108
|
+
- `.forge/streams/{stream-id}.yml`
|
|
109
|
+
- `.forge/streams/{stream-id}/brief.md`
|
|
110
|
+
- `.forge/streams/{stream-id}/packages/`
|
|
111
|
+
4. Map existing M10 fields into stream state:
|
|
112
|
+
- `lifecycle.worktree_path` -> `runtime.worktree`
|
|
113
|
+
- `lifecycle.worktree_branch` -> `runtime.branch`
|
|
114
|
+
- `lifecycle.session_id` / `claim_session_id` -> `runtime.worker_sessions`
|
|
115
|
+
- milestone id/name/status/phase -> stream goal, context, and brief
|
|
116
|
+
5. Leave ownership surfaces empty if unknown and mark them as needing
|
|
117
|
+
declaration. Missing ownership should surface as a conflict to resolve after
|
|
118
|
+
adoption; it should not block adoption.
|
|
119
|
+
6. Ask before setting `orchestration.auto: false` in `.forge/project.yml`.
|
|
120
|
+
Turning it off makes Chief/Streams the front door while keeping M10 available
|
|
121
|
+
as an optional backend.
|
|
122
|
+
|
|
123
|
+
Adoption is idempotent: if a stream already references the same worktree path or
|
|
124
|
+
branch, update that stream's summary/brief instead of creating a duplicate.
|
|
125
|
+
|
|
126
|
+
### 5. Compact Active Context When Needed
|
|
127
|
+
|
|
128
|
+
If `.forge/context.md` is over 12 KB and `.forge/context-archive.md` is missing:
|
|
129
|
+
|
|
130
|
+
1. Copy the original `.forge/context.md` to `.forge/context-archive.md`.
|
|
131
|
+
2. Keep current/open decisions, Deferred Ideas, Needs Resolution, and Amendment
|
|
132
|
+
Log in `.forge/context.md`.
|
|
133
|
+
3. Move completed historical milestone decision blocks into the archive.
|
|
134
|
+
4. Add a pointer in active context to `.forge/context-archive.md`.
|
|
135
|
+
|
|
136
|
+
This step must preserve decision text losslessly.
|
|
137
|
+
|
|
138
|
+
### 6. Confirm M10 Positioning
|
|
139
|
+
|
|
140
|
+
If the project has M10 installed, keep worktree and merge safety instructions.
|
|
141
|
+
Update wording so Chief/Streams is the user-facing orchestration model and M10
|
|
142
|
+
is an optional backend for worktree isolation, merge queue support, and optional
|
|
143
|
+
file claims.
|
|
144
|
+
|
|
145
|
+
## Validation
|
|
146
|
+
|
|
147
|
+
- Stream templates exist under `.forge/templates/streams/`.
|
|
148
|
+
- Chief skill exists in the active platform adapter.
|
|
149
|
+
- Forge routing mentions `chief-of-staff`, `show streams`, `start stream`, and
|
|
150
|
+
`merge safe`.
|
|
151
|
+
- `.forge/streams/` runtime state is unchanged unless the user approved a
|
|
152
|
+
specific migration of a runtime stream file.
|
|
153
|
+
- Existing active/degraded M10 worktrees, if any, are represented in
|
|
154
|
+
`.forge/streams/active.yml` and per-stream files without teardown.
|
|
155
|
+
- If context compaction ran, `.forge/context-archive.md` contains historical
|
|
156
|
+
decisions and `.forge/context.md` is under 12 KB.
|
|
157
|
+
- Running detection a second time is idempotent and prints no `MIGRATE` once the
|
|
158
|
+
project has templates, routing, Chief skill, compacted context, and adopted
|
|
159
|
+
active M10 worktrees.
|
|
@@ -1,29 +1,99 @@
|
|
|
1
1
|
# Forge Release Registry — version reservations across concurrent milestones
|
|
2
2
|
#
|
|
3
3
|
# PURPOSE: remove the version number + CHANGELOG slot from per-milestone scope so
|
|
4
|
-
# two milestones running in parallel sessions never collide on
|
|
4
|
+
# two milestones running in parallel sessions never collide on `package.json`
|
|
5
5
|
# version or pick the same number. This is the coordination point both sessions
|
|
6
6
|
# read and append to.
|
|
7
7
|
#
|
|
8
8
|
# COMMITTED + APPEND-ONLY. Each milestone appends exactly ONE entry when it
|
|
9
9
|
# reserves its version (at planning, or at delivery if planning predates this
|
|
10
10
|
# file). Appending — never editing prior entries — is what keeps two sessions
|
|
11
|
-
# from conflicting: distinct lines, no contention.
|
|
12
|
-
#
|
|
11
|
+
# from conflicting: distinct lines, no contention. The registry is committed and
|
|
12
|
+
# pushed so a parallel session pulls and sees reservations already taken.
|
|
13
13
|
#
|
|
14
14
|
# RULE: the next free version = highest `version:` in this file, bumped by the
|
|
15
|
-
# change's semver level (capability = minor; fix/doc = patch
|
|
16
|
-
#
|
|
15
|
+
# change's semver level (capability = minor 0.x.0; fix/doc = patch 0.x.y; see the
|
|
16
|
+
# version-bump criteria in FORGE.md / project memory). Delivery NEVER writes a
|
|
17
|
+
# `package.json` version that is not reserved here first.
|
|
17
18
|
#
|
|
18
19
|
# RACE NOTE: reserve EARLY (at planning), commit + push the reservation BEFORE
|
|
19
|
-
# editing
|
|
20
|
-
# push rebases onto the first (append-only → no conflict) and re-
|
|
21
|
-
# take the next number.
|
|
20
|
+
# editing package.json. If two sessions reserve near-simultaneously, the second
|
|
21
|
+
# push rebases onto the first (append-only → no conflict) and must re-read max()
|
|
22
|
+
# and take the next number.
|
|
22
23
|
|
|
23
|
-
releases:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
releases:
|
|
25
|
+
- milestone: 12
|
|
26
|
+
version: "0.21.0"
|
|
27
|
+
bump: minor
|
|
28
|
+
reserved_at: "2026-06-12"
|
|
29
|
+
summary: "CLAUDE.md @import extraction (framework prose → .forge/FORGE.md)"
|
|
30
|
+
- milestone: 13
|
|
31
|
+
version: "0.20.0"
|
|
32
|
+
bump: minor
|
|
33
|
+
reserved_at: "2026-06-12"
|
|
34
|
+
summary: "Nested phase layout (phases/milestone-{id}/{phase}-{name}/)"
|
|
35
|
+
- milestone: 14
|
|
36
|
+
version: "0.22.0"
|
|
37
|
+
bump: minor
|
|
38
|
+
reserved_at: "2026-06-13"
|
|
39
|
+
summary: "Refactor-backlog compaction migration + lifecycle (archive terminal items, size gate, status-vocab enforcement)"
|
|
40
|
+
- milestone: 10
|
|
41
|
+
version: "0.23.0"
|
|
42
|
+
bump: minor
|
|
43
|
+
reserved_at: "2026-06-14"
|
|
44
|
+
summary: "M10 auto-routing — forge routes Standard/Full through orchestrating when installed (install = consent); orchestration.auto opt-out"
|
|
45
|
+
- milestone: 15
|
|
46
|
+
version: "0.24.0"
|
|
47
|
+
bump: minor
|
|
48
|
+
reserved_at: "2026-06-14"
|
|
49
|
+
summary: "Disconfirm-before-commit rigor: debugging Confirmation Gate (blind-spot check), architecting Platform & Goal Validation + option-space framing, discussing widen-before-narrowing, CLAUDE.md principle 8"
|
|
50
|
+
- milestone: 16
|
|
51
|
+
version: "0.25.0"
|
|
52
|
+
bump: minor
|
|
53
|
+
reserved_at: "2026-06-14"
|
|
54
|
+
summary: "Worktree branch anchor in forge milestone selection — git branch deterministically selects the milestone (exact lifecycle.worktree_branch match, or milestone-id token in branch name) before the timestamp default; deferred/complete matches surface instead of auto-resuming"
|
|
55
|
+
- milestone: 16
|
|
56
|
+
version: "0.26.0"
|
|
57
|
+
bump: minor
|
|
58
|
+
reserved_at: "2026-06-14"
|
|
59
|
+
summary: "Milestone-anchored worktree naming in orchestrating — worktree dir + branch become forge/m-{id}-{session_id} (was forge/{uuid}), adds lifecycle.worktree_anchor. Makes the 0.25.0 branch-anchor id-token fallback work for orch worktrees so a moved/stale-state worktree still resolves to its milestone off the branch name alone; uuid suffix keeps collision-resistance, forge/ prefix keeps GC sweep"
|
|
60
|
+
- milestone: 17
|
|
61
|
+
version: "0.27.0"
|
|
62
|
+
bump: minor
|
|
63
|
+
reserved_at: "2026-06-15"
|
|
64
|
+
summary: "Human Verification Gate — hard block on milestone close + orchestration teardown until an explicit human sign-off is recorded as current.human_verified in milestone state. Code-level PASS is necessary but never sufficient to close. Captured by verifying (post-verdict prompt), enforced at reviewing-complete + orchestrating Step 5.0; recorded-override (method: override) is the only bypass and is surfaced. New current.human_verified state field — lazy migration: absent = prompt on next close, already-complete milestones never re-gated."
|
|
65
|
+
- milestone: 18
|
|
66
|
+
version: "0.28.0"
|
|
67
|
+
bump: minor
|
|
68
|
+
reserved_at: "2026-06-15"
|
|
69
|
+
summary: "Configurable repo-scoped worktree root — orchestration.worktree_root defaults to ../<repo-name>-worktrees/ (was shared ../forge-worktrees/). Fixes cross-repo worktree mixing when multiple repos share a parent dir, fixes cwd-sensitive resolution (relative roots now resolve against repo root, not shell cwd), and folds a gitignore-guard for repos with fully-ignored .claude/ trees (initializing writes correct carve-out for greenfield; upgrading detects + warns for brownfield)"
|
|
70
|
+
- milestone: 19
|
|
71
|
+
version: "0.29.0"
|
|
72
|
+
bump: minor
|
|
73
|
+
reserved_at: "2026-06-15"
|
|
74
|
+
summary: "Shared-state taxonomy for multi-worktree Forge — FORGE.md State Ownership expanded to enumerate all 5 file-sharing classes (single-owner mutable, derived, append-only shared, shared mutable, stable shared) with the rule each follows. Promotes 'do not touch another worktree's state files' to explicit rule. Adds structural rule for context.md + refactor-backlog.yml (write only to your milestone block, within-block append-only). New `forge` boot worktree-liveness view (lists live Forge worktrees + their owning milestones in main). Cross-tree write warnings in discussing (context.md) + reviewing (refactor-backlog.yml). Opt-in worktree-side rebase check at boot (gated by forge.worktree_rebase_check). Triggered by the canvaz 2026-06-15 case: main-session edits to m9's context block were invisible to the m9 worktree."
|
|
75
|
+
- milestone: 20
|
|
76
|
+
version: "0.30.0"
|
|
77
|
+
bump: minor
|
|
78
|
+
reserved_at: "2026-06-16"
|
|
79
|
+
summary: "Upstream desire-path feedback channel (ADR-012) — closes the capture→act loop in Principle 7. (1) Plan-anchor re-derivation guard already landed (commit 5ddf3a1): executing re-derives plan literals against HEAD before the first task; planning makes anchors drift-resistant. (2) `scope: project|framework` field added to the desire-path schema, set at capture by verifying/executing/planning (lazy migration: absent⇒project). (3) Single review owner = forge boot — retires verifying's duplicate 'Surface Recommendations', co-locates the type→evolution suggestion table, adds a decline-ledger (declined/) so declines stop re-nagging, adds a Quick-tier review trigger in quick-tasking. (4) Tiered upstream transport for scope:framework signals: always write a portable block to state/desire-paths/upstream/; offer `gh issue create` against forge.upstream_repo (default github.com/zayneupton/forge) when gh present; upgrading harvests upstream/ into {source}/docs/desire-paths-inbox/. Optional forge.upstream_repo added to project.yml. Triggered by the canvaz plan-anchor-drift signal that could only reach the framework via manual chat copy-paste."
|
|
80
|
+
- milestone: 15
|
|
81
|
+
version: "0.31.0"
|
|
82
|
+
bump: minor
|
|
83
|
+
reserved_at: "2026-06-17"
|
|
84
|
+
summary: "Data-driven migration detection — replaces hardcoded per-version detection blocks (SKILL Step 7 + bin detectLegacyLayouts) with a single loop over synced .forge/migrations/{v}-*.md guides, ranged (installed, source]. New uniform Detection-block contract: echo `MIGRATE` on stdout when the migration applies, silent/exit-0 for no-op. All 7 guides normalized to it (0.28.0 consolidated to one `## Detection`; 0.29.0 stays an explicit in-range no-op). Removes the staleness class entirely — a new guide is auto-covered the moment it ships in the template, zero per-version code, and the install-run blind spot is fixed (detection keys off freshly-synced guides + pre-bump installed version). Triggered by ptnrkit 0.19.2→0.30.0 upgrade where bin was 4 versions behind and 2 real on-disk migrations (0.20.0, 0.22.0) reported 'needs manual review: 0'."
|
|
85
|
+
- milestone: 16
|
|
86
|
+
version: "0.32.0"
|
|
87
|
+
bump: minor
|
|
88
|
+
reserved_at: "2026-06-18"
|
|
89
|
+
summary: "Project Chief / Streams orchestration — adds Project/Stream/Work Package runtime layers, Chief of Staff routing, stream/work-package templates, active context compaction, framework-wide size audit, and an idempotent migration guide. M10 is repositioned as an optional backend for worktree isolation, merge queue support, and experimental file claims."
|
|
90
|
+
|
|
91
|
+
# Note on the 15 / 0.24.0 ordering: reserved as max(0.23.0)+minor. origin/main was
|
|
92
|
+
# already at 0.23.0 when this shipped (M10/M12/M13/M14 all merged), so 0.24.0 is a
|
|
93
|
+
# clean increment — no publish-order coordination needed. (Earlier draft of this
|
|
94
|
+
# release was built on a stale 0.19.2 base before a fetch corrected it.)
|
|
95
|
+
|
|
96
|
+
# Note on the 12/13 ordering: both reserved 2026-06-12. M13 holds the lower number
|
|
97
|
+
# (0.20.0) and M12 the higher (0.21.0) by explicit user decision — they ship in the
|
|
98
|
+
# same package release, M12 topping the version. max() here is 0.21.0, so the next
|
|
99
|
+
# milestone reserves 0.22.0 (minor) regardless of which milestone id is higher.
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Created during the discuss phase. This document is a contract between the user and all downstream agents.
|
|
4
4
|
|
|
5
|
+
Active context target: <= 12 KB. When completed historical milestone decision
|
|
6
|
+
blocks accumulate, copy them to `.forge/context-archive.md` and keep only
|
|
7
|
+
current/open decisions here.
|
|
8
|
+
|
|
5
9
|
**Rules:**
|
|
6
10
|
- **Locked Decisions** → MUST be implemented exactly as stated. No alternatives. No "better" solutions.
|
|
7
11
|
- **Deferred Ideas** → MUST NOT appear in plans, tasks, or code. Not even as TODOs.
|
|
@@ -106,5 +106,6 @@ must be confirmed with the user.>
|
|
|
106
106
|
- [ ] Exactly one `## Detection` heading; exactly one ` ```bash ` block under it.
|
|
107
107
|
- [ ] Block emits `MIGRATE` on stdout iff the migration applies; silent + exit 0 otherwise.
|
|
108
108
|
- [ ] Block is safe on a clean/empty project (no errors, exit 0).
|
|
109
|
+
- [ ] Any new accumulating artifact declares owner, size gate, archive/compaction rule, derived vs source-of-truth status, and future migration behavior.
|
|
109
110
|
- [ ] Mirrored byte-identical to `docs/migrations/{same-name}.md`.
|
|
110
111
|
- [ ] No edit to `upgrading/SKILL.md` or `create-forge.js` was needed (the loop covers it).
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Forge Streams — Active Project Map
|
|
2
|
+
# Size gate: keep this file <= 20 KB. It is the Project Chief's default context.
|
|
3
|
+
# Store summaries only. Deep stream history belongs in streams/{stream}/.
|
|
4
|
+
|
|
5
|
+
version: 1
|
|
6
|
+
updated_at: null
|
|
7
|
+
|
|
8
|
+
project_chief:
|
|
9
|
+
current_stream: null
|
|
10
|
+
merge_policy: "chief-owned"
|
|
11
|
+
notes: ""
|
|
12
|
+
|
|
13
|
+
streams:
|
|
14
|
+
# - id: "billing-retries"
|
|
15
|
+
# status: active # draft | active | paused | delegated | blocked | ready | merged | closed
|
|
16
|
+
# goal: "Fix checkout retry handling"
|
|
17
|
+
# branch: "forge/stream-billing-retries"
|
|
18
|
+
# worktree: "../app-worktrees/billing-retries"
|
|
19
|
+
# owner: "" # session/thread/user label
|
|
20
|
+
# owned_surfaces:
|
|
21
|
+
# - "src/billing/**"
|
|
22
|
+
# shared_surfaces:
|
|
23
|
+
# - "src/lib/events.ts"
|
|
24
|
+
# risk: medium # low | medium | high | unknown
|
|
25
|
+
# blocked_by: []
|
|
26
|
+
# next_action: "Review event contract before editing shared surface"
|
|
27
|
+
# last_sync: null
|
|
28
|
+
[]
|
|
29
|
+
|
|
30
|
+
merge_queue:
|
|
31
|
+
# - stream: "billing-retries"
|
|
32
|
+
# status: waiting # waiting | merging | blocked | merged
|
|
33
|
+
# reason: "shared event contract pending"
|
|
34
|
+
[]
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Stream Brief: {stream}
|
|
2
|
+
|
|
3
|
+
Size gate: keep this brief <= 8 KB. It is the first file loaded when resuming a stream.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
{One sentence describing the line of work.}
|
|
8
|
+
|
|
9
|
+
## Current State
|
|
10
|
+
|
|
11
|
+
Status: draft | active | paused | delegated | blocked | ready | merged | closed
|
|
12
|
+
|
|
13
|
+
{What is true right now? Include whether code has changed, whether workers are active, and whether merge is safe.}
|
|
14
|
+
|
|
15
|
+
## Ownership
|
|
16
|
+
|
|
17
|
+
Owned surfaces:
|
|
18
|
+
- {paths/modules this stream may edit}
|
|
19
|
+
|
|
20
|
+
Shared surfaces:
|
|
21
|
+
- {paths/modules requiring contract or Project Chief approval}
|
|
22
|
+
|
|
23
|
+
Read-only surfaces:
|
|
24
|
+
- {paths/modules this stream may inspect but not edit}
|
|
25
|
+
|
|
26
|
+
Forbidden surfaces:
|
|
27
|
+
- {paths/modules this stream must not touch}
|
|
28
|
+
|
|
29
|
+
## Decisions
|
|
30
|
+
|
|
31
|
+
- {Locked decisions that apply to this stream}
|
|
32
|
+
|
|
33
|
+
## Findings
|
|
34
|
+
|
|
35
|
+
- {Recent findings needed to resume without chat history}
|
|
36
|
+
|
|
37
|
+
## Work Packages
|
|
38
|
+
|
|
39
|
+
- {WP-id}: {status} — {short goal}
|
|
40
|
+
|
|
41
|
+
## Blockers
|
|
42
|
+
|
|
43
|
+
- {blocker or "none"}
|
|
44
|
+
|
|
45
|
+
## Next Action
|
|
46
|
+
|
|
47
|
+
{The next concrete action for the stream chief or worker.}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Forge Stream State
|
|
2
|
+
# Copy to .forge/streams/{stream}.yml.
|
|
3
|
+
# Size gate: keep per-stream state <= 15 KB. Put narrative in brief.md or findings.md.
|
|
4
|
+
|
|
5
|
+
version: 1
|
|
6
|
+
|
|
7
|
+
stream:
|
|
8
|
+
id: ""
|
|
9
|
+
goal: ""
|
|
10
|
+
status: draft # draft | active | paused | delegated | blocked | ready | merged | closed
|
|
11
|
+
tier: null # quick | standard | full | null until known
|
|
12
|
+
created_at: null
|
|
13
|
+
updated_at: null
|
|
14
|
+
owner: ""
|
|
15
|
+
|
|
16
|
+
runtime:
|
|
17
|
+
branch: ""
|
|
18
|
+
worktree: ""
|
|
19
|
+
chief_session: ""
|
|
20
|
+
worker_sessions: []
|
|
21
|
+
|
|
22
|
+
ownership:
|
|
23
|
+
owned_surfaces: []
|
|
24
|
+
shared_surfaces: []
|
|
25
|
+
read_only_surfaces: []
|
|
26
|
+
forbidden_surfaces: []
|
|
27
|
+
reservations:
|
|
28
|
+
# - surface: "src/lib/events.ts"
|
|
29
|
+
# reason: "Event contract update"
|
|
30
|
+
# status: proposed # proposed | approved | blocked | released
|
|
31
|
+
[]
|
|
32
|
+
|
|
33
|
+
dependencies:
|
|
34
|
+
blocked_by_streams: []
|
|
35
|
+
blocks_streams: []
|
|
36
|
+
contracts: []
|
|
37
|
+
|
|
38
|
+
context:
|
|
39
|
+
brief: ".forge/streams/{stream}/brief.md"
|
|
40
|
+
findings: ".forge/streams/{stream}/findings.md"
|
|
41
|
+
packages_dir: ".forge/streams/{stream}/packages"
|
|
42
|
+
|
|
43
|
+
blockers:
|
|
44
|
+
# - type: decision | conflict | external | human-action
|
|
45
|
+
# summary: ""
|
|
46
|
+
# since: null
|
|
47
|
+
# resolution: ""
|
|
48
|
+
[]
|
|
49
|
+
|
|
50
|
+
merge:
|
|
51
|
+
readiness: not_ready # not_ready | ready | blocked | merged
|
|
52
|
+
risk: unknown # low | medium | high | unknown
|
|
53
|
+
required_checks: []
|
|
54
|
+
notes: ""
|
|
55
|
+
|
|
56
|
+
next_action: ""
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Forge Work Package Template
|
|
2
|
+
# Bounded delegated work for a single stream.
|
|
3
|
+
# Copy to: .forge/streams/{stream}/packages/{id}.yml
|
|
4
|
+
|
|
5
|
+
package:
|
|
6
|
+
id: "{package-id}"
|
|
7
|
+
stream: "{stream-id}"
|
|
8
|
+
title: ""
|
|
9
|
+
status: draft # draft | assigned | active | blocked | ready | returned | closed
|
|
10
|
+
created_at: "{ISO-8601}"
|
|
11
|
+
updated_at: "{ISO-8601}"
|
|
12
|
+
owner: "" # worker session, person, or agent label
|
|
13
|
+
reports_to: "chief-of-staff" # Project Chief or stream chief
|
|
14
|
+
|
|
15
|
+
goal:
|
|
16
|
+
summary: ""
|
|
17
|
+
observable_outcome: ""
|
|
18
|
+
non_goals: []
|
|
19
|
+
|
|
20
|
+
scope:
|
|
21
|
+
owns:
|
|
22
|
+
# Files, dirs, modules, routes, or contracts this worker may edit.
|
|
23
|
+
- ""
|
|
24
|
+
may_read:
|
|
25
|
+
# Context surfaces the worker may inspect but should not edit.
|
|
26
|
+
- ""
|
|
27
|
+
shared_surfaces:
|
|
28
|
+
# APIs, schemas, data contracts, docs, or config shared with other streams.
|
|
29
|
+
- surface: ""
|
|
30
|
+
contract_owner: ""
|
|
31
|
+
rule: "report changes before editing"
|
|
32
|
+
must_not_touch:
|
|
33
|
+
# Explicit exclusions. Any need to edit these returns to the Chief.
|
|
34
|
+
- ""
|
|
35
|
+
|
|
36
|
+
dependencies:
|
|
37
|
+
blocked_by: []
|
|
38
|
+
provides_to: []
|
|
39
|
+
contracts_required: []
|
|
40
|
+
|
|
41
|
+
verify:
|
|
42
|
+
commands:
|
|
43
|
+
# - cmd: "npm test -- ..."
|
|
44
|
+
# advisory: false
|
|
45
|
+
manual_checks: []
|
|
46
|
+
evidence_required: []
|
|
47
|
+
|
|
48
|
+
stop_conditions:
|
|
49
|
+
- "Need to edit must_not_touch or undeclared shared surface"
|
|
50
|
+
- "Find conflicting ownership with another stream"
|
|
51
|
+
- "Contract is missing, ambiguous, or contradicted by implementation"
|
|
52
|
+
- "Task scope expands beyond the package goal"
|
|
53
|
+
- "Verification cannot be run or fails for reasons outside package scope"
|
|
54
|
+
|
|
55
|
+
deliverables:
|
|
56
|
+
- "Changed files or commits"
|
|
57
|
+
- "Verification evidence"
|
|
58
|
+
- "Decision notes or conflicts found"
|
|
59
|
+
- "Recommended next action"
|
|
60
|
+
|
|
61
|
+
handoff:
|
|
62
|
+
instructions: ""
|
|
63
|
+
report_back:
|
|
64
|
+
to: "chief-of-staff"
|
|
65
|
+
include:
|
|
66
|
+
- "what changed"
|
|
67
|
+
- "what was verified"
|
|
68
|
+
- "conflicts or scope expansion"
|
|
69
|
+
- "open risks"
|
|
70
|
+
- "next action"
|