Use this skill to make architecture thinking useful during coding work. The goal is not to summarize architecture theory. The goal is to turn architectural concerns into better implementation choices, concrete verification, and clear decision notes.
Core Workflow
- Inspect the live code, repo guidance, current behavior, and any user supplied issue or design context before judging the architecture.
- Classify the scope of the change as local code, module, component, service, data boundary, deployment unit, or enterprise integration.
- Identify the top quality attributes that matter for this task. Prefer three or fewer unless the user asks for a broad review.
- Map the relevant boundaries: components, dependencies, public contracts, data ownership, runtime communication, and deployment constraints.
- Choose the smallest useful architecture pass:
- Light pass for one file, one function, or a narrow refactor.
- Standard pass for cross module changes, shared abstractions, public APIs, data access, or important tests.
- Deep pass for service boundaries, storage ownership, architecture style choices, migration plans, operational behavior, or decisions that should be recorded.
- Implement the change in the style of the repo, keeping edits scoped.
- Convert each important concern into a verification step. Prefer executable checks over opinions.
- Finish with changed files, checks run, decision summary, and remaining risk.
Architectural Significance Filter
Treat a choice as architecturally significant when it affects at least one of these:
- System structure or component boundaries.
- Quality attributes such as maintainability, scalability, performance, availability, security, resilience, deployability, observability, testability, usability, or portability.
- Dependencies between modules, services, teams, or vendors.
- Public interfaces, contracts, protocols, schemas, migrations, or versioning.
- Data ownership, read and write paths, transactions, consistency, or integration flow.
- Construction technique, framework, platform, tool, build system, or process choice that will be hard to reverse.
If none apply, keep the work at normal code review depth.
Lenses to run, not re-implement
This skill is the session-level frame; it does not re-derive the per-lens analyses. Delegate them:
- Trade-offs and coupling → run
architecture-lens: name the connascence type (strength × locality × degree) for any coupling the change adds, and use its decision lens to compare options (every option states what it gains and gives up — no option is free). - Layer placement and cohesion → run
architecture-lens: does each module keep one clear responsibility, and does the dependency direction stay clean? - Runtime / data flow → confirm the owning component or service stays clear and that sync vs async matches the needed reliability, latency, and consistency.
- Fitness function → for each boundary worth protecting, name the automated check that guards it in future changes.
Carry the findings from these lenses into the risk pass and the decision note below.
Decision Record Trigger
Create or draft an ADR when the decision changes long lived direction, affects more than one team, changes risk posture, introduces a platform or vendor, changes data ownership, changes public contracts, or resolves a repeated debate.
Use the ADR template in references/adr_risk.md.
Risk Pass
For standard and deep passes, name risks with impact and likelihood:
- Low: small impact or unlikely.
- Medium: meaningful impact or plausible.
- High: severe impact and plausible, or unknown technology.
For each high risk item, provide a mitigation, verification step, and owner if the user has given team context. If the task is code only, make the owner the current change set. For the full per-risk record fields, use references/adr_risk.md.
Verification Menu
Choose checks matching your top quality attributes — pick checks for the two or three attributes the change most affects, not every attribute. The full per-attribute catalog of concrete checks is in references/verification_menu.md; read it when you need the specific checks for an attribute.
Output Contract
For implementation work, keep the final response concise:
- What changed.
- Why the change is architecturally safe or what trade off it accepts.
- Verification run.
- Remaining risk.
For review work, lead with findings by severity and include file and line references.
References
Read only what is needed:
references/architecture_lens.mdfor quality attributes, modularity, component thinking, and fitness functions.references/style_fit.mdfor architecture style selection.references/adr_risk.mdfor ADRs, risk analysis, and diagrams.references/team_checklists.mdfor team boundaries, review checklists, and release checks.references/verification_menu.mdfor the per-attribute catalog of concrete verification checks.