Skip to content

reasoning.status

The reasoning state of the open task (or of a named one, or of all): assessments and where each stands, consultations and how each ended, disagreements and what settled them, conclusions with their computed review and validation, the timeline, token totals the adapters reported, and the Markdown report a handover carries. Derived from the records alone, deterministically.

The reasoning state of the open task (or of a named one, or of all): assessments and where each stands, consultations and how each ended, disagreements and what settled them, conclusions with their computed review and validation, the timeline, token totals the adapters reported, and the Markdown report a handover carries. Derived from the records alone, deterministically.

Exposure

Where this one definition is reachable. Absence is explicit: a surface not listed does not carry it.

surfaceas
MCPtool majordomus_reasoning
resource majordomus://reasoning
HTTPGET /api/v1/reasoning operationId reasoning.status
command linemajordomus reasoning status

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 · ReasoningStatusInput

The input of reasoning.status: which task's records to derive the state from. Absent is the open task; all is every task the store holds.

use majordomus_cli::capability::builtin::reasoning::ReasoningStatusInput;

let open: ReasoningStatusInput = serde_json::from_str("{}").unwrap();
assert!(open.task.is_none());
let all: ReasoningStatusInput = serde_json::from_str(r#"{"task":"all"}"#).unwrap();
assert_eq!(all.task.as_deref(), Some("all"));
propertytyperequireddescription
task string | null no A task id, or all; the open task when absent.
JSON Schema
{
  "additionalProperties": false,
  "description": "The input of `reasoning.status`: which task's records to derive the state from. Absent\nis the open task; `all` is every task the store holds.\n\n```\nuse majordomus_cli::capability::builtin::reasoning::ReasoningStatusInput;\n\nlet open: ReasoningStatusInput = serde_json::from_str(\"{}\").unwrap();\nassert!(open.task.is_none());\nlet all: ReasoningStatusInput = serde_json::from_str(r#\"{\"task\":\"all\"}\"#).unwrap();\nassert_eq!(all.task.as_deref(), Some(\"all\"));\n```",
  "properties": {
    "task": {
      "description": "A task id, or `all`; the open task when absent.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "title": "ReasoningStatusInput",
  "type": "object"
}

output · ReasoningStatus

The answer of reasoning.status: the mode in force, the advisor counts, the state the records derive, and that state rendered as the Markdown a handover carries.

use majordomus_cli::capability::builtin::reasoning::ReasoningStatus;

let schema = serde_json::to_value(schemars::schema_for!(ReasoningStatus)).unwrap();
for field in ["mode", "advisors_available", "advisors_unavailable", "state", "report"] {
    assert!(schema["required"].as_array().unwrap().iter().any(|f| f == field), "{field}");
}
propertytyperequireddescription
advisors_available integer yes Advisors available now.
advisors_unavailable integer yes Advisors not available now, each optional.
mode reference yes The mode in force.
report string yes The state as Markdown: what a handover carries.
state reference yes The state.
JSON Schema
{
  "$defs": {
    "AssessmentStanding": {
      "description": "Where an assessment stands, from open through validated.\n\nThe standing is derived, never stored: an unresolved disagreement makes it disputed\nwhatever else is recorded; otherwise its standing conclusion and that conclusion's\nvalidations decide it, and without a conclusion a recorded plan makes it planned.\n\n```\n# use majordomus_cli::reasoning::record::ReasoningRecord;\n# use serde_json::json;\n# fn rec(id: &str, n: u32, body: serde_json::Value) -> ReasoningRecord {\n#     serde_json::from_value(json!({\n#         \"schema\": \"majordomus/reasoning-record\", \"version\": 1, \"id\": id, \"task\": \"t\",\n#         \"recorded_at\": format!(\"2026-10-01T00:00:{n:02}Z\"), \"body\": body,\n#     }))\n#     .unwrap()\n# }\nuse majordomus_cli::reasoning::state::{derive, AssessmentStanding};\nuse majordomus_cli::reasoning::store::Loaded;\n\nlet mut loaded = Loaded::default();\nloaded.records.push(rec(\"assessment-1\", 1, json!({ \"kind\": \"assessment\", \"subject\": \"s\" })));\nassert_eq!(derive(&loaded, None).assessments[0].standing, AssessmentStanding::Open);\n\nloaded.records.push(rec(\"disagreement-2\", 2, json!({\n    \"kind\": \"disagreement\", \"assessment\": \"assessment-1\",\n    \"positions\": [\n        { \"source\": \"primary\", \"position\": \"A\" },\n        { \"source\": \"consultation-9\", \"position\": \"B\" },\n    ],\n    \"discriminating_question\": \"do callers retry?\",\n})));\nassert_eq!(derive(&loaded, None).assessments[0].standing, AssessmentStanding::Disputed);\n```",
      "oneOf": [
        {
          "const": "open",
          "description": "Stated; no plan yet.",
          "type": "string"
        },
        {
          "const": "planned",
          "description": "Planned; no conclusion yet.",
          "type": "string"
        },
        {
          "const": "disputed",
          "description": "A disagreement on it is unsettled.",
          "type": "string"
        },
        {
          "const": "concluded",
          "description": "Concluded; not yet validated.",
          "type": "string"
        },
        {
          "const": "validated",
          "description": "Concluded, and every validation recorded passed.",
          "type": "string"
        },
        {
          "const": "validation_failed",
          "description": "Concluded, and a validation failed.",
          "type": "string"
        }
      ]
    },
    "AssessmentView": {
      "description": "One assessment and where it stands.\n\nThe view carries what a reader needs to pick the work up: the subject, its\nmateriality, its derived standing, the conclusion that stands for it and the\nquestions it left open.\n\n```\n# use majordomus_cli::reasoning::record::ReasoningRecord;\n# use serde_json::json;\n# fn rec(id: &str, n: u32, body: serde_json::Value) -> ReasoningRecord {\n#     serde_json::from_value(json!({\n#         \"schema\": \"majordomus/reasoning-record\", \"version\": 1, \"id\": id, \"task\": \"t\",\n#         \"recorded_at\": format!(\"2026-10-01T00:00:{n:02}Z\"), \"body\": body,\n#     }))\n#     .unwrap()\n# }\nuse majordomus_cli::reasoning::policy::Materiality;\nuse majordomus_cli::reasoning::state::{derive, AssessmentView};\nuse majordomus_cli::reasoning::store::Loaded;\n\nlet mut loaded = Loaded::default();\nloaded.records.push(rec(\"assessment-1\", 1, json!({\n    \"kind\": \"assessment\", \"subject\": \"lock scope\", \"materiality\": \"trivial\",\n    \"questions\": [\"is it held across an await?\"],\n})));\nlet state = derive(&loaded, None);\nlet view: &AssessmentView = &state.assessments[0];\nassert_eq!((view.id.as_str(), view.task.as_str()), (\"assessment-1\", \"t\"));\nassert_eq!(view.materiality, Materiality::Trivial);\nassert_eq!(view.conclusion, None);\nassert_eq!(view.questions, [\"is it held across an await?\"]);\n```",
      "properties": {
        "conclusion": {
          "description": "Its standing conclusion.",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "Record id.",
          "type": "string"
        },
        "materiality": {
          "$ref": "#/$defs/Materiality",
          "description": "How much it matters."
        },
        "questions": {
          "description": "Questions it left open.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "standing": {
          "$ref": "#/$defs/AssessmentStanding",
          "description": "Where it stands."
        },
        "subject": {
          "description": "What is uncertain.",
          "type": "string"
        },
        "task": {
          "description": "The task it was recorded under.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "task",
        "subject",
        "materiality",
        "standing"
      ],
      "type": "object"
    },
    "ConclusionView": {
      "description": "One conclusion, as the state reports it.\n\nBesides the decision and its computed review, the view counts the validations\nrecorded against the conclusion and names the later conclusion that superseded it,\nif any. A superseded conclusion stays in the list; the report leaves it out.\n\n```\n# use majordomus_cli::reasoning::record::ReasoningRecord;\n# use serde_json::json;\n# fn rec(id: &str, n: u32, body: serde_json::Value) -> ReasoningRecord {\n#     serde_json::from_value(json!({\n#         \"schema\": \"majordomus/reasoning-record\", \"version\": 1, \"id\": id, \"task\": \"t\",\n#         \"recorded_at\": format!(\"2026-10-01T00:00:{n:02}Z\"), \"body\": body,\n#     }))\n#     .unwrap()\n# }\nuse majordomus_cli::reasoning::state::{derive, ConclusionView};\nuse majordomus_cli::reasoning::store::Loaded;\n\nlet conclusion = |decision: &str, supersedes: Option<&str>| {\n    json!({\n        \"kind\": \"conclusion\", \"assessment\": \"assessment-0\", \"decision\": decision,\n        \"rationale\": \"r\", \"supersedes\": supersedes,\n        \"reviewed_by\": [], \"independent_review_count\": 0,\n    })\n};\nlet mut loaded = Loaded::default();\nloaded.records.push(rec(\"conclusion-1\", 1, conclusion(\"A\", None)));\nloaded.records.push(rec(\"validation-2\", 2, json!({\n    \"kind\": \"validation\", \"conclusion\": \"conclusion-1\", \"check\": \"x\", \"outcome\": \"fail\",\n})));\nloaded.records.push(rec(\"conclusion-3\", 3, conclusion(\"B\", Some(\"conclusion-1\"))));\n\nlet state = derive(&loaded, None);\nlet first: &ConclusionView = &state.conclusions[0];\nassert_eq!((first.validations_passed, first.validations_failed), (0, 1));\nassert_eq!(first.superseded_by.as_deref(), Some(\"conclusion-3\"));\nassert_eq!(state.conclusions[1].superseded_by, None);\n```",
      "properties": {
        "assessment": {
          "description": "The assessment it concludes.",
          "type": "string"
        },
        "decision": {
          "description": "The decision.",
          "type": "string"
        },
        "id": {
          "description": "Record id.",
          "type": "string"
        },
        "independent_review_count": {
          "description": "How many.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "reviewed_by": {
          "description": "Advisors whose answers it weighed.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "risks": {
          "description": "Risks that remain.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "superseded_by": {
          "description": "Superseded by a later conclusion.",
          "type": [
            "string",
            "null"
          ]
        },
        "validation_plan": {
          "description": "Its validation plan.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "validations_failed": {
          "description": "Validations failed.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "validations_passed": {
          "description": "Validations recorded: passed, failed.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "id",
        "assessment",
        "decision",
        "reviewed_by",
        "independent_review_count",
        "validations_passed",
        "validations_failed",
        "validation_plan"
      ],
      "type": "object"
    },
    "ConsultationStatus": {
      "description": "How a consultation ended, as the adapter classified it.\n\nOnly a completed consultation carries advice and counts as review; every other status\nis a degradation that is recorded so the state can report it, never hidden. The wire\nform is the snake_case word that `ConsultationStatus::as_str` returns.\n\n```\nuse majordomus_cli::reasoning::record::ConsultationStatus;\n\nlet s: ConsultationStatus = serde_json::from_str(\"\\\"rate_limited\\\"\").unwrap();\nassert_eq!(s, ConsultationStatus::RateLimited);\nassert!(!s.is_transient());\nassert!(ConsultationStatus::Timeout.is_transient());\n```",
      "oneOf": [
        {
          "const": "completed",
          "description": "An answer was received and normalised.",
          "type": "string"
        },
        {
          "const": "timeout",
          "description": "No answer within the time allowed.",
          "type": "string"
        },
        {
          "const": "rate_limited",
          "description": "The advisor refused for rate.",
          "type": "string"
        },
        {
          "const": "auth_failed",
          "description": "The credential was refused.",
          "type": "string"
        },
        {
          "const": "malformed",
          "description": "An answer arrived that could not be normalised.",
          "type": "string"
        },
        {
          "const": "empty",
          "description": "An answer arrived with nothing in it.",
          "type": "string"
        },
        {
          "const": "unavailable",
          "description": "The advisor could not be reached: not running, not answering, gone.",
          "type": "string"
        },
        {
          "const": "cancelled",
          "description": "The session withdrew the request.",
          "type": "string"
        },
        {
          "const": "error",
          "description": "Anything else the adapter could not classify.",
          "type": "string"
        }
      ]
    },
    "ConsultationView": {
      "description": "One consultation, as the state reports it.\n\nA failed consultation is reported as plainly as a completed one: its status and the\nadapter's diagnostic stand where the advice would, so degradation is visible rather\nthan silently absent.\n\n```\n# use majordomus_cli::reasoning::record::ReasoningRecord;\n# use serde_json::json;\n# fn rec(id: &str, n: u32, body: serde_json::Value) -> ReasoningRecord {\n#     serde_json::from_value(json!({\n#         \"schema\": \"majordomus/reasoning-record\", \"version\": 1, \"id\": id, \"task\": \"t\",\n#         \"recorded_at\": format!(\"2026-10-01T00:00:{n:02}Z\"), \"body\": body,\n#     }))\n#     .unwrap()\n# }\nuse majordomus_cli::reasoning::record::ConsultationStatus;\nuse majordomus_cli::reasoning::state::{derive, ConsultationView};\nuse majordomus_cli::reasoning::store::Loaded;\n\nlet mut loaded = Loaded::default();\nloaded.records.push(rec(\"consultation-1\", 1, json!({\n    \"kind\": \"consultation\", \"plan\": \"plan-0\", \"advisor\": \"alpha\",\n    \"status\": \"timeout\", \"diagnostic\": \"timeout: no answer in 60s\",\n})));\nlet state = derive(&loaded, None);\nlet view: &ConsultationView = &state.consultations[0];\nassert_eq!(view.status, ConsultationStatus::Timeout);\nassert_eq!(view.conclusion, None);\nassert_eq!(view.diagnostic.as_deref(), Some(\"timeout: no answer in 60s\"));\nassert_eq!(state.totals.consultations_failed, 1);\n```",
      "properties": {
        "advisor": {
          "description": "The advisor.",
          "type": "string"
        },
        "conclusion": {
          "description": "The advice, summarised.",
          "type": [
            "string",
            "null"
          ]
        },
        "diagnostic": {
          "description": "The adapter's diagnostic, for a failure.",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "Record id.",
          "type": "string"
        },
        "plan": {
          "description": "The plan that selected it.",
          "type": "string"
        },
        "stance": {
          "anyOf": [
            {
              "$ref": "#/$defs/Stance"
            },
            {
              "type": "null"
            }
          ],
          "description": "Where the advice stands."
        },
        "status": {
          "$ref": "#/$defs/ConsultationStatus",
          "description": "How it ended."
        }
      },
      "required": [
        "id",
        "plan",
        "advisor",
        "status"
      ],
      "type": "object"
    },
    "DisagreementView": {
      "description": "One disagreement, as the state reports it.\n\nThe view names the question that decides the disagreement and, once a resolution is\nrecorded, the resolution and the position its evidence favoured. A view without a\nresolution is an unsettled disagreement that blocks its assessment.\n\n```\n# use majordomus_cli::reasoning::record::ReasoningRecord;\n# use serde_json::json;\n# fn rec(id: &str, n: u32, body: serde_json::Value) -> ReasoningRecord {\n#     serde_json::from_value(json!({\n#         \"schema\": \"majordomus/reasoning-record\", \"version\": 1, \"id\": id, \"task\": \"t\",\n#         \"recorded_at\": format!(\"2026-10-01T00:00:{n:02}Z\"), \"body\": body,\n#     }))\n#     .unwrap()\n# }\nuse majordomus_cli::reasoning::state::{derive, DisagreementView};\nuse majordomus_cli::reasoning::store::Loaded;\n\nlet mut loaded = Loaded::default();\nloaded.records.push(rec(\"disagreement-1\", 1, json!({\n    \"kind\": \"disagreement\", \"assessment\": \"assessment-0\",\n    \"positions\": [\n        { \"source\": \"primary\", \"position\": \"A\" },\n        { \"source\": \"consultation-9\", \"position\": \"B\" },\n    ],\n    \"discriminating_question\": \"do callers retry?\",\n})));\nloaded.records.push(rec(\"resolution-2\", 2, json!({\n    \"kind\": \"resolution\", \"disagreement\": \"disagreement-1\",\n    \"experiment\": \"read the callers\", \"outcome\": \"none retries\",\n    \"favours\": \"consultation-9\",\n    \"evidence\": [{ \"kind\": \"file\", \"reference\": \"src/caller.rs\" }],\n})));\nlet state = derive(&loaded, None);\nlet view: &DisagreementView = &state.disagreements[0];\nassert_eq!(view.discriminating_question, \"do callers retry?\");\nassert_eq!(view.resolution.as_deref(), Some(\"resolution-2\"));\nassert_eq!(view.favours.as_deref(), Some(\"consultation-9\"));\n```",
      "properties": {
        "assessment": {
          "description": "The assessment.",
          "type": "string"
        },
        "discriminating_question": {
          "description": "The question that decides it.",
          "type": "string"
        },
        "favours": {
          "description": "The position the evidence favoured.",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "Record id.",
          "type": "string"
        },
        "resolution": {
          "description": "The resolution, when settled.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "assessment",
        "discriminating_question"
      ],
      "type": "object"
    },
    "Materiality": {
      "description": "How much the uncertain decision could matter. Ordered from `trivial` to `critical`:\nwith the mode it sets the review budget, and from `material` up a decision taken alone\ncarries the structured local review.\n\n```\nuse majordomus_cli::reasoning::policy::Materiality;\n\nassert_eq!(Materiality::default(), Materiality::Low);\nassert!(Materiality::Material < Materiality::Critical);\nlet m: Materiality = serde_json::from_str(\"\\\"high\\\"\").unwrap();\nassert_eq!(m, Materiality::High);\n```",
      "oneOf": [
        {
          "const": "trivial",
          "description": "A name, a format, an obvious convention: never reviewed.",
          "type": "string"
        },
        {
          "const": "low",
          "description": "Local and reversible.",
          "type": "string"
        },
        {
          "const": "material",
          "description": "Could affect correctness, an interface, persistent data, concurrency, operations.",
          "type": "string"
        },
        {
          "const": "high",
          "description": "Architecture, security, compatibility or a public contract.",
          "type": "string"
        },
        {
          "const": "critical",
          "description": "Irreversible or destructive, or repository governance itself.",
          "type": "string"
        }
      ]
    },
    "ModeResolution": {
      "description": "The mode in force and what decided it, as `resolve_mode` returns it. A plan and a\nreport carry the source beside the mode, so a reader learns why the mode is what it is.\n\n```\nuse majordomus_cli::reasoning::availability::{resolve_mode, ModeResolution, ReasoningMode};\n\nlet r: ModeResolution = resolve_mode(None, true, None);\nassert_eq!(r, ModeResolution { mode: ReasoningMode::Ci, source: \"CI\".into() });\n```",
      "properties": {
        "mode": {
          "$ref": "#/$defs/ReasoningMode",
          "description": "The mode."
        },
        "source": {
          "description": "What decided it: `MAJORDOMUS_REASONING_MODE`, `CI`, `profile <name>`, or `default`.",
          "type": "string"
        }
      },
      "required": [
        "mode",
        "source"
      ],
      "type": "object"
    },
    "ReasoningMode": {
      "description": "How much independent review a session may use, and where from. The policy reads it\nfor the review budget; availability reads it to leave advisors out (`ci` all of them,\n`offline` every one that leaves the machine). `standard` is the default.\n\n```\nuse majordomus_cli::reasoning::availability::ReasoningMode;\n\nassert_eq!(ReasoningMode::default(), ReasoningMode::Standard);\nassert_eq!(serde_json::to_value(ReasoningMode::Offline).unwrap(), \"offline\");\nlet m: ReasoningMode = serde_json::from_str(\"\\\"strict\\\"\").unwrap();\nassert_eq!(m, ReasoningMode::Strict);\n```",
      "oneOf": [
        {
          "const": "offline",
          "description": "No network: only advisors that stay on this machine.",
          "type": "string"
        },
        {
          "const": "ci",
          "description": "Deterministic: no advisor at all, whatever is installed.",
          "type": "string"
        },
        {
          "const": "fast",
          "description": "Review only where the blast radius is high.",
          "type": "string"
        },
        {
          "const": "standard",
          "description": "Review where uncertainty is material.",
          "type": "string"
        },
        {
          "const": "strict",
          "description": "Review wider, and complementary review where the stakes are highest.",
          "type": "string"
        }
      ]
    },
    "ReasoningPhase": {
      "description": "A phase of the reasoning timeline.\n\nEach record maps to one phase: a plan to consulting, local or reuse by its outcome, a\nconsultation to an advisor response or a degradation by its status, and every other\nkind to the phase of the same name.\n\n```\n# use majordomus_cli::reasoning::record::ReasoningRecord;\n# use serde_json::json;\n# fn rec(id: &str, n: u32, body: serde_json::Value) -> ReasoningRecord {\n#     serde_json::from_value(json!({\n#         \"schema\": \"majordomus/reasoning-record\", \"version\": 1, \"id\": id, \"task\": \"t\",\n#         \"recorded_at\": format!(\"2026-10-01T00:00:{n:02}Z\"), \"body\": body,\n#     }))\n#     .unwrap()\n# }\nuse majordomus_cli::reasoning::state::{derive, ReasoningPhase};\nuse majordomus_cli::reasoning::store::Loaded;\n\nlet mut loaded = Loaded::default();\nloaded.records.push(rec(\"consultation-1\", 1, json!({\n    \"kind\": \"consultation\", \"plan\": \"plan-0\", \"advisor\": \"alpha\", \"status\": \"unavailable\",\n})));\nlet phases: Vec<ReasoningPhase> =\n    derive(&loaded, None).timeline.iter().map(|s| s.phase).collect();\nassert_eq!(phases, [ReasoningPhase::Degradation]);\nlet word = serde_json::to_value(ReasoningPhase::AdvisorResponse).unwrap();\nassert_eq!(word, \"advisor_response\");\n```",
      "oneOf": [
        {
          "const": "uncertainty",
          "description": "Uncertainty stated with evidence.",
          "type": "string"
        },
        {
          "const": "consulting",
          "description": "Review planned.",
          "type": "string"
        },
        {
          "const": "local",
          "description": "Decided locally, by plan.",
          "type": "string"
        },
        {
          "const": "reuse",
          "description": "A standing conclusion reused.",
          "type": "string"
        },
        {
          "const": "advisor_response",
          "description": "An advisor answered.",
          "type": "string"
        },
        {
          "const": "degradation",
          "description": "An advisor could not answer.",
          "type": "string"
        },
        {
          "const": "disagreement",
          "description": "Positions diverged.",
          "type": "string"
        },
        {
          "const": "experiment",
          "description": "An experiment settled a disagreement.",
          "type": "string"
        },
        {
          "const": "conclusion",
          "description": "A conclusion.",
          "type": "string"
        },
        {
          "const": "validation",
          "description": "A validation step.",
          "type": "string"
        },
        {
          "const": "attempt",
          "description": "A failed attempt.",
          "type": "string"
        }
      ]
    },
    "ReasoningState": {
      "description": "The reasoning state of a task (or of every task).\n\nIt is what every surface reports: the assessments, consultations, disagreements and\nconclusions of the task, the timeline of every record, the totals, and the store\nfiles that could not be read. Derived by `derive()`, never stored.\n\n```\n# use majordomus_cli::reasoning::record::ReasoningRecord;\n# use serde_json::json;\n# fn rec(id: &str, task: &str, body: serde_json::Value) -> ReasoningRecord {\n#     serde_json::from_value(json!({\n#         \"schema\": \"majordomus/reasoning-record\", \"version\": 1, \"id\": id, \"task\": task,\n#         \"recorded_at\": \"2026-10-01T00:00:00Z\", \"body\": body,\n#     }))\n#     .unwrap()\n# }\nuse majordomus_cli::reasoning::state::{derive, ReasoningState};\nuse majordomus_cli::reasoning::store::Loaded;\n\nlet mut loaded = Loaded::default();\nlet assessment = |subject: &str| json!({ \"kind\": \"assessment\", \"subject\": subject });\nloaded.records.push(rec(\"assessment-1\", \"t1\", assessment(\"a\")));\nloaded.records.push(rec(\"assessment-2\", \"t2\", assessment(\"b\")));\nloaded.unreadable.push(\"t2/broken.json\".into());\n\nlet one: ReasoningState = derive(&loaded, Some(\"t1\"));\nassert_eq!((one.task.as_str(), one.assessments.len()), (\"t1\", 1));\nlet all = derive(&loaded, None);\nassert_eq!((all.task.as_str(), all.totals.records), (\"all\", 2));\nassert_eq!(all.unreadable, [\"t2/broken.json\"]);\n```",
      "properties": {
        "assessments": {
          "description": "The assessments.",
          "items": {
            "$ref": "#/$defs/AssessmentView"
          },
          "type": "array"
        },
        "conclusions": {
          "description": "The conclusions.",
          "items": {
            "$ref": "#/$defs/ConclusionView"
          },
          "type": "array"
        },
        "consultations": {
          "description": "The consultations.",
          "items": {
            "$ref": "#/$defs/ConsultationView"
          },
          "type": "array"
        },
        "disagreements": {
          "description": "The disagreements.",
          "items": {
            "$ref": "#/$defs/DisagreementView"
          },
          "type": "array"
        },
        "task": {
          "description": "The task reported, or `all`.",
          "type": "string"
        },
        "timeline": {
          "description": "The timeline.",
          "items": {
            "$ref": "#/$defs/ReasoningStep"
          },
          "type": "array"
        },
        "totals": {
          "$ref": "#/$defs/ReasoningTotals",
          "description": "Totals."
        },
        "unreadable": {
          "description": "Store files that could not be read.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "task",
        "assessments",
        "consultations",
        "disagreements",
        "conclusions",
        "timeline",
        "totals"
      ],
      "type": "object"
    },
    "ReasoningStep": {
      "description": "One step of the timeline: when, which record, which phase, and one line saying what\nhappened.\n\nThe summary is cut to a single line of at most 140 characters, so a timeline renders\nthe same on a terminal, a page and a handover.\n\n```\n# use majordomus_cli::reasoning::record::ReasoningRecord;\n# use serde_json::json;\n# fn rec(id: &str, n: u32, body: serde_json::Value) -> ReasoningRecord {\n#     serde_json::from_value(json!({\n#         \"schema\": \"majordomus/reasoning-record\", \"version\": 1, \"id\": id, \"task\": \"t\",\n#         \"recorded_at\": format!(\"2026-10-01T00:00:{n:02}Z\"), \"body\": body,\n#     }))\n#     .unwrap()\n# }\nuse majordomus_cli::reasoning::state::{derive, ReasoningPhase, ReasoningStep};\nuse majordomus_cli::reasoning::store::Loaded;\n\nlet mut loaded = Loaded::default();\nloaded.records.push(rec(\"attempt-1\", 1, json!({\n    \"kind\": \"attempt\", \"attempt\": \"share the client\\nacross threads\",\n    \"observed_failure\": \"the handle is not Sync\",\n})));\nlet state = derive(&loaded, None);\nlet step: &ReasoningStep = &state.timeline[0];\nassert_eq!(step.at, \"2026-10-01T00:00:01Z\");\nassert_eq!(step.phase, ReasoningPhase::Attempt);\nassert_eq!(step.summary, \"share the client failed: the handle is not Sync\");\n```",
      "properties": {
        "at": {
          "description": "When.",
          "type": "string"
        },
        "id": {
          "description": "The record.",
          "type": "string"
        },
        "phase": {
          "$ref": "#/$defs/ReasoningPhase",
          "description": "The phase."
        },
        "summary": {
          "description": "One line.",
          "type": "string"
        }
      },
      "required": [
        "at",
        "id",
        "phase",
        "summary"
      ],
      "type": "object"
    },
    "ReasoningTotals": {
      "description": "Totals over the records of the derived task: counts, reviewers and reported tokens.\n\nIndependent reviewers are distinct advisors with at least one completed consultation;\ntoken counts are summed only from what adapters reported, never estimated.\n\n```\n# use majordomus_cli::reasoning::record::ReasoningRecord;\n# use serde_json::json;\n# fn rec(id: &str, n: u32, body: serde_json::Value) -> ReasoningRecord {\n#     serde_json::from_value(json!({\n#         \"schema\": \"majordomus/reasoning-record\", \"version\": 1, \"id\": id, \"task\": \"t\",\n#         \"recorded_at\": format!(\"2026-10-01T00:00:{n:02}Z\"), \"body\": body,\n#     }))\n#     .unwrap()\n# }\nuse majordomus_cli::reasoning::state::{derive, ReasoningTotals};\nuse majordomus_cli::reasoning::store::Loaded;\n\nlet answer = |plan: &str| {\n    json!({\n        \"kind\": \"consultation\", \"plan\": plan, \"advisor\": \"alpha\", \"status\": \"completed\",\n        \"conclusion\": \"A\", \"stance\": \"supports\",\n        \"usage\": { \"input_tokens\": 100, \"output_tokens\": 20 },\n    })\n};\nlet mut loaded = Loaded::default();\nloaded.records.push(rec(\"consultation-1\", 1, answer(\"plan-a\")));\nloaded.records.push(rec(\"consultation-2\", 2, answer(\"plan-b\")));\nlet totals: ReasoningTotals = derive(&loaded, None).totals;\nassert_eq!(totals.consultations_completed, 2);\nassert_eq!(totals.independent_reviewers, 1, \"one advisor, however often asked\");\nassert_eq!((totals.input_tokens, totals.output_tokens), (200, 40));\n```",
      "properties": {
        "consultations_completed": {
          "description": "Consultations that completed.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "consultations_failed": {
          "description": "Consultations that did not.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "independent_reviewers": {
          "description": "Distinct advisors that answered.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "input_tokens": {
          "description": "Input tokens the adapters reported.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "output_tokens": {
          "description": "Output tokens the adapters reported.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "records": {
          "description": "Records.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "records",
        "consultations_completed",
        "consultations_failed",
        "independent_reviewers",
        "input_tokens",
        "output_tokens"
      ],
      "type": "object"
    },
    "Stance": {
      "description": "Where an advisor's answer stands relative to the executor's hypothesis.\n\nA completed consultation must state its stance; the store refuses one without it. The\nstance is a label for the timeline, not a vote: agreement settles nothing.\n\n```\nuse majordomus_cli::reasoning::record::Stance;\n\nlet s: Stance = serde_json::from_str(\"\\\"alternative\\\"\").unwrap();\nassert_eq!(s, Stance::Alternative);\nassert!(serde_json::from_str::<Stance>(\"\\\"agrees\\\"\").is_err());\n```",
      "oneOf": [
        {
          "const": "supports",
          "description": "It supports the hypothesis.",
          "type": "string"
        },
        {
          "const": "opposes",
          "description": "It argues against it.",
          "type": "string"
        },
        {
          "const": "alternative",
          "description": "It proposes something else.",
          "type": "string"
        },
        {
          "const": "inconclusive",
          "description": "It does not decide.",
          "type": "string"
        }
      ]
    }
  },
  "description": "The answer of `reasoning.status`: the mode in force, the advisor counts, the state the\nrecords derive, and that state rendered as the Markdown a handover carries.\n\n```\nuse majordomus_cli::capability::builtin::reasoning::ReasoningStatus;\n\nlet schema = serde_json::to_value(schemars::schema_for!(ReasoningStatus)).unwrap();\nfor field in [\"mode\", \"advisors_available\", \"advisors_unavailable\", \"state\", \"report\"] {\n    assert!(schema[\"required\"].as_array().unwrap().iter().any(|f| f == field), \"{field}\");\n}\n```",
  "properties": {
    "advisors_available": {
      "description": "Advisors available now.",
      "format": "uint",
      "minimum": 0,
      "type": "integer"
    },
    "advisors_unavailable": {
      "description": "Advisors not available now, each optional.",
      "format": "uint",
      "minimum": 0,
      "type": "integer"
    },
    "mode": {
      "$ref": "#/$defs/ModeResolution",
      "description": "The mode in force."
    },
    "report": {
      "description": "The state as Markdown: what a handover carries.",
      "type": "string"
    },
    "state": {
      "$ref": "#/$defs/ReasoningState",
      "description": "The state."
    }
  },
  "required": [
    "mode",
    "advisors_available",
    "advisors_unavailable",
    "state",
    "report"
  ],
  "title": "ReasoningStatus",
  "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.

transportstatecasestargets
directcovered2current
all
mcpcovered2current
all
httpcovered2current
all

Searches the titles and descriptions of every page this site publishes.