Skip to content

Agent orchestration v1: three-party loops, agentic settings, spawn knobs, mission-control fixes (L8-L18, mcp-v3.0.0rc3)#100

Merged
Foxfire1st merged 28 commits into
mainfrom
ar/260703_agent-orchestration
Jul 7, 2026
Merged

Agent orchestration v1: three-party loops, agentic settings, spawn knobs, mission-control fixes (L8-L18, mcp-v3.0.0rc3)#100
Foxfire1st merged 28 commits into
mainfrom
ar/260703_agent-orchestration

Conversation

@Foxfire1st

Copy link
Copy Markdown
Owner

What this lands

The 260703_agent-orchestration series — the v1 multi-agent orchestration system, built and reviewed through the very loops it defines (28 commits, ~39k insertions):

  • Three-party loop doctrine (L12): owner → builder → adversarial reviewer at every level, complexity tiers, hard 3-round cap with convergence rule, criteria catalogs with a promotion ratchet (two criteria promoted to standing during this series' own reviews), spawn-first STRATEGIST as the mandatory sprint planner.
  • Two-layer agentic settings (L13): global + repo-local system/settings.json, leaf-key deep merge, fail-loud on unknown keys, gateDelegation boot authority.
  • Spawn knob application + open harness registry (L16): per-harness effort/model wiring (argv + session-vehicle delivery), free-form escape hatch (launchArgs/sessionCommands/promptKeywords), unknown harnesses teachable via settings instead of crashing; docs/reference/harnesses.md manual.
  • Dashboard long-session memory (L15): stable-form SSE deltas + ETag/304 + change-gated store — 1.6 GB OOM tab fixed to a flat ~150 MB.
  • Notes reader v2 (L17) + visual command hierarchy (L14): coordination notes on the file-viewer chrome; orchestration/master/leaf rank insignia + grouped chats.
  • Review fix batch (L18): seven findings from the pre-release ten-lens opus workflow review, each with failing-first regressions (incl. the HIGH remove_subtask false-error, the worktree_start reconciliation recovery, UTF-8 boundary truncation).
  • Notes surface API (L9), hangar worktree-truth rules (L11), lifecycle convergence + BLOCK recovery (L10), onboarding/knowledge-promotion groundwork.

Verification

Every leaf landed through a full loop: builder report → adversarial review (opus) → owner folds → delta-verify, with closeout body gates on onboarding. Verdicts + reports live in ar-coordination tasks/agents-remember/260703_agent-orchestration/notes/reports/. Final state: mcp pytest 1628 passed / 3 skipped; dashboard 435 passed; ruff, pyright, build, sync checks clean (also enforced by the pre-push hook on this branch).

Release tag: mcp-v3.0.0rc3 on the head commit. Paired memory-repo branch: ar/260703_agent-orchestration in the memory repo (carryover follows the merge).

Post-merge plan: memory carryover → publish rc3 → flip workspace MCP configs to the uvx install path → nine-master orchestrated stress test on the released runtime.

🤖 Generated with Claude Code

Readone Mohamed and others added 27 commits July 4, 2026 09:50
…ev/flows

Orchestration L0 (260703-L0): FlowTab becomes a pure segment renderer with a
radiogroup model nav; content externalized to the new flowModels.ts registry
carrying 8 static models (build-job, frame, designer, orchestrator, manager,
worker, reviewer, comms) that encode the orchestration series' agreed
invariants. Mounted dev-only at /dev/flows (initialModel + ?model= deep link);
FlowTab.test.tsx asserts nav, fallback, per-model render census, and the
invariant texts verbatim. Shipped dashboard bundle rebuilt and synced.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjabEc4oGWv5VB1x9eyYtY
…s variants, report templates

Orchestration L1 (260703-L1): the behavior layer as doctrine. SKILL.md carries
the frame (context -> job selection -> housed execution -> wrap-up), the
never-self-spawning entry rule, the coordination-leaf convention, the
escalation ladder, the two adversarial seams, gate-delegation doctrine, the
knob block + per-harness variant resolution, and the settings orchestration
schema. Jobs: designer / orchestrator (sole spirit-test carrier) / manager /
worker / adversarial-reviewer, plus claude-code exemplars for orchestrator and
worker. Six report templates. Synced to all starter packages via
scripts/sync-skills.py; runtime code (spawn tool, comms, gate enforcement,
config parsing) stays deferred to L2-L5 as referenced contracts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjabEc4oGWv5VB1x9eyYtY
…existing session primitives

Orchestration L2 (260703-L2): orchestrators spawn managers and managers spawn
workers without dashboard clicks. A shared serving/terminal_opener.py backs
both the dashboard opener route and the tool (leaf claim before spawn,
env-seeded tmux ensure, catalog upsert); serving/terminal_paste.py adds
server-side echo-confirmed paste behind POST /api/terminal/{session}/paste;
knob passthrough rides tmux -e env seeding (AR_SPAWN_MODEL/AR_SPAWN_EFFORT,
CLI-flag mapping deferred to the role-knob layer); spawned-by provenance lands
on the catalog row; 409 leaf-taken is surfaced, never overridden. Strict
pydantic response contract; tests incl. test_spawn_agent_session.py; full
quality wrapper green (1411 passed, 0 CRAP threshold breaches).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjabEc4oGWv5VB1x9eyYtY
… turn artifacts, nudges

Orchestration L3 (260703-L3): inbox rows gain sender/recipient role addressing,
message kinds, artifact paths, and hosted delivery state; serving/
inbox_delivery.py pushes queued messages into hosted sessions over the L2 paste
seam while durable polling stays the source of truth. Fixes the L2 paste
false-positive during harness boot (retry over the boot deadline; delivered
only on a real pasted-draft/chip echo — regression-tested, the defect the first
live spawn dispatch exposed). Adds orchestration artifact helpers (turn-report
paths, master-handover rendering, one-rung escalation packets) and the
rate-limited nudge policy with observer orchestration.nudge events +
orchestration_nudge_manager. Skill worker/template conventions updated in the
canonical tree + all synced packages. Full suite 1418 passed; wrapper exit 0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjabEc4oGWv5VB1x9eyYtY
… with attributed decisions

Orchestration L4 (260703-L4): controlplane/gate_policy.py defines the validated
delegation schema — all-human default, strictly opt-in, human-pinned kinds
(integration-approval, push-approval, cleanup-approval) never delegable, and
silently-weakening policies rejected at validation. evaluate_closeout_gate
generalizes into the kind-generic evaluate_gate(policy=...) resolver; gate
records/payloads carry decidedBy/decidedVia/decidingRole + append-only
evidenceRefs; owner self-approval is server-rejected before append; reviewer-
verdict requirements are enforceable per policy; projection exposes the
delegated-decision fields (GateResponder render polish deferred). Delegation is
additive: human approvals stay valid everywhere. Wrapper exit 0 post-merge with
the landed L3 comms layer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjabEc4oGWv5VB1x9eyYtY
…atch order, conflict modes

Orchestration L5 (260703-L5): the l-02 skill carries the full branch topology —
super off main, masters off super, leaves off masters, C-11 at every edge —
plus dependency-ordered manager dispatch, parallel-master reconcile over a
moved super base, the orchestrator master-to-super integration worktree
procedure (now also in jobs/orchestrator.md), the two conflict-resolution
modes, leaf-move decision logs, the memory-ledger invariant, and the final
super-to-main PR landing tail. Master finalize/archive + parallel-master
reconcile tooling explicitly SEQUENCED to 260703_task-doc-tooling-repair T8/T9
(the archived 260630 backlog's new home) — manual orchestrator duties until
then. Doctrine-only: no Python changes; skills synced to all targets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjabEc4oGWv5VB1x9eyYtY
…nce attachment procedure

Orchestration L6 (260703-L6): jobs/adversarial-reviewer.md gains the
MASTER-EXIT and SUPER-EXIT rubrics (scope packets, completion vs task docs,
tools.md quality, onboarding-vs-code, refute-or-confirm posture, decomposable
fix-leaf rules); templates/verdict.md splits into the two seam variants with
ranked findings, pass/pass-with-notes/block, and the exact reviewer-verdict
gate evidence ref shape; SKILL.md documents the seam procedures (manager
spawns at master-exit, orchestrator at super-exit, verdicts land in series
notes/reports/ and attach via the L4 evidenceRefs). No Python glue added —
the existing GateEvidenceRef / require_reviewer_verdict contract suffices.
Doctrine-only; skills synced to all targets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjabEc4oGWv5VB1x9eyYtY
The master change-set read 0 for every in-flight series: it diffed the
master base against the source-branch tip (main) while the series
commits live on the work branch until the final PR lands. A shared
_series_tip resolver now prefers the live work branch and falls back to
the source branch once the series has landed; master_changeset and
master_file_diff use the same resolved tip so counters and file view
cannot drift. Regression tests cover the in-flight and landed shapes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjabEc4oGWv5VB1x9eyYtY
Lifecycle and job are one entity: each agent type runs its own
self-contained lifecycle. One skill folder replaces both
l-01-session-job-lifecycle and l-02-agent-orchestration: SKILL.md is a
three-condition router (AR_SPAWN_ROLE -> role brief -> orchestrator)
plus the minimal frame; the orchestrator lifecycle absorbs the old
session-job spine with solo work as the degenerate portfolio and is the
topology's single home; the worker is rewritten positively (no l-01
references, closeout/integration stripped to the owning seat, brief as
session start); lenses.md replaces job-variants; templates gain
worker-brief.md (the institutionalized dispatch packet) and the
relocated deep-research-report.md. Code edges: orchestration_artifacts
template root, next_step rundown wording, abandon/reducer comments.
Four c/w skill references updated; all mirrors synced and pruned.

Design record: tasks/agents-remember/260703_agent-orchestration/notes/
design-lifecycle-convergence.md (12 findings, merge map, S4 rulings).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjabEc4oGWv5VB1x9eyYtY
The reopened convergence pass gets the orchestrator's shape right: an
event loop over durable portfolio state (opening move: trust checkpoint
+ portfolio orientation) routing into Design (the designer hat, pulled
inline — the designer is a hat, not a seat), Portfolio (bulwark +
reshape + the planner master; ordered-list renumbering doctrine), and
Orchestrate (super-branch INTENT creates a branch only; the
orchestrator worktree exists per master-to-super integration edge).
The invariant ladder — approved task doc, then branch, then worktree
only where something is built — replaces the transplanted
worktree-first ordering; chat is never a build route (260628 T7); the
failed-deliverable rule (task_reopen + reshape, never redo siblings)
and the hat-collapse rule (manager hat in flat runs, hands-on at
session scale) are encoded where the seats read them.

Design record: tasks/agents-remember/260703_agent-orchestration/notes/
design-orchestrator-routes.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjabEc4oGWv5VB1x9eyYtY
…roles

Harness abilities are capabilities, not vendor features: the two
.claude-code.md overlays are deleted and their content generalized into
capability-conditional sections of the portable files — the
orchestrator gains "Sub-Agent Fan-Out (any harness that has it)"
(durable reports + compact summaries, AR mutations stay in the main
loop, concurrency-capped, sequential fallback without the ability) and
the worker gains the read/search-scoped equivalent with the
never-delegated turn report. SKILL.md drops the per-harness variant
layer: resolution is role-file defaults < settings.json orchestration
block; harness preference is deployment configuration, and no
per-harness role files exist by design.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjabEc4oGWv5VB1x9eyYtY
The 17-finding review (notes/reports/260705-lifecycle-suite-adversarial-
review.md) lands per the developer's rulings. AR-1: the master-exit
handover gate is the new delegable GateKind master-handover-approval —
the manager RAISES it with the reviewer verdict attached, the
ORCHESTRATOR decides (human review concentrates at the super gate);
identity mechanics documented; requireReviewerVerdictAtSeams is WIRED
(apply_seam_verdict_requirement binds delegated seam rules to verdict
evidence — AR-5). The reviewer file is roles/reviewer.md (server
vocabulary; spawn value stated everywhere — AR-3); the router decides
its edge cases in writing and templates gain manager-brief.md (AR-12);
the manager loop names the human-pinned kinds (AR-4); the lenses chat
remnant, dead variant rungs, retired vocabulary, dangling refs, and the
six-signals phrasing are swept (AR-2/7/9/15/16); hat-collapse gains the
gate-reversion clause (AR-6); the hat/seat exception is stated (AR-8);
takeover has an owner (AR-10); the rundown speaks the event loop
(AR-13). The FlowTab canvas is redrawn to the converged doctrine —
ROUTER in, FRAME/BUILD-JOB out, all role models on the ruled semantics
(AR-14) — visuals now ride every doctrine change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjabEc4oGWv5VB1x9eyYtY
… enforcement

Review round 2 (notes/reports/260705-lifecycle-suite-adversarial-
review-2.md) proved the ruled seam deadlocked as-built (AR2-1) and had
no enforcement consumer (AR2-2). This cycle lands the channel:
lifecycle_gate gains wait=false — raise-and-continue, allowed only for
kinds the active policy delegates — returning the gateId the handover
packet now carries (new packet row); gate_decide resolves a bare gate
id across lifecycles (GateStore.find) so the orchestrator decides by
the packet-carried id without ever handling a lifecycle id, and refuses
cli-attributed decisions on delegated kinds (fail-loud instead of the
policy bypass); worktree_integrate refuses while a master-handover-
approval gate exists undecided or policy-invalid (mirror of the
closeout consumer); seven SeamChannelTests exercise the flow
end-to-end. Doctrine follows: manager.md states the exact raise-then-
packet channel, orchestrator.md names the decide call and gains the
Profile check (takeover) the AR-10 pointers referenced, the router/
capability sections state the spawn-as-fan-out backdoor (the framework
is the harness-independent fan-out — the DBMS principle), reviewer/
designer knob rows gain the inbox, worker-brief carries the canonical
ROLE BRIEF header, settings-json.md documents the extended named
policy, and the remaining round-2 nits are swept.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SjabEc4oGWv5VB1x9eyYtY
…ion (AR3-1..AR3-6)

worktree_integrate_tool now passes the configured gate policy and the
integrate guard addresses master-handover-approval gates by MASTER identity
(enclosure = master task name) folded cross-lifecycle via GateStore.all_current(),
closing the inert-consumer MAJOR from adversarial review 3. wait=false raises
validate-then-mutate and are restricted to seam gate kinds; gate_list defaults
to the ambient lifecycle; manager doctrine carries enclosure on the raise plus
the all-human conditional; c-09 names the handover-gate-blocked state; canvas
seam nodes, manager-brief planner-master slot, and handover-packet manager row
ride along.
A master-handover-approval raise-and-continue now refuses a missing
enclosure before any store mutation, and integrate surfaces open-but-
unmatched handover gates as a spelling-check warning while staying
additive when gateless. Dry-run evaluates the seam guard and reports
would-block without persisting contract state. The canvas raise node
names the enclosure address, the panels overview claims exactly what
the canvas draws, and the l-01 template registry lists all nine
templates.
GET-only /api/notes/{list,read} with repo allow-listing, single-segment
master validation, and realpath confinement (registered before the greedy
static mount); the TaskNotes panel lists a master's notes and renders
opened notes through the shared Markdown treatment; task-doc references to
notes files resolve into openable links. Review follow-up L9R-1: ValueError
from Path.resolve() (null-byte input) maps to 400 bad-path in both the
notes and files status mappers, with regression tests in both suites.
EnclosureNode gains codeWorktreeExists/memoryWorktreeExists, stat'ed at
snapshot time; the Hangar and the tasks list filter on physical existence
via the shared hasLiveWorktree rule (a reopened leaf stays hidden until
worktree_start recreates its worktrees), and each leaf renders exactly one
row (one-row-per-enclosureId with deterministic lastEventTs annotation).
Review follow-ups: the rich sim fixture builder materializes the worktree
dirs its live contracts record (regression suite added), and the anchor
fallback annotation is order-independent.
The l-01-agent-lifecycles skill is the single public truth: the dead
orient→ground→frame→decide axis, retired skill names, l-02 contact-point
language, and the chat-build intake are swept from living docs, templates,
and ALL TEN first-action surfaces (four hooks + Gemini/Hermes/OpenClaw
starters + the Pi extension + Cursor rules + Copilot instructions, each
byte-consistent with its package hook so the install-doc quotes stay
true). Chat is never a build route: single-session work rides a thin
w-02 doc (c-09 intake, w-02 prose, FAQ). Canvas residual: the designer
node's stale phase word. server.py front-half docstring joins the sweep.
…op law

The owner→builder→reviewer loop is a first-class lifecycle feature at every
level that owns work. NEW: roles/strategist.md (spawn-first sprint planner,
MANDATORY before any orchestrated run: eight-phase method — inventory,
two-sided touch surfaces incl. greenfield-by-declaration, cgc/grepai
dependency edges with evidence, blast-radius register feeding loop-tier
scoring, coherence sweep, topological ordering — producing the ORCHESTRATION
TASK = the sprint scope); templates/orchestration-task.md (shown-work
schema); five criteria catalogs under criteria/ with the promotion ratchet
(candidate at 1 catch, standing at ≥2, gate when mechanizable). Loop law in
SKILL.md: complexity tiers (direct/builder-verified/full), hard 3-full-round
cap with delta-verifies exempt, the CONVERGENCE rule (a non-shrinking round
escalates regardless of count), same-builder/same-reviewer reuse, quo-vadis.
Orchestrator super-exit rewritten per the developer ruling: integrations are
orchestrator-delegated; the developer reviews ONCE at the super PR gate with
a REVIEWABLE ENVIRONMENT, visible-behavior-first, demo notes obligatory.
Canvas gains the strategist model (8); server roles gain strategist.
New kernel/agentic_settings.py: per-use read of the GLOBAL
ar-coordination/system/settings.json merged with <repo>/system/settings.json
(leaf-key deep merge, arrays replace, orchestration.* unknown keys fail loud
naming the offending file). The L12 knob schema finally parses: loops, role
knobs, concurrency caps, spawn harness preference (registry-validated;
explicit > repo-local > global > detection, refusals name their source).
gateDelegation migrates to the global file (boot snapshot; authority-file
value = one-cycle warned fallback; repo-local values REFUSED — gate posture
is workspace-wide, and validate-then-ignore would be fail-open). The old
implicit provider-settings fallback (fail-open: empty config on missing
file) is removed; memorySettingsIncludes dead plumbing removed;
contextProviders documented as a reserved future family. c-13 gains the
agentic-settings interview; runtime_install seeds the global file
copy-if-missing; settings-json.md is the single schema reference.
The developer-picked V4 treatment lands as one insignia language: a shared
RankBadge chevron component (gold three-chevron under a command pip for the
orchestration tier, purple two-chevron for management; six new OKLCH tier
tokens) worn by the tasks tab AND the chats pane. Tasks tab: orchestration
rows (master-kind docs with the new additive `orchestrates` field) render
the folded-corner/ghost-wash treatment above their commanded masters with
N-depth nesting and a cycle guard; flat runs render exactly as before (D3).
Chats pane: the G1 command tree — a sprint deck of command chats grouped by
the new persisted spawnRole provenance, master groups by leaf claim
(grouping-always, owner-ratified), and a landed archive roll-up. task_doc,
projection, and the sessions wire carry the two new fields additively.
The long-session OOM's real driver (measured, not assumed): five volatile
now-relative age fields defeated the SSE diff every tick, re-emitting the
whole analytics payload (~780 KB/s idle). The delta stream now diffs
stable forms (VOLATILE_AGE_FIELDS stripped; served ages advance locally
from arrival anchors), /api/state honors If-None-Match with a content
ETag, and the client store is identity-preserving and change-gated —
idle wire traffic is zero bytes and getState() identity is stable across
ticks (500-tick guard test). tokenSeries is decimated serving-side (512
cap, newest 256 exact; the log untouched). A reflection guard classifies
every *Seconds projection field as volatile or content so one-sided
lockstep drift fails loudly. The dashboard shows its serving build
(commit + boot time) so a stale server is visible at a glance.
…egistry

AR_SPAWN_MODEL/EFFORT now map onto the harness argv through the registry
(claude: --model/--effort; effort value `ultracode` delivers as a
"/effort ultracode" session paste submitted BEFORE the role brief), with
dispatch-time refusals naming the harness and both value sets — the CLI's
warn-then-silently-degrade is unreachable, and the opener re-validates as
defense in depth. The registry becomes good defaults, not a wall: the new
orchestration.harnesses settings family adds hermes-style harnesses or
pre-customizes builtins with user command arrays; vocab-less user
harnesses refuse the effort knob with declare-or-launchArgs guidance.
Free-form vehicles: launchArgs (verbatim argv), sessionCommands (own
submitted pastes), promptKeywords (brief's first line) — never validated,
always in provenance. rolesPerLevel {leaf|master|portfolio} deep-merges
over flat role defaults; spawn gains a level input recorded in
provenance. docs/reference/harnesses.md is the parameters manual with a
worked add-hermes example. Scratch terminals never load the registry.
NotesReaderViewer takeover: rail = the master's notes tree from
/api/notes/list (ChangeSetViewer idiom, highlight follows selection),
content pane = DualPane reuse (markdown/text/binary all trace DualPane's
own branches — no second bespoke reader). TaskNotes reduced to the entry
surface; DetailPanel threads onOpenNotes (11 sites); CockpitShell holds
the takeover with file-viewer hidden-not-unmounted persistence.

Supplements: gateHint ask-chip fallback removed (+ regression test
pinning its absence); wait-loop-era remnant sweep — 3 vestigial surfaces
fixed, remaining ask surfaces verdicted legitimate, 2 follow-ups named
(GateResponderText dead branches, summarizeBlocked wording).

Checks: dashboard 45 files / 433 tests passed; tsc, build,
sync-dashboard --check, quality wrapper all exit 0. Adversarial review
PASS-WITH-NOTES (260703-L17-adversarial-review.md).
…chet)

code-seam CS-4 — reused-primitive affordance parity (catch: L17R-2, the
DualPane markdown path dropping the truncation banner). report-verification
RV-4 — decision-log completeness for scope-expanding supplements (catch:
L17R-1, supplement 2 recorded only in the builder report). Both single-catch
candidates per the ratchet; accepted by the loop owner in the L17 decision
log. Mirrors synced via scripts/sync-skills.py.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Snapshot of the agent-orchestration series before the end-to-end
orchestrated pilot: three-party loops (L12), settings unification (L13),
visual command hierarchy (L14), flat-memory dashboard serving (L15),
spawn knob application + open harness registry (L16), notes reader v2
(L17). The pilot runs against this packaged runtime.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
F1 (HIGH, closes F-N): TaskDocResponse declares removedSubtask/
deletedFiles/wouldDeleteFiles — remove_subtask no longer reports a false
error after destructive success. F2 (L17R-2): truncated-markdown 2-MiB
banner in NotesReaderViewer. F3 (F-A seam): inbox delivered/unconfirmed
regression pin, canonical-invocation-sensitive via the sys.path idiom.
F4: effortSessionCommand template validation in the settings kernel
(only {value}; loud refusal names file + harness). F5: decode_capped
UTF-8 boundary backscan wired into notes/files serving (+ third site).
F6 (developer-ruled): JSON null at any orchestration family key refuses
loudly ("remove the key to inherit the global value"). F7 (F-R):
worktree_start 'reconciliation' recovery implemented — ledger mapping
recorded the closeout way; recovery blocks advertise only consumable
choices.

Ratchet: RV-2 + RV-4 promoted to standing (second catches at this
leaf's review); RV-5 + CS-5 seeded as candidates; mirrors synced.

Checks: mcp pytest 1628 passed / 3 skipped / 192 subtests; dashboard
435 passed; ruff, pyright, typecheck, build, sync-dashboard --check,
quality wrapper all clean. Adversarial review PASS-WITH-NOTES +
same-reviewer DELTA-PASS (260703-L18-adversarial-review.md).

@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: 575a9a44b7

ℹ️ 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".

Comment on lines +1183 to +1185
write_ledger(contract.memory_repo_path / "memory.md", updated)
require_git(contract.memory_repo_path, ["add", "memory.md"])
commit_if_dirty(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reconcile the memory source branch before committing

When the memory repo is checked out on a branch other than contract.memory_source_branch (a case this module already accounts for via _memory_base_for_source), this writes and commits the reconciliation mapping to whatever branch is currently checked out. The rest of worktree_start still creates/uses the memory worktree from contract.memory_source_branch, so if that branch already exists the new mapping is absent from the worktree and the start reports compatible even though the branch it starts from remains unmapped. Commit the reconciliation to the intended memory source branch (or check it out/update it explicitly) before proceeding.

Useful? React with 👍 / 👎.

Comment on lines +230 to +232
launch_args=override.launch_args or base.launch_args,
prompt_keywords=override.prompt_keywords or base.prompt_keywords,
session_commands=override.session_commands or base.session_commands,

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 Preserve empty per-level list overrides

When a flat role default sets launchArgs, promptKeywords, or sessionCommands and a rolesPerLevel override intentionally sets that array to [], _parse_roles produces an empty tuple but this or treats it as absent and inherits the base value. That violates the documented array-replace semantics and causes unwanted launch args, prompt keywords, or pre-brief commands to be injected for the level that tried to clear them.

Useful? React with 👍 / 👎.

Codex P1: _reconcile_missing_mapping refuses (naming both branches) when
the official memory repo is checked out on a branch other than the
memory source branch — the mapping commit must land on the branch the
worktree is created from, never on whatever happens to be checked out.

Codex P2: an empty free-form list (launchArgs/promptKeywords/
sessionCommands) is refused with inherit guidance — RoleKnobs cannot
distinguish absent from cleared (empty tuple = not configured), so []
meant to clear a flat default would silently inherit it through the
field-wise or-merge; same silent-degrade shape as a null family key
(L18 finding 6), same refusal remedy.

Both with failing-first regressions (166 tests green in the two suites).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Foxfire1st
Foxfire1st merged commit e358c4a into main Jul 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant