Skip to content

shell.check

Every shell unit under bin/, lib/, scripts/, share/, .githooks/ and .claude/hooks/ — by interpreter line or by a .sh name, as git would commit it, links not followed — against .ai/repo/automation/inventory.jsonl: an undeclared unit, a record whose unit is gone, an exemption missing its reason or its removal condition, a disposition outside A-F, a duplicate and a record out of canonical order are each a finding that names the file and the remedy. Reads the tree and git's index only; no build and no network.

Every shell unit under bin/, lib/, scripts/, share/, .githooks/ and .claude/hooks/ — by interpreter line or by a .sh name, as git would commit it, links not followed — against .ai/repo/automation/inventory.jsonl: an undeclared unit, a record whose unit is gone, an exemption missing its reason or its removal condition, a disposition outside A-F, a duplicate and a record out of canonical order are each a finding that names the file and the remedy. Reads the tree and git's index only; no build and no network.

  • query
  • behaviorally_verified
  • module shell
  • #shell
  • #governance
  • #migration

Exposure

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

surfaceas
MCPtool majordomus_shell_check
HTTPGET /api/v1/shell/check operationId shell.check
command linemajordomus shell 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 · Empty

No input.

No properties: the capability takes no input.

JSON Schema
{
  "additionalProperties": false,
  "description": "No input.",
  "title": "Empty",
  "type": "object"
}

output · ShellReport

The verdict of one check of the tree.
propertytyperequireddescription
exemptions object yes How many exemptions the inventory declares, by disposition.
findings array yes Every finding, in canonical order. Empty is the passing answer.
governed array yes The directories whose shell units must be declared.
inventory string yes The inventory read, relative to the repository root.
measured boolean yes Whether the tree could be measured at all. false is not a pass: the reason says what stopped the measurement, and a caller that gates on this report must refuse.
passes boolean yes true when the tree was measured and nothing was found.
reason string | null no Why the tree could not be measured, when it could not.
records integer yes How many records the inventory holds, shell or not.
units array yes Every shell unit under the governed directories, in canonical order.
JSON Schema
{
  "$defs": {
    "ShellFinding": {
      "description": "One thing the check refuses, with what to do about it.",
      "properties": {
        "code": {
          "description": "The finding's code: `shell.undeclared`, `shell.stale`, `shell.missing_field`,\n`shell.invalid_disposition`, `shell.invalid_unit`, `shell.exemption_not_shell`,\n`shell.duplicate`, `shell.out_of_order` or `shell.malformed`.",
          "type": "string"
        },
        "line": {
          "description": "The line of the inventory the finding is about, when it is about one.",
          "format": "uint",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "message": {
          "description": "What is wrong, in a sentence.",
          "type": "string"
        },
        "path": {
          "description": "The file the finding is about: the shell unit, or the inventory itself.",
          "type": "string"
        },
        "remedy": {
          "description": "What to do about it.",
          "type": "string"
        }
      },
      "required": [
        "code",
        "path",
        "message",
        "remedy"
      ],
      "type": "object"
    },
    "ShellUnit": {
      "description": "One shell unit the tree carries.",
      "properties": {
        "dialect": {
          "description": "The shell the unit is written for: the interpreter its first line names, or\n`sourced` for a `*.sh` file with no interpreter line.",
          "type": "string"
        },
        "disposition": {
          "description": "The disposition its inventory record carries, when it has one.",
          "type": [
            "string",
            "null"
          ]
        },
        "path": {
          "description": "The path, relative to the repository root.",
          "type": "string"
        }
      },
      "required": [
        "path",
        "dialect"
      ],
      "type": "object"
    }
  },
  "description": "The verdict of one check of the tree.",
  "properties": {
    "exemptions": {
      "additionalProperties": {
        "format": "uint",
        "minimum": 0,
        "type": "integer"
      },
      "description": "How many exemptions the inventory declares, by disposition.",
      "type": "object"
    },
    "findings": {
      "description": "Every finding, in canonical order. Empty is the passing answer.",
      "items": {
        "$ref": "#/$defs/ShellFinding"
      },
      "type": "array"
    },
    "governed": {
      "description": "The directories whose shell units must be declared.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "inventory": {
      "description": "The inventory read, relative to the repository root.",
      "type": "string"
    },
    "measured": {
      "description": "Whether the tree could be measured at all. `false` is not a pass: the reason says\nwhat stopped the measurement, and a caller that gates on this report must refuse.",
      "type": "boolean"
    },
    "passes": {
      "description": "`true` when the tree was measured and nothing was found.",
      "type": "boolean"
    },
    "reason": {
      "description": "Why the tree could not be measured, when it could not.",
      "type": [
        "string",
        "null"
      ]
    },
    "records": {
      "description": "How many records the inventory holds, shell or not.",
      "format": "uint",
      "minimum": 0,
      "type": "integer"
    },
    "units": {
      "description": "Every shell unit under the governed directories, in canonical order.",
      "items": {
        "$ref": "#/$defs/ShellUnit"
      },
      "type": "array"
    }
  },
  "required": [
    "measured",
    "inventory",
    "governed",
    "units",
    "records",
    "exemptions",
    "findings",
    "passes"
  ],
  "title": "ShellReport",
  "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
directcovered1default
mcpcovered1default
httpcovered1default

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