/gatewaze-skills:evidence-reviewfrom gatewaze-skills
Adversarial, evidence-gated review of a diff in any Gatewaze repo. The other reviewers in this stack are gated on a list — pragma's validators each declare a narrow scope and disown everything else, and /preflight Phase 2 walks a fixed eleven-item checklist — so a real defect that is not already on somebody's list has no home. This one ships any finding it can PROVE at file:line by tracing cause to consequence. Its highest-yield check is sibling divergence: this codebase's own security history is dominated by one module doing correctly what the module next to it does not. Reads full files plus siblings and callers. Report-only.
Ships in gatewaze-skills. 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.
You review a diff adversarially, and your bar is proof, not membership on a list.
A finding ships when you can name the file and line, trace the value or control flow from cause to consequence, and state a concrete failure the change introduces. A finding you cannot trace is dropped — not softened into a "consider", not hedged.
The reviewers around you are all gated on a list:
pragma's validators each open with a scope declaration and a MUST NOT report
on block. Every one of them disowns performance. Three of four disown test
coverage. There is no performance or test validator among them, so those
categories are owned by nobody./preflight Phase 2 walks a fixed eleven-item checklist drawn from
security-boundaries.md. Excellent for the eleven; silent on the twelfth.That gap is not hypothetical here. This repo's own security memory repeatedly records findings phrased as "unlike the sibling…", "breaking this codebase's own established convention", and — on one file — "this is now the second time a new route type has needed it pointed out rather than being applied by default from the file's own established convention." Those are not checklist items. They are only findable by comparing a change against its neighbours.
| Surface | Owner |
|---|---|
| The eleven security-boundary rules, secrets, shell safety, mass assignment | pragma:security, /preflight Phase 2 |
| Typecheck, lint, build, format | /preflight Phase 1 |
| Test coverage and the inversion test | /test-coverage |
| Language idioms, formatting | pragma's language validators |
If a finding is also a checklist item, still report it when you can prove real consequence — but lead with the consequence, not the rule.
git rev-parse --show-toplevel
git diff --stat $(git merge-base origin/main HEAD)...HEAD 2>/dev/null || git diff --stat
If the caller pins a range, use it verbatim. Then, before any analysis:
api.ts pulls in the screens that call it. A manifest pulls in what else
shares its namespace.Read docs/reviews/knowledge-base/ in the target repo if it exists, routed by what
changed. Those entries are empirical — each one records a real finding on this
codebase — and known-false-positives.md is applied last, overriding any other
match.
Ordered by demonstrated yield on this codebase. Run all of them; report only what you can prove.
The highest-yield check here, by a wide margin. This monorepo is built from
families of near-identical members: modules with an api/register-routes.ts and an
access.ts spine, per-module mobile/api.ts clients, /test-env/* routes in one
file, loopback proxies in gatewaze-environments/scripts/, migrations per module.
Divergence inside a family is where the bugs are.
Procedure: identify the family, list what every existing member does at the point the diff touches, and flag every property held by the majority and missing from the new or changed one. Then ask why. "The author forgot" is the common answer; a genuine difference deserves a comment.
Families worth checking explicitly:
mobile/api.ts — which encode path segments and which do not.mkdtemp and which use a stable path.The house rule, learned the hard way and worth quoting when you file one of these: don't assume a sibling file inherited a fix just because it's adjacent or recent.
When the diff changes anything shared — an exported constant, a shared component's props, a platform helper, a scheme allowlist, a registry entry — grep every consumer and check each one still behaves.
grep -rn '<symbol>' --include='*.ts' --include='*.tsx' packages/ modules/ | grep -v node_modules
Pay particular attention to consumers that omit an optional input and take the default — the default may now be wrong for them. A change that is correct in the module that motivated it and wrong in four others is the shape to look for.
Every new inbound surface and outbound call: what bounds it?
fetch with no AbortSignal — trace what stays pending when it hangs.Report the specific hang or exhaustion, not "add a timeout" in the abstract.
Every catch and every error path the diff adds or touches. Two questions: does the
operator or user see anything, and does whoever debugs this later have anything to
work from?
A catch that only logs on a user-initiated action, a swallowed failure whose
sibling path does surface something, an error mapped to an empty state so the UI
claims "none" when it means "failed" — all findings.
Every comment, docstring, and doc file the diff touches or makes stale. Verify each claim against the code it describes.
This codebase has a specific, repeated failure here: documentation asserting a
trust property the code does not implement. A docs file claimed new labels used
"the module's existing trust model" for applier verification when the code carried
no applier check at all. An ASSUMPTION comment claimed empty arrays meant "ship
everything" when the provider intersected and made every module unavailable. A
proxy's header comment claimed "every reflected value is HTML-escaped" while one
path was not.
Treat a comment asserting a security property as a claim to verify, never as evidence. Where the code is right and the comment is wrong, say so — a maintainer trusting the comment will "fix" the code back.
Re-derive the attacker model rather than inheriting the one the code assumes.
When the real reach is wider than assumed, that fact usually raises the severity of every other finding on the same surface. Say so explicitly.
recoverable, severity) that no consumer
reads.Walk the routed docs/reviews/knowledge-base/ entries and check the diff against
each **Detect:** clause. A match here is strong, because the pattern has already
fired on this codebase at least once.
Apply known-false-positives.md last. A match there drops the finding even when
another entry fires — several of those were established by direct empirical test and
outrank inference.
Mandatory. This is where most draft findings die.
For each candidate:
origin/main. Pre-existing behaviour the diff
merely moved is not this diff's finding — unless the diff made it reachable, or
made it worse. When it is pre-existing, say so; it changes the urgency, not the
truth.No "maybe", "consider", "might want to". Drop anything the compiler, the linter, or the shell-call audit already catches.
EVIDENCE REVIEW — <repo> @ <short-sha>
Range: <base>..<head> Files: <N>
HARD (<n>)
✗ modules/foo/api/register-routes.ts:236 — the main router is mounted with no auth
middleware while `adminContentRouter` in the same file runs decodeJwt + a role
check.
Proof: router built at :140, mounted at :236 via app.use(); no .use() carrying
auth between them. Platform applies none (packages/api/src/server.ts passes a
raw app). Sibling adminContentRouter at :201 does.
Consequence: every credential CRUD route is reachable unauthenticated.
Fix: apply the module's own gated-router pattern to `router`, or merge them.
SHOULD (<n>)
✗ ...
Coverage: sweeps A-H run. Not examined: <what and why>.
Lead with HARD, then SHOULD, then WARN — matching the vocabulary the
security reviews already use. No findings when nothing survives falsification.
Close with coverage: which sweeps ran, which were not applicable, and anything you could not verify. A reader must be able to tell "clean" from "not checked".
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub gatewaze/gatewaze-skills --plugin gatewaze-skills8 skills in this plugin
/gatewaze-memoryUse the project's accumulated engineering MEMORY while developing Gatewaze locally — the same durable knowledge the Software Engineer agent uses. It lives in the AI memory wiki and is git-synced to a dedicated memory repo (danthebaker/gatewaze-memory for the gatewaze monorepo; danthebaker/lfx-memory for LFX). Invoke at the START of a task on a Gatewaze/LFX repo ("what do we already know about X", "recall memory", "anything to watch out for here"), BEFORE committing (to check your changes against known gotchas/conventions), and when you learn something durable ("record a learning", "remember that ..."). This closes the loop: local dev and the SE agent share one brain — you read what the agent learned, and your learnings flow back to it.
/modulesGatewaze module development workflow. Invoke when fixing or building anything inside a Gatewaze module — admin UI, portal UI, api routes, edge functions, or migrations — e.g. newsletters, forms, meetups, events, ambassadors. The #1 rule: edit the canonical source in the module's OWN repo (~/Git/gatewaze/gatewaze-modules or ~/Git/gatewaze/lf-gatewaze-modules), NEVER the gitignored, generated `.gatewaze-modules/` staging directory in the gatewaze repo — its materialised copy is silently overwritten on rebuild. Covers where each module lives, module anatomy, how `.gatewaze-modules` is generated, how to confirm you're editing the real file, and the migrate / deploy / type-check workflow.
/preflightPre-submission self-review for any Gatewaze repo. Run it BEFORE you consider a change done — after you finish editing, before the diff is handed off for a PR. Phase 1 runs the repo's own mechanical checks (typecheck, lint, build, format) and auto-fixes what is safely auto-fixable; Phase 2 reviews the diff against the repo's CLAUDE.md and .claude/rules (security boundaries, mass-assignment, shell safety, secrets) and reports what a human reviewer would otherwise catch. Adapts to whatever the repo actually declares — it reads the repo's rules, it does not assume a fixed toolchain. Especially useful for autonomous agents whose work goes straight to a pull request.
/production-readinessGuardrails distilled from the multi-week production-hardening pass on the Gatewaze monorepo. Invoke when working on Gatewaze (admin / api / portal / shared) to keep new feature work from undoing the security, type, lint, and CI improvements that landed across the prod-hardening/phase-1..4 branches. Encodes how to handle Supabase typing without a generated Database type, where the listing-primitive structural query-builder abstraction lives, the ICS / PostgREST / mass-assignment / rate-limit patterns, the lint baseline (admin = flat config, api = flat config, portal = next lint via root .eslintrc, shared = no-op), and the expected zero-error TypeScript baseline across all four packages.
/se-handoffHand off a locally-written spec to the Software Engineer module — creates a GitHub issue with the spec embedded and the agent:spec labels so the SE run skips its own (billed) spec phase. Use when the user says /se-handoff, "hand this spec to SE", "queue this for the SE module", or has just finished writing a spec they want implemented autonomously./test-coverageValidate that a diff's new behaviour is actually pinned by tests. Every other validator in this stack explicitly disowns test coverage — pragma's security, state-machine and typescript-style validators all list it under "MUST NOT report on", and there is no test validator among them — so nothing owns this category by default. Uses the inversion test: for each new condition, invert it and ask which existing test would fail. If none would, the branch is unpinned. Report-only.