/vibeflow:auditfrom vibeflow
Audits recent work against Definition of Done and project patterns by running tests, comparing code to spec, testing scenarios, and sabotaging risk code. Reports PASS/PARTIAL/FAIL with severity and cause. Includes a Critical Gate safety scan for destructive operations.
Ships in vibeflow. 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.
None: SKILL.md is the whole skill.
What it does: Finds the spec (in .vibeflow/specs/ or by path), reads the change from a review package, checks each DoD item and pattern compliance, runs the project's test suite, tests scenarios and sabotages risk code (by hand, with --probes), and reports PASS / PARTIAL / FAIL. If tests fail, the result is FAIL regardless of DoD. It works best in a session that did not implement the work.
Examples:
audit .vibeflow/specs/login-flow.md — Audit implementation against the login-flow spec.audit login-flow — Same; the agent looks up the spec by feature name.audit login-flow --package .vibeflow/reviews/login-flow-round-0.md — Audit from a review package already written.audit login-flow --reaudit <round-commit> — Re-audit the fix made after the round commit.audit login-flow --probes — By hand, also write the probe file and run the sabotage.Detect the language of the user's current request or conversation.
Write ALL output in that same language.
Technical terms in English are acceptable regardless of the detected language.
The report's machine-read labels stay literally in English in any output
language, because watch-round.mjs, stats and the smoke harness match them:
the header labels and their fixed values (Independence, Round, Stage,
final, Review package, Base, Knowledge base, Verdict with pending, PASS, PARTIAL and
FAIL), the read receipt's labels (Read in full, Not read whole, none),
the ### headings of the report, and the severity, cause and
closed-by-probe tokens of a finding line.
Audit the implementation identified in the user's current request.
Record Independence: fresh session when this session did not do the work (a
subagent or a new session dispatched to audit), and Independence: same session when it runs where the work was done or the host has no fresh session
to offer. Independence: same session is recorded instead of refusing, and the
audit runs the same way; the reader weighs it, because a session that did not
see the work finds what the implementer missed.
The loop kit lives at ${CLAUDE_SKILL_DIR}/../implement/loop/ (in OpenCode,
Codex and Hermes, the same path relative to the directory of this SKILL.md).
This command uses two of its scripts, review-package.mjs and
check-probes.mjs. When the folder is missing, the kit is not installed:
updating the Vibeflow plugin installs it, and where this SKILL.md sits in
.opencode/skills/, npx setup-vibeflow@latest --opencode --force
(setup-vibeflow 0.18.0 or newer) installs it. Each step below says how the audit runs
without it.
The knowledge base is what the analyze workflow writes: .vibeflow/index.md,
.vibeflow/conventions.md, .vibeflow/decisions.md and .vibeflow/patterns/.
Its signal is .vibeflow/index.md, which only analyze writes: a .vibeflow/
folder that holds only specs/ or prds/ is not a knowledge base. Check
.vibeflow/index.md by its path, because search tools respect .gitignore
and miss it. Before anything is written (the review package, the report),
in every mode, settle which of three states holds:
present: .vibeflow/index.md exists at the root of this checkout.missing here: it does not, this checkout is a linked worktree, and the
main checkout has <main>/.vibeflow/index.md. <main> is the path on the
first worktree <path> line of git worktree list --porcelain; this
checkout is a linked worktree when that path differs from
git rev-parse --show-toplevel run here, both resolved with realpath
(macOS puts /private in front of /var and /tmp).
When that first path is a git folder and not a checkout, as in a worktree of
a submodule (<super>/.git/modules/<x>), <main> is its
core.worktree, from git --git-dir=<that path> config core.worktree,
resolved from that path. Where the host gives no shell,
read .git at the root by its path: a file that says
gitdir: <path>/.git/worktrees/<name> makes this checkout a linked worktree
whose main checkout is <path>, resolved from this checkout's root when it
is relative. The root is the folder that holds .git, found by going up
from the current folder.
A file that says gitdir: <super>/.git/modules/<x>/worktrees/<name> makes
this checkout a linked worktree of a submodule, whose main checkout is the
core.worktree set in <super>/.git/modules/<x>/config, resolved from
<super>/.git/modules/<x>.none: neither here nor in the main checkout, including the main checkout
itself without index.md and a folder outside git.In the missing here state, stop. The reply's first line is
Knowledge base missing in this worktree: <main>/.vibeflow/index.md exists in the main checkout.,
with nothing before it. That line stays in English in any output language.
Then comes, in a code block, the command that brings the base into this
worktree, run from its root. It lists only the items the main checkout
has, in the order index.md, conventions.md, decisions.md, patterns.
Before writing it, check each of the four by its path in the main checkout
and leave out only the ones that do not exist. Each path goes in single
quotes (a single quote inside a path becomes '\''), as in:
mkdir -p .vibeflow && cp -RL '<main>/.vibeflow/index.md' '<main>/.vibeflow/conventions.md' '<main>/.vibeflow/decisions.md' '<main>/.vibeflow/patterns' .vibeflow/
The reply ends saying that this command goes on without the base only when
the person says so in the conversation; with that word, it runs as in the
none state.
The state goes into the report's Knowledge base: line (Output format).
With --consolidate-hotfixes in the input, the round's target is
.vibeflow/hotfixes/ instead of a spec — jump to Consolidation mode below.
With --reaudit <round-commit>, follow Re-audit mode below.
A standalone audit (no loop briefing) writes the probe file and sabotages only
with --probes, so an audit run by hand writes only under .vibeflow/; a loop
part (briefing present) runs both as written (steps 6 and 7).
The audit runs in seven stages, named in the steps. Save the report to
.vibeflow/audits/<feature-slug>-audit.md (in a loop part, the path its
briefing names, <feature>-<part>-audit.md; create the directory if needed).
Write it at the first stage and rewrite the report at the end of every stage
with Stage: <k>/7 <name> and **Verdict: pending** until the last write, so
a partial report never reads as a finished one and a retry knows what a dead
attempt left. The last write sets Stage: final and the verdict; when the
audit stops early, that stop is the last write. When a report that a dead
attempt left is already at that path, restore every sabotage it records as in
progress (step 6) before anything else, from its copy, comparing the hash.
When the copy is gone (a restart empties the temporary folder), read the
file's version in git with git show HEAD:<path> and compare its hash with
the hash the report recorded before writing anything: only when they match,
write that version over the file. When the hash does not match, leave the
file as it is, stop, and tell the user which file is still sabotaged and
which change to undo, as its in-progress line in the report names them.
Once a file is restored and its hash checked, from the copy or from git,
delete its copy; once every sabotage the dead attempt left in progress is
restored, delete its temporary folder, as step 6 does after its last
restore.
Review package (1/7 package). The audit reads the change from one
file, so the Critical Gate and the review judge the same diff. Build or
read it before the report's first write, so the report is never part of
the change.
--package <path> given: read that file; Base: is the base it names..vibeflow/reviews/<feature-slug>-round-0.md
(in a loop part, the path its briefing names), after checking
node --version, because the kit needs Node.js 18 or newer:
node ${CLAUDE_SKILL_DIR}/../implement/loop/scripts/review-package.mjs <project root> <base> <out>,
with the base --base <ref> when given, otherwise the merge-base with
the default branch (main/master), or HEAD for uncommitted work on
the default branch. The script leaves the loop's own artifact folders
under .vibeflow/ (loop/, briefings/, progress/, reviews/,
audits/) out of the package and counts them at its top: they never
count as a change. Neither does the rest of .vibeflow/ (specs, PRDs,
the knowledge base): specs, PRDs and a tracked knowledge base that
changed come in as context when something changed outside it, and a
new, untracked knowledge base (the main checkout's, brought into a
worktree) stays out, counted by the
package's Knowledge base left out: line; step 2 reads it on disk, as
the Knowledge base section says. A change only under .vibeflow/ is an EMPTY
PACKAGE, so work committed on the default branch plus a new spec left
untracked takes the committed-work case below. Exit 1 reads as empty
only when the file it wrote carries the EMPTY PACKAGE marker; exit 2, or
any other failure (exit 1 without the marker, 127 when node is
missing), is an error, not a verdict: quote it as an error and fix the
base, the path or the install, except for the unsubstituted variable of
the next case.${CLAUDE_SKILL_DIR} literally, or a kit
path that starts at /../, means the variable was not substituted.
In OpenCode, Codex and Hermes the variable is never substituted: resolve
the kit path relative to the directory of this SKILL.md and run the
command again.
In Claude Code before 2.1.69, or a host that does not know the variable,
the kit counts as not installed, not as an error to fix. Record
Review package: none (kit not installed) with the hint to update
Claude Code to 2.1.69 or newer, and go on as the next case says. With
the path resolved, node answering "Cannot find module" for the kit's
script means the kit folder is missing: record the same
Review package: none (kit not installed), with the install hint above.
Any other exit 1 without the marker stays an error.node --version shows no Node 18 or newer:
compute the diff as before — git diff HEAD for uncommitted work,
git diff <base>...HEAD for a branch, leaving the same artifact folders
out and reading a change only under .vibeflow/ as no change — and
record Review package: none (kit not installed) with the
install hint above, or Review package: none (Node.js 18+ not found)
with what to install (Node.js 18 or newer, from nodejs.org or the
host's package manager).--package, no --base) whose
default diff is empty because the work is already committed on the
default branch runs over the code as before: it records
Review package: none (no uncommitted or branch change; --base <ref> audits committed work),
reviews the files the spec names, and its Critical Gate section says
that no diff was scanned.--package, a given --base <ref>, a re-audit), ends the audit with
**Verdict: FAIL** and the reason "nothing to audit", never PASS: an
audit over no change has proven nothing.Spec (2/7 spec). Find the spec — in .vibeflow/specs/ or at the
given path — and extract its Definition of Done and the Risk code: line
under ## Risks. Read .vibeflow/conventions.md and the pattern docs the
spec lists under Applicable Patterns. If it lists none, resolve them: read
the ## Pattern Registry block in index.md (between
<!-- vibeflow:patterns:start/end --> markers) and cross-reference its
tags and modules against the spec's scope — top 3–5 matches; with no
registry, infer which are relevant. The spec's Documents to read: line
counts .vibeflow/conventions.md and these pattern docs; in a spec
without that line, the list is found as before, and only the list: its
documents are read whole all the same. Read each of these documents whole, one file
per read: open it with your file-reading tool, without an offset or a limit,
and never several files in one shell command. When a read comes back cut (a
preview, a notice that the output was saved to a file, a line or size
limit), keep reading from where it stopped to the last line. A list of
headings or a keyword search is not a read. Record them in the report's read
receipt, its labels in English in any language, right after its Knowledge base:
line. One - <path> (<lines> lines) line
per document read whole, its path relative to the project root. When a
document was not read whole, Not read whole: stands alone and each such
document follows on its own line, - <path>: <why>, and the report says so.
The receipt is what this session actually read: a document not read to its
last line goes under Not read whole, and a document read to its last line
over more than one read, each read starting from where the previous read stopped, counts as read whole. Read the files the package
changes and the ones the spec says should change.
In the none state there is no .vibeflow/conventions.md and no pattern
doc to read: the receipt reads Read in full: 0 of 0, step 5's pattern
compliance is skipped, its section saying so in one line, and the report's
Knowledge base: line names the state. Skipped pattern compliance is not
the "insufficient context" FAIL of the verdict rules.
Tests (3/7 tests). Run the tests. Prefer commands listed in the spec;
otherwise detect the project's runner from the stack (.vibeflow/index.md,
then the test command that the project's manifest or build file declares or implies, such as package.json, pyproject.toml, Cargo.toml, go.mod, a .csproj, build.gradle or Package.swift, or the equivalent in the project's stack).
Critical Gate — destructive-op safety scan (4/7 critical-gate).
A safety net for dangerous changes the DoD never mentions —
security regressions and destructive operations that are side effects,
not features. Not a style check.
a. Read the diff from the review package (step 1) — added and removed
lines are both required, because the highest-value rules detect
removed protections. When the package carries a TRUNCATED or
WITHHELD list at its top, it left those file diffs out (over its size
cap, or with a line that looks like a secret): read each listed file
with git before matching the catalog — git diff <base> -- <path>
(<base> is the package's base) for a tracked file, the file itself
for an untracked one (the package's ## New files names those) — and
match its lines as if they were in the package. The ### Critical Gate
section then carries the line
Left out of the package: <n> file(s), read with git, or
Left out of the package: none when the package has no such list.
A line from a file listed under WITHHELD is cited, in the report and
in its prompt pack, by its path, its line number and the rule it
matched, never by its text: the report lives in .vibeflow/audits/, a
folder the project may commit. The same goes for what the package took
out of its header: a commit it shows without a subject is cited by its
short hash, never by its subject, and a path it took out is cited by
the package section where the note in its place appears, never by its
name. A line of a file whose path the package took out is cited by the
package section where the note on that path appears and by its line
number, never by its path.
b. Match each changed line against the Rules Catalog below. A rule fires
when the diff line's direction matches its scope (a=added, r=removed,
b=both) and the line does what the rule describes, in whatever language
or format the file is written. The catalog describes behaviours. The
names in parentheses are examples from a few ecosystems, never the list
of what counts: the same behaviour under another name, in another
language, fires the same rule.
### Critical Gate section carries a
Scanned: line: how many of the changed files were scanned and, by
path, each file left out and why. A path the package took out is
cited as item a says, by the package section where its note appears.
When step 1 ran over the code, the No diff scanned line stands in
place of the Scanned: line, and the section does not say "Clean":
nothing was scanned.
c. Honor overrides. Skip a finding if the spec, the PR body, or a comment
near the line contains vibeflow:allow <RULE_ID>: <reason>. CRITICAL/HIGH
require a non-empty justification; WARNING/INFO may be overridden without one.
d. Map findings to the verdict:
| Unresolved finding | Effect |
|---|---|
| CRITICAL / HIGH | FAIL — listed first in the incremental prompt pack |
| WARNING | caps the verdict at PARTIAL; listed, does not block |
| INFO | informational note only |
| none | proceed normally |Rules Catalog (~40 rules, 6 domains). Each rule is a behaviour. A domain's "where" says where that behaviour usually lives, as a guide and never as a filter. Item b says when a rule fires: on what a line does, in any language, and not on a mention; when you cannot tell, the line fires.
Database — where: SQL in .sql files, in migrations of any framework and inside code; a schema change written as a migration call counts as its SQL. Creating, emptying or dropping a test database or its tables in a test's setup or teardown is not this domain's behaviour
| ID | Sev | Scope | Behaviour |
|---|---|---|---|
| DS101 | CRITICAL | a | a database is dropped (DROP DATABASE, dropDatabase()) |
| DS102 | CRITICAL | a | a table is dropped, by SQL, a migration or any schema call (DROP TABLE, drop_table, migrations.DeleteModel, dropTable) |
| DS103 | CRITICAL | a | a table is emptied by a command that removes every row at once while the table stays (TRUNCATE, TRUNCATE TABLE, truncate()); a DELETE is DS106 or DAT101 |
| DS104 | HIGH | a | a column is dropped, by SQL, a migration or any schema call (DROP COLUMN, remove_column, migrations.RemoveField, dropColumn) |
| DS105 | HIGH | a | a part of a table is dropped by altering it: a constraint, an index, a key or a column (ALTER TABLE … DROP, remove_index, dropForeign) |
| DS106 | HIGH | a | every row of a table is deleted by a DELETE with no condition (DELETE FROM <table> with no WHERE); the same line is also DAT101, and a DELETE whose condition selects many rows is DAT101 alone |
| DS108 | WARNING | a | a table or a column is renamed (RENAME TABLE, ALTER TABLE … RENAME, rename_table, rename_column, renameTable) |
| DS110 | INFO | a | a column's type is changed, which can lose data (ALTER TABLE … MODIFY, ALTER COLUMN … TYPE, change_column, migrations.AlterField) |
Security — where: application code, scripts and configuration, in any language
| ID | Sev | Scope | Behaviour |
|---|---|---|---|
| SEC101 | CRITICAL | r | a check that requires authentication or authorization is taken off a route, handler, job or resource: a decorator or annotation, a middleware or filter, a guard that turns anonymous users away (authenticate, @login_required, isAuthenticated, requireAuth) |
| SEC102 | CRITICAL | r | CSRF protection is removed |
| SEC103 | HIGH | r | rate limiting or throttling is removed |
| SEC104 | CRITICAL | a | a credential is written as a literal of 8 characters or more: a password, token, key or secret assigned, passed or set, under any name (password, secret, api_key, token) |
| SEC105 | HIGH | a | TLS/SSL is turned off (ssl/tls = false/off/0) |
| SEC106 | HIGH | a | certificate or host verification is turned off: an option, flag, callback or trust manager that accepts any certificate or skips the check (verify=false, InsecureSkipVerify=true, NODE_TLS_REJECT_UNAUTHORIZED=0) |
| SEC107 | WARNING | r | sanitization or output encoding is removed (XSS risk) |
| SEC108 | WARNING | a | code or a command line built at run time from a value that is not a constant is evaluated or handed to a shell or a process launcher (eval, exec, system, popen, subprocess.call, child_process.exec) |
Infrastructure (IaC) — where: infrastructure declarations in any tool; Terraform, CloudFormation and Pulumi shown, the same setting in another tool counts
| ID | Sev | Scope | Behaviour |
|---|---|---|---|
| IAC101 | CRITICAL | a | a resource is set to be destroyed together with the data it holds (force_destroy = true, destroy = true, forceDestroy: true, DeletionPolicy: Delete, RemovalPolicy.DESTROY) |
| IAC102 | CRITICAL | a | the guard that keeps a resource from being destroyed is turned off (prevent_destroy = false, deletion_protection = false, DeletionProtection: false, protect: false) |
| IAC103 | HIGH | b | who can do what on cloud resources changes: a role, a policy, a user or a permission binding is added, changed or removed (aws_iam_role, iam_policy, iam_user, AWS::IAM::Policy, google_project_iam_member) |
| IAC104 | HIGH | r | a firewall rule, a security group or a network ACL is removed (aws_security_group, aws_network_acl_rule, google_compute_firewall, AWS::EC2::SecurityGroupIngress) |
| IAC105 | WARNING | a | network access is opened to any address (cidr_blocks = ["0.0.0.0/0"], CidrIp: 0.0.0.0/0, source_ranges = ["0.0.0.0/0"], ::/0) |
| IAC106 | WARNING | a | a resource is made reachable from the internet (publicly_accessible = true, PubliclyAccessible: true, public_access = true) |
Kubernetes — where: Kubernetes manifests and the templates that produce them; the same setting in another container platform counts
| ID | Sev | Scope | Behaviour |
|---|---|---|---|
| K8S101 | HIGH | a | a container runs privileged (privileged: true, "privileged": true, --privileged) |
| K8S102 | HIGH | a | a container mounts the disk of the node or host it runs on: any hostPath: volume, or a bind mount of a system path of the host such as the root, /etc, /proc or the container runtime's socket |
| K8S103 | HIGH | a | a container runs as the root user (runAsUser: 0, user: "0", user: root); in a Dockerfile what counts is the user the final stage runs as (its last USER, or the one it inherits from the stage it is built from), so switching to root for a build step and back is not this |
| K8S104 | HIGH | a | the check that keeps a workload from running as root is turned off (runAsNonRoot: false, an OpenShift SCC whose runAsUser is type: RunAsAny, pod-security.kubernetes.io/enforce: privileged); RunAsAny for groups or SELinux is not this |
| K8S105 | WARNING | a | a container is given a dangerous capability (SYS_ADMIN, NET_ADMIN, ALL, under capabilities: add, cap_add or --cap-add); dropping a capability is not this |
| K8S106 | WARNING | a | a container or pod uses the host's network (hostNetwork: true, network_mode: host, --network=host) |
Config — where: configuration in any format, Dockerfiles, server configuration and configuration set in code
| ID | Sev | Scope | Behaviour |
|---|---|---|---|
| CFG101 | HIGH | a | cross-origin requests are allowed from any origin (Access-Control-Allow-Origin: *, origin: '*', allow_origins=["*"], AllowAnyOrigin()) |
| CFG102 | WARNING | a | debug mode is turned on (debug = true, DEBUG = True, APP_DEBUG=true) |
| CFG103 | WARNING | a | the log level is set to debug or trace, which can expose production data (level: debug, LOG_LEVEL=trace, logging.level.root=DEBUG) |
| CFG104 | WARNING | a | a sensitive port is exposed or published, in a port mapping, an EXPOSE, a service, or a firewall rule that opens it to any address: remote access or a database, cache or search port (22, 3389, 5432, 3306, 6379, 27017, 9200, 11211); a rule that admits only a private range or another group is not this |
| CFG105 | INFO | r | a timeout or time limit is removed, from configuration or from the call that sets it in code (timeout=, statement_timeout, proxy_read_timeout; hung connections); a value changed to another limit is not this |
Data — where: application code, scripts, configuration and data files (seed, fixture, import), in any language
| ID | Sev | Scope | Behaviour |
|---|---|---|---|
| DAT101 | CRITICAL | a | many stored records are deleted in one operation: every record of a table, collection or store, or all those a condition selects, by a query, an ORM call or a file command; one record deleted by its key is not this, nor is emptying a list, map or cache held in memory, nor emptying a test database in a test's setup or teardown (delete_all, destroy_all, removeAll, bulk_delete, purge) |
| DAT102 | HIGH | a | personal data (a national or tax identifier, a passport number, a payment card number) is exposed unmasked: it goes out in a response, a log, an export or a notification, or a person's value is written as a literal in code, configuration or a data file; a field, column or pattern that only names the data is not this (ssn, cpf, cnpj, passport_number, credit_card, card_number) |
| DAT103 | HIGH | r | encryption or hashing is removed (encrypt, bcrypt, argon2, sha256, aes, rsa) |
| DAT104 | WARNING | a | a password, token, secret or key is written to a log or to the output, by any logging or printing call (console.log, logger.*) |
| DAT105 | WARNING | r | masking or redaction is removed (mask, redact, anonymize) |
When a finding is intentional and documented in the spec, treat it as an override.
Review (5/7 review). Audit three things:
A. DoD compliance — each DoD check is PASS or FAIL, with evidence.
B. Pattern compliance — go through .vibeflow/conventions.md and each
document the spec lists, one by one, and check each of its rules that the
files under review touch, which are the changed files: the package's
files when step 1 wrote one, the files of the diff step 1 computed by hand
when the kit or Node.js 18+ is missing, and only for work already
committed, with no diff at all, the files the spec names. They are the
changed files of the report line below. For each rule (naming, file organization, error
handling and the rest): is it followed (evidence), and is a deviation
justified or a mistake?
The Pattern Compliance section has one line per document, in the receipt's
order: [x] with the evidence when no rule of it was violated, [ ] with
the deviation, and [x] <path>: no rule touches the changed files for a
document whose rules the files under review do not touch. A deviation from an
imported document the spec lists
(patterns/external-<repo-name>/<entry-name>.md) is a finding that names
the document and the source_file from its frontmatter.
C. Scenarios — read the code and test scenarios: the edge cases, error paths and inputs the DoD implies. Each tested scenario becomes a probe case (step 7), whether it held or found a defect. Real defects come from reading code and testing scenarios; mutation mostly finds weak tests of correct code.
Report every finding, including ones you are uncertain about or consider low-severity, each as a finding line (Findings below). Do not filter for importance at the finding stage — filtering happens at the verdict, where severity and cause decide what blocks and what becomes a follow-up.
Sabotage, only in risk code (6/7 sabotage). A standalone audit
without --probes records Sabotage: skipped (standalone audit; --probes runs it)
under ### Sabotage and skips the stage. Risk code is money and
totals, credentials and permissions, deleting or overwriting data, date and
time boundaries. Sabotage the paths on the spec's Risk code: line; with
no Risk code: line, classify the changed code under the four categories
yourself and say so in the report. A Risk code: none line is accepted but
checked: when the diff touches code in the four categories, report a
spec-cause finding for the missed risk code and sabotage there anyway.
Where the project has a mutation tool (such as Stryker, mutmut, cargo-mutants or PIT, or the equivalent in the project's stack), it
runs first on the changed lines, and hand sabotage covers what it cannot
express (SQL inside a string, a constant from another file, a domain rule).
mktemp -d on macOS and
Linux, a new folder under the user's TEMP folder on Windows), never to
.vibeflow/ or any other folder of the project, so no git add reaches
it. git checkout, git restore, git stash and git reset are
forbidden while work is uncommitted, because they throw away the
implementer's work.### Sabotage as in progress: the file and line, the wrong change, the
path of its copy in that temporary folder, and the copy's hash. Once the
restored file matches the hash, mark it restored and delete its copy;
after the last restore, delete the temporary folder, and the report says
both were deleted.
With --probes, a standalone audit
sabotages only files without uncommitted changes and lists the others as
not sabotaged, with the reason: for those, an interrupted sabotage would
leave nothing in git to fall back on.risk-gap finding, unless your probe closes
it. List every sabotage and every survivor under ### Sabotage; with no
risk code in the diff, say so and skip the stage.Probes (7/7 probes). Behavior probes go in one new test file for
<feature>-<part> (a standalone audit uses its feature slug), written the
way the project's own tests are: in the folder where they live, with the
file name its test runner picks up and the same test framework, so the
project's usual test command runs it; in a project with no test yet, the
layout its language's default test runner expects. A comment on the file's
first lines carries the marker vibeflow-probe: <feature>-<part>, by which
the kit finds its probes. Probes are pinned by content: each asserts a
behavior through the code's interface. A probe that reproduces an open finding carries the test framework's expected-failure marker naming the finding (for example todo in node:test, xfail in pytest, test.failing in Jest, withKnownIssue in Swift Testing); in a framework with no such marker, its skip marker naming the finding (Skip in xUnit, @Disabled in JUnit, t.Skip in Go); where the marker takes no reason (expectedFailure in unittest), a comment beside it names the finding. A probe under a skip marker never runs in the suite: run it once without the marker before you mark it, and quote that failure in the report. So an audit never turns the project's suite red, and the fix that closes the finding removes the marker. In the report, each probe answers the contract it protects, the
plausible regression that breaks it and why the implementer's tests miss
it; a probe without the three answers stays in the report. A state probe —
one that pins the repository instead of a behavior: a diff against the
base, today's version, a doc sentence, a line number, the real clock —
stays in the report as a check you ran, never in the project's test suite. A
standalone audit without --probes writes no probe file and skips the check
below: it lists under ### Probes the probe cases it would write, as code.
node ${CLAUDE_SKILL_DIR}/../implement/loop/scripts/check-probes.mjs <project root> --base <base>
before the final stage; it finds the probe file by its marker. The report states how many probe files it read, from its
summary line. Its exit 1 means suspects only when that summary lists
them; any other exit is an error, quoted as such. Each suspect leaves the probe file or is rewritten to pin behavior. Without the kit,
check the probe file against the state list above by reading it.### Probes,
recommended for removal, each with the reason.When .vibeflow/hotfixes/ holds hotfix docs, close the report with one
line — N hotfix docs not yet consolidated — and point at
audit --consolidate-hotfixes. No consolidation state is
tracked: every doc present counts. Directory absent or empty → no line.
Every finding is one line:
- [<id>] <severity> · <cause> · confidence <high|medium|low> — <what> — evidence: <file:line or failing test> — probe: <path::case | report only>
defect (wrong behavior), risk-gap (code right, proof missing,
in risk code), low (anything else).spec (the spec did not foresee it or foresaw it wrong),
implementation (the spec asked, the code did not do it), proof (code
right, test missing or weak), fix (introduced by an earlier fix round of
the same part).closed-by-probe and does not hold the verdict by itself.WITHHELD is cited, in the report and in
its prompt pack, by its path, its line number and the rule it matched, never
by its text: the report lives in .vibeflow/audits/, a folder the project
may commit. The same goes for what the package took out of its header: a
commit it shows without a subject is cited by its short hash, never by its
subject, and a path it took out is cited by the package section where the
note in its place appears, never by its name. A line of a file whose path
the package took out is cited by the package section where the note on that
path appears and by its line number, never by its path.## Audit Report: <feature>
Independence: fresh session | same session
Round: audit | reaudit <n>
Stage: <k>/<total> <name> | final
Review package: <path> | none (<reason>)
Base: <sha>
Knowledge base: .vibeflow/index.md | none (no .vibeflow/index.md); patterns and conventions were not checked
Read in full: <n> of <m>
- <path> (<lines> lines)
Not read whole: none
**Verdict: PASS | PARTIAL | FAIL**
### DoD Checklist
- [x] Check 1 — evidence of compliance
- [ ] Check 2 — what's missing and why it fails
### Pattern Compliance
- [x] <path> — follows correctly. Evidence: <file:line>
- [x] <path>: no rule touches the changed files
- [ ] <path> — DEVIATION: <what's wrong, what it should be>
- [ ] patterns/external-<repo-name>/<entry-name>.md — DEVIATION: <what's wrong, what it should be> — imported from <repo-name> (<source_file>)
### Convention Violations (if any)
- <file> — <violation> — <what the convention says>
### Critical Gate
Left out of the package: <n> file(s), read with git | none
Scanned: <n> of <m> changed file(s); not scanned: <path> (<why>), <path> (<why>) | none
- 🔴 CRITICAL [DS102] db/migrate/003.sql:12 — DROP TABLE in migration (blocks)
- 🔴 CRITICAL [SEC101] api/auth.ts:1 — auth middleware removed (blocks)
- 🟠 HIGH [SEC106] api/client.ts:8 — certificate verification turned off (blocks)
- 🟡 WARNING [CFG102] config/app.yml:4 — debug mode enabled
- ✅ ALLOWED [DS104] db/migrate/004.sql:7 — DROP COLUMN — override: vibeflow:allow DS104: <reason>
(one finding per line: a rule that matches two lines is two findings, each with its own `path:line`)
(with no finding, "Clean — no destructive operations detected." takes the place of the finding lines, after the two lines above; when step 1 ran over the code, "No diff scanned — <why>." takes the place of the `Scanned:` line and no finding or "Clean" line follows: nothing was scanned)
### Findings
- [F1] defect · implementation · confidence high — total ignores the discount — evidence: src/cart.ts:42 — probe: tests/cart-p1.test.ts::discount enters the total
(or "No findings.")
### Sabotage
- <file:line> — <the wrong change> — killed by <test> | survived → <finding id>
- <file:line> — in progress — <the wrong change> — copy: <temporary folder>/<copy> — sha256 <hash> (until restored)
Copies: deleted, with their temporary folder
- <file> — not sabotaged — <reason>
Sabotage: skipped (standalone audit; --probes runs it)
(or "No risk code in the diff.", with how it was classified)
### Probes
- <path::case> — contract: <...> — regression: <...> — missed by the implementer's tests because: <...>
- would write (standalone, no `--probes`): <path::case>, then the test as a code block and its three answers
- state check (report only): <what was checked> — <result>
- old probe recommended for removal: <path::case> — <duplicates <test> | pins state>
### Follow-ups
- <low finding id> — <the follow-up item>
### Gaps (if PARTIAL or FAIL)
For each failing check:
- What's missing
- What's needed to close it
- Estimated effort (S/M/L)
### Incremental Prompt Pack (if PARTIAL or FAIL)
A focused prompt pack covering only the gaps.
Include the correct patterns the agent must follow (embed them).
Do not repeat work that already passes.
The Knowledge base: line comes right after Base::
Knowledge base: .vibeflow/index.md in the present state;
Knowledge base: none (no .vibeflow/index.md); patterns and conventions were not checked
in the none state, and in the missing here state when the person said to go
on without it. A PASS can carry the none line; no verdict goes out without
the Knowledge base: line.
Match the length of the report to what the audit found: sections with nothing to list say so in one line.
vibeflow:allow override — CRITICAL/HIGH need a
written justification.
In the report, an ALLOWED line writes its override in the form step 4c
reads, vibeflow:allow <RULE_ID>: <reason>, with the rule ID of its
brackets. The reason is the marker's own; for a finding the spec documents
as intentional, it says that the spec documents it and why. The PR body
copies the line, so an audit of the PR run without the author's spec still
finds the marker.defect or risk-gap keeps the verdict below PASS. A low
finding goes to ### Follow-ups and does not block.spec-cause finding goes to the human or to a recorded spec amendment,
never straight to a fix: the incremental prompt pack carries it as a
question, not a task.Update .vibeflow/decisions.md when the audit surfaced architectural
decisions or new pitfalls.
Report the verdict and suggest next steps:
audit again."--reaudit <round-commit>A re-audit checks one fix round against the audit it answers and reads the fix
diff only: re-doing the whole audit costs more than the audit did and judges
code the fix never touched. Here <n> is the fix round (the briefing's number;
standalone, one more than the re-audit reports already there).
node ${CLAUDE_SKILL_DIR}/../implement/loop/scripts/review-package.mjs <project root> <round-commit> <out>,
into .vibeflow/reviews/<feature>-<part>-round-<n>.md. Without the kit or
Node.js 18+, git diff <round-commit> stands in for it. The empty-package rule of
step 1 applies.fix when the fix introduced them. A probe still under its skip or expected-failure marker is no proof that its finding closed: run it without the marker, and the finding closes only when it passes. It appends its
new probes to the audit's probe file. A standalone re-audit follows the
--probes rule of a standalone audit.Save the report as <feature>-<part>-reaudit-<n>.md in .vibeflow/audits/
(a standalone audit: <feature-slug>-reaudit-<n>.md), with Round: reaudit <n>,
the same header, its read receipt listing what this re-audit itself read (a
document not read to its last line goes under Not read whole, and a document
read to its last line over more than one read, each read starting from where the previous read stopped, counts as read whole), the stage
rule with four stages (1/4 package, 2/4 tests, 3/4 findings,
4/4 new defects) and the same verdict rules.
--consolidate-hotfixesScan .vibeflow/hotfixes/*.md. No directory or no docs → report "No hotfix
docs to consolidate." and stop.
Deterministic by construction: for each doc, re-execute only what the doc
itself carries — its 2–4 binary DoD checks and the regression test at the
Regression section's test: path — against the current code, and classify
from those results:
regressed — a DoD check or the regression test broke. Each regressed
doc is a gap: it feeds the incremental prompt pack, the same mechanism the
normal round uses for failing checks.promote — everything green plus a signal not every doc carries: a
Deviations entry pointing at structural follow-up (named debt that asks
for a spec), or evidence in the doc itself that the fix introduced
permanent new behavior deserving a first-class contract — a Preservation
property describing behavior that did not exist before the fix, for
example, not the mere presence of the section. The Regression test and
the required sections are in every doc by construction and are not promote
signals. Auditor judgment weighs those discriminating signals; the output
is a gen-spec entry stub, not a spec — the human decides.still-holds — everything green, no promote signals. The fix stands.Classification silences nothing: docs with reproduction below real or
status: partial enter the priority-debt list even when green; docs with
status: halted(...) have no fix to re-execute and enter the same list
with their resume instruction — a filled test: path names the red oracle
the HALT left in the suite, and the entry records its current state.
Deviations entries — deferred findings included — are consumed into the
report as listed debt.
Per-doc classification, no PASS/PARTIAL/FAIL verdict. Save the report to
.vibeflow/audits/<YYYY-MM-DD>-hotfix-consolidation.md:
## Hotfix Consolidation
- <file> — still-holds | promote | regressed — <half-line evidence>
### Priority debt
- <file> — <reproduction below real | status: partial | halted(<condition>)> — <next step>
### Deviations / deferred
- <file> — <the entry>
### Promote stubs
- <file> → gen-spec entry stub: <the permanent behavior, in 1–2 lines>
### Incremental Prompt Pack
A focused pack covering only the regressed docs.
Sections with nothing to list are omitted.
If this command is modified, update MANUAL.md to reflect the changes.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
code-audit, definition-of-done, quality-gate, test-suite, code-review
npx claudepluginhub pe-menezes/vibeflow --plugin vibeflow10 skills in this plugin
/analyzeDeep-analyzes the current codebase to discover stack, architecture, patterns, conventions, and pitfalls. Creates curated documentation in .vibeflow/ that persists and can be committed to git. Supports incremental updates, scoped deep-dives, interactive review, and satellite repo analysis. Use when setting up a project, after significant changes, or to deep-dive into a specific module.
/discoverRuns an interactive discovery dialogue (1–5 rounds) to turn a vague idea into a clear, actionable PRD. Challenges assumptions, cuts scope, and forces decisions. Saves the PRD to .vibeflow/prds/. Use before gen-spec when the idea is not yet well-defined or requirements are unclear.
/gen-specGenerates a technical spec with objective, Definition of Done (3–7 binary checks), scope, anti-scope, technical decisions, and applicable patterns. Grounded in the project's real patterns from .vibeflow/. Auto-splits specs that exceed budget or DoD limits. Use when requirements are clear and you're ready to define the implementation contract.
/hotfixFixes an observed defect with reproducible evidence in one call: writes a short trace doc before touching code, implements the fix, and backs it with a regression test written before the fix. Production incidents are the motivating case, not a gate. When blocked, it halts by name and saves the doc for a later call to resume. Use when a defect has concrete evidence and you need the fix with its paper trail now — planned small tasks belong to quick, spec'd features to implement.
/implementImplements a feature from its spec following all guardrails: budget, DoD, anti-scope, and pattern compliance. Runs a 9-phase pipeline, phases 0 to 8 (find spec → extract guardrails → load patterns → plan → implement → test → refine → self-verify DoD → finish). Use after gen-spec when you're ready to code. The agent has filesystem access and acts as Coding Agent.
/prompt-packGenerates a self-contained prompt pack from a spec. Embeds real code patterns from .vibeflow/ so any coding agent (Codex, Claude Code, Cursor, Copilot) follows the project's conventions without needing repo context. Use when handing off implementation to a separate session or agent.
2 plugins ship this exact skill · first indexed Nov 24, 2026
Other plugins' skills for the same job