@cassiomc1/forgeloop 1.10.0 → 1.10.1

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.
Files changed (60) hide show
  1. package/DOCS_INDEX.md +9 -0
  2. package/LOOP_ENGINEERING.md +4 -4
  3. package/LOOP_SYSTEM_DESIGN.md +23 -0
  4. package/QUALITY_SCORECARD.md +2 -2
  5. package/README.md +13 -0
  6. package/docs/AGENT_PROTOCOL_SUMMARY.md +1 -1
  7. package/docs/ARTIFACT_REFERENCE.md +15 -0
  8. package/docs/CODE_ATTESTATION.md +9 -0
  9. package/docs/DOCUMENTATION_GUIDE.md +4 -4
  10. package/docs/EXECUTION_PROFILE_BENCHMARKS.md +10 -0
  11. package/docs/MCP.md +13 -1
  12. package/docs/PACKAGE_CONTENTS.md +83 -0
  13. package/docs/RELEASE_CHECKLIST.md +8 -0
  14. package/docs/REVISION_PROVIDERS.md +9 -0
  15. package/docs/TROUBLESHOOTING.md +12 -0
  16. package/docs/assets/diagrams/forgeloop-code-attestation-flow.html +13 -2
  17. package/docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json +6 -6
  18. package/docs/assets/diagrams/forgeloop-code-attestation-flow.svg +10 -1
  19. package/docs/assets/diagrams/forgeloop-engineering-flow.html +22 -11
  20. package/docs/assets/diagrams/forgeloop-engineering-flow.receipt.json +6 -6
  21. package/docs/assets/diagrams/forgeloop-engineering-flow.svg +17 -8
  22. package/docs/assets/diagrams/forgeloop-verification-trust-flow.html +14 -3
  23. package/docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json +6 -6
  24. package/docs/assets/diagrams/forgeloop-verification-trust-flow.svg +10 -1
  25. package/docs/diagrams/README.md +17 -0
  26. package/docs/diagrams/forgeloop-code-attestation-flow.workflow.json +383 -57
  27. package/docs/diagrams/forgeloop-engineering-flow.workflow.json +374 -55
  28. package/docs/diagrams/forgeloop-verification-trust-flow.workflow.json +328 -47
  29. package/docs/diagrams/reviews/forgeloop-code-attestation-flow.review.json +4 -4
  30. package/docs/diagrams/reviews/forgeloop-engineering-flow.review.json +4 -4
  31. package/docs/diagrams/reviews/forgeloop-verification-trust-flow.review.json +4 -4
  32. package/package.json +13 -4
  33. package/scripts/CI_VALIDATORS.md +24 -0
  34. package/scripts/check-critical-coverage.mjs +9 -0
  35. package/src/commands/doctor.js +11 -10
  36. package/src/core/actions.js +2 -2
  37. package/src/core/approvals.js +2 -2
  38. package/src/core/artifacts.js +3 -3
  39. package/src/core/checks.js +0 -33
  40. package/src/core/completion.js +2 -2
  41. package/src/core/events.js +5 -5
  42. package/src/core/execution-profile.js +18 -5
  43. package/src/core/next-action-pending-actions.js +255 -0
  44. package/src/core/next-action-phases.js +26 -764
  45. package/src/core/next-action-planned-phase.js +51 -0
  46. package/src/core/next-action-quality-guidance.js +19 -0
  47. package/src/core/next-action-recovery-phases.js +97 -0
  48. package/src/core/next-action-refresh.js +20 -0
  49. package/src/core/next-action-review-phase.js +189 -0
  50. package/src/core/next-action-verification-phase.js +192 -0
  51. package/src/core/task-recovery.js +2 -2
  52. package/src/core/transaction-maintenance.js +70 -0
  53. package/src/core/transaction.js +31 -10
  54. package/src/core/work-state.js +5 -5
  55. package/src/integration.d.ts +19 -3
  56. package/src/integration.js +1 -0
  57. package/src/core/cli-metadata.js +0 -23
  58. package/src/core/decision-classification.js +0 -55
  59. package/src/core/gates.js +0 -57
  60. package/src/core/workflow-compatibility.js +0 -151
package/DOCS_INDEX.md CHANGED
@@ -38,6 +38,7 @@ integration and guide context. Use this map before editing documentation.
38
38
  | Knowledge sources and provenance | [`docs/KNOWLEDGE_SOURCES.md`](./docs/KNOWLEDGE_SOURCES.md) | Snapshot, licensing observations, source roles, accepted/skipped concepts, and reuse boundaries |
39
39
  | Documentation guide | [`docs/DOCUMENTATION_GUIDE.md`](./docs/DOCUMENTATION_GUIDE.md) | Rules and checklist for modifying documentation |
40
40
  | Current release checklist | [`docs/RELEASE_CHECKLIST.md`](./docs/RELEASE_CHECKLIST.md) | Package, protocol, attestation, integration, and publication gates |
41
+ | Core npm package contents | [`docs/PACKAGE_CONTENTS.md`](./docs/PACKAGE_CONTENTS.md) | Published consumer surface, intentional inclusions, exclusions, and clean-room verification |
41
42
  | ForgeLoop 1.6.1 release checklist (historical) | [`docs/RELEASE_CHECKLIST_1_6_1.md`](./docs/RELEASE_CHECKLIST_1_6_1.md) | Verification adapter boundary, isolation invariants, and publication gates |
42
43
  | ForgeLoop 1.5/MCP release checklist (historical) | [`docs/RELEASE_CHECKLIST_1_5_MCP.md`](./docs/RELEASE_CHECKLIST_1_5_MCP.md) | Integration API v1, MCP package, and publication gates |
43
44
  | ForgeLoop 1.4 release checklist | [`docs/RELEASE_CHECKLIST_1_4.md`](./docs/RELEASE_CHECKLIST_1_4.md) | Claim-recovery, compatibility, package, and publication gates |
@@ -57,6 +58,13 @@ integration and guide context. Use this map before editing documentation.
57
58
  | Code Attestation Chain | [`docs/CODE_ATTESTATION.md`](./docs/CODE_ATTESTATION.md#completion-flow) | Completion, exact-content manifest, in-toto statement, optional signing, and range coverage |
58
59
  | Real Execution Proof of Concept (PoC) | [`poc/README.md`](./poc/README.md) | Non-normative, reproducible public engineering workload, audit evidence, and technical audit. Normative behavior remains owned by [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md). |
59
60
 
61
+ ## Recent implementation review
62
+
63
+ The repository-local [Astra implementation record](./docs/ASTRA_IMPLEMENTATION.md)
64
+ maps the completed findings to code, tests, measurements, and remaining limits.
65
+ Use the canonical guides below for operational instructions; the audit record
66
+ is historical evidence and is not part of the published core package.
67
+
60
68
  ## Audience map
61
69
 
62
70
  | I am a... | Start here |
@@ -98,6 +106,7 @@ integration and guide context. Use this map before editing documentation.
98
106
  - **Integrate a new AI environment**: [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md)
99
107
  - **Map ForgeLoop state into an external runtime/orchestrator**: [`ORCHESTRATOR_INTEGRATION.md`](./ORCHESTRATOR_INTEGRATION.md)
100
108
  - **Edit documentation safely**: [`docs/DOCUMENTATION_GUIDE.md`](./docs/DOCUMENTATION_GUIDE.md)
109
+ - **Audit the npm package boundary**: [`docs/PACKAGE_CONTENTS.md`](./docs/PACKAGE_CONTENTS.md)
101
110
  - **Verify source-content attestations**: [`docs/CODE_ATTESTATION.md`](./docs/CODE_ATTESTATION.md)
102
111
  - **Understand narrow verification and checker binding**: [`docs/REVISION_PROVIDERS.md`](./docs/REVISION_PROVIDERS.md#differential-verification-scope)
103
112
  - **Inspect the governed diagrams**: [`docs/diagrams/README.md`](./docs/diagrams/README.md)
@@ -393,8 +393,8 @@ DESTRUCTIVE_ACTION_REQUIRED
393
393
  ```
394
394
 
395
395
  Multiple reasonable aesthetic or positioning choices do not justify a question.
396
- The deterministic support helper in `src/core/decision-classification.js`
397
- validates this boundary; it does not use an LLM or parse natural language.
396
+ The executable test example in `tests/helpers/decision-classification.js`
397
+ illustrates this boundary; runtime authority remains with this protocol and the task contract. The example does not use an LLM or parse natural language.
398
398
 
399
399
  ### Contract-before-clarification sequence
400
400
 
@@ -508,8 +508,8 @@ The compatibility distinction is explicit:
508
508
  "Installed" and "compatible" are different claims. A harness can have an
509
509
  external workflow installed and still be `INCOMPATIBLE WITH AUTONOMOUS MODE`.
510
510
  Use that wording instead of calling the workflow broken. The deterministic
511
- support helper in `src/core/workflow-compatibility.js` evaluates this boundary;
512
- it does not modify `src/core/decision-classification.js`, invoke an LLM, or
511
+ test example in `tests/helpers/workflow-compatibility.js` exercises this boundary;
512
+ it does not modify `tests/helpers/decision-classification.js`, invoke an LLM, or
513
513
  redesign a runtime, arbiter, supervisor, or approval broker.
514
514
 
515
515
  For the sixth blind conformance run, exclude mandatory-approval workflows at
@@ -561,3 +561,26 @@ canonical trace/reflection evidence. They preserve unknown usage values and
561
561
  only compare efficiency when a project-local reference scenario exists. The
562
562
  existing diagnostic and reflection model remains the authority for information
563
563
  gain, intervention effectiveness, failure signatures, and oscillation.
564
+
565
+ ## Transaction identity and diagnostic retention
566
+
567
+ The transaction context binds the physical project root and task ID. Nested
568
+ operations reject cross-project reuse, even when task IDs match. Filesystem
569
+ aliases of the same physical project remain compatible. Reads and writes of
570
+ transaction-aware artifacts enforce the same project boundary.
571
+
572
+ Committed transactions, successful rollbacks, and failures aborted before
573
+ publication are terminal. `doctor --fix` recovers eligible committing
574
+ transactions under their task locks, then recomputes incomplete findings.
575
+ This does not imply that an ambiguous external action was reconciled.
576
+
577
+ Repository maintenance can preview or compact old terminal stage/backup
578
+ payloads with `npm run transactions:compact`. Manifests and event ledgers
579
+ remain intact; recent, ambiguous, invalid, locked, and unsafe records are
580
+ preserved. See [maintenance usage](CONTRIBUTING.md#focused-verification-and-maintenance).
581
+
582
+ Lifecycle selection keeps common identity, freshness, gates, and chronology
583
+ checks ahead of phase-specific resolvers. Planning, verification, review,
584
+ recovery, and pending-action modules organize decisions without changing that
585
+ precedence. Executable protocol examples under `tests/helpers` are test
586
+ fixtures, not runtime policy authorities.
@@ -106,8 +106,8 @@ are both present:
106
106
  | Protocol activation resumability | `src/core/resumability.js`, READY consistency checks, event matrix, and `next` repair semantics | `tests/resumable-protocol.test.js` |
107
107
  | Hidden kit layout | `src/core/target-layout.js`, safe init/update migration, manifest layout version, native shims, and profile resolver | `tests/hidden-layout.test.js`, package and compatibility tests |
108
108
  | Contextual frontend taste | `ENG/taste-frontend-eng.md`, router metadata, attribution, and design/accessibility precedence | `tests/taste-guide.test.js`, route fixtures |
109
- | Pre-contract autonomy — structural | `LOOP_ENGINEERING.md`, `src/core/decision-classification.js`, `src/core/workflow-compatibility.js`, `CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`, `.cursor/rules/project-loop.mdc` | `tests/decision-classification.test.js`, `tests/workflow-compatibility.test.js`, `tests/autonomy-policy.test.js`, `tests/preflight.test.js` |
110
- | External workflow compatibility — structural | `LOOP_ENGINEERING.md`, `PROTOCOL_INTEGRATION.md`, `src/core/workflow-compatibility.js`, and sixth-run harness metadata rule | `tests/workflow-compatibility.test.js`, `conformance/README.md` |
109
+ | Pre-contract autonomy — structural | `LOOP_ENGINEERING.md`, `tests/helpers/decision-classification.js`, `tests/helpers/workflow-compatibility.js`, `CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`, `.cursor/rules/project-loop.mdc` | `tests/decision-classification.test.js`, `tests/workflow-compatibility.test.js`, `tests/autonomy-policy.test.js`, `tests/preflight.test.js` |
110
+ | External workflow compatibility — structural | `LOOP_ENGINEERING.md`, `PROTOCOL_INTEGRATION.md`, `tests/helpers/workflow-compatibility.js`, and sixth-run harness metadata rule | `tests/workflow-compatibility.test.js`, `conformance/README.md` |
111
111
  | Instruction-conflict handling — structural | Canonical source-attribution and `WORKFLOW_CONFLICT` policy in `LOOP_ENGINEERING.md` plus adapter references | `tests/autonomy-policy.test.js`, `tests/workflow-compatibility.test.js` |
112
112
  | Autonomous-mode precedence — structural | Autonomous/interactive mode contract and harness exclusion metadata | `tests/workflow-compatibility.test.js`, `tests/conformance-scenarios.test.js` |
113
113
  | Pre-contract autonomy — cross-agent live robustness | Prior third blind-run result, `conformance/runs/2026-08-13-codex-fourth-live.md`, preserved fifth-run report `conformance/runs/2026-08-13-codex-fifth-live.md`, and the exact blind request | `tests/conformance-scenarios.test.js`; sixth run is not started until mandatory approval is excluded |
package/README.md CHANGED
@@ -462,6 +462,19 @@ validator-backed completion. Drift reopens verification, and migration keeps
462
462
  modified or unmanaged files for review. The terminal result is one of
463
463
  `VALID`, `INCOMPLETE`, `STALE`, `INCONSISTENT`, or `INVALID`.
464
464
 
465
+ Before execution, profile selection reads structured obligations and explicit
466
+ risks; exclusion constraints are not required actions. After a blocked
467
+ preflight and contract revision, `next` may guide a checkpoint refresh through
468
+ `clear-state` and a fresh preflight. This path requires a valid pre-execution
469
+ ledger and routing bound to the revised contract. Execution transactions bind
470
+ the physical project and task; a matching task ID in another project cannot
471
+ reuse them. See [recovery guidance](./docs/TROUBLESHOOTING.md#revised-contract-after-a-blocked-preflight).
472
+
473
+ CI audits each supplied task receipt explicitly. With no receipt it reports
474
+ `NOT_VERIFIED`; green repository tests alone do not establish lifecycle
475
+ completion or attestation. For contributor checks and safe payload retention,
476
+ see [CONTRIBUTING.md](./CONTRIBUTING.md#focused-verification-and-maintenance).
477
+
465
478
  ## Protocol compatibility
466
479
 
467
480
  The npm package version is independent of protocol version. The current
@@ -7,7 +7,7 @@
7
7
  ForgeLoop is a portable protocol and support CLI for verifiable engineering workflows. It records and validates task state, contracts, routing, checks, evidence, continuity, and optional code attestations. It does not become an agent scheduler, delegation service, source-control authority, or secret manager.
8
8
 
9
9
  Protocol version: 1
10
- Package version: 1.10.0
10
+ Package version: 1.10.1
11
11
 
12
12
  ## Canonical loop
13
13
 
@@ -1217,3 +1217,18 @@ For `BASELINE` artifacts and `PASS`/`FAIL` evaluations, `sourceMaterialFingerpri
1217
1217
  and stable `sourceObservation` are conditionally required; their before and after
1218
1218
  fingerprints must equal the bound source fingerprint. `BLOCKED` and
1219
1219
  `NOT_OBSERVED` artifacts may omit these observed-source fields.
1220
+
1221
+ ## Transaction diagnostics and retention
1222
+
1223
+ `.forgeloop/.txn/<transactionId>/manifest.json` records transaction identity,
1224
+ status, staged writes, and recovery diagnostics. `COMMITTED`, `ROLLED_BACK`,
1225
+ and `ABORTED` are terminal; an aborted staging callback did not publish its
1226
+ staged writes. A successful recovery is not reported as incomplete on the next
1227
+ doctor inspection. The transaction lock still protects recovery from live
1228
+ writers.
1229
+
1230
+ The repository maintenance command described in
1231
+ [CONTRIBUTING.md](../CONTRIBUTING.md#focused-verification-and-maintenance)
1232
+ compacts eligible stage/backup payloads only. It retains manifests and ledgers,
1233
+ so historical manifest enumeration remains linear. These diagnostics are not
1234
+ substitutes for a valid execution receipt or external-action reconciliation.
@@ -139,3 +139,12 @@ distinguished from invalid attestations by the stable exit-code contract:
139
139
 
140
140
  See [`REVISION_PROVIDERS.md`](./REVISION_PROVIDERS.md) and
141
141
  [`SIGNING_PROVIDERS.md`](./SIGNING_PROVIDERS.md) for extension boundaries.
142
+
143
+ ## Receipt availability in repository CI
144
+
145
+ The repository audit workflow checks supplied task receipts individually with
146
+ an explicit task ID. A checkout without a receipt reports `NOT_VERIFIED`.
147
+ That is absence of lifecycle evidence, not an attestation trust level; it does
148
+ not mean `PROCESSED`, `VERIFIED`, or `ATTESTED`. CI does not fabricate a receipt
149
+ from successful repository tests. Transaction payload compaction preserves
150
+ the manifests and ledgers needed to inspect the original history.
@@ -24,12 +24,12 @@ ForgeLoop strictly separates normative protocol definitions from operational doc
24
24
  When updating documentation, always derive content from its authoritative source:
25
25
 
26
26
  ```text
27
- CLI syntax truth -> CLI registry / parser (src/cli.js, src/core/cli-command-definitions.js, src/core/cli-metadata.js)
27
+ CLI syntax truth -> CLI registry / parser (src/cli.js, src/core/cli-command-definitions.js)
28
28
  Artifact shape truth -> JSON schemas (schemas/*.schema.json, src/core/artifact-registry.js)
29
29
  Lifecycle truth -> protocol / state machine (src/core/protocol.js)
30
30
  Reason-code truth -> exported protocol constants (src/core/error-codes.js, src/core/protocol.js)
31
31
  Guide registry truth -> canonical guide registry (src/config/guides.json)
32
- Package contents truth -> package.json + package tests (tests/package.test.js)
32
+ Package contents truth -> package.json + docs/PACKAGE_CONTENTS.md + package tests (tests/package.test.js)
33
33
  Documentation routing -> DOCS_INDEX.md
34
34
  Integration API truth -> src/integration.js (exports, envelope, limits, risk classes, resources)
35
35
  MCP behavior truth -> integrations/mcp/src/* and integrations/mcp/package.json
@@ -119,7 +119,7 @@ conformance checks detect omissions.
119
119
 
120
120
  | Documentation Area | Canonical Machine Source | Conformance Validator |
121
121
  | --- | --- | --- |
122
- | **CLI commands & flags** | `CLI_COMMAND_METADATA` (`src/core/cli-metadata.js`) & `src/cli.js` | `scripts/validate_documentation_conformance.mjs` |
122
+ | **CLI commands & flags** | `CLI_COMMAND_DEFINITIONS` (`src/core/cli-command-definitions.js`) & `src/cli.js` | `scripts/validate_documentation_conformance.mjs` |
123
123
  | **Artifact paths** | `ARTIFACT_REGISTRY` & `task-paths.js` | `scripts/validate_documentation_conformance.mjs` |
124
124
  | **Artifact fields & types** | `schemas/*.schema.json` | `scripts/validate_documentation_conformance.mjs` |
125
125
  | **Enums & consts** | `schemas/*.schema.json` | `scripts/validate_documentation_conformance.mjs` |
@@ -128,7 +128,7 @@ conformance checks detect omissions.
128
128
  | **Stable error codes** | `PUBLIC_ERROR_CODES` (`src/core/error-codes.js`) | `scripts/validate_documentation_conformance.mjs` |
129
129
  | **Discovery resume rules** | `DISCOVERY_SURFACES` & `nativeShim` | `scripts/validate_documentation_conformance.mjs` |
130
130
  | **Task-layout path freshness** | `TASK_LAYOUT_DOCUMENTS` & `task-paths.js` | `scripts/validate_documentation_conformance.mjs` |
131
- | **Package-shipped docs** | `package.json` (`files`) | `tests/package.test.js` |
131
+ | **Package-shipped docs and runtime** | `package.json` (`files`) + `docs/PACKAGE_CONTENTS.md` | `tests/package.test.js` + `scripts/package_smoke.mjs` |
132
132
  | **Architecture and trust diagrams** | `docs/diagrams/manifest.json` plus each typed workflow source | `scripts/check-documentation-diagrams.mjs` and `scripts/documentation-diagram-inventory.mjs` |
133
133
 
134
134
  ---
@@ -421,3 +421,13 @@ The source policy is intentionally narrow: provider or host observations are
421
421
  accepted for benchmark claims, while actor-reported or absent telemetry stays
422
422
  non-comparable. This is an efficiency observation boundary, not verification
423
423
  evidence and not an external publication result.
424
+
425
+ ## Contract signals and exclusions
426
+
427
+ Profile selection reads string and structured success/verification
428
+ requirements, including nested requirements and explicit publication or
429
+ production-readiness types. Constraints and stop conditions describe
430
+ boundaries and are excluded from obligation scanning. For example, a
431
+ constraint saying “No publication” does not create a publication requirement.
432
+ An explicit route risk remains authoritative and can still raise the safety
433
+ floor. Profiles classify work; they do not grant execution authority.
package/docs/MCP.md CHANGED
@@ -135,7 +135,7 @@ forgeloop-mcp-http --project /repo --mode safe # 127.0.0.1:3333
135
135
 
136
136
  | Component | Current contract |
137
137
  | --- | --- |
138
- | ForgeLoop core package | `>=1.5.0 <2` dependency range; current release `1.10.0` |
138
+ | ForgeLoop core package | `>=1.5.0 <2` dependency range; current release `1.10.1` |
139
139
  | ForgeLoop protocol | `1` |
140
140
  | Integration API | `1` |
141
141
  | MCP package | `0.1.x` initial package |
@@ -187,3 +187,15 @@ list in [TROUBLESHOOTING](./TROUBLESHOOTING.md):
187
187
 
188
188
  Canonical ForgeLoop errors (e.g. `E_TASK_SCOPE_CONFLICT`,
189
189
  `E_TASK_CLAIM_OWNERSHIP_INCONSISTENT`) are always preserved verbatim.
190
+
191
+ ## Reproducible adapter verification
192
+
193
+ The adapter commits its own lockfile and declares both server and test-client
194
+ SDK versions. `npm run mcp:setup` installs that lock with lifecycle scripts
195
+ disabled, then substitutes the locally packed core offline. Packed smoke uses
196
+ the same dependency graph and substitutes both local tarballs using the system
197
+ `tar` command. This replacement does not resolve registry metadata or require a
198
+ warm npm cache; `npm ci` still retrieves the locked dependencies. Both paths
199
+ verify resolved dependency versions and print lock/tarball SHA-256 identities.
200
+ The adapter remains a separate package; these dependencies are not added to
201
+ the ForgeLoop core runtime.
@@ -0,0 +1,83 @@
1
+ # Core npm package contents
2
+
3
+ This page describes the intentional boundary of the published
4
+ `@cassiomc1/forgeloop` package. The [`files`](../package.json) list in
5
+ `package.json` is the packaging source of truth, while the repository's
6
+ `tests/package.test.js` and clean-room `scripts/package_smoke.mjs` checks keep
7
+ the boundary executable. Those test files are repository tooling and are not
8
+ part of the consumer tarball.
9
+
10
+ ## Consumer surface
11
+
12
+ The package exposes the `forgeloop` executable from `src/cli.js` and the
13
+ `@cassiomc1/forgeloop/integration` subpath from `src/integration.js`, with its
14
+ declaration file. The package has no runtime dependencies and requires Node.js
15
+ 20 or newer.
16
+
17
+ ## Included files
18
+
19
+ The published tarball includes the following consumer-facing groups:
20
+
21
+ - **Runtime and protocol:** every maintained JavaScript module under `src/`,
22
+ the guide registry, protocol templates, JSON schemas, completions, and the
23
+ generic CI verifier. Four retired compatibility helpers remain in the
24
+ repository for historical context and are explicitly excluded:
25
+ `src/core/cli-metadata.js`, `src/core/decision-classification.js`,
26
+ `src/core/gates.js`, and `src/core/workflow-compatibility.js`.
27
+ - **Initialization material:** the root protocol and integration documents,
28
+ legal notices, the target profile template, and every path listed by
29
+ `src/core/templates.js`. These files are read by `init` and `update`, so
30
+ they are part of the executable consumer contract even when a document is
31
+ marked deprecated in the documentation manifest.
32
+ - **Benchmark inputs:** execution-profile scenario definitions and their
33
+ README. They make new measurements reproducible; historical measurements
34
+ and generated results are repository evidence and are excluded.
35
+ - **User documentation:** the getting-started, integration, CLI, artifact,
36
+ troubleshooting, release, package-boundary, and related reference pages.
37
+ The typed diagram sources, generated HTML/SVG/receipt artifacts, and
38
+ source-bound review records under `docs/diagrams/` are included together so
39
+ the packaged documentation keeps its visual provenance.
40
+ - **Release tooling:** the selected deterministic generators, validators,
41
+ benchmark helpers, and shell completions needed by maintainers who consume
42
+ the source kit.
43
+
44
+ ## Excluded files
45
+
46
+ The tarball intentionally omits repository-only material:
47
+
48
+ - tests, conformance fixtures, coverage output, and secret-scanning helpers;
49
+ - local `.forgeloop` state, task ledgers, locks, transactions, and execution
50
+ receipts (the `.forgeloop/forgeloop.gitignore` template is the sole
51
+ exception);
52
+ - raw or aggregate benchmark results, package archives, and release train
53
+ contracts;
54
+ - historical release plans and retired MCP adapter sources; the MCP adapter
55
+ is published as its own package;
56
+ - the repository README hero PNG, which is a GitHub-only asset. The packaged
57
+ README remains intentionally text-first around that relative repository
58
+ image reference.
59
+
60
+ The package test checks both required paths and these exclusion classes. It
61
+ also enumerates `src/**/*.js` and fails if a maintained runtime module is
62
+ missing from the candidate tarball or if a retired helper is reintroduced.
63
+ The repository index remains a catalog: links from `DOCS_INDEX.md` to tests,
64
+ proof-of-concept evidence, historical plans, and source trees may intentionally
65
+ resolve only in the full repository and are not package dependencies.
66
+
67
+ ## Verification and publication
68
+
69
+ Run the following checks from a clean checkout before opening a release PR:
70
+
71
+ ```bash
72
+ npm pack --dry-run --json
73
+ npm run pack:check
74
+ npm run pack:smoke
75
+ ```
76
+
77
+ `pack:smoke` installs the candidate tarball into a temporary consumer and
78
+ exercises the CLI, public Integration API, initialization, schemas, and
79
+ packaged documentation references. The tag-triggered publication workflow
80
+ runs the same smoke gate before `npm publish --provenance --access public`.
81
+ Publication therefore remains owned by the trusted GitHub Actions OIDC
82
+ workflow; local package inspection proves the candidate boundary but does not
83
+ publish it.
@@ -13,6 +13,12 @@ preparation and verification checklist; it does not authorize publication.
13
13
  - [ ] `npm pack --dry-run` contains the required scenario definitions but no
14
14
  raw or aggregate benchmark results, tests, local state, or repository
15
15
  metadata.
16
+ - [ ] [`docs/PACKAGE_CONTENTS.md`](./PACKAGE_CONTENTS.md) matches the current
17
+ `package.json` file list and documents intentional inclusions and
18
+ exclusions.
19
+ - [ ] Every maintained `src/**/*.js` module is present in the candidate
20
+ tarball; only the four explicitly retired compatibility helpers are
21
+ excluded.
16
22
 
17
23
  ## Protocol and attestation
18
24
 
@@ -62,6 +68,8 @@ preparation and verification checklist; it does not authorize publication.
62
68
  ## Integration and cross-platform evidence
63
69
 
64
70
  - [ ] `npm run pack:check` and `npm run pack:smoke` pass.
71
+ - [ ] The npm publication workflow runs `npm run pack:smoke` before its
72
+ provenance-backed publish step.
65
73
  - [ ] `npm run mcp:test` either runs the configured MCP tests or reports the
66
74
  single actionable setup prerequisite.
67
75
  - [ ] `npm run mcp:pack:check` passes when MCP dependencies are available.
@@ -134,3 +134,12 @@ provider semantics fail closed.
134
134
  An implementation should be tested for deterministic identity, exact bytes,
135
135
  binary and empty files, Unicode and space-containing paths, symlinks,
136
136
  Gitlinks, deletions, renames, path traversal, and stable error mapping.
137
+
138
+ ### Focused test selection and evidence
139
+
140
+ A test-runner filter chooses what a command executes. It does not establish a
141
+ canonical differential verification scope. Use `run-check` to bind executed
142
+ commands to evidence, and supply a fresh canonical scope reference when the
143
+ checker requires one. A manual observation must declare `manual-review`;
144
+ command metadata alone does not prove that a process ran. Packed TypeScript
145
+ consumer checks and critical lifecycle coverage complement these boundaries.
@@ -1299,3 +1299,15 @@ current-cycle validation.
1299
1299
  | `E_WORKSPACE_IDENTITY_UNAVAILABLE` | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. | Inspect the structured command result, correct the named boundary or artifact, then retry the canonical command. |
1300
1300
 
1301
1301
  <!-- END FORGELOOP GENERATED: public-error-codes -->
1302
+
1303
+ ## Revised contract after a blocked preflight
1304
+
1305
+ Before execution starts, a revised contract and route can leave the old
1306
+ checkpoint stale. Run `forgeloop next --task <id> --json`. When the validated
1307
+ history ends in a blocked preflight and the new route binds the revised
1308
+ contract, it offers `clear-state` followed by `preflight`. Execute those in
1309
+ that order, satisfy any remaining gates, and require `READY` again.
1310
+
1311
+ This recovery guidance is unavailable after execution has started, for an
1312
+ invalid ledger, or when the new route does not match the contract. Preserve
1313
+ those barriers and follow the task's canonical recovery guidance.
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en" data-theme="dark" data-preset="signal-flow" data-present="true">
3
3
  <head>
4
- <meta name="forgeloop-diagram-source-sha256" content="669966fba9e69df0525a3581baa4e90075923dbe3069f81f706761a40abf9073">
4
+ <meta name="forgeloop-diagram-source-sha256" content="33bb9c3c4f3fb4a793febeab34b2d07ca7bf2c058d4f5e7575dba3a6065eedeb">
5
5
  <meta name="forgeloop-diagram-renderer" content="archify@2.15.0 (e1ac748f19cf805e44bf74fb93c796662152e273)">
6
6
  <meta charset="UTF-8">
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -40,6 +40,15 @@
40
40
  <style>
41
41
  /* Keep boundary labels clear of the first node in each group. */
42
42
  [data-composition-frame-kind="group"] + text { transform: translateY(-18px); }
43
+ @media (max-width: 720px) {
44
+ html:not([data-present="true"]) .toolbar {
45
+ top: 0;
46
+ right: 0;
47
+ width: 100%;
48
+ flex-wrap: wrap;
49
+ justify-content: flex-start;
50
+ }
51
+ }
43
52
 
44
53
  /* ==========================================================
45
54
  THEME VARIABLES — switch by toggling [data-theme] on <html>
@@ -4868,7 +4877,7 @@
4868
4877
  <p class="subtitle">Exact content binding from valid completion to read-only trust results</p>
4869
4878
  </div>
4870
4879
 
4871
- <script id="archify-guided-views-data" type="application/json">[{"id":"completion-to-manifest","label":"Completion to manifest","focus":["complete","receipt","manifest","captured"],"note":"Follow the transactional binding between valid completion evidence and exact source content."},{"id":"manifest-to-statement","label":"Manifest to statement","focus":["manifest","captured","statement","signing","bundle"],"note":"See how the deterministic code manifest becomes an in-toto Statement v1 and optional signature bundle."},{"id":"revision-range-coverage","label":"Revision-range coverage","focus":["base","provider","changed","attestations","union","range"],"note":"Inspect the separate changed-path coverage question and its gap or conflict result."}]</script>
4880
+ <script id="archify-guided-views-data" type="application/json">[{"id":"completion-to-manifest","label":"Completion to manifest","focus":["complete","receipt","manifest","captured"],"note":"Completion and exact-content evidence bind to the project and task. No supplied CI receipt means NOT_VERIFIED."},{"id":"manifest-to-statement","label":"Manifest to statement","focus":["manifest","captured","statement","signing","bundle"],"note":"See how the deterministic code manifest becomes an in-toto Statement v1 and optional signature bundle."},{"id":"revision-range-coverage","label":"Revision-range coverage","focus":["base","provider","changed","attestations","union","range"],"note":"Inspect the separate changed-path coverage question and its gap or conflict result."}]</script>
4872
4881
 
4873
4882
  <div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
4874
4883
  <button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
@@ -5426,6 +5435,7 @@
5426
5435
  <li>&bull; PROCESSED means artifacts exist and parse</li>
5427
5436
  <li>&bull; VERIFIED means completion, evidence, manifest, and content bindings validate</li>
5428
5437
  <li>&bull; ATTESTED additionally requires a valid external signature policy</li>
5438
+ <li>&bull; No supplied CI receipt means NOT_VERIFIED, not a trust level</li>
5429
5439
  </ul>
5430
5440
  </div>
5431
5441
 
@@ -5438,6 +5448,7 @@
5438
5448
  <li>&bull; The manifest records one SHA-256 digest per changed source entry</li>
5439
5449
  <li>&bull; The in-toto statement binds the manifest to completion evidence</li>
5440
5450
  <li>&bull; Read-only verification never rewrites task state or ledger events</li>
5451
+ <li>&bull; Compaction preserves transaction manifests and event history</li>
5441
5452
  </ul>
5442
5453
  </div>
5443
5454
 
@@ -15,17 +15,17 @@
15
15
  "license": "MIT"
16
16
  },
17
17
  "input": {
18
- "sha256": "669966fba9e69df0525a3581baa4e90075923dbe3069f81f706761a40abf9073",
19
- "bytes": 7744
18
+ "sha256": "33bb9c3c4f3fb4a793febeab34b2d07ca7bf2c058d4f5e7575dba3a6065eedeb",
19
+ "bytes": 9857
20
20
  },
21
21
  "artifacts": {
22
22
  "html": {
23
- "sha256": "62666342ec4efbc295ed65f4450008ca5a39072d8a11ff7b8b675ab258711286",
24
- "bytes": 652836
23
+ "sha256": "85bb7abf910d3f6dd12037cfcd90c4b67f0aad4dca2b4cb21be1b0112cbdd92e",
24
+ "bytes": 653258
25
25
  },
26
26
  "svg": {
27
- "sha256": "0af63dd51683d07981fc681042c437377a78ae8a7e6a7175c18a1def02e6280a",
28
- "bytes": 216313
27
+ "sha256": "3a768148886ffdfcce75221c11e51ee77a3702510e90917bf6e8ba0581ebdb44",
28
+ "bytes": 216543
29
29
  }
30
30
  },
31
31
  "staticSvg": {
@@ -1,8 +1,17 @@
1
- <svg data-archify-version="2.15.0" data-forgeloop-source-sha256="669966fba9e69df0525a3581baa4e90075923dbe3069f81f706761a40abf9073" data-theme="dark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 1024" role="img" aria-labelledby="archify-diagram-title archify-diagram-description" data-animation="trace" data-preset="signal-flow" data-quality-profile="showcase">
1
+ <svg data-archify-version="2.15.0" data-forgeloop-source-sha256="33bb9c3c4f3fb4a793febeab34b2d07ca7bf2c058d4f5e7575dba3a6065eedeb" data-theme="dark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 1024" role="img" aria-labelledby="archify-diagram-title archify-diagram-description" data-animation="trace" data-preset="signal-flow" data-quality-profile="showcase">
2
2
  <style>
3
3
  .c-bg-rect { fill: var(--bg); }
4
4
  /* Keep boundary labels clear of the first node in each group. */
5
5
  [data-composition-frame-kind="group"] + text { transform: translateY(-18px); }
6
+ @media (max-width: 720px) {
7
+ html:not([data-present="true"]) .toolbar {
8
+ top: 0;
9
+ right: 0;
10
+ width: 100%;
11
+ flex-wrap: wrap;
12
+ justify-content: flex-start;
13
+ }
14
+ }
6
15
 
7
16
  /* ==========================================================
8
17
  THEME VARIABLES — switch by toggling [data-theme] on &lt;html>
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en" data-theme="dark" data-preset="signal-flow" data-present="true">
3
3
  <head>
4
- <meta name="forgeloop-diagram-source-sha256" content="a83128a8639db5db497ac552cfdbc318839e6451c718581fbfcd064e3e869981">
4
+ <meta name="forgeloop-diagram-source-sha256" content="0bfd5bbf8d6bbeaec23db543deb1e99844321c77b3c7feb21ee0cc877bbba9a9">
5
5
  <meta name="forgeloop-diagram-renderer" content="archify@2.15.0 (e1ac748f19cf805e44bf74fb93c796662152e273)">
6
6
  <meta charset="UTF-8">
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -40,6 +40,15 @@
40
40
  <style>
41
41
  /* Keep boundary labels clear of the first node in each group. */
42
42
  [data-composition-frame-kind="group"] + text { transform: translateY(-18px); }
43
+ @media (max-width: 720px) {
44
+ html:not([data-present="true"]) .toolbar {
45
+ top: 0;
46
+ right: 0;
47
+ width: 100%;
48
+ flex-wrap: wrap;
49
+ justify-content: flex-start;
50
+ }
51
+ }
43
52
 
44
53
  /* ==========================================================
45
54
  THEME VARIABLES — switch by toggling [data-theme] on <html>
@@ -4865,10 +4874,10 @@
4865
4874
  <div class="pulse-dot"></div>
4866
4875
  <h1>ForgeLoop Evidence-First Engineering Flow</h1>
4867
4876
  </div>
4868
- <p class="subtitle">Typed intent → scoped work → observed evidence → validator-backed closure</p>
4877
+ <p class="subtitle">Structured intent → project-bound work → observed evidence → valid closure</p>
4869
4878
  </div>
4870
4879
 
4871
- <script id="archify-guided-views-data" type="application/json">[{"id":"contract-to-work","label":"Contract to work","focus":["request","profile","contract","route","gates","preflight","work"],"note":"Follow how a request becomes scoped, routed, and safe to execute."},{"id":"evidence-to-close","label":"Evidence to close","focus":["work","evidence","review","valid"],"note":"See the evidence and review boundary that makes completion trustworthy."},{"id":"recovery-loop","label":"Recovery loop","focus":["evidence","diagnose","correct","preflight","blocked"],"note":"Failures return to diagnosis and correction before another claim is made."}]</script>
4880
+ <script id="archify-guided-views-data" type="application/json">[{"id":"contract-to-work","label":"Contract to work","focus":["request","profile","contract","route","gates","preflight","work"],"note":"Structured obligations and explicit risks set the profile; exclusions do not create required actions."},{"id":"evidence-to-close","label":"Evidence to close","focus":["work","evidence","review","valid"],"note":"See the evidence and review boundary that makes completion trustworthy."},{"id":"recovery-loop","label":"Recovery loop","focus":["evidence","diagnose","correct","preflight","blocked"],"note":"Before execution, blocked refresh needs a valid ledger and revised route. Later failures use diagnosis and correction."}]</script>
4872
4881
 
4873
4882
  <div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
4874
4883
  <button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
@@ -4911,9 +4920,9 @@
4911
4920
 
4912
4921
  <!-- Main Diagram -->
4913
4922
  <div class="diagram-container" data-detail-level="read">
4914
- <svg viewBox="0 0 720 900" role="img" aria-labelledby="archify-diagram-title archify-diagram-description" data-animation="trace" data-preset="signal-flow" data-quality-profile="showcase">
4923
+ <svg viewBox="0 0 850 900" role="img" aria-labelledby="archify-diagram-title archify-diagram-description" data-animation="trace" data-preset="signal-flow" data-quality-profile="showcase">
4915
4924
  <title id="archify-diagram-title">ForgeLoop Evidence-First Engineering Flow</title>
4916
- <desc id="archify-diagram-description">Typed intent → scoped work → observed evidence → validator-backed closure</desc>
4925
+ <desc id="archify-diagram-description">Structured intent → project-bound work → observed evidence → valid closure</desc>
4917
4926
  <!-- Definitions -->
4918
4927
  <defs>
4919
4928
  <marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
@@ -5065,19 +5074,19 @@
5065
5074
  <text data-detail="fine" x="500" y="265" class="t-security" font-size="7" text-anchor="middle">Preflight</text>
5066
5075
  </g>
5067
5076
 
5068
- <g id="node-work" data-node-id="work" data-node-label="Execution" tabindex="0" role="button" aria-label="Focus Execution, checkpoint, Resumable Execution › Route + authorize" aria-pressed="false" data-node-kind="backend" data-node-sublabel="checkpoint" data-node-context="Resumable Execution › Route + authorize">
5069
- <title>Execution · checkpoint · Resumable Execution › Route + authorize</title>
5077
+ <g id="node-work" data-node-id="work" data-node-label="Execution" tabindex="0" role="button" aria-label="Focus Execution, root + task, Resumable Execution › Route + authorize" aria-pressed="false" data-node-kind="backend" data-node-sublabel="root + task" data-node-context="Resumable Execution › Route + authorize">
5078
+ <title>Execution · root + task · Resumable Execution › Route + authorize</title>
5070
5079
  <rect x="469" y="341" width="62" height="52" rx="6" class="c-mask"/>
5071
5080
  <rect x="469" y="341" width="62" height="52" rx="6" class="c-backend" data-animate="node" style="--step:6" stroke-width="1.5"/>
5072
5081
  <g aria-hidden="true" data-semantic-sigil="backend" class="semantic-sigil s-backend" transform="translate(475 347) scale(0.6875)">
5073
5082
  <path d="M6 3 3 8l3 5M10 3l3 5-3 5"/>
5074
5083
  </g>
5075
5084
  <text data-detail-anchor x="500" y="362" class="t-primary" font-size="10" font-weight="600" text-anchor="middle">Execution</text>
5076
- <text data-detail="context" x="500" y="379" class="t-muted" font-size="8" text-anchor="middle">checkpoint</text>
5085
+ <text data-detail="context" x="500" y="379" class="t-muted" font-size="8" text-anchor="middle">root + task</text>
5077
5086
  </g>
5078
5087
 
5079
- <g id="node-evidence" data-node-id="evidence" data-node-label="Evidence" tabindex="0" role="button" aria-label="Focus Evidence, scope + checks, Evidence Ledger › Evidence boundary › Route + authorize" aria-pressed="false" data-node-kind="database" data-node-sublabel="scope + checks" data-node-tag="observed" data-node-context="Evidence Ledger › Evidence boundary › Route + authorize">
5080
- <title>Evidence · scope + checks · Evidence Ledger › Evidence boundary › Route + authorize · observed</title>
5088
+ <g id="node-evidence" data-node-id="evidence" data-node-label="Evidence" tabindex="0" role="button" aria-label="Focus Evidence, run-check, Evidence Ledger › Evidence boundary › Route + authorize" aria-pressed="false" data-node-kind="database" data-node-sublabel="run-check" data-node-tag="observed" data-node-context="Evidence Ledger › Evidence boundary › Route + authorize">
5089
+ <title>Evidence · run-check · Evidence Ledger › Evidence boundary › Route + authorize · observed</title>
5081
5090
  <rect x="465" y="457" width="70" height="68" rx="6" class="c-mask"/>
5082
5091
  <rect x="465" y="457" width="70" height="68" rx="6" class="c-database" data-animate="node" style="--step:7" stroke-width="1.5"/>
5083
5092
  <g aria-hidden="true" data-semantic-sigil="database" class="semantic-sigil s-database" transform="translate(471 463) scale(0.6875)">
@@ -5085,7 +5094,7 @@
5085
5094
  <path d="M3 4v8c0 1.1 2.2 2 5 2s5-.9 5-2V4M3 8c0 1.1 2.2 2 5 2s5-.9 5-2"/>
5086
5095
  </g>
5087
5096
  <text data-detail-anchor x="500" y="478" class="t-primary" font-size="11" font-weight="600" text-anchor="middle">Evidence</text>
5088
- <text data-detail="context" x="500" y="495" class="t-muted" font-size="7.3" text-anchor="middle">scope + checks</text>
5097
+ <text data-detail="context" x="500" y="495" class="t-muted" font-size="8" text-anchor="middle">run-check</text>
5089
5098
  <text data-detail="fine" x="500" y="513" class="t-database" font-size="7" text-anchor="middle">observed</text>
5090
5099
  </g>
5091
5100
 
@@ -5383,6 +5392,7 @@
5383
5392
  <li>&bull; Workspace binding is optional but blocks mismatched execution</li>
5384
5393
  <li>&bull; Failures return to diagnosis before another claim</li>
5385
5394
  <li>&bull; Completion is validator-backed, not inferred from a screenshot</li>
5395
+ <li>&bull; Blocked pre-execution refresh requires a valid ledger and revised route</li>
5386
5396
  </ul>
5387
5397
  </div>
5388
5398
 
@@ -5396,6 +5406,7 @@
5396
5406
  <li>&bull; run-check binds exact commands to an execution reference</li>
5397
5407
  <li>&bull; record-check covers manual observations</li>
5398
5408
  <li>&bull; Drift reopens verification instead of being hidden</li>
5409
+ <li>&bull; Matching task IDs never authorize cross-project transaction reuse</li>
5399
5410
  </ul>
5400
5411
  </div>
5401
5412
 
@@ -15,17 +15,17 @@
15
15
  "license": "MIT"
16
16
  },
17
17
  "input": {
18
- "sha256": "a83128a8639db5db497ac552cfdbc318839e6451c718581fbfcd064e3e869981",
19
- "bytes": 7610
18
+ "sha256": "0bfd5bbf8d6bbeaec23db543deb1e99844321c77b3c7feb21ee0cc877bbba9a9",
19
+ "bytes": 9779
20
20
  },
21
21
  "artifacts": {
22
22
  "html": {
23
- "sha256": "55d71098d15a46778454d53690110195e0e923d37f34cb6c57fcc5e6601ab7ec",
24
- "bytes": 647796
23
+ "sha256": "251e09f3cc36d54c4b8567dd3e6dd8a890a2621cdd12667fb80cc61e7dbf4b7c",
24
+ "bytes": 648281
25
25
  },
26
26
  "svg": {
27
- "sha256": "37244a07cc862e3fe4a7188f5236a509a4adf565d5b785ba3c0932057ac6f3a8",
28
- "bytes": 211160
27
+ "sha256": "ef3effe7e756494c7dffef9ee315e970bbbdb9fddc0ee0a1e4bfccfbb0c05534",
28
+ "bytes": 211373
29
29
  }
30
30
  },
31
31
  "staticSvg": {