@cassiomc1/forgeloop 1.12.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/.github/copilot-instructions.md +1 -1
  2. package/AGENTS.md +1 -1
  3. package/AGENT_COMPATIBILITY.md +8 -0
  4. package/CLAUDE.md +1 -1
  5. package/CONTRIBUTING.md +90 -0
  6. package/DOCS_INDEX.md +46 -12
  7. package/ENG/c-development-eng.md +112 -0
  8. package/ENG/cpp-development-eng.md +109 -0
  9. package/ENG/dotnet-aspnetcore-development-eng.md +401 -0
  10. package/ENG/go-development-eng.md +103 -0
  11. package/ENG/java-development-eng.md +125 -0
  12. package/ENG/nodejs-backend-development-eng.md +605 -0
  13. package/ENG/php-development-eng.md +104 -0
  14. package/ENG/rust-development-eng.md +422 -0
  15. package/ENG/sec-code-eng.md +7 -7
  16. package/ENG/sql-development-eng.md +108 -0
  17. package/ENG/swift-development-eng.md +111 -0
  18. package/ENG/typescript-development-eng.md +108 -0
  19. package/EXECUTION_STATE.md +12 -0
  20. package/GUIDE_ROUTER.md +418 -9
  21. package/LOOP_ENGINEERING.md +28 -2
  22. package/ORCHESTRATOR_INTEGRATION.md +9 -5
  23. package/PROTOCOL_INTEGRATION.md +55 -2
  24. package/QUALITY_SCORECARD.md +1 -0
  25. package/README.md +78 -52
  26. package/TERMINOLOGY.md +2 -0
  27. package/THIRD_PARTY_NOTICES.md +19 -7
  28. package/THREAT_MODEL.md +140 -1
  29. package/completions/_forgeloop +22 -4
  30. package/completions/forgeloop.bash +40 -4
  31. package/completions/forgeloop.fish +130 -1
  32. package/docs/ADVISORY_CONTEXT.md +25 -0
  33. package/docs/AGENT_BROWSER_ADAPTER.md +81 -0
  34. package/docs/AGENT_BROWSER_VERIFICATION.md +6 -0
  35. package/docs/AGENT_PROTOCOL_SUMMARY.md +81 -3
  36. package/docs/AGENT_SKILL.md +66 -0
  37. package/docs/ARTIFACT_REFERENCE.md +123 -0
  38. package/docs/AUDIT_UX.md +46 -0
  39. package/docs/BROWSER_VERIFICATION.md +136 -0
  40. package/docs/CLI_REFERENCE.md +392 -10
  41. package/docs/CODE_ATTESTATION.md +2 -2
  42. package/docs/DOCUMENTATION_GUIDE.md +34 -12
  43. package/docs/GETTING_STARTED.md +59 -0
  44. package/docs/JEV_BENCHMARKS.md +31 -0
  45. package/docs/MODEL_ROUTING.md +37 -0
  46. package/docs/OPENSRC_ADAPTER.md +241 -0
  47. package/docs/PACKAGE_CONTENTS.md +60 -19
  48. package/docs/PROVIDERS.md +126 -0
  49. package/docs/PROVIDER_ARCHITECTURE.md +199 -0
  50. package/docs/RECIPES.md +32 -0
  51. package/docs/RELEASE_CHECKLIST.md +66 -5
  52. package/docs/SECURITY_REVIEW.md +71 -0
  53. package/docs/SEMANTIC_DECISION_PLANE.md +71 -0
  54. package/docs/TEST_INTELLIGENCE.md +29 -0
  55. package/docs/TEST_PRUNING.md +14 -0
  56. package/docs/TROUBLESHOOTING.md +298 -3
  57. package/docs/UNIVERSAL_INTEGRATION.md +31 -0
  58. package/docs/assets/diagrams/forgeloop-code-attestation-flow.html +2 -2
  59. package/docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json +5 -5
  60. package/docs/assets/diagrams/forgeloop-code-attestation-flow.svg +1 -1
  61. package/docs/assets/diagrams/forgeloop-engineering-flow.html +39 -26
  62. package/docs/assets/diagrams/forgeloop-engineering-flow.receipt.json +6 -6
  63. package/docs/assets/diagrams/forgeloop-engineering-flow.svg +26 -26
  64. package/docs/assets/diagrams/forgeloop-verification-trust-flow.html +2 -1
  65. package/docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json +5 -5
  66. package/docs/assets/diagrams/forgeloop-verification-trust-flow.svg +1 -1
  67. package/docs/diagrams/README.md +13 -9
  68. package/docs/diagrams/forgeloop-code-attestation-flow.workflow.json +1 -1
  69. package/docs/diagrams/forgeloop-engineering-flow.workflow.json +24 -19
  70. package/docs/diagrams/forgeloop-verification-trust-flow.workflow.json +1 -0
  71. package/docs/diagrams/reviews/forgeloop-code-attestation-flow.review.json +4 -4
  72. package/docs/diagrams/reviews/forgeloop-engineering-flow.review.json +4 -4
  73. package/docs/diagrams/reviews/forgeloop-verification-trust-flow.review.json +4 -4
  74. package/docs/documentation-manifest.json +1397 -0
  75. package/docs/protocol-requirements.json +101 -0
  76. package/package.json +46 -4
  77. package/schemas/config.schema.json +14 -0
  78. package/schemas/context-plan.schema.json +18 -0
  79. package/schemas/routing-input.schema.json +1 -1
  80. package/schemas/semantic-decision.schema.json +46 -0
  81. package/schemas/test-utility.schema.json +44 -0
  82. package/scripts/CI_VALIDATORS.md +84 -11
  83. package/scripts/benchmark-jev.mjs +5 -0
  84. package/scripts/benchmark-test-intelligence.mjs +4 -0
  85. package/scripts/generate-agent-protocol-summary.mjs +40 -1
  86. package/scripts/generate-forgeloop-skill.mjs +133 -0
  87. package/scripts/jev-smoke.mjs +19 -0
  88. package/skills/forgeloop/README.md +9 -0
  89. package/skills/forgeloop/SKILL.md +77 -0
  90. package/skills/forgeloop/references/lifecycle.md +9 -0
  91. package/skills/forgeloop/references/recovery.md +7 -0
  92. package/skills/forgeloop/references/verification.md +7 -0
  93. package/src/adapters/agent-browser/assertions.js +47 -0
  94. package/src/adapters/agent-browser/commands.js +54 -0
  95. package/src/adapters/agent-browser/index.js +3 -0
  96. package/src/adapters/agent-browser/locator.js +40 -0
  97. package/src/adapters/agent-browser/process.js +215 -0
  98. package/src/adapters/agent-browser/provider.js +313 -0
  99. package/src/adapters/emulated-services/constants.js +24 -0
  100. package/src/adapters/emulated-services/index.js +7 -0
  101. package/src/adapters/emulated-services/process.js +162 -0
  102. package/src/adapters/emulated-services/provider.js +282 -0
  103. package/src/adapters/opensrc/normalize.js +90 -0
  104. package/src/adapters/opensrc/process.js +248 -0
  105. package/src/adapters/opensrc/provider.js +338 -0
  106. package/src/adapters/opensrc/search.js +264 -0
  107. package/src/adapters/typesafe/client.js +28 -0
  108. package/src/adapters/typesafe/engine.js +63 -0
  109. package/src/adapters/typesafe/normalize.js +41 -0
  110. package/src/cli.js +108 -0
  111. package/src/commands/checkpoint-revalidate.js +176 -0
  112. package/src/commands/context-plan.js +38 -0
  113. package/src/commands/contract-create.js +264 -0
  114. package/src/commands/contract-revise.js +236 -0
  115. package/src/commands/decision-show.js +14 -0
  116. package/src/commands/decision-status.js +22 -0
  117. package/src/commands/discover.js +41 -0
  118. package/src/commands/doctor.js +15 -0
  119. package/src/commands/gate-record.js +205 -0
  120. package/src/commands/gate-revalidate.js +137 -0
  121. package/src/commands/model-route.js +32 -0
  122. package/src/commands/next.js +19 -7
  123. package/src/commands/route.js +146 -18
  124. package/src/commands/semantic-plan.js +17 -0
  125. package/src/commands/task-abandon.js +224 -0
  126. package/src/commands/task-create.js +84 -25
  127. package/src/commands/task-list.js +22 -2
  128. package/src/commands/task-migrate-contract-bootstrap-repair.js +288 -0
  129. package/src/commands/task-repair-contract-bootstrap.js +263 -0
  130. package/src/commands/test-inventory.js +5 -0
  131. package/src/commands/test-prune-plan.js +5 -0
  132. package/src/commands/test-prune-probe.js +5 -0
  133. package/src/commands/test-utility.js +5 -0
  134. package/src/commands/validate-protocol.js +10 -1
  135. package/src/config/guides.json +44 -0
  136. package/src/core/artifact-registry.js +24 -0
  137. package/src/core/audit-ux.js +514 -0
  138. package/src/core/browser-verification/constants.js +149 -0
  139. package/src/core/browser-verification/normalize.js +254 -0
  140. package/src/core/browser-verification/provider.js +519 -0
  141. package/src/core/browser-verification/service.js +115 -0
  142. package/src/core/build-script.js +151 -0
  143. package/src/core/c-cpp-project.js +143 -0
  144. package/src/core/checkpoint-revalidation.js +319 -0
  145. package/src/core/cli-command-definitions.js +249 -1
  146. package/src/core/command-executors.js +115 -3
  147. package/src/core/command-input.js +212 -102
  148. package/src/core/completion-artifacts.js +14 -5
  149. package/src/core/completion.js +4 -6
  150. package/src/core/config.js +3 -0
  151. package/src/core/context-compiler/budget.js +9 -0
  152. package/src/core/context-compiler/candidates.js +39 -0
  153. package/src/core/context-compiler/compiler.js +63 -0
  154. package/src/core/context-compiler/fingerprint.js +11 -0
  155. package/src/core/context-compiler/policy.js +13 -0
  156. package/src/core/context-compiler/result.js +23 -0
  157. package/src/core/contract-bootstrap-recovery.js +655 -0
  158. package/src/core/contract-presets.js +82 -0
  159. package/src/core/contract-revision.js +210 -0
  160. package/src/core/decision/artifact.js +69 -0
  161. package/src/core/decision/benchmarks.js +103 -0
  162. package/src/core/decision/cache.js +27 -0
  163. package/src/core/decision/constants.js +58 -0
  164. package/src/core/decision/cutover.js +34 -0
  165. package/src/core/decision/engine.js +22 -0
  166. package/src/core/decision/errors.js +68 -0
  167. package/src/core/decision/events.js +101 -0
  168. package/src/core/decision/freshness.js +19 -0
  169. package/src/core/decision/normalizers/index.js +115 -0
  170. package/src/core/decision/policy.js +18 -0
  171. package/src/core/decision/projection.js +16 -0
  172. package/src/core/decision/question-registry.js +201 -0
  173. package/src/core/decision/request.js +26 -0
  174. package/src/core/decision/resolver.js +130 -0
  175. package/src/core/decision/result.js +58 -0
  176. package/src/core/decision/service.js +156 -0
  177. package/src/core/decision/state-builder.js +65 -0
  178. package/src/core/decision/task-bindings.js +30 -0
  179. package/src/core/decision/test-provider.js +32 -0
  180. package/src/core/decision/thresholds.js +15 -0
  181. package/src/core/error-codes.js +281 -3
  182. package/src/core/events.js +226 -57
  183. package/src/core/evidence-readiness.js +9 -0
  184. package/src/core/execution-prerequisites.js +14 -0
  185. package/src/core/execution-profile.js +63 -38
  186. package/src/core/filesystem.js +1 -10
  187. package/src/core/gate-provenance.js +124 -0
  188. package/src/core/go-project.js +206 -0
  189. package/src/core/integration-invocation-policy.js +27 -4
  190. package/src/core/integration-resources.js +86 -61
  191. package/src/core/java-project.js +403 -0
  192. package/src/core/model-router/constants.js +10 -0
  193. package/src/core/model-router/policy.js +103 -0
  194. package/src/core/model-router/router.js +37 -0
  195. package/src/core/multi-language-project.js +117 -0
  196. package/src/core/next-action-model.js +58 -0
  197. package/src/core/next-action-phases.js +130 -42
  198. package/src/core/next-action-refresh.js +43 -9
  199. package/src/core/next-action-review-phase.js +7 -2
  200. package/src/core/next-action.js +35 -7
  201. package/src/core/next-explanation.js +63 -0
  202. package/src/core/phase.js +128 -10
  203. package/src/core/php-project.js +85 -0
  204. package/src/core/preflight-consistency.js +23 -9
  205. package/src/core/preflight-loaders.js +37 -5
  206. package/src/core/project-detection.js +1760 -52
  207. package/src/core/protocol-info.js +65 -0
  208. package/src/core/protocol.js +20 -0
  209. package/src/core/reconcile-closure.js +132 -53
  210. package/src/core/recovery-history.js +1 -0
  211. package/src/core/resumability.js +154 -44
  212. package/src/core/route-artifact.js +15 -1
  213. package/src/core/router.js +223 -4
  214. package/src/core/runtime-context.js +118 -61
  215. package/src/core/rust-project.js +400 -0
  216. package/src/core/schema-validation.js +3 -0
  217. package/src/core/security-review/constants.js +64 -0
  218. package/src/core/security-review/normalize.js +245 -0
  219. package/src/core/security-review/provider.js +204 -0
  220. package/src/core/security-review/service.js +134 -0
  221. package/src/core/semantic-planning/constants.js +19 -0
  222. package/src/core/semantic-planning/projection.js +94 -0
  223. package/src/core/semantic-planning/service.js +15 -0
  224. package/src/core/sources.js +37 -0
  225. package/src/core/sql-project.js +141 -0
  226. package/src/core/swift-project.js +200 -0
  227. package/src/core/task-claim-state.js +201 -1
  228. package/src/core/task-conflict-inspection.js +31 -5
  229. package/src/core/task-paths.js +13 -0
  230. package/src/core/task-recovery.js +1 -0
  231. package/src/core/templates.js +3 -0
  232. package/src/core/test-intelligence/benchmarks.js +68 -0
  233. package/src/core/test-intelligence/inventory.js +73 -0
  234. package/src/core/test-intelligence/prune.js +90 -0
  235. package/src/core/test-intelligence/semantic-state.js +15 -0
  236. package/src/core/test-intelligence/service.js +40 -0
  237. package/src/core/test-intelligence/utility.js +50 -0
  238. package/src/core/trace.js +11 -7
  239. package/src/core/transaction.js +1 -0
  240. package/src/core/typescript-project.js +349 -0
  241. package/src/core/xml-structure.js +123 -0
  242. package/src/integration.d.ts +492 -0
  243. package/src/integration.js +54 -0
  244. package/src/providers/README.md +47 -0
  245. package/src/providers/capabilities.js +46 -0
  246. package/src/providers/errors.js +15 -0
  247. package/src/providers/index.js +29 -0
  248. package/src/providers/json-snapshot.js +105 -0
  249. package/src/providers/registry.js +152 -0
@@ -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
 
@@ -79,7 +98,8 @@ generated Markdown regions (<!-- BEGIN FORGELOOP GENERATED: ... -->)
79
98
  ↓
80
99
  semantic conformance checks (scripts/validate_documentation_conformance.mjs)
81
100
  ↓
82
- cross-platform CI (.github/workflows/docs-quality.yml)
101
+ documentation validation (.github/workflows/docs.yml) and the PR aggregator
102
+ (.github/workflows/pr-core.yml)
83
103
  ```
84
104
 
85
105
  ### Provenance Mapping Table
@@ -194,7 +214,7 @@ migration, or security-sensitive require `npm run docs:check` before merge.
194
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`.
195
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/`.
196
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.
197
- 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.
198
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/`.
199
219
 
200
220
  ForgeLoop governs five documentation-diagram categories: workflow,
@@ -212,14 +232,16 @@ README hero assets are branding/conceptual architecture illustrations. They are
212
232
  not the canonical protocol diagram. The typed Archify workflow under
213
233
  `docs/diagrams/` remains the canonical lifecycle architecture source, with
214
234
  generated outputs under `docs/assets/diagrams/`; the CLI-only persistent search
215
- transport is explained by `docs/PERSISTENT_SEARCH_TRANSPORT.md`.
235
+ transport is explained by `docs/PERSISTENT_SEARCH_TRANSPORT.md`. The current
236
+ repository-only assets are `docs/assets/forgeloop-architecture.svg` and
237
+ `docs/assets/forgeloop-lifecycle-animated.svg`; neither is a package file.
216
238
 
217
239
  The README hero is intentionally GitHub-repository-only:
218
240
 
219
- - `README.md` may reference `docs/assets/eng_readme_forgeloop.png`; GitHub
220
- renders it from the repository.
221
- - The hero PNG is excluded from the npm package (`package.json` `files`), and
222
- `tests/package.test.js` asserts that exclusion so it cannot be silently
241
+ - `README.md` references `docs/assets/forgeloop-architecture.svg` for the hero
242
+ and `docs/assets/forgeloop-lifecycle-animated.svg` for the looping overview;
243
+ both are repository-only and excluded from the npm package.
244
+ - `tests/package.test.js` asserts those exclusions so they cannot be silently
223
245
  re-included.
224
246
  - The packaged README is therefore not self-contained for that relative hero
225
247
  path; do not claim otherwise.
@@ -49,11 +49,61 @@ forgeloop next --task task-contact-form-001 --compact --json
49
49
  forgeloop task-show --task task-contact-form-001 --compact --json
50
50
  ```
51
51
 
52
+ When the task shape is known but a full contract has not been written yet,
53
+ use a bounded preset preview. Preview is read-only and records unresolved
54
+ decisions instead of guessing project facts:
55
+
56
+ ```bash
57
+ forgeloop task-create --task task-contact-form-001 \
58
+ --claim src/components --claim tests \
59
+ --preset feature --preview --json
60
+ ```
61
+
62
+ After reviewing the proposed contract, repeat the command without
63
+ `--preview` to create the namespace and persist the same validated contract.
64
+ The supported presets are `documentation`, `bug`, `feature`, and `release`.
65
+ The release preset retains an independently verified publication requirement;
66
+ it does not publish or deploy anything.
67
+
68
+ For a bounded explanation of a blocked or recovery-sensitive next action, opt
69
+ in with `--explain`. The explanation is read-only and derived from canonical
70
+ reason codes and artifact references:
71
+
72
+ ```bash
73
+ forgeloop next --task task-contact-form-001 --explain --json
74
+ ```
75
+
52
76
  These commands do not bypass contracts, gates, verification, provenance,
53
77
  lifecycle phases, or validator-backed completion. Usage telemetry is optional,
54
78
  never estimated, and never verification evidence; `efficiency --task` compares
55
79
  only against a metadata-compatible local baseline.
56
80
 
81
+ ### Project-aware guide routing
82
+
83
+ ForgeLoop selects specialist context from bounded structural evidence in the
84
+ affected project scope. A parsed `pubspec.yaml` with
85
+ `dependencies.flutter.sdk: flutter` selects `flutter`. A parsed SDK-style
86
+ `*.csproj`, `*.fsproj`, or `*.vbproj` using the supported .NET SDK allowlist
87
+ selects the single `dotnet` guide. Web/Razor/Blazor or
88
+ `Microsoft.AspNetCore.App` evidence adds an ASP.NET Core routing reason, and a
89
+ `Volo.Abp.*` package reference adds an ABP routing reason; neither overlay is a
90
+ standalone guide ID, and each requires `dotnet` in project evidence.
91
+
92
+ Bounded structural inspectors also recognize Go modules/workspaces, valid
93
+ TypeScript configs, Composer/PHP projects, Java Maven/Gradle/Bazel roots,
94
+ SwiftPM/Xcode/native Swift roots, and explicit C/C++ build/source evidence.
95
+ Meaningful SQL migrations and schemas are scoped overlays. Build, compiler,
96
+ package-manager, database, lockfile, generated, and vendor artifacts are not
97
+ executed or promoted beyond their documented evidence contract.
98
+
99
+ Mentions in prose, source snippets, Dockerfiles, lockfiles, package names,
100
+ malformed manifests, and unrelated monorepo roots are insufficient. Mixed
101
+ Flutter/.NET roots stay isolated. Shared MSBuild/NuGet files apply only to
102
+ descendant confirmed .NET projects, and `.sln`/`.slnx` claims use exact
103
+ membership. Discovery skips symlinks and is bounded; see
104
+ [`GUIDE_ROUTER.md`](../GUIDE_ROUTER.md) for the exact allowlist, reason codes,
105
+ and numeric limits.
106
+
57
107
  ---
58
108
 
59
109
  ## 2. Prerequisites
@@ -395,8 +445,17 @@ forgeloop complete --task auth-feature --json
395
445
 
396
446
  # Inspect active tasks
397
447
  forgeloop task-list --json
448
+
449
+ # Filter and page the deterministic projection
450
+ forgeloop task-list --phase EXECUTING --limit 20 --offset 0 --json
451
+ forgeloop task-list --active --limit 20 --offset 20 --json
398
452
  ```
399
453
 
454
+ Task discovery is exhaustive for ownership and conflict correctness. The
455
+ `--phase` and `--active` options filter the presentation after validation;
456
+ `--limit` and `--offset` page the sorted result and JSON includes `total` and
457
+ `hasMore`. Listing is read-only and never removes ledger or recovery evidence.
458
+
400
459
  ---
401
460
 
402
461
  ## 6. What ForgeLoop Creates
@@ -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).
@@ -11,11 +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 no runtime dependencies and requires Node.js
15
- 20 or 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.
16
17
 
17
18
  ## Included files
18
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
+
19
35
  The published tarball includes the following consumer-facing groups:
20
36
 
21
37
  - **Runtime and protocol:** every maintained JavaScript module under `src/`,
@@ -28,10 +44,16 @@ The published tarball includes the following consumer-facing groups:
28
44
  `src/repository-index/tgrep-manifest.json`; native engine binaries are
29
45
  provisioned outside the npm tarball.
30
46
  - **Specialist guidance:** every registered consumer guide under `ENG/`,
31
- including `ENG/flutter-development-eng.md`, ships with the guide registry
32
- and is resolved from a package-local path. The Flutter specialist is
33
- selected only for an affected root with the structural SDK dependency
34
- signal; the package does not install or invoke Flutter tooling.
47
+ including `ENG/flutter-development-eng.md`,
48
+ `ENG/dotnet-aspnetcore-development-eng.md`,
49
+ `ENG/nodejs-backend-development-eng.md`,
50
+ `ENG/rust-development-eng.md`, and the C, C++, Java, SQL, Go, TypeScript,
51
+ PHP, and Swift specialists, ships with the guide registry and is resolved
52
+ from package-local paths. Specialists are selected only from their bounded
53
+ structural primary evidence; SQL remains a scoped host-project overlay.
54
+ ASP.NET Core and ABP are conditional routing overlays on the `dotnet` guide,
55
+ not additional package guides. The package does not install or invoke
56
+ framework, compiler, build, package-manager, or database tooling.
35
57
  - **Initialization material:** the root protocol and integration documents,
36
58
  legal notices, the target profile template, and every path listed by
37
59
  `src/core/templates.js`. These files are read by `init` and `update`, so
@@ -44,9 +66,19 @@ The published tarball includes the following consumer-facing groups:
44
66
  generated local repositories and measurements are not.
45
67
  - **User documentation:** the getting-started, integration, CLI, artifact,
46
68
  Repository Index, Persistent Search Transport, troubleshooting, release,
47
- package-boundary, and related reference pages.
48
- The advisory-context and Ripwire adapter guides ship with the corresponding
49
- public integration surface.
69
+ package-boundary, and related reference pages, together with the
70
+ machine-readable documentation and protocol indexes and `CONTRIBUTING.md`.
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.
50
82
  The typed diagram sources, generated HTML/SVG/receipt artifacts, and
51
83
  source-bound review records under `docs/diagrams/` are included together so
52
84
  the packaged documentation keeps its visual provenance.
@@ -59,6 +91,8 @@ The published tarball includes the following consumer-facing groups:
59
91
  The tarball intentionally omits repository-only material:
60
92
 
61
93
  - tests, conformance fixtures, coverage output, and secret-scanning helpers;
94
+ Harness-specific Agent Skill installation directories and Skill caches are
95
+ not packaged.
62
96
  - local `.forgeloop` state, task ledgers, locks, transactions, and execution
63
97
  receipts (the `.forgeloop/forgeloop.gitignore` template is the sole
64
98
  exception);
@@ -69,16 +103,21 @@ The tarball intentionally omits repository-only material:
69
103
  the consumer adapter surface;
70
104
  - historical release plans and retired MCP adapter sources; the MCP adapter
71
105
  is published as its own package;
72
- - the repository README hero PNG, which is a GitHub-only asset. The packaged
73
- README remains intentionally text-first around that relative repository
74
- image reference.
106
+ - the repository-only README hero assets
107
+ `docs/assets/forgeloop-architecture.svg` and
108
+ `docs/assets/forgeloop-lifecycle-animated.svg`. They are referenced by the
109
+ repository README and are intentionally outside the core tarball.
110
+ - the execution PoC, its audit, and its evidence package. Packaged README and
111
+ index links to this repository-only material use GitHub URLs so they remain
112
+ truthful for npm consumers.
75
113
 
76
- The package test checks both required paths and these exclusion classes. It
114
+ The package test checks all registered guide paths and these exclusion classes. It
77
115
  also enumerates `src/**/*.js` and fails if a maintained runtime module is
78
116
  missing from the candidate tarball or if a retired helper is reintroduced.
79
117
  The repository index remains a catalog: links from `DOCS_INDEX.md` to tests,
80
- proof-of-concept evidence, historical plans, and source trees may intentionally
81
- resolve only in the full repository and are not package dependencies.
118
+ historical plans, and source trees may intentionally resolve only in the full
119
+ repository and are not package dependencies. The canonical documentation and
120
+ protocol indexes are included in the tarball.
82
121
 
83
122
  ## Verification and publication
84
123
 
@@ -91,10 +130,12 @@ npm run pack:smoke
91
130
  ```
92
131
 
93
132
  `pack:smoke` installs the candidate tarball into a temporary consumer and
94
- exercises the CLI, public Integration API, initialization, schemas, and
95
- packaged documentation references. The package-boundary tests also assert
96
- that every registered guide path, including the Flutter specialist, is
97
- present in the candidate. The tag-triggered publication workflow
133
+ exercises the CLI, public Integration API, initialization, schemas, and the
134
+ Structural Quality documentation's packaged diagram references. The
135
+ package-boundary tests also assert
136
+ that every registered guide path, including all language specialists, is
137
+ present in the candidate. The tag-triggered publication
138
+ workflow
98
139
  runs the same smoke gate before `npm publish --provenance --access public`.
99
140
  Publication therefore remains owned by the trusted GitHub Actions OIDC
100
141
  workflow; local package inspection proves the candidate boundary but does not