doc-tdd-audit
Audit a TDD - run declarative structural checks plus content review and produce a combined report for doc-tdd-fixer. Use for TDD quality gating before IPLAN.
What this skill does
# doc-tdd-audit
## Purpose
Run a **unified TDD audit** — declarative structural checks plus content-quality
review — in one pass, producing a single combined report that
`../doc-tdd-fixer/SKILL.md` consumes. The framework ships no runtime code, so
**this skill is the validator**: Claude performs each check directly against the
TDD using the spec as the contract.
**Layer**: 7 (TDD quality gate). **Upstream**: a TDD file. **Downstream**:
`TDD-NN.A_audit_report_vNNN.md` and an optional fix-cycle trigger.
## When to Use
Use after a TDD exists and before generating the IPLAN, or inside the
autopilot's audit↔fix cycle. Do **not** use to create a TDD (use
`../doc-tdd/SKILL.md` or `../doc-tdd-autopilot/SKILL.md`).
**Fresh-audit policy:** always audit from scratch — never reuse prior scores or
cached results; compute the IPLAN-Ready score independently each run.
**Report cleanup:** after writing the new report, delete superseded
`TDD-NN.A_audit_report_v*.md`; keep `TDD-NN.F_fix_report_v*.md` and
`.drift_cache.json`. Record a cleanup summary in the report.
## Execution Contract
**Input:** TDD path (`docs/07_TDD/TDD-NN_*/...`); optional score threshold
(default 90).
**Sequence:** 1) run structural checks → 2) record findings → 3) run content
review → 4) merge/normalize findings → 5) write `TDD-NN.A_audit_report_vNNN.md`
→ 6) if auto-fixable findings exist, hand off to `doc-tdd-fixer`.
## Structural Checklist
Authority: `${CLAUDE_PLUGIN_ROOT}/framework/layers/07_TDD/README.md`,
`${CLAUDE_PLUGIN_ROOT}/framework/layers/07_TDD/TDD-TEMPLATE.yaml` (embedded rules), and
`${CLAUDE_PLUGIN_ROOT}/framework/governance/ID_NAMING_STANDARDS.md`. Style:
`${CLAUDE_PLUGIN_ROOT}/framework/governance/AUTHORING_STYLE.md`.
**Template-conformance enumeration (mandatory first step).** Load
`TDD-TEMPLATE.yaml` and enumerate every required section (each top-level YAML
key that is not explicitly `required: false`). The Structure check below is
satisfied **only** when every enumerated required section appears as a `##`
heading in the artifact. Any missing required section is a **blocking finding**
— never rationalise it as a "compact" variant, "documented walkthrough",
"lint-pinned", or any other exception. There is one template per layer and one
canonical required-section set.
**Tier 1 — blocking (error):**
| Check | Verifies |
|-------|----------|
| Element ID format | every test-case ID matches `TDD.NN.04.xxxx` (4-hex hash); no removed patterns |
| Structure | every section enumerated above is present and non-empty |
| Test types | each case carries a valid `type` (unit/integration/e2e/security) |
| BDD mapping | each BDD scenario maps to tests (Section 3) |
| Cumulative tags | upstream @brd @prd @ears @bdd @adr @spec all present |
| Parent SPEC | `@spec: SPEC-NN` valid and the SPEC file exists |
| Quality gate | IPLAN-Ready score ≥ threshold (default 90) |
**Tier 2 — advisory (warning):** inputs/expected outputs present per case; edge
cases/error paths documented; e2e cases carry a `bdd_ref`; thresholds set per
type; frontmatter metadata (below); internal links and template/governance
references resolve; diagram tags present (use `../charts-flow/SKILL.md`).
**Authoring-style check (Tier 2 → Tier 1 at threshold).** Verify the document
complies with `${CLAUDE_PLUGIN_ROOT}/framework/governance/AUTHORING_STYLE.md`:
no banned phrases, form preferences observed (tables/bullets over prose where
homogeneous), size targets met within +50%. **Promote to blocking** when ≥3
banned phrases occur in one section OR the document exceeds its size target by
>50%.
**Combined status:** `PASS` only if all Tier 1 pass **and** content score ≥
threshold **and** no blocking issues; otherwise `FAIL`.
## Metadata Checks
| Field | Required | Valid values |
|-------|----------|--------------|
| `document_type` | yes | `tdd-document` (not `template`) |
| `artifact_type` | yes | `TDD` |
| `layer` | yes | `7` |
| `deliverable_type` | yes | `code` |
Findings: `VALID-M001` missing `deliverable_type`; `VALID-M002` invalid value;
`VALID-M003` `document_type` not `tdd-document`.
## Content Sub-Checks
These sub-checks supplement the structural / metadata gates with
content-quality checks targeting failure modes the v0.6.1 review
missed (REVIEW-CALIBRATION-001, plan PR #95). Section references
use concept names (not § numbers) so the same wording applies across
all 8 layer templates.
### Sub-check A1 — Cell actionability (auditor lens)
Every table cell must commit to an ACTIONABLE claim, not just be
non-empty. Raise a finding when:
- A quantitative column (budget cap, latency threshold, retention,
capacity, throughput, error rate, or any other measurable
dimension) holds prose without a number, a bound, or a
`[PROVISIONAL — confirm with business]` flag.
- A status column reads `Pending`/`Approved` AND the parallel
content column (Recommended selection, Mitigation, …) is blank or
also reads `Pending`.
- A cell cross-references another part of this artifact as if
quoting a commitment (e.g., "Within the budget cap stated in the
constraints section") but the referenced section states the
category without a measurable bound.
Severity: P2 default; P1 if the non-actionable cell appears on a
**launch-gate path** (the section the template labels "Acceptance
Criteria", "Launch Gates", or equivalent).
### Sub-check A2 — Assumption-capture discipline (auditor lens)
Every assumption-like statement ("X holds for this cycle", "Y does
not apply", "Z is fixed at value V") that downstream layers may
rely on must be captured as a row in the artifact's **assumptions
table** (the section the template labels "Constraints and
Assumptions" or equivalent) with an
`<artifact>.NN.<assumptions-section>.xxxx` ID. Assumption-shaped
prose buried inside a functional requirement, risk, quality
expectation, or other section without a corresponding
assumptions-table row is a finding.
Severity: P2.
### Sub-check A3 — Cross-section pointer validity (auditor lens)
For every cross-reference (a section pointer such as "the
constraints section" or "§N", an artifact ID like
`<artifact>.NN.SS.xxxx`, or a tag like `@threshold:`, `@diagram:`,
`@brd:` / `@prd:` / `@ears:` etc.):
1. Verify the target ID exists in the referenced section.
2. Verify the referenced content matches the citing claim's shape
(e.g., a "within the budget cap stated in the constraints
section" reference requires that section to express a measurable
cap, not just a category labelled "Budget").
Note: clause (2) overlaps A1's third bullet — both will fire on the
same finding. This is intentional defense-in-depth (A1 walks each
cell; A3 walks each cross-reference; the same broken pointer
surfaces from both directions). The fixer treats them as one
finding to resolve.
Severity: P2 default; P1 if the broken pointer appears on a
launch-gate path.
### Sub-check BA1 — Acceptance criterion testability (business_analyst lens)
Every Acceptance Criterion (in the artifact's **functional
requirements section**, however the template labels it —
"Functional Requirements", "Requirements", etc.) must be TESTABLE
as written. Testable means one of:
- A numeric threshold (e.g., `p95 < 50ms`, `≥ 99.9%`).
- A binary outcome with a single observable definition (e.g.,
"redirect resolves to the originally submitted URL — 100%
correctness"; NOT "synchronous response on submit" without saying
what the response contains).
- A fully enumerated outcome set (e.g., `{redirect, not_found}`).
- A tolerance bound that converts a soft semantic into a
measurement (e.g., "best-effort within ±5% under sustained
load"; NOT "best-effort / eventually consistent" alone).
Raise when an AC requires a tester to invent the success criterion.
Severity: P2 default; P1 if the AC is the only criterion for a P1
functional requirement.
### Sub-check SE1 — Deferred-decision safety (security_engineer lens)
For every risk with Likelihood ≥ Medium AND Impact ≥ High:
1. IdenRelated in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.