Skip to content
Cockpit0.29.0
A snapshot: read at commit 707a04c7ce8 on 2026-10-18T00:06:01Z by majordomus 0.29.0. Nothing on this page is read again. See it live

intents.validate

What the intent model refuses

What it is

Every finding over the intents: an intent naming no milestone or no criterion, a milestone that does not resolve, a criterion with no evidence reference or one that names nothing this repository holds, governance that does not resolve, a successor that is not an intent, a file name that disagrees with its id — each a failure — and a milestone no intent serves, a warning.

Descriptor

Canonical id
intents.validate
Module
intents
Kind
query
Stability
behaviorallyverified
Provenance
declared
Source
apps/majordomus-cli/src/capability/builtin/intents.rs
Cache
disabled
Benchmark
required
Tags
intentprojectvalidation

Run

query
A query. It reads and changes nothing.

This capability takes no input.

GET /api/v1/intents/validate

Projections

InterfaceAsWhere
MCP toolmajordomus_intent_validate-
MCP resourcenot exposed-
HTTPGET /api/v1/intents/validateSwagger
Command linemajordomus intent validate-

Schemas

Input · Empty
{
  "type": "object",
  "additionalProperties": false,
  "description": "No input.",
  "title": "Empty"
}
Output · IntentValidation
{
  "type": "object",
  "properties": {
    "valid": {
      "type": "boolean",
      "description": "True when no finding is a failure. Warnings do not make it false."
    },
    "intents": {
      "type": "integer",
      "format": "uint",
      "minimum": 0,
      "description": "How many intents were examined."
    },
    "failures": {
      "type": "integer",
      "format": "uint",
      "minimum": 0,
      "description": "How many findings are failures."
    },
    "warnings": {
      "type": "integer",
      "format": "uint",
      "minimum": 0,
      "description": "How many findings are warnings."
    },
    "findings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/IntentFinding"
      },
      "description": "Every finding."
    }
  },
  "required": [
    "valid",
    "intents",
    "failures",
    "warnings",
    "findings"
  ],
  "description": "What the intent model refuses: whether it is valid, how many intents were examined, and\nevery finding with its level. Warnings are reported and do not make it invalid.\n\n```\nuse majordomus_cli::capability::builtin::intents::IntentValidation;\nlet v = IntentValidation {\n    valid: true,\n    intents: 2,\n    failures: 0,\n    warnings: 20,\n    findings: vec![],\n};\n// twenty warnings and no failure is a valid model\nassert!(v.valid);\n```",
  "title": "IntentValidation",
  "$defs": {
    "IntentFinding": {
      "type": "object",
      "properties": {
        "level": {
          "type": "string",
          "description": "`FAIL` or `WARN`. A failure means the intent model is invalid."
        },
        "code": {
          "type": "string",
          "description": "The stable code a reader greps for."
        },
        "subject": {
          "type": "string",
          "description": "The intent or milestone the finding is about."
        },
        "message": {
          "type": "string",
          "description": "What is wrong, in one line."
        },
        "reproduce": {
          "type": "string",
          "description": "The command that shows it again."
        }
      },
      "required": [
        "level",
        "code",
        "subject",
        "message",
        "reproduce"
      ],
      "description": "One validation finding: its level, a stable code a reader greps for, the intent or milestone\nit is about, one line of what is wrong, and the command that shows it again.\n\n```\nuse majordomus_cli::intent::{IntentFinding, FAIL};\nlet f = IntentFinding {\n    level: FAIL.into(),\n    code: \"unknown_milestone\".into(),\n    subject: \"intent-lifecycle\".into(),\n    message: \"`no-such` is not a milestone\".into(),\n    reproduce: \"majordomus intent validate\".into(),\n};\nassert_eq!(f.level, \"FAIL\");\nassert_eq!(f.reproduce, \"majordomus intent validate\");\n```"
    }
  }
}

Examples

These are the capability's own benchmark cases: the same inputs the benchmark runs and the OpenAPI document shows.

default
{}