v0.16.0 — plan-review anti-over-engineering reframe + template-version refactor
Summary
Two related changes driven by dogfooding /hyperclaude:hyper-plan-loop: the Codex plan-review critic was biased toward "make the plan stronger," which let plans grow each revise round. This release reframes the critic and consolidates the template-version bookkeeping.
Plan-review prompt reframed (over-engineering = a finding)
templates/codex/plan-review.md now treats over-engineering as a first-class finding on the same severity scale as any other defect:
- Steps, files, or abstractions not traceable to the user's task.
- Speculative flexibility / configurability the user didn't ask for.
- Defensive code for scenarios that can't actually happen (trust internal callers; validate only at real boundaries).
- "While we're here" refactors / renames / cleanups unrelated to the task.
- Single-use abstractions, helpers with one caller.
- Tests for hypothetical edge cases the task doesn't require.
The Improvements section is now simplifications-only — no more "what else the plan could also do." Real defects (wrong paths, broken ordering, unverifiable steps, genuinely missing I/O / parse error handling) still count.
In hyper-plan-loop, branch (c)'s one-shot "actionable Minor" cleanup should now bias toward simplifying the plan rather than adding to it.
Template-version refactor (single source of truth)
template-version used to live in 3+ places that had to be kept in lock-step (per-mode bridge conditional, two hardcoded renderer lines, a constant in resume.mjs). It now lives in one place: the YAML frontmatter at the top of each fresh template file.
- Each fresh template (
research.md,plan-review.md,code-review.md,docs-review.md) declares its owntemplate-versionin leading frontmatter. scripts/codex/templates.mjsaddsreadTemplateWithVersion()+splitTemplateFrontmatter(); strict on missing or non-positive-integer version.- Renderers (
renderCodeReviewFrontmatter,renderDocsReviewFrontmatter) now taketemplateVersionas input; the hardcoded lines and theCODE_REVIEW_TEMPLATE_VERSIONconstant in resume.mjs are gone. *-resumed.mdcontinuation prompts stay frontmatter-less by design.--dry-runnow also validates the template's frontmatter — malformed templates fail at dry-run time, not after spawning Codex.
Notes
- Plan-review artifacts emit
template-version: 2from this release on; the other three fresh modes stay at1. - The renderer signature change (
renderCodeReviewFrontmatter/renderDocsReviewFrontmatternow requiretemplateVersion) is breaking only for direct importers of the bridge module; internal callers and tests are updated. - Tests: 5 new helper tests + 24 existing renderer-call sites updated. Unit 293/0, smoke 79/0.