Skip to content

Commit d765611

Browse files
author
Marvin Zhang
committed
refactor(config): update spec template structure and improve frontmatter guidelines
1 parent 66cb711 commit d765611

File tree

3 files changed

+40
-93
lines changed

3 files changed

+40
-93
lines changed

.lspec/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"template": "spec-template.md",
33
"specsDir": "specs",
44
"structure": {
5-
"pattern": "{date}/{seq}-{name}/",
5+
"pattern": "flat",
6+
"prefix": "",
67
"dateFormat": "YYYYMMDD",
78
"sequenceDigits": 3,
89
"defaultFile": "README.md"

.lspec/templates/spec-template.md

Lines changed: 19 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,42 @@
11
---
22
status: planned
3-
created: { date }
3+
created: '{date}'
44
tags: []
55
priority: medium
66
---
77

88
# {name}
99

10-
**Status**: 📅 Planned
11-
**Created**: {date}
12-
**Spec**: `{spec_path}`
13-
**Priority**: Medium
14-
15-
---
10+
> **Status**: {status} · **Priority**: {priority} · **Created**: {date}
1611
1712
## Overview
1813

19-
<!-- What problem are we solving? Why is this important now? -->
20-
21-
<!-- Example:
22-
Brief description of the feature/fix/improvement and its value. Keep it concise - 2-3 paragraphs max.
23-
-->
24-
25-
## Problem Statement / Current State
26-
27-
<!-- What's not working? What gaps exist? What are the pain points? -->
28-
29-
<!-- Example:
30-
- ❌ Issue 1: Description
31-
- ❌ Issue 2: Description
32-
- ❌ Issue 3: Description
33-
34-
Optionally include metrics, user feedback, or concrete examples.
35-
-->
36-
37-
## Objectives
38-
39-
<!-- What are the key goals? What success looks like? -->
40-
41-
1. **Objective 1** - What we'll achieve
42-
2. **Objective 2** - What we'll achieve
43-
3. **Objective 3** - What we'll achieve
14+
<!-- What are we solving? Why now? -->
4415

4516
## Design
4617

47-
<!-- Technical approach and architecture decisions -->
48-
49-
<!-- Example:
50-
For simple specs, describe directly here.
51-
For complex specs, reference separate design.md:
52-
See **[design.md](./design.md)** for complete technical design.
53-
-->
54-
55-
## Implementation Plan
56-
57-
<!-- Phased approach or task breakdown -->
58-
59-
<!-- Example:
60-
For simple specs, list tasks directly here:
61-
- [ ] Task 1
62-
- [ ] Task 2
63-
- [ ] Task 3
64-
65-
For complex specs, reference separate implementation.md:
66-
See **[implementation.md](./implementation.md)** for detailed task breakdown.
67-
-->
68-
69-
## Success Criteria
18+
<!-- Technical approach, architecture decisions -->
7019

71-
<!-- How will we know this is done? What metrics validate success? -->
20+
## Plan
7221

73-
- [ ] Criterion 1
74-
- [ ] Criterion 2
75-
- [ ] Criterion 3
22+
<!-- Break down implementation into steps -->
7623

77-
## Timeline
24+
<!-- 💡 TIP: If your plan has >6 phases or this spec approaches
25+
400 lines, consider using sub-spec files:
26+
- IMPLEMENTATION.md for detailed implementation
27+
- See spec 012-sub-spec-files for guidance on splitting -->
7828

79-
<!-- Optional: Estimated effort, phases, deadlines -->
29+
- [ ] Task 1
30+
- [ ] Task 2
31+
- [ ] Task 3
8032

81-
**Estimated Effort**: [hours/days/weeks]
33+
## Test
8234

83-
<!-- Example for phased work:
84-
- Phase 1: Description (Week 1)
85-
- Phase 2: Description (Week 2)
86-
-->
35+
<!-- How will we verify this works? -->
8736

88-
## References
37+
- [ ] Test criteria 1
38+
- [ ] Test criteria 2
8939

90-
<!-- Optional: Related specs, docs, external resources -->
40+
## Notes
9141

92-
- [Related Spec](../path/to/spec)
93-
- [Documentation](../../../docs/something.md)
42+
<!-- Optional: Research findings, alternatives considered, open questions -->

AGENTS.md

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
**Create specs for:**
5454

5555
- Features requiring design/planning (>2 days work)
56+
- Features that affect multiple parts of the system
5657
- Architectural decisions affecting multiple components
5758
- Breaking changes or significant refactors
5859
- Design decisions needing team alignment
@@ -101,42 +102,42 @@ lspec search "<query>"
101102
lspec deps <spec>
102103
```
103104

105+
These commands help you understand what exists, what's in progress, and what depends on what.
106+
104107
### Spec Frontmatter
105108

106109
Include YAML frontmatter at the top of spec markdown files:
107110

108111
```yaml
109112
---
110-
status: draft|planned|in-progress|complete|blocked|cancelled
113+
status: planned|in-progress|complete
111114
created: YYYY-MM-DD
112-
tags: [tag1, tag2]
113-
priority: low|medium|high
114-
assignee: username
115+
tags: [tag1, tag2] # helps with discovery
116+
priority: low|medium|high # helps with planning
117+
assignee: username # for team coordination
115118
---
116119
```
117120

118121
**Required fields**: `status`, `created`
119122
**Helpful fields**: `tags` (discovery), `priority` (planning), `assignee` (coordination)
120123

121-
### Workflow
122-
123-
1. **Discover** - `lspec stats` or `lspec board` to see current state
124-
2. **Search** - `lspec search` or `lspec list` to find relevant work
125-
3. **Check dependencies** - `lspec deps <spec>` if working on existing spec
126-
4. **Create/update spec** - Add frontmatter with required fields
127-
5. **Implement** - Keep spec in sync as you learn
128-
6. **Update status** - Mark progress: `draft``in-progress``complete`
129-
7. **Archive** - `lspec archive <spec>` when done
130-
131-
### Update Commands
124+
**Update status with:**
132125

133126
```bash
134-
# Update spec status
135127
lspec update <spec> --status in-progress --assignee yourname
136-
137-
# Or edit frontmatter directly in the markdown file
128+
# or edit frontmatter directly
138129
```
139130

131+
### Workflow
132+
133+
1. **Discover context** - Run `lspec stats` or `lspec board` to see current state
134+
2. **Search existing specs** - Use `lspec search` or `lspec list` to find relevant work
135+
3. **Check dependencies** - Run `lspec deps <spec>` if working on existing spec
136+
4. **Create or update spec** - Add frontmatter with required fields and helpful metadata
137+
5. **Implement changes** - Keep spec in sync as you learn
138+
6. **Update status** - Mark progress: `draft``in-progress``complete`
139+
7. **Archive when done** - `lspec archive <spec>` moves to archive
140+
140141
### Spec Content (Recommended Structure)
141142

142143
Not mandatory, but helpful:
@@ -153,7 +154,3 @@ Not mandatory, but helpful:
153154
- No unnecessary complexity
154155
- Documentation where needed (not everywhere)
155156
- Specs stay in sync with implementation
156-
157-
---
158-
159-
**Remember**: LeanSpec is a mindset. Adapt these guidelines to what actually helps.

0 commit comments

Comments
 (0)