@cassiomc1/forgeloop 1.13.0 → 2.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENT_COMPATIBILITY.md +8 -0
- package/CONTRIBUTING.md +11 -7
- package/DOCS_INDEX.md +37 -4
- package/ENG/c-development-eng.md +2 -2
- package/ENG/cpp-development-eng.md +2 -2
- package/ENG/dotnet-aspnetcore-development-eng.md +7 -1
- package/ENG/flutter-development-eng.md +4 -2
- package/ENG/go-development-eng.md +2 -2
- package/ENG/java-development-eng.md +3 -3
- package/ENG/nodejs-backend-development-eng.md +10 -6
- package/ENG/php-development-eng.md +3 -3
- package/ENG/python-development-eng.md +205 -0
- package/ENG/rust-development-eng.md +42 -1
- package/ENG/sec-code-eng.md +7 -7
- package/ENG/sql-development-eng.md +4 -4
- package/ENG/swift-development-eng.md +5 -4
- package/ENG/test-code-eng.md +1 -1
- package/ENG/typescript-development-eng.md +4 -4
- package/EXECUTION_STATE.md +12 -0
- package/GUIDE_ROUTER.md +6 -0
- package/LICENSE +133 -21
- package/LOOP_ENGINEERING.md +28 -2
- package/LOOP_SYSTEM_DESIGN.md +10 -10
- package/ORCHESTRATOR_INTEGRATION.md +9 -5
- package/PROTOCOL_INTEGRATION.md +55 -2
- package/README.md +63 -59
- package/TERMINOLOGY.md +2 -0
- package/THIRD_PARTY_NOTICES.md +3 -4
- package/THREAT_MODEL.md +140 -1
- package/completions/_forgeloop +29 -3
- package/completions/forgeloop.bash +55 -3
- package/completions/forgeloop.fish +183 -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 +74 -39
- package/docs/AGENT_SKILL.md +66 -0
- package/docs/ARTIFACT_REFERENCE.md +171 -35
- package/docs/AUDIT_UX.md +46 -0
- package/docs/BROWSER_VERIFICATION.md +136 -0
- package/docs/CLI_REFERENCE.md +512 -8
- package/docs/CODE_ATTESTATION.md +2 -2
- package/docs/DOCUMENTATION_GUIDE.md +34 -11
- package/docs/GETTING_STARTED.md +3 -3
- 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 +46 -18
- package/docs/PROVIDERS.md +126 -0
- package/docs/PROVIDER_ARCHITECTURE.md +199 -0
- package/docs/RECIPES.md +9 -0
- package/docs/RELEASE_CHECKLIST.md +116 -12
- package/docs/SECURITY_REVIEW.md +71 -0
- package/docs/SELF_HOSTED_TESTS.md +121 -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 +198 -1
- 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 +774 -16
- package/docs/protocol-requirements.json +24 -0
- package/package.json +43 -11
- package/schemas/config.schema.json +14 -0
- package/schemas/context-plan.schema.json +18 -0
- package/schemas/semantic-decision.schema.json +46 -0
- package/schemas/task-bundle.schema.json +7 -2
- package/schemas/test-utility.schema.json +44 -0
- package/scripts/CI_VALIDATORS.md +6 -6
- package/scripts/benchmark-jev.mjs +5 -0
- package/scripts/benchmark-test-intelligence.mjs +4 -0
- package/scripts/generate-agent-protocol-summary.mjs +6 -3
- package/scripts/generate-forgeloop-skill.mjs +133 -0
- package/scripts/jev-smoke.mjs +19 -0
- package/scripts/run-mcp-clean-tests.mjs +30 -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 +316 -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 +289 -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/temporary-paths.js +18 -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 +218 -174
- package/src/commands/action-show.js +5 -2
- package/src/commands/advance.js +5 -1
- package/src/commands/baseline.js +13 -11
- package/src/commands/checkpoint-revalidate.js +192 -0
- package/src/commands/complete.js +19 -3
- package/src/commands/context-plan.js +38 -0
- package/src/commands/contract-create.js +266 -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 +51 -13
- package/src/commands/gate-record.js +194 -0
- package/src/commands/gate-revalidate.js +135 -0
- package/src/commands/handoff-list.js +6 -1
- package/src/commands/handoff-show.js +6 -1
- package/src/commands/migrate-protocol.js +2 -2
- package/src/commands/model-route.js +40 -0
- package/src/commands/next.js +7 -1
- package/src/commands/policy-diff.js +25 -4
- package/src/commands/progress.js +17 -11
- package/src/commands/record-diagnosis.js +3 -0
- package/src/commands/route.js +146 -18
- package/src/commands/semantic-plan.js +41 -0
- package/src/commands/status.js +6 -1
- package/src/commands/storage-backup.js +15 -0
- package/src/commands/storage-migrate.js +5 -0
- package/src/commands/storage-migration-resume.js +5 -0
- package/src/commands/storage-migration-status.js +44 -0
- package/src/commands/storage-restore-resume.js +7 -0
- package/src/commands/storage-restore.js +8 -0
- package/src/commands/task-abandon.js +224 -0
- package/src/commands/task-list.js +8 -43
- package/src/commands/task-migrate-contract-bootstrap-repair.js +288 -0
- package/src/commands/task-migrate.js +3 -3
- package/src/commands/task-recover.js +10 -2
- package/src/commands/task-repair-contract-bootstrap.js +263 -0
- package/src/commands/task-scope.js +18 -2
- package/src/commands/task-show.js +16 -2
- 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 +39 -15
- package/src/commands/validate-receipt.js +8 -1
- package/src/config/guides.json +4 -0
- package/src/core/action-ledger-projection.js +10 -3
- package/src/core/actions.js +38 -75
- package/src/core/activation.js +11 -3
- package/src/core/approvals.js +17 -51
- package/src/core/artifact-registry.js +83 -2
- package/src/core/artifacts.js +81 -27
- package/src/core/attachment-paths.js +45 -0
- package/src/core/attestation-coverage.js +6 -1
- package/src/core/attestation-verifier.js +21 -2
- package/src/core/attestation.js +17 -6
- package/src/core/audit-ux.js +514 -0
- package/src/core/audit.js +6 -1
- 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/bundles.js +160 -66
- package/src/core/checkpoint-revalidation.js +321 -0
- package/src/core/cli-command-definitions.js +350 -7
- package/src/core/code-manifest.js +9 -3
- package/src/core/command-executors.js +274 -108
- package/src/core/command-input.js +136 -44
- package/src/core/completion-artifacts.js +85 -34
- package/src/core/completion-ownership.js +19 -8
- package/src/core/completion-recovery-rebind.js +11 -1
- package/src/core/completion.js +64 -15
- package/src/core/config.js +3 -0
- package/src/core/conformance.js +2 -1
- 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/continuity-lint.js +13 -2
- package/src/core/continuity-reconciliation.js +16 -3
- package/src/core/continuity.js +16 -8
- package/src/core/contract-bootstrap-recovery.js +656 -0
- package/src/core/contract-revision.js +209 -0
- package/src/core/decision/artifact.js +70 -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 +104 -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 +138 -0
- package/src/core/decision/result.js +58 -0
- package/src/core/decision/service.js +181 -0
- package/src/core/decision/state-builder.js +65 -0
- package/src/core/decision/task-bindings.js +35 -0
- package/src/core/decision/test-provider.js +32 -0
- package/src/core/decision/thresholds.js +15 -0
- package/src/core/diagnosis-model.js +11 -0
- package/src/core/diagnosis.js +10 -1
- package/src/core/diagnostic-projection.js +29 -12
- package/src/core/diagnostic-record.js +28 -3
- package/src/core/efficiency.js +6 -1
- package/src/core/error-codes.js +278 -0
- package/src/core/events.js +535 -147
- package/src/core/evidence-readiness.js +9 -0
- package/src/core/execution-prerequisites.js +36 -13
- package/src/core/execution-profile.js +63 -38
- package/src/core/execution.js +26 -40
- package/src/core/filesystem.js +11 -0
- package/src/core/gate-artifact.js +105 -19
- package/src/core/gate-provenance.js +125 -0
- package/src/core/handoff.js +26 -14
- package/src/core/history.js +39 -35
- package/src/core/hypothesis-projection.js +32 -0
- package/src/core/information-gain-projection.js +104 -100
- package/src/core/inspect.js +12 -3
- package/src/core/integration-invocation-policy.js +37 -4
- package/src/core/integration-resources.js +119 -87
- package/src/core/ledger-event-collection.js +189 -0
- package/src/core/ledger-relations.js +23 -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/native-storage.js +12 -0
- package/src/core/next-action-continuity.js +31 -9
- package/src/core/next-action-model.js +58 -0
- package/src/core/next-action-phases.js +131 -43
- package/src/core/next-action-refresh.js +43 -9
- package/src/core/next-action-review-phase.js +9 -4
- package/src/core/next-action-verification-phase.js +2 -1
- package/src/core/next-action.js +56 -9
- package/src/core/phase.js +266 -103
- package/src/core/policy-engine.js +12 -13
- package/src/core/preflight-consistency.js +89 -62
- package/src/core/preflight-loaders.js +48 -9
- package/src/core/preflight-model.js +6 -1
- package/src/core/preflight.js +29 -12
- package/src/core/progress.js +21 -10
- package/src/core/protocol-info.js +68 -0
- package/src/core/protocol-migration.js +7 -6
- package/src/core/protocol.js +20 -0
- package/src/core/reconcile-closure.js +281 -67
- package/src/core/recovery-history.js +67 -47
- package/src/core/reflection.js +72 -77
- package/src/core/responsibility.js +25 -13
- package/src/core/resumability.js +154 -44
- package/src/core/route-artifact.js +28 -4
- package/src/core/router.js +67 -1
- package/src/core/runtime-context.js +123 -61
- package/src/core/schema-validation.js +11 -3
- 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/settlement.js +12 -1
- package/src/core/signing/bundle-file.js +53 -0
- package/src/core/signing/bundle-reference.js +15 -0
- package/src/core/signing/sigstore.js +60 -33
- package/src/core/signing/statement-file.js +27 -0
- package/src/core/sources.js +37 -0
- package/src/core/storage-runtime-registry.js +41 -0
- package/src/core/structural-quality/artifacts.js +20 -14
- package/src/core/structural-quality/service.js +81 -56
- package/src/core/target-layout.js +1 -1
- package/src/core/task-claim-state.js +249 -15
- package/src/core/task-command.js +21 -1
- package/src/core/task-conflict-inspection.js +133 -102
- package/src/core/task-descriptor.js +29 -22
- package/src/core/task-discovery.js +288 -90
- package/src/core/task-lock.js +66 -306
- package/src/core/task-migration-validation.js +5 -5
- package/src/core/task-migration.js +17 -287
- package/src/core/task-paths.js +13 -0
- package/src/core/task-recovery.js +1 -0
- package/src/core/task-snapshot.js +51 -8
- package/src/core/task-storage-migration.js +18 -0
- package/src/core/templates.js +23 -8
- 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 +94 -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 +164 -105
- package/src/core/trajectory-evaluation.js +15 -3
- package/src/core/trajectory-metrics.js +47 -32
- package/src/core/transaction.js +16 -287
- package/src/core/verification-scope.js +20 -12
- package/src/core/work-state.js +100 -59
- 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/src/repository-index/binary-manager.js +7 -5
- package/src/storage/artifact-bytes.js +22 -0
- package/src/storage/attachment-binding.js +11 -0
- package/src/storage/attachment-files.js +82 -0
- package/src/storage/attachment-references.js +36 -0
- package/src/storage/backup.js +53 -0
- package/src/storage/capabilities.js +31 -0
- package/src/storage/connection-owner.js +119 -0
- package/src/storage/connection.js +376 -0
- package/src/storage/existing-project-scope.js +45 -0
- package/src/storage/export-destination.js +44 -0
- package/src/storage/exporter.js +284 -0
- package/src/storage/file-durability.js +46 -0
- package/src/storage/importer.js +461 -0
- package/src/storage/index.js +74 -0
- package/src/storage/leases.js +63 -0
- package/src/storage/ledger-event-snapshot.js +150 -0
- package/src/storage/ledger-relations.js +220 -0
- package/src/storage/legacy-maintenance-boundary.js +18 -0
- package/src/storage/legacy-signature.js +115 -0
- package/src/storage/maintenance-handoff.js +129 -0
- package/src/storage/maintenance-owner.js +42 -0
- package/src/storage/maintenance.js +310 -0
- package/src/storage/metadata-json.js +35 -0
- package/src/storage/migration-activate.js +59 -0
- package/src/storage/migration-archive.js +57 -0
- package/src/storage/migration-attachment-root.js +61 -0
- package/src/storage/migration-candidate.js +398 -0
- package/src/storage/migration-publication.js +143 -0
- package/src/storage/migration-rollback-admission.js +54 -0
- package/src/storage/migration-rollback-preparation.js +132 -0
- package/src/storage/migration-rollback-publication.js +183 -0
- package/src/storage/migration-rollback-release.js +66 -0
- package/src/storage/migration-rollback-source-stage.js +103 -0
- package/src/storage/migration-rollback.js +43 -0
- package/src/storage/migration-source-partition.js +56 -0
- package/src/storage/migration-source.js +255 -0
- package/src/storage/migration-terminal.js +39 -0
- package/src/storage/migration-validation.js +75 -0
- package/src/storage/migration.js +43 -0
- package/src/storage/operational-attachments.js +49 -0
- package/src/storage/operational-context.js +50 -0
- package/src/storage/project-backup.js +98 -0
- package/src/storage/project-bootstrap.js +24 -0
- package/src/storage/project-boundary.js +79 -0
- package/src/storage/project-read-snapshot.js +18 -0
- package/src/storage/project-replacement.js +137 -0
- package/src/storage/project-restore.js +203 -0
- package/src/storage/record-definitions.js +45 -0
- package/src/storage/repository.js +507 -0
- package/src/storage/restore-journal.js +62 -0
- package/src/storage/restore-layout.js +30 -0
- package/src/storage/restore-preparation.js +84 -0
- package/src/storage/restore-replacement-archive.js +162 -0
- package/src/storage/restore-replacement-owner.js +31 -0
- package/src/storage/restore-replacement-preparation.js +128 -0
- package/src/storage/restore-replacement.js +142 -0
- package/src/storage/restore-terminal.js +32 -0
- package/src/storage/runtime.js +31 -0
- package/src/storage/schema.js +214 -0
- package/src/storage/singleton-import.js +84 -0
- package/src/storage/snapshot-continuity.js +16 -0
- package/src/storage/snapshot.js +36 -0
- package/src/storage/storage-marker.js +79 -0
- package/src/storage/task-guards.js +107 -0
- package/src/storage/topology.js +42 -0
- package/src/storage/transaction.js +179 -0
- package/src/storage/unit-of-work.js +663 -0
- package/src/storage/windows-process-incarnation.js +206 -0
- package/.forgeloop/forgeloop.gitignore +0 -4
- package/LICENSE-DOCS.md +0 -13
- package/src/core/transaction-maintenance.js +0 -70
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# ForgeLoop — Verifiable Engineering Protocol
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<img src="./docs/assets/
|
|
4
|
+
<img src="./docs/assets/forgeloop-architecture.png" alt="ForgeLoop architecture infographic" width="100%">
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
[](https://github.com/cassiomc1/forgeloop/actions/workflows/codeql.yml)
|
|
@@ -11,16 +11,9 @@
|
|
|
11
11
|
[](https://github.com/cassiomc1/forgeloop/actions/workflows/package-smoke.yml)
|
|
12
12
|
[](https://github.com/cassiomc1/forgeloop/actions/workflows/release-notes.yml)
|
|
13
13
|
|
|
14
|
-
ForgeLoop is
|
|
15
|
-
It turns outcomes into contracts, deterministic routing, resumable state,
|
|
16
|
-
evidence-backed verification, recovery, cross-harness continuity, repository
|
|
17
|
-
discovery, and validator-backed completion—not an agent or LLM runtime.
|
|
14
|
+
ForgeLoop is the deterministic governor for AI-assisted engineering. Jev provides bounded System One semantic input; the host coding model provides System Two implementation. ForgeLoop owns lifecycle, claims, gates, evidence, completion, recovery, and publication truth.
|
|
18
15
|
|
|
19
|
-
Operational sources
|
|
20
|
-
[`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) is canonical;
|
|
21
|
-
[`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md) defines discovery,
|
|
22
|
-
[`PROJECT_PROFILE.md`](./PROJECT_PROFILE.md) stores project facts, and
|
|
23
|
-
[`GUIDE_ROUTER.md`](./GUIDE_ROUTER.md) selects relevant guides.
|
|
16
|
+
Operational sources: [`DOCS_INDEX.md`](./DOCS_INDEX.md); [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md) is canonical; [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md) defines discovery; [`PROJECT_PROFILE.md`](./PROJECT_PROFILE.md) stores project facts; [`GUIDE_ROUTER.md`](./GUIDE_ROUTER.md) selects guides.
|
|
24
17
|
|
|
25
18
|
## Where should I start?
|
|
26
19
|
|
|
@@ -29,7 +22,9 @@ Operational sources are indexed in [`DOCS_INDEX.md`](./DOCS_INDEX.md).
|
|
|
29
22
|
- **Full protocol specification** → [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md)
|
|
30
23
|
- **Integrating an AI harness** → [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md)
|
|
31
24
|
- **Optional advisory context providers** → [`docs/ADVISORY_CONTEXT.md`](./docs/ADVISORY_CONTEXT.md)
|
|
25
|
+
- **Provider extension architecture** → [`docs/PROVIDER_ARCHITECTURE.md`](./docs/PROVIDER_ARCHITECTURE.md) and [`docs/PROVIDERS.md`](./docs/PROVIDERS.md)
|
|
32
26
|
- **Agent bootstrap summary** → [`docs/AGENT_PROTOCOL_SUMMARY.md`](./docs/AGENT_PROTOCOL_SUMMARY.md)
|
|
27
|
+
- **Portable ForgeLoop Agent Skill** → [`skills/forgeloop/SKILL.md`](./skills/forgeloop/SKILL.md) and [`docs/AGENT_SKILL.md`](./docs/AGENT_SKILL.md)
|
|
33
28
|
- **Continuing another harness's task** → [`docs/CROSS_HARNESS_CONTINUITY.md`](./docs/CROSS_HARNESS_CONTINUITY.md)
|
|
34
29
|
- **CLI command reference** → [`docs/CLI_REFERENCE.md`](./docs/CLI_REFERENCE.md)
|
|
35
30
|
- **Artifact & schema reference** → [`docs/ARTIFACT_REFERENCE.md`](./docs/ARTIFACT_REFERENCE.md)
|
|
@@ -42,10 +37,7 @@ Operational sources are indexed in [`DOCS_INDEX.md`](./DOCS_INDEX.md).
|
|
|
42
37
|
|
|
43
38
|
## Real execution proof
|
|
44
39
|
|
|
45
|
-
The repository-only [execution PoC](https://github.com/cassiomc1/forgeloop/blob/main/poc/README.md)
|
|
46
|
-
artifacts, trusted provenance, receipts, evidence, and audit. It reached
|
|
47
|
-
validator-backed `COMPLETE / VALID` and preserves a later
|
|
48
|
-
`E_RECEIPT_PATH_MISMATCH` after publication changed the repository.
|
|
40
|
+
The repository-only [execution PoC](https://github.com/cassiomc1/forgeloop/blob/main/poc/README.md) demonstrates workload, protocol artifacts, trusted provenance, receipts, evidence, audit, and validator-backed `COMPLETE / VALID`.
|
|
49
41
|
|
|
50
42
|
- [Canonical technical audit](https://github.com/cassiomc1/forgeloop/blob/main/poc/reports/poc-20260826-real-execution-technical-audit-v2.md)
|
|
51
43
|
- [Evidence package](https://github.com/cassiomc1/forgeloop/tree/main/poc/evidence/poc-20260826-real-execution/)
|
|
@@ -74,29 +66,38 @@ validator-backed `COMPLETE / VALID` and preserves a later
|
|
|
74
66
|
| SQL | [guide](./ENG/sql-development-eng.md) |
|
|
75
67
|
| Go | [guide](./ENG/go-development-eng.md) |
|
|
76
68
|
| TypeScript | [guide](./ENG/typescript-development-eng.md) |
|
|
69
|
+
| Python | [guide](./ENG/python-development-eng.md) |
|
|
77
70
|
| PHP | [guide](./ENG/php-development-eng.md) |
|
|
78
71
|
| Swift | [guide](./ENG/swift-development-eng.md) |
|
|
79
72
|
| Structural quality feedback | [`docs/STRUCTURAL_QUALITY.md`](./docs/STRUCTURAL_QUALITY.md) |
|
|
80
73
|
|
|
81
|
-
Routing uses bounded structural evidence
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
74
|
+
Routing uses bounded structural evidence; SQL remains a schema/query/migration
|
|
75
|
+
overlay. Extensions, tool files, lockfiles, runtime images, and prose alone do
|
|
76
|
+
not establish project identity. Public project evidence remains v1.
|
|
77
|
+
|
|
78
|
+
## Distribution and license
|
|
79
|
+
|
|
80
|
+
GitHub hosts source and issues. The core npm package is publicly available;
|
|
81
|
+
the MCP companion retains restricted distribution.
|
|
82
|
+
ForgeLoop-owned source and documentation are licensed under the
|
|
83
|
+
[PolyForm Noncommercial License 1.0.0](./LICENSE). Commercial use is not granted
|
|
84
|
+
by this license. Third-party notices are documented in
|
|
85
|
+
[`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md).
|
|
86
86
|
|
|
87
87
|
## Quickstart
|
|
88
88
|
|
|
89
89
|
### Installation
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
in your terminal:
|
|
91
|
+
After your organization grants access, configure npm authentication and install:
|
|
93
92
|
|
|
94
93
|
```bash
|
|
95
94
|
npm install --global @cassiomc1/forgeloop
|
|
96
95
|
forgeloop --version
|
|
97
96
|
```
|
|
98
97
|
|
|
99
|
-
|
|
98
|
+
Requires Node 24.19.0+ with `node:sqlite`. Migrate legacy state explicitly.
|
|
99
|
+
|
|
100
|
+
Inside your project:
|
|
100
101
|
|
|
101
102
|
```bash
|
|
102
103
|
forgeloop init
|
|
@@ -104,29 +105,20 @@ forgeloop doctor
|
|
|
104
105
|
forgeloop search "example"
|
|
105
106
|
```
|
|
106
107
|
|
|
107
|
-
If you prefer not to install globally, use `npx`:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
npx @cassiomc1/forgeloop init
|
|
111
|
-
npx @cassiomc1/forgeloop doctor
|
|
112
|
-
```
|
|
113
|
-
|
|
114
108
|
### 60-second demonstration
|
|
115
109
|
|
|
116
|
-
In a disposable directory, initialize the kit and create an isolated task.
|
|
117
|
-
|
|
110
|
+
In a disposable directory, initialize the kit and create an isolated task.
|
|
111
|
+
Semantic checkpoints require a host-configured `TYPESAFE_API_KEY`; ForgeLoop never persists it.
|
|
118
112
|
|
|
119
113
|
```bash
|
|
120
114
|
npx @cassiomc1/forgeloop init
|
|
121
115
|
forgeloop task-create --task demo --claim src --json
|
|
122
|
-
forgeloop
|
|
116
|
+
forgeloop contract-create --task demo --preset documentation --json
|
|
117
|
+
forgeloop route --task demo --work code --json
|
|
123
118
|
forgeloop preflight --task demo --json
|
|
124
119
|
forgeloop next --task demo --json
|
|
125
120
|
```
|
|
126
121
|
|
|
127
|
-
The last command reports the next safe action; it does not execute code or
|
|
128
|
-
schedule agents.
|
|
129
|
-
|
|
130
122
|
### Optional code attestation
|
|
131
123
|
|
|
132
124
|
Projects may opt into source-content attestation after a valid completion. The
|
|
@@ -152,7 +144,9 @@ results. Provider output is never lifecycle state, evidence, authority,
|
|
|
152
144
|
completion truth, or next-action authority, and it is never executable as a
|
|
153
145
|
protocol command. The optional Ripwire adapter follows the same boundary; see
|
|
154
146
|
[`docs/ADVISORY_CONTEXT.md`](./docs/ADVISORY_CONTEXT.md) and
|
|
155
|
-
[`docs/RIPWIRE_ADAPTER.md`](./docs/RIPWIRE_ADAPTER.md).
|
|
147
|
+
[`docs/RIPWIRE_ADAPTER.md`](./docs/RIPWIRE_ADAPTER.md). The optional OpenSrc
|
|
148
|
+
adapter exposes external package source context through the same boundary; see
|
|
149
|
+
[`docs/OPENSRC_ADAPTER.md`](./docs/OPENSRC_ADAPTER.md).
|
|
156
150
|
|
|
157
151
|
### Optional task boundaries and differential verification
|
|
158
152
|
|
|
@@ -178,8 +172,8 @@ raising `VERIFIED` to `ATTESTED`. See [`docs/REVISION_PROVIDERS.md`](./docs/REVI
|
|
|
178
172
|
|
|
179
173
|
Generic CI provides a platform-neutral revision-range boundary; thin GitHub,
|
|
180
174
|
GitLab, local, or enterprise adapters may translate revisions without adding
|
|
181
|
-
trust rules to the protocol core.
|
|
182
|
-
|
|
175
|
+
trust rules to the protocol core. CLI and Integration API remain cross-platform;
|
|
176
|
+
MCP is optional.
|
|
183
177
|
|
|
184
178
|
### Durable external actions
|
|
185
179
|
|
|
@@ -209,20 +203,18 @@ forgeloop protocol-info --json
|
|
|
209
203
|
| Validate completion | Yes | Provides real work and evidence |
|
|
210
204
|
| Schedule agents or LLM inference | No | External to the protocol |
|
|
211
205
|
|
|
212
|
-
|
|
213
|
-
[cross-harness continuity](./docs/CROSS_HARNESS_CONTINUITY.md).
|
|
214
|
-
|
|
215
|
-
From a published package, initialize a target project with:
|
|
206
|
+
From the privately delivered package, initialize a target project with:
|
|
216
207
|
|
|
217
208
|
```bash
|
|
218
209
|
npx @cassiomc1/forgeloop init
|
|
219
210
|
npx @cassiomc1/forgeloop doctor
|
|
220
211
|
```
|
|
221
212
|
|
|
222
|
-
The CLI installs canonical documents under `.forgeloop/kit/`, keeps
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
213
|
+
The CLI installs canonical documents under `.forgeloop/kit/`, keeps native
|
|
214
|
+
discovery shims at the project root, and stores project configuration under
|
|
215
|
+
`.forgeloop/`. Task artifacts use `.forgeloop/task-state/<taskKey>/` as their
|
|
216
|
+
logical portable export path; SQLite mode stores mutable records in
|
|
217
|
+
`.forgeloop/state.sqlite`.
|
|
226
218
|
`update` preserves target-specific profile facts and locally modified files.
|
|
227
219
|
|
|
228
220
|
ForgeLoop adapts protocol depth to task risk and scope, preserving verifiable
|
|
@@ -254,8 +246,7 @@ host-reported or `UNKNOWN`; values are never estimated.
|
|
|
254
246
|
capability, but advisory recall remains Integration API only. The stock CLI
|
|
255
247
|
does not auto-recall providers and does not expose a `context-recall` command.
|
|
256
248
|
|
|
257
|
-
|
|
258
|
-
network or package lookup:
|
|
249
|
+
Validate the source checkout offline before any private release:
|
|
259
250
|
|
|
260
251
|
```bash
|
|
261
252
|
node src/cli.js init
|
|
@@ -363,20 +354,20 @@ ForgeLoop supports isolated, concurrent tasks within the same repository via det
|
|
|
363
354
|
# Create an isolated task claiming specific directories
|
|
364
355
|
forgeloop task-create --task auth-feature --claim src/auth --claim tests/auth --json
|
|
365
356
|
|
|
366
|
-
# List active and completed tasks
|
|
367
357
|
forgeloop task-list --json
|
|
368
358
|
|
|
369
|
-
# Ask for deterministic conflict/recovery guidance
|
|
370
359
|
forgeloop next --task auth-feature --json
|
|
371
360
|
|
|
372
|
-
#
|
|
361
|
+
# Release claims only for a STALE or ABANDONED task
|
|
373
362
|
forgeloop task-recover --task auth-feature --acknowledge-recovery --json
|
|
374
363
|
|
|
375
|
-
#
|
|
364
|
+
# Explicitly abandon an active non-terminal task when its objective is no longer valid
|
|
365
|
+
forgeloop task-abandon --task auth-feature --acknowledge-abandonment --json
|
|
366
|
+
|
|
367
|
+
# Reacquire conflict-free claims before mutating a recovered task
|
|
376
368
|
forgeloop task-resume --task auth-feature --json
|
|
377
369
|
|
|
378
|
-
|
|
379
|
-
forgeloop route --task auth-feature --work clean-code --surface backend
|
|
370
|
+
forgeloop route --task auth-feature --work code --surface backend
|
|
380
371
|
forgeloop preflight --task auth-feature --json
|
|
381
372
|
forgeloop advance --task auth-feature --to EXECUTING
|
|
382
373
|
forgeloop complete --task auth-feature --json
|
|
@@ -395,6 +386,12 @@ disabled. The standalone acknowledgement flag is not host-attested authority.
|
|
|
395
386
|
settlement, normal claim-overlap, and clean-checkout checks succeed. Never
|
|
396
387
|
create, edit, or delete `recovery.json` manually.
|
|
397
388
|
|
|
389
|
+
`task-recover` is reserved for canonical `STALE`/`ABANDONED` classification.
|
|
390
|
+
`task-abandon` is the separate explicit path for an active non-terminal task:
|
|
391
|
+
it records `TASK_ABANDONED`, releases claims as `RELEASED_BY_RECOVERY`, keeps
|
|
392
|
+
the phase unchanged, and never implies completion or publication. `clear-state`
|
|
393
|
+
only removes a checkpoint and is not a claim-release or abandonment mechanism.
|
|
394
|
+
|
|
398
395
|
### Executable policy verification & brownfield baselines
|
|
399
396
|
|
|
400
397
|
ForgeLoop enforces automated, non-interactive verification rules (`rules.json`) with zero interactive dependencies:
|
|
@@ -431,12 +428,20 @@ See [`docs/CLI_REFERENCE.md`](./docs/CLI_REFERENCE.md) and [`LOOP_SYSTEM_DESIGN.
|
|
|
431
428
|
|
|
432
429
|
## Architecture flow
|
|
433
430
|
|
|
431
|
+
<a href="./docs/assets/diagrams/forgeloop-engineering-flow.html">
|
|
432
|
+
<img src="./docs/assets/forgeloop-lifecycle-animated.svg" alt="Animated ForgeLoop evidence-first loop: Contract, Route, Preflight, Execute, Evidence, Review, VALID, with an evidence-only correction loop" width="100%">
|
|
433
|
+
</a>
|
|
434
|
+
|
|
435
|
+
*Animation: the rail pulses through each step in order. It loops forever and
|
|
436
|
+
respects reduced-motion settings. Select the image to open the full animated
|
|
437
|
+
interactive explorer.*
|
|
438
|
+
|
|
434
439
|
The canonical source is the typed Archify workflow
|
|
435
440
|
[`docs/diagrams/forgeloop-engineering-flow.workflow.json`](./docs/diagrams/forgeloop-engineering-flow.workflow.json).
|
|
436
441
|
The committed animated interactive explorer is
|
|
437
442
|
[`docs/assets/diagrams/forgeloop-engineering-flow.html`](./docs/assets/diagrams/forgeloop-engineering-flow.html),
|
|
438
443
|
which traces it. The
|
|
439
|
-
|
|
444
|
+
detailed, self-contained SVG fallback is
|
|
440
445
|
[`docs/assets/diagrams/forgeloop-engineering-flow.svg`](./docs/assets/diagrams/forgeloop-engineering-flow.svg),
|
|
441
446
|
and the deterministic hash receipt is
|
|
442
447
|
[`docs/assets/diagrams/forgeloop-engineering-flow.receipt.json`](./docs/assets/diagrams/forgeloop-engineering-flow.receipt.json).
|
|
@@ -449,8 +454,6 @@ The broader architecture and the CLI-only search boundary are in
|
|
|
449
454
|
|
|
450
455
|
[Open the animated ForgeLoop evidence-first engineering flow](./docs/assets/diagrams/forgeloop-engineering-flow.html)
|
|
451
456
|
|
|
452
|
-

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