Code Quality Rubric
This skill owns the seven quality principles below. production-code extends
them with execution procedure; it does not redefine them.
Judge the changed surface, not unrelated legacy debt. Cite the diff, contract,
and concrete proof. The hard invariants remain owned by AGENTS.md.
Seven principles
1. Minimal code
- Is this the smallest correct change?
- Did it remove code it made obsolete?
- Did it avoid one-off wrappers, pass-through modules, and speculative options?
2. No duplicated behavior
- Does equivalent behavior already have an owner to reuse or extend?
- Is each behavior implemented once?
- Is apparent consolidation genuinely shared rather than merely similar?
3. Direct data and control flow
- Are I/O, state transitions, and control flow explicit and traceable?
- Did the change add avoidable hops, transforms, retries, or orchestration?
- Are inputs validated once at their trust boundary?
4. No fake-green escape
- Does every claimed proof satisfy the canonical mock ban?
- Did the change suppress, swallow, disable, or bypass a real failure?
- Are failures corrected at their source rather than muted?
5. Cleanup discipline
- Are temporary artifacts, leaked state, obsolete branches, and
change-created dead code removed?
- Is cleanup deterministic where the change creates external or temporary state?
- If an Interface promises cleanup, rollback, or atomicity around caller-controlled work, is it proved for success, ordinary failure, and supported interruption/cancellation paths?
- Are no placeholders, broad catch/pass paths, or blanket suppressions left?
6. Consequence coverage
- Were callers, callees, adjacent consumers, no-change surfaces, and persisted
contracts traced where the change affects them?
- For stateful edits, does proof cross the combined behavior surface?
- Are required coupled updates included in the same change?
7. Simple implementation
- Is the code readable and direct rather than ceremonial?
- Are comments limited to non-obvious contracts and decisions?
- Does proof use a high-signal workflow check plus sharp invariant checks?
- Does the code use the authority that owns a semantic rule instead of reconstructing it from names, syntax, or regexes?
Language checks
For Python, retain useful public-boundary types, validate external input at the
boundary, and report broad exception swallowing or unjustified type ignores.
For TypeScript/JavaScript, narrow untrusted values, reject unsafe any, broad
casts and suppressions, and make exhaustive state handling fail closed.
Review output
For each finding report the principle and severity, location, violated contract
or demonstrated consequence, smallest correction, and proof required. If there
are no findings, name any evidence surface that was unavailable. Syntax-only
checks do not prove consequence coverage.
1---2name: code-quality3description: Code Quality Rubric4---56# Code Quality Rubric78This skill owns the seven quality principles below. `production-code` extends9them with execution procedure; it does not redefine them.1011Judge the changed surface, not unrelated legacy debt. Cite the diff, contract,12and concrete proof. The hard invariants remain owned by `AGENTS.md`.1314## Seven principles1516### 1. Minimal code1718- Is this the smallest correct change?19- Did it remove code it made obsolete?20- Did it avoid one-off wrappers, pass-through modules, and speculative options?2122### 2. No duplicated behavior2324- Does equivalent behavior already have an owner to reuse or extend?25- Is each behavior implemented once?26- Is apparent consolidation genuinely shared rather than merely similar?2728### 3. Direct data and control flow2930- Are I/O, state transitions, and control flow explicit and traceable?31- Did the change add avoidable hops, transforms, retries, or orchestration?32- Are inputs validated once at their trust boundary?3334### 4. No fake-green escape3536- Does every claimed proof satisfy the canonical mock ban?37- Did the change suppress, swallow, disable, or bypass a real failure?38- Are failures corrected at their source rather than muted?3940### 5. Cleanup discipline4142- Are temporary artifacts, leaked state, obsolete branches, and43 change-created dead code removed?44- Is cleanup deterministic where the change creates external or temporary state?45- If an Interface promises cleanup, rollback, or atomicity around caller-controlled work, is it proved for success, ordinary failure, and supported interruption/cancellation paths?46- Are no placeholders, broad catch/pass paths, or blanket suppressions left?4748### 6. Consequence coverage4950- Were callers, callees, adjacent consumers, no-change surfaces, and persisted51 contracts traced where the change affects them?52- For stateful edits, does proof cross the combined behavior surface?53- Are required coupled updates included in the same change?5455### 7. Simple implementation5657- Is the code readable and direct rather than ceremonial?58- Are comments limited to non-obvious contracts and decisions?59- Does proof use a high-signal workflow check plus sharp invariant checks?60- Does the code use the authority that owns a semantic rule instead of reconstructing it from names, syntax, or regexes?6162## Language checks6364For Python, retain useful public-boundary types, validate external input at the65boundary, and report broad exception swallowing or unjustified type ignores.6667For TypeScript/JavaScript, narrow untrusted values, reject unsafe `any`, broad68casts and suppressions, and make exhaustive state handling fail closed.6970## Review output7172For each finding report the principle and severity, location, violated contract73or demonstrated consequence, smallest correction, and proof required. If there74are no findings, name any evidence surface that was unavailable. Syntax-only75checks do not prove consequence coverage.