An autonomous, local-first AI software factory that builds verifiable, zero-debt React + FastAPI applications.
Unlike generic coding assistants, Solopreneur OS operates as a strict assembly line. It breaks software development down into five distinct AI personas, forces them to write their own documentation, and strictly executes Test-Driven Development (TDD) before moving to production.
Before deploying this OS to production, you must complete the following:
- Customize the Business Logic: Read
TEMPLATE.mdto see which documents in thedocs/folder you must overwrite with your own business logic. - Write Real Tests: The current
tests/api/test_initial.pyandtests/web/integration.e2e.tscover the internal System Status exemplar. Use them as a blueprint, then write tests for your own app. - Replace Scaffold Entrypoints: Overwrite the
SystemStatusexemplar insrc/api/main.pyandsrc/web/main.tsxwith your actual application logic.
- Environment Variables: Copy
.env.exampleto.envand add your API keys. - Backend Dependencies: We use
uvfor lightning-fast, deterministic package management.# Install uv if you don't have it curl -LsSf https://astral.sh/uv/install.sh | sh # Sync the locked dependencies (creates .venv automatically) uv sync
- Frontend Dependencies (JS/TS): We use npm to lock in our strict linting, testing, and UI tools.
# Install Biome, Vitest, Playwright, and base React dependencies npm install - Activate the Pre-Commit Bouncer: This native Git hook prevents the AI from leaking secrets or faking test results.
git config core.hooksPath scripts/githooks
- Boot the Factory:
uv run python orchestrator.py "What should we build first?" --os-verbose
The OS is driven by a deterministic Python script (orchestrator.py) that acts as your Chief of Staff, routing tasks to 5 specialized LLM agents defined in the agents/ folder.
- The Orchestrator (
orchestrator.py): A deterministic Python router. It parses routing tags, aggressively prunes context to save tokens, manages the multi-agent execution queue, and dynamically routes tasks to the most cost-effective LLM provider (SMART_ROUTING). - Strategy (
strategy.xml): The business filter. Evaluates ideas based on Cost of Delay, Reversibility (1-Way vs 2-Way doors), Legal/Compliance risk, and Strategic Sourcing (Build vs. Buy vs. OSS). - Product Spec (
product_spec.xml): The architect's radar. Turns strategy into strict Feature Briefs and Data Contracts. Identifies when an idea crosses a system boundary and triggers an Architectural Decision Record (ADR). - Design (
design.xml): The visual mapper. Generates Mermaid.js state flows and defines WCAG-compliant, atomic UI components using utility-first CSS, driven by thestyle_guide.md. - Engineering (
engineering.xml): The builder & janitor. Drafts ADRs for your approval, writes Interfaces/Mocks first, executes TDD (Red-Green-Harden), runs linters, integratesshadcn/uicomponents, and ruthlessly deletes dead code during Teardowns. - Growth/Ops (
growth_ops.xml): The privacy officer and analyst. Enforces compliance, defines infrastructure "Kill Switches" (e.g., alert thresholds), evaluates strict A/B or Pre/Post cohorts, and commands Teardowns.
You are the CEO, the lead investor, and the final decision-maker. You do not write code or draft specs. Your job is to:
- Provide raw signals: Feed user pain points into the prompt.
- Approve Architecture: When the pipeline pauses with
ADR_STATE: [Pending Human], you read the drafted ADR indocs/product/adr/and change its status to "Accepted". - Provide Raw Data: When Growth/Ops asks for launch metrics, you paste the raw numbers from your dashboard (Datadog, PostHog, etc.).
- Curate the Memory: Update
docs/company/lessons_learned.mdwhen an agent makes a mistake, ensuring it never happens twice.
Forge utilizes an Abstract Syntax Tree (AST) validator to enforce Zero-Debt coding standards before compilation.
Instead of relying on LLM-as-a-judge for simple structural rules, Forge uses Babel to parse the raw .tsx files and mathematically prove compliance.
Current Enforced AST Rules:
- π« No Inline Styles: Tailwind CSS classes (
className) are strictly required. Thestyle={{}}prop will fail the build. - πΌοΈ Accessible Images: All
<img>tags must contain analtattribute.
To run the structural evaluation locally:
npm run eval:ast src/web/components/YourComponent.tsx.github/
workflows/ci.yml # Enterprise-grade CI testing & TruffleHog Secret Scanning
dependabot.yml # Supply chain vulnerability scanner
src/
api/ # Backend Sandbox (FastAPI / Python)
Dockerfile # Production multi-stage build container
web/ # Frontend Sandbox (React / Vite / TS / Shadcn)
tests/
api/ # Pytest & BDD Feature files
web/ # Vitest & Playwright E2E files
docs/ # Global OS memory, ADRs, Contracts, and Strategy
product/
style_guide.md # Canonical visual brand rules
agents/ # The LLM prompt definitions
scripts/
githooks/
pre-commit # The automated local security/lint bouncer
orchestrator.py # The execution engine
pyproject.toml # Backend dependencies & Ruff/Pytest config
package.json # Frontend dependencies & scripts
components.json # Shadcn UI component routing configuration
biome.json # JS/TS Linting & Formatting config
vite.config.ts # Frontend build & test config
tailwind.config.js # Utility-first CSS design tokens
postcss.config.js # CSS processing bridge
playwright.config.ts # End-to-End browser testing config
This OS is built on a strict "Git Push to Deploy" PaaS (Platform-as-a-Service) model:
- Zero Custom Cloud-Formation: We explicitly ban complex orchestrators (Kubernetes, Terraform) to avoid maintenance debt.
- Backend: Handled by a single highly optimized
Dockerfileinsrc/api/intended for Render or Railway. - Frontend: Deployed instantly via Vercel or Netlify directly from the
src/web/directory. - Security & CI Gate: All commits pushed to
maintrigger GitHub Actions. This pipeline runs Ruff (SAST), Biome, Pytest, Vitest, Playwright (E2E & A11y), and TruffleHog (Verified Secret Scanning). Only green builds are deployed.
The OS utilizes Code as the Design Kit. There is no Figma.
- The Visual Style Guide: Located at
docs/product/style_guide.md, this dictates spacing, vibe, and semantic colors. - Shadcn/UI: The Engineering agent generates accessible, un-styled Radix components on the fly (via
components.json) directly into thesrc/web/components/ui/folder. - Tailwind CSS: Components are styled using the strict semantic variables locked into
tailwind.config.jsandindex.css.
The Orchestrator listens to specific syntax tags in your prompt to allow you to "steer" the factory.
To start a brand new feature from scratch, simply talk to the Strategy agent.
uv run python orchestrator.py "Let's build a Lead Capture Form landing page to capture emails before launch." --os-verboseThe Orchestrator wakes up Strategy -> Spec -> Engineering (ADR Draft) -> [PAUSE FOR YOUR APPROVAL] -> Engineering (Build) -> Ops.
If you already know exactly what you want and want to skip the Strategy agent, use the [START: AgentName] tag. This injects your prompt directly into that specific agent's brain.
uv run python orchestrator.py "[START: Engineering] The CEO has updated the styling guidelines. Re-write the Lead Capture Form UI to use the new brand colors."Valid agents: Strategy, Product Spec, Design, Engineering, Ops.
If your application breaks, use the [HOTFIX] tag. This bypasses all PM/Design steps, wakes up the Engineering agent immediately, and forces it to fix the code.
uv run python orchestrator.py "[HOTFIX] The /api/leads route is throwing a 500 internal server error when the email is missing."AI codebases accumulate dead code. To safely delete a feature, use the [TEARDOWN] tag. The OS will trace the feature's dependencies and surgically remove it without breaking the rest of the app.
uv run python orchestrator.py "[TEARDOWN] We are pivoting. Remove the Waitlist feature from the frontend and backend."Solopreneur OS is built for local execution and maximum data integrity.
- Context Funneling: The OS actively parses
current_run.mdto only load the exact files relevant to the active feature. This prevents O(N) token scaling issues as your codebase grows. - Non-Destructive Logging: Tracking files like
experiment_log.mduse a specializedappend_to_filetool to ensure the AI never accidentally overwrites your historical database. - Component RAG: The Engineering and Design agents are dynamically fed a list of your existing
src/web/components/ui/files so they never hallucinate imports. - The Sandbox: The Orchestrator intercepts all shell commands. It only allows safe commands like
uv run pytest,npm run test, and linting. It actively blocks shell injection and restricted path traversals.
- DO use
lessons_learned.md: If an agent hallucinates a Tailwind class or uses an outdated library, add a bullet point here. - DO let the pre-commit hook work: If
git commitfails, do not bypass it. Use the[HOTFIX]command and force the AI to fix its own mess. - DON'T bypass the ADR process: Never let agents arbitrarily decide to add Postgres or Redis without your explicit "Accepted" stamp.
- DON'T let agents write to
architecture.md: Only the Engineering agent is allowed to update this file, and only after an ADR is accepted. - DON'T bloat the backlog: Strategy will actively try to kill bad ideas. Let it.
- Smart Routing: Keep
SMART_ROUTING=truein your.env. The Orchestrator automatically routes logic-heavy tasks (Strategy) to deep-reasoning models (likeo4-mini), and coding tasks to standard models (likeclaude-sonnet-4-5). - Context Pruning: The Orchestrator uses deterministic pruning (
tail_file) to only send the most recent logs to the AI, saving you massive API costs.