harness-everything 0.51.0 → 0.52.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.github/workflows/ci.yml +23 -0
- package/CHANGELOG.md +34 -0
- package/benchmarks/results/doc-evidence-e1/cycle-2026-11-11-a-evid-001.md +123 -0
- package/benchmarks/results/doc-evidence-e1/cycle-2026-11-11-b-route-001.md +130 -0
- package/ci/mechanism-2am-observations-session-import.test.js +4 -1
- package/ci/mechanism-34-observations.test.js +127 -23
- package/ci/mechanism-349-ci-change-scope.test.js +260 -0
- package/ci/mechanism-handoff-file.test.js +121 -0
- package/ci/mechanism-system-one-contract.test.js +9 -2
- package/ci/mechanism-system-one-curves.test.js +206 -0
- package/ci/mechanism-system-one-cycle.test.js +585 -0
- package/ci/mechanism-system-one-evaluation.test.js +32 -5
- package/ci/mechanism-system-one-handoff-input.test.js +208 -0
- package/ci/mechanism-system-one-install.test.js +202 -77
- package/ci/mechanism-system-one-live.test.js +361 -0
- package/ci/mechanism-system-one-relevance.test.js +11 -1
- package/ci/mechanism-system-one-train.test.js +136 -53
- package/ci/system-one-adapter-test.py +331 -0
- package/ci/system-one-train-test.py +116 -24
- package/docs/adr/EVID-001.md +123 -0
- package/docs/adr/ROUTE-001-error-lesson-delivery.md +305 -0
- package/docs/governed-index.md +2 -0
- package/docs/routing.md +2 -2
- package/docs/system-one-cycle.md +68 -0
- package/docs/system-one-observations.md +9 -8
- package/docs/system-one-routing.md +163 -115
- package/docs/system-one-suggestion-gates.md +6 -8
- package/docs/system-one-training.md +44 -7
- package/docs/workflow-runtime.md +19 -0
- package/harness-everything/SKILL.md +1 -1
- package/harness-everything/scripts/kernel-router.js +2 -1
- package/harness-everything/scripts/system-one/contract.js +19 -15
- package/harness-everything/scripts/system-one/cua_adapter.py +211 -17
- package/harness-everything/scripts/system-one/evaluate.js +4 -9
- package/harness-everything/scripts/system-one/handoff-input.js +76 -0
- package/harness-everything/scripts/system-one/install.js +281 -113
- package/harness-everything/scripts/system-one/manifest.js +58 -0
- package/harness-everything/scripts/system-one/provider.js +96 -2
- package/harness-everything/scripts/system-one/resident.js +47 -1
- package/harness-everything/scripts/system-one/router.js +80 -1
- package/harness-everything/scripts/tier-router.js +21 -6
- package/hooks/scripts/lib/observations.js +43 -4
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/hooks/scripts/lib/observations.js +43 -4
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/scripts/handoff-file.js +223 -0
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +2 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/contract.js +19 -15
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/cua_adapter.py +211 -17
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/evaluate.js +4 -9
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/handoff-input.js +76 -0
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/install.js +281 -113
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/manifest.js +58 -0
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/provider.js +96 -2
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/resident.js +47 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/router.js +80 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/tier-router.js +21 -6
- package/sbom.cdx.json +7 -7
- package/scripts/ci-change-scope.js +59 -0
- package/scripts/handoff-file.js +223 -0
- package/scripts/sync-openai-plugin.js +4 -0
- package/scripts/system-one-calibrate.js +108 -41
- package/scripts/system-one-curves.js +332 -0
- package/scripts/system-one-cycle/adjudication-input.js +65 -0
- package/scripts/system-one-cycle/build.js +165 -0
- package/scripts/system-one-cycle/collect.js +50 -0
- package/scripts/system-one-cycle/common.js +137 -0
- package/scripts/system-one-cycle/engines.js +62 -0
- package/scripts/system-one-cycle/evaluate.js +70 -0
- package/scripts/system-one-cycle/judge.js +106 -0
- package/scripts/system-one-cycle/label.js +59 -0
- package/scripts/system-one-cycle/package.js +173 -0
- package/scripts/system-one-cycle/score.py +111 -0
- package/scripts/system-one-cycle/train.js +136 -0
- package/scripts/system-one-cycle.js +131 -0
- package/scripts/system-one-observations-export.js +29 -6
- package/scripts/system-one-observations-review.js +4 -5
- package/scripts/system-one-train.py +117 -61
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: EVID-001
|
|
3
|
+
status: proposed
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# EVID-001 — `verify:all` gate: verification-evidence record (row 17)
|
|
7
|
+
|
|
8
|
+
> Inventory row 17, owner-approved: [#325](https://github.com/dyphn1/Harness-everything/issues/325).
|
|
9
|
+
> Cycle definition: [#421 comment 6785927033](https://github.com/dyphn1/Harness-everything/issues/421#issuecomment-6785927033) §5.
|
|
10
|
+
> This is a **retrospective** ADR for the **shipped** `verify:all` gate; it records observed evidence and exact limits, it does not change the gate. Every behavioural claim below is bound to `scripts/verify-all.js` or the direct contract test at repository state `52fb8098326bf1b4f9dca812320959eccd13ee89`.
|
|
11
|
+
|
|
12
|
+
## Decision
|
|
13
|
+
|
|
14
|
+
- **Identity and purpose.** `npm run verify:all` maps to `node scripts/verify-all.js` (`package.json`). The module docblock names it "Local CI-mirror gate runner": it runs the local gate set in CI order, from the working tree or a clean detached checkout of HEAD, and prints a Markdown table that is paste-ready for PR evidence (`scripts/verify-all.js`, docblock).
|
|
15
|
+
- **The full gate plan.** `FULL_PLAN` (`scripts/verify-all.js`) has 12 top-level rows, in CI order, each command being an npm script; four are marked `fast: true`:
|
|
16
|
+
|
|
17
|
+
| # | Row label | Command | `fast` |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| 1 | self-regression (hermetic + mechanism + routing contracts) | `npm test` | yes |
|
|
20
|
+
| 2 | mutation checks | `npm run test:mutations` | yes |
|
|
21
|
+
| 3 | consistency (docs, manifests, repo contract, prompt contracts) | `npm run test:consistency` | yes |
|
|
22
|
+
| 4 | references resolve | `npm run test:references` | no |
|
|
23
|
+
| 5 | release consistency | `npm run test:release` | no |
|
|
24
|
+
| 6 | skill description collision | `npm run test:collision` | no |
|
|
25
|
+
| 7 | skill routing coverage | `npm run test:routing:skills` | no |
|
|
26
|
+
| 8 | routing invariants | `npm run test:routing:invariants` | no |
|
|
27
|
+
| 9 | openai plugin package | `npm run test:plugin:openai` | no |
|
|
28
|
+
| 10 | openai public submission | `npm run test:plugin:submission` | no |
|
|
29
|
+
| 11 | platform compatibility matrix | `npm run test:platform:compatibility` | no |
|
|
30
|
+
| 12 | test-source portability | `npm run test:portability` | yes |
|
|
31
|
+
|
|
32
|
+
- **Aggregate commands and nested checks.** `npm test` and `test:consistency` are aggregate commands; the 12 rows above are the runner's top-level rows. `test:mechanism` is reached inside `npm test` (`self-evolve/scripts/self-regression.js` line 122 runs `ci/mechanism-test.js`), and `test:repo-contract` / `test:docs:capabilities` are components of the `test:consistency` chain (`package.json`). `ci/mechanism-38-verify-all.test.js` is the direct contract test for the runner itself: plan membership in every mode, UNCHECKED reasons and reporting, waza in fast mode, and the launcher policy.
|
|
33
|
+
- **Exact `--fast` behaviour.** With `--fast`, the four `fast: true` rows run; each of the other eight `FULL_PLAN` rows is reported `UNCHECKED (not in the --fast subset)`. Waza is **independent of `--fast`**: `buildPlan` leaves it enabled regardless of the fast flag, so with defaults and waza available, fast mode runs five commands (the four `fast` rows plus waza). The contract test asserts "waza runs by default in fast mode too" (`ci/mechanism-38-verify-all.test.js`). Waza is `UNCHECKED` only when skipped with `--no-waza` (`skipped by --no-waza`) or when the tool is absent (`waza not found on PATH or ~/bin` — probed via `waza --version`, then `~/bin/waza`). `--no-waza` is the only way to force the four-row fast subset.
|
|
34
|
+
- **UNCHECKED reasons, exactly as implemented** (`scripts/verify-all.js`, `buildPlan` + `probeWazaEntry`):
|
|
35
|
+
|
|
36
|
+
| Row | UNCHECKED reason string |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| Non-fast `FULL_PLAN` rows under `--fast` | `not in the --fast subset` |
|
|
39
|
+
| Node 22 execution smoke tests without `--node22` | `not requested; add --node22` |
|
|
40
|
+
| Node 22 dependency install (always, locally) | `covered by the CI runtime-floor job; not replicated locally` |
|
|
41
|
+
| Waza with `--no-waza` | `skipped by --no-waza` |
|
|
42
|
+
| Waza when the tool is absent | `waza not found on PATH or ~/bin` |
|
|
43
|
+
|
|
44
|
+
- **Node 22 runtime-floor lanes, kept separate.** Locally, `--node22` adds only two execution smoke tests run under `npx -y node@22` (`self-evolve/scripts/self-regression.js`, `ci/installer-roundtrip.test.js`) using the host's existing `node_modules`. The Node 22 dependency install (`npm ci` under Node 22) never runs locally and is always `UNCHECKED` with the reason above (`NODE22_UNVERIFIED`). The hosted `runtime-floor` job (`.github/workflows/ci.yml`, Ubuntu, Node 22) runs `npm ci`, `npm test` and `ci/installer-roundtrip.test.js` under Node 22 — that is where install compatibility is actually exercised. The local smoke lane and the hosted install lane are different dispositions and the report keeps them separate.
|
|
45
|
+
- **Flags.** `--fast`, `--clean` (all gates in a fresh detached worktree of HEAD, with `npm ci --ignore-scripts` in the worktree unless `--no-install`), `--node22`, `--no-install`, `--no-waza`. The report header lists the exact flags, or `(defaults)` (`formatFlags`).
|
|
46
|
+
- **Exit and report contract for completed runs.** A completed run renders one row per known gate — `PASS`, `FAIL`, or `UNCHECKED (<reason>)` — plus a `Summary: N PASS, N FAIL, N UNCHECKED.` line (`renderReport`). A gate that did not run is `UNCHECKED` with its reason and never counts as passing evidence. The process exits 1 when any executed gate fails; `UNCHECKED` rows do not force exit 1. Separately: `--help` / `-h` prints usage and exits 0; an unknown argument prints `Unknown argument: <arg>` and exits 2 (`parseArgs`).
|
|
47
|
+
- **The report exists only for completed runs.** "Every known gate always appears in the report" holds once the run reaches the report stage. With `--clean`, a failed worktree creation or a failed `npm ci` in the worktree throws (`prepareCleanRoot`) before the row loop and report rendering, so no report and no summary are produced (`scripts/verify-all.js`).
|
|
48
|
+
- **What `verify:all` does not run.**
|
|
49
|
+
- Hosted-only jobs outside the plan: the `ci.yml` pilot, System One Windows, `release-semantics`, `skill-quality` and `installer-e2e` jobs are not `FULL_PLAN` rows (see Context).
|
|
50
|
+
- The hosted, base-owned document-governance guard is a separate workflow, not part of the local gate set (`FULL_PLAN`; `.github/workflows/doc-governance.yml` running `scripts/doc-governance-guard.js` from the validated base SHA). Its own UNCHECKED states: on any non-`pull_request` event (push, `workflow_call`), the wrapper reports `UNCHECKED` — "No externally selected PR base/head is available for event <event>; the base-owned guard was not executed." — and does not execute the guard; on a PR whose base tree has no `scripts/doc-governance-guard.js` it reports `BOOTSTRAP_UNCHECKED`. Only a PR with a full base/head SHA and a guard in the base tree executes the frozen base guard. Because `release.yml` triggers on push and calls the guard workflow via `workflow_call`, its `doc-governance` dependency alone does not prove the guard ran; the event makes the guard report `UNCHECKED`.
|
|
51
|
+
|
|
52
|
+
## Context
|
|
53
|
+
|
|
54
|
+
- Why the gate exists: local runs skipped gate categories and failures surfaced only after push — PR #301 consistency/runtime-floor, PR #327 Windows self-regression (`scripts/verify-all.js`, docblock lines 7–11).
|
|
55
|
+
- Where the gate sits in the evidence rules: "Never report 'it works' from code reading"; verification includes the CI-equivalent gates, not only unit tests (`AGENTS.md`, § Verification Before You Claim Done; shared agent standard "Work order" verification clause).
|
|
56
|
+
- How the gate relates to hosted CI: **overlapping coverage, not parity.** The hosted workflow (`.github/workflows/ci.yml`) runs many of the same npm commands (`npm test`, `test:mutations`, `test:consistency`, `test:references`, `test:release`, `test:collision`, `test:plugin:openai`, `test:plugin:submission`, `test:platform:compatibility`, `test:portability`) but as discrete jobs — some across the ubuntu/windows/macos matrix (Node 24), some single-OS — and it also runs jobs with no `FULL_PLAN` row: `pilot-offline-evidence` (Python benchmark check), the System One Windows jobs, `release-semantics`, `skill-quality` (waza) and `installer-e2e`. The lists also differ at command level: the generated workflow table (`docs/repository-contract.md`, § Active workflows) names `test:release:semantics` and `waza:check` for `ci.yml`, while `FULL_PLAN` instead has `test:routing:skills` and `test:routing:invariants` as top-level rows. `release.yml` blocks on both `ci.yml` and `doc-governance.yml` via `workflow_call` (`.github/workflows/release.yml`, `gate` and `doc-governance` jobs).
|
|
57
|
+
- The runtime floor: minimum Node 22 (`package.json#engines.node`), primary dev/CI Node 24 (`.nvmrc`, `Dockerfile`) (`docs/repository-contract.md`, § Runtime — generated by `scripts/repository-contract.js`).
|
|
58
|
+
- Doc-governance placement of this ADR: ADRs are T1-strict; ordinary content revisions need no U5 review, but lifecycle, conflict and link checks apply; a new governed ADR triggers update-over-create and outline confirmation (MUST for ADR) (`docs/document-lifecycle.md`, § Governance tiers and placement (#401), T1 row; § D6.5 fact table, "New governed file" row).
|
|
59
|
+
|
|
60
|
+
```mermaid
|
|
61
|
+
flowchart LR
|
|
62
|
+
A["Local change"] --> B["npm run verify:all<br/>(--fast subset or full)"]
|
|
63
|
+
B --> C{"Every executed gate PASS?"}
|
|
64
|
+
C -->|yes| D["Paste-ready PASS/UNCHECKED report<br/>is PR evidence"]
|
|
65
|
+
C -->|no| E["Exit 1; FAIL blocks the claim"]
|
|
66
|
+
B -. "gates not run (reason recorded)" .-> F["UNCHECKED rows<br/>never passing evidence"]
|
|
67
|
+
G["Hosted CI ci.yml jobs<br/>(overlapping coverage; OS matrix,<br/>Node 24 + 22 runtime-floor)"] -. "overlaps, not parity" .-> B
|
|
68
|
+
H["doc-governance.yml<br/>(base-owned guard; UNCHECKED<br/>on non-PR events)"] -. "separate; not in verify:all" .-> B
|
|
69
|
+
I["release.yml"] --> G
|
|
70
|
+
I --> H
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Evidence
|
|
74
|
+
|
|
75
|
+
Only observed results bound to an exact SHA and output are evidence; each names its layer. Local runner results and hosted CI are separate layers. Anything not run is stated as `UNCHECKED`, not inferred from plans.
|
|
76
|
+
|
|
77
|
+
- **Local full-gate run (observed, recorded).** `npm run verify:all` at HEAD `c170a96cf856295200d2d1a62c15a552c3cb2b37`, node v24.22.1, darwin, mode "full gate set", flags `(defaults)`: **13 PASS, 0 FAIL, 3 UNCHECKED** — the 12 `FULL_PLAN` rows all PASS, waza readiness PASS (7.0s), and the three Node 22 rows UNCHECKED with the reasons in the Decision. Full log SHA-256 `630159501b19d1d0178683262f0bfe7c0ec9cacb29a336057bb95094481129f4` (`benchmarks/results/codex-pr-metadata-2026-10-26/verification.md`). This record also shows how 13 passes arise from 12 plan rows plus the default-enabled waza row.
|
|
78
|
+
- **Historical recorded result (repository-recorded claim, unverified here).** E-0001 records `verify:all` 13 PASS / 0 FAIL at `4899fbb7cb60783117983772cb6ae3d1a2e2500c` (`.agents/harness-everything/errors/E-0001-doc-check-identity-split-decision.md`, episode `325-f4-checker-identity` round 4). The record has the run SHA but retains neither that run's row table nor any output, so this summary is **not bound to SHA + output and is not evidence here** (unverified); the exact row composition of that particular run is not asserted here.
|
|
79
|
+
- **Fast-subset runs: not run, stated UNCHECKED.** No observed fast-subset `verify:all` run bound to an exact SHA and output exists in the repository. The retained plan/report excerpts record a usage protocol ("after the H1–H4 set, run `npm run verify:all -- --fast`"), a later verification-limits row stating "Windows CI and full `verify:all` were not run", and a #376 verification instruction to freeze a candidate SHA and run the full gate (`docs/own-repo-governance-e1-plan-2026-10-25-2139.md`, lines 184, 225, 246). These establish that full `verify:all` was not run at that stage; they are not fast-run results and no fast-run result is claimed.
|
|
80
|
+
- **Hosted CI (separate evidence layer).** The full-gate CI run for `e5d22584e243d5b5e587ee0279625e97a9033160` ([run 39374474269](https://github.com/dyphn1/Harness-everything/actions/runs/39374474269), every job succeeded) and the resident-teardown retry on `main@75e04359ae5bf11a41739f8eb04d25a76ee8f3a7` ([run 39175240370](https://github.com/dyphn1/Harness-everything/actions/runs/39175240370); attempt 1 observed the historical Windows System One resident teardown, the run completed on attempt 2) (`docs/document-lifecycle.md`, § Scope of this slice).
|
|
81
|
+
- **Bounded environment note.** E-0009 records that `verify:all` (fast and full) could not complete inside some `codex exec -s workspace-write` sandboxes (loopback bind EPERM in System One suites, npm cache EPERM, workflow-state writes outside the writable roots), with the coordinator running the gate outside the sandbox. E-0009 also records a `5 PASS / 0 FAIL` fast run by the coordinator with neither a run SHA nor retained output: that summary is a repository-recorded claim, **not bound to SHA + output and not evidence here** (unverified). This is a dispatch-environment limit of specific sandboxes, not an intrinsic limit of `verify:all`; it is not generalised to all sandboxes (`.agents/harness-everything/errors/E-0009-one-shot-sandbox-env.md`).
|
|
82
|
+
- **Evidence-layer honesty rule.** Each recorded claim names its layer — package, deterministic mechanism, live host or behaviour (`AGENTS.md`, § Verification, last bullet; § Behavioral & Benchmark Evidence table). Every Evidence bullet cites a durable reference — a public issue/PR URL or a repository-relative path; working-packet paths are notes, not provenance (`.agents/harness-everything/errors/E-0010-packet-local-provenance-reference.md`, Lesson).
|
|
83
|
+
- Not run at this ADR's own state `52fb8098`: no fresh `verify:all` run is recorded for it, and this ADR does not claim that tree is green.
|
|
84
|
+
|
|
85
|
+
## Open gates
|
|
86
|
+
|
|
87
|
+
- #325 (documentation family umbrella) is OPEN; shipped slices do not close it (`docs/adr/DOCS-001-project-docs-config.md`, § Open gates).
|
|
88
|
+
- #341 E1 remains OPEN: qualifying cycles not established; D1/D2 non-qualifying; E1 GO/REVISE/NO-GO gates expansion beyond the limited pilot (`docs/document-lifecycle.md`, § Phase 3b row 3b, and Phase 3b entry-gates bullet).
|
|
89
|
+
- This ADR's own status stays `proposed` until the owner accepts it; ADR status vocabulary is `proposed`/`accepted`/`rejected`/`superseded` (`docs/document-lifecycle.md`, § Roles and status (D6.1, D6.3)).
|
|
90
|
+
|
|
91
|
+
## Related sources
|
|
92
|
+
|
|
93
|
+
Every doc and source path that describes the `verify:all` mechanism, with one line on what it says about the gate.
|
|
94
|
+
|
|
95
|
+
| Source | What it says about the gate |
|
|
96
|
+
| --- | --- |
|
|
97
|
+
| `scripts/verify-all.js` (`FULL_PLAN`, `NODE22_PLAN`, `NODE22_UNVERIFIED`, `WAZA_ENTRY`, `buildPlan`, `parseArgs`, `renderReport`, `main`) | The mechanism itself: 12-row CI-order plan, `--fast` = the four `fast: true` rows, waza independent of `--fast`, `--clean` fresh detached worktree, `--node22` two execution smoke tests via `npx node@22`, Node 22 `npm ci` always UNCHECKED locally, waza probed then UNCHECKED if absent, every unrun gate reported UNCHECKED with its reason, exit 1 on any FAIL, `--help` exit 0, unknown argument exit 2 |
|
|
98
|
+
| `ci/mechanism-38-verify-all.test.js` | Direct contract test: plan rows retained in every mode, `--fast` subset membership, waza runs by default in fast mode, `--no-waza` reason, UNCHECKED reasons, report self-describing (mode, flags, HEAD, runtime, OS), launcher policy (git shell-free; Windows `.cmd` shims via shell), spaced worktree paths survive |
|
|
99
|
+
| `package.json` (script `verify:all`; scripts it invokes) | `verify:all` maps to `node scripts/verify-all.js`; names each individual gate script (`test`, `test:mutations`, `test:consistency` (chains `consistency-check.js`, `doc-capability-consistency.test.js`, `repository-contract.test.js`, `mechanism-2ao-plugin-sync.test.js`, `prompt-contract-regressions.test.js`), `test:references`, `test:release`, `test:collision`, `test:routing:skills`, `test:routing:invariants`, `test:plugin:openai`, `test:plugin:submission`, `test:platform:compatibility`, `test:portability`, `test:mechanism`, `test:repo-contract`, `test:docs:capabilities`) |
|
|
100
|
+
| `AGENTS.md` § Verification Before You Claim Done | `verify:all` "runs every CI gate category and prints paste-ready evidence"; lists 15 individual gates including `test:mechanism`, `test:repo-contract`, `test:docs:capabilities`; `--fast` is the pre-push subset; Node 22 install compatibility stays UNCHECKED locally |
|
|
101
|
+
| `docs/repository-contract.md` (§ Runtime, § Active workflows, § Drift prevention; generated by `scripts/repository-contract.js`) | Node 22 minimum / Node 24 primary; its `ci.yml` workflow row names `test:release:semantics` and `waza:check` among the npm commands CI runs — a list that differs from `FULL_PLAN` (which has `test:routing:skills`/`test:routing:invariants` instead); `test:repo-contract` fails when runtime sources disagree, the Node 22 floor is no longer exercised, or this generated doc is stale |
|
|
102
|
+
| `.github/workflows/ci.yml` (jobs: `pilot-offline-evidence`, `self-regression`, `system-one-windows-node24-patched`, `system-one-windows-node-legacy-policy`, `runtime-floor`, `release-semantics`, `skill-quality`, `consistency`, `installer-e2e`) | Hosted CI runs gate-category commands as discrete jobs — `self-regression` and `consistency` across the ubuntu/windows/macos matrix on Node 24, others single-OS; also hosted-only jobs (`pilot-offline-evidence`, System One, `release-semantics`, `skill-quality` incl. waza, `installer-e2e`); `runtime-floor` (Ubuntu) installs on Node 22 (`npm ci`) and runs `npm test` + `ci/installer-roundtrip.test.js` |
|
|
103
|
+
| `.github/workflows/doc-governance.yml` (job `doc-governance`; runs `scripts/doc-governance-guard.js` from the validated base SHA) | The hosted document-governance guard is base-owned and runs as a separate workflow; on non-`pull_request` events it reports `UNCHECKED`, on a guard-less base `BOOTSTRAP_UNCHECKED`; it is not part of the `verify:all` gate set |
|
|
104
|
+
| `.github/workflows/release.yml` (jobs `gate`, `doc-governance`, `release`) | Release waits for the full CI matrix and document governance via `workflow_call` before publishing; because release runs on push, the guard dependency does not by itself prove the guard executed |
|
|
105
|
+
| `.nvmrc` (`24`) | Primary development/CI Node.js is 24; the 22 floor is a compatibility lane, not the dev runtime |
|
|
106
|
+
| `self-evolve/scripts/self-regression.js` (line 122: runs `ci/mechanism-test.js`) | `npm test` (the first `FULL_PLAN` row) executes the mechanism suite, so `test:mechanism` is exercised inside `verify:all` through `npm test` |
|
|
107
|
+
| `docs/doc-workflow-reconciliation.md` (line 520) | Requires the relevant deterministic gates plus `npm run verify:all -- --fast` for parity claims in the doc-reconciliation workflow |
|
|
108
|
+
| `docs/own-repo-governance-e1-plan-2026-10-25-2139.md` (lines 141, 184, 225, 236, 246, 254) | Usage protocol: focused command per packet, `verify:all -- --fast` after a packet set, coordinator runs full `verify:all` once after the final candidate is frozen; "Node 22 install/platform lanes not run locally remain UNCHECKED"; recorded instances where full `verify:all` was not run stay explicit |
|
|
109
|
+
| `benchmarks/results/codex-pr-metadata-2026-10-26/verification.md` | Observed full-gate local run bound to HEAD `c170a96` with command, environment, row-by-row results, summary and full-log SHA-256 |
|
|
110
|
+
| `docs/document-lifecycle.md` (§ Scope of this slice) | Hosted CI evidence: full-gate CI run for `e5d22584` (run 39374474269) and the resident-teardown retry on `main@75e0435` (run 39175240370) |
|
|
111
|
+
| `.agents/harness-everything/errors/E-0001-doc-check-identity-split-decision.md` (episode `325-f4-checker-identity` round 4) | Repository-recorded claim, unverified as a run result here; output not retained: `verify:all` 13 PASS / 0 FAIL at `4899fbb` (historical run at a pinned SHA; row table not retained) |
|
|
112
|
+
| `.agents/harness-everything/errors/E-0009-one-shot-sandbox-env.md` (episodes `341-e1-kit-repin-and-425-w6`) | `verify:all` (fast and full) did not complete inside some `codex exec -s workspace-write` sandboxes (loopback bind, npm cache, workflow-state EPERM); the coordinator ran it outside the sandbox and workers report the UNCHECKED/BLOCKED disposition |
|
|
113
|
+
|
|
114
|
+
## Known inconsistencies
|
|
115
|
+
|
|
116
|
+
Each is stated as fact and left unresolved here.
|
|
117
|
+
|
|
118
|
+
- `AGENTS.md` § Verification says `verify:all` "runs every CI gate category", but `FULL_PLAN` has 12 npm gates while hosted `ci.yml` also runs `pilot-offline-evidence` (a Python benchmark check), the System One Windows runtime jobs, `release-semantics`, `skill-quality` (waza) and `installer-e2e` — none of which appear in `FULL_PLAN`. The wording issue is tracked in [#429](https://github.com/dyphn1/Harness-everything/issues/429); this ADR does not edit `AGENTS.md`.
|
|
119
|
+
- `AGENTS.md` names `test:mechanism`, `test:repo-contract` and `test:docs:capabilities` as "individual gates" of `verify:all`; `FULL_PLAN` has no such entries (`test:repo-contract` and `test:docs:capabilities` are components of the `test:consistency` chain per `package.json`; `self-regression.js` line 122 runs `ci/mechanism-test.js` inside `npm test`). Also tracked in [#429](https://github.com/dyphn1/Harness-everything/issues/429).
|
|
120
|
+
- Historical row count: E-0001 records a `verify:all` run of "13 PASS" at `4899fbb7cb60783117983772cb6ae3d1a2e2500c`; the current `FULL_PLAN` has 12 rows. The record lacks the run's row table, so whether that run's 13th pass was the waza row (as in the `c170a96` record) or an earlier plan shape is not reconciled here.
|
|
121
|
+
- Local vs hosted Node 22 coverage: locally `--node22` runs only the two execution smoke tests; the Node 22 dependency install (`npm ci`) is always UNCHECKED locally (`NODE22_UNVERIFIED`) and is only covered by the hosted `runtime-floor` job — two separate dispositions.
|
|
122
|
+
- Gate-list wording in generated docs: the `docs/repository-contract.md` `ci.yml` row lists `test:release:semantics` and `waza:check`, which have no `FULL_PLAN` row, while `FULL_PLAN` has `test:routing:skills` and `test:routing:invariants`, which have no row in that generated list. Overlapping, not matching.
|
|
123
|
+
- Dispatch environment: E-0009 records that `verify:all` could not complete inside some sandboxed worker environments; the gate's evidence therefore depends on where it is executed. Stated as a limit, not resolved.
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: ROUTE-001
|
|
3
|
+
status: proposed
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ROUTE-001 — Error lesson delivery into active-step context
|
|
7
|
+
|
|
8
|
+
**This is a design ADR for a mechanism that is not shipped.** Nothing in this repository is modified
|
|
9
|
+
by this document; the follow-up implementation it defines does not exist yet. This ADR does **not** claim:
|
|
10
|
+
|
|
11
|
+
- that error handling improved, or that any behavior changed (no paired evidence exists);
|
|
12
|
+
- that the chosen error class is closed or its recurrence prevented;
|
|
13
|
+
- that any hook, skill, template or script named here has been, or will be, modified — no engine rewrite
|
|
14
|
+
([#402 comment 6785928296](https://github.com/dyphn1/Harness-everything/issues/402#issuecomment-6785928296));
|
|
15
|
+
- that this is a retrospective record of past incidents: it is a forward-looking design ADR; the existing
|
|
16
|
+
error-ledger record inventory stays untouched
|
|
17
|
+
([#402 comment 6786069987](https://github.com/dyphn1/Harness-everything/issues/402#issuecomment-6786069987));
|
|
18
|
+
- that injecting one record replaces the owner's standard of reading the full ledger before dispatched work.
|
|
19
|
+
|
|
20
|
+
## Decision
|
|
21
|
+
|
|
22
|
+
- **Chosen error class: `E-0002` (`report-protocol` — reports ending without a plain column-zero
|
|
23
|
+
terminal `STATUS` line).** The generated ledger index has no rank field; E-0002 is not the most
|
|
24
|
+
frequent class (E-0009 has 7 episodes, E-0002 and E-0003 have 5 each — counts freshly verified by
|
|
25
|
+
`node scripts/errors-sync.js --check` at this SHA). E-0002 is chosen because it fits #402's stated
|
|
26
|
+
concern — "invalid commit/report formats, and missing review/packet outcomes" — and because its lesson
|
|
27
|
+
was followed by later recurrences: episodes `412-review13-label-after-status` (2026-11-08) and
|
|
28
|
+
`425-review2-label-after-status` (2026-11-11) occurred *after* the lesson existed, in packets that did
|
|
29
|
+
not state the terminal-line condition. Sources:
|
|
30
|
+
[#402 comment 6785928296](https://github.com/dyphn1/Harness-everything/issues/402#issuecomment-6785928296);
|
|
31
|
+
`.agents/harness-everything/errors/E-0002-report-missing-terminal-status.md`.
|
|
32
|
+
- **The existing ledger lesson (carried verbatim, not restated):** every report ends with one plain
|
|
33
|
+
column-zero `STATUS: DONE` or `STATUS: BLOCKED: <reason>` line; when a host rule also requires a
|
|
34
|
+
trailing line, the packet must state which line is terminal. The E-0002 record file is the content
|
|
35
|
+
authority for delivery; the generated index is only a locator and is never injected.
|
|
36
|
+
- **Domain: `ROUTE`.** This ADR decides how a relevant ledger lesson is *selected and delivered* into
|
|
37
|
+
active-step context. Declared in `.agents/harness-everything/project-docs.json`. Alternatives not chosen:
|
|
38
|
+
|
|
39
|
+
| Domain | Why not chosen |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `GATE` | Implies a decision/lock; the A2 scope is a context carrier, not a decision maker ([#402](https://github.com/dyphn1/Harness-everything/issues/402), [#394](https://github.com/dyphn1/Harness-everything/issues/394)) |
|
|
42
|
+
| `EVID` | Fits only if the primary decision were the observation contract; here the primary decision is delivery |
|
|
43
|
+
| `DOCS` | Would classify the report format itself, not the delivery mechanism |
|
|
44
|
+
| `SONE` | System One domain; this decision does not change System One provider or routing internals |
|
|
45
|
+
| `DIST` | Distribution domain; this decision changes no packaging or distribution behavior |
|
|
46
|
+
|
|
47
|
+
- **Delivery channel: prompt context at `UserPromptSubmit`, through the existing `additionalContext`
|
|
48
|
+
seam (owner ruling A7.1).** No new hook file, no second router. On Claude Code the router already runs
|
|
49
|
+
at `UserPromptSubmit` (`hooks/hooks.json`, id `harness:pre:kernel-router`); on Codex,
|
|
50
|
+
`hooks/scripts/codex-user-prompt.js` pipes the whole hook payload to the router and wraps its stdout as
|
|
51
|
+
JSON `hookSpecificOutput.additionalContext` (`plugins/harness-everything/hooks/hooks.json`), because
|
|
52
|
+
Codex adds prompt-time context to the model only from that JSON field
|
|
53
|
+
([system-one-observations.md](../system-one-observations.md#hosts)). The lesson rides in the context the
|
|
54
|
+
seam already sends; the hook stays a **context carrier, not a decision maker** (A2).
|
|
55
|
+
|
|
56
|
+
```mermaid
|
|
57
|
+
flowchart LR
|
|
58
|
+
P["UserPromptSubmit payload<br/>(prompt text)"] --> S{"Literal marker<br/>report-status:E-0002 present?"}
|
|
59
|
+
S -->|"no"| N["Not selected:<br/>no injection, context unchanged"]
|
|
60
|
+
S -->|"yes"| R{"E-0002 record file<br/>readable?"}
|
|
61
|
+
R -->|"no"| U["Delivery unavailable;<br/>tools stay usable (fail-open)"]
|
|
62
|
+
R -->|"yes"| A["E-0002 record § Lesson text,<br/>verbatim, added to the<br/>existing prompt context"]
|
|
63
|
+
A --> W["Agent writes its report"]
|
|
64
|
+
W --> O["Observation: the report file's raw<br/>final line is column-zero STATUS —<br/>or it is not"]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
- **Relevance: an explicit report-required signal selects the E-0002 record only (owner ruling A7.2).**
|
|
68
|
+
The signal is defined concretely:
|
|
69
|
+
- *Source:* the prompt text of the `UserPromptSubmit` payload — `payload.prompt`, which the router
|
|
70
|
+
already reads (`harness-everything/scripts/kernel-router.js`: `const prompt = promptArg ||
|
|
71
|
+
(typeof payload?.prompt === 'string' ? payload.prompt : '')`). On Codex the full payload reaches the
|
|
72
|
+
router through `hooks/scripts/codex-user-prompt.js` `finish` (`spawnSync(process.execPath, [ROUTER],
|
|
73
|
+
{ input, ... })`); on Claude Code the router is invoked directly with the same payload. The signal is
|
|
74
|
+
therefore really available at `UserPromptSubmit` on both wired hosts, before any routing output.
|
|
75
|
+
- *Format:* the literal marker string `report-status:E-0002` appearing anywhere in the prompt text.
|
|
76
|
+
A literal substring test only — no semantic classifier, no second router, no forcing every task to
|
|
77
|
+
produce a report.
|
|
78
|
+
- *Selection rule:* marker present **and** the E-0002 record file readable ⇒ the record's lesson text
|
|
79
|
+
is added once to the existing context. Marker absent ⇒ not selected, nothing delivered, no fallback.
|
|
80
|
+
- *Plain limit:* the marker is written by whoever authors the dispatch prompt or packet (a fixed
|
|
81
|
+
one-string convention). Prompts without it are not selected and are not delivered; the hook does not
|
|
82
|
+
infer report-requiredness from task content.
|
|
83
|
+
- Alternatives not chosen: matching the active step's recorded obligations
|
|
84
|
+
(`activeExecutionFor` → `activeStepSnapshot`) — defined only when a retained workflow with a loaded
|
|
85
|
+
obligation set exists, so it covers a subset of report work through a second selection surface; and
|
|
86
|
+
agent-side grep of the index at task start — no code change but depends on agent discipline, the
|
|
87
|
+
failure mode the ledger README already records.
|
|
88
|
+
|
|
89
|
+
- **Label vs STATUS (owner ruling A7.4), stated as decided:**
|
|
90
|
+
- A report **file** ends with its raw column-zero `STATUS:` line and carries no harness-label; the
|
|
91
|
+
**turn's** final message summarises or links the report and ends with the hidden harness-label line
|
|
92
|
+
(`docs/routing.md` § Turn label line).
|
|
93
|
+
- When the report *is* the turn's final message, the rule is a **report-turn exception to
|
|
94
|
+
label-last**. That exception is owned by `AGENTS.md` (applicability) and `docs/routing.md` (label
|
|
95
|
+
contract); making it is a follow-up change, **not made here** — those files are not edited by this ADR.
|
|
96
|
+
- E-0002's recorded episodes (including the label-after-status ones) stay as history; a
|
|
97
|
+
provenance-carrying correction of the lesson text is **#359's** follow-up. This ADR does not rewrite
|
|
98
|
+
the ledger record.
|
|
99
|
+
- **Success / failure observation, in three layers that are never merged into one PASS:**
|
|
100
|
+
|
|
101
|
+
| Layer | What is recorded | What is not claimed |
|
|
102
|
+
| --- | --- | --- |
|
|
103
|
+
| Delivered / received | Which task or step, which E-0002 record version, that the signal matched, and what context was actually sent. "Received" is stated only with host-side evidence that the context reached the model | Adapter stdout or a passing mechanism test is not a live receipt |
|
|
104
|
+
| Considered | Stated as **not directly observed**; no private reasoning is required or requested, no reflection token or report | Any acknowledgement the agent volunteers may be recorded as anecdote, never as the acceptance criterion |
|
|
105
|
+
| Used / output | The report file's raw final line under the A7.4 grammar (`STATUS: DONE` / `STATUS: BLOCKED: <reason>` at column zero, nothing after it): conformant or not. A one-run outcome | A conformant line does not prove the injection caused it, that recurrence fell, or that the error class is closed |
|
|
106
|
+
|
|
107
|
+
- Mixed cases stay separate: output conformant with delivery UNCHECKED; delivery observed with output
|
|
108
|
+
nonconformant. Neither is recorded as a single PASS.
|
|
109
|
+
- Any later behavior-improvement claim requires paired baseline/treatment evidence; this ADR's
|
|
110
|
+
observation contract does not provide it.
|
|
111
|
+
- **Smallest follow-up implementation acceptance (design only; nothing is implemented here):** one seam
|
|
112
|
+
(the `UserPromptSubmit` context assembly above), one minimal change (signal match ⇒ read
|
|
113
|
+
`.agents/harness-everything/errors/E-0002-report-missing-terminal-status.md` § Lesson and append it
|
|
114
|
+
verbatim to the existing context), with these controls:
|
|
115
|
+
|
|
116
|
+
| Control | Expected result | Evidence layer the check gives |
|
|
117
|
+
| --- | --- | --- |
|
|
118
|
+
| No marker in the prompt | No injection; context identical to today | Deterministic mechanism test |
|
|
119
|
+
| Marker present, record readable | The exact E-0002 lesson text delivered in context | Deterministic mechanism test, then one real-host task for receipt |
|
|
120
|
+
| Marker present, record unreadable or source stale | Delivery unavailable; tools stay usable; no fallback to the whole ledger | Deterministic mechanism test |
|
|
121
|
+
| Report produced | Final line conformant or not, recorded per the observation table | One real-host task (one-run outcome) |
|
|
122
|
+
|
|
123
|
+
- Explicitly forbidden: no fallback to the whole ledger, no fabricated receipt, no automatic rewrite of
|
|
124
|
+
the report, no error counter, no fixed recurrence threshold, no reflection tokens, no forced report,
|
|
125
|
+
no mutation lock, no automatic escalation or reset ritual (A2).
|
|
126
|
+
- Host evidence boundary: only the host seam chosen here (`UserPromptSubmit` context on Claude Code and
|
|
127
|
+
Codex) is covered by future checks. Other hosts and other lifecycle events are unverified; a file
|
|
128
|
+
existing in a package proves no host loaded it ([platform-capabilities.md](../platform-capabilities.md)).
|
|
129
|
+
- **Rule-of-3 boundary (owner ruling A7.5), stated exactly:** this cycle's lesson delivery adds, extends,
|
|
130
|
+
calls or depends on **no counter, lock or forced reflection**; the existing Rule-of-3 breaker
|
|
131
|
+
(`hooks/scripts/rule-of-3.js` `isTripped`/`blockForReflection`, `hooks/scripts/rule-of-3-tracker.js`,
|
|
132
|
+
`hooks/scripts/reset-circuit-breaker.js`, [docs/enforcement-locks.md](../enforcement-locks.md)) is not
|
|
133
|
+
modified in this cycle. Owner direction: no counting (that was tried and failed before); a hook hint is
|
|
134
|
+
enough. This ADR does **not** claim the existing breaker conforms to A2; whether A2 requires a separate
|
|
135
|
+
change to it is a separate item outside this ADR, unresolved for its owner. Host boundary, stated here
|
|
136
|
+
and kept consistent with the reading list and the known-inconsistencies entry below: this delivery
|
|
137
|
+
design covers only the selected Claude Code / Codex `UserPromptSubmit` path; the OpenCode plugin has its
|
|
138
|
+
own separate Rule-of-3 breaker (`opencode-plugin/index.mjs` — an independent counter, required
|
|
139
|
+
reflection, block on the covered edit tools), which this delivery neither uses nor modifies and which
|
|
140
|
+
this ADR does not claim conforms to A2. The OpenCode sources are reading-list evidence only: they do not
|
|
141
|
+
mean OpenCode was run and do not extend the hosts the lesson injection supports.
|
|
142
|
+
- **Non-goals (from A2 and the ownership boundary):** the hook stays a context carrier, not a decision
|
|
143
|
+
maker; this ADR does not duplicate #359 (Error Ledger), #394 (ledger context injection and
|
|
144
|
+
agent-initiated zoom-out) or #141 (candidate creation/evaluation); candidate creation/evaluation
|
|
145
|
+
(`hooks/scripts/lib/learning-opportunity.js` `createLearningOpportunity`,
|
|
146
|
+
`self-evolve/scripts/lesson-candidate.js`) and index generation (`scripts/errors-sync.js`) are not
|
|
147
|
+
delivery points; no claim that error handling improved without paired evidence.
|
|
148
|
+
|
|
149
|
+
## Context
|
|
150
|
+
|
|
151
|
+
- **The problem:** agent mistakes recur even when a lesson is already recorded in the ledger — the
|
|
152
|
+
recording-to-application gap [#402 comment 6785928296](https://github.com/dyphn1/Harness-everything/issues/402#issuecomment-6785928296).
|
|
153
|
+
- **What exists today (each verified in this repository):**
|
|
154
|
+
- the ledger and generated index (`.agents/harness-everything/errors/README.md`, `index.jsonl`,
|
|
155
|
+
`E-*.md`) with a lookup convention (grep by write-set or signature); a convention, not a gate;
|
|
156
|
+
- hook context seams that carry *policy and routing* context but do not retrieve ledger records:
|
|
157
|
+
Claude Code runs `harness-everything/scripts/kernel-router.js` directly at `UserPromptSubmit`
|
|
158
|
+
(`hooks/hooks.json`); Codex wraps the same router through `hooks/scripts/codex-user-prompt.js`
|
|
159
|
+
(`plugins/harness-everything/hooks/hooks.json`); `hooks/scripts/openai-session-start.js` sends static
|
|
160
|
+
`POLICY` and failed-session `handoffContext` at session start;
|
|
161
|
+
- the generic Rule-of-3 tracker and blocker, which read session state, not the ledger
|
|
162
|
+
(`hooks/scripts/rule-of-3.js`, `hooks/scripts/rule-of-3-tracker.js`);
|
|
163
|
+
- candidate creation/evaluation machinery (`hooks/scripts/lib/learning-opportunity.js`,
|
|
164
|
+
`self-evolve/scripts/lesson-candidate.js`);
|
|
165
|
+
- zoom-out and self-evolve skills as agent-initiated reflection/evaluation paths (`zoom-out/SKILL.md`,
|
|
166
|
+
`self-evolve/SKILL.md`).
|
|
167
|
+
- No ledger-aware delivery seam exists today.
|
|
168
|
+
- **What zoom-out carries today (correction):** when an agent enters a repair-loop reflection, the
|
|
169
|
+
carried material is the acceptance anchor, links to the previous comparable report, prior finding IDs
|
|
170
|
+
and dispositions, the fix made since, and round counts per class in the error ledger
|
|
171
|
+
(`zoom-out/references/circuit-breaker.md`). It does **not** carry the static ledger lesson text; no
|
|
172
|
+
current seam delivers the E-0002 record.
|
|
173
|
+
- **Ownership boundary:** #359 owns the Error Ledger; #394 owns ledger context injection and
|
|
174
|
+
agent-initiated zoom-out; #141 owns candidate creation/evaluation
|
|
175
|
+
([#402 comment 6785928296](https://github.com/dyphn1/Harness-everything/issues/402#issuecomment-6785928296)).
|
|
176
|
+
**Unverified:** current tracker state of #394 (no #394-specific implementation found on local `main`).
|
|
177
|
+
|
|
178
|
+
## Evidence
|
|
179
|
+
|
|
180
|
+
- **E-0002 episode table** (counts freshly verified by `node scripts/errors-sync.js --check`, exit 0, at
|
|
181
|
+
this SHA) drawn from `.agents/harness-everything/errors/E-0002-report-missing-terminal-status.md` and
|
|
182
|
+
its index row:
|
|
183
|
+
|
|
184
|
+
| Episode | Date | Rounds | Closed |
|
|
185
|
+
| --- | --- | --- | --- |
|
|
186
|
+
| `325-f4-report-status` | 2026-10-22 | unknown | no |
|
|
187
|
+
| `341-e1-verdict-addendum` | 2026-10-29 | 1 | yes |
|
|
188
|
+
| `341-e1-writer-contract-review11` | 2026-11-07 | 0 | no |
|
|
189
|
+
| `412-review13-label-after-status` | 2026-11-08 | 1 | yes |
|
|
190
|
+
| `425-review2-label-after-status` | 2026-11-11 | 0 | no |
|
|
191
|
+
|
|
192
|
+
- **Seam inventory:** `hooks/hooks.json` (Claude Code `UserPromptSubmit` → `kernel-router.js`, id
|
|
193
|
+
`harness:pre:kernel-router`); `plugins/harness-everything/hooks/hooks.json` (Codex `UserPromptSubmit` →
|
|
194
|
+
`codex-user-prompt.js`); `hooks/scripts/codex-user-prompt.js` `finish` (wraps router stdout as JSON
|
|
195
|
+
`hookSpecificOutput.additionalContext`); `harness-everything/scripts/kernel-router.js` `route`,
|
|
196
|
+
`persistWorkflow`, `activeExecutionFor` (reads `payload.prompt`). Live-host receipt evidence exists for
|
|
197
|
+
the Codex user-hook `additionalContext` path on one retained Windows host
|
|
198
|
+
([system-one-observations.md](../system-one-observations.md#hosts),
|
|
199
|
+
[platform-capabilities.md](../platform-capabilities.md)); the Claude Code `UserPromptSubmit` wiring is
|
|
200
|
+
mechanism-verified, with no live receipt for a lesson injection.
|
|
201
|
+
- **The rule conflict witness:** episode `412-review13-label-after-status` (a column-zero
|
|
202
|
+
`STATUS: DONE` followed by a hidden harness-label line) as the concrete observation that motivates the
|
|
203
|
+
label/STATUS decision above.
|
|
204
|
+
- **Candidate-class context:** the index has 14 records; only E-0003 carries a non-null `mechanism_ref`
|
|
205
|
+
(`.husky/commit-msg`). E-0002 has `mechanism_ref: null`.
|
|
206
|
+
|
|
207
|
+
## Open gates
|
|
208
|
+
|
|
209
|
+
- **Owner acceptance of this ADR** (`status: proposed`); the follow-up implementation and its
|
|
210
|
+
verification (deterministic mechanism tests, then one real-host task) are not started.
|
|
211
|
+
- **`AGENTS.md` / `docs/routing.md` wording change** for the report-turn exception to label-last (A7.4)
|
|
212
|
+
is a follow-up owned by those files; not made here.
|
|
213
|
+
- **A provenance-carrying correction of the E-0002 lesson text** is a #359 follow-up.
|
|
214
|
+
- **Whether A2 requires a separate change to the existing Rule-of-3 breaker** — separate item outside
|
|
215
|
+
this ADR, unresolved for its owner (A7.5).
|
|
216
|
+
- **#394 tracker state** is unverified against the tracker; no #394-specific implementation exists on
|
|
217
|
+
local `main`.
|
|
218
|
+
|
|
219
|
+
## Reading list
|
|
220
|
+
|
|
221
|
+
Every source describing error handling, the ledger, lesson delivery, zoom-out or self-evolve that this
|
|
222
|
+
Decision rests on. One line each.
|
|
223
|
+
|
|
224
|
+
| Source | What it says |
|
|
225
|
+
| --- | --- |
|
|
226
|
+
| `.agents/harness-everything/errors/README.md` | Ledger workflow: grep `index.jsonl` by signature or write-set, write/update records at failure time, `npm run errors:sync`; a convention, not a gate. |
|
|
227
|
+
| `.agents/harness-everything/errors/index.jsonl` | Generated per-class inventory: 14 records; E-0002 has 5 episodes and no mechanism. Locator only, never injected. |
|
|
228
|
+
| `.agents/harness-everything/errors/E-0002-report-missing-terminal-status.md` | The target lesson and content authority: plain column-zero terminal STATUS; packet must state the terminal line when a host rule adds a trailing line. |
|
|
229
|
+
| `.agents/harness-everything/errors/E-0001-doc-check-identity-split-decision.md` … `E-0014-lossy-cleanup.md` | The other 13 ledger records (classes, lessons, mechanism status). |
|
|
230
|
+
| `AGENTS.md` (rule 14) | Turn label line mandatory on every final message — the rule whose report-turn exception is a follow-up change. |
|
|
231
|
+
| `docs/routing.md` | Owns the label contract: the hidden label is the final line of every turn's final message, records post-work judgement, never gates routing; separates semantic contract, mechanism and live evidence. |
|
|
232
|
+
| `docs/system-one-observations.md` | Specification of the label line and turn observation; documents that Codex adds prompt-time context to the model only from JSON `hookSpecificOutput.additionalContext`, verified live on codex-cli 0.157.1. |
|
|
233
|
+
| `harness-everything/scripts/kernel-router.js` | The router the hooks run at `UserPromptSubmit`: `route`, `persistWorkflow`, `activeExecutionFor`; reads `payload.prompt`; prints the label contract last. |
|
|
234
|
+
| `hooks/scripts/codex-user-prompt.js` | Codex `UserPromptSubmit` adapter: `finish` pipes the whole hook payload into the router and wraps its stdout as `additionalContext`. |
|
|
235
|
+
| `scripts/sync-openai-plugin.js` | Packages `hooks/scripts` into `plugins/harness-everything/hooks/scripts`, so a change at the seam ships with the plugin — a packaging fact, not live-host evidence. |
|
|
236
|
+
| `docs/mechanism-first-skill-mesh.md` | Anti-goal: no mandatory response-template system; mechanisms are short, failable, bounded — the delivery adds context, not a template obligation. |
|
|
237
|
+
| `docs/platform-capabilities.md` | Repository-wide evidence boundary: statuses `Mechanism verified` vs `Live verified`; Codex user-hook capture live-verified for `UserPromptSubmit`/`Stop` on one Windows host only; a package file proves no host loaded it. |
|
|
238
|
+
| `docs/troubleshooting.md` | Operator view of the existing Rule-of-3: its session state file and manual `hooks/scripts/rule-of-3.js` runs — context for the A7.5 boundary. |
|
|
239
|
+
| `hooks/hooks.json` | Claude Code SessionStart, `UserPromptSubmit` (`harness:pre:kernel-router`, `harness:obs:observation-userpromptsubmit`) and PostToolUseFailure wiring; Rule-of-3 hooks live here; no ledger reference. |
|
|
240
|
+
| `plugins/harness-everything/hooks/hooks.json` | Packaged Codex hook wiring, including the `codex-user-prompt.js` entries. |
|
|
241
|
+
| `hooks/scripts/openai-session-start.js` | Session-start context seam: static `POLICY` plus failed-session `handoffContext`; no ledger retrieval. |
|
|
242
|
+
| `hooks/scripts/rule-of-3.js` | The existing generic three-failure blocker (`isTripped`, `blockForReflection`): a counter/lock this ADR must not extend or depend on. |
|
|
243
|
+
| `hooks/scripts/rule-of-3-tracker.js` | Tracks session tool-error signatures; may create a learning candidate after recovery; reads session state, not the ledger. |
|
|
244
|
+
| `hooks/scripts/reset-circuit-breaker.js` | The existing reset ritual for the generic breaker; kept out of scope by A2. |
|
|
245
|
+
| `hooks/scripts/lib/learning-opportunity.js` | `createLearningOpportunity`: session-local candidate creation for `rule-of-3-recovery` and `verifier-fail-pass` (#141). |
|
|
246
|
+
| `hooks/scripts/lib/telemetry.js` | Event recording used by the candidate/tracking machinery. |
|
|
247
|
+
| `scripts/errors-sync.js` | Builds `index.jsonl`; `--check` compares without writing; not wired into CI or hooks. |
|
|
248
|
+
| `scripts/lib/advisory-text.js` | Static advisory text delivery, including Rule-of-3 policy — precedent for context-only delivery. |
|
|
249
|
+
| `zoom-out/SKILL.md` | Agent-initiated zoom-out skill; treats repair-loop history and ledger rounds as reflection signals. |
|
|
250
|
+
| `zoom-out/references/circuit-breaker.md` | What zoom-out carries today: acceptance anchor, prior findings and dispositions, ledger round counts — not the static ledger lesson. |
|
|
251
|
+
| `zoom-out/templates/zoom-out-report.template.md` | Reflection-report template; not a delivery carrier in this design. |
|
|
252
|
+
| `docs/workflows/zoom-out.md` | Zoom-out workflow and packet-history requirements; its breaker is `hooks/scripts/rule-of-3.js`. |
|
|
253
|
+
| `docs/workflows/fable-mode.md`, `docs/workflows/fable-discipline.md`, `docs/workflows/tdd.md` | Workflow docs referencing Rule-of-3 as the mandatory reflection owner for three same-signature failures. |
|
|
254
|
+
| `self-evolve/SKILL.md` | Agents list, evaluate and promote lesson candidates; governed promotion, not automatic retrieval. |
|
|
255
|
+
| `self-evolve/references/memory-resolution.md` | Candidate evaluation and memory-resolution rules. |
|
|
256
|
+
| `self-evolve/scripts/lesson-candidate.js` | Candidate lifecycle implementation (#141). |
|
|
257
|
+
| `self-evolve/scripts/persist-memory.js` | Persistence of promoted lessons. |
|
|
258
|
+
| `docs/workflows/self-evolve.md` | The self-evolve workflow contract. |
|
|
259
|
+
| `docs/reflection.md` | Reflection/memory boundaries. |
|
|
260
|
+
| `docs/philosophy.md` | Contract strength (MUST/SHOULD/MAY) and mechanisms-over-mandates philosophy. |
|
|
261
|
+
| `docs/enforcement-locks.md` | Documents the existing generic lock behavior — the contradiction with A2 recorded below. |
|
|
262
|
+
| `fable-discipline/SKILL.md`, `tdd/SKILL.md`, `tdd/references/core-discipline.md` | Workflow disciplines that reference zoom-out on repetition. |
|
|
263
|
+
| `ci/mechanism-2a-rule-of-3.test.js` | Deterministic coverage of the existing Rule-of-3 mechanism. |
|
|
264
|
+
| `ci/self-evolve-loop.test.js`, `ci/mechanism-379-self-evolve-workspace.test.js` | Deterministic coverage of the self-evolve loop (#141/#379). |
|
|
265
|
+
| `evals/zoom-out/`, `evals/self-evolve/` | Routing evals for the two agent-initiated paths. |
|
|
266
|
+
| `behavioral-evals/cases/baseline-error-handling.yaml`, `pressure-skip-error-handling.yaml`, `breaker-zoom-out-after-3.yaml`, `self-evolve-retrieval-recurrence.yaml` | Behavior cases covering error handling and retrieval recurrence. |
|
|
267
|
+
| `plugins/harness-everything/skills/zoom-out/`, `plugins/harness-everything/skills/self-evolve/`, `plugins/harness-everything/hooks/hooks.json` | Packaged copies that must stay consistent with canonical sources if delivery ships. |
|
|
268
|
+
| `docs/workflows/harness-everything.md` | The cross-workflow contract: its re-plan checklist requires `zoom-out` completed after 3 same-signature failures before resuming — the mandatory reflection owner this delivery must not replace. |
|
|
269
|
+
| `docs/workflow-runtime.md` | Declares the two intentionally separate hard boundaries: Rule of 3 (the third matching failure pauses mutation until a zoom-out reflection is written) and user/host permission approval; a repeated cycle requests another reflection, not a permanent lock. |
|
|
270
|
+
| `docs/architecture.md` | Names the two mechanisms that still hard-block on the Claude Code hook path — `action-gate.js` and the Rule-of-3 zoom-out boundary — both explicitly scoped out of #190's downgrade to reminders. |
|
|
271
|
+
| `harness-everything/SKILL.md` | Invariants: zoom-out (MUST) after 3 same-signature failures; numeric planning never hard-stops — only Rule-of-3 reflection and explicit user/host permission boundaries may block. |
|
|
272
|
+
| `harness-everything/references/triage-and-tiers.md` | Architecture rule: semantic MUSTs may be reminder-observed; only Rule-of-3 reflection and explicit permission boundaries may hard-block. |
|
|
273
|
+
| `README.md` | States the one cognitive hard boundary (Rule of 3: three matching failures pause mutation for a zoom-out reflection), the guard's behavior, and the OpenCode plugin's breaker with its retained live-host limits. |
|
|
274
|
+
| `VERIFICATION.md` | Verification recipes plus the invariant that only Rule-of-3 and explicit permission boundaries may block. |
|
|
275
|
+
| `opencode-plugin/README.md` | The OpenCode plugin's own Rule-of-3 zoom-out boundary: the third matching verification failure forces a tokenized zoom-out report; a valid reflection resets the count; no permanent second-stage lock. |
|
|
276
|
+
| `opencode-plugin/index.mjs` | Implements that OpenCode breaker independently: `tripBreaker` counts matching verification failures and on the third sets `reflectionPending`; `tool.execute.before` throws for `EDIT_TOOLS` (`edit`, `write`, `apply_patch`) operations that are not the reflection write, until a valid reflection exists. |
|
|
277
|
+
| [#402](https://github.com/dyphn1/Harness-everything/issues/402) (comments 6785928296, 6786069987) | Scope anchor A1–A6: problem statement, context-carrier rule, ownership, cycle-B scope, design-not-retrospective; comment 6790477633 records the A7 rulings. |
|
|
278
|
+
| [#394](https://github.com/dyphn1/Harness-everything/issues/394) | Ledger context injection and agent-initiated zoom-out ownership. |
|
|
279
|
+
| [#359](https://github.com/dyphn1/Harness-everything/issues/359) | Error Ledger ownership. |
|
|
280
|
+
| [#141](https://github.com/dyphn1/Harness-everything/issues/141) | Candidate creation/evaluation ownership. |
|
|
281
|
+
| [#421 comment 6785927033](https://github.com/dyphn1/Harness-everything/issues/421#issuecomment-6785927033) | Cycle definition for this work. |
|
|
282
|
+
|
|
283
|
+
### Known inconsistencies (stated as facts, not resolved by this ADR)
|
|
284
|
+
|
|
285
|
+
- **`AGENTS.md` rule 14 / `docs/routing.md` vs the E-0002 terminal rule:** the repository requires a
|
|
286
|
+
trailing hidden harness-label line on every final message; the ledger lesson requires `STATUS:` to be
|
|
287
|
+
the last line at column zero. Episode `412-review13-label-after-status` records the conflict. This ADR
|
|
288
|
+
states the A7.4 decision and its report-turn exception, but the wording change in `AGENTS.md` and
|
|
289
|
+
`docs/routing.md` is a follow-up; until it lands, the conflict stands as written.
|
|
290
|
+
- **Existing generic Rule-of-3 lock vs A2:** `hooks/scripts/rule-of-3.js` and
|
|
291
|
+
[docs/enforcement-locks.md](../enforcement-locks.md) describe a generic three-failure mutation lock with
|
|
292
|
+
a required reflection report; #402 prohibits exactly such mechanisms for ledger lesson handling. This
|
|
293
|
+
ADR adds, extends, calls or depends on none of them and does not modify the breaker; whether A2 requires
|
|
294
|
+
a separate change to the existing breaker stays unresolved for its owner. The OpenCode plugin's separate
|
|
295
|
+
breaker (`opencode-plugin/index.mjs`, [opencode-plugin/README.md](../../opencode-plugin/README.md)) is
|
|
296
|
+
likewise neither used nor modified by this delivery, and this ADR does not claim it conforms to A2.
|
|
297
|
+
- **Ledger README lookup rule vs the owner's full-read standard:** the README says grep `index.jsonl` for
|
|
298
|
+
the packet's write-set; the owner standard requires reading every record. Injecting one record does not
|
|
299
|
+
change that operational standard for packets.
|
|
300
|
+
- **#394 point-of-action proposals vs shipped code:** E-0002 and E-0003 propose point-of-action injection
|
|
301
|
+
in #394, but no #394-specific implementation exists on local `main` (**unverified** against the tracker).
|
|
302
|
+
- **Index freshness:** `scripts/errors-sync.js` is not wired into CI or hooks (its own source comment), so
|
|
303
|
+
the index can be stale; this design never injects index content — the E-0002 record file is the content
|
|
304
|
+
authority and the index is a locator. Counts cited in this ADR were verified by
|
|
305
|
+
`node scripts/errors-sync.js --check` at this SHA.
|
package/docs/governed-index.md
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
- `DOCS-006` — `docs/adr/DOCS-006-reconciliation-pilot.md` (role: adr; status: accepted)
|
|
13
13
|
- `DOCS-007` — `docs/adr/DOCS-007-shared-doc-craft-derived-views.md` (role: adr; status: accepted)
|
|
14
14
|
- `DOCS-008` — `docs/adr/DOCS-008-obligation-abstraction-bounded-consumer.md` (role: adr; status: accepted)
|
|
15
|
+
- `EVID-001` — `docs/adr/EVID-001.md` (role: adr; status: proposed)
|
|
16
|
+
- `ROUTE-001` — `docs/adr/ROUTE-001-error-lesson-delivery.md` (role: adr; status: proposed)
|
|
15
17
|
|
|
16
18
|
## PRD revision chains
|
|
17
19
|
|
package/docs/routing.md
CHANGED
|
@@ -70,10 +70,10 @@ This MUST is semantic rather than a hard runtime lock: hosts may observe/remind
|
|
|
70
70
|
End the final message of **every** turn with one line that rendered Markdown hides. This includes short answers, lookups, and turns that end with a question back to the user; unlike the Harness Status, it is not limited to non-trivial work:
|
|
71
71
|
|
|
72
72
|
```
|
|
73
|
-
<!-- harness-label {"v":1,"validity":"actionable","
|
|
73
|
+
<!-- harness-label {"v":1,"validity":"actionable","tier":"tier2","intents":["fix","test"],"workflow":"iterative-single","skills":["tdd"]} -->
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
It states the agent's own judgement after the work, not a copy of the router's suggestion
|
|
76
|
+
It states the agent's own judgement after the work, not a copy of the router's suggestion. `invalid` means the prompt cannot be understood from its own text and needs conversation context; agent-written dispatches and worker instructions are ordinary prompts. The remaining keys record `tier` under tier rules v2, up to three `intents`, the `workflow` strategy and the `skills` actually used. The observation collector stores it as training data ([system-one-observations.md](system-one-observations.md)). A missing or malformed line is recorded with a reason code; it never blocks a turn or changes routing.
|
|
77
77
|
|
|
78
78
|
Tier values:
|
|
79
79
|
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# System One monthly training cycle
|
|
2
|
+
|
|
3
|
+
The owner starts one cycle when ready. The public repository supplies the scripts; prompts, labels, checkpoints, and version packages stay in a private data directory. This runbook has no manual label or spot-check step.
|
|
4
|
+
|
|
5
|
+
```mermaid
|
|
6
|
+
flowchart LR
|
|
7
|
+
A[collect local observations] --> B[label current text with Luna]
|
|
8
|
+
B --> C[judge self vs Luna disagreements]
|
|
9
|
+
C --> D[build CUA-S1 dataset]
|
|
10
|
+
D --> E[train validity, intent, tier]
|
|
11
|
+
E --> F[score fixed holdouts and compare curves]
|
|
12
|
+
F --> G[package private version directory]
|
|
13
|
+
G --> H[publish to private models/cua-s1 directory]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Before the monthly run
|
|
17
|
+
|
|
18
|
+
- Use a fresh, private directory for this cycle, outside the Harness checkout. On POSIX hosts the scripts set directory permissions to `0700` and data files to `0600`; on Windows, use a user-private directory with a restrictive ACL.
|
|
19
|
+
- Set `--since` to the last completed collection boundary. `collect` requires this date and accepts an optional `--sessions` path for a non-default Codex session directory.
|
|
20
|
+
- Pick a version id containing letters, numbers, dots, underscores, or hyphens. Reuse the same data directory and version id to resume; use a new directory for the next month.
|
|
21
|
+
- Replace the placeholders in the commands below with real paths, dates, and a version id.
|
|
22
|
+
|
|
23
|
+
## Steps
|
|
24
|
+
|
|
25
|
+
| Step | Command | Inputs → outputs | Typical duration and resources¹ | Resume |
|
|
26
|
+
|---|---|---|---|---|
|
|
27
|
+
| Collect | `node scripts/system-one-cycle.js collect --data-dir "<private-cycle-dir>" --since <YYYY-MM-DD>` | Local Codex session observations and the local observation store → `training/observed/prompts-observed.jsonl`, `labels-observed.jsonl`, and a count-only export report. Previous-message text and self `contextDependent` fields are removed. | Minutes for a local session scan; low CPU and local disk. | The completed step is recorded in `cycle-state.json`. Start another month in a new directory. |
|
|
28
|
+
| Label | `node scripts/system-one-cycle.js label --data-dir "<private-cycle-dir>"` | Current text only → Luna tier and intent rows in `training/relabel-luna/`. `null` maps to invalid; every other tier label maps to actionable for the validity stage. | Model latency dominates. Defaults: batches of 20, concurrency 4. | Rows already written are skipped by id. Failed batches are recorded with ids and reason codes, then retried on the next invocation. |
|
|
29
|
+
| Judge | `node scripts/system-one-cycle.js judge --data-dir "<private-cycle-dir>"` | Self tier and text-only Luna tier disagreements → private `training/adjudication/input.jsonl` and `consensus.jsonl`. Two independent votes are collected from Luna and OpenCode using current text and candidate labels. | Two model calls per batch of up to 20 disagreements; low local memory. | Completed majority and no-majority rows are skipped. Failed batches have no consensus row and are retried. A split vote is dropped during build; it does not request human review. |
|
|
30
|
+
| Build | `node scripts/system-one-cycle.js build --data-dir "<private-cycle-dir>"` | Observed text, Luna labels, consensus, behavior contradictions, and the existing frozen holdouts → consensus-adjusted tier/intent rows under `training/v1/`, raw Luna validity labels under `training/v1-validity/`, and a count-only report. | Usually seconds to minutes; memory grows with the dataset. | Safe to rerun; outputs are rebuilt from the current input files. Validation copies win over normalized train duplicates. |
|
|
31
|
+
| Train | `node scripts/system-one-cycle.js train --data-dir "<private-cycle-dir>" --version <version-id>` | The validity task reads raw Luna labels from `training/v1-validity/`; tier and intent read the consensus-adjusted dataset in `training/v1/`. Outputs CUA-S1 checkpoints, catalog-keyed validation scores, a trainer report with the catalog IDs, calibration, and `resource-guard.json` under `training/runs/<version-id>/`. | CPU training with 4 threads by default and a 6144 MB RSS ceiling. Duration depends on row count and epochs. | Completed stages are reused. If interrupted inside a stage, that stage starts again; earlier completed stages are kept. |
|
|
32
|
+
| Evaluate | `node scripts/system-one-cycle.js evaluate --data-dir "<private-cycle-dir>" --version <version-id>` | Candidate checkpoints, validation scores, and the existing frozen holdouts → score files, `curves.json`, and `trend.json` in a candidate version directory. The scorer follows the trainer catalog; curves uses the shared manifest validator and requires each score row's keys to match the stage options. It appends to the private history file. | CPU scoring at one thread plus the curve calculation; typically seconds to minutes after checkpoint loading. | If curves and trend were written before interruption, the next invocation reuses them instead of adding another history row. |
|
|
33
|
+
| Package | `node scripts/system-one-cycle.js package --data-dir "<private-cycle-dir>" --version <version-id>` | Trained candidate and evaluation artifacts → `training/versions/<version-id>/manifest.json` with three stage entries, relative artifact paths, thresholds, and weight SHA-256 values. The trainer catalog is the source of truth: intent includes `unclassified`, and catalog IDs, score keys, manifest options, and threshold keys agree. A `null` calibration threshold becomes `1` and the stage lists that option under `referenceOnly`, so its score stays available while it is excluded from automatic decisions. | A local file copy and hashes; usually seconds. | Safe to rerun. Repackaging an older candidate that omitted only intent `unclassified` metadata restores it as reference-only without retraining. Evaluation references carry forward. |
|
|
34
|
+
| Publish | `node scripts/system-one-cycle.js publish --data-dir "<private-cycle-dir>" --version <version-id>` | `training/versions/<version-id>/` → `models/cua-s1/<version-id>/` in the same private data directory. It prints the published path; it does not use Git. The installer reads this model directory. | A local file copy; usually seconds. | Published version ids are immutable. Use a new id for changed weights; an existing destination is not overwritten. |
|
|
35
|
+
|
|
36
|
+
¹ Durations are planning estimates, not measurements from this checkout. Model latency and dataset size vary.
|
|
37
|
+
|
|
38
|
+
F6 extends per-stage manifest metadata with `referenceOnly`; it does not
|
|
39
|
+
authorize an additional top-level `workflowPlan.systemOne` field. The routing
|
|
40
|
+
guide records the separate H1b output enrichment and the unresolved output
|
|
41
|
+
shape discrepancy.
|
|
42
|
+
|
|
43
|
+
## Run or resume the ordered path
|
|
44
|
+
|
|
45
|
+
Run the full cycle with one command:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
node scripts/system-one-cycle.js all --until publish --data-dir "<private-cycle-dir>" --since <YYYY-MM-DD> --version <version-id>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`all` runs each step in order and stops at `--until`. Completed collection, label, and judge steps with their outputs are skipped. If a label or judge batch fails, `all` stops at that step without marking it complete; rerun the same command to resume. `build` can be rerun. Training resumes between completed stages; evaluation reuses complete curve artifacts; packaging can be repeated. Publish only after packaging, then use the private data directory as the install source described in the [System One routing guide](system-one-routing.md).
|
|
52
|
+
|
|
53
|
+
For a synthetic integration check that does not read local session data or invoke model engines, prepare the earlier stage artifacts and completion entries under `.s1-work/`, then run:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
node scripts/system-one-cycle.js all --until build --data-dir ".s1-work/<synthetic-cycle-dir>"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Repository-local build input is accepted only under `.s1-work/` and only when each fixture text is marked synthetic.
|
|
60
|
+
|
|
61
|
+
## Label and privacy policy
|
|
62
|
+
|
|
63
|
+
- Luna sees only each current text. Agent-dispatch requests remain valid when their text states the requested work. A `null` tier is reserved for text that requires prior conversation context to understand.
|
|
64
|
+
- The self `contextDependent` flag does not affect labels. Self tier disagreements and primary-intent disagreements with Luna enter the two-judge vote.
|
|
65
|
+
- If a majority exists, build uses that tier; with no majority or no vote, it drops the disagreement. A `tier1-with-writes` behavior contradiction raises the final tier to `tier2`.
|
|
66
|
+
- Validity uses Luna's original text-only tier result: null means invalid and any tier means actionable, even if the adjudicated tier differs. Tier uses consensus; intent uses Luna on agreement or an intent-vote majority, and an unresolved intent is omitted from intent training only.
|
|
67
|
+
- Reports and failure records contain counts, ids, field names, or reason codes only. Current and previous prompt text stays in the private cycle files and is not printed by the cycle commands.
|
|
68
|
+
- The cycle trains only CUA-S1 validity, intent, and tier stages. It does not train ngram or Laya models, create a new owner-reviewed holdout, publish weights to Git, or activate a version. `publish` copies the package inside the private data directory; installation and active-pointer changes are handled by the opt-in runtime workflow.
|