@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,136 @@
|
|
|
1
|
+
# Browser Verification
|
|
2
|
+
|
|
3
|
+
## Status
|
|
4
|
+
|
|
5
|
+
Browser verification is a provider-neutral, host-injected v1 observation
|
|
6
|
+
contract. It is experimental and explicit. ForgeLoop does not select a browser
|
|
7
|
+
vendor, install a browser, or invoke verification from lifecycle commands.
|
|
8
|
+
|
|
9
|
+
## Purpose and Architecture
|
|
10
|
+
|
|
11
|
+
`runBrowserVerification` validates a bounded request, resolves one registered
|
|
12
|
+
provider, and turns its untrusted observation into an immutable result. Core
|
|
13
|
+
does not perform browser I/O. The runtime registry is inert at context
|
|
14
|
+
construction; factories are lazy and are invoked only by the explicit API call.
|
|
15
|
+
|
|
16
|
+
## Invocation
|
|
17
|
+
|
|
18
|
+
Provide an explicit task, target, requirement, and verification identity along
|
|
19
|
+
with `runtimeContext.browserVerificationProviders`:
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
const result = await runBrowserVerification({
|
|
23
|
+
taskId: "task-123",
|
|
24
|
+
target: "/workspace/project",
|
|
25
|
+
providerName: "playwright",
|
|
26
|
+
verificationId: "checkout",
|
|
27
|
+
requirement: "Checkout is usable",
|
|
28
|
+
startUrl: "https://app.example.test/checkout",
|
|
29
|
+
allowedOrigins: ["https://app.example.test"],
|
|
30
|
+
steps: [{ id: "open", kind: "NAVIGATE", url: "https://app.example.test/checkout" }],
|
|
31
|
+
assertions: [{ id: "title", kind: "TITLE_EQUALS", expected: "Checkout" }],
|
|
32
|
+
runtimeContext: { browserVerificationProviders: { playwright: provider } },
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Providers are registered by ID and must expose `verify(input)`. Factories are
|
|
37
|
+
lazy and are resolved only when the explicit invocation runs. Provider input
|
|
38
|
+
contains the normalized request, `signal`, and remaining `timeoutMs`. The
|
|
39
|
+
`AbortSignal` is an invocation control, not protocol state.
|
|
40
|
+
|
|
41
|
+
## Request Model
|
|
42
|
+
|
|
43
|
+
Requests require `taskId`, `target` (or `projectPath`), `verificationId`,
|
|
44
|
+
`requirement`, `startUrl`, `allowedOrigins`, at least one bounded step, and at
|
|
45
|
+
least one bounded assertion. Optional viewport, screenshot capture policy, and
|
|
46
|
+
timeout values are bounded. Unknown request, step, locator, assertion, capture,
|
|
47
|
+
or viewport fields are rejected. Arbitrary scripts, headers, cookies, uploads,
|
|
48
|
+
downloads, shell commands, and executable paths are not part of this contract.
|
|
49
|
+
|
|
50
|
+
Supported steps are `NAVIGATE`, `CLICK`, `FILL`, `PRESS`, and `WAIT_FOR`.
|
|
51
|
+
Supported assertions include visibility, text, value, attribute, URL, title,
|
|
52
|
+
and their documented bounded variants. Assertion results must match the
|
|
53
|
+
requested IDs, kinds, cardinality, and order exactly.
|
|
54
|
+
|
|
55
|
+
`WAIT_FOR` is strict: visibility, hidden-state, and text waits require a
|
|
56
|
+
locator; text and URL waits require an expected value, and URL wait values must
|
|
57
|
+
also be in the exact origin allowlist.
|
|
58
|
+
|
|
59
|
+
## Origins and Navigation
|
|
60
|
+
|
|
61
|
+
Authored URLs and provider-reported `finalUrl` and `navigations` must use
|
|
62
|
+
`http:` or `https:`, contain no credentials, and have an exact origin in
|
|
63
|
+
`allowedOrigins`. Hostnames are case-normalized and trailing-dot hostnames are
|
|
64
|
+
rejected. `localhost` and IPv4 origins are supported; bracketed IPv6 literals
|
|
65
|
+
are intentionally excluded in v1. The allowlist is an observation policy, not
|
|
66
|
+
a network sandbox: providers remain responsible for browser network access.
|
|
67
|
+
|
|
68
|
+
## Result Model
|
|
69
|
+
|
|
70
|
+
The normalized result contains task and requirement binding, provider identity,
|
|
71
|
+
assertions, final navigation state, diagnostics, optional accessibility
|
|
72
|
+
snapshots, and structured screenshot metadata. Raw image bytes are never
|
|
73
|
+
returned. Artifact references are portable, bounded, credential-free metadata
|
|
74
|
+
with a lowercase SHA-256 digest.
|
|
75
|
+
|
|
76
|
+
ForgeLoop derives overall status: any `FAIL` assertion yields `FAIL`, otherwise
|
|
77
|
+
any `BLOCKED` yields `BLOCKED`, otherwise all assertions yield `PASS`. A raw
|
|
78
|
+
provider status is optional and, when present, must match that derived value.
|
|
79
|
+
Provider output cannot choose lifecycle state, evidence, completion, claims, or
|
|
80
|
+
next actions. Unknown top-level fields and authority-bearing fields fail closed.
|
|
81
|
+
|
|
82
|
+
Snapshots are optional explicit `ACCESSIBILITY` observations with bounded
|
|
83
|
+
portable text. They are never assertion status or authority.
|
|
84
|
+
|
|
85
|
+
## Timeout and Cancellation
|
|
86
|
+
|
|
87
|
+
Factory resolution, provider validation, provider verification, and result
|
|
88
|
+
normalization share one ForgeLoop-owned deadline. On expiry ForgeLoop aborts
|
|
89
|
+
the shared signal, allows only bounded cooperative cleanup, and returns
|
|
90
|
+
`E_BROWSER_VERIFICATION_TIMEOUT`. Late provider resolution cannot change the
|
|
91
|
+
returned result. Providers must observe the signal and clean up resources they
|
|
92
|
+
own; synchronous JavaScript cannot be forcibly preempted.
|
|
93
|
+
|
|
94
|
+
## Trust Boundary and Credentials
|
|
95
|
+
|
|
96
|
+
Provider output is untrusted and normalized under strict size limits. Results
|
|
97
|
+
are stamped with `authority: "OBSERVATION"`, `evidenceAuthority: "NONE"`,
|
|
98
|
+
`actionability: "NON_EXECUTABLE"`, `lifecycleAuthority: false`, and
|
|
99
|
+
`completionAuthority: false`. Provider output cannot substitute for ForgeLoop
|
|
100
|
+
validation or lifecycle evidence.
|
|
101
|
+
|
|
102
|
+
Provider errors are mapped to generic, secret-safe public errors. Raw causes,
|
|
103
|
+
stacks, stderr, cookies, tokens, signed URLs, and local paths are not public
|
|
104
|
+
metadata. Credentials must not be placed in requests, URLs, artifacts,
|
|
105
|
+
diagnostics, or snapshots.
|
|
106
|
+
|
|
107
|
+
## Evidence Boundary
|
|
108
|
+
|
|
109
|
+
Results are observation-only: `persisted: false`, `evidenceAuthority: "NONE"`,
|
|
110
|
+
`completionAuthority: false`, and `evidenceRequiresForgeLoopValidation: true`.
|
|
111
|
+
Running this API does not mutate tasks, claims, routes, contracts, events,
|
|
112
|
+
receipts, checks, evidence, recovery, or actions.
|
|
113
|
+
|
|
114
|
+
## Network and Session Semantics
|
|
115
|
+
|
|
116
|
+
The origin allowlist does not provide browser isolation or prevent provider
|
|
117
|
+
network access. Providers own browser sessions and must not reuse credentials
|
|
118
|
+
or session state across unrelated invocations. No automatic browser install,
|
|
119
|
+
executable discovery, browser adapter, or auto-invocation is provided.
|
|
120
|
+
|
|
121
|
+
## Future Adapters and Troubleshooting
|
|
122
|
+
|
|
123
|
+
The optional Agent Browser adapter implements this provider contract through
|
|
124
|
+
`createAgentBrowserVerificationProvider`. It requires a host-supplied absolute
|
|
125
|
+
executable and never installs Agent Browser or Chrome. No vendor is canonical,
|
|
126
|
+
and no lifecycle command invokes the adapter. See
|
|
127
|
+
[`AGENT_BROWSER_ADAPTER.md`](./AGENT_BROWSER_ADAPTER.md) for its process,
|
|
128
|
+
session, screenshot, and troubleshooting boundaries. For malformed requests,
|
|
129
|
+
invalid results, origin escapes, provider failures, and timeouts, use the
|
|
130
|
+
stable error codes in `docs/TROUBLESHOOTING.md`.
|
|
131
|
+
|
|
132
|
+
## Compatibility
|
|
133
|
+
|
|
134
|
+
The canonical public operation is `runBrowserVerification`. The runtime
|
|
135
|
+
registration key remains `browserVerificationProviders`, and the provider kind
|
|
136
|
+
remains `BROWSER_VERIFICATION`.
|
package/docs/CLI_REFERENCE.md
CHANGED
|
@@ -18,6 +18,135 @@ Commands that support structured machine-readable output document `--json` in th
|
|
|
18
18
|
|
|
19
19
|
<!-- END FORGELOOP GENERATED: cli-common-options -->
|
|
20
20
|
|
|
21
|
+
## Semantic decision projections
|
|
22
|
+
|
|
23
|
+
### `decision-status`
|
|
24
|
+
|
|
25
|
+
Reports the pinned Jev configuration and, only when explicitly requested,
|
|
26
|
+
performs a bounded provider health check.
|
|
27
|
+
|
|
28
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:decision-status:options -->
|
|
29
|
+
|
|
30
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
31
|
+
- `--health`: perform a bounded live Jev health check when credentials are configured
|
|
32
|
+
- `--json`: emit decision-plane status as JSON
|
|
33
|
+
|
|
34
|
+
<!-- END FORGELOOP GENERATED: cli:decision-status:options -->
|
|
35
|
+
|
|
36
|
+
### `decision-show`
|
|
37
|
+
|
|
38
|
+
Shows a persisted semantic decision without performing a live request.
|
|
39
|
+
|
|
40
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:decision-show:options -->
|
|
41
|
+
|
|
42
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
43
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
44
|
+
- `--decision <id>`: decision artifact ID
|
|
45
|
+
- `--json`: emit the decision artifact as JSON
|
|
46
|
+
|
|
47
|
+
<!-- END FORGELOOP GENERATED: cli:decision-show:options -->
|
|
48
|
+
|
|
49
|
+
### `context-plan`
|
|
50
|
+
|
|
51
|
+
Compiles a bounded, non-authoritative context plan.
|
|
52
|
+
|
|
53
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:context-plan:options -->
|
|
54
|
+
|
|
55
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
56
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
57
|
+
- `--decision <id>`: persisted Jev decision artifact ID
|
|
58
|
+
- `--profile <profile>`: bounded context budget profile
|
|
59
|
+
- `--json`: emit the bounded context plan as JSON
|
|
60
|
+
|
|
61
|
+
<!-- END FORGELOOP GENERATED: cli:context-plan:options -->
|
|
62
|
+
|
|
63
|
+
### `model-route`
|
|
64
|
+
|
|
65
|
+
Projects the deterministic model-routing floor. Jev may escalate but cannot
|
|
66
|
+
lower the floor or select vendor-specific models.
|
|
67
|
+
|
|
68
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:model-route:options -->
|
|
69
|
+
|
|
70
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
71
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
72
|
+
- `--decision <id>`: persisted Jev decision artifact ID
|
|
73
|
+
- `--work <type>`: declared work type
|
|
74
|
+
- `--surface <value>`: affected surface (repeatable)
|
|
75
|
+
- `--risk <value>`: task risk (repeatable)
|
|
76
|
+
- `--platform <value>`: affected platform (repeatable)
|
|
77
|
+
- `--behavior-change`: declare behavior change
|
|
78
|
+
- `--executable-change`: declare executable/configuration change
|
|
79
|
+
- `--generation-required`: declare that generation is required
|
|
80
|
+
- `--architecture-change`: declare an architectural change
|
|
81
|
+
- `--ambiguous`: declare unresolved ambiguity
|
|
82
|
+
- `--json`: emit model-route projection as JSON
|
|
83
|
+
|
|
84
|
+
<!-- END FORGELOOP GENERATED: cli:model-route:options -->
|
|
85
|
+
|
|
86
|
+
### `semantic-plan`
|
|
87
|
+
|
|
88
|
+
Projects bounded failure, diagnosis, or review planning from ForgeLoop-owned
|
|
89
|
+
question-set categories.
|
|
90
|
+
|
|
91
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:semantic-plan:options -->
|
|
92
|
+
|
|
93
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
94
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
95
|
+
- `--decision <id>`: persisted Jev decision artifact ID
|
|
96
|
+
- `--kind <failure|diagnosis|review>`: bounded semantic planning projection
|
|
97
|
+
- `--input <json>`: bounded failure, diagnosis, or review context
|
|
98
|
+
- `--json`: emit semantic plan projection as JSON
|
|
99
|
+
|
|
100
|
+
<!-- END FORGELOOP GENERATED: cli:semantic-plan:options -->
|
|
101
|
+
|
|
102
|
+
### `test-inventory`
|
|
103
|
+
|
|
104
|
+
Discovers deterministic test units and stable test IDs.
|
|
105
|
+
|
|
106
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:test-inventory:options -->
|
|
107
|
+
|
|
108
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
109
|
+
- `--json`: emit deterministic test inventory as JSON
|
|
110
|
+
|
|
111
|
+
<!-- END FORGELOOP GENERATED: cli:test-inventory:options -->
|
|
112
|
+
|
|
113
|
+
### `test-utility`
|
|
114
|
+
|
|
115
|
+
Persists non-evidence test utility analysis. It never removes tests.
|
|
116
|
+
|
|
117
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:test-utility:options -->
|
|
118
|
+
|
|
119
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
120
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
121
|
+
- `--json`: emit test utility analysis as JSON
|
|
122
|
+
|
|
123
|
+
<!-- END FORGELOOP GENERATED: cli:test-utility:options -->
|
|
124
|
+
|
|
125
|
+
### `test-prune-plan`
|
|
126
|
+
|
|
127
|
+
Projects a safe non-destructive test pruning plan.
|
|
128
|
+
|
|
129
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:test-prune-plan:options -->
|
|
130
|
+
|
|
131
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
132
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
133
|
+
- `--json`: emit test prune plan as JSON
|
|
134
|
+
|
|
135
|
+
<!-- END FORGELOOP GENERATED: cli:test-prune-plan:options -->
|
|
136
|
+
|
|
137
|
+
### `test-prune-probe`
|
|
138
|
+
|
|
139
|
+
Probes only eligible candidates in isolation and never modifies the live tree.
|
|
140
|
+
|
|
141
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:test-prune-probe:options -->
|
|
142
|
+
|
|
143
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
144
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
145
|
+
- `--test <id>`: stable test ID to probe in isolation
|
|
146
|
+
- `--json`: emit test prune probe as JSON
|
|
147
|
+
|
|
148
|
+
<!-- END FORGELOOP GENERATED: cli:test-prune-probe:options -->
|
|
149
|
+
|
|
21
150
|
---
|
|
22
151
|
|
|
23
152
|
## CLI Syntax Contract
|
|
@@ -58,10 +187,10 @@ error codes. Default output and default JSON remain unchanged.
|
|
|
58
187
|
|
|
59
188
|
| Category | Commands |
|
|
60
189
|
| --- | --- |
|
|
61
|
-
| **Inspection & Diagnostics** | [`protocol-info`](#protocol-info), [`doctor`](#doctor), [`index-status`](#index-status), [`search`](#search), [`metrics`](#metrics), [`usage-record`](#usage-record), [`efficiency`](#efficiency), [`eval`](#eval), [`history`](#history), [`trace`](#trace), [`reflect`](#reflect), [`progress`](#progress), [`profile-interview`](#profile-interview), [`inspect`](#inspect), [`status`](#status), [`validate-state`](#validate-state), [`validate-protocol`](#validate-protocol) |
|
|
62
|
-
| **
|
|
63
|
-
| **Lifecycle & State** | [`activate`](#activate), [`route`](#route), [`preflight`](#preflight), [`advance`](#advance), [`next`](#next), [`record-diagnosis`](#record-diagnosis), [`record-intervention`](#record-intervention), [`record-hypothesis-disposition`](#record-hypothesis-disposition), [`record-decision-criterion`](#record-decision-criterion), [`complete`](#complete), [`clear-state`](#clear-state), [`reconcile-closure`](#reconcile-closure), [`task-create`](#task-create), [`task-list`](#task-list), [`task-show`](#task-show), [`task-lock-status`](#task-lock-status), [`task-scope`](#task-scope) |
|
|
64
|
-
| **
|
|
190
|
+
| **Inspection & Diagnostics** | [`protocol-info`](#protocol-info), [`decision-status`](#decision-status), [`decision-show`](#decision-show), [`context-plan`](#context-plan), [`model-route`](#model-route), [`semantic-plan`](#semantic-plan), [`test-inventory`](#test-inventory), [`test-utility`](#test-utility), [`test-prune-plan`](#test-prune-plan), [`doctor`](#doctor), [`index-status`](#index-status), [`search`](#search), [`metrics`](#metrics), [`usage-record`](#usage-record), [`efficiency`](#efficiency), [`eval`](#eval), [`history`](#history), [`trace`](#trace), [`reflect`](#reflect), [`progress`](#progress), [`profile-interview`](#profile-interview), [`inspect`](#inspect), [`status`](#status), [`validate-state`](#validate-state), [`validate-protocol`](#validate-protocol) |
|
|
191
|
+
| **Verification & Completion** | [`test-prune-probe`](#test-prune-probe), [`quality-baseline`](#quality-baseline), [`quality-verify`](#quality-verify), [`quality-status`](#quality-status), [`prepare-completion`](#prepare-completion), [`run-check`](#run-check), [`record-check`](#record-check), [`record-terminal-result`](#record-terminal-result), [`audit`](#audit), [`report`](#report), [`validate-receipt`](#validate-receipt), [`verify-scope`](#verify-scope) |
|
|
192
|
+
| **Lifecycle & State** | [`discover`](#discover), [`contract-create`](#contract-create), [`gate-record`](#gate-record), [`gate-revalidate`](#gate-revalidate), [`activate`](#activate), [`route`](#route), [`preflight`](#preflight), [`advance`](#advance), [`next`](#next), [`record-diagnosis`](#record-diagnosis), [`record-intervention`](#record-intervention), [`record-hypothesis-disposition`](#record-hypothesis-disposition), [`record-decision-criterion`](#record-decision-criterion), [`complete`](#complete), [`clear-state`](#clear-state), [`reconcile-closure`](#reconcile-closure), [`task-create`](#task-create), [`task-list`](#task-list), [`task-show`](#task-show), [`task-lock-status`](#task-lock-status), [`task-scope`](#task-scope) |
|
|
193
|
+
| **Setup & Maintenance** | [`contract-revise`](#contract-revise), [`init`](#init), [`index-setup`](#index-setup), [`index-start`](#index-start), [`index-stop`](#index-stop), [`index-rebuild`](#index-rebuild), [`update`](#update), [`checkpoint-revalidate`](#checkpoint-revalidate), [`task-migrate`](#task-migrate), [`migrate-protocol`](#migrate-protocol), [`task-unlock`](#task-unlock), [`task-recover`](#task-recover), [`task-abandon`](#task-abandon), [`task-repair-contract-bootstrap`](#task-repair-contract-bootstrap), [`task-migrate-contract-bootstrap-repair`](#task-migrate-contract-bootstrap-repair), [`task-repair-legacy-recovery`](#task-repair-legacy-recovery), [`task-resume`](#task-resume) |
|
|
65
194
|
| **Cross-Harness Continuity** | [`continuity`](#continuity), [`record-continuity`](#record-continuity), [`reconcile-continuity`](#reconcile-continuity), [`clear-continuity`](#clear-continuity), [`handoff-create`](#handoff-create), [`handoff-list`](#handoff-list), [`handoff-show`](#handoff-show) |
|
|
66
195
|
| **Durable Actions & Approvals** | [`run-action`](#run-action), [`action-propose`](#action-propose), [`action-record`](#action-record), [`action-show`](#action-show), [`action-reconcile`](#action-reconcile), [`action-verify`](#action-verify), [`action-authorize`](#action-authorize), [`approval-request`](#approval-request), [`approval-resolve`](#approval-resolve) |
|
|
67
196
|
| **Policy & Auditing** | [`policy`](#policy), [`policy-discover`](#policy-discover), [`policy-status`](#policy-status), [`policy-diff`](#policy-diff), [`rule-verify`](#rule-verify), [`baseline`](#baseline), [`bundle`](#bundle) |
|
|
@@ -834,11 +963,112 @@ Updates the managed instruction kit to match the current ForgeLoop package versi
|
|
|
834
963
|
|
|
835
964
|
## 2. Activation & Planning
|
|
836
965
|
|
|
966
|
+
### `discover`
|
|
967
|
+
|
|
968
|
+
Records the canonical initial discovery milestone for a newly created task.
|
|
969
|
+
|
|
970
|
+
- **Purpose**: Transitions a valid post-`task-create` task from `RECEIVED` to the derived `DISCOVERING` phase without creating synthetic work state.
|
|
971
|
+
- **When to use**: When `next` returns `DISCOVER` for a task with no work-state checkpoint.
|
|
972
|
+
- **Mutation**: Appends the task-scoped discovery milestone to the event ledger.
|
|
973
|
+
- **Options**:
|
|
974
|
+
|
|
975
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:discover:options -->
|
|
976
|
+
|
|
977
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
978
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
979
|
+
- `--json`: emit structured discovery output as JSON
|
|
980
|
+
|
|
981
|
+
<!-- END FORGELOOP GENERATED: cli:discover:options -->
|
|
982
|
+
|
|
983
|
+
### `contract-create`
|
|
984
|
+
|
|
985
|
+
Persists a validated contract and materializes the first real lifecycle checkpoint.
|
|
986
|
+
|
|
987
|
+
- **Purpose**: Creates a real contract after discovery and writes `work-state.json` with its actual contract fingerprint.
|
|
988
|
+
- **When to use**: When `next` returns `CREATE_CONTRACT` after discovery.
|
|
989
|
+
- **Mutation**: Writes the task contract, task work state, and append-only lifecycle events transactionally.
|
|
990
|
+
- **Options**:
|
|
991
|
+
|
|
992
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:contract-create:options -->
|
|
993
|
+
|
|
994
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
995
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
996
|
+
- `--contract-file <path>`: validated JSON contract relative to the target
|
|
997
|
+
- `--preset <name>`: bounded contract preset: documentation, bug, feature, or release
|
|
998
|
+
- `--json`: emit structured contract output as JSON
|
|
999
|
+
|
|
1000
|
+
<!-- END FORGELOOP GENERATED: cli:contract-create:options -->
|
|
1001
|
+
|
|
1002
|
+
### `contract-revise`
|
|
1003
|
+
|
|
1004
|
+
Replaces a validated pre-execution contract through an append-only, transaction-witnessed revision.
|
|
1005
|
+
|
|
1006
|
+
- **Purpose**: Canonically revise a contract in `CONTRACT_READY`, `ROUTED`, or `PLANNED` before execution starts.
|
|
1007
|
+
- **When to use**: When the task objective or scope changes and the existing derived route, preflight, gates, or plan must no longer authorize the work.
|
|
1008
|
+
- **Mutation**: Writes the replacement contract, resets derived authorization, appends `CONTRACT_REVISED`, and appends an adjacent `TRANSACTION_COMMITTED(operation=contract-revise)` witness.
|
|
1009
|
+
- **Restrictions**: Requires exactly one of `--preset` or `--contract-file`; a `PLANNED` task rewinds to `ROUTED`, and old route/preflight/plan evidence must be regenerated.
|
|
1010
|
+
- **Options**:
|
|
1011
|
+
|
|
1012
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:contract-revise:options -->
|
|
1013
|
+
|
|
1014
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
1015
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
1016
|
+
- `--contract-file <path>`: validated replacement JSON contract relative to the target
|
|
1017
|
+
- `--preset <name>`: bounded replacement contract preset: documentation, bug, feature, or release
|
|
1018
|
+
- `--json`: emit structured contract revision output as JSON
|
|
1019
|
+
|
|
1020
|
+
<!-- END FORGELOOP GENERATED: cli:contract-revise:options -->
|
|
1021
|
+
|
|
1022
|
+
### `gate-record`
|
|
1023
|
+
|
|
1024
|
+
Records a gate satisfaction or rejection decision for a task's preflight gate lifecycle.
|
|
1025
|
+
|
|
1026
|
+
- **Purpose**: Records structured evidence that a named gate has been satisfied, rejected, or deferred, with optional artifact and decision evidence.
|
|
1027
|
+
- **When to use**: During the preflight gate lifecycle to progress gate status from pending to resolved.
|
|
1028
|
+
- **Mutation**: Writes a gate artifact under the task namespace and appends a `GATE_SATISFIED` or `GATE_REJECTED` protocol event. A `GATE_SATISFIED` event after `CONTRACT_REVISED` must be immediately followed by the canonical `TRANSACTION_COMMITTED(operation=gate-record)` witness; pre-revision historical gate events remain backward compatible. Repeated satisfied recording is event-idempotent within the current contract epoch, even if the gate artifact is refreshed.
|
|
1029
|
+
- **Options**:
|
|
1030
|
+
|
|
1031
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:gate-record:options -->
|
|
1032
|
+
|
|
1033
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
1034
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
1035
|
+
- `--gate <name>`: required gate name
|
|
1036
|
+
- `--status <status>`: satisfied, unverified, or blocked
|
|
1037
|
+
- `--artifact <path>`: project-relative evidence artifact (repeatable)
|
|
1038
|
+
- `--decision <text>`: caller-recorded gate decision (repeatable)
|
|
1039
|
+
- `--unknown <text>`: known unresolved item (repeatable)
|
|
1040
|
+
- `--assumption <text>`: approved local assumption (repeatable)
|
|
1041
|
+
- `--evidence-file <path>`: bounded local descriptive evidence JSON
|
|
1042
|
+
- `--json`: emit structured gate output as JSON
|
|
1043
|
+
|
|
1044
|
+
<!-- END FORGELOOP GENERATED: cli:gate-record:options -->
|
|
1045
|
+
|
|
1046
|
+
### `gate-revalidate`
|
|
1047
|
+
|
|
1048
|
+
Refreshes a satisfied gate whose evidence artifacts changed after execution
|
|
1049
|
+
started, while preserving the original approval and append-only history.
|
|
1050
|
+
|
|
1051
|
+
- **Purpose**: Revalidate stale gate artifacts only through current task identity and active write claims.
|
|
1052
|
+
- **When to use**: When `next` returns `REVALIDATE_GATES` for a post-execution task.
|
|
1053
|
+
- **Mutation**: Refreshes the task-scoped gate artifact and appends `GATE_REVALIDATED` with an adjacent `TRANSACTION_COMMITTED(operation=gate-revalidate)` witness.
|
|
1054
|
+
- **Restrictions**: Does not bypass `gate-record`'s `E_PHASE_FREEZE`; requires `--acknowledge-stale`, a coherent current route, and changed artifacts covered by active claims.
|
|
1055
|
+
- **Options**:
|
|
1056
|
+
|
|
1057
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:gate-revalidate:options -->
|
|
1058
|
+
|
|
1059
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
1060
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
1061
|
+
- `--gate <name>`: satisfied gate to refresh after safe artifact drift
|
|
1062
|
+
- `--acknowledge-stale`: explicitly acknowledge refresh of stale gate artifacts inside active task claims
|
|
1063
|
+
- `--json`: emit structured gate revalidation output as JSON
|
|
1064
|
+
|
|
1065
|
+
<!-- END FORGELOOP GENERATED: cli:gate-revalidate:options -->
|
|
1066
|
+
|
|
837
1067
|
### `route`
|
|
838
1068
|
|
|
839
1069
|
Calculates and persists deterministic engineering guide routing.
|
|
840
1070
|
|
|
841
|
-
- **Purpose**: Selects relevant technical guides (e.g. `clean`, `test`, `security`, `design`) from declared work attributes and bounded structural project evidence such as an affected Flutter SDK dependency.
|
|
1071
|
+
- **Purpose**: Selects relevant technical guides (e.g. `clean`, `test`, `security`, `design`) from declared work attributes and bounded structural project evidence such as an affected Flutter SDK dependency, supported .NET project, confirmed Node.js backend runtime, valid Rust Cargo package/workspace, recognized C/C++, Java, Go, TypeScript, PHP, or Swift project, or owned SQL artifact. ASP.NET Core and ABP are conditional reasons on the `dotnet` specialist, not standalone guides; SQL is a host-project overlay.
|
|
842
1072
|
- **When to use**: During discovery before preflight.
|
|
843
1073
|
- **Mutation**: Writes `.forgeloop/task-state/<taskKey>/routing-result.json`.
|
|
844
1074
|
- **Options**:
|
|
@@ -982,6 +1212,7 @@ Computes the deterministic next action required by the protocol.
|
|
|
982
1212
|
- `--path <directory>`: target project directory (default: current directory)
|
|
983
1213
|
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
984
1214
|
- `--compact`: emit a bounded next-action projection
|
|
1215
|
+
- `--explain`: include bounded read-only blocker and recovery explanation
|
|
985
1216
|
- `--json`: emit structured output as JSON
|
|
986
1217
|
|
|
987
1218
|
<!-- END FORGELOOP GENERATED: cli:next:options -->
|
|
@@ -1966,16 +2197,41 @@ Clears canonical work-state checkpoint for the current task.
|
|
|
1966
2197
|
forgeloop clear-state
|
|
1967
2198
|
```
|
|
1968
2199
|
|
|
2200
|
+
### `checkpoint-revalidate`
|
|
2201
|
+
|
|
2202
|
+
Revalidates a safe pre-execution `ROUTED` checkpoint after repository-only
|
|
2203
|
+
drift.
|
|
2204
|
+
|
|
2205
|
+
- **Purpose**: Rebinds the checkpoint to ForgeLoop's current repository fingerprint while preserving lifecycle, contract, route, guide, gate, check, and evidence identity.
|
|
2206
|
+
- **When to use**: When `next` returns `REVALIDATE_CHECKPOINT` with only `E_REPOSITORY_CHANGED` / `E_STATE_REVALIDATION_REQUIRED`.
|
|
2207
|
+
- **Mutation**: Advances the state revision and appends a transaction-bound `CHECKPOINT_REVALIDATED` event.
|
|
2208
|
+
- **Safety Note**: It does not accept caller-supplied repository identity, revise contracts, reroute, fabricate evidence, or operate after execution starts. Unsupported drift fails closed with `E_CHECKPOINT_REVALIDATION_UNSAFE`.
|
|
2209
|
+
- **Options**:
|
|
2210
|
+
|
|
2211
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:checkpoint-revalidate:options -->
|
|
2212
|
+
|
|
2213
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
2214
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
2215
|
+
- `--json`: emit structured revalidation output as JSON
|
|
2216
|
+
|
|
2217
|
+
<!-- END FORGELOOP GENERATED: cli:checkpoint-revalidate:options -->
|
|
2218
|
+
|
|
2219
|
+
- **Example**:
|
|
2220
|
+
|
|
2221
|
+
```bash
|
|
2222
|
+
forgeloop checkpoint-revalidate --task <id> --json
|
|
2223
|
+
```
|
|
2224
|
+
|
|
1969
2225
|
---
|
|
1970
2226
|
|
|
1971
2227
|
### `reconcile-closure`
|
|
1972
2228
|
|
|
1973
|
-
Reconciles the checkpoint of an EXECUTING task whose objective is already satisfied in the current repository.
|
|
2229
|
+
Reconciles the checkpoint of an EXECUTING, VERIFYING, or REVIEWING task whose objective is already satisfied in the current repository.
|
|
1974
2230
|
|
|
1975
|
-
- **Purpose**: Refresh the work-state repository fingerprint of a stale EXECUTING task after repository movement, using executed contract-bound evidence that the objective is present, so the canonical completion pipeline can close it.
|
|
1976
|
-
- **When to use**: When a task is stuck in EXECUTING with `E_REPOSITORY_CHANGED` / `E_STATE_REVALIDATION_REQUIRED` and its objective was already satisfied by other changes in the current repository.
|
|
1977
|
-
- **Mutation**: Appends a `CHECKPOINT_RECONCILED` ledger event (previous/current repository fingerprints plus evidence) and refreshes the work-state repository fingerprint.
|
|
1978
|
-
- **Safety Note**: Refuses
|
|
2231
|
+
- **Purpose**: Refresh the work-state repository fingerprint of a stale EXECUTING, VERIFYING, or REVIEWING task after repository movement, using executed contract-bound evidence that the objective is present, so the canonical completion pipeline can close it.
|
|
2232
|
+
- **When to use**: When a task is stuck in EXECUTING, VERIFYING, or REVIEWING with `E_REPOSITORY_CHANGED` / `E_STATE_REVALIDATION_REQUIRED` and its objective was already satisfied by other changes in the current repository. A REVIEWING task may use an existing authorized completion-recovery snapshot, or the narrow bootstrap path when the only drift is repository movement and no completion rejection has been persisted.
|
|
2233
|
+
- **Mutation**: Appends a `CHECKPOINT_RECONCILED` ledger event (previous/current repository fingerprints plus evidence) and refreshes the work-state repository fingerprint. The phase stays unchanged until the canonical pipeline advances it; claims release only through canonical `COMPLETE`.
|
|
2234
|
+
- **Safety Note**: Refuses other phases, fresh checkpoints, contract or required-artifact drift, invalid ledgers, invalid claim ownership, unauthorized persisted completion rejection, unknown requirements, and failing evidence. It never appends completion events or releases claims.
|
|
1979
2235
|
- **Options**:
|
|
1980
2236
|
|
|
1981
2237
|
<!-- BEGIN FORGELOOP GENERATED: cli:reconcile-closure:options -->
|
|
@@ -2016,6 +2272,8 @@ Initializes a new isolated task namespace with write claims and contract.
|
|
|
2016
2272
|
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
2017
2273
|
- `--claim <path>`: scoped file path or directory prefix claimed for mutation (repeatable)
|
|
2018
2274
|
- `--contract-file <path>`: path to initial contract file
|
|
2275
|
+
- `--preset <name>`: bounded contract preset: documentation, bug, feature, or release
|
|
2276
|
+
- `--preview`: preview the contract without creating lifecycle state
|
|
2019
2277
|
- `--json`: emit structured output as JSON
|
|
2020
2278
|
|
|
2021
2279
|
<!-- END FORGELOOP GENERATED: cli:task-create:options -->
|
|
@@ -2034,6 +2292,12 @@ Initializes a new isolated task namespace with write claims and contract.
|
|
|
2034
2292
|
|
|
2035
2293
|
`--contract-file` points to a contract JSON that is validated and copied into the task namespace.
|
|
2036
2294
|
|
|
2295
|
+
Use `--preset documentation|bug|feature|release --preview` for a bounded,
|
|
2296
|
+
read-only contract proposal. Preview validates claims and creates no task
|
|
2297
|
+
namespace or project-claims lock; repeat without `--preview` after reviewing
|
|
2298
|
+
the proposal. Presets record unresolved decisions when concrete deliverables
|
|
2299
|
+
are not supplied and do not publish or deploy release artifacts.
|
|
2300
|
+
|
|
2037
2301
|
### `task-list`
|
|
2038
2302
|
|
|
2039
2303
|
Lists all tasks discovered in `.forgeloop/task-state/`.
|
|
@@ -2045,14 +2309,27 @@ Lists all tasks discovered in `.forgeloop/task-state/`.
|
|
|
2045
2309
|
<!-- BEGIN FORGELOOP GENERATED: cli:task-list:options -->
|
|
2046
2310
|
|
|
2047
2311
|
- `--path <directory>`: target project directory (default: current directory)
|
|
2312
|
+
- `--phase <phase>`: only return tasks in this lifecycle phase
|
|
2313
|
+
- `--active`: only return healthy tasks with active ownership and a non-terminal phase
|
|
2314
|
+
- `--limit <number>`: maximum tasks to return
|
|
2315
|
+
- `--offset <number>`: number of sorted tasks to skip
|
|
2048
2316
|
- `--json`: emit structured output as JSON
|
|
2049
2317
|
|
|
2050
2318
|
<!-- END FORGELOOP GENERATED: cli:task-list:options -->
|
|
2051
2319
|
|
|
2320
|
+
Results are sorted by task ID. `--phase` and `--active` filter the
|
|
2321
|
+
presentation only; ownership and corruption checks still run for every
|
|
2322
|
+
discovered task before filtering. `--limit` and `--offset` provide bounded
|
|
2323
|
+
pagination and return `total` and `hasMore` in JSON. Listing never removes
|
|
2324
|
+
ledger or recovery evidence. Discovery itself is exhaustive for valid task
|
|
2325
|
+
namespaces because ownership and conflict correctness must not depend on a
|
|
2326
|
+
page limit.
|
|
2327
|
+
|
|
2052
2328
|
- **Example**:
|
|
2053
2329
|
|
|
2054
2330
|
```bash
|
|
2055
2331
|
forgeloop task-list --json
|
|
2332
|
+
forgeloop task-list --active --limit 20 --offset 0 --json
|
|
2056
2333
|
```
|
|
2057
2334
|
|
|
2058
2335
|
### `task-show`
|
|
@@ -2229,6 +2506,111 @@ Fake, missing, corrupt, or mismatched recovery state is
|
|
|
2229
2506
|
`E_TASK_CLAIM_OWNERSHIP_INCONSISTENT`/`E_TASK_RECOVERY_INCONSISTENT`; historical
|
|
2230
2507
|
claims remain reserved.
|
|
2231
2508
|
|
|
2509
|
+
### `task-abandon`
|
|
2510
|
+
|
|
2511
|
+
Explicitly abandons an active non-terminal task without fabricating completion.
|
|
2512
|
+
|
|
2513
|
+
- **Purpose**: Releases validated write claims for a deliberately abandoned task while preserving its current lifecycle phase, append-only history, and durable recovery boundary. This is the canonical escape from an active-task claim deadlock; it is not a completion or publication operation.
|
|
2514
|
+
- **When to use**: Only when the exact task ID is known and the caller has deliberately acknowledged abandonment. Use `task-recover` only for tasks already classified `STALE` or `ABANDONED`.
|
|
2515
|
+
- **Mutation**: Appends `TASK_ABANDONED` and its `TRANSACTION_COMMITTED(operation=task-abandon)` witness, then writes `recovery.json` with classification `ABANDONED` and authority `CALLER_ACKNOWLEDGED`. Work state remains unchanged and claims resolve to `RELEASED_BY_RECOVERY`.
|
|
2516
|
+
- **Options**:
|
|
2517
|
+
|
|
2518
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:task-abandon:options -->
|
|
2519
|
+
|
|
2520
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
2521
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
2522
|
+
- `--acknowledge-abandonment`: explicitly acknowledge abandonment of an active task (required; not completion authority)
|
|
2523
|
+
- `--json`: emit structured abandonment output as JSON
|
|
2524
|
+
|
|
2525
|
+
<!-- END FORGELOOP GENERATED: cli:task-abandon:options -->
|
|
2526
|
+
|
|
2527
|
+
- **Example**:
|
|
2528
|
+
|
|
2529
|
+
```bash
|
|
2530
|
+
forgeloop task-abandon --task task-001 --acknowledge-abandonment --json
|
|
2531
|
+
```
|
|
2532
|
+
|
|
2533
|
+
The command requires an explicit task ID and acknowledgement. It refuses
|
|
2534
|
+
`COMPLETE`, already recovered, inconsistent, or non-active ownership states
|
|
2535
|
+
and never writes `COMPLETION_VALIDATED`. Use `task-resume` to reacquire claims
|
|
2536
|
+
through the normal lifecycle when work should continue.
|
|
2537
|
+
|
|
2538
|
+
### `task-repair-contract-bootstrap`
|
|
2539
|
+
|
|
2540
|
+
Repairs only the exact historical duplicate contract bootstrap defect.
|
|
2541
|
+
|
|
2542
|
+
- **Purpose**: Recognizes the narrow append-only signature of a duplicate `CONTRACT_VALIDATED` followed by a duplicate `contract-create` commit, verifies the current contract and route/state bindings, and reconstructs the earliest proven checkpoint without rewriting existing events.
|
|
2543
|
+
- **Mutation**: Under project/task serialization, writes the reconciled work-state and appends `CONTRACT_BOOTSTRAP_REPAIR_RECORDED` plus `TRANSACTION_COMMITTED` in one transaction.
|
|
2544
|
+
- **Options**:
|
|
2545
|
+
|
|
2546
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:task-repair-contract-bootstrap:options -->
|
|
2547
|
+
|
|
2548
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
2549
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
2550
|
+
- `--acknowledge-repair`: explicit caller acknowledgement of the exact append-only repair (required)
|
|
2551
|
+
- `--json`: emit structured repair output as JSON
|
|
2552
|
+
|
|
2553
|
+
<!-- END FORGELOOP GENERATED: cli:task-repair-contract-bootstrap:options -->
|
|
2554
|
+
|
|
2555
|
+
- **Example**:
|
|
2556
|
+
|
|
2557
|
+
```bash
|
|
2558
|
+
forgeloop task-repair-contract-bootstrap --task task-001 --acknowledge-repair --json
|
|
2559
|
+
```
|
|
2560
|
+
|
|
2561
|
+
The command requires fresh caller acknowledgement. The marker records the
|
|
2562
|
+
repair-time checkpoint as an immutable anchor, including `reconstructedPhase`,
|
|
2563
|
+
`reconstructedStateFingerprint`, `reconstructedStateRevision`, and the
|
|
2564
|
+
repair-time `routeFingerprint`; it does not freeze the task at that checkpoint.
|
|
2565
|
+
The marker must be immediately followed by its
|
|
2566
|
+
`TRANSACTION_COMMITTED(operation=task-repair-contract-bootstrap)` witness.
|
|
2567
|
+
After the anchor revision, normal canonical lifecycle evolution is allowed, but
|
|
2568
|
+
state rollback, missing state, invalid current contract/route identity, or
|
|
2569
|
+
ledger/state incoherence fails closed with `E_CONTRACT_BOOTSTRAP_REPAIR_INVALID`.
|
|
2570
|
+
If a later route fingerprint differs from the marker, the current route and
|
|
2571
|
+
state must be canonically coherent and the ledger must contain a ForgeLoop-
|
|
2572
|
+
generated `ROUTE_REBOUND` witness immediately followed by the matching
|
|
2573
|
+
`TRANSACTION_COMMITTED(operation=route)`. The witness binds the current route
|
|
2574
|
+
fingerprint, the repair-time contract fingerprint, and the previous route
|
|
2575
|
+
fingerprint; a historical route transaction, or route and state fields changed
|
|
2576
|
+
together without this identity witness, is not authorization. A contract-only
|
|
2577
|
+
repair may establish its first route through canonical `runRoute`, recording a
|
|
2578
|
+
null previous route fingerprint. A proven `ROUTE_VALIDATED` milestone also
|
|
2579
|
+
requires a present, valid route artifact bound to the current contract, while a
|
|
2580
|
+
history without `ROUTE_VALIDATED` may repair to `CONTRACT_READY` without a
|
|
2581
|
+
route artifact. After repair, entering `DESIGNING` additionally requires the
|
|
2582
|
+
canonical `DESIGN_GATE_STARTED` event.
|
|
2583
|
+
|
|
2584
|
+
### `task-migrate-contract-bootstrap-repair`
|
|
2585
|
+
|
|
2586
|
+
Migrates the exact legacy contract bootstrap repair marker produced before
|
|
2587
|
+
`reconstructedStateRevision` was required.
|
|
2588
|
+
|
|
2589
|
+
- **Purpose**: Proves the legacy marker, its immediate repair transaction, the current contract, the reconstructed work-state, and (for `ROUTED`) the persisted route. Strict validation remains fail-closed until the migration witness is appended.
|
|
2590
|
+
- **Mutation**: Appends `CONTRACT_BOOTSTRAP_REPAIR_MIGRATION_RECORDED` plus `TRANSACTION_COMMITTED(operation=task-migrate-contract-bootstrap-repair)`; it never rewrites the legacy marker or state/contract/route artifacts.
|
|
2591
|
+
- **Options**:
|
|
2592
|
+
|
|
2593
|
+
<!-- BEGIN FORGELOOP GENERATED: cli:task-migrate-contract-bootstrap-repair:options -->
|
|
2594
|
+
|
|
2595
|
+
- `--path <directory>`: target project directory (default: current directory)
|
|
2596
|
+
- `--task <id>`: task ID to operate on (when omitted, resolved from context or single active task)
|
|
2597
|
+
- `--acknowledge-migration`: fresh explicit caller acknowledgement of the exact legacy marker migration (required)
|
|
2598
|
+
- `--json`: emit structured migration output as JSON
|
|
2599
|
+
|
|
2600
|
+
<!-- END FORGELOOP GENERATED: cli:task-migrate-contract-bootstrap-repair:options -->
|
|
2601
|
+
|
|
2602
|
+
- **Example**:
|
|
2603
|
+
|
|
2604
|
+
```bash
|
|
2605
|
+
forgeloop task-migrate-contract-bootstrap-repair --task task-001 --acknowledge-migration --json
|
|
2606
|
+
```
|
|
2607
|
+
|
|
2608
|
+
Only the exact legacy schema and immediate repair boundary are eligible. Any
|
|
2609
|
+
near-miss, later lifecycle activity, state/route drift, live lock, unknown lock,
|
|
2610
|
+
or corrupt lock fails closed with
|
|
2611
|
+
`E_CONTRACT_BOOTSTRAP_REPAIR_MIGRATION_INVALID`/`E_TASK_LOCKED`. The operation
|
|
2612
|
+
is idempotent only when the complete migrated relationship remains valid.
|
|
2613
|
+
|
|
2232
2614
|
### `task-resume`
|
|
2233
2615
|
|
|
2234
2616
|
Reacquires a recovered task's write claims and restores ordinary mutation authority.
|
package/docs/CODE_ATTESTATION.md
CHANGED
|
@@ -9,11 +9,11 @@ bug-free or secure.
|
|
|
9
9
|
|
|
10
10
|
| Level | Meaning |
|
|
11
11
|
| --- | --- |
|
|
12
|
-
| `PROCESSED` |
|
|
12
|
+
| `PROCESSED` | Minimum reported level; verification is not complete. `MISSING`, `DISABLED`, and `INVALID` remain separate status results. |
|
|
13
13
|
| `VERIFIED` | Completion, evidence bindings, manifest, and current content validate. |
|
|
14
14
|
| `ATTESTED` | `VERIFIED` plus a cryptographically valid signature and trusted signer policy. |
|
|
15
15
|
|
|
16
|
-
`PROCESSED` is
|
|
16
|
+
`PROCESSED` is a lower-bound reported level, not a trust claim. A manifest or
|
|
17
17
|
statement that merely exists never becomes `ATTESTED`; the signature must be
|
|
18
18
|
verified against the configured signer identity, issuer, and trust policy.
|
|
19
19
|
Attestation binds bounded source/evidence relationships. It does not prove
|