grimoire-simplify
Reduce the concepts, states, branches, indirections, and maintained code needed to explain existing behavior. Cosmetic movement is not simplification.
Under orchestration, the caller's execution contract takes precedence over this skill's standalone defaults.
Authorization and baseline
Explicit simplification requests authorize behavior-preserving internal rewrites and file reorganization within established responsibility boundaries. Analyze-only or discussion requests produce candidates without changing tests or production code. Ask before changing public contracts, expanding architectural scope, or irreversible actions. Structural redesign belongs to grimoire-improve when selected; otherwise report it outside this skill's boundary and continue safe work.
No map or other skill is required. Revalidate supplied map evidence used for the task against source. Match inspection to scope: a function and necessary callers/contracts/tests; a module's internals and adjacent dependencies/consumers; every module and seam in a specified subsystem; or the full first-party repository for deep whole-repository work. Inspect relevant registrations/configuration; expand only for affected contracts or uncertain reachability. Record source revision/dirty state, contracts, boundaries, validation commands, and baseline results. Before risky poorly tested rewrites, add characterization coverage when authorized.
Own simplification findings, recommendations, retention reasons, and analysis coverage; map owns reusable source evidence and navigation. For broad work, account for every in-scope first-party module and cross-module seam; reference the map inventory and source relationships rather than maintaining a competing ledger. Search hits are not inspection.
For structured handoffs or resumable persistence, read the shared coordination contract v1. Publish owner analysis and check records; refactor owns scheduling and final acceptance, not these findings. Standalone work can supply source evidence inline in the same format. Small tasks need no ledger; persistence remains permission-gated.
Optimize understanding cost, not line count. There is no default LOC reduction target; use LOC as a target only when the user explicitly requests a quantified compression goal. Only an explicitly required numeric threshold is a hard gate. Under orchestration, user targets are global, never per-worker quotas.
Only for a user-specified LOC target, fix the baseline inventory, counter/version, command, formatting, and filters before edits. Count nonblank/noncomment first-party production LOC; report tests/config/docs/generated/vendor separately. Include new/moved implementations and reconcile scope changes without resetting the denominator. Compute 100 * (baseline - final) / baseline on the combined tree; zero is not applicable, and non-code targets need an agreed metric. Never count minification, comment removal, deleted useful tests, or transferred complexity as savings. Otherwise do not require a LOC baseline.