@cassiomc1/forgeloop 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/rules/project-loop.mdc +3 -2
- package/.github/copilot-instructions.md +1 -0
- package/AGENTS.md +2 -1
- package/CLAUDE.md +1 -0
- package/DOCS_INDEX.md +36 -0
- package/ENG/design-code-eng.md +31 -0
- package/ENG/documentation-quality-eng.md +400 -0
- package/EXECUTION_STATE.md +23 -13
- package/GUIDE_ROUTER.md +23 -8
- package/LOOP_ENGINEERING.md +77 -12
- package/PROTOCOL_INTEGRATION.md +9 -6
- package/README.md +82 -39
- package/docs/ARTIFACT_REFERENCE.md +442 -0
- package/docs/CLI_REFERENCE.md +892 -0
- package/docs/CROSS_HARNESS_CONTINUITY.md +198 -0
- package/docs/DOCUMENTATION_GUIDE.md +161 -0
- package/docs/GETTING_STARTED.md +348 -0
- package/docs/RECIPES.md +250 -0
- package/docs/TROUBLESHOOTING.md +345 -0
- package/docs/assets/forgeloop-flow.svg +1 -1
- package/docs/forgeloop-flow.mmd +1 -1
- package/package.json +13 -2
- package/schemas/task-descriptor.schema.json +56 -0
- package/schemas/work-state.schema.json +18 -1
- package/scripts/CI_VALIDATORS.md +7 -0
- package/src/cli.js +280 -388
- package/src/commands/advance.js +5 -2
- package/src/commands/audit.js +11 -1
- package/src/commands/clear-continuity.js +5 -2
- package/src/commands/clear-state.js +5 -2
- package/src/commands/complete.js +9 -1
- package/src/commands/continuity.js +5 -2
- package/src/commands/inspect.js +10 -2
- package/src/commands/next.js +5 -2
- package/src/commands/preflight.js +9 -1
- package/src/commands/prepare-completion.js +5 -2
- package/src/commands/reconcile-continuity.js +5 -2
- package/src/commands/record-check.js +7 -1
- package/src/commands/record-continuity.js +21 -14
- package/src/commands/record-terminal-result.js +7 -1
- package/src/commands/route.js +22 -18
- package/src/commands/run-check.js +52 -44
- package/src/commands/status.js +18 -12
- package/src/commands/task-create.js +94 -0
- package/src/commands/task-list.js +48 -0
- package/src/commands/task-migrate.js +34 -0
- package/src/commands/task-scope.js +75 -0
- package/src/commands/task-show.js +81 -0
- package/src/commands/task-unlock.js +35 -0
- package/src/commands/validate-protocol.js +37 -20
- package/src/commands/validate-state.js +24 -18
- package/src/config/guides.json +42 -0
- package/src/core/activation.js +8 -4
- package/src/core/artifact-registry.js +166 -0
- package/src/core/audit.js +65 -12
- package/src/core/bundles.js +76 -50
- package/src/core/cli-command-definitions.js +611 -0
- package/src/core/cli-metadata.js +23 -0
- package/src/core/completion-artifacts.js +161 -74
- package/src/core/completion.js +134 -76
- package/src/core/continuity.js +20 -13
- package/src/core/contract.js +6 -3
- package/src/core/error-codes.js +197 -0
- package/src/core/events.js +19 -14
- package/src/core/execution.js +38 -6
- package/src/core/gate-artifact.js +12 -9
- package/src/core/gates.js +4 -2
- package/src/core/guide-metadata.js +7 -11
- package/src/core/guide-registry.js +29 -0
- package/src/core/inspect.js +7 -4
- package/src/core/native-adapters.js +6 -0
- package/src/core/phase.js +85 -33
- package/src/core/preflight-consistency.js +24 -14
- package/src/core/preflight-loaders.js +16 -11
- package/src/core/preflight.js +44 -25
- package/src/core/protocol.js +2 -11
- package/src/core/receipt.js +1 -1
- package/src/core/report.js +2 -2
- package/src/core/repository.js +46 -12
- package/src/core/resumability.js +6 -4
- package/src/core/route-artifact.js +9 -5
- package/src/core/router.js +11 -7
- package/src/core/schema-validation.js +1 -0
- package/src/core/task-command.js +41 -0
- package/src/core/task-context.js +126 -0
- package/src/core/task-descriptor.js +81 -0
- package/src/core/task-discovery.js +116 -0
- package/src/core/task-identity.js +76 -0
- package/src/core/task-lock.js +209 -0
- package/src/core/task-migration-validation.js +140 -0
- package/src/core/task-migration.js +361 -0
- package/src/core/task-paths.js +96 -0
- package/src/core/task-scope.js +179 -0
- package/src/core/templates.js +3 -9
- package/src/core/work-state.js +24 -13
package/GUIDE_ROUTER.md
CHANGED
|
@@ -51,6 +51,7 @@ project commands.
|
|
|
51
51
|
| `performance` | [Performance](./ENG/perf-code-eng.md) | Measurement, diagnosis, budgets, and optimization |
|
|
52
52
|
| `accessibility` | [Accessibility](./ENG/accessibility-eng.md) | WCAG, keyboard access, focus, semantics, and assistive technology |
|
|
53
53
|
| `games` | [Web games](./ENG/games-code-design-web-eng.md) | Architecture and operation of 2D, 3D, and procedural web games |
|
|
54
|
+
| `documentation` | [Documentation quality](./ENG/documentation-quality-eng.md) | Accuracy, architecture, freshness, accessibility, and verifiable technical documentation |
|
|
54
55
|
|
|
55
56
|
## Domain rules
|
|
56
57
|
|
|
@@ -190,11 +191,26 @@ rg -n '^## |game loop|procedural|input|assets|audio|multiplayer|WASM|PWA|CI/CD'
|
|
|
190
191
|
|
|
191
192
|
**Expected evidence:** verifiable simulation, determinism when promised, capability fallbacks, budgets, accessibility, and release gates.
|
|
192
193
|
|
|
194
|
+
### `documentation` — technical documentation quality
|
|
195
|
+
|
|
196
|
+
**Activate when:** creating, modifying, reviewing, or restructuring README files, tutorials, how-to guides, technical reference, API/CLI/configuration documentation, architecture documentation, troubleshooting, migration guides, runbooks, or other project documentation; also activate when an implementation change explicitly affects a documentation surface.
|
|
197
|
+
|
|
198
|
+
**Do not activate merely because:** source code contains comments, a task description mentions documentation in passing, or code examples appear in an unrelated domain document without changing project documentation.
|
|
199
|
+
|
|
200
|
+
**Usually combine with:** the domain whose behavior is documented. Add `test` when commands, examples, generated docs, or executable references need verification; add `security` for authentication, authorization, secrets, privacy, or sensitive examples; use `accessibility` when the published documentation surface itself has accessibility requirements.
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
rg -n '^## |accuracy|completeness|Diátaxis|tutorial|how-to|reference|explanation|README|API|CLI|configuration|architecture|freshness|accessibility|Definition of Done' ENG/documentation-quality-eng.md
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**Expected evidence:** documentation purpose and audience are clear, factual claims are cross-checked against canonical project sources, changed documentation surfaces are complete, relevant examples/links/builds are validated when available, and unavailable required checks are recorded as `NOT_VERIFIED`.
|
|
207
|
+
|
|
193
208
|
## Work-type matrix
|
|
194
209
|
|
|
195
210
|
| Work | Primary guide | Common complements | Exclude when |
|
|
196
211
|
| --- | --- | --- | --- |
|
|
197
|
-
| Documentation change | Relevant domain
|
|
212
|
+
| Documentation change | `documentation` | Relevant domain; `test` for executable examples/commands; `security` for trust-sensitive docs | No documentation artifact or documented contract changes |
|
|
213
|
+
| UI copy or microcopy | `design` | `accessibility` | Users cannot observe the change |
|
|
198
214
|
| Code or bug without UI | `clean` | `test`; risk may add `security` or `performance` | The surface is unchanged |
|
|
199
215
|
| Backend, API, or data | `clean` | `test`, `security`; `performance` for a critical path | That layer does not exist |
|
|
200
216
|
| Web, mobile, or desktop UI | `design` | `accessibility`, `clean`, `test`; risk defines the rest | Users cannot observe the change |
|
|
@@ -214,12 +230,12 @@ the repository.
|
|
|
214
230
|
|
|
215
231
|
The first routing contract is versioned as `schemaVersion: 1`. It accepts:
|
|
216
232
|
|
|
217
|
-
- `workType`: `documentation`, `code`, `bug`, `refactor`, `backend`, `api`,
|
|
233
|
+
- `workType`: `documentation`, `ui-copy`, `code`, `bug`, `refactor`, `backend`, `api`,
|
|
218
234
|
`api-auth`, `complete-website`, `mobile-ui`, `web-game`, `html-video`,
|
|
219
235
|
`infrastructure`, `security-review`, `performance`, `accessibility`,
|
|
220
236
|
`test-only`, `dependency-update`, or `release`;
|
|
221
237
|
- `surfaces`: `ui`, `forms`, `api`, `auth`, `data`, `database`, `mobile`,
|
|
222
|
-
`desktop`, `game`, `video`, `ci`, `config`,
|
|
238
|
+
`desktop`, `game`, `video`, `ci`, `config`, `critical-path`, or `documentation`;
|
|
223
239
|
- `risks`: `untrusted-input`, `personal-data`, `secrets`, `external-service`,
|
|
224
240
|
`publication`, `critical-path`, `performance`, or `accessibility`;
|
|
225
241
|
- `platforms`: `web`, `mobile`, `desktop`, `server`, `ci`, or
|
|
@@ -236,9 +252,8 @@ error.
|
|
|
236
252
|
Every selected guide has stable reason codes such as
|
|
237
253
|
`WORK_COMPLETE_WEBSITE`, `SURFACE_UI`, `RISK_UNTRUSTED_INPUT`, and
|
|
238
254
|
`CHANGE_EXECUTABLE_CONFIG`. Exclusions use stable codes such as
|
|
239
|
-
`NO_TRUST_BOUNDARY
|
|
240
|
-
|
|
241
|
-
technical guides automatically.
|
|
255
|
+
`NO_TRUST_BOUNDARY`, `NO_MEASURABLE_PERFORMANCE_RISK`, and
|
|
256
|
+
`NO_DOCUMENTATION_SURFACE`.
|
|
242
257
|
|
|
243
258
|
Platform signals are contextual, not automatic guide activators:
|
|
244
259
|
|
|
@@ -302,9 +317,9 @@ Verify the game loop, authoritative server, reconciliation, input, assets, fallb
|
|
|
302
317
|
|
|
303
318
|
### Documentation
|
|
304
319
|
|
|
305
|
-
<!-- route:documentation=
|
|
320
|
+
<!-- route:documentation=documentation -->
|
|
306
321
|
|
|
307
|
-
|
|
322
|
+
Verify Markdown, links, paths, commands, and examples.
|
|
308
323
|
|
|
309
324
|
## Route changes
|
|
310
325
|
|
package/LOOP_ENGINEERING.md
CHANGED
|
@@ -4,6 +4,31 @@
|
|
|
4
4
|
> technical rules remain in the guides selected through
|
|
5
5
|
> [`GUIDE_ROUTER.md`](./GUIDE_ROUTER.md).
|
|
6
6
|
|
|
7
|
+
## Navigation
|
|
8
|
+
|
|
9
|
+
- [Protocol Applicability](#protocol-applicability)
|
|
10
|
+
- [Blocking vs Non-Blocking Decisions](#blocking-vs-non-blocking-decisions)
|
|
11
|
+
- [External Workflow Compatibility](#external-workflow-compatibility)
|
|
12
|
+
- [Serialized Protocol Preparation](#serialized-protocol-preparation)
|
|
13
|
+
- [Completion Validation & Chronology](#completion-validation-and-chronology)
|
|
14
|
+
- [Post-Implementation Closure](#post-implementation-closure)
|
|
15
|
+
- [Independent Completion Dimensions](#independent-completion-dimensions)
|
|
16
|
+
- [Failure Taxonomy & Invariants](#failure-taxonomy-retry-and-loop-invariants)
|
|
17
|
+
- [Workflow State Semantics](#workflow-state-semantics)
|
|
18
|
+
- [Execution Contract](#execution-contract)
|
|
19
|
+
- [Project Discovery](#project-discovery)
|
|
20
|
+
- [Capability Discovery & Authority](#capability-discovery-and-on-demand-extensions)
|
|
21
|
+
- [Guide Selection](#guide-selection)
|
|
22
|
+
- [Design & Implementation Gates](#design-and-implementation-gates)
|
|
23
|
+
- [Proportional Planning](#proportional-planning)
|
|
24
|
+
- [Execution Loop](#execution-loop)
|
|
25
|
+
- [Verification & Regression](#verification-and-regression)
|
|
26
|
+
- [Evidence-Driven Correction](#evidence-driven-correction)
|
|
27
|
+
- [Precedence & Stop Conditions](#precedence)
|
|
28
|
+
- [Final Delivery](#final-delivery)
|
|
29
|
+
- [Cross-Harness Continuity](#cross-harness-execution-continuity)
|
|
30
|
+
- [Multi-Task Concurrent Project State](#multi-task-concurrent-project-state)
|
|
31
|
+
|
|
7
32
|
## Protocol applicability
|
|
8
33
|
|
|
9
34
|
ForgeLoop is a project-local engineering protocol.
|
|
@@ -48,11 +73,11 @@ name is unknown.
|
|
|
48
73
|
Lifecycle-owned ForgeLoop artifacts must be created or mutated only through
|
|
49
74
|
the supported ForgeLoop lifecycle commands or canonical ForgeLoop APIs:
|
|
50
75
|
|
|
51
|
-
- `.forgeloop/preflight.json`
|
|
52
|
-
- `.forgeloop/work-state.json`
|
|
53
|
-
- `.forgeloop/events.ndjson`
|
|
54
|
-
- `.forgeloop/execution-receipt.json`
|
|
55
|
-
- `.forgeloop/executions/<executionId>.json`
|
|
76
|
+
- `.forgeloop/task-state/<taskKey>/preflight.json`
|
|
77
|
+
- `.forgeloop/task-state/<taskKey>/work-state.json`
|
|
78
|
+
- `.forgeloop/task-state/<taskKey>/events.ndjson`
|
|
79
|
+
- `.forgeloop/task-state/<taskKey>/execution-receipt.json`
|
|
80
|
+
- `.forgeloop/task-state/<taskKey>/executions/<executionId>.json`
|
|
56
81
|
- completion recovery metadata
|
|
57
82
|
- canonical check/evidence state
|
|
58
83
|
- terminal-result lifecycle state
|
|
@@ -130,7 +155,7 @@ Recognized command dispatchers (such as `npm test`, `npm start`, `npm stop`, `np
|
|
|
130
155
|
Use `forgeloop run-check --id <id> --requirement <requirement> -- <argv>` for
|
|
131
156
|
observed command evidence. ForgeLoop preserves the exact argv vector, target
|
|
132
157
|
cwd, resolution classification, timestamps, exit status, and task/check
|
|
133
|
-
binding in `.forgeloop/executions/<executionId>.json` before recording the
|
|
158
|
+
binding in `.forgeloop/task-state/<taskKey>/executions/<executionId>.json` before recording the
|
|
134
159
|
check. Resolution is classified before process launch; install-capable
|
|
135
160
|
resolution is rejected without a valid host-attested authority, while
|
|
136
161
|
`npx --no-install` remains a non-installing path and may fail honestly when a
|
|
@@ -157,7 +182,7 @@ ForgeLoop validates authority semantics, while the host defines the trust bounda
|
|
|
157
182
|
|
|
158
183
|
### Stale receipt recovery invariant
|
|
159
184
|
|
|
160
|
-
Every recovery action returned by `forgeloop next` must be executable from the state that produced it. When work state changes legitimately after preparing a completion receipt, `forgeloop prepare-completion` refreshes the receipt and re-binds it to current state and changed paths without requiring manual deletion of `.forgeloop/execution-receipt.json`.
|
|
185
|
+
Every recovery action returned by `forgeloop next` must be executable from the state that produced it. When work state changes legitimately after preparing a completion receipt, `forgeloop prepare-completion` refreshes the receipt and re-binds it to current state and changed paths without requiring manual deletion of `.forgeloop/task-state/<taskKey>/execution-receipt.json`.
|
|
161
186
|
|
|
162
187
|
### Conformance profile escalation policy
|
|
163
188
|
|
|
@@ -435,9 +460,9 @@ If the harness cannot disable a mandatory approval workflow, record
|
|
|
435
460
|
|
|
436
461
|
ForgeLoop keeps the agent responsible for implementation while making the
|
|
437
462
|
pre-implementation contract observable. Before executable changes, the target
|
|
438
|
-
should contain a schema-valid `.forgeloop/
|
|
439
|
-
`.forgeloop/routing-result.json`. Guide metadata can declare mandatory gates;
|
|
440
|
-
those gates are recorded under `.forgeloop/gates/` and are checked by:
|
|
463
|
+
should contain a schema-valid task contract (`.forgeloop/task-state/<taskKey>/contract.json`) and a persisted
|
|
464
|
+
`.forgeloop/task-state/<taskKey>/routing-result.json`. Guide metadata can declare mandatory gates;
|
|
465
|
+
those gates are recorded under `.forgeloop/task-state/<taskKey>/gates/` and are checked by:
|
|
441
466
|
|
|
442
467
|
```text
|
|
443
468
|
forgeloop preflight
|
|
@@ -720,7 +745,7 @@ proportional phases, but:
|
|
|
720
745
|
Resume rules are conservative: revalidate branch, HEAD, contract fingerprint,
|
|
721
746
|
protocol version, and required artifacts before continuing; never rerun a
|
|
722
747
|
completed destructive or publication action automatically; rerun cheap
|
|
723
|
-
verification when state is stale; and clear only `.forgeloop/work-state.json`
|
|
748
|
+
verification when state is stale; and clear only task work state (`.forgeloop/task-state/<taskKey>/work-state.json`)
|
|
724
749
|
when abandoned state must be removed.
|
|
725
750
|
|
|
726
751
|
## Execution contract
|
|
@@ -1169,7 +1194,7 @@ from external publication.
|
|
|
1169
1194
|
A change of model, provider, IDE, process, terminal, or context window does not
|
|
1170
1195
|
create a new task when a valid resumable ForgeLoop task already exists.
|
|
1171
1196
|
`work-state.json` remains the sole owner of lifecycle progress. An optional
|
|
1172
|
-
`.forgeloop/continuity.json` may record bounded granular implementation context
|
|
1197
|
+
`.forgeloop/task-state/<taskKey>/continuity.json` may record bounded granular implementation context
|
|
1173
1198
|
such as current focus, remaining implementation work, known issues, and paths
|
|
1174
1199
|
to inspect first.
|
|
1175
1200
|
|
|
@@ -1178,3 +1203,43 @@ never satisfy verification coverage, publication, production readiness, or
|
|
|
1178
1203
|
completion. `CONTINUITY_CANNOT_GRANT_AUTHORITY`: continuity cannot authorize an
|
|
1179
1204
|
installation or external action. The receiving harness MUST reconcile
|
|
1180
1205
|
continuity against the current work state and checkout before acting on it.
|
|
1206
|
+
|
|
1207
|
+
## Multi-task concurrent project state
|
|
1208
|
+
|
|
1209
|
+
ForgeLoop supports isolated, concurrent tasks within the same repository workspace.
|
|
1210
|
+
Multiple active tasks can progress simultaneously without artifact collisions or state
|
|
1211
|
+
corruption through three fundamental protocol mechanisms:
|
|
1212
|
+
|
|
1213
|
+
1. **Deterministic Task Namespacing**:
|
|
1214
|
+
Each task is identified by a canonical string `taskId` and an immutable, filesystem-safe
|
|
1215
|
+
`taskKey` derived as `SHA-256(taskId)` in 64 lowercase hexadecimal characters. All
|
|
1216
|
+
task-scoped artifacts (`task.json`, `contract.json`, `routing-result.json`,
|
|
1217
|
+
`preflight.json`, `work-state.json`, `events.ndjson`, `execution-receipt.json`,
|
|
1218
|
+
`continuity.json`, gates, and execution records) are stored strictly under
|
|
1219
|
+
`.forgeloop/task-state/<taskKey>/`. Shared repository configuration and sources
|
|
1220
|
+
(`config.json`, `sources.json`) remain at `.forgeloop/`.
|
|
1221
|
+
|
|
1222
|
+
2. **Scoped Write Claims & Conflict Prevention**:
|
|
1223
|
+
Every task declares explicit project-relative directory or file path prefixes
|
|
1224
|
+
(`writeClaims`) in its `task.json` descriptor.
|
|
1225
|
+
- When creating a task (`forgeloop task-create --task <id> --claim <path>`),
|
|
1226
|
+
ForgeLoop asserts that claimed paths have no pre-existing uncommitted changes
|
|
1227
|
+
(`E_TASK_SCOPE_DIRTY`) and do not overlap with active write claims of any other
|
|
1228
|
+
non-`COMPLETE` task (`E_TASK_SCOPE_CONFLICT`).
|
|
1229
|
+
- Once execution begins (`EXECUTING` through `COMPLETE`), write claims are immutable
|
|
1230
|
+
(`E_TASK_SCOPE_FROZEN`).
|
|
1231
|
+
- At verification and completion, Git modifications are validated to ensure no changes
|
|
1232
|
+
escaped the task's declared scope (`E_TASK_CHANGE_OUTSIDE_SCOPE`).
|
|
1233
|
+
|
|
1234
|
+
3. **Per-Task Exclusive Mutex Locking**:
|
|
1235
|
+
Mutating lifecycle commands (`advance`, `preflight`, `run-check`, `complete`, etc.)
|
|
1236
|
+
acquire an exclusive filesystem lock at `.forgeloop/task-state/<taskKey>/.lock` using
|
|
1237
|
+
atomic creation flags (`wx`). Concurrent mutations on the same task reject with
|
|
1238
|
+
`E_TASK_LOCKED`. Read-only commands (`status`, `audit`, `inspect`, `continuity`) bypass
|
|
1239
|
+
locking. Stale locks can be cleared with `forgeloop task-unlock --task <id> --force`.
|
|
1240
|
+
|
|
1241
|
+
4. **Task Resolution & Legacy Migration**:
|
|
1242
|
+
Commands select their target task via `--task <id>`, the `FORGELOOP_TASK` environment
|
|
1243
|
+
variable, or implicit single-task fallback. If multiple active tasks exist without a
|
|
1244
|
+
selector, ForgeLoop fails closed with `E_TASK_AMBIGUOUS`. Legacy ForgeLoop 1.0 single-task
|
|
1245
|
+
layouts can be migrated into namespaced layout using `forgeloop task-migrate`.
|
package/PROTOCOL_INTEGRATION.md
CHANGED
|
@@ -124,11 +124,11 @@ The resolved CLI must match the installed project's package identity.
|
|
|
124
124
|
|
|
125
125
|
The following protocol artifacts are strictly owned by ForgeLoop:
|
|
126
126
|
|
|
127
|
-
- `.forgeloop/preflight.json`
|
|
128
|
-
- `.forgeloop/work-state.json`
|
|
129
|
-
- `.forgeloop/events.ndjson`
|
|
130
|
-
- `.forgeloop/execution-receipt.json`
|
|
131
|
-
- `.forgeloop/executions/<executionId>.json`
|
|
127
|
+
- `.forgeloop/task-state/<taskKey>/preflight.json`
|
|
128
|
+
- `.forgeloop/task-state/<taskKey>/work-state.json`
|
|
129
|
+
- `.forgeloop/task-state/<taskKey>/events.ndjson`
|
|
130
|
+
- `.forgeloop/task-state/<taskKey>/execution-receipt.json`
|
|
131
|
+
- `.forgeloop/task-state/<taskKey>/executions/<executionId>.json`
|
|
132
132
|
- Canonical check, evidence, and terminal-result state
|
|
133
133
|
|
|
134
134
|
If the required CLI or API capability cannot be resolved:
|
|
@@ -149,7 +149,7 @@ Command verification has two explicit paths:
|
|
|
149
149
|
execution. It classifies the exact argv before launch, uses a non-shell
|
|
150
150
|
process boundary, records the target cwd, resolution mode, timestamps,
|
|
151
151
|
exit status, and task/check binding in
|
|
152
|
-
`.forgeloop/executions/<executionId>.json`, then records an `OBSERVED` check
|
|
152
|
+
`.forgeloop/task-state/<taskKey>/executions/<executionId>.json`, then records an `OBSERVED` check
|
|
153
153
|
with `provenance: FORGELOOP_EXECUTED`.
|
|
154
154
|
- `forgeloop record-check` owns serialization only. `--command` is metadata and
|
|
155
155
|
is never launched. A `kind: command` check with `evidenceKind: OBSERVED`
|
|
@@ -309,3 +309,6 @@ A compatible environment reopening a resumable task SHOULD inspect the current
|
|
|
309
309
|
work state, reconcile optional execution continuity, inspect the checkout, and
|
|
310
310
|
continue the existing lifecycle instead of replacing the contract merely
|
|
311
311
|
because the executor changed.
|
|
312
|
+
|
|
313
|
+
For the practical handoff and multi-tool takeover sequence, see
|
|
314
|
+
[`docs/CROSS_HARNESS_CONTINUITY.md`](./docs/CROSS_HARNESS_CONTINUITY.md).
|
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
ForgeLoop is a portable, vendor-neutral protocol for AI-assisted development
|
|
6
6
|
and developer workflows. It turns an outcome into a contract, deterministic
|
|
7
|
-
routing, resumable state, evidence-backed verification, recovery,
|
|
8
|
-
validator-backed completion. It is a protocol/support CLI, not
|
|
9
|
-
runtime.
|
|
7
|
+
routing, resumable state, evidence-backed verification, recovery, cross-harness
|
|
8
|
+
continuity, and validator-backed completion. It is a protocol/support CLI, not
|
|
9
|
+
an agent or LLM runtime, not an agent framework, and not a graph orchestrator.
|
|
10
10
|
|
|
11
11
|
The operational sources are indexed in [`DOCS_INDEX.md`](./DOCS_INDEX.md).
|
|
12
12
|
[`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) is the canonical process;
|
|
@@ -15,6 +15,19 @@ levels and discovery; [`PROJECT_PROFILE.md`](./PROJECT_PROFILE.md) stores
|
|
|
15
15
|
durable project facts; and [`GUIDE_ROUTER.md`](./GUIDE_ROUTER.md) selects only
|
|
16
16
|
relevant guides.
|
|
17
17
|
|
|
18
|
+
## Where should I start?
|
|
19
|
+
|
|
20
|
+
- **New to ForgeLoop** → [`docs/GETTING_STARTED.md`](./docs/GETTING_STARTED.md)
|
|
21
|
+
- **Full protocol specification** → [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md)
|
|
22
|
+
- **Integrating an AI harness** → [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md)
|
|
23
|
+
- **Continuing another harness's task** → [`docs/CROSS_HARNESS_CONTINUITY.md`](./docs/CROSS_HARNESS_CONTINUITY.md)
|
|
24
|
+
- **CLI command reference** → [`docs/CLI_REFERENCE.md`](./docs/CLI_REFERENCE.md)
|
|
25
|
+
- **Artifact & schema reference** → [`docs/ARTIFACT_REFERENCE.md`](./docs/ARTIFACT_REFERENCE.md)
|
|
26
|
+
- **Operational recipes** → [`docs/RECIPES.md`](./docs/RECIPES.md)
|
|
27
|
+
- **Troubleshooting & error codes** → [`docs/TROUBLESHOOTING.md`](./docs/TROUBLESHOOTING.md)
|
|
28
|
+
- **System architecture & safety** → [`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md) & [`THREAT_MODEL.md`](./THREAT_MODEL.md)
|
|
29
|
+
- **Documentation index & ownership** → [`DOCS_INDEX.md`](./DOCS_INDEX.md)
|
|
30
|
+
|
|
18
31
|
## Catalog
|
|
19
32
|
|
|
20
33
|
| Topic | Guide |
|
|
@@ -28,6 +41,7 @@ relevant guides.
|
|
|
28
41
|
| Performance | [`ENG/perf-code-eng.md`](./ENG/perf-code-eng.md) |
|
|
29
42
|
| Accessibility | [`ENG/accessibility-eng.md`](./ENG/accessibility-eng.md) |
|
|
30
43
|
| Web games | [`ENG/games-code-design-web-eng.md`](./ENG/games-code-design-web-eng.md) |
|
|
44
|
+
| Documentation quality | [`ENG/documentation-quality-eng.md`](./ENG/documentation-quality-eng.md) |
|
|
31
45
|
|
|
32
46
|
Each guide declares its name, language, version, and review date in
|
|
33
47
|
frontmatter. Repository validators keep the catalog and metadata synchronized.
|
|
@@ -42,8 +56,9 @@ npx @cassiomc1/forgeloop doctor
|
|
|
42
56
|
```
|
|
43
57
|
|
|
44
58
|
The CLI installs canonical documents under `.forgeloop/kit/`, keeps small
|
|
45
|
-
native discovery shims at the project root,
|
|
46
|
-
|
|
59
|
+
native discovery shims at the project root, stores project-scoped
|
|
60
|
+
configuration under `.forgeloop/`, and stores task-scoped protocol artifacts
|
|
61
|
+
under `.forgeloop/task-state/<taskKey>/`.
|
|
47
62
|
`update` preserves target-specific profile facts and locally modified files.
|
|
48
63
|
|
|
49
64
|
Before npm publication, the same source checkout can be exercised without a
|
|
@@ -66,26 +81,28 @@ request → discovery → contract → routing → plan → execution
|
|
|
66
81
|
└──── evidence-only rejection / next cycle
|
|
67
82
|
```
|
|
68
83
|
|
|
69
|
-
The harness writes a schema-valid
|
|
70
|
-
gate artifacts, and
|
|
71
|
-
|
|
72
|
-
|
|
84
|
+
The harness writes a schema-valid task contract under
|
|
85
|
+
`.forgeloop/task-state/<taskKey>/contract.json`, required gate artifacts, and
|
|
86
|
+
routing. `preflight` must return `PREFLIGHT_READY` before implementation.
|
|
87
|
+
ForgeLoop then records an append-only event ledger and protects the lifecycle
|
|
88
|
+
with contract, route, repository, and artifact fingerprints.
|
|
73
89
|
|
|
74
90
|
Typical local commands are:
|
|
75
91
|
|
|
76
92
|
```bash
|
|
77
|
-
forgeloop
|
|
78
|
-
forgeloop
|
|
79
|
-
forgeloop
|
|
80
|
-
forgeloop
|
|
81
|
-
forgeloop
|
|
82
|
-
forgeloop advance --to
|
|
83
|
-
forgeloop advance --to
|
|
84
|
-
forgeloop
|
|
85
|
-
forgeloop
|
|
86
|
-
forgeloop
|
|
87
|
-
forgeloop
|
|
88
|
-
forgeloop
|
|
93
|
+
forgeloop task-create --task example-task --claim src --claim tests --json
|
|
94
|
+
forgeloop route --task example-task --work complete-website --surface ui --risk untrusted-input
|
|
95
|
+
forgeloop activate --task example-task
|
|
96
|
+
forgeloop preflight --task example-task --json
|
|
97
|
+
forgeloop next --task example-task --json
|
|
98
|
+
forgeloop advance --task example-task --to PLANNED
|
|
99
|
+
forgeloop advance --task example-task --to EXECUTING
|
|
100
|
+
forgeloop advance --task example-task --to VERIFYING
|
|
101
|
+
forgeloop prepare-completion --task example-task --json
|
|
102
|
+
forgeloop run-check --task example-task --json --id tests --requirement tests -- npm test
|
|
103
|
+
forgeloop advance --task example-task --to REVIEWING
|
|
104
|
+
forgeloop audit --task example-task --json
|
|
105
|
+
forgeloop complete --task example-task --json
|
|
89
106
|
```
|
|
90
107
|
|
|
91
108
|
`advance` changes protocol phase only; it never runs target commands.
|
|
@@ -103,6 +120,42 @@ falling back to discovery. Delegation artifacts are required only when
|
|
|
103
120
|
delegation is present in the execution history; ForgeLoop does not provide a
|
|
104
121
|
graph runtime, agent runtime, or hidden prompt store.
|
|
105
122
|
|
|
123
|
+
### Cross-harness continuity
|
|
124
|
+
|
|
125
|
+
ForgeLoop preserves task state when switching between AI coding tools, IDEs, or terminals:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
forgeloop status --task example-task --json
|
|
129
|
+
forgeloop continuity --task example-task --json
|
|
130
|
+
forgeloop reconcile-continuity --task example-task --json
|
|
131
|
+
forgeloop next --task example-task --json
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
See [`docs/CROSS_HARNESS_CONTINUITY.md`](./docs/CROSS_HARNESS_CONTINUITY.md) for full handoff and recovery procedures.
|
|
135
|
+
|
|
136
|
+
### Multi-task concurrent project state
|
|
137
|
+
|
|
138
|
+
ForgeLoop supports isolated, concurrent tasks within the same repository via deterministic SHA-256 namespacing, per-task mutex locking, and write-claim conflict detection:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# Create an isolated task claiming specific directories
|
|
142
|
+
forgeloop task-create --task auth-feature --claim src/auth --claim tests/auth --json
|
|
143
|
+
|
|
144
|
+
# List active and completed tasks
|
|
145
|
+
forgeloop task-list --json
|
|
146
|
+
|
|
147
|
+
# Run standard lifecycle commands targeting the task
|
|
148
|
+
forgeloop route --task auth-feature --work clean-code --surface backend
|
|
149
|
+
forgeloop preflight --task auth-feature --json
|
|
150
|
+
forgeloop advance --task auth-feature --to EXECUTING
|
|
151
|
+
forgeloop complete --task auth-feature --json
|
|
152
|
+
|
|
153
|
+
# Migrate legacy 1.0 single-task layout
|
|
154
|
+
forgeloop task-migrate --json
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
See [`docs/CLI_REFERENCE.md`](./docs/CLI_REFERENCE.md) and [`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md) for architecture details.
|
|
158
|
+
|
|
106
159
|
## Architecture flow
|
|
107
160
|
|
|
108
161
|
The canonical source is [`docs/forgeloop-flow.mmd`](./docs/forgeloop-flow.mmd),
|
|
@@ -110,9 +163,7 @@ and the committed render is [`docs/assets/forgeloop-flow.svg`](./docs/assets/for
|
|
|
110
163
|
The broader architecture and boundaries are in
|
|
111
164
|
[`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md).
|
|
112
165
|
|
|
113
|
-
|
|
114
|
-
<img src="./docs/assets/forgeloop-flow.svg" alt="ForgeLoop evidence-first engineering flow" width="100%" />
|
|
115
|
-
</p>
|
|
166
|
+

|
|
116
167
|
|
|
117
168
|
Text-only fallback: discovery creates the contract and route; required gates
|
|
118
169
|
and `PREFLIGHT_READY` authorize execution; verification creates structured
|
|
@@ -189,15 +240,6 @@ configuration file, never in Git, `.forgeloop/kit/PROJECT_PROFILE.md`, or
|
|
|
189
240
|
copied instruction files. ForgeLoop does not vendor Qwen code or install it
|
|
190
241
|
through `init`, `update`, or `doctor`.
|
|
191
242
|
|
|
192
|
-
## Cross-harness continuity
|
|
193
|
-
|
|
194
|
-
ForgeLoop can optionally persist bounded execution-continuity context for a
|
|
195
|
-
resumable task so another compatible harness can reconcile the current checkout
|
|
196
|
-
and continue without replacing the task contract. Continuity is operational
|
|
197
|
-
context only; it is never verification evidence or authority. See
|
|
198
|
-
[`EXECUTION_STATE.md`](./EXECUTION_STATE.md) and
|
|
199
|
-
[`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md).
|
|
200
|
-
|
|
201
243
|
## Release and maintenance
|
|
202
244
|
|
|
203
245
|
The release workflow uses [npm trusted publishing](https://docs.npmjs.com/trusted-publishers)
|
|
@@ -236,16 +278,17 @@ src/ npm CLI and protocol implementation
|
|
|
236
278
|
schemas/ versioned artifact schemas
|
|
237
279
|
ENG/ package-source engineering guides
|
|
238
280
|
docs/forgeloop-flow.mmd canonical Mermaid source
|
|
239
|
-
docs/assets/
|
|
281
|
+
docs/assets/ committed diagram render
|
|
240
282
|
scripts/ checks, renderer, release identity, CI notes
|
|
241
283
|
tests/ Node and Python regression coverage
|
|
242
|
-
.forgeloop/
|
|
243
|
-
|
|
284
|
+
.forgeloop/ project-scoped ForgeLoop configuration
|
|
285
|
+
.forgeloop/task-state/ isolated live task protocol state
|
|
286
|
+
DOCS_INDEX.md documentation map and ownership boundaries
|
|
244
287
|
```
|
|
245
288
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
289
|
+
Project-scoped configuration remains under `.forgeloop/`.
|
|
290
|
+
Task-scoped mutable protocol state is stored under
|
|
291
|
+
`.forgeloop/task-state/<taskKey>/`.
|
|
249
292
|
|
|
250
293
|
For document ownership, guide routing, capability degradation, and integration
|
|
251
294
|
details, start at [`DOCS_INDEX.md`](./DOCS_INDEX.md).
|