@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.
Files changed (127) hide show
  1. package/DOCS_INDEX.md +26 -4
  2. package/EXECUTION_STATE.md +7 -0
  3. package/LOOP_ENGINEERING.md +58 -0
  4. package/LOOP_SYSTEM_DESIGN.md +54 -0
  5. package/ORCHESTRATOR_INTEGRATION.md +23 -0
  6. package/PROTOCOL_INTEGRATION.md +36 -0
  7. package/QUALITY_SCORECARD.md +21 -0
  8. package/README.md +57 -2
  9. package/TERMINOLOGY.md +11 -0
  10. package/THREAT_MODEL.md +7 -0
  11. package/completions/_forgeloop +85 -0
  12. package/completions/forgeloop.bash +173 -0
  13. package/completions/forgeloop.fish +544 -0
  14. package/docs/AGENT_PROTOCOL_SUMMARY.md +281 -0
  15. package/docs/ARTIFACT_REFERENCE.md +226 -0
  16. package/docs/CLI_REFERENCE.md +308 -2
  17. package/docs/CODE_ATTESTATION.md +141 -0
  18. package/docs/CROSS_HARNESS_CONTINUITY.md +22 -2
  19. package/docs/DOCUMENTATION_GUIDE.md +13 -11
  20. package/docs/GETTING_STARTED.md +98 -1
  21. package/docs/MCP.md +8 -0
  22. package/docs/PLATFORM_ADAPTERS.md +69 -0
  23. package/docs/RECIPES.md +138 -0
  24. package/docs/RELEASE_CHECKLIST.md +54 -0
  25. package/docs/REVISION_PROVIDERS.md +136 -0
  26. package/docs/SIGNING_PROVIDERS.md +83 -0
  27. package/docs/TROUBLESHOOTING.md +184 -0
  28. package/docs/UNIVERSAL_INTEGRATION.md +11 -0
  29. package/docs/assets/diagrams/forgeloop-code-attestation-flow.html +13841 -0
  30. package/docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json +37 -0
  31. package/docs/assets/diagrams/forgeloop-code-attestation-flow.svg +5046 -0
  32. package/docs/assets/diagrams/forgeloop-engineering-flow.html +46 -43
  33. package/docs/assets/diagrams/forgeloop-engineering-flow.receipt.json +6 -6
  34. package/docs/assets/diagrams/forgeloop-engineering-flow.svg +41 -41
  35. package/docs/assets/diagrams/forgeloop-verification-trust-flow.html +13783 -0
  36. package/docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json +37 -0
  37. package/docs/assets/diagrams/forgeloop-verification-trust-flow.svg +4988 -0
  38. package/docs/diagrams/README.md +30 -22
  39. package/docs/diagrams/forgeloop-code-attestation-flow.workflow.json +125 -0
  40. package/docs/diagrams/forgeloop-engineering-flow.workflow.json +11 -8
  41. package/docs/diagrams/forgeloop-verification-trust-flow.workflow.json +116 -0
  42. package/docs/diagrams/manifest.json +42 -0
  43. package/docs/diagrams/reviews/forgeloop-code-attestation-flow.review.json +20 -0
  44. package/docs/diagrams/reviews/forgeloop-engineering-flow.review.json +3 -3
  45. package/docs/diagrams/reviews/forgeloop-verification-trust-flow.review.json +20 -0
  46. package/integrations/generic-ci/verify.sh +14 -0
  47. package/package.json +31 -9
  48. package/schemas/attestation-verification-result.schema.json +34 -0
  49. package/schemas/code-attestation.schema.json +61 -0
  50. package/schemas/code-manifest.schema.json +57 -0
  51. package/schemas/config.schema.json +57 -1
  52. package/schemas/handoff-envelope.schema.json +57 -0
  53. package/schemas/in-toto-statement.schema.json +32 -0
  54. package/schemas/responsibility.schema.json +37 -0
  55. package/schemas/verification-scope.schema.json +26 -0
  56. package/schemas/workspace-binding.schema.json +20 -0
  57. package/scripts/CI_VALIDATORS.md +3 -0
  58. package/scripts/benchmark-cli-startup.mjs +60 -0
  59. package/scripts/check-changelog-freshness.mjs +88 -0
  60. package/scripts/check-critical-coverage.mjs +58 -0
  61. package/scripts/generate-agent-protocol-summary.mjs +141 -0
  62. package/scripts/generate-shell-completions.mjs +132 -0
  63. package/scripts/write-forgeloop-attestation-summary.mjs +93 -0
  64. package/src/cli.js +114 -6
  65. package/src/commands/attestation-create.js +30 -0
  66. package/src/commands/attestation-status.js +12 -0
  67. package/src/commands/attestation-verify-range.js +32 -0
  68. package/src/commands/attestation-verify.js +23 -0
  69. package/src/commands/handoff-create.js +9 -0
  70. package/src/commands/handoff-list.js +12 -0
  71. package/src/commands/handoff-show.js +10 -0
  72. package/src/commands/responsibility-set.js +20 -0
  73. package/src/commands/responsibility-status.js +12 -0
  74. package/src/commands/run-check.js +43 -3
  75. package/src/commands/task-repair-legacy-recovery.js +1 -2
  76. package/src/commands/verify-scope.js +9 -0
  77. package/src/commands/workspace-bind.js +17 -0
  78. package/src/commands/workspace-status.js +19 -0
  79. package/src/core/artifact-registry.js +84 -0
  80. package/src/core/attestation-coverage.js +134 -0
  81. package/src/core/attestation-verifier.js +227 -0
  82. package/src/core/attestation.js +263 -0
  83. package/src/core/audit.js +67 -1
  84. package/src/core/bundles.js +210 -9
  85. package/src/core/cli-command-definitions.js +196 -0
  86. package/src/core/code-manifest.js +293 -0
  87. package/src/core/command-executors.js +79 -0
  88. package/src/core/command-input.js +69 -18
  89. package/src/core/command-runtime.js +2 -1
  90. package/src/core/completion.js +170 -8
  91. package/src/core/config.js +60 -2
  92. package/src/core/continuity-cli-options.js +9 -3
  93. package/src/core/continuity-reconciliation.js +20 -0
  94. package/src/core/diagnostic-projection.js +3 -1
  95. package/src/core/error-codes.js +146 -0
  96. package/src/core/events.js +109 -13
  97. package/src/core/exit-codes.js +22 -0
  98. package/src/core/handoff.js +208 -0
  99. package/src/core/information-gain-projection.js +3 -3
  100. package/src/core/integration-invocation-policy.js +40 -0
  101. package/src/core/integration-resources.js +54 -0
  102. package/src/core/next-action-phases.js +968 -0
  103. package/src/core/next-action.js +32 -951
  104. package/src/core/phase.js +29 -1
  105. package/src/core/protocol-info.js +41 -1
  106. package/src/core/repository.js +256 -11
  107. package/src/core/responsibility.js +265 -0
  108. package/src/core/revision/git.js +207 -0
  109. package/src/core/revision/provider.js +90 -0
  110. package/src/core/revision/registry.js +5 -0
  111. package/src/core/route-artifact.js +1 -1
  112. package/src/core/schema-validation.js +8 -0
  113. package/src/core/signing/none.js +23 -0
  114. package/src/core/signing/provider.js +21 -0
  115. package/src/core/signing/registry.js +7 -0
  116. package/src/core/signing/sigstore.js +158 -0
  117. package/src/core/task-command.js +9 -1
  118. package/src/core/task-paths.js +72 -0
  119. package/src/core/templates.js +8 -0
  120. package/src/core/verification-scope-capability.js +179 -0
  121. package/src/core/verification-scope.js +271 -0
  122. package/src/core/workspace-binding.js +211 -0
  123. package/src/integration.d.ts +91 -0
  124. package/AGENT_COMPATIBILITY.md +0 -11
  125. package/docs/RELEASE_CHECKLIST_1_4.md +0 -38
  126. package/docs/RELEASE_CHECKLIST_1_5_MCP.md +0 -78
  127. package/docs/RELEASE_CHECKLIST_1_6_1.md +0 -121
@@ -0,0 +1,281 @@
1
+ # ForgeLoop Agent Protocol Summary
2
+
3
+ > Generated from the ForgeLoop protocol registries. This file is a concise navigation aid; the normative documents, schemas, and CLI implementation remain authoritative.
4
+
5
+ ## Scope
6
+
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
+
9
+ Protocol version: 1
10
+ Package version: 1.6.4
11
+
12
+ ## Canonical loop
13
+
14
+ 1. Discover existing work with forgeloop task-list --json.
15
+ 2. Select or create one task, then run forgeloop next --task <id> --json.
16
+ 3. Persist the contract, route, gates, and source registry; require forgeloop preflight to return READY.
17
+ 4. Execute bounded checks through the canonical CLI and preserve execution provenance.
18
+ 5. Reconcile continuity, inspect evidence, and advance through VERIFYING and REVIEWING.
19
+ 6. Run forgeloop complete; accept completion only when the validator returns VALID.
20
+ 7. Run forgeloop next again and follow the returned lifecycle action to a terminal state or an explicit blocker.
21
+
22
+ ## Authority boundaries
23
+
24
+ - Protocol-derived facts outrank actor-provided labels, free-form summaries, and guessed identities.
25
+ - Optional artifacts are reported as NOT_APPLICABLE when absent; malformed active security artifacts fail closed.
26
+ - Workspace binding confirms an explicit Git worktree identity but is not a portability requirement for attestation.
27
+ - Handoff envelopes record immutable intent and state snapshots; they do not delegate work or grant completion authority.
28
+ - Responsibility contracts constrain paths, checks, and frozen inputs; they do not prove identity or authorship.
29
+ - Verification scope describes planned verification breadth. Attestation coverage proves content for a concrete revision. These are separate claims.
30
+ - Attestation manifests exclude ForgeLoop protocol metadata and bind to the completion receipt and append-only ledger without circular references.
31
+ - Verification commands are read-only. Signing is external; private keys and credentials are never persisted by ForgeLoop.
32
+
33
+ ## Lifecycle
34
+
35
+ Phases: RECEIVED, DISCOVERING, CONTRACT_READY, ROUTED, DESIGNING, PLANNED, EXECUTING, VERIFYING, DIAGNOSING, CORRECTING, REVIEWING, COMPLETE, BLOCKED
36
+
37
+ ## Feature registry
38
+
39
+ | Feature | Version | Supported |
40
+ | --- | --- | --- |
41
+ | canonicalHandoffs | 1 | yes |
42
+ | capabilityPolicy | 1 | yes |
43
+ | codeAttestation | 1 | yes |
44
+ | diagnostics | n/a | yes |
45
+ | differentialVerificationScope | 1 | yes |
46
+ | durableActions | 1 | yes |
47
+ | durableApprovals | 1 | yes |
48
+ | executionHistory | 1 | yes |
49
+ | integrationApi | 1 | yes |
50
+ | observabilityStability | n/a | yes |
51
+ | reflection | 1 | yes |
52
+ | responsibilityConstraints | 1 | yes |
53
+ | structuredTrace | 1 | yes |
54
+ | taskClaimRecovery | 1 | yes |
55
+ | taskInspection | 1 | yes |
56
+ | trajectoryEvaluation | 1 | yes |
57
+ | trajectoryMetrics | 1 | yes |
58
+ | verificationExecutionIsolation | 1 | yes |
59
+ | workspaceBinding | 1 | yes |
60
+
61
+ ## Public artifact registry
62
+
63
+ | Key | Scope | Path | Schema | Trust role |
64
+ | --- | --- | --- | --- | --- |
65
+ | actions | TASK | .forgeloop/task-state/<task-key>/actions/action-<id>.json | action | EXTERNAL_ACTION_PROVENANCE |
66
+ | approvals | TASK | .forgeloop/task-state/<task-key>/approvals/approval-<id>.json | approval | ACTION_APPROVAL_ATTESTATION |
67
+ | attestationBundle | TASK | .forgeloop/task-state/<task-key>/attestations/statement.sigstore.json | n/a | EXTERNAL_SIGNATURE_BUNDLE |
68
+ | attestationStatement | TASK | .forgeloop/task-state/<task-key>/attestations/statement.json | in-toto-statement | CODE_ATTESTATION_STATEMENT |
69
+ | capabilityPolicy | PROJECT | .forgeloop/policy/capabilities.json | capability-policy | CAPABILITY_POLICY_SPECIFICATION |
70
+ | codeManifest | TASK | .forgeloop/task-state/<task-key>/attestations/code-manifest.json | code-manifest | CONTENT_INTEGRITY_SNAPSHOT |
71
+ | config | PROJECT | .forgeloop/config.json | config | PROJECT_CONFIGURATION |
72
+ | continuity | TASK | .forgeloop/task-state/<task-key>/continuity.json | continuity | NON_EVIDENCE_HANDOFF |
73
+ | contract | TASK | .forgeloop/task-state/<task-key>/contract.json | current-contract | OPERATIONAL_SPECIFICATION |
74
+ | descriptor | TASK | .forgeloop/task-state/<task-key>/task.json | task-descriptor | TASK_DESCRIPTOR |
75
+ | evaluations | TASK | .forgeloop/task-state/<task-key>/evaluations/eval-<id>.json | trajectory-evaluation | TRAJECTORY_EVALUATION |
76
+ | events | TASK | .forgeloop/task-state/<task-key>/events.ndjson | event | AUDIT_LEDGER |
77
+ | executions | TASK | .forgeloop/task-state/<task-key>/executions/exec-<id>.json | execution | EXECUTION_PROVENANCE |
78
+ | gates | TASK | .forgeloop/task-state/<task-key>/gates/<gate>.json | gate | GATE_APPROVAL_ATTESTATION |
79
+ | handoffs | TASK | .forgeloop/task-state/<task-key>/handoffs/handoff-<id>.json | handoff-envelope | CANONICAL_HANDOFF_SNAPSHOT |
80
+ | policyBaseline | PROJECT | .forgeloop/policy/baseline.json | policy-baseline | BROWNFIELD_BASELINE |
81
+ | policyDiscovery | PROJECT | .forgeloop/policy/discovery.json | policy-discovery | DISCOVERED_POLICY_SPECIFICATION |
82
+ | policyLock | PROJECT | .forgeloop/policy/policy.lock | policy-lock | POLICY_INTEGRITY_LOCK |
83
+ | policyRules | PROJECT | .forgeloop/policy/rules.json | policy-rules | POLICY_SPECIFICATION |
84
+ | policySnapshot | TASK | .forgeloop/task-state/<task-key>/policy-snapshot.json | policy-snapshot | TASK_POLICY_ATTESTATION |
85
+ | preflight | TASK | .forgeloop/task-state/<task-key>/preflight.json | preflight | READINESS_ATTESTATION |
86
+ | receipt | TASK | .forgeloop/task-state/<task-key>/execution-receipt.json | execution-receipt | EVIDENCE_COMPILATION |
87
+ | recovery | TASK | .forgeloop/task-state/<task-key>/recovery.json | task-recovery | TASK_RECOVERY_STATE |
88
+ | responsibility | TASK | .forgeloop/task-state/<task-key>/responsibility.json | responsibility | RESPONSIBILITY_CONSTRAINT |
89
+ | route | TASK | .forgeloop/task-state/<task-key>/routing-result.json | routing-result | GUIDE_ROUTING_SPECIFICATION |
90
+ | session | SESSION | .forgeloop/sessions/<session-id>.json | activation | SESSION_MARKER |
91
+ | sources | PROJECT | .forgeloop/sources.json | source-registry | SOURCE_ATTESTATION |
92
+ | state | TASK | .forgeloop/task-state/<task-key>/work-state.json | work-state | CANONICAL_LIFECYCLE_STATE |
93
+ | verificationScope | TASK | .forgeloop/task-state/<task-key>/verification-scope.json | verification-scope | VERIFICATION_SCOPE_PLAN |
94
+ | workspaceBinding | TASK | .forgeloop/task-state/<task-key>/workspace-binding.json | workspace-binding | WORKSPACE_IDENTITY_BINDING |
95
+
96
+ ## Command catalog
97
+
98
+ ### actions
99
+
100
+ | Command | Mutation | Purpose |
101
+ | --- | --- | --- |
102
+ | action-authorize | MUTATING | Authorizes one PROPOSED durable action through the canonical capability-policy and approval service. |
103
+ | action-propose | MUTATING | Proposes a caller-reported durable action without executing it. |
104
+ | action-reconcile | MUTATING | Reconciles a COMMIT_UNKNOWN action from externally observed evidence without retrying it. |
105
+ | action-record | MUTATING | Records a caller-reported or externally observed non-authority action transition. |
106
+ | action-show | READ_ONLY | Reads one canonical durable action artifact. |
107
+ | action-verify | MUTATING | Verifies a COMMITTED action against independent canonical evidence; caller claims can never verify. |
108
+ | approval-request | MUTATING | Creates a durable fingerprint-bound approval request. |
109
+ | approval-resolve | MUTATING | Resolves one durable approval exactly once. |
110
+ | run-action | EXTERNAL_EXECUTION | Executes one policy-authorized durable action using exact argv and shell:false semantics. |
111
+
112
+ ### attestation
113
+
114
+ | Command | Mutation | Purpose |
115
+ | --- | --- | --- |
116
+ | attestation-create | MUTATING | Builds a deterministic in-toto ForgeLoop statement from a valid completed task manifest. |
117
+ | attestation-status | READ_ONLY | Reports local ForgeLoop attestation status and trust level without network access. |
118
+ | attestation-verify | READ_ONLY | Verifies a task attestation and current revision without mutating task state. |
119
+ | attestation-verify-range | READ_ONLY | Verifies complete attestation coverage for an opaque revision range through a provider-neutral contract. |
120
+
121
+ ### continuity
122
+
123
+ | Command | Mutation | Purpose |
124
+ | --- | --- | --- |
125
+ | clear-continuity | MUTATING | Removes continuity.json for the active task without affecting lifecycle work state. |
126
+ | continuity | READ_ONLY | Reads and displays current cross-harness continuity handoff notes. |
127
+ | handoff-create | MUTATING | Creates an immutable protocol-derived handoff snapshot without delegation or review side effects. |
128
+ | handoff-list | READ_ONLY | Lists immutable handoff snapshots for a task. |
129
+ | handoff-show | READ_ONLY | Reads and verifies one immutable handoff snapshot. |
130
+ | reconcile-continuity | READ_ONLY | Reconciles continuity handoff notes with active work state and checkout state. |
131
+ | record-continuity | MUTATING | Persists cross-harness operational continuity handoff notes bound to current state fingerprints. |
132
+
133
+ ### diagnostics
134
+
135
+ | Command | Mutation | Purpose |
136
+ | --- | --- | --- |
137
+ | doctor | MUTATING | Diagnoses project health, discovers adapters, and optionally repairs missing template files. |
138
+ | eval | MUTATING | Evaluates the current trajectory against a validated project-local reference scenario. |
139
+ | history | READ_ONLY | Shows chronological protocol history reconstructed from canonical ForgeLoop state. |
140
+ | inspect | READ_ONLY | Inspects target repository health, dirty files, active branch, and artifact freshness. |
141
+ | metrics | READ_ONLY | Projects trajectory, action, execution, timing, and known usage metrics without mutating state. |
142
+ | profile-interview | READ_ONLY | Optional interactive or dry-run interview to refine project profile facts. |
143
+ | progress | READ_ONLY | Evaluates task progress across verification cycles and detects stalls deterministically. |
144
+ | protocol-info | READ_ONLY | Reports versioning, lifecycle, command, guide, and public error compatibility metadata for external harnesses. |
145
+ | reflect | READ_ONLY | Analyzes diagnostic and correction history deterministically for information gain, repeated failures, ineffective interventions, and oscillation. |
146
+ | status | READ_ONLY | Displays current lifecycle phase, active checks, blockers, and artifact freshness bindings. |
147
+ | trace | READ_ONLY | Emits detailed structured task trace with provenance and artifact relationships. |
148
+ | validate-protocol | READ_ONLY | Validates end-to-end cryptographic freshness, fingerprint bindings, and ledger integrity. |
149
+ | validate-state | READ_ONLY | Validates schema adherence and internal consistency of work-state.json. |
150
+
151
+ ### lifecycle
152
+
153
+ | Command | Mutation | Purpose |
154
+ | --- | --- | --- |
155
+ | activate | MUTATING | Emits an active session marker recording sessionId and activationMarker. |
156
+ | advance | MUTATING | Transitions the canonical lifecycle work state to an allowed target phase. |
157
+ | clear-state | MUTATING | Removes work-state.json for the active task only, preserving sibling contract, routing, and ledger files. |
158
+ | complete | MUTATING | Evaluates verification receipt coverage, gates, and ledger integrity to authorize task completion. |
159
+ | next | READ_ONLY | Returns deterministic next-action guidance and command recommendations based on active state. |
160
+ | preflight | MUTATING | Evaluates pre-implementation contract, routing, and gates; synchronizes work state when READY. |
161
+ | reconcile-closure | MUTATING | Refreshes the work-state checkpoint of an EXECUTING task whose objective is already satisfied in the current repository, after contract-bound executed evidence, so canonical completion can proceed. |
162
+ | record-decision-criterion | MUTATING | Records an append-only decision settlement criterion bound to the active contract fingerprint. |
163
+ | record-diagnosis | MUTATING | Records an append-only diagnosis event or structured diagnostic case in the lifecycle event ledger. |
164
+ | record-hypothesis-disposition | MUTATING | Records an evidence-bound hypothesis disposition update in the lifecycle event ledger. |
165
+ | record-intervention | MUTATING | Records an append-only intervention bound to hypotheses; the described change is never executed by ForgeLoop. |
166
+ | route | MUTATING | Evaluates task characteristics and deterministically routes required engineering guides. |
167
+ | task-create | MUTATING | Creates a new task descriptor and initializes its isolated task state namespace. |
168
+ | task-list | READ_ONLY | Lists all discovered task descriptors and their current lifecycle phases. |
169
+ | task-lock-status | READ_ONLY | Reports a task lock record and its lease-based stale-lock classification. |
170
+ | task-scope | MUTATING | Updates or inspects write claims for a task before execution. |
171
+ | task-show | READ_ONLY | Shows details of a specific task descriptor and its scoped artifacts. |
172
+
173
+ ### policy-audit
174
+
175
+ | Command | Mutation | Purpose |
176
+ | --- | --- | --- |
177
+ | baseline | MUTATING | Manages brownfield policy baseline violations with monotonic downward ratcheting. |
178
+ | bundle | MUTATING | Exports current task artifacts into a portable task bundle archive. |
179
+ | policy | READ_ONLY | Evaluates active task state against named enterprise policy packs. |
180
+ | policy-diff | READ_ONLY | Performs semantic diffing between policy versions to detect tightening or weakening. |
181
+ | policy-discover | MUTATING | Discovers repository policy facts and candidate rules deterministically. |
182
+ | policy-status | READ_ONLY | Evaluates repository and task state against effective policy rules and baseline. |
183
+ | rule-verify | READ_ONLY | Verifies policy rules against mutation fixtures to prove detector efficacy. |
184
+
185
+ ### project-maintenance
186
+
187
+ | Command | Mutation | Purpose |
188
+ | --- | --- | --- |
189
+ | init | MUTATING | Initializes a target project directory with ForgeLoop discovery adapters, schemas, and templates. |
190
+ | migrate-protocol | MUTATING | Safely migrates explicitly supported protocol state; unknown target versions fail without rewriting artifacts. |
191
+ | task-migrate | MUTATING | Migrates a legacy 1.0 singleton task state layout into a task-namespaced layout. |
192
+ | task-recover | MUTATING | Caller-acknowledged recovery of a STALE or ABANDONED task; records durable state and releases effective write claims. |
193
+ | task-repair-legacy-recovery | MUTATING | Migrates one recognized legacy OPERATOR_RECOVERY_RECORDED boundary event into the modern durable recovery representation (append-only; original event unchanged). |
194
+ | task-resume | MUTATING | Reacquires a recovered task's write claims under project serialization and restores ordinary mutation authority. |
195
+ | task-unlock | MUTATING | Removes an orphaned task lock file to recover an interrupted task. |
196
+ | update | MUTATING | Updates installed templates, discovery adapters, and canonical engineering guides to the latest version. |
197
+
198
+ ### scope
199
+
200
+ | Command | Mutation | Purpose |
201
+ | --- | --- | --- |
202
+ | responsibility-set | MUTATING | Creates immutable, mechanically verifiable constraints for a task pass. |
203
+ | responsibility-status | READ_ONLY | Validates active responsibility constraints against current paths, inputs, and checks. |
204
+
205
+ ### verification
206
+
207
+ | Command | Mutation | Purpose |
208
+ | --- | --- | --- |
209
+ | audit | READ_ONLY | Performs read-only evaluation of verification receipt coverage and gate satisfaction. |
210
+ | prepare-completion | MUTATING | Initializes execution-receipt.json with empty requirement evidence slots for the active cycle. |
211
+ | record-check | MUTATING | Records structured verification evidence (command, manual review, or test output) against a requirement. |
212
+ | record-terminal-result | MUTATING | Records external terminal result evidence (PUBLICATION or PRODUCTION_READINESS) into receipt. |
213
+ | report | READ_ONLY | Emits a human-readable or structured JSON summary report of protocol state. |
214
+ | run-check | EXTERNAL_EXECUTION | Runs an exact command, records the execution provenance artifact, and binds observed check evidence. |
215
+ | validate-receipt | READ_ONLY | Validates schema conformance and cryptographic bounds of an execution receipt file. |
216
+ | verify-scope | MUTATING | Resolves a provable changed, claimed, full, or unresolved verification boundary without launching checks. |
217
+
218
+ ### workspace
219
+
220
+ | Command | Mutation | Purpose |
221
+ | --- | --- | --- |
222
+ | workspace-bind | MUTATING | Binds a task to the current Git worktree identity; rebinding is not implicit. |
223
+ | workspace-status | READ_ONLY | Reports whether the current Git worktree matches an optional task binding. |
224
+
225
+ ## Stable boundary and attestation errors
226
+
227
+ | Code | Meaning |
228
+ | --- | --- |
229
+ | E_ATTESTATION_CONFIGURATION_INVALID | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
230
+ | E_ATTESTATION_CONTENT_MISMATCH | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
231
+ | E_ATTESTATION_CONTRACT_MISMATCH | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
232
+ | E_ATTESTATION_COVERAGE_CONFLICT | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
233
+ | E_ATTESTATION_COVERAGE_GAP | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
234
+ | E_ATTESTATION_DISABLED | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
235
+ | E_ATTESTATION_GIT_REQUIRED | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
236
+ | E_ATTESTATION_IDENTITY_UNTRUSTED | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
237
+ | E_ATTESTATION_INVALID | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
238
+ | E_ATTESTATION_ISSUER_UNTRUSTED | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
239
+ | E_ATTESTATION_LEDGER_MISMATCH | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
240
+ | E_ATTESTATION_MANIFEST_INVALID | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
241
+ | E_ATTESTATION_MANIFEST_MISSING | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
242
+ | E_ATTESTATION_MANIFEST_STALE | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
243
+ | E_ATTESTATION_RECEIPT_MISMATCH | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
244
+ | E_ATTESTATION_ROUTE_MISMATCH | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
245
+ | E_ATTESTATION_SCOPE_MISMATCH | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
246
+ | E_ATTESTATION_SIGNATURE_INVALID | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
247
+ | E_ATTESTATION_SIGNER_UNAVAILABLE | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
248
+ | E_ATTESTATION_STATE_MISMATCH | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
249
+ | E_ATTESTATION_STATEMENT_INVALID | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
250
+ | E_ATTESTATION_STATEMENT_MISSING | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
251
+ | E_ATTESTATION_SUBJECT_MISMATCH | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
252
+ | E_ATTESTATION_TARGET_REF_INVALID | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
253
+ | E_ATTESTATION_UNSIGNED | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
254
+ | E_CLI_INVOCATION_INVALID | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
255
+ | E_HANDOFF_INVALID | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
256
+ | E_HANDOFF_NOT_FOUND | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
257
+ | E_HANDOFF_STATE_UNAVAILABLE | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
258
+ | E_HANDOFF_TAMPERED | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
259
+ | E_RESPONSIBILITY_FROZEN_INPUT_DRIFT | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
260
+ | E_RESPONSIBILITY_INVALID | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
261
+ | E_RESPONSIBILITY_REQUIRED_CHECK_MISSING | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
262
+ | E_RESPONSIBILITY_SCOPE_VIOLATION | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
263
+ | E_REVISION_CONTENT_UNAVAILABLE | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
264
+ | E_REVISION_NOT_FOUND | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
265
+ | E_REVISION_PROVIDER_AMBIGUOUS | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
266
+ | E_REVISION_PROVIDER_INVALID | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
267
+ | E_REVISION_PROVIDER_UNAVAILABLE | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
268
+ | E_VERIFICATION_SCOPE_INVALID | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
269
+ | E_VERIFICATION_SCOPE_STALE | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
270
+ | E_VERIFICATION_SCOPE_UNRESOLVED | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
271
+ | E_WORKSPACE_BINDING_INVALID | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
272
+ | E_WORKSPACE_BINDING_MISMATCH | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
273
+ | E_WORKSPACE_IDENTITY_UNAVAILABLE | A ForgeLoop boundary, artifact, provider, or attestation validation condition was not satisfied. |
274
+
275
+ ## Authoritative implementation surfaces
276
+
277
+ - Normative protocol: LOOP_ENGINEERING.md and PROTOCOL_INTEGRATION.md.
278
+ - Artifact contracts: schemas/.
279
+ - Lifecycle and command behavior: src/core/ and src/cli.js.
280
+ - Integration surface: src/integration.js, src/integration.d.ts, and integrations/.
281
+ - User-facing command and artifact references: docs/CLI_REFERENCE.md and docs/ARTIFACT_REFERENCE.md.
@@ -35,6 +35,13 @@ All artifact schemas are defined in `schemas/*.schema.json`. Persisted artifact
35
35
  | `task-state/<task-key>/approvals/approval-<id>.json` | `approval` | Protocol Managed | Append Decision Once | Action Approval Attestation |
36
36
  | `policy/capabilities.json` | `capability-policy` | Operator Or Agent | Mutable Configuration | Capability Policy Specification |
37
37
  | `task-state/<task-key>/evaluations/eval-<id>.json` | `trajectory-evaluation` | Protocol Compiled | Immutable Once Written | Trajectory Evaluation |
38
+ | `task-state/<task-key>/workspace-binding.json` | `workspace-binding` | Protocol Generated | Immutable After Bind | Workspace Identity Binding |
39
+ | `task-state/<task-key>/handoffs/handoff-<id>.json` | `handoff-envelope` | Protocol Compiled | Immutable Once Written | Canonical Handoff Snapshot |
40
+ | `task-state/<task-key>/responsibility.json` | `responsibility` | Agent Or Harness Constrained | Immutable During Pass | Responsibility Constraint |
41
+ | `task-state/<task-key>/verification-scope.json` | `verification-scope` | Protocol Compiled | Recomputed On Scope Change | Verification Scope Plan |
42
+ | `task-state/<task-key>/attestations/code-manifest.json` | `code-manifest` | Protocol Generated | Immutable Once Written | Content Integrity Snapshot |
43
+ | `task-state/<task-key>/attestations/statement.json` | `in-toto-statement` | Protocol Compiled | Immutable Once Written | Code Attestation Statement |
44
+ | `task-state/<task-key>/attestations/statement.sigstore.json` | `null` | External Signing Provider | External Immutable | External Signature Bundle |
38
45
 
39
46
  <!-- END FORGELOOP GENERATED: artifact-registry -->
40
47
 
@@ -227,6 +234,25 @@ Local ForgeLoop configuration settings and policy bindings.
227
234
  - `policy` *(string, optional, minLength: 1)*
228
235
  - `requiredGates` *(array<string>, optional)*
229
236
  - `requiredEvidence` *(array<string>, optional)*
237
+ - `verification` *(object, optional)*
238
+ - `checkers` *(array<object>, required)*
239
+ - `checkId` *(string, required, minLength: 1)*
240
+ - `scopeMode` *(string, required, const: `PATH_ARGUMENTS`)*
241
+ - `argvPrefix` *(array<string>, required, minItems: 1)*
242
+ - `pathInsertion` *(string, required, const: `APPEND`)*
243
+ - `attestation` *(object, optional)*
244
+ - `mode` *(string, required, enum: `off`, `optional`, `required`)*
245
+ - `revisionProvider` *(string, required, minLength: 1)*
246
+ - `requireCompleteCoverage` *(boolean, required)*
247
+ - `coverage` *(object, required)*
248
+ - `exclude` *(array<string>, required)*
249
+ - `signing` *(object, required)*
250
+ - `provider` *(string, required, enum: `none`, `sigstore`)*
251
+ - `required` *(boolean, required)*
252
+ - `policy` *(object, required)*
253
+ - `issuer` *(string, optional)*
254
+ - `identities` *(array<string>, required)*
255
+ - `requireTransparencyLog` *(boolean, required)*
230
256
 
231
257
  <!-- END FORGELOOP GENERATED: schema:config -->
232
258
 
@@ -803,3 +829,203 @@ evidence and never override lifecycle validation.
803
829
  - `evaluationFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
804
830
 
805
831
  <!-- END FORGELOOP GENERATED: schema:trajectory-evaluation -->
832
+
833
+ ### 2.24 `task-state/<taskKey>/workspace-binding.json`
834
+
835
+ <!-- forgeloop-doc: schema=workspace-binding artifact=.forgeloop/task-state/<task-key>/workspace-binding.json -->
836
+
837
+ Optional immutable binding between a task and the exact Git repository/worktree
838
+ identity used for protocol mutations. A binding is enforced when present; it
839
+ does not fabricate a binding when absent.
840
+
841
+ #### Canonical Fields
842
+
843
+ <!-- BEGIN FORGELOOP GENERATED: schema:workspace-binding -->
844
+
845
+ - `schemaVersion` *(number, required, const: 1)*
846
+ - `protocolVersion` *(number, required, const: 1)*
847
+ - `taskId` *(string, required, minLength: 1)*
848
+ - `mode` *(string, required, const: `GIT_WORKTREE`)*
849
+ - `repositoryIdentity` *(string, required, pattern: `^[a-f0-9]{64}$`)*
850
+ - `workspaceIdentity` *(string, required, pattern: `^[a-f0-9]{64}$`)*
851
+ - `branchAtBind` *(string or null, required)*
852
+ - `headAtBind` *(string or null, required)*
853
+ - `boundAt` *(string, required, minLength: 1)*
854
+ - `metadata` *(object, optional)*
855
+
856
+ <!-- END FORGELOOP GENERATED: schema:workspace-binding -->
857
+
858
+ ### 2.25 `task-state/<taskKey>/handoffs/handoff-<id>.json`
859
+
860
+ <!-- forgeloop-doc: schema=handoff-envelope artifact=.forgeloop/task-state/<task-key>/handoffs/handoff-<id>.json -->
861
+
862
+ Immutable protocol-derived handoff snapshot. The caller may provide only
863
+ recipient intent; lifecycle state, evidence, continuity, and the artifact
864
+ digest are derived by ForgeLoop. A handoff is not delegation, review,
865
+ completion, or authority evidence.
866
+
867
+ #### Canonical Fields
868
+
869
+ <!-- BEGIN FORGELOOP GENERATED: schema:handoff-envelope -->
870
+
871
+ - `schemaVersion` *(number, required, const: 1)*
872
+ - `protocolVersion` *(number, required, const: 1)*
873
+ - `handoffId` *(string, required, pattern: `^handoff-[A-Za-z0-9_-]+$`)*
874
+ - `taskId` *(string, required, minLength: 1)*
875
+ - `createdAt` *(string, required, minLength: 1)*
876
+ - `intent` *(object, required)*
877
+ - `recipientHint` *(string, optional, minLength: 1)*
878
+ - `note` *(string, optional, minLength: 1)*
879
+ - `state` *(object, required)*
880
+ - `phase` *(string, required, minLength: 1)*
881
+ - `revision` *(integer, required, minimum: 0)*
882
+ - `verificationCycle` *(integer, required, minimum: 1)*
883
+ - `contractFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
884
+ - `routeFingerprint` *(string or null, required)*
885
+ - `repositoryFingerprint` *(object, required)*
886
+ - `writeClaims` *(array<string>, required)*
887
+ - `changedPaths` *(array<string>, required)*
888
+ - `evidence` *(object, required)*
889
+ - `executionRefs` *(array<string>, required)*
890
+ - `checkIds` *(array<string>, required)*
891
+ - `continuity` *(object, required)*
892
+ - `ref` *(string, required, minLength: 1)*
893
+ - `fingerprint` *(string or null, required)*
894
+ - `artifactDigest` *(string, required, pattern: `^[a-f0-9]{64}$`)*
895
+
896
+ <!-- END FORGELOOP GENERATED: schema:handoff-envelope -->
897
+
898
+ ### 2.26 `task-state/<taskKey>/responsibility.json`
899
+
900
+ <!-- forgeloop-doc: schema=responsibility artifact=.forgeloop/task-state/<task-key>/responsibility.json -->
901
+
902
+ Optional immutable pass constraints for allowed paths, read-only paths, frozen
903
+ inputs, and required checks. The constraints are checked at mutation, audit,
904
+ and completion boundaries.
905
+
906
+ #### Canonical Fields
907
+
908
+ <!-- BEGIN FORGELOOP GENERATED: schema:responsibility -->
909
+
910
+ - `schemaVersion` *(number, required, const: 1)*
911
+ - `protocolVersion` *(number, required, const: 1)*
912
+ - `taskId` *(string, required, minLength: 1)*
913
+ - `label` *(string, required, minLength: 1)*
914
+ - `createdAt` *(string, required, minLength: 1)*
915
+ - `allowedPaths` *(array<string>, required)*
916
+ - `readOnlyPaths` *(array<string>, required)*
917
+ - `requiredCheckIds` *(array<string>, required)*
918
+ - `frozenInputs` *(object, required)*
919
+ - `contract` *(boolean, optional)*
920
+ - `route` *(boolean, optional)*
921
+ - `claims` *(boolean, optional)*
922
+ - `baseline` *(object, required)*
923
+ - `contractFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
924
+ - `routeFingerprint` *(string or null, required)*
925
+ - `claimsFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
926
+
927
+ <!-- END FORGELOOP GENERATED: schema:responsibility -->
928
+
929
+ ### 2.27 `task-state/<taskKey>/verification-scope.json`
930
+
931
+ <!-- forgeloop-doc: schema=verification-scope artifact=.forgeloop/task-state/<task-key>/verification-scope.json -->
932
+
933
+ Read-only verification planning artifact. `AUTO` resolves to `CHANGED` or
934
+ `CLAIMED` only when a trusted scoped-checker capability is available;
935
+ otherwise it resolves to `FULL`. ForgeLoop does not publish a heuristic
936
+ `IMPACTED` mode.
937
+
938
+ #### Canonical Fields
939
+
940
+ <!-- BEGIN FORGELOOP GENERATED: schema:verification-scope -->
941
+
942
+ - `schemaVersion` *(number, required, const: 1)*
943
+ - `protocolVersion` *(number, required, const: 1)*
944
+ - `taskId` *(string, required, minLength: 1)*
945
+ - `requestedMode` *(string, required, enum: `AUTO`, `CHANGED`, `CLAIMED`, `FULL`)*
946
+ - `resolvedMode` *(string, required, enum: `CHANGED`, `CLAIMED`, `FULL`, `UNRESOLVED`)*
947
+ - `verificationCycle` *(integer, required, minimum: 1)*
948
+ - `changedPaths` *(array<string>, required)*
949
+ - `claimedPaths` *(array<string>, required)*
950
+ - `selectedPaths` *(array<string>, required)*
951
+ - `reasons` *(array<string>, required)*
952
+ - `fallback` *(null or object, required)*
953
+ - `contractFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
954
+ - `repositoryFingerprint` *(object, required)*
955
+ - `claimsFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
956
+ - `checkerCapabilityFingerprint` *(string, optional, pattern: `^[a-f0-9]{64}$`)*
957
+ - `createdAt` *(string, required, minLength: 1)*
958
+
959
+ <!-- END FORGELOOP GENERATED: schema:verification-scope -->
960
+
961
+ ### 2.28 `task-state/<taskKey>/attestations/code-manifest.json`
962
+
963
+ <!-- forgeloop-doc: schema=code-manifest artifact=.forgeloop/task-state/<task-key>/attestations/code-manifest.json -->
964
+
965
+ Deterministic raw-byte source-content manifest. Entries are sorted by safe
966
+ slash-separated paths, symlinks are represented by link bytes, Git links are
967
+ represented by provider identities, and `.forgeloop/**` is excluded.
968
+
969
+ #### Canonical Fields
970
+
971
+ <!-- BEGIN FORGELOOP GENERATED: schema:code-manifest -->
972
+
973
+ - `schemaVersion` *(number, required, const: 1)*
974
+ - `protocolVersion` *(number, required, const: 1)*
975
+ - `taskId` *(string, required, minLength: 1)*
976
+ - `verificationCycle` *(integer, required, minimum: 1)*
977
+ - `capture` *(object, required)*
978
+ - `mode` *(string, required, enum: `WORKTREE`, `INDEX`, `COMMIT`)*
979
+ - `revisionProvider` *(string, required, minLength: 1)*
980
+ - `baseRevision` *(string or null, required)*
981
+ - `observedRevision` *(string, required, minLength: 1)*
982
+ - `providerMetadata` *(object, required)*
983
+ - `bindings` *(object, required)*
984
+ - `contractFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
985
+ - `routeFingerprint` *(string or null, required)*
986
+ - `stateFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
987
+ - `receiptFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
988
+ - `ledgerSeq` *(integer, required, minimum: 1)*
989
+ - `ledgerHash` *(string, required, pattern: `^[a-f0-9]{64}$`)*
990
+ - `entries` *(array<object>, required)*
991
+ - `path` *(string, required, minLength: 1)*
992
+ - `sourcePath` *(string, optional, minLength: 1)*
993
+ - `operation` *(string, required, enum: `ADDED`, `MODIFIED`, `DELETED`, `RENAMED`, `COPIED`, `TYPE_CHANGED`)*
994
+ - `kind` *(string, required, enum: `FILE`, `SYMLINK`, `GITLINK`, `DELETED`)*
995
+ - `sha256` *(string, optional, pattern: `^[a-f0-9]{64}$`)*
996
+ - `providerContentId` *(string, optional, minLength: 1)*
997
+ - `providerMetadata` *(object, optional)*
998
+ - `contentDigest` *(string, required, pattern: `^[a-f0-9]{64}$`)*
999
+
1000
+ <!-- END FORGELOOP GENERATED: schema:code-manifest -->
1001
+
1002
+ ### 2.29 `task-state/<taskKey>/attestations/statement.json`
1003
+
1004
+ <!-- forgeloop-doc: schema=in-toto-statement artifact=.forgeloop/task-state/<task-key>/attestations/statement.json -->
1005
+
1006
+ Deterministic in-toto Statement v1 binding a code-manifest digest to the
1007
+ completed ForgeLoop evidence tuple. The statement is immutable and does not
1008
+ back-reference itself from the execution receipt.
1009
+
1010
+ #### Canonical Fields
1011
+
1012
+ <!-- BEGIN FORGELOOP GENERATED: schema:in-toto-statement -->
1013
+
1014
+ - `schemaVersion` *(number, required, const: 1)*
1015
+ - `_type` *(string, required, const: `https://in-toto.io/Statement/v1`)*
1016
+ - `subject` *(array<object>, required, minItems: 1)*
1017
+ - `name` *(string, required, minLength: 1)*
1018
+ - `digest` *(object, required)*
1019
+ - `sha256` *(string, required, pattern: `^[a-f0-9]{64}$`)*
1020
+ - `predicateType` *(string, required, const: `https://forgeloop.dev/attestation/v1`)*
1021
+ - `predicate` *(object, required)*
1022
+
1023
+ <!-- END FORGELOOP GENERATED: schema:in-toto-statement -->
1024
+
1025
+ ### 2.30 `task-state/<taskKey>/attestations/statement.sigstore.json`
1026
+
1027
+ <!-- forgeloop-doc: external-artifact=.forgeloop/task-state/<task-key>/attestations/statement.sigstore.json -->
1028
+
1029
+ Optional external signing-provider bundle. Its presence is not proof of a
1030
+ valid signature; verification must be performed by the configured signing
1031
+ provider with the requested identity and issuer policy.