{"id":44668038,"url":"https://github.com/joeabbey/fault","last_synced_at":"2026-03-08T00:01:43.408Z","repository":{"id":338524233,"uuid":"1158137516","full_name":"joeabbey/fault","owner":"joeabbey","description":"Pre-commit validation for AI agent output. Catches broken imports, stale references, and cross-file errors before they hit your codebase.","archived":false,"fork":false,"pushed_at":"2026-02-23T23:28:20.000Z","size":897,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-24T05:51:31.024Z","etag":null,"topics":["ai-agents","claude-code","code-quality","developer-tools","golang","pre-commit","static-analysis"],"latest_commit_sha":null,"homepage":"https://fault.jabbey.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeabbey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-14T21:21:54.000Z","updated_at":"2026-02-23T23:28:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/joeabbey/fault","commit_stats":null,"previous_names":["joeabbey/fault"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/joeabbey/fault","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeabbey%2Ffault","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeabbey%2Ffault/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeabbey%2Ffault/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeabbey%2Ffault/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeabbey","download_url":"https://codeload.github.com/joeabbey/fault/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeabbey%2Ffault/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30238062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T23:52:25.683Z","status":"ssl_error","status_checked_at":"2026-03-07T23:52:25.373Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","claude-code","code-quality","developer-tools","golang","pre-commit","static-analysis"],"created_at":"2026-02-15T01:18:10.389Z","updated_at":"2026-03-08T00:01:43.399Z","avatar_url":"https://github.com/joeabbey.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fault\r\n\r\n**Catch AI agent mistakes before they hit your codebase.**\r\n\r\n[![CI](https://github.com/joeabbey/fault/actions/workflows/ci.yml/badge.svg)](https://github.com/joeabbey/fault/actions/workflows/ci.yml)\r\n[![Go 1.22+](https://img.shields.io/badge/Go-1.22+-00ADD8?logo=go\u0026logoColor=white)](https://go.dev)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\r\n\r\nFault validates multi-file changes from Claude Code, aider, and Cursor — catching broken imports, stale references, and missing tests before you commit.\r\n\r\n## The problem\r\n\r\nAI coding agents are fast. They scaffold entire features across a dozen files in seconds. But they make structural mistakes that are easy to miss:\r\n\r\n- An import references a module that was never created\r\n- A function signature changed but not all callers were updated\r\n- A file was renamed but old references remain in three other files\r\n- TODO placeholders were left behind as \"implementation notes\"\r\n\r\nThese errors compile, pass a quick scan, and slip into your commit history. You find them later when something breaks in production.\r\n\r\n**Traditional linters check syntax within a single file. Fault checks the relationships between files.**\r\n\r\n## Install\r\n\r\n```bash\r\ncurl -sSf https://fault.jabbey.io/install.sh | sh\r\n```\r\n\r\nOr from source:\r\n\r\n```bash\r\ngo install github.com/joeabbey/fault/cmd/fault@latest\r\n```\r\n\r\n## Quick start\r\n\r\n```bash\r\nfault init              # Generate .fault.yaml config\r\nfault hook install      # Install as pre-commit hook\r\nfault check --staged    # Validate staged changes\r\nfault check             # Validate unstaged changes\r\n```\r\n\r\n## What Fault catches\r\n\r\n| Check | Single-file linter | Fault |\r\n|-------|:--:|:--:|\r\n| Syntax errors | Yes | Use your linter |\r\n| Broken imports across files | | **Yes** |\r\n| Signature changes with stale callers | | **Yes** |\r\n| References to deleted/renamed files | | **Yes** |\r\n| Missing test updates | | **Yes** |\r\n| Agent artifacts (TODOs, debug logs) | Partial | **Yes** |\r\n| Security anti-patterns | | **Yes** |\r\n| Hallucinated APIs/functions | | **Yes** |\r\n\r\n## How it works\r\n\r\n```mermaid\r\nflowchart TB\r\n    subgraph input [\"  Input  \"]\r\n        A[\"🤖 AI Agent\\nClaude Code · aider · Cursor\"]\r\n        B[\"📂 git commit\"]\r\n    end\r\n\r\n    subgraph fault [\"  Fault  \"]\r\n        C[\"🔗 Pre-commit Hook\"]\r\n        D[\"📄 Parse Changed Files\"]\r\n        subgraph analyzers [\"  12 Analyzers · Parallel Execution  \"]\r\n            direction LR\r\n            E1[\"Imports\"] ~~~ E2[\"Consistency\"] ~~~ E3[\"References\"] ~~~ E4[\"Tests\"]\r\n            E5[\"Patterns\"] ~~~ E6[\"Security\"] ~~~ E7[\"Hallucination\"] ~~~ E8[\"+ 5 more\"]\r\n        end\r\n    end\r\n\r\n    subgraph output [\"  Result  \"]\r\n        G[\"🚫 Block Commit\\nShow what to fix\"]\r\n        H[\"✅ Commit Proceeds\"]\r\n    end\r\n\r\n    A --\u003e B --\u003e C --\u003e D --\u003e analyzers\r\n    analyzers -- \"Issues found\" --\u003e G\r\n    analyzers -- \"All clear\" --\u003e H\r\n\r\n    style input fill:#1e1e2e,stroke:#f43f5e,stroke-width:1px,color:#e2e8f4\r\n    style fault fill:#0e1017,stroke:#f43f5e,stroke-width:2px,color:#e2e8f4\r\n    style analyzers fill:#1a1a2e,stroke:#fb7185,stroke-width:1px,color:#e2e8f4\r\n    style output fill:#1e1e2e,stroke:#f43f5e,stroke-width:1px,color:#e2e8f4\r\n    style A fill:#2a2a3e,stroke:#f43f5e,color:#e2e8f4\r\n    style B fill:#2a2a3e,stroke:#f43f5e,color:#e2e8f4\r\n    style C fill:#f43f5e,stroke:#e11d48,color:#fff\r\n    style D fill:#2a2a3e,stroke:#fb7185,color:#e2e8f4\r\n    style G fill:#e11d48,stroke:#be123c,color:#fff\r\n    style H fill:#059669,stroke:#047857,color:#fff\r\n    style E1 fill:#2a2a3e,stroke:#fb7185,color:#e2e8f4\r\n    style E2 fill:#2a2a3e,stroke:#fb7185,color:#e2e8f4\r\n    style E3 fill:#2a2a3e,stroke:#fb7185,color:#e2e8f4\r\n    style E4 fill:#2a2a3e,stroke:#fb7185,color:#e2e8f4\r\n    style E5 fill:#2a2a3e,stroke:#fb7185,color:#e2e8f4\r\n    style E6 fill:#2a2a3e,stroke:#fb7185,color:#e2e8f4\r\n    style E7 fill:#2a2a3e,stroke:#fb7185,color:#e2e8f4\r\n    style E8 fill:#2a2a3e,stroke:#fb7185,color:#e2e8f4\r\n```\r\n\r\n### Analyzers\r\n\r\nFault runs 12 analyzers in parallel against your git diff:\r\n\r\n| Analyzer | What it catches |\r\n|----------|-----------------|\r\n| **Imports** | References to nonexistent exports, removed exports still imported |\r\n| **Consistency** | Function signatures changed without updating callers |\r\n| **References** | Deleted/renamed files still referenced elsewhere |\r\n| **Tests** | Changed functions without corresponding test updates |\r\n| **Patterns** | TODO placeholders, debug artifacts, commented-out code |\r\n| **Security** | Hardcoded credentials, injection risks, insecure patterns |\r\n| **Hallucination** | Calls to APIs or functions that don't exist in your codebase |\r\n| **Complexity** | Excessive cyclomatic complexity in changed code |\r\n| **Concurrency** | Race conditions, deadlock patterns, unsafe shared state |\r\n| **Resource** | Unclosed handles, leaked connections, missing cleanup |\r\n| **Migration** | Schema changes without migration files |\r\n| **Doc Drift** | Code changes that invalidate existing documentation |\r\n\r\n## Language support\r\n\r\nFault supports **42 languages** including Go, TypeScript, Python, Java, Rust, Ruby, Kotlin, C#, Swift, C/C++, Zig, Haskell, Elixir, Terraform, Solidity, and [many more](docs/languages.md).\r\n\r\n## Integrations\r\n\r\n| Tool | Integration |\r\n|------|-------------|\r\n| **Claude Code** | Pre-commit hook or [Claude Code hooks](docs/claude-code-integration.md) |\r\n| **aider** | Pre-commit hook or [`--lint-cmd`](docs/aider-integration.md) |\r\n| **Cursor** | Pre-commit hook |\r\n| **GitHub Actions** | [SARIF output](docs/github-actions.md) for Code Scanning |\r\n| **Any git workflow** | If it commits to git, Fault can validate it |\r\n\r\n## Output formats\r\n\r\n```bash\r\nfault check                    # Terminal (colored, human-readable)\r\nfault check --format=json      # JSON (for scripts/CI)\r\nfault check --format=sarif     # SARIF v2.1.0 (GitHub Code Scanning)\r\nfault check --format=github    # GitHub Actions annotations\r\n```\r\n\r\n## Configuration\r\n\r\nCreate `.fault.yaml` in your project root (or run `fault init`):\r\n\r\n```yaml\r\nversion: 1\r\nlanguages: [go, typescript, python]\r\nblock_on: error\r\n\r\nanalyzers:\r\n  imports: true\r\n  consistency: true\r\n  references: true\r\n  tests: true\r\n  patterns: true\r\n  security: true\r\n  hallucination: true\r\n\r\nllm:\r\n  enabled: false\r\n  spec_file: \"\"\r\n\r\nignore:\r\n  - \"vendor/\"\r\n  - \"node_modules/\"\r\n  - \"*.generated.*\"\r\n```\r\n\r\n## Pro features\r\n\r\nSet `FAULT_API_KEY` to enable AI-powered analysis:\r\n\r\n- **Confidence scoring** — Per-file confidence scores with reasoning\r\n- **Spec comparison** — Compare changes against a requirements document\r\n- **Auto-fix** — Generate and apply fixes for detected issues\r\n\r\n```bash\r\nfault signup --email you@example.com   # Get an API key\r\nfault fix --dry-run                    # Preview auto-fixes\r\n```\r\n\r\nSee [fault.jabbey.io](https://fault.jabbey.io) for pricing and plans.\r\n\r\n## Development\r\n\r\n```bash\r\nmake build          # Build CLI binary\r\nmake build-cloud    # Build cloud API server\r\nmake test           # Run tests with race detection\r\nmake release        # Cross-compile for all platforms\r\n```\r\n\r\n## Documentation\r\n\r\n- [Getting Started](docs/getting-started.md)\r\n- [GitHub Actions](docs/github-actions.md)\r\n- [Claude Code Integration](docs/claude-code-integration.md)\r\n- [aider Integration](docs/aider-integration.md)\r\n- [Language Support](docs/languages.md)\r\n\r\n## License\r\n\r\nMIT — see [LICENSE](LICENSE).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeabbey%2Ffault","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeabbey%2Ffault","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeabbey%2Ffault/lists"}