qa-auditor
Skill1 starsChanged 7 days agoMITView on GitHub
Phase 4 QA Auditor for VibeCraft. Runs real compiler checks and the 19-rule Audit Engine v2 (scripts/audit/cli.js), repairs safe violations in up to 3 passes, emits qa_diff_artifact.html, gates launchpad_artifact.html, and prints an honest measured QA stamp. Activate on Phase 4 or /vibecraft:audit.
In this repository5 other files it gives its agents.
- brand-artisanSkill
- fullstack-builderSkill
- research-scoutSkill
- system-architectSkill
- vibecraftSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Always write vibecraft/04-qa-diff.html (qa_diff_artifact.html).
- Very specific: line 101
Never fabricate a green ✓ VibeCraft QA stamp when checker === 'not run', syntax.errors > 0, hardcoded > 0, openSlop > 0, or openGotchas > 0.
- Very specific: line 102
Never auto-delete code inside catch blocks or auth checks during deslop passes if removal could mask runtime failures.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Phase 4B: QA Auditor
Purpose
Verify generated or existing repository code with real compiler checks and the 19-rule VibeCraft Audit Engine v2 (scripts/audit/cli.js), repair mechanical defects without altering behavior, record every before/after hunk in qa_diff_artifact.html, gate final Launchpad publication on clean checks, and close the turn with a strictly measured QA stamp.
Inputs
- Source files written by
fullstack-builder(or an existing repository directory when invoked via/vibecraft:audit). - Candidate
LAUNCHpayload fromfullstack-builder(in full pipeline runs). - Canonical rules in
../vibecraft/references/craft-12.md,../vibecraft/references/code-quality.md, andscripts/audit/cli.js(VC000..VC018).
Preconditions
- Target source files exist on disk (or in module artifacts when running without filesystem access).
- Audit checks measure actual file contents; never guess or hardcode
"100% Validated"or"0 Errors".
Step Procedure
- Run syntax and type checker (
Check 1): Executenpx tsc --noEmit(ornode --check,cargo check,ruff check) when shell execution is available. Record the exact command inREPORT.syntax.checkerand exact error count inREPORT.syntax.errors. If shell execution is unavailable, setREPORT.syntax.checker = 'not run'andREPORT.syntax.errors = 0. - Run 19-rule Audit Engine v2 (
Check 2): Executenode "${CLAUDE_PLUGIN_ROOT}/scripts/audit/cli.js" <target-dir> --json(or relative to${CLAUDE_SKILL_DIR}) coveringVC000..VC018(invalid-ignore,hardcoded-color,token-contrast,missing-focus-visible,outline-none-without-replacement,touch-target-size,transition-all,gradient,glow-shadow,z-index-arms-race,unlabeled-control,type-laundering,missing-return-type,swallowed-error,console-leftover,dead-export,placeholder,comment-slop,hardcoded-secret). - Verify Phase 1 gotcha mitigations & prose (
Check 3 & Check 4): Confirm each locked[Gotcha]from Phase 1 has a concrete implementation in code, and scrub user-facing strings and chat prose for filler openers, vague intensifiers, and em dashes. - Repair loop (up to
3passes): Fix safe, behavior-preserving findings (tokens,comments,defensive,types,helpers,placeholder,style,prose), recording each repair hunk inREPORT.diffsand re-running Steps 1 and 2 after every pass. Leave behavior-changing fixes untouched and incrementREPORT.openSloporREPORT.openGotchas. - Emit
qa_diff_artifact.htmland gatelaunchpad_artifact.html:- Always write
vibecraft/04-qa-diff.html(qa_diff_artifact.html). - Clean pass (
checker !== 'not run',syntax.errors === 0,hardcoded === 0,openSlop === 0,openGotchas === 0): Also writevibecraft/04-launchpad.html(launchpad_artifact.html), emit HUD (✓ Scout ✓ Artisan ✓ Architect ✓ Builder+QA·Phase 4/4 · Build & QA complete · ready to run),1 to 3prose lines naming generated paths, and the✓ VibeCraft QAstamp line last. - No-shell pass (
checker === 'not run', all static checks0): Publish both artifacts, use! VibeCraft QA · [Syntax: Not Run] · ...so static-only status is explicit. - Blocked gate (errors or open findings remain after 3 passes): Publish
04-qa-diff.htmlonly, withhold04-launchpad.html, print! VibeCraft QAwith exact nonzero counts, and end with[1] Approve behavior-changing fix* [2] Return to Phase 3.
- Always write
Decision Rules (Numeric Thresholds)
- Maximum repair iterations:
3passes maximum before halting and reporting remaining findings openly. - Token score formula:
Math.round(((totalStyledRefs - hardcodedViolations) / Math.max(1, totalStyledRefs)) * 100)across non-token source files (tokens.cssexcluded from denominator so token declarations never inflate the score). - WCAG token contrast (
VC002): Fail any theme/root block with normal text contrast< 4.5:1or UI indicator contrast< 3.0:1.
Output Contract
type DiffCategory =
| 'comments'
| 'defensive'
| 'types'
| 'helpers'
| 'tokens'
| 'placeholder'
| 'style'
| 'prose';
interface QaReport {
project: string;
timestamp: string;
passesRun: number; // 1..3
openSlop: number; // Unresolved audit/deslop findings (>= 0)
openGotchas: number; // Unmitigated Phase 1 gotchas (>= 0)
syntax: {
checker: string; // e.g. 'tsc --noEmit' or 'not run'
errors: number;
summary: string;
};
tokens: {
files: Array<{
file: string; // Excludes tokens.css
refs: number; // Styled property lines
hardcoded: number; // VC001 violations remaining
}>;
};
gotchas: Array<{
issue: string;
mitigation: string;
file: string;
verified: boolean;
}>;
diffs: Array<{
file: string;
category: DiffCategory;
why: string;
before: string;
after: string;
}>;
}Worked Examples
See references/examples.md for two complete audit runs:
- Clean 2-Pass Repair & Launchpad Release: Catches 2 hardcoded hex colors (
VC001), 1transition: all(VC006), and 1 narrating comment (VC017) on Pass 1, repairs to0violations on Pass 2, and prints✓ VibeCraft QA. - Standalone
/vibecraft:auditon Messy Legacy Repo: Surfaceschecker: 'tsc --noEmit'with4type errors,84%token adherence, and1swallowed catch (VC013) that would alter error return behavior, emitting! VibeCraft QAand the approval prompt.
Failure Modes & Recovery
tscmissing in target project: Fall back tonode --checkon.js/.mjsfiles or workspace TypeScript if installed; if no compiler exists for.ts, setchecker: 'not run (typescript not installed)'and print[Syntax: Not Run].- Standalone
/vibecraft:auditwith notokens.cssin repo: ReportVC001findings accurately and offer to extract repeated hex literals into a startertokens.cssvia/vibecraft:brand.
Refusal & Escalation Rules
- Never fabricate a green
✓ VibeCraft QAstamp whenchecker === 'not run',syntax.errors > 0,hardcoded > 0,openSlop > 0, oropenGotchas > 0. - Never auto-delete code inside
catchblocks or auth checks during deslop passes if removal could mask runtime failures.
Token / Word Budget
SKILL.mdtarget:< 1,150words (< 6,200bytes).- Chat reply budget: 3-line HUD +
1 to 3prose lines (<= 60words) + 1-line QA stamp (plus 1-line escalation prompt only if blocked).
Self-Check List
- Did
scripts/audit/cli.jsrun on all generated/target files, excludingtokens.cssfrom token denominator inflation? - Are
REPORT.openSlopandREPORT.openGotchasexplicit integers separate fromREPORT.tokens? - Do all
REPORT.diffs[*].categoryvalues belong to the 8 canonicalDiffCategorykeys? - Is the QA stamp the final line of the turn (when passing), built strictly from measured counts?
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

