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

design.system

The design system

What it is

What the design is: the fingerprint every stylesheet carries, the identity, the type stacks, the theme contract with the pre-paint statement every surface runs, the audit widths, how many tokens of each kind, and every generated file the declaration is projected into.

Descriptor

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

Run

query
A query. It reads and changes nothing.

This capability takes no input.

GET /api/v1/design

Projections

InterfaceAsWhere
MCP toolmajordomus_design-
MCP resourcemajordomus://design-
HTTPGET /api/v1/designSwagger
Command linenot exposed-

Schemas

Input · Empty
{
  "type": "object",
  "additionalProperties": false,
  "description": "No input.",
  "title": "Empty"
}
Output · DesignReport
{
  "type": "object",
  "properties": {
    "fingerprint": {
      "type": "string",
      "description": "SHA-256 of the declaration's canonical form."
    },
    "design": {
      "type": "string",
      "description": "The first twelve digits, as every stylesheet carries them in `--mj-design`."
    },
    "schema": {
      "type": "integer",
      "format": "uint64",
      "minimum": 0,
      "description": "The format version of the declaration."
    },
    "source": {
      "type": "string",
      "description": "Where the declaration lives, repository-relative."
    },
    "identity": {
      "$ref": "#/$defs/Identity",
      "description": "Who this is."
    },
    "font": {
      "$ref": "#/$defs/Fonts",
      "description": "The two type stacks."
    },
    "theme": {
      "$ref": "#/$defs/ThemeView",
      "description": "The theme contract."
    },
    "viewports": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "uint32",
        "minimum": 0
      },
      "description": "The widths a browser audit measures every page at."
    },
    "tallies": {
      "$ref": "#/$defs/TokenTallies",
      "description": "How many of each kind of token."
    },
    "projections": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProjectionView"
      },
      "description": "Every generated file the declaration is projected into."
    }
  },
  "required": [
    "fingerprint",
    "design",
    "schema",
    "source",
    "identity",
    "font",
    "theme",
    "viewports",
    "tallies",
    "projections"
  ],
  "description": "The design system: what it is and where it goes.",
  "title": "DesignReport",
  "$defs": {
    "Identity": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "description": "The product name every surface shows."
        },
        "mark": {
          "type": "string",
          "description": "The mark, relative to the design directory."
        },
        "logo": {
          "type": "string",
          "description": "The full logo, relative to the design directory."
        },
        "social": {
          "type": "string",
          "description": "The social preview image, relative to the design directory."
        }
      },
      "required": [
        "name",
        "mark",
        "logo",
        "social"
      ],
      "description": "Who this is."
    },
    "Fonts": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "sans": {
          "type": "string",
          "description": "The system stack."
        },
        "mono": {
          "type": "string",
          "description": "The monospace stack."
        }
      },
      "required": [
        "sans",
        "mono"
      ],
      "description": "The two type stacks."
    },
    "ThemeView": {
      "type": "object",
      "properties": {
        "class": {
          "type": "string",
          "description": "The class on the root element that means dark."
        },
        "storage_key": {
          "type": "string",
          "description": "The `localStorage` key the person's choice is kept under."
        },
        "bootstrap": {
          "type": "string",
          "description": "The one pre-paint statement every surface runs."
        }
      },
      "required": [
        "class",
        "storage_key",
        "bootstrap"
      ],
      "description": "The theme contract as a client reads it."
    },
    "TokenTallies": {
      "type": "object",
      "properties": {
        "palette": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Raw palette entries."
        },
        "roles": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Semantic roles."
        },
        "statuses": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Status meanings."
        },
        "states": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "State words filed under a status."
        },
        "type_steps": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Steps of the type scale."
        },
        "aliases": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Flowbite names declared as synonyms."
        }
      },
      "required": [
        "palette",
        "roles",
        "statuses",
        "states",
        "type_steps",
        "aliases"
      ],
      "description": "How many of each kind of token."
    },
    "ProjectionView": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "Repository-relative path."
        },
        "read_by": {
          "type": "string",
          "description": "What reads it."
        }
      },
      "required": [
        "path",
        "read_by"
      ],
      "description": "One generated projection of the design and what it is for."
    }
  }
}

Examples

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

default
{}