docs(prompts): codex master prompt — night close 4 atomic PRs (#63, #66, #65, #67) #117

Merged
pdurlej merged 1 commit from claude/orders/codex-night-close-prompt into main 2026-05-09 00:11:42 +02:00
Collaborator

Canary status: missing — Medium PR class (multi-PR-driver per AGENTS.md §PR size classes; governance-touching since prompt drives 4 atomic PRs); fire canary 3+3 manually before merge OR operator_override per ADR 0001

Purpose

Bundle one Codex master prompt that closes 4 atomic platform issues in one night per operator's force-push intent (Y on Decision Queue 2026-05-09). Operator-disengaged after dispatch.

What this PR ships

Single file: prompts/codex-night-close-2026-05-09.md (~480 lines, ~3.2k words).

Structure

  • Frontmatter: identity discipline, coordination protocol references, Forgejo agent contract pre-read directive, pre-flight reference
  • Context + Identity + Coordination protocol summary + Ordering + Self-verification protocol
  • 4 packets in codex-handoff-packet-format:
    • Packet A — issue/63 platformctl validate jsonschema (Wave 1, sequential, opens first)
    • Packet B — issue/66 L4-Verify deterministic suite (Wave 1, depends on A merge)
    • Packet C — issue/65 tailscale ACL fill 5 TODOs (Wave 3, parallel from start)
    • Packet D — issue/67 .codex/instructions template (Wave 3, parallel from start)
  • Owner Checkpoint protocol (5-turn cap per agent-coordination-protocol.md)
  • Failure mode escape hatches (ADR 0002 hard 3-iter cap; swarmheart senior-coder fallback)
  • Cross-packet coordination notes + Stop signals

Each packet schema: evidence_known, files_to_read (whitelist), files_to_create, files_to_edit (with change_type), proposed_change_scope, non_goals, acceptance_criteria (testable predicates), stop_conditions, production_impact: zero, rollback, smoke pre/post, piotr_must_approve_before, codex_must_ask_prof_before.

Why now

Operator (chat 2026-05-09): "chciałbym jednym dziś nocą zamknąć kwestię platformy. mam tajną broń do tego (zobacz skill swarmheart)". Pre-flight scan via DeepSeek-V4-Pro 2026-05-08 returned 0 hard-stops across 12 candidate tasks (this prompt covers 4 of those 12; remaining 8 are Wave 2 v2-cataloging, separate dispatch).

Operator chose dispatch path (a) — formal commit to prompts/ + PR + merge → operator triggers codex exec < prompts/codex-night-close-2026-05-09.md in master operator thread. Audit trail in repo; future-claude can replay.

Files touched

  • prompts/codex-night-close-2026-05-09.md (new, ~480 lines)

No other files. Prompt does not touch modules, schema, control-plane, decisions, or AGENTS.md. It REFERENCES them for Codex's read.

Relevant context

  • AGENTS.md (just amended on main with Forgejo contract pre-read directive — prompt now mandates same pre-read in every packet)
  • state/agent-execution-template.md (PR #69 lessons codified; referenced in prompt's self-verification section)
  • decisions/0001-canary-mandatory-pm-cadence.md (canary 3+3 mandatory; prompt requires manual canary fire)
  • decisions/0002-ci-enforcement-canary.md (3-iter cap; prompt's failure mode escape section enforces)
  • agent-souls/practices/agent-coordination-protocol.md (5-turn cap → Owner Checkpoint; prompt embeds protocol)
  • agent-souls/references/codex-handoff-packet-format.md (packet schema; prompt's 4 packets follow it)
  • docs/forgejo-agent-operations.md (PR #111; prompt mandates pre-read in every packet's files_to_read)
  • ~/Iskra-i-Piotr/05 System/Swarmheart Status/platform-force-push-2026-05-08-night/pre-flight.md (clean DeepSeek scan; prompt references)

Runtime evidence

N/A — pure docs/prompt change. No runtime touched. Codex's resulting 4 PRs will have runtime evidence (each packet's smoke pre/post + acceptance_criteria).

Known constraints

  • Prompt assumes BW item id for codex actor: dd815dfa-9f8c-449d-9917-b43d0104f17c (per BW listing 2026-05-04). If PAT was rotated, Codex's first identity check will fail loudly per state/agent-execution-template.md — that is the desired behavior, not a regression.
  • Packet B (issue #66) explicitly waits on Packet A (issue #63) merge. If A blocks indefinitely, B does not start. Prompt's cross-packet coordination notes documents this.
  • Packets C and D are fully independent and can dispatch in parallel from the start.
  • Token-count: prompt is ~3.2k words; comfortable within Codex master prompt budget (typical 2k-4k range from prior prompts in prompts/).

Explicit out-of-scope

  • Wave 2 v2-cataloging (issues #97-#104) — separate dispatch after this Wave 1 + 3 lands
  • ADR 0002 setup tasks (Issue #49) — operator UI work, not in prompt
  • Cross-cousin coordination changes (anything in agent-souls/)
  • Modifying agent-souls coordination protocol or packet format (those are upstream, prompt only references)
  • Modifying docs/forgejo-agent-operations.md (read-only reference)

Requested decision

approve_merge after canary 3+3 fires (Medium class — manual fire required since this prompt drives 4 downstream PRs that each fire canary themselves) OR operator_override per Rule 2 if force-push-tonight cadence requires.

Merge blockers

  • Canary 3+3 not yet fired (manual)
  • If reviewer cites scope creep ("include Wave 2 here") — defer to separate dispatch (correct: Wave 2 is 8 atomic, different ratio of risk)
  • If reviewer cites missing reference to docs/forgejo-agent-operations.md — already added in commit <sha> (post-AGENTS.md sync)

How operator triggers Codex (after merge)

In master operator (Codex thread):

cd ~/Developer/iskra-platform-2026-04-30
git pull
codex exec < prompts/codex-night-close-2026-05-09.md

Codex parses 4 packets, opens 4 worktrees, dispatches per Wave/Packet ordering. Orchestrator (claude) monitors PR opens asynchronously, updates state/STATUS_NOW.md between waves.

Spec sources read

  • prompts/01-freeze.md, prompts/06-prune.md, prompts/codex-pr-53-rebase.md — sample master prompt shapes
  • agent-souls practices/agent-coordination-protocol.md (full file via raw API)
  • agent-souls references/codex-handoff-packet-format.md (full file via raw API)
  • AGENTS.md (current main; amended with Forgejo contract directive — verified pre-read instruction applies)
  • docs/forgejo-agent-operations.md (verified path; PR #111 named it forgejo-agent-operations.md not forgejo-agent-operating-rules.md — corrected in prompt)
  • state/agent-execution-template.md (PR #69 lessons; referenced for self-verification protocol)
  • decisions/0001-canary-mandatory-pm-cadence.md + decisions/0002-ci-enforcement-canary.md (referenced for canary + iter cap)
  • Issues #63, #65, #66, #67 bodies + activation comments (for per-packet specifics)
  • ~/Iskra-i-Piotr/05 System/Swarmheart Status/platform-force-push-2026-05-08-night/pre-flight.md (scan output)
  • routing/hard-stop-categories.md from swarmheart skill (for pre-flight context)

Test plan

  • Operator readback: 4 packets correctly scoped (no cross-contamination, no scope creep into Wave 2)
  • Operator readback: ordering correct (A→B sequential; C+D parallel from start)
  • Manual canary 3+3 fires + passes OR operator_override
  • After merge: operator runs codex exec < prompts/codex-night-close-2026-05-09.md
  • Codex opens 3 PRs in parallel (A + C + D) within ~10 min
  • After A merges, Codex opens B PR
  • All 4 PRs authored by codex (verified user.login)
  • Each PR has full Canary Context Pack + ## Spec sources read disclosure
  • Owner Checkpoint format respected if 5-turn cap reached on any thread
Canary status: missing — Medium PR class (multi-PR-driver per AGENTS.md §PR size classes; governance-touching since prompt drives 4 atomic PRs); fire canary 3+3 manually before merge OR operator_override per ADR 0001 ## Purpose Bundle one Codex master prompt that closes 4 atomic platform issues in one night per operator's force-push intent (Y on Decision Queue 2026-05-09). Operator-disengaged after dispatch. ## What this PR ships Single file: `prompts/codex-night-close-2026-05-09.md` (~480 lines, ~3.2k words). ### Structure - **Frontmatter**: identity discipline, coordination protocol references, Forgejo agent contract pre-read directive, pre-flight reference - **Context** + **Identity** + **Coordination protocol summary** + **Ordering** + **Self-verification protocol** - **4 packets in `codex-handoff-packet-format`**: - Packet A — issue/63 `platformctl validate jsonschema` (Wave 1, sequential, opens first) - Packet B — issue/66 `L4-Verify deterministic suite` (Wave 1, depends on A merge) - Packet C — issue/65 `tailscale ACL fill 5 TODOs` (Wave 3, parallel from start) - Packet D — issue/67 `.codex/instructions template` (Wave 3, parallel from start) - **Owner Checkpoint protocol** (5-turn cap per agent-coordination-protocol.md) - **Failure mode escape hatches** (ADR 0002 hard 3-iter cap; swarmheart `senior-coder` fallback) - **Cross-packet coordination notes** + **Stop signals** Each packet schema: `evidence_known`, `files_to_read` (whitelist), `files_to_create`, `files_to_edit` (with change_type), `proposed_change_scope`, `non_goals`, `acceptance_criteria` (testable predicates), `stop_conditions`, `production_impact: zero`, `rollback`, `smoke` pre/post, `piotr_must_approve_before`, `codex_must_ask_prof_before`. ## Why now Operator (chat 2026-05-09): "chciałbym jednym dziś nocą zamknąć kwestię platformy. mam tajną broń do tego (zobacz skill swarmheart)". Pre-flight scan via DeepSeek-V4-Pro 2026-05-08 returned 0 hard-stops across 12 candidate tasks (this prompt covers 4 of those 12; remaining 8 are Wave 2 v2-cataloging, separate dispatch). Operator chose dispatch path (a) — formal commit to `prompts/` + PR + merge → operator triggers `codex exec < prompts/codex-night-close-2026-05-09.md` in master operator thread. Audit trail in repo; future-claude can replay. ## Files touched - `prompts/codex-night-close-2026-05-09.md` (new, ~480 lines) No other files. Prompt does not touch modules, schema, control-plane, decisions, or AGENTS.md. It REFERENCES them for Codex's read. ## Relevant context - `AGENTS.md` (just amended on main with Forgejo contract pre-read directive — prompt now mandates same pre-read in every packet) - `state/agent-execution-template.md` (PR #69 lessons codified; referenced in prompt's self-verification section) - `decisions/0001-canary-mandatory-pm-cadence.md` (canary 3+3 mandatory; prompt requires manual canary fire) - `decisions/0002-ci-enforcement-canary.md` (3-iter cap; prompt's failure mode escape section enforces) - `agent-souls/practices/agent-coordination-protocol.md` (5-turn cap → Owner Checkpoint; prompt embeds protocol) - `agent-souls/references/codex-handoff-packet-format.md` (packet schema; prompt's 4 packets follow it) - `docs/forgejo-agent-operations.md` (PR #111; prompt mandates pre-read in every packet's `files_to_read`) - `~/Iskra-i-Piotr/05 System/Swarmheart Status/platform-force-push-2026-05-08-night/pre-flight.md` (clean DeepSeek scan; prompt references) ## Runtime evidence N/A — pure docs/prompt change. No runtime touched. Codex's resulting 4 PRs will have runtime evidence (each packet's `smoke` pre/post + `acceptance_criteria`). ## Known constraints - Prompt assumes BW item id for `codex` actor: `dd815dfa-9f8c-449d-9917-b43d0104f17c` (per BW listing 2026-05-04). If PAT was rotated, Codex's first identity check will fail loudly per `state/agent-execution-template.md` — that is the desired behavior, not a regression. - Packet B (issue #66) explicitly waits on Packet A (issue #63) merge. If A blocks indefinitely, B does not start. Prompt's `cross-packet coordination notes` documents this. - Packets C and D are fully independent and can dispatch in parallel from the start. - Token-count: prompt is ~3.2k words; comfortable within Codex master prompt budget (typical 2k-4k range from prior prompts in `prompts/`). ## Explicit out-of-scope - Wave 2 v2-cataloging (issues #97-#104) — separate dispatch after this Wave 1 + 3 lands - ADR 0002 setup tasks (Issue #49) — operator UI work, not in prompt - Cross-cousin coordination changes (anything in `agent-souls/`) - Modifying agent-souls coordination protocol or packet format (those are upstream, prompt only references) - Modifying `docs/forgejo-agent-operations.md` (read-only reference) ## Requested decision `approve_merge` after canary 3+3 fires (Medium class — manual fire required since this prompt drives 4 downstream PRs that each fire canary themselves) OR `operator_override` per Rule 2 if force-push-tonight cadence requires. ## Merge blockers - Canary 3+3 not yet fired (manual) - If reviewer cites scope creep ("include Wave 2 here") — defer to separate dispatch (correct: Wave 2 is 8 atomic, different ratio of risk) - If reviewer cites missing reference to `docs/forgejo-agent-operations.md` — already added in commit `<sha>` (post-AGENTS.md sync) ## How operator triggers Codex (after merge) In master operator (Codex thread): ```bash cd ~/Developer/iskra-platform-2026-04-30 git pull codex exec < prompts/codex-night-close-2026-05-09.md ``` Codex parses 4 packets, opens 4 worktrees, dispatches per Wave/Packet ordering. Orchestrator (claude) monitors PR opens asynchronously, updates `state/STATUS_NOW.md` between waves. ## Spec sources read - `prompts/01-freeze.md`, `prompts/06-prune.md`, `prompts/codex-pr-53-rebase.md` — sample master prompt shapes - agent-souls `practices/agent-coordination-protocol.md` (full file via raw API) - agent-souls `references/codex-handoff-packet-format.md` (full file via raw API) - `AGENTS.md` (current main; amended with Forgejo contract directive — verified pre-read instruction applies) - `docs/forgejo-agent-operations.md` (verified path; PR #111 named it `forgejo-agent-operations.md` not `forgejo-agent-operating-rules.md` — corrected in prompt) - `state/agent-execution-template.md` (PR #69 lessons; referenced for self-verification protocol) - `decisions/0001-canary-mandatory-pm-cadence.md` + `decisions/0002-ci-enforcement-canary.md` (referenced for canary + iter cap) - Issues #63, #65, #66, #67 bodies + activation comments (for per-packet specifics) - `~/Iskra-i-Piotr/05 System/Swarmheart Status/platform-force-push-2026-05-08-night/pre-flight.md` (scan output) - `routing/hard-stop-categories.md` from swarmheart skill (for pre-flight context) ## Test plan - [ ] Operator readback: 4 packets correctly scoped (no cross-contamination, no scope creep into Wave 2) - [ ] Operator readback: ordering correct (A→B sequential; C+D parallel from start) - [ ] Manual canary 3+3 fires + passes OR `operator_override` - [ ] After merge: operator runs `codex exec < prompts/codex-night-close-2026-05-09.md` - [ ] Codex opens 3 PRs in parallel (A + C + D) within ~10 min - [ ] After A merges, Codex opens B PR - [ ] All 4 PRs authored by `codex` (verified `user.login`) - [ ] Each PR has full Canary Context Pack + `## Spec sources read` disclosure - [ ] Owner Checkpoint format respected if 5-turn cap reached on any thread
docs(prompts): codex master prompt — night close 4 atomic PRs
All checks were successful
canary-required / collect-diff (pull_request) Successful in 3s
canary-required / canary (pull_request) Successful in 12s
fdd2d236a5
Authored by claude (Pan Herbata) for tonight's force-push close per
operator Y on Decision Queue 2026-05-09.

Bundles 4 atomic packets in agent-souls codex-handoff-packet-format:
- Packet A: issue/63 platformctl validate jsonschema (Wave 1, sequential)
- Packet B: issue/66 L4-Verify deterministic suite (Wave 1, depends on A merge)
- Packet C: issue/65 tailscale ACL fill 5 TODOs (Wave 3, parallel)
- Packet D: issue/67 .codex/instructions template (Wave 3, parallel)

References agent-coordination-protocol.md (5-turn cap → Owner Checkpoint)
+ codex-handoff-packet-format.md from agent-souls.

Mandates pre-read of docs/forgejo-agent-operations.md (PR #111) for
every packet before any Forgejo-touching action.

Pre-flight scan clean (DeepSeek-V4-Pro 2026-05-08; 0/12 hard-stops).

After merge, operator triggers in master operator thread:
  cd ~/Developer/iskra-platform-2026-04-30 && git pull
  codex exec < prompts/codex-night-close-2026-05-09.md

Codex opens 4 PRs as `codex` identity, fires manual canary 3+3 per ADR
0001, ready for batch-merge by morning.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/platform!117
No description provided.