Skip to content

fix(work-beta): thread Execution note into Codex delegation prompt#820

Open
davidalee wants to merge 1 commit into
EveryInc:mainfrom
davidalee:fix/codex-delegation-execution-note
Open

fix(work-beta): thread Execution note into Codex delegation prompt#820
davidalee wants to merge 1 commit into
EveryInc:mainfrom
davidalee:fix/codex-delegation-execution-note

Conversation

@davidalee
Copy link
Copy Markdown
Contributor

@davidalee davidalee commented May 11, 2026

Summary

The Codex delegation prompt template silently dropped each plan unit's Execution note field. The standard subagent dispatch path treats it as a first-class signal (ce-work-beta/SKILL.md:172, 208, 270), but plans using test-first or characterization-first lost that signal whenever the executor was Codex via ce-work-beta delegate:codex.

Real usage motivates this — 13 Execution note fields across 7 plans in docs/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 with U<ID>: when present and Unit <n>: otherwise (no invented IDs), and merges session-level posture requests (per ce-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.
  • Any other non-empty note — 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.

A regression assertion in tests/pipeline-review-contract.test.ts locks <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-work has no equivalent workflow file.

Test plan

  • bun test — 1340 pass, 0 fail
  • bun run release:validate — clean
  • Manual smoke: invoke ce-work-beta delegate:codex against a plan with Execution note: test-first on 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

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.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread plugins/compound-engineering/skills/ce-code-review/SKILL.md Outdated
@davidalee davidalee force-pushed the fix/codex-delegation-execution-note branch from 0b19a64 to a5b4a90 Compare May 11, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant