Hard Cut
Developmenthard-cutHard Cut is an Agent Skill for development published in the udecode/dotai repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Remove a feature completely with no backward compatibility; delete surfaces, callers, tests, docs, fallbacks, stubs, and dead exports.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/udecode/dotai/blob/HEAD/skills/hard-cut/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/hard-cut, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Hard Cut
Use this when a feature should die, not linger.
Rules
- Delete the surface. Do not deprecate it.
- Do not leave
throw new Error("Not implemented"), placeholder notices, "feature removed" banners, or TODOs about bringing it back unless the user explicitly asks. - Do not keep compatibility aliases, deprecated shims, fallback parsing, migration bridges, or dead exports.
- Delete tests for deleted behavior. Keep tests only for the behavior that still exists.
- Delete comments that describe deleted code or mourn the old feature.
- If removal exposes adjacent dead code, keep cutting until the graph is clean.
Sweep
- Find the real surface area:
- exports
- commands and flags
- routes
- UI entrypoints
- feature flags
- docs and examples
- Trace references with
rg. - Delete the implementation and the glue:
- call sites
- types
- state
- tests
- docs
- comments
- Grep again for the removed name and obvious aliases.
- Run the narrowest honest verification for the surviving product.
Smells
- deprecated notices
- not-implemented throws
- stub handlers
- dead enum or union members
- permanently-false feature-flag branches
- unused env vars and config
- tests that only prove the deleted feature used to exist
Bias
If the choice is between deleting more code and leaving a zombie surface, delete more code.