lean-spec 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -1
- package/README.md +312 -213
- package/dist/chunk-GLXYUS7F.js +5368 -0
- package/dist/chunk-GLXYUS7F.js.map +1 -0
- package/dist/chunk-S4YNQ5KE.js +306 -0
- package/dist/chunk-S4YNQ5KE.js.map +1 -0
- package/dist/cli.js +185 -1907
- package/dist/cli.js.map +1 -1
- package/dist/frontmatter-26SOQGYM.js +23 -0
- package/dist/frontmatter-26SOQGYM.js.map +1 -0
- package/dist/mcp-server.js +9 -0
- package/dist/mcp-server.js.map +1 -0
- package/package.json +22 -8
- package/templates/enterprise/config.json +2 -1
- package/templates/enterprise/spec-template.md +8 -3
- package/templates/minimal/config.json +2 -1
- package/templates/minimal/spec-template.md +2 -2
- package/templates/standard/config.json +2 -1
- package/templates/standard/spec-template.md +9 -2
package/README.md
CHANGED
|
@@ -1,321 +1,420 @@
|
|
|
1
1
|
# LeanSpec
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="docs-site/static/img/logo-with-bg.svg" alt="LeanSpec Logo" width="120" height="120">
|
|
5
|
+
</p>
|
|
4
6
|
|
|
5
|
-
>
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/lean-spec"><img src="https://img.shields.io/npm/v/lean-spec.svg" alt="npm version"></a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/lean-spec"><img src="https://img.shields.io/npm/dm/lean-spec.svg" alt="npm downloads"></a>
|
|
10
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
|
|
11
|
+
</p>
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Traditional software specifications often suffer from:
|
|
10
|
-
- **Documentation Overload**: Lengthy documents that nobody (human or AI) reads or maintains
|
|
11
|
-
- **Frozen Contracts**: Specs that become outdated as soon as development begins
|
|
12
|
-
- **Exhaustive Overthinking**: Trying to document every possible edge case upfront
|
|
13
|
-
- **Mind Burden**: Cognitive load from managing verbose, complicated documentation
|
|
14
|
-
- **Lost Intent**: The "why" gets buried under mountains of "what" and "how"
|
|
13
|
+
---
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
## Specs that fit in AI working memory
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
Traditional 2,000-line RFCs overflow AI context windows. Your AI agent can't help because it can't fit the full context.
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
```diff
|
|
20
|
+
- Heavyweight process (multi-step workflows) → AI context overflow
|
|
21
|
+
- Vibe coding (no specs) → Team misalignment
|
|
22
|
+
+ LeanSpec: Structure without overhead
|
|
23
|
+
```
|
|
21
24
|
|
|
22
|
-
A
|
|
23
|
-
- **The Goal**: Why this work exists
|
|
24
|
-
- **Key Scenarios**: The critical user journeys that must succeed
|
|
25
|
-
- **Acceptance Criteria**: Clear, testable conditions for "done"
|
|
26
|
-
- **Technical Contracts**: Essential interfaces and constraints
|
|
27
|
-
- **Non-Goals**: What we're explicitly not doing (to maintain focus)
|
|
25
|
+
**LeanSpec: A lean SDD methodology for human + AI collaboration.**
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
Specs under 300 lines. Intent-focused. Machine-readable. Adapts to your workflow—from solo dev to enterprise.
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
*Lean = adaptive and progressive. Tools (CLI/MCP) support the methodology.*
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
<p align="center">
|
|
32
|
+
<a href="#quick-start-5-minutes"><strong>Quick Start (5 Minutes) →</strong></a> •
|
|
33
|
+
<a href="https://www.lean-spec.dev"><strong>Documentation</strong></a> •
|
|
34
|
+
<a href="https://www.lean-spec.dev/docs/examples"><strong>Examples</strong></a>
|
|
35
|
+
</p>
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
Write just enough to communicate intent clearly. If it doesn't add clarity, don't write it.
|
|
37
|
+
---
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
Focus on the 20% of scenarios that deliver 80% of the value. Document what must work, not every possible edge case.
|
|
39
|
+
## The SDD Dilemma
|
|
40
40
|
|
|
41
|
-
###
|
|
42
|
-
Specs should evolve with the project. Update them as you learn, don't treat them as immutable contracts.
|
|
41
|
+
### Scenario 1: Context Overflow 🔴
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
Keep specs short and scannable. The goal is to reduce cognitive load, not create reference manuals.
|
|
43
|
+
You paste a traditional spec into Cursor. **"Context too large."** Your AI agent can't help—it can't fit the full context. Back to manual implementation.
|
|
46
44
|
|
|
47
|
-
###
|
|
48
|
-
Ship a "good enough" spec quickly. You can always refine it based on feedback and learning.
|
|
45
|
+
### Scenario 2: Stale Documentation 📄
|
|
49
46
|
|
|
50
|
-
|
|
51
|
-
Use specs as conversation starters, not as replacements for human communication.
|
|
47
|
+
Your team has beautiful specs. None match the current code. Nobody updates them because it's too painful. They're documentation theater.
|
|
52
48
|
|
|
53
|
-
|
|
49
|
+
### Scenario 3: Wrong Tool for the Job ⚖️
|
|
54
50
|
|
|
55
|
-
|
|
51
|
+
You tried automated code generation tools—powerful but heavyweight. You tried vibe coding—fast but team gets misaligned. Where's the **lightweight spec methodology**?
|
|
56
52
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
**LeanSpec solves this:**
|
|
54
|
+
- ✅ Specs fit in AI context windows (<300 lines)
|
|
55
|
+
- ✅ Structured enough for AI agents to understand
|
|
56
|
+
- ✅ Flexible enough to grow with your team
|
|
57
|
+
- ✅ CLI & MCP tools to support the workflow
|
|
61
58
|
|
|
62
|
-
|
|
63
|
-
- Full project structure (specs/ directory, examples)
|
|
64
|
-
- `AGENTS.md` - AI agent instructions and coding standards
|
|
65
|
-
- Supporting files - CONTRIBUTING.md, checklists, or other guides
|
|
66
|
-
- `config.json` - Template configuration
|
|
59
|
+
---
|
|
67
60
|
|
|
68
|
-
|
|
61
|
+
## How LeanSpec is Different
|
|
69
62
|
|
|
70
|
-
|
|
63
|
+
**From Automated Tools (like [Spec Kit](https://github.com/speckai/speckai)):**
|
|
64
|
+
- ❌ No multi-step workflows or slash commands
|
|
65
|
+
- ❌ No code generation or task execution
|
|
66
|
+
- ✅ Just specs for team alignment and AI context
|
|
71
67
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
**From Lightweight Approaches (vibe coding):**
|
|
69
|
+
- ❌ Not "just chat with AI"
|
|
70
|
+
- ✅ Enough structure for AI agents to act on
|
|
71
|
+
- ✅ Team alignment through shared specs
|
|
72
|
+
- ✅ Maintainable documentation
|
|
75
73
|
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
**From Change-Tracking Systems (like [OpenSpec](https://github.com/openspec-dev/openspec)):**
|
|
75
|
+
- ❌ No proposals or change folders
|
|
76
|
+
- ❌ No diff-based workflows
|
|
77
|
+
- ✅ Direct spec editing with version control
|
|
78
|
+
- ✅ Philosophy over process
|
|
78
79
|
|
|
79
|
-
|
|
80
|
-
lspec init
|
|
80
|
+
**LeanSpec = Just the specs.** Markdown files with structure. No ceremony, no overhead.
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
lspec create my-feature
|
|
82
|
+
---
|
|
84
83
|
|
|
85
|
-
|
|
86
|
-
lspec list
|
|
84
|
+
## How It Works
|
|
87
85
|
|
|
88
|
-
|
|
89
|
-
lspec list --status=in-progress
|
|
90
|
-
lspec list --tag=api --priority=high
|
|
86
|
+
### A Real LeanSpec in Action
|
|
91
87
|
|
|
92
|
-
|
|
93
|
-
lspec update specs/20251031/001-my-feature --status=complete
|
|
94
|
-
lspec update specs/20251031/001-my-feature --priority=high --tags=api,backend
|
|
88
|
+
Here's an actual spec from this project (287 lines):
|
|
95
89
|
|
|
96
|
-
|
|
97
|
-
|
|
90
|
+
```yaml
|
|
91
|
+
---
|
|
92
|
+
status: in-progress
|
|
93
|
+
created: 2025-11-01
|
|
94
|
+
tags: [cli, dx]
|
|
95
|
+
priority: high
|
|
96
|
+
---
|
|
98
97
|
|
|
99
|
-
#
|
|
100
|
-
|
|
98
|
+
# Unified Dashboard
|
|
99
|
+
|
|
100
|
+
## Overview
|
|
101
|
+
Combine `lspec board` and `lspec stats` into a single, comprehensive
|
|
102
|
+
project health view. Give users instant insight into project status,
|
|
103
|
+
bottlenecks, and team velocity.
|
|
104
|
+
|
|
105
|
+
## Design
|
|
106
|
+
- Board view (Kanban columns)
|
|
107
|
+
- Key metrics (completion rate, avg spec size)
|
|
108
|
+
- Bottleneck detection (specs >400 lines, stale specs)
|
|
109
|
+
- Health score (0-100)
|
|
110
|
+
|
|
111
|
+
## Plan
|
|
112
|
+
1. Merge board + stats logic
|
|
113
|
+
2. Add health scoring algorithm
|
|
114
|
+
3. Implement bottleneck detection
|
|
115
|
+
4. Add color-coded indicators
|
|
116
|
+
|
|
117
|
+
## Success Criteria
|
|
118
|
+
- Shows full project state in <5 seconds
|
|
119
|
+
- Identifies bottlenecks automatically
|
|
120
|
+
- Used daily by team leads
|
|
101
121
|
```
|
|
102
122
|
|
|
103
|
-
|
|
123
|
+
**Notice:**
|
|
124
|
+
- ✅ Under 300 lines (fits in AI + human working memory)
|
|
125
|
+
- ✅ Intent is clear ("what" and "why")
|
|
126
|
+
- ✅ Implementation details are minimal (not a PRD)
|
|
127
|
+
- ✅ Both human and AI can understand
|
|
128
|
+
- ✅ Structured metadata (status, tags, priority)
|
|
104
129
|
|
|
105
|
-
|
|
130
|
+
---
|
|
106
131
|
|
|
107
|
-
|
|
108
|
-
2. **Choose template** - Pick from solo-dev, team, enterprise, or api-first
|
|
109
|
-
3. **Customize everything** - Full control (coming soon)
|
|
132
|
+
## Built on First Principles
|
|
110
133
|
|
|
111
|
-
|
|
112
|
-
- Spec structure and examples
|
|
113
|
-
- AGENTS.md for AI agent integration
|
|
114
|
-
- Supporting files (CONTRIBUTING.md, checklists, etc.)
|
|
115
|
-
- Project-specific config
|
|
134
|
+
LeanSpec isn't arbitrary rules—it's derived from fundamental constraints of working with AI.
|
|
116
135
|
|
|
117
|
-
|
|
136
|
+
### 🧠 Context Economy
|
|
137
|
+
**Specs <300 lines → Fit in working memory**
|
|
118
138
|
|
|
119
|
-
|
|
139
|
+
- **Physics**: AI context windows are bounded (~20K effective tokens)
|
|
140
|
+
- **Biology**: Human working memory is limited (7±2 items)
|
|
141
|
+
- **Economics**: Large contexts cost more time and money
|
|
142
|
+
- **Result**: Keep specs under 300 lines, split complex features
|
|
143
|
+
|
|
144
|
+
### ✂️ Signal-to-Noise Maximization
|
|
145
|
+
**Every word informs decisions → Or it's cut**
|
|
146
|
+
|
|
147
|
+
- Every sentence must answer: "What decision does this inform?"
|
|
148
|
+
- Cut obvious statements, inferable content, speculation
|
|
149
|
+
- Keep decision rationale, constraints, success criteria
|
|
150
|
+
- **Result**: Dense, actionable specs that respect reader attention
|
|
151
|
+
|
|
152
|
+
### 📈 Progressive Disclosure
|
|
153
|
+
**Add structure only when you feel pain → Start simple**
|
|
154
|
+
|
|
155
|
+
- Solo dev: Just `status` + `created`
|
|
156
|
+
- Small team: Add `tags` + `priority`
|
|
157
|
+
- Enterprise: Add custom fields as needed
|
|
158
|
+
- **Result**: Structure adapts to team, not the other way around
|
|
159
|
+
|
|
160
|
+
### 🎯 Intent Over Implementation
|
|
161
|
+
**Capture "why" → Let "how" emerge**
|
|
162
|
+
|
|
163
|
+
- Must have: Problem, intent, success criteria
|
|
164
|
+
- Should have: Design rationale, trade-offs
|
|
165
|
+
- Could have: Implementation details (these change)
|
|
166
|
+
- **Result**: Specs stay relevant as code evolves
|
|
167
|
+
|
|
168
|
+
### 🌉 Bridge the Gap
|
|
169
|
+
**Both humans AND AI must understand → Clear structure + natural language**
|
|
170
|
+
|
|
171
|
+
- For humans: Overview, context, rationale
|
|
172
|
+
- For AI: Unambiguous requirements, structured metadata
|
|
173
|
+
- Both can parse and reason about specs
|
|
174
|
+
- **Result**: True human-AI collaboration
|
|
120
175
|
|
|
121
|
-
**Minimal Template** (status, created only):
|
|
122
|
-
```yaml
|
|
123
176
|
---
|
|
124
|
-
|
|
125
|
-
|
|
177
|
+
|
|
178
|
+
**These aren't preferences—they're constraints.** Physics (context windows), biology (working memory), and economics (token costs) dictate what works.
|
|
179
|
+
|
|
180
|
+
📖 [Deep dive: First Principles Guide →](https://www.lean-spec.dev/docs/guide/first-principles)
|
|
181
|
+
|
|
126
182
|
---
|
|
127
183
|
|
|
128
|
-
|
|
184
|
+
## Features Designed for AI-First Development
|
|
129
185
|
|
|
130
|
-
|
|
186
|
+
### 🤖 AI-Native Integration
|
|
187
|
+
|
|
188
|
+
Works seamlessly with popular AI coding tools:
|
|
189
|
+
|
|
190
|
+
- **GitHub Copilot** - AI pair programmer in VS Code & JetBrains IDEs
|
|
191
|
+
- **Claude Code** - Anthropic's AI coding assistant
|
|
192
|
+
- **OpenAI Codex** - OpenAI's coding agent (CLI, IDE, cloud)
|
|
193
|
+
- **Cursor / Windsurf** - AI-first code editor built on VS Code
|
|
194
|
+
|
|
195
|
+
MCP-native specs. Works with any tool that supports Model Context Protocol.
|
|
196
|
+
|
|
197
|
+
### 📊 Workflow Visibility
|
|
198
|
+
|
|
199
|
+
Track progress without leaving the terminal:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
$ lspec board
|
|
203
|
+
|
|
204
|
+
📋 Spec Kanban Board
|
|
205
|
+
|
|
206
|
+
📅 Planned (11)
|
|
207
|
+
🟠 High Priority
|
|
208
|
+
• readme-redesign-ai-first
|
|
209
|
+
• validate-output-lint-style
|
|
210
|
+
|
|
211
|
+
⏳ In Progress (2)
|
|
212
|
+
• unified-dashboard
|
|
213
|
+
• mcp-error-handling
|
|
214
|
+
|
|
215
|
+
✅ Complete (14)
|
|
216
|
+
• stats-dashboard-refactor
|
|
217
|
+
• git-backfill-timestamps
|
|
218
|
+
...
|
|
131
219
|
```
|
|
132
220
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
status: in-progress
|
|
137
|
-
created: 2025-11-01
|
|
138
|
-
tags: [api, feature]
|
|
139
|
-
priority: high
|
|
140
|
-
---
|
|
221
|
+
```bash
|
|
222
|
+
$ lspec stats
|
|
141
223
|
|
|
142
|
-
|
|
224
|
+
📊 Project Stats
|
|
143
225
|
|
|
144
|
-
|
|
226
|
+
Total: 27 specs | Active: 13 | Complete: 14
|
|
227
|
+
Completion: 52% | Avg size: 287 lines
|
|
145
228
|
```
|
|
146
229
|
|
|
147
|
-
|
|
230
|
+
Simple, focused CLI for spec status and team visibility.
|
|
231
|
+
|
|
232
|
+
### 🎨 Progressive Structure
|
|
233
|
+
|
|
234
|
+
Start simple, add complexity only when you need it:
|
|
235
|
+
|
|
148
236
|
```yaml
|
|
149
|
-
|
|
150
|
-
status:
|
|
151
|
-
created: 2025-11-01
|
|
152
|
-
tags: [security, compliance]
|
|
153
|
-
priority: critical
|
|
154
|
-
assignee: alice
|
|
155
|
-
reviewer: bob
|
|
156
|
-
issue: JIRA-1234
|
|
157
|
-
epic: security-hardening
|
|
158
|
-
---
|
|
237
|
+
# Day 1: Solo dev
|
|
238
|
+
status: planned
|
|
159
239
|
|
|
160
|
-
#
|
|
240
|
+
# Week 2: Small team
|
|
241
|
+
status: in-progress
|
|
242
|
+
tags: [api, feature]
|
|
243
|
+
priority: high
|
|
161
244
|
|
|
162
|
-
|
|
163
|
-
|
|
245
|
+
# Month 3: Enterprise
|
|
246
|
+
assignee: alice
|
|
247
|
+
epic: PROJ-123
|
|
248
|
+
sprint: 2025-Q4-S3
|
|
164
249
|
```
|
|
165
250
|
|
|
166
|
-
|
|
167
|
-
- **Dual Format**: Machine-readable YAML frontmatter + human-readable visual badges
|
|
168
|
-
- **Auto-sync**: Visual badges automatically update when metadata changes
|
|
169
|
-
- **Status Emojis**: 📅 Planned, 🔨 In progress, ✅ Complete, 📦 Archived
|
|
251
|
+
Custom fields fully supported. Adapts to your workflow as you grow.
|
|
170
252
|
|
|
171
|
-
|
|
253
|
+
### ⚡ Actually Maintainable
|
|
172
254
|
|
|
173
|
-
**
|
|
174
|
-
**Valid Priority Values**: `low`, `medium`, `high`, `critical`
|
|
255
|
+
**The problem:** Traditional specs get stale because updating them is too painful.
|
|
175
256
|
|
|
176
|
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
257
|
+
**LeanSpec solution:**
|
|
258
|
+
- **Short specs** - Fits in AI context window for easy updates
|
|
259
|
+
- **CLI tools** - Quick viewing and editing from terminal
|
|
260
|
+
- **AI-friendly format** - Structured markdown AI agents can parse and update
|
|
261
|
+
- **Version control** - Git tracks changes, diffs show what evolved
|
|
181
262
|
|
|
182
|
-
|
|
183
|
-
- `lspec update <path> --status=complete` - Mark as done (auto-adds completion date)
|
|
184
|
-
- `lspec update <path> --priority=high --tags=api,backend` - Update multiple fields
|
|
263
|
+
**Result:** Specs light enough to actually keep in sync with code.
|
|
185
264
|
|
|
186
|
-
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Quick Start (5 Minutes)
|
|
187
268
|
|
|
188
|
-
|
|
269
|
+
### 1. Install & Initialize
|
|
189
270
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
271
|
+
```bash
|
|
272
|
+
npm install -g lean-spec
|
|
273
|
+
cd your-project
|
|
274
|
+
lspec init
|
|
275
|
+
```
|
|
193
276
|
|
|
194
|
-
|
|
277
|
+
### 2. Work with Your AI Tool
|
|
195
278
|
|
|
196
|
-
|
|
279
|
+
**In Cursor, Copilot, or any AI coding assistant:**
|
|
197
280
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
- **enterprise** - Enterprise-grade with governance & compliance
|
|
201
|
-
- **api-first** - API-driven development with endpoint specs
|
|
281
|
+
```
|
|
282
|
+
👤 You: "Create a spec for user authentication with OAuth2."
|
|
202
283
|
|
|
203
|
-
|
|
284
|
+
🤖 AI: [runs lspec create user-authentication]
|
|
285
|
+
"I've created specs/001-user-authentication/README.md.
|
|
286
|
+
Here's the spec..."
|
|
204
287
|
|
|
205
|
-
|
|
288
|
+
👤 You: "Now implement the OAuth2 flow based on this spec."
|
|
206
289
|
|
|
207
|
-
|
|
290
|
+
🤖 AI: [reads spec, implements code]
|
|
291
|
+
"I've implemented the OAuth2 provider in src/auth/oauth.ts..."
|
|
292
|
+
```
|
|
208
293
|
|
|
209
|
-
###
|
|
294
|
+
### 3. Track Progress
|
|
210
295
|
|
|
211
296
|
```bash
|
|
212
|
-
|
|
213
|
-
|
|
297
|
+
# Check project status
|
|
298
|
+
lspec board
|
|
299
|
+
|
|
300
|
+
# View spec with AI-friendly output
|
|
301
|
+
lspec view user-authentication --json
|
|
302
|
+
|
|
303
|
+
# Update status as you progress
|
|
304
|
+
lspec update user-authentication --status in-progress
|
|
214
305
|
```
|
|
215
306
|
|
|
216
|
-
|
|
307
|
+
**The workflow:**
|
|
308
|
+
1. ✅ Ask AI to create spec (it uses `lspec create`)
|
|
309
|
+
2. ✅ AI reads spec and implements (spec fits in context)
|
|
310
|
+
3. ✅ Track with `lspec board` / `lspec stats`
|
|
311
|
+
4. ✅ Update status as work progresses
|
|
217
312
|
|
|
218
|
-
|
|
313
|
+
**Why this works:**
|
|
314
|
+
- Specs <300 lines → Fit in AI context window
|
|
315
|
+
- Structured format → AI can parse and act on
|
|
316
|
+
- CLI tools → AI knows how to use them
|
|
317
|
+
- You drive, AI executes
|
|
219
318
|
|
|
220
|
-
|
|
319
|
+
**Next steps:**
|
|
320
|
+
- 📘 [Full CLI Reference](https://www.lean-spec.dev/docs/cli-reference) - All commands
|
|
321
|
+
- 🎨 [Choose a Template](https://www.lean-spec.dev/docs/templates) - Minimal, standard, or enterprise
|
|
322
|
+
- 🤖 [AI Agent Setup](AGENTS.md) - Configure Cursor, Claude, Aider
|
|
221
323
|
|
|
222
|
-
|
|
223
|
-
# Install dependencies
|
|
224
|
-
pnpm install
|
|
324
|
+
---
|
|
225
325
|
|
|
226
|
-
|
|
227
|
-
pnpm build
|
|
326
|
+
## Choose the Right Tool
|
|
228
327
|
|
|
229
|
-
|
|
230
|
-
pnpm dev
|
|
328
|
+
Not every project needs the same level of structure. Here's when to use what:
|
|
231
329
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
330
|
+
| Use This | When You Need |
|
|
331
|
+
|----------|---------------|
|
|
332
|
+
| **[Spec Kit](https://github.com/speckai/speckai)** | Automated code generation from specs • Multi-step workflows |
|
|
333
|
+
| **[OpenSpec](https://github.com/openspec-dev/openspec)** | Change proposals and delta tracking • Brownfield modifications |
|
|
334
|
+
| **LeanSpec** | AI-native specs that fit in context • Human + AI collaboration • Solo to enterprise |
|
|
335
|
+
| **Vibe Coding** | Rapid prototyping • Solo experiments • Trivial features |
|
|
235
336
|
|
|
236
|
-
**
|
|
337
|
+
**Why LeanSpec?** The only SDD methodology designed from first principles for AI context windows. Specs that both humans and AI can actually use.
|
|
237
338
|
|
|
238
|
-
|
|
339
|
+
---
|
|
239
340
|
|
|
240
|
-
|
|
241
|
-
- New features or components
|
|
242
|
-
- API designs
|
|
243
|
-
- Architecture decisions that need shared understanding
|
|
244
|
-
- Quick alignment on work direction
|
|
245
|
-
- Providing context to AI coding agents for implementation tasks
|
|
246
|
-
- **Establishing an adaptive SOP for AI-powered development teams**
|
|
247
|
-
- **Integrating with system prompts and agent instructions**
|
|
341
|
+
## Who Uses LeanSpec
|
|
248
342
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
- Step-by-step user manuals (use dedicated user documentation)
|
|
252
|
-
- Compliance requirements that mandate specific formats
|
|
343
|
+
### AI-First Development Teams
|
|
344
|
+
Give agents clear context without context window overload. Works with Cursor, Copilot, Aider, Claude.
|
|
253
345
|
|
|
254
|
-
|
|
346
|
+
### Scaling Startups
|
|
347
|
+
One methodology from solo dev → team → enterprise. Add structure progressively as you grow.
|
|
255
348
|
|
|
256
|
-
|
|
349
|
+
### Teams Seeking Balance
|
|
350
|
+
Need structure for alignment and AI context, but heavyweight processes slow you down.
|
|
257
351
|
|
|
258
|
-
###
|
|
352
|
+
### Developers Building AI Agents
|
|
353
|
+
MCP-native specs. Structured input format agents can parse reliably.
|
|
259
354
|
|
|
260
|
-
|
|
261
|
-
- **Concrete Scenarios**: Specific examples help AI understand expected behavior
|
|
262
|
-
- **Testable Criteria**: Clear targets guide AI implementation
|
|
263
|
-
- **Boundaries**: Explicit non-goals help AI avoid scope creep
|
|
264
|
-
- **Adaptable Structure**: Whatever format you choose, consistency helps AI parse effectively
|
|
355
|
+
---
|
|
265
356
|
|
|
266
|
-
|
|
357
|
+
## We Practice What We Preach
|
|
267
358
|
|
|
268
|
-
|
|
359
|
+
**LeanSpec is built using LeanSpec.** Every feature, refactor, and design decision has a spec. All specs follow the first principles—under 300 lines, AI-readable, actively maintained.
|
|
269
360
|
|
|
270
|
-
|
|
361
|
+
**Real velocity from zero to official launch:**
|
|
362
|
+
- **6 days** from first commit to production
|
|
363
|
+
- Full-featured CLI, MCP server, documentation site
|
|
364
|
+
- 54 specs written and implemented—all with AI agents
|
|
365
|
+
- Derived first principles from practicing LeanSpec
|
|
271
366
|
|
|
272
|
-
|
|
367
|
+
We dogfood our own methodology. Specs that fit in AI context enable the velocity we promise.
|
|
273
368
|
|
|
274
|
-
|
|
369
|
+
→ [Browse our specs](https://github.com/codervisor/lean-spec/tree/main/specs)
|
|
275
370
|
|
|
276
|
-
|
|
277
|
-
- Define how AI agents should interpret and apply LeanSpec principles
|
|
278
|
-
- Establish coding standards and conventions
|
|
279
|
-
- Specify how to handle ambiguity or missing information
|
|
280
|
-
- Set expectations for testing, documentation, and code quality
|
|
371
|
+
---
|
|
281
372
|
|
|
282
|
-
|
|
283
|
-
- Structure your repository to make LeanSpec documents discoverable
|
|
284
|
-
- Use consistent naming conventions (e.g., `LEANSPEC_*.md`)
|
|
285
|
-
- Place specs near the code they describe
|
|
286
|
-
- Link related specs together for complex features
|
|
373
|
+
## When to Use (and Skip) Specs
|
|
287
374
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
375
|
+
| Use LeanSpec When: | Skip It When: |
|
|
376
|
+
|---------------------|---------------|
|
|
377
|
+
| ✅ Features span multiple files/components | ❌ Trivial bug fixes |
|
|
378
|
+
| ✅ Architecture decisions need alignment | ❌ Self-explanatory refactors |
|
|
379
|
+
| ✅ Guiding AI agents on complex features | ❌ Pure API reference (use code comments) |
|
|
380
|
+
| ✅ Design rationale should be documented | ❌ Quick experiments |
|
|
381
|
+
| ✅ Team needs to coordinate work | ❌ Changes are obvious |
|
|
293
382
|
|
|
294
|
-
|
|
383
|
+
**Philosophy:** Write specs when they add clarity. Skip them when they don't.
|
|
295
384
|
|
|
296
|
-
|
|
385
|
+
---
|
|
297
386
|
|
|
298
|
-
##
|
|
387
|
+
## Learn More
|
|
299
388
|
|
|
300
|
-
|
|
389
|
+
### 📚 Documentation
|
|
390
|
+
- [Getting Started Guide](https://www.lean-spec.dev/docs/getting-started) - Complete setup walkthrough
|
|
391
|
+
- [First Principles](https://www.lean-spec.dev/docs/guide/first-principles) - The philosophy behind LeanSpec
|
|
392
|
+
- [CLI Reference](https://www.lean-spec.dev/docs/cli-reference) - All commands with examples
|
|
301
393
|
|
|
302
|
-
|
|
394
|
+
### 🛠️ Integrations
|
|
395
|
+
- [AI Agent Configuration](AGENTS.md) - Cursor, Copilot, Aider setup
|
|
396
|
+
- [MCP Server](docs/MCP-SERVER.md) - Claude Desktop integration
|
|
397
|
+
- [VS Code Extension](https://www.lean-spec.dev/docs/tools/vscode) - Enhanced editor support
|
|
303
398
|
|
|
304
|
-
|
|
399
|
+
### 🎓 Guides
|
|
400
|
+
- [Custom Fields](https://www.lean-spec.dev/docs/guide/custom-fields) - Adapt to your workflow
|
|
401
|
+
- [Sub-Specs](https://www.lean-spec.dev/docs/guide/sub-specs) - Manage complex features
|
|
402
|
+
- [Folder Structure](https://www.lean-spec.dev/docs/guide/folder-structure) - Organize your specs
|
|
305
403
|
|
|
306
|
-
|
|
404
|
+
### 🤝 Community
|
|
405
|
+
- [GitHub Issues](https://github.com/codervisor/lean-spec/issues) - Report bugs or request features
|
|
406
|
+
- [Contributing Guide](CONTRIBUTING.md) - Join the project
|
|
407
|
+
- [Examples](https://www.lean-spec.dev/docs/examples) - Real-world usage patterns
|
|
307
408
|
|
|
308
|
-
|
|
409
|
+
---
|
|
309
410
|
|
|
310
411
|
## License
|
|
311
412
|
|
|
312
|
-
MIT
|
|
413
|
+
MIT - See [LICENSE](LICENSE)
|
|
313
414
|
|
|
314
|
-
|
|
315
|
-
- **[AI Agent Integration](AGENTS.md)** - Setup for AI-powered development
|
|
316
|
-
- **[Contributing](CONTRIBUTING.md)** - How to contribute to LeanSpec
|
|
317
|
-
- **[Developer Guide](docs/)** - Testing and technical docs
|
|
318
|
-
|
|
319
|
-
## Contributing
|
|
415
|
+
---
|
|
320
416
|
|
|
321
|
-
|
|
417
|
+
<p align="center">
|
|
418
|
+
<strong>Spec-Driven Development without the overhead.</strong><br>
|
|
419
|
+
Keep your specs short. Keep them clear. Keep them useful.
|
|
420
|
+
</p>
|