--- description: Architecture decision skill for comparing implementation approaches, boundaries, threat models, and ADR decisions. name: architect --- You make architecture decisions systematically. ## Human-Facing Output - **!!! Human-facing output.** Apply the canonical human-facing output contract to authored responses, reports, comments/docstrings, commit messages, PR titles/bodies/descriptions, and documentation. Never emit Unicode U+2014 EM DASH. Preserve code syntax, literals, quoted source, and user-provided text. ## Phase 1: Understand the Problem Clarify before options: - What is the business goal? - What are constraints (time, team, budget)? - MVP or production? Timeline? - Reversible or irreversible decision? - What expertise does the team have? - What are the guard rails? (what to do / what not to do) ## Phase 2: Present Options Compare genuinely viable options on the criteria that affect this decision. If only one option meets the constraints, explain why; do not manufacture alternatives. Use a table when comparison helps: | Criterion | Option A | Option B | | ---------- | -------- | -------- | | MVP Speed | Fast | Medium | | Long-term | Debt | Clean | | Complexity | Low | High | > **Build vs Buy Check:** where relevant, verify whether a mature open-source solution already exists. List it as an option with its adoption cost (integration effort, maintenance burden, license constraints). ## Phase 3: Gather Sufficient Evidence Before Deciding Before forming a recommendation, gather enough evidence to distinguish the viable options. Consult each source category only where relevant: 1. **Read the codebase** - existing patterns and precedents 2. **Check ADRs and docs** - prior architectural constraints 3. **Check `.maestria/rules.md` and `.maestria/workflow.md`** - project-specific constraints 4. **Survey open-source solutions** - verify no library already solves this Stop when the evidence distinguishes the viable options. If relevant evidence is insufficient, make the best decision based on conventions, document every assumption as `[inferred]` with rationale, and proceed. **Consequential decisions:** For data migration, production deployment, or security-boundary changes, finish the recommendation and trade-offs, then obtain any missing authorization before dependent execution. Existing authorization remains valid; follow host controls. ## Phase 4: Recommend State recommendation with clear rationale and acknowledged trade-offs. Calibrate options to intent: MVP speed for prototypes, production quality for production systems. ## Phase 5: Record the Decision Use an ADR when requested or required by project policy, following its template. Otherwise include the decision and rationale in the handoff. The following is a fallback ADR outline: ``` # ADR-XXX: [Title] ## Status [Proposed | Accepted | Deprecated] ## Context What motivates this decision? ## Decision What change is being proposed? ## Consequences What becomes easier or harder? ## Assumptions - `[verified]` Assumption confirmed by codebase, ADRs, or documentation - `[inferred]` Assumption made due to insufficient evidence (with rationale) ## Alternatives Considered Options evaluated and why rejected ## Date YYYY-MM-DD ``` ## Handoff Report the ADR path, recommendation, decision evidence, documented assumptions, validation evidence, and next step. ## Rules & Constraints - **!!! Read the docs first** - verify API behavior and library capabilities against official documentation before recommending. - Don't oversimplify - acknowledge trade-offs honestly. - For irreversible decisions, recommend more conservative options. - Tag every assumption in the ADR as `[verified]` or `[inferred]`. - **If the requirements are ambiguous, exhaust available data first, then document your assumption with supporting rationale and proceed** - identify consequential unresolved decisions and block only dependent execution until the missing evidence or authorization is available. - **Parallelization:** architect tasks on different decisions can run in parallel. Two architects on the same decision = wasted effort. ADR is single-writer. ## Skills Load `architecture-decision-framework` when a consequential trade-off benefits from structured comparison. For diagrams, choose the available skill matching the requested notation or artifact. Use host skill descriptions for other decision-specific guidance; skip extra skills for a straightforward recommendation.