CLI reference¶
Your next step
Open a terminal in your vault folder and type uv run scat --help.
Before you start¶
- A vault folder with a
scat.tomlfile in it, for example a copy of the template. Getting started makes one. - You type every command in that folder, starting with
uv run, as inuv run scat check. The--helpblocks below showscatalone, which is what the program calls itself. - A command runs only in the stages that offer it, and the project's stage is in
lifecycle.toml:scat which-stagereads it andscat set-stagemoves it. Each command's section below says what it does, and the stage guides say which stage offers what. - Every command has a twin you call from Python:
import scat_toolsinuv run python. The twins are in the Python API reference, and they give the same messages.
The blocks below hold the exact output of --help. If your window is narrower or wider than 80 columns, your own --help wraps the lines differently.
The MCP server offers the same operations to a chat: see the MCP server reference.
Machine-readable output¶
Every command takes --json. It prints exactly one JSON document on stdout and nothing else, and the exit code is the same as without it. A program such as a plugin reads that document instead of the message. The Python twins return the same data from to_dict() (see the Python API reference). The fields, and the rule for when schema_version changes, are in the machine interface contract.
The examples below show --json once for each command, with the output a fresh copy of the template gives at that point in the page. These JSON blocks are for reading: they are not run by the docs test.
scat¶
usage: scat [-h] <command> ...
Check and work on a SCAT knowledge-graph vault. Every command has a REPL twin
(`import scat_tools`) that gives the same messages.
positional arguments:
<command>
check Check the vault against the rules. PAGE is a page name
or its path from the vault folder; without it, the
whole vault. Writes nothing.
status Show each page's status and the counts. PAGE is a page
name or its path from the vault folder; without it,
the whole vault.
which-stage Show the project's stage, from `lifecycle.toml`: who
set it, its work, its tools, and each move out of it
with who decides and, for a move that opens by itself,
whether it holds now. With no stage recorded it lists
the six stages. Writes nothing.
set-stage Move the project to the stage TO, signed with the name
of the person who said so. Only a move the current
stage lists is made; any other is refused and nothing
is written. A move that opens by itself and does not
hold now is reported and still made. Writes
`lifecycle.toml`.
set-status Set a page's status to stub, draft or done.
index Write the index page `index/<type>.base` of each type
that has none. Never rewrites one.
stub Create a stub page: a node (stakeholder, concern,
affordance or technology), a narrative, or, where the
vault's attribution mode is required or optional, a
contributor page (refused where the mode is
disallowed).
stub-links Create the node pages that the ends of rows link and
the vault lacks. PAGE limits it to one page.
record-edge Record an edge: add its row to each narrative named by
--told-by that has none, stubbing a missing node or
narrative. Leaves the links as they are. Refuses a
narrative that is done.
remove-edge Remove an edge: delete its rows, from the narratives
named by --told-by or, without it, from every
narrative that tells it. Leaves the links. Refuses a
narrative that is done.
merge Synthesise node page A into node page B, two pages of
one type, so there is one node: every link to A in the
narratives and node pages becomes a link to B, and A's
page is removed. No text is moved: A's body is not
copied (git keeps its history), B's body and
description are unchanged, and no link page is made. A
becomes B, never the other way round. Refuses, and
writes nothing, for a pair of different types, a page
that is not a node page, or a contributor page that
links A. Two rows of one narrative that would tell one
edge become one row, their notes joined by `; `. With
--plan it writes nothing and shows what the merge
would do.
rename Give node page A the new name C: the page moves to C,
and every link to A in the narratives and node pages,
every `from` and `to` cell of a narrative's table, and
the `node` of each link page is rewritten to C. The
title is kept unless --title is given. Refuses, and
writes nothing, for a name that is taken (two pages
that are one node are made one by merge), a name that
is not legal, a page that is not a node page, or a
contributor page that links A. With --plan it writes
nothing and shows what the rename would do.
link-page Create the optional link page for one narrative's
account of one node: a page with the two links and
room for notes. Nothing requires it. Refuses, and
writes nothing, when the narrative or the node does
not exist or the node is not an end of a row of the
narrative. An existing page is never written.
migrate-stakeholder
Move a vault that still names the S layer `group` to
the stakeholder, once: rename the folder `group/` to
`stakeholder/`, rewrite `type: group` to `type:
stakeholder` in each page, replace `index/group.base`,
and move `stakeholder_group_cap` into the
`stakeholder` entry of the `[caps]` table in
`scat.toml`. It changes no other text. Run twice, it
reports `unchanged`. Refuses, and writes nothing, when
`group/` and `stakeholder/` both exist. With --plan it
writes nothing and shows what it would do.
where-used Show where node page A is used: each narrative or node
page that links A, with every link and every Edges
told row that names A, and the link pages of A. It is
what you read to split A in two, or to move detail out
of it. Writes nothing.
fingerprint Show a narrative's fingerprint: its nodes by layer and
the edges its rows tell; with --candidates, also the
candidates (pairs the account links that no row
joins). NARRATIVE is a name; without it, every
narrative. Writes nothing.
edges Show every edge of one type, with the narratives that
tell it and its status. Writes nothing.
layered Show the layered view: the union of the fingerprints
of the narratives named by --narrative, or, without
it, of every narrative; with --candidates, also the
candidates (pairs the account links that no row
joins). Writes nothing.
trace Follow edges from a node: up toward the stakeholders,
down toward the technologies, or both. The node itself
is left out. Writes nothing.
evidence Show everything the vault says of one node page: the
narratives that link it, each with the paragraph
around every link and the linking sentence between >>
and <<; its edges with the narratives that tell them;
and its adjacent nodes by layer. Writes nothing.
review Show where to look next: every pair of node pages of
one type that share a twin row (one narrative tells
the same edge type for both to one other node) or an
adjacent node, the pairs with the most shared adjacent
nodes first, with the count, the twin rows, the shared
nodes and the link texts coders used. A prompt to
read, not a finding. Writes nothing.
recurrence Show how often each node and edge recurs: for every
node the number of narratives whose rows end at it and
of stakeholders that reach it; for every edge the
number of narratives that tell it and of stakeholders
that reach its first end. A count of zero or one is
marked a singleton. Writes nothing.
attribution Show the narratives by contributor: each contributor
page with the narratives that name it, and the
narratives that name none. Refuses where the vault's
attribution mode is disallowed. Writes nothing.
export-edges Write each edge table to DIR as `<type>.csv` and
`<type>.md`. Overwrites a file only when its content
differs; makes DIR if it is not there. Refuses where
`scat edges` would, and then writes nothing.
guide Show the guide of a lifecycle stage (plan, capture,
code, synthesise, analyse or report), or, without
STAGE, the index of the stages and their moves. Needs
no vault. Writes nothing.
draw Draw a view as an image (needs the extra `draw`):
`.png` or `.svg`.
options:
-h, --help show this help message and exit
Run `scat <command> --help` for a command.
scat has twenty-four commands. Each prints a message and exits with a code:
| Exit code | Meaning |
|---|---|
| 0 | No error and no refusal. Warnings alone give 0. |
| 1 | An error was found, or the command refused: it says why and gives a Fix: line. |
| 2 | The command line cannot be read (a missing argument, an unknown command). Nothing is run. |
Every command takes --root ROOT, the vault folder (default: the current folder). A command that refuses writes nothing.
import scat_tools
print(scat_tools.__doc__)
scat_tools: check and work on a SCAT knowledge-graph vault from the Python REPL.
import scat_tools
scat_tools.check() # the whole vault in the current directory
scat_tools.check("concern/x.md") # one page (a name or a path)
scat_tools.check("x", neighborhood=True)
scat_tools.status() # the same three scopes, for status
scat_tools.set_status("x", "draft")
scat_tools.index()
scat_tools.stub("x", type="concern")
scat_tools.stub_links() # or stub_links("x")
scat_tools.record_edge("holds", "a", "b", ["narrative-name"], note="")
scat_tools.merge("a", "b", plan=True) # make node page a into b (plan=False applies it); where_used("a")
scat_tools.rename("a", "c", plan=True) # give node page a the name c, rewriting every link and row (plan=False applies it)
scat_tools.link_page("narrative", "node") # the optional page for one narrative's account of one node
scat_tools.migrate_stakeholder() # once, for a vault that still names the S layer `group` (plan=True shows it)
scat_tools.remove_edge("a", "b") # or remove_edge("a", "b", ["narrative-name"])
scat_tools.load() # the knowledge graph, derived from the pages
scat_tools.fingerprint("narrative-name") # views: also edge_table("holds"), layered(), trace("node")
scat_tools.evidence("node") # one node: its narratives, paragraphs, edges and adjacent nodes
scat_tools.recurrence() # how many narratives and stakeholders reach each node and edge
scat_tools.review() # pairs of pages that share a twin row or an adjacent node
scat_tools.attribution() # narratives by contributor (where the vault's mode allows attribution)
scat_tools.export_edges("tables") # the three edge tables, as CSV and Markdown, into this folder
scat_tools.guide("code") # a lifecycle stage's guide (no stage: the index); no vault needed
scat_tools.which_stage() # the project's stage, from `lifecycle.toml`, and its exits
scat_tools.set_stage("synthesise", "Ada") # a move the stage lists, signed with the name of the person who said so
The functions above do not look at the project's stage: the REPL is a library. The `scat` command does: it refuses a
command the stage does not offer, as the MCP server does (`scat which-stage`, `scat set-stage`).
Each call takes `root=` (the vault folder; default: the current directory) and returns an object whose
`str()` is the message the `scat` command prints, and which prints as that message. `.ok` is False when
there is an error or a refusal (warnings alone leave it True): it is what the command's exit code is.
uv run scat --help
The output is the block above.
scat check¶
usage: scat check [-h] [--root ROOT] [--json] [--neighborhood] [PAGE]
Check the vault against the rules. PAGE is a page name or its path from the vault folder; without it, the whole vault. Writes nothing.
positional arguments:
PAGE check this page only
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
--neighborhood check PAGE and every page one link away, in either direction
REPL: `scat_tools.check()`, `scat_tools.check("<page>")`, `scat_tools.check("<page>", neighborhood=True)`
Checks the whole vault, one page, or one page and every page one link away. It writes nothing. It prints each problem with its rule id and a Fix: line, then a count line, or no problems.
Exit codes: 0 when there are no errors (warnings are fine), 1 when there is an error or a refusal (a page that is not there, a vault folder that is not there, --neighborhood without PAGE).
scat_tools.check()
scat_tools.check("anonymity", neighborhood=True)
no problems
no problems
uv run scat check
uv run scat check anonymity --neighborhood
no problems
no problems
With --json, on the unchanged template:
$ uv run scat check --json
{
"schema_version": 3,
"kind": "check",
"operation": "check",
"ok": true,
"mode": "disallowed",
"problems": []
}
To see a problem with a fix a program can apply, change [[cap-setting]] to [[cap-settin]] in the second row of the table of narrative/groups-under-a-cap-pitch.md (line 22), a one-letter typo in a link. The fix has three options: a replace-text edit that writes the right name, a command that creates the missing page, and a delete-line edit. scat check exits with 1.
$ uv run scat check --json
{
"schema_version": 3,
"kind": "check",
"operation": "check",
"ok": false,
"mode": "disallowed",
"problems": [
{
"rule": "SCAT-END-NOPAGE",
"severity": "error",
"file": "narrative/groups-under-a-cap-pitch.md",
"line": 22,
"column": 55,
"field": null,
"where": "row 2 cell `to`",
"what": "[[cap-settin]] does not reach a page (no page is named cap-settin)",
"repeat": 1,
"fix": {
"kind": "options",
"options": [
{
"kind": "exact",
"text": "replace `[[cap-settin]]` with `[[cap-setting]]`",
"edits": [
{
"action": "replace-text",
"file": "narrative/groups-under-a-cap-pitch.md",
"line": 22,
"column": 55,
"find": "[[cap-settin]]",
"replace": "[[cap-setting]]"
}
]
},
{
"kind": "exact",
"text": "run `scat stub cap-settin --type technology` (REPL: `scat_tools.stub(\"cap-settin\", type=\"technology\")`) to create a technology page",
"command": {
"argv": [
"stub",
"cap-settin",
"--type",
"technology"
],
"repl": "scat_tools.stub(\"cap-settin\", type=\"technology\")"
}
},
{
"kind": "exact",
"text": "delete the row",
"edits": [
{
"action": "delete-line",
"file": "narrative/groups-under-a-cap-pitch.md",
"line": 22,
"find": "| [[groups-clustered-under-a-cap]] | is provided by | [[cap-settin]] | The cap setting is what fixes the number of stakeholders. The cap is a per-instance parameter; the example vault sets it to 6. |"
}
]
}
],
"notes": []
},
"text": "error [SCAT-END-NOPAGE] narrative/groups-under-a-cap-pitch.md:22:55 row 2 cell `to`: [[cap-settin]] does not reach a page (no page is named cap-settin)\n Fix (the coder chooses one):\n 1. replace `[[cap-settin]]` with `[[cap-setting]]`\n 2. run `scat stub cap-settin --type technology` (REPL: `scat_tools.stub(\"cap-settin\", type=\"technology\")`) to create a technology page\n 3. delete the row"
}
]
}
Change the typo back ([[cap-settin]] to [[cap-setting]]) before you type the next commands, which assume the narrative as the template has it.
scat status¶
usage: scat status [-h] [--root ROOT] [--json] [--neighborhood] [PAGE]
Show each page's status and the counts. PAGE is a page name or its path from the vault folder; without it, the whole vault.
positional arguments:
PAGE show this page only
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
--neighborhood show PAGE and every page one link away, in either direction
REPL: `scat_tools.status()`, `scat_tools.status("<page>")`, `scat_tools.status("<page>", neighborhood=True)`
Shows the status of each page, then the counts. It writes nothing. The status is stub, draft or done.
Exit codes: 0, or 1 for a refusal (a page that is not there, a vault folder that is not there, --neighborhood without PAGE).
scat_tools.status("anonymity")
scat_tools.status("anonymity", neighborhood=True)
done concern/anonymity.md
1 done
done concern/anonymity.md
done concern/attribution.md
done narrative/groups-under-a-cap-pitch.md
done narrative/notes-at-a-chatham-house-session.md
4 done
uv run scat status anonymity
uv run scat status anonymity --neighborhood
done concern/anonymity.md
1 done
done concern/anonymity.md
done concern/attribution.md
done narrative/groups-under-a-cap-pitch.md
done narrative/notes-at-a-chatham-house-session.md
4 done
With --json:
$ uv run scat status anonymity --json
{
"schema_version": 3,
"kind": "status",
"operation": "status",
"ok": true,
"mode": "disallowed",
"scope": "page",
"rows": [
{
"path": "concern/anonymity.md",
"name": "anonymity",
"type": "concern",
"status": "done"
}
],
"counts": {
"stub": 0,
"draft": 0,
"done": 1,
"other": 0
},
"notes": []
}
scat which-stage¶
usage: scat which-stage [-h] [--root ROOT] [--json]
Show the project's stage, from `lifecycle.toml`: who set it, its work, its tools, and each move out of it with who decides and, for a move that opens by itself, whether it holds now. With no stage recorded it lists the six stages. Writes nothing.
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
REPL: `scat_tools.which_stage()`
Shows the project's stage, kept in lifecycle.toml at the vault's root: the stage's name, who set it, its work, the commands it offers, and each move out of it with who decides and, for a move the tool can read from the vault, whether it holds now. It writes nothing. A vault that has no usable lifecycle.toml has no stage yet: the command says so and lists the six stages, one line each, and every other command except scat set-stage, scat guide and the one-off scat migrate-stakeholder is refused until a person names one (see Stages).
Exit codes: 0.
scat_tools.which_stage()
Stage: plan. Set the terms of the elicitation, set up the vault, and plan the sessions and the stakeholders.
Tools: check, status, stub, attribution, index, which_stage, set_stage.
Exit L2 to capture (organiser decides): the sessions are planned; person: the organiser says the sessions are planned.
Exit L3 to code (organiser decides): field notes already exist (solo trial, or notes from elsewhere); person: field notes are ready.
uv run scat which-stage
Stage: plan. Set the terms of the elicitation, set up the vault, and plan the sessions and the stakeholders.
Tools: check, status, stub, attribution, index, which_stage, set_stage.
Exit L2 to capture (organiser decides): the sessions are planned; person: the organiser says the sessions are planned.
Exit L3 to code (organiser decides): field notes already exist (solo trial, or notes from elsewhere); person: field notes are ready.
scat set-stage¶
usage: scat set-stage [-h] [--root ROOT] [--json] --to STAGE [--by NAME]
Move the project to the stage TO, signed with the name of the person who said so. Only a move the current stage lists is made; any other is refused and nothing is written. A move that opens by itself and does not hold now is reported and still made. Writes `lifecycle.toml`.
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
--to STAGE the stage to move to: plan, capture, code, synthesise, analyse
or report
--by NAME the name of the person who said so; without it the move is
refused
REPL: `scat_tools.set_stage("<stage>", "<name>")`
Moves the project to the stage --to, and writes it, with the name after --by, to lifecycle.toml. The name is the person who said the move: the tool records it as a signature and cannot check it. Only a move the current stage lists is made (the moves are in the stage guides); any other move, a stage that is not one of the six, the stage the project is already in, and a move with no --by are refused, and nothing is written. A move the tool can read from the vault, such as the move from code to synthesise once every narrative is done, is reported when it does not yet hold and is still made, because the person decides. A vault with no stage may be given any stage.
Exit codes: 0, or 1 for a refusal.
The two tabs are two moves in turn: the project goes from plan to capture, then from capture to code.
scat_tools.set_stage("capture", "Ada Lovelace")
Moved from plan to capture (L2, organiser decides), set by Ada Lovelace.
uv run scat set-stage --to code --by "Ada Lovelace"
Moved from capture to code (L4, organiser decides), set by Ada Lovelace.
From here the page's commands run in the stages that offer them. The next stage is synthesise, for merge, rename, where-used and link-page.
scat set-status¶
usage: scat set-status [-h] [--root ROOT] [--json] PAGE STATUS
Set a page's status to stub, draft or done.
positional arguments:
PAGE the page's name or path
STATUS stub, draft or done
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
REPL: `scat_tools.set_status("<page-name>", "<status>")`
Changes the status: line of one page and nothing else in the file. PAGE is a name or a path. Setting a narrative or a node to done is judged as the page would stand at done, and refused while it would fail: the refusal lists each error with its fix and writes nothing (see Coding).
Exit codes: 0 when the status was changed or already was that value, 1 for a refusal (not a status, no such page, a page that would fail at done).
scat_tools.set_status("anonymity", "draft")
changed concern/anonymity.md
note: `status` set to draft (was done)
uv run scat set-status attribution draft
changed concern/attribution.md
note: `status` set to draft (was done)
The CLI example uses a different page from the Python one, so both can run in one vault. Running either again prints unchanged and a note that the status is already draft, and still exits with 0.
With --json:
$ uv run scat set-status attribution draft --json
{
"schema_version": 3,
"kind": "operation",
"operation": "set-status",
"ok": true,
"mode": "disallowed",
"created": [],
"changed": [],
"unchanged": [
"concern/attribution.md"
],
"refused": [],
"notes": [
"status is already draft"
]
}
A refusal has the same shape, with ok false and the reason in refused; the exit code is 1:
$ uv run scat set-status attribution finished --json
{
"schema_version": 3,
"kind": "operation",
"operation": "set-status",
"ok": false,
"mode": "disallowed",
"created": [],
"changed": [],
"unchanged": [],
"refused": [
{
"subject": "status `finished`",
"why": "this is not a status",
"fix": {
"kind": "manual",
"options": [
{
"kind": "manual",
"text": "use one of: stub, draft, done (stub: a name, perhaps some metadata; draft: content, not yet complete; done: complete, conformant and signed off by the coder)"
}
],
"notes": []
}
}
],
"notes": []
}
scat index¶
usage: scat index [-h] [--root ROOT] [--json]
Write the index page `index/<type>.base` of each type that has none. Never rewrites one.
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
REPL: `scat_tools.index()`
Writes index/<type>.base, the index page of each type, for each one that is missing, and never rewrites one. It prints one line per file: created, changed or unchanged. The template ships all five, so on it every line says unchanged.
Exit codes: 0, or 1 for a refusal (another file holds an index page's name).
scat_tools.index()
unchanged index/stakeholder.base
unchanged index/concern.base
unchanged index/affordance.base
unchanged index/technology.base
unchanged index/narrative.base
uv run scat index
unchanged index/stakeholder.base
unchanged index/concern.base
unchanged index/affordance.base
unchanged index/technology.base
unchanged index/narrative.base
With --json:
$ uv run scat index --json
{
"schema_version": 3,
"kind": "operation",
"operation": "index",
"ok": true,
"mode": "disallowed",
"created": [],
"changed": [],
"unchanged": [
"index/stakeholder.base",
"index/concern.base",
"index/affordance.base",
"index/technology.base",
"index/narrative.base"
],
"refused": [],
"notes": []
}
scat stub¶
usage: scat stub [-h] [--root ROOT] [--json] --type TYPE NAME
Create a stub page: a node (stakeholder, concern, affordance or technology), a narrative, or, where the vault's attribution mode is required or optional, a contributor page (refused where the mode is disallowed).
positional arguments:
NAME the new page's name: a-z, 0-9 and hyphens
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
--type TYPE the page's type, one of: stakeholder, concern, affordance,
technology, narrative, contributor
REPL: `scat_tools.stub("<page-name>", type="<type>")`
Creates one page with status: stub. The --type option is required. A node (stakeholder, concern, affordance, technology), a narrative, or a contributor page. A contributor page is made only where the vault's attribution mode (in scat.toml) is required or optional; in disallowed mode the command refuses and says that the vault holds no contributor page.
Exit codes: 0 when the page was created, 1 for a refusal (not a legal name, a file already has the name, not a stubbable type, or a contributor page where the attribution mode is disallowed). A missing --type is a command line that cannot be read: exit code 2.
The CLI example uses different names from the Python one, so both can run in one vault.
scat_tools.stub("reading-group", type="concern")
scat_tools.stub("desk-notes-one", type="narrative")
created concern/reading-group.md
created narrative/desk-notes-one.md
uv run scat stub study-circle --type concern
uv run scat stub desk-notes-two --type narrative
created concern/study-circle.md
created narrative/desk-notes-two.md
With --json:
$ uv run scat stub study-circle-two --type concern --json
{
"schema_version": 3,
"kind": "operation",
"operation": "stub",
"ok": true,
"mode": "disallowed",
"created": [
"concern/study-circle-two.md"
],
"changed": [],
"unchanged": [],
"refused": [],
"notes": []
}
scat stub-links¶
usage: scat stub-links [-h] [--root ROOT] [--json] [PAGE]
Create the node pages that the ends of rows link and the vault lacks. PAGE limits it to one page.
positional arguments:
PAGE look at this page's links only
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
REPL: `scat_tools.stub_links()`, `scat_tools.stub_links("<page>")`
Creates the node pages that the ends of rows link and the vault lacks, each of the type its layer fixes, from one page or the whole vault. A link elsewhere in a narrative names no layer, so it is reported as a note and made with scat stub. When there is nothing to create it prints stub-links: nothing to do.
Exit codes: 0 when it created pages or had nothing to do, 1 for a refusal (a page that is not there).
scat_tools.stub_links()
stub-links: nothing to do
uv run scat stub-links
stub-links: nothing to do
With --json:
$ uv run scat stub-links --json
{
"schema_version": 3,
"kind": "operation",
"operation": "stub-links",
"ok": true,
"mode": "disallowed",
"created": [],
"changed": [],
"unchanged": [],
"refused": [],
"notes": []
}
scat record-edge¶
usage: scat record-edge [-h] [--root ROOT] [--json] --told-by NARRATIVE
[--note TEXT]
TYPE FROM TO
Record an edge: add its row to each narrative named by --told-by that has none, stubbing a missing node or narrative. Leaves the links as they are. Refuses a narrative that is done.
positional arguments:
TYPE one of: holds (stakeholder then concern), addressed-by
(concern then affordance), provided-by (affordance then
technology)
FROM the name of the node at the first end
TO the name of the node at the second end
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default:
here)
--json print the result as one JSON document (machine-
interface contract), nothing else
--told-by NARRATIVE the narrative that tells the edge; repeat it for each
narrative
--note TEXT the row's note (default: none)
REPL: `scat_tools.record_edge("<type>", "<from>", "<to>", ["<narrative>"], note="<text>")`
Records an edge: adds its row to each narrative named by --told-by that has none, makes a missing node or narrative as a stub, and leaves every link alone. TYPE is holds, addressed-by or provided-by (the verb, such as "is addressed by", is accepted too). If a narrative already has the row it prints unchanged and writes nothing. --note is the row's note.
Exit codes: 0 when it changed or found the row there, 1 for a refusal (a narrative that is done, an unknown type, ends in the wrong layers, the same name at both ends).
scat_tools.record_edge("holds", "project-leads", "reading-group", ["desk-notes-one"], note="Said twice.")
changed narrative/desk-notes-one.md
note: added `| [[project-leads]] | holds | [[reading-group]] | Said twice. |` to narrative/desk-notes-one.md at line 12
uv run scat record-edge holds project-leads study-circle --told-by desk-notes-two --note "Said twice."
changed narrative/desk-notes-two.md
note: added `| [[project-leads]] | holds | [[study-circle]] | Said twice. |` to narrative/desk-notes-two.md at line 12
With --json, which adds the edge and the rows added:
$ uv run scat record-edge addressed-by study-circle reading-shelf --told-by desk-notes-two --json
{
"schema_version": 3,
"kind": "operation",
"operation": "record-edge",
"ok": true,
"mode": "disallowed",
"created": [
"affordance/reading-shelf.md"
],
"changed": [
"narrative/desk-notes-two.md"
],
"unchanged": [],
"refused": [],
"notes": [
"added `| [[study-circle]] | is addressed by | [[reading-shelf]] | |` to narrative/desk-notes-two.md at line 13"
],
"edge": {
"type": "addressed-by",
"from": "study-circle",
"to": "reading-shelf",
"narratives": [
"desk-notes-two"
]
},
"rows_added": [
{
"narrative": "desk-notes-two",
"file": "narrative/desk-notes-two.md",
"line": 13,
"note": ""
}
],
"rows_removed": []
}
scat remove-edge¶
usage: scat remove-edge [-h] [--root ROOT] [--json] [--told-by NARRATIVE]
FROM TO
Remove an edge: delete its rows, from the narratives named by --told-by or, without it, from every narrative that tells it. Leaves the links. Refuses a narrative that is done.
positional arguments:
FROM the name of the node at the first end
TO the name of the node at the second end
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default:
here)
--json print the result as one JSON document (machine-
interface contract), nothing else
--told-by NARRATIVE remove the rows of this narrative only; repeat it for
each narrative
REPL: `scat_tools.remove_edge("<from>", "<to>")`, `scat_tools.remove_edge("<from>", "<to>", ["<narrative>"])`
Removes an edge: deletes its rows, from the narratives named by --told-by or, without it, from every narrative that tells it. The links stay. It refuses a narrative that is done: set it to draft first. When no narrative tells the edge it prints remove-edge: nothing to do.
Exit codes: 0, or 1 for a refusal (a narrative that is done).
scat_tools.remove_edge("project-leads", "reading-group")
changed narrative/desk-notes-one.md
note: removed the row at line 12 of narrative/desk-notes-one.md
note: the links stay in the narratives; remove one by hand if the account no longer names it
uv run scat remove-edge project-leads study-circle
changed narrative/desk-notes-two.md
note: removed the row at line 12 of narrative/desk-notes-two.md
note: the links stay in the narratives; remove one by hand if the account no longer names it
With --json:
$ uv run scat remove-edge study-circle reading-shelf --json
{
"schema_version": 3,
"kind": "operation",
"operation": "remove-edge",
"ok": true,
"mode": "disallowed",
"created": [],
"changed": [
"narrative/desk-notes-two.md"
],
"unchanged": [],
"refused": [],
"notes": [
"removed the row at line 12 of narrative/desk-notes-two.md",
"the links stay in the narratives; remove one by hand if the account no longer names it"
],
"edge": {
"type": "addressed-by",
"from": "study-circle",
"to": "reading-shelf",
"narratives": []
},
"rows_added": [],
"rows_removed": [
{
"narrative": "desk-notes-two",
"file": "narrative/desk-notes-two.md",
"line": 12,
"note": ""
}
]
}
scat merge¶
Merging, renaming and looking up where a node is used are the work of the synthesise stage: a vault in the code stage refuses them. When every narrative is coded, move the project there. The tool reports whether the move is open, and the person decides:
uv run scat set-stage --to synthesise --by "Ada Lovelace"
usage: scat merge [-h] [--root ROOT] [--json] [--plan] A B
Synthesise node page A into node page B, two pages of one type, so there is one node: every link to A in the narratives and node pages becomes a link to B, and A's page is removed. No text is moved: A's body is not copied (git keeps its history), B's body and description are unchanged, and no link page is made. A becomes B, never the other way round. Refuses, and writes nothing, for a pair of different types, a page that is not a node page, or a contributor page that links A. Two rows of one narrative that would tell one edge become one row, their notes joined by `; `. With --plan it writes nothing and shows what the merge would do.
positional arguments:
A the node page that becomes B, and is removed
B the node page that stays
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
--plan show what the merge would do and write nothing
REPL: `scat_tools.merge("<a>", "<b>")`, `scat_tools.merge("<a>", "<b>", plan=True)`
Makes node page A into node page B, two pages of one type, when you have found that they name one node. The two become one node: B stays and A goes.
- Every link to A in the narratives and node pages becomes a link to B, in the body only. A bare link in prose keeps what you read:
[[A]]becomes[[B|A]]. A link that is a wholefromortocell of anEdges toldrow stays bare,[[B]]. An alias, a heading, a block reference and an embed keep their form. A link in a fenced block or a code span is not a link and is left as it is. Thenodeof each link page that names A names B. A page's other frontmatter is never changed. - No text is moved. A's body is not copied anywhere, and git keeps the history of A's page; B's body and description are unchanged, and no link page is made. What only A said is yours to write into B, in your own words:
scat evidence Bshows the narratives, andscat where-used A, before the merge, shows where A is used. A's description is dropped: B keeps its own, and its status and other fields do not change. - A's page is removed, and an index page that is missing is written.
- A narrative that is
donestaysdone. The result lists each one whose text changed, so that you can read it again. - When the merge would make a narrative's table hold two rows for one edge (the same type,
fromandto), the first row stays and its note is the notes of the rows joined by;(an empty note is dropped). This holds for adonenarrative too. The plan lists each such narrative.
The merge is tried out before anything is written. The whole result is built in a temporary copy of the vault, which must pass the check with no new error, hold no link to A, and give the same graph as before with A renamed B: the same edges, the narratives that tell each, and each narrative's fingerprint. If any of that fails, nothing is written. With --plan the command does all of that and then stops: it prints what the merge would do and writes nothing.
It refuses, and writes nothing, for a name that is no page, one page named twice, a pair of different types, a page that is not a node page (a narrative or a contributor page), a contributor page whose body links A (it is listed: a merge never writes a contributor page), and a page it reads or writes that has an error in the check. The assistant over MCP can show the plan but cannot apply a merge.
Exit codes: 0, or 1 for a refusal.
scat_tools.merge("project-leads", "workshop-participants", plan=True)
merge plan: `project-leads` becomes `workshop-participants`; nothing is written
3 links to `project-leads` would be rewritten
would change narrative/false-start-and-clean-restart.md (2 links)
would change narrative/two-branches-and-tags-pitch.md (1 link)
would remove stakeholder/project-leads.md
would change 2 `done` narratives (they stay `done`): false-start-and-clean-restart, two-branches-and-tags-pitch
note: the body of `project-leads` is not copied: no text is moved, and git keeps the history of its page
note: the description of `project-leads` is dropped; `workshop-participants` keeps its own, and its body, its status (`done`) and other fields are unchanged
note: what only `project-leads` said stays in git; to carry any of it into `workshop-participants`, read the narratives (`scat evidence workshop-participants`) and write it in your own words
note: a `done` narrative whose text changes stays `done`: read it again before you rely on it
uv run scat merge --plan project-leads workshop-participants
The same text.
A pair of different types is refused, and nothing is written:
$ uv run scat merge --plan project-leads gated-approval
refused project-leads and gated-approval: `project-leads` is a stakeholder and `gated-approval` is an affordance: a merge needs two pages of one type
Fix: name two node pages of one type (stakeholder, concern, affordance, technology): `scat merge A B` makes A into B
With --json:
$ uv run scat merge --plan project-leads workshop-participants --json
{
"schema_version": 3,
"kind": "operation",
"operation": "merge",
"ok": true,
"mode": "disallowed",
"created": [],
"changed": [
"narrative/false-start-and-clean-restart.md",
"narrative/two-branches-and-tags-pitch.md"
],
"unchanged": [],
"refused": [],
"notes": [
"the body of `project-leads` is not copied: no text is moved, and git keeps the history of its page",
"the description of `project-leads` is dropped; `workshop-participants` keeps its own, and its body, its status (`done`) and other fields are unchanged",
"what only `project-leads` said stays in git; to carry any of it into `workshop-participants`, read the narratives (`scat evidence workshop-participants`) and write it in your own words",
"a `done` narrative whose text changes stays `done`: read it again before you rely on it"
],
"plan": true,
"removed": [
"stakeholder/project-leads.md"
],
"done_narratives": [
"false-start-and-clean-restart",
"two-branches-and-tags-pitch"
],
"links_rewritten": [
{
"file": "narrative/false-start-and-clean-restart.md",
"links": 2
},
{
"file": "narrative/two-branches-and-tags-pitch.md",
"links": 1
}
]
}
In the document, plan is true when nothing was written (changed and removed are then what a merge would do), removed names the page that became the other, done_narratives the done narratives whose text changes, and links_rewritten the number of links in each file.
scat rename¶
usage: scat rename [-h] [--root ROOT] [--json] [--title TITLE] [--plan] A C
Give node page A the new name C: the page moves to C, and every link to A in the narratives and node pages, every `from` and `to` cell of a narrative's table, and the `node` of each link page is rewritten to C. The title is kept unless --title is given. Refuses, and writes nothing, for a name that is taken (two pages that are one node are made one by merge), a name that is not legal, a page that is not a node page, or a contributor page that links A. With --plan it writes nothing and shows what the rename would do.
positional arguments:
A the node page to rename
C its new name: a-z, 0-9 and hyphens
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
--title TITLE also set the page's title (default: keep it)
--plan show what the rename would do and write nothing
REPL: `scat_tools.rename("<a>", "<c>")`, `scat_tools.rename("<a>", "<c>", plan=True)`
Gives node page A a new name, C, and makes every link and table row that named A name C. It is the simplest move toward a more abstract word: "broken drill" becomes "unsafe equipment". Nothing about the node changes but its name.
- The page moves to C in its own folder. Its
titleis kept as it was, unless you give--title. - Every link to A in the narratives and node pages becomes a link to C, in the body only. A bare link in prose keeps what you read:
[[A]]becomes[[C|A]]. A link that is a wholefromortocell of anEdges toldrow stays bare,[[C]]. An alias, a heading, a block reference and an embed keep their form. A link in a fenced block or a code span is left as it is. - The
nodeof each link page that names A names C. - A narrative that is
donestaysdone. The result lists each one whose text changed, so that you can read it again. - When the merge would make a narrative's table hold two rows for one edge (the same type,
fromandto), the first row stays and its note is the notes of the rows joined by;(an empty note is dropped). This holds for adonenarrative too. The plan lists each such narrative.
The rename is tried out before anything is written, as a merge is: the whole result is built in a temporary copy of the vault, which must pass the check with no new error, hold no link to A, and give the same graph as before with A called C. If any of that fails, nothing is written. With --plan the command does all of that and then stops.
It refuses, and writes nothing, for a name C that is taken (two pages that are one node are made one with scat merge), a name that is not legal (a-z, 0-9 and single hyphens), a page that is no node page or is a contributor page, a contributor page whose body links A (a rename never writes one), and a page it reads that has an error in the check. The assistant over MCP can show the plan but cannot apply a rename.
Exit codes: 0, or 1 for a refusal.
scat_tools.rename("gated-approval", "gated-merge", plan=True)
rename plan: `gated-approval` would be called `gated-merge`; nothing is written
5 links to `gated-approval` would be rewritten
would move affordance/gated-approval.md to affordance/gated-merge.md
would change narrative/false-start-and-clean-restart.md (2 links)
would change narrative/two-branches-and-tags-pitch.md (3 links)
would change 2 `done` narratives (they stay `done`): false-start-and-clean-restart, two-branches-and-tags-pitch
note: the title of `gated-merge` is kept as it was: `scat rename gated-approval gated-merge --title "..."` sets it
note: a `done` narrative whose text changes stays `done`: read it again before you rely on it
uv run scat rename --plan gated-approval gated-merge
The same text.
With --json the document is an operation with plan, moved (from and to), done_narratives and links_rewritten (file and links), besides the fields of every operation.
scat link-page¶
usage: scat link-page [-h] [--root ROOT] [--json] NARRATIVE NODE
Create the optional link page for one narrative's account of one node: a page with the two links and room for notes. Nothing requires it. Refuses, and writes nothing, when the narrative or the node does not exist or the node is not an end of a row of the narrative. An existing page is never written.
positional arguments:
NARRATIVE the narrative's name
NODE the name of a stakeholder, concern, affordance or technology
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
REPL: `scat_tools.link_page("<narrative>", "<node>")`
Makes the optional link page for one narrative's account of one node: a page in link/ with the two links in its frontmatter and an empty body, for you to write notes in. Use it when a narrative says something about a node that no other account does. Nothing requires a link page, no rule fires because one is absent, and the page holds no structure: the edge stays the row of the narrative's table.
The page is named from the narrative and the node. The node must be an end of a row of the narrative, and the command refuses, writing nothing, when it is not, or when either name is no page of its kind. When a page for the same narrative and node exists, it says so and writes nothing. The check (SCAT-LINKPAGE) holds a link page to the same condition. A merge or a rename of the node follows it into the link page's node.
Exit codes: 0, or 1 for a refusal.
scat_tools.link_page("false-start-and-clean-restart", "project-leads")
created link/false-start-and-clean-restart-project-leads.md
uv run scat link-page false-start-and-clean-restart project-leads
The same text.
The page it writes:
---
type: link
narrative: "[[false-start-and-clean-restart]]"
node: "[[project-leads]]"
---
scat migrate-stakeholder¶
usage: scat migrate-stakeholder [-h] [--root ROOT] [--json] [--plan]
Move a vault that still names the S layer `group` to the stakeholder, once: rename the folder `group/` to `stakeholder/`, rewrite `type: group` to `type: stakeholder` in each page, replace `index/group.base`, and move `stakeholder_group_cap` into the `stakeholder` entry of the `[caps]` table in `scat.toml`. It changes no other text. Run twice, it reports `unchanged`. Refuses, and writes nothing, when `group/` and `stakeholder/` both exist. With --plan it writes nothing and shows what it would do.
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
--plan show what the migration would do and write nothing
REPL: `scat_tools.migrate_stakeholder()`, `scat_tools.migrate_stakeholder(plan=True)`
If your vault still has a group/ folder, run uv run scat migrate-stakeholder once. It moves the vault to the stakeholder layer:
- The folder
group/is renamedstakeholder/. type: groupbecomestype: stakeholderin each page of the folder.index/group.baseis replaced byindex/stakeholder.base.- The line
stakeholder_group_cap = Ninscat.tomlbecomesstakeholder = Nunder a[caps]heading.
It changes no other text. Run a second time, it prints unchanged for each of the three. With --plan it writes nothing and prints what it would do. It refuses, and writes nothing, when group/ and stakeholder/ both exist: move the pages by hand into one folder and run it again.
The output below is from a vault that still has a group/ folder. On a vault that is already in the new shape, every line says unchanged.
scat_tools.migrate_stakeholder(plan=True)
note: plan: nothing is written; the migration would rename the folder `group/` to `stakeholder/`; rewrite `type: group` to `type: stakeholder` in 3 page(s); replace `index/group.base` with `index/stakeholder.base`; move `stakeholder_group_cap` into the `stakeholder` entry of `[caps]` in `scat.toml`
uv run scat migrate-stakeholder --plan
The same text.
Without --plan it writes, and prints one line for each file it changed:
$ uv run scat migrate-stakeholder
changed index/stakeholder.base
changed scat.toml
changed stakeholder/facilitator-analysts.md
changed stakeholder/project-leads.md
changed stakeholder/workshop-participants.md
Run again, it finds nothing to do:
$ uv run scat migrate-stakeholder
unchanged stakeholder
unchanged index/stakeholder.base
unchanged scat.toml
With --json, on a vault already in the new shape:
$ uv run scat migrate-stakeholder --json
{
"schema_version": 3,
"kind": "operation",
"operation": "migrate-stakeholder",
"ok": true,
"mode": "disallowed",
"created": [],
"changed": [],
"unchanged": [
"stakeholder",
"index/stakeholder.base",
"scat.toml"
],
"refused": [],
"notes": []
}
scat where-used¶
usage: scat where-used [-h] [--root ROOT] [--json] A
Show where node page A is used: each narrative or node page that links A, with every link and every Edges told row that names A, and the link pages of A. It is what you read to split A in two, or to move detail out of it. Writes nothing.
positional arguments:
A the node page to look up
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
REPL: `scat_tools.where_used("<a>")`
Shows where node page A is used, when you want to split it in two or to move detail out of it. It writes nothing. For each narrative (or node page) that links A it gives every link, by line and column, and every Edges told row that names A, as written; the link pages of A are named in a note. To split A you assign each narrative to A or to a new page (made with scat stub), then edit each link and row by hand. Merge and rename keep done narratives done; to edit a done narrative by hand, set it to draft first. For a node the output notes the layer's cap in scat.toml and whether a new page would go over it; it does not refuse for that. A contributor page is never listed.
It refuses a name that is no page, a page that is not a node page, and a page it reads that has an error in the check.
Exit codes: 0, or 1 for a refusal.
scat_tools.where_used("project-leads")
where used: `project-leads` (stakeholder) in 1 page: 2 links, 1 row; nothing is written
narrative/false-start-and-clean-restart.md (narrative, done): links at line 13, 28
row 1, line 28: | [[project-leads]] | holds | [[intent-without-drift]] | The project leads hold these as the concerns of the false-start story. |
note: you assign each narrative to `project-leads` or to a new page: make the new page with `scat stub <name> --type stakeholder`, then edit each link and row by hand
note: merge and rename keep done narratives done; to edit a done narrative by hand, set it to draft first: false-start-and-clean-restart
note: the vault's cap for stakeholder pages: cap 6, now 3
uv run scat where-used project-leads
The same text.
With --json the document adds node, node_type and pages. Each page has file, name, type, status, links (line, column) and rows (row, line, text).
scat fingerprint¶
The views are the work of the analyse stage, and synthesise does not offer them. When the codes are consolidated, move the project on:
uv run scat set-stage --to analyse --by "Ada Lovelace"
usage: scat fingerprint [-h] [--root ROOT] [--json] [--candidates]
[--claim-type VALUE] [--kind VALUE]
[NARRATIVE]
Show a narrative's fingerprint: its nodes by layer and the edges its rows tell; with --candidates, also the candidates (pairs the account links that no row joins). NARRATIVE is a name; without it, every narrative. Writes nothing.
positional arguments:
NARRATIVE show this narrative only
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
--candidates also show the candidates: pairs of nodes the account
links that no row joins
--claim-type VALUE limit the view to narratives with this claim type, one
of: actual, hypothetical, unclassified; repeat it for
more than one (no filter unless you give it)
--kind VALUE limit the view to narratives of this kind, one of:
scenario, architecture; repeat it for more than one (no
filter unless you give it)
REPL: `scat_tools.fingerprint()`, `scat_tools.fingerprint("<narrative>", candidates=True)`
Shows what one narrative tells: its nodes by layer, the edges its rows tell (each with its status and every narrative that tells it), and, with --candidates, the candidates, which are pairs of nodes that the account links, that an edge type fits, and that no row joins. Without the option the fingerprint shows no candidates. Without NARRATIVE it shows every narrative, in path order. It writes nothing and never shows a relationship annotation.
--claim-type and --kind limit the view to narratives with one of the values given (repeat the option for more than one); the output then says which filter it applied and names the narratives it left out. Without them no mark changes anything.
It refuses, writing nothing, when the name is not a narrative, when two pages share the name, and when a page it draws has an error: the refusal carries those problems with their fixes.
Exit codes: 0, or 1 for a refusal.
scat_tools.fingerprint("groups-under-a-cap-pitch")
fingerprint groups-under-a-cap-pitch (done)
concern
anonymity [draft]
affordance
groups-clustered-under-a-cap [done]
technology
cap-setting [done]
edges
addressed-by: anonymity -> groups-clustered-under-a-cap [done; told by groups-under-a-cap-pitch, notes-at-a-chatham-house-session]
provided-by: groups-clustered-under-a-cap -> cap-setting [done; told by groups-under-a-cap-pitch]
uv run scat fingerprint groups-under-a-cap-pitch
fingerprint groups-under-a-cap-pitch (done)
concern
anonymity [draft]
affordance
groups-clustered-under-a-cap [done]
technology
cap-setting [done]
edges
addressed-by: anonymity -> groups-clustered-under-a-cap [done; told by groups-under-a-cap-pitch, notes-at-a-chatham-house-session]
provided-by: groups-clustered-under-a-cap -> cap-setting [done; told by groups-under-a-cap-pitch]
With --json:
$ uv run scat fingerprint groups-under-a-cap-pitch --json
{
"schema_version": 3,
"kind": "view",
"operation": "fingerprint",
"ok": true,
"mode": "disallowed",
"narratives": [
{
"name": "groups-under-a-cap-pitch",
"status": "done",
"nodes": [
{
"name": "anonymity",
"type": "concern",
"status": "draft"
},
{
"name": "groups-clustered-under-a-cap",
"type": "affordance",
"status": "done"
},
{
"name": "cap-setting",
"type": "technology",
"status": "done"
}
],
"edges": [
{
"type": "addressed-by",
"from": "anonymity",
"to": "groups-clustered-under-a-cap",
"narratives": [
"groups-under-a-cap-pitch",
"notes-at-a-chatham-house-session"
],
"status": "done"
},
{
"type": "provided-by",
"from": "groups-clustered-under-a-cap",
"to": "cap-setting",
"narratives": [
"groups-under-a-cap-pitch"
],
"status": "done"
}
]
}
],
"excluded": []
}
With --candidates each narrative also has a candidates list (here "candidates": []); without the option the key is absent.
scat edges¶
usage: scat edges [-h] [--root ROOT] [--json] [--claim-type VALUE]
[--kind VALUE]
TYPE
Show every edge of one type, with the narratives that tell it and its status. Writes nothing.
positional arguments:
TYPE one of: holds (stakeholder then concern), addressed-by
(concern then affordance), provided-by (affordance then
technology)
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
--claim-type VALUE limit the view to narratives with this claim type, one
of: actual, hypothetical, unclassified; repeat it for
more than one (no filter unless you give it)
--kind VALUE limit the view to narratives of this kind, one of:
scenario, architecture; repeat it for more than one (no
filter unless you give it)
REPL: `scat_tools.edge_table("<type>")`
Shows every edge of one type, in the order of the graph: the two ends, the narratives that tell it and its status. It writes nothing.
--claim-type and --kind limit the view to narratives with one of the values given (repeat the option for more than one); the output then says which filter it applied and names the narratives it left out. Without them no mark changes anything.
Exit codes: 0, or 1 for a refusal (a type that is not one of the three, a page it draws that has an error).
scat_tools.edge_table("holds")
edges holds (stakeholder -> concern): 2
holds: facilitator-analysts -> anonymity [done; told by notes-at-a-chatham-house-session]
holds: project-leads -> intent-without-drift [done; told by false-start-and-clean-restart]
uv run scat edges holds
edges holds (stakeholder -> concern): 2
holds: facilitator-analysts -> anonymity [done; told by notes-at-a-chatham-house-session]
holds: project-leads -> intent-without-drift [done; told by false-start-and-clean-restart]
With --json:
$ uv run scat edges holds --json
{
"schema_version": 3,
"kind": "view",
"operation": "edges",
"ok": true,
"mode": "disallowed",
"edge_type": "holds",
"from_layer": "stakeholder",
"to_layer": "concern",
"rows": [
{
"type": "holds",
"from": "facilitator-analysts",
"to": "anonymity",
"narratives": [
"notes-at-a-chatham-house-session"
],
"status": "done"
},
{
"type": "holds",
"from": "project-leads",
"to": "intent-without-drift",
"narratives": [
"false-start-and-clean-restart"
],
"status": "done"
}
],
"excluded": []
}
scat layered¶
usage: scat layered [-h] [--root ROOT] [--json] [--narrative NARRATIVE]
[--candidates] [--claim-type VALUE] [--kind VALUE]
Show the layered view: the union of the fingerprints of the narratives named by --narrative, or, without it, of every narrative; with --candidates, also the candidates (pairs the account links that no row joins). Writes nothing.
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default:
here)
--json print the result as one JSON document (machine-
interface contract), nothing else
--narrative NARRATIVE
include this narrative; repeat it for each narrative
--candidates also show the candidates: pairs of nodes the account
links that no row joins
--claim-type VALUE limit the view to narratives with this claim type, one
of: actual, hypothetical, unclassified; repeat it for
more than one (no filter unless you give it)
--kind VALUE limit the view to narratives of this kind, one of:
scenario, architecture; repeat it for more than one
(no filter unless you give it)
REPL: `scat_tools.layered()`, `scat_tools.layered(["<narrative>"], candidates=True)`
Shows the layered view: the union of the fingerprints of the narratives you name, or of every narrative when you name none. The nodes are grouped by layer, in layer order, and the edges are the rows those narratives tell. With --candidates it also lists the candidates, the pairs of nodes that the account links and that no row joins, each with its narrative. The node pages that no row tells (orphans) are listed with their type and status. It writes nothing.
--claim-type and --kind limit the view to narratives with one of the values given (repeat the option for more than one); the output then says which filter it applied and names the narratives it left out. Without them no mark changes anything. The orphans are the vault's, whatever the filter.
Exit codes: 0, or 1 for a refusal (a name that is not a narrative, a page it draws that has an error).
scat_tools.layered(["groups-under-a-cap-pitch"])
layered view of groups-under-a-cap-pitch
concern
anonymity [draft]
affordance
groups-clustered-under-a-cap [done]
technology
cap-setting [done]
edges
addressed-by: anonymity -> groups-clustered-under-a-cap [done; told by groups-under-a-cap-pitch, notes-at-a-chatham-house-session]
provided-by: groups-clustered-under-a-cap -> cap-setting [done; told by groups-under-a-cap-pitch]
uv run scat layered --narrative groups-under-a-cap-pitch
layered view of groups-under-a-cap-pitch
concern
anonymity [draft]
affordance
groups-clustered-under-a-cap [done]
technology
cap-setting [done]
edges
addressed-by: anonymity -> groups-clustered-under-a-cap [done; told by groups-under-a-cap-pitch, notes-at-a-chatham-house-session]
provided-by: groups-clustered-under-a-cap -> cap-setting [done; told by groups-under-a-cap-pitch]
With --json:
$ uv run scat layered --narrative groups-under-a-cap-pitch --json
{
"schema_version": 3,
"kind": "view",
"operation": "layered",
"ok": true,
"mode": "disallowed",
"narratives": [
"groups-under-a-cap-pitch"
],
"nodes": {
"stakeholder": [],
"concern": [
{
"name": "anonymity",
"type": "concern",
"status": "draft"
}
],
"affordance": [
{
"name": "groups-clustered-under-a-cap",
"type": "affordance",
"status": "done"
}
],
"technology": [
{
"name": "cap-setting",
"type": "technology",
"status": "done"
}
]
},
"edges": [
{
"type": "addressed-by",
"from": "anonymity",
"to": "groups-clustered-under-a-cap",
"narratives": [
"groups-under-a-cap-pitch",
"notes-at-a-chatham-house-session"
],
"status": "done"
},
{
"type": "provided-by",
"from": "groups-clustered-under-a-cap",
"to": "cap-setting",
"narratives": [
"groups-under-a-cap-pitch"
],
"status": "done"
}
],
"excluded": []
}
scat trace¶
usage: scat trace [-h] [--root ROOT] [--json] [--direction DIRECTION]
[--claim-type VALUE] [--kind VALUE]
NODE
Follow edges from a node: up toward the stakeholders, down toward the technologies, or both. The node itself is left out. Writes nothing.
positional arguments:
NODE the name of a stakeholder, concern, affordance or
technology
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default:
here)
--json print the result as one JSON document (machine-
interface contract), nothing else
--direction DIRECTION
up, down or both (default: both)
--claim-type VALUE limit the view to narratives with this claim type, one
of: actual, hypothetical, unclassified; repeat it for
more than one (no filter unless you give it)
--kind VALUE limit the view to narratives of this kind, one of:
scenario, architecture; repeat it for more than one
(no filter unless you give it)
REPL: `scat_tools.trace("<node>")`, `scat_tools.trace("<node>", "<direction>")`
Follows edges from a node, and shows the nodes it reaches in layer order and the edges it walked. up goes toward the stakeholders, down toward the technologies, both (the default) does both. It writes nothing.
--claim-type and --kind limit the view to narratives with one of the values given (repeat the option for more than one); the output then says which filter it applied and names the narratives it left out. Without them no mark changes anything.
Exit codes: 0, or 1 for a refusal (a name that is not a node, a direction that is not one of the three, a page it draws that has an error).
scat_tools.trace("anonymity", "up")
trace anonymity (up)
up
stakeholder
facilitator-analysts [done]
edges
holds: facilitator-analysts -> anonymity [done; told by notes-at-a-chatham-house-session]
uv run scat trace anonymity --direction up
trace anonymity (up)
up
stakeholder
facilitator-analysts [done]
edges
holds: facilitator-analysts -> anonymity [done; told by notes-at-a-chatham-house-session]
With --json:
$ uv run scat trace anonymity --direction up --json
{
"schema_version": 3,
"kind": "view",
"operation": "trace",
"ok": true,
"mode": "disallowed",
"node": "anonymity",
"direction": "up",
"up": [
{
"name": "facilitator-analysts",
"type": "stakeholder",
"status": "done"
}
],
"down": [],
"edges": [
{
"type": "holds",
"from": "facilitator-analysts",
"to": "anonymity",
"narratives": [
"notes-at-a-chatham-house-session"
],
"status": "done"
}
],
"excluded": []
}
scat evidence¶
usage: scat evidence [-h] [--root ROOT] [--json] [--claim-type VALUE]
[--kind VALUE]
NODE
Show everything the vault says of one node page: the narratives that link it, each with the paragraph around every link and the linking sentence between >> and <<; its edges with the narratives that tell them; and its adjacent nodes by layer. Writes nothing.
positional arguments:
NODE the name of a stakeholder, concern, affordance or
technology
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
--claim-type VALUE limit the view to narratives with this claim type, one
of: actual, hypothetical, unclassified; repeat it for
more than one (no filter unless you give it)
--kind VALUE limit the view to narratives of this kind, one of:
scenario, architecture; repeat it for more than one (no
filter unless you give it)
REPL: `scat_tools.evidence("<node>")`
Shows, for one node page, what the vault says of it, so that you can write the page from the narratives and not from one of them. It prints the vault's attribution mode first, then:
- narratives: every narrative that links the node, with its status. For each link in the account, the whole paragraph around it (the lines between blank lines, as written), with the sentence that holds the link between
>>and<<. The sentence that matters may be the next one: the paragraph is there to show it. Several links in one paragraph make one entry. A narrative that links the node and tells no edge for it says so. A link inside theEdges toldtable is not a paragraph: it shows through the edges. - edges: the node's edges, each with the narratives that tell it and each row's note.
- adjacent nodes: the nodes one edge away, by layer.
A paragraph is the lines between blank lines; a row of any table (a line that starts with |) is a paragraph of its own and is never cut into sentences. A sentence ends at a ., ! or ? followed by a space, so an abbreviation such as e.g. ends one early; the paragraph is always whole. A narrative that links no node page is excluded and listed at the end, as in the other views. The command reads no attributed_to field and lists no contributor page. It writes nothing.
--claim-type and --kind limit the view to narratives with one of the values given (repeat the option for more than one); the output then says which filter it applied and names the narratives it left out. Without them no mark changes anything.
Exit codes: 0, or 1 for a refusal (a name that is not a node page, such as a narrative or a contributor page, a name that two pages carry, a page it draws that has an error).
scat_tools.evidence("anonymity")
attribution mode: disallowed
evidence anonymity (concern, draft): 2 narratives, 2 edges
narratives (the sentence with the link is between >> and <<)
groups-under-a-cap-pitch [done]
line 12
- [[groups-clustered-under-a-cap|The vault holds stakeholders]], and [[cap-setting|an instance setting]] caps their number.
- The cap is set for each vault, in the vault's own configuration. The example vault sets it to 6.
- A group is named by its role. No group stands for one identifiable person.
- >>Reason given: the people in the data are stakeholders under the Chatham House rule, so [[anonymity|no individual is identifiable]].<<
notes-at-a-chatham-house-session [done]
line 12
- [[workshop-participants|Workshop participants]] tell stories in conversations. The work is sized for manual note-taking in Obsidian.
- [[facilitator-analysts|Facilitators]] take the field notes. >>The setting is Chatham House rule: the people in the data are stakeholders, so [[anonymity|no individual is identifiable]].<<
- The vault holds stakeholders, and [[groups-clustered-under-a-cap|an instance setting caps their number]].
- This vault runs in the disallowed attribution mode: the notes name stakeholders, never individuals, and no note links to a person. A project that needs names chooses another mode when it sets up.
- >>[[attribution|Attribution]] and [[anonymity]] conflict as concerns, and the vault records that as a remark on one of them.<<
edges
holds: facilitator-analysts -> anonymity [done; told by notes-at-a-chatham-house-session]
notes-at-a-chatham-house-session: They take the field notes under the Chatham House rule, so no individual is identifiable.
addressed-by: anonymity -> groups-clustered-under-a-cap [done; told by groups-under-a-cap-pitch, notes-at-a-chatham-house-session]
groups-under-a-cap-pitch: Participants appear only as stakeholders, so no stakeholder stands for one identifiable person.
notes-at-a-chatham-house-session: The mission says the people in the data are stakeholders under the Chatham House rule, so no individual is identifiable.
adjacent nodes
stakeholder
facilitator-analysts [done]
affordance
groups-clustered-under-a-cap [done]
excluded (no node page linked; link one node page to include it)
desk-notes-one (narrative/desk-notes-one.md)
desk-notes-two (narrative/desk-notes-two.md)
uv run scat evidence anonymity
The same text.
A name that is not a node page is refused, and nothing is written:
$ uv run scat evidence nobody
refused nobody: no node has this name
Fix: give the name of a page (the file name without `.md`) that is a stakeholder, concern, affordance or technology
With --json:
$ uv run scat evidence anonymity --json
{
"schema_version": 3,
"kind": "view",
"operation": "evidence",
"ok": true,
"mode": "disallowed",
"node": "anonymity",
"node_type": "concern",
"node_status": "draft",
"narratives": [
{
"name": "groups-under-a-cap-pitch",
"status": "done",
"tells_edge": true,
"paragraphs": [
{
"line": 12,
"paragraph": "- [[groups-clustered-under-a-cap|The vault holds stakeholders]], and [[cap-setting|an instance setting]] caps their number.\n- The cap is set for each vault, in the vault's own configuration. The example vault sets it to 6.\n- A group is named by its role. No group stands for one identifiable person.\n- Reason given: the people in the data are stakeholders under the Chatham House rule, so [[anonymity|no individual is identifiable]].",
"sentences": [
{
"text": "Reason given: the people in the data are stakeholders under the Chatham House rule, so [[anonymity|no individual is identifiable]].",
"start": 296,
"end": 435
}
]
}
]
},
{
"name": "notes-at-a-chatham-house-session",
"status": "done",
"tells_edge": true,
"paragraphs": [
{
"line": 12,
"paragraph": "- [[workshop-participants|Workshop participants]] tell stories in conversations. The work is sized for manual note-taking in Obsidian.\n- [[facilitator-analysts|Facilitators]] take the field notes. The setting is Chatham House rule: the people in the data are stakeholders, so [[anonymity|no individual is identifiable]].\n- The vault holds stakeholders, and [[groups-clustered-under-a-cap|an instance setting caps their number]].\n- This vault runs in the disallowed attribution mode: the notes name stakeholders, never individuals, and no note links to a person. A project that needs names chooses another mode when it sets up.\n- [[attribution|Attribution]] and [[anonymity]] conflict as concerns, and the vault records that as a remark on one of them.",
"sentences": [
{
"text": "The setting is Chatham House rule: the people in the data are stakeholders, so [[anonymity|no individual is identifiable]].",
"start": 197,
"end": 314
},
{
"text": "[[attribution|Attribution]] and [[anonymity]] conflict as concerns, and the vault records that as a remark on one of them.",
"start": 611,
"end": 733
}
]
}
]
}
],
"edges": [
{
"type": "holds",
"from": "facilitator-analysts",
"to": "anonymity",
"narratives": [
"notes-at-a-chatham-house-session"
],
"status": "done",
"tellings": [
{
"narrative": "notes-at-a-chatham-house-session",
"note": "They take the field notes under the Chatham House rule, so no individual is identifiable."
}
]
},
{
"type": "addressed-by",
"from": "anonymity",
"to": "groups-clustered-under-a-cap",
"narratives": [
"groups-under-a-cap-pitch",
"notes-at-a-chatham-house-session"
],
"status": "done",
"tellings": [
{
"narrative": "groups-under-a-cap-pitch",
"note": "Participants appear only as stakeholders, so no stakeholder stands for one identifiable person."
},
{
"narrative": "notes-at-a-chatham-house-session",
"note": "The mission says the people in the data are stakeholders under the Chatham House rule, so no individual is identifiable."
}
]
}
],
"adjacent": {
"stakeholder": [
{
"name": "facilitator-analysts",
"type": "stakeholder",
"status": "done"
}
],
"concern": [],
"affordance": [
{
"name": "groups-clustered-under-a-cap",
"type": "affordance",
"status": "done"
}
],
"technology": []
},
"excluded": [
{
"name": "desk-notes-one",
"file": "narrative/desk-notes-one.md",
"fix": "link one node page in the narrative (a row end or its account), then run this again"
},
{
"name": "desk-notes-two",
"file": "narrative/desk-notes-two.md",
"fix": "link one node page in the narrative (a row end or its account), then run this again"
}
]
}
In the document, paragraphs[].line is the file line of the paragraph's first line, and each sentence has start and end, 0-based character offsets in paragraph (end not included), so that paragraph[start:end] is the sentence.
scat review¶
usage: scat review [-h] [--root ROOT] [--json]
Show where to look next: every pair of node pages of one type that share a twin row (one narrative tells the same edge type for both to one other node) or an adjacent node, the pairs with the most shared adjacent nodes first, with the count, the twin rows, the shared nodes and the link texts coders used. A prompt to read, not a finding. Writes nothing.
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
REPL: `scat_tools.review()`
Shows where to look next. It prints the vault's attribution mode first, then every pair of node pages of one type that shares a twin row or an adjacent node.
- Two pages share an adjacent node when a node one edge away from the first is also one edge away from the second.
- Two pages share a twin row when one narrative tells the same edge type between each of them and one other node.
There is no cut-off and no score: every such pair is listed, the pairs that share most adjacent nodes first, then by name, and the count is shown beside the pair. Each pair shows its twin rows with the file and the line of the row for each page, the adjacent nodes the two pages share, and the link texts coders gave each page ([[node|text]] in a narrative). Link texts are shown and take no part in choosing a pair, and names and descriptions are never compared: a pair is listed for what the vault says around its pages, not for how it is worded.
The list is a prompt to read, not a finding: you decide whether two pages are one node, and scat evidence <node> shows what the narratives say. scat recurrence shows how many narratives reach each page. A narrative that links no node page is excluded, and listed at the end, as in the other views. The command reads no attributed_to field and lists no contributor page. It writes nothing.
Exit codes: 0, or 1 for a refusal (a page it draws that has an error, a row that tells no edge, a missing vault folder).
scat_tools.review()
attribution mode: disallowed
review: 1 page pair, each sharing a twin row or an adjacent node
gated-approval ~ revert-with-history-kept (affordance; done, done): 1 shared adjacent node, 2 twin rows
twin row: false-start-and-clean-restart (narrative/false-start-and-clean-restart.md lines 29 and 30) tells addressed-by with intent-without-drift
twin row: two-branches-and-tags-pitch (narrative/two-branches-and-tags-pitch.md lines 22 and 23) tells addressed-by with intent-without-drift
shared adjacent nodes: intent-without-drift
link texts for gated-approval: "Approval is a merge into main", "a gated mission"
link texts for revert-with-history-kept: "dev is reverted to the approved state. History is kept", "reverting without losing history"
uv run scat review
The same text.
With --json:
$ uv run scat review --json
{
"schema_version": 3,
"kind": "view",
"operation": "review",
"ok": true,
"mode": "disallowed",
"pairs": [
{
"type": "affordance",
"pages": [
{
"name": "gated-approval",
"type": "affordance",
"status": "done",
"link_texts": [
"Approval is a merge into main",
"a gated mission"
]
},
{
"name": "revert-with-history-kept",
"type": "affordance",
"status": "done",
"link_texts": [
"dev is reverted to the approved state. History is kept",
"reverting without losing history"
]
}
],
"shared": 1,
"shared_adjacent": [
{
"name": "intent-without-drift",
"type": "concern",
"status": "done"
}
],
"twin_rows": [
{
"narrative": "false-start-and-clean-restart",
"file": "narrative/false-start-and-clean-restart.md",
"edge_type": "addressed-by",
"other_end": "intent-without-drift",
"lines": [
29,
30
]
},
{
"narrative": "two-branches-and-tags-pitch",
"file": "narrative/two-branches-and-tags-pitch.md",
"edge_type": "addressed-by",
"other_end": "intent-without-drift",
"lines": [
22,
23
]
}
]
}
],
"excluded": []
}
scat recurrence¶
usage: scat recurrence [-h] [--root ROOT] [--json] [--claim-type VALUE]
[--kind VALUE]
Show how often each node and edge recurs: for every node the number of narratives whose rows end at it and of stakeholders that reach it; for every edge the number of narratives that tell it and of stakeholders that reach its first end. A count of zero or one is marked a singleton. Writes nothing.
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
--claim-type VALUE limit the view to narratives with this claim type, one
of: actual, hypothetical, unclassified; repeat it for
more than one (no filter unless you give it)
--kind VALUE limit the view to narratives of this kind, one of:
scenario, architecture; repeat it for more than one (no
filter unless you give it)
REPL: `scat_tools.recurrence()`, `scat_tools.recurrence(claim_type="actual")`
Shows how often each node and edge recurs, so that you see which patterns more than one account supports and which rest on one voice.
- For every node page: narratives, the number of narratives that have a row ending at it, and stakeholders, the number of stakeholders that reach it by the edges of the layered view. A stakeholder counts itself.
- For every edge: narratives, the number of narratives that tell it, and stakeholders, the number of stakeholders that reach its first end.
A count of zero or one is marked (singleton): a node page no narrative has a row for has narratives 0, and a node one stakeholder alone reaches has stakeholders 1. A singleton is a place to ask whether more accounts would say the same; it is not a fault. A narrative that links no node page is excluded, and listed at the end, as in the other views. The command reads no attributed_to field and lists no contributor page. It writes nothing.
--claim-type and --kind limit the view to narratives with one of the values given (repeat the option for more than one); the output then says which filter it applied and names the narratives it left out. Without them no mark changes anything. The notebook in the vault template shows the same view.
Exit codes: 0, or 1 for a refusal (a page it draws that has an error, a row that tells no edge, a missing vault folder).
scat_tools.recurrence()
recurrence: narratives and stakeholders that reach each node and edge
stakeholder
facilitator-analysts [done]: narratives 1 (singleton), stakeholders 1 (singleton)
project-leads [done]: narratives 1 (singleton), stakeholders 1 (singleton)
workshop-participants [done]: narratives 0 (singleton), stakeholders 1 (singleton)
concern
anonymity [done]: narratives 2, stakeholders 1 (singleton)
attribution [done]: narratives 0 (singleton), stakeholders 0 (singleton)
intent-without-drift [done]: narratives 2, stakeholders 1 (singleton)
affordance
gated-approval [done]: narratives 2, stakeholders 1 (singleton)
groups-clustered-under-a-cap [done]: narratives 2, stakeholders 1 (singleton)
revert-with-history-kept [done]: narratives 2, stakeholders 1 (singleton)
technology
archive-tags [done]: narratives 1 (singleton), stakeholders 1 (singleton)
cap-setting [done]: narratives 1 (singleton), stakeholders 1 (singleton)
main-and-dev-branches [done]: narratives 1 (singleton), stakeholders 1 (singleton)
edges
holds: facilitator-analysts -> anonymity [done]: narratives 1 (singleton), stakeholders 1 (singleton)
holds: project-leads -> intent-without-drift [done]: narratives 1 (singleton), stakeholders 1 (singleton)
addressed-by: anonymity -> groups-clustered-under-a-cap [done]: narratives 2, stakeholders 1 (singleton)
addressed-by: intent-without-drift -> gated-approval [done]: narratives 2, stakeholders 1 (singleton)
addressed-by: intent-without-drift -> revert-with-history-kept [done]: narratives 2, stakeholders 1 (singleton)
provided-by: gated-approval -> main-and-dev-branches [done]: narratives 1 (singleton), stakeholders 1 (singleton)
provided-by: groups-clustered-under-a-cap -> cap-setting [done]: narratives 1 (singleton), stakeholders 1 (singleton)
provided-by: revert-with-history-kept -> archive-tags [done]: narratives 1 (singleton), stakeholders 1 (singleton)
uv run scat recurrence
The same text.
With --json the document has nodes and edges, and excluded. Each node has name, type, status, narrative_count, stakeholder_count, narrative_singleton and stakeholder_singleton; each edge has type, from, to, status and the same four counts and marks.
scat attribution¶
usage: scat attribution [-h] [--root ROOT] [--json]
Show the narratives by contributor: each contributor page with the narratives that name it, and the narratives that name none. Refuses where the vault's attribution mode is disallowed. Writes nothing.
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
REPL: `scat_tools.attribution()`
Lists each contributor page with the narratives whose attributed_to field names it, and then the narratives that name nobody. It is a view of the knowledge graph, not of the layered graph: a contributor page has no edge and appears in no other view. It writes nothing.
Where the vault's attribution mode is disallowed, no narrative names anyone and no contributor page may exist, so the command refuses and says so; it does not print an empty list. It refuses too when scat.toml declares no usable mode, and, like the other views, when a page it draws has an error.
Exit codes: 0, or 1 for a refusal.
The examples below are for a vault whose mode is optional, with two contributor pages.
scat_tools.attribution()
attribution: narratives by contributor
ada-quill [done]
funders-meeting
saturday-at-the-lending-desk
bo-marsh [stub]
saturday-at-the-lending-desk
narratives that name no contributor
self-service-kiosk-pitch
$ uv run scat attribution
attribution: narratives by contributor
ada-quill [done]
funders-meeting
saturday-at-the-lending-desk
bo-marsh [stub]
saturday-at-the-lending-desk
narratives that name no contributor
self-service-kiosk-pitch
In a vault whose mode is disallowed:
$ uv run scat attribution
refused scat.toml field `attribution`: this vault's attribution mode is `disallowed`, so it allows no attribution: no narrative names a contributor and there is no contributor page to list
Fix: the coder who wants contributors named changes `attribution` in scat.toml for the whole vault
With --json:
$ uv run scat attribution --json
{
"schema_version": 3,
"kind": "view",
"operation": "attribution",
"ok": true,
"mode": "optional",
"contributors": [
{
"name": "ada-quill",
"title": "Ada Quill",
"status": "done",
"narratives": [
"funders-meeting",
"saturday-at-the-lending-desk"
]
},
{
"name": "bo-marsh",
"title": "Bo Marsh",
"status": "stub",
"narratives": [
"saturday-at-the-lending-desk"
]
}
],
"unattributed": [
"self-service-kiosk-pitch"
],
"excluded": []
}
scat export-edges¶
usage: scat export-edges [-h] [--root ROOT] [--json] --out DIR
Write each edge table to DIR as `<type>.csv` and `<type>.md`. Overwrites a file only when its content differs; makes DIR if it is not there. Refuses where `scat edges` would, and then writes nothing.
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
--out DIR the folder the tables go in (no default)
REPL: `scat_tools.export_edges("<dir>")`
Writes the three edge tables, one CSV and one Markdown file each, into DIR. The CSV file has the columns from, to, narratives (joined by ;) and status. The Markdown file is a generated heading, one sentence and a table. Names are plain text, so the files add no page, link or row to a vault, even when DIR is inside it. Of the six commands here, it and scat draw are the only ones that write.
A file that is there is rewritten only when its content differs, so running it again changes nothing. It refuses, writing nothing, where scat edges would, and when DIR is a file. Paths inside the vault folder are shown from it; a folder outside it is shown as you gave it.
Exit codes: 0, or 1 for a refusal.
scat_tools.export_edges("tables")
created tables/holds.csv
created tables/holds.md
created tables/addressed-by.csv
created tables/addressed-by.md
created tables/provided-by.csv
created tables/provided-by.md
uv run scat export-edges --out edge-tables
created edge-tables/holds.csv
created edge-tables/holds.md
created edge-tables/addressed-by.csv
created edge-tables/addressed-by.md
created edge-tables/provided-by.csv
created edge-tables/provided-by.md
With --json, a second time:
$ uv run scat export-edges --out edge-tables --json
{
"schema_version": 3,
"kind": "operation",
"operation": "export-edges",
"ok": true,
"mode": "disallowed",
"created": [],
"changed": [],
"unchanged": [
"edge-tables/holds.csv",
"edge-tables/holds.md",
"edge-tables/addressed-by.csv",
"edge-tables/addressed-by.md",
"edge-tables/provided-by.csv",
"edge-tables/provided-by.md"
],
"refused": [],
"notes": []
}
scat guide¶
usage: scat guide [-h] [--root ROOT] [--json] [STAGE]
Show the guide of a lifecycle stage (plan, capture, code, synthesise, analyse or report), or, without STAGE, the index of the stages and their moves. Needs no vault. Writes nothing.
positional arguments:
STAGE the stage; without it, the index
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
REPL: `scat_tools.guide()`, `scat_tools.guide("<stage>")`
Shows the guide of one stage of the project's lifecycle, or, with no STAGE, the index: the six stages, one line each, and the moves between them. A stage is where the project is (plan, capture, code, synthesise, analyse or report); it is not a page's status. The guide says what the stage is for, how to recognise it, what it needs and makes, which tools and prompts it offers, what the coder does, and where it can go next. It needs no vault, so it works in any folder. An unknown stage is a refusal that names the six.
The MCP server sends the same text as its resources scat://guide/index and scat://guide/<stage> (see the MCP server reference), and the assistant on the IDE path reads it with this command.
Exit codes: 0, or 1 for a refusal.
scat_tools.guide("analyse")
uv run scat guide analyse
Both print the guide as text: a heading with the stage's name, then what it is for, how to recognise it, what it needs and makes, its tools and prompts, the coder's acts, its exits, and what mode means. With no STAGE they print the index of the six stages and their moves.
scat draw¶
usage: scat draw [-h] <drawing> ...
Draw a view as an image in columns by layer. Needs the extra `draw`: `pip install "scat-tools[draw]"`. The only write is the image file you name with --out.
positional arguments:
<drawing>
fingerprint Draw a narrative's fingerprint: its nodes and edges in four
columns, one per layer; with --candidates, the candidates
dashed. Refuses where `scat fingerprint` would, and then
writes nothing.
layered Draw the layered view of the narratives named by --narrative
or, without it, of every narrative; with --candidates, the
candidates dashed. Refuses where `scat layered` would, and
then writes nothing.
trace Draw what a node reaches: up toward the stakeholders, down
toward the technologies, or both, with the node itself in its
column. Refuses where `scat trace` would, and then writes
nothing.
options:
-h, --help show this help message and exit
REPL: `from scat_tools import draw`, then `draw.fingerprint(...)`, `draw.layered(...)` or `draw.trace(...)`
Draws a view as an image in columns, one for each layer, in layer order, labelled stakeholder, concern, affordance and technology at the top. Every drawing keeps all four columns, whatever a narrative's marks; --claim-type and --kind limit the drawing to narratives with one of the values given, and a note under the drawing names the filter and the narratives it left out. SVG and PNG are the same drawing in two formats. Each node is a box labelled with its name, and with its status in brackets when that is not done; each edge is a line between neighbouring columns. Within a column the nodes are in order of name. scat draw fingerprint draws one narrative's fingerprint and shows no candidates unless you add --candidates, which draws the candidates as dashed lines. scat draw layered draws the layered view of the narratives you name with --narrative, or of every narrative, and with --candidates draws the candidates as dashed lines too. scat draw trace draws what scat trace follows from a node, up, down or both (--direction, both unless you say), with the node itself in its own layer's column and the title naming it.
Drawing needs the extra draw: pip install "scat-tools[draw]". Without it, the command refuses and says so. The same command gives the same image, byte for byte.
--out FILE is required. A file ending in .png or .svg is written, and any other ending is refused. A file that is there is rewritten only when its content differs. It is the only thing scat draw writes. It refuses, writing nothing, where scat fingerprint, scat layered or scat trace would. Paths inside the vault folder are shown from it; a file outside it is shown as you gave it.
Exit codes: 0, or 1 for a refusal.
scat draw fingerprint¶
usage: scat draw fingerprint [-h] [--root ROOT] [--json] [--candidates]
[--claim-type VALUE] [--kind VALUE] --out FILE
NARRATIVE
Draw a narrative's fingerprint: its nodes and edges in four columns, one per layer; with --candidates, the candidates dashed. Refuses where `scat fingerprint` would, and then writes nothing.
positional arguments:
NARRATIVE the narrative's name
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default: here)
--json print the result as one JSON document (machine-interface
contract), nothing else
--candidates also draw the candidates: pairs the account links that
no row joins, dashed
--claim-type VALUE limit the view to narratives with this claim type, one
of: actual, hypothetical, unclassified; repeat it for
more than one (no filter unless you give it)
--kind VALUE limit the view to narratives of this kind, one of:
scenario, architecture; repeat it for more than one (no
filter unless you give it)
--out FILE the image file to write, ending in `.png` or `.svg` (no
default)
REPL: `draw.fingerprint("<narrative>", candidates=True).save("<file>")`
scat draw layered¶
usage: scat draw layered [-h] [--root ROOT] [--json] [--narrative NARRATIVE]
[--candidates] [--claim-type VALUE] [--kind VALUE]
--out FILE
Draw the layered view of the narratives named by --narrative or, without it, of every narrative; with --candidates, the candidates dashed. Refuses where `scat layered` would, and then writes nothing.
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default:
here)
--json print the result as one JSON document (machine-
interface contract), nothing else
--narrative NARRATIVE
include this narrative; repeat it for each narrative
--candidates also draw the candidates: pairs the account links that
no row joins, dashed
--claim-type VALUE limit the view to narratives with this claim type, one
of: actual, hypothetical, unclassified; repeat it for
more than one (no filter unless you give it)
--kind VALUE limit the view to narratives of this kind, one of:
scenario, architecture; repeat it for more than one
(no filter unless you give it)
--out FILE the image file to write, ending in `.png` or `.svg`
(no default)
REPL: `draw.layered().save("<file>")`, `draw.layered(["<narrative>"], candidates=True).save("<file>")`
from scat_tools import draw
draw.layered().save("layered.png")
created layered.png
uv run scat draw layered --out layered.png
created layered.png
scat draw trace¶
usage: scat draw trace [-h] [--root ROOT] [--json] [--direction DIRECTION]
[--claim-type VALUE] [--kind VALUE] --out FILE
NODE
Draw what a node reaches: up toward the stakeholders, down toward the technologies, or both, with the node itself in its column. Refuses where `scat trace` would, and then writes nothing.
positional arguments:
NODE the name of a stakeholder, concern, affordance or
technology
options:
-h, --help show this help message and exit
--root ROOT the vault folder, the one with scat.toml (default:
here)
--json print the result as one JSON document (machine-
interface contract), nothing else
--direction DIRECTION
up, down or both (default: both)
--claim-type VALUE limit the view to narratives with this claim type, one
of: actual, hypothetical, unclassified; repeat it for
more than one (no filter unless you give it)
--kind VALUE limit the view to narratives of this kind, one of:
scenario, architecture; repeat it for more than one
(no filter unless you give it)
--out FILE the image file to write, ending in `.png` or `.svg`
(no default)
REPL: `draw.trace("<node>").save("<file>")`, `draw.trace("<node>", "<direction>").save("<file>")`
Where next¶
Keep the reference close:
- Python API reference: every operation, with its parameters and what it returns.
- Coding guide: how to use these commands while you code your notes.
- Home