feat(codex): Phase 1 mcp slice — codex plan-review prompt + runtime-aware selection #43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/codex-plan-review-phase1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
The mcp slice of Phase 1 — Codex as a fleet worker for
IDEA_REVIEW_PLANplan-review. Library capability only; the runner wiring (scrum4me-docker) and the UI (scrum4me-workers) land in follow-up PRs per the dual-GO design.src/prompts/idea/review-plan.codex.md— codex-portable, autonomous IDEA_REVIEW_PLAN prompt: 3-round active rewrite (persists viaupdate_idea_plan_md({ idea_id, markdown })), self-determined verdict (noask_user_question),review_log.approval.statussynced toapproval_status, and a plan-write failure blocksapproved.src/lib/kind-prompts.ts— runtime-awaregetKindPromptText(kind, runtime = 'CLAUDE')+getIdeaPromptText(kind, runtime = 'CLAUDE'); compound cache key${runtime}:${kind};(CODEX, IDEA_REVIEW_PLAN) -> review-plan.codex.md; every other(kind, runtime)is byte-identical to before (defaultCLAUDE).scripts/seed-idea-review-codex-canary.ts— seeds anIDEA_REVIEW_PLAN/CODEX/QUEUEDcanary against a throwawayPLAN_READYidea with a rich, deliberately-improvableplan_md+grill_md.Authoritative prompt source (note for reviewers)
payload.prompt_text(src/tools/wait-for-job.ts:957, viagetIdeaPromptText) is intentionally not runtime-threaded in this PR. Per the design (codex plan-review P1-2), the docker runner is the authoritative prompt source:run-one-job.ts:364callsgetKindPromptText(ctx.kind, runtime)(runtime fromgetWorkerRuntimeFromEnv()) and passes it tobuildCodexArgs. The payload field is redundant/informational, threading it is optional (and would also require addingruntimeto thegetFullJobContextselect). The codex prompt reaches codex via the runner, which lands in the separate scrum4me-docker PR (plan Task 5).Review & verification
npx vitest run-> 85 files / 682 tests green;npx tsc --noEmit-> clean.🤖 Generated with Claude Code
P1-1 workers snapshot overrides requested_model (not a fake model_id); P1-2 close runner-vs-payload P1: docker runner getKindPromptText is authoritative (run-one-job.ts:364) -> getKindPromptText(ctx.kind, runtime); P2-3 require review_log.approval.status to mirror top-level approval_status; P2-4 update_idea_plan_md failure must block 'approved' (no false-positive); P3-5 refresh source anchors (wait-for-job.ts:895-968, run-one-job.ts:364). All five verified against source before applying. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>P1-1 codex prompt calls update_idea_plan_md({ markdown }) not plan_md (schema); P1-2 Task 6 RED test mock gets launch_preview_json.context.ideaId (idea-binding); P1-3 run-one-job passes capabilities to registerWorker+startHeartbeat so the workers UI gate (capabilities has 'review') counts the codex worker, else review enqueue is blocked despite claimable agents; P2-4 force a canary host via pausing max2 / a semantic tag, not required_capability=LOW_P; P3-5 tsx-load smoke marked explicitly non-binding. All verified against source. Spec §4/§8/§14 updated to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>