Validating Integrity
This skill ensures that the LifeOS system is in a valid state by detecting residual mocks, temporary code, and skipped tests that should be active.
When to use this skill
- •When the user asks to "check for mocks" or "validate system state".
- •Before marking a feature as "Done".
- •When preparing for a "production" run or deployment.
Workflow
- •Scan for Mocks: Search for usage of mocking libraries or patterns in production code (outside
__tests__or*.spec.tsmostly, but also check integration tests for "permanent" mocks). - •Check for TODOs: Identify
TODO,FIXME, orHACKcomments in critical paths. - •Report Findings: List all issues found and suggest next steps (e.g., "Implement real API call for X").
Instructions
1. Run the Mock Scanner
Execute the provided script to scan the codebase.
bash
python .agent/skills/validating-integrity/scripts/check_mocks.py .
2. Analyze Results
- •Critical: Mocks in
src/(production code). These MUST be removed. - •Warning: Mocks in
tests/e2e(should be minimized for true E2E). - •Info:
TODOcomments.
3. Report to User
If mocks are found:
"⚠️ Integrity Check Failed Found X mocks in production code:
- •
src/features/auth/api.ts:mockResolvedValueNext Steps:
- •Replace mock in
src/features/auth/api.tswith realfetchcall.- •Verify backend endpoint
/auth/loginexists."