|
| 1 | +--- |
| 2 | +slug: spec-driven-development-ralph-starter |
| 3 | +title: Spec Driven Development with ralph-starter |
| 4 | +authors: [ruben] |
| 5 | +tags: [ralph-starter, sdd, openspec, specs, workflow] |
| 6 | +description: How ralph-starter brings Spec Driven Development to any AI coding agent, with native OpenSpec support, spec validation, and multi-source spec fetching. |
| 7 | +image: /img/blog/sdd-ralph-starter.png |
| 8 | +--- |
| 9 | + |
| 10 | +Spec Driven Development is the biggest shift in AI coding since agents learned to run tests. Here is how ralph-starter fits in. |
| 11 | + |
| 12 | +<!-- truncate --> |
| 13 | + |
| 14 | +## The problem with "just prompt it" |
| 15 | + |
| 16 | +Most people use AI coding agents the same way: type a sentence, hit enter, hope for the best. "Add user auth." "Fix the sidebar." Three words and vibes. |
| 17 | + |
| 18 | +I did this for weeks. The agent would generate something that looked plausible but missed what I actually wanted. I blamed the tool, but the problem was me. I was not giving it enough context. |
| 19 | + |
| 20 | +Then I started writing specs -- not essays, just 10-20 lines describing what I actually wanted, how to verify it, and where things should go. The difference was night and day. 2 loops instead of 5. $0.50 instead of $3. Correct output instead of close-but-wrong. |
| 21 | + |
| 22 | +This pattern has a name now: **Spec Driven Development (SDD)**. |
| 23 | + |
| 24 | +## The SDD landscape |
| 25 | + |
| 26 | +Three frameworks are leading the SDD conversation: |
| 27 | + |
| 28 | +| Tool | Philosophy | Lock-in | |
| 29 | +|------|-----------|---------| |
| 30 | +| **OpenSpec** (Fission AI) | Lightweight, fluid, tool-agnostic | None | |
| 31 | +| **Spec-Kit** (GitHub) | Heavyweight, rigid 5-phase gates | GitHub ecosystem | |
| 32 | +| **Kiro** (AWS) | Full IDE with built-in agents | AWS account required | |
| 33 | + |
| 34 | +OpenSpec organizes specs into changes with `proposal.md`, `design.md`, `tasks.md`, and requirement specs using RFC 2119 keywords (SHALL, MUST, SHOULD). It is the lightest of the three. |
| 35 | + |
| 36 | +Spec-Kit enforces five phases: constitution, specification, plan, tasks, implement. Thorough but heavy. |
| 37 | + |
| 38 | +Kiro bundles everything into a VS Code fork with agent hooks and EARS notation. Powerful but locked to AWS. |
| 39 | + |
| 40 | +## Where ralph-starter fits |
| 41 | + |
| 42 | +ralph-starter takes a different angle: **your specs already exist somewhere**. |
| 43 | + |
| 44 | +They are in GitHub Issues. Linear tickets. Notion docs. Figma designs. OpenSpec directories. Why rewrite them in a new format? |
| 45 | + |
| 46 | +ralph-starter pulls specs from where they already live: |
| 47 | + |
| 48 | +```bash |
| 49 | +# From GitHub issues |
| 50 | +ralph-starter run --from github --project myorg/myrepo --label "ready" |
| 51 | + |
| 52 | +# From OpenSpec directories |
| 53 | +ralph-starter run --from openspec:add-auth |
| 54 | + |
| 55 | +# From Linear tickets |
| 56 | +ralph-starter run --from linear --project "Mobile App" |
| 57 | + |
| 58 | +# From a Notion doc |
| 59 | +ralph-starter run --from notion --project "https://notion.so/spec-abc123" |
| 60 | +``` |
| 61 | + |
| 62 | +Then it runs autonomous loops: build context, spawn agent, collect output, run validation (lint/build/test), commit, repeat until done. |
| 63 | + |
| 64 | +## New in v0.5.0: OpenSpec + spec validation |
| 65 | + |
| 66 | +We just shipped native OpenSpec support and a spec validator: |
| 67 | + |
| 68 | +```bash |
| 69 | +# List all OpenSpec changes in the project |
| 70 | +ralph-starter spec list |
| 71 | + |
| 72 | +# Validate spec completeness (0-100 score) |
| 73 | +ralph-starter spec validate |
| 74 | + |
| 75 | +# Validate before running -- stops if spec is too thin |
| 76 | +ralph-starter run --from openspec:my-feature --spec-validate |
| 77 | +``` |
| 78 | + |
| 79 | +The validator checks for: |
| 80 | +- Proposal or rationale section (why are we building this?) |
| 81 | +- RFC 2119 keywords (SHALL, MUST -- formal requirements) |
| 82 | +- Given/When/Then acceptance criteria (testable conditions) |
| 83 | +- Design section (how to build it) |
| 84 | +- Task breakdown (implementation steps) |
| 85 | + |
| 86 | +A spec scoring below 40/100 gets flagged before the agent starts. This saves tokens on underspecified work. |
| 87 | + |
| 88 | +## The new spec command |
| 89 | + |
| 90 | +`ralph-starter spec` gives you a CLI for spec operations: |
| 91 | + |
| 92 | +```bash |
| 93 | +# Validate all specs in the project |
| 94 | +ralph-starter spec validate |
| 95 | + |
| 96 | +# List available specs (auto-detects OpenSpec, Spec-Kit, or raw) |
| 97 | +ralph-starter spec list |
| 98 | + |
| 99 | +# Show completeness summary |
| 100 | +ralph-starter spec summary |
| 101 | +``` |
| 102 | + |
| 103 | +It auto-detects whether you are using OpenSpec format, GitHub Spec-Kit format, or plain markdown specs. |
| 104 | + |
| 105 | +## The numbers |
| 106 | + |
| 107 | +| Metric | Without specs | With specs | |
| 108 | +|--------|--------------|------------| |
| 109 | +| Loops per task | 5 | 2 | |
| 110 | +| Cost per task | ~$3.00 | ~$0.50 | |
| 111 | +| Output accuracy | Hit or miss | Consistent | |
| 112 | +| Time writing spec | 0 min | 3 min | |
| 113 | + |
| 114 | +The 3 minutes spent writing a spec save 15 minutes of iteration and debugging. The spec is the leverage. |
| 115 | + |
| 116 | +## What is next |
| 117 | + |
| 118 | +We are working on: |
| 119 | +- **Spec coverage tracking** -- which requirements have been implemented? |
| 120 | +- **Spec-to-test generation** -- Given/When/Then to test stubs |
| 121 | +- **Living specs** -- specs that update as implementation diverges |
| 122 | + |
| 123 | +SDD is not a fad. It is the natural evolution of AI-assisted coding. The spec is the interface between human intent and machine execution. The clearer the spec, the better the output. |
| 124 | + |
| 125 | +ralph-starter is open source, MIT licensed: [github.com/multivmlabs/ralph-starter](https://github.com/multivmlabs/ralph-starter) |
0 commit comments