code-removal
Use only when deletion is the requested deliverable inside an active change: removing a file, seam, flag, symbol, or code path. Do not invoke for additive work, renames, or refactors that merely edit or deprecate code.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 7
- Forks
- 2
01 前言 Front Matter
- name
- code-removal
- phase
- all
- description
- Use only when deletion is the requested deliverable inside an active change: removing a file, seam, flag, symbol, or code path. Do not invoke for additive work, renames, or refactors that merely edit or deprecate code.
- enforcement
- advisory
- implicit_invocation
- required
03 SKILL.md 正文
Purpose
Removal is a first-class change type. Its deliverable is the deletion itself and an intact surviving suite, not a new test asserting that the removed thing is absent. Treat removal-shaped work as a change to what remains: remove the obsolete file, seam, flag, symbol, or code path, and preserve the behavior that survives it.
The evidence for a completed removal task is the deletion diff plus passing scoped survivor tests.
The engine-native test_suite step owns full surviving-suite proof.
Deletion does not create new behavior to prove, so do not manufacture an absence assertion to
make removal work look like an additive test cycle.
Absence-Test Prohibition
At spec time, do not write a plan task or story criterion whose subject is that code, files, or symbols no longer exist. Plans and stories describe the deletion and the observable behavior that must survive it; they never prescribe an absence test or label one verify-only to force its creation.
At build time, do not author a test whose subject is that removed code no longer exists. There is
no rubric exemption to lean on: APPROVED adr-2026-08-22-one-owner-per-review-question.md retires
the scope, completeness, and rootCause rubrics together with their exemptions — superseding
adr-2026-08-12-removal-anchored-tautology-exemption.md — and leaves test-quality as the only
shipped rubric. Removal task evidence is the deletion diff plus passing scoped survivor tests, not an
absence assertion. Aggregate proof belongs to the engine-native test_suite step.
Survivor Method
First identify the survivors: enumerate the behavior that must keep working after the removal. Write this survivor inventory when the survivors are non-obvious, including a shared seam or behavior partially carried by the code being removed. Skip the inventory only when every survivor is obvious and fully covered by existing tests.
Follow this order:
- Write the required survivor inventory.
- Check each survivor for existing coverage.
- For every uncovered survivor, add and commit a characterization test before any deletion.
- Delete the obsolete code.
- Run the affected survivor tests through
ai-conductor scoped-run <selectors...>and leave them green. If scope is uncertain, report it and defer aggregate proof to the engine-nativetest_suitestep. Never run the full suite in the removal session.
Hard stop: do not proceed with deletion until each uncovered survivor has a characterization test.
Test Triage
Classify every test that touches removed code before changing it:
- DIRECT — its sole subject is the removed behavior. Delete it in the same change.
- INCIDENTAL — it touches the removed code through shared fixtures, an integration flow, or an acceptance test for a surviving feature. Mutate it to exercise the surviving behavior; never delete it for the removal.
Acceptance tests are deleted only when they are DIRECT. An acceptance test that covers a surviving feature is INCIDENTAL even if the removal requires changing its setup or assertions.
Completeness Sweep
Before closing a removal task, sweep source, tests, config, and docs for literal removed symbol and path names. Cover imports and other references, file paths, config keys, and documentation mentions. Review every hit: remove it or explicitly justify it in the commit. An unresolved hit means the removal task cannot close.
Grep variants can silently skip binary or NUL-bearing files, yielding empty output. Sweep literal symbol and path names and review the hit list; empty output alone is not proof of absence.
04 同仓库更多 Skills
build-review-dependency-hygiene
Judge whether a feature diff adds unnecessary, insufficiently pinned, or license-incompatible dependencies.
writing-system-tests
Use BEFORE implementing any feature that has stories in .docs/stories/ — generates failing acceptance specs from acceptance criteria as the RED phase of TDD. Generates HTTP/request-level acceptance tests for headless/API projects, end-to-end UI tests for projects with a frontend, using the project's own test framework and directory conventions.
verify-claims
Use only when an active workflow is about to rely on a nontrivial factual claim or assumption for a spec, plan, ADR, finding, or code decision. Do not invoke for casual questions, status reports, restatements, or trivially verifiable mechanics.
tdd
Use when implementing any feature or bugfix. Five-step cycle: RED → DOMAIN → GREEN → DOMAIN → COMMIT. Enforces test-first development with domain integrity review at every phase boundary.
stories
Use only within active engineer/conduct DECIDE after architecture approval, when a committed `.docs/stories` acceptance artifact is required. Do not invoke for general user-story examples, requirements discussion, or direct implementation requests.
stack-land
Use when an operator needs to land reviewed manual changes on the correct closed child of a stacked feature. Operator-invoked only: inspect ownership, propose the safe child with evidence, and require confirmation before opening the landing.