formal-bug-hunt
/formal-bug-hunt
Find concurrency or state-machine defects using bounded TLA+/Lean models and real-code repros. Use for explicit formal verification, 'debug', or unresolved interleavings; ordinary debugging stays lightweight, deep work routes to fused-formal-verification.
- Author
- hank840214-alt ↗
- Repository
- fused-formal-verification ↗
- Licence
- MIT
- Last repository change
- 03.11.2026
Assessment and security
- Files in this package
- 4
- Scripts
- 1
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 03.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 1 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/new-hunt.sh
What it does and when to use it
Find concurrency or state-machine defects using bounded TLA+/Lean models and real-code repros. Use for explicit formal verification, 'debug', or unresolved interleavings; ordinary debugging stays lightweight, deep work routes to fused-formal-verification.
Triggers from the description
Original author description
Find concurrency or state-machine defects using bounded TLA+/Lean models and real-code repros. Use for explicit formal verification, 'debug', or unresolved interleavings; ordinary debugging stays lightweight, deep work routes to fused-formal-verification.
How it works
- Quick debug (default when the user just says "debug")
- Routing to fused-formal-verification
- Tools (this machine)
SKILL.md preview
--- name: formal-bug-hunt description: "Find concurrency or state-machine defects using bounded TLA+/Lean models and real-code repros. Use for explicit formal verification, 'debug', or unresolved interleavings; ordinary debugging stays lightweight, deep work routes to fused-formal-verification." --- # Formal bug hunt (router) Entry point for "debug" and for formal verification. Quick debug stays here. Anything deeper runs the `fused-formal-verification` skill (same repo, `skills/fused-formal-verification/SKILL.md`); this file only decides which mode and keeps the machine-specific tool notes. ## Quick debug (default when the user just says "debug") 1. Restate the symptom in one line and pin the target (path, HEAD, uncommitted files). 2. Reproduce it on the real code with the smallest script or test; print one decisive line. No reproduction → report what was tried; do not guess-fix. 3. Find the cause (file:line) and make the minimal fix in the repo, following its rules; add a regression test that fails before and passes after. If other sessions have uncommitted work in the same files, fix in an isolated copy and apply a patch. 4. Escalate only when a specific unresolved invariant or interleaving justifies a bounded model, or when the user asks for formal verification. Timers, retries, money, or failure to reproduce alone do not require TLA+/Lean; first collect the next discriminating runtime evidence. ## Routing to fused-formal-verification | Situation | Mode | |---|---| | No model exists for this area; concurrency, state machine, money, sessions, retries | **Create** (Phase 0 → 1 → 2) | | A model or verify skill exists and the code moved since its sync commit | **Maintain** first, then Create for new areas | | Someone who is not an engineer must decide whether the behavior is right | **Statechart** | | Any of the above, at the end | **Handoff** | Report shape, status words and TLA+/Lean patterns: [REFERENCE.md](REFERENCE.md). Scaffold a hunt directory: `scripts/new-hunt.sh <project> <repo-path>`. ## Tools (this machine) - TLA+: `~/.local/bin/tlc Spec.tla -config Spec_CASE.cfg` (wrapper uses brew `openjdk@21`; `/usr/bin/java` is a stub). Run long jobs with `timeout` in the background; a run cut off is INCONCLUSIVE. - Lean 4: `lean File.lean` via brew `elan` shims; toolchain linked with `elan toolchain link`. - Real-code harness: `node --experimental-strip-types repro/<file>.ts` for TS projects; headless Chromium for browser-only logic. - Drift guard and statechart fallback: `scripts/drift-guard.mjs`, `scripts/tlc-dot-to-mermaid.mjs` in the fused repo.
Files in this package (4)
- REFERENCE.md 4 KB
- SKILL.before-router-2026-11-01.md 6 KB
- SKILL.md 3 KB
- scripts/new-hunt.sh 2 KB
Versions
The database has no other skills named formal-bug-hunt.
Database snapshot: 13.11.2026 · package version bd1df269621a (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Similar skills
- 100fused-formal-verification
Find race, state-machine and data-flow bugs with TLA+/Lean (Boris-style sweep), lock the key property in as a repo check that can fail, keep it in sync with the code, and show bugs as statecharts (pstack-style). Use for formal verification, model checking, races, locks,… - 90create-formal-verification-skill
Generates a project-local skill that formally verifies the code where a bug costs the most and tests reach the least, in any language, with whichever verification tool fits. Use for /create-formal-verification-skill, "verify this subsystem", or when concurrency, retries, state… - 100create-tla-model
Write TLA+ models of a system's stateful parts (flows, protocols, state machines). Use when starting formal models for behavior tests rarely cover; not to re-check existing models (use tla-check) or to update models after code changes (use maintain-tla-model). - 90formal-foundations
Mathematical foundations, logical structures, and formal verification guidance. Trigger when: - Designing protocol contracts, formal specifications, verifying state spaces, or using proof assistants. - Tasks involve: TLA+, Alloy, Lean, Coq, model checkers, invariants, temporal… - 100verify-llm-wiki-formal
Use when changing PStack wiki raw-source write semantics, replay/collision handling, or proof claims requiring source-to-code alignment and bounded or TLA+ state verification. - 100tla
Formally verify a capability's invariants with TLA+ and TLC, and record the result as metamodel Evidence. Use when the constitution's formal verification assessment flags a component (concurrency, distributed state, financial transactions, safety-critical logic, complex state machines, protocols).