@cassiomc1/forgeloop 1.6.2 → 1.6.4
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 +26 -4
- package/EXECUTION_STATE.md +7 -0
- package/LOOP_ENGINEERING.md +58 -0
- package/LOOP_SYSTEM_DESIGN.md +54 -0
- package/ORCHESTRATOR_INTEGRATION.md +23 -0
- package/PROTOCOL_INTEGRATION.md +36 -0
- package/QUALITY_SCORECARD.md +21 -0
- package/README.md +57 -2
- package/TERMINOLOGY.md +11 -0
- package/THREAT_MODEL.md +7 -0
- package/completions/_forgeloop +85 -0
- package/completions/forgeloop.bash +173 -0
- package/completions/forgeloop.fish +544 -0
- package/docs/AGENT_PROTOCOL_SUMMARY.md +281 -0
- package/docs/ARTIFACT_REFERENCE.md +226 -0
- package/docs/CLI_REFERENCE.md +308 -2
- package/docs/CODE_ATTESTATION.md +141 -0
- package/docs/CROSS_HARNESS_CONTINUITY.md +22 -2
- package/docs/DOCUMENTATION_GUIDE.md +13 -11
- package/docs/GETTING_STARTED.md +98 -1
- package/docs/MCP.md +8 -0
- package/docs/PLATFORM_ADAPTERS.md +69 -0
- package/docs/RECIPES.md +138 -0
- package/docs/RELEASE_CHECKLIST.md +54 -0
- package/docs/REVISION_PROVIDERS.md +136 -0
- package/docs/SIGNING_PROVIDERS.md +83 -0
- package/docs/TROUBLESHOOTING.md +184 -0
- package/docs/UNIVERSAL_INTEGRATION.md +11 -0
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.html +13841 -0
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json +37 -0
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.svg +5046 -0
- package/docs/assets/diagrams/forgeloop-engineering-flow.html +46 -43
- package/docs/assets/diagrams/forgeloop-engineering-flow.receipt.json +6 -6
- package/docs/assets/diagrams/forgeloop-engineering-flow.svg +41 -41
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.html +13783 -0
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json +37 -0
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.svg +4988 -0
- package/docs/diagrams/README.md +30 -22
- package/docs/diagrams/forgeloop-code-attestation-flow.workflow.json +125 -0
- package/docs/diagrams/forgeloop-engineering-flow.workflow.json +11 -8
- package/docs/diagrams/forgeloop-verification-trust-flow.workflow.json +116 -0
- package/docs/diagrams/manifest.json +42 -0
- package/docs/diagrams/reviews/forgeloop-code-attestation-flow.review.json +20 -0
- package/docs/diagrams/reviews/forgeloop-engineering-flow.review.json +3 -3
- package/docs/diagrams/reviews/forgeloop-verification-trust-flow.review.json +20 -0
- package/integrations/generic-ci/verify.sh +14 -0
- package/package.json +31 -9
- package/schemas/attestation-verification-result.schema.json +34 -0
- package/schemas/code-attestation.schema.json +61 -0
- package/schemas/code-manifest.schema.json +57 -0
- package/schemas/config.schema.json +57 -1
- package/schemas/handoff-envelope.schema.json +57 -0
- package/schemas/in-toto-statement.schema.json +32 -0
- package/schemas/responsibility.schema.json +37 -0
- package/schemas/verification-scope.schema.json +26 -0
- package/schemas/workspace-binding.schema.json +20 -0
- package/scripts/CI_VALIDATORS.md +3 -0
- package/scripts/benchmark-cli-startup.mjs +60 -0
- package/scripts/check-changelog-freshness.mjs +88 -0
- package/scripts/check-critical-coverage.mjs +58 -0
- package/scripts/generate-agent-protocol-summary.mjs +141 -0
- package/scripts/generate-shell-completions.mjs +132 -0
- package/scripts/write-forgeloop-attestation-summary.mjs +93 -0
- package/src/cli.js +114 -6
- package/src/commands/attestation-create.js +30 -0
- package/src/commands/attestation-status.js +12 -0
- package/src/commands/attestation-verify-range.js +32 -0
- package/src/commands/attestation-verify.js +23 -0
- package/src/commands/handoff-create.js +9 -0
- package/src/commands/handoff-list.js +12 -0
- package/src/commands/handoff-show.js +10 -0
- package/src/commands/responsibility-set.js +20 -0
- package/src/commands/responsibility-status.js +12 -0
- package/src/commands/run-check.js +43 -3
- package/src/commands/task-repair-legacy-recovery.js +1 -2
- package/src/commands/verify-scope.js +9 -0
- package/src/commands/workspace-bind.js +17 -0
- package/src/commands/workspace-status.js +19 -0
- package/src/core/artifact-registry.js +84 -0
- package/src/core/attestation-coverage.js +134 -0
- package/src/core/attestation-verifier.js +227 -0
- package/src/core/attestation.js +263 -0
- package/src/core/audit.js +67 -1
- package/src/core/bundles.js +210 -9
- package/src/core/cli-command-definitions.js +196 -0
- package/src/core/code-manifest.js +293 -0
- package/src/core/command-executors.js +79 -0
- package/src/core/command-input.js +69 -18
- package/src/core/command-runtime.js +2 -1
- package/src/core/completion.js +170 -8
- package/src/core/config.js +60 -2
- package/src/core/continuity-cli-options.js +9 -3
- package/src/core/continuity-reconciliation.js +20 -0
- package/src/core/diagnostic-projection.js +3 -1
- package/src/core/error-codes.js +146 -0
- package/src/core/events.js +109 -13
- package/src/core/exit-codes.js +22 -0
- package/src/core/handoff.js +208 -0
- package/src/core/information-gain-projection.js +3 -3
- package/src/core/integration-invocation-policy.js +40 -0
- package/src/core/integration-resources.js +54 -0
- package/src/core/next-action-phases.js +968 -0
- package/src/core/next-action.js +32 -951
- package/src/core/phase.js +29 -1
- package/src/core/protocol-info.js +41 -1
- package/src/core/repository.js +256 -11
- package/src/core/responsibility.js +265 -0
- package/src/core/revision/git.js +207 -0
- package/src/core/revision/provider.js +90 -0
- package/src/core/revision/registry.js +5 -0
- package/src/core/route-artifact.js +1 -1
- package/src/core/schema-validation.js +8 -0
- package/src/core/signing/none.js +23 -0
- package/src/core/signing/provider.js +21 -0
- package/src/core/signing/registry.js +7 -0
- package/src/core/signing/sigstore.js +158 -0
- package/src/core/task-command.js +9 -1
- package/src/core/task-paths.js +72 -0
- package/src/core/templates.js +8 -0
- package/src/core/verification-scope-capability.js +179 -0
- package/src/core/verification-scope.js +271 -0
- package/src/core/workspace-binding.js +211 -0
- package/src/integration.d.ts +91 -0
- package/AGENT_COMPATIBILITY.md +0 -11
- package/docs/RELEASE_CHECKLIST_1_4.md +0 -38
- package/docs/RELEASE_CHECKLIST_1_5_MCP.md +0 -78
- package/docs/RELEASE_CHECKLIST_1_6_1.md +0 -121
package/DOCS_INDEX.md
CHANGED
|
@@ -16,6 +16,7 @@ integration and guide context. Use this map before editing documentation.
|
|
|
16
16
|
| --- | --- | --- |
|
|
17
17
|
| Getting started tutorial | [`docs/GETTING_STARTED.md`](./docs/GETTING_STARTED.md) | First-time walkthrough from init to completion |
|
|
18
18
|
| Cross-harness continuity | [`docs/CROSS_HARNESS_CONTINUITY.md`](./docs/CROSS_HARNESS_CONTINUITY.md) | Operational handoff and multi-tool resumption |
|
|
19
|
+
| Agent bootstrap summary | [`docs/AGENT_PROTOCOL_SUMMARY.md`](./docs/AGENT_PROTOCOL_SUMMARY.md) | Generated concise navigation aid for protocol invariants and commands |
|
|
19
20
|
| CLI command reference | [`docs/CLI_REFERENCE.md`](./docs/CLI_REFERENCE.md) | Full syntax, options, and JSON examples for all commands |
|
|
20
21
|
| Artifact and schema reference | [`docs/ARTIFACT_REFERENCE.md`](./docs/ARTIFACT_REFERENCE.md) | Purpose, mutability, and trust classifications of `.forgeloop/` |
|
|
21
22
|
| Durable actions and trajectory evidence | [`docs/EXECUTION_TRACE.md`](./docs/EXECUTION_TRACE.md) and [`docs/RECIPES.md`](./docs/RECIPES.md) | Action provenance, reconciliation, metrics, and project-local evaluation |
|
|
@@ -23,10 +24,15 @@ integration and guide context. Use this map before editing documentation.
|
|
|
23
24
|
| Operational recipes | [`docs/RECIPES.md`](./docs/RECIPES.md) | Short copy-paste recipes for daily workflows |
|
|
24
25
|
| Diagnostic model | [`docs/DIAGNOSTIC_MODEL.md`](./docs/DIAGNOSTIC_MODEL.md) | Structured diagnostic cases, interventions, hypothesis dispositions, information gain |
|
|
25
26
|
| Execution trace and observability | [`docs/EXECUTION_TRACE.md`](./docs/EXECUTION_TRACE.md) | `history`, `trace`, `reflect`, and task-level `inspect` read-only projections |
|
|
27
|
+
| Workspace, handoff, responsibility, and scope | [`docs/ARTIFACT_REFERENCE.md`](./docs/ARTIFACT_REFERENCE.md) and [`docs/CLI_REFERENCE.md`](./docs/CLI_REFERENCE.md) | Optional task boundaries and deterministic verification planning |
|
|
28
|
+
| Code attestation and revision coverage | [`docs/CODE_ATTESTATION.md`](./docs/CODE_ATTESTATION.md) | Source-content manifests, in-toto statements, signatures, and range verification |
|
|
29
|
+
| Revision and signing providers | [`docs/REVISION_PROVIDERS.md`](./docs/REVISION_PROVIDERS.md) and [`docs/SIGNING_PROVIDERS.md`](./docs/SIGNING_PROVIDERS.md) | Provider-neutral extension contracts |
|
|
30
|
+
| Platform adapters | [`docs/PLATFORM_ADAPTERS.md`](./docs/PLATFORM_ADAPTERS.md) | Generic CI boundary and platform mapping guidance |
|
|
26
31
|
| Universal integration API | [`docs/UNIVERSAL_INTEGRATION.md`](./docs/UNIVERSAL_INTEGRATION.md) | Programmatic integration subpath, envelope semantics, and consumer map |
|
|
27
32
|
| Local-first MCP adapter | [`docs/MCP.md`](./docs/MCP.md) | stdio default, optional strict loopback HTTP; server modes/capabilities and canonical resources |
|
|
28
33
|
| Documentation guide | [`docs/DOCUMENTATION_GUIDE.md`](./docs/DOCUMENTATION_GUIDE.md) | Rules and checklist for modifying documentation |
|
|
29
|
-
|
|
|
34
|
+
| Current release checklist | [`docs/RELEASE_CHECKLIST.md`](./docs/RELEASE_CHECKLIST.md) | Package, protocol, attestation, integration, and publication gates |
|
|
35
|
+
| 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 |
|
|
30
36
|
| 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 |
|
|
31
37
|
| ForgeLoop 1.4 release checklist | [`docs/RELEASE_CHECKLIST_1_4.md`](./docs/RELEASE_CHECKLIST_1_4.md) | Claim-recovery, compatibility, package, and publication gates |
|
|
32
38
|
| Lifecycle, gates, planning, verification, and recovery | [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) | Normative process for agents and developer workflows |
|
|
@@ -40,6 +46,9 @@ integration and guide context. Use this map before editing documentation.
|
|
|
40
46
|
| Guide content | [`ENG/`](./ENG/) | Context-specific, English-only operational guides |
|
|
41
47
|
| Diagram governance | [`docs/diagrams/manifest.json`](./docs/diagrams/manifest.json) | Authoritative taxonomy, renderer mapping, canonical purposes, artifact ownership, and references |
|
|
42
48
|
| Diagram maintainer entrypoint | [`docs/diagrams/README.md`](./docs/diagrams/README.md) | Typed Archify source, animated HTML explorer, animated SVG fallback, review, and regeneration workflow |
|
|
49
|
+
| Engineering flow diagram | [`docs/assets/diagrams/forgeloop-engineering-flow.html`](./docs/assets/diagrams/forgeloop-engineering-flow.html) | Conceptual lifecycle from request through validator-backed completion |
|
|
50
|
+
| Verification Trust Flow | [`docs/REVISION_PROVIDERS.md`](./docs/REVISION_PROVIDERS.md#differential-verification-scope) | Claims, changed paths, trusted checker capability, exact argv, and observed evidence |
|
|
51
|
+
| 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 |
|
|
43
52
|
| 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). |
|
|
44
53
|
|
|
45
54
|
## Audience map
|
|
@@ -47,7 +56,7 @@ integration and guide context. Use this map before editing documentation.
|
|
|
47
56
|
| I am a... | Start here |
|
|
48
57
|
| --- | --- |
|
|
49
58
|
| **First-time user or developer** | [`docs/GETTING_STARTED.md`](./docs/GETTING_STARTED.md) |
|
|
50
|
-
| **AI coding agent / harness** | [`AGENTS.md`](./AGENTS.md) → [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) |
|
|
59
|
+
| **AI coding agent / harness** | [`docs/AGENT_PROTOCOL_SUMMARY.md`](./docs/AGENT_PROTOCOL_SUMMARY.md) → [`AGENTS.md`](./AGENTS.md) → [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) |
|
|
51
60
|
| **Technical auditor / Evaluator** | [`poc/README.md`](./poc/README.md) → [`poc/reports/poc-20260826-real-execution-technical-audit-v2.md`](./poc/reports/poc-20260826-real-execution-technical-audit-v2.md) |
|
|
52
61
|
| **Harness integrator** | [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md) |
|
|
53
62
|
| **External runtime / orchestrator integrator** | [`ORCHESTRATOR_INTEGRATION.md`](./ORCHESTRATOR_INTEGRATION.md) |
|
|
@@ -56,8 +65,11 @@ integration and guide context. Use this map before editing documentation.
|
|
|
56
65
|
| **Inspecting `.forgeloop/` files** | [`docs/ARTIFACT_REFERENCE.md`](./docs/ARTIFACT_REFERENCE.md) |
|
|
57
66
|
| **Fixing a broken or stale state** | [`docs/TROUBLESHOOTING.md`](./docs/TROUBLESHOOTING.md) |
|
|
58
67
|
| **Looking for quick recipes** | [`docs/RECIPES.md`](./docs/RECIPES.md) |
|
|
68
|
+
| **Understanding verification trust** | [`docs/REVISION_PROVIDERS.md`](./docs/REVISION_PROVIDERS.md#differential-verification-scope) |
|
|
69
|
+
| **Understanding attestation trust** | [`docs/CODE_ATTESTATION.md`](./docs/CODE_ATTESTATION.md#trust-levels) |
|
|
70
|
+
| **Maintaining generated diagrams** | [`docs/diagrams/README.md`](./docs/diagrams/README.md) |
|
|
59
71
|
| **Documentation contributor** | [`docs/DOCUMENTATION_GUIDE.md`](./docs/DOCUMENTATION_GUIDE.md) |
|
|
60
|
-
| **Release maintainer (current)** | [`docs/
|
|
72
|
+
| **Release maintainer (current)** | [`docs/RELEASE_CHECKLIST.md`](./docs/RELEASE_CHECKLIST.md) |
|
|
61
73
|
| **Release maintainer (historical 1.5/MCP)** | [`docs/RELEASE_CHECKLIST_1_5_MCP.md`](./docs/RELEASE_CHECKLIST_1_5_MCP.md) |
|
|
62
74
|
| **Release maintainer (historical 1.4)** | [`docs/RELEASE_CHECKLIST_1_4.md`](./docs/RELEASE_CHECKLIST_1_4.md) |
|
|
63
75
|
| **Protocol architect / maintainer** | [`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md) + [`schemas/`](./schemas/) |
|
|
@@ -78,6 +90,9 @@ integration and guide context. Use this map before editing documentation.
|
|
|
78
90
|
- **Integrate a new AI environment**: [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md)
|
|
79
91
|
- **Map ForgeLoop state into an external runtime/orchestrator**: [`ORCHESTRATOR_INTEGRATION.md`](./ORCHESTRATOR_INTEGRATION.md)
|
|
80
92
|
- **Edit documentation safely**: [`docs/DOCUMENTATION_GUIDE.md`](./docs/DOCUMENTATION_GUIDE.md)
|
|
93
|
+
- **Verify source-content attestations**: [`docs/CODE_ATTESTATION.md`](./docs/CODE_ATTESTATION.md)
|
|
94
|
+
- **Understand narrow verification and checker binding**: [`docs/REVISION_PROVIDERS.md`](./docs/REVISION_PROVIDERS.md#differential-verification-scope)
|
|
95
|
+
- **Inspect the governed diagrams**: [`docs/diagrams/README.md`](./docs/diagrams/README.md)
|
|
81
96
|
|
|
82
97
|
`README.md` is intentionally a catalog and quickstart. Do not copy the full
|
|
83
98
|
process into adapters or README sections; link to the canonical source.
|
|
@@ -93,11 +108,15 @@ process into adapters or README sections; link to the canonical source.
|
|
|
93
108
|
5. Use [`GUIDE_ROUTER.md`](./GUIDE_ROUTER.md) to select only relevant guides.
|
|
94
109
|
6. Use [`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md) and schemas when a
|
|
95
110
|
change affects protocol invariants or artifact shape.
|
|
111
|
+
7. Use [`docs/REVISION_PROVIDERS.md`](./docs/REVISION_PROVIDERS.md) and
|
|
112
|
+
[`docs/CODE_ATTESTATION.md`](./docs/CODE_ATTESTATION.md) when verification
|
|
113
|
+
scope, provider boundaries, signing, or revision-range coverage is involved.
|
|
96
114
|
|
|
97
115
|
## Verification and release
|
|
98
116
|
|
|
99
117
|
The Node regression suite, ESLint, c8, dependency policy, package boundary,
|
|
100
|
-
|
|
118
|
+
attestation coverage, generated summaries/completions, and Archify diagram
|
|
119
|
+
render are the local executable checks. Python validators remain
|
|
101
120
|
frozen CI-only compatibility tools because they cover historical Markdown,
|
|
102
121
|
loop, and secret-scanning contracts that have not been migrated to Node. Their
|
|
103
122
|
scope, exact commands, and migration boundary are recorded in
|
|
@@ -121,3 +140,6 @@ uses trusted OIDC publishing and is not implied by local verification.
|
|
|
121
140
|
external publication or production state.
|
|
122
141
|
- Run `npm run lint`, `npm run coverage`, `npm run pack:check`, and the Python
|
|
123
142
|
CI-only validators proportionally to the change.
|
|
143
|
+
- Run `npm run summary:check`, `npm run completions:check`, and
|
|
144
|
+
`npm run changelog:check` when changing registries, release metadata, or
|
|
145
|
+
documentation.
|
package/EXECUTION_STATE.md
CHANGED
|
@@ -110,6 +110,13 @@ Any material difference produces `REVALIDATION_REQUIRED`. A non-Git target
|
|
|
110
110
|
reports that branch/HEAD drift is not verifiable. Cheap checks may be rerun,
|
|
111
111
|
but a completed destructive or publication action is never rerun automatically.
|
|
112
112
|
|
|
113
|
+
When `workspace-binding.json` is present, it is an additional execution-safety
|
|
114
|
+
boundary: the binding records the derived repository/worktree identity, and
|
|
115
|
+
both task mutations and `run-check` validate the current checkout against it.
|
|
116
|
+
A matching branch name or HEAD alone is not sufficient. When the optional
|
|
117
|
+
artifact is absent, workspace binding is not applicable; it must not be
|
|
118
|
+
invented from continuity notes, handoff prose, or actor input.
|
|
119
|
+
|
|
113
120
|
The current contract is compared when resolving the target task:
|
|
114
121
|
|
|
115
122
|
```bash
|
package/LOOP_ENGINEERING.md
CHANGED
|
@@ -1300,6 +1300,64 @@ completion. `CONTINUITY_CANNOT_GRANT_AUTHORITY`: continuity cannot authorize an
|
|
|
1300
1300
|
installation or external action. <a id="FL-CONT-001"></a> **FL-CONT-001 — A receiving harness MUST reconcile**
|
|
1301
1301
|
continuity against the current work state and checkout before acting on it.
|
|
1302
1302
|
|
|
1303
|
+
## Optional task boundaries and code attestation
|
|
1304
|
+
|
|
1305
|
+
ForgeLoop keeps the following extensions optional so existing task artifacts
|
|
1306
|
+
remain readable without migration. When an extension artifact is present, its
|
|
1307
|
+
schema and canonical bindings are validated before the artifact affects a
|
|
1308
|
+
mutation, verification, or trust result.
|
|
1309
|
+
|
|
1310
|
+
<a id="FL-WS-001"></a> **FL-WS-001 — A bound task MUST validate the current workspace**
|
|
1311
|
+
before a task mutation or ForgeLoop-owned verification launch. Workspace
|
|
1312
|
+
identity is derived from the repository/worktree and is never accepted from
|
|
1313
|
+
actor input; a mismatch fails closed before a child process starts. A branch
|
|
1314
|
+
name or HEAD value by itself is insufficient to identify a checkout: the
|
|
1315
|
+
binding also covers the repository/worktree identity that the protocol derives.
|
|
1316
|
+
The artifact is optional; when absent, workspace binding is not applicable.
|
|
1317
|
+
When present, `workspace-status` and `run-check` cross the same boundary.
|
|
1318
|
+
|
|
1319
|
+
<a id="FL-HANDOFF-001"></a> **FL-HANDOFF-001 — A canonical handoff MUST remain an immutable**
|
|
1320
|
+
protocol-derived snapshot. It can carry intent and resume context, but it does
|
|
1321
|
+
not delegate work, establish identity, grant authority, provide independent
|
|
1322
|
+
review evidence, or prove completion. An optional actor note or recipient hint
|
|
1323
|
+
is descriptive metadata only. This envelope is distinct from mutable
|
|
1324
|
+
`continuity.json`, which is operational resume context and non-evidence.
|
|
1325
|
+
|
|
1326
|
+
<a id="FL-SCOPE-001"></a> **FL-SCOPE-001 — A verification scope MUST narrow execution only from**
|
|
1327
|
+
current canonical changed paths, effective claims, or an explicit full-project
|
|
1328
|
+
requirement. The resolver never guesses impacted tests, and a stale scope is
|
|
1329
|
+
not used as verification evidence. The modes are `AUTO`, `CHANGED`, `CLAIMED`,
|
|
1330
|
+
and `FULL`; there is no heuristic `IMPACTED` mode. `AUTO` may resolve to
|
|
1331
|
+
`CHANGED` or `CLAIMED` only when a trusted scoped checker is configured,
|
|
1332
|
+
otherwise it resolves to `FULL`. An explicit `CHANGED` or `CLAIMED` request
|
|
1333
|
+
without that checker fails closed with `E_VERIFICATION_SCOPE_UNRESOLVED`.
|
|
1334
|
+
The selected paths, checker capability fingerprint, verification cycle,
|
|
1335
|
+
contract fingerprint, and repository fingerprint are bound before launch.
|
|
1336
|
+
`run-check` must match the configured `argvPrefix` plus the selected paths;
|
|
1337
|
+
drift is rejected before the process starts.
|
|
1338
|
+
|
|
1339
|
+
<a id="FL-ATTEST-001"></a> **FL-ATTEST-001 — A code attestation MUST bind exact source content**
|
|
1340
|
+
to a valid completion receipt and event-ledger checkpoint. Protocol metadata is
|
|
1341
|
+
excluded from the source subject, verification is read-only, and a plain
|
|
1342
|
+
fingerprint is not a signature. The binding includes exact bytes, per-entry
|
|
1343
|
+
SHA-256 content digests, a deterministic in-toto Statement v1, and the
|
|
1344
|
+
provider-specific revision identity. `PROCESSED` means artifacts exist and can
|
|
1345
|
+
be parsed; `VERIFIED` means the applicable completion, evidence, manifest, and
|
|
1346
|
+
content relationships validate; `ATTESTED` additionally requires a valid
|
|
1347
|
+
external signature under the configured identity and issuer policy. Attestation
|
|
1348
|
+
does not claim authorship, bug-free code, or absolute security. Verification
|
|
1349
|
+
scope is a pre-completion execution decision; attestation coverage is a
|
|
1350
|
+
post-completion revision-range question, and one never proves the other.
|
|
1351
|
+
|
|
1352
|
+
### Optional responsibility contracts
|
|
1353
|
+
|
|
1354
|
+
An optional responsibility contract mechanically constrains a pass with
|
|
1355
|
+
allowed/read-only paths, required check IDs, and frozen contract, route, claim,
|
|
1356
|
+
and repository inputs. It is a boundary artifact, not an agent-role system.
|
|
1357
|
+
Labels such as `implementation` or `review` are descriptive; ForgeLoop has no
|
|
1358
|
+
built-in coder, reviewer, or cleaner roles. Completion and audit validate the
|
|
1359
|
+
constraint when it is present, and a path or frozen-input drift fails closed.
|
|
1360
|
+
|
|
1303
1361
|
## Durable Actions and Trajectory Evidence
|
|
1304
1362
|
|
|
1305
1363
|
Durable actions extend the existing task protocol; they do not turn ForgeLoop
|
package/LOOP_SYSTEM_DESIGN.md
CHANGED
|
@@ -322,6 +322,60 @@ same identity as the implementer. Simple documentation tasks may skip design,
|
|
|
322
322
|
delegation, and full regression when the contract records why those states are
|
|
323
323
|
not applicable.
|
|
324
324
|
|
|
325
|
+
## Optional boundaries and provenance chain
|
|
326
|
+
|
|
327
|
+
The current integration view keeps optional safety and provenance boundaries
|
|
328
|
+
visible without turning them into a second state machine:
|
|
329
|
+
|
|
330
|
+
```text
|
|
331
|
+
Intent
|
|
332
|
+
↓
|
|
333
|
+
Contract
|
|
334
|
+
↓
|
|
335
|
+
Route
|
|
336
|
+
↓
|
|
337
|
+
Task + claim ownership
|
|
338
|
+
↓
|
|
339
|
+
Optional workspace binding
|
|
340
|
+
↓
|
|
341
|
+
Execution
|
|
342
|
+
↓
|
|
343
|
+
Optional responsibility constraint
|
|
344
|
+
↓
|
|
345
|
+
Verification planning
|
|
346
|
+
↓
|
|
347
|
+
Observed command evidence
|
|
348
|
+
↓
|
|
349
|
+
Review
|
|
350
|
+
↓
|
|
351
|
+
Transactional completion
|
|
352
|
+
↓
|
|
353
|
+
Optional code manifest / attestation
|
|
354
|
+
↓
|
|
355
|
+
Optional signing
|
|
356
|
+
↓
|
|
357
|
+
Read-only verification / range coverage
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Each boundary has a distinct trust meaning. Repository and checkout state
|
|
361
|
+
identify the implementation being inspected; task state owns lifecycle and
|
|
362
|
+
claims; execution artifacts prove process provenance; the completion receipt
|
|
363
|
+
summarizes validated evidence; the code manifest binds exact source bytes; the
|
|
364
|
+
in-toto statement binds that manifest to completion; a signature is an
|
|
365
|
+
external signer result; and a revision-range result evaluates coverage across
|
|
366
|
+
multiple task attestations. A workspace binding is optional and a branch name
|
|
367
|
+
or HEAD alone is not a complete checkout identity. A handoff is an immutable
|
|
368
|
+
state snapshot, while mutable continuity is operational context; neither is
|
|
369
|
+
independent review evidence. Verification scope decides which paths a specific
|
|
370
|
+
checker may execute, whereas attestation coverage asks whether changed paths
|
|
371
|
+
in a revision range are covered. These relationships are intentionally not
|
|
372
|
+
interchangeable.
|
|
373
|
+
|
|
374
|
+
The [Verification Trust Flow](./docs/REVISION_PROVIDERS.md#differential-verification-scope)
|
|
375
|
+
(`docs/diagrams/forgeloop-verification-trust-flow.workflow.json`) and [Code
|
|
376
|
+
Attestation Chain](./docs/CODE_ATTESTATION.md#completion-flow) diagrams provide
|
|
377
|
+
the focused visual fallbacks for these two boundaries.
|
|
378
|
+
|
|
325
379
|
## Precedence and conflicts
|
|
326
380
|
|
|
327
381
|
The system respects this order:
|
|
@@ -102,6 +102,29 @@ invariants and record why a skipped phase was not applicable.
|
|
|
102
102
|
- `forgeloop progress` deterministically evaluates task progress across cycles as `ADVANCING`, `WATCH`, or `STALLED`.
|
|
103
103
|
- `forgeloop record-decision-criterion` attaches contract-bound guidance to unresolved decisions without breaking the schema.
|
|
104
104
|
|
|
105
|
+
## Optional serializable boundaries
|
|
106
|
+
|
|
107
|
+
An external orchestrator may expose the following optional protocol artifacts
|
|
108
|
+
without changing the lifecycle or adding a graph runtime:
|
|
109
|
+
|
|
110
|
+
| Boundary | Serializable view | Required host behavior |
|
|
111
|
+
| --- | --- | --- |
|
|
112
|
+
| Workspace identity | `workspace-binding.json` | Preserve the current checkout and surface a mismatch before mutation or verification launch |
|
|
113
|
+
| Handoff | Immutable handoff envelope | Carry protocol-derived state and any descriptive note without treating it as delegation, authority, or evidence |
|
|
114
|
+
| Responsibility | Allowed/read-only paths, required checks, and frozen-input fingerprints | Enforce the declared boundary and report scope drift |
|
|
115
|
+
| Verification scope | `AUTO`, `CHANGED`, `CLAIMED`, or `FULL` plus scope fingerprint | Consume the canonical result and exact scoped argv; do not infer an `IMPACTED` mode |
|
|
116
|
+
| Attestation | Code manifest, in-toto Statement v1, optional signature, and range result | Preserve `PROCESSED`, `VERIFIED`, and `ATTESTED` distinctions and keep verification read-only |
|
|
117
|
+
|
|
118
|
+
The host owns scheduling, workers, model calls, checkout selection, transport,
|
|
119
|
+
and platform presentation. ForgeLoop owns schema validation, fingerprints,
|
|
120
|
+
claims, lifecycle transitions, evidence binding, completion, and fail-closed
|
|
121
|
+
trust decisions. Workspace binding, responsibility, narrow verification,
|
|
122
|
+
signing, and MCP are not prerequisites for basic protocol compatibility.
|
|
123
|
+
|
|
124
|
+
Focused visual fallbacks are maintained in the [Verification Trust
|
|
125
|
+
Flow](./docs/REVISION_PROVIDERS.md#differential-verification-scope) and [Code
|
|
126
|
+
Attestation Chain](./docs/CODE_ATTESTATION.md#completion-flow).
|
|
127
|
+
|
|
105
128
|
## Serializable interfaces
|
|
106
129
|
|
|
107
130
|
The following JSON Schemas define the boundaries a host may implement:
|
package/PROTOCOL_INTEGRATION.md
CHANGED
|
@@ -428,6 +428,42 @@ because the executor changed.
|
|
|
428
428
|
For the practical handoff and multi-tool takeover sequence, see
|
|
429
429
|
[`docs/CROSS_HARNESS_CONTINUITY.md`](./docs/CROSS_HARNESS_CONTINUITY.md).
|
|
430
430
|
|
|
431
|
+
### Optional workspace and attestation integrations
|
|
432
|
+
|
|
433
|
+
The stable integration API exposes optional task workspace binding, immutable
|
|
434
|
+
handoff snapshots, responsibility constraints, verification-scope planning,
|
|
435
|
+
and provider-neutral code attestation. Integrations pass opaque revision IDs
|
|
436
|
+
and optional signing policy to the canonical runtime; they do not reimplement
|
|
437
|
+
content coverage, evidence binding, or signer trust.
|
|
438
|
+
|
|
439
|
+
The ownership boundary for these extensions is explicit:
|
|
440
|
+
|
|
441
|
+
| Capability | ForgeLoop owns | Host owns |
|
|
442
|
+
| --- | --- | --- |
|
|
443
|
+
| Workspace binding | Derives repository/worktree identity, persists the binding, and rejects mismatch before mutation or `run-check` launch | Chooses whether a task needs binding and provides the current checkout |
|
|
444
|
+
| Handoff envelope | Creates immutable protocol-derived snapshots and verifies their digest and ledger relationships | Supplies any descriptive note or recipient hint; it cannot turn the envelope into delegation or evidence |
|
|
445
|
+
| Responsibility contract | Validates allowed/read-only paths, required checks, and frozen-input fingerprints | Chooses the optional boundary and performs the work inside it |
|
|
446
|
+
| Verification scope | Resolves `AUTO`, `CHANGED`, `CLAIMED`, or `FULL`, binds scoped-checker argv, and fails closed on stale or mismatched inputs | Declares checker configuration and consumes the returned scope without guessing a narrower one |
|
|
447
|
+
| RevisionProvider | Reads opaque revisions, exact bytes, normalized changes, and range coverage through the provider contract | Supplies or selects the provider and revision identifiers |
|
|
448
|
+
| SigningProvider | Validates provider results and preserves `VERIFIED` versus `ATTESTED` semantics | Owns the external signer, identity/issuer policy, credentials, and availability |
|
|
449
|
+
| Generic CI / MCP | Keeps canonical command, evidence, and trust semantics | Owns the platform job, transport, scheduling, and presentation layer |
|
|
450
|
+
|
|
451
|
+
These capabilities are additive. Basic ForgeLoop compatibility still consists
|
|
452
|
+
of the canonical task, contract, route, preflight, lifecycle, evidence, and
|
|
453
|
+
completion boundaries; a host must not make workspace binding, narrow
|
|
454
|
+
checking, signing, Generic CI, or MCP prerequisites for the default loop.
|
|
455
|
+
|
|
456
|
+
<a id="FL-ATTEST-002"></a> **FL-ATTEST-002 — An integration MUST consume the canonical**
|
|
457
|
+
attestation result and preserve its distinction between `VALID`, invalid,
|
|
458
|
+
uncovered, stale, and provider/environment failure. An adapter cannot upgrade
|
|
459
|
+
an invalid result or treat npm provenance, a platform status, or a local
|
|
460
|
+
fingerprint as a ForgeLoop signature.
|
|
461
|
+
|
|
462
|
+
<a id="FL-ATTEST-003"></a> **FL-ATTEST-003 — A signing integration MUST keep private keys,**
|
|
463
|
+
OIDC tokens, and credentials outside ForgeLoop artifacts. Signing and
|
|
464
|
+
verification may use an external provider, while the persisted statement stays
|
|
465
|
+
deterministic and provider-neutral.
|
|
466
|
+
|
|
431
467
|
## Executable Policy Protocol Integration
|
|
432
468
|
|
|
433
469
|
ForgeLoop integrates executable verification rules directly into the lifecycle:
|
package/QUALITY_SCORECARD.md
CHANGED
|
@@ -35,6 +35,27 @@ policy are all present.
|
|
|
35
35
|
| Trajectory evaluation | Read-only trace/reflection metrics, unknown usage preservation, canonical comparable-step definition, and scenario-bound efficiency without an arbitrary overall score. |
|
|
36
36
|
| Maintenance quality | Small modules, built-in runtime, deterministic JSON contracts, malformed/version fixtures, package gates, and backward-compatible protocol versions. |
|
|
37
37
|
|
|
38
|
+
## Capability evidence matrix
|
|
39
|
+
|
|
40
|
+
The rows below record the protocol capabilities covered by the post-
|
|
41
|
+
implementation correction plan. `VERIFIED` means the structure and local
|
|
42
|
+
tests are present in this checkout; `ATTESTED` is reserved for evidence from
|
|
43
|
+
an external runner, pull request, or publication boundary.
|
|
44
|
+
|
|
45
|
+
| Capability | Contract/docs | Core implementation | Schema/artifacts | Positive tests | Negative/adversarial tests | CI/E2E | Status |
|
|
46
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
47
|
+
| Workspace Binding | `LOOP_ENGINEERING.md`, workspace binding contract | `src/core/workspace-binding.js` | `schemas/workspace-binding.schema.json`, task binding artifact | `tests/workspace-binding.test.js`, `tests/workspace-binding-cli.test.js` | `tests/workspace-binding-mutation.test.js`, `tests/workspace-binding-run-check.test.js` | Local protocol suite; external runner pending | VERIFIED / NOT_ATTESTED |
|
|
48
|
+
| Canonical Handoff Envelope | `LOOP_ENGINEERING.md`, handoff contract | `src/core/handoff.js` | `schemas/handoff-envelope.schema.json` | `tests/handoff-envelope.test.js`, `tests/handoff-cli.test.js` | `tests/handoff-tamper.test.js`, `tests/handoff-continuity.test.js` | Local protocol suite; external runner pending | VERIFIED / NOT_ATTESTED |
|
|
49
|
+
| Responsibility Contract | Responsibility and ownership rules in `LOOP_ENGINEERING.md` | `src/core/responsibility.js` | `schemas/responsibility.schema.json` | `tests/responsibility-cli.test.js` | `tests/responsibility-completion.test.js` | Local protocol suite; external runner pending | VERIFIED / NOT_ATTESTED |
|
|
50
|
+
| Differential Verification Scope | Correction plan Section 1; `docs/CLI_REFERENCE.md` | `src/core/verification-scope.js`, `src/core/verification-scope-capability.js` | `schemas/verification-scope.schema.json`, scoped checker config | `tests/verification-scope.test.js`, `tests/revision-provider-conformance.test.js` | `tests/verification-scope-freshness.test.js`, `tests/run-check.test.js` | Node matrix and post-merge workflow pending | VERIFIED / NOT_ATTESTED |
|
|
51
|
+
| RevisionProvider | `docs/REVISION_PROVIDERS.md` | `src/core/revision/provider.js`, `src/core/revision/registry.js`, `src/core/revision/git.js` | Normalized revision entries and provider identity artifacts | `tests/revision-provider-conformance.test.js` | Unsafe path, unavailable provider, ambiguity, deletion, and rename cases in the conformance suite | Local Node suite; external runner pending | VERIFIED / NOT_ATTESTED |
|
|
52
|
+
| Code Manifest | `docs/CODE_ATTESTATION.md` | `src/core/code-manifest.js` | `schemas/code-manifest.schema.json`, code manifest artifact | `tests/code-manifest.test.js`, `tests/attestation-e2e.test.js` | Manifest mutation and coverage failures | Local attestation suite; external runner pending | VERIFIED / NOT_ATTESTED |
|
|
53
|
+
| Code Attestation | `docs/CODE_ATTESTATION.md` | `src/core/attestation.js`, `src/core/attestation-verifier.js` | `schemas/code-attestation.schema.json`, statement artifact | `tests/attestation.test.js`, `tests/attestation-e2e.test.js` | `tests/attestation-verifier.test.js`, stale-content cases | Local attestation suite; external runner pending | VERIFIED / NOT_ATTESTED |
|
|
54
|
+
| SigningProvider | `docs/SIGNING_PROVIDERS.md` | `src/core/signing/provider.js`, `src/core/signing/registry.js` | Sigstore bundle and signing provider contracts | `tests/signing-provider.test.js`, `tests/signing-provider-conformance.test.js` | Invalid provider, missing signature, and policy mismatch cases | Local conformance; external signer pending | VERIFIED / NOT_ATTESTED |
|
|
55
|
+
| Revision-range coverage | `docs/CODE_ATTESTATION.md` | `src/core/attestation-coverage.js` | `schemas/attestation-verification-result.schema.json` | `tests/attestation-coverage.test.js`, `tests/attestation-e2e.test.js` | Missing, conflicting, stale, and incomplete coverage cases | Local range checks; external revision range pending | VERIFIED / NOT_ATTESTED |
|
|
56
|
+
| Generic CI attestation | `integrations/generic-ci/verify.sh`, `docs/UNIVERSAL_INTEGRATION.md` | Generic CI verification and evidence boundary | CI verification outputs and attestation inputs | `tests/generic-ci-attestation.test.js` | Invalid or incomplete CI evidence cases | Pull-request workflow evidence required for ATTESTED | VERIFIED / NOT_ATTESTED |
|
|
57
|
+
| Documentation diagrams | `docs/diagrams/manifest.json`, `docs/DOCUMENTATION_GUIDE.md`, `docs/diagrams/forgeloop-code-attestation-flow.workflow.json` | Typed Archify workflow sources and pinned renderer wrapper | Generated HTML/SVG/receipt/review artifacts | `tests/documentation-diagrams.test.js`, `tests/documentation-diagram-manifest.test.js`, `tests/documentation-portability.test.js` | Stale output, missing review, unsupported renderer, orphan, reduced-motion, and deterministic-generation cases | Local renderer and structural accessibility checks; visual review is source-bound | VERIFIED / NOT_ATTESTED |
|
|
58
|
+
|
|
38
59
|
## Score rules
|
|
39
60
|
|
|
40
61
|
- `Observed` evidence is a command result, file, hash, or test output available
|
package/README.md
CHANGED
|
@@ -31,11 +31,13 @@ relevant guides.
|
|
|
31
31
|
- **Inspect a real ForgeLoop execution** → [`poc/README.md`](./poc/README.md)
|
|
32
32
|
- **Full protocol specification** → [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md)
|
|
33
33
|
- **Integrating an AI harness** → [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md)
|
|
34
|
+
- **Agent bootstrap summary** → [`docs/AGENT_PROTOCOL_SUMMARY.md`](./docs/AGENT_PROTOCOL_SUMMARY.md)
|
|
34
35
|
- **Continuing another harness's task** → [`docs/CROSS_HARNESS_CONTINUITY.md`](./docs/CROSS_HARNESS_CONTINUITY.md)
|
|
35
36
|
- **CLI command reference** → [`docs/CLI_REFERENCE.md`](./docs/CLI_REFERENCE.md)
|
|
36
37
|
- **Artifact & schema reference** → [`docs/ARTIFACT_REFERENCE.md`](./docs/ARTIFACT_REFERENCE.md)
|
|
37
38
|
- **Operational recipes** → [`docs/RECIPES.md`](./docs/RECIPES.md)
|
|
38
39
|
- **Troubleshooting & error codes** → [`docs/TROUBLESHOOTING.md`](./docs/TROUBLESHOOTING.md)
|
|
40
|
+
- **Code attestation & revision coverage** → [`docs/CODE_ATTESTATION.md`](./docs/CODE_ATTESTATION.md)
|
|
39
41
|
- **System architecture & safety** → [`LOOP_SYSTEM_DESIGN.md`](./LOOP_SYSTEM_DESIGN.md) & [`THREAT_MODEL.md`](./THREAT_MODEL.md)
|
|
40
42
|
- **Documentation index & ownership** → [`DOCS_INDEX.md`](./DOCS_INDEX.md)
|
|
41
43
|
|
|
@@ -114,6 +116,41 @@ forgeloop next --task demo --json
|
|
|
114
116
|
The last command reports the next safe action; it does not execute code or
|
|
115
117
|
schedule agents.
|
|
116
118
|
|
|
119
|
+
### Optional code attestation
|
|
120
|
+
|
|
121
|
+
Projects may opt into source-content attestation after a valid completion. The
|
|
122
|
+
attestation binds an exact source snapshot to the ForgeLoop evidence chain; it
|
|
123
|
+
does not prove authorship or absolute security. See
|
|
124
|
+
[`docs/CODE_ATTESTATION.md`](./docs/CODE_ATTESTATION.md) for configuration,
|
|
125
|
+
read-only verification, signatures, and revision-range coverage.
|
|
126
|
+
|
|
127
|
+
### Optional task boundaries and differential verification
|
|
128
|
+
|
|
129
|
+
Workspace binding, immutable handoff envelopes, and responsibility contracts
|
|
130
|
+
are optional boundaries around a task. They constrain where a task may run and
|
|
131
|
+
what a pass may change; they do not grant identity, delegation, review,
|
|
132
|
+
authorship, or completion authority. Differential Verification Scope is a
|
|
133
|
+
separate pre-completion execution decision:
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
AUTO
|
|
137
|
+
├─ trusted scoped checker + safe changed paths → CHANGED
|
|
138
|
+
├─ trusted scoped checker + claims fallback → CLAIMED
|
|
139
|
+
└─ otherwise → FULL
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Explicit `CHANGED` or `CLAIMED` fails closed when no trusted scoped checker is
|
|
143
|
+
configured. A `RevisionProvider` supplies opaque revisions and normalized
|
|
144
|
+
changed entries; a `SigningProvider` is an optional external authority for
|
|
145
|
+
raising `VERIFIED` to `ATTESTED`. See [`docs/REVISION_PROVIDERS.md`](./docs/REVISION_PROVIDERS.md),
|
|
146
|
+
[`docs/ARTIFACT_REFERENCE.md`](./docs/ARTIFACT_REFERENCE.md), and
|
|
147
|
+
[`docs/RECIPES.md`](./docs/RECIPES.md) for operational details.
|
|
148
|
+
|
|
149
|
+
Generic CI provides a platform-neutral revision-range boundary; thin GitHub,
|
|
150
|
+
GitLab, local, or enterprise adapters may translate revisions without adding
|
|
151
|
+
trust rules to the protocol core. The CLI and integration API remain usable
|
|
152
|
+
across supported platforms, with MCP as an optional local adapter.
|
|
153
|
+
|
|
117
154
|
### Durable external actions
|
|
118
155
|
|
|
119
156
|
For external effects, record intent with `action-propose`, apply the capability
|
|
@@ -327,6 +364,21 @@ The broader architecture and boundaries are in
|
|
|
327
364
|
|
|
328
365
|

|
|
329
366
|
|
|
367
|
+
The architecture flow is complemented by two focused, source-bound workflow
|
|
368
|
+
diagrams. The [Verification Trust Flow source](./docs/diagrams/forgeloop-verification-trust-flow.workflow.json),
|
|
369
|
+
[animated explorer](./docs/assets/diagrams/forgeloop-verification-trust-flow.html),
|
|
370
|
+
[SVG fallback](./docs/assets/diagrams/forgeloop-verification-trust-flow.svg),
|
|
371
|
+
[receipt](./docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json),
|
|
372
|
+
and [visual review](./docs/diagrams/reviews/forgeloop-verification-trust-flow.review.json)
|
|
373
|
+
show why narrow verification is fail-closed. The [Code Attestation Chain
|
|
374
|
+
source](./docs/diagrams/forgeloop-code-attestation-flow.workflow.json),
|
|
375
|
+
[animated explorer](./docs/assets/diagrams/forgeloop-code-attestation-flow.html),
|
|
376
|
+
[SVG fallback](./docs/assets/diagrams/forgeloop-code-attestation-flow.svg),
|
|
377
|
+
[receipt](./docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json),
|
|
378
|
+
and [visual review](./docs/diagrams/reviews/forgeloop-code-attestation-flow.review.json)
|
|
379
|
+
show exact content binding, optional signing, and separate revision-range
|
|
380
|
+
coverage.
|
|
381
|
+
|
|
330
382
|
Text-only fallback: discovery creates the contract and route; required gates
|
|
331
383
|
and `PREFLIGHT_READY` authorize execution; verification creates structured
|
|
332
384
|
evidence; failures enter diagnosis and correction; review precedes
|
|
@@ -370,8 +422,8 @@ repository policy allows only ESLint and c8 as development dependencies;
|
|
|
370
422
|
appear. The documentation renderer is vendored and pinned under
|
|
371
423
|
`vendor/archify/v2.15.0/` rather than installed as a package dependency.
|
|
372
424
|
|
|
373
|
-
|
|
374
|
-
[`SECURITY.md`](./SECURITY.md)
|
|
425
|
+
To report vulnerabilities or contribute changes, see
|
|
426
|
+
[`SECURITY.md`](./SECURITY.md) and [`CONTRIBUTING.md`](./CONTRIBUTING.md).
|
|
375
427
|
|
|
376
428
|
## Autonomous blind-run isolation
|
|
377
429
|
|
|
@@ -440,6 +492,9 @@ npm run pack:check
|
|
|
440
492
|
npm run dependency:policy
|
|
441
493
|
npm run docs:diagrams
|
|
442
494
|
npm run docs:check
|
|
495
|
+
npm run completions:check
|
|
496
|
+
npm run summary:check
|
|
497
|
+
npm run changelog:check
|
|
443
498
|
```
|
|
444
499
|
|
|
445
500
|
## Repository structure
|
package/TERMINOLOGY.md
CHANGED
|
@@ -36,6 +36,17 @@
|
|
|
36
36
|
| Historical claims | The write claims retained in `task.json` as task history, including while recovery releases their active ownership. |
|
|
37
37
|
| Effective claims | The claims currently enforced for ownership conflicts: descriptor claims for an active task, or an empty set after validator-backed completion or active recovery. |
|
|
38
38
|
| Claim reacquisition | The serialized `task-resume` operation that rechecks conflicts and checkout cleanliness before removing recovery state and restoring mutation authority. |
|
|
39
|
+
| Workspace binding | An optional protocol-derived repository/worktree identity boundary that blocks mutation or `run-check` when the current checkout differs. |
|
|
40
|
+
| Handoff envelope | An immutable protocol-derived task snapshot; it is not delegation, authority, independent review evidence, or completion evidence. |
|
|
41
|
+
| Responsibility contract | An optional mechanical boundary for allowed/read-only paths, required checks, and frozen inputs; labels are descriptive rather than roles. |
|
|
42
|
+
| Verification scope | The pre-completion set of paths a specific checker may execute, resolved as `AUTO`, `CHANGED`, `CLAIMED`, or `FULL`. |
|
|
43
|
+
| Scoped checker | A trusted checker configuration whose exact argv prefix and selected paths are bound before launch. |
|
|
44
|
+
| RevisionProvider | The provider-neutral boundary for opaque revisions, exact content, normalized changes, and revision-range coverage. |
|
|
45
|
+
| SigningProvider | An optional external authority that can raise a valid attestation from `VERIFIED` to `ATTESTED` under identity and issuer policy. |
|
|
46
|
+
| Code manifest | A deterministic source-content snapshot with per-entry SHA-256 digests and an aggregate content digest. |
|
|
47
|
+
| Attestation statement | A deterministic in-toto Statement v1 binding the code manifest to valid ForgeLoop completion evidence. |
|
|
48
|
+
| Revision-range coverage | A post-completion result asking whether changed paths between two revisions are covered by valid task attestations. |
|
|
49
|
+
| Generic CI | The provider-neutral range-verification boundary that thin platform adapters may invoke without adding platform trust rules to the core. |
|
|
39
50
|
|
|
40
51
|
| Execution continuity | Bounded current-task implementation context used to resume the same ForgeLoop task across sessions or harnesses. |
|
|
41
52
|
| Continuity artifact | `.forgeloop/continuity.json`; non-evidence operational context bound to canonical work state. |
|
package/THREAT_MODEL.md
CHANGED
|
@@ -116,6 +116,13 @@ provide a universal exactly-once guarantee.
|
|
|
116
116
|
| Legacy snapshot semantic confusion | A legacy task snapshot lacking baseline state is assumed to have empty baseline, creating false `WEAKEN` drift | Semantic baseline snapshotting in `policy-snapshot.json` | Snapshots retain full semantic baseline entries; snapshots lacking baseline state classify drift as `UNKNOWN` rather than inventing state | Modern tasks retain semantic baseline entries for exact diff | `tests/policy-hardening.test.js` |
|
|
117
117
|
| Cross-task state confusion | Concurrent processes or alternative harnesses mutate or read the wrong task's state in a multi-task workspace | Task-scoped isolation in `.forgeloop/task-state/<taskKey>/` | Deterministic SHA-256 task directory namespacing, explicit `--task` / `FORGELOOP_TASK` selectors, separate file-level lease locks under `.forgeloop/locks/`, and claim overlap detection in `task-create` | Tasks must declare non-overlapping write claims or operate in isolated worktrees | `tests/task-namespace.test.js`, `tests/task-scope.test.js` |
|
|
118
118
|
| Modern namespace descriptor deletion | Corruption or an attacker removes `task.json` from a modern task namespace (leaving contract/work-state/receipt/events), the resolver ignores the namespace, and stale legacy singleton state becomes authoritative | Descriptor boundary between modern task namespaces and the legacy singleton | Descriptor-less 64-hex directories are classified by contents: directories containing modern task artifacts (or empty directories) fail closed with `E_TASK_DESCRIPTOR_INVALID`; only directories containing exclusively the explicitly recognized legacy-incidental artifact (`policy-snapshot.json`) are ignored; `resolveTaskContext` fails closed when all namespaces are corrupt | A separately privileged process can rewrite task-state directories after validation | `tests/validate-receipt-task.test.js` |
|
|
119
|
+
| Workspace binding substitution | A valid task is mutated or verified from another Git checkout or worktree | Task workspace binding and final mutation/execution boundary | `workspace-binding.json` stores protocol-derived repository/worktree identities; every bound mutation and ForgeLoop-owned check validates the current identity before launch and fails closed on mismatch | A privileged process can rewrite both the binding and workspace after validation | `tests/workspace-binding.test.js`, `tests/workspace-binding-run-check.test.js` |
|
|
120
|
+
| Handoff authority inflation | An actor treats a handoff note or recipient hint as delegation, identity, or completion authority | Immutable handoff envelope and continuity boundary | Handoffs contain protocol-derived state, claims, changed paths, and evidence references; digest/schema validation rejects tampering and no lifecycle authority is inferred | The recipient still controls how it interprets non-evidence intent outside the protocol | `tests/handoff-envelope.test.js` |
|
|
121
|
+
| Responsibility scope bypass | A pass changes files outside its declared boundary or after frozen inputs drift | Responsibility constraint artifact and completion/audit validation | Allowed/read-only paths, required checks, and contract/route/claim fingerprints are validated; descriptive labels never select behavior | Filesystem privileges outside ForgeLoop can bypass local enforcement | `tests/responsibility.test.js` |
|
|
122
|
+
| Unsafe differential narrowing | A verifier skips impacted work based on guessed dependency relationships | Verification-scope artifact and canonical claim/change projection | `AUTO` narrows only to exact changed paths or effective claims; ambiguous inputs escalate or remain unresolved, and stale scope is rejected | A project verifier may still ignore an explicitly returned scope if it is not configured to consume it | `tests/verification-scope.test.js`, `tests/verification-scope-freshness.test.js` |
|
|
123
|
+
| Attestation content substitution | A source byte, receipt, state, route, contract, or ledger checkpoint changes after attestation | Code manifest, in-toto statement, revision provider, and read-only verifier | Per-entry content digests, provider identities, canonical aggregate digest, evidence fingerprints, and ledger sequence/hash are checked before a verified result | Local filesystem access can rewrite all artifacts consistently; this remains local consistency validation, not remote trust | `tests/code-manifest.test.js`, `tests/attestation-verifier.test.js` |
|
|
124
|
+
| Signature confusion | A plain digest or platform publication signal is presented as a cryptographic signature | External signing-provider boundary | `ATTESTED` requires a valid external signature under the requested signer policy; private keys and tokens never enter persisted artifacts | Trust in the external signer and transparency infrastructure remains outside ForgeLoop | `tests/signing-provider.test.js` |
|
|
125
|
+
| Incomplete revision coverage | A changed source path has no valid task attestation or overlaps another task with a conflicting digest | Provider-neutral range coverage evaluator | Changed, covered, uncovered, and overlapping paths are computed from the selected revision provider; enforcement fails closed on gaps or conflicts | Coverage is limited to the provider's observable revision/content boundary | `tests/attestation-coverage.test.js`, `tests/generic-ci-attestation.test.js` |
|
|
119
126
|
|
|
120
127
|
## Boundary rules
|
|
121
128
|
|