/architecture:arch-booksfrom architecture
Check, summarize and survey the Head of Architecture's private risk register, the append-only list of risks to your systems' stability. Checks find illegal state moves, a risk closed without a receipt, scores that differ from the rubric, spreadsheet-formula cells and edited history. Summary folds the rows into each risk's state, score and tier. Survey compares what runs on the machine with the inventory you wrote and each project's recent local branch moves with its stated state, then records observations, opens risks and adds questions, with no model, no network and no process started. Use before committing to the books, to rank the risks, to record a risk, to find jobs nobody listed, or when asked to "check the risk register", "summarize the risks", "what are the top risks to stability" or "survey my systems".
Ships in architecture. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
The books are a private git repo, never this skill or a public repo. If you don't know where they are, ask. They hold these files:
| File | Holds |
|---|---|
risks.csv | One row per event in a risk's life: risk_id,date,event,component,failure_mode,consequence,likelihood,detection,evidence,question,note |
rubric.csv | The default scores per failure mode: failure_mode,consequence,likelihood,detection,why, each score 1 to 4 |
observations.csv | What the survey saw, appended only by survey: date,sensor,subject,fact,detail |
systems.yaml | The inventory a person writes: which component claims which job, and which jobs to ignore |
questions.md | The questions put to the user, with an ## Open section |
observations.csv and systems.yaml are checked when present. references/survey.md has their formats.
arch.py summary BOOKS --json. Never add, multiply, rank or tier by hand. Quote the score and tier as the script prints them.risks.csv with arch.py risk, never by hand; never edit or delete a past row. A correction is a new row.git.survey --dry-run and read its report before the real run. It reads only the folders and projects file you pass, or the defaults under the home folder.closed only through close, whose evidence starts with receipt: and names a probe that failed before the fix and passes after.rescore, with the answer as the evidence and the question it answers in question. accept and decline carry the question their propose row set.The states, the move each event makes and what each event must carry are in references/risk-lifecycle.md. Read it before you write a row.
A launchd job can run the survey every day on the Mac and push the new rows to the week's brief branch: references/daily-job.md.
A weekly run turns those rows and the owner's answers into a brief, as a pull request: references/weekly-brief.md.
uv run --python 3.12 <skill dir>/scripts/arch.py check BOOKS [--base REF] [--projects FILE]
uv run --python 3.12 <skill dir>/scripts/arch.py summary BOOKS [--json]
uv run --python 3.12 <skill dir>/scripts/arch.py survey BOOKS --projects FILE --owner LOGIN [--dry-run]
uv run --python 3.12 <skill dir>/scripts/arch.py risk EVENT BOOKS [--id A12] [--component NAME] [--failure-mode NAME] [--evidence TEXT] [--question Q7] [--note TEXT] [--consequence N --likelihood N --detection N] [--base REF] [--dry-run]
It needs Python 3.10 or later and the standard library only; any such Python works if uv is not installed.
Run check after every row you add. Each problem prints as file:line: message. The last line is ok, N rows, 0 problems (exit 0) or N problems (exit 1). A missing folder or file exits 2. Use --base origin/main (any ref) on a branch or pull request: the books folder must be the top level of its git repo, and a row of risks.csv that exists at the ref must be unchanged. Rows already at the ref are not judged by the rubric again; rows you add are judged by the rubric at the ref, so a rubric change reaches rows added in a later change. A file over 5,000,000 bytes exits 2.
summary refuses books that fail check (exit 1, problems on stderr). Give it --base REF too, so books whose history was edited or deleted are refused instead of summarized. Its JSON has version, risks and counts. A risk is live in open, proposed, accepted and mitigating, and each record says live. Live risks come first by tier, score and id, then observed ones, then declined and closed ones, which keep their last score and tier. counts.by_tier counts live risks only, and counts.live is how many there are. The same books give the same bytes every run.
check --projects FILE also fails a component in systems.yaml whose project is not in that projects file. check reads observations.csv and systems.yaml when they exist and, with --base, fails a past row of observations.csv that was edited or deleted. summary --json adds an observations object: the latest row per key, sorted, and counts by sensor and fact. The text output adds one line of counts.
risk EVENT BOOKS appends one row for one event in a risk's life, dated today (UTC), and writes only when the whole register still passes check. Otherwise it prints the problems, exits 1 and changes no file. --id names the risk and is required for every event but observe, which takes the next free id and prints added A13 observe. open takes its scores from rubric.csv and refuses score flags. rescore takes --consequence, --likelihood and --detection and needs --question. close needs --evidence starting receipt:. --dry-run prints the row and writes nothing. The command for each move is in references/risk-lifecycle.md. --base REF means what it does on check: rows at REF are not judged again, a new row is judged by the rubric at REF, and open takes its scores from that same rubric, so a row risk writes passes check --base REF. --component and --failure-mode belong to observe; any other event refuses them with exit 2. Exit 0 is ok, 1 is a row the register refuses, 2 is a bad argument or unusable books and 3 is a held lock (retry later).
survey and risk (not with --dry-run) create BOOKS/.arch.lock before they read and remove it when they exit normally or raise; a killed writer leaves it, and the next writer's message says how to remove it. A second writer exits 3, names the file, the pid and its age in seconds, and writes nothing. A lock is never broken automatically; if no writer is running, remove it by hand. check, summary and every --dry-run ignore it. Add .arch.lock to the books repo's .gitignore. See references/survey.md.
survey runs two sensors and writes only what they found. It never changes a project, a plist or systems.yaml.
survey BOOKS --projects FILE --owner LOGIN --dry-run and read the report: jobs by fact, projects by fact, every skip with its reason, and the rows, risks and questions it would add.--dry-run. It appends to observations.csv and risks.csv and adds bullets to questions.md. A second run on an unchanged machine adds nothing.check BOOKS and commit the books.An unlisted launchd or runner job opens one unlisted-job risk, scored by the rubric. A scheduled task is observed and never opens a risk, because the survey sees only its folder name. A job or project that is no longer found gets one gone row and opens nothing. A project that looks active but quiet, or dormant but busy, adds one question and no risk when its fact changes: the state in the projects file is the user's to change. An observation's detail is as of its row's date, not today. The activity date is when a local branch last moved on this machine, not when a commit was written, and git drops those logs after 90 days by default, so the window is 1 to 60 days. Answer by editing systems.yaml or the projects file, never by editing a past row. Exit 0 is ok, 1 is books that fail check (nothing is written) and 2 is an input the survey cannot use, such as unparseable YAML, a rubric with no unlisted-job row, a questions.md with no ## Open section, a books file or the books folder that is a symlink, or a file that changed while the survey ran. Files are replaced whole, questions first and observations last, so a rerun after a crash finishes the work without repeating a risk or a question.
score = consequence * likelihood * detection, at most 64. The tier is P0 when consequence is 4 and likelihood is 2 or more, or the score is 36 or more; else P1 from 18; P2 from 8; else P3. An observed risk has no score or tier yet.
| Problem | Fix |
|---|---|
illegal move: EVENT from STATE | The table has no such move. Pick the event the state allows, or reopen a declined or closed risk. |
needs evidence, needs question, needs component | The event must carry that cell. |
question must equal the propose question | accept and decline answer the question their propose row set. |
must be lowercase letters, digits and hyphens | component and failure_mode are plain names of at most 64 characters. |
date ... is in the future | Use the real date of the event. |
open scores must equal the rubric.csv row | open takes the rubric's scores. A different score is a rescore with the user's answer as evidence. |
close evidence must start with receipt: | Run the probe that failed before the fix, then write receipt: and what it showed. |
is fixed by the observe row | Leave component and failure_mode empty on later rows, or repeat them exactly. |
starts with = + - or @, invisible character, leading or trailing whitespace, longer than 1000 characters | Rewrite the cell. A spreadsheet or terminal would act on it, or it hides what the text says. |
a past row was edited or deleted | Restore the row. Add a new row instead. |
observations.csv sensor must be or fact must be | A sensor is schedule or activity, each with its own facts; see references/survey.md. |
systems.yaml is claimed by | A job key belongs to one component. |
systems.yaml project ... is not in the projects file | Fix the project id or add the project to the projects file. |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub lyddonb/agent-kit --plugin architecture