economics.check
Prohledá ručně psanou prózu repozitáře a věty tvrzení na množství (procento, „N-krát méně“) uvedené vedle slovníku ekonomiky a zkontroluje každé tvrzení, které metodika váže na metriku: vázané tvrzení smí být zaručeno jen tehdy, dokud důkazy jeho metriky vazbu splňují a jsou aktuální. `ok: false` jmenuje každé zjištění.
Prohledá ručně psanou prózu repozitáře a věty tvrzení na množství (procento, „N-krát méně“) uvedené vedle slovníku ekonomiky a zkontroluje každé tvrzení, které metodika váže na metriku: vázané tvrzení smí být zaručeno jen tehdy, dokud důkazy jeho metriky vazbu splňují a jsou aktuální. `ok: false` jmenuje každé zjištění.
- query
- behaviorally_verified
- module economics
- #economics
- #claims
- #gate
Zpřístupnění
Kde je tato jedna definice dosažitelná. Absence je explicitní: povrch, který není uveden, ji nenese.
| povrch | jako |
|---|---|
| MCP | nástroj majordomus_economics_check |
| HTTP | GET /api/v1/economics/check operationId economics.check |
| příkazová řádka | majordomus economics check |
Schémata
Kanonický vstup a výstup z typů Rustu; schéma nástroje MCP a parametry a odpovědi OpenAPI se odvozují z nich.
input · EconomicsCheckInput
economics.check: nic k zúžení; kontrola je přes repozitář. Neznámá pole se odmítají místo ignorování, takže volající, který se pokusí omezit kontrolu na cestu, se dozví, že omezit nejde, místo aby četl částečný verdikt jako úplný.
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");Žádné vlastnosti: schopnost nebere žádný vstup.
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, stejná přes CLI, HTTP i MCP: kolik se přečetlo a každé odmítnutí. ok je pravda přesně tehdy, když je findings prázdné. scanned počítá přečtené ručně psané soubory, docs/CLAIMS.yaml zahrnuté a generované soubory vyloučené; claims_checked počítá vazby tvrzení metodiky, ať je jejich stav jakýkoli.
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);| vlastnost | typ | povinné | popis |
|---|---|---|---|
| claims_checked | integer | ano | Vázaná tvrzení zkontrolována. |
| zjištění | array | ano | Každý nález. |
| ok | boolean | ano | Žádný nález. |
| prohledáno | integer | ano | Prohledané soubory. |
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"
}Politiky
- benchmark
- povinné — cíl na každém transportu, který expozice deklaruje; případy jsou ty ze vstupního typu
- cache
- vypnuto — každé volání spustí handler
Cíle benchmarku
Odvozeno z registru pro tento repozitář: jeden požadavek na transport a případy, které poskytuje typ vstupu. Celá matice je na stránce měření výkonu.