← ClaudeAtlas

foolproof-productlisted

Use this skill on ANY code change in codevira's product surface (mcp_server/, indexer/). Triggers on Edit/Write to product code, on phrases like "fix bug", "add feature", "handle error", or any modification to commands the end-user runs. Enforces 10 product- reliability principles: no silent failures, atomic state mutations, defensive parsing, bounded resources, predictable detection, reversible operations, helpful error messages, graceful degradation, observability, self-diagnosis. Refuses to ship code that violates any of them.
sachinshelke/codevira · ★ 10 · AI & Automation · score 79
Install: claude install-skill sachinshelke/codevira
# Foolproof product — non-skippable code invariants The release-readiness skill prevents shipping a release without evidence. THIS skill prevents writing code that misbehaves once shipped. The two are complementary; both must be enforced. v2.0.0 shipped with 23 bugs (A–O) because individual code changes satisfied "the function returns a value" but violated the product invariants below. This skill makes those invariants explicit and checkable. ## The 10 principles (P1–P10) For every code change you make in `mcp_server/` or `indexer/`, walk through this checklist. Skipping any P is a discipline breach. ### P1 — No silent failures, ever For every code path that does work: - Returns >0 results → succeeds with concrete counts in the response - Returns 0 results → MUST emit a clear "no results because <reason>" message with a `fix_command` field **Anti-pattern (the v2.0 bug pattern):** ```python def index() -> dict: matched = [f for f in files if matches(f)] if not matched: return {"chunks": 0} # ← silent zero. NEVER. return {"chunks": len(matched)} ``` **Correct:** ```python def index() -> dict: matched = [f for f in files if matches(f)] if not matched: return { "chunks": 0, "warning": f"No files matched. watched_dirs={watched_dirs} " f"file_extensions={extensions}", "fix_command": "codevira configure", } return {"chunks": len(matched), "files": [str(f) for f in m