hard-cut
Hard-Cut Policy
Apply a hard-cut policy by default for refactors or behavior changes that alter schemas, contracts, persisted state, routing, configuration, feature flags, enum/value sets, or architecture where old-state preservation might otherwise be retained.
Keep one canonical codepath. Remove old-shape handling. Do not preserve draft or legacy behavior unless there is concrete evidence of a real external compatibility boundary.
Default assumption
Treat previous shapes as internal draft shapes unless there is concrete evidence they are already:
- persisted external or user data
- on-disk or database state that must still load
- a wire format used across process or service boundaries
- a documented or publicly supported contract
- actively depended on outside the refactor boundary
Mere existence of old code is not proof of a compatibility obligation.
Core policy
When an old shape appears, remove that path and convert the codebase to the canonical shape. Do not add code to support it. Do not add code specifically to reject it just because it once existed.
Hard rules
Apply these rules in order:
- Do not add fallback behavior.
- Do not add compatibility branches.
- Do not add shims, adapters, coercions, aliases, or dual-shape support.
- Do not add fail-fast guards whose purpose is to detect or reject old shapes.
- Do not add tests whose purpose is to assert rejection of old or legacy shapes.
- Prefer deleting old-shape handling over preserving or policing it.
- Update producers, consumers, fixtures, and tests to use only the canonical shape.
- Remove dead code, dead conditionals, obsolete comments, and translation helpers related to old shapes.
- Keep validation only for the current canonical contract. Validation may reject malformed current-shape input, but must not branch on legacy discriminators, old field names, aliases, old enum members, or draft formats.
- When choosing between backward compatibility and simplification, choose simplification.
Execution workflow
- Identify the canonical target shape.
- Trace every producer and consumer of that shape.
- Update all live codepaths to emit and consume only the canonical shape.
- Update fixtures, test data, builders, and snapshots to the canonical shape.
- Delete legacy handling, branching, comments, and helpers.
- Keep only current-shape validation that is still required for correctness.
- If a real external compatibility boundary exists, isolate it and call out the exact file, function, boundary, and reason it cannot be removed yet.
Review checklist
- Reject changes that preserve old-shape behavior behind conditionals.
- Reject translation layers between old and new shapes.
- Reject validation branches added only to reject legacy inputs.
- Reject tests added only to memorialize abandoned draft formats.
- Remove dead helpers and comments that describe removed draft formats.
- Keep one owner for the canonical contract.
Deliverables
Deliver only:
- a minimal implementation that supports the canonical shape
- updated tests for the canonical shape only
- removal of obsolete legacy-shape tests
- no new rejection tests for old shapes
- no runtime logic dedicated to recognizing legacy formats
Exception rule
Make an exception only when removing the old shape would break already persisted external or user data, on-disk or database state, cross-boundary wire formats, or a real public contract.
If such a boundary exists:
- do not invent new compatibility layers elsewhere
- name the exact file and function
- describe the concrete persisted or public dependency
- limit any compatibility discussion to that boundary only
More from regenrek/agent-skills
root-cause-finder
Performs root-cause-first debugging and review by tracing expected behavior to the first unintended side effect before changing contracts, parsing, or types. Use when debugging protocol errors, deserialization failures, null payloads, missing fields, restore or hydration issues, state-ownership bugs, unexpected requests, background mutations, or reviewing junior-created code where the visible failure may be downstream noise.
7consolidate-test-suites
Decide exactly where bug-fix test coverage belongs. Use before adding, moving, or deleting tests after a bug fix or architectural change. Select one owning layer, reuse existing canonical suites, block redundant or weakly placed tests, and remove weaker duplicates.
7git-safe-workflow
Safely inspect, stage, commit, and (only if asked) push changes made by an AI agent. Use for commit/push requests, end-of-task checkpoints, merge conflict resolution, worktree safety checks, or deciding whether to use git commit --amend.
4shellck
Run shellcheck on shell scripts after editing scripts or when debugging shell errors. Use for linting scripts in a repo (especially scripts/), catching issues like set -u with unset vars, bad subshell usage, or quoting mistakes.
3codex-analysis
Run Codex CLI for deep code analysis and second-opinion reviews. Use when the user explicitly asks for Codex analysis, Codex help, or wants a second opinion from Codex on code, architecture, or debugging questions.
3pr-commiter
Agentic PR committer with deterministic commits, enforced branch/PR workflow, and explicit paths (no git add .).
3