failfirst 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- failfirst-0.1.0/LICENSE +21 -0
- failfirst-0.1.0/PKG-INFO +58 -0
- failfirst-0.1.0/README.md +29 -0
- failfirst-0.1.0/pyproject.toml +45 -0
- failfirst-0.1.0/setup.cfg +4 -0
- failfirst-0.1.0/src/failfirst/__init__.py +10 -0
- failfirst-0.1.0/src/failfirst/__main__.py +5 -0
- failfirst-0.1.0/src/failfirst/agent/AGENTS.md +52 -0
- failfirst-0.1.0/src/failfirst/agent/llms.txt +12 -0
- failfirst-0.1.0/src/failfirst/agent/schemas/baseline-report.schema.json +127 -0
- failfirst-0.1.0/src/failfirst/agent/schemas/describe.schema.json +130 -0
- failfirst-0.1.0/src/failfirst/agent/schemas/error.schema.json +33 -0
- failfirst-0.1.0/src/failfirst/agent/schemas/verify-report.schema.json +134 -0
- failfirst-0.1.0/src/failfirst/agent/schemas/version.schema.json +19 -0
- failfirst-0.1.0/src/failfirst/agent/tools.json +43 -0
- failfirst-0.1.0/src/failfirst/agent.py +109 -0
- failfirst-0.1.0/src/failfirst/cli.py +119 -0
- failfirst-0.1.0/src/failfirst/core.py +177 -0
- failfirst-0.1.0/src/failfirst/mcp.py +77 -0
- failfirst-0.1.0/src/failfirst/model.py +167 -0
- failfirst-0.1.0/src/failfirst/py.typed +0 -0
- failfirst-0.1.0/src/failfirst/runner.py +101 -0
- failfirst-0.1.0/src/failfirst.egg-info/PKG-INFO +58 -0
- failfirst-0.1.0/src/failfirst.egg-info/SOURCES.txt +30 -0
- failfirst-0.1.0/src/failfirst.egg-info/dependency_links.txt +1 -0
- failfirst-0.1.0/src/failfirst.egg-info/entry_points.txt +2 -0
- failfirst-0.1.0/src/failfirst.egg-info/requires.txt +6 -0
- failfirst-0.1.0/src/failfirst.egg-info/top_level.txt +1 -0
- failfirst-0.1.0/tests/test_agent.py +278 -0
- failfirst-0.1.0/tests/test_cli.py +84 -0
- failfirst-0.1.0/tests/test_conformance.py +47 -0
- failfirst-0.1.0/tests/test_eval_harness.py +92 -0
failfirst-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pallav Pokhriyal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
failfirst-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: failfirst
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Acceptance criteria that must be proven to fail on the unfixed code before they may count as passing.
|
|
5
|
+
Author-email: Pallav Pokhriyal <pallav01@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/pallav0107/failfirst
|
|
8
|
+
Project-URL: Source, https://github.com/pallav0107/failfirst
|
|
9
|
+
Project-URL: Issues, https://github.com/pallav0107/failfirst/issues
|
|
10
|
+
Keywords: testing,ci,ai-agents,acceptance-criteria,verification
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Typing :: Typed
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: PyYAML>=6
|
|
24
|
+
Provides-Extra: test
|
|
25
|
+
Requires-Dist: pytest; extra == "test"
|
|
26
|
+
Requires-Dist: jsonschema>=4; extra == "test"
|
|
27
|
+
Requires-Dist: tiktoken; extra == "test"
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
# failfirst (Python)
|
|
31
|
+
|
|
32
|
+
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.
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
pip install failfirst
|
|
36
|
+
failfirst baseline # before the work; writes .failfirst.lock.json
|
|
37
|
+
failfirst verify # after; passes only if every criterion failed first, passes now, and is unchanged
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Library:
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
from failfirst import load_criteria, baseline, verify, format_report
|
|
44
|
+
|
|
45
|
+
criteria = load_criteria("failfirst.yaml")
|
|
46
|
+
report, code = baseline(criteria, ".failfirst.lock.json")
|
|
47
|
+
# ... do the work ...
|
|
48
|
+
report, code = verify(criteria, ".failfirst.lock.json")
|
|
49
|
+
print(format_report(report))
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Exit codes: 0 pass, 1 fail, 2 bad input, 3 judgment criteria awaiting human review.
|
|
53
|
+
|
|
54
|
+
Full documentation, the language-neutral spec and the conformance vectors: see the repository root (`spec/SPEC.md`). MIT licensed.
|
|
55
|
+
|
|
56
|
+
## Agent use
|
|
57
|
+
|
|
58
|
+
`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.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# failfirst (Python)
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
pip install failfirst
|
|
7
|
+
failfirst baseline # before the work; writes .failfirst.lock.json
|
|
8
|
+
failfirst verify # after; passes only if every criterion failed first, passes now, and is unchanged
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Library:
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from failfirst import load_criteria, baseline, verify, format_report
|
|
15
|
+
|
|
16
|
+
criteria = load_criteria("failfirst.yaml")
|
|
17
|
+
report, code = baseline(criteria, ".failfirst.lock.json")
|
|
18
|
+
# ... do the work ...
|
|
19
|
+
report, code = verify(criteria, ".failfirst.lock.json")
|
|
20
|
+
print(format_report(report))
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Exit codes: 0 pass, 1 fail, 2 bad input, 3 judgment criteria awaiting human review.
|
|
24
|
+
|
|
25
|
+
Full documentation, the language-neutral spec and the conformance vectors: see the repository root (`spec/SPEC.md`). MIT licensed.
|
|
26
|
+
|
|
27
|
+
## Agent use
|
|
28
|
+
|
|
29
|
+
`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.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "failfirst"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Acceptance criteria that must be proven to fail on the unfixed code before they may count as passing."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{ name = "Pallav Pokhriyal", email = "pallav01@gmail.com" }]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 4 - Beta",
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
18
|
+
"Programming Language :: Python :: 3.10",
|
|
19
|
+
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
"Programming Language :: Python :: 3.13",
|
|
22
|
+
"Typing :: Typed",
|
|
23
|
+
]
|
|
24
|
+
keywords = ["testing", "ci", "ai-agents", "acceptance-criteria", "verification"]
|
|
25
|
+
dependencies = ["PyYAML>=6"]
|
|
26
|
+
|
|
27
|
+
[project.optional-dependencies]
|
|
28
|
+
test = ["pytest", "jsonschema>=4", "tiktoken"]
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Homepage = "https://github.com/pallav0107/failfirst"
|
|
32
|
+
Source = "https://github.com/pallav0107/failfirst"
|
|
33
|
+
Issues = "https://github.com/pallav0107/failfirst/issues"
|
|
34
|
+
|
|
35
|
+
[project.scripts]
|
|
36
|
+
failfirst = "failfirst.cli:main"
|
|
37
|
+
|
|
38
|
+
[tool.setuptools.packages.find]
|
|
39
|
+
where = ["src"]
|
|
40
|
+
|
|
41
|
+
[tool.setuptools.package-data]
|
|
42
|
+
failfirst = ["py.typed", "agent/*", "agent/schemas/*"]
|
|
43
|
+
|
|
44
|
+
[tool.pytest.ini_options]
|
|
45
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""failfirst: a check that has never failed carries no information."""
|
|
2
|
+
__version__ = "0.1.0"
|
|
3
|
+
|
|
4
|
+
from .core import LockError, baseline, format_report, verify # noqa: E402
|
|
5
|
+
from .model import SpecError, criterion_hash, load_criteria, normalize_criteria # noqa: E402
|
|
6
|
+
from .agent import CliError, describe # noqa: E402
|
|
7
|
+
from .runner import evaluate, observe # noqa: E402
|
|
8
|
+
|
|
9
|
+
__all__ = ["baseline", "verify", "format_report", "load_criteria", "normalize_criteria",
|
|
10
|
+
"criterion_hash", "evaluate", "observe", "SpecError", "LockError", "CliError", "describe", "__version__"]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# failfirst: agent guide
|
|
2
|
+
|
|
3
|
+
Rule: a criterion counts only if it FAILED before the work, is UNCHANGED, and PASSES now.
|
|
4
|
+
|
|
5
|
+
## Commands (always add `--json`; run in the project directory)
|
|
6
|
+
- `failfirst baseline [criteria] [--lock P] [--dry-run] [--force] [--quiet] [--json]`
|
|
7
|
+
Run once, BEFORE any work, on the unfixed state. Writes `.failfirst.lock.json` next to the criteria file.
|
|
8
|
+
- `failfirst verify [criteria] [--lock P] [--quiet] [--json]` run AFTER the work.
|
|
9
|
+
- `failfirst describe --json` tool definitions (Anthropic, OpenAI, MCP). `failfirst mcp` MCP server on stdio
|
|
10
|
+
(tools `failfirst_baseline`, `failfirst_verify`). `failfirst --version`.
|
|
11
|
+
- `criteria` defaults to the first existing of failfirst.yaml|yml|json, criteria.yaml|yml|json.
|
|
12
|
+
- Never reads stdin, never prompts, never prints ANSI colour.
|
|
13
|
+
|
|
14
|
+
## Criteria file (failfirst.yaml or .json)
|
|
15
|
+
```yaml
|
|
16
|
+
criteria:
|
|
17
|
+
- id: add-works # unique
|
|
18
|
+
statement: add(2, 3) returns 5
|
|
19
|
+
check: { cmd: 'python3 -c "from calc import add; assert add(2,3)==5"' }
|
|
20
|
+
- id: reads-well
|
|
21
|
+
judgment: true # a human decides; never auto-passed
|
|
22
|
+
```
|
|
23
|
+
Checks: `cmd` (shell string) or `argv` (list) with `cwd`, `timeout` (s, default 60), `expect_exit` (default 0);
|
|
24
|
+
`type: file_contains` with `path`; `type: http` with `url`, `expect_status`. Optional on all:
|
|
25
|
+
`expect_contains`, `expect_not_contains`. Unknown fields are an error.
|
|
26
|
+
|
|
27
|
+
## Exit codes
|
|
28
|
+
0 pass / baseline ok; 1 fail (or baseline found criteria that already pass or errored); 2 input error;
|
|
29
|
+
3 all machine criteria proven, judgment criteria await a human; 70 internal.
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
Reports: `{tool, version, phase, status, exit_code, summary, criteria[]}`. Verify verdict per criterion:
|
|
33
|
+
`proven` good; `still_failing` keep working; `modified`/`removed`/`unbaselined` criteria changed after
|
|
34
|
+
baseline, so revert the edit; `vacuous` passed at baseline (measures nothing); `baseline_error`;
|
|
35
|
+
`error`; `awaiting_review`. Baseline `status`: `ok` or `warning`.
|
|
36
|
+
Errors with `--json` (JSON on stdout, text copy on stderr, exit 2): `{"error": {"code", "message", "hint"}}`. Codes: FF_E_USAGE,
|
|
37
|
+
FF_E_NO_CRITERIA, FF_E_BAD_CRITERIA, FF_E_LOCK_EXISTS, FF_E_NO_LOCK, FF_E_BAD_LOCK, FF_E_IO (unreadable/unwritable file), FF_E_INTERNAL.
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
1. Before work: `failfirst baseline --json` -> exit 0, every criterion `failed`.
|
|
41
|
+
2. Preview only: `failfirst baseline --dry-run --json` (no lockfile written).
|
|
42
|
+
3. After work: `failfirst verify --json` -> `"status": "pass"`, exit 0.
|
|
43
|
+
4. Pending review: exit 3, `awaiting_review` ids go to a human.
|
|
44
|
+
5. MCP: run `failfirst mcp`, send `initialize`, then `tools/call` with name `failfirst_verify`.
|
|
45
|
+
|
|
46
|
+
## Pitfalls
|
|
47
|
+
- Baseline BEFORE the fix. A criterion that already passes is `vacuous`; fix the criterion, not the code.
|
|
48
|
+
- Never re-baseline after the fix to make it pass: FF_E_LOCK_EXISTS protects the evidence; `--force`
|
|
49
|
+
is for a human owner only.
|
|
50
|
+
- Do not edit a criterion after baseline (`modified`). A timeout or missing command is `error`, not proof.
|
|
51
|
+
- Exit 1 on verify is a normal result, not a crash: read `criteria[].verdict`.
|
|
52
|
+
- `cwd` and `path` are relative to the criteria file's directory.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# failfirst
|
|
2
|
+
|
|
3
|
+
> Acceptance criteria that must be proven to fail on the unfixed code before they may count as passing. CLI, Python package and npm package; both implementations behave identically.
|
|
4
|
+
|
|
5
|
+
failfirst records which checks fail BEFORE work starts (`baseline`) and, after the work, counts a criterion only if it failed at baseline, is byte-for-byte unchanged, and passes now (`verify`). Editing, deleting or adding criteria after baseline is detected. Every command accepts `--json` and exits with a documented code. Tool definitions for Anthropic, OpenAI and MCP are printed by `failfirst describe --json`; `failfirst mcp` serves them over stdio.
|
|
6
|
+
|
|
7
|
+
- [AGENTS.md](AGENTS.md): exact commands, inputs, outputs, exit codes, examples, pitfalls
|
|
8
|
+
- [README.md](README.md): overview and install
|
|
9
|
+
- [spec/SPEC.md](spec/SPEC.md): language-neutral specification
|
|
10
|
+
- [spec/tools.json](spec/tools.json): single source of the tool definitions and error codes
|
|
11
|
+
- [schemas/](schemas/): JSON Schema for every --json output
|
|
12
|
+
- [docs/AGENT_HARNESS.md](docs/AGENT_HARNESS.md): using failfirst in an agent loop
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/pallav0107/failfirst/schemas/baseline-report.schema.json",
|
|
4
|
+
"title": "failfirst baseline report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"tool",
|
|
9
|
+
"version",
|
|
10
|
+
"phase",
|
|
11
|
+
"status",
|
|
12
|
+
"exit_code",
|
|
13
|
+
"summary",
|
|
14
|
+
"criteria"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"tool": {
|
|
18
|
+
"const": "failfirst"
|
|
19
|
+
},
|
|
20
|
+
"version": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"phase": {
|
|
24
|
+
"const": "baseline"
|
|
25
|
+
},
|
|
26
|
+
"status": {
|
|
27
|
+
"enum": [
|
|
28
|
+
"ok",
|
|
29
|
+
"warning"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"exit_code": {
|
|
33
|
+
"enum": [
|
|
34
|
+
0,
|
|
35
|
+
1
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"dry_run": {
|
|
39
|
+
"const": true
|
|
40
|
+
},
|
|
41
|
+
"summary": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"required": [
|
|
45
|
+
"failed_as_required",
|
|
46
|
+
"vacuous",
|
|
47
|
+
"errored",
|
|
48
|
+
"judgment"
|
|
49
|
+
],
|
|
50
|
+
"properties": {
|
|
51
|
+
"failed_as_required": {
|
|
52
|
+
"type": "integer",
|
|
53
|
+
"minimum": 0
|
|
54
|
+
},
|
|
55
|
+
"vacuous": {
|
|
56
|
+
"type": "integer",
|
|
57
|
+
"minimum": 0
|
|
58
|
+
},
|
|
59
|
+
"errored": {
|
|
60
|
+
"type": "integer",
|
|
61
|
+
"minimum": 0
|
|
62
|
+
},
|
|
63
|
+
"judgment": {
|
|
64
|
+
"type": "integer",
|
|
65
|
+
"minimum": 0
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"criteria": {
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": {
|
|
72
|
+
"$ref": "#/$defs/row"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"$defs": {
|
|
77
|
+
"evaluation": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"additionalProperties": false,
|
|
80
|
+
"required": [
|
|
81
|
+
"status",
|
|
82
|
+
"detail"
|
|
83
|
+
],
|
|
84
|
+
"properties": {
|
|
85
|
+
"status": {
|
|
86
|
+
"enum": [
|
|
87
|
+
"passed",
|
|
88
|
+
"failed",
|
|
89
|
+
"error",
|
|
90
|
+
"n/a"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"detail": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"row": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"additionalProperties": false,
|
|
101
|
+
"required": [
|
|
102
|
+
"id",
|
|
103
|
+
"statement",
|
|
104
|
+
"judgment",
|
|
105
|
+
"baseline",
|
|
106
|
+
"vacuous"
|
|
107
|
+
],
|
|
108
|
+
"properties": {
|
|
109
|
+
"id": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
},
|
|
112
|
+
"statement": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
115
|
+
"judgment": {
|
|
116
|
+
"type": "boolean"
|
|
117
|
+
},
|
|
118
|
+
"baseline": {
|
|
119
|
+
"$ref": "#/$defs/evaluation"
|
|
120
|
+
},
|
|
121
|
+
"vacuous": {
|
|
122
|
+
"type": "boolean"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/pallav0107/failfirst/schemas/describe.schema.json",
|
|
4
|
+
"title": "failfirst describe --json",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"tool",
|
|
9
|
+
"version",
|
|
10
|
+
"anthropic",
|
|
11
|
+
"openai",
|
|
12
|
+
"mcp"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"tool": {
|
|
16
|
+
"const": "failfirst"
|
|
17
|
+
},
|
|
18
|
+
"version": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"anthropic": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"minItems": 1,
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"required": [
|
|
28
|
+
"name",
|
|
29
|
+
"description",
|
|
30
|
+
"input_schema"
|
|
31
|
+
],
|
|
32
|
+
"properties": {
|
|
33
|
+
"name": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^[a-zA-Z0-9_-]{1,64}$"
|
|
36
|
+
},
|
|
37
|
+
"description": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"minLength": 1
|
|
40
|
+
},
|
|
41
|
+
"input_schema": {
|
|
42
|
+
"$ref": "#/$defs/params"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"openai": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"minItems": 1,
|
|
50
|
+
"items": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": [
|
|
54
|
+
"type",
|
|
55
|
+
"function"
|
|
56
|
+
],
|
|
57
|
+
"properties": {
|
|
58
|
+
"type": {
|
|
59
|
+
"const": "function"
|
|
60
|
+
},
|
|
61
|
+
"function": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"required": [
|
|
65
|
+
"name",
|
|
66
|
+
"description",
|
|
67
|
+
"parameters"
|
|
68
|
+
],
|
|
69
|
+
"properties": {
|
|
70
|
+
"name": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"pattern": "^[a-zA-Z0-9_-]{1,64}$"
|
|
73
|
+
},
|
|
74
|
+
"description": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"minLength": 1
|
|
77
|
+
},
|
|
78
|
+
"parameters": {
|
|
79
|
+
"$ref": "#/$defs/params"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"mcp": {
|
|
87
|
+
"type": "array",
|
|
88
|
+
"minItems": 1,
|
|
89
|
+
"items": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"required": [
|
|
93
|
+
"name",
|
|
94
|
+
"description",
|
|
95
|
+
"inputSchema"
|
|
96
|
+
],
|
|
97
|
+
"properties": {
|
|
98
|
+
"name": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"pattern": "^[a-zA-Z0-9_-]{1,64}$"
|
|
101
|
+
},
|
|
102
|
+
"description": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"minLength": 1
|
|
105
|
+
},
|
|
106
|
+
"inputSchema": {
|
|
107
|
+
"$ref": "#/$defs/params"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"$defs": {
|
|
114
|
+
"params": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"required": [
|
|
117
|
+
"type",
|
|
118
|
+
"properties"
|
|
119
|
+
],
|
|
120
|
+
"properties": {
|
|
121
|
+
"type": {
|
|
122
|
+
"const": "object"
|
|
123
|
+
},
|
|
124
|
+
"properties": {
|
|
125
|
+
"type": "object"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/pallav0107/failfirst/schemas/error.schema.json",
|
|
4
|
+
"title": "failfirst error",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"error"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"error": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"required": [
|
|
15
|
+
"code",
|
|
16
|
+
"message",
|
|
17
|
+
"hint"
|
|
18
|
+
],
|
|
19
|
+
"properties": {
|
|
20
|
+
"code": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"pattern": "^FF_E_[A-Z_]+$"
|
|
23
|
+
},
|
|
24
|
+
"message": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"hint": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/pallav0107/failfirst/schemas/verify-report.schema.json",
|
|
4
|
+
"title": "failfirst verify report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": [
|
|
8
|
+
"tool",
|
|
9
|
+
"version",
|
|
10
|
+
"phase",
|
|
11
|
+
"status",
|
|
12
|
+
"exit_code",
|
|
13
|
+
"summary",
|
|
14
|
+
"criteria"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"tool": {
|
|
18
|
+
"const": "failfirst"
|
|
19
|
+
},
|
|
20
|
+
"version": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"phase": {
|
|
24
|
+
"const": "verify"
|
|
25
|
+
},
|
|
26
|
+
"status": {
|
|
27
|
+
"enum": [
|
|
28
|
+
"pass",
|
|
29
|
+
"fail",
|
|
30
|
+
"awaiting_review"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"exit_code": {
|
|
34
|
+
"enum": [
|
|
35
|
+
0,
|
|
36
|
+
1,
|
|
37
|
+
3
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"summary": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"propertyNames": {
|
|
43
|
+
"enum": [
|
|
44
|
+
"awaiting_review",
|
|
45
|
+
"unbaselined",
|
|
46
|
+
"modified",
|
|
47
|
+
"vacuous",
|
|
48
|
+
"baseline_error",
|
|
49
|
+
"proven",
|
|
50
|
+
"still_failing",
|
|
51
|
+
"error",
|
|
52
|
+
"removed"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"additionalProperties": {
|
|
56
|
+
"type": "integer",
|
|
57
|
+
"minimum": 0
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"criteria": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": {
|
|
63
|
+
"$ref": "#/$defs/row"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"$defs": {
|
|
68
|
+
"evaluation": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"required": [
|
|
72
|
+
"status",
|
|
73
|
+
"detail"
|
|
74
|
+
],
|
|
75
|
+
"properties": {
|
|
76
|
+
"status": {
|
|
77
|
+
"enum": [
|
|
78
|
+
"passed",
|
|
79
|
+
"failed",
|
|
80
|
+
"error",
|
|
81
|
+
"n/a"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
"detail": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"row": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"required": [
|
|
93
|
+
"id",
|
|
94
|
+
"statement",
|
|
95
|
+
"judgment",
|
|
96
|
+
"verdict",
|
|
97
|
+
"reason"
|
|
98
|
+
],
|
|
99
|
+
"properties": {
|
|
100
|
+
"id": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
"statement": {
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
"judgment": {
|
|
107
|
+
"type": "boolean"
|
|
108
|
+
},
|
|
109
|
+
"verdict": {
|
|
110
|
+
"enum": [
|
|
111
|
+
"awaiting_review",
|
|
112
|
+
"unbaselined",
|
|
113
|
+
"modified",
|
|
114
|
+
"vacuous",
|
|
115
|
+
"baseline_error",
|
|
116
|
+
"proven",
|
|
117
|
+
"still_failing",
|
|
118
|
+
"error",
|
|
119
|
+
"removed"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"reason": {
|
|
123
|
+
"type": "string"
|
|
124
|
+
},
|
|
125
|
+
"baseline": {
|
|
126
|
+
"$ref": "#/$defs/evaluation"
|
|
127
|
+
},
|
|
128
|
+
"now": {
|
|
129
|
+
"$ref": "#/$defs/evaluation"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|