@cassiomc1/forgeloop 1.13.0 → 2.0.0-rc.2

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 (395) hide show
  1. package/AGENT_COMPATIBILITY.md +8 -0
  2. package/CONTRIBUTING.md +11 -7
  3. package/DOCS_INDEX.md +37 -4
  4. package/ENG/c-development-eng.md +2 -2
  5. package/ENG/cpp-development-eng.md +2 -2
  6. package/ENG/dotnet-aspnetcore-development-eng.md +7 -1
  7. package/ENG/flutter-development-eng.md +4 -2
  8. package/ENG/go-development-eng.md +2 -2
  9. package/ENG/java-development-eng.md +3 -3
  10. package/ENG/nodejs-backend-development-eng.md +10 -6
  11. package/ENG/php-development-eng.md +3 -3
  12. package/ENG/python-development-eng.md +205 -0
  13. package/ENG/rust-development-eng.md +42 -1
  14. package/ENG/sec-code-eng.md +7 -7
  15. package/ENG/sql-development-eng.md +4 -4
  16. package/ENG/swift-development-eng.md +5 -4
  17. package/ENG/test-code-eng.md +1 -1
  18. package/ENG/typescript-development-eng.md +4 -4
  19. package/EXECUTION_STATE.md +12 -0
  20. package/GUIDE_ROUTER.md +6 -0
  21. package/LICENSE +133 -21
  22. package/LOOP_ENGINEERING.md +28 -2
  23. package/LOOP_SYSTEM_DESIGN.md +10 -10
  24. package/ORCHESTRATOR_INTEGRATION.md +9 -5
  25. package/PROTOCOL_INTEGRATION.md +55 -2
  26. package/README.md +63 -59
  27. package/TERMINOLOGY.md +2 -0
  28. package/THIRD_PARTY_NOTICES.md +3 -4
  29. package/THREAT_MODEL.md +140 -1
  30. package/completions/_forgeloop +29 -3
  31. package/completions/forgeloop.bash +55 -3
  32. package/completions/forgeloop.fish +183 -1
  33. package/docs/ADVISORY_CONTEXT.md +25 -0
  34. package/docs/AGENT_BROWSER_ADAPTER.md +81 -0
  35. package/docs/AGENT_BROWSER_VERIFICATION.md +6 -0
  36. package/docs/AGENT_PROTOCOL_SUMMARY.md +74 -39
  37. package/docs/AGENT_SKILL.md +66 -0
  38. package/docs/ARTIFACT_REFERENCE.md +171 -35
  39. package/docs/AUDIT_UX.md +46 -0
  40. package/docs/BROWSER_VERIFICATION.md +136 -0
  41. package/docs/CLI_REFERENCE.md +512 -8
  42. package/docs/CODE_ATTESTATION.md +2 -2
  43. package/docs/DOCUMENTATION_GUIDE.md +34 -11
  44. package/docs/GETTING_STARTED.md +3 -3
  45. package/docs/JEV_BENCHMARKS.md +31 -0
  46. package/docs/MODEL_ROUTING.md +37 -0
  47. package/docs/OPENSRC_ADAPTER.md +241 -0
  48. package/docs/PACKAGE_CONTENTS.md +46 -18
  49. package/docs/PROVIDERS.md +126 -0
  50. package/docs/PROVIDER_ARCHITECTURE.md +199 -0
  51. package/docs/RECIPES.md +9 -0
  52. package/docs/RELEASE_CHECKLIST.md +116 -12
  53. package/docs/SECURITY_REVIEW.md +71 -0
  54. package/docs/SELF_HOSTED_TESTS.md +121 -0
  55. package/docs/SEMANTIC_DECISION_PLANE.md +71 -0
  56. package/docs/TEST_INTELLIGENCE.md +29 -0
  57. package/docs/TEST_PRUNING.md +14 -0
  58. package/docs/TROUBLESHOOTING.md +198 -1
  59. package/docs/UNIVERSAL_INTEGRATION.md +31 -0
  60. package/docs/assets/diagrams/forgeloop-code-attestation-flow.html +2 -2
  61. package/docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json +5 -5
  62. package/docs/assets/diagrams/forgeloop-code-attestation-flow.svg +1 -1
  63. package/docs/assets/diagrams/forgeloop-engineering-flow.html +39 -26
  64. package/docs/assets/diagrams/forgeloop-engineering-flow.receipt.json +6 -6
  65. package/docs/assets/diagrams/forgeloop-engineering-flow.svg +26 -26
  66. package/docs/assets/diagrams/forgeloop-verification-trust-flow.html +2 -1
  67. package/docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json +5 -5
  68. package/docs/assets/diagrams/forgeloop-verification-trust-flow.svg +1 -1
  69. package/docs/diagrams/README.md +13 -9
  70. package/docs/diagrams/forgeloop-code-attestation-flow.workflow.json +1 -1
  71. package/docs/diagrams/forgeloop-engineering-flow.workflow.json +24 -19
  72. package/docs/diagrams/forgeloop-verification-trust-flow.workflow.json +1 -0
  73. package/docs/diagrams/reviews/forgeloop-code-attestation-flow.review.json +4 -4
  74. package/docs/diagrams/reviews/forgeloop-engineering-flow.review.json +4 -4
  75. package/docs/diagrams/reviews/forgeloop-verification-trust-flow.review.json +4 -4
  76. package/docs/documentation-manifest.json +774 -16
  77. package/docs/protocol-requirements.json +24 -0
  78. package/package.json +43 -11
  79. package/schemas/config.schema.json +14 -0
  80. package/schemas/context-plan.schema.json +18 -0
  81. package/schemas/semantic-decision.schema.json +46 -0
  82. package/schemas/task-bundle.schema.json +7 -2
  83. package/schemas/test-utility.schema.json +44 -0
  84. package/scripts/CI_VALIDATORS.md +6 -6
  85. package/scripts/benchmark-jev.mjs +5 -0
  86. package/scripts/benchmark-test-intelligence.mjs +4 -0
  87. package/scripts/generate-agent-protocol-summary.mjs +6 -3
  88. package/scripts/generate-forgeloop-skill.mjs +133 -0
  89. package/scripts/jev-smoke.mjs +19 -0
  90. package/scripts/run-mcp-clean-tests.mjs +30 -0
  91. package/skills/forgeloop/README.md +9 -0
  92. package/skills/forgeloop/SKILL.md +77 -0
  93. package/skills/forgeloop/references/lifecycle.md +9 -0
  94. package/skills/forgeloop/references/recovery.md +7 -0
  95. package/skills/forgeloop/references/verification.md +7 -0
  96. package/src/adapters/agent-browser/assertions.js +47 -0
  97. package/src/adapters/agent-browser/commands.js +54 -0
  98. package/src/adapters/agent-browser/index.js +3 -0
  99. package/src/adapters/agent-browser/locator.js +40 -0
  100. package/src/adapters/agent-browser/process.js +215 -0
  101. package/src/adapters/agent-browser/provider.js +316 -0
  102. package/src/adapters/emulated-services/constants.js +24 -0
  103. package/src/adapters/emulated-services/index.js +7 -0
  104. package/src/adapters/emulated-services/process.js +162 -0
  105. package/src/adapters/emulated-services/provider.js +289 -0
  106. package/src/adapters/opensrc/normalize.js +90 -0
  107. package/src/adapters/opensrc/process.js +248 -0
  108. package/src/adapters/opensrc/provider.js +338 -0
  109. package/src/adapters/opensrc/search.js +264 -0
  110. package/src/adapters/temporary-paths.js +18 -0
  111. package/src/adapters/typesafe/client.js +28 -0
  112. package/src/adapters/typesafe/engine.js +63 -0
  113. package/src/adapters/typesafe/normalize.js +41 -0
  114. package/src/cli.js +218 -174
  115. package/src/commands/action-show.js +5 -2
  116. package/src/commands/advance.js +5 -1
  117. package/src/commands/baseline.js +13 -11
  118. package/src/commands/checkpoint-revalidate.js +192 -0
  119. package/src/commands/complete.js +19 -3
  120. package/src/commands/context-plan.js +38 -0
  121. package/src/commands/contract-create.js +266 -0
  122. package/src/commands/contract-revise.js +236 -0
  123. package/src/commands/decision-show.js +14 -0
  124. package/src/commands/decision-status.js +22 -0
  125. package/src/commands/discover.js +41 -0
  126. package/src/commands/doctor.js +51 -13
  127. package/src/commands/gate-record.js +194 -0
  128. package/src/commands/gate-revalidate.js +135 -0
  129. package/src/commands/handoff-list.js +6 -1
  130. package/src/commands/handoff-show.js +6 -1
  131. package/src/commands/migrate-protocol.js +2 -2
  132. package/src/commands/model-route.js +40 -0
  133. package/src/commands/next.js +7 -1
  134. package/src/commands/policy-diff.js +25 -4
  135. package/src/commands/progress.js +17 -11
  136. package/src/commands/record-diagnosis.js +3 -0
  137. package/src/commands/route.js +146 -18
  138. package/src/commands/semantic-plan.js +41 -0
  139. package/src/commands/status.js +6 -1
  140. package/src/commands/storage-backup.js +15 -0
  141. package/src/commands/storage-migrate.js +5 -0
  142. package/src/commands/storage-migration-resume.js +5 -0
  143. package/src/commands/storage-migration-status.js +44 -0
  144. package/src/commands/storage-restore-resume.js +7 -0
  145. package/src/commands/storage-restore.js +8 -0
  146. package/src/commands/task-abandon.js +224 -0
  147. package/src/commands/task-list.js +8 -43
  148. package/src/commands/task-migrate-contract-bootstrap-repair.js +288 -0
  149. package/src/commands/task-migrate.js +3 -3
  150. package/src/commands/task-recover.js +10 -2
  151. package/src/commands/task-repair-contract-bootstrap.js +263 -0
  152. package/src/commands/task-scope.js +18 -2
  153. package/src/commands/task-show.js +16 -2
  154. package/src/commands/test-inventory.js +5 -0
  155. package/src/commands/test-prune-plan.js +5 -0
  156. package/src/commands/test-prune-probe.js +5 -0
  157. package/src/commands/test-utility.js +5 -0
  158. package/src/commands/validate-protocol.js +39 -15
  159. package/src/commands/validate-receipt.js +8 -1
  160. package/src/config/guides.json +4 -0
  161. package/src/core/action-ledger-projection.js +10 -3
  162. package/src/core/actions.js +38 -75
  163. package/src/core/activation.js +11 -3
  164. package/src/core/approvals.js +17 -51
  165. package/src/core/artifact-registry.js +83 -2
  166. package/src/core/artifacts.js +81 -27
  167. package/src/core/attachment-paths.js +45 -0
  168. package/src/core/attestation-coverage.js +6 -1
  169. package/src/core/attestation-verifier.js +21 -2
  170. package/src/core/attestation.js +17 -6
  171. package/src/core/audit-ux.js +514 -0
  172. package/src/core/audit.js +6 -1
  173. package/src/core/browser-verification/constants.js +149 -0
  174. package/src/core/browser-verification/normalize.js +254 -0
  175. package/src/core/browser-verification/provider.js +519 -0
  176. package/src/core/browser-verification/service.js +115 -0
  177. package/src/core/bundles.js +160 -66
  178. package/src/core/checkpoint-revalidation.js +321 -0
  179. package/src/core/cli-command-definitions.js +350 -7
  180. package/src/core/code-manifest.js +9 -3
  181. package/src/core/command-executors.js +274 -108
  182. package/src/core/command-input.js +136 -44
  183. package/src/core/completion-artifacts.js +85 -34
  184. package/src/core/completion-ownership.js +19 -8
  185. package/src/core/completion-recovery-rebind.js +11 -1
  186. package/src/core/completion.js +64 -15
  187. package/src/core/config.js +3 -0
  188. package/src/core/conformance.js +2 -1
  189. package/src/core/context-compiler/budget.js +9 -0
  190. package/src/core/context-compiler/candidates.js +39 -0
  191. package/src/core/context-compiler/compiler.js +63 -0
  192. package/src/core/context-compiler/fingerprint.js +11 -0
  193. package/src/core/context-compiler/policy.js +13 -0
  194. package/src/core/context-compiler/result.js +23 -0
  195. package/src/core/continuity-lint.js +13 -2
  196. package/src/core/continuity-reconciliation.js +16 -3
  197. package/src/core/continuity.js +16 -8
  198. package/src/core/contract-bootstrap-recovery.js +656 -0
  199. package/src/core/contract-revision.js +209 -0
  200. package/src/core/decision/artifact.js +70 -0
  201. package/src/core/decision/benchmarks.js +103 -0
  202. package/src/core/decision/cache.js +27 -0
  203. package/src/core/decision/constants.js +58 -0
  204. package/src/core/decision/cutover.js +34 -0
  205. package/src/core/decision/engine.js +22 -0
  206. package/src/core/decision/errors.js +68 -0
  207. package/src/core/decision/events.js +104 -0
  208. package/src/core/decision/freshness.js +19 -0
  209. package/src/core/decision/normalizers/index.js +115 -0
  210. package/src/core/decision/policy.js +18 -0
  211. package/src/core/decision/projection.js +16 -0
  212. package/src/core/decision/question-registry.js +201 -0
  213. package/src/core/decision/request.js +26 -0
  214. package/src/core/decision/resolver.js +138 -0
  215. package/src/core/decision/result.js +58 -0
  216. package/src/core/decision/service.js +181 -0
  217. package/src/core/decision/state-builder.js +65 -0
  218. package/src/core/decision/task-bindings.js +35 -0
  219. package/src/core/decision/test-provider.js +32 -0
  220. package/src/core/decision/thresholds.js +15 -0
  221. package/src/core/diagnosis-model.js +11 -0
  222. package/src/core/diagnosis.js +10 -1
  223. package/src/core/diagnostic-projection.js +29 -12
  224. package/src/core/diagnostic-record.js +28 -3
  225. package/src/core/efficiency.js +6 -1
  226. package/src/core/error-codes.js +278 -0
  227. package/src/core/events.js +535 -147
  228. package/src/core/evidence-readiness.js +9 -0
  229. package/src/core/execution-prerequisites.js +36 -13
  230. package/src/core/execution-profile.js +63 -38
  231. package/src/core/execution.js +26 -40
  232. package/src/core/filesystem.js +11 -0
  233. package/src/core/gate-artifact.js +105 -19
  234. package/src/core/gate-provenance.js +125 -0
  235. package/src/core/handoff.js +26 -14
  236. package/src/core/history.js +39 -35
  237. package/src/core/hypothesis-projection.js +32 -0
  238. package/src/core/information-gain-projection.js +104 -100
  239. package/src/core/inspect.js +12 -3
  240. package/src/core/integration-invocation-policy.js +37 -4
  241. package/src/core/integration-resources.js +119 -87
  242. package/src/core/ledger-event-collection.js +189 -0
  243. package/src/core/ledger-relations.js +23 -0
  244. package/src/core/model-router/constants.js +10 -0
  245. package/src/core/model-router/policy.js +103 -0
  246. package/src/core/model-router/router.js +37 -0
  247. package/src/core/native-storage.js +12 -0
  248. package/src/core/next-action-continuity.js +31 -9
  249. package/src/core/next-action-model.js +58 -0
  250. package/src/core/next-action-phases.js +131 -43
  251. package/src/core/next-action-refresh.js +43 -9
  252. package/src/core/next-action-review-phase.js +9 -4
  253. package/src/core/next-action-verification-phase.js +2 -1
  254. package/src/core/next-action.js +56 -9
  255. package/src/core/phase.js +266 -103
  256. package/src/core/policy-engine.js +12 -13
  257. package/src/core/preflight-consistency.js +89 -62
  258. package/src/core/preflight-loaders.js +48 -9
  259. package/src/core/preflight-model.js +6 -1
  260. package/src/core/preflight.js +29 -12
  261. package/src/core/progress.js +21 -10
  262. package/src/core/protocol-info.js +68 -0
  263. package/src/core/protocol-migration.js +7 -6
  264. package/src/core/protocol.js +20 -0
  265. package/src/core/reconcile-closure.js +281 -67
  266. package/src/core/recovery-history.js +67 -47
  267. package/src/core/reflection.js +72 -77
  268. package/src/core/responsibility.js +25 -13
  269. package/src/core/resumability.js +154 -44
  270. package/src/core/route-artifact.js +28 -4
  271. package/src/core/router.js +67 -1
  272. package/src/core/runtime-context.js +123 -61
  273. package/src/core/schema-validation.js +11 -3
  274. package/src/core/security-review/constants.js +64 -0
  275. package/src/core/security-review/normalize.js +245 -0
  276. package/src/core/security-review/provider.js +204 -0
  277. package/src/core/security-review/service.js +134 -0
  278. package/src/core/semantic-planning/constants.js +19 -0
  279. package/src/core/semantic-planning/projection.js +94 -0
  280. package/src/core/semantic-planning/service.js +15 -0
  281. package/src/core/settlement.js +12 -1
  282. package/src/core/signing/bundle-file.js +53 -0
  283. package/src/core/signing/bundle-reference.js +15 -0
  284. package/src/core/signing/sigstore.js +60 -33
  285. package/src/core/signing/statement-file.js +27 -0
  286. package/src/core/sources.js +37 -0
  287. package/src/core/storage-runtime-registry.js +41 -0
  288. package/src/core/structural-quality/artifacts.js +20 -14
  289. package/src/core/structural-quality/service.js +81 -56
  290. package/src/core/target-layout.js +1 -1
  291. package/src/core/task-claim-state.js +249 -15
  292. package/src/core/task-command.js +21 -1
  293. package/src/core/task-conflict-inspection.js +133 -102
  294. package/src/core/task-descriptor.js +29 -22
  295. package/src/core/task-discovery.js +288 -90
  296. package/src/core/task-lock.js +66 -306
  297. package/src/core/task-migration-validation.js +5 -5
  298. package/src/core/task-migration.js +17 -287
  299. package/src/core/task-paths.js +13 -0
  300. package/src/core/task-recovery.js +1 -0
  301. package/src/core/task-snapshot.js +51 -8
  302. package/src/core/task-storage-migration.js +18 -0
  303. package/src/core/templates.js +23 -8
  304. package/src/core/test-intelligence/benchmarks.js +68 -0
  305. package/src/core/test-intelligence/inventory.js +73 -0
  306. package/src/core/test-intelligence/prune.js +94 -0
  307. package/src/core/test-intelligence/semantic-state.js +15 -0
  308. package/src/core/test-intelligence/service.js +40 -0
  309. package/src/core/test-intelligence/utility.js +50 -0
  310. package/src/core/trace.js +164 -105
  311. package/src/core/trajectory-evaluation.js +15 -3
  312. package/src/core/trajectory-metrics.js +47 -32
  313. package/src/core/transaction.js +16 -287
  314. package/src/core/verification-scope.js +20 -12
  315. package/src/core/work-state.js +100 -59
  316. package/src/integration.d.ts +492 -0
  317. package/src/integration.js +54 -0
  318. package/src/providers/README.md +47 -0
  319. package/src/providers/capabilities.js +46 -0
  320. package/src/providers/errors.js +15 -0
  321. package/src/providers/index.js +29 -0
  322. package/src/providers/json-snapshot.js +105 -0
  323. package/src/providers/registry.js +152 -0
  324. package/src/repository-index/binary-manager.js +7 -5
  325. package/src/storage/artifact-bytes.js +22 -0
  326. package/src/storage/attachment-binding.js +11 -0
  327. package/src/storage/attachment-files.js +82 -0
  328. package/src/storage/attachment-references.js +36 -0
  329. package/src/storage/backup.js +53 -0
  330. package/src/storage/capabilities.js +31 -0
  331. package/src/storage/connection-owner.js +119 -0
  332. package/src/storage/connection.js +376 -0
  333. package/src/storage/existing-project-scope.js +45 -0
  334. package/src/storage/export-destination.js +44 -0
  335. package/src/storage/exporter.js +284 -0
  336. package/src/storage/file-durability.js +46 -0
  337. package/src/storage/importer.js +461 -0
  338. package/src/storage/index.js +74 -0
  339. package/src/storage/leases.js +63 -0
  340. package/src/storage/ledger-event-snapshot.js +150 -0
  341. package/src/storage/ledger-relations.js +220 -0
  342. package/src/storage/legacy-maintenance-boundary.js +18 -0
  343. package/src/storage/legacy-signature.js +115 -0
  344. package/src/storage/maintenance-handoff.js +129 -0
  345. package/src/storage/maintenance-owner.js +42 -0
  346. package/src/storage/maintenance.js +310 -0
  347. package/src/storage/metadata-json.js +35 -0
  348. package/src/storage/migration-activate.js +59 -0
  349. package/src/storage/migration-archive.js +57 -0
  350. package/src/storage/migration-attachment-root.js +61 -0
  351. package/src/storage/migration-candidate.js +398 -0
  352. package/src/storage/migration-publication.js +143 -0
  353. package/src/storage/migration-rollback-admission.js +54 -0
  354. package/src/storage/migration-rollback-preparation.js +132 -0
  355. package/src/storage/migration-rollback-publication.js +183 -0
  356. package/src/storage/migration-rollback-release.js +66 -0
  357. package/src/storage/migration-rollback-source-stage.js +103 -0
  358. package/src/storage/migration-rollback.js +43 -0
  359. package/src/storage/migration-source-partition.js +56 -0
  360. package/src/storage/migration-source.js +255 -0
  361. package/src/storage/migration-terminal.js +39 -0
  362. package/src/storage/migration-validation.js +75 -0
  363. package/src/storage/migration.js +43 -0
  364. package/src/storage/operational-attachments.js +49 -0
  365. package/src/storage/operational-context.js +50 -0
  366. package/src/storage/project-backup.js +98 -0
  367. package/src/storage/project-bootstrap.js +24 -0
  368. package/src/storage/project-boundary.js +79 -0
  369. package/src/storage/project-read-snapshot.js +18 -0
  370. package/src/storage/project-replacement.js +137 -0
  371. package/src/storage/project-restore.js +203 -0
  372. package/src/storage/record-definitions.js +45 -0
  373. package/src/storage/repository.js +507 -0
  374. package/src/storage/restore-journal.js +62 -0
  375. package/src/storage/restore-layout.js +30 -0
  376. package/src/storage/restore-preparation.js +84 -0
  377. package/src/storage/restore-replacement-archive.js +162 -0
  378. package/src/storage/restore-replacement-owner.js +31 -0
  379. package/src/storage/restore-replacement-preparation.js +128 -0
  380. package/src/storage/restore-replacement.js +142 -0
  381. package/src/storage/restore-terminal.js +32 -0
  382. package/src/storage/runtime.js +31 -0
  383. package/src/storage/schema.js +214 -0
  384. package/src/storage/singleton-import.js +84 -0
  385. package/src/storage/snapshot-continuity.js +16 -0
  386. package/src/storage/snapshot.js +36 -0
  387. package/src/storage/storage-marker.js +79 -0
  388. package/src/storage/task-guards.js +107 -0
  389. package/src/storage/topology.js +42 -0
  390. package/src/storage/transaction.js +179 -0
  391. package/src/storage/unit-of-work.js +663 -0
  392. package/src/storage/windows-process-incarnation.js +206 -0
  393. package/.forgeloop/forgeloop.gitignore +0 -4
  394. package/LICENSE-DOCS.md +0 -13
  395. package/src/core/transaction-maintenance.js +0 -70
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # ForgeLoop — Verifiable Engineering Protocol
2
2
 
3
3
  <p align="center">
4
- <img src="./docs/assets/eng_readme_forgeloop.png" alt="ForgeLoop — Loop Engineering for AI Agents" width="100%">
4
+ <img src="./docs/assets/forgeloop-architecture.png" alt="ForgeLoop architecture infographic" width="100%">
5
5
  </p>
6
6
 
7
7
  [![CodeQL](https://github.com/cassiomc1/forgeloop/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/cassiomc1/forgeloop/actions/workflows/codeql.yml)
@@ -11,16 +11,9 @@
11
11
  [![Package smoke](https://github.com/cassiomc1/forgeloop/actions/workflows/package-smoke.yml/badge.svg?branch=main)](https://github.com/cassiomc1/forgeloop/actions/workflows/package-smoke.yml)
12
12
  [![Release notes](https://github.com/cassiomc1/forgeloop/actions/workflows/release-notes.yml/badge.svg?branch=main)](https://github.com/cassiomc1/forgeloop/actions/workflows/release-notes.yml)
13
13
 
14
- ForgeLoop is a protocol CLI for AI-assisted development.
15
- It turns outcomes into contracts, deterministic routing, resumable state,
16
- evidence-backed verification, recovery, cross-harness continuity, repository
17
- discovery, and validator-backed completion—not an agent or LLM runtime.
14
+ ForgeLoop is the deterministic governor for AI-assisted engineering. Jev provides bounded System One semantic input; the host coding model provides System Two implementation. ForgeLoop owns lifecycle, claims, gates, evidence, completion, recovery, and publication truth.
18
15
 
19
- Operational sources are indexed in [`DOCS_INDEX.md`](./DOCS_INDEX.md).
20
- [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) is canonical;
21
- [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md) defines discovery,
22
- [`PROJECT_PROFILE.md`](./PROJECT_PROFILE.md) stores project facts, and
23
- [`GUIDE_ROUTER.md`](./GUIDE_ROUTER.md) selects relevant guides.
16
+ Operational sources: [`DOCS_INDEX.md`](./DOCS_INDEX.md); [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) is canonical; [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md) defines discovery; [`PROJECT_PROFILE.md`](./PROJECT_PROFILE.md) stores project facts; [`GUIDE_ROUTER.md`](./GUIDE_ROUTER.md) selects guides.
24
17
 
25
18
  ## Where should I start?
26
19
 
@@ -29,7 +22,9 @@ Operational sources are indexed in [`DOCS_INDEX.md`](./DOCS_INDEX.md).
29
22
  - **Full protocol specification** → [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md)
30
23
  - **Integrating an AI harness** → [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md)
31
24
  - **Optional advisory context providers** → [`docs/ADVISORY_CONTEXT.md`](./docs/ADVISORY_CONTEXT.md)
25
+ - **Provider extension architecture** → [`docs/PROVIDER_ARCHITECTURE.md`](./docs/PROVIDER_ARCHITECTURE.md) and [`docs/PROVIDERS.md`](./docs/PROVIDERS.md)
32
26
  - **Agent bootstrap summary** → [`docs/AGENT_PROTOCOL_SUMMARY.md`](./docs/AGENT_PROTOCOL_SUMMARY.md)
27
+ - **Portable ForgeLoop Agent Skill** → [`skills/forgeloop/SKILL.md`](./skills/forgeloop/SKILL.md) and [`docs/AGENT_SKILL.md`](./docs/AGENT_SKILL.md)
33
28
  - **Continuing another harness's task** → [`docs/CROSS_HARNESS_CONTINUITY.md`](./docs/CROSS_HARNESS_CONTINUITY.md)
34
29
  - **CLI command reference** → [`docs/CLI_REFERENCE.md`](./docs/CLI_REFERENCE.md)
35
30
  - **Artifact & schema reference** → [`docs/ARTIFACT_REFERENCE.md`](./docs/ARTIFACT_REFERENCE.md)
@@ -42,10 +37,7 @@ Operational sources are indexed in [`DOCS_INDEX.md`](./DOCS_INDEX.md).
42
37
 
43
38
  ## Real execution proof
44
39
 
45
- The repository-only [execution PoC](https://github.com/cassiomc1/forgeloop/blob/main/poc/README.md) covers workload, protocol
46
- artifacts, trusted provenance, receipts, evidence, and audit. It reached
47
- validator-backed `COMPLETE / VALID` and preserves a later
48
- `E_RECEIPT_PATH_MISMATCH` after publication changed the repository.
40
+ The repository-only [execution PoC](https://github.com/cassiomc1/forgeloop/blob/main/poc/README.md) demonstrates workload, protocol artifacts, trusted provenance, receipts, evidence, audit, and validator-backed `COMPLETE / VALID`.
49
41
 
50
42
  - [Canonical technical audit](https://github.com/cassiomc1/forgeloop/blob/main/poc/reports/poc-20260826-real-execution-technical-audit-v2.md)
51
43
  - [Evidence package](https://github.com/cassiomc1/forgeloop/tree/main/poc/evidence/poc-20260826-real-execution/)
@@ -74,29 +66,38 @@ validator-backed `COMPLETE / VALID` and preserves a later
74
66
  | SQL | [guide](./ENG/sql-development-eng.md) |
75
67
  | Go | [guide](./ENG/go-development-eng.md) |
76
68
  | TypeScript | [guide](./ENG/typescript-development-eng.md) |
69
+ | Python | [guide](./ENG/python-development-eng.md) |
77
70
  | PHP | [guide](./ENG/php-development-eng.md) |
78
71
  | Swift | [guide](./ENG/swift-development-eng.md) |
79
72
  | Structural quality feedback | [`docs/STRUCTURAL_QUALITY.md`](./docs/STRUCTURAL_QUALITY.md) |
80
73
 
81
- Routing uses bounded structural evidence for Flutter, .NET, Node.js, Rust, C,
82
- C++, Java, Go, TypeScript, PHP, and Swift; SQL is a scoped schema/query/
83
- migration overlay. Source extensions, build tooling, lockfiles, compiler/JDK/
84
- runtime images, and prose alone fail where the specialist contract requires
85
- stronger project identity. The public project-evidence schema remains v1.
74
+ Routing uses bounded structural evidence; SQL remains a schema/query/migration
75
+ overlay. Extensions, tool files, lockfiles, runtime images, and prose alone do
76
+ not establish project identity. Public project evidence remains v1.
77
+
78
+ ## Distribution and license
79
+
80
+ GitHub hosts source and issues. The core npm package is publicly available;
81
+ the MCP companion retains restricted distribution.
82
+ ForgeLoop-owned source and documentation are licensed under the
83
+ [PolyForm Noncommercial License 1.0.0](./LICENSE). Commercial use is not granted
84
+ by this license. Third-party notices are documented in
85
+ [`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md).
86
86
 
87
87
  ## Quickstart
88
88
 
89
89
  ### Installation
90
90
 
91
- Install the ForgeLoop CLI globally to make the `forgeloop` command available
92
- in your terminal:
91
+ After your organization grants access, configure npm authentication and install:
93
92
 
94
93
  ```bash
95
94
  npm install --global @cassiomc1/forgeloop
96
95
  forgeloop --version
97
96
  ```
98
97
 
99
- Then, inside your project repository:
98
+ Requires Node 24.19.0+ with `node:sqlite`. Migrate legacy state explicitly.
99
+
100
+ Inside your project:
100
101
 
101
102
  ```bash
102
103
  forgeloop init
@@ -104,29 +105,20 @@ forgeloop doctor
104
105
  forgeloop search "example"
105
106
  ```
106
107
 
107
- If you prefer not to install globally, use `npx`:
108
-
109
- ```bash
110
- npx @cassiomc1/forgeloop init
111
- npx @cassiomc1/forgeloop doctor
112
- ```
113
-
114
108
  ### 60-second demonstration
115
109
 
116
- In a disposable directory, initialize the kit and create an isolated task. The
117
- result is deterministic and can be inspected by any compatible harness:
110
+ In a disposable directory, initialize the kit and create an isolated task.
111
+ Semantic checkpoints require a host-configured `TYPESAFE_API_KEY`; ForgeLoop never persists it.
118
112
 
119
113
  ```bash
120
114
  npx @cassiomc1/forgeloop init
121
115
  forgeloop task-create --task demo --claim src --json
122
- forgeloop route --task demo --work clean-code --json
116
+ forgeloop contract-create --task demo --preset documentation --json
117
+ forgeloop route --task demo --work code --json
123
118
  forgeloop preflight --task demo --json
124
119
  forgeloop next --task demo --json
125
120
  ```
126
121
 
127
- The last command reports the next safe action; it does not execute code or
128
- schedule agents.
129
-
130
122
  ### Optional code attestation
131
123
 
132
124
  Projects may opt into source-content attestation after a valid completion. The
@@ -152,7 +144,9 @@ results. Provider output is never lifecycle state, evidence, authority,
152
144
  completion truth, or next-action authority, and it is never executable as a
153
145
  protocol command. The optional Ripwire adapter follows the same boundary; see
154
146
  [`docs/ADVISORY_CONTEXT.md`](./docs/ADVISORY_CONTEXT.md) and
155
- [`docs/RIPWIRE_ADAPTER.md`](./docs/RIPWIRE_ADAPTER.md).
147
+ [`docs/RIPWIRE_ADAPTER.md`](./docs/RIPWIRE_ADAPTER.md). The optional OpenSrc
148
+ adapter exposes external package source context through the same boundary; see
149
+ [`docs/OPENSRC_ADAPTER.md`](./docs/OPENSRC_ADAPTER.md).
156
150
 
157
151
  ### Optional task boundaries and differential verification
158
152
 
@@ -178,8 +172,8 @@ raising `VERIFIED` to `ATTESTED`. See [`docs/REVISION_PROVIDERS.md`](./docs/REVI
178
172
 
179
173
  Generic CI provides a platform-neutral revision-range boundary; thin GitHub,
180
174
  GitLab, local, or enterprise adapters may translate revisions without adding
181
- trust rules to the protocol core. The CLI and integration API remain usable
182
- across supported platforms, with MCP as an optional local adapter.
175
+ trust rules to the protocol core. CLI and Integration API remain cross-platform;
176
+ MCP is optional.
183
177
 
184
178
  ### Durable external actions
185
179
 
@@ -209,20 +203,18 @@ forgeloop protocol-info --json
209
203
  | Validate completion | Yes | Provides real work and evidence |
210
204
  | Schedule agents or LLM inference | No | External to the protocol |
211
205
 
212
- For a concrete exchange between tools, see
213
- [cross-harness continuity](./docs/CROSS_HARNESS_CONTINUITY.md).
214
-
215
- From a published package, initialize a target project with:
206
+ From the privately delivered package, initialize a target project with:
216
207
 
217
208
  ```bash
218
209
  npx @cassiomc1/forgeloop init
219
210
  npx @cassiomc1/forgeloop doctor
220
211
  ```
221
212
 
222
- The CLI installs canonical documents under `.forgeloop/kit/`, keeps small
223
- native discovery shims at the project root, stores project-scoped
224
- configuration under `.forgeloop/`, and stores task-scoped protocol artifacts
225
- under `.forgeloop/task-state/<taskKey>/`.
213
+ The CLI installs canonical documents under `.forgeloop/kit/`, keeps native
214
+ discovery shims at the project root, and stores project configuration under
215
+ `.forgeloop/`. Task artifacts use `.forgeloop/task-state/<taskKey>/` as their
216
+ logical portable export path; SQLite mode stores mutable records in
217
+ `.forgeloop/state.sqlite`.
226
218
  `update` preserves target-specific profile facts and locally modified files.
227
219
 
228
220
  ForgeLoop adapts protocol depth to task risk and scope, preserving verifiable
@@ -254,8 +246,7 @@ host-reported or `UNKNOWN`; values are never estimated.
254
246
  capability, but advisory recall remains Integration API only. The stock CLI
255
247
  does not auto-recall providers and does not expose a `context-recall` command.
256
248
 
257
- Before npm publication, the same source checkout can be exercised without a
258
- network or package lookup:
249
+ Validate the source checkout offline before any private release:
259
250
 
260
251
  ```bash
261
252
  node src/cli.js init
@@ -363,20 +354,20 @@ ForgeLoop supports isolated, concurrent tasks within the same repository via det
363
354
  # Create an isolated task claiming specific directories
364
355
  forgeloop task-create --task auth-feature --claim src/auth --claim tests/auth --json
365
356
 
366
- # List active and completed tasks
367
357
  forgeloop task-list --json
368
358
 
369
- # Ask for deterministic conflict/recovery guidance
370
359
  forgeloop next --task auth-feature --json
371
360
 
372
- # Only for a task classified STALE or ABANDONED: release effective claims
361
+ # Release claims only for a STALE or ABANDONED task
373
362
  forgeloop task-recover --task auth-feature --acknowledge-recovery --json
374
363
 
375
- # Reacquire conflict-free claims before mutating a recovered task again
364
+ # Explicitly abandon an active non-terminal task when its objective is no longer valid
365
+ forgeloop task-abandon --task auth-feature --acknowledge-abandonment --json
366
+
367
+ # Reacquire conflict-free claims before mutating a recovered task
376
368
  forgeloop task-resume --task auth-feature --json
377
369
 
378
- # Run standard lifecycle commands targeting the task
379
- forgeloop route --task auth-feature --work clean-code --surface backend
370
+ forgeloop route --task auth-feature --work code --surface backend
380
371
  forgeloop preflight --task auth-feature --json
381
372
  forgeloop advance --task auth-feature --to EXECUTING
382
373
  forgeloop complete --task auth-feature --json
@@ -395,6 +386,12 @@ disabled. The standalone acknowledgement flag is not host-attested authority.
395
386
  settlement, normal claim-overlap, and clean-checkout checks succeed. Never
396
387
  create, edit, or delete `recovery.json` manually.
397
388
 
389
+ `task-recover` is reserved for canonical `STALE`/`ABANDONED` classification.
390
+ `task-abandon` is the separate explicit path for an active non-terminal task:
391
+ it records `TASK_ABANDONED`, releases claims as `RELEASED_BY_RECOVERY`, keeps
392
+ the phase unchanged, and never implies completion or publication. `clear-state`
393
+ only removes a checkpoint and is not a claim-release or abandonment mechanism.
394
+
398
395
  ### Executable policy verification & brownfield baselines
399
396
 
400
397
  ForgeLoop enforces automated, non-interactive verification rules (`rules.json`) with zero interactive dependencies:
@@ -431,12 +428,20 @@ See [`docs/CLI_REFERENCE.md`](./docs/CLI_REFERENCE.md) and [`LOOP_SYSTEM_DESIGN.
431
428
 
432
429
  ## Architecture flow
433
430
 
431
+ <a href="./docs/assets/diagrams/forgeloop-engineering-flow.html">
432
+ <img src="./docs/assets/forgeloop-lifecycle-animated.svg" alt="Animated ForgeLoop evidence-first loop: Contract, Route, Preflight, Execute, Evidence, Review, VALID, with an evidence-only correction loop" width="100%">
433
+ </a>
434
+
435
+ *Animation: the rail pulses through each step in order. It loops forever and
436
+ respects reduced-motion settings. Select the image to open the full animated
437
+ interactive explorer.*
438
+
434
439
  The canonical source is the typed Archify workflow
435
440
  [`docs/diagrams/forgeloop-engineering-flow.workflow.json`](./docs/diagrams/forgeloop-engineering-flow.workflow.json).
436
441
  The committed animated interactive explorer is
437
442
  [`docs/assets/diagrams/forgeloop-engineering-flow.html`](./docs/assets/diagrams/forgeloop-engineering-flow.html),
438
443
  which traces it. The
439
- animated, self-contained SVG fallback is
444
+ detailed, self-contained SVG fallback is
440
445
  [`docs/assets/diagrams/forgeloop-engineering-flow.svg`](./docs/assets/diagrams/forgeloop-engineering-flow.svg),
441
446
  and the deterministic hash receipt is
442
447
  [`docs/assets/diagrams/forgeloop-engineering-flow.receipt.json`](./docs/assets/diagrams/forgeloop-engineering-flow.receipt.json).
@@ -449,8 +454,6 @@ The broader architecture and the CLI-only search boundary are in
449
454
 
450
455
  [Open the animated ForgeLoop evidence-first engineering flow](./docs/assets/diagrams/forgeloop-engineering-flow.html)
451
456
 
452
- ![ForgeLoop evidence-first engineering flow (animated SVG fallback)](./docs/assets/diagrams/forgeloop-engineering-flow.svg)
453
-
454
457
  Two focused, source-bound workflow
455
458
  diagrams complement it. The [Verification Trust Flow source](./docs/diagrams/forgeloop-verification-trust-flow.workflow.json),
456
459
  [animated explorer](./docs/assets/diagrams/forgeloop-verification-trust-flow.html),
@@ -516,8 +519,9 @@ it must not infer current ownership from `task.json` or `recovery.json` alone.
516
519
 
517
520
  ## Security and dependency boundary
518
521
 
519
- Runtime uses Node built-ins and approved exact `smol-toml`; it installs no
520
- agents, providers, plugins, services, or telemetry. Paths, symlinks, JSON,
522
+ Runtime uses Node built-ins and the approved exact `@typesafe-ai/sdk` and
523
+ `smol-toml` dependencies; it installs no agents, providers, plugins, services,
524
+ or telemetry. Paths, symlinks, JSON,
521
525
  manifests, schemas, receipts, and secret-like values are bounded or checked.
522
526
  Install-capable verification requires trusted host authority; see
523
527
  [`THREAT_MODEL.md`](./THREAT_MODEL.md).
package/TERMINOLOGY.md CHANGED
@@ -33,6 +33,8 @@
33
33
  | Integration level | The capability tier of an execution environment (`INSTRUCTION_DISCOVERED`, `PROTOCOL_CAPABLE`, `PROTOCOL_LIMITED`, `CONFORMANCE_VERIFIED`). |
34
34
  | Recovered task | A non-terminal task whose ordinary mutation authority is suspended and whose effective write claims are released by durable `recovery.json` state. |
35
35
  | Recovery acknowledgement | A caller declaration that it intends to recover a task classified `STALE` or `ABANDONED`; it is not a host-attested authority grant. |
36
+ | Active-task abandonment | An explicit caller-acknowledged `task-abandon` operation that releases validated claims for a non-terminal active task without changing its phase or asserting completion. |
37
+ | Abandonment event | The append-only `TASK_ABANDONED` recovery boundary and its transaction witness; it is distinct from automatic stale-task recovery and from completion. |
36
38
  | Historical claims | The write claims retained in `task.json` as task history, including while recovery releases their active ownership. |
37
39
  | Effective claims | The claims currently enforced for ownership conflicts: descriptor claims for an active task, or an empty set after validator-backed completion or active recovery. |
38
40
  | Claim reacquisition | The serialized `task-resume` operation that rechecks conflicts and checkout cleanliness before removing recovery state and restoring mutation authority. |
@@ -7,10 +7,9 @@ for reuse.
7
7
 
8
8
  ## Collection license
9
9
 
10
- The CLI and validator code are licensed under the MIT License in `LICENSE`.
11
- Original documentation is offered under CC BY 4.0 as described in
12
- `LICENSE-DOCS.md`. Those notices do not apply to adapted or external material;
13
- review the applicable source terms before redistributing such material.
10
+ ForgeLoop-owned source and documentation are licensed under the
11
+ [PolyForm Noncommercial License 1.0.0](./LICENSE). The notices below apply only to third-party
12
+ components, adapted sources, vendored tools, and external references.
14
13
 
15
14
  ## Adapted and editorial sources
16
15
 
package/THREAT_MODEL.md CHANGED
@@ -79,6 +79,7 @@ index location, process lifecycle, and normalized result boundary.
79
79
  | Chronology rewrite | Hides execution before route, gates, or verification | `.forgeloop/events.ndjson` | Append-only local ledger, sequence numbers, hash chaining, and chronology validation without prompts or hidden reasoning | A privileged process can still replace the ledger after validation | `tests/lifecycle.test.js` |
80
80
  | Concurrent protocol mutation | Two writers read the same state or ledger tail and silently overwrite each other | Task state, task event ledger, and transaction journal | Mutations acquire a lease-bearing task lock, stage writes in `.forgeloop/.txn/`, preserve a recovery manifest, and publish only after the callback completes; state mutators use an expected revision, while ledger appends validate a tail checkpoint and stage only a synchronized suffix | The filesystem does not provide a multi-file atomic commit primitive; a process killed during append is recovered by truncating to the journaled pre-append size rather than treated as complete | `tests/state-revision.test.js`, `tests/concurrent-ledger.test.js`, `tests/scale-ledger.test.js`, `tests/transaction.test.js` |
81
81
  | Stale lock theft | A live process loses exclusive ownership because another process removes or replaces its lock | `.forgeloop/locks/<taskKey>.lock` | Locks record hostname, owner instance ID, heartbeat, and lease; inspection distinguishes `NONE`, `LIVE`, `STALE`, `UNKNOWN`, and `CORRUPT`; stale-only release quarantines the observed inode and compares lock ID, heartbeat, and owner instance before deletion | A malicious or separately privileged actor can still delete local locks; an expired lease remains a recovery heuristic rather than remote liveness proof | `tests/task-lock.test.js`, `tests/task-recover.test.js` |
82
+ | Active-task abandonment used to release another task's claims | A caller targets the wrong active task or races a lifecycle mutation to steal/release its write scope | Task identity, descriptor, work state, ledger, recovery artifact, project claims lock, and task transaction | `task-abandon` requires an explicit task ID and acknowledgement, validates canonical ownership and ledger integrity, serializes project/task mutation, revalidates phase/revision/ledger sequence/claims, and records append-only `TASK_ABANDONED` evidence without completion authority | A caller with legitimate local mutation authority can intentionally abandon its own task; that is the intended authority boundary | `tests/task-abandon.test.js`, `tests/task-recovery-concurrency.test.js` |
82
83
  | Forged recovery tombstone | A schema-valid fake `recovery.json` makes historical claims disappear without an official recovery event | Task descriptor, recovery artifact, and complete event ledger | The canonical claim-state resolver releases claims only when every artifact field matches one unresolved recovery history cycle; a tombstone alone is `INCONSISTENT`, retains historical claims, and disables mutation | A privileged actor can replace every linked local artifact; validation proves consistency, not remote attestation | `tests/task-claim-state.test.js`, `tests/task-claim-ownership-integration.test.js`, `tests/task-recovery-invariants.test.js` |
83
84
  | Forged completion claim release | An actor changes `work-state.phase` to `COMPLETE` to make write claims disappear without canonical completion | Work state, canonical completion event, and the complete validated event ledger | Claim ownership releases COMPLETE claims only when state and a validated lifecycle ledger prove canonical completion (`COMPLETION_VALIDATED` bound to the task, coherent state/ledger, no contradicting later lifecycle event); otherwise ownership is `INCONSISTENT` with historical claims retained, mutation disabled, and overlapping acquisition blocked (`E_COMPLETION_OWNERSHIP_UNPROVEN`) | A separately privileged actor can rewrite all local artifacts consistently; ForgeLoop provides consistency verification, not external cryptographic attestation | `tests/completion-claim-ownership.test.js`, `tests/task-claim-state.test.js` |
84
85
  | Incomplete task-lock identity theft | A structurally incomplete persisted task lock (missing lockId, owner instance, operation, or lease) with plausible timestamps is classified LIVE/STALE and removed as stale | `.forgeloop/locks/<taskKey>.lock` identity validation | Task lock identity requires `taskId`, `lockId`, `ownerInstanceId`, `operation`, heartbeat, and a positive integer lease; incomplete metadata classifies `UNKNOWN` (never stale-releasable), lease values are never defaulted at validation time, and CAS release additionally requires `lock.taskId === requested taskId` plus unchanged observed identity | A privileged writer can still forge a fully identified lock; classification proves structure, not liveness | `tests/task-lock.test.js` |
@@ -86,6 +87,7 @@ index location, process lifecycle, and normalized result boundary.
86
87
  | Forged legacy-migration authority | A forged `LEGACY_RECOVERY_MIGRATION_RECORDED` claims `HOST_ATTESTED` authority to impersonate a host grant | Migration event authority validation | Legacy migration v1 accepts only `CALLER_ACKNOWLEDGED`; any other authority kind makes the event invalid and the ledger INCONSISTENT | Normal recovery events retain their own host-attestation boundary with trusted grant references | `tests/task-repair-legacy-recovery.test.js` |
87
88
  | MCP project-root substitution | A tool call supplies a different project root to read or mutate an unintended target | Immutable server-pinned project context | The ForgeLoop MCP server realpaths the project root once at startup and freezes it; project root is never a tool input | A privileged local process can still target other roots by launching its own server | `integrations/mcp/tests/` |
88
89
  | MCP claim-projection fork | An adapter derives claim ownership from raw artifacts (task.json, recovery.json) and disagrees with the canonical resolver | Canonical ownership resource | The `task/ownership` resource is derived exclusively from `resolveTaskClaimState()`; forged COMPLETE stays INCONSISTENT with retained claims through the resource surface | Presentation bugs could still mislabel values; the resolver remains the single authority | `integrations/mcp/tests/ownership.test.js`, `tests/integration-resources.test.js` |
90
+ | Audit UX authority confusion or disclosure | A presentation consumer treats a read model as lifecycle authority or receives raw commands, paths, environment values, credentials, or provider output | Versioned bounded `task/audit-view` resource | The projection is read-only, resolver-backed, sequence-bounded, sanitized, and explicitly marks every authority dimension false | Presentation consumers must still preserve the canonical command/API boundary | `tests/audit-ux.test.js`, `tests/integration-capabilities.test.js` |
89
91
  | MCP capability escalation via tool input | Tool input (e.g. `force: true`, `acknowledgeRecovery: true`) elevates a server started without the matching capability | Launch-level capability gates re-checked per invocation | Risk classification is invocation-level; disabled capabilities refuse with `E_MCP_CAPABILITY_DISABLED`; recovery acknowledgement never upgrades launch policy; legacy repair stays hidden by default; deprecated `operatorAuthorized` is absent from schemas | A separately authorized local actor can restart the server in full mode | `integrations/mcp/tests/policy.test.js`, `integrations/mcp/tests/safety.test.js` |
90
92
  | MCP HTTP unauthenticated remote bind | A network-bound MCP endpoint exposes ForgeLoop operations to any reachable client without authentication | Loopback-only bind policy | The HTTP transport refuses every non-loopback bind with `E_MCP_REMOTE_NOT_SUPPORTED`; Host/Origin validation is defense against DNS rebinding, not authentication; remote access stays disabled until a separately designed authenticated boundary exists | A same-host process can still reach the loopback endpoint | `integrations/mcp/tests/http.test.js` |
91
93
  | MCP protocol downgrade / legacy fallback | Legacy-era traffic is silently served, weakening the declared 2026 security posture | Strict modern mode | The HTTP handler is constructed with the SDK strict-modern setting (`legacy: "reject"`); legacy handshakes are answered with an unsupported-protocol-version rejection instead of being served | Stdio remains available for clients that only speak older protocol generations | `integrations/mcp/tests/http.test.js` |
@@ -160,6 +162,13 @@ treated as trusted protocol input.
160
162
  | Provider identity substitution | Registry key and resolved provider `id` must match the declared identity | A host that controls the runtime registry can replace its own provider before the call | `tests/advisory-context-runtime.test.js` |
161
163
  | Unbounded provider retrieval | Query, item, total-output, raw-result, and timeout budgets are normalized and enforced before/while provider execution | The host controls provider resource usage outside the bounded call | `tests/advisory-context-service.test.js`, `tests/advisory-context-provider.test.js` |
162
164
  | Historical command replay from advisory text | Advisory output cannot satisfy command input, evidence, state, or next-action authority; recall is never automatic | A receiving host must still avoid copying untrusted text into its own command runner | `tests/advisory-context-security.test.js` |
165
+ | OpenSrc executable substitution or version drift | Absolute host-selected path with exact lazy `--version` qualification on every recall; no PATH discovery | A host that swaps the binary and version together defeats qualification by definition | `tests/opensrc-advisory-provider.test.js` |
166
+ | Malicious OpenSrc stdout path or cache escape | Exactly-one-line absolute-path rule, realpath canonicalization, cache containment, directory check, and symlink-escape rejection | A host-controlled cache root outside the project is assumed | `tests/opensrc-advisory-provider.test.js` |
167
+ | Prompt injection in fetched source | Inert bounded snippet text under `NON_EXECUTABLE` advisory trust; never executed or converted to authority | A host may still display advisory text outside ForgeLoop | `tests/opensrc-advisory-provider.test.js` |
168
+ | Credential or path leakage in errors and results | No raw stderr, environment, absolute cache path, or credentialed URL in public errors, items, sourceRefs, or transport metadata | Unknown encodings outside scanned fields remain host responsibility | `tests/opensrc-advisory-provider.test.js` |
169
+ | Unbounded source tree or binary ingestion | Sorted traversal, generated directories skipped at any depth, symlink discipline, per-source entry ceiling (5,000, counting skipped entries), per-source read cap, one shared 8 MiB recall read budget, shared recall deadline, and binary skip enforced before further reads | The host controls cache size outside the bounded recall | `tests/opensrc-search.test.js` |
170
+ | OpenSrc network and cache side effects | Explicit host-owned `OPENSRC_HOME`, documented fetch-on-miss, protocol-state side-effect-free recall | Registry access and cache writes are upstream OpenSrc behavior | `docs/OPENSRC_ADAPTER.md` |
171
+ | OpenSrc timeout or output overflow | Shared recall deadline, 64 KiB process ceilings, and SIGTERM/SIGKILL escalation | A hung child holds OS resources until the grace timers fire | `tests/opensrc-process.test.js` |
163
172
  | Handoff acceptance replay | Acceptance is keyed by the immutable handoff and consumer identity and is checked against the append-only ledger | External systems may still deliver duplicate messages; callers must surface the canonical rejection | `tests/handoff-acceptance.test.js` |
164
173
  | Handoff double-consumption race | Serialized ledger append and exactly-once acceptance projection permit one consumer; same-consumer retry is idempotent | Filesystem privilege outside ForgeLoop can still corrupt local artifacts | `tests/handoff-acceptance.test.js`, `tests/concurrent-ledger.test.js` |
165
174
  | Stale Git checkout acceptance | Acceptance compares the handoff snapshot with the current branch and HEAD, work-state, contract, route, and changed paths | A separately privileged process can change the checkout immediately after validation | `tests/handoff-acceptance.test.js` |
@@ -169,6 +178,90 @@ treated as trusted protocol input.
169
178
  ForgeLoop does not make advisory text trusted. It makes the boundary explicit,
170
179
  bounded, and fail-closed where protocol-owned interpretation is required.
171
180
 
181
+ ## Provider extension boundary
182
+
183
+ Provider output is untrusted input and the generic provider registry is an
184
+ internal experimental surface. The public `providerExtensions` capability does
185
+ not grant lifecycle, completion, evidence, or installation authority.
186
+
187
+ | Threat | Mitigation |
188
+ | --- | --- |
189
+ | Malicious provider output | Strict JSON snapshot |
190
+ | Mutable result after validation | Detached deep-frozen copy |
191
+ | Getter/accessor execution | Reject accessors |
192
+ | Proxy behavior | Reject proxies |
193
+ | Custom object semantics | Plain JSON boundary |
194
+ | Authority escalation | Reserved authority validation |
195
+ | Error spoofing | Normalize provider exceptions |
196
+ | Hanging factory | Shared deadline |
197
+ | Hanging operation | Shared deadline |
198
+ | Resource leak after timeout | Cooperative abort cleanup |
199
+ | Payload amplification | Byte, depth, and node budgets |
200
+ | Auto-install surprise | No installation authority |
201
+ | Public API confusion | No `./providers` export |
202
+ | False completion | Completion authority false |
203
+ | False evidence | ForgeLoop validation required |
204
+
205
+ ## Security Review provider boundary
206
+
207
+ Security Review is an optional host-injected observation surface. It does not
208
+ install or discover scanners, execute provider text, persist task state, or
209
+ grant lifecycle, evidence, completion, claim, ownership, command, or
210
+ transaction authority. Requests and results are bounded strict snapshots and
211
+ the factory/review pair shares one deadline and cooperative cancellation.
212
+
213
+ | Threat | Mitigation |
214
+ | --- | --- |
215
+ | Malicious finding or fake completion claim | Reserved authority fields are rejected and trust metadata is stamped as observation-only, non-evidence, and non-executable. |
216
+ | Oversized or mutable request/result | Relative-path, string, finding, diagnostic, byte, depth, node, and result-size limits plus detached deep-frozen snapshots fail closed. |
217
+ | Provider hang or late completion | One shared deadline and `AbortSignal` cover lazy factory and review; late results cannot become observations. |
218
+ | Scanner auto-install or ambient execution | Registration is explicit and lazy; ForgeLoop does not discover `PATH`, install tools, invoke shells, or own provider credentials. |
219
+ | Sensitive output or path escape | Findings require bounded project-relative paths and reject secret-like content and absolute/file URLs. |
220
+
221
+ ## Browser verification boundary
222
+
223
+ Browser verification is host-injected and explicit. It is not a browser
224
+ sandbox, lifecycle adapter, or completion bridge.
225
+
226
+ | Threat | Mitigation |
227
+ | --- | --- |
228
+ | Malicious provider or fake PASS/COMPLETE | Provider results cross a strict allowlist and authority-field rejection boundary; ForgeLoop derives status and stamps observation-only trust. |
229
+ | Factory or verify hang | One ForgeLoop-owned deadline covers factory resolution, validation, verify, and normalization; expiry aborts the shared signal and applies bounded cleanup. |
230
+ | Redirect escape or origin confusion | HTTP(S)-only, credential-free `finalUrl` and every reported navigation are checked against exact normalized allowed origins. |
231
+ | Cookie, token, authorization, signed URL, or path leakage | Public provider failures are generic; portable observation fields and artifact refs reject sensitive patterns and absolute/file URLs. |
232
+ | Prompt injection or malicious snapshots | Snapshot and diagnostic text is bounded portable observation only and has no executable or lifecycle semantics. |
233
+ | Screenshot metadata abuse | Artifacts are bounded structured metadata with positive byte length, canonical SHA-256, portable refs, and no raw bytes. |
234
+ | Oversized DOM or output | Bounded steps, assertions, snapshots, diagnostics, artifacts, URLs, and result size limits fail closed. |
235
+ | Arbitrary JavaScript, file/data URLs, upload/download, or credentials | Strict request allowlists reject unsupported fields and non-HTTP(S)/credential-bearing URLs. |
236
+ | Provider session reuse or browser network access | Providers own session cleanup and network behavior; ForgeLoop makes no sandbox claim and does not install or discover browsers. |
237
+
238
+ The optional Agent Browser adapter adds a concrete process boundary without
239
+ changing those claims:
240
+
241
+ | Threat | Mitigation | Residual limitation | Test evidence |
242
+ | --- | --- | --- | --- |
243
+ | Executable substitution or shell injection | Absolute regular executable, `shell:false`, argv arrays, lazy exact-version check, and no PATH discovery | A privileged host can replace its executable between checks | `tests/agent-browser-process.test.js`, `tests/agent-browser-provider.test.js` |
244
+ | Session/profile or ambient credential reuse | Fresh random session, adapter-owned cwd, filtered profile/restore/state/CDP/auto-connect/plugin/auth variables, and close in `finally` | Host-level browser state outside the adapter remains host responsibility | `tests/agent-browser-provider.test.js` |
245
+ | Origin escape or malicious redirect | ForgeLoop exact-origin validation plus Agent Browser hostname allowlist | Host/browser networking is not a general sandbox | `tests/agent-browser-provider.test.js` |
246
+ | Screenshot or process-output leakage | Temporary screenshot bytes, portable digest refs, bounded stdout/stderr, and generic errors | Host process and filesystem policy remain outside ForgeLoop | `tests/agent-browser-process.test.js`, core normalization tests |
247
+ | Incomplete or spoofed command observations | Strict `{success:true,data}` envelopes, typed scalar observations, derived assertion status, and observation-only normalization | A real browser remains an external host capability | `tests/agent-browser-process.test.js`, `tests/agent-browser-provider.test.js` |
248
+ | Temporary workspace overlap | Adapter-owned cwd and rejection of a configured temp root inside the verification target | Symlink and host filesystem policy remain host responsibilities | `tests/agent-browser-provider.test.js` |
249
+
250
+ ## Emulated Services provider boundary
251
+
252
+ The optional Emulated Services adapter is a host-owned observation boundary for
253
+ `vercel-labs/emulate` `0.11.2`. It is explicit and lazy: ForgeLoop neither
254
+ installs nor discovers the executable and never grants the provider lifecycle,
255
+ evidence, installation, or completion authority.
256
+
257
+ | Threat | Mitigation | Residual limitation | Test evidence |
258
+ | --- | --- | --- | --- |
259
+ | Executable substitution or shell injection | Absolute regular executable, exact version qualification, argv-only spawn with `shell:false`, and no PATH discovery | A privileged host can replace its executable between checks | `tests/emulated-services.test.js` |
260
+ | Ambient credential or secret leakage | Minimal environment allowlist, no raw stdout/stderr in public results, and no provider-controlled environment fields | Host process policy remains host responsibility | `tests/emulated-services.test.js` |
261
+ | State overlap or project mutation | Random adapter-owned temporary cwd, target-root separation, and forced recursive cleanup | Host filesystem policy and symlink races remain host responsibilities | `tests/emulated-services.test.js` |
262
+ | Unbounded child, output, or readiness | Bounded timeout, cancellation, stdout/stderr ceilings, readiness polling, SIGTERM/SIGKILL escalation, and fail-closed cleanup | A hostile child may consume resources until the OS releases it | `tests/emulated-services.test.js` |
263
+ | Remote endpoint or authority confusion | Adapter constructs and validates loopback-only HTTP endpoints and returns detached observation-only results | The host controls the local service implementation | `tests/emulated-services.test.js` |
264
+
172
265
  ## Structural-quality provider boundary
173
266
 
174
267
  Structural-quality observations are untrusted external data. The built-in
@@ -193,6 +286,30 @@ context.
193
286
  ForgeLoop never changes Sentrux analytics preferences, installs the provider,
194
287
  or treats Sentrux Free diagnostics as necessary for score correctness.
195
288
 
289
+ ## Semantic decision safety floor
290
+
291
+ Jev (the pinned TypeSafe `jev-1.13.0` model) is a non-authoritative semantic
292
+ plane: it may rank or exclude only deterministically eligible, non-mandatory
293
+ route guides, and it may raise but never lower the execution-profile safety
294
+ floor. Mandatory safety protection is derived from canonical deterministic route
295
+ reasons (`MANDATORY_SAFETY_REASONS` in `src/core/router.js`: auth surface plus
296
+ the untrusted-input, personal-data, secrets, external-service, and publication
297
+ trust-boundary risks), so a high-confidence semantic exclusion can never remove
298
+ the `security` guide the router selected for a trust boundary; retained
299
+ mandatory guides carry an explicit `MANDATORY_SAFETY_GUIDE` reason and
300
+ low-confidence exclusions are retained as `JEV_LOW_CONFIDENCE_RETAINED`.
301
+ Semantic decisions consume only sanitized bounded state, and credential material
302
+ is excluded from state, artifacts, diagnostics, and logs. A semantic decision
303
+ that cannot be obtained fails closed rather than silently weakening routing.
304
+
305
+ | Threat | Mitigation |
306
+ | --- | --- |
307
+ | High-confidence Jev exclusion removes a deterministic mandatory safety guide | Protection derives from the router's own canonical safety reason set; `external-service` and other trust-boundary reasons retain `security` with `MANDATORY_SAFETY_GUIDE` |
308
+ | Semantic plane drifts from deterministic eligibility | Jev operates only on deterministically eligible guides; it never creates eligibility, lowers the profile floor, or bypasses fail-closed cutover |
309
+
310
+ `tests/execution-profile.test.js`, `tests/jev-decision-enforcement.test.js`,
311
+ `tests/decision-cutover.test.js`.
312
+
196
313
  ## Boundary rules
197
314
 
198
315
  - Safe paths are checked before reading or writing; no protocol field is a
@@ -215,4 +332,26 @@ point at misleading files, claim verification/publication occurred, encode
215
332
  secret material, attempt path traversal, or imply authority. Mitigations are a
216
333
  bounded strict schema, secret-free writes, relative safe paths, task/contract/
217
334
  work-state fingerprint binding, current-checkout reconciliation, explicit
218
- non-evidence semantics, and complete separation from authority grants.
335
+ non-evidence semantics, optional absence handling, and complete separation from
336
+ authority grants. A missing continuity artifact is `NOT_APPLICABLE`; a present
337
+ but malformed artifact remains fail-closed and continuity never supplies
338
+ completion evidence.
339
+
340
+ ## Bootstrap Gate And Contract Provenance
341
+
342
+ Built-in contract preset references are limited to the canonical
343
+ `contract-preset:documentation`, `contract-preset:bug`, `contract-preset:feature`,
344
+ and `contract-preset:release` namespace. Unknown values in that namespace are
345
+ rejected, while mixed contracts still require external source-registry entries.
346
+
347
+ The `gate-record` command accepts only route- or policy-required gates before
348
+ execution. ForgeLoop computes referenced artifact hashes and rejects absolute,
349
+ traversal, missing, directory, and symlink-escaping paths. Gate decisions are
350
+ caller-recorded observations and cannot claim host attestation or ForgeLoop
351
+ execution provenance.
352
+
353
+ The same boundary prevents fake caller digests, stale artifact approval,
354
+ post-execution gate rewrites, and task substitution: digests are computed from
355
+ bytes, preflight revalidates them, mutation freezes at execution, and persisted
356
+ gate task IDs are checked against the active contract. Unknown preset names are
357
+ rejected rather than becoming a spoofable built-in source namespace.