repository.scope
The scope declaration as read, where it came from (the repository's own or the distribution's default), and every tracked file tallied against it: how many are in, how many are out for each reason, and which.
The scope declaration as read, where it came from (the repository's own or the distribution's default), and every tracked file tallied against it: how many are in, how many are out for each reason, and which.
- query
- behaviorally_verified
- module repository
- #repository
- #scope
- #introspection
Exposure
Where this one definition is reachable. Absence is explicit: a surface not listed does not carry it.
| surface | as |
|---|---|
| MCP | tool majordomus_scope resource majordomus://scope |
| HTTP | GET /api/v1/scope operationId repository.scope |
| command line | majordomus scope |
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 · ScopeReport
The scope: the declaration as read, its origin, and every tracked file against it.
| property | type | required | description |
|---|---|---|---|
| declaration | reference | yes | The declaration as read. |
| origin | reference | yes | `repository` when the manifest names a scope section, `distribution` for the default. |
| path | string | yes | The file the declaration was read from. |
| tracked | reference | yes | Every tracked file judged by name and size, counted; the out ones listed. |
JSON Schema
{
"$defs": {
"Category": {
"additionalProperties": false,
"description": "One category of `out`: pathspecs and file-name patterns.",
"properties": {
"names": {
"default": [],
"description": "Patterns matched against the file name alone.",
"items": {
"type": "string"
},
"type": "array"
},
"paths": {
"default": [],
"description": "Pathspecs anchored at the repository root.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"Declaration": {
"additionalProperties": false,
"description": "`scope.yaml`, typed. Unknown keys are refused by the type and by the `scope` schema.",
"properties": {
"in": {
"description": "The allow-list: pathspecs anchored at the repository root.",
"items": {
"type": "string"
},
"type": "array"
},
"out": {
"$ref": "#/$defs/Out",
"description": "What is never read; wins over `in`."
},
"version": {
"description": "The format version; only [`SCOPE_VERSION`] is read.",
"format": "uint64",
"minimum": 0,
"type": "integer"
}
},
"required": [
"version",
"in",
"out"
],
"type": "object"
},
"Fixtures": {
"additionalProperties": false,
"description": "The `fixtures` category: where fixtures live and how large one may be.",
"properties": {
"max_bytes": {
"description": "A fixture over this many bytes is out.",
"format": "uint64",
"minimum": 0,
"type": "integer"
},
"names": {
"default": [],
"description": "Patterns matched against the file name alone.",
"items": {
"type": "string"
},
"type": "array"
},
"paths": {
"default": [],
"description": "Pathspecs anchored at the repository root.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"max_bytes"
],
"type": "object"
},
"Origin": {
"description": "Where the declaration was read from.",
"oneOf": [
{
"const": "repository",
"description": "The repository's own, named by the manifest's `scope` section.",
"type": "string"
},
{
"const": "distribution",
"description": "The distribution's default, because the repository declares none.",
"type": "string"
}
]
},
"Out": {
"additionalProperties": false,
"description": "The `out:` mapping: every category optional, each the reason a path is out.",
"properties": {
"archive": {
"anyOf": [
{
"$ref": "#/$defs/Category"
},
{
"type": "null"
}
],
"description": "Archives."
},
"binary": {
"default": false,
"description": "Content that is not text (a NUL byte in the first window) is out, whatever the name says.",
"type": "boolean"
},
"database_dump": {
"anyOf": [
{
"$ref": "#/$defs/Category"
},
{
"type": "null"
}
],
"description": "Database dumps."
},
"fixtures": {
"anyOf": [
{
"$ref": "#/$defs/Fixtures"
},
{
"type": "null"
}
],
"description": "Fixtures are read up to a size; over it they are data, not context."
},
"generated": {
"anyOf": [
{
"$ref": "#/$defs/Category"
},
{
"type": "null"
}
],
"description": "Generated assets: changed by changing the source and regenerating."
},
"image": {
"anyOf": [
{
"$ref": "#/$defs/Category"
},
{
"type": "null"
}
],
"description": "Images."
},
"max_bytes": {
"description": "A file over this many bytes is out, whatever it is.",
"format": "uint64",
"minimum": 0,
"type": [
"integer",
"null"
]
},
"paths": {
"default": [],
"description": "Never read, by path: version control, the local half, dependencies, build outputs.",
"items": {
"type": "string"
},
"type": "array"
},
"pdf": {
"anyOf": [
{
"$ref": "#/$defs/Category"
},
{
"type": "null"
}
],
"description": "PDF documents."
},
"secret": {
"anyOf": [
{
"$ref": "#/$defs/Category"
},
{
"type": "null"
}
],
"description": "Secrets: never read, never served, never quoted; a tracked one is reported."
},
"video": {
"anyOf": [
{
"$ref": "#/$defs/Category"
},
{
"type": "null"
}
],
"description": "Video."
}
},
"type": "object"
},
"OutFile": {
"description": "One tracked file that is out.",
"properties": {
"path": {
"description": "Repository-relative.",
"type": "string"
},
"reason": {
"$ref": "#/$defs/Reason",
"description": "Why."
},
"rule": {
"description": "The rule that decided; absent for `undeclared`.",
"type": [
"string",
"null"
]
}
},
"required": [
"path",
"reason"
],
"type": "object"
},
"Reason": {
"description": "Why a path is out. The order is the order the rules decide in.",
"oneOf": [
{
"const": "path",
"description": "Named under `out.paths`.",
"type": "string"
},
{
"const": "secret",
"description": "A secret.",
"type": "string"
},
{
"const": "generated",
"description": "A generated asset.",
"type": "string"
},
{
"const": "archive",
"description": "An archive.",
"type": "string"
},
{
"const": "image",
"description": "An image.",
"type": "string"
},
{
"const": "video",
"description": "Video.",
"type": "string"
},
{
"const": "pdf",
"description": "A PDF document.",
"type": "string"
},
{
"const": "database_dump",
"description": "A database dump.",
"type": "string"
},
{
"const": "undeclared",
"description": "Matches no `in` pathspec.",
"type": "string"
},
{
"const": "fixture_over_limit",
"description": "A fixture over `out.fixtures.max_bytes`.",
"type": "string"
},
{
"const": "over_limit",
"description": "Over `out.max_bytes`.",
"type": "string"
},
{
"const": "binary",
"description": "Content with a NUL byte in its first [`SNIFF_BYTES`]: not text.",
"type": "string"
}
]
},
"Tally": {
"description": "Every tracked file against the scope, counted.",
"properties": {
"by_reason": {
"additionalProperties": {
"format": "uint",
"minimum": 0,
"type": "integer"
},
"description": "How many are out for each reason present.",
"type": "object"
},
"files": {
"description": "How many tracked files were judged.",
"format": "uint",
"minimum": 0,
"type": "integer"
},
"in": {
"description": "How many are in.",
"format": "uint",
"minimum": 0,
"type": "integer"
},
"out": {
"description": "How many are out.",
"format": "uint",
"minimum": 0,
"type": "integer"
},
"out_files": {
"description": "Every tracked file that is out, with its reason and the rule that decided.",
"items": {
"$ref": "#/$defs/OutFile"
},
"type": "array"
}
},
"required": [
"files",
"in",
"out",
"by_reason",
"out_files"
],
"type": "object"
}
},
"description": "The scope: the declaration as read, its origin, and every tracked file against it.",
"properties": {
"declaration": {
"$ref": "#/$defs/Declaration",
"description": "The declaration as read."
},
"origin": {
"$ref": "#/$defs/Origin",
"description": "`repository` when the manifest names a scope section, `distribution` for the default."
},
"path": {
"description": "The file the declaration was read from.",
"type": "string"
},
"tracked": {
"$ref": "#/$defs/Tally",
"description": "Every tracked file judged by name and size, counted; the out ones listed."
}
},
"required": [
"origin",
"path",
"declaration",
"tracked"
],
"title": "ScopeReport",
"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.
The moments this answers
- found two agents fixing the same bug in two branches Two workers spend a day each on one defect because ownership was implicit and neither could see the other.
- watched one worker revert another worker's change, on purpose A worker sees an unexplained change in its path, judges it wrong, and removes it — correctly, on the evidence it had.
- had two sessions writing into one checkout without either knowing Two workers in one working tree see each other only as unexplained file changes, and each treats the other as noise.
- found a substantial change that no issue, ticket or plan ever asked for Work arrives with no bounded contract behind it, so its scope, its acceptance criteria and its ownership are all decided after the fact.