--- 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-chiron` first — it scans your codebase once and generates `.chiron-context.md` so 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: ****. 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: