audit-doctrine — Is the rule right, not merely enforced?
Degree of freedom: MIXED.
- Reference-practice comparison and remedy judgment (Phases 1–2):
HIGH freedom — weigh each rule against how top products actually
build.
- Governance-contract checks (Phases 3–4): LOW freedom — the
contract's clauses are pass/fail; check each exactly.
Read-only. audit-gate-logic asks "can this gate be bypassed or
gamed?" — it assumes the rule is correct. This asks the harder
question: is the rule right on the merits? A ratchet that flawlessly
enforces bad doctrine is worse than no ratchet, because greenness
certifies the mistake and the developer, given only a codemod list,
restyles legitimate work to appease a regex instead of fixing a real
problem. An unexplained lint rejection erodes trust at that decision
point until people "adopt their own truth." This audit finds the rules
that are measuring taste, not correctness.
Present findings. Do not rewrite detectors, baselines, or tokens here.
This skill vs neighbors
| Skill |
Owns |
| audit-doctrine (this) |
Rule content — remedy, named token, Tier-D practice |
audit-gate-logic |
Rule machinery — bypass, gaming, required-but-not |
housekeep-gates |
Consolidate / delete duplicate gates (apply-now) |
enhance-arch-boundaries |
Install boundary enforcement, not judge doctrine |
housekeep-design |
Token/component SSOT — the sanctioned-form side |
docs-adr |
Record a justified divergence from Tier-D |
housekeep-backlog |
Un-remedied long-tail axes as BL- rows |
The governance contract
A custom rule/axis is sound only if all hold:
- Has a remedy — states the sanctioned alternative by name; a
rule that only says "don't" is measuring taste.
- Sanctioned form is reachable — the approved pattern exists as a
named token/class, not folklore the developer must reverse-engineer.
- Teaches on failure — the failure output prints the remedy AND
the offending
file:line, not just a codemod list.
- Agrees with Tier-D reference practice — where the rule
disagrees with how Stripe / Linear / GitHub / Docusaurus actually
ship, the burden of proof is on the rule.
- Exceptions expire; baselines only shrink — no permanent
grandfather; the baseline cannot silently regrow (ratchet integrity
still belongs to
audit-gate-logic).
How to reason (every axis)
- Observe — what does the detector actually measure? Read the
detector, not its name — the name may over-claim (e.g. "no bordered
cards" that really counts rounded+border without overflow-clip).
- Interpret — what real pattern does it catch, and what
legitimate pattern does it also reject?
- Reference-check — do top products ship the rejected pattern?
- Contract-check — run the five clauses.
- Verdict — sound / taste-measuring / false-positive /
folklore-token / missing-remedy, with the fix.
Worked example
Observe: a nested-rounded-box axis counts rounded + border
lines without overflow-clip.
Interpret: it rejects bordered 前の章/次の章 chapter-link cards
— but the doctrine's own shell recipe passes it, so the sanctioned
form exists.
Reference-check: bordered chaptered-nav cards are standard —
Docusaurus pagination-nav, Stripe docs ship the same pattern.
Contract-check: remedy missing; reachable token missing (the
passing form was never named); failure printed only a codemod list.
Verdict: false-positive + missing-remedy + folklore-token.
Fix: name the sanctioned form (e.g. PAGE_LINK_CARD_CLASS —
bordered, clipped, hover-tiered); print remedy + file:line. Baseline
unchanged — the token already equals the baseline, proving the ban
was never real.
Phase 0 — Locate the doctrine [LOW freedom — run exactly]
Find the rule surface: custom lint/ratchet axes, the detector suite,
the doctrine/governance doc (e.g. MASTER.md), baseline files,
exception lists, and the failure-output code. Enumerate every axis
with: what it detects, its remedy (if any), its baseline, and whether
a named sanctioned token exists. Record the count — a long tail of
un-remedied axes is the common state.
Phase 1 — Separate correctness from taste [HIGH freedom]
For each axis, classify:
- Correctness — catches a real bug / a11y / perf / security issue
(missing focus, contrast fail, unclipped overflow that actually
breaks layout). These may be stricter with less explanation.
- Taste — enforces a stylistic preference (radius scale, border
style, card nesting). Not illegitimate, but they carry a higher
burden: they must have a remedy and a reachable token, or they
generate the appease-the-regex incident.
Phase 2 — Reference-check taste rules [HIGH freedom]
For each taste rule, check whether Tier-D products ship the pattern it
rejects. Use research / official docs against Stripe, Linear,
GitHub, Docusaurus, Radix, shadcn. Where a rule bans what Tier-D
ships, it is a false-positive candidate — the burden of proof is on
the rule. Document the shipping reference for each disagreement. No
reference → mark needs-reference, not a finding.
Phase 3 — Run the governance contract [LOW freedom — do not skip]
Check all five clauses per axis. State coverage honestly: N of M
axes carry a remedy (usually a small fraction — remedies get seeded
on the axes that bite during feature work; the long tail stays bare).
Every bare axis is a latent appease-the-regex incident. Flag:
- missing-remedy
- unreachable-sanctioned-form (folklore)
- non-teaching failure output
- unexpiring exceptions
- regrowable baselines
Un-remedied axes → housekeep-backlog as BL- rows (junior-PR
burndown).
Phase 4 — Freeze against regression [LOW freedom]
Confirm or recommend a test suite that freezes the governance
properties so remedies cannot be silently stripped and sanctioned
tokens cannot drift back into a false-positive form. Without this, the
fix decays.
Self-critique before reporting [LOW freedom — do not skip]
- Evidence, not opinion — every "false positive" cites a specific
Tier-D reference that ships the pattern. No reference →
needs-reference, not a finding.
- Right axis — content problem (this skill) vs enforcement
problem (
audit-gate-logic). Do not claim a bypass finding.
- Remedy is real — a proposed remedy names an existing or addable
token, not "use the right style".
- Baseline honesty — confirm the sanctioned form actually passes
at the current baseline before claiming the ban was illusory.
Definition of Done
Output format
- Axis inventory — axis | detects | correctness/taste | remedy?
| reachable token? | teaches? | baseline-shrink-only?
- False-positive findings — axis | legitimate pattern rejected |
Tier-D reference | proposed remedy + token
- Governance gaps — remedy-coverage (N/M), folklore tokens,
non-teaching outputs, exception/baseline integrity
- Backfill burndown — un-remedied long-tail axes as tracked
items (→
housekeep-backlog BL- rows)
- Handoffs — enforcement/bypass →
audit-gate-logic; token
SSOT → housekeep-design; justified divergence → docs-adr
1---2name: audit-doctrine3description: Read-only audit of custom lint/ratchet doctrine — is each rule right on the merits, not merely enforced. Use when "is this lint rule wrong", "the ratchet banned a legitimate pattern", "audit our guardrail doctrine". Enforcement → audit-gate-logic. Consolidation → housekeep-gates.4license: MIT5---67# audit-doctrine — Is the rule right, not merely enforced?89**Degree of freedom: MIXED.**1011- Reference-practice comparison and remedy judgment (Phases 1–2):12 **HIGH freedom** — weigh each rule against how top products actually13 build.14- Governance-contract checks (Phases 3–4): **LOW freedom** — the15 contract's clauses are pass/fail; check each exactly.1617Read-only. **`audit-gate-logic` asks "can this gate be bypassed or18gamed?" — it assumes the rule is correct. This asks the harder19question: is the rule right on the merits?** A ratchet that flawlessly20enforces bad doctrine is worse than no ratchet, because greenness21certifies the mistake and the developer, given only a codemod list,22restyles legitimate work to appease a regex instead of fixing a real23problem. An unexplained lint rejection erodes trust at that decision24point until people "adopt their own truth." This audit finds the rules25that are measuring taste, not correctness.2627Present findings. Do not rewrite detectors, baselines, or tokens here.2829## This skill vs neighbors3031| Skill | Owns |32|---|---|33| **audit-doctrine** (this) | Rule *content* — remedy, named token, Tier-D practice |34| `audit-gate-logic` | Rule *machinery* — bypass, gaming, required-but-not |35| `housekeep-gates` | Consolidate / delete duplicate gates (apply-now) |36| `enhance-arch-boundaries` | Install boundary *enforcement*, not judge doctrine |37| `housekeep-design` | Token/component SSOT — the sanctioned-form side |38| `docs-adr` | Record a justified divergence from Tier-D |39| `housekeep-backlog` | Un-remedied long-tail axes as `BL-` rows |4041## The governance contract4243A custom rule/axis is sound only if all hold:44451. **Has a remedy** — states the sanctioned alternative by name; a46 rule that only says "don't" is measuring taste.472. **Sanctioned form is reachable** — the approved pattern exists as a48 named token/class, not folklore the developer must reverse-engineer.493. **Teaches on failure** — the failure output prints the remedy AND50 the offending `file:line`, not just a codemod list.514. **Agrees with Tier-D reference practice** — where the rule52 disagrees with how Stripe / Linear / GitHub / Docusaurus actually53 ship, the burden of proof is on the rule.545. **Exceptions expire; baselines only shrink** — no permanent55 grandfather; the baseline cannot silently regrow (ratchet integrity56 still belongs to `audit-gate-logic`).5758## How to reason (every axis)59601. **Observe** — what does the detector actually measure? Read the61 detector, not its name — the name may over-claim (e.g. "no bordered62 cards" that really counts rounded+border without overflow-clip).632. **Interpret** — what real pattern does it catch, and what64 *legitimate* pattern does it also reject?653. **Reference-check** — do top products ship the rejected pattern?664. **Contract-check** — run the five clauses.675. **Verdict** — sound / taste-measuring / false-positive /68 folklore-token / missing-remedy, with the fix.6970## Worked example7172> **Observe:** a `nested-rounded-box` axis counts rounded + border73> lines without overflow-clip.74> **Interpret:** it rejects bordered 前の章/次の章 chapter-link cards75> — but the doctrine's own shell recipe passes it, so the sanctioned76> form exists.77> **Reference-check:** bordered chaptered-nav cards are standard —78> Docusaurus `pagination-nav`, Stripe docs ship the same pattern.79> **Contract-check:** remedy missing; reachable token missing (the80> passing form was never named); failure printed only a codemod list.81> **Verdict:** false-positive + missing-remedy + folklore-token.82> **Fix:** name the sanctioned form (e.g. `PAGE_LINK_CARD_CLASS` —83> bordered, clipped, hover-tiered); print remedy + file:line. Baseline84> unchanged — the token already equals the baseline, proving the ban85> was never real.8687---8889## Phase 0 — Locate the doctrine [LOW freedom — run exactly]9091Find the rule surface: custom lint/ratchet axes, the detector suite,92the doctrine/governance doc (e.g. `MASTER.md`), baseline files,93exception lists, and the failure-output code. Enumerate every axis94with: what it detects, its remedy (if any), its baseline, and whether95a named sanctioned token exists. Record the count — a long tail of96un-remedied axes is the common state.9798## Phase 1 — Separate correctness from taste [HIGH freedom]99100For each axis, classify:101102- **Correctness** — catches a real bug / a11y / perf / security issue103 (missing focus, contrast fail, unclipped overflow that actually104 breaks layout). These may be stricter with less explanation.105- **Taste** — enforces a stylistic preference (radius scale, border106 style, card nesting). Not illegitimate, but they carry a higher107 burden: they **must** have a remedy and a reachable token, or they108 generate the appease-the-regex incident.109110## Phase 2 — Reference-check taste rules [HIGH freedom]111112For each taste rule, check whether Tier-D products ship the pattern it113rejects. Use `research` / official docs against Stripe, Linear,114GitHub, Docusaurus, Radix, shadcn. Where a rule bans what Tier-D115ships, it is a false-positive *candidate* — the burden of proof is on116the rule. Document the shipping reference for each disagreement. No117reference → mark **needs-reference**, not a finding.118119## Phase 3 — Run the governance contract [LOW freedom — do not skip]120121Check all five clauses per axis. State coverage honestly: *N of M122axes carry a remedy* (usually a small fraction — remedies get seeded123on the axes that bite during feature work; the long tail stays bare).124Every bare axis is a latent appease-the-regex incident. Flag:125126- missing-remedy127- unreachable-sanctioned-form (folklore)128- non-teaching failure output129- unexpiring exceptions130- regrowable baselines131132Un-remedied axes → `housekeep-backlog` as `BL-` rows (junior-PR133burndown).134135## Phase 4 — Freeze against regression [LOW freedom]136137Confirm or recommend a test suite that freezes the governance138properties so remedies cannot be silently stripped and sanctioned139tokens cannot drift back into a false-positive form. Without this, the140fix decays.141142## Self-critique before reporting [LOW freedom — do not skip]143144- **Evidence, not opinion** — every "false positive" cites a specific145 Tier-D reference that ships the pattern. No reference →146 needs-reference, not a finding.147- **Right axis** — content problem (this skill) vs enforcement148 problem (`audit-gate-logic`). Do not claim a bypass finding.149- **Remedy is real** — a proposed remedy names an existing or addable150 token, not "use the right style".151- **Baseline honesty** — confirm the sanctioned form actually passes152 at the current baseline before claiming the ban was illusory.153154## Definition of Done155156- [ ] Every axis enumerated: detect-target, remedy, baseline,157 sanctioned-token status158- [ ] Each axis classified correctness vs taste159- [ ] Taste rules reference-checked; disagreements cite a shipping160 reference161- [ ] Five contract clauses run per axis; remedy-coverage stated as162 N of M163- [ ] False-positives, folklore-tokens, missing-remedies,164 non-teaching failures, unexpiring exceptions, regrowable165 baselines flagged166- [ ] Freeze-test coverage confirmed or recommended167- [ ] Self-critique applied168- [ ] Read-only — propose, do not patch169170## Output format1711721. **Axis inventory** — axis | detects | correctness/taste | remedy?173 | reachable token? | teaches? | baseline-shrink-only?1742. **False-positive findings** — axis | legitimate pattern rejected |175 Tier-D reference | proposed remedy + token1763. **Governance gaps** — remedy-coverage (N/M), folklore tokens,177 non-teaching outputs, exception/baseline integrity1784. **Backfill burndown** — un-remedied long-tail axes as tracked179 items (→ `housekeep-backlog` `BL-` rows)1805. **Handoffs** — enforcement/bypass → `audit-gate-logic`; token181 SSOT → `housekeep-design`; justified divergence → `docs-adr`