Skill — Verification Loop (6-Phase Quality Gate)
When this skill activates
Before shipping, merging, or marking any implementation task as complete.
Provides a systematic 6-phase verification pipeline that catches issues
at the cheapest point to fix them.
Mandatory actions when this skill is active
The 6 Phases (sequential, fail-fast)
Phase 1 — Build
npm run build # or equivalent for project
- Must produce zero errors
- Warnings are acceptable but logged
- If build fails: fix before proceeding (no skipping)
Phase 2 — Type Check
npx tsc --noEmit # or equivalent
- All type errors must be resolved
- No
@ts-ignore without documented reason
- Generic
any types flagged as warnings
Phase 3 — Lint
npm run lint
- All lint errors must be resolved
- Auto-fixable issues: fix immediately (
--fix)
- Non-auto-fixable: resolve manually before proceeding
Phase 4 — Test
npm test
- All tests must pass (zero failures)
- No skipped tests without documented reason
- If new code was added: verify test coverage exists
- Coverage threshold: per project config (default 80%)
Phase 5 — Security Scan
- Check for hardcoded secrets (grep for API keys, passwords, tokens)
- Check for new dependencies with known vulnerabilities
- Verify no dangerous code execution patterns (dynamic code evaluation, innerHTML, SQL concatenation) introduced
- Run security-review skill checklist on the diff
Phase 6 — Diff Review
git diff --staged # or git diff main...HEAD
- Review every changed line for:
- Accidental debug code (console.log, debugger, TODO)
- Unintended file changes (lock files, configs)
- Sensitive data exposure
- Logic errors visible in the diff
Phase 6.5 — De-Slop Scan (Informational)
- Run de-sloppify skill in dry-run scan mode on the current diff
- Report findings count per category:
- Debug code (console.log, debugger, print statements)
- Test slop (skipped tests, test-only exports)
- Commented code blocks (3+ consecutive commented lines)
- Naming inconsistencies (mixed camelCase/snake_case)
- TODO hacks (shipped workarounds disguised as TODOs)
- This phase is INFORMATIONAL ONLY — it does NOT block shipping
- If findings > 0: append summary to verification output as advisory
- Rationale: awareness of residual slop before shipping, without blocking velocity
Execution Rules
- Phases execute in ORDER (1→2→3→4→5→6)
- Each phase must PASS before the next begins (fail-fast)
- On failure: report which phase failed, what the error is, suggest fix
- After fixing: restart from the FAILED phase (not from Phase 1)
- All 6 phases passing = "green" verification = safe to ship
Integration
/mindforge:verify-loop invokes this full pipeline
/mindforge:ship MUST run verify-loop before proceeding
- Autonomous mode runs verify-loop after every task (Phase 4+5+6 minimum)
After verification passes
- Log verification result in AUDIT with per-phase timing
- Report: "All 6 verification gates passed (+ Phase 6.5 advisory). Safe to proceed."
Edge cases and error handling
- Empty diff (nothing staged/changed): skip Phase 6 diff review, still run Phases 1-5 against the working tree.
- No
npm test/npm run build/npm run lint script defined for the project: treat that phase as a documented skip, not a silent pass — report which script was missing.
- Flaky test on first run: retry once; if it fails a second time, treat it as a real Phase 4 failure (do not average away real signal).
- Security scan (Phase 5) finds a secret already committed in history, not just the diff: escalate immediately — this is a Tier 3 event, not an advisory.
- De-Slop Scan (Phase 6.5) throws or is unavailable: log the failure and continue — it's informational-only and must never block Phases 1-6.
Example
$ /mindforge:verify-loop
Phase 1 (Build)........ ✅
Phase 2 (Type Check).... ✅
Phase 3 (Lint).......... ✅
Phase 4 (Test).......... ✅ (138 passed, 0 failed, 3 skipped)
Phase 5 (Security)...... ✅
Phase 6 (Diff Review).... ✅
Phase 6.5 (De-Slop)...... ℹ️ 2 findings (advisory only)
→ All 6 verification gates passed (+ Phase 6.5 advisory). Safe to proceed.
Pre-ship self-check
1---2name: verification-loop3version: 1.0.04min_mindforge_version: 10.0.35status: stable6triggers: verification, quality gate, build check, type check, full verification, security scan, diff review, pre-merge, CI gate, green build, ship check, verify all7compose:8 - security-review9metadata:10 source: https://skillmd.com/skills/sairam0424/verification-loop11---1213# Skill — Verification Loop (6-Phase Quality Gate)1415## When this skill activates16Before shipping, merging, or marking any implementation task as complete.17Provides a systematic 6-phase verification pipeline that catches issues18at the cheapest point to fix them.1920## Mandatory actions when this skill is active2122### The 6 Phases (sequential, fail-fast)2324**Phase 1 — Build**25```bash26npm run build # or equivalent for project27```28- Must produce zero errors29- Warnings are acceptable but logged30- If build fails: fix before proceeding (no skipping)3132**Phase 2 — Type Check**33```bash34npx tsc --noEmit # or equivalent35```36- All type errors must be resolved37- No `@ts-ignore` without documented reason38- Generic `any` types flagged as warnings3940**Phase 3 — Lint**41```bash42npm run lint43```44- All lint errors must be resolved45- Auto-fixable issues: fix immediately (`--fix`)46- Non-auto-fixable: resolve manually before proceeding4748**Phase 4 — Test**49```bash50npm test51```52- All tests must pass (zero failures)53- No skipped tests without documented reason54- If new code was added: verify test coverage exists55- Coverage threshold: per project config (default 80%)5657**Phase 5 — Security Scan**58- Check for hardcoded secrets (grep for API keys, passwords, tokens)59- Check for new dependencies with known vulnerabilities60- Verify no dangerous code execution patterns (dynamic code evaluation, innerHTML, SQL concatenation) introduced61- Run security-review skill checklist on the diff6263**Phase 6 — Diff Review**64```bash65git diff --staged # or git diff main...HEAD66```67- Review every changed line for:68 - Accidental debug code (console.log, debugger, TODO)69 - Unintended file changes (lock files, configs)70 - Sensitive data exposure71 - Logic errors visible in the diff7273**Phase 6.5 — De-Slop Scan (Informational)**74- Run de-sloppify skill in dry-run scan mode on the current diff75- Report findings count per category:76 - Debug code (console.log, debugger, print statements)77 - Test slop (skipped tests, test-only exports)78 - Commented code blocks (3+ consecutive commented lines)79 - Naming inconsistencies (mixed camelCase/snake_case)80 - TODO hacks (shipped workarounds disguised as TODOs)81- This phase is **INFORMATIONAL ONLY** — it does NOT block shipping82- If findings > 0: append summary to verification output as advisory83- Rationale: awareness of residual slop before shipping, without blocking velocity8485### Execution Rules86- Phases execute in ORDER (1→2→3→4→5→6)87- Each phase must PASS before the next begins (fail-fast)88- On failure: report which phase failed, what the error is, suggest fix89- After fixing: restart from the FAILED phase (not from Phase 1)90- All 6 phases passing = "green" verification = safe to ship9192### Integration93- `/mindforge:verify-loop` invokes this full pipeline94- `/mindforge:ship` MUST run verify-loop before proceeding95- Autonomous mode runs verify-loop after every task (Phase 4+5+6 minimum)9697### After verification passes98- Log verification result in AUDIT with per-phase timing99- Report: "All 6 verification gates passed (+ Phase 6.5 advisory). Safe to proceed."100101### Edge cases and error handling102- Empty diff (nothing staged/changed): skip Phase 6 diff review, still run Phases 1-5 against the working tree.103- No `npm test`/`npm run build`/`npm run lint` script defined for the project: treat that phase as a documented skip, not a silent pass — report which script was missing.104- Flaky test on first run: retry once; if it fails a second time, treat it as a real Phase 4 failure (do not average away real signal).105- Security scan (Phase 5) finds a secret already committed in history, not just the diff: escalate immediately — this is a Tier 3 event, not an advisory.106- De-Slop Scan (Phase 6.5) throws or is unavailable: log the failure and continue — it's informational-only and must never block Phases 1-6.107108### Example109```110$ /mindforge:verify-loop111Phase 1 (Build)........ ✅112Phase 2 (Type Check).... ✅113Phase 3 (Lint).......... ✅114Phase 4 (Test).......... ✅ (138 passed, 0 failed, 3 skipped)115Phase 5 (Security)...... ✅116Phase 6 (Diff Review).... ✅117Phase 6.5 (De-Slop)...... ℹ️ 2 findings (advisory only)118→ All 6 verification gates passed (+ Phase 6.5 advisory). Safe to proceed.119```120121### Pre-ship self-check122- [ ] Build produced zero errors123- [ ] Type check produced zero errors124- [ ] Lint produced zero errors (or documented `--fix`)125- [ ] Tests: zero failures, no undocumented skips126- [ ] Security scan clean (no secrets, no injection/XSS/SQL-concat patterns introduced)127- [ ] Diff reviewed line-by-line for debug code, unintended file changes, sensitive data