fix(work-beta): thread Execution note into Codex delegation prompt#820
Open
davidalee wants to merge 1 commit into
Open
fix(work-beta): thread Execution note into Codex delegation prompt#820davidalee wants to merge 1 commit into
davidalee wants to merge 1 commit into
Conversation
The Codex delegation prompt template silently dropped each plan unit's Execution note. Standard subagent dispatch already carried it as a first-class field (ce-work-beta/SKILL.md:172, 208, 270), but plans using "test-first" or "characterization-first" lost that signal whenever Codex was the executor. Real plans rely on it -- 26 occurrences across 7 active plans in docs/plans/. Add an <execution_note> tag between <approach> and <constraints> that mirrors the standard path: - Population covers single-unit and multi-unit batches, prefixes each entry with "U<ID>:" when present and "Unit <n>:" otherwise (no invented IDs), and merges session-level posture requests (ce-work-beta/SKILL.md:109 binds these even when the plan has no Execution note) into units lacking their own note. - test-first reproduces the full standard guardrails: write the failing test first, verify it fails, then implement; no over-implementation beyond the test's behavior slice; skip for trivial renames, pure configuration, or pure styling. Defers to <testing> for scenario completeness. - characterization-first preserves the standard "capture behavior in tests first" rule. - Any other non-empty note is binding per-unit guidance, but remains subordinate to <constraints>/<testing>/<verify>/<output_contract>; notes that would reduce validation, coverage, scope discipline, or reporting accuracy are rejected, with conflicts surfaced via the output contract's issues field. Regression assertions in tests/pipeline-review-contract.test.ts lock <execution_note> presence and both posture strings so the field cannot be dropped silently again. Assertions are quote-style agnostic. Stable/beta sync: not propagating -- Codex delegation is beta-only; non-beta ce-work has no equivalent workflow file.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b19a6423a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
0b19a64 to
a5b4a90
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Codex delegation prompt template silently dropped each plan unit's
Execution notefield. The standard subagent dispatch path treats it as a first-class signal (ce-work-beta/SKILL.md:172, 208, 270), but plans usingtest-firstorcharacterization-firstlost that signal whenever the executor was Codex viace-work-beta delegate:codex.Real usage motivates this — 13
Execution notefields across 7 plans indocs/plans/, including 11 across 5 currently active plans.Add an
<execution_note>tag to the Codex prompt template between<approach>and<constraints>, mirroring the standard path. Population covers single-unit and multi-unit batches, prefixes each entry withU<ID>:when present andUnit <n>:otherwise (no invented IDs), and merges session-level posture requests (perce-work-beta/SKILL.md:109, which binds them even when the plan has no Execution note) into units lacking their own note.Honoring guidance:
test-first— reproduces the full standard guardrails: write failing test first, verify it fails, then implement; no over-implementation beyond the test's behavior slice; skip for trivial renames, pure configuration, or pure styling. Defers to<testing>for scenario completeness.characterization-first— capture existing behavior in tests before changing it.<constraints>/<testing>/<verify>/<output_contract>. Notes that would reduce validation, coverage, scope discipline, or reporting accuracy are rejected, with conflicts surfaced via the output contract'sissuesfield.A regression assertion in
tests/pipeline-review-contract.test.tslocks<execution_note>presence and both posture strings so the field cannot recur silently. Assertions are quote-style agnostic.Reviewed by Codex MCP (gpt-5.2 then gpt-5.5) with two adversarial rounds; refinements from both rounds are folded into the single commit.
Stable/beta sync: not propagating — Codex delegation is beta-only; non-beta
ce-workhas no equivalent workflow file.Test plan
bun test— 1340 pass, 0 failbun run release:validate— cleance-work-beta delegate:codexagainst a plan withExecution note: test-firston at least one unit, confirm<execution_note>appears in the generated prompt with the posture string and that test-first ordering is honored in the resulting work