About harness-audit
harness-audit is a skill for teams reviewing test suites and their supporting infrastructure. It checks project testing standards, flakiness patterns, and invariant coverage, then produces an audit report with code and remediation citations.
Key features
- 01Check testing standards and harness foundations
- 02Detect test smells and flakiness traps
- 03Assess invariant-dimension coverage
- 04Scale audit work across test suites
- 05Produce reports with dual citations
Use cases
- 01Review test-suite reliability risks
- 02Find gaps in invariant coverage
- 03Inform test-remediation planning
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ venhdev/ zenforge --skill harness-auditAfter installing, type/harness-auditin Claude Code to confirm it loaded.
Bundled filesreferences/invariant-dimensions.mdreferences/test-smells.md
Details
From the project READMEharness-audit — Test Suite & Harness Quality Inspector
Domain Rubric
1. The Audit Hierarchy
Inspect target test suites across progressive architectural layers:
- Harness Anchor & Foundation Layer:
- Inspect the authoritative project harness anchor at
.agents/harness-anchor.mdand follow itsGoverning Testing SSOTsroutes to read project testing standards. - If missing: Check for legacy test guides (
test/AGENTS.md,tests/AGENTS.md). If found, use as temporary SSOT and advise running/zenf-initto establish canonical.agents/harness-anchor.md. If absent, mark anchor asUNGROUNDEDand route to/zenf-init. - Verify existence on disk of registered hermetic primitives (Deterministic Clock, Storage Sandbox, Fixtures / Factories, Transport / Network Mock, Lifecycle / Cleanup).
- Inspect the authoritative project harness anchor at
- Smells & Flakiness Traps:
- Evaluate tests against anti-patterns and flakiness traps detailed in
references/test-smells.md.
- Evaluate tests against anti-patterns and flakiness traps detailed in
- Invariant Dimension Blind Spots:
- Audit test coverage against invariant dimensions detailed in
references/invariant-dimensions.md.
- Audit test coverage against invariant dimensions detailed in
2. Mandatory Reference Grounding
Before executing audit passes, agents MUST read and ground themselves in:
references/test-smells.mdfor concrete smell definitions and remedies.references/invariant-dimensions.mdfor invariant testing vectors.
3. Review Verdicts & Citation Rule
PASS: Harness anchor active; hermetic foundation verified; zero flakiness smells; balanced invariant dimension coverage.WARN: Infrastructure present but maintenance debt observed (duplicate setup, missing assertion messages).CRITICAL: Harness anchor absent, foundation missing (no virtual clock/ephemeral storage), or flakiness smells detected (clock leaks, sleeps).- Dual-Citation Rule: Every defect must cite both the offending code pointer (
file:///path/to/test#L<N>) and the violated invariant/remediation.
Canonical Output Contract
# Harness Audit Report: <Target Scope>
## 1. Executive Verdict
- **Verdict**: <PASS | WARN | CRITICAL>
- **Target Inspected**: <Directory or Test Files>
- **Harness Anchor (SSOT)**: <Cited anchor pointer or 'UNGROUNDED (Missing .agents/harness-anchor.md)'>
- **Flakiness Risk**: <LOW | MEDIUM | HIGH>
- **Summary**: <Single-sentence technical judgment>
## 2. Infrastructure & Anchor Gaps
*(If clean: 'Harness anchor verified; foundational hermetic primitives active.')*
- **[<Anchor / Primitive>] <Gap Title>**: <Deficit description>
- Impact: <Why this causes flakiness or maintenance debt>
- Recommendation: <Architecture fix or seed anchor pointer>
## 3. Findings & Invariant Blind Spots
- **[<Smell / Dimension>] <Title>**: <Defect description>
- Offending Code: [<file>#L<N>](file:///path/to/test#L<N>)
- Remediation: <Exact architectural correction required>
Routing
- Missing harness anchor requires setup → (via /zenf-init).
- Missing foundational hermetic primitives requiring architectural trade-off deliberation → (via /clarify).
- Discovered gaps or invariant blind spots ready for remediation planning → (via /changeset).
- A supported changeset authorizes localized test remediation and its acceptance criteria/verification → (via /forge).
Execution Protocol
- Grounding & Scope Intake:
- Inspect
.agents/harness-anchor.mdif present. - Read
references/test-smells.mdandreferences/invariant-dimensions.md.
- Inspect
- Scale-Adaptive Audit Dispatch:
- In-Turn Execution (< 10 test files or localized suite): Inspect test suite against Audit Hierarchy directly in-turn.
- Subagent Fan-Out (broad multi-package test suites): Launch concurrent
researchsubagents dynamically scaled to partitioned directories or caller-declared budget, seeding with anchor and reference paths (offload raw test traces to.agents/scratch/harness-<slice>-dossier.md).
- Synthesis & Turn-Halt Gate (Fan-in):
- Deduplicate findings into the Canonical Output Contract with pointers to any offloaded dossiers.
- Present completed report into conversation stream and halt turn immediately.
Comments
Markdown supported