Decomplex
Hard rules
- Exactly one mode:
- Prevention — unimplemented plans/designs/deps/safeguards
- Audit — existing source/tests/config/deps/architecture
- Finding triage — supplied recs that may add complexity
- Fix before reviewing:
- target
- authority
- required behavior
- scope
- Ask only when ambiguity changes those.
- Targets immutable.
- Only write: one
.reviews/<slug>-decomplex.md. - Never edit reviewed artifacts (even if asked to fix).
- Direct invoke and report not writable → stop.
- no chat-only substitute
- embedders may use their own fallback
- must not claim
decomplexran
- Complexity trade-offs only.
- Route defects/security/perf/plan-compliance to the owning workflow (e.g.
code-review). - Simplicity ≠ fewer lines/helpers/deps.
- Preserve evidenced:
- trust boundaries
- invariants
- compatibility
- lifecycle cleanup
- ops needs
- Findings are advisory.
- Consumer dispositions/implements/escalates.
- “No potential complexity findings” is valid.
- Consumers must:
- disposition every item
- never auto-implement
- ask user when in doubt
Admission gate (all required)
- Concrete conceptual, maintenance, or operational burden
- Absent/insufficient justification for current need
- Realistic, reachable practical cost
- Smallest concrete simpler alternative
- Required behavior preserved
- Proportionate value after simplification + regression cost
- Explicit exception/boundary check
Evidence:
ConfirmedorSupportedonly
If the gate fails:
- bounded validation
- user question
- or omit
Never find on:
- helper count
- duplication alone
- novelty
- hypothetical scale
- style alone
Prefer:
- delete
- direct use
- local logic/helper
- existing shared abstraction
- new abstraction
Sequence
- Contract
- mode
- target
- authority
- scope
- behavior
- report path
- constraints
- inspect callers/tests/config/history only as needed for the gate
- Before candidates
- read
references/complexity-gates.mdfully - contextual signals, not a quota checklist
- read
- Evaluate
- full gate each candidate
- order by expected simplification value
- Recommend
- only:
Act|Validate|Ask user - do not perform the action
- triage mode: preserve every supplied ID
- triage dispositions:
Act|Validate|Ask user|No action
- only:
- Before write
- read
assets/decomplex-review-template.mdfully - write exactly one report
- strip template guidance/empty sections
- keep inspected/skipped coverage + limitations
- read
- Verify
- report exists
- admitted items pass gate
- all triage IDs accounted
- no target file changed