Modular Architecture for Comprehensive Software Solutions
A software architecture methodology for development done with an AI agent. It defines layers with a single responsibility and a monorepo structure that gives the developer and the agent the same complete, unambiguous view of the system.
irm https://macss.ccisne.dev/install.ps1 | iex
curl -fsSL https://macss.ccisne.dev/install.sh | bash
Both install to %LOCALAPPDATA%\macss or ~/.macss, add the directory to your PATH and create the
ma alias.
Both scripts are worth a minute before you run them: install.ps1, install.sh.
An agent reasons best about a codebase with clear boundaries, predictable structure and explicit contracts. MACSS is those three things written down.
Every request crosses layers that each do one thing, and the separation is enforced rather than encouraged: the interface never touches the database, business logic never knows about HTTP, and persistence never formats a response.
InterfaceControllerServiceAPIUseCaseRepositoryDB
The api and app layers have an implementation: modular_api
provides the use-case lifecycle, CQRS routing, generated OpenAPI, health and metrics on the server, and transport-agnostic REST and GraphQL clients for the presentation layer.
Every MACSS project is one repository, and exactly one line in it is rigid: code lives under code/, documentation under docs/. That separation is the canon. What goes inside
code/ is the project’s own business.
project/
├── code/ → the canon ends here
├── docs/
│ ├── adr/ → architecture decision records
│ ├── architecture.md
│ └── roadmap.md
└── README.md
macss project create opens a project on four layers, because most software has them:
code/
├── db/ → SQL schemas, DDL scripts, repositories
├── api/ → use cases, endpoints, server
├── app/ → services, controllers, views
└── infra/ → CI, containers, environment config
They are an offer. macss project check never asks for them and does not object to what it finds instead — a CLI, a documentation site, a book, an editor extension.
ADR 0011 says why: both projects meant to demonstrate the methodology broke the old rule in the same direction, and when that happens the rule is what is wrong.
Inside code/, business logic is organised as modules — vertical slices grouping the use cases of one domain:
code/api/modules/
├── clients/ → create, list, get, update, delete
├── billing/ → invoice, payment, refund
└── inventory/ → stock, transfer, adjustment
Each module declares its boundaries and its dependencies. One that needs to scale on its own can be extracted as a service without changing anything inside it.
It carries the delivery cycle end to end: it opens the requisition, adds the contract, publishes both to a GitHub issue, runs the stage gates, and takes the delivery and its evidence to a pull request.
Routes are one of two kinds. A query reads and answers. A command changes something and says what it would change first: every one takes
--plan or --apply, and neither is the default.
macss project create --path <dir> --lang <en|es> --applymacss requisition new --apply <slug>macss requisition publish --planmacss dor checkmacss delivery publish --applymacss skill deploy --host <hosts> --scope <global|repo> --all --applymacss skill doctormacss helpThe api layer, implemented. Use cases, CQRS, generated OpenAPI, health and metrics with no configuration.
The delivery cycle, end to end. Scaffolds the structure, carries a requisition to a pull request, and runs the stage gates.