Skip to content

sam-agents/example-todo

Repository files navigation

example-todo

A working todo app built by SAM in 14 minutes from a single markdown PRD. Every artifact — PRD, contracts, stories, source, tests, and the post-integration evidence Lens captured — is committed here so you can see exactly what SAM produces, without running anything.

Todo app, after adding "buy milk"

What you're looking at

This repo is the end-to-end output of one SAM plan-n-build run. The human wrote prd.md. SAM produced everything else.

prd.md                                   # The input — one markdown file
sdocs/
├── architecture-ref.md                  # SAM's architectural decisions
├── contracts/                           # Typed seams between stories
│   ├── api/                             # Endpoint request/response shapes
│   ├── type/                            # Shared TypeScript types
│   └── db/                              # Repository interface
├── epics/EPIC-001-todo-management.md    # One epic
├── stories/                             # 6 stories (5 features + 1 integration)
└── evidence/EPIC-001/                   # Lens captured this AFTER tests passed
    ├── screenshot-1-empty.png ...
    ├── screenshot-6-too-long-error.png
    ├── network.json                     # Every HTTP call + status
    ├── console.log                      # Browser console (clean run)
    ├── playwright/.../video.webm        # Real Chrome session
    └── report/index.html                # Playwright trace viewer
client/                                  # React + TypeScript (Vite)
server/                                  # Fastify + TypeScript
tests/e2e/                               # Playwright integration test
_sam/                                    # SAM agent and workflow definitions

The build, by the numbers

Phase Time Output
PRD → contracts + stories ~4 min 6 contracts, 1 epic, 6 stories
Stories 1–5 (RED → GREEN → REFACTOR) ~9 min 33 unit tests passing
Integration story + Lens evidence ~1 min video, 6 screenshots, clean network log
Total 14 min A working todo app, type-safe end-to-end

Zero integration rework. No CORS surprise. No type drift between server and client. Contracts are designed before stories, so cross-file seams are typed and enforced by tsc.

See it work without running anything

Run it locally

git clone https://github.com/sam-agents/example-todo.git
cd example-todo
npm install
npm run dev

Visit http://localhost:5174 — the same code path Lens recorded.

To run the same Playwright scenario Lens ran:

npx playwright install chromium
npm run test:e2e

How SAM built this

The pipeline ran six agents in sequence:

  1. Atlas designed typed contracts before any story was written
  2. Titan wrote failing tests covering every acceptance criterion (RED)
  3. Dyna wrote the minimum code to make them pass (GREEN)
  4. Argus reviewed and refactored against quality standards (REFACTOR)
  5. The integration story re-tested the whole epic against real HTTP — no mocks
  6. Lens drove a real headless Chrome, captured video + screenshots + network + console as evidence

If a story drifts from a contract, TypeScript fails. If the app doesn't actually integrate, the integration story fails. If the UI is broken, Lens evidence shows it. The agents do not say "I tested it" — the files on disk say it.

Want to build your own?

npx sam-agents

See the SAM repo for the full agent roster, workflows, and per-platform install instructions (Claude Code, Cursor, Gemini CLI, GitHub Copilot, Antigravity).


PRD in, working app out. That's SAM.

About

Working todo app built by SAM in 14 minutes from a markdown PRD. Contracts, stories, tests, and post-integration Lens evidence all committed.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors