Skip to content

Route catalog retrieval and load native navigation policies - #819

Merged
seathatflowsinourveins merged 18 commits into
mainfrom
codex/ns2604-qmd-instructions-20261006
Oct 7, 2026
Merged

seathatflowsinourveins merged 18 commits into
mainfrom
codex/ns2604-qmd-instructions-20261006

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Scope

Route catalog lookup through QMD's lexical queries and bounded document retrieval; use SocratiCode for semantic catalog search at the main checkout's projectPath. Keep reranking available and prohibit qmd embed/pull. Update current maintenance recipes and native instruction carriers through the repository renderers.

Existing Serena consumers read its manual before navigation, and jCodeMunch consumers obtain the current guide before a typed route with the actual caller model and execution off. Four existing Claude roles gain only Serena's manual tool. Reviewer/builder keep their no-menu boundary, and a focused read of a known path and line remains valid.

This landing repair appends the preregistration's Amendment4 to bind the deliberately changed role bodies and compacts lane-authored RTK explanations within the unchanged compact and startup budgets. The entire composed pre-RTK prefix, upstream awareness, owner's blocks, exact SKILL line, seven exceptions, models and effort are preserved. Prior amendment rows, observations, seals and RUNBOOK bytes remain unchanged.

The canonical code-graph rename is prepared as a separate patch and is excluded from this head under command-center ruling081016Z. Main's existing names remain in both templates, the map, fixtures and carriers. The protected lane token requires the owner's word before the rename can land. Until that follow-up, this host's Claude code-graph access is through the vendor's hook channel only; the stale MCP carrier id is a recorded limitation and is not claimed fixed.

  • Base commit: c44993b379da25fae923dbbe70188978af5104aa (verified native source; Codex: preserve native skill-document invocation accounting #803 already landed).
  • Lane: lane:foundation; draft.
  • Head: 9985e468fa4997d22630714b2fa6a76666e3cda9. Native bytes: compact 8076 <8192, rendered 9142, three-file startup 20101 <=20103; full Claude block 4087 <=4100. These are byte gates, not token-use measurements.
  • Owned paths: token-lane carriers and their paired handbook text, minimal manual grants and mirrors, Codex template/rendered copies, native loader/routing/sequence tests, current recipes and generated handbook, append-only decisions/preregistration amendment, follow-up receipts and checksum/registry projections.
  • ROLE-CARRIER-GAPS and ROLE-GRANTS are separate future work and stay out of this change.

Landing path: explicit command-center cue070358Z and fallback ruling081016Z permit one pushed rebase/content repair onto then-current main while #802/#813/#830 land. The co-op performs the new-head delta read with its CI result; the command center ACKs; 5f lands. A further pushed rebase requires the separate dated landing-conflict cue. Host configuration, cutover and fresh-session/working-day acceptance belong to their owners.

SOTA sources

Evidence-class table

Claim Evidence class Command / receipt
Documented native routing/manual/guide interfaces source_review Pinned upstream files above
Carrier rendering, protected bytes, new body pins and tool ids local_integration Existing native helpers, hashes and required modules
Permission/sequence/byte-mutant/frozen-row controls synthetic Existing tests with assertions preserved
Deployed use and token savings Pending owner evidence No model, host apply or working-day measurement in this repair

Local commands run

$ CI=true nice -n 19 ionice -c3 python3 -B -m unittest tests.test_token_lanes_session_start tests.test_token_lanes_subagent_start tests.test_scaffold_repo tests.test_new_wsl_handbook tests.test_adoption_docs_consistency tests.test_codex_agents tests.test_codex_roles tests.test_codex_worker_lane tests.test_token_e2e_preregistration tests.test_new_wsl_client_config.RecordTests tests.test_install_claude_profile tests.test_managed_block tests.test_task_model_routing tests.test_new_wsl_client_config.MapTests tests.test_new_wsl_client_config.AgentGapTests tests.test_new_wsl_client_config.RenderTests tests.test_new_wsl_client_config.ApplyTests.test_the_first_run_writes_what_the_wired_pieces_name_and_nothing_else
exit 0; Ran 595 tests in 109.929s; OK (skipped=14)

$ CI=true nice -n 19 ionice -c3 python3 -B -m unittest tests.test_install_claude_profile tests.test_adoption_docs_consistency tests.test_new_wsl_client_config.RecordTests
exit 0; Ran 150 tests in 16.306s; OK (skipped=2)

$ CI=true nice -n 19 ionice -c3 node examples/claude-native/workflows/test-envelope.mjs
exit 0; SUMMARY passed=254 failed=0 total=254

$ CI=true nice -n 19 ionice -c3 python3 -B tools/adoption/new_wsl_client_config.py --check --markdown
exit 0

$ CI=true nice -n 19 ionice -c3 python3 -B scripts/build_new_wsl_handbook.py --check
exit 0

The passing 595-test run is retained on unchanged source/assertion inputs from the pre-window checkpoint; the 150-test run checks the concrete relocation-fixture and workflows-README changes in the new main base. Their counts overlap and are not added. The fresh Node run passes 254/254. Strict checksums in both Codex directories and the Claude hook directory, plus git diff --check, exit 0. All three Amendment-4 role digests were re-derived in both copies and are unchanged from the previous published head.

$ CI=true nice -n 19 ionice -c3 python3 -B scripts/validate.py
exit 0; 69 components, 10,482 hashed files, 4 profiles, 224 receipts, status passed

The earlier landing composition used source 630b6ece8485a7710ea51321682d5a12e364e25c and hot commit 5703ef1061b982078038425fada888fd35153868; its native checks and source-critic result are retained. The authorized locator follow-up changes only catalogs/foundation/upstream-surface-dispositions.json and that file's registry row: the otel.environment citation now points to the command at examples/codex-native/README.md:214. Source commit 2b36cfee is followed by registry-last commit 9985e468fa4997d22630714b2fa6a76666e3cda9, with no further rebase. Claude/Codex instruction bytes, role hashes, historical records, namespace and byte budgets remain unchanged.

The registry starts from exact main c44993b379da25fae923dbbe70188978af5104aa, registers the same 67 changed-file rows through the native producer, and preserves main's receipt and convergence arrays. The two-file correction passed the 114-test citation module, the two exact failing methods and a second native validator run. The worktree is clean; the shifted-citation scan found no other current target to repair. Historical before/after references remain intact.

$ CI=true nice -n 19 ionice -c3 python3 -B -m unittest tests.test_upstream_surface_watch
exit 0; 114 tests, 6 skipped

$ CI=true nice -n 19 ionice -c3 python3 -B -m unittest tests.test_upstream_surface_watch.DispositionCitationTests.test_every_cited_line_names_the_key tests.test_upstream_surface_watch.DispositionCitationTests.test_a_dotted_key_has_its_parent_near_the_citation
exit 0; 2 tests

$ CI=true nice -n 19 ionice -c3 python3 -B scripts/validate.py
exit 0; integrity and scope passed

The hosted run at5703 returned two failures in11,495 tests because the documentation locator moved. A reviewed locator still gates when its repository test fails. This follow-up closes that exact contract; it adds no assertion waiver or namespace change.

Read-only overlap metadata checked all 47 open PRs, including full file pagination where needed. Source overlaps: #645, #706, #709, #754, #769, #770, #775, #776, #795, #810, #821, #826, #829. Shared registry/checksum paths use the hot-file protocol; no peer branch is changed.

Earlier failed CI at3ba ran11,381tests and failed six role-body-pin subcases; its complete failed log is retained privately. The failed 560-test and earlier 595-test preparation runs also remain retained. This repair uses a dated amendment, preserves the older source evidence and strict current-body comparison, and performs no full-suite or provider acceptance run. Validator results are integrity and scope evidence only.

Decision record

docs/decisions/2026-10-06-qmd-lexical-catalog-instructions.md and docs/decisions/2026-10-07-serena-jcodemunch-native-navigation-wiring.md, with appended clarifications and the new landing follow-up, explain the behavior and limits. The preregistration README gains Amendment4 only; its RUNBOOK and earlier sealed records stay byte-identical. No prior result is recast as a new run.

Host evidence

Repository-only change. No live instruction file, MCP registration, hook trust, client setting, gateway setting/key or model session changed. Source/render checks and synthetic fixtures remain distinct from the configuration owner's read-back and organic-use acceptance.

Checklist

  • No GitHub Actions or paid service change.
  • No credentials, raw conversations or live client configuration committed.
  • Models, effort, owner's blocks and historical observations preserved.
  • Peer-owned worktrees and source preserved.
  • Native validation passed; changed checksums/registry committed last at the final head.

@seathatflowsinourveins seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Oct 6, 2026
@seathatflowsinourveins seathatflowsinourveins changed the title docs(tokens): use keyword QMD and delegate semantic catalog search Route catalog retrieval and load native navigation policies Oct 7, 2026
@seathatflowsinourveins
seathatflowsinourveins force-pushed the codex/ns2604-skillmd-exception-20261006 branch from f0d1c6d to 305a485 Compare October 7, 2026 05:25
seathatflowsinourveins added a commit that referenced this pull request Oct 7, 2026
### Scope

Add the prescribed plain-sed SKILL.md exception so Codex can recognize a registered skill-document invocation despite the RTK blanket prefix. Preserve the six existing exceptions, add the seventh entry, and render the ten role carriers and new-WSL user-instruction copy through the repository's helpers. No role grants, model settings or host files change.

- Landing-rebase base: `e712bae606e8d27f010af8e3c13ded6b7a7c207a`.
- Head: `305a4859d06e36d54d339924389f468ed70e3de4`.
- Lane: `lane:foundation`; draft.
- Owned paths: Codex template/carriers, current render expectations and byte-count comments, README hashes and its exact upstream-surface citation, dated decision/receipt, native generated current inventory and registry/checksums.
- The one explicitly cued landing rebase retains main's local-time instruction and protected-prefix pin. Native compact/rendered sizes are 7,798/8,864 bytes. The README's `otel.environment` command and disposition both name line188.
- Main's registry was retained and exactly 23 owned rows re-registered with the repository helper. The last commit contains the two Codex checksum files, the scoped citation, the appended current generated inventory, the unchanged original receipt and the registry.

Landing path: command-center ACK at the pre-rebase `f0d1c6d04` head; the co-op/5f verify this explicitly cued landing head and CI. 5f lands #803 after #818, then #819 takes its own landing cue. This lane does not merge or apply the installed instruction file.

## SOTA sources

- [openai/codex@a956835d (rust-v0.160.0), parse_command.rs:1567-1629](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/shell-command/src/parse_command.rs#L1567-L1629) and [2708-2715](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/shell-command/src/parse_command.rs#L2708-L2715): plain numeric-range sed reads.
- [normalize_tokens:1636-1652](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/shell-command/src/parse_command.rs#L1636-L1652) and [Unknown fallback:2734-2737](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/shell-command/src/parse_command.rs#L2734-L2737): simple RTK prefixes are not unwrapped into native reads.
- [skills/invocation.rs:129-143](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/skills/src/invocation.rs#L129-L143), [core/skills.rs:153-197](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/core/src/skills.rs#L153-L197) and [exec_command.rs:254-263](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/core/src/tools/handlers/unified_exec/exec_command.rs#L254-L263): canonical registered path, per-turn deduplication and invocation event before execution. This counts an invocation attempt, not a successful full read. The prescribed recipe excludes cat/head/tail although upstream also recognizes cat.
- `native-agent-stack@305a485:tools/adoption/managed_block.py:169` (`codex_block`), `tools/adoption/codex_roles.py:287` (`f4_block`) and `scripts/host_receipts.py:710` (`register_file`); `native-agent-stack@e712bae:docs/lanes.md:94-128`: existing native rendering and hot-file protocol.
- [Current README launch:188](https://github.com/seathatflowsinourveins/native-agent-stack/blob/305a4859d06e36d54d339924389f468ed70e3de4/examples/codex-native/README.md#L188): exact `otel.environment` source locator; other owner rows preserved.

### Evidence-class table

| Claim | Evidence class | Command / receipt |
| --- | --- | --- |
| Native skill-read recognition and RTK-wrapper limitation | `source_review` | Pinned vendor source above |
| Seven exceptions, 11 rendered copies, current inventory and checksum agreement | `local_integration` | Existing native render/check helpers and required modules; original dated receipt preserved |
| Writer refusal, rollback and citation controls | `synthetic` | Existing repository fixtures and mutation controls; no upstream test acceptance claim |
| Deployed behavior | Pending owner evidence | CC applies and reads back the installed instruction file; no model run or host apply here |

### Local commands run

The six required modules ran once on the clean rebased head, under `CI=true`, umask022, nice19 and ionice-c3:

```text
python3 -B -m unittest tests.test_codex_agents tests.test_codex_worker_lane tests.test_managed_block tests.test_codex_roles tests.test_new_wsl_client_config tests.test_upstream_surface_watch
exit0; 562 tests / 152.864 seconds / 18 skips
python3 tools/adoption/new_wsl_client_config.py --check --markdown
exit0; current tables and inventory agree
python3 scripts/validate.py
exit0; 69 components / 10,419 registered files / 4 profiles / 224 receipts
sha256sum --check --strict SHA256SUMS
exit0 in both adoption/agents/codex and adoption/agents/codex/workers
python3 scripts/component_matrix.py --write
exit0
python3 scripts/new_host_grand_list.py --write
exit0
git diff --check
exit0; final worktree clean
```

Validation ran on the final source bytes before continuing the last evidence commit; those inputs remained unchanged through commit and the module run. Full hosted CI at this new head remains the owner’s acceptance step. Complete local output is durable under `lanes/codex-token-parity-work/803-20261007/`; no new model, provider or GPU run is claimed.

The same single rebase had two expected conflict stops: owned descriptive byte comments, then the shared registry. The comments now use native renderer counts while preserving main's pin and assertions; the registry resolution uses main plus native registration. No second rebase, abort or reset. Earlier failed import/fixture-mode/hash runs and earlier CI citation failures remain in the dated receipt and durable logs.

### Decision record

`docs/decisions/2026-10-06-codex-skill-read-exception.md` records evidence, alternatives, limits and the upstream change that would overturn the recipe. The client-configuration record's new dated inventory is appended; its decided text, main's addendum and the original observed receipt are preserved.

### Host evidence

No `evidence/hosts/` change, native model run, installed instruction-file edit, RTK hook/configuration edit or client apply. The command center owns host application after acceptance. Local integrity and synthetic tests are separate from deployed-client acceptance.

### Checklist

- [x] No workflow/action or role-grant change.
- [x] No credentials, raw conversations or active client configuration committed.
- [x] No paid service or dependency.
- [x] Other owners' branches and worktrees preserved.
- [x] Main registry retained; native own-row registration and checksum/registry last.
Base automatically changed from codex/ns2604-skillmd-exception-20261006 to main October 7, 2026 06:56
Use the existing manual and current-policy routes, preserve role models and fixed byte budgets, and add grant/first-call controls with dated integration evidence.

Sources: oraios/serena@c6fbd1c5 src/serena/tools/workflow_tools.py:28-40; jgravelle/jcodemunch-mcp@d94049d0 src/jcodemunch_mcp/server.py:446-463,4724-4752.
Replace the reviewer/builder legacy enumeration with the guide, actual-model route and granted read-only action sequence; extend all-consumer ordering and no-menu controls without changing grants or budgets.

Source: jgravelle/jcodemunch-mcp@d94049d0 src/jcodemunch_mcp/server.py:446-463,4724-4752,7041-7050; native-agent-stack@aa4250a9 adoption/hooks/claude/token-lanes-subagent-start.py:18-20,37.
@seathatflowsinourveins
seathatflowsinourveins force-pushed the codex/ns2604-qmd-instructions-20261006 branch from 3ba087b to 5703ef1 Compare October 7, 2026 09:32
@seathatflowsinourveins
seathatflowsinourveins marked this pull request as ready for review October 7, 2026 11:06
@seathatflowsinourveins

Copy link
Copy Markdown
Owner Author

Claude session native-agent-stack-5f: landing at head 9985e468fa4997d22630714b2fa6a76666e3cda9. The command center (wsl-architecture-design) gave its ACK at this exact head; under the user's 2026-10-04 decision it owns merges that touch the hot registry. The read-only cross-family review (GPT-6.1 Sol max, the packaged Codex SDK worker) returned ACCEPT at this exact head, with no P1 item.

Observed main c44993b379da25fae923dbbe70188978af5104aa. coordination/merge_tree_landing_check.py (sha256 a11649fcf2e5844c…) exit 0:

main c44993b379da25fae923dbbe70188978af5104aa head 9985e468fa4997d22630714b2fa6a76666e3cda9 base c44993b379da25fae923dbbe70188978af5104aa merged-tree 5dc9d7bf9edc293f25fe69d2a509aaa70cc213e8 merge-tree-exit 0
ok   1: clean three-way merge
ok   2: merged-vs-main paths 68, outside PR-owned 0 []
ok   3: main drift 0 paths, overlap with PR-owned inputs (registry excluded) []
ok   4: registry foreign rows equal True, order preserved True, PR-owned rows 67, unowned top-level keys differing []
ok   5: merged files[] sorted by path with no duplicates: True (10482 rows)
LANDABLE
condition 5: merged files[] sorted and unique (tree 5dc9d7bf9edc293f25fe69d2a509aaa70cc213e8)

Required checks at this head: 7 pass . Unresolved review threads: 0.

@seathatflowsinourveins
seathatflowsinourveins merged commit a5f4db9 into main Oct 7, 2026
25 checks passed
@seathatflowsinourveins

Copy link
Copy Markdown
Owner Author

Claude session native-agent-stack-5f: post-merge observation. Landed as a5f4db9e6c9376a8d4b060bc82caaf0dba9068e5 (parent c44993b379da25fae923dbbe70188978af5104aa), tree 5dc9d7bf9edc293f25fe69d2a509aaa70cc213e8. The landed tree equals the checked merged tree and the parent is the observed main.

@seathatflowsinourveins
seathatflowsinourveins deleted the codex/ns2604-qmd-instructions-20261006 branch October 7, 2026 11:06
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T11:18:46.093687Z 9985e46 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9985e468fa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- For large selected text, use headroom_compress, then headroom_retrieve for recovery; require fidelity and count the recovery cost.
- For output over ~5 KB, use ctx_batch_execute or ctx_execute with intent (indexes output; returns only titles/previews), then ctx_search; print derived answers, keep failures and original-output recovery. Pass ctx_execute cwd = your working directory for every language; without it, non-shell code runs at the server's project root (the coordinator's checkout) and its writes persist. Rust runs in temp; use absolute project paths. Read authorized scratch in ctx_execute Python; ctx_execute_file enforces project boundaries (#852). Never bypass permissions.
- Automatic RTK: Bash with $(...), backticks, <(...), a redirect to a file or a heredoc is never rewritten. && chains and multi-line blocks are rewritten segment by segment. Pipelines rewrite a supported producer feeding cat/head/tail (git diff | head -n 5) or final grep/rg, but not gh (gh pr view 1 | head -n 5 is not rewritten). Run heavy reads separately. Never directly prefix rtk before `git show REV:path`, `diff`, `git branch`, `git log`, `jq`, `cd`, or `find` on a possibly-missing path. Use native commands or `rtk proxy <cmd>` for exact bytes/exit status.
- Use Serena initial_instructions once per session before Serena navigation to read its manual; project-from-cwd autoactivates; switches need returned session_id. Then find_symbol / find_referencing_symbols; jcodemunch route(task, repo: ".") (no execute), menu(query?), order(action, own args) on indexed repos; first order(action="jcodemunch_guide",args={}); open route(task=...,model=<actual caller model>). Missing index: owner. socraticode codebase_search(query, projectPath) with explicit projectPath for concepts. Open original source before judging or editing.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Put the guide before every route call

For the default and stack-researcher SubagentStart paths, this line still presents the legacy route(task, repo: ".") call before saying to call the guide “first.” An agent following the instruction in order can therefore invoke route without first loading the current policy and without the newly required model=<actual caller model> argument, contrary to the guide-first sequence in docs/decisions/2026-10-07-serena-jcodemunch-native-navigation-wiring.md:22-23. Remove or move the legacy route example so the first route mentioned is the typed call after jcodemunch_guide.

AGENTS.md reference: AGENTS.md:L32-L32

Useful? React with 👍 / 👎.

Comment on lines +285 to +286
| `stack-researcher.toml` | `9578c60c279d1e319935ba2ab25e4157176446a1a7011df94a6a81c51e0ad3d3` |
| `stack-verifier.toml` | `f4b32e5a8f480f80ac57c30b611a1a2d161780d15fd0fc99f10398ce0a93cda3` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Mark the J819e digests as historical

This section calls itself the “current binding,” but both listed digests are stale: the committed carriers hash to 1c76164a... and 77c08cf1..., which are already recorded in the final #819 table above. An operator using this later table to verify an installed carrier will incorrectly conclude that the shipped files were modified; relabel these rows as the pre-landing J819e snapshot or replace them with the actual current hashes.

AGENTS.md reference: AGENTS.md:L18-L18

Useful? React with 👍 / 👎.

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