@cassiomc1/forgeloop 1.13.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/AGENT_COMPATIBILITY.md +8 -0
  2. package/DOCS_INDEX.md +35 -3
  3. package/ENG/nodejs-backend-development-eng.md +2 -2
  4. package/ENG/sec-code-eng.md +7 -7
  5. package/EXECUTION_STATE.md +12 -0
  6. package/LOOP_ENGINEERING.md +28 -2
  7. package/ORCHESTRATOR_INTEGRATION.md +9 -5
  8. package/PROTOCOL_INTEGRATION.md +55 -2
  9. package/README.md +40 -25
  10. package/TERMINOLOGY.md +2 -0
  11. package/THREAT_MODEL.md +140 -1
  12. package/completions/_forgeloop +19 -1
  13. package/completions/forgeloop.bash +37 -1
  14. package/completions/forgeloop.fish +123 -1
  15. package/docs/ADVISORY_CONTEXT.md +25 -0
  16. package/docs/AGENT_BROWSER_ADAPTER.md +81 -0
  17. package/docs/AGENT_BROWSER_VERIFICATION.md +6 -0
  18. package/docs/AGENT_PROTOCOL_SUMMARY.md +27 -2
  19. package/docs/AGENT_SKILL.md +66 -0
  20. package/docs/ARTIFACT_REFERENCE.md +123 -0
  21. package/docs/AUDIT_UX.md +46 -0
  22. package/docs/BROWSER_VERIFICATION.md +136 -0
  23. package/docs/CLI_REFERENCE.md +366 -6
  24. package/docs/CODE_ATTESTATION.md +2 -2
  25. package/docs/DOCUMENTATION_GUIDE.md +32 -11
  26. package/docs/JEV_BENCHMARKS.md +31 -0
  27. package/docs/MODEL_ROUTING.md +37 -0
  28. package/docs/OPENSRC_ADAPTER.md +241 -0
  29. package/docs/PACKAGE_CONTENTS.md +35 -8
  30. package/docs/PROVIDERS.md +126 -0
  31. package/docs/PROVIDER_ARCHITECTURE.md +199 -0
  32. package/docs/RECIPES.md +9 -0
  33. package/docs/RELEASE_CHECKLIST.md +38 -5
  34. package/docs/SECURITY_REVIEW.md +71 -0
  35. package/docs/SEMANTIC_DECISION_PLANE.md +71 -0
  36. package/docs/TEST_INTELLIGENCE.md +29 -0
  37. package/docs/TEST_PRUNING.md +14 -0
  38. package/docs/TROUBLESHOOTING.md +198 -1
  39. package/docs/UNIVERSAL_INTEGRATION.md +31 -0
  40. package/docs/assets/diagrams/forgeloop-code-attestation-flow.html +2 -2
  41. package/docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json +5 -5
  42. package/docs/assets/diagrams/forgeloop-code-attestation-flow.svg +1 -1
  43. package/docs/assets/diagrams/forgeloop-engineering-flow.html +39 -26
  44. package/docs/assets/diagrams/forgeloop-engineering-flow.receipt.json +6 -6
  45. package/docs/assets/diagrams/forgeloop-engineering-flow.svg +26 -26
  46. package/docs/assets/diagrams/forgeloop-verification-trust-flow.html +2 -1
  47. package/docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json +5 -5
  48. package/docs/assets/diagrams/forgeloop-verification-trust-flow.svg +1 -1
  49. package/docs/diagrams/README.md +13 -9
  50. package/docs/diagrams/forgeloop-code-attestation-flow.workflow.json +1 -1
  51. package/docs/diagrams/forgeloop-engineering-flow.workflow.json +24 -19
  52. package/docs/diagrams/forgeloop-verification-trust-flow.workflow.json +1 -0
  53. package/docs/diagrams/reviews/forgeloop-code-attestation-flow.review.json +4 -4
  54. package/docs/diagrams/reviews/forgeloop-engineering-flow.review.json +4 -4
  55. package/docs/diagrams/reviews/forgeloop-verification-trust-flow.review.json +4 -4
  56. package/docs/documentation-manifest.json +750 -5
  57. package/docs/protocol-requirements.json +24 -0
  58. package/package.json +30 -3
  59. package/schemas/config.schema.json +14 -0
  60. package/schemas/context-plan.schema.json +18 -0
  61. package/schemas/semantic-decision.schema.json +46 -0
  62. package/schemas/test-utility.schema.json +44 -0
  63. package/scripts/CI_VALIDATORS.md +6 -6
  64. package/scripts/benchmark-jev.mjs +5 -0
  65. package/scripts/benchmark-test-intelligence.mjs +4 -0
  66. package/scripts/generate-agent-protocol-summary.mjs +4 -1
  67. package/scripts/generate-forgeloop-skill.mjs +133 -0
  68. package/scripts/jev-smoke.mjs +19 -0
  69. package/skills/forgeloop/README.md +9 -0
  70. package/skills/forgeloop/SKILL.md +77 -0
  71. package/skills/forgeloop/references/lifecycle.md +9 -0
  72. package/skills/forgeloop/references/recovery.md +7 -0
  73. package/skills/forgeloop/references/verification.md +7 -0
  74. package/src/adapters/agent-browser/assertions.js +47 -0
  75. package/src/adapters/agent-browser/commands.js +54 -0
  76. package/src/adapters/agent-browser/index.js +3 -0
  77. package/src/adapters/agent-browser/locator.js +40 -0
  78. package/src/adapters/agent-browser/process.js +215 -0
  79. package/src/adapters/agent-browser/provider.js +313 -0
  80. package/src/adapters/emulated-services/constants.js +24 -0
  81. package/src/adapters/emulated-services/index.js +7 -0
  82. package/src/adapters/emulated-services/process.js +162 -0
  83. package/src/adapters/emulated-services/provider.js +282 -0
  84. package/src/adapters/opensrc/normalize.js +90 -0
  85. package/src/adapters/opensrc/process.js +248 -0
  86. package/src/adapters/opensrc/provider.js +338 -0
  87. package/src/adapters/opensrc/search.js +264 -0
  88. package/src/adapters/typesafe/client.js +28 -0
  89. package/src/adapters/typesafe/engine.js +63 -0
  90. package/src/adapters/typesafe/normalize.js +41 -0
  91. package/src/cli.js +108 -0
  92. package/src/commands/checkpoint-revalidate.js +176 -0
  93. package/src/commands/context-plan.js +38 -0
  94. package/src/commands/contract-create.js +264 -0
  95. package/src/commands/contract-revise.js +236 -0
  96. package/src/commands/decision-show.js +14 -0
  97. package/src/commands/decision-status.js +22 -0
  98. package/src/commands/discover.js +41 -0
  99. package/src/commands/doctor.js +15 -0
  100. package/src/commands/gate-record.js +205 -0
  101. package/src/commands/gate-revalidate.js +137 -0
  102. package/src/commands/model-route.js +32 -0
  103. package/src/commands/route.js +146 -18
  104. package/src/commands/semantic-plan.js +17 -0
  105. package/src/commands/task-abandon.js +224 -0
  106. package/src/commands/task-migrate-contract-bootstrap-repair.js +288 -0
  107. package/src/commands/task-repair-contract-bootstrap.js +263 -0
  108. package/src/commands/test-inventory.js +5 -0
  109. package/src/commands/test-prune-plan.js +5 -0
  110. package/src/commands/test-prune-probe.js +5 -0
  111. package/src/commands/test-utility.js +5 -0
  112. package/src/commands/validate-protocol.js +10 -1
  113. package/src/core/artifact-registry.js +24 -0
  114. package/src/core/audit-ux.js +514 -0
  115. package/src/core/browser-verification/constants.js +149 -0
  116. package/src/core/browser-verification/normalize.js +254 -0
  117. package/src/core/browser-verification/provider.js +519 -0
  118. package/src/core/browser-verification/service.js +115 -0
  119. package/src/core/checkpoint-revalidation.js +319 -0
  120. package/src/core/cli-command-definitions.js +241 -0
  121. package/src/core/command-executors.js +110 -0
  122. package/src/core/command-input.js +115 -43
  123. package/src/core/completion-artifacts.js +14 -5
  124. package/src/core/completion.js +4 -6
  125. package/src/core/config.js +3 -0
  126. package/src/core/context-compiler/budget.js +9 -0
  127. package/src/core/context-compiler/candidates.js +39 -0
  128. package/src/core/context-compiler/compiler.js +63 -0
  129. package/src/core/context-compiler/fingerprint.js +11 -0
  130. package/src/core/context-compiler/policy.js +13 -0
  131. package/src/core/context-compiler/result.js +23 -0
  132. package/src/core/contract-bootstrap-recovery.js +655 -0
  133. package/src/core/contract-revision.js +210 -0
  134. package/src/core/decision/artifact.js +69 -0
  135. package/src/core/decision/benchmarks.js +103 -0
  136. package/src/core/decision/cache.js +27 -0
  137. package/src/core/decision/constants.js +58 -0
  138. package/src/core/decision/cutover.js +34 -0
  139. package/src/core/decision/engine.js +22 -0
  140. package/src/core/decision/errors.js +68 -0
  141. package/src/core/decision/events.js +101 -0
  142. package/src/core/decision/freshness.js +19 -0
  143. package/src/core/decision/normalizers/index.js +115 -0
  144. package/src/core/decision/policy.js +18 -0
  145. package/src/core/decision/projection.js +16 -0
  146. package/src/core/decision/question-registry.js +201 -0
  147. package/src/core/decision/request.js +26 -0
  148. package/src/core/decision/resolver.js +130 -0
  149. package/src/core/decision/result.js +58 -0
  150. package/src/core/decision/service.js +156 -0
  151. package/src/core/decision/state-builder.js +65 -0
  152. package/src/core/decision/task-bindings.js +30 -0
  153. package/src/core/decision/test-provider.js +32 -0
  154. package/src/core/decision/thresholds.js +15 -0
  155. package/src/core/error-codes.js +278 -0
  156. package/src/core/events.js +226 -57
  157. package/src/core/evidence-readiness.js +9 -0
  158. package/src/core/execution-prerequisites.js +14 -0
  159. package/src/core/execution-profile.js +63 -38
  160. package/src/core/gate-provenance.js +124 -0
  161. package/src/core/integration-invocation-policy.js +27 -4
  162. package/src/core/integration-resources.js +86 -61
  163. package/src/core/model-router/constants.js +10 -0
  164. package/src/core/model-router/policy.js +103 -0
  165. package/src/core/model-router/router.js +37 -0
  166. package/src/core/next-action-model.js +58 -0
  167. package/src/core/next-action-phases.js +130 -42
  168. package/src/core/next-action-refresh.js +43 -9
  169. package/src/core/next-action-review-phase.js +7 -2
  170. package/src/core/next-action.js +35 -7
  171. package/src/core/phase.js +128 -10
  172. package/src/core/preflight-consistency.js +23 -9
  173. package/src/core/preflight-loaders.js +37 -5
  174. package/src/core/protocol-info.js +65 -0
  175. package/src/core/protocol.js +20 -0
  176. package/src/core/reconcile-closure.js +128 -52
  177. package/src/core/recovery-history.js +1 -0
  178. package/src/core/resumability.js +154 -44
  179. package/src/core/route-artifact.js +15 -1
  180. package/src/core/router.js +67 -1
  181. package/src/core/runtime-context.js +118 -61
  182. package/src/core/schema-validation.js +3 -0
  183. package/src/core/security-review/constants.js +64 -0
  184. package/src/core/security-review/normalize.js +245 -0
  185. package/src/core/security-review/provider.js +204 -0
  186. package/src/core/security-review/service.js +134 -0
  187. package/src/core/semantic-planning/constants.js +19 -0
  188. package/src/core/semantic-planning/projection.js +94 -0
  189. package/src/core/semantic-planning/service.js +15 -0
  190. package/src/core/sources.js +37 -0
  191. package/src/core/task-claim-state.js +201 -1
  192. package/src/core/task-conflict-inspection.js +31 -5
  193. package/src/core/task-paths.js +13 -0
  194. package/src/core/task-recovery.js +1 -0
  195. package/src/core/templates.js +3 -0
  196. package/src/core/test-intelligence/benchmarks.js +68 -0
  197. package/src/core/test-intelligence/inventory.js +73 -0
  198. package/src/core/test-intelligence/prune.js +90 -0
  199. package/src/core/test-intelligence/semantic-state.js +15 -0
  200. package/src/core/test-intelligence/service.js +40 -0
  201. package/src/core/test-intelligence/utility.js +50 -0
  202. package/src/core/trace.js +11 -7
  203. package/src/core/transaction.js +1 -0
  204. package/src/integration.d.ts +492 -0
  205. package/src/integration.js +54 -0
  206. package/src/providers/README.md +47 -0
  207. package/src/providers/capabilities.js +46 -0
  208. package/src/providers/errors.js +15 -0
  209. package/src/providers/index.js +29 -0
  210. package/src/providers/json-snapshot.js +105 -0
  211. package/src/providers/registry.js +152 -0
@@ -18,6 +18,135 @@ Commands that support structured machine-readable output document `--json` in th
18
18
 
19
19
  <!-- END FORGELOOP GENERATED: cli-common-options -->
20
20
 
21
+ ## Semantic decision projections
22
+
23
+ ### `decision-status`
24
+
25
+ Reports the pinned Jev configuration and, only when explicitly requested,
26
+ performs a bounded provider health check.
27
+
28
+ <!-- BEGIN FORGELOOP GENERATED: cli:decision-status:options -->
29
+
30
+ - `--path <directory>`: target project directory (default: current directory)
31
+ - `--health`: perform a bounded live Jev health check when credentials are configured
32
+ - `--json`: emit decision-plane status as JSON
33
+
34
+ <!-- END FORGELOOP GENERATED: cli:decision-status:options -->
35
+
36
+ ### `decision-show`
37
+
38
+ Shows a persisted semantic decision without performing a live request.
39
+
40
+ <!-- BEGIN FORGELOOP GENERATED: cli:decision-show:options -->
41
+
42
+ - `--path <directory>`: target project directory (default: current directory)
43
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
44
+ - `--decision <id>`: decision artifact ID
45
+ - `--json`: emit the decision artifact as JSON
46
+
47
+ <!-- END FORGELOOP GENERATED: cli:decision-show:options -->
48
+
49
+ ### `context-plan`
50
+
51
+ Compiles a bounded, non-authoritative context plan.
52
+
53
+ <!-- BEGIN FORGELOOP GENERATED: cli:context-plan:options -->
54
+
55
+ - `--path <directory>`: target project directory (default: current directory)
56
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
57
+ - `--decision <id>`: persisted Jev decision artifact ID
58
+ - `--profile <profile>`: bounded context budget profile
59
+ - `--json`: emit the bounded context plan as JSON
60
+
61
+ <!-- END FORGELOOP GENERATED: cli:context-plan:options -->
62
+
63
+ ### `model-route`
64
+
65
+ Projects the deterministic model-routing floor. Jev may escalate but cannot
66
+ lower the floor or select vendor-specific models.
67
+
68
+ <!-- BEGIN FORGELOOP GENERATED: cli:model-route:options -->
69
+
70
+ - `--path <directory>`: target project directory (default: current directory)
71
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
72
+ - `--decision <id>`: persisted Jev decision artifact ID
73
+ - `--work <type>`: declared work type
74
+ - `--surface <value>`: affected surface (repeatable)
75
+ - `--risk <value>`: task risk (repeatable)
76
+ - `--platform <value>`: affected platform (repeatable)
77
+ - `--behavior-change`: declare behavior change
78
+ - `--executable-change`: declare executable/configuration change
79
+ - `--generation-required`: declare that generation is required
80
+ - `--architecture-change`: declare an architectural change
81
+ - `--ambiguous`: declare unresolved ambiguity
82
+ - `--json`: emit model-route projection as JSON
83
+
84
+ <!-- END FORGELOOP GENERATED: cli:model-route:options -->
85
+
86
+ ### `semantic-plan`
87
+
88
+ Projects bounded failure, diagnosis, or review planning from ForgeLoop-owned
89
+ question-set categories.
90
+
91
+ <!-- BEGIN FORGELOOP GENERATED: cli:semantic-plan:options -->
92
+
93
+ - `--path <directory>`: target project directory (default: current directory)
94
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
95
+ - `--decision <id>`: persisted Jev decision artifact ID
96
+ - `--kind <failure|diagnosis|review>`: bounded semantic planning projection
97
+ - `--input <json>`: bounded failure, diagnosis, or review context
98
+ - `--json`: emit semantic plan projection as JSON
99
+
100
+ <!-- END FORGELOOP GENERATED: cli:semantic-plan:options -->
101
+
102
+ ### `test-inventory`
103
+
104
+ Discovers deterministic test units and stable test IDs.
105
+
106
+ <!-- BEGIN FORGELOOP GENERATED: cli:test-inventory:options -->
107
+
108
+ - `--path <directory>`: target project directory (default: current directory)
109
+ - `--json`: emit deterministic test inventory as JSON
110
+
111
+ <!-- END FORGELOOP GENERATED: cli:test-inventory:options -->
112
+
113
+ ### `test-utility`
114
+
115
+ Persists non-evidence test utility analysis. It never removes tests.
116
+
117
+ <!-- BEGIN FORGELOOP GENERATED: cli:test-utility:options -->
118
+
119
+ - `--path <directory>`: target project directory (default: current directory)
120
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
121
+ - `--json`: emit test utility analysis as JSON
122
+
123
+ <!-- END FORGELOOP GENERATED: cli:test-utility:options -->
124
+
125
+ ### `test-prune-plan`
126
+
127
+ Projects a safe non-destructive test pruning plan.
128
+
129
+ <!-- BEGIN FORGELOOP GENERATED: cli:test-prune-plan:options -->
130
+
131
+ - `--path <directory>`: target project directory (default: current directory)
132
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
133
+ - `--json`: emit test prune plan as JSON
134
+
135
+ <!-- END FORGELOOP GENERATED: cli:test-prune-plan:options -->
136
+
137
+ ### `test-prune-probe`
138
+
139
+ Probes only eligible candidates in isolation and never modifies the live tree.
140
+
141
+ <!-- BEGIN FORGELOOP GENERATED: cli:test-prune-probe:options -->
142
+
143
+ - `--path <directory>`: target project directory (default: current directory)
144
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
145
+ - `--test <id>`: stable test ID to probe in isolation
146
+ - `--json`: emit test prune probe as JSON
147
+
148
+ <!-- END FORGELOOP GENERATED: cli:test-prune-probe:options -->
149
+
21
150
  ---
22
151
 
23
152
  ## CLI Syntax Contract
@@ -58,10 +187,10 @@ error codes. Default output and default JSON remain unchanged.
58
187
 
59
188
  | Category | Commands |
60
189
  | --- | --- |
61
- | **Inspection & Diagnostics** | [`protocol-info`](#protocol-info), [`doctor`](#doctor), [`index-status`](#index-status), [`search`](#search), [`metrics`](#metrics), [`usage-record`](#usage-record), [`efficiency`](#efficiency), [`eval`](#eval), [`history`](#history), [`trace`](#trace), [`reflect`](#reflect), [`progress`](#progress), [`profile-interview`](#profile-interview), [`inspect`](#inspect), [`status`](#status), [`validate-state`](#validate-state), [`validate-protocol`](#validate-protocol) |
62
- | **Setup & Maintenance** | [`init`](#init), [`index-setup`](#index-setup), [`index-start`](#index-start), [`index-stop`](#index-stop), [`index-rebuild`](#index-rebuild), [`update`](#update), [`task-migrate`](#task-migrate), [`migrate-protocol`](#migrate-protocol), [`task-unlock`](#task-unlock), [`task-recover`](#task-recover), [`task-repair-legacy-recovery`](#task-repair-legacy-recovery), [`task-resume`](#task-resume) |
63
- | **Lifecycle & State** | [`activate`](#activate), [`route`](#route), [`preflight`](#preflight), [`advance`](#advance), [`next`](#next), [`record-diagnosis`](#record-diagnosis), [`record-intervention`](#record-intervention), [`record-hypothesis-disposition`](#record-hypothesis-disposition), [`record-decision-criterion`](#record-decision-criterion), [`complete`](#complete), [`clear-state`](#clear-state), [`reconcile-closure`](#reconcile-closure), [`task-create`](#task-create), [`task-list`](#task-list), [`task-show`](#task-show), [`task-lock-status`](#task-lock-status), [`task-scope`](#task-scope) |
64
- | **Verification & Completion** | [`quality-baseline`](#quality-baseline), [`quality-verify`](#quality-verify), [`quality-status`](#quality-status), [`prepare-completion`](#prepare-completion), [`run-check`](#run-check), [`record-check`](#record-check), [`record-terminal-result`](#record-terminal-result), [`audit`](#audit), [`report`](#report), [`validate-receipt`](#validate-receipt), [`verify-scope`](#verify-scope) |
190
+ | **Inspection & Diagnostics** | [`protocol-info`](#protocol-info), [`decision-status`](#decision-status), [`decision-show`](#decision-show), [`context-plan`](#context-plan), [`model-route`](#model-route), [`semantic-plan`](#semantic-plan), [`test-inventory`](#test-inventory), [`test-utility`](#test-utility), [`test-prune-plan`](#test-prune-plan), [`doctor`](#doctor), [`index-status`](#index-status), [`search`](#search), [`metrics`](#metrics), [`usage-record`](#usage-record), [`efficiency`](#efficiency), [`eval`](#eval), [`history`](#history), [`trace`](#trace), [`reflect`](#reflect), [`progress`](#progress), [`profile-interview`](#profile-interview), [`inspect`](#inspect), [`status`](#status), [`validate-state`](#validate-state), [`validate-protocol`](#validate-protocol) |
191
+ | **Verification & Completion** | [`test-prune-probe`](#test-prune-probe), [`quality-baseline`](#quality-baseline), [`quality-verify`](#quality-verify), [`quality-status`](#quality-status), [`prepare-completion`](#prepare-completion), [`run-check`](#run-check), [`record-check`](#record-check), [`record-terminal-result`](#record-terminal-result), [`audit`](#audit), [`report`](#report), [`validate-receipt`](#validate-receipt), [`verify-scope`](#verify-scope) |
192
+ | **Lifecycle & State** | [`discover`](#discover), [`contract-create`](#contract-create), [`gate-record`](#gate-record), [`gate-revalidate`](#gate-revalidate), [`activate`](#activate), [`route`](#route), [`preflight`](#preflight), [`advance`](#advance), [`next`](#next), [`record-diagnosis`](#record-diagnosis), [`record-intervention`](#record-intervention), [`record-hypothesis-disposition`](#record-hypothesis-disposition), [`record-decision-criterion`](#record-decision-criterion), [`complete`](#complete), [`clear-state`](#clear-state), [`reconcile-closure`](#reconcile-closure), [`task-create`](#task-create), [`task-list`](#task-list), [`task-show`](#task-show), [`task-lock-status`](#task-lock-status), [`task-scope`](#task-scope) |
193
+ | **Setup & Maintenance** | [`contract-revise`](#contract-revise), [`init`](#init), [`index-setup`](#index-setup), [`index-start`](#index-start), [`index-stop`](#index-stop), [`index-rebuild`](#index-rebuild), [`update`](#update), [`checkpoint-revalidate`](#checkpoint-revalidate), [`task-migrate`](#task-migrate), [`migrate-protocol`](#migrate-protocol), [`task-unlock`](#task-unlock), [`task-recover`](#task-recover), [`task-abandon`](#task-abandon), [`task-repair-contract-bootstrap`](#task-repair-contract-bootstrap), [`task-migrate-contract-bootstrap-repair`](#task-migrate-contract-bootstrap-repair), [`task-repair-legacy-recovery`](#task-repair-legacy-recovery), [`task-resume`](#task-resume) |
65
194
  | **Cross-Harness Continuity** | [`continuity`](#continuity), [`record-continuity`](#record-continuity), [`reconcile-continuity`](#reconcile-continuity), [`clear-continuity`](#clear-continuity), [`handoff-create`](#handoff-create), [`handoff-list`](#handoff-list), [`handoff-show`](#handoff-show) |
66
195
  | **Durable Actions & Approvals** | [`run-action`](#run-action), [`action-propose`](#action-propose), [`action-record`](#action-record), [`action-show`](#action-show), [`action-reconcile`](#action-reconcile), [`action-verify`](#action-verify), [`action-authorize`](#action-authorize), [`approval-request`](#approval-request), [`approval-resolve`](#approval-resolve) |
67
196
  | **Policy & Auditing** | [`policy`](#policy), [`policy-discover`](#policy-discover), [`policy-status`](#policy-status), [`policy-diff`](#policy-diff), [`rule-verify`](#rule-verify), [`baseline`](#baseline), [`bundle`](#bundle) |
@@ -834,6 +963,107 @@ Updates the managed instruction kit to match the current ForgeLoop package versi
834
963
 
835
964
  ## 2. Activation & Planning
836
965
 
966
+ ### `discover`
967
+
968
+ Records the canonical initial discovery milestone for a newly created task.
969
+
970
+ - **Purpose**: Transitions a valid post-`task-create` task from `RECEIVED` to the derived `DISCOVERING` phase without creating synthetic work state.
971
+ - **When to use**: When `next` returns `DISCOVER` for a task with no work-state checkpoint.
972
+ - **Mutation**: Appends the task-scoped discovery milestone to the event ledger.
973
+ - **Options**:
974
+
975
+ <!-- BEGIN FORGELOOP GENERATED: cli:discover:options -->
976
+
977
+ - `--path <directory>`: target project directory (default: current directory)
978
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
979
+ - `--json`: emit structured discovery output as JSON
980
+
981
+ <!-- END FORGELOOP GENERATED: cli:discover:options -->
982
+
983
+ ### `contract-create`
984
+
985
+ Persists a validated contract and materializes the first real lifecycle checkpoint.
986
+
987
+ - **Purpose**: Creates a real contract after discovery and writes `work-state.json` with its actual contract fingerprint.
988
+ - **When to use**: When `next` returns `CREATE_CONTRACT` after discovery.
989
+ - **Mutation**: Writes the task contract, task work state, and append-only lifecycle events transactionally.
990
+ - **Options**:
991
+
992
+ <!-- BEGIN FORGELOOP GENERATED: cli:contract-create:options -->
993
+
994
+ - `--path <directory>`: target project directory (default: current directory)
995
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
996
+ - `--contract-file <path>`: validated JSON contract relative to the target
997
+ - `--preset <name>`: bounded contract preset: documentation, bug, feature, or release
998
+ - `--json`: emit structured contract output as JSON
999
+
1000
+ <!-- END FORGELOOP GENERATED: cli:contract-create:options -->
1001
+
1002
+ ### `contract-revise`
1003
+
1004
+ Replaces a validated pre-execution contract through an append-only, transaction-witnessed revision.
1005
+
1006
+ - **Purpose**: Canonically revise a contract in `CONTRACT_READY`, `ROUTED`, or `PLANNED` before execution starts.
1007
+ - **When to use**: When the task objective or scope changes and the existing derived route, preflight, gates, or plan must no longer authorize the work.
1008
+ - **Mutation**: Writes the replacement contract, resets derived authorization, appends `CONTRACT_REVISED`, and appends an adjacent `TRANSACTION_COMMITTED(operation=contract-revise)` witness.
1009
+ - **Restrictions**: Requires exactly one of `--preset` or `--contract-file`; a `PLANNED` task rewinds to `ROUTED`, and old route/preflight/plan evidence must be regenerated.
1010
+ - **Options**:
1011
+
1012
+ <!-- BEGIN FORGELOOP GENERATED: cli:contract-revise:options -->
1013
+
1014
+ - `--path <directory>`: target project directory (default: current directory)
1015
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
1016
+ - `--contract-file <path>`: validated replacement JSON contract relative to the target
1017
+ - `--preset <name>`: bounded replacement contract preset: documentation, bug, feature, or release
1018
+ - `--json`: emit structured contract revision output as JSON
1019
+
1020
+ <!-- END FORGELOOP GENERATED: cli:contract-revise:options -->
1021
+
1022
+ ### `gate-record`
1023
+
1024
+ Records a gate satisfaction or rejection decision for a task's preflight gate lifecycle.
1025
+
1026
+ - **Purpose**: Records structured evidence that a named gate has been satisfied, rejected, or deferred, with optional artifact and decision evidence.
1027
+ - **When to use**: During the preflight gate lifecycle to progress gate status from pending to resolved.
1028
+ - **Mutation**: Writes a gate artifact under the task namespace and appends a `GATE_SATISFIED` or `GATE_REJECTED` protocol event. A `GATE_SATISFIED` event after `CONTRACT_REVISED` must be immediately followed by the canonical `TRANSACTION_COMMITTED(operation=gate-record)` witness; pre-revision historical gate events remain backward compatible. Repeated satisfied recording is event-idempotent within the current contract epoch, even if the gate artifact is refreshed.
1029
+ - **Options**:
1030
+
1031
+ <!-- BEGIN FORGELOOP GENERATED: cli:gate-record:options -->
1032
+
1033
+ - `--path <directory>`: target project directory (default: current directory)
1034
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
1035
+ - `--gate <name>`: required gate name
1036
+ - `--status <status>`: satisfied, unverified, or blocked
1037
+ - `--artifact <path>`: project-relative evidence artifact (repeatable)
1038
+ - `--decision <text>`: caller-recorded gate decision (repeatable)
1039
+ - `--unknown <text>`: known unresolved item (repeatable)
1040
+ - `--assumption <text>`: approved local assumption (repeatable)
1041
+ - `--evidence-file <path>`: bounded local descriptive evidence JSON
1042
+ - `--json`: emit structured gate output as JSON
1043
+
1044
+ <!-- END FORGELOOP GENERATED: cli:gate-record:options -->
1045
+
1046
+ ### `gate-revalidate`
1047
+
1048
+ Refreshes a satisfied gate whose evidence artifacts changed after execution
1049
+ started, while preserving the original approval and append-only history.
1050
+
1051
+ - **Purpose**: Revalidate stale gate artifacts only through current task identity and active write claims.
1052
+ - **When to use**: When `next` returns `REVALIDATE_GATES` for a post-execution task.
1053
+ - **Mutation**: Refreshes the task-scoped gate artifact and appends `GATE_REVALIDATED` with an adjacent `TRANSACTION_COMMITTED(operation=gate-revalidate)` witness.
1054
+ - **Restrictions**: Does not bypass `gate-record`'s `E_PHASE_FREEZE`; requires `--acknowledge-stale`, a coherent current route, and changed artifacts covered by active claims.
1055
+ - **Options**:
1056
+
1057
+ <!-- BEGIN FORGELOOP GENERATED: cli:gate-revalidate:options -->
1058
+
1059
+ - `--path <directory>`: target project directory (default: current directory)
1060
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
1061
+ - `--gate <name>`: satisfied gate to refresh after safe artifact drift
1062
+ - `--acknowledge-stale`: explicitly acknowledge refresh of stale gate artifacts inside active task claims
1063
+ - `--json`: emit structured gate revalidation output as JSON
1064
+
1065
+ <!-- END FORGELOOP GENERATED: cli:gate-revalidate:options -->
1066
+
837
1067
  ### `route`
838
1068
 
839
1069
  Calculates and persists deterministic engineering guide routing.
@@ -1967,6 +2197,31 @@ Clears canonical work-state checkpoint for the current task.
1967
2197
  forgeloop clear-state
1968
2198
  ```
1969
2199
 
2200
+ ### `checkpoint-revalidate`
2201
+
2202
+ Revalidates a safe pre-execution `ROUTED` checkpoint after repository-only
2203
+ drift.
2204
+
2205
+ - **Purpose**: Rebinds the checkpoint to ForgeLoop's current repository fingerprint while preserving lifecycle, contract, route, guide, gate, check, and evidence identity.
2206
+ - **When to use**: When `next` returns `REVALIDATE_CHECKPOINT` with only `E_REPOSITORY_CHANGED` / `E_STATE_REVALIDATION_REQUIRED`.
2207
+ - **Mutation**: Advances the state revision and appends a transaction-bound `CHECKPOINT_REVALIDATED` event.
2208
+ - **Safety Note**: It does not accept caller-supplied repository identity, revise contracts, reroute, fabricate evidence, or operate after execution starts. Unsupported drift fails closed with `E_CHECKPOINT_REVALIDATION_UNSAFE`.
2209
+ - **Options**:
2210
+
2211
+ <!-- BEGIN FORGELOOP GENERATED: cli:checkpoint-revalidate:options -->
2212
+
2213
+ - `--path <directory>`: target project directory (default: current directory)
2214
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
2215
+ - `--json`: emit structured revalidation output as JSON
2216
+
2217
+ <!-- END FORGELOOP GENERATED: cli:checkpoint-revalidate:options -->
2218
+
2219
+ - **Example**:
2220
+
2221
+ ```bash
2222
+ forgeloop checkpoint-revalidate --task <id> --json
2223
+ ```
2224
+
1970
2225
  ---
1971
2226
 
1972
2227
  ### `reconcile-closure`
@@ -1974,9 +2229,9 @@ Clears canonical work-state checkpoint for the current task.
1974
2229
  Reconciles the checkpoint of an EXECUTING, VERIFYING, or REVIEWING task whose objective is already satisfied in the current repository.
1975
2230
 
1976
2231
  - **Purpose**: Refresh the work-state repository fingerprint of a stale EXECUTING, VERIFYING, or REVIEWING task after repository movement, using executed contract-bound evidence that the objective is present, so the canonical completion pipeline can close it.
1977
- - **When to use**: When a task is stuck in EXECUTING, VERIFYING, or REVIEWING with `E_REPOSITORY_CHANGED` / `E_STATE_REVALIDATION_REQUIRED` and its objective was already satisfied by other changes in the current repository. A REVIEWING task also needs authorized completion recovery.
2232
+ - **When to use**: When a task is stuck in EXECUTING, VERIFYING, or REVIEWING with `E_REPOSITORY_CHANGED` / `E_STATE_REVALIDATION_REQUIRED` and its objective was already satisfied by other changes in the current repository. A REVIEWING task may use an existing authorized completion-recovery snapshot, or the narrow bootstrap path when the only drift is repository movement and no completion rejection has been persisted.
1978
2233
  - **Mutation**: Appends a `CHECKPOINT_RECONCILED` ledger event (previous/current repository fingerprints plus evidence) and refreshes the work-state repository fingerprint. The phase stays unchanged until the canonical pipeline advances it; claims release only through canonical `COMPLETE`.
1979
- - **Safety Note**: Refuses other phases, fresh checkpoints, contract or artifact drift, invalid ledgers, unknown requirements, and failing evidence.
2234
+ - **Safety Note**: Refuses other phases, fresh checkpoints, contract or required-artifact drift, invalid ledgers, invalid claim ownership, unauthorized persisted completion rejection, unknown requirements, and failing evidence. It never appends completion events or releases claims.
1980
2235
  - **Options**:
1981
2236
 
1982
2237
  <!-- BEGIN FORGELOOP GENERATED: cli:reconcile-closure:options -->
@@ -2251,6 +2506,111 @@ Fake, missing, corrupt, or mismatched recovery state is
2251
2506
  `E_TASK_CLAIM_OWNERSHIP_INCONSISTENT`/`E_TASK_RECOVERY_INCONSISTENT`; historical
2252
2507
  claims remain reserved.
2253
2508
 
2509
+ ### `task-abandon`
2510
+
2511
+ Explicitly abandons an active non-terminal task without fabricating completion.
2512
+
2513
+ - **Purpose**: Releases validated write claims for a deliberately abandoned task while preserving its current lifecycle phase, append-only history, and durable recovery boundary. This is the canonical escape from an active-task claim deadlock; it is not a completion or publication operation.
2514
+ - **When to use**: Only when the exact task ID is known and the caller has deliberately acknowledged abandonment. Use `task-recover` only for tasks already classified `STALE` or `ABANDONED`.
2515
+ - **Mutation**: Appends `TASK_ABANDONED` and its `TRANSACTION_COMMITTED(operation=task-abandon)` witness, then writes `recovery.json` with classification `ABANDONED` and authority `CALLER_ACKNOWLEDGED`. Work state remains unchanged and claims resolve to `RELEASED_BY_RECOVERY`.
2516
+ - **Options**:
2517
+
2518
+ <!-- BEGIN FORGELOOP GENERATED: cli:task-abandon:options -->
2519
+
2520
+ - `--path <directory>`: target project directory (default: current directory)
2521
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
2522
+ - `--acknowledge-abandonment`: explicitly acknowledge abandonment of an active task (required; not completion authority)
2523
+ - `--json`: emit structured abandonment output as JSON
2524
+
2525
+ <!-- END FORGELOOP GENERATED: cli:task-abandon:options -->
2526
+
2527
+ - **Example**:
2528
+
2529
+ ```bash
2530
+ forgeloop task-abandon --task task-001 --acknowledge-abandonment --json
2531
+ ```
2532
+
2533
+ The command requires an explicit task ID and acknowledgement. It refuses
2534
+ `COMPLETE`, already recovered, inconsistent, or non-active ownership states
2535
+ and never writes `COMPLETION_VALIDATED`. Use `task-resume` to reacquire claims
2536
+ through the normal lifecycle when work should continue.
2537
+
2538
+ ### `task-repair-contract-bootstrap`
2539
+
2540
+ Repairs only the exact historical duplicate contract bootstrap defect.
2541
+
2542
+ - **Purpose**: Recognizes the narrow append-only signature of a duplicate `CONTRACT_VALIDATED` followed by a duplicate `contract-create` commit, verifies the current contract and route/state bindings, and reconstructs the earliest proven checkpoint without rewriting existing events.
2543
+ - **Mutation**: Under project/task serialization, writes the reconciled work-state and appends `CONTRACT_BOOTSTRAP_REPAIR_RECORDED` plus `TRANSACTION_COMMITTED` in one transaction.
2544
+ - **Options**:
2545
+
2546
+ <!-- BEGIN FORGELOOP GENERATED: cli:task-repair-contract-bootstrap:options -->
2547
+
2548
+ - `--path <directory>`: target project directory (default: current directory)
2549
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
2550
+ - `--acknowledge-repair`: explicit caller acknowledgement of the exact append-only repair (required)
2551
+ - `--json`: emit structured repair output as JSON
2552
+
2553
+ <!-- END FORGELOOP GENERATED: cli:task-repair-contract-bootstrap:options -->
2554
+
2555
+ - **Example**:
2556
+
2557
+ ```bash
2558
+ forgeloop task-repair-contract-bootstrap --task task-001 --acknowledge-repair --json
2559
+ ```
2560
+
2561
+ The command requires fresh caller acknowledgement. The marker records the
2562
+ repair-time checkpoint as an immutable anchor, including `reconstructedPhase`,
2563
+ `reconstructedStateFingerprint`, `reconstructedStateRevision`, and the
2564
+ repair-time `routeFingerprint`; it does not freeze the task at that checkpoint.
2565
+ The marker must be immediately followed by its
2566
+ `TRANSACTION_COMMITTED(operation=task-repair-contract-bootstrap)` witness.
2567
+ After the anchor revision, normal canonical lifecycle evolution is allowed, but
2568
+ state rollback, missing state, invalid current contract/route identity, or
2569
+ ledger/state incoherence fails closed with `E_CONTRACT_BOOTSTRAP_REPAIR_INVALID`.
2570
+ If a later route fingerprint differs from the marker, the current route and
2571
+ state must be canonically coherent and the ledger must contain a ForgeLoop-
2572
+ generated `ROUTE_REBOUND` witness immediately followed by the matching
2573
+ `TRANSACTION_COMMITTED(operation=route)`. The witness binds the current route
2574
+ fingerprint, the repair-time contract fingerprint, and the previous route
2575
+ fingerprint; a historical route transaction, or route and state fields changed
2576
+ together without this identity witness, is not authorization. A contract-only
2577
+ repair may establish its first route through canonical `runRoute`, recording a
2578
+ null previous route fingerprint. A proven `ROUTE_VALIDATED` milestone also
2579
+ requires a present, valid route artifact bound to the current contract, while a
2580
+ history without `ROUTE_VALIDATED` may repair to `CONTRACT_READY` without a
2581
+ route artifact. After repair, entering `DESIGNING` additionally requires the
2582
+ canonical `DESIGN_GATE_STARTED` event.
2583
+
2584
+ ### `task-migrate-contract-bootstrap-repair`
2585
+
2586
+ Migrates the exact legacy contract bootstrap repair marker produced before
2587
+ `reconstructedStateRevision` was required.
2588
+
2589
+ - **Purpose**: Proves the legacy marker, its immediate repair transaction, the current contract, the reconstructed work-state, and (for `ROUTED`) the persisted route. Strict validation remains fail-closed until the migration witness is appended.
2590
+ - **Mutation**: Appends `CONTRACT_BOOTSTRAP_REPAIR_MIGRATION_RECORDED` plus `TRANSACTION_COMMITTED(operation=task-migrate-contract-bootstrap-repair)`; it never rewrites the legacy marker or state/contract/route artifacts.
2591
+ - **Options**:
2592
+
2593
+ <!-- BEGIN FORGELOOP GENERATED: cli:task-migrate-contract-bootstrap-repair:options -->
2594
+
2595
+ - `--path <directory>`: target project directory (default: current directory)
2596
+ - `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
2597
+ - `--acknowledge-migration`: fresh explicit caller acknowledgement of the exact legacy marker migration (required)
2598
+ - `--json`: emit structured migration output as JSON
2599
+
2600
+ <!-- END FORGELOOP GENERATED: cli:task-migrate-contract-bootstrap-repair:options -->
2601
+
2602
+ - **Example**:
2603
+
2604
+ ```bash
2605
+ forgeloop task-migrate-contract-bootstrap-repair --task task-001 --acknowledge-migration --json
2606
+ ```
2607
+
2608
+ Only the exact legacy schema and immediate repair boundary are eligible. Any
2609
+ near-miss, later lifecycle activity, state/route drift, live lock, unknown lock,
2610
+ or corrupt lock fails closed with
2611
+ `E_CONTRACT_BOOTSTRAP_REPAIR_MIGRATION_INVALID`/`E_TASK_LOCKED`. The operation
2612
+ is idempotent only when the complete migrated relationship remains valid.
2613
+
2254
2614
  ### `task-resume`
2255
2615
 
2256
2616
  Reacquires a recovered task's write claims and restores ordinary mutation authority.
@@ -9,11 +9,11 @@ bug-free or secure.
9
9
 
10
10
  | Level | Meaning |
11
11
  | --- | --- |
12
- | `PROCESSED` | Protocol artifacts exist but verification is not complete. |
12
+ | `PROCESSED` | Minimum reported level; verification is not complete. `MISSING`, `DISABLED`, and `INVALID` remain separate status results. |
13
13
  | `VERIFIED` | Completion, evidence bindings, manifest, and current content validate. |
14
14
  | `ATTESTED` | `VERIFIED` plus a cryptographically valid signature and trusted signer policy. |
15
15
 
16
- `PROCESSED` is an existence/parsing result, not a trust claim. A manifest or
16
+ `PROCESSED` is a lower-bound reported level, not a trust claim. A manifest or
17
17
  statement that merely exists never becomes `ATTESTED`; the signature must be
18
18
  verified against the configured signer identity, issuer, and trust policy.
19
19
  Attestation binds bounded source/evidence relationships. It does not prove
@@ -54,11 +54,30 @@ Documentation-impact questions for integration/MCP changes:
54
54
  - Did an adapter error code change?
55
55
  - Did an integration limit or resource list change?
56
56
 
57
- Anti-drift invariant: every `documentation-manifest.json` entry marked
58
- `packaged: true` is mechanically checked against the core npm tarball
59
- contents (`tests/package.test.js`).
60
-
61
- Canonical phase and transition inventories must be derived from `WORK_PHASES`
57
+ Anti-drift invariant: every packaged Markdown or harness-adapter document in
58
+ `package.json.files` is registered in `documentation-manifest.json`, and every
59
+ `packaged: true` manifest entry is mechanically checked against the core npm
60
+ tarball contents (`tests/package.test.js`). The review matrix records generated
61
+ or handwritten origin, current or historical status, package inclusion, action,
62
+ and canonical sources for every registered document.
63
+
64
+ ### Documentation retention and repository hygiene
65
+
66
+ Use one canonical owner for each maintained concept. Generated documentation
67
+ must name its source, generator, freshness check, and reason for being tracked.
68
+ Historical audits, release evidence, and completed validation records belong
69
+ under `docs/history/`; current operating instructions must not leave those
70
+ records loose in the repository root. One-off plans and validation reports are
71
+ either consolidated into a canonical document and deleted or moved to the
72
+ history index with their current owner links.
73
+
74
+ Repository and npm decisions are separate. GitHub may retain reproducible
75
+ benchmarks, PoC evidence, source-bound diagram artifacts, vendored renderer
76
+ sources, and historical records that consumers do not need. The npm package
77
+ ships only intentional runtime, integration, legal, harness, and canonical user
78
+ documentation surfaces. `npm run repository:hygiene` enforces explicit root,
79
+ tracked-state, visual-ownership, benchmark-run-set, and scratch-output policy;
80
+ it does not guess whether an arbitrary document is useful.
62
81
  and `WORK_TRANSITIONS`; do not maintain independent hand-written transition
63
82
  enums when a generated or mechanically validated representation is available.
64
83
 
@@ -195,7 +214,7 @@ migration, or security-sensitive require `npm run docs:check` before merge.
195
214
  2. **Pinned local renderer**: Generation uses only the vendored Archify v2.15.0 source at the reviewed commit recorded in `docs/diagrams/manifest.json` and `vendor/archify/v2.15.0/PIN.json`.
196
215
  3. **Animated committed outputs**: Every active source uses `meta.animation: "trace"`. Each interactive HTML is the primary animated explorer, and each self-contained SVG fallback carries trace-capable edge/node animation while remaining usable in repository previews. Deterministic receipts are committed under `docs/assets/diagrams/`.
197
216
  4. **GitHub-safe SVG**: The SVG must not embed `<script>` or `<foreignObject>`, must expose accessible title/description metadata, and must remain visible through standard Markdown image syntax.
198
- 5. **Fingerprint and review verification**: The generated SVG embeds a `data-forgeloop-source-sha256` attribute, the outputs expose trace markers, and the receipt binds the source, HTML, and SVG hashes. The human-owned review at `docs/diagrams/reviews/` binds the current source and SVG hashes and is never generated or overwritten. Run `npm run docs:diagrams:check` before review.
217
+ 5. **Fingerprint and review verification**: The generated SVG embeds a `data-forgeloop-source-sha256` attribute, the outputs expose trace markers, and the receipt binds the source, HTML, and SVG hashes. The review at `docs/diagrams/reviews/` binds the current source and SVG hashes as a review assertion and is never generated or overwritten; the checker does not independently authenticate the reviewer. Run `npm run docs:diagrams:check` before review.
199
218
  6. **Scoped wrapper**: The ForgeLoop Archify wrapper is intentionally documentation-scoped. It reads canonical inputs only from `docs/diagrams/` and permits deliver outputs only under `docs/assets/diagrams/`.
200
219
 
201
220
  ForgeLoop governs five documentation-diagram categories: workflow,
@@ -213,14 +232,16 @@ README hero assets are branding/conceptual architecture illustrations. They are
213
232
  not the canonical protocol diagram. The typed Archify workflow under
214
233
  `docs/diagrams/` remains the canonical lifecycle architecture source, with
215
234
  generated outputs under `docs/assets/diagrams/`; the CLI-only persistent search
216
- transport is explained by `docs/PERSISTENT_SEARCH_TRANSPORT.md`.
235
+ transport is explained by `docs/PERSISTENT_SEARCH_TRANSPORT.md`. The current
236
+ repository-only assets are `docs/assets/forgeloop-architecture.svg` and
237
+ `docs/assets/forgeloop-lifecycle-animated.svg`; neither is a package file.
217
238
 
218
239
  The README hero is intentionally GitHub-repository-only:
219
240
 
220
- - `README.md` may reference `docs/assets/eng_readme_forgeloop.png`; GitHub
221
- renders it from the repository.
222
- - The hero PNG is excluded from the npm package (`package.json` `files`), and
223
- `tests/package.test.js` asserts that exclusion so it cannot be silently
241
+ - `README.md` references `docs/assets/forgeloop-architecture.svg` for the hero
242
+ and `docs/assets/forgeloop-lifecycle-animated.svg` for the looping overview;
243
+ both are repository-only and excluded from the npm package.
244
+ - `tests/package.test.js` asserts those exclusions so they cannot be silently
224
245
  re-included.
225
246
  - The packaged README is therefore not self-contained for that relative hero
226
247
  path; do not claim otherwise.
@@ -0,0 +1,31 @@
1
+ # Jev benchmark and calibration
2
+
3
+ `npm run benchmark:jev` emits an offline deterministic baseline for model-route
4
+ scenarios. It records the pinned engine/model, safety-floor projection, fallback
5
+ status, Jev/cache/latency fields, context and tool dimensions, and unknown host
6
+ telemetry. Zero counts mean that no provider request was made; `null` and
7
+ `NOT_MEASURED` remain explicit when the host did not observe a value. It does
8
+ not fabricate provider usage and does not authorize lifecycle, execution,
9
+ pruning, or completion.
10
+
11
+ Provider-backed calibration requires a live TypeSafe organization with credits;
12
+ an unavailable provider is reported as unavailable rather than treated as a
13
+ successful benchmark.
14
+
15
+ `npm run benchmark:jev:live` runs bounded intake, route, and context requests
16
+ through the pinned Jev provider and reports provider usage/latency only when the
17
+ provider supplies it. It requires `TYPESAFE_API_KEY`, never prints that key,
18
+ and is intentionally separate from the offline benchmark.
19
+
20
+ An optional maintainer release check is available through
21
+ `npm run jev:smoke` and `npm run benchmark:jev:live`. The current repository does
22
+ not enforce either live command in CI or the release workflow, and the CLI does
23
+ not bind either command to an exact candidate commit. Offline output, a missing
24
+ credential, or a provider-unavailable result is never a substitute for live
25
+ interoperability evidence.
26
+
27
+ Dependency audit attribution for the current base and PR head is unchanged:
28
+ one high-severity `js-yaml` advisory (`GHSA-2883-xcg3-v3hh`, CVSS 7.5, CWE-400
29
+ and CWE-407) arrives transitively through `eslint` → `@eslint/eslintrc` →
30
+ `js-yaml` 4.3.1. It is not introduced by the Jev dependency; the audit reports
31
+ an available upgrade outside this correction's runtime dependency policy.
@@ -0,0 +1,37 @@
1
+ # Model routing
2
+
3
+ ForgeLoop exposes model routing as a bounded semantic-decision projection. It
4
+ has `SEMANTIC_DECISION` authority only within the declared decision contract;
5
+ it has no lifecycle, completion, evidence, ownership, installation, command, or
6
+ publication authority. The deterministic policy establishes the safety floor:
7
+
8
+ - `NONE` when no generation is required;
9
+ - `STANDARD` for ordinary executable generation;
10
+ - `PRIMARY` for security, architecture, migration, ambiguity, and other
11
+ high-risk signals.
12
+
13
+ The deterministic floor currently emits `NONE`, `STANDARD`, or `PRIMARY`. The
14
+ public vocabulary also includes `FAST`, which is available only as an advisory
15
+ escalation and cannot lower the deterministic floor.
16
+
17
+ The pinned Jev model (`jev-1.13.0`) may recommend an escalation or request an
18
+ escalation when confidence is low. It can never lower the deterministic floor,
19
+ select a vendor-specific model, execute a command, change lifecycle state,
20
+ authorize ownership, or weaken verification requirements. ForgeLoop remains the
21
+ authority for all lifecycle, evidence, safety, and completion decisions.
22
+
23
+ For route execution, the same boundary applies to guide relevance: Jev can
24
+ reorder or remove a selected non-mandatory guide only with sufficient
25
+ confidence. Mandatory safety protection is derived from the canonical
26
+ deterministic route reasons the router already produced (auth surface and the
27
+ trust-boundary risks untrusted-input, personal-data, secrets, external-service,
28
+ publication), so a `security` guide selected by `external-service` risk cannot be
29
+ removed. Mandatory safety guides are retained and low-confidence removal
30
+ recommendations are retained rather than treated as authority. The resulting
31
+ guide set and profile are persisted in the route artifact, so the semantic
32
+ recommendation materially affects routing without becoming lifecycle authority.
33
+
34
+ The live Jev provider is not an authority substitute. Semantic-required
35
+ model-routing operations consume a fresh persisted `MODEL_ROUTE` decision and
36
+ fail closed when it is unavailable or stale; offline inspection may still
37
+ project deterministic policy without making a network request.