/fabrika:test-auditfrom fabrika
Gates new tests at write time with four quality questions and junk-pattern checks, or audits existing tests for low-value patterns like implementation coupling and duplicate coverage. Supports focused sweeps and repo-wide read-only audits.
Ships in fabrika. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Four modes, one value bar. Authoring mode gates a new test at write time.
Audit mode runs a focused sweep of tests that re-assert source, duplicate
stronger proof, couple behavior to implementation, or keep test-only production
seams alive; optimize for confidence, not deletion count. A subsystem sweep
prunes one whole subsystem's test surface (every test file a plugin or core area
owns); before starting one, read SWEEP.md. A repo-wide audit
reads every test in a repository; it is read-only, edits no test or source file,
and lands as one ranked ticket filed through report;
before starting one, read REPO-WIDE.md.
Every other mode works inside the current ticket and lands as at most one pull
request. Candidates, defects or cleanups found outside that ticket leave
through report as follow-up issues, never as more
edits here.
Before adding any test, answer four questions; a missing answer means do not add it yet:
Then check the test against every junk pattern; a match fails the gate unless the retention bar names the contract it independently guards. A test that would break under behavior-preserving refactoring is asserting implementation, not behavior; rewrite it at the owning boundary before landing it.
Bug regression tests must fail on the pre-fix code for the intended reason and pass after the owner-boundary repair. A regression test that never demonstrably failed proves the mock, not the fix. One regression at the owner boundary covers the bug; do not replay the same scenario at every layer it crosses.
The shared checklist for every mode: the authoring gate rejects a new test that matches one, and audits hunt for existing tests that do.
Tests justify their maintenance cost by protecting behavior, a credible regression, or an independently meaningful contract. In an audit, an existing test that must change for behavior-preserving source reorganization is suspect, not automatically deletable; the authoring gate still rejects new ones.
Before judging a candidate, read the complete test and production owner, its
entry point, callers, callees, sibling implementations, overlapping tests, CI
routing, and relevant history. Read root and scoped AGENTS.md files first.
When the test claims dependency-backed behavior, inspect the dependency source
or types directly.
Keep discovery read-only and report evidence before editing.
Before any pass, read the in-flight set: the repository's open pull requests and the files each one changes. Hand that set to every pass. This read opens discovery in audit mode, in a subsystem sweep and in a repo-wide audit alike.
For a broad scope the ticket names, run parallel read-only passes when available:
AGENTS.md names;Outside a subsystem sweep, prefer a few high-confidence candidates over a large speculative inventory. Hunt for the junk patterns.
A candidate whose test file or production owner an open pull request deletes
or modifies is in flight. Record it as in flight: <pull request>, leave
its files to that pull request so this batch edits none of them, and list it in
the handoff. When it still needs work after that pull request
merges, file it through report as a follow-up naming the pull request it
waits on.
Done when the in-flight set was read before the first pass, each candidate in
scope is either in flight with its pull request named or has its
candidate evidence recorded, and candidates outside the
ticket are filed through report.
Keep a test when it independently enforces a public API, plugin SDK, protocol, config, migration, storage, security, platform, default, prompt-byte, generated cross-language, package, release, or architecture contract. Also keep:
report, rather than deleting it.Static or slow is not a deletion reason. A test that resembles implementation may still be the independent contract; prove otherwise before removing it.
Record every field below before editing. A missing field means the candidate is not ready for deletion:
Choose one coherent owner-boundary batch inside the ticket. Within it, delete obsolete test-only exports, globals, wrappers, and production paths whose only callers were the deleted tests, instead of preserving aliases. Move retained regressions to their canonical owners. Consolidate repeated package or dependency assertions into one generic contract.
Prefer net-negative production LOC. Do not add replacement tests that restate the same implementation, and do not convert uncertain candidates into cleanup to increase deletion counts.
Done when every edit traces to a candidate with full evidence and nothing outside the batch changed.
Validate through the loaded build skill; it owns which
checks and tests run. This skill adds only what a deletion needs. Never edit
source or tests while a test run is going in the same checkout.
Done when build's validation is green and steps 1 to 3 are recorded for the
hand-off.
Follow the loaded build skill: open a pull request only when the task asks
for one, never merge, and never review your own change. One ticket lands one
coherent batch; the next batch is a new ticket filed through report.
Report:
report.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub kamp-us/phoenix --plugin fabrika29 skills in this plugin
/adrRecord one architecture decision as an `NNNN-slug.md` file in the repo's decision corpus. Trigger on "/adr", "save this as an ADR", "record this decision", "ADR for X" — and reach for it whenever a technical preference, convention, or invariant gets settled in conversation that future agents must respect, even when nobody asks for an ADR./architecture-auditAudit a folder for architectural friction and hand the findings to grilling for human selection. Use when choosing where to deepen a codebase; use review for PR judgment. Audited code stays read-only./buildExecute one triaged, agent-ready issue end to end and land it as a PR — or, given a PR number, enter repair mode on that PR's branch. Trigger on "work the next issue", "pick up an issue", "implement issue #N", "build #N", "repair PR #N", "fix the FAIL on #N", and whenever triaged backlog work needs turning into a pull request. Rendered-visual construction is `build-ui`'s lane, not this skill's — unless a shell preloads both, and then the diff's class picks the law per file./build-uiExecute one triaged issue whose deliverable is a rendered visual surface, and land it as a PR — or, given a PR number, enter repair mode. Trigger on "build the UI for #N", "implement the page/component/screen", "make the visual change in #N", "repair the design FAIL on PR #N", and whenever backlog work's deliverable is something a user will see rendered. Text construction — code-as-text, prose, plans — is `build`'s lane, unless a shell preloads both, and then the diff's class picks the law per file; judging a rendered surface is `review-ui`'s./campaignDeclare a campaign, flip one campaign's lifecycle state, or read the ROADMAP `## Campaigns` table. Trigger on "/campaign", "declare a campaign", "start that campaign" (and any other flip between active, paused and done), "which campaigns are active". Homing issues onto a milestone is `triage`'s; judging the roadmap against its milestones is `guard roadmap-guard check`'s./check-epic-planGate one planned epic's task ledger and, only on a clean floor, flip its planned children and the epic itself to pickable. Trigger on "gate epic #N", "check the plan for epic #N", "run the plan gate", "is epic #N's ledger clean", "make epic #N's children pickable", and whenever a planned epic's ledger needs clearing before its children can be built. It does not plan (`plan-epic`) and never reviews a pull request (`review`).Other plugins' skills for the same job