All skills
simota avatar

/void

@c805268
by shingo imotasimota/agent-skills85 stars
15

Verifying YAGNI, cutting scope, and proposing complexity reductions. A 'subtraction' agent questioning the justification for every feature, dependency, doc, and config. Does not write code.

Use this Skill: https://skilld.dev/gh/simota/agent-skills/void

This session only. Nothing lands on disk.

referencecomplexity-metrics.md

≈988 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Complexity Metrics & Technical Debt Measurement

Purpose: Use this file when complexity or technical debt should feed directly into Void scoring.

Contents:

  • Cognitive-complexity scoring rules and thresholds
  • Technical-debt metrics and cost multipliers
  • Tooling and review gates
  • Reduction strategies and how to map results into Void

Cognitive Complexity

Scoring Rules

Base additions:
  +1 for control-flow branches
  +1 for loops
  +1 when logical operators switch type
  +1 for labeled jump flow
  +1 for recursion

Nesting penalty:
  +1 for each additional nesting level

Do not count:
  - simple null checks with early return
  - switch default
  - try/catch itself, though nested logic still counts

Thresholds

Cognitive complexity Assessment Action Void mapping
<15 maintainable keep monitoring Cognitive Load: 0-3
15-25 warning zone simplify soon Cognitive Load: 4-6
>25 dangerous prioritize simplification Cognitive Load: 7-10

Cognitive vs Cyclomatic Complexity

Dimension Cognitive complexity Cyclomatic complexity
Measures Human understandability Number of execution paths
Nesting penalty Yes No
Switch handling Constant treatment Per case
Best use Readability and maintainability Test-path planning

Maintenance Cost Signals

Research-backed signals worth preserving:

  • Complex code can cost 2.5-5x more to maintain.
  • Methods above 25 complexity can show roughly 3x bug density.
  • Teams may spend 60%+ of dev time understanding code before changing it.

Technical Debt Metrics

Metric Target
Technical debt ratio <5%
Debt growth per sprint Downward trend
SQALE rating A-B

SQALE reference bands:

  • A: <5%
  • B: 6-10%
  • C: 11-20%
  • D: 21-50%
  • E: >50%

Tooling

Tool Strength
SonarQube Cognitive complexity, debt, code smells
CodeClimate Cognitive complexity and testability
ESLint complexity JS/TS cyclomatic complexity
radon Python complexity and maintainability
gocyclo Go cyclomatic complexity

Review Gates

  • New methods should stay below cognitive complexity 15.
  • Existing methods that increase complexity need explicit justification.
  • Module average complexity should stay below 10.
  • Technical debt ratio above 10% should trigger a debt-repayment plan.

Reduction Strategies

Pattern Typical effect
Early return Removes deep nesting
Method extraction Shrinks local branch density
Table-driven logic Replaces long conditional chains
Polymorphism Replaces oversized dispatch conditionals when justified
State pattern Removes state x action conditional nesting when justified

Priority:

  1. Remove deep nesting first.
  2. Split oversized methods next.
  3. Simplify compound conditions.
  4. Use structural redesign only when simpler moves are exhausted.

Void Use

  • During WEIGH, map cognitive complexity directly into the Cognitive Load dimension.
  • Use debt ratio as a supporting signal, not a replacement for the 5-question investigation.
  • During SUBTRACT, recommend simplification only when the abstraction cost is lower than the expected payoff.

Quality gates:

  • complexity >25 -> immediate SIMPLIFY candidate
  • technical debt ratio >10% -> propose a repayment plan
  • rising module-average complexity -> warn
  • 60%+ of dev time spent on code comprehension -> process simplification candidate

Sources: SonarSource: Cognitive Complexity · Martin Fowler: Technical Debt Quadrant · SQALE

Source: SKILL.md on GitHub

No alerts13d5 checks · Risk SAFE
  • Gen Agent Trust Hub13d

    The skill is a specialized subtraction agent designed to identify and propose the removal of unnecessary code, features, and processes (YAGNI). It operates in an advisory capacity and includes explicit safety boundaries, such as prohibiting the removal of security-critical code and requiring evidence-based quantification for all proposals. A low-severity risk exists for indirect prompt injection because the skill ingests external evidence (e.g., tickets, logs) that could be manipulated by a malicious actor to influence its recommendations.

  • Socket13d

    No alerts

  • Snyk13d

    Risk: LOW · No issues

  • Runlayer6mo

    9 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at c805268. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 2 weeks ago

README badge

README badge for simota/agent-skills/void