commit.scopes
Every scope this repository's commit history uses, how often, and the directories each one is written about — learned from the history rather than declared in a table, so that a subsystem committed today is in the vocabulary today and one nobody has touched falls to the bottom on its own.
Every scope this repository's commit history uses, how often, and the directories each one is written about — learned from the history rather than declared in a table, so that a subsystem committed today is in the vocabulary today and one nobody has touched falls to the bottom on its own.
- query
- behaviorally_verified
- module commit
- #commit
- #git
- #introspection
Exposure
Where this one definition is reachable. Absence is explicit: a surface not listed does not carry it.
| surface | as |
|---|---|
| MCP | tool majordomus_commit_scopes resource majordomus://commit/scopes |
| HTTP | GET /api/v1/commit/scopes operationId commit.scopes |
| command line | majordomus commit scopes |
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 properties: the capability takes no input.
JSON Schema
{
"additionalProperties": false,
"description": "No input.",
"title": "Empty",
"type": "object"
}output · ScopesReport
use majordomus_cli::capability::builtin::commit::ScopesReport;
use majordomus_cli::commit::ScopeVocabulary;
let r = ScopesReport { vocabulary: ScopeVocabulary::default(), sample: 1500 };
assert_eq!(r.sample, majordomus_cli::commit::scopes::SAMPLE);| property | type | required | description |
|---|---|---|---|
| sample | integer | yes | How many commits back the vocabulary is learned from. |
| vocabulary | reference | yes | Every scope the history uses, most used first, with the directories it is used about. |
JSON Schema
{
"$defs": {
"ScopeUse": {
"description": "One scope the history uses, and how much.\n```\nuse majordomus_cli::commit::scopes::ScopeUse;\nlet u = ScopeUse { scope: \"commit\".into(), commits: 40, directories: vec![\"src/commit\".into()] };\nassert_eq!(u.commits, 40);\n```",
"properties": {
"commits": {
"description": "How many of the sampled commits used it.",
"format": "uint",
"minimum": 0,
"type": "integer"
},
"directories": {
"description": "The directory prefixes those commits touched, most often first, at most five.",
"items": {
"type": "string"
},
"type": "array"
},
"scope": {
"description": "The scope word, as commits spell it.",
"type": "string"
}
},
"required": [
"scope",
"commits",
"directories"
],
"type": "object"
},
"ScopeVocabulary": {
"description": "The vocabulary as observed, with what was observed.\n```\nuse majordomus_cli::commit::ScopeVocabulary;\n// an empty vocabulary knows nothing and says so, rather than guessing\nlet v = ScopeVocabulary::default();\nassert!(!v.knows(\"anything\"));\nassert!(v.words().is_empty());\n```",
"properties": {
"sampled": {
"description": "How many commits were read to learn it.",
"format": "uint",
"minimum": 0,
"type": "integer"
},
"scopes": {
"description": "Every scope, by how often it is used, then by name. The order is the answer to\n\"which scopes does this repository use\", so it is the order a person reads.",
"items": {
"$ref": "#/$defs/ScopeUse"
},
"type": "array"
},
"unavailable": {
"description": "Set when git could not be asked; the vocabulary is then empty rather than wrong.",
"type": [
"string",
"null"
]
}
},
"required": [
"scopes",
"sampled"
],
"type": "object"
}
},
"description": "The vocabulary, with the policy that reads it.\n```\nuse majordomus_cli::capability::builtin::commit::ScopesReport;\nuse majordomus_cli::commit::ScopeVocabulary;\nlet r = ScopesReport { vocabulary: ScopeVocabulary::default(), sample: 1500 };\nassert_eq!(r.sample, majordomus_cli::commit::scopes::SAMPLE);\n```",
"properties": {
"sample": {
"description": "How many commits back the vocabulary is learned from.",
"format": "uint",
"minimum": 0,
"type": "integer"
},
"vocabulary": {
"$ref": "#/$defs/ScopeVocabulary",
"description": "Every scope the history uses, most used first, with the directories it is used about."
}
},
"required": [
"vocabulary",
"sample"
],
"title": "ScopesReport",
"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.