Skip to content

New-repository scaffold, reusable SOTA-sources gate and bootstrap --configure-full-profile (unit A3) - #545

Merged
seathatflowsinourveins merged 20 commits into
mainfrom
claude/sota-defaults-a3-20260930
Sep 30, 2026
Merged

seathatflowsinourveins merged 20 commits into
mainfrom
claude/sota-defaults-a3-20260930

Conversation

@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator

Scope

  • What this PR changes: every future repository and host inherits the standing rule and the full SOTA profile without hand copying. A new-repository scaffold (adoption/scaffold/: AGENTS.md whose top-rule block is byte-identical to the Codex template's, CLAUDE.md = @AGENTS.md, .codex/config.toml from the project template, .agents/skills/README.md, a PR template with the required ### SOTA sources section, and a workflow calling the new reusable gate), the reusable workflow_call gate .github/workflows/sota-sources-gate.yml (byte-identical check logic to validate.yml's required sota-sources job, which stays as is), tools/adoption/scaffold_repo.py (idempotent; refuses to overwrite modified files; --force <path> per file; --dry-run plans even a missing target; pins the gate at the main sha it verifies), adoption/bootstrap-linux.sh --configure-full-profile (opt-in; runs the Claude profile installer, the settings template plus the WSL overlay, the global CLAUDE.md managed block through tools/adoption/managed_block.py, the skills installer, the Codex lane through tools/adoption/codex_home.py (fresh home: rendered config without the source host's trust state; existing home: only features.daemon_auto_start via codex features disable, backup first, never while codex runs), a managed PATH block, and the login-shell report; refuses to run from a checkout that is not at origin/main), and scripts/adoption_status.py --launcher-resolution (metadata: which claude a login shell resolves to and whether it is the ecosystem launcher; --login-shell --json says it is not run).
  • Base commit: 11227bfd (origin/main at rebase)
  • Lane: lane:foundation
  • Owned paths touched: adoption/scaffold/**, .github/workflows/sota-sources-gate.yml, tools/adoption/scaffold_repo.py, tools/adoption/managed_block.py, tools/adoption/codex_home.py, adoption/bootstrap-linux.sh, scripts/adoption_status.py, adoption/bootstrap.md, adoption/update.md, docs/activation.md, adoption/manifest.json (one scaffold key), tests/test_scaffold_repo.py, tests/test_sota_sources_gate.py, tests/test_bootstrap_full_profile.py, tests/test_managed_block.py, tests/test_adoption_status.py, tests/test_workflow_security_coverage.py (lists the new workflow); manifests/evidence.json (re-registration only, last commit).
  • Frozen surfaces (Gate A): none touched. The --configure-full-profile flag is not run on any host by this PR; the host apply (B1) happens once, from an origin/main worktree, after the Gate A owner's Amendment 4 merges and with their go.
  • Review history: an independent scout run (all acceptance commands green) and a GPT-6 gateway review (needs_changes: the full-profile bootstrap could not initialize a fresh Codex home; --force overwrote every differing scaffold file; launcher_resolution absent from --login-shell) were repaired in a second round, with failing-first tests for each.

SOTA sources

  • GitHub Docs, "Reusing workflows" (workflow_call; the called workflow resolves at the pinned ref at run time): https://docs.github.com/en/actions/how-tos/sharing-automations/reuse-workflows
  • Claude Code memory docs (CLAUDE.md scopes and @ imports): https://code.claude.com/docs/en/memory
  • Codex AGENTS.md guide and config reference (developers.openai.com/codex); openai/codex rust-v0.157.1 codex-rs/cli/src/main.rs L1902-1911 (codex features disable, the writer used for features.daemon_auto_start), behaviour measured with codex-cli 0.157.1 in scratch homes.
  • copier docs "configuring" (overwrite, skip_if_exists, pretend) as the scaffold-tool reference behaviour (v9.18.2 citation carried in the docstring).
  • GNU bash manual, "Bash Startup Files" (login-shell file order used by --login-shell).
  • Repository: tools/adoption/apply_codex_lane.py Plan.preconditions and atomic_write (reused unchanged); adoption/bootstrap.md step 4 trust-state warning; recipes/README.md codex row; docs/lanes.md hot-file protocol; docs/decisions/2026-09-28-top-rule-templates.md (the top-rule block the scaffold mirrors).
  • Cross-family review (GPT-6 through the OmniRoute gateway, read-only) of the first head: findings repaired; a re-review verdict line is posted as a PR comment when it completes.

Evidence-class table

Claim Evidence class Command / receipt
Unit tests for the scaffold, the gate identity, the managed block, the full-profile step order and the fresh/existing Codex home cases (failing-first against the pre-repair head) synthetic + local_integration python3 -m unittest tests.test_scaffold_repo tests.test_sota_sources_gate tests.test_adoption_status tests.test_adoption_docs_consistency tests.test_install_claude_profile tests.test_validate tests.test_windows_terminal_defaults tests.test_bootstrap_full_profile tests.test_managed_block tests.test_adoption_bootstrap tests.test_adoption_bootstrap_macos: 615 tests OK (42 environment skips)
The reusable gate has no offline zizmor findings local_integration zizmor --offline .github/workflows/sota-sources-gate.yml: no findings (1 suppressed info)
Scaffold is idempotent and refuses modified files local_integration dry run (writes nothing), real run (6 created), identical rerun (6 unchanged); tree digest unchanged
codex features disable daemon_auto_start writes the key in an empty and an existing scratch Codex home native (builder host, codex-cli 0.157.1) tools/adoption/codex_home.py against the real binary in scratch homes
Repository gates local_integration python3 scripts/validate.py passed; three registry tests OK; bash -n clean

Not tested: the fresh-host rehearsal and --apply against a real pinned ecosystem root (every real-home case stops at the lane's context-mode precondition on a host without the pinned install); shellcheck (not installed; CI checks only its version). No unchanged upstream tests apply.

Local commands run

$ HOME=<scratch> XDG_CONFIG_HOME=<scratch> XDG_STATE_HOME=<scratch> TMPDIR=/dev/shm/ntci-tmp python3 -m unittest <the 11 modules above>
Ran 615 tests   OK (skipped=42)
$ bash -n adoption/bootstrap-linux.sh
$ zizmor --offline .github/workflows/sota-sources-gate.yml
No findings to report. Good job! (1 suppressed)
$ python3 tools/adoption/scaffold_repo.py --target <scratch> --dry-run --main-sha <HEAD>
summary: 6 would create
$ python3 scripts/validate.py
{"status": "passed", ...}

Decision record

docs/decisions/2026-09-30-rule-text-every-layer.md (unit F1, follows) records why the host global file becomes managed; this PR's own choices (opt-in full profile, fail-closed origin/main check, per-file force) are documented in adoption/bootstrap.md and adoption/update.md.

Host evidence

No files under evidence/hosts/ changed.

Checklist

  • New/changed GitHub Actions are pinned to a full commit SHA with a version comment (the reusable gate reuses the pinned actions of validate.yml).
  • New/changed workflows declare top-level permissions: contents: read.
  • No secrets printed, logged or committed.
  • No paid hosting, subscription or billing surface.
  • Peer-owned untracked files and worktrees preserved.

🤖 Generated with Claude Code

@seathatflowsinourveins seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Sep 30, 2026
@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

Cross-family review of head d0d29b2 (GPT-6 through the OmniRoute gateway, read-only, diff against the merge-base 11227bf):

medium, adoption/bootstrap-linux.sh:211, The origin/main guard runs after `sudo apt-get update/install`; a rejected checkout can therefore modify the host despite the documented “before installing anything” guarantee (reproduced with stubbed package commands). Fix: check the revision before package installation; if Git is unavailable, refuse with prerequisite instructions.

medium, scripts/adoption_status.py:1408, `--login-shell` returns only `launcher_resolution: {"status":"not_run",...}`, whereas deliverable 5 requires the resolved path, launcher comparison and SHA-256 through that flag; callers using the requested interface never perform the check. Fix: provide the required result under `--login-shell` and update its contract/tests, or explicitly reconcile the separate-flag design with the brief.

medium, tools/adoption/codex_home.py:1, The diff adds this helper, `tools/adoption/managed_block.py`, `tests/test_bootstrap_full_profile.py` and `tests/test_managed_block.py` outside A3’s explicit allowed paths; the common brief prohibits those additions. Fix: move the implementation and coverage into authorized paths or obtain an explicit scope amendment.

reason: Validation, registry checks, shell syntax and workflow lint passed, but the reproduced mutation-before-refusal defect and brief compliance gaps remain.
verdict: needs_changes

Coordinator adjudication: (1) accepted as a defect: the origin/main guard of --configure-full-profile must run before any package installation (a rejected checkout must change nothing); a bounded repair with a stubbed-package test follows on this PR before merge. (2) design kept: --login-shell stays metadata-only (it never executes profile files) and --launcher-resolution runs the one bounded login shell; --login-shell --json now states launcher_resolution: {"status": "not_run", "flag": "--launcher-resolution"} so the contract is explicit; the unit brief's deliverable 5 is reconciled to this split here. (3) scope amendment granted by the coordinator: tools/adoption/codex_home.py, tools/adoption/managed_block.py and their tests are the implementation of deliverable 4 (the managed CLAUDE.md block and the fresh-home Codex lane) and are in scope for this unit.

@seathatflowsinourveins
seathatflowsinourveins force-pushed the claude/sota-defaults-a3-20260930 branch from d0d29b2 to 46e6d77 Compare September 30, 2026 16:15
@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

New head 46e6d776 (repair 3 for the cross-family finding on adoption/bootstrap-linux.sh:211: the origin/main guard ran after sudo apt-get). The history is rewritten: the repair is commit 768b2196 under the re-created hot-file commit, so this was a force-push and the repair commit needs review coverage before merge.

  • The --configure-full-profile guard now sits between the distro check and the apt block, the first point where nothing has written to the host. It first requires git and otherwise refuses with exit 1 and tells the operator to install git first; then it prints both commits and refuses when HEAD is not origin main.
  • Without the flag nothing changes: six old-vs-new probes (default path, --skip-system-packages, unknown profile, --skip without the flag, missing --profile, --configure-claude-user-profile alone) had identical exit codes, stdout, stderr and stub logs.
  • tests/test_bootstrap_full_profile.py stubs sudo and dpkg-query on PATH and logs their calls. A checkout ahead of origin, an unreachable origin, and a host without git each leave the log empty. The same stubs do log the package commands at origin main and on the default path, so the empty log comes from the ordering, not from a stub that never ran. A source-order test is added.
  • Failing first: against the previous head d0d29b2a the four new tests fail; the log held sudo apt-get update and the install line.
  • adoption/bootstrap.md documents the order (usage checks, platform checks, git, HEAD equal to ls-remote, then packages, prerequisites, pins, report and steps).

Checks: python3 -m unittest tests.test_bootstrap_full_profile tests.test_adoption_bootstrap tests.test_adoption_bootstrap_macos tests.test_adoption_docs_consistency (306 tests OK, 38 skips, none in the changed module), bash -n adoption/bootstrap-linux.sh, python3 scripts/validate.py (passed, 8515 hashed files, 176 receipts), the three registry tests, privacy scan 0 in the repair scope. shellcheck was not run (no binary on the host).

🤖 Generated with Claude Code

@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

GPT-6 delta re-review of 46e6d776 (since d0d29b2a, max effort through the gateway): the mutation-before-refusal defect is confirmed resolved; shell syntax and repository validation pass. Its two remaining items are the already adjudicated ones above: (2) the --login-shell / --launcher-resolution split (design kept; deliverable 5 reconciled) and (3) the scope amendment for codex_home.py, managed_block.py and their tests. Both are now recorded in the unit brief as amendments, so no further change is requested on this head. Merge after #539 and #546 land, with rebase and hot-file re-registration.

🤖 Generated with Claude Code

@seathatflowsinourveins
seathatflowsinourveins force-pushed the claude/sota-defaults-a3-20260930 branch from 46e6d77 to 5e2db23 Compare September 30, 2026 18:42
@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

Rebased onto origin/main 8fc8611 (after #546) with the hot-file protocol: main's manifests/evidence.json taken and this unit's files re-registered in the last commit; python3 scripts/validate.py passed; new head 5e2db230, tree otherwise unchanged.

🤖 Generated with Claude Code

seathatflowsinourveins pushed a commit that referenced this pull request Sep 30, 2026
…turn condition, evidence fold and sanitization, post-A3 step

- Base is origin/main@8fc86119 (rule surfaces byte-identical to 11227bf
  and e45328d).
- Clause (a) records the split from unit D4's refined record (9dd4ebe):
  gpt-6-astra at ultra when a complex workflow needs Astra to coordinate it,
  at max for a single consequential judgment, with the catalog semantics and
  the user's 2026-09-30 words as relayed.
- Measured size: AGENTS.md 2,392 -> 2,733 (+341), portable template
  2,051 -> 2,433 (+382), Codex block 829 -> 1,346 (+517); budget sum +723
  against 200, accepted by the coordinator because the clauses are the user's
  explicit directive. Composition: fold +139, split +49, tightening -12.
  Overturn condition: a rerun of the 2026-09-29 user-prefix A/B showing no
  rule-following gain for the added cost brings back the pointer fallback.
- The finalization record's evidence: 18 of 19 files folded unchanged; the
  sanitization section gives the scan and corrects the first handoff (19
  files, not 21; the one "/home/" string is the /home/example placeholder,
  kept byte-exact, also because the lane's convergence record pins its
  sha256). convergence.json is held back: a convergence_experiment record
  pinning F3 and D4 files that CI's validate_convergence --all-recorded
  would reject on this branch whether declared or not.
- Known residual links: seven targets, four from F3 and three from D4
  (the Sol-primary record and two codex-01592-qualification files).
- Post-A3 step: after #545 merges, whichever lands second copies the
  top-rule block into adoption/scaffold/AGENTS.md; not created here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Scout and others added 20 commits September 30, 2026 15:58
scripts/currency_due.py runs receipt_staleness.py --json, adoption_status.py --pinned-versions --json and saturation_ledger.py --report --json (plus runtime_skill_freshness.py with --network, off by default) as subprocesses with the workflows' arguments, and writes ${XDG_STATE_HOME:-~/.local/state}/native-agent-stack/currency-due.json atomically (mode 0600, os.replace) only while pins_behind, stale_receipts, due_layers or reopen_triggers is nonzero; otherwise it removes the file. due_layers follows the sweep recipe's monthly cadence (--sweep-cadence-days, default 30; 0 gives the raw count). Exit 2 on an internal error leaves the state directory as it was.

adoption/templates/systemd/stack-currency.{service,timer}: OnCalendar=daily, Persistent=true, RandomizedDelaySec=15m; oneshot with an explicit PATH so the version probes resolve under the user manager.

tests/test_currency_due.py: fake checks in a temporary checkout, a dry run of this checkout's real checks, and the units' settings.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… record

docs/token-practice.md item 4: ordinary startup still runs no audits, model trials or network calls; one read-only SessionStart line of at most 160 characters from the timer's due-file is allowed, fail-open.

adoption/lifecycle.md: render, verify and enable the stack-currency units (added after v2026.09.26.2).

docs/decisions/2026-09-30-session-currency-notice.md: context, alternatives (UserPromptSubmit hook, SessionStart running the checks, weekly CI only, raw saturation count, dated-manifest pins, monotonic timer), the decision with the hook contract and gate for unit F2, overturn conditions and sources. The hook script and any AGENTS.md:28 amendment ship in the frozen units F2 and F1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, and the notice command reproduces the run

Repair of the cross-family review of 3d1cfada (three findings, each checked against the source before the change).

scripts/currency_due.py
- A --network skill check that answered incompletely (an error in its report, a skill left unfetched or in a state this
  script does not know, an unfetched skills CLI release) is unknown, and unknown is not nothing due: the run keeps the
  earlier due-file (no removal, no new file), exit 0, and writes what it found when a count is nonzero, with the gap in
  the coverage detail (skills_complete, skills_fetch_errors, skills_unresolved, the first five error strings). An
  invalid-pin is a fetched answer and counts in pins_behind as its own detail kind. Sources:
  runtime_skill_freshness.py:77-81,100-103,115,134.
- The command that ends summary_line repeats the options that change what a run reports (--network, a non-default
  --sweep-cadence-days; the latter bounded to 36500), so running it reproduces the notice. The next-step line names
  adoption_status.py only for a pin mismatch, not for a skill pin.
- pinned_versions must be a list of objects with a string id; a wrong type is CheckError (exit 2), not a TypeError.

tests/test_currency_due.py: failing-first against the unchanged script (42 tests, 18 failures, 14 errors: the earlier
file deleted, TypeError at currency_due.py:199, the command without --network); incomplete-check, invalid-pin,
reproduced-command, ExecStart-flag, malformed-field and 2,277-case shape tests.

adoption/templates/systemd/stack-currency.service: header comment only; the directives are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… invalid pin, notice command options)

docs/decisions/2026-09-30-session-currency-notice.md
- Alternatives: counting an incomplete skill check as nothing due (rejected; the first draft did), exit 2 for an
  incomplete check (not adopted: no gh login is an expected condition), a details command that prints the saved file
  (not adopted: it must confirm what is still due).
- Decision item 2: invalid-pin counts in pins_behind; an incomplete check never removes the file and writes what it
  found; the notice command repeats --network and a non-default --sweep-cadence-days; a wrong-typed report field is exit 2.
- Evidence: the failing-first run against the unrepaired script (43 tests, 19 failures, 13 errors in 15 tests), the new
  tests, thirteen mutants, the re-measured dry run (scratch HOME, 1.59 s) and the systemd check. The first draft's
  seven-mutant claim is now scoped to that draft.
- Sources: the line ranges of runtime_skill_freshness.py and adoption_status.py that the repair reads.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… path (review of #539)

The details command that ends summary_line was cwd-relative, so a session that starts in another project (the
SessionStart hook is user scope) ran it in the wrong checkout or none, and an explicit --root was dropped. The
command now names the inspected checkout's own copy of the script by its path (~/... under the home directory,
else absolute), falls back to this script with --root for a checkout without the script, and gives way to the
cwd-relative form only when the absolute one would leave the counts no room in the 160-character line. Tests
reproduce the notice from an unrelated working directory as a separate process; the record documents the rule.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…o the due-file's own path (review round 3 of #539)

When the absolute command leaves the counts no room in the 160-character line, the line now ends with the path of
the due-file itself instead of a cwd-relative command. The document gains root (the inspected checkout) and
details_command (the full command), so a reader of the file runs the right checkout from anywhere. Tests run the
literal command or the pointed file's command as a process from an unrelated working directory for the primary,
--root and long-path cases, under fixtures outside and inside the home directory.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…`, and the line length is enforced (review round 4 of #539)

When the absolute command leaves the counts no room, the line now ends with `cat <due-file>`, a short command that
prints the document (root and details_command included), and with a constant pointer when a state-directory path
is too long even for that; the writer refuses to emit a line over 160 characters. Tests run the literal printed
command from an unrelated directory for the primary, --root and long-path cases, and cover a 140-character
state-directory basename and a long XDG_STATE_HOME.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…olic XDG pointer, over-long --state-dir refused (review round 5 of #539)

The constant last-resort text is gone. When the resolved due-file path is too long for `cat <path>` and the state
directory came from XDG_STATE_HOME, the line ends with `cat "$XDG_STATE_HOME"/native-agent-stack/currency-due.json`,
which the session that prints the line resolves with the variable the hook used; an explicit --state-dir too long
for any runnable pointer is refused as a usage error before the checks run. Tests run the literal printed command
from an unrelated directory in every case, including the symbolic pointer with the variable inherited.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…run that has no runnable form (review round 6 of #539)

The up-front --state-dir refusal is gone: a long explicit state directory beside a short checkout path keeps the
primary command, and a run with nothing due always removes an obsolete due-file. Only when something is due and
neither the command nor any pointer fits the 160-character line does the run fail with exit 2 and write nothing.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
…cOS runners' long TMPDIR changed the notice's form)

On macos-15 the runner's TMPDIR sits under /private/var/folders/..., long enough to push a fixture checkout's absolute
command out of the 160-character line, so five exact-text assertions saw the `cat <due-file>` form instead. The
fixture now picks the shorter of TMPDIR and /tmp; the tests that need a long path still build one on purpose. No
change to the script.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
.github/workflows/sota-sources-gate.yml is validate.yml's required
sota-sources job as a workflow_call workflow; from its if: line on the
job is byte-identical (tests/test_sota_sources_gate.py), and both copies
run the same inline script in node the way actions/github-script v9.0.0
does (src/async-function.ts). validate.yml is untouched.

adoption/scaffold/ holds AGENTS.md (the Codex template's top-rule block
byte for byte), CLAUDE.md (@AGENTS.md import), .agents/skills/README.md,
a pull-request template and the caller workflow. The caller is kept as
sota-sources.yml.template: zizmor 1.30.1 collects nested
.github/workflows directories, and a literal @<sha> is an unpinned-uses
High finding that would fail validate.yml's repository-wide zizmor gate.

tools/adoption/scaffold_repo.py writes the scaffold idempotently
(created/unchanged/skipped, exit 3 on refusal, --force, --dry-run),
fills <sha> from --main-sha or git ls-remote origin refs/heads/main,
refuses a local main commit without the gate, and renders .codex/
config.toml through render_config.render_one.

Registers the new workflow in tests/test_workflow_security_coverage.py.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…er-resolution

--configure-full-profile (opt-in; the default path is unchanged) runs,
each through the repository's own tool and each skippable with --skip:
install_claude_profile.py; apply_claude_settings.py with the rendered
template, plus the WSL overlay under WSL_DISTRO_NAME; the ~/.claude/
CLAUDE.md managed block; install_skills.py (the pinned skills CLI first,
through install_npm's sha256 check); render_config.py and
apply_codex_lane.py, applying exactly the --expect-*-sha256 hashes its
own dry run printed; a managed PATH block in ~/.profile; and the
login-shell read-back. It refuses (exit 1, both commits printed) unless
HEAD equals git ls-remote origin refs/heads/main, before installing
anything; a failed step is reported, the rest still run, exit 6.

tools/adoption/managed_block.py holds the two blocks: apply_codex_lane's
block merge with the markers as parameters (the end marker must start
after the begin marker), apply_claude_settings' backup and atomic write,
rtk's @RTK.md kept outside the block, an unmanaged copy of the example
replaced only when current and otherwise refused.

scripts/adoption_status.py --launcher-resolution is a separate opt-in,
so --login-shell stays a metadata-only check: one bounded bash -l -c
from a fixed environment reports where command -v claude resolves
(shown under $ECO_ROOT, $HOME or a system directory, else withheld),
whether it is $ECO_ROOT/bin/claude, and that launcher's sha256; claude
never runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
adoption/bootstrap.md step 2 documents --configure-full-profile (step
table, --host, --skip, the origin/main refusal, exit 6, the managed
blocks) and step 4 points a new repository's .codex/config.toml at the
scaffold; a "New repositories" section documents scaffold_repo.py and
the reusable sota-sources gate. adoption/update.md gains "Refresh the
user profile from main" and "Start a new repository"; docs/activation.md
names the scaffold for new repositories. adoption/manifest.json sources
gains "scaffold" (sources is a name-to-file map, so no schema change;
tests/test_adoption_contract.py resolves it). Units that use the new
paths say "added after v2026.09.26.2".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The codex-lane step printed the staging directory's rendered templates
as the place to review them, but the EXIT trap removes that directory;
it now says to render with render_config.py --host <name> --out <dir>.
The scaffold's caller workflow and bootstrap.md now say a selected-
actions policy must allow step-security/harden-runner as well as the
reusable workflow (actions/github-script is GitHub-owned).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ns a missing target

--force PATH (repeatable, the path as the table prints it) overwrites only the named
scaffold files; every other file that differs is still skipped. A bare --force is an
argparse usage error and a path outside the scaffold is refused before any write, so the
update.md recipe that moves a workflow to a newer gate can no longer replace a filled-in
AGENTS.md, CLAUDE.md or .codex/config.toml. Copier's all-files `overwrite` plus
`skip_if_exists` runs the other way round (copier v9.18.2 docs/configuring.md), which the
docstring now says instead of calling --force copier's overwrite.

--dry-run also plans a --target that does not exist yet (it writes nothing); a real run
still refuses one, and a file or dangling symlink in its place is refused either way. The
docs state that the pinned reusable workflow resolves only once that commit on GitHub
carries the gate file. Test fixtures use HOME=/opt/example, so no added line matches the
/home/<name>/ scan.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
--login-shell stays metadata-only (it never opens or runs a login file), and resolving
`command -v claude` needs one bounded login shell, so that check stays behind its own
--launcher-resolution flag. A consumer of `--login-shell --json` now reads why the result
is missing instead of an absent key: launcher_resolution is
{"status": "not_run", "flag": "--launcher-resolution"}. A report without --login-shell is
unchanged. bootstrap.md step 6 documents both flags; the tests pin the not_run object in
the JSON and text forms and for an invalid manifest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… a fresh Codex home

apply_codex_lane.py refuses a Codex home without config.toml, without a derivable HOST_PATH
and without features.daemon_auto_start = false (Plan.preconditions), so the step could never
succeed on a fresh host: it discarded the rendered user config and called the lane anyway.

tools/adoption/codex_home.py now runs first. A home without config.toml gets the rendered
user config (render_config.py's codex.config.toml for --host) minus the source host's trust
state: every [projects.*] trust grant and [hooks.state.*] hook approval, the two sections
bootstrap.md step 4 says were never reviewed on the target, with the comments directly above
them. The cut is checked semantically (the parse must equal the render minus exactly those
tables, daemon_auto_start the boolean false, shell_environment_policy PATH under this run's
ecosystem root) and written create-only (temp file + os.link, apply_codex_lane.atomic_write),
0600 in a 0700 home. An existing config.toml is never replaced; when it lacks the feature it
is backed up (apply_claude_settings.write_backup) and set through Codex's own writer,
`codex features disable daemon_auto_start` (codex-rs/cli/src/main.rs L1902-1911 at
rust-v0.157.1, ConfigEditsBuilder; recipes/README.md codex row), then read back.

The step passes the host file's HOST_PATH as --host-path and $bin_dir/codex as --codex to
both the dry run and the apply, with $bin_dir first on PATH, since the npm-installed codex
needs node and the ecosystem bin directory is not yet on a fresh shell's PATH.

Tests run the step function verbatim with the real render_config.py, codex_home.py and
apply_codex_lane.py dry run (stub codex at the pin): its own [ok] lines for config.toml,
HOST_PATH and features.daemon_auto_start for (a) a fresh HOME, (b) a home holding the whole
render (left byte for byte) and (c) a config without the feature; on 4e5652c4's step (a)
prints [fail] for all three. Measured with the real codex-cli 0.157.1 in scratch homes:
`features disable` creates a 0600 config.toml in an empty home and keeps comments and other
keys in an existing one; a rerun leaves identical bytes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… any package command

The origin/main guard ran after `sudo apt-get update/install`, so a rejected
checkout could still change the host although bootstrap.md and --help promised
a refusal before installing anything (cross-family review of PR 545, reproduced
with stubbed package commands).

The guard now sits right after the platform checks, where nothing has written
to the host yet, and before the system-package step. A host without git is
refused there (exit 1) with the instruction to install it first, instead of
being given packages before the check. Without the flag nothing changes: the
package step still runs first and git is never asked.

tests/test_bootstrap_full_profile.py puts stubs for sudo and dpkg-query first on
PATH (sudo appends its command line to a log): a checkout ahead of origin main,
an unreachable origin and a host without git are each refused with an empty
log, and the same stubs do log the package commands at origin main and on the
default path, so the empty log is the ordering and not a stub that never ran.
A source-order test pins the git prerequisite and the single ls-remote before
the apt step and the first mkdir. Against the previous head the three
behavioural tests and the order test fail; the log held `sudo apt-get update`
and the install line.

bootstrap.md documents the order of the flag's checks.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… in the release note

apply_codex_lane.py --apply refuses while a process named codex runs (Plan.preconditions,
codex_processes), since a running Codex writes the same config.toml. The feature write that
precedes it now follows the same rule (--codex-process-name, default codex): with a codex
process running it refuses before the backup and before `codex features disable`, and the
step stops before the lane. The docstring and bootstrap.md say the backup is that key's only
undo (apply_codex_lane.py --rollback does not cover it). The real-home tests stub pgrep in
the bin directory the step puts first on PATH, so the host's own Codex sessions do not decide
them; the pre-guard helper wrote under a reported running codex (exit 0, one codex call).

bootstrap.md lists tools/adoption/codex_home.py among the step-2 additions after
v2026.09.26.2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@seathatflowsinourveins
seathatflowsinourveins force-pushed the claude/sota-defaults-a3-20260930 branch from 5e2db23 to 3805a59 Compare September 30, 2026 20:01
seathatflowsinourveins pushed a commit that referenced this pull request Sep 30, 2026
…turn condition, evidence fold and sanitization, post-A3 step

- Base is origin/main@8fc86119 (rule surfaces byte-identical to 11227bf
  and e45328d).
- Clause (a) records the split from unit D4's refined record (9dd4ebe):
  gpt-6-astra at ultra when a complex workflow needs Astra to coordinate it,
  at max for a single consequential judgment, with the catalog semantics and
  the user's 2026-09-30 words as relayed.
- Measured size: AGENTS.md 2,392 -> 2,733 (+341), portable template
  2,051 -> 2,433 (+382), Codex block 829 -> 1,346 (+517); budget sum +723
  against 200, accepted by the coordinator because the clauses are the user's
  explicit directive. Composition: fold +139, split +49, tightening -12.
  Overturn condition: a rerun of the 2026-09-29 user-prefix A/B showing no
  rule-following gain for the added cost brings back the pointer fallback.
- The finalization record's evidence: 18 of 19 files folded unchanged; the
  sanitization section gives the scan and corrects the first handoff (19
  files, not 21; the one "/home/" string is the /home/example placeholder,
  kept byte-exact, also because the lane's convergence record pins its
  sha256). convergence.json is held back: a convergence_experiment record
  pinning F3 and D4 files that CI's validate_convergence --all-recorded
  would reject on this branch whether declared or not.
- Known residual links: seven targets, four from F3 and three from D4
  (the Sol-primary record and two codex-01592-qualification files).
- Post-A3 step: after #545 merges, whichever lands second copies the
  top-rule block into adoption/scaffold/AGENTS.md; not created here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

Stacked merge train after #542 merged (main 1f2cdce): this branch is rebased onto #539 86fe8c3 with the hot-file protocol applied against that head (its evidence.json taken, this unit's files re-registered in the last commit; python3 scripts/validate.py passed). New head 3805a598; the PR's own delta is the commits above that base, the earlier commits belong to the PR(s) before it in the train and vanish from this diff as they merge. Merge order: #539 → #545 → #540 → #547 → #557 → #553 (after its repair) → #549 → #541; each with --match-head-commit once its eight required checks pass.

🤖 Generated with Claude Code

seathatflowsinourveins pushed a commit that referenced this pull request Sep 30, 2026
…turn condition, evidence fold and sanitization, post-A3 step

- Base is origin/main@8fc86119 (rule surfaces byte-identical to 11227bf
  and e45328d).
- Clause (a) records the split from unit D4's refined record (9dd4ebe):
  gpt-6-astra at ultra when a complex workflow needs Astra to coordinate it,
  at max for a single consequential judgment, with the catalog semantics and
  the user's 2026-09-30 words as relayed.
- Measured size: AGENTS.md 2,392 -> 2,733 (+341), portable template
  2,051 -> 2,433 (+382), Codex block 829 -> 1,346 (+517); budget sum +723
  against 200, accepted by the coordinator because the clauses are the user's
  explicit directive. Composition: fold +139, split +49, tightening -12.
  Overturn condition: a rerun of the 2026-09-29 user-prefix A/B showing no
  rule-following gain for the added cost brings back the pointer fallback.
- The finalization record's evidence: 18 of 19 files folded unchanged; the
  sanitization section gives the scan and corrects the first handoff (19
  files, not 21; the one "/home/" string is the /home/example placeholder,
  kept byte-exact, also because the lane's convergence record pins its
  sha256). convergence.json is held back: a convergence_experiment record
  pinning F3 and D4 files that CI's validate_convergence --all-recorded
  would reject on this branch whether declared or not.
- Known residual links: seven targets, four from F3 and three from D4
  (the Sol-primary record and two codex-01592-qualification files).
- Post-A3 step: after #545 merges, whichever lands second copies the
  top-rule block into adoption/scaffold/AGENTS.md; not created here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@seathatflowsinourveins
seathatflowsinourveins merged commit af23619 into main Sep 30, 2026
25 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the claude/sota-defaults-a3-20260930 branch September 30, 2026 22:10
seathatflowsinourveins pushed a commit that referenced this pull request Sep 30, 2026
…turn condition, evidence fold and sanitization, post-A3 step

- Base is origin/main@8fc86119 (rule surfaces byte-identical to 11227bf
  and e45328d).
- Clause (a) records the split from unit D4's refined record (9dd4ebe):
  gpt-6-astra at ultra when a complex workflow needs Astra to coordinate it,
  at max for a single consequential judgment, with the catalog semantics and
  the user's 2026-09-30 words as relayed.
- Measured size: AGENTS.md 2,392 -> 2,733 (+341), portable template
  2,051 -> 2,433 (+382), Codex block 829 -> 1,346 (+517); budget sum +723
  against 200, accepted by the coordinator because the clauses are the user's
  explicit directive. Composition: fold +139, split +49, tightening -12.
  Overturn condition: a rerun of the 2026-09-29 user-prefix A/B showing no
  rule-following gain for the added cost brings back the pointer fallback.
- The finalization record's evidence: 18 of 19 files folded unchanged; the
  sanitization section gives the scan and corrects the first handoff (19
  files, not 21; the one "/home/" string is the /home/example placeholder,
  kept byte-exact, also because the lane's convergence record pins its
  sha256). convergence.json is held back: a convergence_experiment record
  pinning F3 and D4 files that CI's validate_convergence --all-recorded
  would reject on this branch whether declared or not.
- Known residual links: seven targets, four from F3 and three from D4
  (the Sol-primary record and two codex-01592-qualification files).
- Post-A3 step: after #545 merges, whichever lands second copies the
  top-rule block into adoption/scaffold/AGENTS.md; not created here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
seathatflowsinourveins pushed a commit that referenced this pull request Oct 1, 2026
…turn condition, evidence fold and sanitization, post-A3 step

- Base is origin/main@8fc86119 (rule surfaces byte-identical to 11227bf
  and e45328d).
- Clause (a) records the split from unit D4's refined record (9dd4ebe):
  gpt-6-astra at ultra when a complex workflow needs Astra to coordinate it,
  at max for a single consequential judgment, with the catalog semantics and
  the user's 2026-09-30 words as relayed.
- Measured size: AGENTS.md 2,392 -> 2,733 (+341), portable template
  2,051 -> 2,433 (+382), Codex block 829 -> 1,346 (+517); budget sum +723
  against 200, accepted by the coordinator because the clauses are the user's
  explicit directive. Composition: fold +139, split +49, tightening -12.
  Overturn condition: a rerun of the 2026-09-29 user-prefix A/B showing no
  rule-following gain for the added cost brings back the pointer fallback.
- The finalization record's evidence: 18 of 19 files folded unchanged; the
  sanitization section gives the scan and corrects the first handoff (19
  files, not 21; the one "/home/" string is the /home/example placeholder,
  kept byte-exact, also because the lane's convergence record pins its
  sha256). convergence.json is held back: a convergence_experiment record
  pinning F3 and D4 files that CI's validate_convergence --all-recorded
  would reject on this branch whether declared or not.
- Known residual links: seven targets, four from F3 and three from D4
  (the Sol-primary record and two codex-01592-qualification files).
- Post-A3 step: after #545 merges, whichever lands second copies the
  top-rule block into adoption/scaffold/AGENTS.md; not created here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
seathatflowsinourveins added a commit that referenced this pull request Oct 1, 2026
…portable Claude template and the Codex AGENTS template, anti-pattern rows and the folded finalization record (unit F1) (#557)

* Codex user template: standing rule clauses, skills, models, routing and token lanes

Adds the 2026-09-30 standing clauses to the top-rule block of
adoption/templates/codex.AGENTS.template.md: skill discovery (search-first,
find-skills, skill-creator; implicit invocation from a skill's description and
explicit $skill-name, per openai/codex rust-v0.159.2
codex-rs/ext/skills/src/catalog_prompt.rs:8), upstream A/B and E2E harnesses,
the completeness critic feeding the next landscape sweep, the north-star
direction, GPT-6 model routing through the OmniRoute gateway (codex -p
omniroute), dated decision records, the startup rule, and a token-lanes line
naming each MCP server the Codex config template registers.

The RTK upstream text and the exceptions block stay byte-identical, so the F4
block in every Codex role is unchanged. The top-rule pin is re-derived with
template_segments(): 455 words, 7b41478f...; a new test requires a lane for
every server in codex.config.template.toml and the standing phrases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Portable Claude template: superset of the user-level rules plus the standing clauses

examples/claude-native/CLAUDE.md becomes the single managed source of the
operator's user-level file. Step 1 of the top rule takes the user-level
paragraph (research and record, reference implementations, popularity guides
discovery) and the skill-discovery clause (search-first, find-skills with
`npx skills find`, skill-creator); the core rule takes the rules only the
user-level file held (short plan, pins and reasons, relevant layers, reviewer
agreement is not proof), the north-star direction, the upstream A/B and E2E
harnesses and the completeness critic; token practice takes the startup rule;
the worker section takes GPT-6 routing through the OmniRoute gateway. Every
worker, model, Ultracode and agent-team rule is kept word for word.

PortableTopRuleTests gains a phrase check for the clauses and the user-level
rules (it failed on the unedited template with 29 phrases missing, 8 of them
rules the user-level file held) and re-baselines the word budget to 1,656.
@RTK.md stays the host's own import (recipes/claude-native-profile.md:134).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Decision record: standing rule text in every instruction layer; divergence log row

docs/decisions/2026-09-30-rule-text-every-layer.md supersedes the 2026-09-28
top-rule record's "the operator's user-level file is the operator's own" at
the user's 2026-09-30 request: the portable template becomes the single
managed source of that file. It maps the six clauses to each surface, records
the alternatives (a UserPromptSubmit carrier, per the hooks reference, adds
its context beside every prompt; leaving the file unmanaged produced the
divergence; per-agent copies are unit F2's; pointers measured as the
fallback), the o200k sizes from token_manifest.count_files, the overrun of
the unit's 200-token budget with its floor and fallback, and the overturn
conditions.

docs/harness-defaults.md logs the host/template divergence, naming only the
check seen failing on it (the new PortableTopRuleTests phrase check).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* AGENTS.md: the six standing clauses on the four named lines; re-register hashes

Hot files last (docs/lanes.md hot-file protocol). AGENTS.md takes the
standing clauses by amending, not appending, the lines the brief names:
- line 3, the top rule: skill discovery (search-first, find-skills with
  `npx skills find`, skill-creator; manifest skills model-invocable in both
  clients) replaces "with the installed research and skill-discovery
  skills", and A/B and E2E on upstream harnesses, never a self-written runner;
- line 7: the north-star R&D direction; each unit names its action;
- line 18: the completeness critic feeding the layer's next landscape sweep;
- line 28: GPT-6 through the OmniRoute gateway (astra max, sol medium, 6.1
  sol pending qualification), Codex CLI as the second native client, and "no
  audits, trials or network at startup" with the daily currency timer's
  due-file line (record lands with unit A2) replacing "Do not rerun the full
  audit or model trials at startup".

manifests/evidence.json re-registers the six changed files already listed,
with scripts/host_receipts.py register_file; component_matrix and
new_host_grand_list --check pass unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rule-text record and log row: nine user-level rules, not eight

The phrase check's committed form (with "from the selected source revision",
the user-level file's own wording) finds 29 phrases missing from the unedited
template, 9 of them held only by the user-level file; the record, its Checks
section and the anti-pattern row said 8 (from a run before that phrase
changed). The record also states the two non-verbatim worker lines exactly:
"Quality comes first" is one line with an identical word sequence, and the
sizing line keeps every user-level word and adds "to its task".
Re-registers docs/harness-defaults.md (hot file, last commit).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Codex user template: Sol-primary routing and skill matching folded into the standing lines

Folds the two lines the main checkout's uncommitted changes added inside the
top-rule block (pre-existing uncommitted changes observed in the main
checkout; original author not established), merged with this unit's lines
instead of carried beside them:
- the Models line now states the Sol-primary routing of
  docs/decisions/2026-09-30-sol-primary-quality-defaults.md (gpt-6.1-sol at
  ultra for coordination and at max for workers, gpt-6-astra at max after the
  recorded escalation triggers), replacing the superseded astra/sol-medium
  wording and "gpt-6.1-sol waits for qualification"; the OmniRoute gateway
  clause stays;
- the skills line takes the skill-matching rule (read each selected SKILL.md,
  follow its native workflow, load references only when needed) next to
  implicit and $skill-name invocation.

The phrase test failed first on the unedited block with five phrases missing
(exit 1). Pin re-derived with template_segments(): 496 words, 2d3107a2...;
the RTK text and exceptions block are unchanged (test_codex_agents 18 OK).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Portable Claude template: Sol-primary Codex routing; skill matching kept inside "Keep context small"

- The GPT-6 bullet follows docs/decisions/2026-09-30-sol-primary-quality-defaults.md:
  Codex CLI is the second native client, gpt-6.1-sol at ultra coordinates and
  at max runs workers, gpt-6-astra at max takes the recorded escalation
  triggers; cross-family research, review and sweep votes run through the
  OmniRoute gateway. It replaces the superseded astra/sol-medium wording and
  "gpt-6.1-sol pending qualification".
- Folds the skill-matching wording of the main checkout's uncommitted change
  (pre-existing uncommitted changes observed in the main checkout; original
  author not established) into the token-practice bullet. The change as
  observed replaced "Keep context small", a rule the operator's user-level
  file holds; the merged bullet keeps both.

The phrase check failed first on the unedited template with four phrases
missing (exit 1); it now also requires "Keep context small", which the
observed version lacks (mutant check: 31 phrases missing there, that one
included). Word baseline 1,656 -> 1,680.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* AGENTS.md: fold the skill-lifecycle and Codex-defaults bullets; one model-routing sentence set

Folds the two bullets of the main checkout's uncommitted AGENTS.md change
(pre-existing uncommitted changes observed in the main checkout; original
author not established). Neither was on origin/main at 11227bf (the file's
blob there equals e45328d's) nor on any other unit branch:
- the token-practice bullet on matching skill descriptions, reading each
  selected SKILL.md and adoption/skills/lifecycle.md (which unit F3 adds);
- the Codex defaults bullet (gpt-6.1-sol / ultra coordinator, gpt-6.1-sol /
  max primary workers, Astra/max on the recorded triggers, the Sol-primary
  record that unit D4 adds), merged with this unit's clause: Codex CLI is the
  second native client, and cross-family research, review and sweep votes run
  through the OmniRoute gateway. The startup bullet keeps only the startup
  clause, so the model routing is stated once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Convergence guide and token handbook: Ultracode decoupled from effort; Sol worker command

Folds the true delta of two files from the main checkout's uncommitted
changes (pre-existing uncommitted changes observed in the main checkout;
original author not established), taken as a three-way merge onto
origin/main so main's own later edits stay:
- docs/convergence-architecture.md: Claude Code 2.1.284 decoupled Ultracode
  from effort; xhigh (saved fallback) and max (launcher) are separate choices,
  not measured quality gains. Source: the tagged anthropics/claude-code
  v2.1.285 CHANGELOG.md line 206 ("it no longer forces xhigh effort and stays
  on at any effort level", under 2.1.284), read 2026-09-30.
- docs/token-session-handbook.md: the Codex worker command names
  gpt-6.1-sol, matching the stack-worker profile and recipe that unit D4
  changes in the same batch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Anti-pattern log: ten folded rows and six Codex runtime lane rows

Ten rows are folded byte-for-byte from the main checkout's uncommitted
docs/harness-defaults.md (pre-existing uncommitted changes observed in the
main checkout; original author not established), at the top of the table
where that change placed them. Only the true delta against origin/main is
taken: main's newer login-shell row and the four terminal-lane rows of #532
stay; the "Sol-primary quality defaults" paragraph belongs to unit D4.

Six rows were requested by the Codex runtime lane (relays
codex-runtime-anti-pattern-owner-handoff-20260930 and
codex-f1-source-correction-handoff-20260930), one mistake / correction /
check each, citing that lane's published sources at full SHAs: PR #535 head
00aa6c2 (the cited files are byte-identical to the earlier head 6a7b164,
which no remote ref holds any more), SDK branch head 404b821 and OpenHands
software-agent-sdk dcf401af build.py lines 581 and 925. The GitHub Actions
job conclusions the rows cite were re-read through the REST jobs API on
2026-09-30 (run 36695388851: jobs 109821999811 and 109821999568 cancelled,
all steps success; run 36690153586: job 109805172026 validate-macos failure).

UpstreamVerificationSectionTests: 3 OK.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Fold the 2026-09-30 native practice finalization record, attributed

docs/decisions/2026-09-30-sota-native-finalization.md is folded unchanged
from a read-only snapshot of the main checkout (pre-existing uncommitted
changes observed in the main checkout; original author not established;
tracked diff sha256 314bd1b260da0939). One attribution paragraph after the
title states that provenance and which linked evidence is not published with
it: evidence/artifacts/sota-finalization-20260930/ has no assigned owner, the
native-skill-finalization artifacts land with unit F3 and the
codex-01592-qualification artifacts wait on unit D4. The body is
byte-identical to the snapshot (12,956 bytes); the privacy scan found no host
path, home directory or host user name in it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rule-text record: rebuilt base, Sol-primary clause (a), folded items, lane rows and guards, re-measured sizes

- Base moves to origin/main@11227bfd (the three surfaces are byte-identical
  to e45328d's).
- Clause (a) follows docs/decisions/2026-09-30-sol-primary-quality-defaults.md
  (unit D4); the brief's first wording and its 04:35Z "Astra at ultra for
  complex workflow tasks" relay are recorded as superseded by that later,
  more specific user selection.
- Lists every item folded from the main checkout with the provenance
  sentence, the snapshot hashes, the three-way-merge method and what was not
  folded (recipes/README.md is on D4's branch; the finalization evidence
  directory has no owner).
- Records the six Codex runtime lane rows (relays and what was verified) and
  the three relayed guards: #543 not described as published without a native
  gh lookup that exits 0, the 07:34Z/06:46Z actor unknown, a historical OSV
  pass not current after #546.
- Sizes re-measured with tools/token-report/token_manifest.py count_files
  (gpt-tokenizer 4.0.0): AGENTS.md +323, portable template +363 (sum +686
  against the 200 budget: +139 folded text, +547 clauses and user-level
  rules), Codex template +507.
- Limitations updated: clause (c) against F3's settings, cross-unit
  references, unpublished evidence, older Codex pins, A3's scaffold copy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Codex routing on all three surfaces: Astra/Ultra coordinates a complex workflow, Astra/Max takes a single consequential judgment

Follows the coordinator's decision and unit D4's refined Sol-primary record
(claude/sota-defaults-d4-codex-0159-20260930 at 9dd4ebe), which splits the
escalation by the Codex catalog semantics it documents (Ultra: proactive
delegation with the model's xhigh reasoning; Max: the highest reasoning
effort) and quotes the user's 2026-09-30 selection ("astra ultra when tasks
needed suitable for complex workflow"):
- gpt-6-astra at ultra when a complex workflow needs Astra to coordinate it;
- gpt-6-astra at max for a single consequential judgment (conflicting primary
  evidence, consequential architecture, complex changes across systems, or a
  failure unresolved after one bounded Sol repair).

AGENTS.md's folded Codex bullet, the portable template's Codex bullet and the
Codex block's Models line now state the split. Both phrase checks failed
first with four phrases missing each (exit 1). Codex pin re-derived with
template_segments(): 515 words, d1195686...; portable word baseline 1,697.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* One-pass tightening of the added rule text (no rule removed)

The coordinator accepted the growth over the 200-token budget and asked for
one pass that cuts words carrying no rule, limited to text this branch adds:
- AGENTS.md Codex bullet: the Astra split as two clauses and the contract
  pointer in parentheses (2,742 -> 2,733 o200k tokens);
- portable template: "(registry: `npx skills find`)" -> "(`npx skills find`)"
  (2,436 -> 2,433);
- Codex block: implicit/explicit invocation in one clause, "use the
  `search-first` skill" -> "use `search-first`", the registry label, and
  "the paired benchmark of Claude's `skill-creator` plugin" -> "Claude's
  `skill-creator` paired benchmark" (1,360 -> 1,346).

Every phrase of both phrase checks still holds. Codex pin re-derived with
template_segments(): 507 words, 97bbeb8c...; portable word baseline 1,696.
Counts: tools/token-report/token_manifest.py count_files, gpt-tokenizer 4.0.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Fold the finalization record's evidence: 18 of the 19 files of evidence/artifacts/sota-finalization-20260930/, unchanged

Allowed-path amendment by the coordinator. The files are copied
byte-for-byte from the read-only snapshot r2 of the main checkout
(pre-existing uncommitted changes observed in the main checkout; original
author not established); sha256sum -c against the snapshot passes.

Sanitization: nothing needed stripping and no file was changed.
- validate.py --scan-file over all 19 snapshot files: {"scanned_files": 19,
  "status": "passed"} (UUID, personal home path, Windows user path and token
  patterns).
- A wider scan found no personal home path, host user name, /tmp/claude-*
  path, session UUID, e-mail, IP address or token. The one "/home/" string
  earlier reported as a home path is the literal placeholder "/home/example"
  inside claude-review.json's prose, which validate.py's pattern exempts.
  Replacing it with <home> would alter the retained review without removing
  any host data, and would break the sha256 pin that the lane's convergence
  record holds for that file, so the file stays byte-exact. The
  config-key hits in convergence.json are recorded codex exec command lines
  already redacted to <private-path>; the three "~/." strings are generic
  install locations.

Held back: convergence.json. It is a kind "convergence_experiment" record
whose frozen inputs and observations pin five files of
native-skill-finalization-20260930 (unit F3; all five pins match F3's branch)
and three of codex-01592-qualification-20260930 (on no branch yet) by path and
sha256. validate_convergence.py --all-recorded, which CI runs, fails
discovery for an undeclared hash-listed record and fails validation for a
declared one with missing files, so it can be folded, declared in
convergence_records, only after F3 lands and D4 publishes those three files
unchanged at those paths.

The folded record's attribution paragraph says so; its links and the four
folded log rows into this directory resolve. Hash registration follows in
the last commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rule-text record: Ultra/Max split, accepted budget miss with its overturn condition, evidence fold and sanitization, post-A3 step

- Base is origin/main@8fc86119 (rule surfaces byte-identical to 11227bf
  and e45328d).
- Clause (a) records the split from unit D4's refined record (9dd4ebe):
  gpt-6-astra at ultra when a complex workflow needs Astra to coordinate it,
  at max for a single consequential judgment, with the catalog semantics and
  the user's 2026-09-30 words as relayed.
- Measured size: AGENTS.md 2,392 -> 2,733 (+341), portable template
  2,051 -> 2,433 (+382), Codex block 829 -> 1,346 (+517); budget sum +723
  against 200, accepted by the coordinator because the clauses are the user's
  explicit directive. Composition: fold +139, split +49, tightening -12.
  Overturn condition: a rerun of the 2026-09-29 user-prefix A/B showing no
  rule-following gain for the added cost brings back the pointer fallback.
- The finalization record's evidence: 18 of 19 files folded unchanged; the
  sanitization section gives the scan and corrects the first handoff (19
  files, not 21; the one "/home/" string is the /home/example placeholder,
  kept byte-exact, also because the lane's convergence record pins its
  sha256). convergence.json is held back: a convergence_experiment record
  pinning F3 and D4 files that CI's validate_convergence --all-recorded
  would reject on this branch whether declared or not.
- Known residual links: seven targets, four from F3 and three from D4
  (the Sol-primary record and two codex-01592-qualification files).
- Post-A3 step: after #545 merges, whichever lands second copies the
  top-rule block into adoption/scaffold/AGENTS.md; not created here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rule text: conditional skill discovery on the three surfaces; the growth waiver and the provenance wording cited to the brief's amendments

find-skills (npx skills find) runs only when no listed skill fits the task, so a measured child with a fitting
listed skill makes no extra Skill or Bash call (the Gate A owner's note); search-first stays before custom code
or a tool choice. The record cites the coordinator's dated brief amendments for the accepted +723 o200k growth and
for the neutral fold provenance (a process census of file writes does not establish authorship; the Codex runtime
lane asked for the wording). Codex top-rule pin re-derived: 514 words, fecf92dc...; portable baseline 1,703 words.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Standing rule text: one wording on the three surfaces, coordinator-scoped (Gate A owner's review of #557)

Applies DECISION 2 of the Gate A owner's ACCEPT-WITH-CHANGES review on
AGENTS.md, examples/claude-native/CLAUDE.md and the Codex block, with the same
sentences on all three (the Codex block names a bounded worker where the
Claude surfaces name a delegated child in the skill sentence):
(a) "A coordinator, not a delegated child, invokes `search-first` before
    custom code or a tool choice; when no listed skill fits the task, it
    discovers one with `find-skills` and verifies or A/B-tests it with
    `skill-creator`."
(b) Sol/Astra routing kept for unpinned work; added: where a launch pins
    the model and effort (`-m`, `-c model_reasoning_effort`), children inherit
    that pin and a spawn call names neither; a coordinator, never a
    delegated child, starts a cross-family lane.
(c) Dropped "every manifest skill stays listed for model invocation in both
    clients" (false at this head: find-skills, grill-me and
    improve-codebase-architecture are user-invocable-only, find-skills has
    codex_enabled false) and the bare `npx skills find`.
(d) The north-star, completeness-critic, trigger/acceptance and dated
    decision-record imperatives are a coordinator's.
(f) AGENTS.md's lifecycle pointer says "(lands with unit F3)"; the
    currency-notice (A2, in the stack below) and Sol-primary (D4, on main)
    citations stay.
The harness and startup sentences take one wording too.

Post-A3 step done: adoption/scaffold/AGENTS.md carries the final top-rule
block byte for byte (tests.test_scaffold_repo passes).

Tests: StandingRuleSurfacesTests (new) asserts the shared sentences on all
three surfaces and the dropped clause on none; it failed first with 21
failing subtests (exit 1). Both phrase lists failed first (exit 1). Codex pin
re-derived with template_segments(): 538 words by Python str.split(),
9565217f...; portable baseline 1,750; comments now name str.split(), not
wc -w (review point (e)).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Token handbook: the Sol worker command is marked "after D4"; the sealed E2E route keeps gpt-6-astra at max

Review point (g) of the Gate A owner: the sealed Gate A E2E runbook launches
Codex workers with `-m gpt-6-astra -c model_reasoning_effort="max"`
(evidence/artifacts/token-adoption-e2e-20260926/RUNBOOK.md:371; README.md:266),
so the handbook's `-m gpt-6.1-sol` command is marked as the post-D4 default
and names the sealed route beside it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rule-text record: the Gate A owner's decisions (window-W guard, coordinator scoping), corrections, sources and numbers at final content

- DECISION 1 (record only): B1 applies neither user-level template;
  ~/.claude/CLAUDE.md (managed block) and ~/.codex/AGENTS.md stay
  byte-identical until the last Gate A window closes, F1's templates apply
  after window W. Why: the Codex block's line 16 names seven lane tools and
  every Codex arm reads the global AGENTS.md; the sealed design appends no
  LANES block (E2E README:188) and arm N is "config-free, not
  guidance-free" (README:275); Amendment 4 seals the pre-change hashes of
  both files. The guard covers window W only.
- DECISION 2: one wording on the three surfaces, coordinator-scoped
  imperatives, the pinned-launch rule (seed-binding-4, E2E README:157), the
  dropped "every manifest skill ..." clause (false at head) and why.
- Corrects the previous "makes no extra call" claim: the conditional
  wording gated only find-skills; search-first stayed ungated.
- Sources (point (f)): the pinned discovery command (skills-1.7.0 `skills
  find` with DISABLE_TELEMETRY=1, skills-agents-layer README:90,
  adoption/skills/manifest.json:22); the completeness critic cites
  Anthropic's evaluator-optimizer workflow and the multi-agent research
  system's completeness criterion; the north-star clause records "no
  upstream source; checked both pages, 2026-09-30".
- Numbers at final content (token_manifest count_files, gpt-tokenizer
  4.0.0, base main 1f2cdce): AGENTS.md 2,392 -> 2,812 (+420), portable
  2,051 -> 2,506 (+455), sum +875 against 200 (+723 accepted by the
  coordinator; +152 is the review's required text); Codex block 829 -> 1,397
  (+568); scaffold 373 -> 941. Words are Python str.split() counts.
- Post-A3 step marked done; six residual links listed (four F3, two D4).

docs/harness-defaults.md logs the proven mistake the review found: stating
a rule or a measurement for the head from an earlier state.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rule-text record: attribute the Amendment 4 seal to the Gate A owner's review

The amendment text is not in this repository, so the record states the seal
on the two user-level files' pre-change hashes as the review's statement,
not as a fact verified here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Scout <scout@local>
Co-authored-by: Claude Opus 5.5 <[email protected]>
seathatflowsinourveins added a commit that referenced this pull request Oct 1, 2026
…s; task-to-model routing record (unit A4) (#540)

* Codex user template: standing rule clauses, skills, models, routing and token lanes

Adds the 2026-09-30 standing clauses to the top-rule block of
adoption/templates/codex.AGENTS.template.md: skill discovery (search-first,
find-skills, skill-creator; implicit invocation from a skill's description and
explicit $skill-name, per openai/codex rust-v0.159.2
codex-rs/ext/skills/src/catalog_prompt.rs:8), upstream A/B and E2E harnesses,
the completeness critic feeding the next landscape sweep, the north-star
direction, GPT-6 model routing through the OmniRoute gateway (codex -p
omniroute), dated decision records, the startup rule, and a token-lanes line
naming each MCP server the Codex config template registers.

The RTK upstream text and the exceptions block stay byte-identical, so the F4
block in every Codex role is unchanged. The top-rule pin is re-derived with
template_segments(): 455 words, 7b41478f...; a new test requires a lane for
every server in codex.config.template.toml and the standing phrases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Portable Claude template: superset of the user-level rules plus the standing clauses

examples/claude-native/CLAUDE.md becomes the single managed source of the
operator's user-level file. Step 1 of the top rule takes the user-level
paragraph (research and record, reference implementations, popularity guides
discovery) and the skill-discovery clause (search-first, find-skills with
`npx skills find`, skill-creator); the core rule takes the rules only the
user-level file held (short plan, pins and reasons, relevant layers, reviewer
agreement is not proof), the north-star direction, the upstream A/B and E2E
harnesses and the completeness critic; token practice takes the startup rule;
the worker section takes GPT-6 routing through the OmniRoute gateway. Every
worker, model, Ultracode and agent-team rule is kept word for word.

PortableTopRuleTests gains a phrase check for the clauses and the user-level
rules (it failed on the unedited template with 29 phrases missing, 8 of them
rules the user-level file held) and re-baselines the word budget to 1,656.
@RTK.md stays the host's own import (recipes/claude-native-profile.md:134).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Decision record: standing rule text in every instruction layer; divergence log row

docs/decisions/2026-09-30-rule-text-every-layer.md supersedes the 2026-09-28
top-rule record's "the operator's user-level file is the operator's own" at
the user's 2026-09-30 request: the portable template becomes the single
managed source of that file. It maps the six clauses to each surface, records
the alternatives (a UserPromptSubmit carrier, per the hooks reference, adds
its context beside every prompt; leaving the file unmanaged produced the
divergence; per-agent copies are unit F2's; pointers measured as the
fallback), the o200k sizes from token_manifest.count_files, the overrun of
the unit's 200-token budget with its floor and fallback, and the overturn
conditions.

docs/harness-defaults.md logs the host/template divergence, naming only the
check seen failing on it (the new PortableTopRuleTests phrase check).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* AGENTS.md: the six standing clauses on the four named lines; re-register hashes

Hot files last (docs/lanes.md hot-file protocol). AGENTS.md takes the
standing clauses by amending, not appending, the lines the brief names:
- line 3, the top rule: skill discovery (search-first, find-skills with
  `npx skills find`, skill-creator; manifest skills model-invocable in both
  clients) replaces "with the installed research and skill-discovery
  skills", and A/B and E2E on upstream harnesses, never a self-written runner;
- line 7: the north-star R&D direction; each unit names its action;
- line 18: the completeness critic feeding the layer's next landscape sweep;
- line 28: GPT-6 through the OmniRoute gateway (astra max, sol medium, 6.1
  sol pending qualification), Codex CLI as the second native client, and "no
  audits, trials or network at startup" with the daily currency timer's
  due-file line (record lands with unit A2) replacing "Do not rerun the full
  audit or model trials at startup".

manifests/evidence.json re-registers the six changed files already listed,
with scripts/host_receipts.py register_file; component_matrix and
new_host_grand_list --check pass unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rule-text record and log row: nine user-level rules, not eight

The phrase check's committed form (with "from the selected source revision",
the user-level file's own wording) finds 29 phrases missing from the unedited
template, 9 of them held only by the user-level file; the record, its Checks
section and the anti-pattern row said 8 (from a run before that phrase
changed). The record also states the two non-verbatim worker lines exactly:
"Quality comes first" is one line with an identical word sequence, and the
sizing line keeps every user-level word and adds "to its task".
Re-registers docs/harness-defaults.md (hot file, last commit).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Codex user template: Sol-primary routing and skill matching folded into the standing lines

Folds the two lines the main checkout's uncommitted changes added inside the
top-rule block (pre-existing uncommitted changes observed in the main
checkout; original author not established), merged with this unit's lines
instead of carried beside them:
- the Models line now states the Sol-primary routing of
  docs/decisions/2026-09-30-sol-primary-quality-defaults.md (gpt-6.1-sol at
  ultra for coordination and at max for workers, gpt-6-astra at max after the
  recorded escalation triggers), replacing the superseded astra/sol-medium
  wording and "gpt-6.1-sol waits for qualification"; the OmniRoute gateway
  clause stays;
- the skills line takes the skill-matching rule (read each selected SKILL.md,
  follow its native workflow, load references only when needed) next to
  implicit and $skill-name invocation.

The phrase test failed first on the unedited block with five phrases missing
(exit 1). Pin re-derived with template_segments(): 496 words, 2d3107a2...;
the RTK text and exceptions block are unchanged (test_codex_agents 18 OK).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Portable Claude template: Sol-primary Codex routing; skill matching kept inside "Keep context small"

- The GPT-6 bullet follows docs/decisions/2026-09-30-sol-primary-quality-defaults.md:
  Codex CLI is the second native client, gpt-6.1-sol at ultra coordinates and
  at max runs workers, gpt-6-astra at max takes the recorded escalation
  triggers; cross-family research, review and sweep votes run through the
  OmniRoute gateway. It replaces the superseded astra/sol-medium wording and
  "gpt-6.1-sol pending qualification".
- Folds the skill-matching wording of the main checkout's uncommitted change
  (pre-existing uncommitted changes observed in the main checkout; original
  author not established) into the token-practice bullet. The change as
  observed replaced "Keep context small", a rule the operator's user-level
  file holds; the merged bullet keeps both.

The phrase check failed first on the unedited template with four phrases
missing (exit 1); it now also requires "Keep context small", which the
observed version lacks (mutant check: 31 phrases missing there, that one
included). Word baseline 1,656 -> 1,680.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* AGENTS.md: fold the skill-lifecycle and Codex-defaults bullets; one model-routing sentence set

Folds the two bullets of the main checkout's uncommitted AGENTS.md change
(pre-existing uncommitted changes observed in the main checkout; original
author not established). Neither was on origin/main at 11227bf (the file's
blob there equals e45328d's) nor on any other unit branch:
- the token-practice bullet on matching skill descriptions, reading each
  selected SKILL.md and adoption/skills/lifecycle.md (which unit F3 adds);
- the Codex defaults bullet (gpt-6.1-sol / ultra coordinator, gpt-6.1-sol /
  max primary workers, Astra/max on the recorded triggers, the Sol-primary
  record that unit D4 adds), merged with this unit's clause: Codex CLI is the
  second native client, and cross-family research, review and sweep votes run
  through the OmniRoute gateway. The startup bullet keeps only the startup
  clause, so the model routing is stated once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Convergence guide and token handbook: Ultracode decoupled from effort; Sol worker command

Folds the true delta of two files from the main checkout's uncommitted
changes (pre-existing uncommitted changes observed in the main checkout;
original author not established), taken as a three-way merge onto
origin/main so main's own later edits stay:
- docs/convergence-architecture.md: Claude Code 2.1.284 decoupled Ultracode
  from effort; xhigh (saved fallback) and max (launcher) are separate choices,
  not measured quality gains. Source: the tagged anthropics/claude-code
  v2.1.285 CHANGELOG.md line 206 ("it no longer forces xhigh effort and stays
  on at any effort level", under 2.1.284), read 2026-09-30.
- docs/token-session-handbook.md: the Codex worker command names
  gpt-6.1-sol, matching the stack-worker profile and recipe that unit D4
  changes in the same batch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Anti-pattern log: ten folded rows and six Codex runtime lane rows

Ten rows are folded byte-for-byte from the main checkout's uncommitted
docs/harness-defaults.md (pre-existing uncommitted changes observed in the
main checkout; original author not established), at the top of the table
where that change placed them. Only the true delta against origin/main is
taken: main's newer login-shell row and the four terminal-lane rows of #532
stay; the "Sol-primary quality defaults" paragraph belongs to unit D4.

Six rows were requested by the Codex runtime lane (relays
codex-runtime-anti-pattern-owner-handoff-20260930 and
codex-f1-source-correction-handoff-20260930), one mistake / correction /
check each, citing that lane's published sources at full SHAs: PR #535 head
00aa6c2 (the cited files are byte-identical to the earlier head 6a7b164,
which no remote ref holds any more), SDK branch head 404b821 and OpenHands
software-agent-sdk dcf401af build.py lines 581 and 925. The GitHub Actions
job conclusions the rows cite were re-read through the REST jobs API on
2026-09-30 (run 36695388851: jobs 109821999811 and 109821999568 cancelled,
all steps success; run 36690153586: job 109805172026 validate-macos failure).

UpstreamVerificationSectionTests: 3 OK.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Fold the 2026-09-30 native practice finalization record, attributed

docs/decisions/2026-09-30-sota-native-finalization.md is folded unchanged
from a read-only snapshot of the main checkout (pre-existing uncommitted
changes observed in the main checkout; original author not established;
tracked diff sha256 314bd1b260da0939). One attribution paragraph after the
title states that provenance and which linked evidence is not published with
it: evidence/artifacts/sota-finalization-20260930/ has no assigned owner, the
native-skill-finalization artifacts land with unit F3 and the
codex-01592-qualification artifacts wait on unit D4. The body is
byte-identical to the snapshot (12,956 bytes); the privacy scan found no host
path, home directory or host user name in it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rule-text record: rebuilt base, Sol-primary clause (a), folded items, lane rows and guards, re-measured sizes

- Base moves to origin/main@11227bfd (the three surfaces are byte-identical
  to e45328d's).
- Clause (a) follows docs/decisions/2026-09-30-sol-primary-quality-defaults.md
  (unit D4); the brief's first wording and its 04:35Z "Astra at ultra for
  complex workflow tasks" relay are recorded as superseded by that later,
  more specific user selection.
- Lists every item folded from the main checkout with the provenance
  sentence, the snapshot hashes, the three-way-merge method and what was not
  folded (recipes/README.md is on D4's branch; the finalization evidence
  directory has no owner).
- Records the six Codex runtime lane rows (relays and what was verified) and
  the three relayed guards: #543 not described as published without a native
  gh lookup that exits 0, the 07:34Z/06:46Z actor unknown, a historical OSV
  pass not current after #546.
- Sizes re-measured with tools/token-report/token_manifest.py count_files
  (gpt-tokenizer 4.0.0): AGENTS.md +323, portable template +363 (sum +686
  against the 200 budget: +139 folded text, +547 clauses and user-level
  rules), Codex template +507.
- Limitations updated: clause (c) against F3's settings, cross-unit
  references, unpublished evidence, older Codex pins, A3's scaffold copy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Codex routing on all three surfaces: Astra/Ultra coordinates a complex workflow, Astra/Max takes a single consequential judgment

Follows the coordinator's decision and unit D4's refined Sol-primary record
(claude/sota-defaults-d4-codex-0159-20260930 at 9dd4ebe), which splits the
escalation by the Codex catalog semantics it documents (Ultra: proactive
delegation with the model's xhigh reasoning; Max: the highest reasoning
effort) and quotes the user's 2026-09-30 selection ("astra ultra when tasks
needed suitable for complex workflow"):
- gpt-6-astra at ultra when a complex workflow needs Astra to coordinate it;
- gpt-6-astra at max for a single consequential judgment (conflicting primary
  evidence, consequential architecture, complex changes across systems, or a
  failure unresolved after one bounded Sol repair).

AGENTS.md's folded Codex bullet, the portable template's Codex bullet and the
Codex block's Models line now state the split. Both phrase checks failed
first with four phrases missing each (exit 1). Codex pin re-derived with
template_segments(): 515 words, d1195686...; portable word baseline 1,697.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* One-pass tightening of the added rule text (no rule removed)

The coordinator accepted the growth over the 200-token budget and asked for
one pass that cuts words carrying no rule, limited to text this branch adds:
- AGENTS.md Codex bullet: the Astra split as two clauses and the contract
  pointer in parentheses (2,742 -> 2,733 o200k tokens);
- portable template: "(registry: `npx skills find`)" -> "(`npx skills find`)"
  (2,436 -> 2,433);
- Codex block: implicit/explicit invocation in one clause, "use the
  `search-first` skill" -> "use `search-first`", the registry label, and
  "the paired benchmark of Claude's `skill-creator` plugin" -> "Claude's
  `skill-creator` paired benchmark" (1,360 -> 1,346).

Every phrase of both phrase checks still holds. Codex pin re-derived with
template_segments(): 507 words, 97bbeb8c...; portable word baseline 1,696.
Counts: tools/token-report/token_manifest.py count_files, gpt-tokenizer 4.0.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Fold the finalization record's evidence: 18 of the 19 files of evidence/artifacts/sota-finalization-20260930/, unchanged

Allowed-path amendment by the coordinator. The files are copied
byte-for-byte from the read-only snapshot r2 of the main checkout
(pre-existing uncommitted changes observed in the main checkout; original
author not established); sha256sum -c against the snapshot passes.

Sanitization: nothing needed stripping and no file was changed.
- validate.py --scan-file over all 19 snapshot files: {"scanned_files": 19,
  "status": "passed"} (UUID, personal home path, Windows user path and token
  patterns).
- A wider scan found no personal home path, host user name, /tmp/claude-*
  path, session UUID, e-mail, IP address or token. The one "/home/" string
  earlier reported as a home path is the literal placeholder "/home/example"
  inside claude-review.json's prose, which validate.py's pattern exempts.
  Replacing it with <home> would alter the retained review without removing
  any host data, and would break the sha256 pin that the lane's convergence
  record holds for that file, so the file stays byte-exact. The
  config-key hits in convergence.json are recorded codex exec command lines
  already redacted to <private-path>; the three "~/." strings are generic
  install locations.

Held back: convergence.json. It is a kind "convergence_experiment" record
whose frozen inputs and observations pin five files of
native-skill-finalization-20260930 (unit F3; all five pins match F3's branch)
and three of codex-01592-qualification-20260930 (on no branch yet) by path and
sha256. validate_convergence.py --all-recorded, which CI runs, fails
discovery for an undeclared hash-listed record and fails validation for a
declared one with missing files, so it can be folded, declared in
convergence_records, only after F3 lands and D4 publishes those three files
unchanged at those paths.

The folded record's attribution paragraph says so; its links and the four
folded log rows into this directory resolve. Hash registration follows in
the last commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rule-text record: Ultra/Max split, accepted budget miss with its overturn condition, evidence fold and sanitization, post-A3 step

- Base is origin/main@8fc86119 (rule surfaces byte-identical to 11227bf
  and e45328d).
- Clause (a) records the split from unit D4's refined record (9dd4ebe):
  gpt-6-astra at ultra when a complex workflow needs Astra to coordinate it,
  at max for a single consequential judgment, with the catalog semantics and
  the user's 2026-09-30 words as relayed.
- Measured size: AGENTS.md 2,392 -> 2,733 (+341), portable template
  2,051 -> 2,433 (+382), Codex block 829 -> 1,346 (+517); budget sum +723
  against 200, accepted by the coordinator because the clauses are the user's
  explicit directive. Composition: fold +139, split +49, tightening -12.
  Overturn condition: a rerun of the 2026-09-29 user-prefix A/B showing no
  rule-following gain for the added cost brings back the pointer fallback.
- The finalization record's evidence: 18 of 19 files folded unchanged; the
  sanitization section gives the scan and corrects the first handoff (19
  files, not 21; the one "/home/" string is the /home/example placeholder,
  kept byte-exact, also because the lane's convergence record pins its
  sha256). convergence.json is held back: a convergence_experiment record
  pinning F3 and D4 files that CI's validate_convergence --all-recorded
  would reject on this branch whether declared or not.
- Known residual links: seven targets, four from F3 and three from D4
  (the Sol-primary record and two codex-01592-qualification files).
- Post-A3 step: after #545 merges, whichever lands second copies the
  top-rule block into adoption/scaffold/AGENTS.md; not created here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rule text: conditional skill discovery on the three surfaces; the growth waiver and the provenance wording cited to the brief's amendments

find-skills (npx skills find) runs only when no listed skill fits the task, so a measured child with a fitting
listed skill makes no extra Skill or Bash call (the Gate A owner's note); search-first stays before custom code
or a tool choice. The record cites the coordinator's dated brief amendments for the accepted +723 o200k growth and
for the neutral fold provenance (a process census of file writes does not establish authorship; the Codex runtime
lane asked for the wording). Codex top-rule pin re-derived: 514 words, fecf92dc...; portable baseline 1,703 words.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Standing rule text: one wording on the three surfaces, coordinator-scoped (Gate A owner's review of #557)

Applies DECISION 2 of the Gate A owner's ACCEPT-WITH-CHANGES review on
AGENTS.md, examples/claude-native/CLAUDE.md and the Codex block, with the same
sentences on all three (the Codex block names a bounded worker where the
Claude surfaces name a delegated child in the skill sentence):
(a) "A coordinator, not a delegated child, invokes `search-first` before
    custom code or a tool choice; when no listed skill fits the task, it
    discovers one with `find-skills` and verifies or A/B-tests it with
    `skill-creator`."
(b) Sol/Astra routing kept for unpinned work; added: where a launch pins
    the model and effort (`-m`, `-c model_reasoning_effort`), children inherit
    that pin and a spawn call names neither; a coordinator, never a
    delegated child, starts a cross-family lane.
(c) Dropped "every manifest skill stays listed for model invocation in both
    clients" (false at this head: find-skills, grill-me and
    improve-codebase-architecture are user-invocable-only, find-skills has
    codex_enabled false) and the bare `npx skills find`.
(d) The north-star, completeness-critic, trigger/acceptance and dated
    decision-record imperatives are a coordinator's.
(f) AGENTS.md's lifecycle pointer says "(lands with unit F3)"; the
    currency-notice (A2, in the stack below) and Sol-primary (D4, on main)
    citations stay.
The harness and startup sentences take one wording too.

Post-A3 step done: adoption/scaffold/AGENTS.md carries the final top-rule
block byte for byte (tests.test_scaffold_repo passes).

Tests: StandingRuleSurfacesTests (new) asserts the shared sentences on all
three surfaces and the dropped clause on none; it failed first with 21
failing subtests (exit 1). Both phrase lists failed first (exit 1). Codex pin
re-derived with template_segments(): 538 words by Python str.split(),
9565217f...; portable baseline 1,750; comments now name str.split(), not
wc -w (review point (e)).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Token handbook: the Sol worker command is marked "after D4"; the sealed E2E route keeps gpt-6-astra at max

Review point (g) of the Gate A owner: the sealed Gate A E2E runbook launches
Codex workers with `-m gpt-6-astra -c model_reasoning_effort="max"`
(evidence/artifacts/token-adoption-e2e-20260926/RUNBOOK.md:371; README.md:266),
so the handbook's `-m gpt-6.1-sol` command is marked as the post-D4 default
and names the sealed route beside it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rule-text record: the Gate A owner's decisions (window-W guard, coordinator scoping), corrections, sources and numbers at final content

- DECISION 1 (record only): B1 applies neither user-level template;
  ~/.claude/CLAUDE.md (managed block) and ~/.codex/AGENTS.md stay
  byte-identical until the last Gate A window closes, F1's templates apply
  after window W. Why: the Codex block's line 16 names seven lane tools and
  every Codex arm reads the global AGENTS.md; the sealed design appends no
  LANES block (E2E README:188) and arm N is "config-free, not
  guidance-free" (README:275); Amendment 4 seals the pre-change hashes of
  both files. The guard covers window W only.
- DECISION 2: one wording on the three surfaces, coordinator-scoped
  imperatives, the pinned-launch rule (seed-binding-4, E2E README:157), the
  dropped "every manifest skill ..." clause (false at head) and why.
- Corrects the previous "makes no extra call" claim: the conditional
  wording gated only find-skills; search-first stayed ungated.
- Sources (point (f)): the pinned discovery command (skills-1.7.0 `skills
  find` with DISABLE_TELEMETRY=1, skills-agents-layer README:90,
  adoption/skills/manifest.json:22); the completeness critic cites
  Anthropic's evaluator-optimizer workflow and the multi-agent research
  system's completeness criterion; the north-star clause records "no
  upstream source; checked both pages, 2026-09-30".
- Numbers at final content (token_manifest count_files, gpt-tokenizer
  4.0.0, base main 1f2cdce): AGENTS.md 2,392 -> 2,812 (+420), portable
  2,051 -> 2,506 (+455), sum +875 against 200 (+723 accepted by the
  coordinator; +152 is the review's required text); Codex block 829 -> 1,397
  (+568); scaffold 373 -> 941. Words are Python str.split() counts.
- Post-A3 step marked done; six residual links listed (four F3, two D4).

docs/harness-defaults.md logs the proven mistake the review found: stating
a rule or a measurement for the head from an earlier state.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Rule-text record: attribute the Amendment 4 seal to the Gate A owner's review

The amendment text is not in this repository, so the record states the seal
on the two user-level files' pre-change hashes as the review's statement,
not as a fact verified here.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Task-to-model routing record: one table of task class, client, model, effort and enforcement point

Consolidates the routing rules of the workflows README (dispatch by role, Sonnet 5.5
fan-out units, role routing), the model-currency record, the Sonnet 5.5 dispatch
record and the max-default effort record into one table, and names where each route
is enforced today: agent frontmatter, workflow stage, CLAUDE_CODE_SUBAGENT_MODEL,
client settings, Codex config, lane code or instruction only. No route changes.

States that no automatic router exists; OmniRoute D04 singleton combos, D06 lane
aliases and the task-aware router (D11) stay off until the promptfoo A/B of wave
unit D3. gpt-6.1-sol is listed only as pending unit D4 qualification. Open PRs #423
and #508 are cited at their head commits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* token-practice: point to the task-to-model routing record

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Test the routing record against the enforcement points it quotes

Every value the record's table quotes from a file must still be on the cited
lines, every cited line must exist, frontmatter rows must name the model they
quote, every task class must have a row, gpt-6.1-sol must stay listed only as
pending and routed nowhere, and docs/token-practice.md must point to the record.
Integration checks of the repository's own record, not upstream acceptance.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Routing record: name the client's content-based fallback guards

"No automatic router exists" now also names Claude Code's own content-based fallback
and the two keys that switch it off in the project settings and the user-settings
template (switchModelsOnFlag false, CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1), with the
model-currency addendum's note that their coverage is unverified and that availability
fallback chains are a separate mechanism.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Routing record: cite #508 line 90 alone for the run-shape levers

#508's token-stack record says the run-shape levers, role dispatch
among them, are "owned by the Gate A owner after #381 closes" (line 90).
Its line 93 ("Gate A per-row results decide any change") is about the
on-demand members of line 92, not the levers, so the Context paragraph
and the Sources entry now cite line 90 only (review finding, low).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Routing record and test: hold quoted values per file, not per line; Codex rows name no version

Six sibling units of this wave may edit files that the record quotes by
line: landscape-sweep (A1), bootstrap-linux.sh (A3), .claude/agents and
the settings template's hooks entry (F2), the settings template and the
Codex template (F3), codex_roles.py (F4) and the model-currency record
(D4, an addendum over the region of its line 284). None of them may edit
this record or its test. An exact-line check fails their pull requests
on any inserted line, even when no route changes.

- The record now states every line number as read at e45328d.
  tests/test_task_model_routing.py counts each quoted value in its whole
  file and requires at least one copy for each distinct line quoted, so
  a pure line shift passes and a changed model or effort fails.
- Two values have more copies than the record cited. It now also cites
  the template's modelSettings xhigh for claude-opus-5-5 and
  claude-sonnet-5-5 (:303, :306) and review-changes.js's recheck-stage
  scout binding (:78), so a change to any cited copy fails.
- model-currency.md:284 is cited without a CI-checked quote. D4 may
  rewrite that sentence.
- The Codex rows' Client cell says "Codex CLI". The preamble records that
  manifests/stack.json:297 pins 0.157.1 at e45328d, so D4's pin move
  leaves no stale version string (review finding, low).
- The GPT-6.1 check matches a model binding (a model key or constant, or
  -m/--model with an optional gateway prefix), not any mention. F1 may
  write prose naming gpt-6.1-sol into adoption/templates; a real binding,
  such as D4 switching the Codex template default, still fails.

Controls, each run in a fresh copy of the files the test reads:
16 of 16 as expected for both the old and the new test. Pure line
shifts (codex template, model-currency.md, sweep.js) and an F1-style
prose mention fail the old test and pass the new one. Changed frontmatter,
one of two identical sweep bindings, and a gpt-6.1-sol template default
fail both. Changing the :306 per-model xhigh or the :78 recheck binding
passes the old test and fails the new one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* token-efficiency profile: accept the selection, carry the three code-navigation tools

The profile's label drops "Drafted, not accepted" for a dated acceptance of the
selection, citing the routing record, which joins recipe_paths so the profile
resolves only while the record is present. jcodemunch-mcp, codebase-memory-mcp
and ast-grep join component_ids and required_commands: the SubagentStart carrier
names them as task-appended lanes and the code-navigation layer's current choice
names all three (catalogs/landscape/foundation.json). Their versions stay in
manifests/stack.json (1.108.319, 0.11.0, 0.45.3); a manifest profile has five
keys and carries no version or wiring field, so neither is added.

tests/test_adoption_status.py restates the split the profile is checked against:
NAVIGATION_CHOICE, asserted against the code-navigation current choice, leaves
OPTIONAL, and the Ultracode tool split becomes 13 profile rows and 3 optional
rows against 17 component_ids.

Failing-first: the restated tests fail against the previous manifest (2 of 3 in
TokenEfficiencyProfileTests) and the previous tests fail against this manifest
(the same 2, plus ProfileTableTests.test_pin_columns_match_the_pin_files, whose
adoption/README.md cells are outside this unit's paths). manifests/evidence.json
is re-registered in the branch's last commit.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Routing record: accept the token-efficiency profile, state the three tools' wiring

The record no longer says the profile is "not decided here"; it makes the claim
that adoption/manifest.json now cites. The Decision gains a dated acceptance that
bounds itself to the selection and its routing (structural validation, not a host's
acceptance), the pin and the Claude Code and Codex wiring of jcodemunch-mcp,
codebase-memory-mcp and ast-grep with the file that carries each, the basis for
adding them (the SubagentStart carrier, the code-navigation current choice, the
2026-09-25 Ultracode run), and where #508 differs: it lists ast-grep as the
structural-code lane, makes jCodeMunch an owner only once wired and lists
codebase-memory-mcp as not a member, so the record does not rest on #508 for those
two. Two alternatives (leave the three optional; a new manifest key) and two
overturn conditions (#508 or Gate A changes a row; pins arrive) are added, and the
Sources name the new files and #508 lines 85, 86 and 103.

Every path:line cite in the whole record resolves in this branch (115 cites, 28
bare paths); the record keeps its five sections and one table, which
tests/test_task_model_routing.py holds.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* token-efficiency-stack: restate the optional-row split for the three tools now in the profile

Three statements had become false: that jCodeMunch, ast-grep and codebase-memory-mcp
are optional rows outside the profile, that the profile has 14 component_ids, and
that the Ultracode run's 16 tools are ten profile rows and six optional rows. The
profile paragraph now lists the three as the code-navigation layer's task-selected
tools (none a layer winner), the optional-row paragraph keeps Context Hub, the
viewers and OmniRoute, and adds why client_wiring still checks only Serena,
SocratiCode and ai-memory, that the three have no platform pin (so --pinned-versions
reports them unchecked) and that a bootstrap refuses the profile until they are
named in --allow-unpinned (adoption/bootstrap-linux.sh --help: exit 3). The
Ultracode paragraph becomes 17 component_ids, thirteen profile rows and three
optional rows, matching tests/test_adoption_status.py.

The review of this unit asked for this reconciliation (docs/token-efficiency-stack.md
lines 264-270); the file is outside the brief's allowed paths, so it is its own commit.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Test the token-efficiency profile against the routing record that accepts it

The record's Decision says the profile's label accepts it and names the record,
that the record is one of its recipe_paths, and that jcodemunch-mcp,
codebase-memory-mcp and ast-grep are component_ids and required_commands. The new
test in tests/test_task_model_routing.py holds those claims to adoption/manifest.json
and requires the record to name each tool. It compares no version: manifests/stack.json
owns them, and the record now dates the ones it quotes at e45328d.

Failing-first: against the previous manifest the test fails on the label ('Accepted'
not found in 'Drafted, not accepted: ...'); against this branch's manifest all 8
tests in the module pass.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* token-efficiency profile: README pin cells, regenerated grand list and re-registration (companion)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* token-efficiency profile: back to the 14 pinned components; the three code-navigation tools stay optional rows

Round 1 (24c8703) added jcodemunch-mcp, codebase-memory-mcp and ast-grep to the
profile's component_ids and required_commands. Neither adoption/pins-linux-x86_64.json
nor adoption/pins-macos-arm64.json lists them, and both bootstraps fail closed on a
selected component with no pin: adoption/bootstrap-linux.sh:169 and
adoption/bootstrap-macos.sh:220 print "No pin in <file> for selected component(s)" and
exit 3, and adoption/bootstrap-macos.sh:176-190 records that no component is exempted
from a pin by default. PR #540's validate-macos job failed on it (3 tests of
tests/test_adoption_bootstrap_macos.py TokenEfficiencyPlanTests), reproduced locally at
8ca7895 with `python3 -m unittest tests.test_adoption_bootstrap_macos
tests.test_adoption_bootstrap tests.test_adoption_launchd`: FAILED (failures=3,
skipped=38).

The profile is again the 14 pinned components. It keeps the accepted label and the
routing record in recipe_paths. The three tools stay the code-navigation layer's
task-selected tools and the carrier's task-appended lanes, installed on demand from their
recipes, until each has a reviewed pin on both platforms and a host receipt.

tests/test_adoption_status.py returns to main's OPTIONAL set of eight and the
(16, 14, 10) Ultracode split, and TokenEfficiencyProfileTests gains
test_every_profile_component_has_a_pin_on_both_platforms, so a profile that outruns the
pin files fails in this file's own module set and not only in the bootstrap plan tests.
tests/test_task_model_routing.py holds the record's claims about the three: outside
component_ids and required_commands, unpinned on both platforms, named by the
code-navigation current choice and by the carrier's lane ids.

Failing-first: with these tests and the round-1 manifest (17 component_ids), 4 of the 12
tests in TokenEfficiencyProfileTests and TaskModelRoutingRecordTests fail, 8 failures
counting subtests ("Tuples differ: (16, 17, 13) != (16, 14, 10)", "'jcodemunch-mcp'
unexpectedly found in [...]", the pin-file membership checks). With the manifest of this
commit all 12 pass.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* token-efficiency-stack: restore the optional-row split, since the three tools are not profile members

This reverts 12a587e. docs/token-efficiency-stack.md is byte-identical to origin/main
(11227bf) again: the profile has 14 component_ids, jCodeMunch, ast-grep and
codebase-memory-mcp are task-selected options in the code-navigation layer's current
choice and stay optional rows, and the Ultracode run's 16 tools are ten profile rows and
six optional rows. The statements 12a587e rewrote (three joined the profile on
2026-09-30; a bootstrap refuses the profile until they are named in --allow-unpinned; 17
component_ids, thirteen profile rows) described a profile that adoption/manifest.json no
longer has, because both bootstraps fail closed on a component without a pin and none of
the three has one. tests/test_adoption_status.py checks the ten/six split against the
receipt's tool list. The reasoning is recorded once, in
docs/decisions/2026-09-30-task-model-routing.md.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* adoption README: the token-efficiency row says accepted, and its cells describe the 14 pinned components again

d5369cb wrote the row for 17 members: "14 of 17 (all 14 at v2026.09.26.2)" in both pin
columns, the three code-navigation tools in the description, and a note that a
bootstrap of the profile needs them in --allow-unpinned. The profile has its 14 pinned
components again (previous commit), so the description, both pin cells and the note are
main's, and only the acceptance wording stays: "Accepted 2026-09-30 as the selection",
linking the routing record.

The pinned release v2026.09.26.2 covers the same 14 of 14 as HEAD, so
tests/test_adoption_docs_consistency.py (ProfileTableTests.cell_errors) asks for no
note on that tag; the notes for v2026.09.25.2 and v2026.09.26 are checked against
their own tags and hold.

Failing-first: with the round-1 row and the 14-component manifest,
ProfileTableTests.test_pin_columns_match_the_pin_files fails ("token-efficiency Linux
pins: table says '14 of 17', adoption/pins-linux-x86_64.json gives 'all 14'"). With
this row the module passes: Ran 37 tests, OK (skipped=1). The one skip is data
dependent, not environmental: no profile's coverage differs between the pinned release
and HEAD, on origin/main as well as here.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Routing record: the three code-navigation tools stay outside the accepted profile, for want of a pin

The record accepted the token-efficiency profile and, in round 1, added jCodeMunch,
codebase-memory-mcp and ast-grep to it. It now accepts the profile as it is, its 14
pinned components, and says why the three are not members: both bootstraps fail closed
on a selected component with no pin (adoption/bootstrap-linux.sh:144-172,
adoption/bootstrap-macos.sh:177-223, and the macOS comment at :177-187 that no component
is exempted from a pin by default any more), none of the three has an entry in
adoption/pins-linux-x86_64.json or adoption/pins-macos-arm64.json, and
tests/test_adoption_bootstrap_macos.py:1015-1017 requires the profile's plan to resolve
every component with no --allow-unpinned.

- Alternatives: leaving the three out is the chosen state; adding them (round 1) is a
  rejected alternative with its failure (Adoption bootstrap smoke run 36728291629, job
  validate-macos, step "Gate on the adoption test modules"; reproduced locally at
  8ca7895, failures=3) and the reason --allow-unpinned does not rescue it.
- Decision: "Three tools join the profile" becomes "Three tools stay outside the
  profile"; the wiring bullets, which describe how each installs on demand, stay; the
  "14 of 17" coverage and the exit-3 sentence are gone; "Where #508 differs" becomes
  "#508's rows": leaving the three out agrees with #508 for jCodeMunch (line 86) and
  codebase-memory-mcp (line 103), and ast-grep (line 85, the structural-code lane) is
  out only for want of a pin.
- Overturn condition: the follow-up unit that adds a tool once it has a reviewed pin on
  both platforms and a host receipt for each, with the files it must restate in the same
  change (adoption/README.md row, token-efficiency-stack.md split, OPTIONAL and
  CARRIER_TOOLS in the two tests).
- Header and Sources: the citations are at e45328d while the branch is based on
  11227bf, where examples/claude-native/workflows/README.md has grown by 249 lines; the
  record says so. The pin-rule files it now cites are unchanged between the two bases.

tests/test_task_model_routing.py (previous commit) holds these claims to the files.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Test the routing record against D4's Codex routes

tests/test_task_model_routing.py predated D4 (#542, merged as 1f2cdce) and failed on the
stacked tree (validate job 110072600341): two quoted `model = "gpt-6-astra"` lines and the
test that expected GPT-6.1 Sol to be routed nowhere.

- A quoted value counts only as a whole value, so `model = "${CODEX_MODEL}"` is not met by
  the template's `default_subagent_model` line.
- GPT-6.1 Sol: the table's Sol rows are exactly the Sol-primary record's three routes (the
  Codex coordinator at ultra, primary workers and generic children at max), and every file
  in the routing places (now with recipes/ and adoption/agents/) that binds a GPT-6.1 model,
  a constant such as CODEX_MODEL_CURRENT included, is cited by a Sol row. __pycache__ and
  node_modules are skipped: CI flagged prove_codex_lane's bytecode.
- The Codex user template is rendered through tools/adoption/render_config.py for every
  pinned platform, as tests/test_render_config.py's CodexModelTests do, and must give the
  models and efforts that the coordinator and generic-children rows name.
- The task classes add complex-workflow coordination and a single consequential judgment.

Fails against the record at this commit (5 failures, 1 error); the next commit restates it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Routing record: restate the Codex rows for D4 (#542)

D4 made GPT-6.1 Sol the Codex coordinator (ultra) and primary-worker model (max), with GPT-6
Astra for complex-workflow coordination (ultra) and a single consequential judgment (max):
docs/decisions/2026-09-30-sol-primary-quality-defaults.md and the model-currency addendum of
2026-09-30. The record still listed Sol as pending and routed nowhere.

- Six Codex rows, read at 1f2cdce: the Codex judgment role carriers (Astra, max); the
  coordinator and interactive default (the template's ${CODEX_MODEL} at ultra, rendered as
  gpt-6.1-sol for the Linux pin 0.159.2 and gpt-6-astra for the macOS pin 0.155.1); primary
  workers (the stack-worker profile, the lane's worker pins and live proof, the recipe's
  command); generic children; complex-workflow coordination and escalation (instruction only).
- Context and Decision state the D4 routing and its dependence on the Codex pin. No
  automatic router exists, and D04/D06/D11 stay off until the D3 promptfoo A/B, as before.
- Overturn: the user's next decision or D4's reopening condition, and a Codex pin crossing
  0.159.1 on a platform. Sources: D4's records, the enforcement points and the CI job.

The Claude rows are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Test each GPT-6.1 binding against the Sol rows, by TOML table and command profile

The GPT-6 cross-family review of round 2 (901ed76, needs_changes, medium): the "nowhere
else" check compared files only, so a `[profiles.security-review]` table with
`model = "gpt-6.1-sol"` added to the user template, a file the coordinator row already
cites, left all nine routing tests passing.

- Bindings are counted one by one: a TOML key by its table (parsed with tomllib: `model`,
  `agents.default_subagent_model`, `profiles.<name>.model`, on the ID or on
  `${CODEX_MODEL}`), a key or constant elsewhere (CODEX_MODEL_CURRENT), and a command's
  `-m`, named with the profile the command selects (`-p stack-worker -m`).
- Each binding must be one a Sol row cites by file and name. A quoted TOML key names the one
  key of that name and value (a quoted `[table]` header scopes it), and a quote that fits
  two keys is reported. Each cited binding must be one D4 makes: the template's `model` and
  `[agents] default_subagent_model`, the render constant, the stack-worker profile's
  `model` and the stack-worker command's `-m`.
- Regression: the planted profile, in memory, on the ID and on the placeholder, and then
  cited by its table from the coordinator row; each variant is reported.

Fails against the record at this commit: the stack-worker command's `-m` in the profile's
header (line 3) and in the live proof's help (tools/adoption/prove_codex_lane.py:36) are
bindings no Sol row cites. The next commit cites them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Routing record: cite the stack-worker command where the profile header and the live proof write it

The binding-level check of the previous commit found two GPT-6.1 bindings that the
primary-worker row did not cite, both the stack-worker command's `-m`, which D4 routes: the
profile's header (adoption/templates/codex.stack-worker.config.toml:3) and the live proof's
help (tools/adoption/prove_codex_lane.py:36). The row now quotes both, beside the recipe's
command it already quoted. No other row changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Re-register the changed hash-listed files in manifests/evidence.json (hot-file protocol)

The last commit of the branch carries the hot files: the stacking ref's manifests/evidence.json
with this branch's changed hash-listed files re-registered, and the regenerated component-evidence
matrix and new-host grand list (docs/lanes.md hot-file protocol).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Scout <scout@local>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant