architecting-software — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited architecting-software (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill guides an Architect agent through designing software architecture from a confirmed PRD. It sits between upstream product definition (managing-product) and downstream task decomposition, encoding the discipline needed to translate "what to build" into "how to build it" — systematically, driver-first, and without the documented failure modes of AI-generated architecture.
Use this skill when a PRD exists and the system structure has not yet been decided.
This skill covers:
This skill does NOT cover:
managing-product)Handoff position:
managing-product → architecting-software → decomposing-work → enriching-roadmap
(PRD.md) (ARCHITECTURE.md + ADRs) (ROADMAP.md) (enriched roadmap)Receive from upstream: a confirmed PRD.md with problem statement, target users, success criteria, MoSCoW-prioritised requirements, constraints, and non-goals.
Hand off downstream: ARCHITECTURE.md in the project root and optional ADRs in docs/decisions/ — ready for decomposing-work to begin without architectural ambiguity.
Before starting, confirm you have:
PRD.md — complete, reviewed, and finalised by managing-productIf team size is absent and cannot be inferred, flag this for human input before Step 3 — it is an architectural driver.
Always:
ARCHITECTURE.md — placed in the project root. Uses the codemap-centric structure defined in references/architecture-template.mdWhen complexity warrants (see Step 2):
docs/decisions/NNNN-title.md — one ADR per significant structural decision. Uses the MADR minimal format defined in references/adr-template.mdThe depth of architecture documentation varies by workflow tier. The same skill and process apply — the output depth differs.
| Tier | ARCHITECTURE.md depth | ADRs |
|---|---|---|
| Quick | 10-20 lines. Overview + key decisions only. Skip codemap if project is small enough to navigate directly. | None |
| Standard | Codemap + key decisions. Cover component boundaries and primary patterns. | Optional — only for genuinely significant decisions |
| Thorough | Full template — overview, codemap, cross-cutting concerns, invariants, key decisions, dependencies, open questions | Yes — one per significant decision |
The architect should calibrate depth to the project, not produce a 200-line architecture document for a 3-file bug fix. When in doubt, start light and add detail only where it prevents downstream ambiguity.
What you're doing: Categorising every PRD requirement so drivers can be identified in Step 2. Do not select any pattern in this step.
Read the PRD and sort requirements into:
Functional requirements — what the system must do (features, user stories). These drive component responsibilities but rarely determine structural choices alone.
Quality attribute requirements — how well the system must perform. Look for these signals in: success criteria, constraints, acceptance criteria, and any performance or security statements. Translate vague statements:
Constraints — fixed limitations: budget, timeline, team skills, technology mandates, regulatory requirements, existing systems.
Output: Three labelled lists. If a requirement is ambiguous, log it as an open question for human resolution before proceeding.
What you're doing: Finding the 3–7 requirements that force structural decisions. An architectural driver is any requirement — functional, quality attribute, or constraint — that forces a decision affecting many components, creates irreconcilable conflict with another requirement, cannot be met with standard patterns without deliberate choice, or carries significant business risk if unmet.
Scale calibration — determine project complexity before proceeding:
| Signal | Simple | Moderate | Complex |
|---|---|---|---|
| User types | 1 | 2 | 3+ |
| External integrations | 0–1 | 2–3 | 4+ |
| Explicit quality attribute requirements | None | 1–2 | 3+ |
| Team size | 1–5 | 6–20 | 20+ |
| Compliance requirements | None | Light | Regulated |
Rank drivers by: (a) business impact if unmet, and (b) difficulty of satisfying given other constraints. Primary drivers are high on both axes. Document ranked list before Step 3.
Output: Ranked list of 3–7 architectural drivers with brief justification for each.
What you're doing: Selecting the structural pattern for each of five dimensions, in order. Each decision constrains the next. Every selection must trace to a named driver — if a pattern cannot be justified by a driver, default to the simpler option.
Make decisions in this sequence:
#### 3a. Deployment Model
| Signal | Serverless | Containers/VMs |
|---|---|---|
| Traffic pattern | Variable, spiky | Predictable, sustained |
| Request duration | Short (under 15 min) | Any, including long-running |
| Cold start tolerance | Acceptable | Low latency required always |
| Ops maturity | Low — managed infra preferred | Medium–high |
| Cost model preference | Pay-per-request (cheap at low scale) | Provisioned compute (cheap at high scale) |
| Vendor lock-in tolerance | High | Low |
Default: Containers for sustained workloads; serverless for event-driven background jobs. Most production systems blend both.
#### 3b. Deployment Topology
| Signal | Monolith | Modular Monolith | Microservices |
|---|---|---|---|
| Team size | 1–5 | 5–50 | 50+ |
| Domain clarity | Unknown or emerging | Moderately understood | Well-understood, stable bounded contexts |
| Scaling requirements | Uniform, modest | Mostly uniform | Highly variable per domain |
| Operational maturity | Low | Medium | High — requires mature CI/CD, observability |
| Data isolation requirement | Low | Medium | High — compliance or ownership |
Default: modular monolith. Move to microservices only when you have organisational signals: deployment coordination is a bottleneck, teams step on each other's code, or domains have dramatically differing scaling needs. Microservices are an organisational scaling pattern first; do not apply them speculatively.
Conway's Law check: State what team structure this architecture requires. If it conflicts with known team constraints, revise the structure.
#### 3c. Internal Code Organisation
Governs the structure inside a service or monolith — independent of deployment topology.
| Signal | Layered | Hexagonal | Clean |
|---|---|---|---|
| Project complexity | Simple–medium | Medium–complex | Complex |
| Team experience | Beginner–intermediate | Intermediate–advanced | Advanced |
| Expected lifespan | Short (MVP, prototype) | Medium–long | Long |
| Testing requirements | Light | High testability required | Maximum testability |
| External dependencies | Few, stable | Many or likely to change | Many, business logic must be isolated |
| Business logic complexity | Simple CRUD | Moderate domain logic | Rich domain model |
Default: layered for MVPs and simple projects; hexagonal when external dependencies are many or likely to change and testability matters. Clean Architecture is hexagonal with more explicit layer naming — treat them as interchangeable unless you need the additional structure.
Caution: layered architecture tends to degrade into a "big ball of mud" as complexity grows because layers are not enforced. If you expect significant lifespan or domain complexity, choose hexagonal.
Dependency direction rule: State which way dependencies flow and encode it as an invariant. For hexagonal/clean: infrastructure depends on core, never the reverse. For layered: presentation → application → domain → infrastructure.
#### 3d. Communication Pattern
| Need | Request-Response | Event-Driven |
|---|---|---|
| User needs immediate result | Yes | No |
| Strong consistency required | Yes | No (needs saga/outbox pattern) |
| Background or async workflows | No | Yes |
| High fan-out (one event, many consumers) | No | Yes |
| Simple CRUD | Yes | Overkill |
Default: Request-response. Add event-driven for specific async workflows (background jobs, multi-step workflows, high fan-out). Introducing event-driven architecture adds observability and debugging complexity — only when a specific driver requires it.
#### 3e. Data Strategy
| Signal | Relational (SQL) | Document (NoSQL) |
|---|---|---|
| Schema | Well-defined, stable | Variable, evolving |
| Relationships | Complex — many joins | Few — denormalised |
| Consistency requirement | Strong (ACID) | Eventual acceptable |
| Query patterns | Complex, ad-hoc | Known access patterns, high write throughput |
| Domain examples | Finance, inventory, user accounts | Content, catalogues, real-time apps |
Default: PostgreSQL. It handles most applications at significant scale, supports JSON columns for flexibility, and provides ACID guarantees that prevent whole categories of bugs. Add specialised stores only when a specific, measurable problem requires them: Redis for caching/sessions, Elasticsearch for full-text search, a time-series DB for high-volume telemetry.
#### 3f. Frontend Approach
| Signal | SPA | SSR | SSG | MPA |
|---|---|---|---|---|
| SEO required | No | Yes | Yes | Yes |
| Interactivity | High | Medium–high | Low | Low |
| Content update frequency | Any | Real-time or per-user | Infrequent (rebuild on change) | Any |
| Infrastructure complexity | Low — static hosting | Medium — Node server | Low — static hosting | Medium |
| Domain examples | Admin dashboards, internal tools | E-commerce, SaaS, social | Blogs, docs, marketing | Enterprise portals |
Default: SSG for mostly-static content; SSR for SEO + interactivity + dynamic personalisation; SPA for internal tools and authenticated apps with no SEO requirement.
Output: One selected pattern per dimension with the driver(s) it satisfies stated explicitly. If no driver justifies a more complex option, the simpler default wins.
What you're doing: Choosing specific technologies to implement the structural patterns selected in Step 3. Architecture patterns first, technology second — this step follows structural decisions, not the other way around.
For simple projects (Step 2: Simple), apply the simplicity defaults directly — formal decision matrix is only warranted when multiple viable options exist with meaningful trade-offs.
Use a weighted decision matrix for any non-obvious choice:
Selection anti-patterns to avoid:
Build vs buy: For commodity capabilities (authentication, payments, email delivery, search), prefer a managed service or open-source solution. Build only when the capability is a direct competitive differentiator or when no adequate solution exists.
Output: Selected technology for each structural dimension, with brief justification.
What you're doing: Confirming the architecture explicitly addresses the non-functional concerns that AI-generated architectures consistently miss. Walk through each item and state how the proposed architecture handles it. These items may overlap with your identified drivers — this checklist catches ones that were not surfaced as primary drivers but still require a decision.
Run this checklist against the architecture proposed in Steps 3–4:
If a PRD requirement or driver maps to an item on this list, the architecture must address it. If an item has no driver, record a brief statement explaining why it is out of scope or deferred.
Output: Completed checklist with one-line architecture decision per item.
What you're doing: Writing ARCHITECTURE.md and any ADRs required.
#### ARCHITECTURE.md
Use the template at references/architecture-template.md. The codemap is the most important section — start there. Fill every section. Write at the level of structure and intent, not implementation detail. Length target: 500–1,500 words for most projects. Optionally include a high-level system diagram (C4 Container level) using Mermaid or PlantUML if the system has 3+ major components.
Follow these documentation principles:
src/middleware/auth.ts" not "authentication is handled centrally"#### ADRs
Write one ADR per significant structural decision made in Steps 3–4. Use the MADR minimal template at references/adr-template.md. A decision is significant if:
ADR naming: docs/decisions/NNNN-brief-title-with-hyphens.md (e.g., 0001-use-modular-monolith.md)
For simple projects: if no decision meets the "significant" bar, skip ADRs. One clear reference in ARCHITECTURE.md is sufficient.
Output: ARCHITECTURE.md in project root, ADRs in docs/decisions/ (if applicable).
What you're doing: Running a structured self-review before presenting the architecture. Every failing item must be corrected before output.
Driver traceability check:
Completeness check:
Simplicity check:
Uncertainty check:
If any item fails, fix it. Do not present architecture with known gaps or unjustified complexity.
Output: Validated ARCHITECTURE.md, ADRs, and a brief handoff statement confirming what was decided and what remains open.
references/architecture-template.md — codemap-centric architecture document templatereferences/adr-template.md — MADR minimal ADR templatePRD has no explicit quality attributes: If the PRD contains no scaling, performance, or security requirements, the default drivers are: (1) maintainability for the identified team size, and (2) delivery speed. Apply simplicity defaults across all five dimensions. Do not invent quality attribute requirements that are not stated or clearly implied.
User or PRD specifies a technology before architecture is defined: Record the technology preference in the constraints. Still follow Steps 1–3 to determine the structural pattern. If the specified technology conflicts with an architectural driver, surface the conflict explicitly and flag for human decision before proceeding.
Greenfield vs brownfield: For brownfield (extending an existing system), Step 3 is constrained by the existing architectural patterns. Map what exists first. Identify whether the extension fits the existing patterns or whether a new bounded context is warranted. Do not redesign the existing system unless the PRD explicitly requires it.
Single-developer project: Apply the simplicity defaults forcefully: monolith, layered architecture, PostgreSQL, static hosting. The overhead of complex patterns is itself an architectural problem for a one-person team. Document simplicity as the driver.
Architecture has irreconcilable conflicts: Some driver combinations genuinely conflict (maximum performance + minimum cost, strong consistency + horizontal scale). When conflicts are genuine, present both options with their trade-offs explicitly, state which driver takes precedence, and flag for human decision. Do not silently choose and obscure the trade-off.
Context: PRD for a personal habit tracking web app. Single user (the developer). No scaling or compliance requirements stated. Developer is solo.
Expected outcome:
Context: PRD for a B2B SaaS platform with two user types (account admins and end users), third-party payment integration, email delivery, and a stated requirement for 99.9% uptime and SOC 2 compliance.
Expected outcome:
Context: PRD to add a mobile API to an existing Django monolith that powers a retail inventory management system. Existing database is PostgreSQL. No stated scaling requirements beyond current load.
Expected outcome:
This skill succeeds when:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.