docs: make issue queue handoff client-neutral
Build ErsatzTV Image / Docs update reminder (push) Has been skipped
Build ErsatzTV Image / decisions.md append-only (push) Has been skipped
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (push) Has been skipped
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (push) Has been skipped
Build ErsatzTV Image / Build & push image (amd64) (push) Has been cancelled
Build ErsatzTV Image / Build & test (.NET) (push) Has been cancelled
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (push) Has been cancelled

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
2026-07-13 18:59:40 +02:00
co-authored by Codex
parent a042623a53
commit 954aff21f1
+70 -35
View File
@@ -1,31 +1,62 @@
# ChicoryTV issue-queue handoff (static kickoff + workflow lore)
# ChicoryTV issue-queue handoff (client-neutral kickoff + workflow lore)
> **PROTOCOL CHANGED 2026-07-11** (decisions.md entry of same date). Queue state lives in the
> **pinned Gitea tracker [ersatztv#237](http://192.168.1.95:3000/timothy/ersatztv/issues/237)**,
> not in this file. Do **NOT** write session state, queue order, or next-session prompts here —
> sessions ending under the old protocol should append their session comment to #237 instead.
> This file holds only the two stable things: the standing kickoff prompt and the workflow lore.
> This file holds only stable operating guidance: the standing kickoff prompt and the workflow lore.
> Historical per-session state: `git log` of this file (last state-bearing revision: 8b77d5e7).
---
# STANDING KICKOFF PROMPT (paste into a fresh session, unchanged every time)
## Orchestrator launch profile (operator-facing; do not paste)
You are the ORCHESTRATOR in the main Claude Code session — **Opus 4.8 by default** (Fable only
when the user picked it; check which model you are). Orchestration = delegation: recon →
Explore/haiku; mechanical → sonnet; judgment-heavy implementation → opus; independent review →
Codex when quota allows (`codex:rescue`) + Claude review subagents/forks.
FIRST read CLAUDE.md, docs/README.md + the convention docs it indexes, and the Lessons below.
As of 2026-07-13:
FABLE ESCALATION — these moments go to Fable, no exceptions. If you ARE Fable, handle them
inline (forks inherit your context); otherwise spawn an `Agent` with `model: "fable"` and a
SELF-CONTAINED brief (scope, exact question, file paths, doc pointers — it starts cold), or
pause and ask the user to `/model`-flip for the stretch:
- **Codex:** use **GPT-5.6 Sol, `ultra`** for the orchestrator. `ultra` is the Codex
multi-agent orchestration setting; if it is unavailable, use **GPT-5.6 Sol, `max` effort**
(`xhigh` only when you deliberately want to trade some capability for quota/latency).
- **Claude Code:** use **Opus 4.8, `xhigh` effort** (or **ultracode**, which is the Claude Code
orchestration preset built on `xhigh`). Reserve **Fable 5, `high` effort** for the frontier
escalations listed below; use `xhigh` there only when the decision remains genuinely difficult.
- If those names are unavailable, choose the client's strongest long-horizon coding/agentic model
at its high extended-reasoning setting. Do not weaken the orchestrator to a fast/mini model; use
smaller models only for bounded delegated slices when the client supports per-agent selection.
The kickoff below deliberately describes capability tiers instead of model names so it survives
model rollovers. The operator-facing recommendations above may be updated without changing the
queue protocol.
---
# STANDING KICKOFF PROMPT (paste into a fresh Codex or Claude Code session unchanged)
You are the ORCHESTRATOR in the main **Codex or Claude Code** session. First identify your client,
active model, effort/reasoning level, available delegation mechanisms, and concurrency limit.
Orchestration means: decompose, delegate independent slices, integrate their results, verify the
whole, and keep canonical issue state accurate. Use the client's native agent/subagent tools; never
assume a named tool, command, plugin, model-routing feature, or fork mechanism exists.
Route by capability when the client supports per-agent model selection: fast/small for bounded recon,
balanced for mechanical changes, and the strongest coding/agentic tier for judgment-heavy work.
Otherwise use the active model for every slice. Independent review MUST start from a cold, review-only
brief; prefer a different model family/client when one is available, otherwise use a fresh agent with
no implementation role.
FIRST read `AGENTS.md` and `CLAUDE.md` when present, then `docs/README.md`, the convention docs it
indexes, and the Lessons below. Apply both client instruction files; where they differ, follow the
stricter safety/completion requirement unless a higher-priority instruction resolves the conflict.
FRONTIER ESCALATION — these moments go to the strongest available reasoning model. In Claude Code,
prefer Fable; in Codex, prefer the strongest frontier model at extended-high reasoning. If you are
already running that profile, handle them inline. Otherwise delegate with a SELF-CONTAINED brief
(scope, exact question, evidence, file paths, and doc pointers), or ask the user to switch models when
the client cannot route the escalation. Do not block merely because one brand-specific model is absent:
- Architecture/API design decisions (e.g. #202's media-source API shape) and anything
`[PLAN-MODE]`-tagged.
- Parity verdicts for blazor-route-parity.md (per-capability diff sign-off) and #91b
removal go/no-go.
- Reconciling contradictory review findings (fork vs Codex disagree) and the final
- Reconciling contradictory independent-review findings and the final
pre-merge judgment on gate PRs.
- Stuck after two genuinely different approaches, or evidence contradicts the issue/docs.
Everything else (claiming, worktrees, dispatching implementers, CI monitoring, protocol
@@ -44,7 +75,8 @@ Then work the queue:
milestone) before trusting it — do NOT hardcode which issue is the frontier; read it. ALSO list
open `ersatztv`-labeled issues in **timothy/adversarial-reviewer** — unclaimed audits there are
pickup candidates too (read-only, parallel-safe; see the tracker's "Pending adversarial reviews"
section). If the Gitea MCP is down, hit the REST API directly (creds in your global CLAUDE.md):
section). If the Gitea MCP is down, hit the REST API directly (use credentials supplied by the
environment or your global client instructions; never print them):
`curl -u <user>:<pass> http://192.168.1.95:3000/api/v1/repos/timothy/ersatztv/issues/237`.
**The authoritative pickup + ranking protocol lives in #237's "Session protocol" section — this is a summary; if the two ever disagree, #237 wins.**
2. Pick the highest-ranked OPEN, un-`in-progress` candidate (or the item the user names). **Rank by
@@ -66,12 +98,14 @@ Then work the queue:
(`ETV_GITEA_BASICAUTH=user:pass scripts/issue-qualification-audit.sh`) and add a `priority:`
label to anything it lists (every issue you filed this session included); then ONE session
comment on the tracker (template in the tracker body, incl. triage verdicts for any new issues),
remove your `in-progress` labels, and complete the per-issue Task Completion Protocol from CLAUDE.md.
remove your `in-progress` labels, and complete the per-issue Task Completion Protocol from the
applicable `AGENTS.md` / `CLAUDE.md` instructions (including the `done` workflow when required).
HARD CONSTRAINTS:
- Work in worktrees off origin/main. Copy web/node_modules from the main checkout.
- PARALLELIZE BY DEFAULT: split the task into disjoint slices up front and run 3–4 implementer
agents concurrently (recon agents are free — always fan those out). 3–4 concurrent
- PARALLELIZE BY DEFAULT when there are genuinely disjoint slices: use up to the client's concurrency
limit, normally 2–3 delegated agents plus the orchestrator. Fan out bounded recon early, but do not
invent artificial slices or exceed a runtime-imposed agent cap. At most 3–4 concurrent
dotnet/npm builds are fine on this Mac (M4, 10 cores, 16 GB); the go/no-go signal is FREE
RAM, not CPU load (`memory_pressure -Q`: <20% free → don't launch more build agents; <10% →
pause/stagger). CPU load spikes during builds are benign. Never 5+ builds (the historic
@@ -86,7 +120,7 @@ HARD CONSTRAINTS:
linked issue, no Done-when/verdict, Gitea down). Prior pre-approvals still do NOT carry over.
- Arm a CI monitor on the PR head sha AT PR-OPEN (commit-status endpoint), not at the end.
- Live-E2E via scripts/e2e-local.sh; NEVER exercise download endpoints via browser tabs (curl
them). Adversarial review fork per PR diff, SCOPED "review only".
them). Run a cold-context adversarial review agent per PR diff, SCOPED "review only".
---
@@ -110,13 +144,15 @@ HARD CONSTRAINTS:
- Subagent connection drops = laptop sleep/transient; re-resume via SendMessage (work survives).
- Build/verify locally, then trust it; CI (VM 127) confirms (~9 min warm). Watch by commit
status: `/api/v1/repos/timothy/ersatztv/commits/{sha}/status`.
- PR routine (works): worktree off origin/main → implement (opus judgment-heavy / sonnet
mechanical; doc pointers + exact facts; csharp-lsp for C#) → API changes: build app project
- PR routine (works): worktree off origin/main → implement (strongest tier for judgment-heavy /
balanced tier for mechanical work when model routing is available; doc pointers + exact facts;
use the available C# language tooling) → API changes: build app project
FIRST then `./scripts/update-openapi.sh` then `npm run generate:api` → full local test pass
→ push, PR → fork adversarial review (SCOPED "review only") + live-E2E for UI changes
→ push, PR → cold-context adversarial review (SCOPED "review only") + live-E2E for UI changes
(`scripts/e2e-local.sh`) → review fixes as follow-up COMMITS (never amend/force-push) → CI
green → merge (consent per session) → structured close comments per CLAUDE.md protocol.
- Never run TWO committing agents on one worktree concurrently. Read-only review forks are fine.
green → merge (derived consent gate) → structured close comments per the applicable
`AGENTS.md` / `CLAUDE.md` protocol.
- Never run TWO committing agents on one worktree concurrently. Read-only review agents are fine.
- **Arm a CI monitor the moment the PR opens** (commit-status endpoint), not at the end — in the
#216 session three PR runs sat red ~an hour on a CI-only flake while review/E2E ran. (The old
MySQL host-port 3306 collision is fixed on main, `ef8915f1`; a lone MySQL-apply red now = the
@@ -140,19 +176,18 @@ HARD CONSTRAINTS:
branch without touching their checkout: plumbing merge (`git read-tree -m base ours theirs`
into a temp GIT_INDEX_FILE → `write-tree` → `commit-tree -p ours -p theirs` → push the
commit to the branch ref); the owning session then `git pull`s.
- **Codex is back in the review rotation** (2026-07-11): the 2026-07-06 "retired — usage
exhausted" was a quota window, not retirement. Codex has 5-hourly + weekly limits (same
structure as Claude); rule: **if we have usage, use it** — for INDEPENDENT review passes
(per-PR adversarial review alongside the fork review, adversarial-reviewer audits/re-reviews,
stuck-diagnosis second opinions) via `codex:rescue`, never for implementation. Check
readiness/quota with `/codex:setup`; on exhaustion fall back to fork/subagent review and
retry next window.
- **Cross-model independent review rotation** (2026-07-11): use the other client/model family when
it is available — Codex reviews Claude-authored changes; Claude reviews Codex-authored changes.
Use whatever native integration is actually installed; client-specific helpers such as
`codex:rescue` are optional accelerators, not protocol dependencies. On quota/tool exhaustion,
use a cold-context review-only agent in the current client and retry cross-model review next window.
Independent reviewers do review and stuck-diagnosis work, not implementation on the same change.
**Skip rubric (self-exemption is an auditable claim, not a vibe)**: an *independent* review pass
(Codex, or a fork/subagent when Codex is exhausted) is **mandatory** for any diff touching
(preferably cross-model; otherwise a cold agent) is **mandatory** for any diff touching
locks/concurrency, auth/security, API write-path handlers, or DB migrations, or larger than
~150 changed C# lines. It is **skippable** only for a pure-SPA/docs leaf with no server-state
effect — and when you skip it, **say so and why** in the PR or close comment (a stated exemption,
not silence). This is the correlated-blindspot net: the fork and Codex miss *different* classes
not silence). This is the correlated-blindspot net: independent model families miss *different* classes
(see the #235 "enumerate every producer" and #250 lessons), so a single reviewer on a risky diff
is the gap.
- **Force enumeration of lazy LanguageExt returns in tests** (2026-07-11, PR #229): a write-path 500
@@ -197,7 +232,7 @@ HARD CONSTRAINTS:
independent reviewer has seen. Here the first fix (gate Edit on `saving`) only PARTIALLY closed
the in-flight-save clobber class; a Codex re-review of the fix commit caught that **Delete** was
the one schedule-switch path (`applySwitch`) still missing the guard. Fold a scoped re-review
(Codex if quota, else a fork) over the fix commit into the close protocol; loop until a clean
(cross-model if quota, else a cold review agent) over the fix commit into the close protocol; loop until a clean
MERGEABLE verdict or an explicit acceptable-defer (file a tracked issue for the deferral, as #248
here). Cheap relative to shipping a half-fix that reopens the issue.
- **Negative-controlling a lock/flag fix: invert the condition, don't stub `if (true)`** (2026-07-11,
@@ -220,8 +255,8 @@ HARD CONSTRAINTS:
release / no cross-release" claim, `grep` the whole host project for every writer of that channel message
(or acquirer of that lock) — the background scheduler/worker is the usual missing producer. This is why the
independent Codex pass earns its keep alongside the fork even when the fork returns MERGEABLE.
- **Fork-vs-Codex disagreement on a gate PR → Fable, and Fable often improves the fix, not just the verdict**
(2026-07-11, #235): the reconciliation isn't only "who's right" — Fable ratified Codex's High AND caught
- **Independent-review disagreement on a gate PR → frontier judge; judge the fix, not just the verdict**
(2026-07-11, #235): the reconciliation isn't only "who's right" — Fable historically ratified Codex's High AND caught
that the orchestrator's proposed *fix* (per-source lock-or-skip) would deterministically starve the 2nd+
media source (fixed loop order), prescribing the shipped library-scan §C7 pattern instead (lock once per
provider, batch-enqueue, release on the `Unlock: isLast` message). Escalate the FIX approach too, not just