@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,81 @@
|
|
|
1
|
+
# Agent Browser Adapter
|
|
2
|
+
|
|
3
|
+
ForgeLoop ships an optional, host-injected adapter for Vercel Labs
|
|
4
|
+
`agent-browser`. It implements the existing provider-neutral Browser
|
|
5
|
+
Verification contract; it is not canonical browser infrastructure and it does
|
|
6
|
+
not create lifecycle evidence.
|
|
7
|
+
|
|
8
|
+
## Installation ownership
|
|
9
|
+
|
|
10
|
+
The host must provide an already-installed `agent-browser` executable and pass
|
|
11
|
+
its absolute path to `createAgentBrowserVerificationProvider`. ForgeLoop never
|
|
12
|
+
discovers a binary through `PATH`, installs or upgrades Agent Browser, installs
|
|
13
|
+
Chrome, or runs `doctor --fix`.
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import {
|
|
17
|
+
createAgentBrowserVerificationProvider,
|
|
18
|
+
createForgeLoopContext,
|
|
19
|
+
runBrowserVerification,
|
|
20
|
+
} from "@cassiomc1/forgeloop/integration";
|
|
21
|
+
|
|
22
|
+
const provider = createAgentBrowserVerificationProvider({
|
|
23
|
+
executablePath: "/opt/agent-browser/bin/agent-browser",
|
|
24
|
+
expectedVersion: "0.38.1",
|
|
25
|
+
});
|
|
26
|
+
const runtimeContext = createForgeLoopContext({
|
|
27
|
+
browserVerificationProviders: { "agent-browser": provider },
|
|
28
|
+
});
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Supported mapping
|
|
32
|
+
|
|
33
|
+
The adapter maps `NAVIGATE`, `CLICK`, `FILL`, `PRESS`, and bounded polling for
|
|
34
|
+
`WAIT_FOR` to Agent Browser commands. CSS locators are passed directly;
|
|
35
|
+
TEXT, LABEL, and ROLE locators are resolved from one accessibility snapshot and
|
|
36
|
+
ambiguity is `BLOCKED`. Assertions cover visibility, hidden state, text,
|
|
37
|
+
value, attribute, URL, URL prefix, and title. Requested assertion order is
|
|
38
|
+
preserved.
|
|
39
|
+
|
|
40
|
+
## Security and lifecycle
|
|
41
|
+
|
|
42
|
+
Each invocation probes the explicitly supplied executable version lazily, uses
|
|
43
|
+
a fresh random session, runs in an adapter-owned temporary cwd, and closes the
|
|
44
|
+
session in `finally`. Profiles, restore/state replay, CDP, auto-connect,
|
|
45
|
+
plugins, init scripts, and ambient cloud/authentication variables are filtered.
|
|
46
|
+
The target repository is never used as the Agent Browser cwd.
|
|
47
|
+
|
|
48
|
+
ForgeLoop validates exact `http`/`https` origins. Agent Browser receives the
|
|
49
|
+
corresponding hostname allowlist as defense in depth, while ForgeLoop remains
|
|
50
|
+
authoritative for scheme, host, and port. Redirects outside the allowlist are
|
|
51
|
+
rejected. Subprocess argv uses `shell: false`; stdout, stderr, time, and
|
|
52
|
+
diagnostics are bounded, and abort/timeout sends bounded termination signals.
|
|
53
|
+
|
|
54
|
+
## Screenshots and trust model
|
|
55
|
+
|
|
56
|
+
`NEVER`, `ON_FAILURE`, and `ALWAYS` screenshot policies are supported. Screenshot
|
|
57
|
+
bytes remain temporary; results expose only bounded PNG metadata, a SHA-256
|
|
58
|
+
digest, and a portable `agent-browser/<verification>/<digest>.png` reference.
|
|
59
|
+
|
|
60
|
+
The result is observation-only: `persisted: false`, `evidenceAuthority: NONE`,
|
|
61
|
+
and no lifecycle, claim, completion, evidence, or next-action fields. Calling
|
|
62
|
+
`runBrowserVerification` does not mutate ForgeLoop artifacts and a PASS is never
|
|
63
|
+
auto-promoted to a check or completion.
|
|
64
|
+
|
|
65
|
+
Command responses must use the complete `{success: true, data}` envelope and
|
|
66
|
+
scalar observations are type-checked before assertions run. Missing or extra
|
|
67
|
+
envelope fields, malformed observations, non-zero exits, unsupported versions,
|
|
68
|
+
cancellation, timeout, and output overflow fail closed; process success alone
|
|
69
|
+
never produces a PASS. Any internal test-only temporary-root override must stay
|
|
70
|
+
outside the verification target; the public TypeScript API exposes only the
|
|
71
|
+
host-selected executables.
|
|
72
|
+
|
|
73
|
+
## Troubleshooting and limitations
|
|
74
|
+
|
|
75
|
+
Use an absolute regular executable path and, when desired, set
|
|
76
|
+
`expectedVersion` to the host-qualified version. A missing executable, version
|
|
77
|
+
mismatch, timeout, malformed response, output overflow, locator ambiguity, or
|
|
78
|
+
origin escape fails closed. The default test suite does not require Agent
|
|
79
|
+
Browser, Chrome, network access, or a Node 24 runtime. An optional localhost
|
|
80
|
+
smoke test is available only when explicitly enabled with
|
|
81
|
+
`FORGELOOP_AGENT_BROWSER_E2E=1` and `FORGELOOP_AGENT_BROWSER_EXECUTABLE`.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Agent Browser Verification
|
|
2
|
+
|
|
3
|
+
This page is a short navigation entry for the concrete optional adapter. See
|
|
4
|
+
[`AGENT_BROWSER_ADAPTER.md`](./AGENT_BROWSER_ADAPTER.md) for host installation
|
|
5
|
+
ownership, the public factory, command mapping, isolation, exact-origin policy,
|
|
6
|
+
screenshots, troubleshooting, and the non-authoritative trust boundary.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
ForgeLoop is a portable protocol and support CLI for verifiable engineering workflows. It records and validates task state, contracts, routing, checks, evidence, continuity, and optional code attestations. It does not become an agent scheduler, delegation service, source-control authority, or secret manager.
|
|
8
8
|
|
|
9
9
|
Protocol version: 1
|
|
10
|
-
Package version: 1.
|
|
10
|
+
Package version: 1.14.0
|
|
11
11
|
|
|
12
12
|
## Canonical loop
|
|
13
13
|
|
|
@@ -19,6 +19,32 @@ Package version: 1.12.0
|
|
|
19
19
|
6. Run forgeloop complete; accept completion only when the validator returns VALID.
|
|
20
20
|
7. Run forgeloop next again and follow the returned lifecycle action to a terminal state or an explicit blocker.
|
|
21
21
|
|
|
22
|
+
## Project evidence and guide routing
|
|
23
|
+
|
|
24
|
+
- The canonical guide registry is `src/config/guides.json`; the .NET
|
|
25
|
+
specialist has guide ID `dotnet` and resolves to
|
|
26
|
+
`ENG/dotnet-aspnetcore-development-eng.md`.
|
|
27
|
+
- Project evidence schema v1 recognizes
|
|
28
|
+
structurally parsed Flutter, SDK-style .NET, Node.js, Rust, C, C++, Java,
|
|
29
|
+
SQL, Go, TypeScript, PHP, and Swift project evidence. SQL remains a bounded
|
|
30
|
+
owned-file overlay, while same-root language identities compose. ASP.NET Core
|
|
31
|
+
and ABP are conditional overlays recorded as reasons on `dotnet`; they
|
|
32
|
+
are not standalone guide IDs, and route validation requires each overlay to
|
|
33
|
+
include `dotnet`.
|
|
34
|
+
- Project detection is bounded by 256
|
|
35
|
+
manifests, 64 solution files,
|
|
36
|
+
1048576 bytes per manifest,
|
|
37
|
+
256 supporting source files,
|
|
38
|
+
524288 bytes per source file,
|
|
39
|
+
4096 visited directories, and
|
|
40
|
+
20000 visited entries. It skips
|
|
41
|
+
symlinks and configured generated/vendor directories; exhausted budgets fail
|
|
42
|
+
closed rather than producing unbounded discovery.
|
|
43
|
+
- Task ownership discovery is a separate exhaustive operation. Task-list
|
|
44
|
+
filters and pagination project the validated discovery result and do not
|
|
45
|
+
remove ledger or recovery evidence. See `GUIDE_ROUTER.md` and
|
|
46
|
+
`docs/CLI_REFERENCE.md` for the operator-facing contracts.
|
|
47
|
+
|
|
22
48
|
## Adaptive execution profiles
|
|
23
49
|
|
|
24
50
|
`complianceMode` controls how strongly project policy is enforced. The
|
|
@@ -63,7 +89,7 @@ or `NOT_COMPARABLE` when evidence is absent or incompatible. See
|
|
|
63
89
|
- Responsibility contracts constrain paths, checks, and frozen inputs; they do not prove identity or authorship.
|
|
64
90
|
- Verification scope describes planned verification breadth. Attestation coverage proves content for a concrete revision. These are separate claims.
|
|
65
91
|
- Attestation manifests exclude ForgeLoop protocol metadata and bind to the completion receipt and append-only ledger without circular references.
|
|
66
|
-
- Verification
|
|
92
|
+
- Verification command execution is external and provenance-bearing; ForgeLoop records the exact argv and result, while the authorized command may perform its declared effects. Signing is external; private keys and credentials are never persisted by ForgeLoop.
|
|
67
93
|
|
|
68
94
|
## Lifecycle
|
|
69
95
|
|
|
@@ -75,6 +101,7 @@ Phases: RECEIVED, DISCOVERING, CONTRACT_READY, ROUTED, DESIGNING, PLANNED, EXECU
|
|
|
75
101
|
| --- | --- | --- |
|
|
76
102
|
| adaptiveExecutionProfiles | 1 | yes |
|
|
77
103
|
| advisoryContextProviders | 1 | yes |
|
|
104
|
+
| auditUx | 1 | yes |
|
|
78
105
|
| canonicalHandoffs | 2 | yes |
|
|
79
106
|
| capabilityPolicy | 1 | yes |
|
|
80
107
|
| codeAttestation | 1 | yes |
|
|
@@ -89,9 +116,11 @@ Phases: RECEIVED, DISCOVERING, CONTRACT_READY, ROUTED, DESIGNING, PLANNED, EXECU
|
|
|
89
116
|
| executionProfileContext | 1 | yes |
|
|
90
117
|
| integrationApi | 1 | yes |
|
|
91
118
|
| observabilityStability | n/a | yes |
|
|
119
|
+
| providerExtensions | 1 | yes |
|
|
92
120
|
| reflection | 1 | yes |
|
|
93
121
|
| repositoryIndex | 1 | yes |
|
|
94
122
|
| responsibilityConstraints | 1 | yes |
|
|
123
|
+
| semanticDecisionPlane | 1 | yes |
|
|
95
124
|
| structuralQuality | 1 | yes |
|
|
96
125
|
| structuredTrace | 1 | yes |
|
|
97
126
|
| taskClaimRecovery | 1 | yes |
|
|
@@ -113,10 +142,39 @@ Phases: RECEIVED, DISCOVERING, CONTRACT_READY, ROUTED, DESIGNING, PLANNED, EXECU
|
|
|
113
142
|
Integration-API-only, lazy, and opt-in. Provider results are not persisted by
|
|
114
143
|
ForgeLoop and are never lifecycle state, evidence, authority, or executable
|
|
115
144
|
instructions.
|
|
145
|
+
- `providerExtensions` v1 is provider-neutral and
|
|
146
|
+
experimental. The generic provider registry remains internal and unexported.
|
|
116
147
|
|
|
117
148
|
Protocol v1, schema v1, and Integration API v1 remain independent of these
|
|
118
149
|
capability-family versions.
|
|
119
150
|
|
|
151
|
+
## Guide registry
|
|
152
|
+
|
|
153
|
+
| Guide | Path | Installable |
|
|
154
|
+
| --- | --- | --- |
|
|
155
|
+
| premium | ENG/premium-sites-studio-eng.md | yes |
|
|
156
|
+
| clean | ENG/clean-code-eng.md | yes |
|
|
157
|
+
| test | ENG/test-code-eng.md | yes |
|
|
158
|
+
| security | ENG/sec-code-eng.md | yes |
|
|
159
|
+
| design | ENG/design-code-eng.md | yes |
|
|
160
|
+
| taste | ENG/taste-frontend-eng.md | yes |
|
|
161
|
+
| performance | ENG/perf-code-eng.md | yes |
|
|
162
|
+
| accessibility | ENG/accessibility-eng.md | yes |
|
|
163
|
+
| games | ENG/games-code-design-web-eng.md | yes |
|
|
164
|
+
| documentation | ENG/documentation-quality-eng.md | yes |
|
|
165
|
+
| flutter | ENG/flutter-development-eng.md | yes |
|
|
166
|
+
| dotnet | ENG/dotnet-aspnetcore-development-eng.md | yes |
|
|
167
|
+
| nodejs | ENG/nodejs-backend-development-eng.md | yes |
|
|
168
|
+
| rust | ENG/rust-development-eng.md | yes |
|
|
169
|
+
| c | ENG/c-development-eng.md | yes |
|
|
170
|
+
| cpp | ENG/cpp-development-eng.md | yes |
|
|
171
|
+
| java | ENG/java-development-eng.md | yes |
|
|
172
|
+
| sql | ENG/sql-development-eng.md | yes |
|
|
173
|
+
| go | ENG/go-development-eng.md | yes |
|
|
174
|
+
| typescript | ENG/typescript-development-eng.md | yes |
|
|
175
|
+
| php | ENG/php-development-eng.md | yes |
|
|
176
|
+
| swift | ENG/swift-development-eng.md | yes |
|
|
177
|
+
|
|
120
178
|
## Public artifact registry
|
|
121
179
|
|
|
122
180
|
| Key | Scope | Path | Schema | Trust role |
|
|
@@ -146,10 +204,12 @@ capability-family versions.
|
|
|
146
204
|
| recovery | TASK | .forgeloop/task-state/<task-key>/recovery.json | task-recovery | TASK_RECOVERY_STATE |
|
|
147
205
|
| responsibility | TASK | .forgeloop/task-state/<task-key>/responsibility.json | responsibility | RESPONSIBILITY_CONSTRAINT |
|
|
148
206
|
| route | TASK | .forgeloop/task-state/<task-key>/routing-result.json | routing-result | GUIDE_ROUTING_SPECIFICATION |
|
|
207
|
+
| semanticDecisions | TASK | .forgeloop/task-state/<task-key>/decisions/<decision-id>.json | semantic-decision | SEMANTIC_DECISION |
|
|
149
208
|
| session | SESSION | .forgeloop/sessions/<session-id>.json | activation | SESSION_MARKER |
|
|
150
209
|
| sources | PROJECT | .forgeloop/sources.json | source-registry | SOURCE_ATTESTATION |
|
|
151
210
|
| state | TASK | .forgeloop/task-state/<task-key>/work-state.json | work-state | CANONICAL_LIFECYCLE_STATE |
|
|
152
211
|
| structuralQuality | TASK | .forgeloop/task-state/<task-key>/structural-quality/baseline.json | structural-quality | STRUCTURAL_QUALITY_EVIDENCE |
|
|
212
|
+
| testUtility | TASK | .forgeloop/task-state/<task-key>/test-utility.json | test-utility | NON_EVIDENCE_TEST_ANALYSIS |
|
|
153
213
|
| usage | TASK | .forgeloop/task-state/<task-key>/usage.json | usage | INFORMATIONAL_USAGE_TELEMETRY |
|
|
154
214
|
| verificationScope | TASK | .forgeloop/task-state/<task-key>/verification-scope.json | verification-scope | VERIFICATION_SCOPE_PLAN |
|
|
155
215
|
| workspaceBinding | TASK | .forgeloop/task-state/<task-key>/workspace-binding.json | workspace-binding | WORKSPACE_IDENTITY_BINDING |
|
|
@@ -195,6 +255,9 @@ capability-family versions.
|
|
|
195
255
|
|
|
196
256
|
| Command | Mutation | Purpose |
|
|
197
257
|
| --- | --- | --- |
|
|
258
|
+
| context-plan | READ_ONLY | Compiles a bounded non-authoritative context plan from deterministic candidates. |
|
|
259
|
+
| decision-show | READ_ONLY | Shows one persisted semantic decision artifact without performing a live request. |
|
|
260
|
+
| decision-status | READ_ONLY | Reports the pinned semantic decision-plane configuration without exposing credentials. |
|
|
198
261
|
| doctor | MUTATING | Diagnoses project health, discovers adapters, and optionally repairs missing template files. |
|
|
199
262
|
| efficiency | READ_ONLY | Projects usage and timing efficiency, comparing only against a metadata-compatible local baseline. |
|
|
200
263
|
| eval | MUTATING | Evaluates the current trajectory against a validated project-local reference scenario. |
|
|
@@ -202,12 +265,17 @@ capability-family versions.
|
|
|
202
265
|
| index-status | READ_ONLY | Reports provider-neutral repository-index health, metadata, and owned-server status. |
|
|
203
266
|
| inspect | READ_ONLY | Inspects target repository health, dirty files, active branch, and artifact freshness. |
|
|
204
267
|
| metrics | READ_ONLY | Projects trajectory, action, execution, timing, and known usage metrics without mutating state. |
|
|
268
|
+
| model-route | READ_ONLY | Projects a deterministic model-routing floor with advisory Jev escalation only. |
|
|
205
269
|
| profile-interview | READ_ONLY | Optional interactive or dry-run interview to refine project profile facts. |
|
|
206
270
|
| progress | READ_ONLY | Evaluates task progress across verification cycles and detects stalls deterministically. |
|
|
207
271
|
| protocol-info | READ_ONLY | Reports versioning, lifecycle, command, guide, and public error compatibility metadata for external harnesses. |
|
|
208
272
|
| reflect | READ_ONLY | Analyzes diagnostic and correction history deterministically for information gain, repeated failures, ineffective interventions, and oscillation. |
|
|
209
273
|
| search | READ_ONLY | Searches the ForgeLoop repository index through the provider-neutral search contract. |
|
|
274
|
+
| semantic-plan | READ_ONLY | Projects fail-closed failure triage, diagnosis priority, or review planning without authority. |
|
|
210
275
|
| status | READ_ONLY | Displays current lifecycle phase, active checks, blockers, and artifact freshness bindings. |
|
|
276
|
+
| test-inventory | READ_ONLY | Discovers tests deterministically and assigns stable semantic test IDs without pruning authority. |
|
|
277
|
+
| test-prune-plan | READ_ONLY | Projects KEEP, PROBE_REMOVAL, or BLOCKED without deleting tests. |
|
|
278
|
+
| test-utility | MUTATING | Persists non-evidence test utility analysis; never deletes tests or authorizes pruning. |
|
|
211
279
|
| trace | READ_ONLY | Emits detailed structured task trace with provenance and artifact relationships. |
|
|
212
280
|
| usage-record | MUTATING | Records actor-reported usage telemetry without treating it as verification evidence. |
|
|
213
281
|
| validate-protocol | READ_ONLY | Validates end-to-end cryptographic freshness, fingerprint bindings, and ledger integrity. |
|
|
@@ -221,9 +289,13 @@ capability-family versions.
|
|
|
221
289
|
| advance | MUTATING | Transitions the canonical lifecycle work state to an allowed target phase. |
|
|
222
290
|
| clear-state | MUTATING | Removes work-state.json for the active task only, preserving sibling contract, routing, and ledger files. |
|
|
223
291
|
| complete | MUTATING | Evaluates verification receipt coverage, gates, and ledger integrity to authorize task completion. |
|
|
292
|
+
| contract-create | MUTATING | Persists a validated contract and materializes the first real lifecycle checkpoint. |
|
|
293
|
+
| discover | MUTATING | Records the canonical initial discovery milestone for a newly created task. |
|
|
294
|
+
| gate-record | MUTATING | Records a required pre-execution gate with ForgeLoop-owned artifact hashes. |
|
|
295
|
+
| gate-revalidate | MUTATING | Refreshes a stale satisfied gate after execution only when current identity and active claims prove the change is safe. |
|
|
224
296
|
| next | READ_ONLY | Returns deterministic next-action guidance and command recommendations based on active state. |
|
|
225
297
|
| preflight | MUTATING | Evaluates pre-implementation contract, routing, and gates; synchronizes work state when READY. |
|
|
226
|
-
| reconcile-closure | MUTATING | Refreshes the work-state checkpoint of an EXECUTING task whose objective is already satisfied in the current repository, after contract-bound executed evidence, so canonical completion can proceed. |
|
|
298
|
+
| reconcile-closure | MUTATING | Refreshes the work-state checkpoint of an EXECUTING, VERIFYING, or REVIEWING task whose objective is already satisfied in the current repository, after contract-bound executed evidence, so canonical completion can proceed. |
|
|
227
299
|
| record-decision-criterion | MUTATING | Records an append-only decision settlement criterion bound to the active contract fingerprint. |
|
|
228
300
|
| record-diagnosis | MUTATING | Records an append-only diagnosis event or structured diagnostic case in the lifecycle event ledger. |
|
|
229
301
|
| record-hypothesis-disposition | MUTATING | Records an evidence-bound hypothesis disposition update in the lifecycle event ledger. |
|
|
@@ -251,14 +323,19 @@ capability-family versions.
|
|
|
251
323
|
|
|
252
324
|
| Command | Mutation | Purpose |
|
|
253
325
|
| --- | --- | --- |
|
|
326
|
+
| checkpoint-revalidate | MUTATING | Revalidates a safe ROUTED checkpoint after repository-only drift without changing contract or route identity. |
|
|
327
|
+
| contract-revise | MUTATING | Replaces an existing contract canonically before execution while preserving task identity and invalidating derived evidence. |
|
|
254
328
|
| index-rebuild | MUTATING | Atomically rebuilds the repository index and restarts its owned watcher. |
|
|
255
329
|
| index-setup | MUTATING | Provisions the pinned tgrep engine, builds the repository index, and starts its owned watcher. |
|
|
256
330
|
| index-start | MUTATING | Starts the owned tgrep repository-index watcher after an index has been built. |
|
|
257
331
|
| index-stop | MUTATING | Stops only a tgrep server whose process identity is provably owned by ForgeLoop. |
|
|
258
332
|
| init | MUTATING | Initializes a target project directory with ForgeLoop discovery adapters, schemas, and templates. |
|
|
259
333
|
| migrate-protocol | MUTATING | Safely migrates explicitly supported protocol state; unknown target versions fail without rewriting artifacts. |
|
|
334
|
+
| task-abandon | MUTATING | Explicitly abandons an active non-terminal task; records append-only evidence and releases claims without completion authority. |
|
|
260
335
|
| task-migrate | MUTATING | Migrates a legacy 1.0 singleton task state layout into a task-namespaced layout. |
|
|
336
|
+
| task-migrate-contract-bootstrap-repair | MUTATING | Migrates the exact legacy contract bootstrap repair marker by appending a bound migration event; the original marker and artifacts remain unchanged. |
|
|
261
337
|
| task-recover | MUTATING | Caller-acknowledged recovery of a STALE or ABANDONED task; records durable state and releases effective write claims. |
|
|
338
|
+
| task-repair-contract-bootstrap | MUTATING | Repairs the exact duplicate contract bootstrap defect without rewriting history; idempotent and append-only. |
|
|
262
339
|
| task-repair-legacy-recovery | MUTATING | Migrates one recognized legacy OPERATOR_RECOVERY_RECORDED boundary event into the modern durable recovery representation (append-only; original event unchanged). |
|
|
263
340
|
| task-resume | MUTATING | Reacquires a recovered task's write claims under project serialization and restores ordinary mutation authority. |
|
|
264
341
|
| task-unlock | MUTATING | Removes an orphaned task lock file to recover an interrupted task. |
|
|
@@ -290,6 +367,7 @@ capability-family versions.
|
|
|
290
367
|
| record-terminal-result | MUTATING | Records external terminal result evidence (PUBLICATION or PRODUCTION_READINESS) into receipt. |
|
|
291
368
|
| report | READ_ONLY | Emits a human-readable or structured JSON summary report of protocol state. |
|
|
292
369
|
| run-check | EXTERNAL_EXECUTION | Runs an exact command, records the execution provenance artifact, and binds observed check evidence. |
|
|
370
|
+
| test-prune-probe | EXTERNAL_EXECUTION | Runs only an isolated, fail-closed removal probe; never modifies the live worktree. |
|
|
293
371
|
| validate-receipt | READ_ONLY | Validates schema conformance and cryptographic bounds of an execution receipt file. |
|
|
294
372
|
| verify-scope | MUTATING | Resolves a provable changed, claimed, full, or unresolved verification boundary without launching checks. |
|
|
295
373
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# ForgeLoop Agent Skill
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
ForgeLoop ships a generated, portable Agent Skill at
|
|
6
|
+
[`skills/forgeloop/SKILL.md`](../skills/forgeloop/SKILL.md). It is operational
|
|
7
|
+
guidance, not protocol authority, and it does not certify any particular agent
|
|
8
|
+
harness.
|
|
9
|
+
|
|
10
|
+
## Purpose and Architecture
|
|
11
|
+
|
|
12
|
+
The documented precedence direction is:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
runtime protocol registries and validators
|
|
16
|
+
-> canonical protocol documentation
|
|
17
|
+
-> docs/AGENT_PROTOCOL_SUMMARY.md
|
|
18
|
+
-> generated Skill
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The Skill generator itself reads the generated summary and runtime protocol
|
|
22
|
+
metadata. It does not parse the canonical Markdown protocol documents.
|
|
23
|
+
|
|
24
|
+
The Skill never becomes lifecycle, completion, evidence, claim, scheduler,
|
|
25
|
+
provider, or installation authority.
|
|
26
|
+
|
|
27
|
+
## Generation and Freshness
|
|
28
|
+
|
|
29
|
+
Generation is deterministic, offline, and has no external Agent Skills
|
|
30
|
+
dependency:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm run summary:generate
|
|
34
|
+
npm run skill:generate
|
|
35
|
+
npm run summary:check
|
|
36
|
+
npm run skill:check
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The writer is bounded to the five known files under `skills/forgeloop/` and
|
|
40
|
+
does not delete unknown files. Documentation checks run Skill freshness after
|
|
41
|
+
Agent Protocol Summary freshness.
|
|
42
|
+
|
|
43
|
+
## Compatibility
|
|
44
|
+
|
|
45
|
+
The Skill follows the portable `skills/forgeloop/SKILL.md` convention with only
|
|
46
|
+
`name` and `description` frontmatter. This is format compatibility, not
|
|
47
|
+
behavioral certification for every external harness. Existing native
|
|
48
|
+
`AGENTS.md`, `CLAUDE.md`, Cursor, and Copilot integration surfaces remain
|
|
49
|
+
intact.
|
|
50
|
+
|
|
51
|
+
## Safety Boundaries
|
|
52
|
+
|
|
53
|
+
Agents must discover tasks first, follow `next`, respect claims, require
|
|
54
|
+
preflight `READY`, preserve command provenance, distinguish `run-check` from
|
|
55
|
+
`record-check`, use supported recovery, require `complete -> VALID`, and query
|
|
56
|
+
`next` again for a terminal result. Tokens, credentials, private keys, and
|
|
57
|
+
authorization headers must never be persisted in ForgeLoop artifacts.
|
|
58
|
+
|
|
59
|
+
External Agent Skills tooling is not a ForgeLoop dependency and is not used in
|
|
60
|
+
CI. ForgeLoop adds no runtime Skill installation or synchronization command.
|
|
61
|
+
|
|
62
|
+
## Packaging
|
|
63
|
+
|
|
64
|
+
The generated Skill, this document, and the bounded generator ship in the npm
|
|
65
|
+
package as instruction/documentation content. They add no runtime dependency.
|
|
66
|
+
Harness-specific installed copies and caches are not shipped.
|
|
@@ -44,6 +44,8 @@ All artifact schemas are defined in `schemas/*.schema.json`. Persisted artifact
|
|
|
44
44
|
| `task-state/<task-key>/attestations/code-manifest.json` | `code-manifest` | Protocol Generated | Immutable Once Written | Content Integrity Snapshot |
|
|
45
45
|
| `task-state/<task-key>/attestations/statement.json` | `in-toto-statement` | Protocol Compiled | Immutable Once Written | Code Attestation Statement |
|
|
46
46
|
| `task-state/<task-key>/attestations/statement.sigstore.json` | `null` | External Signing Provider | External Immutable | External Signature Bundle |
|
|
47
|
+
| `task-state/<task-key>/decisions/<decision-id>.json` | `semantic-decision` | Protocol Compiled | Immutable Once Written | Semantic Decision |
|
|
48
|
+
| `task-state/<task-key>/test-utility.json` | `test-utility` | Protocol Compiled | Overwritten On Analysis | Non Evidence Test Analysis |
|
|
47
49
|
|
|
48
50
|
<!-- END FORGELOOP GENERATED: artifact-registry -->
|
|
49
51
|
|
|
@@ -51,6 +53,99 @@ All artifact schemas are defined in `schemas/*.schema.json`. Persisted artifact
|
|
|
51
53
|
|
|
52
54
|
## 2. Canonical Artifact Specifications
|
|
53
55
|
|
|
56
|
+
### 2.0 `semantic-decision`
|
|
57
|
+
|
|
58
|
+
<!-- forgeloop-doc: schema=semantic-decision artifact=.forgeloop/task-state/<task-key>/decisions/<decision-id>.json -->
|
|
59
|
+
|
|
60
|
+
Semantic decisions are advisory, fingerprint-bound projections. They do not
|
|
61
|
+
authorize lifecycle transitions, evidence, ownership, installation, or
|
|
62
|
+
completion.
|
|
63
|
+
|
|
64
|
+
<!-- BEGIN FORGELOOP GENERATED: schema:semantic-decision -->
|
|
65
|
+
|
|
66
|
+
- `schemaVersion` *(number, required, const: 1)*
|
|
67
|
+
- `protocolVersion` *(number, required, const: 1)*
|
|
68
|
+
- `taskId` *(string, required, minLength: 1)*
|
|
69
|
+
- `decisionId` *(string, required, pattern: `^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$`)*
|
|
70
|
+
- `decisionKind` *(string, required, minLength: 1)*
|
|
71
|
+
- `engine` *(string, required, const: `typesafe-jev`)*
|
|
72
|
+
- `model` *(string, required, const: `jev-1.13.0`)*
|
|
73
|
+
- `questionSetId` *(string, required, minLength: 1)*
|
|
74
|
+
- `questionSetVersion` *(integer, required, minimum: 1)*
|
|
75
|
+
- `questionSetFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
|
|
76
|
+
- `questionSet` *(object, optional)*
|
|
77
|
+
- `id` *(string, required, minLength: 1)*
|
|
78
|
+
- `version` *(integer, required, minimum: 1)*
|
|
79
|
+
- `decisionKind` *(string, required, minLength: 1)*
|
|
80
|
+
- `questions` *(object, required)*
|
|
81
|
+
- `fingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
|
|
82
|
+
- `candidateIds` *(array<string>, optional)*
|
|
83
|
+
- `metadata` *(object, optional)*
|
|
84
|
+
- `policyVersion` *(number, required, const: 1)*
|
|
85
|
+
- `stateFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
|
|
86
|
+
- `taskStateFingerprint` *(string or null, optional)*
|
|
87
|
+
- `semanticStateFingerprint` *(string or null, optional)*
|
|
88
|
+
- `policyFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
|
|
89
|
+
- `repositoryFingerprint` *(string or object or null, optional)*
|
|
90
|
+
- `contractFingerprint` *(string or null, optional)*
|
|
91
|
+
- `routeFingerprint` *(string or null, optional)*
|
|
92
|
+
- `verificationCycle` *(integer or null, optional)*
|
|
93
|
+
- `candidateSetFingerprint` *(string or null, optional)*
|
|
94
|
+
- `answers` *(object, required)*
|
|
95
|
+
- `confidence` *(object, required)*
|
|
96
|
+
- `decision` *(object, required)*
|
|
97
|
+
- `usage` *(object, required)*
|
|
98
|
+
- `inputTokens` *(integer or null, required)*
|
|
99
|
+
- `outputTokens` *(integer or null, required)*
|
|
100
|
+
- `reportedBy` *(string, required, enum: `PROVIDER`, `HOST`, `UNKNOWN`)*
|
|
101
|
+
- `latencyMs` *(integer or null, optional)*
|
|
102
|
+
- `authority` *(string, required, const: `SEMANTIC_DECISION`)*
|
|
103
|
+
- `evidenceAuthority` *(string, required, const: `NONE`)*
|
|
104
|
+
- `lifecycleAuthority` *(boolean, required, const: false)*
|
|
105
|
+
- `completionAuthority` *(boolean, required, const: false)*
|
|
106
|
+
- `ownershipAuthority` *(boolean, required, const: false)*
|
|
107
|
+
- `installationAuthority` *(boolean, required, const: false)*
|
|
108
|
+
- `recordedAt` *(string, required, minLength: 1)*
|
|
109
|
+
|
|
110
|
+
<!-- END FORGELOOP GENERATED: schema:semantic-decision -->
|
|
111
|
+
|
|
112
|
+
### 2.0.1 `test-utility`
|
|
113
|
+
|
|
114
|
+
<!-- forgeloop-doc: schema=test-utility artifact=.forgeloop/task-state/<task-key>/test-utility.json -->
|
|
115
|
+
|
|
116
|
+
Non-evidence test inventory and utility analysis. It never authorizes deletion
|
|
117
|
+
or completion.
|
|
118
|
+
|
|
119
|
+
<!-- BEGIN FORGELOOP GENERATED: schema:test-utility -->
|
|
120
|
+
|
|
121
|
+
- `schemaVersion` *(number, required, const: 1)*
|
|
122
|
+
- `protocolVersion` *(number, required, const: 1)*
|
|
123
|
+
- `taskId` *(string, required, minLength: 1)*
|
|
124
|
+
- `generatedAt` *(string, required, minLength: 1)*
|
|
125
|
+
- `inventoryFingerprint` *(string, required, pattern: `^[a-f0-9]{64}$`)*
|
|
126
|
+
- `semanticStatus` *(string, required, enum: `PROVIDER_REPORTED`, `UNAVAILABLE`, `NOT_REQUESTED`)*
|
|
127
|
+
- `decisionId` *(string, optional, pattern: `^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$`)*
|
|
128
|
+
- `semanticDecisionFingerprint` *(string, optional, pattern: `^[a-f0-9]{64}$`)*
|
|
129
|
+
- `decisionIds` *(array<string>, optional)*
|
|
130
|
+
- `semanticDecisionFingerprints` *(array<string>, optional)*
|
|
131
|
+
- `tests` *(array<object>, required)*
|
|
132
|
+
- `testId` *(string, required, pattern: `^test-[a-f0-9]{24}$`)*
|
|
133
|
+
- `file` *(string, required, minLength: 1)*
|
|
134
|
+
- `framework` *(string, required, minLength: 1)*
|
|
135
|
+
- `suite` *(string, optional)*
|
|
136
|
+
- `name` *(string, required, minLength: 1)*
|
|
137
|
+
- `line` *(integer, optional, minimum: 1)*
|
|
138
|
+
- `sourceSummary` *(string, optional)*
|
|
139
|
+
- `targets` *(array<string>, optional)*
|
|
140
|
+
- `runtimeMs` *(number,null, optional, minimum: 0)*
|
|
141
|
+
- `uniqueBranches` *(integer,null, optional, minimum: 0)*
|
|
142
|
+
- `classification` *(string, required, enum: `KEEP_REQUIRED`, `KEEP_UNIQUE`, `KEEP_RISK_GUARD`, `KEEP_AUTHORITY_BOUNDARY`, `KEEP_RECOVERY_INVARIANT`, `KEEP_RELEASE_SMOKE`, `KEEP_MIGRATION_COMPATIBILITY`, `KEEP_PLATFORM_BEHAVIOR`, `KEEP_DOCUMENTATION_VALUE`, `KEEP_INTEGRATION_GUARD`, `OBSOLETE_CANDIDATE`, `FLAKY_LOW_SIGNAL`, `EXPENSIVE_LOW_SIGNAL`, `UNKNOWN`, `REDUNDANT_CANDIDATE`)*
|
|
143
|
+
- `recommendation` *(string, required, enum: `KEEP`, `REWRITE`, `PROBE_REMOVAL`, `BLOCKED`, `REVIEW`)*
|
|
144
|
+
- `protected` *(boolean, required)*
|
|
145
|
+
- `signals` *(object, optional)*
|
|
146
|
+
|
|
147
|
+
<!-- END FORGELOOP GENERATED: schema:test-utility -->
|
|
148
|
+
|
|
54
149
|
### 2.1 `task-state/<taskKey>/contract.json`
|
|
55
150
|
|
|
56
151
|
<!-- forgeloop-doc: schema=current-contract artifact=.forgeloop/task-state/<task-key>/contract.json -->
|
|
@@ -178,6 +273,11 @@ Readiness attestation evaluated prior to implementation.
|
|
|
178
273
|
|
|
179
274
|
Discovered repository facts, platforms, runtimes, and dependencies.
|
|
180
275
|
|
|
276
|
+
Built-in `contract-preset:documentation`, `contract-preset:bug`,
|
|
277
|
+
`contract-preset:feature`, and `contract-preset:release` references are
|
|
278
|
+
ForgeLoop-owned provenance and do not require an entry in this registry. Every
|
|
279
|
+
other contract source reference still requires a valid registry entry.
|
|
280
|
+
|
|
181
281
|
#### Canonical Fields
|
|
182
282
|
|
|
183
283
|
<!-- BEGIN FORGELOOP GENERATED: schema:source-registry -->
|
|
@@ -252,6 +352,14 @@ Local ForgeLoop configuration settings and policy bindings.
|
|
|
252
352
|
- `policy` *(string, optional, minLength: 1)*
|
|
253
353
|
- `requiredGates` *(array<string>, optional)*
|
|
254
354
|
- `requiredEvidence` *(array<string>, optional)*
|
|
355
|
+
- `decisionEngine` *(object, optional)*
|
|
356
|
+
- `required` *(boolean, required, const: true)*
|
|
357
|
+
- `provider` *(string, required, const: `typesafe-jev`)*
|
|
358
|
+
- `model` *(string, required, const: `jev-1.13.0`)*
|
|
359
|
+
- `policyVersion` *(number, required, const: 1)*
|
|
360
|
+
- `requestTimeoutMs` *(integer, required, minimum: 500, maximum: 60000)*
|
|
361
|
+
- `maxRetries` *(integer, required, minimum: 0, maximum: 3)*
|
|
362
|
+
- `cache` *(boolean, required)*
|
|
255
363
|
- `structuralQuality` *(object, optional)*
|
|
256
364
|
- `mode` *(string, optional, enum: `off`, `observe`, `gate`)*
|
|
257
365
|
- `provider` *(string, optional, pattern: `^[a-z][a-z0-9-]{0,63}$`)*
|
|
@@ -304,6 +412,21 @@ Local ForgeLoop configuration settings and policy bindings.
|
|
|
304
412
|
|
|
305
413
|
Pre-implementation gate approval artifact recording decisions, bound artifact hashes, and evidence.
|
|
306
414
|
|
|
415
|
+
Use `node src/cli.js gate-record` to create or replace this artifact. The
|
|
416
|
+
command computes SHA-256 values from project-relative regular files; callers
|
|
417
|
+
must not provide digests or edit gate JSON manually. Preflight checks these
|
|
418
|
+
hashes for staleness, and gate mutation is available only before execution.
|
|
419
|
+
Caller-recorded evidence is descriptive local input, not host attestation,
|
|
420
|
+
ForgeLoop execution evidence, or remote authority.
|
|
421
|
+
|
|
422
|
+
`requiredBy` records only the provenance that actually requires the gate:
|
|
423
|
+
guides whose metadata declares it, plus the stable `config.requiredGates`
|
|
424
|
+
marker when `config.requiredGates` requires it. Programmatic gate-record
|
|
425
|
+
inputs are bounded (32 repeatable entries, 2000-character strings, 4 MiB
|
|
426
|
+
per bound artifact, 64 KiB per evidence file) and refuse stale routes when
|
|
427
|
+
the persisted route, work state, or current contract fingerprints no longer
|
|
428
|
+
agree, before any gate is written.
|
|
429
|
+
|
|
307
430
|
#### Canonical Fields
|
|
308
431
|
|
|
309
432
|
<!-- BEGIN FORGELOOP GENERATED: schema:gate -->
|
package/docs/AUDIT_UX.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Audit UX read model
|
|
2
|
+
|
|
3
|
+
`task/audit-view` is a bounded, read-only Integration API resource for audit
|
|
4
|
+
and operator interfaces. It composes canonical ForgeLoop projections; it does
|
|
5
|
+
not become a second lifecycle, evidence, ownership, or completion authority.
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
import { readForgeLoopIntegrationResource } from "@cassiomc1/forgeloop/integration";
|
|
9
|
+
|
|
10
|
+
const view = await readForgeLoopIntegrationResource("task/audit-view", {
|
|
11
|
+
taskId: "task-1",
|
|
12
|
+
limit: 50,
|
|
13
|
+
categories: ["LIFECYCLE", "CHECK", "DIAGNOSTIC"],
|
|
14
|
+
});
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The projection includes lifecycle and health; a deterministic sequence-backed
|
|
18
|
+
timeline with explicit `null` timestamps when the ledger has no authoritative
|
|
19
|
+
timestamp; bounded checks, attempts, diagnostics, approvals, durable-action
|
|
20
|
+
summaries, recovery history, completion status, and canonical ownership; and
|
|
21
|
+
integrity and reason-code summaries that remain fail-closed when source
|
|
22
|
+
projections are inconsistent.
|
|
23
|
+
|
|
24
|
+
Timeline pagination accepts `limit`, `beforeSequence`, `afterSequence`, and a
|
|
25
|
+
bounded category allowlist. Without a cursor, the latest bounded page is
|
|
26
|
+
returned. `beforeSequence` performs backward pagination and returns the
|
|
27
|
+
nearest earlier matching events; its `nextBeforeSequence` cursor is the first
|
|
28
|
+
returned sequence when another page exists. `afterSequence` performs forward
|
|
29
|
+
pagination and returns the earliest later matching events; its
|
|
30
|
+
`nextAfterSequence` cursor is the last returned sequence when another page
|
|
31
|
+
exists. Pages never skip matching sequence numbers within the filtered event
|
|
32
|
+
stream, and combining the two cursors is rejected.
|
|
33
|
+
|
|
34
|
+
The projection redacts general POSIX (including single-segment), Windows, UNC,
|
|
35
|
+
and local `file://` absolute paths; environment assignments; common credential
|
|
36
|
+
assignments; authorization headers; complete `Cookie` and `Set-Cookie` header
|
|
37
|
+
values; and URL userinfo credentials. It does not return raw event payloads,
|
|
38
|
+
commands, or provider output. These are presentation-boundary redactions, not a
|
|
39
|
+
replacement for secret-handling controls at the source. The resource never
|
|
40
|
+
invokes a provider, executes a command, writes an artifact, changes lifecycle
|
|
41
|
+
state, or releases claims.
|
|
42
|
+
|
|
43
|
+
`auditUx` is advertised during capability discovery with version `1` and
|
|
44
|
+
`readOnly: true`. Hosts must use the canonical CLI/API lifecycle commands for
|
|
45
|
+
all mutations and must treat this view as presentation and diagnostic context
|
|
46
|
+
only.
|