@cassiomc1/forgeloop 1.10.0 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DOCS_INDEX.md +12 -1
- package/LOOP_ENGINEERING.md +4 -4
- package/LOOP_SYSTEM_DESIGN.md +23 -0
- package/QUALITY_SCORECARD.md +2 -2
- package/README.md +22 -8
- package/docs/ADVISORY_CONTEXT.md +24 -0
- package/docs/AGENT_PROTOCOL_SUMMARY.md +1 -1
- package/docs/ARTIFACT_REFERENCE.md +15 -0
- package/docs/CODE_ATTESTATION.md +9 -0
- package/docs/DOCUMENTATION_GUIDE.md +4 -4
- package/docs/EXECUTION_PROFILE_BENCHMARKS.md +10 -0
- package/docs/MCP.md +13 -1
- package/docs/PACKAGE_CONTENTS.md +88 -0
- package/docs/RELEASE_CHECKLIST.md +10 -2
- package/docs/REVISION_PROVIDERS.md +9 -0
- package/docs/RIPWIRE_ADAPTER.md +189 -0
- package/docs/TROUBLESHOOTING.md +12 -0
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.html +13 -2
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json +6 -6
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.svg +10 -1
- package/docs/assets/diagrams/forgeloop-engineering-flow.html +22 -11
- package/docs/assets/diagrams/forgeloop-engineering-flow.receipt.json +6 -6
- package/docs/assets/diagrams/forgeloop-engineering-flow.svg +17 -8
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.html +14 -3
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json +6 -6
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.svg +10 -1
- package/docs/diagrams/README.md +26 -0
- package/docs/diagrams/forgeloop-code-attestation-flow.workflow.json +383 -57
- package/docs/diagrams/forgeloop-engineering-flow.workflow.json +374 -55
- package/docs/diagrams/forgeloop-verification-trust-flow.workflow.json +328 -47
- 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/package.json +14 -4
- package/scripts/CI_VALIDATORS.md +24 -0
- package/scripts/check-critical-coverage.mjs +9 -0
- package/src/adapters/ripwire/normalize.js +352 -0
- package/src/adapters/ripwire/process.js +248 -0
- package/src/adapters/ripwire/provider.js +245 -0
- package/src/commands/doctor.js +11 -10
- package/src/core/actions.js +2 -2
- package/src/core/advisory-context/service.js +36 -14
- package/src/core/approvals.js +2 -2
- package/src/core/artifacts.js +3 -3
- package/src/core/checks.js +0 -33
- package/src/core/completion.js +2 -2
- package/src/core/events.js +5 -5
- package/src/core/execution-profile.js +18 -5
- package/src/core/handoff-acceptance.js +10 -1
- package/src/core/next-action-pending-actions.js +255 -0
- package/src/core/next-action-phases.js +26 -764
- package/src/core/next-action-planned-phase.js +51 -0
- package/src/core/next-action-quality-guidance.js +19 -0
- package/src/core/next-action-recovery-phases.js +97 -0
- package/src/core/next-action-refresh.js +20 -0
- package/src/core/next-action-review-phase.js +189 -0
- package/src/core/next-action-verification-phase.js +192 -0
- package/src/core/task-recovery.js +2 -2
- package/src/core/transaction-maintenance.js +70 -0
- package/src/core/transaction.js +31 -10
- package/src/core/work-state.js +20 -11
- package/src/integration.d.ts +30 -3
- package/src/integration.js +2 -0
- package/src/core/cli-metadata.js +0 -23
- package/src/core/decision-classification.js +0 -55
- package/src/core/gates.js +0 -57
- package/src/core/workflow-compatibility.js +0 -151
package/DOCS_INDEX.md
CHANGED
|
@@ -32,12 +32,14 @@ integration and guide context. Use this map before editing documentation.
|
|
|
32
32
|
| Platform adapters | [`docs/PLATFORM_ADAPTERS.md`](./docs/PLATFORM_ADAPTERS.md) | Generic CI boundary and platform mapping guidance |
|
|
33
33
|
| Universal integration API | [`docs/UNIVERSAL_INTEGRATION.md`](./docs/UNIVERSAL_INTEGRATION.md) | Programmatic integration subpath, envelope semantics, and consumer map |
|
|
34
34
|
| Advisory context providers | [`docs/ADVISORY_CONTEXT.md`](./docs/ADVISORY_CONTEXT.md) | Optional external host context, non-evidence trust boundary, allowlist normalization, and safety rules |
|
|
35
|
+
| Ripwire advisory adapter | [`docs/RIPWIRE_ADAPTER.md`](./docs/RIPWIRE_ADAPTER.md) | Ripwire-specific registration, process contract, JSON mapping, limits, and verification |
|
|
35
36
|
| Local-first MCP adapter | [`docs/MCP.md`](./docs/MCP.md) | stdio default, optional strict loopback HTTP; server modes/capabilities and canonical resources |
|
|
36
37
|
| Adaptive execution-profile benchmarks | [`docs/EXECUTION_PROFILE_BENCHMARKS.md`](./docs/EXECUTION_PROFILE_BENCHMARKS.md) | Measured provider/host runs, robust statistics, paired/distribution deltas, tail status, outliers, and profile-aware host context |
|
|
37
38
|
| Knowledge integration gap analysis | [`docs/KNOWLEDGE_INTEGRATION_GAP_ANALYSIS.md`](./docs/KNOWLEDGE_INTEGRATION_GAP_ANALYSIS.md) | Repository-only research audit of candidate coverage, proven gaps, canonical homes, context cost, and intentional skip/defer decisions |
|
|
38
39
|
| Knowledge sources and provenance | [`docs/KNOWLEDGE_SOURCES.md`](./docs/KNOWLEDGE_SOURCES.md) | Snapshot, licensing observations, source roles, accepted/skipped concepts, and reuse boundaries |
|
|
39
40
|
| Documentation guide | [`docs/DOCUMENTATION_GUIDE.md`](./docs/DOCUMENTATION_GUIDE.md) | Rules and checklist for modifying documentation |
|
|
40
41
|
| Current release checklist | [`docs/RELEASE_CHECKLIST.md`](./docs/RELEASE_CHECKLIST.md) | Package, protocol, attestation, integration, and publication gates |
|
|
42
|
+
| Core npm package contents | [`docs/PACKAGE_CONTENTS.md`](./docs/PACKAGE_CONTENTS.md) | Published consumer surface, intentional inclusions, exclusions, and clean-room verification |
|
|
41
43
|
| ForgeLoop 1.6.1 release checklist (historical) | [`docs/RELEASE_CHECKLIST_1_6_1.md`](./docs/RELEASE_CHECKLIST_1_6_1.md) | Verification adapter boundary, isolation invariants, and publication gates |
|
|
42
44
|
| ForgeLoop 1.5/MCP release checklist (historical) | [`docs/RELEASE_CHECKLIST_1_5_MCP.md`](./docs/RELEASE_CHECKLIST_1_5_MCP.md) | Integration API v1, MCP package, and publication gates |
|
|
43
45
|
| ForgeLoop 1.4 release checklist | [`docs/RELEASE_CHECKLIST_1_4.md`](./docs/RELEASE_CHECKLIST_1_4.md) | Claim-recovery, compatibility, package, and publication gates |
|
|
@@ -57,6 +59,13 @@ integration and guide context. Use this map before editing documentation.
|
|
|
57
59
|
| Code Attestation Chain | [`docs/CODE_ATTESTATION.md`](./docs/CODE_ATTESTATION.md#completion-flow) | Completion, exact-content manifest, in-toto statement, optional signing, and range coverage |
|
|
58
60
|
| Real Execution Proof of Concept (PoC) | [`poc/README.md`](./poc/README.md) | Non-normative, reproducible public engineering workload, audit evidence, and technical audit. Normative behavior remains owned by [`LOOP_ENGINEERING.md`](./LOOP_ENGINEERING.md). |
|
|
59
61
|
|
|
62
|
+
## Recent implementation review
|
|
63
|
+
|
|
64
|
+
The repository-local [Astra implementation record](./docs/ASTRA_IMPLEMENTATION.md)
|
|
65
|
+
maps the completed findings to code, tests, measurements, and remaining limits.
|
|
66
|
+
Use the canonical guides below for operational instructions; the audit record
|
|
67
|
+
is historical evidence and is not part of the published core package.
|
|
68
|
+
|
|
60
69
|
## Audience map
|
|
61
70
|
|
|
62
71
|
| I am a... | Start here |
|
|
@@ -72,6 +81,7 @@ integration and guide context. Use this map before editing documentation.
|
|
|
72
81
|
| **Fixing a broken or stale state** | [`docs/TROUBLESHOOTING.md`](./docs/TROUBLESHOOTING.md) |
|
|
73
82
|
| **Looking for quick recipes** | [`docs/RECIPES.md`](./docs/RECIPES.md) |
|
|
74
83
|
| **Configuring structural quality feedback** | [`docs/STRUCTURAL_QUALITY.md`](./docs/STRUCTURAL_QUALITY.md) |
|
|
84
|
+
| **Configuring Ripwire advisory context** | [`docs/RIPWIRE_ADAPTER.md`](./docs/RIPWIRE_ADAPTER.md) |
|
|
75
85
|
| **Understanding verification trust** | [`docs/REVISION_PROVIDERS.md`](./docs/REVISION_PROVIDERS.md#differential-verification-scope) |
|
|
76
86
|
| **Understanding attestation trust** | [`docs/CODE_ATTESTATION.md`](./docs/CODE_ATTESTATION.md#trust-levels) |
|
|
77
87
|
| **Maintaining generated diagrams** | [`docs/diagrams/README.md`](./docs/diagrams/README.md) |
|
|
@@ -98,6 +108,7 @@ integration and guide context. Use this map before editing documentation.
|
|
|
98
108
|
- **Integrate a new AI environment**: [`PROTOCOL_INTEGRATION.md`](./PROTOCOL_INTEGRATION.md)
|
|
99
109
|
- **Map ForgeLoop state into an external runtime/orchestrator**: [`ORCHESTRATOR_INTEGRATION.md`](./ORCHESTRATOR_INTEGRATION.md)
|
|
100
110
|
- **Edit documentation safely**: [`docs/DOCUMENTATION_GUIDE.md`](./docs/DOCUMENTATION_GUIDE.md)
|
|
111
|
+
- **Audit the npm package boundary**: [`docs/PACKAGE_CONTENTS.md`](./docs/PACKAGE_CONTENTS.md)
|
|
101
112
|
- **Verify source-content attestations**: [`docs/CODE_ATTESTATION.md`](./docs/CODE_ATTESTATION.md)
|
|
102
113
|
- **Understand narrow verification and checker binding**: [`docs/REVISION_PROVIDERS.md`](./docs/REVISION_PROVIDERS.md#differential-verification-scope)
|
|
103
114
|
- **Inspect the governed diagrams**: [`docs/diagrams/README.md`](./docs/diagrams/README.md)
|
|
@@ -131,7 +142,7 @@ scope, exact commands, and migration boundary are recorded in
|
|
|
131
142
|
[`scripts/CI_VALIDATORS.md`](./scripts/CI_VALIDATORS.md).
|
|
132
143
|
|
|
133
144
|
The package has no runtime dependencies. Development dependencies are limited
|
|
134
|
-
to ESLint and
|
|
145
|
+
to c8, ESLint, TypeScript, and YAML and are checked by
|
|
135
146
|
`npm run dependency:policy`. GitHub Actions use `npm ci`, pinned action SHAs,
|
|
136
147
|
CodeQL, dependency review, and generated-release notes; npm publication still
|
|
137
148
|
uses trusted OIDC publishing and is not implied by local verification.
|
package/LOOP_ENGINEERING.md
CHANGED
|
@@ -393,8 +393,8 @@ DESTRUCTIVE_ACTION_REQUIRED
|
|
|
393
393
|
```
|
|
394
394
|
|
|
395
395
|
Multiple reasonable aesthetic or positioning choices do not justify a question.
|
|
396
|
-
The
|
|
397
|
-
|
|
396
|
+
The executable test example in `tests/helpers/decision-classification.js`
|
|
397
|
+
illustrates this boundary; runtime authority remains with this protocol and the task contract. The example does not use an LLM or parse natural language.
|
|
398
398
|
|
|
399
399
|
### Contract-before-clarification sequence
|
|
400
400
|
|
|
@@ -508,8 +508,8 @@ The compatibility distinction is explicit:
|
|
|
508
508
|
"Installed" and "compatible" are different claims. A harness can have an
|
|
509
509
|
external workflow installed and still be `INCOMPATIBLE WITH AUTONOMOUS MODE`.
|
|
510
510
|
Use that wording instead of calling the workflow broken. The deterministic
|
|
511
|
-
|
|
512
|
-
it does not modify `
|
|
511
|
+
test example in `tests/helpers/workflow-compatibility.js` exercises this boundary;
|
|
512
|
+
it does not modify `tests/helpers/decision-classification.js`, invoke an LLM, or
|
|
513
513
|
redesign a runtime, arbiter, supervisor, or approval broker.
|
|
514
514
|
|
|
515
515
|
For the sixth blind conformance run, exclude mandatory-approval workflows at
|
package/LOOP_SYSTEM_DESIGN.md
CHANGED
|
@@ -561,3 +561,26 @@ canonical trace/reflection evidence. They preserve unknown usage values and
|
|
|
561
561
|
only compare efficiency when a project-local reference scenario exists. The
|
|
562
562
|
existing diagnostic and reflection model remains the authority for information
|
|
563
563
|
gain, intervention effectiveness, failure signatures, and oscillation.
|
|
564
|
+
|
|
565
|
+
## Transaction identity and diagnostic retention
|
|
566
|
+
|
|
567
|
+
The transaction context binds the physical project root and task ID. Nested
|
|
568
|
+
operations reject cross-project reuse, even when task IDs match. Filesystem
|
|
569
|
+
aliases of the same physical project remain compatible. Reads and writes of
|
|
570
|
+
transaction-aware artifacts enforce the same project boundary.
|
|
571
|
+
|
|
572
|
+
Committed transactions, successful rollbacks, and failures aborted before
|
|
573
|
+
publication are terminal. `doctor --fix` recovers eligible committing
|
|
574
|
+
transactions under their task locks, then recomputes incomplete findings.
|
|
575
|
+
This does not imply that an ambiguous external action was reconciled.
|
|
576
|
+
|
|
577
|
+
Repository maintenance can preview or compact old terminal stage/backup
|
|
578
|
+
payloads with `npm run transactions:compact`. Manifests and event ledgers
|
|
579
|
+
remain intact; recent, ambiguous, invalid, locked, and unsafe records are
|
|
580
|
+
preserved. See [maintenance usage](CONTRIBUTING.md#focused-verification-and-maintenance).
|
|
581
|
+
|
|
582
|
+
Lifecycle selection keeps common identity, freshness, gates, and chronology
|
|
583
|
+
checks ahead of phase-specific resolvers. Planning, verification, review,
|
|
584
|
+
recovery, and pending-action modules organize decisions without changing that
|
|
585
|
+
precedence. Executable protocol examples under `tests/helpers` are test
|
|
586
|
+
fixtures, not runtime policy authorities.
|
package/QUALITY_SCORECARD.md
CHANGED
|
@@ -106,8 +106,8 @@ are both present:
|
|
|
106
106
|
| Protocol activation resumability | `src/core/resumability.js`, READY consistency checks, event matrix, and `next` repair semantics | `tests/resumable-protocol.test.js` |
|
|
107
107
|
| Hidden kit layout | `src/core/target-layout.js`, safe init/update migration, manifest layout version, native shims, and profile resolver | `tests/hidden-layout.test.js`, package and compatibility tests |
|
|
108
108
|
| Contextual frontend taste | `ENG/taste-frontend-eng.md`, router metadata, attribution, and design/accessibility precedence | `tests/taste-guide.test.js`, route fixtures |
|
|
109
|
-
| Pre-contract autonomy — structural | `LOOP_ENGINEERING.md`, `
|
|
110
|
-
| External workflow compatibility — structural | `LOOP_ENGINEERING.md`, `PROTOCOL_INTEGRATION.md`, `
|
|
109
|
+
| Pre-contract autonomy — structural | `LOOP_ENGINEERING.md`, `tests/helpers/decision-classification.js`, `tests/helpers/workflow-compatibility.js`, `CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`, `.cursor/rules/project-loop.mdc` | `tests/decision-classification.test.js`, `tests/workflow-compatibility.test.js`, `tests/autonomy-policy.test.js`, `tests/preflight.test.js` |
|
|
110
|
+
| External workflow compatibility — structural | `LOOP_ENGINEERING.md`, `PROTOCOL_INTEGRATION.md`, `tests/helpers/workflow-compatibility.js`, and sixth-run harness metadata rule | `tests/workflow-compatibility.test.js`, `conformance/README.md` |
|
|
111
111
|
| Instruction-conflict handling — structural | Canonical source-attribution and `WORKFLOW_CONFLICT` policy in `LOOP_ENGINEERING.md` plus adapter references | `tests/autonomy-policy.test.js`, `tests/workflow-compatibility.test.js` |
|
|
112
112
|
| Autonomous-mode precedence — structural | Autonomous/interactive mode contract and harness exclusion metadata | `tests/workflow-compatibility.test.js`, `tests/conformance-scenarios.test.js` |
|
|
113
113
|
| Pre-contract autonomy — cross-agent live robustness | Prior third blind-run result, `conformance/runs/2026-08-13-codex-fourth-live.md`, preserved fifth-run report `conformance/runs/2026-08-13-codex-fifth-live.md`, and the exact blind request | `tests/conformance-scenarios.test.js`; sixth run is not started until mandatory approval is excluded |
|
package/README.md
CHANGED
|
@@ -142,7 +142,9 @@ ForgeLoop can consume host-provided advisory context through the Integration
|
|
|
142
142
|
API. Providers are lazy and opt-in, and ForgeLoop does not persist their
|
|
143
143
|
results. Provider output is never lifecycle state, evidence, authority,
|
|
144
144
|
completion truth, or next-action authority, and it is never executable as a
|
|
145
|
-
protocol command.
|
|
145
|
+
protocol command. The optional Ripwire adapter follows the same boundary; see
|
|
146
|
+
[`docs/ADVISORY_CONTEXT.md`](./docs/ADVISORY_CONTEXT.md) and
|
|
147
|
+
[`docs/RIPWIRE_ADAPTER.md`](./docs/RIPWIRE_ADAPTER.md).
|
|
146
148
|
|
|
147
149
|
### Optional task boundaries and differential verification
|
|
148
150
|
|
|
@@ -462,6 +464,19 @@ validator-backed completion. Drift reopens verification, and migration keeps
|
|
|
462
464
|
modified or unmanaged files for review. The terminal result is one of
|
|
463
465
|
`VALID`, `INCOMPLETE`, `STALE`, `INCONSISTENT`, or `INVALID`.
|
|
464
466
|
|
|
467
|
+
Before execution, profile selection reads structured obligations and explicit
|
|
468
|
+
risks; exclusion constraints are not required actions. After a blocked
|
|
469
|
+
preflight and contract revision, `next` may guide a checkpoint refresh through
|
|
470
|
+
`clear-state` and a fresh preflight. This path requires a valid pre-execution
|
|
471
|
+
ledger and routing bound to the revised contract. Execution transactions bind
|
|
472
|
+
the physical project and task; a matching task ID in another project cannot
|
|
473
|
+
reuse them. See [recovery guidance](./docs/TROUBLESHOOTING.md#revised-contract-after-a-blocked-preflight).
|
|
474
|
+
|
|
475
|
+
CI audits each supplied task receipt explicitly. With no receipt it reports
|
|
476
|
+
`NOT_VERIFIED`; green repository tests alone do not establish lifecycle
|
|
477
|
+
completion or attestation. For contributor checks and safe payload retention,
|
|
478
|
+
see [CONTRIBUTING.md](./CONTRIBUTING.md#focused-verification-and-maintenance).
|
|
479
|
+
|
|
465
480
|
## Protocol compatibility
|
|
466
481
|
|
|
467
482
|
The npm package version is independent of protocol version. The current
|
|
@@ -492,11 +507,10 @@ JSON is size/depth limited; manifests, schemas, receipts, and secret-like
|
|
|
492
507
|
values are checked; and install-capable verification requires trusted host
|
|
493
508
|
authority. See [`THREAT_MODEL.md`](./THREAT_MODEL.md) for the full inventory.
|
|
494
509
|
|
|
495
|
-
Development tooling
|
|
496
|
-
|
|
497
|
-
`npm run dependency:policy`
|
|
498
|
-
|
|
499
|
-
`vendor/archify/v2.15.0/` rather than installed as a package dependency.
|
|
510
|
+
Development tooling stays separate from runtime dependencies. The policy allows
|
|
511
|
+
c8, ESLint, TypeScript, and YAML as development dependencies;
|
|
512
|
+
`npm run dependency:policy` rejects runtime or unapproved dependencies. Archify
|
|
513
|
+
is vendored at `vendor/archify/v2.15.0/` rather than installed as a package.
|
|
500
514
|
|
|
501
515
|
To report vulnerabilities or contribute changes, see
|
|
502
516
|
[`SECURITY.md`](./SECURITY.md) and [`CONTRIBUTING.md`](./CONTRIBUTING.md).
|
|
@@ -542,8 +556,8 @@ through `init`, `update`, or `doctor`.
|
|
|
542
556
|
## Release and maintenance
|
|
543
557
|
|
|
544
558
|
The release workflow uses [npm trusted publishing](https://docs.npmjs.com/trusted-publishers)
|
|
545
|
-
through GitHub Actions OIDC. A `vX.Y.Z` tag must match `package.json`;
|
|
546
|
-
publishing, verify the immutable release identity:
|
|
559
|
+
through GitHub Actions OIDC. A merged `vX.Y.Z` tag must match `package.json`;
|
|
560
|
+
after publishing, verify the immutable release identity:
|
|
547
561
|
|
|
548
562
|
```bash
|
|
549
563
|
RELEASE_COMMIT="$(git rev-list -n1 vX.Y.Z)"
|
package/docs/ADVISORY_CONTEXT.md
CHANGED
|
@@ -172,3 +172,27 @@ The public boundary reports these stable codes:
|
|
|
172
172
|
|
|
173
173
|
The host owns whether and when to display or use advisory context. ForgeLoop
|
|
174
174
|
owns only the bounded normalization and trust-role projection.
|
|
175
|
+
|
|
176
|
+
## Ripwire adapter
|
|
177
|
+
|
|
178
|
+
ForgeLoop includes an optional host-injected adapter for the [Ripwire](https://github.com/redhat-et/ripwire)
|
|
179
|
+
ranked source map. The adapter is deliberately outside the default runtime:
|
|
180
|
+
the host must provide an absolute executable path and an exact expected
|
|
181
|
+
version, register the returned provider under the `ripwire` key, and invoke
|
|
182
|
+
`recallAdvisoryContext` explicitly. Creating the provider performs no discovery,
|
|
183
|
+
network access, process start, or lifecycle write.
|
|
184
|
+
|
|
185
|
+
The adapter runs Ripwire's qualified `--for=<query> --signatures-only --json
|
|
186
|
+
--no-cache --exclude=.forgeloop` form with `shell: false`, closes standard
|
|
187
|
+
input, bounds stdout to 1 MiB and stderr to 64 KiB, and applies the caller's
|
|
188
|
+
existing advisory deadline. It validates the version immediately before the
|
|
189
|
+
query, rejects malformed JSON and unsafe paths, and never copies raw stderr
|
|
190
|
+
into an error message. Ripwire's graph is approximate, so the first returned
|
|
191
|
+
item is a bounded status card that preserves cap, omission, ambiguity,
|
|
192
|
+
unindexed-content, and unknown-completeness warnings after core normalization.
|
|
193
|
+
|
|
194
|
+
See [RIPWIRE_ADAPTER.md](RIPWIRE_ADAPTER.md) for registration, tests, the
|
|
195
|
+
opt-in real-binary smoke test, and the retrieval benchmark. A real binary and
|
|
196
|
+
its exact version must be qualified by the host; ForgeLoop does not install or
|
|
197
|
+
discover Ripwire and does not treat an unavailable smoke test as proof of
|
|
198
|
+
interoperability.
|
|
@@ -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.
|
|
10
|
+
Package version: 1.10.2
|
|
11
11
|
|
|
12
12
|
## Canonical loop
|
|
13
13
|
|
|
@@ -1217,3 +1217,18 @@ For `BASELINE` artifacts and `PASS`/`FAIL` evaluations, `sourceMaterialFingerpri
|
|
|
1217
1217
|
and stable `sourceObservation` are conditionally required; their before and after
|
|
1218
1218
|
fingerprints must equal the bound source fingerprint. `BLOCKED` and
|
|
1219
1219
|
`NOT_OBSERVED` artifacts may omit these observed-source fields.
|
|
1220
|
+
|
|
1221
|
+
## Transaction diagnostics and retention
|
|
1222
|
+
|
|
1223
|
+
`.forgeloop/.txn/<transactionId>/manifest.json` records transaction identity,
|
|
1224
|
+
status, staged writes, and recovery diagnostics. `COMMITTED`, `ROLLED_BACK`,
|
|
1225
|
+
and `ABORTED` are terminal; an aborted staging callback did not publish its
|
|
1226
|
+
staged writes. A successful recovery is not reported as incomplete on the next
|
|
1227
|
+
doctor inspection. The transaction lock still protects recovery from live
|
|
1228
|
+
writers.
|
|
1229
|
+
|
|
1230
|
+
The repository maintenance command described in
|
|
1231
|
+
[CONTRIBUTING.md](../CONTRIBUTING.md#focused-verification-and-maintenance)
|
|
1232
|
+
compacts eligible stage/backup payloads only. It retains manifests and ledgers,
|
|
1233
|
+
so historical manifest enumeration remains linear. These diagnostics are not
|
|
1234
|
+
substitutes for a valid execution receipt or external-action reconciliation.
|
package/docs/CODE_ATTESTATION.md
CHANGED
|
@@ -139,3 +139,12 @@ distinguished from invalid attestations by the stable exit-code contract:
|
|
|
139
139
|
|
|
140
140
|
See [`REVISION_PROVIDERS.md`](./REVISION_PROVIDERS.md) and
|
|
141
141
|
[`SIGNING_PROVIDERS.md`](./SIGNING_PROVIDERS.md) for extension boundaries.
|
|
142
|
+
|
|
143
|
+
## Receipt availability in repository CI
|
|
144
|
+
|
|
145
|
+
The repository audit workflow checks supplied task receipts individually with
|
|
146
|
+
an explicit task ID. A checkout without a receipt reports `NOT_VERIFIED`.
|
|
147
|
+
That is absence of lifecycle evidence, not an attestation trust level; it does
|
|
148
|
+
not mean `PROCESSED`, `VERIFIED`, or `ATTESTED`. CI does not fabricate a receipt
|
|
149
|
+
from successful repository tests. Transaction payload compaction preserves
|
|
150
|
+
the manifests and ledgers needed to inspect the original history.
|
|
@@ -24,12 +24,12 @@ ForgeLoop strictly separates normative protocol definitions from operational doc
|
|
|
24
24
|
When updating documentation, always derive content from its authoritative source:
|
|
25
25
|
|
|
26
26
|
```text
|
|
27
|
-
CLI syntax truth -> CLI registry / parser (src/cli.js, src/core/cli-command-definitions.js
|
|
27
|
+
CLI syntax truth -> CLI registry / parser (src/cli.js, src/core/cli-command-definitions.js)
|
|
28
28
|
Artifact shape truth -> JSON schemas (schemas/*.schema.json, src/core/artifact-registry.js)
|
|
29
29
|
Lifecycle truth -> protocol / state machine (src/core/protocol.js)
|
|
30
30
|
Reason-code truth -> exported protocol constants (src/core/error-codes.js, src/core/protocol.js)
|
|
31
31
|
Guide registry truth -> canonical guide registry (src/config/guides.json)
|
|
32
|
-
Package contents truth -> package.json + package tests (tests/package.test.js)
|
|
32
|
+
Package contents truth -> package.json + docs/PACKAGE_CONTENTS.md + package tests (tests/package.test.js)
|
|
33
33
|
Documentation routing -> DOCS_INDEX.md
|
|
34
34
|
Integration API truth -> src/integration.js (exports, envelope, limits, risk classes, resources)
|
|
35
35
|
MCP behavior truth -> integrations/mcp/src/* and integrations/mcp/package.json
|
|
@@ -119,7 +119,7 @@ conformance checks detect omissions.
|
|
|
119
119
|
|
|
120
120
|
| Documentation Area | Canonical Machine Source | Conformance Validator |
|
|
121
121
|
| --- | --- | --- |
|
|
122
|
-
| **CLI commands & flags** | `
|
|
122
|
+
| **CLI commands & flags** | `CLI_COMMAND_DEFINITIONS` (`src/core/cli-command-definitions.js`) & `src/cli.js` | `scripts/validate_documentation_conformance.mjs` |
|
|
123
123
|
| **Artifact paths** | `ARTIFACT_REGISTRY` & `task-paths.js` | `scripts/validate_documentation_conformance.mjs` |
|
|
124
124
|
| **Artifact fields & types** | `schemas/*.schema.json` | `scripts/validate_documentation_conformance.mjs` |
|
|
125
125
|
| **Enums & consts** | `schemas/*.schema.json` | `scripts/validate_documentation_conformance.mjs` |
|
|
@@ -128,7 +128,7 @@ conformance checks detect omissions.
|
|
|
128
128
|
| **Stable error codes** | `PUBLIC_ERROR_CODES` (`src/core/error-codes.js`) | `scripts/validate_documentation_conformance.mjs` |
|
|
129
129
|
| **Discovery resume rules** | `DISCOVERY_SURFACES` & `nativeShim` | `scripts/validate_documentation_conformance.mjs` |
|
|
130
130
|
| **Task-layout path freshness** | `TASK_LAYOUT_DOCUMENTS` & `task-paths.js` | `scripts/validate_documentation_conformance.mjs` |
|
|
131
|
-
| **Package-shipped docs** | `package.json` (`files`) | `tests/package.test.js` |
|
|
131
|
+
| **Package-shipped docs and runtime** | `package.json` (`files`) + `docs/PACKAGE_CONTENTS.md` | `tests/package.test.js` + `scripts/package_smoke.mjs` |
|
|
132
132
|
| **Architecture and trust diagrams** | `docs/diagrams/manifest.json` plus each typed workflow source | `scripts/check-documentation-diagrams.mjs` and `scripts/documentation-diagram-inventory.mjs` |
|
|
133
133
|
|
|
134
134
|
---
|
|
@@ -421,3 +421,13 @@ The source policy is intentionally narrow: provider or host observations are
|
|
|
421
421
|
accepted for benchmark claims, while actor-reported or absent telemetry stays
|
|
422
422
|
non-comparable. This is an efficiency observation boundary, not verification
|
|
423
423
|
evidence and not an external publication result.
|
|
424
|
+
|
|
425
|
+
## Contract signals and exclusions
|
|
426
|
+
|
|
427
|
+
Profile selection reads string and structured success/verification
|
|
428
|
+
requirements, including nested requirements and explicit publication or
|
|
429
|
+
production-readiness types. Constraints and stop conditions describe
|
|
430
|
+
boundaries and are excluded from obligation scanning. For example, a
|
|
431
|
+
constraint saying “No publication” does not create a publication requirement.
|
|
432
|
+
An explicit route risk remains authoritative and can still raise the safety
|
|
433
|
+
floor. Profiles classify work; they do not grant execution authority.
|
package/docs/MCP.md
CHANGED
|
@@ -135,7 +135,7 @@ forgeloop-mcp-http --project /repo --mode safe # 127.0.0.1:3333
|
|
|
135
135
|
|
|
136
136
|
| Component | Current contract |
|
|
137
137
|
| --- | --- |
|
|
138
|
-
| ForgeLoop core package | `>=1.5.0 <2` dependency range; current release `1.10.
|
|
138
|
+
| ForgeLoop core package | `>=1.5.0 <2` dependency range; current release `1.10.2` |
|
|
139
139
|
| ForgeLoop protocol | `1` |
|
|
140
140
|
| Integration API | `1` |
|
|
141
141
|
| MCP package | `0.1.x` initial package |
|
|
@@ -187,3 +187,15 @@ list in [TROUBLESHOOTING](./TROUBLESHOOTING.md):
|
|
|
187
187
|
|
|
188
188
|
Canonical ForgeLoop errors (e.g. `E_TASK_SCOPE_CONFLICT`,
|
|
189
189
|
`E_TASK_CLAIM_OWNERSHIP_INCONSISTENT`) are always preserved verbatim.
|
|
190
|
+
|
|
191
|
+
## Reproducible adapter verification
|
|
192
|
+
|
|
193
|
+
The adapter commits its own lockfile and declares both server and test-client
|
|
194
|
+
SDK versions. `npm run mcp:setup` installs that lock with lifecycle scripts
|
|
195
|
+
disabled, then substitutes the locally packed core offline. Packed smoke uses
|
|
196
|
+
the same dependency graph and substitutes both local tarballs using the system
|
|
197
|
+
`tar` command. This replacement does not resolve registry metadata or require a
|
|
198
|
+
warm npm cache; `npm ci` still retrieves the locked dependencies. Both paths
|
|
199
|
+
verify resolved dependency versions and print lock/tarball SHA-256 identities.
|
|
200
|
+
The adapter remains a separate package; these dependencies are not added to
|
|
201
|
+
the ForgeLoop core runtime.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Core npm package contents
|
|
2
|
+
|
|
3
|
+
This page describes the intentional boundary of the published
|
|
4
|
+
`@cassiomc1/forgeloop` package. The [`files`](../package.json) list in
|
|
5
|
+
`package.json` is the packaging source of truth, while the repository's
|
|
6
|
+
`tests/package.test.js` and clean-room `scripts/package_smoke.mjs` checks keep
|
|
7
|
+
the boundary executable. Those test files are repository tooling and are not
|
|
8
|
+
part of the consumer tarball.
|
|
9
|
+
|
|
10
|
+
## Consumer surface
|
|
11
|
+
|
|
12
|
+
The package exposes the `forgeloop` executable from `src/cli.js` and the
|
|
13
|
+
`@cassiomc1/forgeloop/integration` subpath from `src/integration.js`, with its
|
|
14
|
+
declaration file. The package has no runtime dependencies and requires Node.js
|
|
15
|
+
20 or newer.
|
|
16
|
+
|
|
17
|
+
## Included files
|
|
18
|
+
|
|
19
|
+
The published tarball includes the following consumer-facing groups:
|
|
20
|
+
|
|
21
|
+
- **Runtime and protocol:** every maintained JavaScript module under `src/`,
|
|
22
|
+
the guide registry, protocol templates, JSON schemas, completions, and the
|
|
23
|
+
generic CI verifier. Four retired compatibility helpers remain in the
|
|
24
|
+
repository for historical context and are explicitly excluded:
|
|
25
|
+
`src/core/cli-metadata.js`, `src/core/decision-classification.js`,
|
|
26
|
+
`src/core/gates.js`, and `src/core/workflow-compatibility.js`.
|
|
27
|
+
- **Initialization material:** the root protocol and integration documents,
|
|
28
|
+
legal notices, the target profile template, and every path listed by
|
|
29
|
+
`src/core/templates.js`. These files are read by `init` and `update`, so
|
|
30
|
+
they are part of the executable consumer contract even when a document is
|
|
31
|
+
marked deprecated in the documentation manifest.
|
|
32
|
+
- **Benchmark inputs:** execution-profile scenario definitions and their
|
|
33
|
+
README. They make new measurements reproducible; historical measurements
|
|
34
|
+
and generated results are repository evidence and are excluded.
|
|
35
|
+
- **User documentation:** the getting-started, integration, CLI, artifact,
|
|
36
|
+
troubleshooting, release, package-boundary, and related reference pages.
|
|
37
|
+
The advisory-context and Ripwire adapter guides ship with the corresponding
|
|
38
|
+
public integration surface.
|
|
39
|
+
The typed diagram sources, generated HTML/SVG/receipt artifacts, and
|
|
40
|
+
source-bound review records under `docs/diagrams/` are included together so
|
|
41
|
+
the packaged documentation keeps its visual provenance.
|
|
42
|
+
- **Release tooling:** the selected deterministic generators, validators,
|
|
43
|
+
benchmark helpers, and shell completions needed by maintainers who consume
|
|
44
|
+
the source kit.
|
|
45
|
+
|
|
46
|
+
## Excluded files
|
|
47
|
+
|
|
48
|
+
The tarball intentionally omits repository-only material:
|
|
49
|
+
|
|
50
|
+
- tests, conformance fixtures, coverage output, and secret-scanning helpers;
|
|
51
|
+
- local `.forgeloop` state, task ledgers, locks, transactions, and execution
|
|
52
|
+
receipts (the `.forgeloop/forgeloop.gitignore` template is the sole
|
|
53
|
+
exception);
|
|
54
|
+
- raw or aggregate benchmark results, package archives, and release train
|
|
55
|
+
contracts;
|
|
56
|
+
- the Ripwire retrieval benchmark runner, cases, and fixture corpus; those
|
|
57
|
+
maintainer-only files require a clean repository checkout and are not part of
|
|
58
|
+
the consumer adapter surface;
|
|
59
|
+
- historical release plans and retired MCP adapter sources; the MCP adapter
|
|
60
|
+
is published as its own package;
|
|
61
|
+
- the repository README hero PNG, which is a GitHub-only asset. The packaged
|
|
62
|
+
README remains intentionally text-first around that relative repository
|
|
63
|
+
image reference.
|
|
64
|
+
|
|
65
|
+
The package test checks both required paths and these exclusion classes. It
|
|
66
|
+
also enumerates `src/**/*.js` and fails if a maintained runtime module is
|
|
67
|
+
missing from the candidate tarball or if a retired helper is reintroduced.
|
|
68
|
+
The repository index remains a catalog: links from `DOCS_INDEX.md` to tests,
|
|
69
|
+
proof-of-concept evidence, historical plans, and source trees may intentionally
|
|
70
|
+
resolve only in the full repository and are not package dependencies.
|
|
71
|
+
|
|
72
|
+
## Verification and publication
|
|
73
|
+
|
|
74
|
+
Run the following checks from a clean checkout before opening a release PR:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npm pack --dry-run --json
|
|
78
|
+
npm run pack:check
|
|
79
|
+
npm run pack:smoke
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`pack:smoke` installs the candidate tarball into a temporary consumer and
|
|
83
|
+
exercises the CLI, public Integration API, initialization, schemas, and
|
|
84
|
+
packaged documentation references. The tag-triggered publication workflow
|
|
85
|
+
runs the same smoke gate before `npm publish --provenance --access public`.
|
|
86
|
+
Publication therefore remains owned by the trusted GitHub Actions OIDC
|
|
87
|
+
workflow; local package inspection proves the candidate boundary but does not
|
|
88
|
+
publish it.
|
|
@@ -11,8 +11,14 @@ preparation and verification checklist; it does not authorize publication.
|
|
|
11
11
|
- [ ] `npm run release:identity` passes for the candidate version.
|
|
12
12
|
- [ ] No release tag or registry version collision exists.
|
|
13
13
|
- [ ] `npm pack --dry-run` contains the required scenario definitions but no
|
|
14
|
-
raw or aggregate benchmark results,
|
|
15
|
-
metadata.
|
|
14
|
+
raw or aggregate benchmark results, Ripwire benchmark runner/cases/
|
|
15
|
+
fixtures, tests, local state, or repository metadata.
|
|
16
|
+
- [ ] [`docs/PACKAGE_CONTENTS.md`](./PACKAGE_CONTENTS.md) matches the current
|
|
17
|
+
`package.json` file list and documents intentional inclusions and
|
|
18
|
+
exclusions.
|
|
19
|
+
- [ ] Every maintained `src/**/*.js` module is present in the candidate
|
|
20
|
+
tarball; only the four explicitly retired compatibility helpers are
|
|
21
|
+
excluded.
|
|
16
22
|
|
|
17
23
|
## Protocol and attestation
|
|
18
24
|
|
|
@@ -62,6 +68,8 @@ preparation and verification checklist; it does not authorize publication.
|
|
|
62
68
|
## Integration and cross-platform evidence
|
|
63
69
|
|
|
64
70
|
- [ ] `npm run pack:check` and `npm run pack:smoke` pass.
|
|
71
|
+
- [ ] The npm publication workflow runs `npm run pack:smoke` before its
|
|
72
|
+
provenance-backed publish step.
|
|
65
73
|
- [ ] `npm run mcp:test` either runs the configured MCP tests or reports the
|
|
66
74
|
single actionable setup prerequisite.
|
|
67
75
|
- [ ] `npm run mcp:pack:check` passes when MCP dependencies are available.
|
|
@@ -134,3 +134,12 @@ provider semantics fail closed.
|
|
|
134
134
|
An implementation should be tested for deterministic identity, exact bytes,
|
|
135
135
|
binary and empty files, Unicode and space-containing paths, symlinks,
|
|
136
136
|
Gitlinks, deletions, renames, path traversal, and stable error mapping.
|
|
137
|
+
|
|
138
|
+
### Focused test selection and evidence
|
|
139
|
+
|
|
140
|
+
A test-runner filter chooses what a command executes. It does not establish a
|
|
141
|
+
canonical differential verification scope. Use `run-check` to bind executed
|
|
142
|
+
commands to evidence, and supply a fresh canonical scope reference when the
|
|
143
|
+
checker requires one. A manual observation must declare `manual-review`;
|
|
144
|
+
command metadata alone does not prove that a process ran. Packed TypeScript
|
|
145
|
+
consumer checks and critical lifecycle coverage complement these boundaries.
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Ripwire advisory adapter
|
|
2
|
+
|
|
3
|
+
This document explains the optional Ripwire integration shipped with
|
|
4
|
+
ForgeLoop. It is an advisory context provider. It can help a host choose
|
|
5
|
+
which source files to inspect, but it never controls ForgeLoop state, checks,
|
|
6
|
+
receipts, commands, approvals, or completion.
|
|
7
|
+
|
|
8
|
+
## When to use it
|
|
9
|
+
|
|
10
|
+
Use the adapter when a host already has a qualified Ripwire executable and
|
|
11
|
+
wants ranked source signatures for an explicit task query. Do not use it as a
|
|
12
|
+
replacement for tests, code review, lifecycle evidence, or a sound call graph.
|
|
13
|
+
Ripwire's resolver is approximate: same-file and same-directory edges are
|
|
14
|
+
useful hints, while ambiguous or unresolved edges can be missing or wrong.
|
|
15
|
+
|
|
16
|
+
ForgeLoop does not install Ripwire, search `PATH`, contact a server, create a
|
|
17
|
+
cache, or persist a recall. The host owns executable selection and version
|
|
18
|
+
qualification.
|
|
19
|
+
|
|
20
|
+
## Registration
|
|
21
|
+
|
|
22
|
+
Import the factory from the public integration entry point and register the
|
|
23
|
+
returned provider under the exact `ripwire` key:
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import {
|
|
27
|
+
createForgeLoopContext,
|
|
28
|
+
createRipwireAdvisoryContextProvider,
|
|
29
|
+
recallAdvisoryContext,
|
|
30
|
+
} from "@cassiomc1/forgeloop/integration";
|
|
31
|
+
|
|
32
|
+
const ripwire = createRipwireAdvisoryContextProvider({
|
|
33
|
+
executablePath: "/absolute/path/to/ripwire",
|
|
34
|
+
expectedVersion: "0.3.8",
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const runtimeContext = createForgeLoopContext({
|
|
38
|
+
advisoryContextProviders: { ripwire },
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const context = await recallAdvisoryContext({
|
|
42
|
+
target: "/absolute/path/to/project",
|
|
43
|
+
taskId: "task-123",
|
|
44
|
+
providerName: "ripwire",
|
|
45
|
+
query: "stale handoff acceptance and repository fingerprint",
|
|
46
|
+
limit: 6,
|
|
47
|
+
runtimeContext,
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`executablePath` must be absolute. `expectedVersion` is an exact version token,
|
|
52
|
+
not a range. Provider construction is inert. On every recall the adapter first
|
|
53
|
+
runs `ripwire --version`; a mismatch fails with
|
|
54
|
+
`E_ADVISORY_CONTEXT_PROVIDER_INVALID` before the query is attempted.
|
|
55
|
+
|
|
56
|
+
## Process contract
|
|
57
|
+
|
|
58
|
+
The adapter invokes one command with an argv array:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
<ripwire-path> <absolute-project-path> \
|
|
62
|
+
--for=<entire-query-string> --signatures-only --json --no-cache \
|
|
63
|
+
--exclude=.forgeloop
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The query is one argument, so shell metacharacters cannot add arguments or
|
|
67
|
+
commands. The child is started with `shell: false`, standard input is closed,
|
|
68
|
+
and stdout/stderr are read concurrently. A single deadline covers the version
|
|
69
|
+
probe and query. The default transport ceilings are 1 MiB for stdout and 64
|
|
70
|
+
KiB for stderr. On timeout or overflow the child is terminated and the error
|
|
71
|
+
uses a stable ForgeLoop code; raw output is not copied into the message.
|
|
72
|
+
|
|
73
|
+
The `.forgeloop` exclusion keeps lifecycle files out of the advisory source
|
|
74
|
+
surface. The adapter does not add other exclusion flags because every flag
|
|
75
|
+
must be qualified against the selected Ripwire version.
|
|
76
|
+
|
|
77
|
+
## JSON mapping
|
|
78
|
+
|
|
79
|
+
Ripwire's `--for --json` response is expected to be an object containing a
|
|
80
|
+
flat `sigs` array. Each known row is mapped as follows:
|
|
81
|
+
|
|
82
|
+
| Ripwire field | ForgeLoop field | Rule |
|
|
83
|
+
| --- | --- | --- |
|
|
84
|
+
| `n` | `title` | Candidate symbol name. |
|
|
85
|
+
| `sig` | `summary` | Signature text, bounded before core normalization. |
|
|
86
|
+
| `p` + `l` | `sourceRef` | Repository-relative path and one-based line. |
|
|
87
|
+
| `r`, `k` | summary annotation | Rank and ranking score remain descriptive text. |
|
|
88
|
+
| numeric `confidence` in `[0, 1]` | `confidence` | Copied only when the upstream field is explicitly numeric and bounded. |
|
|
89
|
+
| `at` | omitted | A run timestamp or revision is not needed for deterministic item identity. |
|
|
90
|
+
|
|
91
|
+
PageRank, BM25, margin, and other ranking values are never converted into a
|
|
92
|
+
probability. Unknown fields are discarded by the core allowlist. Candidate
|
|
93
|
+
order is preserved, duplicates are removed by stable first occurrence, and
|
|
94
|
+
items stop when the requested item or total-character budget is reached.
|
|
95
|
+
|
|
96
|
+
The first item is always `Ripwire advisory status`. It states that the result
|
|
97
|
+
is approximate and carries bounded disclosures such as `capped`, `sigs_total`,
|
|
98
|
+
`sigs_shown`, `lens`, `ambiguous`, `unresolved`, `unindexed`, parse health, and
|
|
99
|
+
`index_completeness=unknown`. If no symbol fits, the status item says so; an
|
|
100
|
+
empty result never proves that the project has no impact.
|
|
101
|
+
|
|
102
|
+
Source references are rejected when they are absolute outside the project,
|
|
103
|
+
contain traversal segments, use an in-project symlink, or report an invalid
|
|
104
|
+
line. The host must still inspect the referenced file and independently verify
|
|
105
|
+
the proposed change.
|
|
106
|
+
|
|
107
|
+
The status item is budget-aware. When candidates or diagnostic notices do not
|
|
108
|
+
fit, it preserves a truthful completeness warning and says which candidate
|
|
109
|
+
rows or text were omitted. The final item total is checked against the same
|
|
110
|
+
character budget used by the core advisory normalizer.
|
|
111
|
+
|
|
112
|
+
## Failure codes
|
|
113
|
+
|
|
114
|
+
| Situation | Code |
|
|
115
|
+
| --- | --- |
|
|
116
|
+
| Missing or unqualified executable or unsafe target | `E_ADVISORY_CONTEXT_PROVIDER_UNAVAILABLE` |
|
|
117
|
+
| Nonzero process exit without a qualified meaning | `E_ADVISORY_CONTEXT_RESULT_INVALID` |
|
|
118
|
+
| Expected version differs from `--version` output | `E_ADVISORY_CONTEXT_PROVIDER_INVALID` |
|
|
119
|
+
| Invalid JSON or unsupported response shape | `E_ADVISORY_CONTEXT_RESULT_INVALID` |
|
|
120
|
+
| Timeout | `E_ADVISORY_CONTEXT_TIMEOUT` |
|
|
121
|
+
| Stdout/stderr or candidate ceiling exceeded | `E_ADVISORY_CONTEXT_OUTPUT_LIMIT` |
|
|
122
|
+
| Unsafe content or control character in selected context | `E_PORTABLE_CONTEXT_INVALID` |
|
|
123
|
+
|
|
124
|
+
These failures affect the explicit recall operation only. They do not change a
|
|
125
|
+
ForgeLoop task phase and do not write `.forgeloop` state.
|
|
126
|
+
|
|
127
|
+
## Verification
|
|
128
|
+
|
|
129
|
+
The deterministic fixture tests run without a Ripwire installation:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
node --test \
|
|
133
|
+
tests/ripwire-advisory-process.test.js \
|
|
134
|
+
tests/ripwire-advisory-normalize.test.js \
|
|
135
|
+
tests/ripwire-advisory-provider.test.js
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The real-binary smoke test is opt-in. Set both variables to a host-qualified
|
|
139
|
+
binary and version, then run:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
FORGELOOP_TEST_RIPWIRE_PATH=/absolute/path/to/ripwire \
|
|
143
|
+
FORGELOOP_TEST_RIPWIRE_VERSION=0.3.8 \
|
|
144
|
+
node --test tests/real-ripwire-advisory.test.js
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Without those variables the test is skipped and interoperability remains
|
|
148
|
+
`NOT_VERIFIED`. When it runs, it requires a candidate reference to the known
|
|
149
|
+
fixture source and compares the complete fixture tree before and after recall,
|
|
150
|
+
so a binary that mutates the project fails the test. The test does not install
|
|
151
|
+
software or discover a binary.
|
|
152
|
+
|
|
153
|
+
## Retrieval benchmark
|
|
154
|
+
|
|
155
|
+
The retrieval benchmark is a repository-maintainer check. Its runner, cases,
|
|
156
|
+
and fixture corpus are intentionally excluded from the core npm tarball; the
|
|
157
|
+
published consumer surface is the adapter, its declarations, and this guide.
|
|
158
|
+
Run it from a clean ForgeLoop checkout when a host-qualified Ripwire binary is
|
|
159
|
+
available.
|
|
160
|
+
|
|
161
|
+
`benchmarks/ripwire-context/cases.json` freezes six task-shaped queries,
|
|
162
|
+
expected files, lexical baseline terms, and the ForgeLoop commit used for the
|
|
163
|
+
comparison. Run the benchmark only against a clean checkout and an explicitly
|
|
164
|
+
qualified binary:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
node scripts/benchmark-ripwire-context.mjs \
|
|
168
|
+
--project /absolute/path/to/forgeloop \
|
|
169
|
+
--ripwire-path /absolute/path/to/ripwire \
|
|
170
|
+
--version 0.3.8 \
|
|
171
|
+
--cases benchmarks/ripwire-context/cases.json \
|
|
172
|
+
--runs 5 \
|
|
173
|
+
--json
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The report includes per-case and per-run expected-file coverage, misses,
|
|
177
|
+
irrelevant references, baseline bytes, normalized adapter bytes, transport
|
|
178
|
+
bytes when observed, and median/min/max durations. A file seen in only one
|
|
179
|
+
repetition is reported as observed across runs but does not count as a
|
|
180
|
+
consistently found file. A missing binary, version, dirty checkout, or commit
|
|
181
|
+
mismatch produces `NOT_VERIFIED`; it is never reported as a performance win.
|
|
182
|
+
|
|
183
|
+
## Scope boundary
|
|
184
|
+
|
|
185
|
+
The adapter is intentionally limited to source-map retrieval. It does not
|
|
186
|
+
implement Ripwire's body packing, impact commands, cache management, server
|
|
187
|
+
mode, automatic file reads, lifecycle transitions, evidence production, or
|
|
188
|
+
publication. Those features require a separate contract and separate
|
|
189
|
+
qualification work.
|