This skill should be used when managing Architecture Decision Records or C4 diagrams.
From soleurnpx claudepluginhub jikig-ai/soleur --plugin soleurThis skill uses the workspace's default tool permissions.
references/adr-template.mdreferences/c4-reference.mdreferences/nfr-reference.mdCreate, manage, and query Architecture Decision Records (ADRs) and generate Mermaid C4 architecture diagrams. All artifacts are stored as version-controlled markdown in knowledge-base/engineering/architecture/.
| Command | Description |
|---|---|
architecture create [title] | Create a new ADR with the next sequential number |
architecture list | Display all ADRs with status, title, and date |
architecture supersede <N> [title] | Mark ADR-N as superseded and create its replacement |
architecture diagram [type] | Generate a Mermaid C4 diagram (context, container, or component) |
architecture assess [feature] | Assess a feature against the NFR register and recommend relevant requirements |
If no sub-command is provided, display the table above and ask which sub-command to run.
$ARGUMENTS is parsed for a sub-command and optional parameters:
architecture [sub-command] [arguments...]
Verify the knowledge-base directory exists:
if [[ ! -d "knowledge-base" ]]; then
echo "No knowledge-base/ directory found. Create one first or run /soleur:sync."
# Stop execution
fi
Create the architecture directories if they do not exist:
mkdir -p knowledge-base/engineering/architecture/decisions
mkdir -p knowledge-base/engineering/architecture/diagrams
Branch safety check (defense-in-depth): Run git branch --show-current. If the result is main or master, abort with: "Error: architecture skill cannot run on main/master. Checkout a feature branch first."
Create a new ADR with the next sequential number.
Determine next ADR number. List existing ADRs in knowledge-base/engineering/architecture/decisions/:
ls knowledge-base/engineering/architecture/decisions/ADR-*.md 2>/dev/null | sort -V | tail -1
Extract the highest number and increment by 1. If no ADRs exist, start at 001.
Get the title. If a title was provided in $ARGUMENTS, use it. Otherwise, use AskUserQuestion: "What architectural decision are you recording?"
Generate the filename. Convert the title to kebab-case: ADR-<NNN>-<kebab-title>.md
Read the ADR template from adr-template.md.
Write the ADR file. Create knowledge-base/engineering/architecture/decisions/ADR-<NNN>-<kebab-title>.md using the template. Fill in:
adr: ADR-<NNN>title: <title>status: activedate: <today YYYY-MM-DD>Gather context. Ask the user (or use $ARGUMENTS context if running in pipeline):
knowledge-base/operations/expenses.md for baseline; use "None" if no impact)knowledge-base/engineering/architecture/nfr-register.md. Use "None" if no impact.Write the ADR body with the gathered context. If a diagram was requested, generate using proper C4 syntax from c4-reference.md.
Announce: "Created ADR-<NNN>: <title> at knowledge-base/engineering/architecture/decisions/ADR-<NNN>-<kebab-title>.md"
Display all ADRs with their status, number, title, and date.
Scan the decisions directory:
ls knowledge-base/engineering/architecture/decisions/ADR-*.md 2>/dev/null
If no ADRs exist: Display "No ADRs found. Run /soleur:architecture create to create one."
For each ADR file: Read the YAML frontmatter and extract adr, title, status, date.
Display as a table:
| # | Title | Status | Date |
|---|-------|--------|------|
| ADR-001 | Use Mermaid for diagrams | active | 2026-03-27 |
| ADR-002 | PWA-first architecture | superseded | 2026-03-20 |
Mark an existing ADR as superseded and create its replacement.
Parse the ADR number from $ARGUMENTS. If not provided, use AskUserQuestion: "Which ADR number to supersede?"
Find the existing ADR by matching ADR-<NNN>-*.md in knowledge-base/engineering/architecture/decisions/.
If not found: Display "ADR-<NNN> not found." and stop.
If already superseded: Display "ADR-<NNN> is already superseded by ADR-<M>." and stop.
Get the replacement title. If provided in $ARGUMENTS, use it. Otherwise, use AskUserQuestion: "What is the title of the replacement decision?"
Create the replacement ADR using the create sub-command flow (next sequential number). Add supersedes: ADR-<NNN> to the YAML frontmatter.
Update the original ADR. Read the file and update:
status: supersededsuperseded-by: ADR-<NEW>Announce: "ADR-<NNN> superseded by ADR-<NEW>: <title>"
Generate a Mermaid C4 model architecture diagram using the proper C4 diagram syntax.
Read c4-reference.md now for the complete C4 Mermaid syntax reference before generating any diagram.
Determine diagram type. If provided in $ARGUMENTS, use it. Otherwise, use AskUserQuestion:
| Type | C4 Level | Mermaid Keyword | Description |
|---|---|---|---|
context | Level 1 | C4Context | System boundaries, external actors, and system-to-system relationships |
container | Level 2 | C4Container | Applications, databases, and services within the system boundary |
component | Level 3 | C4Component | Internal components of a single container |
Gather context. Read relevant project files to understand the system:
knowledge-base/project/README.md for system overviewknowledge-base/project/components/ for component documentationknowledge-base/engineering/architecture/decisions/ for architectural decisionsknowledge-base/engineering/architecture/diagrams/ for consistencyGenerate the Mermaid diagram using proper C4 syntax from c4-reference.md. Key rules:
C4Context, C4Container, or C4Component)Person, System, System_Ext, Container, ContainerDb, Component, etc.Rel(from, to, label, ?protocol) for relationships — NOT -->Enterprise_Boundary, System_Boundary, or Container_Boundary for grouping_Ext suffix for external systems/actorsWrite the diagram file. Save to knowledge-base/engineering/architecture/diagrams/<type>.md:
# <Title> (C4 Level N)
Generated: YYYY-MM-DD
```mermaid
C4Context
title System Context diagram for [System Name]
Person(user, "User Role", "Description")
System(sys, "System Name", "Description")
System_Ext(ext, "External System", "Description")
Rel(user, sys, "Uses", "HTTPS")
Rel(sys, ext, "Sends data to", "API")
```
## Notes
[Context about the diagram, references to relevant ADRs]
Announce: "Diagram saved to knowledge-base/engineering/architecture/diagrams/<type>.md"
Assess a feature or plan against the NFR register to identify which non-functional requirements are relevant and what their current status is.
Read nfr-reference.md now for the assessment checklist and common NFR patterns by decision type.
Get the feature description. If provided in $ARGUMENTS, use it. Otherwise, check for a plan file on the current branch:
feat-* branch, look for knowledge-base/project/plans/*<feature-slug>*-plan.mdRead the NFR register at knowledge-base/engineering/architecture/nfr-register.md.
Identify affected containers and links. Read the Container & Link Inventory in the NFR register. Map the feature to specific C4 containers and links it touches (e.g., a new external service adds a network link; a new UI feature affects Dashboard and API Routes).
Classify the feature against the decision type patterns from nfr-reference.md:
Assess each NFR category. For each of the 7 categories (Observability, Resilience, Testing, Configuration & Delivery, Scaling & Recovery, Security, Data Quality), determine:
Output the assessment as a per-container table:
## NFR Assessment: [Feature Name]
### Affected Containers/Links
- Dashboard, API Routes, Agent Runtime -> New External Service (new link)
### Assessment
| NFR | Requirement | Container/Link | Status | Impact | Evidence Gap |
|-----|-------------|----------------|--------|--------|-------------|
| NFR-001 | Logging | New Service | — | Needs attention | No logging configured |
| NFR-026 | Encryption In-Transit | Agent Runtime -> New Service | — | Needs attention | HTTPS required |
| NFR-007 | Circuit Breaker | Agent Runtime -> New Service | — | Risk introduced | No fallback for new dependency |
| NFR-026 | Encryption In-Transit | Founder -> Dashboard | Implemented | No change | Cloudflare |
Recommend actions. For each NFR with "Needs attention" or "Risk introduced" impact, propose a specific action referencing the affected container/link (e.g., "Add circuit breaker on Agent Runtime -> Stripe link", "Configure structured logging for New Service container").
Offer to create an ADR. If the assessment reveals architectural decisions (e.g., choosing to accept a risk, implementing a new NFR), ask: "Create an ADR to document these decisions?"
ADRs and learnings serve different purposes:
| ADR | Learning | |
|---|---|---|
| When | At decision time | After implementation |
| What | "Why we chose X over Y" | "What went wrong and how we fixed it" |
| Format | Context / Decision / Consequences | Problem / Solution / Key Insight |
| Location | knowledge-base/engineering/architecture/decisions/ | knowledge-base/project/learnings/ |
| Lifecycle | Active → Superseded | Evergreen (archived when stale) |