Přeskočit na obsah

Tato stránka byla automaticky přeložena z angličtiny, jediného jazyka, ve kterém se tento web píše. Číst originál.

knowledge_base.record

Jeden záznam znalostí podle id — kandidát nebo schválený — s rozlišeným každým odkazem, který jmenuje: relace vůči sledovaným záznamům relací a ledgeru, úloha nebo rozhodnutí vůči ledgeru a úložišti úloh, commit vůči gitu, soubor nebo test vůči indexu a stromu, pravidlo, ADR, úkol nebo jiný záznam vůči indexu. Které odkazy visí, je otázka, kterou si recenzent klade před povýšením, a kterou klade validátor integrity každému záznamu. Odkaz `task:none` nebo `decision:none` se odmítne jménem.

Jeden záznam znalostí podle id — kandidát nebo schválený — s rozlišeným každým odkazem, který jmenuje: relace vůči sledovaným záznamům relací a ledgeru, úloha nebo rozhodnutí vůči ledgeru a úložišti úloh, commit vůči gitu, soubor nebo test vůči indexu a stromu, pravidlo, ADR, úkol nebo jiný záznam vůči indexu. Které odkazy visí, je otázka, kterou si recenzent klade před povýšením, a kterou klade validátor integrity každému záznamu. Odkaz `task:none` nebo `decision:none` se odmítne jménem.

Zpřístupnění

Kde je tato jedna definice dosažitelná. Absence je explicitní: povrch, který není uveden, ji nenese.

povrchjako
MCPnástroj majordomus_knowledge_record
HTTPGET /api/v1/knowledge/record operationId knowledge_base.record
příkazová řádkamajordomus knowledge record

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.

vstup · KnowledgeRecordInput

Který záznam znalostí: vstup knowledge_base.record. Id je název souboru a identita, pod kterou záznam indexuje index, takže ho jeden řetězec pojmenuje na každém povrchu.

use majordomus_cli::capability::builtin::knowledge_base::KnowledgeRecordInput;
let input: KnowledgeRecordInput = serde_json::from_str(r#"{"id":"e1-0123456789ab"}"#).unwrap();
assert_eq!(input.id, "e1-0123456789ab");
// a key the input does not declare is refused, never ignored
assert!(serde_json::from_str::<KnowledgeRecordInput>(r#"{"id":"x","uri":"y"}"#).is_err());
vlastnosttyppovinnépopis
id string ano Id záznamu, jak ho nese název souboru a majordomus://knowledge/<id>.
JSON Schema
{
  "additionalProperties": false,
  "description": "Which knowledge record: the input of `knowledge_base.record`. The id is the file name\nand the identity the index keys the record by, so one string names it on every surface.\n\n```\nuse majordomus_cli::capability::builtin::knowledge_base::KnowledgeRecordInput;\nlet input: KnowledgeRecordInput = serde_json::from_str(r#\"{\"id\":\"e1-0123456789ab\"}\"#).unwrap();\nassert_eq!(input.id, \"e1-0123456789ab\");\n// a key the input does not declare is refused, never ignored\nassert!(serde_json::from_str::<KnowledgeRecordInput>(r#\"{\"id\":\"x\",\"uri\":\"y\"}\"#).is_err());\n```",
  "properties": {
    "id": {
      "description": "The record id, as the file name and `majordomus://knowledge/<id>` carry it.",
      "type": "string"
    }
  },
  "required": [
    "id"
  ],
  "title": "KnowledgeRecordInput",
  "type": "object"
}

output · KnowledgeRecord

Jeden záznam znalosti, s vyřešeným každým odkazem, který jmenuje.

objects.get už servíruje stejný soubor jako metadata i obsah. Tohle přidává rozlišení: které odkazy záznamu odpovídají, kterým čtečem a které visí — otázku, kterou si revizor klade před povýšením kandidáta, a otázku, kterou klade validátor integrity každému záznamu.

use majordomus_cli::capability::builtin::knowledge_base::KnowledgeRecord;
let r: KnowledgeRecord = serde_json::from_str(r#"{
  "id": "e1-0123456789ab", "uri": "majordomus://knowledge/e1-0123456789ab",
  "path": ".ai/repo/knowledge/candidates/e1-0123456789ab.md", "source_class": "candidates",
  "class": "convention", "status": "candidate", "epistemics": "decided", "origin": "extracted",
  "date": "2026-09-12", "title": "An assertion", "resolved": true, "content": "---\n---\n"
}"#).unwrap();
assert!(r.derived_from.is_empty(), "a record that names nothing has nothing to resolve");
assert_eq!(r.superseded_by, None, "and is not superseded");
vlastnosttyppovinnépopis
třída string ano fact, convention, constraint, memory nebo lesson.
obsah string ano Celý soubor, front matter i tělo.
datum string ano Den, kdy záznam dosáhl svého stavu.
derived_from array ne Každý odkaz provenance.derived_from, vyřešený, v pořadí záznamu.
epistemika string ano observed, inferred nebo decided.
id string ano Id záznamu.
původ string ne authored nebo extracted; prázdné, pokud záznam nenese žádný původ.
path string ano Cesta relativní k repozitáři.
vztahy array ne Každý záznam relations, rozřešený, v pořadí záznamu.
vyřešeno boolean ne Pravda, když se rozlišil každý výše uvedený odkaz. Jediný bit, který reviewer čte jako první. výchozí false
source_class string ano Třída zdrojů, která jej objevila: candidates nebo curated.
status string ano candidate, verified nebo superseded.
superseded_by string | null ne Záznam, který tento nahradil, když je stav superseded.
název string ano Tvrzení.
uri string ano majordomus://knowledge/<id>.
JSON Schema
{
  "$defs": {
    "ReferenceResolution": {
      "description": "How a typed reference resolved.\n\nFour words and no fifth: a reference names an object of the index, or something only\nthe ledger and git can vouch for, or a file the tree no longer holds and git history\ndoes, or nothing. `external` is not a weaker `object` — a commit or a task is exactly as\nreal as a rule — it says which reader answered; `historical` resolves as well, and is\nnamed apart so a reader sees which provenance outlived its file (I1987).\n\n```\nuse majordomus_cli::capability::builtin::knowledge_base::ReferenceResolution;\nlet r: ReferenceResolution = serde_json::from_str(r#\"\"external\"\"#).unwrap();\nassert_eq!(r, ReferenceResolution::External);\nassert!(r.resolves(), \"vouched for by the ledger or git is resolved\");\nassert!(!ReferenceResolution::Missing.resolves());\n```",
      "oneOf": [
        {
          "const": "object",
          "description": "An object of the index: the `target` is its URI, or its path for a file.",
          "type": "string"
        },
        {
          "const": "external",
          "description": "Vouched for by the ledger, the task store or git: a session, a task, a decision, a commit.",
          "type": "string"
        },
        {
          "const": "historical",
          "description": "A `file:` or `test:` the tree no longer holds and git history does: cited before the\nfile was deleted, or pinned as `file:<path>@<commit>`. The `target` is the blob that\nanswers, `<commit>:<path>`, which `git show` reads.",
          "type": "string"
        },
        {
          "const": "missing",
          "description": "Nothing answers to it. A dangling reference is the integrity validator's finding.",
          "type": "string"
        }
      ]
    },
    "ResolvedReference": {
      "description": "One `derived_from` reference of a record, with how it resolved and against what.\n\n```\nuse majordomus_cli::capability::builtin::knowledge_base::{ReferenceResolution, ResolvedReference};\nlet r: ResolvedReference = serde_json::from_str(\n    r#\"{\"reference\":\"task:none\",\"resolution\":\"missing\",\"reason\":\"`none` is not a task\"}\"#,\n).unwrap();\nassert_eq!(r.resolution, ReferenceResolution::Missing);\nassert_eq!(r.target, None);\n```",
      "properties": {
        "reason": {
          "description": "Why it did not resolve, when it did not.",
          "type": "string"
        },
        "reference": {
          "description": "The reference as written: `<prefix>:<value>`.",
          "type": "string"
        },
        "resolution": {
          "$ref": "#/$defs/ReferenceResolution",
          "description": "How it resolved."
        },
        "target": {
          "description": "What it resolved to: a URI for an object, a path for a file, the reader that vouched\nfor an external reference. Absent when nothing did.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "reference",
        "resolution"
      ],
      "type": "object"
    },
    "ResolvedRelation": {
      "description": "One `relations` entry, resolved the same way.\n\n```\nuse majordomus_cli::capability::builtin::knowledge_base::{ReferenceResolution, ResolvedRelation};\nlet r: ResolvedRelation = serde_json::from_str(\n    r#\"{\"relation_type\":\"relates_to\",\"reference\":\"file:docs/CLI.md\",\"resolution\":\"object\",\"target\":\"docs/CLI.md\"}\"#,\n).unwrap();\nassert_eq!(r.relation_type, \"relates_to\");\nassert!(r.resolution.resolves());\n```",
      "properties": {
        "reason": {
          "description": "Why it did not resolve, when it did not.",
          "type": "string"
        },
        "reference": {
          "description": "The target as written.",
          "type": "string"
        },
        "relation_type": {
          "description": "`relates_to`, `depends_on`, `documents`, `supports`, `contradicts`, `supersedes` or `derived_from`.",
          "type": "string"
        },
        "resolution": {
          "$ref": "#/$defs/ReferenceResolution",
          "description": "How it resolved."
        },
        "target": {
          "description": "What it resolved to, when something did.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "relation_type",
        "reference",
        "resolution"
      ],
      "type": "object"
    }
  },
  "description": "One knowledge record, with every reference it names resolved.\n\n`objects.get` already serves the same file as metadata and content. What this adds is\nthe resolution: which of the record's references answer, through which reader, and which\ndangle — the question a reviewer asks before promoting a candidate, and the question the\nintegrity validator asks of every record.\n\n```\nuse majordomus_cli::capability::builtin::knowledge_base::KnowledgeRecord;\nlet r: KnowledgeRecord = serde_json::from_str(r#\"{\n  \"id\": \"e1-0123456789ab\", \"uri\": \"majordomus://knowledge/e1-0123456789ab\",\n  \"path\": \".ai/repo/knowledge/candidates/e1-0123456789ab.md\", \"source_class\": \"candidates\",\n  \"class\": \"convention\", \"status\": \"candidate\", \"epistemics\": \"decided\", \"origin\": \"extracted\",\n  \"date\": \"2026-09-12\", \"title\": \"An assertion\", \"resolved\": true, \"content\": \"---\\n---\\n\"\n}\"#).unwrap();\nassert!(r.derived_from.is_empty(), \"a record that names nothing has nothing to resolve\");\nassert_eq!(r.superseded_by, None, \"and is not superseded\");\n```",
  "properties": {
    "class": {
      "description": "`fact`, `convention`, `constraint`, `memory` or `lesson`.",
      "type": "string"
    },
    "content": {
      "description": "The whole file, front matter and body.",
      "type": "string"
    },
    "date": {
      "description": "The day the record reached its status.",
      "type": "string"
    },
    "derived_from": {
      "description": "Every `provenance.derived_from` reference, resolved, in the record's order.",
      "items": {
        "$ref": "#/$defs/ResolvedReference"
      },
      "type": "array"
    },
    "epistemics": {
      "description": "`observed`, `inferred` or `decided`.",
      "type": "string"
    },
    "id": {
      "description": "The record id.",
      "type": "string"
    },
    "origin": {
      "description": "`authored` or `extracted`; empty when the record carries no provenance.",
      "type": "string"
    },
    "path": {
      "description": "Repository-relative path.",
      "type": "string"
    },
    "relations": {
      "description": "Every `relations` entry, resolved, in the record's order.",
      "items": {
        "$ref": "#/$defs/ResolvedRelation"
      },
      "type": "array"
    },
    "resolved": {
      "default": false,
      "description": "True when every reference above resolved. The one bit a reviewer reads first.",
      "type": "boolean"
    },
    "source_class": {
      "description": "The source class that discovered it: `candidates` or `curated`.",
      "type": "string"
    },
    "status": {
      "description": "`candidate`, `verified` or `superseded`.",
      "type": "string"
    },
    "superseded_by": {
      "description": "The record that replaced this one, when the status is `superseded`.",
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "description": "The assertion.",
      "type": "string"
    },
    "uri": {
      "description": "`majordomus://knowledge/<id>`.",
      "type": "string"
    }
  },
  "required": [
    "id",
    "uri",
    "path",
    "source_class",
    "class",
    "status",
    "epistemics",
    "date",
    "title",
    "content"
  ],
  "title": "KnowledgeRecord",
  "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.

transportstatepřípadytargets
directpokryto1first-record
mcppokryto1first-record
httppokryto1first-record

Tvrzení implementovaná vedle ní

Připojeno souborem, který každé tvrzení implementuje; každé odkazuje na svou stránku s implementací a testem, který je dokazuje.

Prohledává názvy a popisy všech stránek, které tento web publikuje.