agentleFS
nohemi20231nohemi20231/design-skills/skills/software-architecture/SKILL.md

software-architecture

Skill0 starsChanged 16 days agoApache-2.0View on GitHub

Use when designing or reviewing system structure: layering, module and service boundaries, microservices, data ownership, integration patterns, and architecture decisions (ADRs).

30 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use llm-app-patterns, backend-engineering and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • xfstudioSkill

    llm-app-patterns

    Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

    Also in 3 projects that use this

  • rogue-dev-studioSkill

    backend-engineering

    Expert backend application engineering: layered architecture, domain services, validation, transactions, caching boundaries, background jobs, and framework idioms (e.g. Laravel/Node) without leaking business rules into controllers. Use when implementing or refactoring server-side features, services, form requests/DTOs, policies, queues, or integrating persistence with APIs.

    Also in 3 projects that use this

  • AJBcodingSkill

    sql-optimization-patterns

    Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.

    Also in 3 projects that use this

  • weirdgmeSkill

    backend-dev-guidelines

    Comprehensive backend development guide for Node.js/Express/TypeScript microservices. Use when creating routes, controllers, services, repositories, middleware, or working with Express APIs, Prisma database access, Sentry error tracking, Zod validation, unifiedConfig, dependency injection, or async patterns. Covers layered architecture (routes → controllers → services → repositories), BaseController pattern, error handling, performance monitoring, testing strategies, and migration from legacy patterns.

    Also in 3 projects that use this

  • ruvnetSkill

    github-workflow-automation

    Advanced GitHub Actions workflow automation with AI swarm coordination, intelligent CI/CD pipelines, and comprehensive repository management

    Also in 3 projects that use this

  • AnthropicSkill

    documentation

    Write and maintain technical documentation. Trigger with "write docs for", "document this", "create a README", "write a runbook", "onboarding guide", or when the user needs help with any form of technical writing — API docs, architecture docs, or operational runbooks.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. 0 are common, 17 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 26 edited versions we read keep these.

  • 17

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Trade-offs: every choice gives something up.

    line 24
  2. Distinctive:

    Reversibility: prefer decisions that are cheap to undo, and delay irreversible ones until the last responsible moment.

    line 25
  3. Distinctive:

    Microservices: use only when independent deployability, independent scaling, or team autonomy justifies the operational cost.

    line 33
  4. Distinctive:

    Use domain events for reactions across aggregates and contexts.

    line 39
  5. Distinctive:

    No shared tables and no cross-service joins.

    line 47
  6. Distinctive:

    Use synchronous calls (REST or gRPC) for queries that need an immediate answer.

    line 49
  7. Distinctive:

    Use asynchronous events for propagating changes and decoupling services.

    line 50
  8. Distinctive:

    Avoid long chains of synchronous calls.

    line 51
  9. Distinctive:

    Use sagas for multi-service workflows, choosing choreography or orchestration deliberately.

    line 54
  10. Distinctive:

    Use a transactional outbox for reliable event publishing.

    line 55
  11. Distinctive:

    Use circuit breakers, bulkheads, and fallbacks.

    line 60
  12. Distinctive:

    Use consumer-driven contract tests.

    line 63
  13. Distinctive:

    Keep secrets in a secrets manager.

    line 72
  14. Distinctive:

    Use Spring Cloud Gateway at the edge.

    line 118
  15. Distinctive:

    Use Resilience4j for timeouts, retries, and circuit breakers.

    line 119
  16. Distinctive:

    Use Micrometer with OpenTelemetry for metrics and tracing.

    line 120
  17. Distinctive:

    Use Spring Cloud Stream or Spring Kafka for events, with an outbox table for reliable publishing.

    line 121

“Common” is measured: kept by at least 6 in 10 of the 26 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Software Architecture

This skill covers structure above the class level. For code-level quality, use the clean-code skill. For judging whether a design is good at any level (economics of change, minimalism, cohesion and coupling, non-functional requirements), use the software-design skill. Read and update the living diagram with the architecture-diagram skill.

How to approach

  1. Clarify the drivers first. Establish the following, and ask about any that are unknown and would change the answer:
    • functional scope
    • quality attributes: scalability, availability, latency, consistency, security, maintainability, and cost
    • constraints: team size and skills, deadlines, and existing systems
  2. Propose the simplest architecture that meets the drivers. For significant decisions, present two or three options with their trade-offs.
  3. Record significant decisions as ADRs.
  4. Define how success is verified, using metrics and fitness functions such as ArchUnit rules, latency SLOs, and deploy frequency.

Core principles

  • Dependency rule: source dependencies point inward toward domain policy. The domain has no framework imports.
  • Separation of concerns: high cohesion within modules, low coupling between them.
  • Explicit boundaries and contracts: each module hides its internals behind a published interface.
  • Decompose by volatility: isolate what is likely to change. Don't abstract everything.
  • Trade-offs: every choice gives something up. Name what you give up.
  • Reversibility: prefer decisions that are cheap to undo, and delay irreversible ones until the last responsible moment.
  • Conway's law: align boundaries with team ownership.

Structural styles

  • Layered (controller, service, repository): fine for CRUD. Watch for leaking layers and anemic domains.
  • Hexagonal / clean architecture: a domain core, ports (interfaces) defined by the core, and adapters for web, persistence, and messaging.
  • Package by feature over package by layer.
  • Modular monolith: the default for new products and small teams. Enforce module boundaries with tooling.
  • Microservices: use only when independent deployability, independent scaling, or team autonomy justifies the operational cost.

Domain-driven design

  • Bounded contexts each have their own ubiquitous language.
  • Map how contexts relate: upstream and downstream, anti-corruption layer, shared kernel.
  • An aggregate is a consistency boundary. Keep aggregates small and reference other aggregates by ID.
  • Use domain events for reactions across aggregates and contexts.

Microservices checklist

  • Boundaries:
    • Draw boundaries along bounded contexts and business capabilities, not technical layers.
    • Splitting by database table or noun is a smell.
  • Data:
    • Each service owns its database.
    • No shared tables and no cross-service joins.
  • Communication:
    • Use synchronous calls (REST or gRPC) for queries that need an immediate answer.
    • Use asynchronous events for propagating changes and decoupling services.
    • Avoid long chains of synchronous calls.
  • Consistency:
    • Eventual consistency is the default.
    • Use sagas for multi-service workflows, choosing choreography or orchestration deliberately.
    • Use a transactional outbox for reliable event publishing.
    • Make consumers idempotent.
  • Resilience:
    • Set a timeout on every remote call.
    • Retry with backoff and jitter, and only for idempotent operations.
    • Use circuit breakers, bulkheads, and fallbacks.
  • APIs:
    • Version APIs and make changes backward-compatible by default.
    • Use consumer-driven contract tests.
  • Observability:
    • Structured logs with correlation and trace IDs.
    • RED and USE metrics.
    • Distributed tracing.
    • Health and readiness probes.
  • Security:
    • Authenticate at the edge and authorize in each service.
    • Give services their own identity for service-to-service calls (mTLS or JWT).
    • Keep secrets in a secrets manager.
  • Delivery:
    • Each service has an independent pipeline.
    • Configuration is externalized.
    • Deploys have zero downtime.
  • Smells:
    • Distributed monolith: services must deploy together.
    • Chatty services.
    • Shared libraries that carry domain models.
    • Shared database.
    • Nanoservices.

Cross-cutting concerns

Handle each consistently across the system, through a platform library, gateway, or sidecar:

  • caching
  • configuration
  • logging
  • auth
  • rate limiting
  • feature flags

Architecture decision record template

Store ADRs in docs/adr/NNNN-title.md:

  • Title
  • Status: proposed, accepted, or superseded
  • Context: forces and constraints
  • Decision
  • Alternatives considered
  • Consequences: positive and negative

Output formats

  • For a design, give these in order:
    1. the drivers
    2. the options and their trade-offs
    3. a recommendation
    4. a C4 context or container diagram in Mermaid
    5. risks and open questions
    6. ADRs for the key decisions
  • For a review, order findings by impact: data integrity and correctness, then reliability, then scalability, then maintainability. For each finding, give:
    • the principle it violates
    • the consequence
    • the recommended change
    • the cost of making the change

Spring Boot notes

  • Enforce module boundaries with Spring Modulith or ArchUnit.
  • Use Spring Cloud Gateway at the edge.
  • Use Resilience4j for timeouts, retries, and circuit breakers.
  • Use Micrometer with OpenTelemetry for metrics and tracing.
  • Use Spring Cloud Stream or Spring Kafka for events, with an outbox table for reliable publishing.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.