No mocking validation gates
Skill krzemienski/deepest-plan-plugin/skills/no-mocking-validation-gates
Enforces the Iron Rule — no mocks, stubs, test doubles, or test files. Detects mock-creation intent and redirects to real system validation. Cited by every gate and mock_guard in deepest-plan output.From its SKILL.md
npx -y skills add krzemienski/deepest-plan-plugin --skill no-mocking-validation-gatesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
3.2 KB, as published. Nobody here has run it
No-Mocking Validation Gates
Scope
Blocks mock/test file creation and mock code patterns. Does NOT handle validation execution (use functional-validation) or evidence examination (use gate-validation-discipline).
The Iron Rule
Mocking creates false confidence. Mock drift is the silent killer:
Month 1: API returns {"data": [...]} Mock returns {"data": [...]} MATCH
Month 3: API adds {"data": [...], "meta": {}} Mock still returns {"data": [...]} DRIFT
Month 6: Code crashes on missing "meta" Tests still pass BUG HIDDEN
Tests pass. Code is broken. Mock is lying.
What Gets Blocked
| Category | Examples |
|---|---|
| Test files | *.test.ts, *.spec.js, *_test.go, test_*.py, *Tests.swift, *.feature |
| Test dirs | __tests__/, __mocks__/, mocks/, stubs/, fixtures/, spec/ |
| Test runners | jest, vitest, pytest, XCTest, mocha, jasmine, rspec, go test in production code paths |
| Mock code | jest.mock(), vi.fn(), sinon.stub(), unittest.mock, gomock, MockXxx generated classes |
| Test flags | TEST_MODE, NODE_ENV=test, MOCK_API, SKIP_AUTH, in-memory DB flags (SQLite :memory:, H2) |
| Isolation | Testing Library render(), Storybook stories for prod logic, Wiremock, MSW, nock |
What Is NOT Blocked
- Playwright / browser automation (interacts with real system)
- DB seed scripts (populates REAL databases with REAL data)
- API client code that calls real endpoints
- Staging / dev environment integrations
- Files in
e2e-evidence/,validation-evidence/,.claude/,.planning/,e2e-test-results/ - Contract-test fixtures IF they represent real responses captured from production (not synthetic)
The Three-Step Correction
When tempted to mock:
- DIAGNOSE — Why can't I use the real system? (not running? not configured? rate-limited?)
- FIX — Make the real system available (start it, configure it, upgrade the plan)
- VERIFY — Validate through the real system (run it, exercise it, capture evidence)
Rules
- NEVER create any file matching blocked patterns
- NEVER write mock/stub/spy code in any language
- ALWAYS fix the real dependency instead of mocking it
- ALWAYS validate through the actual system interface
- Slowness is a bug — profile and fix it, don't mock around it
Integration With Deepest Plan
Every <validation_gate> in a deepest-plan artifact MUST include:
<mock_guard skill="no-mocking-validation-gates">
[Platform-specific reminder: "No jest.mock, no MSW, use real staging DB"]
</mock_guard>
Every PLAN.md MUST open with the <mock_detection_protocol skill="no-mocking-validation-gates"> preamble listing the forbidden patterns above.
Security Policy
This skill blocks file creation patterns and code patterns. It never modifies existing production code, never disables security checks, never introduces new functionality.