@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
package/GUIDE_ROUTER.md CHANGED
@@ -53,6 +53,17 @@ project commands.
53
53
  | `games` | [Web games](./ENG/games-code-design-web-eng.md) | Architecture and operation of 2D, 3D, and procedural web games |
54
54
  | `documentation` | [Documentation quality](./ENG/documentation-quality-eng.md) | Accuracy, architecture, freshness, accessibility, and verifiable technical documentation |
55
55
  | `flutter` | [Flutter application engineering](./ENG/flutter-development-eng.md) | Architecture, implementation, testing, performance, accessibility, platform integration, and release of production Flutter applications |
56
+ | `dotnet` | [.NET and ASP.NET Core development engineering](./ENG/dotnet-aspnetcore-development-eng.md) | Architecture, implementation, testing, performance, security, data access, hosting, observability, and release of production .NET applications |
57
+ | `nodejs` | [Node.js backend development engineering](./ENG/nodejs-backend-development-eng.md) | Architecture, implementation, testing, security, performance, observability, and release of production Node.js services and workers |
58
+ | `c` | [C development engineering](./ENG/c-development-eng.md) | Memory-safe-by-contract C libraries, services, native interfaces, security, testing, and reproducible toolchains |
59
+ | `cpp` | [C++ development engineering](./ENG/cpp-development-eng.md) | Ownership, RAII, concurrency, ABI, native interoperability, testing, and reproducible C++ systems |
60
+ | `java` | [Java development engineering](./ENG/java-development-eng.md) | JVM services, libraries, workers, build compatibility, concurrency, security, testing, and release |
61
+ | `sql` | [SQL development engineering](./ENG/sql-development-eng.md) | Schemas, queries, migrations, transactions, database security, performance, and compatibility |
62
+ | `go` | [Go development engineering](./ENG/go-development-eng.md) | Modules, services, workers, concurrency, cancellation, security, testing, and release |
63
+ | `typescript` | [TypeScript development engineering](./ENG/typescript-development-eng.md) | Type-system/compiler contracts, runtime boundaries, module compatibility, testing, and release |
64
+ | `php` | [PHP development engineering](./ENG/php-development-eng.md) | Composer applications, web services, workers, runtime constraints, security, testing, and deployment |
65
+ | `swift` | [Swift development engineering](./ENG/swift-development-eng.md) | SwiftPM/Xcode applications, concurrency, platform boundaries, interoperability, testing, and release |
66
+ | `rust` | [Rust development engineering](./ENG/rust-development-eng.md) | Architecture, implementation, testing, security, performance, reproducibility, and release of production Rust applications, services, libraries, and workers |
56
67
 
57
68
  ## Domain rules
58
69
 
@@ -222,6 +233,271 @@ rg -n '^## |architecture|testing|performance|accessibility|platform|release|Flut
222
233
 
223
234
  **Expected evidence:** a confirmed affected Flutter project, a scoped route, platform-appropriate tests, measured performance or accessibility checks when relevant, and honest `NOT_VERIFIED` reporting for unavailable Flutter tooling.
224
235
 
236
+ ### `dotnet` — .NET and ASP.NET Core development engineering
237
+
238
+ **Activate when:** a confirmed project root has a structurally parsed SDK-style `*.csproj`, `*.fsproj`, or `*.vbproj` using one of the supported SDKs below, and the task scope intersects that root:
239
+
240
+ - `Microsoft.NET.Sdk`, `Microsoft.NET.Sdk.Web`, `Microsoft.NET.Sdk.Worker`,
241
+ `Microsoft.NET.Sdk.Razor`, or `Microsoft.NET.Sdk.BlazorWebAssembly`;
242
+ - `Aspire.AppHost.Sdk` or `MSTest.Sdk`;
243
+ - the equivalent `<Sdk Name="..." />` declaration in the project XML.
244
+
245
+ Web, Razor, or Blazor SDKs, or `FrameworkReference Include="Microsoft.AspNetCore.App"`, confirm ASP.NET Core context. A `Volo.Abp.*` package reference adds the ABP overlay while retaining the single `dotnet` guide ID.
246
+
247
+ **Do not activate merely because:** prose, Markdown, source snippets, a Dockerfile, a lockfile, an arbitrary directory name, a package cache, or an unrelated monorepo project mentions .NET, ASP.NET Core, or ABP. A malformed, oversized, non-SDK-style, or unsupported project file fails closed. Shared `Directory.Build.*`, `Directory.Packages.props`, `global.json`, and NuGet files apply only to descendant .NET projects in their directory scope; `.sln`/`.slnx` claims use exact solution membership.
248
+
249
+ **Usually combine with:** `clean` and `test`; add `security` for trust-boundary or dependency changes, `performance` for measured cost or critical paths, `documentation` for technical documentation, and the UI guides for Razor/Blazor or other user-facing changes.
250
+
251
+ The route command obtains this evidence from `src/core/project-detection.js`. It walks bounded, non-symlinked project manifests, parses direct XML SDK/target/reference structure without evaluating the full MSBuild graph, and matches task claims against project roots, shared configuration scope, or exact solution membership. ASP.NET Core and ABP are routing reasons on the specialist guide, not additional guide IDs.
252
+
253
+ Project discovery is fail-closed and bounded by default: at most 256 project
254
+ manifests, 64 solution files, 1 MiB per manifest, 256 supporting source files
255
+ with 512 KiB per source file, 4,096 visited directories, and 20,000 visited
256
+ entries. Symlinks and common generated/vendor directories are skipped. When a
257
+ budget is exhausted, the detector does not claim reliable project evidence.
258
+ These limits bound discovery work; they do not cap task ownership discovery.
259
+
260
+ The .NET routing reasons are `PROJECT_DOTNET_SDK_PROJECT`,
261
+ `PROJECT_DOTNET_BASELINE`, `PROJECT_ASPNETCORE_CONFIRMED`, and
262
+ `PROJECT_ABP_CONFIRMED`. The corresponding exclusions are
263
+ `NO_DOTNET_PROJECT_EVIDENCE`, `NO_DOTNET_SCOPE_MATCH`,
264
+ `NO_DOTNET_PRIMARY_EVIDENCE`, and `NO_DOTNET_EXECUTABLE_WORK`. The route
265
+ validator also requires `aspnetcore` and `abp` project-evidence overlays to be
266
+ accompanied by `dotnet`; it rejects standalone overlays rather than creating a
267
+ second specialist guide.
268
+
269
+ ```bash
270
+ rg -n '^## |architecture|dependency injection|middleware|endpoints|configuration|authentication|authorization|EF Core|testing|WebApplicationFactory|workers|Blazor|ABP|publish|troubleshooting' ENG/dotnet-aspnetcore-development-eng.md
271
+ ```
272
+
273
+ **Expected evidence:** a confirmed affected .NET project, a scoped route, compatible SDK/runtime decisions, focused and integration checks for changed boundaries, and honest `NOT_VERIFIED` reporting for unavailable .NET tooling or runtime environments.
274
+
275
+ ### `nodejs` — Node.js backend development engineering
276
+
277
+ **Activate when:** a confirmed project root has a valid `package.json` with an
278
+ allowlisted runtime backend dependency (`express`, `fastify`, `@nestjs/core`,
279
+ `koa`, or `@hapi/hapi`), a direct `node`/`node.exe` runtime script, or bounded
280
+ source evidence importing or re-exporting a Node server/network built-in such
281
+ as `node:http`, `node:https`, `node:http2`, `node:net`, `node:tls`, or `node:dgram`
282
+ from a plausible runtime application surface, and the task scope intersects
283
+ that root.
284
+
285
+ **Do not activate merely because:** a `package.json`, `engines.node`, `type`,
286
+ `packageManager`, lockfile, `.nvmrc`, `.node-version`, `@types/node`,
287
+ TypeScript, `tsx`, Dockerfile, CI setup, frontend dependency, Next-only
288
+ dependency, prose mention, or development-only framework dependency exists.
289
+ Malformed or oversized manifests fail closed. The detector never executes
290
+ scripts or source code, follows symlinks, installs packages, or accesses the
291
+ network.
292
+
293
+ **Usually combine with:** `clean` and `test`; add `security` for input,
294
+ authentication, authorization, dependency, secret, external-service, or
295
+ publication risks; add `performance` for measured latency, throughput,
296
+ memory, event-loop, queue, or database work; add `documentation` when the API,
297
+ configuration, or operational contract changes.
298
+
299
+ The route command obtains this evidence from
300
+ `src/core/project-detection.js`. It walks bounded, non-symlinked manifests and
301
+ source files, isolates nested project roots across Flutter, .NET, Node.js, and
302
+ Rust,
303
+ recognizes workspace-root and shared lockfile scope, and preserves
304
+ `projectEvidence.schemaVersion: 1`. Node source evidence ignores comments,
305
+ template text, `import type`/`export type`, inline type-only specifiers,
306
+ declaration files, tooling/configuration filenames, and non-runtime directories
307
+ such as tests, fixtures, examples, docs, build output, scripts, tools, codegen,
308
+ and package caches. A mixed declaration counts only when a runtime value
309
+ specifier is safely recognized; unsupported complex declarations fail closed.
310
+ Runtime re-exports with a value specifier are included because the specialist
311
+ covers Node.js server/runtime library surfaces as well as services and workers.
312
+ Node.js execution used only for build, test, or configuration tooling is not
313
+ sufficient backend/runtime evidence. Mixed Flutter/.NET/Node repositories
314
+ retain each confirmed framework; claims and shared files stop at the same
315
+ nested ownership boundaries. A claim that does not reach a confirmed Node
316
+ project produces `NO_NODEJS_SCOPE_MATCH` or leaves the specialist excluded.
317
+
318
+ ```bash
319
+ rg -n '^## |activation|runtime|architecture|Express|Fastify|NestJS|security|testing|performance|deployment|Definition of Done' ENG/nodejs-backend-development-eng.md
320
+ ```
321
+
322
+ **Expected evidence:** a confirmed affected Node project, a scoped route,
323
+ validated inputs and configuration, bounded trust and resource controls,
324
+ focused plus integration/adversarial checks, observable failure and shutdown
325
+ behavior, and honest `NOT_VERIFIED` reporting for unavailable Node tooling.
326
+
327
+ ### `c` — C development engineering
328
+
329
+ Activate for explicit C language declarations in CMake or Meson, a native
330
+ Bazel rule with owned .c source, or a direct claim to owned .c source. Headers,
331
+ Makefiles, compiler images, flags, generated trees, and prose are not enough.
332
+ C and C++ may compose at one root. Detection is bounded and static; it never
333
+ runs native build tools, compilers, linkers, generators, or tests. Repository
334
+ flags, compiler mode, ABI, C library, and platform contracts decide the
335
+ effective C standard; C23 is only the current published reference.
336
+
337
+ Expected evidence is a confirmed affected root, scoped ownership, explicit
338
+ memory/resource contracts, failure-path tests, and separately recorded
339
+ toolchain checks. See ENG/c-development-eng.md for the specialist contract.
340
+
341
+ ### `cpp` — C++ development engineering
342
+
343
+ Activate for explicit C++ language declarations in CMake or Meson, a native
344
+ Bazel rule with owned .cc, .cpp, .cxx, or .c++ source, or a direct claim to
345
+ owned C++ source. Headers remain ambiguous without explicit build context.
346
+ Makefiles, compiler versions, flags, generated trees, and vendored code do not
347
+ establish C++ identity. The detector never executes native build logic.
348
+
349
+ C++23 is the published baseline reference; compiler support for C++26 is not
350
+ permission to change the repository standard or ABI. See
351
+ ENG/cpp-development-eng.md for ownership, RAII, ABI, concurrency, and testing
352
+ guidance.
353
+
354
+ ### `java` — Java development engineering
355
+
356
+ Activate for owned Java source with structural Maven, Gradle, or Bazel
357
+ evidence, an unambiguous Java compiler/platform declaration, or a direct .java
358
+ claim. A POM, Gradle wrapper/settings, generic aggregator, JDK image, or
359
+ setup-java CI step alone is not an application; explicit recognized Java
360
+ plugins/rules are structural evidence, including `java-gradle-plugin`. Gradle
361
+ topology uses only unconditional top-level literal includes; conditional,
362
+ interpolated, or executable expressions remain unresolved. Unsafe XML
363
+ DTD/entity constructs fail closed; Maven, Gradle, Bazel, plugins, annotation
364
+ processors, tests, and Java code are never executed.
365
+
366
+ Keep source level, release/target, build JDK, runtime JDK, preview features,
367
+ framework minimums, and vendor distribution separate. Repository configuration
368
+ wins over current JDK availability. See ENG/java-development-eng.md.
369
+
370
+ ### `sql` — SQL development engineering
371
+
372
+ Activate as an overlay for a directly claimed meaningful SQL artifact or a
373
+ bounded statement in an owned db, database, migration, migrations, schema, or
374
+ sql directory. SQL composes with its host language specialist and dialect is
375
+ not a public framework value. Comments, strings, prose, drivers, connection
376
+ strings, empty files, generated/vendor content, and database images are not
377
+ evidence.
378
+
379
+ The detector masks lexical noise and never connects to a database, executes
380
+ queries, applies migrations, reads credentials, or introspects schemas. Single-
381
+ quoted string values are masked, while double-quoted, backtick-quoted, and
382
+ bracket-quoted identifiers are preserved as internal neutral identifier tokens
383
+ for structural matching. It recognizes bounded statement families only when
384
+ structural tokens are present, and common CTE shapes, without claiming full
385
+ dialect parsing; PostgreSQL JSON operators such as `#>` and `#>>` remain SQL
386
+ tokens, not comments. ISO/IEC
387
+ 9075:2023 is a portability reference; the actual engine and version govern
388
+ dialect behavior. See
389
+ ENG/sql-development-eng.md.
390
+
391
+ ### `go` — Go development engineering
392
+
393
+ Activate for a valid bounded go.mod module or a go.work connected to known
394
+ repository-local modules. A go.work without a usable module, .go source alone,
395
+ go.sum, vendor metadata, Docker image, or setup-go CI step is insufficient.
396
+ The go minimum-version and toolchain directives remain distinct. Detection
397
+ resolves only known manifests and never runs Go, downloads modules, evaluates
398
+ build tags, or executes generators. `ignore` directives in `go.mod` are
399
+ retained as module metadata (including single and block forms); they do not
400
+ change project identity, and `go.work` does not accept them. See
401
+ ENG/go-development-eng.md.
402
+
403
+ ### `typescript` — TypeScript development engineering
404
+
405
+ Activate for a valid bounded JSONC tsconfig.json. A custom tsconfig.*.json is
406
+ primary only when directly claimed or referenced by a confirmed config.
407
+ jsconfig.json, .ts snippets, declaration files, compiler dependencies, and CI
408
+ compiler setup are not TypeScript project identity. `extends` may be a string
409
+ or array; local shared configs route claims to their consuming configs and do
410
+ not become independent roots merely because they are named as bases. Local
411
+ references are checked only against discovered configs; the compiler and
412
+ config files are never executed.
413
+
414
+ TypeScript is runtime-neutral, so a co-located Node package may select both
415
+ typescript and nodejs. See ENG/typescript-development-eng.md.
416
+
417
+ ### `php` — PHP development engineering
418
+
419
+ Activate for a valid bounded composer.json with package/require/autoload
420
+ identity or a direct claim to executable PHP source. Composer lockfiles,
421
+ vendor, PHP version strings, Docker/CI setup, static HTML, and README examples
422
+ are not enough. Composer scripts/plugins, PHP, autoload generation, and
423
+ network resolution are never run. PHP extension roots may compose with C.
424
+ strict_types remains a per-file call-site rule. See ENG/php-development-eng.md.
425
+
426
+ ### `swift` — Swift development engineering
427
+
428
+ Activate for a valid Package.swift tools-version/PackageDescription/Package
429
+ structure with Swift target evidence, explicit Swift in CMake/Meson, bounded
430
+ Xcode Swift markers, or a direct .swift claim. A direct Package.swift claim
431
+ also selects Swift guidance for a native-only package manifest. Package.resolved,
432
+ vendor/generated source, Docker/CI setup, and package execution are not
433
+ evidence. Invalid Package.swift files contribute no SwiftPM-derived C/C++
434
+ composition. SwiftPM may compose Swift with C or C++ at one root. Swift
435
+ `mobile-ui` work remains executable Swift work. Swift 6.3 is the stable
436
+ reference snapshot; beta documentation is not an automatic target.
437
+ See ENG/swift-development-eng.md.
438
+
439
+ ### `rust` — Rust development engineering
440
+
441
+ **Activate when:** a confirmed project root has a bounded, structurally parsed
442
+ `Cargo.toml` with a valid `[package]` and/or `[workspace]` table, and the task
443
+ scope intersects that root. A package workspace and a virtual workspace are
444
+ both valid when the virtual workspace has at least one resolvable package
445
+ member; an empty or unresolved virtual workspace fails closed. A virtual
446
+ workspace contributes its confirmed package members as public project roots. A
447
+ package workspace may contain both tables, but `package.workspace` is mutually
448
+ exclusive with `[workspace]` and associates a package with another workspace.
449
+
450
+ **Do not activate merely because:** a `.rs` file, `Cargo.lock`,
451
+ `rust-toolchain`/`rust-toolchain.toml`, `.cargo/config.toml`, rustfmt or Clippy
452
+ configuration, a Tokio/Axum/Actix/other dependency name, a Dockerfile, CI
453
+ toolchain setup, or repository prose exists. `target/` and `vendor/` are
454
+ ignored. Build scripts, proc-macro crates, generated code, and native tooling
455
+ remain runtime/build context rather than a replacement for Cargo identity.
456
+
457
+ Cargo inheritance such as `package.edition.workspace = true` and
458
+ `package.rust-version.workspace = true` is accepted as package metadata;
459
+ `[workspace.package]` may enrich supporting signals. Workspace membership uses
460
+ only known discovered manifests and bounded `members`/`exclude` patterns: `*`
461
+ and `?` stay within one path segment, `**` may cross segments, and absolute or
462
+ parent-directory escape paths are rejected. Local package `path` dependencies
463
+ and explicitly used inherited workspace dependencies can associate a known
464
+ package with a workspace, while `[workspace.dependencies]` declarations alone
465
+ do not create active dependency edges. A valid `package.workspace` association
466
+ may point to a known workspace outside the package's directory subtree, but not
467
+ outside the repository; no additional traversal is triggered.
468
+
469
+ **Usually combine with:** `clean` and `test`; add `security` for unsafe/FFI,
470
+ untrusted input, secrets, dependencies, external services, or publication;
471
+ add `performance` for measured CPU, memory, latency, allocation, executor,
472
+ queue, or I/O work; add `documentation` when public APIs, configuration, or
473
+ operational contracts change.
474
+
475
+ The route command obtains this evidence from
476
+ `src/core/project-detection.js` and the conservative TOML recognizer in
477
+ `src/core/rust-project.js`. It performs bounded, non-symlinked discovery and
478
+ manifest reads, never runs Cargo or source code, and treats `Cargo.toml` as
479
+ primary evidence while edition, MSRV, resolver, features, dependencies,
480
+ lockfiles, toolchains, and configuration are supporting signals. Explicit
481
+ workspace members/excludes, nested workspaces, and confirmed Flutter, .NET,
482
+ Node.js, and Rust roots constrain claims and shared-file ownership. `Cargo.lock`
483
+ and configuration files apply only to their owning package/workspace scope; a
484
+ parent cannot absorb a child's shared file merely because its path is a
485
+ descendant.
486
+
487
+ Rust has no Node-style LTS channel. Keep active toolchain, MSRV
488
+ (`package.rust-version`), edition, and compilation target separate, and use
489
+ version-matched official Rust and Cargo documentation. Current stable is a
490
+ dated observation, not a universal migration target.
491
+
492
+ ```bash
493
+ rg -n '^## |Cargo|toolchain|MSRV|edition|ownership|async|unsafe|FFI|security|testing|release|Definition of Done' ENG/rust-development-eng.md
494
+ ```
495
+
496
+ **Expected evidence:** a confirmed affected Cargo package or workspace, a
497
+ scoped route, compatible toolchain/MSRV/edition/target decisions, focused plus
498
+ workspace checks, explicit resource and trust controls, and honest
499
+ `NOT_VERIFIED` reporting for unavailable Rust targets or toolchains.
500
+
225
501
  ## Work-type matrix
226
502
 
227
503
  | Work | Primary guide | Common complements | Exclude when |
@@ -232,6 +508,16 @@ rg -n '^## |architecture|testing|performance|accessibility|platform|release|Flut
232
508
  | Backend, API, or data | `clean` | `test`, `security`; `performance` for a critical path | That layer does not exist |
233
509
  | Web, mobile, or desktop UI | `design` | `accessibility`, `clean`, `test`; risk defines the rest | Users cannot observe the change |
234
510
  | Flutter application | `flutter` | `clean`, `test`; add `design`, `accessibility`, `security`, or `performance` as applicable | No primary Flutter SDK dependency in the affected project scope |
511
+ | .NET / ASP.NET Core application | `dotnet` | `clean`, `test`; add `security`, `performance`, `documentation`, or UI guides as applicable | No supported SDK-style .NET project in the affected project scope |
512
+ | Node.js backend, API, worker, or server runtime | `nodejs` | `clean`, `test`; add `security`, `performance`, or `documentation` as applicable | No primary Node.js backend/runtime evidence in the affected project scope |
513
+ | Rust application, service, library, or worker | `rust` | `clean`, `test`; add `security`, `performance`, or `documentation` as applicable | No valid Cargo package/workspace in the affected project scope |
514
+ | C or C++ native project | `c`, `cpp` | `clean`, `test`; add `security`, `performance`, or `documentation` as applicable | No explicit/owned native implementation evidence |
515
+ | Java service, library, or worker | `java` | `clean`, `test`; add `security`, `performance`, or `documentation` as applicable | No structural Java build/source evidence |
516
+ | Go module, service, or worker | `go` | `clean`, `test`; add `security`, `performance`, or `documentation` as applicable | No valid discovered Go module/workspace |
517
+ | TypeScript project | `typescript` | `clean`, `test`; add `security`, `performance`, or `documentation` as applicable | No valid or referenced tsconfig project |
518
+ | PHP application, package, or worker | `php` | `clean`, `test`; add `security`, `performance`, or `documentation` as applicable | No Composer or scoped executable PHP evidence |
519
+ | Swift application, package, or service | `swift` | `clean`, `test`; add `security`, `performance`, or `documentation` as applicable | No SwiftPM/Xcode/build/source evidence |
520
+ | SQL schema, query, or migration | `sql` | `clean`, `test`, `security`; add `performance` for measured query/migration risk | No meaningful owned SQL artifact |
235
521
  | Complete website | `premium` | `design`, `accessibility`, `clean`, `test`, `security`, `performance` | The deliverable is not a complete site |
236
522
  | Web game | `games` | `clean`, `test`, `security`, `performance`, `accessibility`; `design` with UI | The product is not a game |
237
523
  | HTML video or motion | `design` | `accessibility`, `performance`, `test`, `security` | There is no audiovisual composition |
@@ -265,26 +551,61 @@ The first routing contract is versioned as `schemaVersion: 1`. It accepts:
265
551
  - optional boolean `behaviorChange` and `executableChange` signals.
266
552
  - optional `projectEvidence` with a schema version, a scope result, detected
267
553
  framework IDs, affected project roots, primary signals, and supporting
268
- signals. The current framework ID is `flutter`; its primary signal is an
269
- affected `dependencies.flutter.sdk: flutter` entry in `pubspec.yaml`.
554
+ signals. The current framework IDs are `flutter`, `dotnet`, `aspnetcore`,
555
+ `abp`, `nodejs`, `rust`, `c`, `cpp`, `java`, `sql`, `go`, `typescript`,
556
+ `php`, and `swift`. Flutter's primary signal is an affected
557
+ `dependencies.flutter.sdk: flutter` entry in `pubspec.yaml`. .NET's primary
558
+ signal is a supported SDK-style project manifest; ASP.NET Core and ABP are
559
+ structural overlays. Node.js primary signals are an allowlisted runtime
560
+ dependency, direct Node runtime script, or narrow server-builtin source
561
+ import in a valid `package.json` project. The C/C++, Java, Go, TypeScript,
562
+ PHP, and Swift specialists use bounded structural build/config or owned
563
+ source evidence; SQL is a bounded owned-file overlay. Rust's primary
564
+ signals are a valid structural `[package]` and/or `[workspace]` table in
565
+ `Cargo.toml`; Rust source, lockfiles, toolchain files, and dependencies
566
+ are supporting context.
270
567
 
271
568
  Rule precedence is deterministic: the work type establishes the primary
272
569
  closure; affected surfaces add mandatory complements; risks add security,
273
570
  performance, or accessibility; executable/behavior changes add clean and
274
571
  test; required rules win over optional exclusions; and the evaluator preserves
275
572
  canonical insertion order. A matching Flutter project adds `flutter` plus the
276
- `clean`/`test` baseline before ordinary work-type complements; documentation
277
- and UI-copy work do not activate the specialist. Unknown or duplicate signals
278
- fail with a routing error.
573
+ `clean`/`test` baseline before ordinary work-type complements; documentation
574
+ and UI-copy work do not activate the specialist. A matching .NET project adds
575
+ `dotnet` plus the `clean`/`test` baseline and records ASP.NET Core/ABP reasons
576
+ on that guide. A matching Node.js project adds `nodejs` plus the `clean`/`test`
577
+ baseline and records `PROJECT_NODEJS_CONFIRMED`; dependency, direct-script,
578
+ and server-runtime reasons are optional enrichments when the corresponding
579
+ primary signals are present. A matching Rust project adds `rust` plus the
580
+ `clean`/`test` baseline and records `PROJECT_RUST_CONFIRMED`; package and
581
+ workspace roles are optional reason enrichments. The public `frameworks` field remains the
582
+ authority for the confirmed framework; the router does not reverse-engineer
583
+ Node selection from private signal substrings. Unknown or duplicate signals
584
+ fail with a routing error.
279
585
 
280
586
  Every selected guide has stable reason codes such as
281
587
  `WORK_COMPLETE_WEBSITE`, `SURFACE_UI`, `RISK_UNTRUSTED_INPUT`, and
282
588
  `CHANGE_EXECUTABLE_CONFIG`. Exclusions use stable codes such as
283
589
  `NO_TRUST_BOUNDARY`, `NO_MEASURABLE_PERFORMANCE_RISK`, and
284
- `NO_DOCUMENTATION_SURFACE`. Flutter uses
285
- `PROJECT_FLUTTER_SDK_DEPENDENCY`, `PROJECT_FLUTTER_BASELINE`,
286
- `NO_FLUTTER_PRIMARY_EVIDENCE`, `NO_FLUTTER_SCOPE_MATCH`, and
287
- `NO_FLUTTER_EXECUTABLE_WORK`.
590
+ `NO_DOCUMENTATION_SURFACE`. Flutter uses
591
+ `PROJECT_FLUTTER_SDK_DEPENDENCY`, `PROJECT_FLUTTER_BASELINE`,
592
+ `NO_FLUTTER_PRIMARY_EVIDENCE`, `NO_FLUTTER_SCOPE_MATCH`, and
593
+ `NO_FLUTTER_EXECUTABLE_WORK`.
594
+ Node.js uses `PROJECT_NODEJS_CONFIRMED`,
595
+ `PROJECT_NODEJS_BACKEND_FRAMEWORK`,
596
+ `PROJECT_NODEJS_RUNTIME_SCRIPT`, `PROJECT_NODEJS_SERVER_RUNTIME`,
597
+ `PROJECT_NODEJS_BASELINE`, `NO_NODEJS_PRIMARY_EVIDENCE`,
598
+ `NO_NODEJS_SCOPE_MATCH`, and `NO_NODEJS_EXECUTABLE_WORK`. Rust uses
599
+ `PROJECT_RUST_CONFIRMED`, `PROJECT_RUST_CARGO_PACKAGE`,
600
+ `PROJECT_RUST_CARGO_WORKSPACE`, `PROJECT_RUST_BASELINE`,
601
+ `NO_RUST_PRIMARY_EVIDENCE`, `NO_RUST_SCOPE_MATCH`, and
602
+ `NO_RUST_EXECUTABLE_WORK`.
603
+
604
+ The .NET specialist uses `PROJECT_DOTNET_SDK_PROJECT` and
605
+ `PROJECT_DOTNET_BASELINE`; confirmed ASP.NET Core and ABP overlays add
606
+ `PROJECT_ASPNETCORE_CONFIRMED` and `PROJECT_ABP_CONFIRMED`. Exclusions are
607
+ `NO_DOTNET_PROJECT_EVIDENCE`, `NO_DOTNET_SCOPE_MATCH`,
608
+ `NO_DOTNET_PRIMARY_EVIDENCE`, and `NO_DOTNET_EXECUTABLE_WORK`.
288
609
 
289
610
  Platform signals are contextual, not automatic guide activators:
290
611
 
@@ -309,8 +630,63 @@ Negative routing guarantees:
309
630
  - a backend refactor does not activate `design` or `accessibility`;
310
631
  - static UI copy does not activate `security` without a trust-boundary signal;
311
632
  - a package file alone does not prove that Node is an affected task surface;
633
+ - a valid `package.json` without an allowlisted runtime dependency, direct Node
634
+ runtime script, or narrow server-builtin import from a plausible runtime
635
+ surface does not activate `nodejs`;
636
+ - React/Vite, Next-only, engines-only, `@types/node`-only, devDependency-only,
637
+ lockfile-only, Docker-only, and CI-only evidence does not activate `nodejs`;
638
+ - Node.js detection does not execute package scripts, import source, install
639
+ dependencies, follow symlinks, read unbounded files, or make network calls;
640
+ - comments, template text, `import type`/`export type`, inline type-only
641
+ specifiers, declaration files, tooling/configuration files, and
642
+ test/fixture/example/documentation/build/script/tool/codegen/cache directories
643
+ do not create Node.js runtime evidence;
644
+ - a `MATCH` or `UNSCOPED` public `projectEvidence` object whose frameworks
645
+ include `nodejs` selects the Node.js guide for executable work even when its
646
+ primary signal list is empty; signal details only enrich the reason list;
647
+ - a workspace root may scope confirmed Node descendants, but a frontend or
648
+ unrelated nested package remains isolated, and nested project boundaries are
649
+ applied consistently to Flutter, .NET, Node source scans, claims, and shared
650
+ files;
651
+ - documentation, UI-copy, and mobile-only work do not activate the Node.js
652
+ specialist even when the repository contains a confirmed Node package;
312
653
  - `flutter_test`, a Flutter word in documentation, or a lockfile package does
313
654
  not replace the primary Flutter SDK dependency signal;
655
+ - a .NET word in documentation, a `Dockerfile`, `project.assets.json`, a
656
+ package-lock file, or an arbitrary package name does not activate `dotnet`;
657
+ - a standalone `aspnetcore` or `abp` project-evidence overlay is invalid;
658
+ - a worker or library SDK selects the .NET specialist without claiming it is
659
+ an ASP.NET Core application; web/Razor/Blazor SDK or framework-reference
660
+ evidence is required for the ASP.NET Core reason;
661
+ - a malformed, oversized, unsupported, or non-SDK-style project manifest does
662
+ not provide primary .NET evidence;
663
+ - ABP guidance is not added for a plain ASP.NET Core project without a
664
+ structural `Volo.Abp.*` package reference;
665
+ - a shared MSBuild/NuGet file does not activate unrelated projects outside its
666
+ directory scope, and a solution claim does not activate non-members;
667
+ - a `.rs` file, `Cargo.lock`, Rust toolchain/configuration file, or Rust
668
+ dependency name does not replace a valid Cargo package/workspace manifest;
669
+ - a C/C++ header, Makefile, compiler image, or generic native build file does
670
+ not replace explicit language or owned implementation evidence;
671
+ - a Java POM/Gradle wrapper, Go source or go.sum, jsconfig, Composer lockfile,
672
+ Package.resolved, or generic build metadata alone does not establish the
673
+ corresponding specialist;
674
+ - SQL is selected only from a meaningful claimed or owned migration/schema
675
+ artifact and overlays the host project; comments, strings, and credentials
676
+ are never evidence;
677
+ - build/package/compiler tools are never executed during project detection,
678
+ and all eight language specialists preserve bounded reads, traversal, and
679
+ same-root composition;
680
+ - a virtual workspace root is not exposed as a public package root, excluded
681
+ workspace members remain out of an explicit workspace claim, and nested
682
+ Cargo workspaces remain ownership boundaries;
683
+ - Rust shared files (`Cargo.lock`, toolchain, `.cargo/config*`, rustfmt, and
684
+ Clippy configuration) apply only to their owning package/workspace scope;
685
+ - a `MATCH` or `UNSCOPED` public `projectEvidence` object whose frameworks
686
+ include `rust` selects the Rust guide for executable work even when its
687
+ primary signal list is empty; public framework identity is authoritative;
688
+ - documentation and UI-copy work do not activate the Rust specialist even
689
+ when the repository contains a confirmed Cargo project;
314
690
  - an unrelated monorepo project does not activate Flutter when task claims do
315
691
  not intersect its confirmed project root; nested project roots remain isolated;
316
692
  - an explicit executable-change signal adds `clean` and `test` even when the
@@ -365,6 +741,39 @@ the task claim reaches that project, and cover widget/state behavior, platform
365
741
  integration, accessibility, performance, and release checks according to the
366
742
  changed surface. Supporting signals alone must leave `flutter` excluded.
367
743
 
744
+ ### .NET / ASP.NET Core application feature
745
+
746
+ <!-- route:dotnet-app-feature=dotnet,clean,test -->
747
+
748
+ Verify the affected project uses a supported SDK-style .NET manifest, confirm
749
+ the claim scope or exact solution membership, and cover DI lifetimes, pipeline
750
+ ordering, endpoint contracts, validation, authorization, cancellation, data
751
+ access, observability, and integration behavior according to the changed
752
+ surface. A worker/library project remains on the same specialist guide but
753
+ does not receive an ASP.NET Core claim without structural web evidence.
754
+
755
+ ### Node.js backend feature
756
+
757
+ <!-- route:nodejs-backend-feature=nodejs,clean,test -->
758
+
759
+ Verify the affected package has primary Node.js evidence, confirm the claim
760
+ reaches the correct package root or workspace descendant, and cover runtime and
761
+ module-system compatibility, input/configuration validation, authentication and
762
+ authorization, middleware order, timeouts/cancellation, persistence and
763
+ external-service boundaries, observability, shutdown, and adversarial tests.
764
+ Supporting package metadata and lockfiles alone must leave `nodejs` excluded.
765
+
766
+ ### Rust application feature
767
+
768
+ <!-- route:rust-app-feature=rust,clean,test -->
769
+
770
+ Verify the affected `Cargo.toml` contains a valid `[package]` or `[workspace]`
771
+ table, confirm the claim reaches the correct package/workspace scope, and
772
+ cover toolchain/MSRV/edition/target compatibility, ownership and cancellation,
773
+ resource limits, unsafe/FFI/dependency boundaries, focused tests, and the
774
+ workspace checks required by the repository. Cargo metadata and Rust tooling
775
+ files alone must leave `rust` excluded.
776
+
368
777
  ## Route changes
369
778
 
370
779
  If investigation reveals a new surface, update the guide set before editing that area. Record only the concise reason; do not create a versioned task log.
@@ -541,6 +541,21 @@ forgeloop preflight
541
541
 
542
542
  `preflight` validates local ForgeLoop artifacts only. It does not invoke the model, run project commands, or treat a prose declaration as evidence. A `READY` result is required before `EXECUTING` in standard and strict workflows. A non-empty `current-contract.unresolvedDecisions[]` causes `forgeloop preflight` to return `BLOCKED` with `E_CONTRACT_UNRESOLVED_DECISION`; a valid `current-contract.assumptions[]` list does not block preparation.
543
543
 
544
+ Required gates are recorded only through `forgeloop gate-record`. The command
545
+ accepts only gates required by the active route or policy, computes artifact
546
+ hashes itself, rejects traversal and symlink escapes, and permits mutation only
547
+ in `ROUTED`, `DESIGNING`, or `PLANNED`. It rejects gate writes after execution
548
+ starts. A satisfied gate requires a meaningful decision and no unknowns.
549
+ Caller-provided evidence remains descriptive local input and cannot assert
550
+ `HOST_ATTESTED`, `FORGELOOP_EXECUTED`, or remote attestation.
551
+
552
+ Built-in contract preset references are limited to the canonical
553
+ `contract-preset:documentation`, `contract-preset:bug`,
554
+ `contract-preset:feature`, and `contract-preset:release` values. These values
555
+ do not require `.forgeloop/sources.json`; mixed contracts still validate every
556
+ non-built-in reference against the source registry, and unknown preset names
557
+ are rejected.
558
+
544
559
  ### Resumable activation and artifact reconciliation
545
560
 
546
561
  `PREFLIGHT_READY` is a durable checkpoint, not only a status value. A persisted
@@ -864,6 +879,15 @@ proportional phases, but:
864
879
  - `REVIEWING` cannot claim independent review when reviewer and implementer
865
880
  identities are equal.
866
881
 
882
+ Immediately after `task-create`, a task may have a valid descriptor and
883
+ hash-linked `TASK_RECEIVED`/transaction history without `work-state.json`.
884
+ ForgeLoop derives `RECEIVED` from that canonical early artifact set. `next`
885
+ returns `DISCOVER`, and `discover` appends the initial discovery milestone
886
+ without creating synthetic work state. `next` then returns `CREATE_CONTRACT`;
887
+ `contract-create` persists and validates the real contract and materializes the
888
+ first work-state checkpoint with its actual contract fingerprint. Invalid,
889
+ contradictory, or unexpected early history remains inconsistent.
890
+
867
891
  Resume rules are conservative: revalidate branch, HEAD, contract fingerprint,
868
892
  protocol version, and required artifacts before continuing; never rerun a
869
893
  completed destructive or publication action automatically; rerun cheap
@@ -989,8 +1013,10 @@ tooling, the agent must verify the capability boundary before using it:
989
1013
  3. Reuse an existing callable capability when it is sufficient for the task.
990
1014
  4. If the required capability is missing and a keyless Qwen path exists,
991
1015
  install only the smallest matching capability, normally
992
- `qwen-mm-plugins-core` for multimodal reading. Use the active harness's
993
- native installation mechanism or the official
1016
+ `qwen-mm-plugins-core` for multimodal reading, when the host or operator has
1017
+ explicitly granted task-scoped installation authority. Without that
1018
+ authority, keep the capability unavailable and report the limitation. Use
1019
+ the active harness's native installation mechanism or the official
994
1020
  [Qwen-MM-Plugins](https://github.com/QwenLM/Qwen-MM-Plugins) instructions.
995
1021
  5. If the operation is API-backed, check the required environment variable or
996
1022
  configured service endpoint before enabling it. Without that prerequisite,
@@ -183,7 +183,8 @@ Attestation Chain](./docs/CODE_ATTESTATION.md#completion-flow).
183
183
 
184
184
  ## Serializable interfaces
185
185
 
186
- The following JSON Schemas define the boundaries a host may implement:
186
+ The following core lifecycle JSON Schemas define boundaries a host may implement;
187
+ the complete current inventory is generated in `docs/ARTIFACT_REFERENCE.md`:
187
188
 
188
189
  - `schemas/routing-input.schema.json` and
189
190
  `schemas/routing-result.schema.json` define deterministic guide selection
@@ -203,6 +204,9 @@ The following JSON Schemas define the boundaries a host may implement:
203
204
  `schemas/config.schema.json`, `schemas/policy.schema.json`, and
204
205
  `schemas/task-bundle.schema.json` define chronology, mode, policy, and
205
206
  handoff boundaries.
207
+ - `schemas/semantic-decision.schema.json`, `schemas/context-plan.schema.json`,
208
+ and `schemas/test-utility.schema.json` define bounded semantic inputs and
209
+ test-intelligence projections without lifecycle or evidence authority.
206
210
 
207
211
  `src/core/conformance.js` validates relationships that individual schemas
208
212
  cannot express: route/state protocol versions, route/state guide sets,
@@ -224,10 +228,10 @@ tool objects, credentials, hidden prompts, or remote database references.
224
228
  ## Host responsibilities
225
229
 
226
230
  The compatible harness owns model execution, tool execution, scheduling,
227
- parallelism, lifecycle, isolation, and any remote services. It must pass
228
- validated inputs to the protocol, preserve file ownership, report unavailable
229
- capabilities, and never turn local success into an unverified publication
230
- claim.
231
+ parallelism, verification isolation, and any remote services. It must invoke
232
+ lifecycle transitions through ForgeLoop, pass validated inputs, preserve file
233
+ ownership, report unavailable capabilities, and never turn local success into an
234
+ unverified publication claim.
231
235
 
232
236
  ## No-runtime boundary
233
237