@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
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Provider Extension Reference
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
`providerExtensions` v1 is provider-neutral and experimental. This reference
|
|
6
|
+
describes the architecture vocabulary and maintainer expectations. It does
|
|
7
|
+
not document a supported import from `@cassiomc1/forgeloop/providers`.
|
|
8
|
+
|
|
9
|
+
## Capability Discovery
|
|
10
|
+
|
|
11
|
+
Run `node src/cli.js protocol-info --json` and inspect
|
|
12
|
+
`features.providerExtensions`. The advertised capability includes the version,
|
|
13
|
+
provider kinds, strict result boundary, cooperative cancellation, and explicit
|
|
14
|
+
authority restrictions.
|
|
15
|
+
|
|
16
|
+
## Provider Kinds
|
|
17
|
+
|
|
18
|
+
- `ADVISORY_CONTEXT`: optional context, never executable or canonical.
|
|
19
|
+
- `VERIFICATION_EXECUTION`: bounded execution observations, never completion truth.
|
|
20
|
+
- `BROWSER_VERIFICATION`: browser observations with no canonical vendor.
|
|
21
|
+
- `SECURITY_REVIEW`: bounded security observations pending any future explicit gate.
|
|
22
|
+
- `PRESENTATION`: read-only rendering that cannot mutate protocol state.
|
|
23
|
+
|
|
24
|
+
The canonical list is exported internally as `PROVIDER_KINDS`; public metadata
|
|
25
|
+
is synchronized from that source and must not duplicate its strings.
|
|
26
|
+
|
|
27
|
+
Concrete `ADVISORY_CONTEXT` adapters (Ripwire, OpenSrc) plug into the
|
|
28
|
+
dedicated advisory-context Integration API (`createForgeLoopContext` with
|
|
29
|
+
`advisoryContextProviders`, plus `recallAdvisoryContext`); they are not part
|
|
30
|
+
of the generic internal provider registry described here.
|
|
31
|
+
|
|
32
|
+
Browser verification is registered only through the runtime context option
|
|
33
|
+
`browserVerificationProviders` and is invoked explicitly with
|
|
34
|
+
`runBrowserVerification`. Registration is lazy and inert: it does not launch a
|
|
35
|
+
browser, perform network I/O, or mutate protocol state. Its provider-neutral
|
|
36
|
+
input includes task/target/requirement binding, a shared abort signal, and the
|
|
37
|
+
remaining timeout. ForgeLoop validates redirects and derives overall status;
|
|
38
|
+
provider output is observation only and cannot satisfy evidence or completion.
|
|
39
|
+
|
|
40
|
+
The optional `agent-browser` adapter is registered through the same boundary
|
|
41
|
+
with `createAgentBrowserVerificationProvider({ executablePath, expectedVersion })`.
|
|
42
|
+
The executable is host-owned and absolute; no package dependency or automatic
|
|
43
|
+
installation is added. The adapter returns browser observations only.
|
|
44
|
+
|
|
45
|
+
The optional `vercel-labs/emulate` adapter is host-injected through
|
|
46
|
+
`createEmulatedServicesProvider({ executablePath, expectedVersion })`. The
|
|
47
|
+
host must provide an absolute regular executable and explicitly choose the
|
|
48
|
+
services and loopback port range. ForgeLoop does not install the tool, search
|
|
49
|
+
`PATH`, invoke a shell, persist service state in the target project, or treat
|
|
50
|
+
service output as lifecycle, evidence, installation, or completion authority.
|
|
51
|
+
The supported host tool is pinned to `0.11.2`; invocation is lazy and inert
|
|
52
|
+
until `provider.start(...)` is called. Each bounded operation verifies the
|
|
53
|
+
qualified version, starts with argv-only execution, observes loopback
|
|
54
|
+
readiness, returns a detached observation, and cleans up its temporary state
|
|
55
|
+
and child process.
|
|
56
|
+
|
|
57
|
+
Security review is registered through `securityReviewProviders` and invoked
|
|
58
|
+
explicitly with `runSecurityReview`. Registration is lazy and inert. The
|
|
59
|
+
request accepts bounded scope, relative paths, categories, requirements, and a
|
|
60
|
+
revision binding; factory resolution and review share one deadline and abort
|
|
61
|
+
signal. Results are strict immutable observations with bounded findings and
|
|
62
|
+
summary counts. They cannot establish evidence, lifecycle, completion,
|
|
63
|
+
ownership, claims, commands, installation, or transaction authority. See
|
|
64
|
+
[`SECURITY_REVIEW.md`](./SECURITY_REVIEW.md) for the complete contract.
|
|
65
|
+
|
|
66
|
+
## Common Contract
|
|
67
|
+
|
|
68
|
+
Providers are identified by an ID and kind, may resolve lazily, and receive a
|
|
69
|
+
bounded invocation context. Results are detached, deeply frozen strict JSON
|
|
70
|
+
snapshots. A provider may return an observation, never lifecycle state,
|
|
71
|
+
completion truth, canonical evidence, executable instructions, or installation
|
|
72
|
+
authority.
|
|
73
|
+
|
|
74
|
+
## Invocation Context
|
|
75
|
+
|
|
76
|
+
The context includes a shared `AbortSignal`, the provider ID, and the remaining
|
|
77
|
+
timeout budget. Factories and operations consume the same deadline. Providers
|
|
78
|
+
must observe abort and clean up owned resources.
|
|
79
|
+
|
|
80
|
+
## Limits
|
|
81
|
+
|
|
82
|
+
Invocation uses one shared timeout budget. Input and output are bounded by byte,
|
|
83
|
+
depth, and node limits. Synchronous JavaScript cannot be preempted; resource
|
|
84
|
+
owners remain responsible for cooperative cleanup after abort.
|
|
85
|
+
|
|
86
|
+
## Error Codes
|
|
87
|
+
|
|
88
|
+
Malformed providers, unavailable providers, timeouts, invalid snapshots,
|
|
89
|
+
payload limits, authority escalation, and execution failures use the internal
|
|
90
|
+
provider error vocabulary. Provider exceptions are normalized so a provider
|
|
91
|
+
cannot spoof a ForgeLoop error code.
|
|
92
|
+
|
|
93
|
+
## Trust Rules
|
|
94
|
+
|
|
95
|
+
Treat provider output as untrusted input. Pass it through ForgeLoop-owned
|
|
96
|
+
validation before any evidence or consumer use. Do not execute provider text,
|
|
97
|
+
interpret it as a next action, or treat provider identity as a trust grant.
|
|
98
|
+
|
|
99
|
+
## Maturity
|
|
100
|
+
|
|
101
|
+
The public capability vocabulary is versioned at v1 but remains experimental.
|
|
102
|
+
The generic registry implementation is internal and experimental. No provider
|
|
103
|
+
is auto-installed or discovered by the lifecycle, and no provider CLI exists.
|
|
104
|
+
|
|
105
|
+
## Internal vs Public Surfaces
|
|
106
|
+
|
|
107
|
+
The public surfaces are the protocol-info capability and these documentation
|
|
108
|
+
pages. The JavaScript registry under `src/providers/` ships as implementation
|
|
109
|
+
source but is not a supported package subpath or public registration contract.
|
|
110
|
+
|
|
111
|
+
## Future Adapter Structure
|
|
112
|
+
|
|
113
|
+
An adapter proposal must specify its provider kind, bounded input/output,
|
|
114
|
+
timeout and cancellation behavior, error mapping, authority restrictions,
|
|
115
|
+
ForgeLoop validation boundary, tests, and documentation owner. Dedicated
|
|
116
|
+
Integration API capabilities remain separate from this generic vocabulary.
|
|
117
|
+
|
|
118
|
+
## Testing Checklist
|
|
119
|
+
|
|
120
|
+
- Capability metadata is synchronized with `PROVIDER_KINDS`.
|
|
121
|
+
- Every provider kind denies lifecycle, completion, and evidence authority.
|
|
122
|
+
- Strict JSON rejects accessors, proxies, custom objects, cycles, and oversized payloads.
|
|
123
|
+
- Shared timeout and cooperative cancellation are tested.
|
|
124
|
+
- Provider exceptions cannot spoof ForgeLoop error codes.
|
|
125
|
+
- `protocol-info --json` advertises v1 without claiming a public registry API.
|
|
126
|
+
- The package does not export `./providers`.
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# Provider Extension Architecture
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
Provider extensions are a provider-neutral, experimental capability family in
|
|
6
|
+
Protocol v1. The capability vocabulary is public and versioned; the generic
|
|
7
|
+
provider registry is internal and is not a supported package API.
|
|
8
|
+
|
|
9
|
+
## Scope
|
|
10
|
+
|
|
11
|
+
This document explains the common boundary around provider observations. It
|
|
12
|
+
does not add generic provider registration to `createForgeLoopContext()`; the
|
|
13
|
+
dedicated runtime-only `browserVerificationProviders` and
|
|
14
|
+
`securityReviewProviders` registrations are the exceptions documented by
|
|
15
|
+
their dedicated contracts. They do not add CLI
|
|
16
|
+
provider commands, automatic installation, lifecycle authority, or completion
|
|
17
|
+
authority.
|
|
18
|
+
|
|
19
|
+
## Why ForgeLoop Uses Providers
|
|
20
|
+
|
|
21
|
+
Providers allow a host to connect bounded observations or execution services to
|
|
22
|
+
ForgeLoop without making a vendor, model, browser, scanner, or presentation
|
|
23
|
+
tool canonical. A provider result is an input to ForgeLoop-owned validation,
|
|
24
|
+
not a replacement for it.
|
|
25
|
+
|
|
26
|
+
## Provider-Neutral Design
|
|
27
|
+
|
|
28
|
+
The public `providerExtensions` capability advertises architecture and
|
|
29
|
+
compatibility semantics only. It is provider-neutral, experimental, lazy at
|
|
30
|
+
the host boundary, and deliberately separate from the existing dedicated
|
|
31
|
+
`advisoryContextProviders` Integration API capability.
|
|
32
|
+
|
|
33
|
+
The generic registry is currently an internal implementation module. It is
|
|
34
|
+
not exported as `@cassiomc1/forgeloop/providers`, and capability advertising
|
|
35
|
+
does not imply a public registration or installation API.
|
|
36
|
+
|
|
37
|
+
## Provider Kinds
|
|
38
|
+
|
|
39
|
+
The five kinds are derived from the canonical `PROVIDER_KINDS` source:
|
|
40
|
+
|
|
41
|
+
| Kind | Contract |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| `ADVISORY_CONTEXT` | Optional, non-authoritative context. It is never canonical state, evidence, completion authority, or executable instruction. |
|
|
44
|
+
| `VERIFICATION_EXECUTION` | A bounded execution boundary that may produce observations, but never completion truth. |
|
|
45
|
+
| `BROWSER_VERIFICATION` | Browser-driven observation and assertion collection. No vendor is canonical. |
|
|
46
|
+
| `SECURITY_REVIEW` | Bounded security findings, observation-oriented unless a future explicit gate contract exists. |
|
|
47
|
+
| `PRESENTATION` | Read-only presentation or rendering. It must never mutate protocol state. |
|
|
48
|
+
|
|
49
|
+
Every kind denies lifecycle, completion, and evidence authority. Providers do
|
|
50
|
+
not acquire installation authority.
|
|
51
|
+
|
|
52
|
+
### Presentation vocabulary and Audit UX
|
|
53
|
+
|
|
54
|
+
`PRESENTATION` remains a provider-kind vocabulary slot for future bounded
|
|
55
|
+
renderers; it does not require a concrete provider in the completed roadmap.
|
|
56
|
+
The current Audit UX need is already served by `task/audit-view`, a canonical
|
|
57
|
+
read-only Integration API projection composed from ForgeLoop-owned resolvers.
|
|
58
|
+
Audit UX is not a provider, does not register through the provider boundary,
|
|
59
|
+
and cannot mutate protocol state, establish evidence, release claims, or
|
|
60
|
+
authorize completion.
|
|
61
|
+
|
|
62
|
+
## Invocation Lifecycle
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
HOST
|
|
66
|
+
│
|
|
67
|
+
▼
|
|
68
|
+
provider selection
|
|
69
|
+
│
|
|
70
|
+
▼
|
|
71
|
+
registry lookup
|
|
72
|
+
│
|
|
73
|
+
▼
|
|
74
|
+
lazy factory resolution
|
|
75
|
+
│
|
|
76
|
+
▼
|
|
77
|
+
provider validation
|
|
78
|
+
│
|
|
79
|
+
▼
|
|
80
|
+
bounded invocation
|
|
81
|
+
│
|
|
82
|
+
▼
|
|
83
|
+
strict JSON normalization
|
|
84
|
+
│
|
|
85
|
+
▼
|
|
86
|
+
authority validation
|
|
87
|
+
│
|
|
88
|
+
▼
|
|
89
|
+
immutable observation
|
|
90
|
+
│
|
|
91
|
+
▼
|
|
92
|
+
ForgeLoop consumer
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The result boundary is:
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
provider result
|
|
99
|
+
↓
|
|
100
|
+
normalized observation
|
|
101
|
+
↓
|
|
102
|
+
ForgeLoop-owned validation
|
|
103
|
+
↓
|
|
104
|
+
optional canonical evidence/use
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
A provider must never bypass ForgeLoop-owned validation.
|
|
108
|
+
|
|
109
|
+
Browser verification is an explicit Integration API operation, not a generic
|
|
110
|
+
provider command. Its registry is inert during context construction, its
|
|
111
|
+
factory and verify call share one deadline and cooperative `AbortSignal`, and
|
|
112
|
+
its final status is derived by ForgeLoop from the requested assertion results.
|
|
113
|
+
The origin allowlist validates observations but is not a network sandbox.
|
|
114
|
+
|
|
115
|
+
Security review is likewise an explicit Integration API operation through
|
|
116
|
+
`runSecurityReview`. Its host-injected registry is inert during context
|
|
117
|
+
construction. Requests and results are bounded strict snapshots, and provider
|
|
118
|
+
findings remain observation-only, non-evidence, and non-executable.
|
|
119
|
+
|
|
120
|
+
## Trust Boundary
|
|
121
|
+
|
|
122
|
+
Provider output is untrusted input. It cannot establish lifecycle state,
|
|
123
|
+
completion truth, canonical evidence, next-action authority, or installation
|
|
124
|
+
authority. Provider identity and availability are descriptive and must not be
|
|
125
|
+
treated as proof of executable identity or trust.
|
|
126
|
+
|
|
127
|
+
## Strict JSON Snapshot Boundary
|
|
128
|
+
|
|
129
|
+
Provider input and output use detached, deeply frozen snapshots. Allowed values
|
|
130
|
+
are `null`, booleans, finite numbers, strings, arrays, and plain objects.
|
|
131
|
+
|
|
132
|
+
The boundary rejects `undefined`, functions, symbols, bigints, non-finite
|
|
133
|
+
numbers, dates, maps, sets, promises, proxies, custom classes, accessors,
|
|
134
|
+
cycles, sparse or extended arrays, and hidden non-enumerable payload data.
|
|
135
|
+
Provider payloads are bounded by byte, depth, and node limits.
|
|
136
|
+
|
|
137
|
+
## Timeout and Cancellation
|
|
138
|
+
|
|
139
|
+
Factory resolution and operation execution share one timeout budget and one
|
|
140
|
+
invocation context. The `AbortSignal` is propagated and cancellation is
|
|
141
|
+
cooperative. A late factory resolution cannot start an operation after the
|
|
142
|
+
deadline. Synchronous JavaScript cannot be preempted by a timer, so providers
|
|
143
|
+
that own subprocesses, browsers, requests, or sockets must clean them up when
|
|
144
|
+
the signal is aborted.
|
|
145
|
+
|
|
146
|
+
## Error Normalization
|
|
147
|
+
|
|
148
|
+
Provider exceptions are normalized to ForgeLoop provider execution failures;
|
|
149
|
+
provider-supplied ForgeLoop-shaped error codes are not trusted. Validation and
|
|
150
|
+
timeout failures are generated outside the provider call boundary.
|
|
151
|
+
|
|
152
|
+
## Authority Restrictions
|
|
153
|
+
|
|
154
|
+
The following public capability fields remain false: `autoInstall`,
|
|
155
|
+
`lifecycleAuthority`, `completionAuthority`, and `evidenceAuthority`.
|
|
156
|
+
Providers observe. ForgeLoop validates, owns lifecycle transitions, and decides
|
|
157
|
+
whether an observation can contribute to canonical evidence.
|
|
158
|
+
|
|
159
|
+
## Evidence Conversion Boundary
|
|
160
|
+
|
|
161
|
+
An observation can become usable evidence only through the relevant
|
|
162
|
+
ForgeLoop-owned validation and evidence contract. Provider output is never
|
|
163
|
+
itself a completion claim or canonical evidence record.
|
|
164
|
+
|
|
165
|
+
## Internal vs Public Surfaces
|
|
166
|
+
|
|
167
|
+
Public and versioned:
|
|
168
|
+
|
|
169
|
+
- `protocol-info --json` and `features.providerExtensions`.
|
|
170
|
+
- This architecture document and [`PROVIDERS.md`](./PROVIDERS.md).
|
|
171
|
+
|
|
172
|
+
Internal and experimental:
|
|
173
|
+
|
|
174
|
+
- `src/providers/index.js` and the generic registry implementation.
|
|
175
|
+
- Provider capability implementation details not included in the public
|
|
176
|
+
Integration API contract.
|
|
177
|
+
|
|
178
|
+
`@cassiomc1/forgeloop/providers` remains unexported.
|
|
179
|
+
|
|
180
|
+
## Compatibility
|
|
181
|
+
|
|
182
|
+
Protocol version, Schema version, and Integration API version remain `1`.
|
|
183
|
+
`providerExtensions` is capability version `1`; consumers must feature-detect
|
|
184
|
+
it and may continue using the core protocol when they do not understand it.
|
|
185
|
+
|
|
186
|
+
## Future Provider Adapters
|
|
187
|
+
|
|
188
|
+
Future adapters may implement a provider kind only after a provider-neutral
|
|
189
|
+
contract defines its input, output, resource bounds, trust treatment, and
|
|
190
|
+
ForgeLoop-owned validation boundary. Vendor-specific adapters remain optional
|
|
191
|
+
and must not become a competing source of protocol truth.
|
|
192
|
+
|
|
193
|
+
## Security Considerations
|
|
194
|
+
|
|
195
|
+
Provider output can be malicious, oversized, mutable, delayed, or misleading.
|
|
196
|
+
Strict JSON snapshots, bounded invocation, cooperative cancellation, error
|
|
197
|
+
normalization, recursive authority checks, and no automatic installation keep
|
|
198
|
+
the boundary fail-closed. See [`THREAT_MODEL.md`](../THREAT_MODEL.md) for the
|
|
199
|
+
security ownership table.
|
package/docs/RECIPES.md
CHANGED
|
@@ -35,6 +35,18 @@ Concise, copy-paste friendly recipes for common ForgeLoop tasks.
|
|
|
35
35
|
|
|
36
36
|
### Recipe 1 — Start a New Task
|
|
37
37
|
|
|
38
|
+
When the task shape is known but the final contract has not been written, first
|
|
39
|
+
request a read-only preset proposal:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
forgeloop task-create --task task-001 --claim src --claim tests \
|
|
43
|
+
--preset feature --preview --json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Review the bounded proposal, then repeat without `--preview` before continuing
|
|
47
|
+
with the task workflow below. Preview creates no task namespace and acquires no
|
|
48
|
+
project claim lock.
|
|
49
|
+
|
|
38
50
|
<!-- FORGELOOP EXAMPLE: recipes:create-task | exit=0 | json.taskId=task-001 -->
|
|
39
51
|
```bash
|
|
40
52
|
forgeloop task-create --task task-001 --claim src --claim tests --json
|
|
@@ -243,6 +255,12 @@ forgeloop task-create --task billing-feature --claim src/billing --claim tests/b
|
|
|
243
255
|
# 3. List active tasks
|
|
244
256
|
forgeloop task-list --json
|
|
245
257
|
|
|
258
|
+
# 3a. Filter and page the read-only ownership-aware projection
|
|
259
|
+
forgeloop task-list --active --limit 20 --offset 0 --json
|
|
260
|
+
|
|
261
|
+
# 3b. Ask for a bounded blocker/recovery explanation when needed
|
|
262
|
+
forgeloop next --task auth-feature --explain --json
|
|
263
|
+
|
|
246
264
|
# 4. Work on task-1
|
|
247
265
|
forgeloop route --task auth-feature --work clean-code --surface backend
|
|
248
266
|
forgeloop preflight --task auth-feature --json
|
|
@@ -256,6 +274,11 @@ forgeloop complete --task auth-feature --json
|
|
|
256
274
|
forgeloop task-unlock --task auth-feature --force --json
|
|
257
275
|
```
|
|
258
276
|
|
|
277
|
+
`task-list` discovers all valid task namespaces before applying filters and
|
|
278
|
+
pagination. Its JSON response reports `total` and `hasMore`; filtering does not
|
|
279
|
+
skip ownership or corruption checks, and listing never deletes ledger or
|
|
280
|
+
recovery evidence.
|
|
281
|
+
|
|
259
282
|
---
|
|
260
283
|
|
|
261
284
|
### Recipe 12 — Migrate Legacy 1.0 Single-Task Layout
|
|
@@ -330,6 +353,10 @@ forgeloop baseline --record --policy-reset-authorized --json
|
|
|
330
353
|
# 1. Inspect deterministic classification and structured next action
|
|
331
354
|
forgeloop next --task task-001 --json
|
|
332
355
|
|
|
356
|
+
# 1a. If the active task is intentionally no longer valid, explicitly abandon
|
|
357
|
+
# it; do not use clear-state or task-recover to bypass ownership
|
|
358
|
+
forgeloop task-abandon --task task-001 --acknowledge-abandonment --json
|
|
359
|
+
|
|
333
360
|
# 2. RECOVERABLE must use reconcile-closure; do not use task-recover
|
|
334
361
|
forgeloop reconcile-closure --task task-001 --id <verification-id> \
|
|
335
362
|
--requirement "<exact verification text>" -- <verification-command>
|
|
@@ -355,6 +382,11 @@ artifact against the complete ledger history. If `next` returns
|
|
|
355
382
|
`RESOLVE_RECOVERY_INCONSISTENCY`, run `validate-protocol`; do not create, edit,
|
|
356
383
|
or delete `recovery.json` manually.
|
|
357
384
|
|
|
385
|
+
`task-abandon` is only for an explicit active non-terminal abandonment. It
|
|
386
|
+
records `TASK_ABANDONED`, leaves the phase unchanged, and releases claims as
|
|
387
|
+
`RELEASED_BY_RECOVERY`; it never proves completion. `clear-state` removes only
|
|
388
|
+
the checkpoint and is not a claim-release mechanism.
|
|
389
|
+
|
|
358
390
|
---
|
|
359
391
|
|
|
360
392
|
### Recipe 16 — Execute a Durable External Action Safely
|
|
@@ -3,16 +3,27 @@
|
|
|
3
3
|
This is the current release checklist for `@cassiomc1/forgeloop`. It is a
|
|
4
4
|
preparation and verification checklist; it does not authorize publication.
|
|
5
5
|
|
|
6
|
-
## ForgeLoop 1.
|
|
6
|
+
## ForgeLoop 1.14.0 candidate scope
|
|
7
7
|
|
|
8
|
-
The 1.
|
|
9
|
-
|
|
8
|
+
The 1.14.0 candidate carries the protocol, routing, provider, documentation,
|
|
9
|
+
and package changes present in current `main`. The candidate must keep these
|
|
10
10
|
boundaries explicit:
|
|
11
11
|
|
|
12
12
|
- [ ] README catalog and architecture fallback identify
|
|
13
13
|
`ENG/flutter-development-eng.md` and explain that the specialist is
|
|
14
14
|
selected only from a structurally parsed
|
|
15
15
|
`dependencies.flutter.sdk: flutter` entry in affected scope.
|
|
16
|
+
- [ ] README catalog and architecture fallback identify
|
|
17
|
+
`ENG/rust-development-eng.md` and explain that the specialist is
|
|
18
|
+
selected only from a structurally parsed `[package]` or `[workspace]`
|
|
19
|
+
table in an affected `Cargo.toml`.
|
|
20
|
+
- [ ] README catalog and architecture fallback identify
|
|
21
|
+
`ENG/nodejs-backend-development-eng.md` and explain that Node.js
|
|
22
|
+
backend/runtime evidence is distinct from build, test, and configuration
|
|
23
|
+
tooling executed under Node.js.
|
|
24
|
+
- [ ] README catalog and architecture fallback identify the C, C++, Java, SQL,
|
|
25
|
+
Go, TypeScript, PHP, and Swift specialists and explain their bounded
|
|
26
|
+
structural evidence and same-root composition rules.
|
|
16
27
|
- [ ] The canonical engineering-flow source and regenerated HTML/SVG diagram
|
|
17
28
|
explain project detection as routing context, not verification or
|
|
18
29
|
completion evidence.
|
|
@@ -34,6 +45,34 @@ This branch prepares the candidate and its pull request. npm publication,
|
|
|
34
45
|
tagging, GitHub Release, deployment, and merge remain separately authorized
|
|
35
46
|
actions.
|
|
36
47
|
|
|
48
|
+
## CI minimization validation
|
|
49
|
+
|
|
50
|
+
- [ ] `npm run skill:check` passes and generated Skill frontmatter, protocol
|
|
51
|
+
synchronization, safety boundaries, and package coverage remain valid.
|
|
52
|
+
|
|
53
|
+
- [ ] `npm run verify:fast` passes for edit-time feedback.
|
|
54
|
+
- [ ] `npm run repository:hygiene` passes: no tracked mutable ForgeLoop state,
|
|
55
|
+
unexpected root reports, orphan visual assets, unapproved benchmark run
|
|
56
|
+
sets, or scratch outputs.
|
|
57
|
+
- [ ] The documentation manifest and review matrix cover every maintained and
|
|
58
|
+
packaged document with origin, currency, package, action, and canonical
|
|
59
|
+
source metadata.
|
|
60
|
+
- [ ] Diagram source, generated output, receipts, and review bindings are
|
|
61
|
+
current; a changed source is not approved until its visual review is
|
|
62
|
+
renewed.
|
|
63
|
+
- [ ] `npm run verify:prepush` passes before the release pull request; MCP
|
|
64
|
+
setup, when needed, was run explicitly with `npm run mcp:setup`.
|
|
65
|
+
- [ ] Ordinary PR validation uses `.github/workflows/pr-core.yml` with the
|
|
66
|
+
unchanged required contexts `audit`, `CodeQL`, `Verify generated Archify
|
|
67
|
+
diagram`, `validate (22)`, `tarball smoke (ubuntu-latest)`, and
|
|
68
|
+
`dependency-review`.
|
|
69
|
+
- [ ] `validate (22)` is always present and fails closed on an applicable
|
|
70
|
+
prerequisite failure, cancellation, or unexpected skip.
|
|
71
|
+
- [ ] Path classification scenarios cover README-only, ordinary source,
|
|
72
|
+
Repository Index, package-export, and forced release validation.
|
|
73
|
+
- [ ] Main-branch documentation, Node compatibility, package smoke, audit,
|
|
74
|
+
and Windows full-suite workflows remain available for broader validation.
|
|
75
|
+
|
|
37
76
|
## Contract and package identity
|
|
38
77
|
|
|
39
78
|
- [ ] `package.json` and `package-lock.json` contain the same package version.
|
|
@@ -47,7 +86,7 @@ actions.
|
|
|
47
86
|
- [ ] [`docs/PACKAGE_CONTENTS.md`](./PACKAGE_CONTENTS.md) matches the current
|
|
48
87
|
`package.json` file list and documents intentional inclusions and
|
|
49
88
|
exclusions.
|
|
50
|
-
- [ ] The candidate tarball includes
|
|
89
|
+
- [ ] The candidate tarball includes every registered specialist guide and every
|
|
51
90
|
other `src/config/guides.json` path; no repository-only guide state is
|
|
52
91
|
packaged.
|
|
53
92
|
- [ ] Every maintained `src/**/*.js` module is present in the candidate
|
|
@@ -59,7 +98,27 @@ actions.
|
|
|
59
98
|
- [ ] `protocol-info` and the Integration API capability contracts agree.
|
|
60
99
|
- [ ] `canonicalHandoffs` v2 is advertised consistently.
|
|
61
100
|
- [ ] `advisoryContextProviders` v1 is advertised consistently.
|
|
101
|
+
- [ ] `providerExtensions` v1 is consistent, provider-neutral, experimental,
|
|
102
|
+
and retains false lifecycle/completion/evidence authority.
|
|
103
|
+
- [ ] Generic provider registry export remains absent and auto-install remains
|
|
104
|
+
false.
|
|
62
105
|
- [ ] Advisory context remains Integration-API-only.
|
|
106
|
+
- [ ] OpenSrc requires an explicit absolute executable path and lazily qualified expected version.
|
|
107
|
+
- [ ] OpenSrc cache remains outside the target project and returned source paths are containment-validated.
|
|
108
|
+
- [ ] OpenSrc recall remains advisory, non-evidence, and non-persisted by ForgeLoop.
|
|
109
|
+
- [ ] No OpenSrc binary or cache ships in npm.
|
|
110
|
+
- [ ] Optional Agent Browser uses a host-supplied absolute executable, has no
|
|
111
|
+
runtime dependency, and keeps browser observations non-authoritative.
|
|
112
|
+
- [ ] Optional Emulated Services uses a host-supplied absolute `0.11.2`
|
|
113
|
+
executable, has no runtime dependency or PATH discovery, bounds argv
|
|
114
|
+
execution/readiness/output/cleanup, keeps state outside the target, and
|
|
115
|
+
returns observation-only loopback results.
|
|
116
|
+
- [ ] Optional Security Review is host-injected through `securityReviewProviders`,
|
|
117
|
+
has no auto-install or scanner discovery, and keeps findings
|
|
118
|
+
observation-only, non-evidence, non-lifecycle, and non-completion.
|
|
119
|
+
- [ ] Security Review request/result bounds, strict snapshot validation,
|
|
120
|
+
shared timeout, and cooperative cancellation are covered by focused tests
|
|
121
|
+
and the public TypeScript declarations.
|
|
63
122
|
- [ ] `next`, `status`, and `task/context` invoke zero advisory providers.
|
|
64
123
|
- [ ] Advisory request budgets are normalized before provider invocation.
|
|
65
124
|
- [ ] Advisory results are never persisted by ForgeLoop.
|
|
@@ -70,7 +129,9 @@ actions.
|
|
|
70
129
|
- [ ] Stale contract/route identity rejects handoff creation or acceptance.
|
|
71
130
|
- [ ] An invalid event ledger projects `INCONSISTENT`.
|
|
72
131
|
- [ ] Continuity lint remains non-authoritative and non-evidence.
|
|
73
|
-
- [ ] `npm run dependency:policy` passes
|
|
132
|
+
- [ ] `npm run dependency:policy` passes with only the approved exact
|
|
133
|
+
`@typesafe-ai/sdk` and `smol-toml` runtime dependencies and approved
|
|
134
|
+
development dependencies.
|
|
74
135
|
- [ ] `npm run lint` passes.
|
|
75
136
|
- [ ] `npm test` passes.
|
|
76
137
|
- [ ] `npm run benchmark:profiles:check` passes; absent provider/host history
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Security Review Provider
|
|
2
|
+
|
|
3
|
+
The Security Review provider is an optional, host-injected Integration API
|
|
4
|
+
capability for bounded, observation-only security findings. It is deliberately
|
|
5
|
+
separate from ForgeLoop lifecycle, evidence, completion, claim, ownership,
|
|
6
|
+
installation, command, and transaction authority.
|
|
7
|
+
|
|
8
|
+
## Registration
|
|
9
|
+
|
|
10
|
+
Register providers on `createForgeLoopContext({ securityReviewProviders })`.
|
|
11
|
+
The registry accepts an object or `Map`, and each value is either a provider
|
|
12
|
+
or a lazy factory. Registration validates provider identity but does not invoke
|
|
13
|
+
factories, scan the project, start a process, access the network, install a
|
|
14
|
+
tool, or mutate `.forgeloop` state.
|
|
15
|
+
|
|
16
|
+
Provider IDs are lower-case portable identifiers. A provider must expose the
|
|
17
|
+
same `id` as its registry key and a `review(request)` function. The host owns
|
|
18
|
+
the provider implementation and any scanner or executable it uses; ForgeLoop
|
|
19
|
+
does not discover tools or search `PATH`.
|
|
20
|
+
|
|
21
|
+
## Invocation
|
|
22
|
+
|
|
23
|
+
Call `runSecurityReview({ projectPath, taskId, providerName, reviewId, ... })`
|
|
24
|
+
through `@cassiomc1/forgeloop/integration`. Requests are detached and deeply
|
|
25
|
+
frozen before invocation. The request supports `FULL`, `CHANGED`, or
|
|
26
|
+
`SELECTED` scope, bounded relative paths, categories, requirements, an
|
|
27
|
+
optional revision binding, and a timeout capped by ForgeLoop.
|
|
28
|
+
|
|
29
|
+
Factory resolution and `review()` share one deadline and one cooperative
|
|
30
|
+
`AbortSignal`. A caller may provide its own signal. Timeout, cancellation,
|
|
31
|
+
provider absence, invalid providers, malformed results, output limits, and
|
|
32
|
+
provider failures have stable `E_SECURITY_REVIEW_*` error codes. Provider
|
|
33
|
+
exceptions are normalized so provider code cannot spoof ForgeLoop errors.
|
|
34
|
+
|
|
35
|
+
## Result contract
|
|
36
|
+
|
|
37
|
+
Results are detached, deeply frozen JSON observations with bounded findings,
|
|
38
|
+
diagnostics, and summary counts. The raw provider snapshot is also bounded
|
|
39
|
+
before schema projection: nesting is limited to 32 levels, traversal to 4096
|
|
40
|
+
nodes, and snapshot strings/keys to 524288 characters. Exceeding any bound
|
|
41
|
+
fails closed with `E_SECURITY_REVIEW_OUTPUT_LIMIT`.
|
|
42
|
+
|
|
43
|
+
Each finding has a portable relative path, bounded title/summary/rule/category/
|
|
44
|
+
severity/confidence fields, and no secret-like content. For `SELECTED` scope,
|
|
45
|
+
each finding path must equal or be a descendant of one of the requested paths;
|
|
46
|
+
`CHANGED` applies the same rule when an explicit changed-path set is supplied.
|
|
47
|
+
Containment uses normalized `/` separators and path-component boundaries, so
|
|
48
|
+
`src/auth.js` does not authorize `src/authentication.js`. `FULL` scope has no
|
|
49
|
+
requested-path restriction beyond normal safe-path validation. Results carry
|
|
50
|
+
trust metadata stating that they are observation-only and non-evidence.
|
|
51
|
+
|
|
52
|
+
Provider output is not a pass/fail lifecycle decision. It cannot create or
|
|
53
|
+
modify contracts, routes, gates, events, transactions, receipts, claims,
|
|
54
|
+
ownership, completion, executable commands, shell operations, credentials, or
|
|
55
|
+
installation state. Any future use as canonical evidence requires a separate
|
|
56
|
+
ForgeLoop-owned validation and evidence contract.
|
|
57
|
+
|
|
58
|
+
## Operational rules
|
|
59
|
+
|
|
60
|
+
- Keep registration lazy and explicit.
|
|
61
|
+
- Use a host-owned provider and a bounded request.
|
|
62
|
+
- Treat findings as advisory observations, not proof of `VALID`, `COMPLETE`,
|
|
63
|
+
or any lifecycle phase.
|
|
64
|
+
- Handle timeout and cancellation cooperatively and clean up resources owned by
|
|
65
|
+
the provider.
|
|
66
|
+
- Do not persist provider output as ForgeLoop task state unless a future
|
|
67
|
+
canonical evidence contract explicitly defines that boundary.
|
|
68
|
+
|
|
69
|
+
See [`PROVIDER_ARCHITECTURE.md`](./PROVIDER_ARCHITECTURE.md),
|
|
70
|
+
[`PROVIDERS.md`](./PROVIDERS.md), and [`THREAT_MODEL.md`](../THREAT_MODEL.md)
|
|
71
|
+
for shared provider and security-boundary rules.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Semantic Decision Plane
|
|
2
|
+
|
|
3
|
+
ForgeLoop uses the pinned TypeSafe Jev model `jev-1.13.0` for bounded semantic decisions. The SDK version is exact-pinned in `package.json` and credentials are read only from `TYPESAFE_API_KEY`; credentials are never persisted in ForgeLoop artifacts, event details, diagnostics, or logs.
|
|
4
|
+
|
|
5
|
+
Jev output has `SEMANTIC_DECISION` authority and `NONE` evidence authority. It cannot advance lifecycle, change ownership, satisfy gates, record verification, mark completion, install dependencies, execute commands, or delete tests. ForgeLoop remains the deterministic authority for state, claims, locks, schemas, event chronology, evidence, recovery, and completion.
|
|
6
|
+
|
|
7
|
+
The decision registry contains versioned question sets for intake, contract
|
|
8
|
+
applicability, route, execution profile, context, model routing, failure triage,
|
|
9
|
+
diagnosis, review, task overlap, test utility, and test pruning. Current route,
|
|
10
|
+
context, and test-utility mutations also use bounded dynamic candidate question
|
|
11
|
+
sets: `route-candidates-v1`, `context-candidates-v1`, and
|
|
12
|
+
`test-utility-candidates-v1`. Failure triage, diagnosis prioritization, and review planning
|
|
13
|
+
remain advisory projections: deterministic mandatory review signals are always
|
|
14
|
+
unioned into the plan, unknown semantic output escalates, and no projection can
|
|
15
|
+
record evidence or authorize an action.
|
|
16
|
+
|
|
17
|
+
Decision freshness separates canonical lifecycle state from semantic request
|
|
18
|
+
state. Persisted artifacts retain both fingerprints and their combined request
|
|
19
|
+
fingerprint, so lifecycle mutations cannot be mistaken for semantic changes
|
|
20
|
+
and semantic changes cannot be hidden by a stable lifecycle revision. The
|
|
21
|
+
lifecycle, event ledger, claims, and artifact validators remain authoritative.
|
|
22
|
+
|
|
23
|
+
Test utility analysis uses the bounded `test-utility-candidates-v1` question set
|
|
24
|
+
for the current command path; `test-utility-v1` remains a registered base
|
|
25
|
+
question set. The analysis is persisted separately from
|
|
26
|
+
completion evidence. Protected, contract-linked, public-API, security, and
|
|
27
|
+
protocol tests remain keep-required or keep-risk-guard candidates; unknown
|
|
28
|
+
utility is blocked and no command performs deletion.
|
|
29
|
+
|
|
30
|
+
Context plans send bounded, sanitized actual candidates to Jev. The candidate-set
|
|
31
|
+
fingerprint is bound to the persisted decision, and Jev returns candidate ranking
|
|
32
|
+
and exclusion judgments consumed by the context compiler. Deterministic required
|
|
33
|
+
and mandatory candidates remain selected; prompt-injection candidates are never
|
|
34
|
+
given semantic authority. Token values are `UNKNOWN` unless the provider or host
|
|
35
|
+
reports them.
|
|
36
|
+
|
|
37
|
+
Route execution records intake, route relevance, and execution-profile decisions
|
|
38
|
+
before persisting the route. The deterministic router remains the eligibility
|
|
39
|
+
and safety floor; Jev may rank or exclude only eligible non-mandatory guides and
|
|
40
|
+
may raise the execution profile, never lower a deterministic safety floor.
|
|
41
|
+
Mandatory safety protection is derived from the canonical deterministic route
|
|
42
|
+
reasons already produced by the router (`isMandatorySafetyGuide` reads the
|
|
43
|
+
`MANDATORY_SAFETY_REASONS` set — `SURFACE_AUTH` plus the trust-boundary risk
|
|
44
|
+
reasons `RISK_UNTRUSTED_INPUT`, `RISK_PERSONAL_DATA`, `RISK_SECRETS`,
|
|
45
|
+
`RISK_EXTERNAL_SERVICE`, `RISK_PUBLICATION`), so a security guide selected for an
|
|
46
|
+
external-service boundary cannot be removed by Jev and retains an explicit
|
|
47
|
+
`MANDATORY_SAFETY_GUIDE` reason. Mandatory safety guides and low-confidence
|
|
48
|
+
exclusions remain selected. A missing live decision fails closed.
|
|
49
|
+
|
|
50
|
+
The semantic provider is injected into repository tests through an internal
|
|
51
|
+
loader only. There is no production environment switch that turns semantic
|
|
52
|
+
decisions into fixture results; packaged commands without the pinned provider
|
|
53
|
+
fail closed.
|
|
54
|
+
|
|
55
|
+
`npm run jev:smoke` performs only a tiny health request when credentials are configured. A missing credential reports `NOT_RUN`; an unavailable or rate-limited service is a failed live check, never a fabricated success. Provider failures are classified into stable error codes (authentication, unsupported model, rate limit, timeout, result normalization) and, for live maintainer diagnostics, the smoke result additionally reports only safe metadata (HTTP status, provider error type, request id, network class) — never credentials, headers, or raw request bodies. Inspection, recovery, and completion validation do not require a live Jev call, but a semantic-required mutation fails closed when its canonical decision is missing or stale.
|
|
56
|
+
|
|
57
|
+
The `INTAKE` and `CONTRACT_APPLICABILITY` checkpoints are observation-only in
|
|
58
|
+
this version. Their immutable decisions are recorded, fingerprinted, and
|
|
59
|
+
available for review and follow-up consumption, but their result does not
|
|
60
|
+
currently alter the route or create, skip, or weaken the contract: Jev never
|
|
61
|
+
removes user or deterministic signals, and a semantic `applicable: false` can
|
|
62
|
+
never suppress a deterministic contract requirement. A narrow additive consumer
|
|
63
|
+
was evaluated and deferred because it changes behavior across every provider
|
|
64
|
+
mode without a validated benefit; semantic consumption is tracked as a
|
|
65
|
+
follow-up task, not claimed as current routing quality.
|
|
66
|
+
|
|
67
|
+
Semantic-required operations use fail-closed cutover semantics: an unavailable,
|
|
68
|
+
stale, malformed, or unsupported decision cannot silently authorize a mutation.
|
|
69
|
+
Offline inspection, recovery, and deterministic completion validation remain
|
|
70
|
+
usable without a live Jev request. Cached decisions may be used only when their
|
|
71
|
+
existing fingerprint/freshness validators accept them.
|