saas-factory
A Claude Code plugin that turns an idea — or a 5,000-requirement spec, or an
existing codebase — into a working app through a team of specialized agents,
delivered agile-style in demoable phases you approve, revert, or redirect
before more tokens are spent.
Why it scales where a single chat breaks: all project state lives on disk
(.saas-factory/), agents query it through a tiny sf helper instead of
loading it, every task is executed by a fresh-context subagent, and hooks
enforce the rules mechanically. Context stays small at 50 requirements or
5,000.
What you get
- Requirements engine — brainstorm interactively or import any size doc;
EPIC/REQ records with acceptance criteria, one JSONL line each.
- 9 agents — requirements-analyst, architect, ui-designer, planner,
builder, verifier, e2e-verifier, integrator, migration-analyst — usable as
subagents or an experimental agent team (
--team N).
- Agile phases — PHASE-00 is a walking skeleton; every later phase is a
vertical slice ending in something you can click.
/saas-factory:demo boots
the preview, walks the click-script, captures screenshots, and asks you:
approve / request changes / reject.
- Checkpoints & rollback — approval = git tag
sf/PHASE-##/approved
covering code and state. Reject → sf rollback restores the last approved
checkpoint (pre-rollback state saved on a backup branch). Fail fast, keep
your tokens.
- Fail-fast guards — budget caps (
sf budget check halts the loop),
a circuit breaker (too many failures in a phase pauses it — the plan is
wrong), and canary tasks (riskiest work runs first, alone).
- Anti-duplication registry — every component/screen/endpoint is
registered; builders must
sf reg find before creating; a PreToolUse hook
blocks duplicate new files. One NavBar, ever.
- Verified like an end-to-end engineer, reviewed like a designer — beyond
unit tests: the e2e-verifier drives the real UI through cumulative user
journeys (login → book → checkout re-run at every gate), captures
desktop + mobile + hover/focus screenshots, then the design-reviewer
actually looks at every screenshot and grades it against the design-craft
rubric (token spacing, hierarchy, all interactive states, designed
empty/error states, 390px/1280px, contrast). A design FAIL blocks the phase
like a broken test. DoD hooks still bounce TODO/lorem/dead-button work
instantly.
- Multi-platform — web (React/Vite, Next, Angular), mobile (Expo RN),
desktop (Tauri/Electron), APIs (Node, NestJS, .NET, FastAPI) — monorepo with
shared contracts when multi-target.
- Brownfield aware — init detects existing code/UI/API and the
migration-analyst inventories it so agents extend instead of rebuild.
- Pattern-skill library, opt-in per project — init asks which engineering
patterns THIS project follows and wires them into the right agents: atomic
design (React), Clean Architecture (.NET), the ASP.NET middleware pipeline
(Serilog + global exception handling + JWT auth, in the right order),
microservices (with honest when-not-to advice), and the
backend/-frontend/-scripts/ docker-compose workspace. Selected skills are
copied into
.saas-factory/skills/ (editable per project); other projects
pick differently. Add your own company skills the same way; manage later via
/saas-factory:config skills. Compliance is machine-checked by the eval
scorer and enforced by verifiers.
- Your config —
.saas-factory/config.json: enable/disable agents, model
per agent, gate strictness (strict/standard/yolo), verification depth,
registry enforcement, placeholder policy, budget caps, and attach your own
skill files per agent (user_skills).
v0.4 — the complete factory: /saas-factory:go "<idea>" compresses intent
into ONE Build Brief you confirm once (saved defaults in
~/.claude/saas-factory.json mean project #2 asks even less, and a
permissions preset stops per-tool prompting); a retrospective agent patches
the project's own skills after every phase so mistakes don't repeat; visual
regression freezes approved screenshots as baselines the design-reviewer
diffs at every later gate; a security pass (live keys, committed .env,
audit) gates demos; :operate re-enters bugs as patch phases with the failing
journey as the acceptance test; skills follow the open agentskills.io folder
standard (SKILL.md + runnable scripts/ — portable to Cursor/Copilot/etc.,
importable from the community with mandatory human review); and capability
packs cover MUI theming, Framer Motion exit animations, auth with seeded
test users, Stripe test-mode checkout, and ship-deploy (CI + live preview
URLs + handover docs).