@cassiomc1/forgeloop 0.1.6 → 0.1.9

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/README.md CHANGED
@@ -16,6 +16,11 @@ ForgeLoop is the portable, evidence-first loop that connects deterministic
16
16
  routing, checkpointed state, observable evidence, conformance, and delegation
17
17
  for compatible agent harnesses.
18
18
 
19
+ The npm package also ships the local `forgeloop` CLI. In a target project it
20
+ installs canonical documents under `.forgeloop/kit/`, keeps only small native
21
+ discovery shims at the root, and stores mutable protocol artifacts under
22
+ `.forgeloop/`.
23
+
19
24
  ## Catalog
20
25
 
21
26
  | Topic | When to use it | Guide |
@@ -25,6 +30,7 @@ for compatible agent harnesses.
25
30
  | Testing | Risk-based testing strategy | [`test-code-eng.md`](./ENG/test-code-eng.md) |
26
31
  | Security | Web, mobile, desktop, APIs, and supply chain | [`sec-code-eng.md`](./ENG/sec-code-eng.md) |
27
32
  | Design | Visual direction, UX, motion, and perceived performance | [`design-code-eng.md`](./ENG/design-code-eng.md) |
33
+ | Taste frontend | Contextual design-read, anti-slop, and visual pre-flight for premium frontend work | [`taste-frontend-eng.md`](./ENG/taste-frontend-eng.md) |
28
34
  | Performance | Measurement, diagnosis, budgets, and optimization | [`perf-code-eng.md`](./ENG/perf-code-eng.md) |
29
35
  | Accessibility | WCAG 2.2-oriented protocol for interfaces | [`accessibility-eng.md`](./ENG/accessibility-eng.md) |
30
36
  | Web games | Architecture, design, and operation of 2D, 3D, and procedural games | [`games-code-design-web-eng.md`](./ENG/games-code-design-web-eng.md) |
@@ -38,10 +44,12 @@ and catalog remain synchronized.
38
44
  The kit turns each request into a verifiable cycle: discover the project,
39
45
  define an execution contract, select applicable guides, execute, verify,
40
46
  diagnose, and correct until success or a genuine external blocker.
41
- [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) is the operational source;
47
+ [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) is the operational source (and
48
+ is installed under `.forgeloop/kit/` in a target);
42
49
  [`GUIDE_ROUTER.md`](./GUIDE_ROUTER.md) prevents irrelevant context from being
43
50
  loaded; and [`PROJECT_PROFILE.md`](./PROJECT_PROFILE.md) preserves only durable,
44
- proven project facts.
51
+ proven project facts (installed as `.forgeloop/kit/PROJECT_PROFILE.md` in a
52
+ target).
45
53
 
46
54
  The canonical system map, including the routing/state/evidence architecture, is
47
55
  in [`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md).
@@ -50,60 +58,84 @@ in [`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md).
50
58
  flowchart TB
51
59
  root["FORGELOOP"]
52
60
 
53
- subgraph surfaces["CONTROL SURFACES"]
54
- direction LR
55
- routing["ROUTING"] --> routingFacts["deterministic<br/>decisions"]
56
- state["STATE"] --> checkpoint["checkpoint<br/>facts"]
57
- evidence["EVIDENCE"] --> claims["observable<br/>claims"]
58
-
59
- checkpoint --> repository["repository"]
60
- checkpoint --> contract["contract"]
61
- repository --> freshness["freshness"]
62
- contract --> freshness
63
- end
64
-
65
- root --> routing
66
- root --> state
67
- root --> evidence
68
-
69
- routingFacts --> conformance["CONFORMANCE"]
70
- routingFacts --> delegation["DELEGATION"]
61
+ root --> entry["native adapters<br/>+ .forgeloop/kit/"]
62
+ entry --> migration{"target<br/>layout"}
63
+ migration -->|legacy v1| plan["validate paths<br/>+ build plan"]
64
+ plan --> hidden["write + verify<br/>hidden kit"]
65
+ hidden --> authority["atomic manifest<br/>authority switch"]
66
+ authority --> cleanup["hash-checked<br/>legacy cleanup"]
67
+ cleanup --> recovered["healthy or<br/>recoverable"]
68
+ migration -->|layout v2| retry["update + retry<br/>owned cleanup"]
69
+ entry --> discovery["discovery +<br/>project profile"]
70
+ discovery --> contract["current<br/>contract"]
71
+ contract --> routing["deterministic<br/>route"]
72
+
73
+ contract --> preflight["preflight"]
74
+ routing --> preflight
75
+ gates["required<br/>gates"] --> preflight
76
+ preflight -->|READY| ready["PREFLIGHT_READY"]
77
+ preflight -->|BLOCKED| blocker["repair /<br/>blocker"]
78
+
79
+ ready --> state["work-state<br/>checkpoint"]
80
+ ready --> events["append-only<br/>event ledger"]
81
+ state --> lifecycle["plan → execute<br/>→ verify → review"]
82
+ lifecycle --> prepare["prepare<br/>completion receipt"]
83
+ prepare --> checks["checks + structured<br/>evidence"]
84
+ checks --> receipt["updated execution<br/>receipt"]
85
+ checks --> audit["audit +<br/>complete"]
86
+ events --> audit
87
+
88
+ contract --> freshness["freshness<br/>fingerprints"]
89
+ routing --> freshness
90
+ state --> freshness
91
+ checks --> freshness
92
+ routing --> conformance["validate-protocol<br/>/ conformance"]
93
+ state --> conformance
94
+ receipt --> conformance
71
95
  freshness --> conformance
72
- freshness --> delegation
73
- claims --> conformance
74
- claims --> delegation
96
+ conformance --> verdict["VALID / INCOMPLETE /<br/>STALE / INCONSISTENT / INVALID"]
97
+ audit --> verdict
75
98
 
76
- conformance --> verdict["VALID / STALE / INVALID"]
77
- delegation --> verdict
78
- verdict --> harness["compatible harness"]
99
+ routing --> delegation["optional bundle /<br/>delegation"]
100
+ checks --> delegation
101
+ delegation --> handoff["handoff to<br/>compatible harness"]
102
+ verdict --> handoff
103
+ blocker --> handoff
79
104
 
80
105
  classDef root fill:#08090C,stroke:#6E6AF5,stroke-width:3px,color:#EDEEF0;
106
+ classDef entry fill:#101218,stroke:#3EDBB8,stroke-width:2px,color:#EDEEF0;
107
+ classDef migration fill:#0F766E,stroke:#5EEAD4,stroke-width:2px,color:#FFFFFF;
81
108
  classDef routing fill:#4F46E5,stroke:#A5B4FC,stroke-width:2px,color:#FFFFFF;
82
109
  classDef state fill:#373A46,stroke:#A1A1AA,stroke-width:2px,color:#FFFFFF;
83
110
  classDef evidence fill:#3EDBB8,stroke:#99F6E4,stroke-width:2px,color:#08090C;
84
111
  classDef fact fill:#181B24,stroke:#6E6AF5,stroke-width:1px,color:#EDEEF0;
85
- classDef support fill:#181B24,stroke:#8A8F98,stroke-width:1px,color:#EDEEF0;
86
112
  classDef gate fill:#3730A3,stroke:#A5B4FC,stroke-width:2px,color:#FFFFFF;
87
113
  classDef result fill:#C9A876,stroke:#F5D9A6,stroke-width:2px,color:#08090C;
88
114
  classDef harness fill:#101218,stroke:#3EDBB8,stroke-width:2px,color:#EDEEF0;
89
115
 
90
116
  class root root;
91
- class routing,routingFacts routing;
92
- class state,checkpoint state;
93
- class evidence,claims evidence;
94
- class repository,contract,freshness fact;
95
- class conformance,delegation gate;
117
+ class entry,discovery,delegation entry;
118
+ class migration,plan,hidden,authority,cleanup,recovered,retry migration;
119
+ class routing,preflight,ready routing;
120
+ class state,events,lifecycle state;
121
+ class checks,receipt,audit evidence;
122
+ class contract,freshness,conformance fact;
123
+ class gates,blocker gate;
96
124
  class verdict result;
97
- class harness harness;
98
- style surfaces fill:#101218,stroke:#2D3340,stroke-width:1px,color:#EDEEF0;
125
+ class handoff harness;
99
126
  linkStyle default stroke:#8A8F98,stroke-width:1.5px;
100
127
  ```
101
128
 
102
- Equivalent reading for text-only environments: ForgeLoop turns routing into
103
- deterministic decisions, state into checkpoint facts, and evidence into
104
- observable claims. Repository and contract facts establish freshness; all
105
- three control surfaces feed conformance and delegation, which produce a
106
- `VALID`, `STALE`, or `INVALID` result for the compatible harness.
129
+ Equivalent reading for text-only environments: adapters load the canonical kit;
130
+ an older target follows validate paths → write and verify hidden files → switch
131
+ manifest authority hash-checked cleanup, while an interrupted migration is
132
+ diagnosed and retried by `doctor`/`update`;
133
+ discovery creates the contract and deterministic route; contract, route, and
134
+ required gates must produce `PREFLIGHT_READY` before the resumable state and
135
+ append-only event ledger authorize the lifecycle. Verification produces
136
+ structured evidence and a receipt. `audit`/`complete` and `validate-protocol`
137
+ then classify the result as `VALID`, `INCOMPLETE`, `STALE`, `INCONSISTENT`, or
138
+ `INVALID`. Optional delegation creates a handoff; it is not an agent runtime.
107
139
 
108
140
  The operational request loop remains:
109
141
 
@@ -125,7 +157,12 @@ project without overwriting local instructions. When the package is available
125
157
  in the npm registry, use the commands below; otherwise use the repository
126
158
  checkout fallback.
127
159
 
160
+ The current published release is `@cassiomc1/forgeloop@0.1.9`.
161
+ Pin this version when a reproducible blind run or release-identity check is
162
+ required:
163
+
128
164
  ```bash
165
+ npx @cassiomc1/forgeloop@0.1.9 --version
129
166
  npx @cassiomc1/forgeloop init
130
167
  npx @cassiomc1/forgeloop doctor
131
168
  npx @cassiomc1/forgeloop update
@@ -133,16 +170,22 @@ npx @cassiomc1/forgeloop update
133
170
 
134
171
  Protocol-support commands are local and do not invoke an agent or model:
135
172
 
173
+ The lifecycle example assumes that the harness has already written a
174
+ schema-valid `.forgeloop/current-contract.json` and the required
175
+ `.forgeloop/gates/*.json` files. `route` persists routing; `preflight` validates
176
+ the contract, route, and gates before execution.
177
+
136
178
  ```bash
137
179
  npx @cassiomc1/forgeloop route --work complete-website --surface ui --risk untrusted-input
138
180
  npx @cassiomc1/forgeloop activate
139
181
  npx @cassiomc1/forgeloop preflight --json
140
182
  npx @cassiomc1/forgeloop next
141
183
  npx @cassiomc1/forgeloop next --json
184
+ npx @cassiomc1/forgeloop advance --to PLANNED
142
185
  npx @cassiomc1/forgeloop advance --to EXECUTING
143
186
  npx @cassiomc1/forgeloop advance --to VERIFYING
144
187
  npx @cassiomc1/forgeloop prepare-completion --json
145
- npx @cassiomc1/forgeloop record-check --id tests --requirement tests --status passed --evidence-kind OBSERVED --command "npm test" --result "exit 0" --json
188
+ npx @cassiomc1/forgeloop record-check --id tests --requirement tests --status passed --evidence-kind OBSERVED --command "npm test" --result "exit 0" --exit-code 0 --json
146
189
  npx @cassiomc1/forgeloop advance --to REVIEWING
147
190
  npx @cassiomc1/forgeloop audit --json
148
191
  npx @cassiomc1/forgeloop complete --json
@@ -153,10 +196,15 @@ npx @cassiomc1/forgeloop inspect --json
153
196
  npx @cassiomc1/forgeloop status --json
154
197
  npx @cassiomc1/forgeloop status --contract-file .forgeloop/current-contract.json --json
155
198
  npx @cassiomc1/forgeloop validate-state --json
156
- npx @cassiomc1/forgeloop validate-receipt --file ./execution-receipt.json --json
157
- npx @cassiomc1/forgeloop validate-protocol --route-file ./routing-result.json --state-file .forgeloop/work-state.json --receipt-file ./execution-receipt.json --contract-file .forgeloop/current-contract.json --json
199
+ npx @cassiomc1/forgeloop validate-receipt --file .forgeloop/execution-receipt.json --json
200
+ 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
158
201
  ```
159
202
 
203
+ For `complete-website`, record one structured check for each required success
204
+ criterion before `complete`; the single `tests` entry above only illustrates the
205
+ command shape. Route, receipt, state, and contract artifacts all live under
206
+ `.forgeloop/` in the target.
207
+
160
208
  The query-driven post-implementation path is:
161
209
 
162
210
  ```text
@@ -176,6 +224,13 @@ implementation
176
224
  `forgeloop next` and `forgeloop next --json` read persisted state only. They do
177
225
  not run project checks or mutate protocol artifacts.
178
226
 
227
+ A `READY` preflight is a resumable checkpoint, not only a status value. It must
228
+ reconcile the contract, route, required gates, `.forgeloop/work-state.json`,
229
+ `.forgeloop/events.ndjson`, and a matching `.forgeloop/preflight.json`. If
230
+ `READY` remains while the work state is missing, `next` returns
231
+ `RESOLVE_BLOCKER` with `E_STATE_MISSING_AFTER_PREFLIGHT_READY`; it does not
232
+ silently fall back to discovery.
233
+
179
234
  `route` expands declared signals into deterministic guide IDs and reason codes.
180
235
  `activate` records a session marker without storing prompts or hidden reasoning.
181
236
  Before implementation, write the canonical contract, persist the route, create
@@ -202,6 +257,11 @@ cross-artifact relationships plus the same derived freshness classification
202
257
  used by `inspect` and `status`. Supply `--contract-file` to compare the saved
203
258
  contract fingerprint with the current contract; omitting it leaves contract
204
259
  freshness as `NOT_VERIFIED` and a complete artifact set requires revalidation.
260
+ When delegation is in scope, also supply the matching repeated
261
+ `--task-brief <path>` and `--delegated-result <path>` inputs. Without those
262
+ inputs it reports `INCOMPLETE` with
263
+ `task briefs and delegated results were not supplied`; that classification is
264
+ separate from a local `complete --json` result of `VALID`.
205
265
  It returns `VALID`, `INCOMPLETE`, `STALE`, `INCONSISTENT`, or `INVALID` with
206
266
  exact invariant codes and derived stale reasons. The persisted
207
267
  `.forgeloop/work-state.json` schema is unchanged: `status`, `stale`, and `fresh`
@@ -224,7 +284,7 @@ forgeloop preflight
224
284
  ```
225
285
 
226
286
  Strict blind conformance is a separate profile. First verify the target
227
- `PROJECT_PROFILE.md`, then use `--strict` consistently with `preflight`,
287
+ `.forgeloop/kit/PROJECT_PROFILE.md`, then use `--strict` consistently with `preflight`,
228
288
  `audit`, and `complete`. Do not evaluate a Standard run with Strict criteria
229
289
  unless that escalation is explicitly recorded.
230
290
 
@@ -260,7 +320,7 @@ target project. Its main threat boundaries are:
260
320
  | 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. |
261
321
  | Command injection | Git inspection uses fixed arguments without a shell; the CLI never treats project text as a command. |
262
322
  | Data exposure | Receipts and checkpoints reject secret-like keys and values; examples use placeholders, and the repository secret scanner runs in CI. |
263
- | Unsafe update overwrite | `update` preserves locally modified files and `PROJECT_PROFILE.md`; adoption and writes remain bounded to the selected target. |
323
+ | 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. |
264
324
  | Dependency supply chain | Runtime code uses Node built-ins only; the package does not install agents, providers, plugins, or remote services. |
265
325
  | Stale replay | Work state records contract and repository fingerprints; drift requires revalidation and never reruns destructive or publication actions automatically. |
266
326
  | Unverified publication | Receipts carry explicit publication booleans; local success never implies a push, pull request, merge, release, or deployment. |
@@ -284,8 +344,17 @@ node src/cli.js update
284
344
  The release workflow uses [npm trusted publishing](https://docs.npmjs.com/trusted-publishers)
285
345
  through GitHub Actions OIDC. Before the first release, register this repository
286
346
  and workflow as the package's trusted publisher in npm; each `vX.Y.Z` tag must
287
- match `package.json`. After publishing, verify the package version and its npm
288
- provenance record.
347
+ match `package.json`. After publishing, verify the complete immutable release
348
+ identity before a blind run:
349
+
350
+ ```bash
351
+ RELEASE_COMMIT="$(git rev-list -n1 vX.Y.Z)"
352
+ npm run release:identity -- --version X.Y.Z --release-commit "$RELEASE_COMMIT"
353
+ ```
354
+
355
+ Only `RELEASE_IDENTITY_VALID` is sufficient. The read-only check compares the
356
+ release commit and GitHub tag with npm's version, `gitHead`, tarball URL,
357
+ SHA-1, and SHA-512 integrity; it never publishes or changes a tag.
289
358
 
290
359
  The commands above use the current directory. To install into another existing
291
360
  project directory, pass a relative or absolute `--path`:
@@ -306,11 +375,23 @@ The target must already exist and be a directory; the CLI will not create or
306
375
  replace an arbitrary path. Use `--dry-run` to preview writes before `init` or
307
376
  `update`. `--json`, `--strict`, and `--adopt <path>` are supported by `doctor`;
308
377
  adoption is limited to a supported adapter that has been reviewed locally. The
309
- CLI records managed files and their hashes in `.forgeloop/manifest.json`; `update`
310
- leaves locally modified files and `PROJECT_PROFILE.md` untouched. If a target
311
- already has a manifest, rerun `update` instead of `init`. Symlinked targets or
312
- template parents are rejected, and unadopted pre-existing adapters are reported
313
- for manual merge with the loop reference.
378
+ CLI records managed files and their hashes in `.forgeloop/manifest.json`; a new
379
+ target receives canonical documents under `.forgeloop/kit/` and only small
380
+ native shims at the root. `update` leaves locally modified files and the
381
+ project profile untouched. If a target already has a manifest, rerun `update`
382
+ instead of `init`. Symlinked targets or template parents are rejected, and
383
+ unadopted pre-existing adapters are reported for manual merge with the loop
384
+ reference.
385
+
386
+ Targets created by an older package layout are migrated by `update`: unchanged
387
+ managed root files move into the hidden kit, while modified or unowned root
388
+ files are preserved and reported as conflicts. The migration never follows a
389
+ symlink or deletes a file whose managed hash no longer matches. The migration
390
+ writes and verifies the complete hidden plan, atomically switches the manifest
391
+ authority, and only then cleans owned legacy files. If a process stops between
392
+ those stages, `doctor` reports `E_MIGRATION_INCOMPLETE` and the next `update`
393
+ retries cleanup only when the recorded legacy hash still matches; modified or
394
+ unowned files remain for manual review.
314
395
 
315
396
  ### Migrate an existing mdfiles installation
316
397
 
@@ -329,32 +410,40 @@ ForgeLoop does not automatically migrate, dual-write, or delete a legacy
329
410
  ### Install in a target project
330
411
 
331
412
  If npm is unavailable, download this public repository as a ZIP or clone it
332
- into a temporary directory. Copy this structure to the target project's root
333
- while preserving relative paths:
413
+ into a temporary directory, then invoke the bundled CLI against the target:
414
+
415
+ ```bash
416
+ node /path/to/forgeloop/src/cli.js init --path /path/to/my-project
417
+ node /path/to/forgeloop/src/cli.js doctor --path /path/to/my-project
418
+ ```
419
+
420
+ Copying source-root files directly is not equivalent to initialization: the
421
+ canonical documents must be mapped into the hidden kit and the native adapters
422
+ must remain thin. The resulting target layout is:
334
423
 
335
424
  ```text
336
425
  AGENTS.md
337
426
  CLAUDE.md
338
- AGENT_COMPATIBILITY.md
339
- LOOP_ENGINEERING.md
340
- GUIDE_ROUTER.md
341
- PROJECT_PROFILE.md
342
- LOOP_SYSTEM_DESIGN.md
343
- QUALITY_SCORECARD.md
344
- TERMINOLOGY.md
345
- EXECUTION_STATE.md
346
- DELEGATION_PROTOCOL.md
347
- ORCHESTRATOR_INTEGRATION.md
348
- THREAT_MODEL.md
349
- CONTRACT_COVERAGE.md
350
- THIRD_PARTY_NOTICES.md
351
- LICENSE
352
- LICENSE-DOCS.md
353
427
  .forgeloop/.gitignore
428
+ .forgeloop/kit/AGENT_COMPATIBILITY.md
429
+ .forgeloop/kit/LOOP_ENGINEERING.md
430
+ .forgeloop/kit/GUIDE_ROUTER.md
431
+ .forgeloop/kit/PROJECT_PROFILE.md
432
+ .forgeloop/kit/LOOP_SYSTEM_DESIGN.md
433
+ .forgeloop/kit/QUALITY_SCORECARD.md
434
+ .forgeloop/kit/TERMINOLOGY.md
435
+ .forgeloop/kit/EXECUTION_STATE.md
436
+ .forgeloop/kit/DELEGATION_PROTOCOL.md
437
+ .forgeloop/kit/ORCHESTRATOR_INTEGRATION.md
438
+ .forgeloop/kit/THREAT_MODEL.md
439
+ .forgeloop/kit/CONTRACT_COVERAGE.md
440
+ .forgeloop/kit/THIRD_PARTY_NOTICES.md
441
+ .forgeloop/kit/LICENSE
442
+ .forgeloop/kit/LICENSE-DOCS.md
443
+ .forgeloop/kit/ENG/
444
+ .forgeloop/kit/schemas/
354
445
  .github/copilot-instructions.md
355
446
  .cursor/rules/project-loop.mdc
356
- ENG/
357
- schemas/
358
447
  ```
359
448
 
360
449
  If the target already has `AGENTS.md`, `CLAUDE.md`, Copilot instructions, or
@@ -366,8 +455,10 @@ maintain and validate this source repository.
366
455
  ### First run
367
456
 
368
457
  On the first task in a target project with code or manifests, change
369
- `profile-mode` from `template` to `project`, discover the stack, and record only
370
- confirmed facts in `PROJECT_PROFILE.md`. Keep `language: en`.
458
+ `profile-mode` from `template` to `project` in
459
+ `.forgeloop/kit/PROJECT_PROFILE.md`, discover the stack, and record only
460
+ confirmed facts there. In this source checkout, the canonical profile is the
461
+ root `PROJECT_PROFILE.md`. Keep `language: en`.
371
462
 
372
463
  The profile must not store tokens, passwords, keys, credentials, or task logs.
373
464
  Unknown commands remain unverified until a real source identifies them.
@@ -392,7 +483,7 @@ package installation or its automated tests.
392
483
  ### Update the kit
393
484
 
394
485
  When adopting a newer version, preserve target-specific facts from
395
- `PROJECT_PROFILE.md`. Compare adapters before replacing them, update the loop,
486
+ `.forgeloop/kit/PROJECT_PROFILE.md`. Compare adapters before replacing them, update the loop,
396
487
  router, notices, and guides as one coherent set, and never erase local
397
488
  instructions. If validators were copied, run:
398
489
 
@@ -447,8 +538,9 @@ Optional provider-backed operations follow this boundary:
447
538
 
448
539
  Provide optional credentials through the process environment or the official
449
540
  Qwen configuration file at `~/.qwen-mm-plugins/config` (or its documented
450
- override). Never put keys in Git, `PROJECT_PROFILE.md`, or copied instruction
451
- files. The agent must leave an API-backed capability disabled when its key or
541
+ override). Never put keys in Git, the target's
542
+ `.forgeloop/kit/PROJECT_PROFILE.md`, or copied instruction files. The agent must
543
+ leave an API-backed capability disabled when its key or
452
544
  service endpoint is absent, and report missing system dependencies instead of
453
545
  claiming that the feature is available.
454
546
 
@@ -477,12 +569,12 @@ adoption. Local rendering requires Node.js 22+ and FFmpeg.
477
569
  ├── AGENT_COMPATIBILITY.md # supported agents and official sources
478
570
  ├── LOOP_ENGINEERING.md # canonical operating cycle
479
571
  ├── GUIDE_ROUTER.md # contextual guide selection
480
- ├── PROJECT_PROFILE.md # verified project facts
572
+ ├── PROJECT_PROFILE.md # source profile (target copy is under .forgeloop/kit/)
481
573
  ├── LOOP_SYSTEM_DESIGN.md # architecture and boundaries
482
574
  ├── THIRD_PARTY_NOTICES.md # provenance and rights
483
575
  ├── LICENSE # CLI and validator code license
484
576
  ├── LICENSE-DOCS.md # original documentation license boundary
485
- ├── ENG/ # eight English guides
577
+ ├── ENG/ # package-source English guides
486
578
  ├── .cursor/rules/ # always-active Cursor rule
487
579
  ├── .github/copilot-instructions.md # GitHub Copilot entry point
488
580
  ├── .github/workflows/ # quality automation
@@ -495,6 +587,11 @@ adoption. Local rendering requires Node.js 22+ and FFmpeg.
495
587
  └── README.md
496
588
  ```
497
589
 
590
+ The source repository keeps canonical documents at the root for package
591
+ development and validation. A bootstrapped target uses the hidden-kit layout
592
+ shown above; mutable contract, route, state, gate, event, preflight, and
593
+ receipt artifacts remain directly under `.forgeloop/`.
594
+
498
595
  ## Maintenance
499
596
 
500
597
  - Preserve guide requirements, exceptions, numbers, examples, and references when editing.
@@ -127,3 +127,14 @@ collection. Do not host, redistribute, or infer rights for a font, image,
127
127
  template, prompt, audio asset, or other premium material from a citation or
128
128
  catalog listing. Verify the exact resource's author, license, attribution,
129
129
  hosting, and current terms before use.
130
+
131
+ ## Taste Skill
132
+
133
+ The contextual frontend taste guide is informed by Taste Skill:
134
+
135
+ - Taste Skill, Copyright (c) 2026 Leonxlnx, MIT License.
136
+ - Source: <https://github.com/leonxlnx/taste-skill>
137
+
138
+ ForgeLoop includes a short, adapted guide under `ENG/taste-frontend-eng.md`.
139
+ It does not vendor upstream runtime code, depend on its repository at runtime,
140
+ or make its prescriptive examples universal.
package/THREAT_MODEL.md CHANGED
@@ -12,7 +12,7 @@ remaining trust boundaries and their executable evidence.
12
12
  | --- | --- | --- | --- | --- | --- |
13
13
  | Path traversal | Writes or reads outside the selected target | Target path and every managed relative path | `ensureWithin`, safe-path checks, realpath containment, Windows-drive rejection | A separately privileged process can change the filesystem after validation | `tests/core.test.js`, `tests/portability.test.js`, `tests/fixtures/protocol/invalid/path-traversal.json` |
14
14
  | Symlink escape | Redirects a managed path to another directory | Existing target parents and artifact paths | Reject symlinked targets, parents, and destinations before access | The check is not a filesystem lock | `tests/core.test.js`, `tests/portability.test.js`, `tests/fixtures/protocol/invalid/symlink-target.json` |
15
- | Malicious manifest | Causes unsafe update or false ownership claims | `.forgeloop/manifest.json` | Schema, hash, safe-path, and preserve-flag validation; conflicts remain visible | A trusted operator can still deliberately edit the manifest | `tests/cli.test.js`, `tests/core.test.js` |
15
+ | Malicious manifest | Causes unsafe update or false ownership claims | `.forgeloop/manifest.json` | Schema, managed/legacy hash, safe-path, and preserve-flag validation; incomplete migration remains visible | A trusted operator can still deliberately edit the manifest | `tests/cli.test.js`, `tests/core.test.js`, `tests/hidden-layout.test.js` |
16
16
  | Malicious work-state | Resumes stale, secret-bearing, or invalid work | `.forgeloop/work-state.json` | Schema/semantic checks, version checks, transition checks, contract/HEAD/artifact freshness, secret scan, size/depth bounds | Freshness cannot prove that an external process did not alter a file immediately afterward | `tests/work-state.test.js`, `tests/checkpoint-freshness.test.js`, `tests/security-limits.test.js` |
17
17
  | Forged preparation | Makes an agent's prose claim look like a completed preflight | Contract, route, gate, and preflight artifacts | Canonical SHA-256 fingerprints, guide-declared gate requirements, stale-artifact checks, and `E_*` failures | The CLI cannot stop a separate process from writing project files before preflight | `tests/protocol-artifacts.test.js`, `tests/preflight.test.js` |
18
18
  | Chronology rewrite | Hides execution before route, gates, or verification | `.forgeloop/events.ndjson` | Append-only local ledger, sequence numbers, hash chaining, and chronology validation without prompts or hidden reasoning | A privileged process can still replace the ledger after validation | `tests/lifecycle.test.js` |
@@ -4,6 +4,10 @@ These scenarios are adapter-facing contracts. They describe requests and the
4
4
  artifacts a live agent must produce; they do not invoke a model runtime and are
5
5
  not part of the deterministic `npm test` execution path.
6
6
 
7
+ The current published baseline for new runs is
8
+ `@cassiomc1/forgeloop@0.1.9`. Pin that version when preparing a reproducible
9
+ blind run; historical reports retain the exact package version they used.
10
+
7
11
  Run a scenario in a disposable target using the Standard profile first:
8
12
 
9
13
  ```bash
@@ -32,7 +36,7 @@ implementation
32
36
  Use the Strict profile only as a separate experiment:
33
37
 
34
38
  ```bash
35
- # PROJECT_PROFILE.md must be verified before this profile starts.
39
+ # .forgeloop/kit/PROJECT_PROFILE.md must be verified before this profile starts.
36
40
  npx @cassiomc1/forgeloop preflight --strict --json
37
41
  npx @cassiomc1/forgeloop audit --strict --json
38
42
  npx @cassiomc1/forgeloop complete --strict --json
@@ -43,6 +47,34 @@ diagnostic records belong under [`conformance/runs/`](./runs/); they must not
43
47
  contain secrets, credentials, hidden reasoning, or unnecessary conversation
44
48
  history.
45
49
 
50
+ ## Release identity evidence
51
+
52
+ Every live-run report records the exact published package used by the target.
53
+ Include all of these fields before sending the blind prompt:
54
+
55
+ ```text
56
+ package: @cassiomc1/forgeloop@X.Y.Z
57
+ npm gitHead: <40-character commit SHA>
58
+ release commit: <40-character commit SHA>
59
+ GitHub tag: vX.Y.Z -> <40-character commit SHA>
60
+ tarball URL: https://registry.npmjs.org/...
61
+ tarball SHA-1: <40-character hex digest>
62
+ npm SHA-512 integrity: sha512-<base64 digest>
63
+ release identity: RELEASE_IDENTITY_VALID
64
+ ```
65
+
66
+ Run the repository's read-only verifier against the exact release commit:
67
+
68
+ ```bash
69
+ RELEASE_COMMIT="$(git rev-list -n1 vX.Y.Z)"
70
+ npm run release:identity -- --version X.Y.Z --release-commit "$RELEASE_COMMIT"
71
+ ```
72
+
73
+ Do not interpret a local package version, a green build, or a tarball URL by
74
+ itself as publication proof. If the verifier cannot establish every identity
75
+ field, record `RELEASE_IDENTITY_NOT_VERIFIED` or
76
+ `RELEASE_IDENTITY_INVALID` and do not start the blind run.
77
+
46
78
  The complete-website scenario deliberately fails when implementation starts
47
79
  before the contract, route, and required gates exist.
48
80
 
@@ -73,3 +105,9 @@ cannot disable a mandatory approval workflow, record `TEST_NOT_STARTED` and do
73
105
  not interpret the run as a conformance failure or success. An installed
74
106
  workflow and a compatible workflow are separate claims; use
75
107
  `INCOMPATIBLE WITH AUTONOMOUS MODE`, not "broken", for the former.
108
+
109
+ Every live-run report must classify how it ended with exactly one
110
+ `terminationSource`: `AGENT`, `OPERATOR`, `HARNESS`, `TIMEOUT`, or `BLOCKER`.
111
+ An operator-terminated run is recorded as `RUN_STATUS: OPERATOR_INTERRUPTED`,
112
+ `CONFORMANCE: PARTIAL`, with post-termination capabilities marked
113
+ `NOT_REACHED` and the smallest failure class `OPERATOR_INTERRUPTION`.
@@ -3,5 +3,5 @@
3
3
  "surfaces": ["ui", "forms"],
4
4
  "risks": ["accessibility"],
5
5
  "platforms": ["web"],
6
- "guides": ["premium", "design", "accessibility", "clean", "test", "security", "performance"]
6
+ "guides": ["premium", "design", "taste", "accessibility", "clean", "test", "security", "performance"]
7
7
  }
@@ -3,5 +3,5 @@
3
3
  "surfaces": ["ui", "forms"],
4
4
  "risks": ["accessibility"],
5
5
  "platforms": ["web"],
6
- "guides": ["premium", "design", "accessibility", "clean", "test", "security", "performance"]
6
+ "guides": ["premium", "design", "taste", "accessibility", "clean", "test", "security", "performance"]
7
7
  }