You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Goal**: Use template engine to generate AGENTS.md from shared components, eliminate duplication, prevent drift.
56
57
57
-
**Related Issue**: `.lean-spec/templates/` system also needs redesign - currently only generates main spec file, should support optional sub-specs (DESIGN.md, TESTING.md, etc.).
58
+
**Scope**: This spec covers Phase 1 only (AGENTS.md template engine). Phase 2 (sub-spec template system) was split into spec 078.
58
59
59
60
**Related Specs**:
60
61
-`012-sub-spec-files` (archived) - Original sub-spec design (implemented)
61
62
-`013-custom-spec-templates` (archived) - Template system v1
62
63
-`025-template-config-updates` - Config format updates
63
64
-`072-ai-agent-first-use-workflow` - Current AGENTS.md improvement driving this
64
65
-`074-content-at-creation` - Spec creation with content flags (similar AI-first approach)
66
+
-`078-sub-spec-template-system` - Phase 2 split into separate spec (sub-spec generation)
65
67
66
68
## Design
67
69
@@ -149,87 +151,15 @@ npm run build:agents-templates
149
151
- ✅ Prevents drift automatically
150
152
- ✅ Can version control both source and generated files
151
153
152
-
#### Part 2: Redesign `.lean-spec/templates/` System (Future)
153
-
154
-
**Current Problem**: Templates only generate main spec file (README.md), but specs often need sub-files.
155
-
156
-
**Proposed Design**:
157
-
```
158
-
.lean-spec/
159
-
└── templates/
160
-
├── default/
161
-
│ ├── README.md # Main spec template (required)
162
-
│ ├── DESIGN.md.opt # Optional sub-spec
163
-
│ └── TESTING.md.opt # Optional sub-spec
164
-
└── api/
165
-
├── README.md
166
-
├── API.md.opt
167
-
└── SCHEMAS.md.opt
168
-
```
169
-
170
-
**Convention**:
171
-
-`{name}.md` - Always generated
172
-
-`{name}.md.opt` - Generate only if requested (flag or prompt)
- Add `--with-subs` interactive prompt - opt-in for human users
231
-
- Support `.opt` and `.req` file conventions
232
-
- Update config schema for template metadata and flag mappings
162
+
**Note**: Originally this spec included Phase 2 (Sub-Spec Template System) for generating optional sub-spec files. That has been split into spec 078 for clearer separation of concerns
-**Consistency**: No drift between templates (verified by tests) ✅ **Achieved** (CI validation in place)
438
302
-**Flexibility**: Easy to create new templates with different combinations ✅ **Achieved**
439
-
-**Adoption**: Sub-spec templates used in 20%+ of new specs within 2 months (Phase 2)
440
303
441
-
## Phase 1 Completion Summary
304
+
## Completion Summary
442
305
443
-
**Status**: Phase 1 Complete ✅
306
+
**Status**: Complete ✅
444
307
445
308
**Completed Work**:
446
309
1. ✅ Template infrastructure created with component-based architecture
@@ -457,4 +320,4 @@ See Overview section for full list of related specs.
457
320
- Easy maintenance: update once, propagates to all templates
458
321
- CI ensures quality and consistency
459
322
460
-
**Next Steps**: Phase 2 - Sub-Spec Template System (separate implementation)
323
+
**Note**: Originally planned Phase 2 (Sub-Spec Template System) has been split into spec 078-sub-spec-template-system for clearer separation of concerns
0 commit comments