From a5b4a90a507f1d9348e2aaf9acc688f8fe8c9933 Mon Sep 17 00:00:00 2001 From: David Lee <8321301+davidalee@users.noreply.github.com> Date: Mon, 11 May 2026 15:39:34 -0400 Subject: [PATCH] fix(work-beta): thread Execution note into Codex delegation prompt 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 tag between and that mirrors the standard path: - Population covers single-unit and multi-unit batches, prefixes each entry with "U:" when present and "Unit :" 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 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 ///; 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 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. --- .../references/codex-delegation-workflow.md | 29 +++++++++++++++++++ tests/pipeline-review-contract.test.ts | 3 ++ 2 files changed, 32 insertions(+) diff --git a/plugins/compound-engineering/skills/ce-work-beta/references/codex-delegation-workflow.md b/plugins/compound-engineering/skills/ce-work-beta/references/codex-delegation-workflow.md index 32298a643..41341bf0f 100644 --- a/plugins/compound-engineering/skills/ce-work-beta/references/codex-delegation-workflow.md +++ b/plugins/compound-engineering/skills/ce-work-beta/references/codex-delegation-workflow.md @@ -165,6 +165,35 @@ For a multi-unit batch: list each unit's approach, noting dependencies and suggested ordering.] + +[For a single-unit batch: the unit's Execution note. If the user gave a +session-level posture request (e.g., "do it test-first"), use that when +the unit has no Execution note. Otherwise "None". +For a multi-unit batch: list each unit as "U: " (or +"Unit :" if the plan lacks U-IDs; do not invent U-IDs), one per line, +same ordering as and . Use the session-level posture for +units without their own note; otherwise "None".] + +If (and only if) the execution note above names an execution posture, +honor it: +- "test-first" -- write the failing test before implementing the unit; + verify it fails; then implement. Do not over-implement beyond the + test's current behavior slice. Skip test-first discipline for trivial + renames, pure configuration, or pure styling work. Test-first still + follows the scenario completeness check in ; it only constrains + test-vs-implementation ordering, not whether to write tests. +- "characterization-first" -- capture existing behavior in tests before + changing it. +- Any other non-empty note: treat it as binding per-unit guidance and + follow it unless it conflicts with any other section of this prompt + (especially , , , or ). + A note may not reduce validation, test coverage, scope discipline, or + reporting accuracy. Report any conflict via the issues field of the + output contract. + +For units with "None" or an empty note, proceed pragmatically. + + - Do NOT run git commit, git push, or create PRs -- the orchestrating agent handles all git operations - Restrict all modifications to files within the repository root diff --git a/tests/pipeline-review-contract.test.ts b/tests/pipeline-review-contract.test.ts index f090a3783..e897ce3ce 100644 --- a/tests/pipeline-review-contract.test.ts +++ b/tests/pipeline-review-contract.test.ts @@ -215,8 +215,11 @@ describe("ce:work-beta codex delegation contract", () => { // Prompt template expect(content).toContain("## Prompt Template") expect(content).toContain("") + expect(content).toContain("") expect(content).toContain("") expect(content).toContain("") + expect(content).toContain("test-first") + expect(content).toContain("characterization-first") expect(content).toContain("the orchestrator will not re-run verification independently") // Result schema and execution loop