@cassiomc1/forgeloop 0.1.15 → 1.0.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/DOCS_INDEX.md +60 -0
- package/EXECUTION_STATE.md +9 -0
- package/LOOP_ENGINEERING.md +15 -0
- package/LOOP_SYSTEM_DESIGN.md +8 -0
- package/PROTOCOL_INTEGRATION.md +8 -0
- package/QUALITY_SCORECARD.md +2 -0
- package/README.md +183 -654
- package/TERMINOLOGY.md +4 -0
- package/THREAT_MODEL.md +9 -0
- package/docs/assets/forgeloop-flow.svg +1 -0
- package/docs/forgeloop-flow.mmd +51 -0
- package/package.json +16 -3
- package/schemas/continuity.schema.json +57 -0
- package/scripts/CI_VALIDATORS.md +32 -0
- package/src/cli.js +307 -204
- package/src/commands/clear-continuity.js +9 -0
- package/src/commands/continuity.js +25 -0
- package/src/commands/doctor.js +17 -2
- package/src/commands/reconcile-continuity.js +23 -0
- package/src/commands/record-continuity.js +63 -0
- package/src/commands/status.js +14 -1
- package/src/commands/update.js +12 -13
- package/src/commands/validate-protocol.js +19 -0
- package/src/core/artifacts.js +1 -0
- package/src/core/bundles.js +6 -0
- package/src/core/command-resolution.js +295 -0
- package/src/core/command-tokenizer.js +122 -0
- package/src/core/conformance.js +8 -2
- package/src/core/continuity-cli-options.js +58 -0
- package/src/core/continuity-conformance.js +46 -0
- package/src/core/continuity-observability.js +20 -0
- package/src/core/continuity-reconciliation.js +224 -0
- package/src/core/continuity.js +245 -0
- package/src/core/inspect.js +9 -1
- package/src/core/installation-authority.js +178 -0
- package/src/core/json-safety.js +17 -13
- package/src/core/next-action-artifacts.js +118 -0
- package/src/core/next-action-continuity.js +65 -0
- package/src/core/next-action-model.js +127 -0
- package/src/core/next-action-phases.js +12 -0
- package/src/core/next-action.js +22 -249
- package/src/core/npm-classifier.js +343 -0
- package/src/core/package-manager-classifiers.js +37 -0
- package/src/core/preflight-consistency.js +221 -0
- package/src/core/preflight-loaders.js +112 -0
- package/src/core/preflight-model.js +83 -0
- package/src/core/preflight.js +34 -444
- package/src/core/protocol.js +7 -0
- package/src/core/schema-validation.js +15 -1
- package/src/core/templates.js +2 -0
- package/src/core/verification-capability.js +31 -1106
- package/src/core/verification-constants.js +61 -0
package/README.md
CHANGED
|
@@ -2,355 +2,126 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/cassiomc1/forgeloop/actions/workflows/docs-quality.yml)
|
|
4
4
|
|
|
5
|
-
ForgeLoop is a portable,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
The
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
ForgeLoop is a portable, vendor-neutral protocol for AI-assisted development
|
|
6
|
+
and developer workflows. It turns an outcome into a contract, deterministic
|
|
7
|
+
routing, resumable state, evidence-backed verification, recovery, and
|
|
8
|
+
validator-backed completion. It is a protocol/support CLI, not an agent or LLM
|
|
9
|
+
runtime.
|
|
10
|
+
|
|
11
|
+
The operational sources are indexed in [`DOCS_INDEX.md`](./DOCS_INDEX.md).
|
|
12
|
+
[`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) is the canonical process;
|
|
13
|
+
[`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md) defines capability
|
|
14
|
+
levels and discovery; [`PROJECT_PROFILE.md`](./PROJECT_PROFILE.md) stores
|
|
15
|
+
durable project facts; and [`GUIDE_ROUTER.md`](./GUIDE_ROUTER.md) selects only
|
|
16
|
+
relevant guides.
|
|
16
17
|
|
|
17
18
|
## Catalog
|
|
18
19
|
|
|
19
|
-
| Topic |
|
|
20
|
-
| --- | --- |
|
|
21
|
-
| Premium websites |
|
|
22
|
-
| Clean code |
|
|
23
|
-
| Testing |
|
|
24
|
-
| Security |
|
|
25
|
-
| Design
|
|
26
|
-
| Taste frontend |
|
|
27
|
-
| Performance |
|
|
28
|
-
| Accessibility |
|
|
29
|
-
| Web games |
|
|
30
|
-
|
|
31
|
-
Each guide declares its name, `language: en`, description, version, and review
|
|
32
|
-
date in frontmatter. The repository validator checks that the guide metadata
|
|
33
|
-
and catalog remain synchronized.
|
|
34
|
-
|
|
35
|
-
## Universal project loop
|
|
36
|
-
|
|
37
|
-
The kit turns each request into a verifiable cycle: discover the project,
|
|
38
|
-
define an execution contract, select applicable guides, execute, verify,
|
|
39
|
-
diagnose, and correct until success or a genuine external blocker.
|
|
40
|
-
[`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) is the operational source (and
|
|
41
|
-
is installed under `.forgeloop/kit/` in a target);
|
|
42
|
-
[`GUIDE_ROUTER.md`](./GUIDE_ROUTER.md) prevents irrelevant context from being
|
|
43
|
-
loaded; and [`PROJECT_PROFILE.md`](./PROJECT_PROFILE.md) preserves only durable,
|
|
44
|
-
proven project facts (installed as `.forgeloop/kit/PROJECT_PROFILE.md` in a
|
|
45
|
-
target).
|
|
46
|
-
|
|
47
|
-
The canonical system map, including the routing/state/evidence architecture, is
|
|
48
|
-
in [`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md).
|
|
49
|
-
|
|
50
|
-
<p align="center">
|
|
51
|
-
<img
|
|
52
|
-
src="./docs/assets/forgeloop-flow.svg"
|
|
53
|
-
alt="ForgeLoop evidence-first engineering flow"
|
|
54
|
-
width="100%"
|
|
55
|
-
/>
|
|
56
|
-
</p>
|
|
57
|
-
|
|
58
|
-
Equivalent reading for text-only environments: adapters load the canonical kit;
|
|
59
|
-
an older target follows validate paths → write hidden files → verify their bytes
|
|
60
|
-
→ switch manifest authority atomically → hash-checked cleanup. An interruption
|
|
61
|
-
after hidden writes, after verification, after the authority switch, or during
|
|
62
|
-
cleanup is diagnosed by `doctor` as `E_MIGRATION_INCOMPLETE` and retried by
|
|
63
|
-
`update`; modified or unmanaged residual files remain preserved;
|
|
64
|
-
discovery creates the contract and deterministic route; contract, route, and
|
|
65
|
-
required gates must produce `PREFLIGHT_READY` before the resumable state and
|
|
66
|
-
append-only event ledger authorize the lifecycle. Verification produces
|
|
67
|
-
structured evidence evaluated by one canonical readiness model. Failed checks
|
|
68
|
-
enter diagnosis and correction. An evidence-only completion rejection records
|
|
69
|
-
`COMPLETION_REJECTED` and opens a new numbered verification cycle without
|
|
70
|
-
editing protocol JSON manually. `audit`, `complete`, and `validate-protocol`
|
|
71
|
-
classify the result as `VALID`, `INCOMPLETE`, `STALE`, `INCONSISTENT`, or
|
|
72
|
-
`INVALID`. Optional delegation creates a handoff; it is not an agent runtime.
|
|
73
|
-
|
|
74
|
-
The operational request loop remains:
|
|
75
|
-
|
|
76
|
-
```text
|
|
77
|
-
Request → discovery → profile → routing → plan → execution
|
|
78
|
-
→ verification → review → completion validation
|
|
79
|
-
↑ │
|
|
80
|
-
└ evidence-only rejection / next cycle
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
ForgeLoop is project-scoped, capability-based, and vendor-neutral.
|
|
84
|
-
|
|
85
|
-
Project-local discovery surfaces delegate to the same canonical ForgeLoop protocol. Execution environments that automatically discover one of those instruction surfaces can use it directly, while custom runtimes, automation systems, and developer workflows can use the manual bootstrap path.
|
|
86
|
-
|
|
87
|
-
Capabilities determine execution. Runtime names do not determine protocol applicability.
|
|
88
|
-
|
|
89
|
-
See [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md) for discovery, capability levels, degradation rules, and precedence.
|
|
90
|
-
|
|
91
|
-
### Migration recovery and release freeze
|
|
92
|
-
|
|
93
|
-
Legacy layout migration keeps `.forgeloop/kit/` as the canonical layout and
|
|
94
|
-
does not make `layoutVersion: 2` authoritative until every planned hidden file
|
|
95
|
-
has been written and byte-verified. Cleanup runs only after the manifest switch
|
|
96
|
-
and only for legacy files whose recorded ownership hash still matches when
|
|
97
|
-
ForgeLoop revalidates it immediately before deletion. A modified, unmanaged,
|
|
98
|
-
or `preserve=true` file is retained for manual review.
|
|
99
|
-
|
|
100
|
-
The interruption vocabulary is test-only and is not a runtime state machine:
|
|
101
|
-
|
|
102
|
-
```text
|
|
103
|
-
VALIDATED → HIDDEN_WRITTEN → HIDDEN_VERIFIED → MANIFEST_SWITCHED
|
|
104
|
-
→ LEGACY_CLEANED → COMPLETE
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
The regression suite injects failures at these boundaries and verifies that
|
|
108
|
-
`doctor` explains the incomplete migration before a later `update` recovers
|
|
109
|
-
owned cleanup. The frozen published installation under
|
|
110
|
-
[`tests/fixtures/legacy-0.1.6/`](./tests/fixtures/legacy-0.1.6/) is derived
|
|
111
|
-
from the real npm tarball, includes provenance and digests, and is copied into
|
|
112
|
-
The latest verified published npm release is `@cassiomc1/forgeloop@0.1.14`.
|
|
113
|
-
The repository package candidate is `@cassiomc1/forgeloop@0.1.15`; it is not
|
|
114
|
-
published yet.
|
|
115
|
-
Earlier `0.1.8`, `0.1.9`, `0.1.10`, `0.1.11`, `0.1.12`, and `0.1.13` references are historical; never move
|
|
116
|
-
their tags or `v0.1.10`. Release `0.1.14` enforces verification installation
|
|
117
|
-
authority, provides recoverable stale receipt lifecycle in `prepare-completion`,
|
|
118
|
-
and validates single-actor protocol runs. The `0.1.15` candidate adds trusted
|
|
119
|
-
command execution provenance without changing the v1 lifecycle or authority
|
|
120
|
-
boundary.
|
|
121
|
-
|
|
122
|
-
## How to prompt ForgeLoop
|
|
123
|
-
|
|
124
|
-
You do not need a perfect prompt to use ForgeLoop.
|
|
125
|
-
|
|
126
|
-
Describe the outcome you want. ForgeLoop is designed to structure the execution around that request: resolve safe ambiguities, create an execution contract, route the relevant guides, satisfy gates, run preflight checks, implement, verify, correct, and repeat until the work is complete.
|
|
127
|
-
|
|
128
|
-
> **Don't engineer the perfect prompt. Define the outcome and let ForgeLoop engineer the feedback loop.**
|
|
129
|
-
|
|
130
|
-
### Minimal
|
|
131
|
-
|
|
132
|
-
A short request should be enough for ordinary work:
|
|
133
|
-
|
|
134
|
-
```text
|
|
135
|
-
Create a premium website for a law firm.
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Recommended
|
|
139
|
-
|
|
140
|
-
Add the important outcome and product constraints:
|
|
141
|
-
|
|
142
|
-
```text
|
|
143
|
-
Create a premium website for a law firm.
|
|
144
|
-
|
|
145
|
-
It should feel modern, sophisticated and trustworthy, work well on mobile and desktop, and include a contact form.
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
### Structured
|
|
149
|
-
|
|
150
|
-
For larger or more constrained tasks, you can optionally use a lightweight task brief:
|
|
151
|
-
|
|
152
|
-
```text
|
|
153
|
-
Build: Premium law firm website
|
|
154
|
-
|
|
155
|
-
Goal:
|
|
156
|
-
Create a modern, sophisticated and trustworthy experience.
|
|
157
|
-
|
|
158
|
-
Requirements:
|
|
159
|
-
- Responsive on mobile and desktop
|
|
160
|
-
- Accessible navigation
|
|
161
|
-
- Contact form
|
|
162
|
-
- Premium visual design
|
|
163
|
-
- Good performance
|
|
164
|
-
|
|
165
|
-
Done when:
|
|
166
|
-
- The implementation is complete
|
|
167
|
-
- Required verification passes
|
|
168
|
-
- Mobile and desktop layouts are verified
|
|
169
|
-
- The contact form works
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
The structured format is optional. It gives ForgeLoop more explicit constraints and success criteria, but it should not be necessary for ordinary tasks.
|
|
173
|
-
|
|
174
|
-
### What not to put in the prompt
|
|
175
|
-
|
|
176
|
-
Avoid recreating the ForgeLoop process inside the prompt:
|
|
177
|
-
|
|
178
|
-
```text
|
|
179
|
-
First analyze the task.
|
|
180
|
-
Then create a plan.
|
|
181
|
-
Then inspect the files.
|
|
182
|
-
Then choose the guides.
|
|
183
|
-
Then implement.
|
|
184
|
-
Then run tests.
|
|
185
|
-
If tests fail, fix them.
|
|
186
|
-
Then review everything.
|
|
187
|
-
Then produce a report.
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
That workflow belongs to ForgeLoop.
|
|
191
|
-
|
|
192
|
-
Your prompt should primarily describe:
|
|
193
|
-
|
|
194
|
-
```text
|
|
195
|
-
what you want
|
|
196
|
-
important requirements
|
|
197
|
-
real constraints
|
|
198
|
-
observable success conditions
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
ForgeLoop should determine how to execute and verify the work.
|
|
20
|
+
| Topic | Guide |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| Premium websites | [`ENG/premium-sites-studio-eng.md`](./ENG/premium-sites-studio-eng.md) |
|
|
23
|
+
| Clean code | [`ENG/clean-code-eng.md`](./ENG/clean-code-eng.md) |
|
|
24
|
+
| Testing | [`ENG/test-code-eng.md`](./ENG/test-code-eng.md) |
|
|
25
|
+
| Security | [`ENG/sec-code-eng.md`](./ENG/sec-code-eng.md) |
|
|
26
|
+
| Design and UX | [`ENG/design-code-eng.md`](./ENG/design-code-eng.md) |
|
|
27
|
+
| Taste frontend | [`ENG/taste-frontend-eng.md`](./ENG/taste-frontend-eng.md) |
|
|
28
|
+
| Performance | [`ENG/perf-code-eng.md`](./ENG/perf-code-eng.md) |
|
|
29
|
+
| Accessibility | [`ENG/accessibility-eng.md`](./ENG/accessibility-eng.md) |
|
|
30
|
+
| Web games | [`ENG/games-code-design-web-eng.md`](./ENG/games-code-design-web-eng.md) |
|
|
202
31
|
|
|
203
|
-
|
|
32
|
+
Each guide declares its name, language, version, and review date in
|
|
33
|
+
frontmatter. Repository validators keep the catalog and metadata synchronized.
|
|
204
34
|
|
|
205
|
-
|
|
206
|
-
project without overwriting local instructions. When the package is available
|
|
207
|
-
in the npm registry, use the commands below; otherwise use the repository
|
|
208
|
-
checkout fallback.
|
|
35
|
+
## Quickstart
|
|
209
36
|
|
|
210
|
-
|
|
211
|
-
not yet published.
|
|
212
|
-
The latest verified published npm release is `@cassiomc1/forgeloop@0.1.14`.
|
|
213
|
-
For reproducible published-package runs or release-identity checks,
|
|
214
|
-
pin the published version:
|
|
37
|
+
From a published package, initialize a target project with:
|
|
215
38
|
|
|
216
39
|
```bash
|
|
217
|
-
npx @cassiomc1/forgeloop@0.1.14 --version
|
|
218
40
|
npx @cassiomc1/forgeloop init
|
|
219
41
|
npx @cassiomc1/forgeloop doctor
|
|
220
|
-
npx @cassiomc1/forgeloop update
|
|
221
42
|
```
|
|
222
43
|
|
|
223
|
-
|
|
44
|
+
The CLI installs canonical documents under `.forgeloop/kit/`, keeps small
|
|
45
|
+
native discovery shims at the project root, and stores mutable contract, route,
|
|
46
|
+
gate, state, event, receipt, and execution artifacts under `.forgeloop/`.
|
|
47
|
+
`update` preserves target-specific profile facts and locally modified files.
|
|
224
48
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
`.forgeloop/gates/*.json` files. `route` persists routing; `preflight` validates
|
|
228
|
-
the contract, route, and gates before execution.
|
|
49
|
+
Before npm publication, the same source checkout can be exercised without a
|
|
50
|
+
network or package lookup:
|
|
229
51
|
|
|
230
52
|
```bash
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
npx @cassiomc1/forgeloop next
|
|
235
|
-
npx @cassiomc1/forgeloop next --json
|
|
236
|
-
npx @cassiomc1/forgeloop advance --to PLANNED
|
|
237
|
-
npx @cassiomc1/forgeloop advance --to EXECUTING
|
|
238
|
-
npx @cassiomc1/forgeloop advance --to VERIFYING
|
|
239
|
-
npx @cassiomc1/forgeloop prepare-completion --json
|
|
240
|
-
npx @cassiomc1/forgeloop run-check --json --id tests --requirement tests -- npm test
|
|
241
|
-
npx @cassiomc1/forgeloop record-check --id docs-review --kind manual-review --requirement "documentation synchronized" --status passed --evidence-kind OBSERVED --provenance MANUAL_OBSERVATION --result "reviewed" --json
|
|
242
|
-
npx @cassiomc1/forgeloop record-terminal-result --requirement "Package published" --type PUBLICATION --status published --source "npm publish" --result "Published package to npm" --json
|
|
243
|
-
npx @cassiomc1/forgeloop advance --to REVIEWING
|
|
244
|
-
npx @cassiomc1/forgeloop audit --json
|
|
245
|
-
npx @cassiomc1/forgeloop complete --json
|
|
246
|
-
npx @cassiomc1/forgeloop report
|
|
247
|
-
npx @cassiomc1/forgeloop policy web-premium
|
|
248
|
-
npx @cassiomc1/forgeloop bundle --task website-001 --json
|
|
249
|
-
npx @cassiomc1/forgeloop inspect --json
|
|
250
|
-
npx @cassiomc1/forgeloop status --json
|
|
251
|
-
npx @cassiomc1/forgeloop status --contract-file .forgeloop/current-contract.json --json
|
|
252
|
-
npx @cassiomc1/forgeloop validate-state --json
|
|
253
|
-
npx @cassiomc1/forgeloop validate-receipt --file .forgeloop/execution-receipt.json --json
|
|
254
|
-
npx @cassiomc1/forgeloop validate-protocol --route-file .forgeloop/routing-result.json --state-file .forgeloop/work-state.json --receipt-file .forgeloop/execution-receipt.json --contract-file .forgeloop/current-contract.json --json
|
|
53
|
+
node src/cli.js init
|
|
54
|
+
node src/cli.js doctor
|
|
55
|
+
node src/cli.js update
|
|
255
56
|
```
|
|
256
57
|
|
|
257
|
-
|
|
258
|
-
criterion before `complete`; the single `tests` entry above only illustrates the
|
|
259
|
-
command shape. Route, receipt, state, and contract artifacts all live under
|
|
260
|
-
`.forgeloop/` in the target.
|
|
58
|
+
## Universal project loop
|
|
261
59
|
|
|
262
|
-
The
|
|
60
|
+
The lifecycle is:
|
|
263
61
|
|
|
264
62
|
```text
|
|
265
|
-
|
|
266
|
-
→
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
→ prepare-completion
|
|
270
|
-
→ forgeloop next
|
|
271
|
-
→ checks + run-check/record-check
|
|
272
|
-
→ forgeloop next
|
|
273
|
-
→ advance --to REVIEWING
|
|
274
|
-
→ forgeloop next
|
|
275
|
-
→ (record-terminal-result if publication/production required)
|
|
276
|
-
→ complete
|
|
63
|
+
request → discovery → contract → routing → plan → execution
|
|
64
|
+
→ verification → review → completion validation
|
|
65
|
+
↑ │
|
|
66
|
+
└──── evidence-only rejection / next cycle
|
|
277
67
|
```
|
|
278
68
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
reconcile the contract, route, required gates, `.forgeloop/work-state.json`,
|
|
284
|
-
`.forgeloop/events.ndjson`, and a matching `.forgeloop/preflight.json`. If
|
|
285
|
-
`READY` remains while the work state is missing, `next` returns
|
|
286
|
-
`RESOLVE_BLOCKER` with `E_STATE_MISSING_AFTER_PREFLIGHT_READY`; it does not
|
|
287
|
-
silently fall back to discovery.
|
|
288
|
-
|
|
289
|
-
`route` expands declared signals into deterministic guide IDs and reason codes.
|
|
290
|
-
`activate` records a session marker without storing prompts or hidden reasoning.
|
|
291
|
-
Before implementation, write the canonical contract, persist the route, create
|
|
292
|
-
required gate artifacts under `.forgeloop/gates/`, and require `preflight` to
|
|
293
|
-
return `READY`. `advance` enforces legal phase transitions; it never runs the
|
|
294
|
-
project's commands. After implementation, advance to `VERIFYING`, use
|
|
295
|
-
`prepare-completion` to create a safe receipt skeleton, use `run-check` for
|
|
296
|
-
commands, and use `record-check` for manual or non-command observations.
|
|
297
|
-
`run-check` accepts the exact argv after `--`, classifies resolution before
|
|
298
|
-
launch, blocks install-capable resolution without trusted host authority, and
|
|
299
|
-
writes `.forgeloop/executions/<executionId>.json` before recording the check.
|
|
300
|
-
`record-check` never executes `--command`; that option is metadata only. A
|
|
301
|
-
command check with `OBSERVED` evidence must reference a ForgeLoop execution
|
|
302
|
-
artifact with `provenance: FORGELOOP_EXECUTED`. Advance to `REVIEWING` before
|
|
303
|
-
running `audit` and `complete`.
|
|
304
|
-
`audit` is a read-only consistency check. `complete` validates the final
|
|
305
|
-
contract, route, gates, phase ledger, structured evidence, coverage, receipt,
|
|
306
|
-
and freshness before it can return `VALID`. `report` renders the same result as
|
|
307
|
-
independent task, verification, publication, and production-readiness
|
|
308
|
-
dimensions. `policy` selects a local strictness pack and `bundle` exports
|
|
309
|
-
canonical protocol artifacts for handoff or review.
|
|
310
|
-
`inspect`, `status`, and `validate-state` explain installation and resumable
|
|
311
|
-
state; they do not execute commands from the target profile.
|
|
312
|
-
`inspect` and `status` parse the target-local schemas and report `valid`,
|
|
313
|
-
`missing`, `invalid`, or `unsupported-version` health. A status without a
|
|
314
|
-
current contract file reports contract comparison as `NOT_VERIFIED` and does
|
|
315
|
-
not claim full freshness. `validate-protocol` is read-only and checks
|
|
316
|
-
cross-artifact relationships plus the same derived freshness classification
|
|
317
|
-
used by `inspect` and `status`. Supply `--contract-file` to compare the saved
|
|
318
|
-
contract fingerprint with the current contract; omitting it leaves contract
|
|
319
|
-
freshness as `NOT_VERIFIED` and a complete artifact set requires revalidation.
|
|
320
|
-
Delegation artifacts are required only when delegation is present in the
|
|
321
|
-
canonical execution history or explicitly supplied as part of a delegated run.
|
|
322
|
-
For a purely local single-actor lifecycle, the delegation dimension is
|
|
323
|
-
`NOT_APPLICABLE` and does not require task briefs or delegated results. When
|
|
324
|
-
delegation is in scope, also supply the matching repeated
|
|
325
|
-
`--task-brief <path>` and `--delegated-result <path>` inputs; omitting them in a
|
|
326
|
-
delegated run reports `INCOMPLETE`.
|
|
327
|
-
It returns `VALID`, `INCOMPLETE`, `STALE`, `INCONSISTENT`, or `INVALID` with
|
|
328
|
-
exact invariant codes and derived stale reasons. The persisted
|
|
329
|
-
`.forgeloop/work-state.json` schema is unchanged: `status`, `stale`, and `fresh`
|
|
330
|
-
are never stored in that file. Status precedence is `INVALID` > `INCONSISTENT`
|
|
331
|
-
> `STALE` > `INCOMPLETE` > `VALID`.
|
|
332
|
-
All protocol-support commands are local and offline-capable by default; the
|
|
333
|
-
package sends no telemetry and has no central trace service.
|
|
334
|
-
Capability gaps and inline/non-Git degraded mode are defined in
|
|
335
|
-
[`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md); they are reported as
|
|
336
|
-
limitations rather than treated as silent successes.
|
|
337
|
-
|
|
338
|
-
### Live conformance modes
|
|
339
|
-
|
|
340
|
-
Standard blind conformance uses the same mode throughout a run:
|
|
69
|
+
The harness writes a schema-valid `.forgeloop/current-contract.json`, required
|
|
70
|
+
gate artifacts, and routing. `preflight` must return `PREFLIGHT_READY` before
|
|
71
|
+
implementation. ForgeLoop then records an append-only event ledger and protects
|
|
72
|
+
the lifecycle with contract, route, repository, and artifact fingerprints.
|
|
341
73
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
74
|
+
Typical local commands are:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
forgeloop route --work complete-website --surface ui --risk untrusted-input
|
|
78
|
+
forgeloop activate
|
|
79
|
+
forgeloop preflight --json
|
|
80
|
+
forgeloop next --json
|
|
81
|
+
forgeloop advance --to PLANNED
|
|
82
|
+
forgeloop advance --to EXECUTING
|
|
83
|
+
forgeloop advance --to VERIFYING
|
|
84
|
+
forgeloop prepare-completion --json
|
|
85
|
+
forgeloop run-check --json --id tests --requirement tests -- npm test
|
|
86
|
+
forgeloop advance --to REVIEWING
|
|
87
|
+
forgeloop audit --json
|
|
88
|
+
forgeloop complete --json
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
`advance` changes protocol phase only; it never runs target commands.
|
|
92
|
+
`run-check` classifies the exact argv before launch and records ForgeLoop-owned
|
|
93
|
+
execution provenance. `record-check` stores an observation and never executes
|
|
94
|
+
the text supplied to `--command`. `complete` validates the contract, route,
|
|
95
|
+
gates, ledger, evidence, coverage, receipt, and freshness. `audit` is
|
|
96
|
+
read-only. `report` exposes independent completion, publication, and
|
|
97
|
+
production-readiness dimensions.
|
|
98
|
+
|
|
99
|
+
The status precedence is `INVALID` > `INCONSISTENT` > `STALE` > `INCOMPLETE` >
|
|
100
|
+
`VALID`. A `READY` preflight is a resumable checkpoint: if its work state is
|
|
101
|
+
missing, `forgeloop next` returns `RESOLVE_BLOCKER` rather than silently
|
|
102
|
+
falling back to discovery. Delegation artifacts are required only when
|
|
103
|
+
delegation is present in the execution history; ForgeLoop does not provide a
|
|
104
|
+
graph runtime, agent runtime, or hidden prompt store.
|
|
105
|
+
|
|
106
|
+
## Architecture flow
|
|
107
|
+
|
|
108
|
+
The canonical source is [`docs/forgeloop-flow.mmd`](./docs/forgeloop-flow.mmd),
|
|
109
|
+
and the committed render is [`docs/assets/forgeloop-flow.svg`](./docs/assets/forgeloop-flow.svg).
|
|
110
|
+
The broader architecture and boundaries are in
|
|
111
|
+
[`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md).
|
|
112
|
+
|
|
113
|
+
<p align="center">
|
|
114
|
+
<img src="./docs/assets/forgeloop-flow.svg" alt="ForgeLoop evidence-first engineering flow" width="100%" />
|
|
115
|
+
</p>
|
|
347
116
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
117
|
+
Text-only fallback: discovery creates the contract and route; required gates
|
|
118
|
+
and `PREFLIGHT_READY` authorize execution; verification creates structured
|
|
119
|
+
evidence; failures enter diagnosis and correction; review precedes
|
|
120
|
+
validator-backed completion. Drift reopens verification, and migration keeps
|
|
121
|
+
modified or unmanaged files for review. The terminal result is one of
|
|
122
|
+
`VALID`, `INCOMPLETE`, `STALE`, `INCONSISTENT`, or `INVALID`.
|
|
352
123
|
|
|
353
|
-
|
|
124
|
+
## Protocol compatibility
|
|
354
125
|
|
|
355
126
|
The npm package version is independent of protocol version. The current
|
|
356
127
|
serializable artifact contract is `schemaVersion: 1` and `protocolVersion: 1`.
|
|
@@ -358,365 +129,123 @@ serializable artifact contract is `schemaVersion: 1` and `protocolVersion: 1`.
|
|
|
358
129
|
- Patch releases preserve the v1 schemas, enums, transitions, and existing
|
|
359
130
|
command contracts while correcting implementation defects.
|
|
360
131
|
- Minor releases preserve existing v1 artifacts and commands; they may add
|
|
361
|
-
documentation,
|
|
362
|
-
schema. Existing consumers must still reject unknown fields rather than
|
|
363
|
-
silently treating an unrecognized artifact as valid.
|
|
132
|
+
documentation, commands, guides, or an explicitly named schema.
|
|
364
133
|
- Major releases may change required fields, enums, transitions, or safety
|
|
365
|
-
semantics and must document migration requirements
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
The compatibility fixture in
|
|
369
|
-
[`tests/fixtures/compatibility/protocol-v1.json`](./tests/fixtures/compatibility/protocol-v1.json)
|
|
370
|
-
is a small conformance marker, not a runtime configuration file.
|
|
371
|
-
|
|
372
|
-
### CLI security and trust boundaries
|
|
373
|
-
|
|
374
|
-
The CLI is a local validator and installer. It does not execute instructions,
|
|
375
|
-
profile commands, receipt data, state data, or hidden prompts supplied by a
|
|
376
|
-
target project. Its main threat boundaries are:
|
|
377
|
-
|
|
378
|
-
| Threat | Mitigation or accepted limit |
|
|
379
|
-
| --- | --- |
|
|
380
|
-
| Path traversal and symlink escape | Target and managed paths use safe-path and realpath containment checks; a symlinked target or escaped child is rejected. |
|
|
381
|
-
| Manifest tampering | Managed-file hashes and manifest shape are checked by `doctor`; discrepancies become findings rather than silent overwrites. |
|
|
382
|
-
| Untrusted state or profile data | JSON schemas, semantic checks, secret-like field checks, and non-execution rules apply before state or profile data is used. |
|
|
383
|
-
| Command injection | Git inspection uses fixed arguments without a shell; the CLI never treats project text as a command. |
|
|
384
|
-
| Data exposure | Receipts and checkpoints reject secret-like keys and values; examples use placeholders, and the repository secret scanner runs in CI. |
|
|
385
|
-
| Unsafe update overwrite | `update` preserves locally modified files and the target's `.forgeloop/kit/PROJECT_PROFILE.md`; adoption and writes remain bounded to the selected target. |
|
|
386
|
-
| Dependency supply chain | Runtime code uses Node built-ins only; the package does not install agents, providers, plugins, or remote services. |
|
|
387
|
-
| Installation authority provenance | Standalone CLI uses `trustMode: NONE`: environment-selected `FORGELOOP_AUTHORITY_FILE`/`FORGELOOP_AUTHORITY_DIR` sources are untrusted candidates; only an internal `HOST_ATTESTED` context may select a trusted source outside the actor-writable target. Project-local authority claims remain untrusted. |
|
|
388
|
-
| Stale replay | Work state records contract and repository fingerprints; drift requires revalidation and never reruns destructive or publication actions automatically. |
|
|
389
|
-
| Unverified publication | Receipts carry explicit publication booleans; local success never implies a push, pull request, merge, release, or deployment. |
|
|
390
|
-
| Unattested observed command | `record-check --command` is metadata only; command `OBSERVED` evidence requires a bound ForgeLoop execution artifact. `run-check` preserves exact argv, target cwd, resolution mode, timestamps, and exit status, and rejects install-capable resolution before launch without trusted host authority. |
|
|
391
|
-
|
|
392
|
-
The full boundary inventory, residual limitations, and executable evidence are
|
|
393
|
-
in [`THREAT_MODEL.md`](./THREAT_MODEL.md).
|
|
394
|
-
|
|
395
|
-
An external path is not equivalent to external authority ownership. Actor-controlled
|
|
396
|
-
environment configuration is not sufficient proof of host/operator authority;
|
|
397
|
-
trusted authority requires a host-attested integration boundary.
|
|
398
|
-
|
|
399
|
-
The CLI cannot protect a target from a separately privileged or hostile process
|
|
400
|
-
that changes the filesystem after validation. Consumers must still review
|
|
401
|
-
permissions, package provenance, and external actions before granting authority.
|
|
402
|
-
|
|
403
|
-
From a repository checkout before npm publication, run the same commands with
|
|
404
|
-
Node directly:
|
|
405
|
-
|
|
406
|
-
```bash
|
|
407
|
-
node src/cli.js init
|
|
408
|
-
node src/cli.js doctor
|
|
409
|
-
node src/cli.js update
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
The release workflow uses [npm trusted publishing](https://docs.npmjs.com/trusted-publishers)
|
|
413
|
-
through GitHub Actions OIDC. Before the first release, register this repository
|
|
414
|
-
and workflow as the package's trusted publisher in npm; each `vX.Y.Z` tag must
|
|
415
|
-
match `package.json`. After publishing, verify the complete immutable release
|
|
416
|
-
identity before a blind run:
|
|
417
|
-
|
|
418
|
-
```bash
|
|
419
|
-
RELEASE_COMMIT="$(git rev-list -n1 vX.Y.Z)"
|
|
420
|
-
npm run release:identity -- --version X.Y.Z --release-commit "$RELEASE_COMMIT"
|
|
421
|
-
```
|
|
134
|
+
semantics and must document migration requirements with a protocol version
|
|
135
|
+
change.
|
|
422
136
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
The commands above use the current directory. To install into another existing
|
|
428
|
-
project directory, pass a relative or absolute `--path`:
|
|
429
|
-
|
|
430
|
-
```bash
|
|
431
|
-
# Existing project relative to the current directory
|
|
432
|
-
npx @cassiomc1/forgeloop init --path ./my-project
|
|
433
|
-
npx @cassiomc1/forgeloop doctor --path ./my-project
|
|
434
|
-
npx @cassiomc1/forgeloop update --path ./my-project
|
|
435
|
-
|
|
436
|
-
# Existing project at an absolute path
|
|
437
|
-
npx @cassiomc1/forgeloop init --path /path/to/my-project
|
|
438
|
-
npx @cassiomc1/forgeloop doctor --path /path/to/my-project
|
|
439
|
-
npx @cassiomc1/forgeloop update --path /path/to/my-project
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
The target must already exist and be a directory; the CLI will not create or
|
|
443
|
-
replace an arbitrary path. Use `--dry-run` to preview writes before `init` or
|
|
444
|
-
`update`. `--json`, `--strict`, and `--adopt <path>` are supported by `doctor`;
|
|
445
|
-
adoption is limited to a supported adapter that has been reviewed locally. The
|
|
446
|
-
CLI records managed files and their hashes in `.forgeloop/manifest.json`; a new
|
|
447
|
-
target receives canonical documents under `.forgeloop/kit/` and only small
|
|
448
|
-
native shims at the root. `update` leaves locally modified files and the
|
|
449
|
-
project profile untouched. If a target already has a manifest, rerun `update`
|
|
450
|
-
instead of `init`. Symlinked targets or template parents are rejected, and
|
|
451
|
-
unadopted pre-existing adapters are reported for manual merge with the loop
|
|
452
|
-
reference.
|
|
453
|
-
|
|
454
|
-
Targets created by an older package layout are migrated by `update`: unchanged
|
|
455
|
-
managed root files move into the hidden kit, while modified or unowned root
|
|
456
|
-
files are preserved and reported as conflicts. The migration never follows a
|
|
457
|
-
symlink or deletes a file whose managed hash no longer matches. The migration
|
|
458
|
-
writes and verifies the complete hidden plan, atomically switches the manifest
|
|
459
|
-
authority, and only then cleans owned legacy files. If a process stops between
|
|
460
|
-
those stages, `doctor` reports `E_MIGRATION_INCOMPLETE` and the next `update`
|
|
461
|
-
retries cleanup only when the recorded legacy hash still matches; modified or
|
|
462
|
-
unowned files remain for manual review.
|
|
463
|
-
|
|
464
|
-
### Migrate an existing mdfiles installation
|
|
465
|
-
|
|
466
|
-
The ForgeLoop rename changes the target metadata namespace. From the existing
|
|
467
|
-
project root, move the directory manually and refresh its manifest:
|
|
468
|
-
|
|
469
|
-
```bash
|
|
470
|
-
mv .mdfiles .forgeloop
|
|
471
|
-
npx @cassiomc1/forgeloop update
|
|
472
|
-
```
|
|
473
|
-
|
|
474
|
-
ForgeLoop does not automatically migrate, dual-write, or delete a legacy
|
|
475
|
-
`.mdfiles` directory. The serialized contract remains `schemaVersion: 1` and
|
|
476
|
-
`protocolVersion: 1`; only the package, CLI, and target namespace change.
|
|
477
|
-
|
|
478
|
-
### Install in a target project
|
|
479
|
-
|
|
480
|
-
If npm is unavailable, download this public repository as a ZIP or clone it
|
|
481
|
-
into a temporary directory, then invoke the bundled CLI against the target:
|
|
482
|
-
|
|
483
|
-
```bash
|
|
484
|
-
node /path/to/forgeloop/src/cli.js init --path /path/to/my-project
|
|
485
|
-
node /path/to/forgeloop/src/cli.js doctor --path /path/to/my-project
|
|
486
|
-
```
|
|
487
|
-
|
|
488
|
-
Copying source-root files directly is not equivalent to initialization: the
|
|
489
|
-
canonical documents must be mapped into the hidden kit and the native adapters
|
|
490
|
-
must remain thin. The resulting target layout is:
|
|
491
|
-
|
|
492
|
-
```text
|
|
493
|
-
AGENTS.md
|
|
494
|
-
CLAUDE.md
|
|
495
|
-
.forgeloop/.gitignore
|
|
496
|
-
.forgeloop/kit/PROTOCOL_INTEGRATION.md
|
|
497
|
-
.forgeloop/kit/AGENT_COMPATIBILITY.md
|
|
498
|
-
.forgeloop/kit/LOOP_ENGINEERING.md
|
|
499
|
-
.forgeloop/kit/GUIDE_ROUTER.md
|
|
500
|
-
.forgeloop/kit/PROJECT_PROFILE.md
|
|
501
|
-
.forgeloop/kit/LOOP_SYSTEM_DESIGN.md
|
|
502
|
-
.forgeloop/kit/QUALITY_SCORECARD.md
|
|
503
|
-
.forgeloop/kit/TERMINOLOGY.md
|
|
504
|
-
.forgeloop/kit/EXECUTION_STATE.md
|
|
505
|
-
.forgeloop/kit/DELEGATION_PROTOCOL.md
|
|
506
|
-
.forgeloop/kit/ORCHESTRATOR_INTEGRATION.md
|
|
507
|
-
.forgeloop/kit/THREAT_MODEL.md
|
|
508
|
-
.forgeloop/kit/CONTRACT_COVERAGE.md
|
|
509
|
-
.forgeloop/kit/THIRD_PARTY_NOTICES.md
|
|
510
|
-
.forgeloop/kit/LICENSE
|
|
511
|
-
.forgeloop/kit/LICENSE-DOCS.md
|
|
512
|
-
.forgeloop/kit/ENG/
|
|
513
|
-
.forgeloop/kit/schemas/
|
|
514
|
-
.github/copilot-instructions.md
|
|
515
|
-
.cursor/rules/project-loop.mdc
|
|
516
|
-
```
|
|
137
|
+
Consumers must reject unknown artifact fields rather than silently treating
|
|
138
|
+
unrecognized protocol data as valid. The compatibility marker is
|
|
139
|
+
[`tests/fixtures/compatibility/protocol-v1.json`](./tests/fixtures/compatibility/protocol-v1.json).
|
|
517
140
|
|
|
518
|
-
|
|
519
|
-
Cursor rules, merge only the adapter block that points to the loop. Never
|
|
520
|
-
overwrite specific local instructions. The `scripts/`, `.github/workflows/`,
|
|
521
|
-
and quality configuration files are optional for kit consumers but required to
|
|
522
|
-
maintain and validate this source repository.
|
|
141
|
+
## Security and dependency boundary
|
|
523
142
|
|
|
524
|
-
|
|
143
|
+
The runtime uses Node built-ins only and does not install agents, providers,
|
|
144
|
+
plugins, remote services, or telemetry. Target paths and symlinks are bounded;
|
|
145
|
+
JSON is size/depth limited; manifests, schemas, receipts, and secret-like
|
|
146
|
+
values are checked; and install-capable verification requires trusted host
|
|
147
|
+
authority. See [`THREAT_MODEL.md`](./THREAT_MODEL.md) for the full inventory.
|
|
525
148
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
root `PROJECT_PROFILE.md`. Keep `language: en`.
|
|
149
|
+
Development tooling is intentionally separate from runtime dependencies. The
|
|
150
|
+
repository policy allows only ESLint, c8, and Mermaid CLI as development
|
|
151
|
+
dependencies; `npm run dependency:policy` fails if runtime or unapproved
|
|
152
|
+
dependencies appear.
|
|
531
153
|
|
|
532
|
-
|
|
533
|
-
Unknown commands remain unverified until a real source identifies them.
|
|
154
|
+
## Autonomous blind-run isolation
|
|
534
155
|
|
|
535
|
-
|
|
156
|
+
The repository does not claim a live blind conformance result for an external
|
|
157
|
+
harness. The isolated scenario is `TEST_NOT_STARTED`; do not reinterpret it as
|
|
158
|
+
a pass or failure. The compatible autonomous boundary is explicit:
|
|
536
159
|
|
|
537
160
|
```text
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
161
|
+
mandatory-approval workflows enabled: NO
|
|
162
|
+
external brainstorming hard gate enabled: NO
|
|
163
|
+
external design approval gate enabled: NO
|
|
164
|
+
subagents enabled: NO
|
|
165
|
+
delegation enabled: NO
|
|
541
166
|
```
|
|
542
167
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
After installation, start the preferred agent from the target project
|
|
548
|
-
directory. Use `PROTOCOL_INTEGRATION.md` to confirm which file it should load and
|
|
549
|
-
which native entry point is expected. A live agent session is not required for
|
|
550
|
-
package installation or its automated tests.
|
|
551
|
-
|
|
552
|
-
### Update the kit
|
|
553
|
-
|
|
554
|
-
When adopting a newer version, preserve target-specific facts from
|
|
555
|
-
`.forgeloop/kit/PROJECT_PROFILE.md`. Compare adapters before replacing them, update the loop,
|
|
556
|
-
router, notices, and guides as one coherent set, and never erase local
|
|
557
|
-
instructions. If validators were copied, run:
|
|
558
|
-
|
|
559
|
-
```bash
|
|
560
|
-
python3 scripts/validate_loop_system.py --self-test
|
|
561
|
-
python3 scripts/validate_loop_system.py
|
|
562
|
-
python3 scripts/scan_secrets.py
|
|
563
|
-
```
|
|
564
|
-
|
|
565
|
-
When maintaining a checkout of this source repository, run the npm package
|
|
566
|
-
checks as well:
|
|
567
|
-
|
|
568
|
-
```bash
|
|
569
|
-
npm test
|
|
570
|
-
npm run pack:check
|
|
571
|
-
```
|
|
572
|
-
|
|
573
|
-
Architecture and boundaries are documented in
|
|
574
|
-
[`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md).
|
|
575
|
-
|
|
576
|
-
## Tool approval policy
|
|
577
|
-
|
|
578
|
-
Identify the stack, current stage, and applicable checks. Prefer an equivalent
|
|
579
|
-
tool already available when it produces compatible evidence. The task-scoped
|
|
580
|
-
Qwen-MM-Plugins installation described below is the narrow capability exception
|
|
581
|
-
when a required capability is missing; system tools, credentials, and unrelated
|
|
582
|
-
environment changes remain subject to their normal host controls. If a required
|
|
583
|
-
check cannot run and no safe alternative exists, record the blocker and do not
|
|
584
|
-
claim that the check passed. Unrelated optional references must never be
|
|
585
|
-
installed automatically.
|
|
168
|
+
An environment that requires those gates is `INCOMPATIBLE WITH AUTONOMOUS MODE`.
|
|
169
|
+
This constraint concerns the harness boundary and does not turn reversible
|
|
170
|
+
local product choices into blocking questions.
|
|
586
171
|
|
|
587
172
|
## Optional multimodal capabilities
|
|
588
173
|
|
|
589
|
-
[Qwen-MM-Plugins](https://github.com/QwenLM/Qwen-MM-Plugins)
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
and verifies that it is callable before continuing; it does not install every
|
|
595
|
-
capability at startup.
|
|
174
|
+
[Qwen-MM-Plugins](https://github.com/QwenLM/Qwen-MM-Plugins) is an optional,
|
|
175
|
+
task-scoped capability extension. The agent checks native/callable support
|
|
176
|
+
first, installs only the smallest missing capability when authorized, and
|
|
177
|
+
verifies it before use. No API key is used by default for native image, video,
|
|
178
|
+
or document reading.
|
|
596
179
|
|
|
597
|
-
|
|
598
|
-
Optional provider-backed operations follow this boundary:
|
|
599
|
-
|
|
600
|
-
| Capability or operation | Configuration required |
|
|
180
|
+
| Capability | Configuration |
|
|
601
181
|
| --- | --- |
|
|
602
|
-
|
|
|
603
|
-
|
|
|
604
|
-
| Web search, web extraction, and image search | `SERPER_API_KEY` |
|
|
182
|
+
| Vision, OCR, grounding, transcription, generation, and video memory | `DASHSCOPE_API_KEY` |
|
|
183
|
+
| Web and image search | `SERPER_API_KEY` |
|
|
605
184
|
| Segmentation through a SAM3 service | `SAM3_SERVER_URL` |
|
|
606
|
-
| Blender, FreeCAD, Office, browser-backed visualization, and `edu-agent`
|
|
607
|
-
|
|
608
|
-
Provide optional credentials through the process environment or the official
|
|
609
|
-
Qwen configuration file at `~/.qwen-mm-plugins/config` (or its documented
|
|
610
|
-
override). Never put keys in Git, the target's
|
|
611
|
-
`.forgeloop/kit/PROJECT_PROFILE.md`, or copied instruction files. The agent must
|
|
612
|
-
leave an API-backed capability disabled when its key or
|
|
613
|
-
service endpoint is absent, and report missing system dependencies instead of
|
|
614
|
-
claiming that the feature is available.
|
|
615
|
-
|
|
616
|
-
Use the upstream [installation guide](https://github.com/QwenLM/Qwen-MM-Plugins/blob/main/docs/en/installation.md)
|
|
617
|
-
for the active harness's current install and verification commands, supported
|
|
618
|
-
capabilities, system dependencies, and Windows/WSL2 constraints. This project
|
|
619
|
-
does not vendor Qwen code, add it to the npm package, or install it through
|
|
620
|
-
`forgeloop init`, `update`, or `doctor`.
|
|
621
|
-
|
|
622
|
-
## HyperFrames for video and motion
|
|
623
|
-
|
|
624
|
-
[HyperFrames](https://hyperframes.heygen.com) is an option for deterministic
|
|
625
|
-
HTML, CSS, and JavaScript-based trailers, demos, presentations, and motion
|
|
626
|
-
graphics. It complements the design, accessibility, performance, and testing
|
|
627
|
-
guides; it does not replace those checks. Review the
|
|
628
|
-
[quickstart](https://hyperframes.heygen.com/quickstart) and
|
|
629
|
-
[CLI documentation](https://hyperframes.heygen.com/packages/cli) before
|
|
630
|
-
adoption. Local rendering requires Node.js 22+ and FFmpeg.
|
|
631
|
-
|
|
632
|
-
## Structure
|
|
633
|
-
|
|
634
|
-
```text
|
|
635
|
-
.
|
|
636
|
-
├── AGENTS.md # shared Codex-compatible entry point
|
|
637
|
-
├── CLAUDE.md # Claude Code entry point
|
|
638
|
-
├── PROTOCOL_INTEGRATION.md # vendor-neutral capability integration
|
|
639
|
-
├── AGENT_COMPATIBILITY.md # compatibility alias
|
|
640
|
-
├── LOOP_ENGINEERING.md # canonical operating cycle
|
|
641
|
-
├── GUIDE_ROUTER.md # contextual guide selection
|
|
642
|
-
├── PROJECT_PROFILE.md # source profile (target copy is under .forgeloop/kit/)
|
|
643
|
-
├── LOOP_SYSTEM_DESIGN.md # architecture and boundaries
|
|
644
|
-
├── THIRD_PARTY_NOTICES.md # provenance and rights
|
|
645
|
-
├── LICENSE # CLI and validator code license
|
|
646
|
-
├── LICENSE-DOCS.md # original documentation license boundary
|
|
647
|
-
├── ENG/ # package-source English guides
|
|
648
|
-
├── .cursor/rules/ # always-active Cursor rule
|
|
649
|
-
├── .github/copilot-instructions.md # GitHub Copilot entry point
|
|
650
|
-
├── .github/workflows/ # quality automation
|
|
651
|
-
├── scripts/ # structural, language, and secret checks
|
|
652
|
-
├── tests/ # validator regression tests
|
|
653
|
-
├── src/ # npm CLI implementation
|
|
654
|
-
├── .gitignore # ignored local files
|
|
655
|
-
├── .lychee.toml # link-check configuration
|
|
656
|
-
├── .markdownlint-cli2.jsonc # Markdown rules
|
|
657
|
-
└── README.md
|
|
658
|
-
```
|
|
659
|
-
|
|
660
|
-
The source repository keeps canonical documents at the root for package
|
|
661
|
-
development and validation. A bootstrapped target uses the hidden-kit layout
|
|
662
|
-
shown above; mutable contract, route, state, gate, event, preflight, and
|
|
663
|
-
receipt and execution artifacts remain directly under `.forgeloop/`.
|
|
664
|
-
|
|
665
|
-
## Maintenance
|
|
666
|
-
|
|
667
|
-
- Preserve guide requirements, exceptions, numbers, examples, and references when editing.
|
|
668
|
-
- Update `version` and `last-reviewed` when a guide's normative content changes.
|
|
669
|
-
- Verify that relative links remain inside the repository.
|
|
670
|
-
- Keep root instructions, comments, examples, fixtures, and guide content in English.
|
|
671
|
-
- Keep `THIRD_PARTY_NOTICES.md` with every distributed copy of the kit.
|
|
185
|
+
| Blender, FreeCAD, Office, browser-backed visualization, and `edu-agent` | System dependencies and upstream configuration; `edu-agent` TTS also needs `DASHSCOPE_API_KEY` |
|
|
672
186
|
|
|
673
|
-
|
|
187
|
+
Credentials belong in the process environment or the official Qwen
|
|
188
|
+
configuration file, never in Git, `.forgeloop/kit/PROJECT_PROFILE.md`, or
|
|
189
|
+
copied instruction files. ForgeLoop does not vendor Qwen code or install it
|
|
190
|
+
through `init`, `update`, or `doctor`.
|
|
674
191
|
|
|
675
|
-
|
|
676
|
-
review gates in [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md). Keep adapters
|
|
677
|
-
and entry-point instructions thin so the canonical workflow stays in one place.
|
|
192
|
+
## Cross-harness continuity
|
|
678
193
|
|
|
679
|
-
|
|
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).
|
|
680
200
|
|
|
681
|
-
|
|
201
|
+
## Release and maintenance
|
|
682
202
|
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
When it is available, run it directly without downloading anything:
|
|
203
|
+
The release workflow uses [npm trusted publishing](https://docs.npmjs.com/trusted-publishers)
|
|
204
|
+
through GitHub Actions OIDC. A `vX.Y.Z` tag must match `package.json`; after
|
|
205
|
+
publishing, verify the immutable release identity:
|
|
688
206
|
|
|
689
207
|
```bash
|
|
690
|
-
|
|
208
|
+
RELEASE_COMMIT="$(git rev-list -n1 vX.Y.Z)"
|
|
209
|
+
npm run release:identity -- --version X.Y.Z --release-commit "$RELEASE_COMMIT"
|
|
691
210
|
```
|
|
692
211
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
npx --yes markdownlint-cli2@0.23.2
|
|
697
|
-
```
|
|
212
|
+
Only `RELEASE_IDENTITY_VALID` is sufficient. Publication, pull requests,
|
|
213
|
+
merges, releases, and deployments are external actions and are never inferred
|
|
214
|
+
from local test success.
|
|
698
215
|
|
|
699
|
-
|
|
700
|
-
Python
|
|
216
|
+
When updating a target, preserve `.forgeloop/kit/PROJECT_PROFILE.md`, compare
|
|
217
|
+
adapters before replacement, and run the repository checks. Python validators
|
|
218
|
+
remain frozen CI-only compatibility tools; their scope and invocation are
|
|
219
|
+
documented in [`scripts/CI_VALIDATORS.md`](./scripts/CI_VALIDATORS.md).
|
|
701
220
|
|
|
702
221
|
```bash
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
222
|
+
npm ci
|
|
223
|
+
npm test
|
|
224
|
+
npm run lint
|
|
225
|
+
npm run coverage
|
|
226
|
+
npm run pack:check
|
|
227
|
+
npm run dependency:policy
|
|
228
|
+
npm run docs:flow
|
|
229
|
+
npm run docs:check
|
|
709
230
|
```
|
|
710
231
|
|
|
711
|
-
|
|
712
|
-
Markdown, links, frontmatter, unique names, code fences, relative links,
|
|
713
|
-
adapters, the guide catalog, routing scenarios, and secret-shaped values on
|
|
714
|
-
pushes and pull requests.
|
|
232
|
+
## Repository structure
|
|
715
233
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
234
|
+
```text
|
|
235
|
+
src/ npm CLI and protocol implementation
|
|
236
|
+
schemas/ versioned artifact schemas
|
|
237
|
+
ENG/ package-source engineering guides
|
|
238
|
+
docs/forgeloop-flow.mmd canonical Mermaid source
|
|
239
|
+
docs/assets/ committed diagram render
|
|
240
|
+
scripts/ checks, renderer, release identity, CI notes
|
|
241
|
+
tests/ Node and Python regression coverage
|
|
242
|
+
.forgeloop/ local protocol ledger and mutable artifacts
|
|
243
|
+
DOCS_INDEX.md documentation map and ownership boundaries
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
The source repository keeps canonical documents at the root. A bootstrapped
|
|
247
|
+
target uses the hidden kit layout; mutable protocol artifacts remain directly
|
|
248
|
+
under `.forgeloop/`.
|
|
249
|
+
|
|
250
|
+
For document ownership, guide routing, capability degradation, and integration
|
|
251
|
+
details, start at [`DOCS_INDEX.md`](./DOCS_INDEX.md).
|