No slash command · from maxi
Use when an internal Maxi workflow detects an architectural decision that is costly to reverse, constrains future choices, was contested, or changes an existing decision in the current Maxi project
Ships in maxi. 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.
This is an internal pipeline skill — it is invoked by Maxi workflows, not by the user directly. It is not listed in the /maxi:* command menu.
Core principle: ADRs capture the why behind architectural choices. They are never written silently — the agent always drafts the ADR, shows it to the user, and waits for explicit approval before any file is created.
Before doing anything else:
docs/maxi/constitution.md exists. If it does not: stop immediately with "No constitution found. Run /maxi:constitution first."You MUST show the full drafted ADR and receive explicit consent before writing any file. An amendment requires yes; edit only revises and re-displays it.
The fact that the calling workflow already identified the decision does NOT count as user consent to write the ADR. The user must see the draft and confirm.
Rationalizations that are NEVER valid:
Every new ADR records exactly one creating spec: spec: <full-spec-slug> or spec: null, plus that spec's design_cycle (or 0 when standalone). Missing design_cycle on a historical spec or ADR means 0; malformed values are ineligible.
Amend only when its spec: equals the current active spec slug, both records have matching design_cycle, and that spec is active (drafting, specified, clarified, planned, tasked, analyzed, or implementing), including after a rollback from done.
If the link is missing or null, the design cycles differ, or the linked spec is done, parked, or cancelled, use supersession. A missing linked spec also uses supersession.
digraph adr_process {
"Check docs/maxi/constitution.md" [shape=diamond];
"Stop: run /maxi:constitution first" [shape=box];
"Detected change to accepted ADR?" [shape=diamond];
"Eligible active-spec amendment?" [shape=diamond];
"Show full amended ADR + exact diff" [shape=box];
"Amendment response?" [shape=diamond];
"Revise and re-display amendment" [shape=box];
"Write amended ADR + update index" [shape=box];
"Leave ADR unchanged" [shape=box];
"Compute next NNNN" [shape=box];
"Load accepted ADRs" [shape=box];
"Contradiction with existing ADR?" [shape=diamond];
"Draft ADR (use template)" [shape=box];
"Frame as supersede proposal" [shape=box];
"Show full draft to user" [shape=box];
"User response?" [shape=diamond];
"Accept amendments inline" [shape=box];
"Write ADR file + update index" [shape=box];
"Write both ADRs + update index" [shape=box];
"Discard. No file written." [shape=box];
"Check docs/maxi/constitution.md" -> "Stop: run /maxi:constitution first" [label="missing"];
"Check docs/maxi/constitution.md" -> "Detected change to accepted ADR?" [label="exists"];
"Detected change to accepted ADR?" -> "Eligible active-spec amendment?" [label="yes"];
"Detected change to accepted ADR?" -> "Compute next NNNN" [label="no"];
"Eligible active-spec amendment?" -> "Show full amended ADR + exact diff" [label="yes"];
"Eligible active-spec amendment?" -> "Compute next NNNN" [label="no, use generic path"];
"Show full amended ADR + exact diff" -> "Amendment response?";
"Amendment response?" -> "Write amended ADR + update index" [label="yes"];
"Amendment response?" -> "Revise and re-display amendment" [label="edit"];
"Revise and re-display amendment" -> "Show full amended ADR + exact diff";
"Amendment response?" -> "Leave ADR unchanged" [label="no / ambiguous x2"];
"Compute next NNNN" -> "Load accepted ADRs";
"Load accepted ADRs" -> "Contradiction with existing ADR?" ;
"Contradiction with existing ADR?" -> "Frame as supersede proposal" [label="yes"];
"Contradiction with existing ADR?" -> "Draft ADR (use template)" [label="no"];
"Frame as supersede proposal" -> "Show full draft to user";
"Draft ADR (use template)" -> "Show full draft to user";
"Show full draft to user" -> "User response?";
"User response?" -> "Write ADR file + update index" [label="yes"];
"User response?" -> "Accept amendments inline" [label="edit"];
"User response?" -> "Discard. No file written." [label="no"];
"Accept amendments inline" -> "Write both ADRs + update index" [label="supersede case"];
"Accept amendments inline" -> "Write ADR file + update index" [label="normal case"];
}
When an agent detects a changed accepted ADR, amend it when its direct spec: link equals the current active spec slug, its design_cycle matches the current spec's design_cycle, and the linked spec is active (drafting, specified, clarified, planned, tasked, analyzed, or implementing), including after a rollback from done. Treat a missing historical design_cycle as 0; a malformed value is ineligible. Evaluate that eligibility before loading accepted ADRs for generic contradiction handling. An eligible change goes directly to the amendment procedure below and never enters the generic supersession path. An ineligible change, including a missing, null, done, parked, or cancelled spec: link or a different design cycle, continues to the existing generic path, which offers supersession. If no accepted ADR changed, continue to step 2.
Scan docs/maxi/adr/ for files matching NNNN-*.md (excluding README.md). Extract the numeric prefix of each file and find the highest value. Next NNNN = highest + 1, zero-padded to 4 digits. If the directory does not exist or contains no matching files, NNNN = 0001.
Use max-based numbering (not count-based) to survive deletions, renames, or manual additions — these operations change the count but not the highest assigned number.
Read every docs/maxi/adr/NNNN-*.md (where status = accepted) and scan their Decision sections for domain overlap with the new decision (same technology category: storage, runtime, framework, auth mechanism, etc.).
Surface any overlap to the user — do not decide silently. You are not qualified to judge whether two decisions in the same domain are contradictory or simply different contexts. The user is. If there is any resemblance in domain, show it to the user and let them decide whether to supersede or treat as independent.
Verify adr-template.md exists (Read tool) before proceeding; if missing, stop: "Cannot proceed — adr-template.md is missing. Please reinstall the maxi plugin."
Use adr-template.md as the base. Fill in:
adr: — the 4-digit numberslug: — NNNN-[short-kebab-title]spec: — replace the template's null with the current active spec slug when this ADR is created for that spec; otherwise keep spec: nulldesign_cycle: — copy the current linked spec's nonnegative integer; use 0 for a standalone ADRstatus: proposed ← draft state; transitions to accepted when user confirmscreated: — today in YYYY-MM-DDupdated: — today in YYYY-MM-DDdecider: — name or role of the decision-maker (ask user if unknown)supersedes: — NNNN of the ADR being overturned (or null)superseded_by: nullBody: fill all six sections from the architectural choice that was detected:
✅ Satisfies driver: <criterion> or ❌ Violates driver: <criterion>
Generic ✅/❌ without driver reference are not sufficient.If this decision contradicts an existing accepted ADR (say ADR-003), present the draft with this header:
This decision appears to contradict ADR-003 ("original title"). Propose ADR-NNNN that supersedes ADR-003?
The proposal shows the full new ADR draft. The user can say yes, edit, or no.
Output the full ADR as formatted Markdown and ask:
"Record this as ADR-NNNN? (yes / no / edit)"
Wait for the response. Do not write anything yet.
Do not create a replacement ADR when the eligibility conditions above hold. Show the full amended ADR and exact diff.
"Apply this amendment to ADR-NNNN? (yes / no)"
yes: Write the amended ADR in place, refresh updated: to today's ISO date, and regenerate the index.
edit: Revise and re-display the full amended ADR and exact diff, then ask the same question again. Only yes may write an amendment; edit is not consent to write.
no: Leave the ADR unchanged.
Anything else: Re-ask the same amendment question once. On no or two ambiguous responses, leave the ADR unchanged. The amendment preserves adr, slug, spec, design_cycle, created, status, supersedes, and superseded_by; it changes the body and refreshes updated: to today's ISO date. It never changes ADR identity or supersession links, and never creates a new ADR.
yes:
status: accepted in the ADR, then write docs/maxi/adr/NNNN-slug.md. If it belongs to an active spec, append its full slug to that spec's related_adrs list (create the list if absent; do not duplicate it) and bump updated: in the same edit.status: superseded and superseded_by: NNNN; then replace the old ADR's full slug with the new one in the active creating spec's related_adrs list. If the old slug is absent, append the new one once. The active index therefore contains only accepted ADRs; supersedes and superseded_by preserve the historical chain. If any required write fails, stop and report the failure — do not leave the ADR log in a partially-written state.edit:
no:
Anything else (silence, "ok", "sure", "looks good", "cancel", "skip", ambiguous text):
no — do not write anything. Re-ask the question once: "To confirm: skip recording this decision? (yes to record / no to skip)". If still ambiguous, treat as no and move on.After every successful write, rewrite the index by scanning all .md files in docs/maxi/adr/ (excluding README.md). Sort by ADR number ascending. Read each ADR file's own frontmatter and H1 for the ADR, Title, Status, and Created columns. Status must reflect the current frontmatter value (including superseded or deprecated — do not default to accepted).
The Related Specs column is built by reverse-lookup — ADRs no longer carry a related_specs field, so the linkage is read from the spec side:
docs/maxi/specs/*/spec.md and read its related_adrs frontmatter list (a list of full ADR slugs like 0003-constitution-decoupled-from-claudemd).related_adrs contains that ADR's slug.—.# Architecture Decision Records
| ADR | Title | Status | Created | Related Specs |
|-----|-------|--------|---------|---------------|
| [0001](0001-slug.md) | Title of decision | accepted | 2026-05-08 | 0001-csv-to-json |
| [0002](0002-slug.md) | Another decision | superseded | 2026-05-15 | — |
An eligible amendment for a linked active spec with a matching design_cycle, including after a rollback from done, is the sole exception and must use the full-draft, exact-diff, explicit-yes procedure above. Otherwise, once an ADR is written, its content is immutable. These fields MAY be updated:
status (accepted → deprecated or superseded)superseded_bysupersedesThese fields and the body sections MUST NOT be edited on an existing ADR:
adr, slug, createdIf the user wants to revise a past decision, create a new ADR that supersedes the old one. The old one stays as a historical record.
If asked to edit an ineligible ADR's body: decline and explain — "ADRs are append-only. To revise this decision, I can create ADR-NNNN that supersedes ADR-NNNN. Shall I?"
When this skill emits prose that references another maxi artifact (an ADR, spec, plan, tasks, constitution, or repo file) — in an artifact body or in a chat report — render it as a relative Markdown link, not a bare slug/number/code span:
.md (an ADR slug like 0003-constitution-decoupled-from-claudemd; for generic spec artifacts use <feature-dir>/<name>, e.g. 0002-migrate-adr-review-fixes/spec; non-.md files keep their full name).related_adrs entries stay bare slugs) or within-document IDs (FR-012, section names).| Mistake | Correct behaviour |
|---|---|
| Writing the file before showing the draft | Always show draft first, wait for yes |
| Deciding "this isn't really a contradiction" silently | Surface any resemblance, let user decide |
| Using a manually constructed frontmatter | Use adr-template.md as base |
| Picking a number from the file count | Find the highest numeric prefix among docs/maxi/adr/NNNN-*.md, add 1, and zero-pad to 4 digits; use 0001 when none exist |
| Forgetting to regenerate README.md | Always regenerate after every write |
| Editing an ineligible ADR body | Decline; offer to supersede instead |
| Leaving a superseded ADR in an active spec index | On supersession, replace its slug with the accepted successor in that spec's related_adrs; append only for an independent ADR or an absent old slug |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub amoutiers/maxi-superpowers --plugin maxi34 skills in this plugin
/analyzeUse when the user invokes /maxi:analyze or wants to audit spec/plan/tasks artifacts for quality issues — spec must be at status "tasked" or later; constitution is required/boardUse when the user invokes /maxi:board or wants a kanban overview of all specs and their pipeline status in the current project/brainstormingYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation)./cancelUse when the user invokes /maxi:cancel, says a feature is abandoned, dead, or will never ship — requires active spec status, explicit reason, and explicit yes/no confirmation before writing anything.