systematic-code-verification
Skill0 starsChanged 2 months agoMITView on GitHub
Enforces rigorous, evidence-based code verification before declaring any task complete. Mandates a strict zero-assumption policy (code is presumed broken until proven working), a 3-phase verification cycle (static analysis, automated test suites, and live runtime smoke tests), explicit proof presentation with real terminal outputs, and autonomous closed-loop self-healing.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- rules/AGENTS.mdAGENTS.md
- kurokoSkill
- tayoriSkill
- xerjSkill
- aesthetic-readme-craftSkill
- cli-builderSkill
- codebase-digestSkill
- git-release-craftSkill
- git-repo-craftSkill
- karakuriSkill
- python-clean-codeSkill
- rust-clean-codeSkill
- rust-style-pythonSkill
- compose-clean-codeSkill
- bash-clean-codeSkill
- tui-designSkill
- frontend-designSkill
- web-design-guidelinesSkill
- unslopSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Every code change, bugfix, or feature implementation must pass through all applicable phases of the verification cycle before completion:
- Distinctive: line 55
Run automated test suites to ensure zero regressions and positive validation:
- Distinctive: line 60
Coverage Requirement: If modifying existing logic or fixing a bug, verify that existing tests pass.
- Very specific: line 68
If the program creates or modifies files, actively inspect the results (cat, head, ls -la, view_file) and display the proof.
- Distinctive: line 79
Every completion message must explicitly show the evidence of verification:
- Distinctive: line 112
If Phase 1, Phase 2, or Phase 3 fails during verification:
- Distinctive: line 113
Do NOT stop and ask the user: Never ask *"I encountered an error / the test failed, may I fix it?"*.
- Distinctive: line 114
Diagnose Autonomously: Read the compiler error, test failure traceback, or runtime panic log.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
systematic-code-verification Skill: Active Proof & Verification Protocol
Eliminates the "fire-and-forget" assumption antipattern. Enforces rigorous, evidence-based code verification before any task or bugfix is declared complete.
1. Core Philosophy: Presume Broken Until Proven
[!IMPORTANT] Zero Assumptions Rule: An unexecuted line of code is an unverified line of code. Code is presumed broken until proven working by active execution and real terminal output.
Antipatterns We Prohibit:
- The Unit-Test Fallacy (
test.ts/py/rsIs NOT Enough): Assuming that passing test files (test.ts,test.py,test.rs,pytest,cargo test) proves the feature or bugfix works. Unit tests run in vitro with mocks, stubs, and synthetic inputs. They do NOT verify compiled binary execution, CLI argument parsing, environment variable handling, real disk I/O, network behavior, or end-to-end integration. Passing unit tests is merely a Phase 2 gate, NEVER sufficient proof on its own. - Fire-and-Forget: Editing code files, declaring "I fixed the issue", and stopping without actively running the code, tests, or linters.
- Theoretical Correctness: Assuming code works because "the syntax looks fine" or "the logic seems sound".
- Unverified Assertions: Claiming "verified" or "works as expected" without displaying the actual terminal commands, stdout, stderr, and exit codes.
- Passing the Burden to the User: Telling the user "You can test it by running X" when the agent possesses terminal execution tools to test it immediately.
2. The 3-Phase Verification Cycle (Mandatory Before Completion)
Every code change, bugfix, or feature implementation must pass through all applicable phases of the verification cycle before completion:
┌───────────────────────┐ ┌───────────────────────┐ ┌───────────────────────┐
│ Phase 1 │ │ Phase 2 │ │ Phase 3 │
│ Static Validation │ ──> │ Test Execution │ ──> │ Live Runtime Smoke │
│ (Compile, Lint, Typ) │ │ (Unit & Integrations) │ │ (CLI, Exec, Output) │
└───────────────────────┘ └───────────────────────┘ └───────────────────────┘Phase 1: Static Validation & Compilation
Code must build cleanly with zero warnings and zero errors:
| Language / Stack | Mandatory Static Check Commands |
| Rust | cargo check --all-targets<br>cargo clippy --all-targets -- -D warnings<br>cargo fmt --check |
| Python | uv run ruff check<br>uv run mypy .<br>uv run ruff format --check |
| TypeScript / JS | npx tsc --noEmit<br>npm run lint or npx eslint . |
| Go | go vet ./...<br>golangci-lint run |
| Bash / Shell | shellcheck -x <script.sh> |
| C / C++ | cmake --build build -- -Wall -Wextra -Werror |
Phase 2: Automated Test Execution
Run automated test suites to ensure zero regressions and positive validation:
- Rust:
cargo test --all-targets - Python:
uv run pytest -v - TypeScript / JS:
npm testorpnpm testorbun test - Go:
go test -v ./... - Coverage Requirement: If modifying existing logic or fixing a bug, verify that existing tests pass. If no test covers the modified path, write a targeted unit or integration test.
- Limitation Notice: Automated tests only validate isolated logic in vitro. Passing Phase 2 NEVER excuses or replaces Phase 3.
Phase 3: Live Runtime Smoke Verification (Mandatory & Non-Negotiable)
Passing test files (test.ts, test.py, test.rs) is never enough if the application fails in real execution. Phase 3 is mandatory for EVERY code change:
- Direct Execution: Actively invoke the compiled binary, CLI executable, or entrypoint script in the terminal with realistic, representative flags and inputs.
- Exit Code & Output Inspection: Confirm that the process exits with the expected code (
code 0for success or expected non-zero code for negative test cases). Inspect stdout and stderr for correct structure, clean formatting, and expected output. - Inspect Output & Side Effects:
- If the program creates or modifies files, actively inspect the results (
cat,head,ls -la,view_file) and display the proof. - For web services or APIs, execute real HTTP requests (
curl,urllib, etc.) and verify status codes and response bodies.
- If the program creates or modifies files, actively inspect the results (
- Boundary & Negative Testing: Execute at least one edge case (e.g. invalid arguments, missing files, malformed inputs) to verify graceful error handling.
3. Evidence-Based Completion Standard: Show What You Verified
An agent must never claim success with bare assertions like "I have updated the code and fixed the issue" or vague handwaves like "Phase 3: verified".
Mandatory Proof Output:
Every completion message must explicitly show the evidence of verification:
- The Exact Commands Run: Display the verification commands executed in the terminal.
- Actual Terminal Output: Paste the verbatim or trimmed terminal output showing exit codes, stdout, stderr, or test summaries. NEVER conceal output behind bare checkmarks.
- Artifact / Side-Effect Confirmation: Display the output of inspecting generated files or side effects to prove the runtime change took effect.
Example Proof Block:
✅ Phase 1 (Static Validation):
Command: cargo clippy --all-targets -- -D warnings
Output: Checking karakuri v0.6.5 (/path/to/karakuri)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.42s (0 warnings, clean)
✅ Phase 2 (Test Execution):
Command: cargo test --all-targets
Output: test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
✅ Phase 3 (Live Runtime Smoke Test):
Command: ./target/debug/karakuri audit .
Output: Exit code: 0
┌──────────────────────────────────────────────┐
│ Karakuri Architecture & Clean-Code Audit │
│ All clean-code rules passed. 0 violations. │
└──────────────────────────────────────────────┘
Side-Effect Inspection: Verified modified files via diff; no stray temp files.4. Autonomous Closed-Loop Self-Healing
[!NOTE] Zero Permission-Seeking on Failures: Once a task or fix has been approved by the user, the agent owns the outcome end-to-end.
If Phase 1, Phase 2, or Phase 3 fails during verification:
- Do NOT stop and ask the user: Never ask "I encountered an error / the test failed, may I fix it?".
- Diagnose Autonomously: Read the compiler error, test failure traceback, or runtime panic log.
- Remediate in Place: Fix the root cause in the source code.
- Re-Verify the Cycle: Re-run Phase 1, 2, and 3 until the entire verification pipeline is clean green.
5. Prohibited Excuses & Antipatterns
| Prohibited Phrase / Excuse | Why It Is Rejected | Required Action |
| "All tests passed in test.py/ts/rs so it works." | Unit tests run in vitro; they do not prove runtime CLI, binary execution, or live behavior. | Execute the live binary/script in Phase 3 with real inputs. |
| "Phase 3 verified." (without terminal output) | Stating verification without showing actual terminal output is an unverified assumption. | Display the verbatim command, exit code, and stdout/stderr. |
| "This should work now." | "Should" expresses unverified hope. | Run the code live and prove it works with real terminal output. |
| "The code looks correct theoretically." | Syntax visual checks do not catch runtime bugs. | Execute the test suite and the live runtime binary. |
"You can test it by running command." | Passes the testing burden to the user. | Run the command yourself using available execution tools. |
| Modifying tests to make them pass trivially. | Masking failures by weakening test assertions. | Fix the implementation to satisfy the original contract. |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

