feat(orchestrator): ship the A/B-tested persona restructure - #611
Merged
Conversation
Ports the tested candidate persona (issue #609 A/B test, n=1/cell, directional but zero observed regression on 11/11 hard requirements across both arms) into core/surface/ORCHESTRATOR.md: hard rules moved to the head of the document, a rationalization guard and a letter-vs-spirit rule intercept gate-skipping (excuse table), the asking discipline now explicitly governs tier-2/tier-3 redirects so a candidate list never ships without a recommendation, and a suspicious gate is diagnosed before any bypass. Canonical section numbers are kept so existing cross-references (ORCHESTRATOR §3, §7) stay valid; only the physical ordering changed. Host-conditional Paths/Commands blocks (claude/codex/pi) are restored around the candidate's claude-only text, with the codex/pi host-notes load instructions preserved verbatim. The persona's old §1 (Activation & startup: "present it, then await a command" + the two uninitialized-repo routing rules) is deleted. Both were already carried by session-start.py's own emitted briefing (the routing rules since #257-era work, the presentation line since 2026-07-12) — no hook production change was needed, only tests that pin the behavior via a fake host with distinct command spellings so a hardcoded-claude-string mutant cannot pass. One deviation from the tested text: a line-break was moved within the "routing gap" paragraph so that phrase stays on one line (zero word-level change) — the candidate's own wrap split "routing" and "gap" across a newline, which broke test_routing_and_cleanup_surface.py's substring check on all three hosts. CHANGELOG: the orchestrator persona is restructured on measured evidence — hard rules lead the document, a rationalization guard and letter-vs-spirit rule intercept gate-skipping, every user-facing ask leads with a recommendation and its strongest counter-case, a suspicious gate is diagnosed before any bypass, and startup instructions moved into the SessionStart briefing Claude-Session: https://claude.ai/code/session_01QjJeSbcwPHwMmd6CEZeagB
Four-surface version bump for the #609 persona restructure (payload change to plugins/ca, plugins/ca-codex, plugins/ca-pi): ca 2.11.5 -> 2.11.6, ca-codex 0.4.4 -> 0.4.5, ca-pi 0.2.4 -> 0.2.5, root package.json regenerated via tools/build-host-packages.py. CHANGELOG.md and plugins/ca-pi/CHANGELOG.md gain matching entries; README's version badge and codex-ships line updated to match. Claude-Session: https://claude.ai/code/session_01QjJeSbcwPHwMmd6CEZeagB
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This was referenced Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the A/B-tested orchestrator persona candidate (issue #609) into
core/surface/ORCHESTRATOR.md:## §3 — Hard rules, physically first).## §0 — Non-negotiables), with the excuse -> reality table (5 named excuses, e.g. "It looks good.", "Too small for the lane.", "The suite was green earlier.").## §0.1).## §7).## §1 — Activation & startupis deleted from the persona; its instructions ("present it, then await a command" + the two uninitialized-repo routing rules) were already carried bysession-start.py's own emitted briefing — confirmed viagit blame(routing rules pre-existing, presentation line since 2026-07-12) — so this ships as tests only, no hook production change. §1's third bullet ("repos without the flag never load this persona") is dropped outright — it's self-evident from the hook's own dormancy path and has no new home.Canonical section numbers are preserved (§0/§0.1/§2/§3/§4-§5/§6/§7) so existing cross-references stay valid (
ORCHESTRATOR §3indecision-lifecycle/SKILL.md,ORCHESTRATOR §7indev-mode.md,§6 redirectinCOMMANDS.md) — only the physical ordering changed to match what was tested.Render-diff summary (Part 1.5)
diff persona-B.md plugins/ca/ORCHESTRATOR.mdshows exactly:§0 — Hard rulessection into canonical§3(the MUST/MUST NOT bullets) +§0(the letter-vs-spirit sentence + excuse table) — a---+ new heading inserted, per the template's existing "---between numbered sections" convention.test_routing_and_cleanup_surface.py's substring check on all three hosts. Zero word-level change.No other differences. Host-conditional Paths/Commands blocks (claude/codex/pi) were restored around the candidate's claude-only text — verified byte-identical to the candidate for the claude render (they don't even appear in the diff), and codex/pi's host-notes load instructions (
codex-host-notes.md,pi-host-notes.md) and thedev-mode.md/SPRINT.mdload instructions survive on all three hosts.Test results
python tools/build-surface.py --check/python tools/sync-core.py --check: both OK.python -m pytest .github/scripts/test_build_surface.py -q: 40 passed.python .github/scripts/test_routing_and_cleanup_surface.py: 19 passed (pins §6 content on all three hosts).python .github/scripts/test_ux_conversion.py: 8 obligation groups green.NO_COLORunset): 10 failed / 1301 passed / 130 subtests. The 10 failures are the pre-existingtest_git_hooks.py/test_repo_resolution.pyworktree-enforcer-path failures — measured on a cleanorigin/maincheckout before any edit in this branch (10F/1298P/130 subtests); +3 is exactly this PR's new tests, no new failures.git diff --check: clean.base...HEAD):check_badge_consistency.pyOK;test_release_trace.py29 passed;payload_version_gate.py --plugin plugins/ca2.11.5 -> 2.11.6 OK;payload_version_gate.py --plugin plugins/ca-codex0.4.4 -> 0.4.5 OK;build-host-packages.py --check --release-guard-base origin/main0.2.4 -> 0.2.5 OK.Coverage union <os: windows-latest>failed once onfarm-dist.test.ts > completes green against the loopback API— a 5000ms per-test timeout on a Windows runner where sibling tests in the same file took 25s and 44s. Reran viagh run rerun --failed; green. This PR touches no JavaScript, nofarm.*source, and no vitest configuration, so the bundle test's timing is outside its blast radius.Mutation proofs
New
TestStartupInstructionsHostAwareinplugins/ca/hooks/tests/test_session_start.py(3 tests), each against a fake host with distinct command spellings so a hardcoded-claude-string mutant can't pass:test_initialized_repo_presents_state_then_awaits_a_command-> red, then reverted -> green.cmd_ref('create-context')<->cmd_ref('decompose')): bothtest_uninitialized_repo_with_source_routes_to_create_contextandtest_uninitialized_empty_repo_routes_to_decompose-> red, then reverted -> green.Both mutants applied to
core/pysrc/session-start.py, synced viatools/sync-core.pyinto the vendored copy the tests import, then reverted withsync-core.py --checkconfirming a byte-identical restore.Part 2.3 finding
Both §1 instructions were already implemented in
session-start.pybefore this PR — the uninitialized-repo routing rules (git blameshows pre-#609 era) and the "present this state, then await a {command}" line (blamed to commiteee3949e3, 2026-07-12). No hook production code changed; only tests were added to pin the behavior now that it's the persona's sole carrier of that instruction.Closes #609
https://claude.ai/code/session_01QjJeSbcwPHwMmd6CEZeagB