Metadata-Version: 2.4
Name: failfirst
Version: 0.1.0
Summary: Acceptance criteria that must be proven to fail on the unfixed code before they may count as passing.
Author-email: Pallav Pokhriyal <pallav01@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/pallav0107/failfirst
Project-URL: Source, https://github.com/pallav0107/failfirst
Project-URL: Issues, https://github.com/pallav0107/failfirst/issues
Keywords: testing,ci,ai-agents,acceptance-criteria,verification
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyYAML>=6
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: jsonschema>=4; extra == "test"
Requires-Dist: tiktoken; extra == "test"
Dynamic: license-file

# failfirst (Python)

Acceptance criteria that must be **proven to fail on the unfixed code** before they may count as passing. A check that has never failed carries no information.

```
pip install failfirst
failfirst baseline        # before the work; writes .failfirst.lock.json
failfirst verify          # after; passes only if every criterion failed first, passes now, and is unchanged
```

Library:

```python
from failfirst import load_criteria, baseline, verify, format_report

criteria = load_criteria("failfirst.yaml")
report, code = baseline(criteria, ".failfirst.lock.json")
# ... do the work ...
report, code = verify(criteria, ".failfirst.lock.json")
print(format_report(report))
```

Exit codes: 0 pass, 1 fail, 2 bad input, 3 judgment criteria awaiting human review.

Full documentation, the language-neutral spec and the conformance vectors: see the repository root (`spec/SPEC.md`). MIT licensed.

## Agent use

`failfirst describe --json` (Anthropic / OpenAI / MCP tool definitions), `failfirst mcp` (MCP stdio server), `--json` on every command, stable `FF_E_*` error codes. See `agent/AGENTS.md` and `agent/llms.txt` in this package.
