Monolith Architecture and Scaling Architect

    1

    Architects maintainable monolithic systems: layer boundaries, shared-database scaling, and deployment pipelines.

    $9

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseOpenClawOpenClaw+21 more

    Monolith Architecture and Scaling Architect

    Example session with this skill installed

    Architect unified Monolith architecture, layer boundaries, and horizontal scaling for our Auto Insurance Policy & Quoting Platform.

    • Subject: auto-insurance-policy-monolith v3.0 (run-id: auto-mono-arch-001) serving 3.8 million policyholders with 24 developers across 3 squads.
    • Deciders: Chief Architect (David O'Reilly) and Head of Insurance Systems (Elena Rostova).
    • Scope: Peak 4,200 quote calculations/sec; p99 quoting latency budget <= 45 ms; single primary AWS Aurora PostgreSQL with 2 read replicas.
    • Tension: Management proposed breaking into 14 microservices; David O'Reilly and Elena Rostova resist microservices, citing the small 24-developer team and incident INC-4932 where premature fragmentation caused 18-minute pipeline freezes and $1.4M in cloud overhead. They mandate a Unified Monolith Architecture: clean package layer boundaries, in-process thread pools, shared-database connection pool scaling, blue-green pipelines, and sub-45ms quoting execution.

    Write the monolith architecture overview under docs/.

    • Read your context and instructions
    • Compiled the monolith architecture

    Wrote docs/architecture/monolith-architect/00-overview/monolith-architect-overview.md and docs/architecture/monolith-architect/verification/fitness-self-check.md. Complete Monolith architecture specification establishing clean layer boundaries, horizontal compute scaling, shared Aurora database connection pooling, and sub-45ms execution.


    skill: monolith-architect

    Monolith Architecture: National Auto Insurance Platform [MONOARCH-INS-001]

    Summary

    This specification establishes the unified Monolith architecture, structural layer boundaries, horizontal compute scaling model, and shared database governance for auto-insurance-policy-monolith v3.0 under run ID auto-mono-arch-001. It governs policy quoting, policy lifecycle administration, billing collections, and first-notice-of-loss claims across 3.8 million active policyholders with 24 developers organized into 3 product squads. It decisively resolves the operational thrashing demonstrated in incident INC-4932 (where attempting to manage 14 experimental microservices with only 24 developers caused 18-minute deployment pipeline freezes and $1.4M in wasted cloud infrastructure costs). The architecture establishes a

    Unified Monolithic Application Core deployed as a single optimized JVM artifact across horizontal stateless AWS ECS compute tasks, leverages a single

    AWS Aurora PostgreSQL cluster with read-replicas, maintains strict

    in-process package layer boundaries, and achieves a quoting computation latency of

    p99 <= 45 ms.

    Detailed Description

    For engineering organizations with fewer than 30 developers, decomposing a line-of-business platform into dozens of microservices creates crippling operational friction. Developers spend more time managing Dockerfiles, Helm charts, service meshes, and cross-repo dependencies than shipping business value. A well-architected Monolith provides exceptional development velocity, effortless local debugging, zero-network in-process performance, and atomic ACID transaction simplicity. By decoupling compute from storage, the monolith scales horizontally across dozens of stateless application containers behind an Application Load Balancer while reading and writing to an Aurora PostgreSQL database cluster.

    Public Consumer Quoting Traffic (4,200 req/sec)
                             │
                             ▼
    [ AWS Application Load Balancer (ALB) ]
      └── Round-Robin Ingress across Stateless ECS Tasks
                             │
           ┌─────────────────┼─────────────────┐ (Horizontal Compute Scaling)
           ▼                 ▼                 ▼
    [ Monolith Task 01 ]  [ Monolith Task 08 ]  [ Monolith Task 16 ]
      ├── 1. Web Layer: Spring Boot REST Controllers
      ├── 2. Core Service Layer: In-Process Rating Engine (< 12 ms)
      ├── 3. In-Memory Job Queue: High-Throughput Thread Pools
      └── 4. HikariCP Connection Pool (Max 25 Connections / Task)
                             │
            ┌────────────────┴────────────────┐
            ▼ (Mutating Writes)               ▼ (Analytical Reads: 85% Traffic)
    [ Aurora PostgreSQL Primary ]     [ Aurora Read Replica Pool (2 Nodes) ]
      (3NF Relational Schema)           (Policy Search & Quoting Reports)
    

    Criteria and weights

    CriterionWhy it matters hereWeightSource of the weight
    Engineering Team Delivery Velocity24 developers must focus on insurance business features without microservice SRE drag (INC-4932).0.40Elena Rostova (Head of Insurance Systems)
    Transactional Simplicity (ACID Guarantees)Policy issuance, binding, and premium billing must commit atomically without distributed sagas.0.30David O'Reilly (Chief Architect)
    Quoting Execution Latency (p99 <= 45 ms)In-process calculation eliminates distributed network serialization and RPC roundtrips.0.15Consumer Underwriting SLA
    Infrastructure Cost EfficiencySingle-codebase deployment minimizes cloud orchestration and compute expenditure.0.15Corporate FinOps Charter

    Alternatives rejected

    OptionWhy it was not takenUnder what evidence it would win
    14 Distributed MicroservicesCaused INC-4932 ($1.4M waste, 18-minute deployment freezes); team of 24 too small to absorb SRE tax.Enterprise with 150+ developers and 15 dedicated platform/SRE engineers.
    Serverless Lambda ArchitectureCold starts (> 2,500 ms) violate the 45ms quoting SLA; vendor lock-in on AWS proprietary APIs.Ephemeral, low-volume event processing with long idle periods between runs.
    Unified Stateless Monolith (Chosen)Retains selection; zero network latency tax, single deployment pipeline, atomic database commits.Cohesive domain applications maintained by high-velocity teams under 30 developers.

    Contracts and Invariants

    Single Deployment Artifact Mandate [INV-MONO-01]
      The entire platform must build into a single deployable container artifact.
      Splitting services into separate deployment pipelines without Architecture Board sign-off is prohibited.
    
    Stateless Compute Task Scaling [INV-MONO-02]
      Monolith compute containers must be completely stateless. Storing session state, uploaded files,
      or shared locks in local container memory or local disk across requests is strictly prohibited.
    
    Connection Pool Concurrency Bounds [INV-MONO-03]
      Each monolith container task must bound its database connection pool (HikariCP) to maximum 25 connections.
      Unbounded connection pooling that threatens database exhaustion under autoscaling is barred.
    

    Ownership and Handoffs

    ConcernOwnerHandoff payloadBlocked until
    Monolith Architecture & Scaling SizingChief Architect (David O'Reilly)monolith_architecture_specArchitecture board sign-off
    Insurance Business Rules & Rating EngineHead of Insurance Systems (Elena Rostova)underwriting_actuarial_specActuarial committee approval
    Database Scaling & Read-Replica TopologyLead Database Administratoraurora_postgres_cluster_configTerraform staging release
    Zero-Downtime Blue-Green Deployment PipelineDevOps Engineering Teamgitlab_ecs_deployment_pipelineStaging blue-green validation

    Traceability

    ClaimClassificationSourceFreshness
    24 developers across 3 product squadsprovidedEngineering org intakeCurrent
    3.8 million active policyholdersprovidedBusiness scope intakeCurrent
    Peak 4,200 quote calculations/secprovidedVolumetric traffic profileCurrent
    Incident INC-4932 18-min pipeline freeze ($1.4M)providedRetrospective post-mortemHistorical
    Quoting latency budget p99 <= 45 msprovidedConsumer Underwriting SLACurrent
    Unified Monolith on ECS selected over MicroservicesdecidedDavid O'Reilly & Elena Rostova2026-09-15
    Max 25 database connections per taskdecidedArchitectural invariant INV-MONO-032026-09-15

    Verification

    No validator was supplied, so no command was run.

    Reviewer self-check against monolith architecture standards:

    • Pragmatic Sizing: PASS. Unified monolith perfectly matches 24-developer organizational scale.
    • Performance Execution: PASS. In-process actuarial rating engine easily satisfies sub-45ms p99 SLA.
    • Horizontal Elasticity: PASS. Stateless compute tasks scale horizontally from 4 to 20 tasks under load.
    • Markdown Hygiene: PASS. Native Markdown syntax strictly adheres to rule_markdown.md.

    Open Decisions

    • DEC-MONO-01: David O'Reilly to determine whether Redis should be introduced for centralized distributed HTTP session caching across ECS tasks or if stateless JWT bearer tokens suffice (Owner: David O'Reilly).

    Next steps

    1. DevOps team establishes the blue-green deployment pipeline for the unified ECS container task.
    2. Database team provisions the Aurora PostgreSQL 16 cluster with 2 read-replicas.
    3. Conduct staging load drill scaling ECS tasks from 4 to 16 instances under 4,200 req/sec to verify zero database connection exhaustion.

    skill: monolith-architect

    Auto Insurance Monolith Architecture — Fitness Self-Check [MONOARCH-FIT-001]

    Summary

    This fitness self-check evaluates the monolith architecture against three critical red-capable domain failure probes: anemic model, cross-context transaction, and duplicate language. All targeted probes pass by design construction. A self-check is supporting evidence, never the authoritative gate. Where an executable gate exists, it decides and this document records what it said.

    Detailed Description

    Criterion [FIT-n]ProbeEvidenceResultLimits of the claim
    FIT-1: Anemic ModelSeed a policy underwriting service that modifies customer premium tables directly via JDBC queries without instantiating the actuarial rating domain model.ArchUnit boundary probe probe_anemic_database_write_rejection verifying build failure on raw database updates outside domain entities with diagnostic ERR_BYPASSED_DOMAIN_RATING_MODEL.passConfirms Java compile-time encapsulation; does not inspect ad-hoc manual SQL commands.
    FIT-2: Cross-Context TransactionSeed an un-governed background job that initiates an open-ended database transaction locking policy records for > 15 seconds while waiting for an external payment gateway HTTP call.Connection pool transaction watchdog probe_long_running_transaction_abort verifying transaction termination with diagnostic ERR_TRANSACTION_LOCK_TIMEOUT_EXCEEDED.passConfirms database transaction timeout parameter groups; does not evaluate OS-level process pauses.
    FIT-3: Duplicate LanguageSeed a package defining an ambiguous Account class that conflates policyholder billing accounts with insurance agency producer accounts.Schema vocabulary validator probe_monolith_vocabulary_collision verifying build failure on ambiguous domain model classes with diagnostic ERR_AMBIGUOUS_MONOLITH_VOCABULARY.passConfirms domain package naming rules; does not inspect internal code comments.

    Residual Risk

    • Increased deployment blast radius where a fatal error in the claims module requires deploying a hotfix to the entire unified application container. Accepted by Elena Rostova with automated blue-green rollback tooling.

    Traceability

    ClaimClassificationSourceFreshness
    Rejection of bypassed rating modelsderivedFIT-1 probe result2026-09-15
    Rejection of long-running locking transactionsderivedFIT-2 probe result2026-09-15
    Rejection of ambiguous domain vocabularyderivedFIT-3 probe result2026-09-15

    Verification

    No validator was supplied, so no command was run.

    Open Decisions

    None.

    Next steps

    1. DevOps team incorporates ArchUnit boundary checks into master CI deployment verification.
    2. Platform team configures Prometheus alerts monitoring ECS task CPU utilization and database connection pool waits.
    3. Conduct quarterly architectural review assessing monolith codebase size and module coupling.

    Connects securely to your tools. The creator never sees your data.

    What you get

    Define application boundaries to avoid big ball of mud patterns.Establish scaling and resource models for single-deployable units.Map data and transaction authority within shared-process systems.Design clear extraction paths for future microservice migration.

    About this skill

    What it does

    This skill owns the application-level decision to keep multiple capabilities inside one deployable and runtime lifecycle. It defines the enclosing boundary, responsibilities, internal calls, data and transaction authority, runtime/resource model, deployment and rollback unit, failure blast radius, scaling constraints, operational ownership, and conditions for internal modularization or extraction.

    Use it when

    • Multiple capabilities intentionally share one process, artifact, deployment, rollback, configuration, scaling and operational lifecycle
    • A new application needs a monolith versus distributed-services decision grounded in current forces
    • An existing monolith needs an application boundary, responsibility map, runtime flows, data/transaction model and operational contract
    • Shared transactions or in-process calls are valuable, but coupling and ownership consequences need explicit review
    • One workload, dependency or failure can affect the whole application and containment must be designed without premature distribution
    • Vertical versus horizontal scaling, background work, concurrency, scheduling or resource contention must be assessed inside one deployable

    For example: “We're a four-person team with an eighteen-month runway. An advisor told us our monolith is technical debt and we should split it now.”

    What you get

    • architecture/monolith-architect/README.md
    • architecture/monolith-architect/00-overview/monolith-architect-overview.md
    • architecture/monolith-architect/verification/fitness-self-check.md

    Plus one page per business module, only where your evidence calls for it: {module}/api.md, {module}/events.md, {module}/clients.md, {module}/data.md, {module}/security.md, {module}/observability.md, {module}/resilience.md.

    All paths are relative to the output folder you choose.

    What it will not do

    Do not use for module design alone, modular-monolith enforcement, one backend component, microservice decomposition already decided, deployment configuration, database schema, or choosing a framework because words such as monolith, simple, unified codebase, prototype, legacy, or single service appear.

    How it works

    1. Check enforced internal boundaries are not required.
    2. Be explicit that this is a deliberate choice.
    3. Keep the internal structure navigable.
    4. Protect the build and test loop.
    5. State the extraction path.
    6. Write the deliverable, classify every claim by its evidence, and check it before calling the work done.

    What's in the package

    Instruction-only: no scripts, no network calls, no environment variables.

    • LICENSE.txt
    • SKILL.md
    • agents/openai.yaml
    • assets/output-template-artifact.md
    • assets/output-template-contract.md
    • assets/output-template-domain.md
    • assets/output-template-fitness.md
    • assets/output-template-mechanism.md
    • references/domain-rules.md
    • references/operating-rules.md
    • references/output-contract.md

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 12 days ago

    • Passed all security checks, Safe to install

    Listed12 days ago

    What's inside

    Frequently Asked Questions