A structured, AI-collaborative workflow for building web application prototypes — from raw idea to working code, one stage at a time.
This is not a tool. It is a process.
A sequence of stages, each with a defined goal, a persona, concrete input artifacts, and concrete output artifacts. You run it with an LLM CLI (Claude Code, Gemini CLI, or any tool that supports AGENTS.md). The AI plays a role in each stage — asking questions, proposing designs, writing code — and you approve, adjust, and steer.
The workflow is specialized for a specific type of software: web applications with REST endpoints and a SQL database. But the underlying philosophy is generic and can be adapted to any domain.
These are the ideas that make this workflow work. They are transferable to any workflow you build on top of this foundation.
Every significant decision goes through a propose-approve loop. The AI suggests a data model, an endpoint signature, a function contract, a design direction. You say yes, no, or adjust. Nothing is implemented without your sign-off.
This keeps you in control without requiring you to drive every detail. You stay oriented — you understand every piece of the system being built — without doing all the work.
Each stage has a defined persona with a specific responsibility:
The persona frames what the AI pays attention to and what it ignores. A Knowledge Auditor does not write code. A Senior Developer does not redesign the data model. The role prevents scope creep and keeps sessions focused.
Every stage consumes specific input artifacts and produces specific output artifacts. The output of one stage is the input of the next.
This means:
The workflow does not depend on a continuous conversation thread. It depends on files.
Stage 0 (Meta-Workflow) is a dedicated stage for fixing the workflow itself. When a stage instruction is unclear, a script fails, or the AI behaves unexpectedly, you invoke Stage 0. A Workflow Engineer persona diagnoses the problem, applies a fix, and logs the change to docs/workflow-changelog.md.
Every workflow improvement is documented. The system gets better over time and the history of changes is searchable.
The workflow produces a working prototype — not production code. The goal is to validate the design by building something real. Speed and correctness are in tension; this workflow resolves it by choosing speed first.
Phase 5 deploys the prototype. A separate "Correctness Workflow" (not included here) takes it to production quality.
This separation matters because prototyping decisions (SQLite instead of Postgres, no caching, no deployment config) are different from production decisions. Mixing them slows the prototype phase without improving the design.
Every stage session is exported as a human-readable transcript. The log captures what was discussed, what was decided, and why. Over the course of a project, the logs become a record of the design process — not just the design.
Auto-export runs every 5 minutes during a session (crash protection). A final export is made at the end of each stage.
The canonical workflow instructions live in AGENTS.md — the standard adopted by Claude Code, Gemini CLI, GitHub Copilot, Cursor, and others (Linux Foundation / Agentic AI Foundation, December 2025). Tool-specific configuration (.claude/, .gemini/) contains only thin wrappers that delegate to the canonical layer in .agent-utils/.
Adding support for a new LLM tool requires:
start-stageexport-log (with the tool's transcript path and a converter script)workflow/scripts/convert_transcript_generic.pyThe web workflow is a specialization for building web applications with:
Frontend rendering approach and authentication mechanism are chosen in Stage 1-5 (Tech Selection):
| Phase | Goal | Stages |
|---|---|---|
| Phase 1: Discovery + Tech Selection | Understand what to build and pick the stack (generic — applies to any workflow branch) | 6 stages |
| Phase 2: Sketching & Data Modeling | Design entities, data model, endpoints, and UI sketches | 4 stages |
| Phase 3: UI Polish | Style the plain HTML views into a working interface | 5 stages |
| Phase 4: Prototype Implementation | Build it, refactor it | 4 stages (setup + alternating loop + refactor) |
| Phase 5: Deployment | Deploy the prototype to a real environment | 1 stage (skeleton) |
Six stages run outside the phase cycle, whenever needed:
| Stage | Purpose |
|---|---|
| Stage 0 — Meta-Workflow | Fix the workflow itself |
| Stage diagram — Diagram Assistant | Visualize any artifact as a Mermaid diagram |
| Stage import — Artifact Importer | Bring in an external artifact (Swagger spec, SQL schema, project doc) and adapt it to the workflow's format |
| Stage knowledge — Knowledge Tester | Pre-meeting quiz on all decisions made so far |
| Stage teacher — Teacher | Socratic learning sessions and rubber duck debugging |
| Stage git — Git Assistant | Version control operations |
project-brief.md, use-cases.md, api-design.md, ui-style-guide.md, and more)See PREREQUISITES.md for the full list with installation instructions.
Required:
AGENTS.md (Claude Code recommended)Quick check:
echo "Python 3: $(python3 --version 2>/dev/null || echo 'NOT FOUND')"
echo "bash: $(bash --version 2>/dev/null | head -1 || echo 'NOT FOUND')"
echo "sqlite3: $(sqlite3 --version 2>/dev/null || echo 'NOT FOUND')"
Clone this repo into your new project directory
git clone <repo-url> my-project
cd my-project
Open the project in your LLM CLI
claude # or: gemini, cursor, etc.
Start Stage 1-1 to begin Discovery
/start-stage 1-1
Follow the stage. The AI will adopt the Project Initiator persona and ask about your idea. Answer, discuss, and at the end of the session, export the log:
/export-log 1-1
Continue stage by stage. Each stage reads the outputs of the previous one. The workflow guides you.
project-root/
├── AGENTS.md ← Canonical workflow instructions (read by all LLM tools)
├── CLAUDE.md ← Claude Code redirect → AGENTS.md
├── GEMINI.md ← Gemini CLI redirect → AGENTS.md
├── README.md ← You are here
├── PREREQUISITES.md ← Tool installation requirements
├── .claude/
│ ├── settings.json ← Hook configuration (auto-export, session start)
│ └── skills/ ← Claude Code slash commands (thin wrappers)
│ ├── start-stage/
│ └── export-log/
├── .agent-utils/
│ └── skills/ ← Canonical, tool-agnostic skill content
│ ├── start-stage/
│ └── export-log/
├── imported-artifacts/ ← Raw imports + adapted *-imported.md files (Stage I)
├── consolidation-artifacts/ ← Phase milestone documents (committed to git)
├── prototype-code/ ← Working prototype code (committed to git)
├── docs/
│ ├── logs/ ← Conversation logs (one per stage session)
│ ├── assets/ ← Views (HTML), CSS, SQL schema, diagrams
│ ├── adrs/ ← Architecture Decision Records
│ └── *.md ← Working design artifacts (project-brief.md, use-cases.md, etc.)
└── workflow/
├── web/ ← The active workflow (REST + SQL)
│ └── stages/ ← Stage files (one per stage, organized by phase)
├── templates/ ← Output templates
└── scripts/ ← Automation scripts (log export, auto-export)
| Command | What it does |
|---|---|
/start-stage 1-1 |
Start a specific stage (Phase 1, Stage 1) |
/start-stage 0 |
Start the Meta-Workflow (fix workflow issues) |
/start-stage diagram |
Start the Diagram Assistant |
/start-stage import |
Start the Artifact Importer |
/export-log 1-1 |
Export the current session log for Stage 1-1 |
The web specialization lives in workflow/web/. The philosophy it runs on is generic.
If you wanted to build a game workflow or a cli workflow, the structure would be the same:
The core ideas that transfer to any workflow:
The web specialization is one application of these ideas. Build the next one on the same foundation.
Every change to the workflow itself is logged in docs/workflow-changelog.md. This file is the record of how the workflow evolved — what problems were found, what was fixed, and why.
If you fork this workflow and improve it, the changelog is where you track those improvements.