subtract
Subtract
Reduce the concepts, paths, and artifacts needed to preserve required behavior. Fewer lines count only when they reduce what callers, maintainers, or operators must understand.
Scope
For an exploratory request, survey the named area, or the repository when none is named. Include tracked and untracked content; keep it read-only until the user selects a candidate. An explicit request to simplify a target authorizes execution, without a separate candidate-approval round.
For unstaged, staged, uncommitted, or committed changes, use Change Scopes to establish the baseline and protect the index and unrelated work. Keep the scope and baseline in the conversation.
Subtraction Judgment
Ground removals in callers, tests, specifications, and actual consumers. Preserve correctness, security, performance, framework conventions, and real compatibility obligations. Investigate dynamic discovery, generated code, and external consumers before treating an absence of references as proof of dead code.
Look for dead paths, duplicate representations, pass-through wrappers, speculative flexibility, round-trip conversions, and behavior scattered across owners. Prefer, in order: