@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.
- package/.github/copilot-instructions.md +1 -1
- package/AGENTS.md +1 -1
- package/AGENT_COMPATIBILITY.md +8 -0
- package/CLAUDE.md +1 -1
- package/CONTRIBUTING.md +90 -0
- package/DOCS_INDEX.md +46 -12
- package/ENG/c-development-eng.md +112 -0
- package/ENG/cpp-development-eng.md +109 -0
- package/ENG/dotnet-aspnetcore-development-eng.md +401 -0
- package/ENG/go-development-eng.md +103 -0
- package/ENG/java-development-eng.md +125 -0
- package/ENG/nodejs-backend-development-eng.md +605 -0
- package/ENG/php-development-eng.md +104 -0
- package/ENG/rust-development-eng.md +422 -0
- package/ENG/sec-code-eng.md +7 -7
- package/ENG/sql-development-eng.md +108 -0
- package/ENG/swift-development-eng.md +111 -0
- package/ENG/typescript-development-eng.md +108 -0
- package/EXECUTION_STATE.md +12 -0
- package/GUIDE_ROUTER.md +418 -9
- package/LOOP_ENGINEERING.md +28 -2
- package/ORCHESTRATOR_INTEGRATION.md +9 -5
- package/PROTOCOL_INTEGRATION.md +55 -2
- package/QUALITY_SCORECARD.md +1 -0
- package/README.md +78 -52
- package/TERMINOLOGY.md +2 -0
- package/THIRD_PARTY_NOTICES.md +19 -7
- package/THREAT_MODEL.md +140 -1
- package/completions/_forgeloop +22 -4
- package/completions/forgeloop.bash +40 -4
- package/completions/forgeloop.fish +130 -1
- package/docs/ADVISORY_CONTEXT.md +25 -0
- package/docs/AGENT_BROWSER_ADAPTER.md +81 -0
- package/docs/AGENT_BROWSER_VERIFICATION.md +6 -0
- package/docs/AGENT_PROTOCOL_SUMMARY.md +81 -3
- package/docs/AGENT_SKILL.md +66 -0
- package/docs/ARTIFACT_REFERENCE.md +123 -0
- package/docs/AUDIT_UX.md +46 -0
- package/docs/BROWSER_VERIFICATION.md +136 -0
- package/docs/CLI_REFERENCE.md +392 -10
- package/docs/CODE_ATTESTATION.md +2 -2
- package/docs/DOCUMENTATION_GUIDE.md +34 -12
- package/docs/GETTING_STARTED.md +59 -0
- package/docs/JEV_BENCHMARKS.md +31 -0
- package/docs/MODEL_ROUTING.md +37 -0
- package/docs/OPENSRC_ADAPTER.md +241 -0
- package/docs/PACKAGE_CONTENTS.md +60 -19
- package/docs/PROVIDERS.md +126 -0
- package/docs/PROVIDER_ARCHITECTURE.md +199 -0
- package/docs/RECIPES.md +32 -0
- package/docs/RELEASE_CHECKLIST.md +66 -5
- package/docs/SECURITY_REVIEW.md +71 -0
- package/docs/SEMANTIC_DECISION_PLANE.md +71 -0
- package/docs/TEST_INTELLIGENCE.md +29 -0
- package/docs/TEST_PRUNING.md +14 -0
- package/docs/TROUBLESHOOTING.md +298 -3
- package/docs/UNIVERSAL_INTEGRATION.md +31 -0
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.html +2 -2
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json +5 -5
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.svg +1 -1
- package/docs/assets/diagrams/forgeloop-engineering-flow.html +39 -26
- package/docs/assets/diagrams/forgeloop-engineering-flow.receipt.json +6 -6
- package/docs/assets/diagrams/forgeloop-engineering-flow.svg +26 -26
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.html +2 -1
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json +5 -5
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.svg +1 -1
- package/docs/diagrams/README.md +13 -9
- package/docs/diagrams/forgeloop-code-attestation-flow.workflow.json +1 -1
- package/docs/diagrams/forgeloop-engineering-flow.workflow.json +24 -19
- package/docs/diagrams/forgeloop-verification-trust-flow.workflow.json +1 -0
- package/docs/diagrams/reviews/forgeloop-code-attestation-flow.review.json +4 -4
- package/docs/diagrams/reviews/forgeloop-engineering-flow.review.json +4 -4
- package/docs/diagrams/reviews/forgeloop-verification-trust-flow.review.json +4 -4
- package/docs/documentation-manifest.json +1397 -0
- package/docs/protocol-requirements.json +101 -0
- package/package.json +46 -4
- package/schemas/config.schema.json +14 -0
- package/schemas/context-plan.schema.json +18 -0
- package/schemas/routing-input.schema.json +1 -1
- package/schemas/semantic-decision.schema.json +46 -0
- package/schemas/test-utility.schema.json +44 -0
- package/scripts/CI_VALIDATORS.md +84 -11
- package/scripts/benchmark-jev.mjs +5 -0
- package/scripts/benchmark-test-intelligence.mjs +4 -0
- package/scripts/generate-agent-protocol-summary.mjs +40 -1
- package/scripts/generate-forgeloop-skill.mjs +133 -0
- package/scripts/jev-smoke.mjs +19 -0
- package/skills/forgeloop/README.md +9 -0
- package/skills/forgeloop/SKILL.md +77 -0
- package/skills/forgeloop/references/lifecycle.md +9 -0
- package/skills/forgeloop/references/recovery.md +7 -0
- package/skills/forgeloop/references/verification.md +7 -0
- package/src/adapters/agent-browser/assertions.js +47 -0
- package/src/adapters/agent-browser/commands.js +54 -0
- package/src/adapters/agent-browser/index.js +3 -0
- package/src/adapters/agent-browser/locator.js +40 -0
- package/src/adapters/agent-browser/process.js +215 -0
- package/src/adapters/agent-browser/provider.js +313 -0
- package/src/adapters/emulated-services/constants.js +24 -0
- package/src/adapters/emulated-services/index.js +7 -0
- package/src/adapters/emulated-services/process.js +162 -0
- package/src/adapters/emulated-services/provider.js +282 -0
- package/src/adapters/opensrc/normalize.js +90 -0
- package/src/adapters/opensrc/process.js +248 -0
- package/src/adapters/opensrc/provider.js +338 -0
- package/src/adapters/opensrc/search.js +264 -0
- package/src/adapters/typesafe/client.js +28 -0
- package/src/adapters/typesafe/engine.js +63 -0
- package/src/adapters/typesafe/normalize.js +41 -0
- package/src/cli.js +108 -0
- package/src/commands/checkpoint-revalidate.js +176 -0
- package/src/commands/context-plan.js +38 -0
- package/src/commands/contract-create.js +264 -0
- package/src/commands/contract-revise.js +236 -0
- package/src/commands/decision-show.js +14 -0
- package/src/commands/decision-status.js +22 -0
- package/src/commands/discover.js +41 -0
- package/src/commands/doctor.js +15 -0
- package/src/commands/gate-record.js +205 -0
- package/src/commands/gate-revalidate.js +137 -0
- package/src/commands/model-route.js +32 -0
- package/src/commands/next.js +19 -7
- package/src/commands/route.js +146 -18
- package/src/commands/semantic-plan.js +17 -0
- package/src/commands/task-abandon.js +224 -0
- package/src/commands/task-create.js +84 -25
- package/src/commands/task-list.js +22 -2
- package/src/commands/task-migrate-contract-bootstrap-repair.js +288 -0
- package/src/commands/task-repair-contract-bootstrap.js +263 -0
- package/src/commands/test-inventory.js +5 -0
- package/src/commands/test-prune-plan.js +5 -0
- package/src/commands/test-prune-probe.js +5 -0
- package/src/commands/test-utility.js +5 -0
- package/src/commands/validate-protocol.js +10 -1
- package/src/config/guides.json +44 -0
- package/src/core/artifact-registry.js +24 -0
- package/src/core/audit-ux.js +514 -0
- package/src/core/browser-verification/constants.js +149 -0
- package/src/core/browser-verification/normalize.js +254 -0
- package/src/core/browser-verification/provider.js +519 -0
- package/src/core/browser-verification/service.js +115 -0
- package/src/core/build-script.js +151 -0
- package/src/core/c-cpp-project.js +143 -0
- package/src/core/checkpoint-revalidation.js +319 -0
- package/src/core/cli-command-definitions.js +249 -1
- package/src/core/command-executors.js +115 -3
- package/src/core/command-input.js +212 -102
- package/src/core/completion-artifacts.js +14 -5
- package/src/core/completion.js +4 -6
- package/src/core/config.js +3 -0
- package/src/core/context-compiler/budget.js +9 -0
- package/src/core/context-compiler/candidates.js +39 -0
- package/src/core/context-compiler/compiler.js +63 -0
- package/src/core/context-compiler/fingerprint.js +11 -0
- package/src/core/context-compiler/policy.js +13 -0
- package/src/core/context-compiler/result.js +23 -0
- package/src/core/contract-bootstrap-recovery.js +655 -0
- package/src/core/contract-presets.js +82 -0
- package/src/core/contract-revision.js +210 -0
- package/src/core/decision/artifact.js +69 -0
- package/src/core/decision/benchmarks.js +103 -0
- package/src/core/decision/cache.js +27 -0
- package/src/core/decision/constants.js +58 -0
- package/src/core/decision/cutover.js +34 -0
- package/src/core/decision/engine.js +22 -0
- package/src/core/decision/errors.js +68 -0
- package/src/core/decision/events.js +101 -0
- package/src/core/decision/freshness.js +19 -0
- package/src/core/decision/normalizers/index.js +115 -0
- package/src/core/decision/policy.js +18 -0
- package/src/core/decision/projection.js +16 -0
- package/src/core/decision/question-registry.js +201 -0
- package/src/core/decision/request.js +26 -0
- package/src/core/decision/resolver.js +130 -0
- package/src/core/decision/result.js +58 -0
- package/src/core/decision/service.js +156 -0
- package/src/core/decision/state-builder.js +65 -0
- package/src/core/decision/task-bindings.js +30 -0
- package/src/core/decision/test-provider.js +32 -0
- package/src/core/decision/thresholds.js +15 -0
- package/src/core/error-codes.js +281 -3
- package/src/core/events.js +226 -57
- package/src/core/evidence-readiness.js +9 -0
- package/src/core/execution-prerequisites.js +14 -0
- package/src/core/execution-profile.js +63 -38
- package/src/core/filesystem.js +1 -10
- package/src/core/gate-provenance.js +124 -0
- package/src/core/go-project.js +206 -0
- package/src/core/integration-invocation-policy.js +27 -4
- package/src/core/integration-resources.js +86 -61
- package/src/core/java-project.js +403 -0
- package/src/core/model-router/constants.js +10 -0
- package/src/core/model-router/policy.js +103 -0
- package/src/core/model-router/router.js +37 -0
- package/src/core/multi-language-project.js +117 -0
- package/src/core/next-action-model.js +58 -0
- package/src/core/next-action-phases.js +130 -42
- package/src/core/next-action-refresh.js +43 -9
- package/src/core/next-action-review-phase.js +7 -2
- package/src/core/next-action.js +35 -7
- package/src/core/next-explanation.js +63 -0
- package/src/core/phase.js +128 -10
- package/src/core/php-project.js +85 -0
- package/src/core/preflight-consistency.js +23 -9
- package/src/core/preflight-loaders.js +37 -5
- package/src/core/project-detection.js +1760 -52
- package/src/core/protocol-info.js +65 -0
- package/src/core/protocol.js +20 -0
- package/src/core/reconcile-closure.js +132 -53
- package/src/core/recovery-history.js +1 -0
- package/src/core/resumability.js +154 -44
- package/src/core/route-artifact.js +15 -1
- package/src/core/router.js +223 -4
- package/src/core/runtime-context.js +118 -61
- package/src/core/rust-project.js +400 -0
- package/src/core/schema-validation.js +3 -0
- package/src/core/security-review/constants.js +64 -0
- package/src/core/security-review/normalize.js +245 -0
- package/src/core/security-review/provider.js +204 -0
- package/src/core/security-review/service.js +134 -0
- package/src/core/semantic-planning/constants.js +19 -0
- package/src/core/semantic-planning/projection.js +94 -0
- package/src/core/semantic-planning/service.js +15 -0
- package/src/core/sources.js +37 -0
- package/src/core/sql-project.js +141 -0
- package/src/core/swift-project.js +200 -0
- package/src/core/task-claim-state.js +201 -1
- package/src/core/task-conflict-inspection.js +31 -5
- package/src/core/task-paths.js +13 -0
- package/src/core/task-recovery.js +1 -0
- package/src/core/templates.js +3 -0
- package/src/core/test-intelligence/benchmarks.js +68 -0
- package/src/core/test-intelligence/inventory.js +73 -0
- package/src/core/test-intelligence/prune.js +90 -0
- package/src/core/test-intelligence/semantic-state.js +15 -0
- package/src/core/test-intelligence/service.js +40 -0
- package/src/core/test-intelligence/utility.js +50 -0
- package/src/core/trace.js +11 -7
- package/src/core/transaction.js +1 -0
- package/src/core/typescript-project.js +349 -0
- package/src/core/xml-structure.js +123 -0
- package/src/integration.d.ts +492 -0
- package/src/integration.js +54 -0
- package/src/providers/README.md +47 -0
- package/src/providers/capabilities.js +46 -0
- package/src/providers/errors.js +15 -0
- package/src/providers/index.js +29 -0
- package/src/providers/json-snapshot.js +105 -0
- package/src/providers/registry.js +152 -0
package/PROTOCOL_INTEGRATION.md
CHANGED
|
@@ -181,6 +181,16 @@ authority, provenance, and safety-floor decisions remain unchanged.
|
|
|
181
181
|
validator-backed completion remains unchanged.
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
+
The capability handshake also advertises the versioned, read-only `auditUx`
|
|
185
|
+
resource feature. `task/audit-view` is a bounded presentation projection
|
|
186
|
+
composed from canonical status, audit, report, history, trace, ownership,
|
|
187
|
+
next-action, approval, and recovery resolvers. It exposes no lifecycle,
|
|
188
|
+
evidence, completion, mutation, or external-execution authority; hosts must
|
|
189
|
+
use the canonical command/API path for mutations. Timeline pagination is
|
|
190
|
+
sequence-based and bounded, and the projection omits raw event payloads,
|
|
191
|
+
commands, environment values, credentials, provider output, and absolute
|
|
192
|
+
paths. See [`docs/AUDIT_UX.md`](./docs/AUDIT_UX.md).
|
|
193
|
+
|
|
184
194
|
## Capability negotiation
|
|
185
195
|
|
|
186
196
|
The public capability handshake exposes additive capability families separately
|
|
@@ -190,6 +200,7 @@ from Protocol v1, schema v1, and Integration API v1:
|
|
|
190
200
|
| --- | --- | --- |
|
|
191
201
|
| `canonicalHandoffs` | v2 | Immutable handoff snapshots with ledger-backed exactly-once operational acceptance |
|
|
192
202
|
| `advisoryContextProviders` | v1 | Lazy, opt-in, provider-neutral Integration API injection only |
|
|
203
|
+
| `providerExtensions` | v1 | Experimental provider-neutral capability vocabulary; generic registry remains internal and unexported |
|
|
193
204
|
|
|
194
205
|
`repositoryIndex` v1 is a mandatory provider-neutral discovery capability for
|
|
195
206
|
Git repositories. ForgeLoop currently implements it with a managed, pinned
|
|
@@ -223,6 +234,40 @@ instructions. `protocol-info` may advertise the capability, but advisory
|
|
|
223
234
|
recall remains a programmatic Integration API operation; there is no stock
|
|
224
235
|
`context-recall` CLI command.
|
|
225
236
|
|
|
237
|
+
<a id="FL-PROVIDER-001"></a> **FL-PROVIDER-001 — `providerExtensions` MUST remain provider-neutral and experimental and MUST NOT imply a public generic provider registry API.**
|
|
238
|
+
|
|
239
|
+
<a id="FL-PROVIDER-002"></a> **FL-PROVIDER-002 — Every advertised provider kind MUST deny lifecycle, completion, and evidence authority.**
|
|
240
|
+
|
|
241
|
+
<a id="FL-PROVIDER-003"></a> **FL-PROVIDER-003 — Provider results MUST cross a strict JSON snapshot boundary before consumer use.**
|
|
242
|
+
|
|
243
|
+
<a id="FL-PROVIDER-004"></a> **FL-PROVIDER-004 — The generic provider registry MUST remain absent from public package subpath exports.**
|
|
244
|
+
|
|
245
|
+
`providerExtensions` v1 is provider-neutral and experimental. It advertises
|
|
246
|
+
five provider kinds, strict JSON result normalization, cooperative cancellation,
|
|
247
|
+
and false lifecycle, completion, evidence, and auto-install authority. This
|
|
248
|
+
capability advertisement does not imply a generic public provider registration
|
|
249
|
+
API or a supported `./providers` package subpath. Protocol version remains 1,
|
|
250
|
+
Schema version remains 1, and Integration API version remains 1.
|
|
251
|
+
|
|
252
|
+
The dedicated `browserVerificationProviders` runtime-context option is a
|
|
253
|
+
separate explicit Integration API boundary. It is host-injected, provider
|
|
254
|
+
neutral, lazy, and inert during context construction. `runBrowserVerification`
|
|
255
|
+
is the only public operation; it does not run from lifecycle commands and does
|
|
256
|
+
not persist observations. ForgeLoop owns the shared deadline, cooperative
|
|
257
|
+
cancellation, strict result snapshot, exact origin/redirect validation, and
|
|
258
|
+
overall assertion-status derivation. Browser observations cannot directly
|
|
259
|
+
create evidence, completion authority, claims, receipts, or next actions. The
|
|
260
|
+
origin allowlist is not a network sandbox and no browser vendor is canonical.
|
|
261
|
+
|
|
262
|
+
The dedicated `securityReviewProviders` runtime-context option is another
|
|
263
|
+
explicit, host-injected Integration API boundary. `runSecurityReview` is
|
|
264
|
+
lazy, inert during context construction, and observation-only: it does not
|
|
265
|
+
install or discover scanners, mutate lifecycle artifacts, create evidence,
|
|
266
|
+
authorize completion, or issue commands. ForgeLoop bounds and freezes the
|
|
267
|
+
request, shares one deadline and cooperative abort signal across factory and
|
|
268
|
+
review, and normalizes the result into a strict immutable observation. Findings
|
|
269
|
+
must not be treated as canonical evidence or lifecycle authority.
|
|
270
|
+
|
|
226
271
|
A consumer that understands `canonicalHandoffs` v1 but not v2 may disable the
|
|
227
272
|
handoff-specific UI while keeping Protocol v1 core functionality available.
|
|
228
273
|
Consumers must feature-detect the capability family and must not mark the
|
|
@@ -394,6 +439,12 @@ only a compatibility alias and has identical caller-acknowledgement semantics.
|
|
|
394
439
|
a trusted grant reference through a boundary the active actor cannot mint or
|
|
395
440
|
replace. The standalone CLI does not expose such a self-attestation option.
|
|
396
441
|
|
|
442
|
+
Explicit active-task abandonment is a distinct caller-acknowledged operation:
|
|
443
|
+
`task-abandon --task <id> --acknowledge-abandonment` releases validated claims
|
|
444
|
+
through the same canonical ownership resolver, project/task serialization, and
|
|
445
|
+
append-only recovery history. It does not change the phase or create completion,
|
|
446
|
+
publication, or host authority. `clear-state` is not an abandonment substitute.
|
|
447
|
+
|
|
397
448
|
Claim ownership is a validated relationship, not an artifact preference.
|
|
398
449
|
<a id="FL-CLAIM-001"></a> **FL-CLAIM-001 — Every harness MUST consume the canonical claim-state resolver**
|
|
399
450
|
over the descriptor, work state, recovery artifact, and complete validated
|
|
@@ -488,8 +539,10 @@ installing a package.
|
|
|
488
539
|
|
|
489
540
|
The installed loop directs the active actor to inspect native model and harness
|
|
490
541
|
capabilities. When a task requires a missing capability (e.g. multimodal vision),
|
|
491
|
-
|
|
492
|
-
|
|
542
|
+
a host or operator may provision the smallest task-scoped capability (such as
|
|
543
|
+
`Qwen-MM-Plugins`) only when installation authority has been explicitly
|
|
544
|
+
granted. Use native mechanisms or upstream installers, then verify it before
|
|
545
|
+
use. Without that authority, keep it unavailable and report the limitation.
|
|
493
546
|
|
|
494
547
|
API credentials, system packages, and unrelated environment changes remain
|
|
495
548
|
separately gated.
|
package/QUALITY_SCORECARD.md
CHANGED
|
@@ -95,6 +95,7 @@ are both present:
|
|
|
95
95
|
| --- | --- | --- |
|
|
96
96
|
| Routing | `src/core/router.js`, route schemas, stable reason codes, and exclusions | `tests/router.test.js`, `tests/fixtures/routes/` |
|
|
97
97
|
| Flutter project detection and routing | `src/core/project-detection.js`, `src/core/router.js`, `src/config/guides.json`, and scoped manifest evidence | `tests/project-detection.test.js`, `tests/guide-registry.test.js`, `tests/router.test.js` |
|
|
98
|
+
| Rust project detection and routing | `src/core/project-detection.js`, `src/core/rust-project.js`, `src/core/router.js`, `src/config/guides.json`, and scoped Cargo evidence | `tests/rust-project-detection.test.js`, `tests/guide-registry.test.js`, `tests/router.test.js` |
|
|
98
99
|
| Observability | `src/core/receipt.js`, `src/core/inspect.js`, `src/core/evidence.js`, and schema health | `tests/observability.test.js`, `tests/receipt-semantics.test.js`, `tests/schema-health.test.js` |
|
|
99
100
|
| Resume/checkpoint | `src/core/work-state.js`, `EXECUTION_STATE.md`, shared loaded-state classifier, contract/artifact classifiers, and atomic writes | `tests/work-state.test.js`, `tests/checkpoint-freshness.test.js`, status, validate-state, and validate-protocol tests |
|
|
100
101
|
| Delegation | `src/core/delegation.js`, delegation-set validator, and `DELEGATION_PROTOCOL.md` | `tests/delegation.test.js`, `tests/delegation-set.test.js` |
|
package/README.md
CHANGED
|
@@ -1,38 +1,37 @@
|
|
|
1
1
|
# ForgeLoop — Verifiable Engineering Protocol
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<img src="./docs/assets/
|
|
4
|
+
<img src="./docs/assets/forgeloop-architecture.svg" alt="ForgeLoop Architecture" width="100%">
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
[](https://github.com/cassiomc1/forgeloop/actions/workflows/codeql.yml)
|
|
8
8
|
[](https://github.com/cassiomc1/forgeloop/actions/workflows/dependency-review.yml)
|
|
9
|
-
[](https://github.com/cassiomc1/forgeloop/actions/workflows/docs-quality.yml)
|
|
10
9
|
[](https://github.com/cassiomc1/forgeloop/actions/workflows/forgeloop-audit.yml)
|
|
11
10
|
[](https://github.com/cassiomc1/forgeloop/actions/workflows/npm-publish.yml)
|
|
12
11
|
[](https://github.com/cassiomc1/forgeloop/actions/workflows/package-smoke.yml)
|
|
13
12
|
[](https://github.com/cassiomc1/forgeloop/actions/workflows/release-notes.yml)
|
|
14
13
|
|
|
15
|
-
ForgeLoop is
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
It is a protocol CLI, not an agent or LLM runtime, framework, or graph orchestrator.
|
|
14
|
+
ForgeLoop is the deterministic governor for AI-assisted engineering. Jev is the
|
|
15
|
+
mandatory bounded System One semantic input; the host coding model is System Two
|
|
16
|
+
implementation. ForgeLoop alone owns lifecycle, claims, gates, evidence,
|
|
17
|
+
completion, recovery, and publication truth.
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
[`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) is
|
|
23
|
-
[`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md) defines
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
relevant guides.
|
|
19
|
+
Operational sources are indexed in [`DOCS_INDEX.md`](./DOCS_INDEX.md).
|
|
20
|
+
[`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) is canonical;
|
|
21
|
+
[`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md) defines discovery,
|
|
22
|
+
[`PROJECT_PROFILE.md`](./PROJECT_PROFILE.md) stores project facts, and
|
|
23
|
+
[`GUIDE_ROUTER.md`](./GUIDE_ROUTER.md) selects relevant guides.
|
|
27
24
|
|
|
28
25
|
## Where should I start?
|
|
29
26
|
|
|
30
27
|
- **New to ForgeLoop** → [`docs/GETTING_STARTED.md`](./docs/GETTING_STARTED.md)
|
|
31
|
-
- **Inspect a real ForgeLoop execution** → [
|
|
28
|
+
- **Inspect a real ForgeLoop execution** → [repository PoC](https://github.com/cassiomc1/forgeloop/blob/main/poc/README.md)
|
|
32
29
|
- **Full protocol specification** → [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md)
|
|
33
30
|
- **Integrating an AI harness** → [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md)
|
|
34
31
|
- **Optional advisory context providers** → [`docs/ADVISORY_CONTEXT.md`](./docs/ADVISORY_CONTEXT.md)
|
|
32
|
+
- **Provider extension architecture** → [`docs/PROVIDER_ARCHITECTURE.md`](./docs/PROVIDER_ARCHITECTURE.md) and [`docs/PROVIDERS.md`](./docs/PROVIDERS.md)
|
|
35
33
|
- **Agent bootstrap summary** → [`docs/AGENT_PROTOCOL_SUMMARY.md`](./docs/AGENT_PROTOCOL_SUMMARY.md)
|
|
34
|
+
- **Portable ForgeLoop Agent Skill** → [`skills/forgeloop/SKILL.md`](./skills/forgeloop/SKILL.md) and [`docs/AGENT_SKILL.md`](./docs/AGENT_SKILL.md)
|
|
36
35
|
- **Continuing another harness's task** → [`docs/CROSS_HARNESS_CONTINUITY.md`](./docs/CROSS_HARNESS_CONTINUITY.md)
|
|
37
36
|
- **CLI command reference** → [`docs/CLI_REFERENCE.md`](./docs/CLI_REFERENCE.md)
|
|
38
37
|
- **Artifact & schema reference** → [`docs/ARTIFACT_REFERENCE.md`](./docs/ARTIFACT_REFERENCE.md)
|
|
@@ -45,13 +44,13 @@ relevant guides.
|
|
|
45
44
|
|
|
46
45
|
## Real execution proof
|
|
47
46
|
|
|
48
|
-
|
|
47
|
+
The repository-only [execution PoC](https://github.com/cassiomc1/forgeloop/blob/main/poc/README.md) covers workload, protocol
|
|
49
48
|
artifacts, trusted provenance, receipts, evidence, and audit. It reached
|
|
50
49
|
validator-backed `COMPLETE / VALID` and preserves a later
|
|
51
50
|
`E_RECEIPT_PATH_MISMATCH` after publication changed the repository.
|
|
52
51
|
|
|
53
|
-
- [Canonical technical audit](
|
|
54
|
-
- [Evidence package](
|
|
52
|
+
- [Canonical technical audit](https://github.com/cassiomc1/forgeloop/blob/main/poc/reports/poc-20260826-real-execution-technical-audit-v2.md)
|
|
53
|
+
- [Evidence package](https://github.com/cassiomc1/forgeloop/tree/main/poc/evidence/poc-20260826-real-execution/)
|
|
55
54
|
|
|
56
55
|
## Catalog
|
|
57
56
|
|
|
@@ -68,13 +67,24 @@ validator-backed `COMPLETE / VALID` and preserves a later
|
|
|
68
67
|
| Web games | [`ENG/games-code-design-web-eng.md`](./ENG/games-code-design-web-eng.md) |
|
|
69
68
|
| Documentation quality | [`ENG/documentation-quality-eng.md`](./ENG/documentation-quality-eng.md) |
|
|
70
69
|
| Flutter | [guide](./ENG/flutter-development-eng.md) |
|
|
70
|
+
| .NET and ASP.NET Core | [guide](./ENG/dotnet-aspnetcore-development-eng.md) |
|
|
71
|
+
| Node.js | [guide](./ENG/nodejs-backend-development-eng.md) |
|
|
72
|
+
| Rust | [guide](./ENG/rust-development-eng.md) |
|
|
73
|
+
| C | [guide](./ENG/c-development-eng.md) |
|
|
74
|
+
| C++ | [guide](./ENG/cpp-development-eng.md) |
|
|
75
|
+
| Java | [guide](./ENG/java-development-eng.md) |
|
|
76
|
+
| SQL | [guide](./ENG/sql-development-eng.md) |
|
|
77
|
+
| Go | [guide](./ENG/go-development-eng.md) |
|
|
78
|
+
| TypeScript | [guide](./ENG/typescript-development-eng.md) |
|
|
79
|
+
| PHP | [guide](./ENG/php-development-eng.md) |
|
|
80
|
+
| Swift | [guide](./ENG/swift-development-eng.md) |
|
|
71
81
|
| Structural quality feedback | [`docs/STRUCTURAL_QUALITY.md`](./docs/STRUCTURAL_QUALITY.md) |
|
|
72
82
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
83
|
+
Routing uses bounded structural evidence for Flutter, .NET, Node.js, Rust, C,
|
|
84
|
+
C++, Java, Go, TypeScript, PHP, and Swift; SQL is a scoped schema/query/
|
|
85
|
+
migration overlay. Source extensions, build tooling, lockfiles, compiler/JDK/
|
|
86
|
+
runtime images, and prose alone fail where the specialist contract requires
|
|
87
|
+
stronger project identity. The public project-evidence schema remains v1.
|
|
78
88
|
|
|
79
89
|
## Quickstart
|
|
80
90
|
|
|
@@ -105,20 +115,18 @@ npx @cassiomc1/forgeloop doctor
|
|
|
105
115
|
|
|
106
116
|
### 60-second demonstration
|
|
107
117
|
|
|
108
|
-
In a disposable directory, initialize the kit and create an isolated task.
|
|
109
|
-
|
|
118
|
+
In a disposable directory, initialize the kit and create an isolated task.
|
|
119
|
+
Semantic checkpoints require a host-configured `TYPESAFE_API_KEY`; ForgeLoop never persists it.
|
|
110
120
|
|
|
111
121
|
```bash
|
|
112
122
|
npx @cassiomc1/forgeloop init
|
|
113
123
|
forgeloop task-create --task demo --claim src --json
|
|
114
|
-
forgeloop
|
|
124
|
+
forgeloop contract-create --task demo --preset documentation --json
|
|
125
|
+
forgeloop route --task demo --work code --json
|
|
115
126
|
forgeloop preflight --task demo --json
|
|
116
127
|
forgeloop next --task demo --json
|
|
117
128
|
```
|
|
118
129
|
|
|
119
|
-
The last command reports the next safe action; it does not execute code or
|
|
120
|
-
schedule agents.
|
|
121
|
-
|
|
122
130
|
### Optional code attestation
|
|
123
131
|
|
|
124
132
|
Projects may opt into source-content attestation after a valid completion. The
|
|
@@ -144,7 +152,9 @@ results. Provider output is never lifecycle state, evidence, authority,
|
|
|
144
152
|
completion truth, or next-action authority, and it is never executable as a
|
|
145
153
|
protocol command. The optional Ripwire adapter follows the same boundary; see
|
|
146
154
|
[`docs/ADVISORY_CONTEXT.md`](./docs/ADVISORY_CONTEXT.md) and
|
|
147
|
-
[`docs/RIPWIRE_ADAPTER.md`](./docs/RIPWIRE_ADAPTER.md).
|
|
155
|
+
[`docs/RIPWIRE_ADAPTER.md`](./docs/RIPWIRE_ADAPTER.md). The optional OpenSrc
|
|
156
|
+
adapter exposes external package source context through the same boundary; see
|
|
157
|
+
[`docs/OPENSRC_ADAPTER.md`](./docs/OPENSRC_ADAPTER.md).
|
|
148
158
|
|
|
149
159
|
### Optional task boundaries and differential verification
|
|
150
160
|
|
|
@@ -170,8 +180,8 @@ raising `VERIFIED` to `ATTESTED`. See [`docs/REVISION_PROVIDERS.md`](./docs/REVI
|
|
|
170
180
|
|
|
171
181
|
Generic CI provides a platform-neutral revision-range boundary; thin GitHub,
|
|
172
182
|
GitLab, local, or enterprise adapters may translate revisions without adding
|
|
173
|
-
trust rules to the protocol core.
|
|
174
|
-
|
|
183
|
+
trust rules to the protocol core. CLI and Integration API remain cross-platform;
|
|
184
|
+
MCP is optional.
|
|
175
185
|
|
|
176
186
|
### Durable external actions
|
|
177
187
|
|
|
@@ -355,20 +365,20 @@ ForgeLoop supports isolated, concurrent tasks within the same repository via det
|
|
|
355
365
|
# Create an isolated task claiming specific directories
|
|
356
366
|
forgeloop task-create --task auth-feature --claim src/auth --claim tests/auth --json
|
|
357
367
|
|
|
358
|
-
# List active and completed tasks
|
|
359
368
|
forgeloop task-list --json
|
|
360
369
|
|
|
361
|
-
# Ask for deterministic conflict/recovery guidance
|
|
362
370
|
forgeloop next --task auth-feature --json
|
|
363
371
|
|
|
364
|
-
#
|
|
372
|
+
# Release claims only for a STALE or ABANDONED task
|
|
365
373
|
forgeloop task-recover --task auth-feature --acknowledge-recovery --json
|
|
366
374
|
|
|
367
|
-
#
|
|
375
|
+
# Explicitly abandon an active non-terminal task when its objective is no longer valid
|
|
376
|
+
forgeloop task-abandon --task auth-feature --acknowledge-abandonment --json
|
|
377
|
+
|
|
378
|
+
# Reacquire conflict-free claims before mutating a recovered task
|
|
368
379
|
forgeloop task-resume --task auth-feature --json
|
|
369
380
|
|
|
370
|
-
|
|
371
|
-
forgeloop route --task auth-feature --work clean-code --surface backend
|
|
381
|
+
forgeloop route --task auth-feature --work code --surface backend
|
|
372
382
|
forgeloop preflight --task auth-feature --json
|
|
373
383
|
forgeloop advance --task auth-feature --to EXECUTING
|
|
374
384
|
forgeloop complete --task auth-feature --json
|
|
@@ -387,6 +397,12 @@ disabled. The standalone acknowledgement flag is not host-attested authority.
|
|
|
387
397
|
settlement, normal claim-overlap, and clean-checkout checks succeed. Never
|
|
388
398
|
create, edit, or delete `recovery.json` manually.
|
|
389
399
|
|
|
400
|
+
`task-recover` is reserved for canonical `STALE`/`ABANDONED` classification.
|
|
401
|
+
`task-abandon` is the separate explicit path for an active non-terminal task:
|
|
402
|
+
it records `TASK_ABANDONED`, releases claims as `RELEASED_BY_RECOVERY`, keeps
|
|
403
|
+
the phase unchanged, and never implies completion or publication. `clear-state`
|
|
404
|
+
only removes a checkpoint and is not a claim-release or abandonment mechanism.
|
|
405
|
+
|
|
390
406
|
### Executable policy verification & brownfield baselines
|
|
391
407
|
|
|
392
408
|
ForgeLoop enforces automated, non-interactive verification rules (`rules.json`) with zero interactive dependencies:
|
|
@@ -423,12 +439,20 @@ See [`docs/CLI_REFERENCE.md`](./docs/CLI_REFERENCE.md) and [`LOOP_SYSTEM_DESIGN.
|
|
|
423
439
|
|
|
424
440
|
## Architecture flow
|
|
425
441
|
|
|
442
|
+
<a href="./docs/assets/diagrams/forgeloop-engineering-flow.html">
|
|
443
|
+
<img src="./docs/assets/forgeloop-lifecycle-animated.svg" alt="Animated ForgeLoop evidence-first loop: Contract, Route, Preflight, Execute, Evidence, Review, VALID, with an evidence-only correction loop" width="100%">
|
|
444
|
+
</a>
|
|
445
|
+
|
|
446
|
+
*Animation: the rail pulses through each step in order. It loops forever and
|
|
447
|
+
respects reduced-motion settings. Select the image to open the full animated
|
|
448
|
+
interactive explorer.*
|
|
449
|
+
|
|
426
450
|
The canonical source is the typed Archify workflow
|
|
427
451
|
[`docs/diagrams/forgeloop-engineering-flow.workflow.json`](./docs/diagrams/forgeloop-engineering-flow.workflow.json).
|
|
428
452
|
The committed animated interactive explorer is
|
|
429
453
|
[`docs/assets/diagrams/forgeloop-engineering-flow.html`](./docs/assets/diagrams/forgeloop-engineering-flow.html),
|
|
430
454
|
which traces it. The
|
|
431
|
-
|
|
455
|
+
detailed, self-contained SVG fallback is
|
|
432
456
|
[`docs/assets/diagrams/forgeloop-engineering-flow.svg`](./docs/assets/diagrams/forgeloop-engineering-flow.svg),
|
|
433
457
|
and the deterministic hash receipt is
|
|
434
458
|
[`docs/assets/diagrams/forgeloop-engineering-flow.receipt.json`](./docs/assets/diagrams/forgeloop-engineering-flow.receipt.json).
|
|
@@ -441,8 +465,6 @@ The broader architecture and the CLI-only search boundary are in
|
|
|
441
465
|
|
|
442
466
|
[Open the animated ForgeLoop evidence-first engineering flow](./docs/assets/diagrams/forgeloop-engineering-flow.html)
|
|
443
467
|
|
|
444
|
-

|
|
445
|
-
|
|
446
468
|
Two focused, source-bound workflow
|
|
447
469
|
diagrams complement it. The [Verification Trust Flow source](./docs/diagrams/forgeloop-verification-trust-flow.workflow.json),
|
|
448
470
|
[animated explorer](./docs/assets/diagrams/forgeloop-verification-trust-flow.html),
|
|
@@ -458,9 +480,13 @@ and [visual review](./docs/diagrams/reviews/forgeloop-code-attestation-flow.revi
|
|
|
458
480
|
show exact content binding, optional signing, and separate revision-range
|
|
459
481
|
coverage.
|
|
460
482
|
|
|
461
|
-
Text-only fallback: discovery creates the contract and route; parsed
|
|
462
|
-
|
|
463
|
-
|
|
483
|
+
Text-only fallback: discovery creates the contract and route; parsed project
|
|
484
|
+
manifests/build metadata select the corresponding language specialist; owned
|
|
485
|
+
SQL migrations overlay their host project; parsed
|
|
486
|
+
`dependencies.flutter.sdk: flutter` selects Flutter for that root; a supported
|
|
487
|
+
SDK-style manifest selects .NET; parsed `[package]` or `[workspace]` in
|
|
488
|
+
`Cargo.toml` selects Rust for that root; ASP.NET Core and ABP remain .NET
|
|
489
|
+
overlays. Routing is not verification/completion evidence. Gates and
|
|
464
490
|
`PREFLIGHT_READY` authorize execution; verification creates
|
|
465
491
|
structured evidence; failures enter diagnosis and correction; review precedes
|
|
466
492
|
validator-backed completion. Drift reopens verification, and migration keeps
|
|
@@ -504,16 +530,16 @@ it must not infer current ownership from `task.json` or `recovery.json` alone.
|
|
|
504
530
|
|
|
505
531
|
## Security and dependency boundary
|
|
506
532
|
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
533
|
+
Runtime uses Node built-ins and the approved exact `@typesafe-ai/sdk` and
|
|
534
|
+
`smol-toml` dependencies; it installs no agents, providers, plugins, services,
|
|
535
|
+
or telemetry. Paths, symlinks, JSON,
|
|
536
|
+
manifests, schemas, receipts, and secret-like values are bounded or checked.
|
|
537
|
+
Install-capable verification requires trusted host authority; see
|
|
538
|
+
[`THREAT_MODEL.md`](./THREAT_MODEL.md).
|
|
512
539
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
is vendored at `vendor/archify/v2.15.0/` rather than installed as a package.
|
|
540
|
+
c8, ESLint, TypeScript, and YAML remain development-only. The dependency
|
|
541
|
+
policy rejects unapproved runtime or development dependencies. Archify is
|
|
542
|
+
vendored at `vendor/archify/v2.15.0/` rather than installed as a package.
|
|
517
543
|
|
|
518
544
|
To report vulnerabilities or contribute changes, see
|
|
519
545
|
[`SECURITY.md`](./SECURITY.md) and [`CONTRIBUTING.md`](./CONTRIBUTING.md).
|
package/TERMINOLOGY.md
CHANGED
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
| Integration level | The capability tier of an execution environment (`INSTRUCTION_DISCOVERED`, `PROTOCOL_CAPABLE`, `PROTOCOL_LIMITED`, `CONFORMANCE_VERIFIED`). |
|
|
34
34
|
| Recovered task | A non-terminal task whose ordinary mutation authority is suspended and whose effective write claims are released by durable `recovery.json` state. |
|
|
35
35
|
| Recovery acknowledgement | A caller declaration that it intends to recover a task classified `STALE` or `ABANDONED`; it is not a host-attested authority grant. |
|
|
36
|
+
| Active-task abandonment | An explicit caller-acknowledged `task-abandon` operation that releases validated claims for a non-terminal active task without changing its phase or asserting completion. |
|
|
37
|
+
| Abandonment event | The append-only `TASK_ABANDONED` recovery boundary and its transaction witness; it is distinct from automatic stale-task recovery and from completion. |
|
|
36
38
|
| Historical claims | The write claims retained in `task.json` as task history, including while recovery releases their active ownership. |
|
|
37
39
|
| Effective claims | The claims currently enforced for ownership conflicts: descriptor claims for an active task, or an empty set after validator-backed completion or active recovery. |
|
|
38
40
|
| Claim reacquisition | The serialized `task-resume` operation that rechecks conflicts and checkout cleanliness before removing recovery state and restoring mutation authority. |
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Third-Party Notices
|
|
2
2
|
|
|
3
3
|
This file records provenance and reuse boundaries for the external URLs cited
|
|
4
|
-
by the README and guides. A citation is a reference, not
|
|
5
|
-
resource is a dependency, bundled material, or available
|
|
4
|
+
by the README and guides. A citation is a reference, not by itself a
|
|
5
|
+
declaration that a resource is a dependency, bundled material, or available
|
|
6
|
+
for reuse.
|
|
6
7
|
|
|
7
8
|
## Collection license
|
|
8
9
|
|
|
@@ -100,11 +101,12 @@ dependencies, version, and distribution conditions before adoption.
|
|
|
100
101
|
### Runtime and validator boundary
|
|
101
102
|
|
|
102
103
|
The distributed CLI and repository validators use Node.js and Python standard
|
|
103
|
-
libraries plus the JSON Schema documents shipped in this repository.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
network behavior, and distribution terms
|
|
104
|
+
libraries plus the JSON Schema documents shipped in this repository. The core
|
|
105
|
+
CLI has one approved runtime package, `smol-toml`, for structural Cargo
|
|
106
|
+
manifest parsing; it is not used as an agent, provider, plugin, remote trace
|
|
107
|
+
service, or model. Every future runtime capability must review its own license,
|
|
108
|
+
dependency tree, credentials, network behavior, and distribution terms
|
|
109
|
+
separately.
|
|
108
110
|
|
|
109
111
|
## Visual, gradient, and gallery references
|
|
110
112
|
|
|
@@ -213,6 +215,16 @@ or make its prescriptive examples universal.
|
|
|
213
215
|
|
|
214
216
|
## Runtime dependencies with upstream notices
|
|
215
217
|
|
|
218
|
+
### smol-toml 1.8.0
|
|
219
|
+
|
|
220
|
+
- Project/source: [squirrelchat/smol-toml](https://github.com/squirrelchat/smol-toml).
|
|
221
|
+
- License declared by the upstream package: BSD-3-Clause.
|
|
222
|
+
- Use in this collection: bounded structural parsing of Rust `Cargo.toml`
|
|
223
|
+
manifests without executing Cargo or evaluating project code.
|
|
224
|
+
- Boundary: the exact version is pinned in `package.json` and
|
|
225
|
+
`package-lock.json`; the dependency has no role in routing authority beyond
|
|
226
|
+
the parser result and is not exposed as a public ForgeLoop integration.
|
|
227
|
+
|
|
216
228
|
### Microsoft tgrep
|
|
217
229
|
|
|
218
230
|
- Project: [microsoft/tgrep](https://github.com/microsoft/tgrep).
|
package/THREAT_MODEL.md
CHANGED
|
@@ -79,6 +79,7 @@ index location, process lifecycle, and normalized result boundary.
|
|
|
79
79
|
| Chronology rewrite | Hides execution before route, gates, or verification | `.forgeloop/events.ndjson` | Append-only local ledger, sequence numbers, hash chaining, and chronology validation without prompts or hidden reasoning | A privileged process can still replace the ledger after validation | `tests/lifecycle.test.js` |
|
|
80
80
|
| Concurrent protocol mutation | Two writers read the same state or ledger tail and silently overwrite each other | Task state, task event ledger, and transaction journal | Mutations acquire a lease-bearing task lock, stage writes in `.forgeloop/.txn/`, preserve a recovery manifest, and publish only after the callback completes; state mutators use an expected revision, while ledger appends validate a tail checkpoint and stage only a synchronized suffix | The filesystem does not provide a multi-file atomic commit primitive; a process killed during append is recovered by truncating to the journaled pre-append size rather than treated as complete | `tests/state-revision.test.js`, `tests/concurrent-ledger.test.js`, `tests/scale-ledger.test.js`, `tests/transaction.test.js` |
|
|
81
81
|
| Stale lock theft | A live process loses exclusive ownership because another process removes or replaces its lock | `.forgeloop/locks/<taskKey>.lock` | Locks record hostname, owner instance ID, heartbeat, and lease; inspection distinguishes `NONE`, `LIVE`, `STALE`, `UNKNOWN`, and `CORRUPT`; stale-only release quarantines the observed inode and compares lock ID, heartbeat, and owner instance before deletion | A malicious or separately privileged actor can still delete local locks; an expired lease remains a recovery heuristic rather than remote liveness proof | `tests/task-lock.test.js`, `tests/task-recover.test.js` |
|
|
82
|
+
| Active-task abandonment used to release another task's claims | A caller targets the wrong active task or races a lifecycle mutation to steal/release its write scope | Task identity, descriptor, work state, ledger, recovery artifact, project claims lock, and task transaction | `task-abandon` requires an explicit task ID and acknowledgement, validates canonical ownership and ledger integrity, serializes project/task mutation, revalidates phase/revision/ledger sequence/claims, and records append-only `TASK_ABANDONED` evidence without completion authority | A caller with legitimate local mutation authority can intentionally abandon its own task; that is the intended authority boundary | `tests/task-abandon.test.js`, `tests/task-recovery-concurrency.test.js` |
|
|
82
83
|
| Forged recovery tombstone | A schema-valid fake `recovery.json` makes historical claims disappear without an official recovery event | Task descriptor, recovery artifact, and complete event ledger | The canonical claim-state resolver releases claims only when every artifact field matches one unresolved recovery history cycle; a tombstone alone is `INCONSISTENT`, retains historical claims, and disables mutation | A privileged actor can replace every linked local artifact; validation proves consistency, not remote attestation | `tests/task-claim-state.test.js`, `tests/task-claim-ownership-integration.test.js`, `tests/task-recovery-invariants.test.js` |
|
|
83
84
|
| Forged completion claim release | An actor changes `work-state.phase` to `COMPLETE` to make write claims disappear without canonical completion | Work state, canonical completion event, and the complete validated event ledger | Claim ownership releases COMPLETE claims only when state and a validated lifecycle ledger prove canonical completion (`COMPLETION_VALIDATED` bound to the task, coherent state/ledger, no contradicting later lifecycle event); otherwise ownership is `INCONSISTENT` with historical claims retained, mutation disabled, and overlapping acquisition blocked (`E_COMPLETION_OWNERSHIP_UNPROVEN`) | A separately privileged actor can rewrite all local artifacts consistently; ForgeLoop provides consistency verification, not external cryptographic attestation | `tests/completion-claim-ownership.test.js`, `tests/task-claim-state.test.js` |
|
|
84
85
|
| Incomplete task-lock identity theft | A structurally incomplete persisted task lock (missing lockId, owner instance, operation, or lease) with plausible timestamps is classified LIVE/STALE and removed as stale | `.forgeloop/locks/<taskKey>.lock` identity validation | Task lock identity requires `taskId`, `lockId`, `ownerInstanceId`, `operation`, heartbeat, and a positive integer lease; incomplete metadata classifies `UNKNOWN` (never stale-releasable), lease values are never defaulted at validation time, and CAS release additionally requires `lock.taskId === requested taskId` plus unchanged observed identity | A privileged writer can still forge a fully identified lock; classification proves structure, not liveness | `tests/task-lock.test.js` |
|
|
@@ -86,6 +87,7 @@ index location, process lifecycle, and normalized result boundary.
|
|
|
86
87
|
| Forged legacy-migration authority | A forged `LEGACY_RECOVERY_MIGRATION_RECORDED` claims `HOST_ATTESTED` authority to impersonate a host grant | Migration event authority validation | Legacy migration v1 accepts only `CALLER_ACKNOWLEDGED`; any other authority kind makes the event invalid and the ledger INCONSISTENT | Normal recovery events retain their own host-attestation boundary with trusted grant references | `tests/task-repair-legacy-recovery.test.js` |
|
|
87
88
|
| MCP project-root substitution | A tool call supplies a different project root to read or mutate an unintended target | Immutable server-pinned project context | The ForgeLoop MCP server realpaths the project root once at startup and freezes it; project root is never a tool input | A privileged local process can still target other roots by launching its own server | `integrations/mcp/tests/` |
|
|
88
89
|
| MCP claim-projection fork | An adapter derives claim ownership from raw artifacts (task.json, recovery.json) and disagrees with the canonical resolver | Canonical ownership resource | The `task/ownership` resource is derived exclusively from `resolveTaskClaimState()`; forged COMPLETE stays INCONSISTENT with retained claims through the resource surface | Presentation bugs could still mislabel values; the resolver remains the single authority | `integrations/mcp/tests/ownership.test.js`, `tests/integration-resources.test.js` |
|
|
90
|
+
| Audit UX authority confusion or disclosure | A presentation consumer treats a read model as lifecycle authority or receives raw commands, paths, environment values, credentials, or provider output | Versioned bounded `task/audit-view` resource | The projection is read-only, resolver-backed, sequence-bounded, sanitized, and explicitly marks every authority dimension false | Presentation consumers must still preserve the canonical command/API boundary | `tests/audit-ux.test.js`, `tests/integration-capabilities.test.js` |
|
|
89
91
|
| MCP capability escalation via tool input | Tool input (e.g. `force: true`, `acknowledgeRecovery: true`) elevates a server started without the matching capability | Launch-level capability gates re-checked per invocation | Risk classification is invocation-level; disabled capabilities refuse with `E_MCP_CAPABILITY_DISABLED`; recovery acknowledgement never upgrades launch policy; legacy repair stays hidden by default; deprecated `operatorAuthorized` is absent from schemas | A separately authorized local actor can restart the server in full mode | `integrations/mcp/tests/policy.test.js`, `integrations/mcp/tests/safety.test.js` |
|
|
90
92
|
| MCP HTTP unauthenticated remote bind | A network-bound MCP endpoint exposes ForgeLoop operations to any reachable client without authentication | Loopback-only bind policy | The HTTP transport refuses every non-loopback bind with `E_MCP_REMOTE_NOT_SUPPORTED`; Host/Origin validation is defense against DNS rebinding, not authentication; remote access stays disabled until a separately designed authenticated boundary exists | A same-host process can still reach the loopback endpoint | `integrations/mcp/tests/http.test.js` |
|
|
91
93
|
| MCP protocol downgrade / legacy fallback | Legacy-era traffic is silently served, weakening the declared 2026 security posture | Strict modern mode | The HTTP handler is constructed with the SDK strict-modern setting (`legacy: "reject"`); legacy handshakes are answered with an unsupported-protocol-version rejection instead of being served | Stdio remains available for clients that only speak older protocol generations | `integrations/mcp/tests/http.test.js` |
|
|
@@ -160,6 +162,13 @@ treated as trusted protocol input.
|
|
|
160
162
|
| Provider identity substitution | Registry key and resolved provider `id` must match the declared identity | A host that controls the runtime registry can replace its own provider before the call | `tests/advisory-context-runtime.test.js` |
|
|
161
163
|
| Unbounded provider retrieval | Query, item, total-output, raw-result, and timeout budgets are normalized and enforced before/while provider execution | The host controls provider resource usage outside the bounded call | `tests/advisory-context-service.test.js`, `tests/advisory-context-provider.test.js` |
|
|
162
164
|
| Historical command replay from advisory text | Advisory output cannot satisfy command input, evidence, state, or next-action authority; recall is never automatic | A receiving host must still avoid copying untrusted text into its own command runner | `tests/advisory-context-security.test.js` |
|
|
165
|
+
| OpenSrc executable substitution or version drift | Absolute host-selected path with exact lazy `--version` qualification on every recall; no PATH discovery | A host that swaps the binary and version together defeats qualification by definition | `tests/opensrc-advisory-provider.test.js` |
|
|
166
|
+
| Malicious OpenSrc stdout path or cache escape | Exactly-one-line absolute-path rule, realpath canonicalization, cache containment, directory check, and symlink-escape rejection | A host-controlled cache root outside the project is assumed | `tests/opensrc-advisory-provider.test.js` |
|
|
167
|
+
| Prompt injection in fetched source | Inert bounded snippet text under `NON_EXECUTABLE` advisory trust; never executed or converted to authority | A host may still display advisory text outside ForgeLoop | `tests/opensrc-advisory-provider.test.js` |
|
|
168
|
+
| Credential or path leakage in errors and results | No raw stderr, environment, absolute cache path, or credentialed URL in public errors, items, sourceRefs, or transport metadata | Unknown encodings outside scanned fields remain host responsibility | `tests/opensrc-advisory-provider.test.js` |
|
|
169
|
+
| Unbounded source tree or binary ingestion | Sorted traversal, generated directories skipped at any depth, symlink discipline, per-source entry ceiling (5,000, counting skipped entries), per-source read cap, one shared 8 MiB recall read budget, shared recall deadline, and binary skip enforced before further reads | The host controls cache size outside the bounded recall | `tests/opensrc-search.test.js` |
|
|
170
|
+
| OpenSrc network and cache side effects | Explicit host-owned `OPENSRC_HOME`, documented fetch-on-miss, protocol-state side-effect-free recall | Registry access and cache writes are upstream OpenSrc behavior | `docs/OPENSRC_ADAPTER.md` |
|
|
171
|
+
| OpenSrc timeout or output overflow | Shared recall deadline, 64 KiB process ceilings, and SIGTERM/SIGKILL escalation | A hung child holds OS resources until the grace timers fire | `tests/opensrc-process.test.js` |
|
|
163
172
|
| Handoff acceptance replay | Acceptance is keyed by the immutable handoff and consumer identity and is checked against the append-only ledger | External systems may still deliver duplicate messages; callers must surface the canonical rejection | `tests/handoff-acceptance.test.js` |
|
|
164
173
|
| Handoff double-consumption race | Serialized ledger append and exactly-once acceptance projection permit one consumer; same-consumer retry is idempotent | Filesystem privilege outside ForgeLoop can still corrupt local artifacts | `tests/handoff-acceptance.test.js`, `tests/concurrent-ledger.test.js` |
|
|
165
174
|
| Stale Git checkout acceptance | Acceptance compares the handoff snapshot with the current branch and HEAD, work-state, contract, route, and changed paths | A separately privileged process can change the checkout immediately after validation | `tests/handoff-acceptance.test.js` |
|
|
@@ -169,6 +178,90 @@ treated as trusted protocol input.
|
|
|
169
178
|
ForgeLoop does not make advisory text trusted. It makes the boundary explicit,
|
|
170
179
|
bounded, and fail-closed where protocol-owned interpretation is required.
|
|
171
180
|
|
|
181
|
+
## Provider extension boundary
|
|
182
|
+
|
|
183
|
+
Provider output is untrusted input and the generic provider registry is an
|
|
184
|
+
internal experimental surface. The public `providerExtensions` capability does
|
|
185
|
+
not grant lifecycle, completion, evidence, or installation authority.
|
|
186
|
+
|
|
187
|
+
| Threat | Mitigation |
|
|
188
|
+
| --- | --- |
|
|
189
|
+
| Malicious provider output | Strict JSON snapshot |
|
|
190
|
+
| Mutable result after validation | Detached deep-frozen copy |
|
|
191
|
+
| Getter/accessor execution | Reject accessors |
|
|
192
|
+
| Proxy behavior | Reject proxies |
|
|
193
|
+
| Custom object semantics | Plain JSON boundary |
|
|
194
|
+
| Authority escalation | Reserved authority validation |
|
|
195
|
+
| Error spoofing | Normalize provider exceptions |
|
|
196
|
+
| Hanging factory | Shared deadline |
|
|
197
|
+
| Hanging operation | Shared deadline |
|
|
198
|
+
| Resource leak after timeout | Cooperative abort cleanup |
|
|
199
|
+
| Payload amplification | Byte, depth, and node budgets |
|
|
200
|
+
| Auto-install surprise | No installation authority |
|
|
201
|
+
| Public API confusion | No `./providers` export |
|
|
202
|
+
| False completion | Completion authority false |
|
|
203
|
+
| False evidence | ForgeLoop validation required |
|
|
204
|
+
|
|
205
|
+
## Security Review provider boundary
|
|
206
|
+
|
|
207
|
+
Security Review is an optional host-injected observation surface. It does not
|
|
208
|
+
install or discover scanners, execute provider text, persist task state, or
|
|
209
|
+
grant lifecycle, evidence, completion, claim, ownership, command, or
|
|
210
|
+
transaction authority. Requests and results are bounded strict snapshots and
|
|
211
|
+
the factory/review pair shares one deadline and cooperative cancellation.
|
|
212
|
+
|
|
213
|
+
| Threat | Mitigation |
|
|
214
|
+
| --- | --- |
|
|
215
|
+
| Malicious finding or fake completion claim | Reserved authority fields are rejected and trust metadata is stamped as observation-only, non-evidence, and non-executable. |
|
|
216
|
+
| Oversized or mutable request/result | Relative-path, string, finding, diagnostic, byte, depth, node, and result-size limits plus detached deep-frozen snapshots fail closed. |
|
|
217
|
+
| Provider hang or late completion | One shared deadline and `AbortSignal` cover lazy factory and review; late results cannot become observations. |
|
|
218
|
+
| Scanner auto-install or ambient execution | Registration is explicit and lazy; ForgeLoop does not discover `PATH`, install tools, invoke shells, or own provider credentials. |
|
|
219
|
+
| Sensitive output or path escape | Findings require bounded project-relative paths and reject secret-like content and absolute/file URLs. |
|
|
220
|
+
|
|
221
|
+
## Browser verification boundary
|
|
222
|
+
|
|
223
|
+
Browser verification is host-injected and explicit. It is not a browser
|
|
224
|
+
sandbox, lifecycle adapter, or completion bridge.
|
|
225
|
+
|
|
226
|
+
| Threat | Mitigation |
|
|
227
|
+
| --- | --- |
|
|
228
|
+
| Malicious provider or fake PASS/COMPLETE | Provider results cross a strict allowlist and authority-field rejection boundary; ForgeLoop derives status and stamps observation-only trust. |
|
|
229
|
+
| Factory or verify hang | One ForgeLoop-owned deadline covers factory resolution, validation, verify, and normalization; expiry aborts the shared signal and applies bounded cleanup. |
|
|
230
|
+
| Redirect escape or origin confusion | HTTP(S)-only, credential-free `finalUrl` and every reported navigation are checked against exact normalized allowed origins. |
|
|
231
|
+
| Cookie, token, authorization, signed URL, or path leakage | Public provider failures are generic; portable observation fields and artifact refs reject sensitive patterns and absolute/file URLs. |
|
|
232
|
+
| Prompt injection or malicious snapshots | Snapshot and diagnostic text is bounded portable observation only and has no executable or lifecycle semantics. |
|
|
233
|
+
| Screenshot metadata abuse | Artifacts are bounded structured metadata with positive byte length, canonical SHA-256, portable refs, and no raw bytes. |
|
|
234
|
+
| Oversized DOM or output | Bounded steps, assertions, snapshots, diagnostics, artifacts, URLs, and result size limits fail closed. |
|
|
235
|
+
| Arbitrary JavaScript, file/data URLs, upload/download, or credentials | Strict request allowlists reject unsupported fields and non-HTTP(S)/credential-bearing URLs. |
|
|
236
|
+
| Provider session reuse or browser network access | Providers own session cleanup and network behavior; ForgeLoop makes no sandbox claim and does not install or discover browsers. |
|
|
237
|
+
|
|
238
|
+
The optional Agent Browser adapter adds a concrete process boundary without
|
|
239
|
+
changing those claims:
|
|
240
|
+
|
|
241
|
+
| Threat | Mitigation | Residual limitation | Test evidence |
|
|
242
|
+
| --- | --- | --- | --- |
|
|
243
|
+
| Executable substitution or shell injection | Absolute regular executable, `shell:false`, argv arrays, lazy exact-version check, and no PATH discovery | A privileged host can replace its executable between checks | `tests/agent-browser-process.test.js`, `tests/agent-browser-provider.test.js` |
|
|
244
|
+
| Session/profile or ambient credential reuse | Fresh random session, adapter-owned cwd, filtered profile/restore/state/CDP/auto-connect/plugin/auth variables, and close in `finally` | Host-level browser state outside the adapter remains host responsibility | `tests/agent-browser-provider.test.js` |
|
|
245
|
+
| Origin escape or malicious redirect | ForgeLoop exact-origin validation plus Agent Browser hostname allowlist | Host/browser networking is not a general sandbox | `tests/agent-browser-provider.test.js` |
|
|
246
|
+
| Screenshot or process-output leakage | Temporary screenshot bytes, portable digest refs, bounded stdout/stderr, and generic errors | Host process and filesystem policy remain outside ForgeLoop | `tests/agent-browser-process.test.js`, core normalization tests |
|
|
247
|
+
| Incomplete or spoofed command observations | Strict `{success:true,data}` envelopes, typed scalar observations, derived assertion status, and observation-only normalization | A real browser remains an external host capability | `tests/agent-browser-process.test.js`, `tests/agent-browser-provider.test.js` |
|
|
248
|
+
| Temporary workspace overlap | Adapter-owned cwd and rejection of a configured temp root inside the verification target | Symlink and host filesystem policy remain host responsibilities | `tests/agent-browser-provider.test.js` |
|
|
249
|
+
|
|
250
|
+
## Emulated Services provider boundary
|
|
251
|
+
|
|
252
|
+
The optional Emulated Services adapter is a host-owned observation boundary for
|
|
253
|
+
`vercel-labs/emulate` `0.11.2`. It is explicit and lazy: ForgeLoop neither
|
|
254
|
+
installs nor discovers the executable and never grants the provider lifecycle,
|
|
255
|
+
evidence, installation, or completion authority.
|
|
256
|
+
|
|
257
|
+
| Threat | Mitigation | Residual limitation | Test evidence |
|
|
258
|
+
| --- | --- | --- | --- |
|
|
259
|
+
| Executable substitution or shell injection | Absolute regular executable, exact version qualification, argv-only spawn with `shell:false`, and no PATH discovery | A privileged host can replace its executable between checks | `tests/emulated-services.test.js` |
|
|
260
|
+
| Ambient credential or secret leakage | Minimal environment allowlist, no raw stdout/stderr in public results, and no provider-controlled environment fields | Host process policy remains host responsibility | `tests/emulated-services.test.js` |
|
|
261
|
+
| State overlap or project mutation | Random adapter-owned temporary cwd, target-root separation, and forced recursive cleanup | Host filesystem policy and symlink races remain host responsibilities | `tests/emulated-services.test.js` |
|
|
262
|
+
| Unbounded child, output, or readiness | Bounded timeout, cancellation, stdout/stderr ceilings, readiness polling, SIGTERM/SIGKILL escalation, and fail-closed cleanup | A hostile child may consume resources until the OS releases it | `tests/emulated-services.test.js` |
|
|
263
|
+
| Remote endpoint or authority confusion | Adapter constructs and validates loopback-only HTTP endpoints and returns detached observation-only results | The host controls the local service implementation | `tests/emulated-services.test.js` |
|
|
264
|
+
|
|
172
265
|
## Structural-quality provider boundary
|
|
173
266
|
|
|
174
267
|
Structural-quality observations are untrusted external data. The built-in
|
|
@@ -193,6 +286,30 @@ context.
|
|
|
193
286
|
ForgeLoop never changes Sentrux analytics preferences, installs the provider,
|
|
194
287
|
or treats Sentrux Free diagnostics as necessary for score correctness.
|
|
195
288
|
|
|
289
|
+
## Semantic decision safety floor
|
|
290
|
+
|
|
291
|
+
Jev (the pinned TypeSafe `jev-1.13.0` model) is a non-authoritative semantic
|
|
292
|
+
plane: it may rank or exclude only deterministically eligible, non-mandatory
|
|
293
|
+
route guides, and it may raise but never lower the execution-profile safety
|
|
294
|
+
floor. Mandatory safety protection is derived from canonical deterministic route
|
|
295
|
+
reasons (`MANDATORY_SAFETY_REASONS` in `src/core/router.js`: auth surface plus
|
|
296
|
+
the untrusted-input, personal-data, secrets, external-service, and publication
|
|
297
|
+
trust-boundary risks), so a high-confidence semantic exclusion can never remove
|
|
298
|
+
the `security` guide the router selected for a trust boundary; retained
|
|
299
|
+
mandatory guides carry an explicit `MANDATORY_SAFETY_GUIDE` reason and
|
|
300
|
+
low-confidence exclusions are retained as `JEV_LOW_CONFIDENCE_RETAINED`.
|
|
301
|
+
Semantic decisions consume only sanitized bounded state, and credential material
|
|
302
|
+
is excluded from state, artifacts, diagnostics, and logs. A semantic decision
|
|
303
|
+
that cannot be obtained fails closed rather than silently weakening routing.
|
|
304
|
+
|
|
305
|
+
| Threat | Mitigation |
|
|
306
|
+
| --- | --- |
|
|
307
|
+
| High-confidence Jev exclusion removes a deterministic mandatory safety guide | Protection derives from the router's own canonical safety reason set; `external-service` and other trust-boundary reasons retain `security` with `MANDATORY_SAFETY_GUIDE` |
|
|
308
|
+
| Semantic plane drifts from deterministic eligibility | Jev operates only on deterministically eligible guides; it never creates eligibility, lowers the profile floor, or bypasses fail-closed cutover |
|
|
309
|
+
|
|
310
|
+
`tests/execution-profile.test.js`, `tests/jev-decision-enforcement.test.js`,
|
|
311
|
+
`tests/decision-cutover.test.js`.
|
|
312
|
+
|
|
196
313
|
## Boundary rules
|
|
197
314
|
|
|
198
315
|
- Safe paths are checked before reading or writing; no protocol field is a
|
|
@@ -215,4 +332,26 @@ point at misleading files, claim verification/publication occurred, encode
|
|
|
215
332
|
secret material, attempt path traversal, or imply authority. Mitigations are a
|
|
216
333
|
bounded strict schema, secret-free writes, relative safe paths, task/contract/
|
|
217
334
|
work-state fingerprint binding, current-checkout reconciliation, explicit
|
|
218
|
-
non-evidence semantics, and complete separation from
|
|
335
|
+
non-evidence semantics, optional absence handling, and complete separation from
|
|
336
|
+
authority grants. A missing continuity artifact is `NOT_APPLICABLE`; a present
|
|
337
|
+
but malformed artifact remains fail-closed and continuity never supplies
|
|
338
|
+
completion evidence.
|
|
339
|
+
|
|
340
|
+
## Bootstrap Gate And Contract Provenance
|
|
341
|
+
|
|
342
|
+
Built-in contract preset references are limited to the canonical
|
|
343
|
+
`contract-preset:documentation`, `contract-preset:bug`, `contract-preset:feature`,
|
|
344
|
+
and `contract-preset:release` namespace. Unknown values in that namespace are
|
|
345
|
+
rejected, while mixed contracts still require external source-registry entries.
|
|
346
|
+
|
|
347
|
+
The `gate-record` command accepts only route- or policy-required gates before
|
|
348
|
+
execution. ForgeLoop computes referenced artifact hashes and rejects absolute,
|
|
349
|
+
traversal, missing, directory, and symlink-escaping paths. Gate decisions are
|
|
350
|
+
caller-recorded observations and cannot claim host attestation or ForgeLoop
|
|
351
|
+
execution provenance.
|
|
352
|
+
|
|
353
|
+
The same boundary prevents fake caller digests, stale artifact approval,
|
|
354
|
+
post-execution gate rewrites, and task substitution: digests are computed from
|
|
355
|
+
bytes, preflight revalidates them, mutation freezes at execution, and persisted
|
|
356
|
+
gate task IDs are checked against the active contract. Unknown preset names are
|
|
357
|
+
rejected rather than becoming a spoofable built-in source namespace.
|