@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
@@ -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,18 @@ 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.png`, the
237
+ alternate [architecture SVG](./assets/forgeloop-architecture.svg), and
238
+ `docs/assets/forgeloop-lifecycle-animated.svg`; none is a package file.
217
239
 
218
240
  The README hero is intentionally GitHub-repository-only:
219
241
 
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
242
+ - `README.md` references `docs/assets/forgeloop-architecture.png` for the hero
243
+ and `docs/assets/forgeloop-lifecycle-animated.svg` for the looping overview;
244
+ both are repository-only and excluded from the npm package. The architecture
245
+ SVG remains available as a repository-only alternate.
246
+ - `tests/package.test.js` asserts those exclusions so they cannot be silently
224
247
  re-included.
225
248
  - The packaged README is therefore not self-contained for that relative hero
226
249
  path; do not claim otherwise.
@@ -6,7 +6,7 @@ This guide walks through your first complete task with ForgeLoop from initializa
6
6
 
7
7
  ## 1. What is ForgeLoop?
8
8
 
9
- ForgeLoop is a portable, vendor-neutral engineering protocol for AI-assisted coding and automated workflows. It turns a task outcome into:
9
+ ForgeLoop is a vendor-neutral engineering protocol for AI-assisted coding and automated workflows. It turns a task outcome into:
10
10
 
11
11
  - **A structured contract** (`.forgeloop/task-state/<taskKey>/contract.json`);
12
12
  - **Deterministic guide routing** based on declared work type, surfaces, and risks;
@@ -108,7 +108,7 @@ and numeric limits.
108
108
 
109
109
  ## 2. Prerequisites
110
110
 
111
- - **Node.js**: version 20 or higher (`node -v`)
111
+ - **Node.js**: version 24.19.0 or higher (`node -v`), with built-in `node:sqlite`
112
112
  - **npm**: standard npm toolchain
113
113
 
114
114
  ---
@@ -281,7 +281,7 @@ forgeloop route \
281
281
  --json
282
282
  ```
283
283
 
284
- This writes `.forgeloop/task-state/<taskKey>/routing-result.json` referencing selected guides (e.g. `clean`, `test`, `security`, `design`, `accessibility`).
284
+ This records selected guides (e.g. `clean`, `test`, `security`, `design`, `accessibility`) in SQLite. `.forgeloop/task-state/<taskKey>/routing-result.json` is the logical artifact identity and explicit export path. Native mutations require a selected task; create one first or select an existing task.
285
285
 
286
286
  ---
287
287
 
@@ -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.
@@ -0,0 +1,241 @@
1
+ # OpenSrc Advisory Context Adapter
2
+
3
+ ## Status
4
+
5
+ Optional, host-injected, advisory-only. OpenSrc is an external
6
+ host-provisioned executable ([vercel-labs/opensrc](https://github.com/vercel-labs/opensrc),
7
+ Apache-2.0); ForgeLoop never installs, discovers, or invokes it automatically.
8
+
9
+ ## Purpose
10
+
11
+ Give a trusted host a bounded way to recall external package/repository
12
+ source-code snippets (npm, PyPI, crates.io, GitHub, GitLab, Bitbucket) as
13
+ ForgeLoop advisory context through the existing `advisoryContextProviders`
14
+ Integration API boundary.
15
+
16
+ ## Architecture
17
+
18
+ ```text
19
+ host / coding harness
20
+ ↓
21
+ createOpenSrcAdvisoryContextProvider(...)
22
+ ↓
23
+ createForgeLoopContext({ advisoryContextProviders: { opensrc } })
24
+ ↓
25
+ recallAdvisoryContext(...)
26
+ ↓
27
+ <absolute-opensrc> --version (qualified every recall)
28
+ ↓
29
+ <absolute-opensrc> path <source> --cwd <projectRoot> (one source per call)
30
+ ↓
31
+ canonical realpath containment inside OPENSRC_HOME
32
+ ↓
33
+ bounded deterministic Node.js search (ForgeLoop-owned)
34
+ ↓
35
+ normalized advisory items
36
+ ↓
37
+ NON_EVIDENCE_ADVISORY_CONTEXT
38
+ ```
39
+
40
+ OpenSrc owns source acquisition, version-aware resolution, and its own cache.
41
+ ForgeLoop owns snippet selection, normalization, and the advisory trust
42
+ boundary. No `rg`, `grep`, embeddings, or network search are used by ForgeLoop.
43
+
44
+ ## Prerequisites
45
+
46
+ - An OpenSrc executable provisioned by the host (ForgeLoop does not install it).
47
+ - A host-qualified exact expected version (for example `0.7.3`).
48
+ - A dedicated absolute cache root outside the project, passed as `OPENSRC_HOME`.
49
+ - An explicit allowlist of source specs (at most 8).
50
+
51
+ ## Host Configuration
52
+
53
+ ```javascript
54
+ import {
55
+ createForgeLoopContext,
56
+ createOpenSrcAdvisoryContextProvider,
57
+ recallAdvisoryContext,
58
+ } from "@cassiomc1/forgeloop/integration";
59
+
60
+ const opensrc = createOpenSrcAdvisoryContextProvider({
61
+ executablePath: "/absolute/path/to/opensrc",
62
+ expectedVersion: "<host-qualified-version>",
63
+ cacheRoot: "/absolute/path/to/opensrc-cache",
64
+ sources: ["zod", "vercel/next.js"],
65
+ });
66
+
67
+ const runtimeContext = createForgeLoopContext({
68
+ advisoryContextProviders: {
69
+ opensrc,
70
+ },
71
+ });
72
+
73
+ const context = await recallAdvisoryContext({
74
+ target: "/absolute/project",
75
+ taskId: "task-001",
76
+ providerName: "opensrc",
77
+ query: "parse error handling",
78
+ runtimeContext,
79
+ });
80
+ ```
81
+
82
+ Construction is inert: it validates configuration only and never spawns,
83
+ reads source, touches the network, populates the cache, or mutates ForgeLoop
84
+ state.
85
+
86
+ ## Executable Qualification
87
+
88
+ Before source resolution on every recall, the adapter runs
89
+ `<absolute-opensrc> --version` with `shell: false`, bounded output, and a
90
+ shared deadline, then requires `actualVersion === expectedVersion` exactly.
91
+ No semver ranges and no newer-version tolerance. Mismatch fails closed.
92
+
93
+ ## Source Allowlist
94
+
95
+ Only configured `sources` entries are resolved, one per `opensrc path`
96
+ invocation. Specs must be non-empty, bounded (256 chars), free of control or
97
+ whitespace characters, must not begin with `-`, and must not contain shell
98
+ metacharacters. Documented forms include bare npm names (with `@scope/` and
99
+ `@version` pins), `pypi:`, `crates:` (plus `pip:`, `python:`, `cargo:`,
100
+ `rust:` aliases), `owner/repo`, URLs, and `gitlab:` / `bitbucket:` specs.
101
+ Automatic dependency enumeration is out of scope.
102
+
103
+ ## Cache Behavior
104
+
105
+ `OPENSRC_HOME` is set to the configured `cacheRoot` for every OpenSrc child
106
+ process. The cache root and the project root must be fully disjoint: neither
107
+ may equal or contain the other, and the cache must not sit inside
108
+ `.forgeloop`. Each relationship is checked both lexically and canonically
109
+ (realpath), so symlinked prefixes cannot hide an overlap.
110
+ Each printed path must canonicalize inside the cache root, exist, be a
111
+ directory, and survive symlink-escape checks before any search runs.
112
+
113
+ ## Network Behavior
114
+
115
+ `opensrc path` may contact registries or remotes and shallow-clone source on
116
+ cache miss; later recalls may reuse the OpenSrc cache. This recall path is
117
+ protocol-state side-effect-free: ForgeLoop persists no advisory result,
118
+ writes no lifecycle state, and never auto-recalls. OpenSrc itself persists
119
+ cache data under `OPENSRC_HOME`; that is upstream behavior, not ForgeLoop
120
+ state.
121
+
122
+ ## Recall Example
123
+
124
+ See Host Configuration. Only `--version` and `path` are ever invoked; `fetch`,
125
+ `clean`, `remove`, and `rm` are never called by this adapter.
126
+
127
+ ## Result Shape
128
+
129
+ ```javascript
130
+ {
131
+ title: "zod — src/types.ts",
132
+ summary: "L120-L126 | <bounded single-line snippet>",
133
+ sourceRef: "opensrc:zod:src/types.ts#L120-L126"
134
+ }
135
+ ```
136
+
137
+ Summaries are flattened to one portable line because the core advisory
138
+ contract rejects control characters. Absolute cache paths, home directories,
139
+ stderr, environment, credentials, and cache metadata are never emitted. The
140
+ core service then applies `authority: ADVISORY`, `evidenceAuthority: NONE`,
141
+ `actionability: NON_EXECUTABLE`, `trustRole: NON_EVIDENCE_ADVISORY_CONTEXT`,
142
+ and `persisted: false`, plus item fingerprints and deep freezing.
143
+
144
+ ## Trust Boundary
145
+
146
+ Snippets are inert source text. They satisfy no verification requirement,
147
+ terminal requirement, gate, receipt, attestation, or run-check provenance.
148
+ Source content is never executed, even when it contains instruction-like
149
+ text. Provider output never advances phases, selects next actions, releases
150
+ claims, or authorizes durable actions.
151
+
152
+ ## Security
153
+
154
+ Threats and mitigations are tracked in `THREAT_MODEL.md` (OpenSrc rows):
155
+ binary substitution and version drift (exact lazy qualification), malicious
156
+ stdout paths and cache/symlink escapes (realpath containment), prompt
157
+ injection in source (inert bounded text, non-executable trust role),
158
+ credential leakage (no raw stderr/env/absolute-path emission), unbounded
159
+ trees and binary ingestion (sorted traversal, size/count/byte budgets, binary
160
+ skip), network/cache side effects (explicit host-owned `OPENSRC_HOME`,
161
+ documented fetch-on-miss), private-repository credentials (host-owned env,
162
+ never persisted or logged), timeouts and output overflow (shared deadline,
163
+ 64 KiB ceilings, SIGTERM/SIGKILL escalation).
164
+
165
+ ## Limits
166
+
167
+ - Sources: at most 8 configured; one `path` call each.
168
+ - Files read per source: 2,000; examined entries per source: 5,000
169
+ (skipped, oversized, and binary entries count toward traversal, never
170
+ bypass it).
171
+ - Per-file: 256 KiB; total reads: 8 MiB per advisory recall across all
172
+ configured sources through one shared budget.
173
+ - Matches per source: 32; snippet window: 7 lines.
174
+ - Process stdout/stderr: 64 KiB each; kill grace: 250 ms.
175
+ - One shared recall deadline spans version qualification, path resolution,
176
+ traversal, reads, matching, and normalization.
177
+ - Ranking: exact full-query match, then token overlap, then source order,
178
+ relative path, and line number. Repeated runs over unchanged fixtures are
179
+ byte-identical, including identical stopping points under budget pressure.
180
+
181
+ ## Private Repositories
182
+
183
+ Private sources work only through host-owned configuration (environment,
184
+ authenticated OpenSrc cache). ForgeLoop never discovers, persists, logs, or
185
+ returns credentials; errors never echo secret-bearing values.
186
+
187
+ ## Credentials Ownership
188
+
189
+ Credentials belong to the host. They travel only through host-supplied process
190
+ configuration, never through ForgeLoop artifacts, and never into advisory
191
+ output.
192
+
193
+ ## No Auto-Install
194
+
195
+ ForgeLoop never runs package installs, `npx`, `curl | sh`, or equivalents for
196
+ OpenSrc. An unavailable binary maps to the standard advisory-provider
197
+ unavailable semantics; the host provisions OpenSrc explicitly.
198
+
199
+ ## No PATH Discovery
200
+
201
+ The executable must be absolute. `which`, `where`, `command -v`, and PATH
202
+ resolution are never used.
203
+
204
+ ## No Evidence Authority
205
+
206
+ See Trust Boundary. Behavioral claims still require canonical ForgeLoop
207
+ verification with ForgeLoop-owned provenance.
208
+
209
+ ## No Lifecycle Authority
210
+
211
+ See Trust Boundary. Advisory recall is never triggered by `next`,
212
+ `preflight`, verification, `complete`, task creation, task discovery, or
213
+ Agent Skill loading.
214
+
215
+ ## Troubleshooting
216
+
217
+ | Symptom | Meaning | Action |
218
+ | --- | --- | --- |
219
+ | `E_ADVISORY_CONTEXT_PROVIDER_INVALID` on recall | Bad config, version mismatch, cache inside project, or malformed version output | Check absolute paths, exact version, `OPENSRC_HOME` placement |
220
+ | `E_ADVISORY_CONTEXT_PROVIDER_UNAVAILABLE` | Missing binary or spawn failure | Provision the host executable; ForgeLoop will not install it |
221
+ | `E_ADVISORY_CONTEXT_RESULT_INVALID` | Empty/multi-line/relative/outside-cache path, non-directory, or bad exit | Inspect host cache and source spec |
222
+ | `E_ADVISORY_CONTEXT_TIMEOUT` | Shared deadline expired | Retry with a larger recall `timeoutMs` within core ceilings |
223
+ | `E_ADVISORY_CONTEXT_OUTPUT_LIMIT` | 64 KiB process ceiling or item budget exceeded | Narrow sources or query |
224
+
225
+ ## Package Behavior
226
+
227
+ `src/adapters/opensrc/**`, this guide, and the integration declarations ship
228
+ in the core npm tarball. No OpenSrc binary, cache, fixture, credential, or
229
+ source snapshot ships. No new runtime dependency and no new package subpath
230
+ are added; `providerExtensions.publicRegistryApi` and
231
+ `providerExtensions.packageSubpathExported` remain false.
232
+
233
+ ## Compatibility
234
+
235
+ - Protocol v1, schema v1, Integration API v1 unchanged.
236
+ - `advisoryContextProviders` v1 and `providerExtensions` v1 unchanged; the
237
+ `ADVISORY_CONTEXT` provider kind covers this adapter.
238
+ - Requires Node.js 20+.
239
+ - Upstream behaviors referenced: `opensrc path <source> [--cwd]`,
240
+ `OPENSRC_HOME` override, fetch-on-miss, `opensrc 0.7.3` observed at
241
+ authoring time (never hardcoded into behavior).
@@ -1,6 +1,6 @@
1
1
  # Core npm package contents
2
2
 
3
- This page describes the intentional boundary of the published
3
+ This page describes the intentional boundary of the privately delivered
4
4
  `@cassiomc1/forgeloop` package. The [`files`](../package.json) list in
5
5
  `package.json` is the packaging source of truth, while the repository's
6
6
  `tests/package.test.js` and clean-room `scripts/package_smoke.mjs` checks keep
@@ -11,12 +11,27 @@ part of the consumer tarball.
11
11
 
12
12
  The package exposes the `forgeloop` executable from `src/cli.js` and the
13
13
  `@cassiomc1/forgeloop/integration` subpath from `src/integration.js`, with its
14
- declaration file. The package has the approved exact `smol-toml` runtime
15
- dependency for bounded Cargo manifest parsing and requires Node.js 20 or
16
- newer.
14
+ declaration file. The package has the approved exact `@typesafe-ai/sdk`
15
+ dependency for the pinned semantic decision plane and `smol-toml` for bounded
16
+ Cargo manifest parsing. It requires Node.js 20 or newer.
17
17
 
18
18
  ## Included files
19
19
 
20
+ The public package includes the Jev decision-plane documentation and bounded
21
+ diagnostic scripts:
22
+
23
+ - `docs/JEV_BENCHMARKS.md`
24
+ - `docs/MODEL_ROUTING.md`
25
+ - `docs/SEMANTIC_DECISION_PLANE.md`
26
+ - `docs/TEST_INTELLIGENCE.md`
27
+ - `docs/TEST_PRUNING.md`
28
+ - `scripts/jev-smoke.mjs`
29
+ - `scripts/benchmark-jev.mjs`
30
+ - `scripts/benchmark-test-intelligence.mjs`
31
+ - `schemas/context-plan.schema.json`
32
+ - `schemas/semantic-decision.schema.json`
33
+ - `schemas/test-utility.schema.json`
34
+
20
35
  The published tarball includes the following consumer-facing groups:
21
36
 
22
37
  - **Runtime and protocol:** every maintained JavaScript module under `src/`,
@@ -40,7 +55,7 @@ The published tarball includes the following consumer-facing groups:
40
55
  not additional package guides. The package does not install or invoke
41
56
  framework, compiler, build, package-manager, or database tooling.
42
57
  - **Initialization material:** the root protocol and integration documents,
43
- legal notices, the target profile template, and every path listed by
58
+ the PolyForm Noncommercial license, third-party notices, the target profile template, and every path listed by
44
59
  `src/core/templates.js`. These files are read by `init` and `update`, so
45
60
  they are part of the executable consumer contract even when a document is
46
61
  marked deprecated in the documentation manifest.
@@ -53,8 +68,17 @@ The published tarball includes the following consumer-facing groups:
53
68
  Repository Index, Persistent Search Transport, troubleshooting, release,
54
69
  package-boundary, and related reference pages, together with the
55
70
  machine-readable documentation and protocol indexes and `CONTRIBUTING.md`.
56
- The advisory-context and Ripwire adapter guides ship with the corresponding
57
- public integration surface.
71
+ The advisory-context, Ripwire, OpenSrc, Agent Browser, and Audit UX guides ship with
72
+ the corresponding public integration surface.
73
+ Provider architecture, provider reference, and Security Review provider
74
+ documentation are also packaged.
75
+ The generated portable ForgeLoop Agent Skill and `docs/AGENT_SKILL.md` are
76
+ packaged as instruction/documentation content, not runtime authority.
77
+ Provider implementation modules ship under `src/`, but packaged source file
78
+ does not mean a supported public import path; the generic `./providers`
79
+ subpath remains unexported.
80
+ The lifecycle recovery surface includes the explicit `task-abandon` command;
81
+ it releases validated claims without asserting completion or publication.
58
82
  The typed diagram sources, generated HTML/SVG/receipt artifacts, and
59
83
  source-bound review records under `docs/diagrams/` are included together so
60
84
  the packaged documentation keeps its visual provenance.
@@ -67,9 +91,11 @@ The published tarball includes the following consumer-facing groups:
67
91
  The tarball intentionally omits repository-only material:
68
92
 
69
93
  - tests, conformance fixtures, coverage output, and secret-scanning helpers;
94
+ Harness-specific Agent Skill installation directories and Skill caches are
95
+ not packaged.
70
96
  - local `.forgeloop` state, task ledgers, locks, transactions, and execution
71
- receipts (the `.forgeloop/forgeloop.gitignore` template is the sole
72
- exception);
97
+ receipts; the target `.forgeloop/.gitignore` is generated from an inline
98
+ runtime template and no `.forgeloop/*` files are packaged;
73
99
  - raw or aggregate benchmark results, package archives, and release train
74
100
  contracts;
75
101
  - the Ripwire retrieval benchmark runner, cases, and fixture corpus; those
@@ -77,9 +103,12 @@ The tarball intentionally omits repository-only material:
77
103
  the consumer adapter surface;
78
104
  - historical release plans and retired MCP adapter sources; the MCP adapter
79
105
  is published as its own package;
80
- - the repository README hero PNG, which is a GitHub-only asset. The packaged
81
- README remains intentionally text-first around that relative repository
82
- image reference.
106
+ - the repository-only README hero assets
107
+ `docs/assets/forgeloop-architecture.png`,
108
+ `docs/assets/forgeloop-architecture.svg`, and
109
+ `docs/assets/forgeloop-lifecycle-animated.svg`. The PNG and animated SVG are
110
+ referenced by the repository README; all three are intentionally outside
111
+ the core tarball.
83
112
  - the execution PoC, its audit, and its evidence package. Packaged README and
84
113
  index links to this repository-only material use GitHub URLs so they remain
85
114
  truthful for npm consumers.
@@ -107,9 +136,8 @@ exercises the CLI, public Integration API, initialization, schemas, and the
107
136
  Structural Quality documentation's packaged diagram references. The
108
137
  package-boundary tests also assert
109
138
  that every registered guide path, including all language specialists, is
110
- present in the candidate. The tag-triggered publication
111
- workflow
112
- runs the same smoke gate before `npm publish --provenance --access public`.
113
- Publication therefore remains owned by the trusted GitHub Actions OIDC
114
- workflow; local package inspection proves the candidate boundary but does not
115
- publish it.
139
+ present in the candidate. The manual, explicitly authorized publication workflow runs the same smoke
140
+ gate before `npm publish --provenance --access public`.
141
+ Publication therefore remains owned by the authorized manual GitHub Actions
142
+ workflow and uses public npm access for the core package; local package inspection proves the
143
+ candidate boundary but does not publish it.
@@ -0,0 +1,126 @@
1
+ # Provider Extension Reference
2
+
3
+ ## Status
4
+
5
+ `providerExtensions` v1 is provider-neutral and experimental. This reference
6
+ describes the architecture vocabulary and maintainer expectations. It does
7
+ not document a supported import from `@cassiomc1/forgeloop/providers`.
8
+
9
+ ## Capability Discovery
10
+
11
+ Run `node src/cli.js protocol-info --json` and inspect
12
+ `features.providerExtensions`. The advertised capability includes the version,
13
+ provider kinds, strict result boundary, cooperative cancellation, and explicit
14
+ authority restrictions.
15
+
16
+ ## Provider Kinds
17
+
18
+ - `ADVISORY_CONTEXT`: optional context, never executable or canonical.
19
+ - `VERIFICATION_EXECUTION`: bounded execution observations, never completion truth.
20
+ - `BROWSER_VERIFICATION`: browser observations with no canonical vendor.
21
+ - `SECURITY_REVIEW`: bounded security observations pending any future explicit gate.
22
+ - `PRESENTATION`: read-only rendering that cannot mutate protocol state.
23
+
24
+ The canonical list is exported internally as `PROVIDER_KINDS`; public metadata
25
+ is synchronized from that source and must not duplicate its strings.
26
+
27
+ Concrete `ADVISORY_CONTEXT` adapters (Ripwire, OpenSrc) plug into the
28
+ dedicated advisory-context Integration API (`createForgeLoopContext` with
29
+ `advisoryContextProviders`, plus `recallAdvisoryContext`); they are not part
30
+ of the generic internal provider registry described here.
31
+
32
+ Browser verification is registered only through the runtime context option
33
+ `browserVerificationProviders` and is invoked explicitly with
34
+ `runBrowserVerification`. Registration is lazy and inert: it does not launch a
35
+ browser, perform network I/O, or mutate protocol state. Its provider-neutral
36
+ input includes task/target/requirement binding, a shared abort signal, and the
37
+ remaining timeout. ForgeLoop validates redirects and derives overall status;
38
+ provider output is observation only and cannot satisfy evidence or completion.
39
+
40
+ The optional `agent-browser` adapter is registered through the same boundary
41
+ with `createAgentBrowserVerificationProvider({ executablePath, expectedVersion })`.
42
+ The executable is host-owned and absolute; no package dependency or automatic
43
+ installation is added. The adapter returns browser observations only.
44
+
45
+ The optional `vercel-labs/emulate` adapter is host-injected through
46
+ `createEmulatedServicesProvider({ executablePath, expectedVersion })`. The
47
+ host must provide an absolute regular executable and explicitly choose the
48
+ services and loopback port range. ForgeLoop does not install the tool, search
49
+ `PATH`, invoke a shell, persist service state in the target project, or treat
50
+ service output as lifecycle, evidence, installation, or completion authority.
51
+ The supported host tool is pinned to `0.11.2`; invocation is lazy and inert
52
+ until `provider.start(...)` is called. Each bounded operation verifies the
53
+ qualified version, starts with argv-only execution, observes loopback
54
+ readiness, returns a detached observation, and cleans up its temporary state
55
+ and child process.
56
+
57
+ Security review is registered through `securityReviewProviders` and invoked
58
+ explicitly with `runSecurityReview`. Registration is lazy and inert. The
59
+ request accepts bounded scope, relative paths, categories, requirements, and a
60
+ revision binding; factory resolution and review share one deadline and abort
61
+ signal. Results are strict immutable observations with bounded findings and
62
+ summary counts. They cannot establish evidence, lifecycle, completion,
63
+ ownership, claims, commands, installation, or transaction authority. See
64
+ [`SECURITY_REVIEW.md`](./SECURITY_REVIEW.md) for the complete contract.
65
+
66
+ ## Common Contract
67
+
68
+ Providers are identified by an ID and kind, may resolve lazily, and receive a
69
+ bounded invocation context. Results are detached, deeply frozen strict JSON
70
+ snapshots. A provider may return an observation, never lifecycle state,
71
+ completion truth, canonical evidence, executable instructions, or installation
72
+ authority.
73
+
74
+ ## Invocation Context
75
+
76
+ The context includes a shared `AbortSignal`, the provider ID, and the remaining
77
+ timeout budget. Factories and operations consume the same deadline. Providers
78
+ must observe abort and clean up owned resources.
79
+
80
+ ## Limits
81
+
82
+ Invocation uses one shared timeout budget. Input and output are bounded by byte,
83
+ depth, and node limits. Synchronous JavaScript cannot be preempted; resource
84
+ owners remain responsible for cooperative cleanup after abort.
85
+
86
+ ## Error Codes
87
+
88
+ Malformed providers, unavailable providers, timeouts, invalid snapshots,
89
+ payload limits, authority escalation, and execution failures use the internal
90
+ provider error vocabulary. Provider exceptions are normalized so a provider
91
+ cannot spoof a ForgeLoop error code.
92
+
93
+ ## Trust Rules
94
+
95
+ Treat provider output as untrusted input. Pass it through ForgeLoop-owned
96
+ validation before any evidence or consumer use. Do not execute provider text,
97
+ interpret it as a next action, or treat provider identity as a trust grant.
98
+
99
+ ## Maturity
100
+
101
+ The public capability vocabulary is versioned at v1 but remains experimental.
102
+ The generic registry implementation is internal and experimental. No provider
103
+ is auto-installed or discovered by the lifecycle, and no provider CLI exists.
104
+
105
+ ## Internal vs Public Surfaces
106
+
107
+ The public surfaces are the protocol-info capability and these documentation
108
+ pages. The JavaScript registry under `src/providers/` ships as implementation
109
+ source but is not a supported package subpath or public registration contract.
110
+
111
+ ## Future Adapter Structure
112
+
113
+ An adapter proposal must specify its provider kind, bounded input/output,
114
+ timeout and cancellation behavior, error mapping, authority restrictions,
115
+ ForgeLoop validation boundary, tests, and documentation owner. Dedicated
116
+ Integration API capabilities remain separate from this generic vocabulary.
117
+
118
+ ## Testing Checklist
119
+
120
+ - Capability metadata is synchronized with `PROVIDER_KINDS`.
121
+ - Every provider kind denies lifecycle, completion, and evidence authority.
122
+ - Strict JSON rejects accessors, proxies, custom objects, cycles, and oversized payloads.
123
+ - Shared timeout and cooperative cancellation are tested.
124
+ - Provider exceptions cannot spoof ForgeLoop error codes.
125
+ - `protocol-info --json` advertises v1 without claiming a public registry API.
126
+ - The package does not export `./providers`.