codex/skills/complexity-mitigator/SKILL.md
Existing-code comprehension and local winnowing preflight. Use for simplify/refactor/clean up/untangle, nested branches, boolean soup, opaque names, mixed responsibilities, cross-file state, or review stalls. Factor the local whole, separate essential/incidental/specification-risk factors, winnow dominated or duplicated factors, and emit the smallest clarity cut. Not for broad architectural layer removal, kernel quotienting, invariant remediation, or greenfield planning.
npx skillsauth add tkersey/dotfiles complexity-mitigatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reduce understanding cost in existing code while preserving essential domain meaning. This skill is a read-only routing rail and analysis preflight, not a delivery owner.
Use a lightweight local form of:
FACTORING -> WINNOWING
review-fold or the owning review-closure workflow.Use for:
Handoff instead:
reduce;review-fold;$actuating after $review-fold
authors the current Counterexample Set;invariant-ace;universalist;$actuating or the owning workflow.Use when another workflow owns implementation.
Complexity preflight:
- whole:
- dominant cost:
- factorization:
- winnow:
- smallest clarity cut:
- do not change yet:
- handoff:
For one function, file, or review comment:
Use only when the slice crosses files, behavior is unclear, specification risk is material, or the user asks for deep analysis.
essential, incidental, mixed, or spec-risk.When an actuation review profile selects this lens, return factorization
evidence to the review caller. $review-fold may cite it when classifying a
counterexample-set/v1; $actuating alone evaluates that Counterexample
against the current Construction and selects any successor. Do not choose the
repair, architecture, work node, or mutation.
complexity_counterexample_evidence:
owner_boundary:
governing_law:
participating_abstractions:
- abstraction:
live_obligation:
status: retain | retire | collapse | delegate | replace | validate-first
dominated_factors: []
smallest_local_repair:
local_repair_adds_semantic_machinery: true | false
structural_pressure: []
proof_surface_before: []
proof_surface_after: []
falsifier:
evidence_refs: []
If local repair adds a protocol, state, helper abstraction, repeated branch family, or wound-specific test family, mark it as semantically growing and record the structural pressure. Actuating decides whether the current Construction is a realization, architecture, or ablation defect.
factorization_winnowing_receipt:
whole: "..."
factors:
- id: "F1"
obligation: "..."
class: essential | incidental | mixed | spec-risk
owner: "..."
evidence_ref: "..."
status: retain | delete | collapse | delegate | localize | rename | validate-first
duplicated_or_dominated_factors: []
irreducible_core: []
recomposition_rule: "..."
preservation_relation: observationally-equivalent | refinement-preserving | unknown
proof_signal: "..."
handoff: "..."
reduce.End with:
Winnowing Bottom Line:
- retain:
- remove/collapse/delegate:
- unresolved specification risk:
- recomposition:
- proof:
- handoff:
tools
Invokes Apple's macOS 27 fm command-line tool from a local Mac to use the on-device system model or Private Cloud Compute, including instructions, image prompts, schema-constrained JSON, and noninteractive automation. Use when the user asks to run Apple Foundation Models through fm, compare system versus pcc, generate structured output, or automate fm without Swift or an app.
development
Compile historical Codex sessions into governed counterfactual evidence, evaluate an existing owner-applied candidate through blinded paired HCTP trials, and fold observable evidence into RUN, OBSERVE, or STOP. Use for `$hylo`, CRF extraction, counterfactual replay, source-governed direct or historical trials, sealed evidence, paired baseline/candidate evaluation, causal frontiers, or evidence-governed improvement.
testing
Ensure a `ledger` command is available on PATH; materialize, validate, record, replay, and project requested Actuating artifacts without taking semantic or execution authority; coordinate the shared Learnings/Synesthesia/Negative Ledger lifecycle checkpoint and repo-local source-memory reconciliation; address Universalist plans and receipts; and perform pure artifact validation.
testing
Classify and quotient review findings, failing tests, incidents, bug reports, migration failures, and other witnessed falsifiers against accepted intent and the current Construction. Author counterexample-set/v1 without selecting repairs, counting review credit, or granting mutation.