Strict diagnostic enforcer that detects, classifies, and blocks execution on ANY unresolved error. Use when enforcing zero-tolerance quality gates, debugging with fail-closed semantics, or validating code before deployment. Triggers on: "debug with zero tolerance", "enforce error-free", "block on any error", "strict validation". Covers: syntax, runtime, logic, config, dependency, environment, integration errors. NEVER bypasses, skips, silences, or downgrades errors.
Validator skill. Enforces zero-tolerance error detection with fail-closed semantics. Blocks execution if ANY unresolved error remains.
Does: Detect errors across 7 classes (syntax, runtime, logic, config, dependency, environment, integration). Classify with explicit taxonomy. Block execution on unresolved errors. Re-validate after every fix.
Does NOT: Suppress errors. Skip failing components. Disable checks. Allow partial success. Execute with unresolved errors. Freeze or deadlock.
| Class | Detection Method | Blocking | |-------|------------------|----------| | SYNTAX | AST parsing | Always | | RUNTIME | Import testing, execution simulation | Always | | LOGIC | Assertion checks, invariant validation | Configurable | | CONFIG | Missing/invalid config, env vars | Configurable | | DEPENDENCY | Missing packages, version conflicts | Always | | ENVIRONMENT | OS-level issues, permissions, paths | Always | | INTEGRATION | External API failures, boundary issues | Configurable |
Input (paths + error classes + fail_on_any_error flag)
↓
[PASS 1] Detect ALL errors across requested classes
↓
Findings? → YES → Classify (severity, blocking)
→ fail_on_any_error=True OR blocking errors?
→ YES → BLOCKED state (execution halts)
→ NO → (safe_mode? detection-only : attempt resolution)
→ NO → CLEAN state
↓
[PASS 2] (if not safe_mode) Attempt resolution
↓
[PASS 3] Re-validate (detect again)
↓
Repeat until: CLEAN (zero errors) OR BLOCKED (unresolvable) OR UNSAFE (stalled)
| Severity | Meaning | Blocks Execution |
|----------|---------|------------------|
| CRITICAL | System-wide failure, execution impossible | Always |
| BLOCKING | Component fails, must fix before proceeding | Always |
| WARNING | Non-fatal but must be addressed | Only if fail_on_any_error=True |
Fail-closed guarantee: If fail_on_any_error=True (default), ANY error triggers BLOCKED state. No partial success allowed.
| State | Meaning | Execution Allowed | |-------|---------|-------------------| | CLEAN | Zero errors detected | ✅ Yes | | BLOCKED | Unresolvable errors present | ❌ No | | UNSAFE | Resolution stalled or safety limit exceeded | ❌ No |
fail_on_any_error=True)ErrorClass, Severity, blocking flagmax_resolution_attempts)max_resolution_attempts) → UNSAFE state, execution haltedNo error is ever suppressed. If detection or resolution itself fails, that failure becomes a CRITICAL error.
ast, importlib.util, pathlib| Resource | Path | When to Read |
|----------|------|--------------|
| Error taxonomy | references/error-classes.md | Detailed classification for each of 7 error classes |
| Resolution strategies | references/resolution-strategies.md | Patterns for deterministic error resolution |
| Pydantic models | models.py | Full schema definitions (DebugInput, DebugResult, ErrorFinding, etc.) |
| Core engine | debug_engine.py | Detection and resolution logic |
from zero_defect_debugger import run_debug_session, DebugInput, ErrorClass
# Strict validation: block on ANY error
result = run_debug_session(DebugInput(
target_paths=["src/"],
error_classes=[ErrorClass.SYNTAX, ErrorClass.RUNTIME, ErrorClass.DEPENDENCY],
fail_on_any_error=True, # Zero tolerance
safe_mode=True, # Detection only, no auto-resolution
))
if result.final_state == "clean":
print("✅ CLEAN: Zero errors detected.")
elif result.final_state == "blocked":
print(f"❌ BLOCKED: {result.blocking_errors_remaining} errors must be resolved.")
for report in result.reports:
for finding in report.findings:
print(f" {finding.error_class}: {finding.message} @ {finding.file_path}:{finding.line_number}")
else:
print(f"⚠️ UNSAFE: Resolution stalled or safety limit exceeded.")
npx skills add assadsharif/zero-defect-debugger下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer