lean-spec 0.1.0
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 +60 -0
- package/LICENSE +21 -0
- package/README.md +321 -0
- package/bin/lspec.js +2 -0
- package/dist/cli.js +1968 -0
- package/dist/cli.js.map +1 -0
- package/package.json +74 -0
- package/templates/enterprise/README.md +25 -0
- package/templates/enterprise/config.json +19 -0
- package/templates/enterprise/files/AGENTS.md +123 -0
- package/templates/enterprise/spec-template.md +75 -0
- package/templates/minimal/README.md +18 -0
- package/templates/minimal/config.json +14 -0
- package/templates/minimal/files/AGENTS.md +76 -0
- package/templates/minimal/spec-template.md +25 -0
- package/templates/standard/README.md +24 -0
- package/templates/standard/config.json +17 -0
- package/templates/standard/files/AGENTS.md +84 -0
- package/templates/standard/spec-template.md +35 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: planned
|
|
3
|
+
created: {date}
|
|
4
|
+
tags: []
|
|
5
|
+
priority: medium
|
|
6
|
+
assignee:
|
|
7
|
+
reviewer:
|
|
8
|
+
related: []
|
|
9
|
+
issue:
|
|
10
|
+
epic:
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# {name}
|
|
14
|
+
|
|
15
|
+
> **Status**: 📅 Planned · **Priority**: Medium · **Created**: {date}
|
|
16
|
+
> **Assignee**: TBD · **Reviewer**: TBD
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
|
|
20
|
+
<!-- What business problem? Why now? Expected impact? -->
|
|
21
|
+
|
|
22
|
+
## Research
|
|
23
|
+
|
|
24
|
+
<!-- Background investigation, alternatives evaluated, key findings -->
|
|
25
|
+
|
|
26
|
+
## Design
|
|
27
|
+
|
|
28
|
+
<!-- Architecture, system interactions, data flows -->
|
|
29
|
+
|
|
30
|
+
### Dependencies
|
|
31
|
+
|
|
32
|
+
- **Teams**: <!-- Which teams need to coordinate? -->
|
|
33
|
+
- **Systems**: <!-- External systems affected -->
|
|
34
|
+
- **Data**: <!-- Databases, APIs, shared resources -->
|
|
35
|
+
|
|
36
|
+
### Security & Compliance
|
|
37
|
+
|
|
38
|
+
- [ ] Handles sensitive data (PII, credentials, etc.)
|
|
39
|
+
- [ ] Security implications reviewed
|
|
40
|
+
- [ ] Compliance requirements identified
|
|
41
|
+
|
|
42
|
+
## Plan
|
|
43
|
+
|
|
44
|
+
<!-- Break into phases if needed -->
|
|
45
|
+
|
|
46
|
+
- [ ] Task 1 - @owner
|
|
47
|
+
- [ ] Task 2 - @owner
|
|
48
|
+
- [ ] Task 3 - @owner
|
|
49
|
+
|
|
50
|
+
## Test
|
|
51
|
+
|
|
52
|
+
<!-- How to verify correctness and safety -->
|
|
53
|
+
|
|
54
|
+
- [ ] Unit/integration tests
|
|
55
|
+
- [ ] Load/performance testing
|
|
56
|
+
- [ ] Security testing
|
|
57
|
+
- [ ] Rollback plan
|
|
58
|
+
|
|
59
|
+
## Risks
|
|
60
|
+
|
|
61
|
+
| Risk | Impact | Mitigation |
|
|
62
|
+
|------|--------|------------|
|
|
63
|
+
| | | |
|
|
64
|
+
|
|
65
|
+
## Rollout
|
|
66
|
+
|
|
67
|
+
<!-- Deployment strategy for production systems -->
|
|
68
|
+
|
|
69
|
+
- Staging validation:
|
|
70
|
+
- Production approach:
|
|
71
|
+
- Monitoring:
|
|
72
|
+
|
|
73
|
+
## Notes
|
|
74
|
+
|
|
75
|
+
<!-- Key decisions, constraints, unresolved questions -->
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Minimal Template
|
|
2
|
+
|
|
3
|
+
Bare essentials. Just the spec folder structure, nothing else.
|
|
4
|
+
|
|
5
|
+
## What's Included
|
|
6
|
+
|
|
7
|
+
- Spec folder structure (`specs/YYYYMMDD/NNN-name/`)
|
|
8
|
+
- That's it
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- You want maximum flexibility
|
|
13
|
+
- Adding LeanSpec to existing project with established practices
|
|
14
|
+
- Don't need AI agent instructions
|
|
15
|
+
|
|
16
|
+
## Next Steps
|
|
17
|
+
|
|
18
|
+
Create your first spec: `lspec create my-feature`
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Minimal",
|
|
3
|
+
"description": "Just the essentials - folder structure only",
|
|
4
|
+
"config": {
|
|
5
|
+
"template": "minimal",
|
|
6
|
+
"specsDir": "specs",
|
|
7
|
+
"structure": {
|
|
8
|
+
"pattern": "{date}/{seq}-{name}/",
|
|
9
|
+
"dateFormat": "YYYYMMDD",
|
|
10
|
+
"sequenceDigits": 3,
|
|
11
|
+
"defaultFile": "README.md"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# AI Agent Instructions
|
|
2
|
+
|
|
3
|
+
## Project: {project_name}
|
|
4
|
+
|
|
5
|
+
Lightweight spec methodology for AI-powered development.
|
|
6
|
+
|
|
7
|
+
## Core Rules
|
|
8
|
+
|
|
9
|
+
1. **Read README.md first** - Understand project context
|
|
10
|
+
2. **Check specs/** - Review existing specs before starting
|
|
11
|
+
3. **Follow LeanSpec principles** - Clarity over documentation
|
|
12
|
+
4. **Keep it minimal** - If it doesn't add clarity, cut it
|
|
13
|
+
|
|
14
|
+
## When to Use Specs
|
|
15
|
+
|
|
16
|
+
- Features that affect multiple parts of the system
|
|
17
|
+
- Breaking changes or significant refactors
|
|
18
|
+
- Design decisions that need thinking through
|
|
19
|
+
- Complex features that benefit from upfront planning
|
|
20
|
+
|
|
21
|
+
Skip specs for:
|
|
22
|
+
- Bug fixes
|
|
23
|
+
- Trivial changes
|
|
24
|
+
- Self-explanatory refactors
|
|
25
|
+
|
|
26
|
+
## Discovery Commands
|
|
27
|
+
|
|
28
|
+
Before starting work, understand project context:
|
|
29
|
+
|
|
30
|
+
- `lspec stats` - See work distribution
|
|
31
|
+
- `lspec board` - View specs by status
|
|
32
|
+
- `lspec search "<query>"` - Find relevant work
|
|
33
|
+
- `lspec list` - List all specs
|
|
34
|
+
|
|
35
|
+
These help you understand what exists and what's in progress.
|
|
36
|
+
|
|
37
|
+
## Spec Frontmatter
|
|
38
|
+
|
|
39
|
+
When creating or updating specs, add YAML frontmatter at the top:
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
---
|
|
43
|
+
status: draft|planned|in-progress|complete|blocked|cancelled
|
|
44
|
+
created: YYYY-MM-DD
|
|
45
|
+
---
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Keep it simple:**
|
|
49
|
+
- Just `status` and `created` fields
|
|
50
|
+
- Other fields are optional - only add if helpful
|
|
51
|
+
- Update `status` as work progresses
|
|
52
|
+
|
|
53
|
+
**Update status with:**
|
|
54
|
+
```bash
|
|
55
|
+
lspec update <spec> --status in-progress
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Workflow
|
|
59
|
+
|
|
60
|
+
1. **Check existing work** - Run `lspec board` or `lspec search`
|
|
61
|
+
2. **Create or update spec** - Add frontmatter with `status` and `created`
|
|
62
|
+
3. **Implement changes** - Keep spec in sync as you learn
|
|
63
|
+
4. **Update status** - Mark progress: `draft` → `in-progress` → `complete`
|
|
64
|
+
5. **Archive when done** - `lspec archive <spec>` moves to archive
|
|
65
|
+
|
|
66
|
+
## Quality Standards
|
|
67
|
+
|
|
68
|
+
- Code is clear and maintainable
|
|
69
|
+
- Tests cover critical paths
|
|
70
|
+
- No unnecessary complexity
|
|
71
|
+
- Documentation where needed (not everywhere)
|
|
72
|
+
- Specs stay in sync with implementation
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
**Remember**: LeanSpec is a mindset. Adapt these guidelines to what actually helps.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: planned
|
|
3
|
+
created: {date}
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# {name}
|
|
7
|
+
|
|
8
|
+
> **Status**: 📅 Planned · **Created**: {date}
|
|
9
|
+
|
|
10
|
+
## Goal
|
|
11
|
+
|
|
12
|
+
<!-- What problem does this solve? Why now? -->
|
|
13
|
+
|
|
14
|
+
## Key Points
|
|
15
|
+
|
|
16
|
+
-
|
|
17
|
+
-
|
|
18
|
+
|
|
19
|
+
## Non-Goals
|
|
20
|
+
|
|
21
|
+
-
|
|
22
|
+
|
|
23
|
+
## Notes
|
|
24
|
+
|
|
25
|
+
<!-- Decisions, constraints, open questions -->
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Standard Template
|
|
2
|
+
|
|
3
|
+
Recommended for most projects. Includes AI agent instructions and sensible defaults.
|
|
4
|
+
|
|
5
|
+
## What's Included
|
|
6
|
+
|
|
7
|
+
- **AGENTS.md** - Instructions for AI coding assistants
|
|
8
|
+
- Spec folder structure
|
|
9
|
+
- Opinionated defaults for fast iteration
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
|
|
13
|
+
- Solo developers or small teams
|
|
14
|
+
- Want AI agent integration
|
|
15
|
+
- Need clear but not heavy-weight process
|
|
16
|
+
|
|
17
|
+
## Philosophy
|
|
18
|
+
|
|
19
|
+
Keep it lean. Write specs for features that need clarity. Skip them for obvious changes.
|
|
20
|
+
|
|
21
|
+
## Next Steps
|
|
22
|
+
|
|
23
|
+
1. Customize AGENTS.md for your project
|
|
24
|
+
2. Create your first spec: `lspec create my-feature`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Standard",
|
|
3
|
+
"description": "Recommended for most projects - solo devs and small teams",
|
|
4
|
+
"config": {
|
|
5
|
+
"template": "standard",
|
|
6
|
+
"specsDir": "specs",
|
|
7
|
+
"structure": {
|
|
8
|
+
"pattern": "{date}/{seq}-{name}/",
|
|
9
|
+
"dateFormat": "YYYYMMDD",
|
|
10
|
+
"sequenceDigits": 3,
|
|
11
|
+
"defaultFile": "README.md"
|
|
12
|
+
},
|
|
13
|
+
"features": {
|
|
14
|
+
"aiAgents": true
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# AI Agent Instructions
|
|
2
|
+
|
|
3
|
+
## Project: {project_name}
|
|
4
|
+
|
|
5
|
+
Lightweight spec methodology for AI-powered development.
|
|
6
|
+
|
|
7
|
+
## Core Rules
|
|
8
|
+
|
|
9
|
+
1. **Read README.md first** - Understand project context
|
|
10
|
+
2. **Check specs/** - Review existing specs before starting
|
|
11
|
+
3. **Follow LeanSpec principles** - Clarity over documentation
|
|
12
|
+
4. **Keep it minimal** - If it doesn't add clarity, cut it
|
|
13
|
+
|
|
14
|
+
## When to Use Specs
|
|
15
|
+
|
|
16
|
+
- Features that affect multiple parts of the system
|
|
17
|
+
- Breaking changes or significant refactors
|
|
18
|
+
- Design decisions that need team alignment
|
|
19
|
+
- Complex features that benefit from upfront thinking
|
|
20
|
+
|
|
21
|
+
Skip specs for:
|
|
22
|
+
- Bug fixes
|
|
23
|
+
- Trivial changes
|
|
24
|
+
- Self-explanatory refactors
|
|
25
|
+
|
|
26
|
+
## Discovery Commands
|
|
27
|
+
|
|
28
|
+
Before starting work, understand project context:
|
|
29
|
+
|
|
30
|
+
- `lspec stats` - See work distribution across specs
|
|
31
|
+
- `lspec board` - View specs organized by status
|
|
32
|
+
- `lspec list --tag=<tag>` - Find specs by tag (e.g., `--tag=api`)
|
|
33
|
+
- `lspec search "<query>"` - Full-text search across specs
|
|
34
|
+
- `lspec deps <spec>` - Check dependencies before starting work
|
|
35
|
+
|
|
36
|
+
These commands help you understand what exists, what's in progress, and what depends on what.
|
|
37
|
+
|
|
38
|
+
## Spec Frontmatter
|
|
39
|
+
|
|
40
|
+
When creating or updating specs, include YAML frontmatter at the top:
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
---
|
|
44
|
+
status: draft|planned|in-progress|complete|blocked|cancelled
|
|
45
|
+
created: YYYY-MM-DD
|
|
46
|
+
tags: [tag1, tag2] # helps with discovery
|
|
47
|
+
priority: low|medium|high # helps with planning
|
|
48
|
+
assignee: username # for team coordination
|
|
49
|
+
---
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Core fields:**
|
|
53
|
+
- `status` and `created` are required
|
|
54
|
+
- `tags` help with discovery and organization
|
|
55
|
+
- `priority` helps teams plan work
|
|
56
|
+
- `assignee` shows who's working on what
|
|
57
|
+
|
|
58
|
+
**Update status with:**
|
|
59
|
+
```bash
|
|
60
|
+
lspec update <spec> --status in-progress --assignee yourname
|
|
61
|
+
# or edit frontmatter directly
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Workflow
|
|
65
|
+
|
|
66
|
+
1. **Discover context** - Run `lspec stats` or `lspec board` to see current state
|
|
67
|
+
2. **Search existing specs** - Use `lspec search` or `lspec list` to find relevant work
|
|
68
|
+
3. **Check dependencies** - Run `lspec deps <spec>` if working on existing spec
|
|
69
|
+
4. **Create or update spec** - Add frontmatter with required fields and helpful metadata
|
|
70
|
+
5. **Implement changes** - Keep spec in sync as you learn
|
|
71
|
+
6. **Update status** - Mark progress: `draft` → `in-progress` → `complete`
|
|
72
|
+
7. **Archive when done** - `lspec archive <spec>` moves to archive
|
|
73
|
+
|
|
74
|
+
## Quality Standards
|
|
75
|
+
|
|
76
|
+
- Code is clear and maintainable
|
|
77
|
+
- Tests cover critical paths
|
|
78
|
+
- No unnecessary complexity
|
|
79
|
+
- Documentation where needed (not everywhere)
|
|
80
|
+
- Specs stay in sync with implementation
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
**Remember**: LeanSpec is a mindset. Adapt these guidelines to what actually helps.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: planned
|
|
3
|
+
created: {date}
|
|
4
|
+
tags: []
|
|
5
|
+
priority: medium
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# {name}
|
|
9
|
+
|
|
10
|
+
> **Status**: 📅 Planned · **Priority**: Medium · **Created**: {date}
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
<!-- What are we solving? Why now? -->
|
|
15
|
+
|
|
16
|
+
## Design
|
|
17
|
+
|
|
18
|
+
<!-- Technical approach, architecture decisions -->
|
|
19
|
+
|
|
20
|
+
## Plan
|
|
21
|
+
|
|
22
|
+
- [ ] Task 1
|
|
23
|
+
- [ ] Task 2
|
|
24
|
+
- [ ] Task 3
|
|
25
|
+
|
|
26
|
+
## Test
|
|
27
|
+
|
|
28
|
+
<!-- How will we verify this works? -->
|
|
29
|
+
|
|
30
|
+
- [ ] Test criteria 1
|
|
31
|
+
- [ ] Test criteria 2
|
|
32
|
+
|
|
33
|
+
## Notes
|
|
34
|
+
|
|
35
|
+
<!-- Optional: Research findings, alternatives considered, open questions -->
|