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

complexity-audit

Skill1 starsChanged 4 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.

2 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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    Use a working-tree digest only when the report path is outside the repository or git check-ignore -q passes for it: an in-tree, unignored …

    line 28
  2. Very specific:

    Prefer one bounded audit. Large surface → partitions with stable IDs, exclusive inventories, cross-boundary edges.

    line 34
  3. Distinctive:

    Read each returned partition report.

    line 47
  4. Distinctive:

    Verify the report's coverage, then stop.

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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 a current candidate.
  • Skip choosing an implementation (yagni), reviewing an exact candidate (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, admissible evidence.
  2. Predeclare the report path .sdlc-skills/audits/{{YYYY-MM-DD}}-{{topic}}.md, coordinator-owned, outside the audited target's identity. Identify the target by revision. Use a working-tree digest only when the report path is outside the repository or git check-ignore -q passes for it: an in-tree, unignored report changes the digest the audit froze. Uncommitted target with an in-tree, unignored report path → stop; ask for a checkpoint or an ignored or out-of-repository report path. Target drifts → stop or restart.
  3. Fill every row of the template's inventory table.
  4. Prefer one bounded audit. Large surface → partitions with stable IDs, exclusive inventories, 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 per dispatching-parallel-agents Step 2.
  2. 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 auditor's allowed verdicts. Missing, unreadable, conflicting, or mismatched fields → that partition is inconclusive. Retain 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. Accepted structural change → refactor-architecture. Behavior work → its feature or bug route, producing a new verified candidate.
  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 digest 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.
  • Editing during the audit → freezes neither evidence nor conclusions; report first, then obtain separate implementation authority.

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.