economics.check
Scan the repository's hand-written prose and claim sentences for a quantity (a percentage, 'N times fewer') stated next to the economics vocabulary, and check every claim the methodology binds to a metric: a bound claim may be guaranteed only while its metric's evidence meets the binding and is current. `ok: false` names every finding.
Scan the repository's hand-written prose and claim sentences for a quantity (a percentage, 'N times fewer') stated next to the economics vocabulary, and check every claim the methodology binds to a metric: a bound claim may be guaranteed only while its metric's evidence meets the binding and is current. `ok: false` names every finding.
- query
- behaviorally_verified
- module economics
- #economics
- #claims
- #gate
Exposure
Where this one definition is reachable. Absence is explicit: a surface not listed does not carry it.
| surface | as |
|---|---|
| MCP | tool majordomus_economics_check |
| HTTP | GET /api/v1/economics/check operationId economics.check |
| command line | majordomus economics check |
Schemas
The canonical input and output, from the Rust types; the MCP tool schema and the OpenAPI parameters and responses are derived from these.
input · EconomicsCheckInput
economics.check: nothing to narrow; the check is over the repository.
Unknown fields are refused rather than ignored, so a caller who tries to scope the check
to a path learns that it cannot be scoped instead of reading a partial verdict as whole.
use majordomus_cli::economics::claims::EconomicsCheckInput;
let input: EconomicsCheckInput = serde_json::from_str("{}").unwrap();
assert_eq!(input, EconomicsCheckInput::default());
let narrowed = serde_json::from_str::<EconomicsCheckInput>(r#"{"path":"docs"}"#);
assert!(narrowed.is_err(), "the check is over the whole repository");No properties: the capability takes no input.
JSON Schema
{
"additionalProperties": false,
"description": "The input of `economics.check`: nothing to narrow; the check is over the repository.\nUnknown fields are refused rather than ignored, so a caller who tries to scope the check\nto a path learns that it cannot be scoped instead of reading a partial verdict as whole.\n\n```\nuse majordomus_cli::economics::claims::EconomicsCheckInput;\nlet input: EconomicsCheckInput = serde_json::from_str(\"{}\").unwrap();\nassert_eq!(input, EconomicsCheckInput::default());\nlet narrowed = serde_json::from_str::<EconomicsCheckInput>(r#\"{\"path\":\"docs\"}\"#);\nassert!(narrowed.is_err(), \"the check is over the whole repository\");\n```",
"title": "EconomicsCheckInput",
"type": "object"
}output · EconomicsCheckReport
economics.check, the same over the CLI, HTTP and MCP: how much was read
and every refusal. ok is true exactly when findings is empty. scanned counts the
hand-written files read, docs/CLAIMS.yaml included and generated files excluded;
claims_checked counts the methodology's claim bindings, whatever their status.
use majordomus_cli::economics::claims::{check, EconomicsCheckReport};
let dir = tempfile::tempdir().unwrap();
let git = std::process::Command::new("git")
.env_remove("GIT_DIR").env_remove("GIT_WORK_TREE").env_remove("GIT_INDEX_FILE")
.arg("-C").arg(dir.path()).args(["init", "-q"]).status().unwrap();
assert!(git.success());
let report: EconomicsCheckReport = check(dir.path());
assert!(report.ok && report.findings.is_empty(), "an empty repository claims nothing");
let json = serde_json::to_value(&report).unwrap();
assert_eq!(json["claims_checked"], 0);
assert_eq!(serde_json::from_value::<EconomicsCheckReport>(json).unwrap(), report);| property | type | required | description |
|---|---|---|---|
| claims_checked | integer | yes | Bound claims checked. |
| findings | array | yes | Every finding. |
| ok | boolean | yes | No finding. |
| scanned | integer | yes | Files scanned. |
JSON Schema
{
"$defs": {
"EconomicsFinding": {
"description": "One thing the check refuses. `detail` names the remedy, so a finding can be acted on\nwithout reading the methodology. A finding about a claim or a file rather than a line\ncarries no `line`, and its JSON omits the key. The kinds:\n\n- `unsupported_quantity`: a number typed into hand-written prose next to the economics\n vocabulary.\n- `claim_unsupported`: a claim binding that does not hold — the bound claim is missing\n from `docs/CLAIMS.yaml`, or it is `guaranteed` while its metric does not stand where\n the binding says or its evidence is not current.\n- `claim_unbound`: a `guaranteed` claim says tokens, context or cost go down and no\n binding ties it to a metric.\n- `claim_duplicate`: one claim id appears more than once in `docs/CLAIMS.yaml`.\n- `declarations_unreadable`: the benchmark declarations cannot be read, so no binding\n can be shown to hold.\n- `claims_unreadable`: `docs/CLAIMS.yaml` exists and cannot be read or parsed.\n- `scan_failed`: the prose could not be listed or a file in it could not be read, so\n nothing can be said to be clean.\n\n```\nuse majordomus_cli::economics::claims::EconomicsFinding;\nlet finding = EconomicsFinding {\n kind: \"claim_unsupported\".into(),\n path: \"docs/CLAIMS.yaml\".into(),\n line: None,\n detail: \"set the claim to planned, or record the evidence\".into(),\n};\nlet json = serde_json::to_value(&finding).unwrap();\nassert!(json.get(\"line\").is_none(), \"no line, no key\");\nassert_eq!(serde_json::from_value::<EconomicsFinding>(json).unwrap(), finding);\n```",
"properties": {
"detail": {
"description": "What was found, and what to do about it.",
"type": "string"
},
"kind": {
"description": "`unsupported_quantity`, `claim_unsupported`, `claim_unbound`, `claim_duplicate`,\n`declarations_unreadable`, `claims_unreadable` or `scan_failed`.",
"type": "string"
},
"line": {
"description": "1-based line, when the finding is about a line.",
"format": "uint",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"path": {
"description": "Repository-relative path.",
"type": "string"
}
},
"required": [
"kind",
"path",
"detail"
],
"type": "object"
}
},
"description": "The answer of `economics.check`, the same over the CLI, HTTP and MCP: how much was read\nand every refusal. `ok` is true exactly when `findings` is empty. `scanned` counts the\nhand-written files read, `docs/CLAIMS.yaml` included and generated files excluded;\n`claims_checked` counts the methodology's claim bindings, whatever their status.\n\n```\nuse majordomus_cli::economics::claims::{check, EconomicsCheckReport};\nlet dir = tempfile::tempdir().unwrap();\nlet git = std::process::Command::new(\"git\")\n .env_remove(\"GIT_DIR\").env_remove(\"GIT_WORK_TREE\").env_remove(\"GIT_INDEX_FILE\")\n .arg(\"-C\").arg(dir.path()).args([\"init\", \"-q\"]).status().unwrap();\nassert!(git.success());\nlet report: EconomicsCheckReport = check(dir.path());\nassert!(report.ok && report.findings.is_empty(), \"an empty repository claims nothing\");\nlet json = serde_json::to_value(&report).unwrap();\nassert_eq!(json[\"claims_checked\"], 0);\nassert_eq!(serde_json::from_value::<EconomicsCheckReport>(json).unwrap(), report);\n```",
"properties": {
"claims_checked": {
"description": "Bound claims checked.",
"format": "uint",
"minimum": 0,
"type": "integer"
},
"findings": {
"description": "Every finding.",
"items": {
"$ref": "#/$defs/EconomicsFinding"
},
"type": "array"
},
"ok": {
"description": "No finding.",
"type": "boolean"
},
"scanned": {
"description": "Files scanned.",
"format": "uint",
"minimum": 0,
"type": "integer"
}
},
"required": [
"ok",
"scanned",
"claims_checked",
"findings"
],
"title": "EconomicsCheckReport",
"type": "object"
}Policies
- benchmark
- required — a target on every transport the exposure declares; the cases are the input type's
- cache
- disabled — every call runs the handler
Benchmark targets
Derived from the registry for this repository: one requirement per transport, and the cases the input type provides. The whole matrix is on the benchmarks page.