agentleFS
augments-labsaugments-labs/sdlc-skills/skills/maintenance/complexity-audit/SKILL.md

complexity-audit

Skill1 starsChanged 3 months agoMITView on GitHub

Audits existing code for accidental complexity: abstraction nothing needs, ownership it should not hold, flexibility nobody uses, or custom machinery a library already provides. Use when existing code should be examined for accidental complexity, or when the user asks whether this is over-engineered, why it is so complicated, or whether all of it is still needed. Skip implementation choices, review of a frozen change, and structural work already approved.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer one bounded audit. If the surface is large, split it into partitions with stable IDs, exclusive inventories, and cross-boundary …

    line 36
  2. Very specific:

    If the dispatch is empty, refused, or unavailable, follow the no-dispatch rule in dispatching-parallel-agents Step 2.

    line 46
  3. Distinctive:

    Read each returned partition report.

    line 50
  4. Distinctive:

    Keep the report unchanged.

    line 54
  5. Distinctive:

    Verify the report's coverage, then stop.

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Complexity Audit

Find accidental complexity without calling essential guarantees bloat. This is diagnosis, not permission to change code.

When to use

  • Audit an existing module or repository independently of any state currently under check (the exact state being judged right now).
  • Skip choosing an implementation (yagni), reviewing a frozen change (requesting-code-review), or applying known structural work (refactor-architecture).
  • A whole-repository claim requires explicit whole-repository scope; otherwise name the bounded surface and make no wider claim.

Step 1: Freeze

  1. Open assets/audit-report.md before the inventory. Fill What was frozen first: identity, goal, path boundary, guarantees in force, and the evidence allowed.
  2. Declare the report path up front: .sdlc-skills/audits/{{YYYY-MM-DD}}-{{topic}}.md. The coordinator owns it, and it sits outside the audited target's identity. Identify the target by revision. Use a working-tree hash (the template calls it the working-tree digest) only when the report path is outside the repository or git check-ignore -q passes for it. If the target is uncommitted and the report path is in-tree and unignored, stop; ask for a checkpoint or an ignored or out-of-repository report path. If the target drifts, stop or restart.
  3. Fill every row of the template's inventory table.
  4. Prefer one bounded audit. If the surface is large, split it into partitions with stable IDs, exclusive inventories, and cross-boundary edges. Invoke dispatching-parallel-agents only when read sets, resources, data boundaries, and outputs reconcile independently.

Step 2: Challenge read-only

  1. Fill assets/yagni-auditor.md with assets/partition-report.md before dispatching each exact partition, then dispatch as dispatching-parallel-agents Step 2 says.
  2. If the dispatch is empty, refused, or unavailable, follow the no-dispatch rule in dispatching-parallel-agents Step 2.
  3. Fill every line of the template's coverage-reconciliation block before any finding.
  4. Read each returned partition report; open its file if only a location was returned. Match Target, Audit inputs, Partition, and Verdict to the frozen request and to the auditor's allowed verdicts. If a field is missing, unreadable, conflicting, or mismatched, that partition is inconclusive. Keep the report unchanged; never infer a repository-wide conclusion from partial coverage.

Step 3: Publish decisions

  1. Fill every column of the template's findings table, one row per finding. Line count is not authority.
  2. Apply or approve nothing. If a structural change is accepted, invoke refactor-architecture for it. Behavior work goes to its feature or bug route.
  3. Verify the report's coverage, then stop. Review or branch finishing runs only if the user separately asks to ship the report.

Gotchas

  • Code with no static caller can still be reached through reflection, registration, or configuration. A search that finds no caller has not proved a removal safe.
  • A reconciliation that lists no failed or inconclusive area reads as full coverage. Count what was not examined, or a silent gap passes as clean.
  • A working-tree hash captured before the audit reports DRIFT once the report lands at an unignored path under the audited tree, though no audited code changed.

Common mistakes

  • “No direct caller”: dynamic, configured, generated, or external use remains investigate until disproved or deprecated.
  • “One implementation”: a seam containing real impedance, policy, or test isolation may be justified; apply the deletion test, not a slogan.
  • “Tests and rollback are overhead”: a current assurance or recovery guarantee owns them; duplicate machinery with no distinct guarantee is the candidate.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.