/crewforth:backend-architecturefrom Crewforth
Resolves backend stack and architecture pattern when none is recorded. Scans manifests, asks targeted questions, and records decisions in CLAUDE.md.
Ships in Crewforth. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Trigger phrases: "tech stack", "which framework", "choose a database", "backend pattern", "project structure", "new api", "new handler", "write a command", "add a query", "validator", "which stack should", "set up the project structure", "language or framework", "layered or", "vertical slice", "hexagonal", "clean architecture"
The "how" behind crew-backend-expert, and the stack step crew-planner and crew-database-expert rely on.
Model discipline, not a gate: no hook checks that the stack was resolved before code was written.
CLAUDE.md ## Stack is empty or silent on the part the task needs.The request says it. "Add a Go service…" is an answer. Use it; record it if the section was empty.
CLAUDE.md ## Stack says it. The project's own section (below Crewforth's @.claude/DISCIPLINE.md import),
not DISCIPLINE.md. A filled section is a decision: follow it.
The repo says it. Look for manifests at the root and one level down (backend/, server/, src/, apps/*):
| Manifest | Runtime |
|---|---|
package.json | Node (TypeScript if tsconfig.json) |
go.mod | Go |
pyproject.toml / requirements.txt | Python |
*.csproj / *.sln | .NET |
pom.xml / build.gradle* | JVM (Java/Kotlin) |
Cargo.toml | Rust |
composer.json | PHP |
Gemfile | Ruby |
The framework and database usually follow from the same manifest's dependencies and from config files
(docker-compose*.yml, connection-string env names, migration folders). Two backends in one repo is a
monorepo, not an ambiguity: record each with its path.
Still open (a greenfield repo) → ask, once. Use AskUserQuestion with at most four questions, only for
what is still unknown: runtime/language · web framework · database · architecture pattern. Every question has
exactly one option whose label ends with (Recommended) (its description gives the one-line reason) and
exactly one option labelled Decide for me, verbatim — the user's way to hand the choice back to you.
No AskUserQuestion in this session (headless, or the tool is off)? Write the same questions as text, with the
same two labels on every question, and stop there.
Record it. Write the answer into the ## Stack section of the project's CLAUDE.md (Runtime · Web framework ·
Database + migration tool · Architecture pattern), then record the choice with the adr skill (and board.sh decide
when the team board is in use). If "Decide for me" was picked, the ADR says so: chosen by the agent at the user's
request, with the reason for each pick.
Never ask twice. A recorded stack is followed, not re-litigated. It changes only when the user explicitly asks; then update the section and supersede the ADR. Headless / non-interactive and nobody to ask → stop and report the open question; do not guess a stack and start writing code.
| Pattern | Fits | Too much when |
|---|---|---|
| Layered (controller → service → repository) | CRUD-heavy services, small teams, most first versions | rules sprawl across services and every change touches every layer |
| Clean / hexagonal (domain core, ports, adapters) | rich domain rules, several delivery channels or swappable infrastructure | the "domain" is mostly forms over tables |
| Vertical slice (one folder per feature, request → handler → response) | many independent features, teams owning features end to end | features share most of their logic |
| CQRS (separate command and query paths) | reads and writes that differ sharply in shape, load or consistency | reads and writes look the same — it doubles the code for no gain |
Existing code wins over this table: a repo already on a pattern keeps it, even where the table would pick another. A change of pattern is an architecture decision → design summary + ADR, never a side effect of a feature.
observability for what to log and privacy-compliance for
personal data.| Runtime | Web | Validation | Data / migrations |
|---|---|---|---|
| .NET | ASP.NET Core (MediatR optional) | FluentValidation | EF Core |
| Node | NestJS / Fastify | zod | Prisma / Drizzle |
| Go | chi / echo | go-playground/validator | sqlc / GORM |
| Python | FastAPI | pydantic | SQLAlchemy / Alembic |
| JVM | Spring Boot | Bean Validation | JPA / Flyway |
The project's recorded choices beat this table. Adding a dependency that is not already in the repo → dependency-audit.
A pattern skill the project ships under .claude/skills/ wins over sections 2-4 — for example a cqrs-aop-module
kept from an older install, or one the team wrote (format: .claude/AGENT_TEMPLATE.md). Section 1 still applies:
the stack is resolved and recorded the same way.
Schema and migrations → db-migration · tests → testing · review → crew-code-review · contracts and
versioning → api-design · logs/traces → observability.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub crewforth/crewforth --plugin crewforth60 skills in this plugin
/a11yUse when building or changing UI, before shipping a user-facing screen, and when something cannot be
reached with a keyboard, read by a screen reader, or seen at low contrast.
/adrArchitecture Decision Record: context-decision-consequences, for decisions that are expensive to reverse.
Written under docs/adr/.
/api-designUse when an API contract is designed or changed: a new endpoint or resource, how its errors and pages
are returned, a field to add or remove, or a version to cut without breaking a consumer.
Other plugins' skills for the same job