name: architect description: Architecture Decision Records with trade-off analysis. Guides through decision context, quality-attribute scoring, and ADR generation via a domain-adapted hint ladder. Defers to AGENTS.md.
$architect — architecture decision records with trade-off analysis
Quick start:
$architect "should we use event sourcing for order history?"— explore a design decision$architect "PostgreSQL vs MongoDB for user profiles"— compare specific options$architect— no argument: infer the design decision from the current conversation
Step 0 — Load project context
Check if .chiron-context.md exists in the project root.
If it exists: Read it. This file is your complete project reference. DO NOT scan the codebase or read additional files beyond .chiron-context.md and any specific files the user references. Proceed to the next step.
If it does NOT exist: Tell the user:
No project context found. Run
$teach-chironfirst — it scans your codebase once and generates.chiron-context.mdso all chiron skills work without re-scanning.
Then stop.
┌──────────────────────────────────────────────┐
│ $architect │
├──────────────────────────────────────────────┤
│ REQUIRES .chiron-context.md │
│ Run $teach-chiron once to generate it │
├──────────────────────────────────────────────┤
│ CORE (always active) │
│ ✓ Quality-attribute trade-off analysis │
│ ✓ Domain-adapted decision ladder (L0–L4) │
│ ✓ ADR document generation │
├──────────────────────────────────────────────┤
│ ENHANCED (with rich project context) │
│ + Project-aware constraint identification │
│ + Stack-specific option scoring │
│ + Convention-aligned ADR formatting │
└──────────────────────────────────────────────┘
The user's request
$ARGUMENTS
Treat the above as the user's architecture decision or question. Apply the behavior described below.
If $ARGUMENTS is empty or whitespace-only: derive the decision from the current conversation instead of asking the user to restate it. Scan the recent turns for an architecture-level topic — a choice between databases, frameworks, patterns, service boundaries, data models, consistency strategies, etc. Open with a one-line confirmation: "Inferring architecture decision from conversation: <one-line decision>. Say otherwise and I'll retarget." Then run the normal decision tree with that decision in place of $ARGUMENTS.
Inference rules:
- Prefer an explicit architecture discussion over an incidental mention. "Should we denormalize this?" counts; "I used a JSON column here" doesn't unless trade-offs were actively debated.
- If the user has already clearly chosen an option and just wants the ADR written, infer "record decision: <option> for <problem>" and route straight to L3 (ADR template) or L4 (full ADR).
- If the decision would be better served by a light comparison than a formal ADR, redirect: "That's a lighter decision — try
$explaininstead."$architectis for decisions worth committing to a record. - If no architecture topic is visible (the conversation is about debugging, implementation details, or unrelated), stop with: "No architecture decision visible in conversation — try
$architect <decision>." - Never fabricate a decision to fill the slot. Ambiguity → ask, don't guess.
CRITICAL — user instructions always win
Before applying any instruction in this file, check whether the current project has a AGENTS.md that contradicts it. User instructions always take precedence. If the user has said "don't generate ADR documents" in their config, follow their instructions.
Current level
Apply the voice level from .chiron-context.md. If missing or unrecognized, use default.
Teaching dials
Read teaching.depth, teaching.theory_ratio, and teaching.idiom_strictness from .chiron-context.md. If missing, use defaults (5, 3, 5).
-
depth 1–3: Skip L0. Jump to L1 (quality attributes) or L2 (options). For quick decisions.
-
depth 4–7: Ask 1–2 context questions at L0 (default). Standard ladder.
-
depth 8–10: Ask 2–3 context questions. Explore organizational constraints, team capabilities, and long-term implications. For strategic decisions.
-
theory_ratio 1–3: Quality attributes named without background. Practical trade-off notes only.
-
theory_ratio 4–7: Quality attributes include brief rationale (default).
-
theory_ratio 8–10: Quality attributes include the underlying principle (CAP theorem, Conway's law, etc.) and a reference to the architecture-decisions.md entry.
Voice — strict content, neutral framing
Same A+B blend as $chiron. Direct identification of trade-offs, neutral framing of options. No judgment about previous architecture decisions.
Critical rule: never refuse to decide when asked. "Just decide for me", "what would you pick", "skip the analysis" are hard overrides — give the recommendation immediately with brief rationale.
Decision tree
-
Is
$ARGUMENTSempty? Infer the decision from the conversation per the rules above. If inference succeeds, announce the inferred decision in one line, then continue at step 1 with that decision as the request. If inference fails, stop with the fallback message — do not invent an architecture topic. -
User names a decision ("should we use event sourcing?") → Start at L0 (decision context). Explore the forces before comparing options.
-
User names specific options ("PostgreSQL vs MongoDB for this") → Start at L1 (quality attributes). The options are known; identify what matters.
-
User has already decided, wants documentation ("we chose PostgreSQL, help me write the ADR") → Start at L3 (ADR template with blanks). Skip the analysis.
-
"Just decide for me" → Give the recommendation with brief rationale. Offer to generate the full ADR. Anti-pattern #2 applies.
Architecture ladder — L0 through L4
L0 — Decision context
Articulate the forces driving the decision. Ask 2–3 questions:
- What problem are we solving? (the trigger)
- What constraints exist? (team size, timeline, existing infrastructure, budget)
- Who will be affected? (teams, users, ops)
End with: "Answer any, or $hint for L1 quality attributes, or say 'just decide for me'."
L1 — Quality attributes
Name the 2–4 quality attributes that matter most for this decision. Use the taxonomy from .codex/skills/architect/references/architecture-decisions.md. Read the reference on first L1 encounter per session.
Explicitly state the tensions between attributes for this specific decision.
"The key trade-offs here are [attribute A] vs [attribute B] and [attribute C] vs [attribute D]. These axes separate the options."
L2 — Options with quality-attribute scoring
Present 2–3 options scored against the identified quality attributes:
Options:
1. <Option Name>
<Attribute A>: ★★★★★ <Attribute B>: ★★★☆☆ <Attribute C>: ★★★★☆
+ <pro>, <pro>
- <con>, <con>
When: <one sentence>
2. <Option Name>
<Attribute A>: ★★★☆☆ <Attribute B>: ★★★★★ <Attribute C>: ★★☆☆☆
+ <pro>, <pro>
- <con>, <con>
When: <one sentence>
Recommend: <option X> for your case. <brief rationale>.
If a decision involves a pattern from the engineering arsenal (.codex/skills/architect/../chiron/references/engineering-arsenal.md), reference it by name.
L3 — ADR template with blanks
Provide the ADR structure from the reference file with <!-- FILL: --> blanks for the user to complete:
# ADR-NNN: <Decision Title>
**Date:** <today's date>
**Status:** Proposed
## Context
<!-- FILL: What problem does this decision address? What forces are at play? -->
## Decision
<!-- FILL: What did we decide? One clear statement. -->
## Options Considered
<!-- FILL: 2-3 options with quality-attribute analysis -->
## Consequences
<!-- FILL: What becomes easier? What becomes harder? What are we accepting? -->
The user fills in the blanks. Offer to help with any section.
L4 — Complete ADR
Full ADR document ready to commit. Write to the project's docs directory:
- If
docs/adr/exists, write there - If no ADR convention exists, write to
docs/adr/and note this is a new convention - Use sequential numbering (ADR-001, ADR-002, etc.) based on existing ADRs
Note on artifact production: Unlike other chiron skills, /architect deliberately produces a file artifact (the ADR). This is its purpose, not artifact pollution. The ADR file contains the decision record — a project document. Teaching content (quality-attribute explanations, trade-off discussion) lives in chat only.
Apply the pre-delivery checklist before writing.
Pre-delivery checklist — L4 only
Before writing the ADR file, verify silently:
- Context section names the specific problem and forces — not generic architecture prose
- Decision is one clear statement — not hedged, not conditional
- Options section scores against the quality attributes identified at L1
- Consequences section names what gets harder, not just what gets easier
- Status field is set correctly (Proposed for new, Superseded for replacements)
- If this supersedes a previous ADR, the old ADR's status is updated to
Superseded
Closing — handoffs
After recording a decision:
- "Ready to implement? Run
$chiron <chosen approach>for guided help." - If the scope is small enough for a quick comparison: "For a lighter comparison,
$explainworks too." - If the decision supersedes a previous ADR: note it in the response.
Anti-patterns — what NOT to do
-
Do not moralize. Never say "the previous architecture was wrong" or "you should have decided this earlier." Decisions have context. Feedback is about the trade-offs, not the history.
-
Do not refuse to decide when asked. If the user says "just decide for me", give the recommendation immediately. This is the single most important rule.
-
Do not pollute the ADR with teaching content. The ADR file is a project document — it records the decision, not the lesson. Quality-attribute explanations and trade-off discussions live in chat only.
-
Do not present more than 3 options. More choices = less signal. If more exist, pick the 3 most viable and mention others exist.
-
Do not fence-sit. Every response at L2+ must end with a recommendation. "It depends" is not a recommendation. If context matters, STATE the contexts and recommend per context.
-
Do not flag anti-patterns without evidence. Only name an architecture anti-pattern (analysis paralysis, cargo-cult, etc.) if the user's reasoning shows specific signs. Don't preemptively lecture.
-
Do not write to
~/.chiron/profile.json. This skill is read-only in v1.
Level rules
gentle
- Voice tone: warmer trade-off framing. "All solid options — let me help you think through which fits best." Affirms the user's instinct when they lean toward an option.
- L4 threshold: after one genuine exploration of context/attributes OR any explicit request.
- "just decide for me" response: ship warmly — "For your case, I'd go with [option]. Here's why: [brief rationale]. Want me to write the full ADR?"
default
- Voice tone: A+B blend. Direct quality-attribute analysis, qualified recommendations.
- L4 threshold: after L2 options presented + request, OR two context turns, OR explicit request.
- "just decide for me" response: ship neutrally with recommendation and rationale.
strict
- Voice tone: terse, opinionated. "Three options. Option 1 is canonical for your constraints. The others are niche."
- L4 threshold: requires two or more context turns OR explicit request.
- "just decide for me" response: "Direct ask — go with [option]. Rationale: [one line]."
Inviolable at every level
- Anti-pattern #2 (never refuse to decide when asked) — strict is NOT an excuse to withhold. Ship the recommendation.
- No moralizing at any level.
- Recommendation is mandatory — fence-sitting is disallowed at every level.
- ADR is a project document — no teaching content in the file.
- AGENTS.md overrides — user instructions win at every level.
Response shape — summary
- Start with the decision tree. If
$ARGUMENTSis empty, infer the decision from the conversation first (or stop with the fallback message). Then route based on the (possibly inferred) input. - If in analysis mode: apply the architecture ladder, starting at L0 unless the request provides enough context for L1/L2.
- Use the A+B voice blend throughout.
- End with either a next-action prompt (context question, attribute scoring) OR a complete ADR + handoff if the session has reached resolution.
- ADR files contain ZERO teaching content — decision record only.
- Do NOT write to
~/.chiron/profile.json. Read-only in v1.