stukennedy/openclaw-starter-kit/spec-driven-coding
Claude Code and agent skill by stukennedy/openclaw-starter-kit
- community
Checking that the SKILL.md file is still in the repository.
Build software projects using structured spec-driven development with the Ralph Wiggum pattern. Use when asked to build, implement, or code a project, feature, or application. Covers discovery (requirements gathering), spec generation, AGENTS.md context generation, and autonomous implementation with fresh-context iterations. Supports any language/framework.
Install
npx vskill@latest install stukennedy/openclaw-starter-kit/spec-driven-codingSKILL.md
Spec-Driven Coding
Structured approach to building software: discover → spec → match stack → implement with fresh-context iterations.
Overview
Four phases:
- Discovery — Gather requirements, produce structured spec
- Stack Matching — Find or create a tech-stack skill for the project
- Planning — Generate AGENTS.md with spec + stack patterns + execution rules
- Implementation — Execute using Ralph Wiggum pattern (fresh context per iteration)
Phase 1: Discovery
Conversational requirements gathering (3-5 exchanges max). Gather:
- Goal: What are we building?
- Language/Framework: Tech stack (respect user preferences from USER.md)
- Features: Specific functionality
- Requirements: Constraints, APIs, integrations
- Project name: For directory/repo
Produce a spec JSON and save to .spec.json:
Confirm spec with user before proceeding.
Phase 2: Stack Matching
Tech-stack skills capture how we build with a given stack. They accumulate patterns, conventions, and preferences over time so every project is built the way we want.
Finding a Stack
Check stacks/ directory for a matching stack file:
- Match on language, framework, tags
- Read the matched stack file for patterns and conventions
Available stacks: (read from stacks/ dir)
cloudflare-hono.md— Cloudflare Workers + Hono + Durable Objectsgo-cli.md— Go CLI with Cobra/Tooey
Creating a New Stack
If no stack matches, create one during discovery:
- Ask user about their preferences for this stack (project structure, naming, patterns, testing)
- Research the framework docs if needed (
web_fetchofficial docs) - Create a new stack file in
stacks/<name>.md
Stack file format:
Improving Stacks
After completing a project, review what worked and update the stack:
- Add patterns discovered during implementation
- Fix conventions that caused issues
- Add dependencies that were needed
- Update preferences based on lessons learned
This is the key differentiator: stacks improve with every project. Over time, they encode exactly how we build things.
Phase 3: Planning
Generate an AGENTS.md that becomes the single source of truth for implementation.
See references/agents-template.md for the template. The AGENTS.md combines:
- Project spec (from Phase 1)
- Tech stack patterns and conventions (from Phase 2)
- Execution rules — see references/execution-rules.md
- Current project structure
- Implementation plan (ordered steps)
Save as AGENTS.md in the project root.
Phase 4: Implementation (Ralph Wiggum Pattern)
Each iteration is a separate `sessions_spawn` = genuinely fresh context.
See references/ralph-pattern.md for full implementation guide.
Why Ralph?
Context degrades over long sessions. By spawning a new session per iteration, each gets a full 200K context window. No accumulated confusion, no contradictions.
How It Works
The main session is the orchestrator — it does NOT implement. It only:
- Initializes
.ralph-state.json - Spawns iterations via
sessions_spawn(each = fresh context) - Reads state file after each spawn returns
- Reports progress to user
- Loops until
status: "completed"or max iterations
Orchestrator Loop
Each Spawn Gets This Prompt
State File (.ralph-state.json)
Limits
- Max iterations: 50 (configurable)
- Timeout per spawn: 300s
- Completion:
status: "completed"in state file
Quick Reference
| Phase | Input | Output | Key File | |
|---|---|---|---|---|
| Discovery | User conversation | .spec.json | — | |
| Stack Match | Spec language/framework | Stack patterns | stacks/*.md | |
| Planning | Spec + Stack | AGENTS.md | references/agents-template.md | |
| Implementation | AGENTS.md + State | Working code | .ralph-state.json |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclawd/skills/spec-driven-coding/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/stukennedy/openclaw-starter-kit/spec-driven-coding)