JSON reports: the commands that answer questions
The JSON Schemas of what ascribe explain, outline, link, refs, rename, resolve, and search write with --format json.
For AI agents: the documentation index is at llms.txt, and this page is available as Markdown.
The JSON Schemas of what ascribe explain, outline, link, refs, rename, resolve, and search write with --format json. Each document follows the rules of the JSON report contract.
ascribe explain
The fields of schemas/explain.schema.json:
ExplainReport: What ascribe explain <CODE> answers: one diagnostic.
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
schema_version |
integer |
yes | no | The version of this schema. It changes only when a field is removed or changes meaning. |
ascribe_version |
string |
yes | no | The release of Ascribe that wrote it, as 0.4.5. |
code |
string |
yes | no | The code, such as ASC036. |
slug |
string |
yes | no | The diagnostic’s name, such as link-target-missing. |
severity |
string |
yes | no | error, warning, or advice. |
next |
string |
yes | yes | The kind of next step: fix, choose, write, outside, or review. Every diagnostic has one. |
level |
string |
yes | no | file for a problem found in each file on its own; page for one found in each page as a build resolves it. |
message |
string |
yes | no | The message, with its placeholders ({path}) as written. |
variants |
object[] |
yes | no | The other ways the message is worded, by the case they’re for, in name order. |
variants[].name |
string |
yes | no | The case it’s for. |
variants[].message |
string |
yes | no | The message, with its placeholders as written. |
fix |
string |
yes | yes | How to fix it, in general. Every diagnostic has one. |
docs |
string |
yes | no | The address of its entry in the diagnostics reference: the docs’ permalink for its code, such as https://ascribed-dev.com/go/ASC036/, which forwards to the entry wherever it is. |
example |
object |
yes | yes | A page that has the problem and the same page fixed; null when the diagnostic has no example. |
example.wrong |
string |
yes | no | The page, page.md, with the problem. |
example.right |
string |
yes | no | The same page, fixed. |
example.model |
string |
yes | yes | The content model the example assumes, when the problem depends on one: the example’s own fragment, or else the explain model. null when it’s a problem under any content model. |
example.files |
object[] |
yes | no | The project’s other files the example assumes, in path order. |
example.files[].path |
string |
yes | no | Its content path. |
example.files[].text |
string |
yes | no | Its text. |
With --list:
The fields of schemas/explain-list.schema.json:
ExplainListReport: What ascribe explain --list answers: every diagnostic.
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
schema_version |
integer |
yes | no | The version of this schema. It changes only when a field is removed or changes meaning. |
ascribe_version |
string |
yes | no | The release of Ascribe that wrote it, as 0.4.5. |
diagnostics |
object[] |
yes | no | Every diagnostic, in code order. |
diagnostics[].code |
string |
yes | no | The code. |
diagnostics[].slug |
string |
yes | no | The slug. |
diagnostics[].severity |
string |
yes | no | error, warning, or advice. |
ascribe outline
The fields of schemas/outline.schema.json:
OutlineReport: What ascribe outline <PAGE> answers.
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
schema_version |
integer |
yes | no | The version of this schema. It changes only when a field is removed or changes meaning. |
ascribe_version |
string |
yes | no | The release of Ascribe that wrote it, as 0.4.5. |
page |
string |
yes | no | The page’s path from the content root, as links write it. |
file |
string |
yes | no | The page’s file from the project root, as ascribe check reports it. |
fragment |
boolean |
yes | no | Whether it’s a fragment, which pages include rather than link to. |
title |
string |
yes | yes | Its title (frontmatter title). |
type |
string |
yes | yes | Its page type; null for a fragment, or when no one type applies. |
build |
string |
yes | yes | The build the headings are limited to, with --build. |
not_published |
string |
yes | yes | Why that build doesn’t publish the page, when it doesn’t; there are no headings then. |
memos |
OutlineMemo[] |
yes | no | The memo files about the page as a whole, in path order. A detached memo isn’t listed. |
headings |
object[] |
yes | no | The headings a link to the page can name, in document order, each id once. |
headings[].level |
integer |
yes | no | 1 to 6. |
headings[].text |
string |
yes | no | Its text, phrases replaced by their values. |
headings[].id |
string |
yes | no | Its id: what a link writes after #. |
headings[].explicit_id |
boolean |
yes | no | Whether the id is the heading’s @id, which stays when its text changes. |
headings[].file |
string |
yes | no | The file it’s written in, from the project root. |
headings[].line |
integer |
yes | no | Its line in that file, from 1. |
headings[].fragment |
string |
yes | yes | The fragment it comes from, as a path from the content root; null for the page’s own. |
headings[].memos |
OutlineMemo[] |
yes | no | The memo files about its section, or a block in it, in path order. |
OutlineMemo: A memo file about a page or a heading.
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
file |
string |
yes | no | The memo file, from the project root. |
state |
OutlineMemoState |
yes | no | placed, on what its about names or the block it quotes, or outdated, when no block holds its quote. |
quote |
string |
yes | yes | Its quote; null when it has none. |
first_line |
string |
yes | no | The first line of its text that isn’t blank. |
personal |
boolean |
yes | no | Whether it’s one of the memos kept on this machine only, rather than the project’s memos/. |
OutlineMemoState: Where a listed memo is. One of:
| Value | Description |
|---|---|
"placed" |
On its page or section, or the block its quote is in. |
"outdated" |
Its quote isn’t found: it’s on its page or section, and no block. |
ascribe link
The fields of schemas/link.schema.json:
LinkReport: What ascribe link <TARGET> --from <PAGE> answers.
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
schema_version |
integer |
yes | no | The version of this schema. It changes only when a field is removed or changes meaning. |
ascribe_version |
string |
yes | no | The release of Ascribe that wrote it, as 0.4.5. |
from |
string |
yes | no | The page the link is written on, as the command was given it: a path from the folder it was run in, as ascribe check names a file. |
target |
string |
yes | no | The target, as given. |
exists |
boolean |
yes | no | Whether a link from that page to the target works. An external URL counts as existing; it isn’t checked. |
kind |
LinkKind |
yes | no | What the target is. |
path |
string |
yes | yes | The file it names, as a path from the content root; null for an external URL, or a file that doesn’t exist. |
id |
string |
yes | yes | The heading id after #, if any. |
title |
string |
yes | yes | The page’s title, or the heading’s text: what a link with no text shows. |
href |
string |
yes | yes | The destination to write on that page, when the target exists. |
problem |
string |
yes | yes | Why it doesn’t work, when it doesn’t. |
closest |
object[] |
yes | no | The closest targets that exist, best first, when it doesn’t. |
closest[].href |
string |
yes | no | The destination to write. |
closest[].path |
string |
yes | no | The page, as a path from the content root. |
closest[].id |
string |
yes | yes | The heading id, if it’s a heading. |
closest[].title |
string |
yes | yes | The page’s title, or the heading’s text. |
lines |
object[] |
no | no | Where a link to a page goes in each line of each versioned build, newest first; absent when the target isn’t a page or no build is versioned. |
lines[].build |
string |
yes | no | The line’s build: the declared build for the current line, and <build>@<line> for each other. |
lines[].line |
string |
yes | no | The line, as [releases.<target>] writes it. |
lines[].page |
string |
yes | yes | The page it lands on, as a path from the content root: the target, or the page that takes its place in the line. null when no live line publishes the target, which is link-page-dropped. |
lines[].leads_to |
string |
yes | yes | For a link out of the line, the line it leads to. |
operation |
object |
no | no | The operation a link to a declared API’s spec names, when the spec has it; absent for any other target. |
operation.api |
string |
yes | no | The API’s name. |
operation.operation_id |
string |
yes | yes | Its operationId; null for an operation with none, which a link names by its method and path. |
operation.method |
string |
yes | no | Its method, in lowercase. |
operation.path |
string |
yes | no | Its path, as the spec writes it. |
operation.summary |
string |
yes | yes | Its summary, when it has one. |
operation.tag |
string |
yes | yes | Its first tag, when it has one. |
operation.deprecated |
boolean |
yes | no | Whether the spec marks it deprecated. |
operation.address |
string |
yes | yes | Its address in the published reference, as the editor’s build writes the link; null when the reference has none for it: an operation with no id, under an address pattern. |
LinkKind: What a link target is. One of:
| Value | Description |
|---|---|
"page" |
A page. |
"heading" |
A heading on a page. |
"fragment" |
A fragment, which pages include and links can’t name. |
"file" |
A file that isn’t a page, which a build copies: an image or a download. |
"external" |
A URL with a scheme. |
"operation" |
An operation of a declared API’s spec: a link to the spec with a fragment. |
"missing" |
Nothing: no file has that path. |
ascribe refs
The fields of schemas/refs.schema.json:
RefsReport: What ascribe refs <TARGET> answers.
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
schema_version |
integer |
yes | no | The version of this schema. It changes only when a field is removed or changes meaning. |
ascribe_version |
string |
yes | no | The release of Ascribe that wrote it, as 0.4.5. |
target |
string |
yes | no | The target, as given. |
kind |
TargetKind |
yes | no | What the target is. |
exists |
boolean |
yes | no | Whether the target exists. When it doesn’t, the only places are the memo files that name it. |
places |
object[] |
yes | no | The places that use it, file by file in path order and in document order within a file, then the memo files about it, in path order; at most shown of them. |
places[].file |
string |
yes | no | The file, from the project root, as ascribe check reports it. |
places[].line |
integer |
yes | no | The line, from 1. |
places[].column |
integer |
yes | no | The column, from 1, in Unicode characters. |
places[].use |
string |
yes | no | How it uses the target: link, include, phrase, availability, term, variant, note, widget, image, an image that shows it, html or frontmatter, raw HTML or a frontmatter field that names it, or memo, a memo file about it. |
places[].personal |
boolean |
yes | no | Whether it’s a memo file kept on this machine only, in .ascribe/memos/, rather than the project’s memos/; false for every place that isn’t a memo. |
places[].spec |
string |
yes | yes | The availability spec, as written, for an availability place; null for every other place. |
total |
integer |
yes | no | How many places use it. |
shown |
integer |
yes | no | How many are listed. |
truncated |
boolean |
yes | no | Whether the list was cut: shown is less than total. |
next_command |
string |
yes | yes | The command that lists them all, when the list was cut. |
TargetKind: What a target is. One of:
| Value | Description |
|---|---|
"page" |
A page. |
"fragment" |
A fragment. |
"heading" |
A heading, by its page and id. |
"image" |
An image under the content root. |
"phrase" |
A phrase, phrase:<key>. |
"feature" |
A feature, feature:<key>. |
"term" |
A glossary term, term:<id>. |
"dimension" |
A dimension, dimension:<name>. |
"note" |
A note type, note:<type>. |
"widget" |
A project widget, widget:<name>. |
"release" |
A line of a release target, release:<target>@<version>. |
ascribe rename
The fields of schemas/rename.schema.json:
RenameReport: What ascribe rename --format json writes, and the MCP server’s ascribe_rename gives.
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
schema_version |
integer |
yes | no | The version of this schema. It changes only when a field is removed or changes meaning. |
ascribe_version |
string |
yes | no | The release of Ascribe that wrote it, as 0.4.5. |
files |
object[] |
yes | no | Each file the rename changes, in path order, with its whole text after. The file that moves is under where it was, and ascribe.addresses is one of them when the rename records a move. |
files[].file |
string |
yes | no | The file, from the current folder. |
files[].text |
string |
yes | no | Its whole text after the rename. |
files[].edits |
integer |
yes | no | How many places in it change. |
recorded |
object[] |
yes | no | The entries of ascribe.addresses’s [moved] the rename records, in key order, so the build forwards the old addresses; none when it records nothing, as for a phrase, a fragment, or a project with no ascribe.addresses. |
recorded[].key |
string |
yes | no | The entry’s key: where the page was. |
recorded[].value |
string |
yes | no | The entry’s value: where it is now. |
written |
boolean |
yes | no | Whether the files were written and the file moved: --dry-run, and the MCP server’s ascribe_rename, write nothing, and give the changes to make. |
moved |
object |
no | no | The page or fragment that moves, when one does. |
moved.from |
string |
yes | no | Where it is, from the current folder. |
moved.to |
string |
yes | no | Where it goes, from the current folder. Its folder is made when it isn’t there. |
ascribe resolve
The fields of schemas/resolve.schema.json:
ResolveReport: What ascribe resolve <PAGE> --format json answers.
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
schema_version |
integer |
yes | no | The version of this schema. It changes only when a field is removed or changes meaning. |
ascribe_version |
string |
yes | no | The release of Ascribe that wrote it, as 0.4.5. |
page |
string |
yes | no | The page, as a path from the content root. |
build |
string |
yes | no | The build. |
emit |
Emit |
yes | no | Which output text is written as: plain, the build’s plain Markdown output, or site, its site output. |
not_published |
string |
yes | yes | Why the build doesn’t publish the page, when it doesn’t; text is empty then. |
route |
string |
yes | yes | The page’s route in the build’s site. |
text |
string |
yes | no | The page as the output emit names writes it: with its frontmatter first when asked for. |
Emit: Which output a page is written as, by the name ascribe build --emit gives it. One of:
| Value | Description |
|---|---|
"plain" |
The plain Markdown output: fully resolved CommonMark with no HTML. |
"site" |
The site output: Markdown with Ascribe’s elements, as a site’s integration receives it. |
ascribe resolve go:<name>
The fields of schemas/resolve-permalink.schema.json:
ResolvePermalinkReport: What ascribe resolve go:<name> --format json answers: the name’s entry as the build’s _ascribe/help.json writes it, with the file’s version, build, and line.
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
schema_version |
integer |
yes | no | The version of this schema. It changes only when a field is removed or changes meaning. |
ascribe_version |
string |
yes | no | The release of Ascribe that wrote it, as 0.4.5. |
version |
integer |
yes | no | The version of help.json’s format, which this shares. A later version adds keys and changes none of these. |
build |
string |
yes | no | The build, without its line. |
name |
string |
yes | no | The permalink’s name, as asked for. |
title |
string |
yes | no | The heading’s text, or the page’s title for a page’s permalink, as plain text. |
text |
string |
yes | no | The section as the plain Markdown output writes it, in Markdown, with each image as its alt text. |
source |
string |
yes | no | The page the permalink is recorded on, as a path from the content root. |
address |
string |
no | no | The permalink’s address; absent without [consumer] site. |
choices |
{ [name]: { [name]: string } } |
no | no | For a section with a switcher, its text with each arm chosen: keyed by dimension, then by value, both in the content model’s order. Absent when the section has no switcher on a dimension. |
line |
string |
no | no | The line, for a line of a versioned build that has more than one. |
summary |
string |
no | no | The section’s summary; absent when it has none. |
ascribe search
The fields of schemas/search.schema.json:
SearchReport: What ascribe search <QUERY> answers: what --format json writes.
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
schema_version |
integer |
yes | no | The version of this schema. It changes only when a field is removed or changes meaning. |
ascribe_version |
string |
yes | no | The release of Ascribe that wrote it, as 0.4.5. |
query |
string |
yes | no | The query, as given. |
builds |
string[] |
yes | no | The builds searched, in the content model’s order. |
places |
object[] |
yes | no | The places, at most shown of them: titles, then headings, then the rest; in each, the places written in pages, then those in fragments and code files, each in path order and in order within a file. Empty with --summary. |
places[].file |
string |
yes | no | The file, from the project root, as ascribe check reports it: a page, a fragment, a snippet’s code file, or ascribe.toml for a phrase. |
places[].line |
integer |
yes | no | The line, from 1. |
places[].column |
integer |
yes | no | The column of the match’s first character, from 1, in Unicode characters. |
places[].end_line |
integer |
yes | yes | For a snippet’s code that can’t be lined up with its file, the last line the snippet shows: the place is its lines, from line, and not the line the match is on. null for every other place. |
places[].in |
string |
yes | no | What it is: title, description, heading, text, table, code, or phrase, a phrase’s value at its line in ascribe.toml. |
places[].text |
string |
yes | no | The block’s text as a reader reads it, or for a phrase, its value: whole when it’s at most 240 characters, and otherwise cut to about that many around the match’s first character, at words, with … where it’s cut. line and column say where to read the rest. |
places[].match |
integer[] |
yes | no | Where the match is in text: its first character and the one after its last, in Unicode characters; when text is cut before the match’s last character, the end ends where it’s cut, before the …. |
places[].through |
SearchThrough[] |
yes | no | What the match reads through that the line doesn’t spell, in order. |
places[].arm |
string |
yes | yes | The arm of a group the block is written in, as its attributes are written (deployment=cloud), or else its title. |
places[].pages |
SearchPage[] |
yes | no | The pages that show it, in path order, at most three. |
places[].pages_total |
integer |
yes | no | How many pages show it; for a phrase, how many places in the source use it. |
places[].refs_command |
string |
yes | yes | The ascribe refs command that lists where it’s used, for a phrase, and for a fragment’s place when pages was cut. |
pages |
object[] |
yes | yes | With --summary, in place of the places: each page that shows a place and how many it shows, most first, then in path order; at most shown of them. null without it. |
pages[].page |
string |
yes | no | The page, from the project root. |
pages[].places |
integer |
yes | no | How many places it shows. |
pages_matched |
integer |
yes | no | How many pages show a place. |
total |
integer |
yes | no | How many places match. |
shown |
integer |
yes | no | How many places are listed, or with --summary, pages. |
truncated |
boolean |
yes | no | Whether the list was cut: shown is less than total, or with --summary, than pages_matched. |
next_command |
string |
yes | yes | The command that lists them all, when the list was cut. |
source_places |
object[] |
yes | no | When nothing matched, the first places the source writes the words as given, at most three, though no build searched publishes them there; empty when something matched, or when the words aren’t written. |
source_places[].file |
string |
yes | no | The file, from the project root. |
source_places[].line |
integer |
yes | no | The line, from 1. |
not_searched_builds |
string[] |
yes | no | When nothing matched, the builds that weren’t searched that publish the words, in the content model’s order; empty otherwise. |
stop_words |
string[] |
yes | no | The query’s stop words, as written: common English words, such as how, do, and the, that a place doesn’t need to have. Empty when every word is one, since then a place needs them all. |
partial_places |
object[] |
yes | no | When nothing matched and a place needs two or more words or phrases, the places that have some of them, at most 10: those that have the most first, then those with the most stop words, then in the order of places. Each is a place as in places, its match covering the words it has, with how many it has and what it lacks. Empty when something matched. |
partial_places[].file |
string |
yes | no | The file, from the project root, as ascribe check reports it: a page, a fragment, a snippet’s code file, or ascribe.toml for a phrase. |
partial_places[].line |
integer |
yes | no | The line, from 1. |
partial_places[].column |
integer |
yes | no | The column of the match’s first character, from 1, in Unicode characters. |
partial_places[].end_line |
integer |
yes | yes | For a snippet’s code that can’t be lined up with its file, the last line the snippet shows: the place is its lines, from line, and not the line the match is on. null for every other place. |
partial_places[].in |
string |
yes | no | What it is: title, description, heading, text, table, code, or phrase, a phrase’s value at its line in ascribe.toml. |
partial_places[].text |
string |
yes | no | The block’s text as a reader reads it, or for a phrase, its value: whole when it’s at most 240 characters, and otherwise cut to about that many around the match’s first character, at words, with … where it’s cut. line and column say where to read the rest. |
partial_places[].match |
integer[] |
yes | no | Where the match is in text: its first character and the one after its last, in Unicode characters; when text is cut before the match’s last character, the end ends where it’s cut, before the …. |
partial_places[].through |
SearchThrough[] |
yes | no | What the match reads through that the line doesn’t spell, in order. |
partial_places[].arm |
string |
yes | yes | The arm of a group the block is written in, as its attributes are written (deployment=cloud), or else its title. |
partial_places[].pages |
SearchPage[] |
yes | no | The pages that show it, in path order, at most three. |
partial_places[].pages_total |
integer |
yes | no | How many pages show it; for a phrase, how many places in the source use it. |
partial_places[].refs_command |
string |
yes | yes | The ascribe refs command that lists where it’s used, for a phrase, and for a fragment’s place when pages was cut. |
partial_places[].has |
integer |
yes | no | How many of the words and phrases a place needs it has. |
partial_places[].lacks |
string[] |
yes | no | The words and phrases it lacks, as the query writes them, a phrase in its quotes, in the query’s order. |
SearchThrough: What a match reads through that its line doesn’t spell. One of these options:
SearchThrough with phrase: A phrase’s value, by its key.
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
phrase |
string |
yes | no |
SearchThrough with title: The title of a page a link with no text takes, or the text of the heading it names: page.md or page.md#id.
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
title |
string |
yes | no |
SearchThrough with code: A snippet’s code: its address, as written (code:app.py#main).
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
code |
string |
yes | no |
SearchPage: A page that shows a place.
| Field | Type | Required | Nullable | Description |
|---|---|---|---|---|
page |
string |
yes | no | The page’s content path. |
title |
string |
yes | yes | Its title, as a reader reads it in the first build searched that publishes the page. |
heading |
string |
yes | yes | The heading the place is under there, as a reader reads it; for a heading, the heading itself. |
id |
string |
yes | yes | That heading’s id. |
builds |
string[] |
yes | no | The builds that show it there, in the content model’s order. |