Polyharness Parity — Councilled Spec (2026-07-10)¶
Council: fable tier, chairman Claude, unanimous seat ranking Grok>Claude>Codex>Gemini>Local.
Report: llm-council/reports/2026-07-10_150336_design-review-polyharness-parity--replicate.md
Systematic flaw named by council: governance must be code, not prose (allowlists, overlays, fencing, capability registry — not judgement rules in briefs).
Goal¶
Every harness (codex, agy/gemini, grok, ollama-local, odysseus) gets the Claude toolset: councils (Claude chairs theirs), code review (Claude final reviewer, with degrade path), shared memory tiers, pavlok, kerr, boards, caveman, token-roi, governor offload, SSH mesh, OneDrive dispatch queue, MCP access, docs standards (mermaid + plain/technical/business + making-of). All new code C#. Odysseus stays Python (existing product; we integrate, not rewrite).
Decisions (councilled)¶
D1. Repos — extend, don't fork¶
- NO per-harness repo forks. Config profiles in existing repos.
- ONE new C# repo: membus — thin adapter (send/recall/health) owning contracts: scope schema, per-harness write allowlists, provenance metadata, auth, tests. NOT a second memory product.
- llm-council: add first-class
--profile <name>overlay pinned per invocation (chair inversion is currently skill-prose only — BOOK-OF-TRUTH forbids editing shared config; profiles fix that). Claude chairs harness councils by default; degrade path: codex/gemini chair + audit flag when Claude unavailable or governor RED (6h-outage lesson). - fleet-dispatch: Kind is a free STRING, allowlist duplicated at
QueueService.cs:30ANDProgram.cs:186, binary if/else executor (RealJobExecutor.cs:53), Kind inside HMAC (JobSigner.cs). Replace with kind + capabilities registry (B's shape), NOT enum growth. Fix first: unknown kind slipping past enqueue falls through to pwsh path (footgun). Version skew: old listener receiving new kind must dead-letter, not crash. Signer/listener/tests move in lockstep across fleet. - token-roi: rate card ready; ledger is Claude-JSONL-centric. Build per-harness emitters/shims or governor stays blind to 4 of 5 harnesses (metrics = pricing fiction otherwise).
D2. Memory tiers — projectId namespaces on one Postgres; pub/sub NO¶
Scopes (each = projectId on claude-mem-server :37877):
- grok-house, codex-house, gemini-house, ollama-house, odysseus-house (per-family, house-wide)
- council:<pc> (per-machine council memory, short-TTL, promote durable facts → house-all)
- house-all (every model, frontier + local)
- frontier:<pc> (frontier models on one machine, optional send)
- local-llms-house (all local models, optional send)
Cross-harness memory is pull-shaped (recall at session start, write on observation). Kafka/RabbitMQ rejected — wrong scale. Valkey already in stack, has native pub/sub if live signaling ever needed (failover-flip broadcast, cache invalidation only). Upgrade path free; don't build now.
HARD requirements (council-mandated, code not prose):
1. membus validates --scope against enum; server rejects unlisted projectIds (today wrong
projectId returns EMPTY not error — silent fragmentation; agents already confuse :37777 vs :37877).
2. Per-harness write allowlists (odysseus never writes frontier:<pc>; only frontier writes house-all;
8B local models won't follow judgement rules — expect junk writes, fence them + size caps).
3. Provenance metadata on every write: origin_harness, origin_machine, timestamp, trust_level,
ttl, dedupe_key, schema_version. TTL + promotion rules per scope.
4. projectId is NOT a tenant secret (SECURITY.md:55 — Bearer is the only gate). Acceptable on house LAN;
stated explicitly.
Judgement rules ("when to send to which scope") live in brief packs as GUIDANCE; enforcement is membus/server.
D3. Failover — NO auto-flip; finish DR rollout¶
- Warm standbys via existing pg_dump-pull; finish 4-PC rollout, no redesign. Patroni/WAL rejected (scale).
- Auto-flip watchdog rejected (highest risk in design): Docker Desktop autostart resets are a known house false-positive "primary death" (bit us 07-08) → split-brain with no merge path in pg_dump model. Ship: alert + manual flip (Pavlok page). If ever automated: N consecutive failures from ≥2 observers AND fence old primary (block writes) before promoting.
- Gaps to close: failback procedure (standby writes → recovered primary); watchdog itself watched
(tie into session-watchdog/Pavlok); chromadb + Valkey + SearXNG config + ntfy topics need own
snapshot paths (pg_dump covers none of them); hourly dump = ~1h RPO (accepted, stated);
--cleanrestore blast radius; script lineage drift — root standby script embeds PG password, house copy uses env — reconcile BEFORE rollout; flip must repoint ALL harnesses' membus endpoints, not just Claude MCP; a PC counts as covered only after a passed restore drill.
D4. Brief packs — generated base + hand-edited overlays¶
- Home: this repo (
harnesses/<name>/). Formats: AGENTS.md (codex), GEMINI.md (agy), GROK.md (generated subset — do NOT point Grok at raw CLAUDE.md: references skills/hooks/tools Grok lacks), ollama system-prompt/Modelfile, ODYSSEUS-SYSTEM-PROMPT.md. - Generator (C#): source-of-truth = versioned markdown sections it only ASSEMBLES; each brief =
generated base +
## OVERLAYsections the generator never touches (preserves hand tuning). Staleness dates on generated facts. Claude reviews diff before push. CI: schema validation + per-harness smoke test (grok ~32KB arg limit, codex blind-seat class). - Tiered by capability: frontier = full 12-topic pack (overnight rules, council + council-review triggers, pavlok escalation, kerr-lens triggers, web+md boards, governor offload, caveman, token-roi reporting, SSH mesh map, OneDrive dispatch queue, MCP inventory, docs standards + making-of). Local-llm = minimal pack (council etiquette + memory scope + report format ONLY).
- Standing standards every brief carries (Andrew 2026-07-10, all harnesses):
- Language policy — C# first whenever possible; F# only if C# genuinely can't; C++ only for game/Unreal work; deviations need a stated reason.
- Session/worktree identity — permanent
WT-xxxxid at creation, living titleWT-xxxx · <ticket> · <what it does now> · gov:<orch|build|bg|ops>; update desc on every focus change viaworktree-identity update(exe on PATH, registry~/.claude/worktree-identity/registry.jsonis source of truth; tool: andrewjonesdev-tools/worktree-identity). - Board-link footer — any session with a recorded board URL ends EVERY reply with a markdown link to the live board containing its ticket. Applies to all harnesses' replies, not just Claude.
D5. Missing-for-parity backlog (council rollup)¶
- Guardrail parity — biggest unstated risk: Claude has permission modes + governor gates + hooks; codex runs sandbox-bypassed on Windows, others unfenced. Minimum: secret-file denylist + destructive-command policy enforced OUTSIDE each harness (wrapper/OS ACLs).
- token-roi capture emitters per harness (see D1).
- Machine-readable capability matrix per harness; degraded parity documented as explicit non-goals. Include an approval-mode column (Andrew 2026-07-10, frictionless approvals live on all 4 PCs): claude = settings.json allowlist (ccd_session_mgmt + SendMessage, isolatePeerMachines:false); codex/ChatGPT = approval_policy="never" (~/.codex/config.toml); agy = autoAccept:true + trustedWorkspaces (~/.gemini/settings.json); odysseus = autonomous service (N/A). Membus trust design note: unattended cross-session relays run approval-free — the injection/trust model is the standing council item (Track B #13); membus provenance (origin_harness/trust_level) is the input that model consumes. NAMING: OpenAI's Codex tool is now branded "ChatGPT" (MS Store 9PLM9XGG6VKS; CLI binary still codex.exe) — "Codex" and "ChatGPT" refer to the same harness everywhere in this spec. Consumer contract: fleet-telegram gateway (Track B item 12) must enumerate sessions across worktrees × models × harnesses × councils — Andrew's acceptance criterion 2026-07-10. The matrix
- membus provenance fields (origin_harness, origin_machine) are its discovery source; design both so a session in ANY worktree/harness is addressable, no Claude-on-main-checkout-only assumptions.
- usage-governor integration for non-Claude providers.
- Compliance smoke tests per harness.
- One trace/correlation ID across dispatch → memory → council (no OTel stack).
- Secrets/vault contract + idempotent dispatch retries.
Auth / login status (verified 2026-07-10)¶
Main PC: codex ✔ (ChatGPT), agy 1.1.1 ✔, grok 0.2.93 ✔, ollama (no auth), odysseus :7000 ✔, claude-mem :37877 ✔. Remote PCs probed via fleet-dispatch (results in dispatch outbox). Any missing codex/agy login on a house PC = interactive, Andrew does it in person (agents never enter credentials). Open item: vault the xAI cred.
Phases¶
- P1 membus — ✅ DONE 2026-07-10 (github.com/andrewjonesdev-tools/membus @35d3eb1): scope catalog + deterministic UUIDv5 projectIds, write allowlists (client, exit 3), provenance schema, per-scope project-bound API keys + keyring (server-side gate — claude-mem keys bind to ONE project), fleet-deployed to all 4 PCs w/ live cross-machine round-trips, codex review + council gate passed, CI green on home-ci. Deferred to P6: per-harness key custody, TLS. Owed: Stryker mutation pass (MB-11).
- P2 fleet-dispatch registry — ✅ CODE DONE 2026-07-10 @62ac09c (review gate + fleet rollout owed):
HarnessRegistry = single source of truth replacing dual claude|pwsh allowlist; kinds codex/agy/grok
(shell-staged temp file, stdin closed, codex sandbox-bypass, grok argv-cap) / ollama ({model?,prompt},
model shell-metachar validated) / odysseus (listener-side HTTP to 127.0.0.1:7000). Unknown-kind
fallthrough-to-pwsh FIXED: executor fails closed + queue dead-letters after HMAC verify. 82 tests;
live odysseus round-trip to self ok=True. NOTE: a concurrent session wired QueueService to the
registry mid-build (convergent, same design) — shared-checkout, watch for collision on rollout.
Detailed spec + live fleet probe (WT-c665 handoff 2026-07-10):
fleet-dispatch/docs/multi-harness-control-spec.md+fleet-dispatch/docs/multi-harness-probe-results.json. Fix FIRST: unknown kind falls through to pwsh (QueueService.cs:30 + Program.cs:186). Known state: codex on all 4 PCs (npmcodex.ps1shim on gaming/streaming — invoke via pwsh), agy stdin-close hang (< NUL), odysseus binds 127.0.0.1 → listener-side HTTP, BEDROOM-PC listener needs revival. - P3 brief packs + generator: C# assembler, overlays, tiering, smoke tests; distribute via fleet-dispatch.
- P4 councils/review profiles: llm-council
--profile, per-harness conveners, Claude-chair + degrade path; per-harness code-review skills with Claude final reviewer. - P5 DR completion: reconcile script lineages, run standby setup on 4 PCs, chromadb/Valkey/ntfy snapshots, restore drills, alert+manual-flip watchdog (Pavlok).
- P6 parity backlog: guardrails, token-roi emitters, capability matrix, governor integration, trace ID.