lean-spec 0.2.1 → 0.2.3
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/dist/{chunk-ER23B6KS.js → chunk-WCNEWMW3.js} +4315 -1531
- package/dist/chunk-WCNEWMW3.js.map +1 -0
- package/dist/cli.js +67 -204
- package/dist/cli.js.map +1 -1
- package/dist/mcp-server.d.ts +1 -1
- package/dist/mcp-server.js +1 -1
- package/package.json +7 -5
- package/templates/_shared/agents-components/core-rules-base-additions.md +4 -0
- package/templates/_shared/agents-components/core-rules-enterprise-additions.md +4 -0
- package/templates/_shared/agents-components/core-rules-shared.md +1 -0
- package/templates/_shared/agents-components/discovery-commands-enterprise-additions.md +6 -0
- package/templates/_shared/agents-components/discovery-commands-minimal-additions.md +0 -0
- package/templates/_shared/agents-components/discovery-commands-shared.md +8 -0
- package/templates/_shared/agents-components/discovery-commands-standard-additions.md +3 -0
- package/templates/_shared/agents-components/enterprise-approval.md +10 -0
- package/templates/_shared/agents-components/enterprise-compliance.md +12 -0
- package/templates/_shared/agents-components/enterprise-when-required.md +13 -0
- package/templates/_shared/agents-components/essential-commands-enterprise-additions.md +29 -0
- package/templates/_shared/agents-components/essential-commands-minimal-additions.md +1 -0
- package/templates/_shared/agents-components/essential-commands-shared.md +15 -0
- package/templates/_shared/agents-components/essential-commands-standard-additions.md +18 -0
- package/templates/_shared/agents-components/frontmatter-enterprise.md +33 -0
- package/templates/_shared/agents-components/frontmatter-minimal.md +18 -0
- package/templates/_shared/agents-components/frontmatter-standard.md +23 -0
- package/templates/_shared/agents-components/quality-standards-enterprise-additions.md +4 -0
- package/templates/_shared/agents-components/quality-standards-minimal-additions.md +3 -0
- package/templates/_shared/agents-components/quality-standards-shared.md +6 -0
- package/templates/_shared/agents-components/status-update-triggers.md +14 -0
- package/templates/_shared/agents-components/when-to-use-enterprise.md +11 -0
- package/templates/_shared/agents-components/when-to-use-minimal.md +9 -0
- package/templates/_shared/agents-components/when-to-use-standard.md +9 -0
- package/templates/_shared/agents-components/workflow-enterprise.md +11 -0
- package/templates/_shared/agents-components/workflow-standard-detailed.md +10 -0
- package/templates/_shared/agents-components/workflow-standard.md +8 -0
- package/templates/_shared/agents-template.hbs +43 -0
- package/templates/enterprise/agents-config.json +16 -0
- package/templates/enterprise/files/AGENTS.md +80 -9
- package/templates/minimal/agents-config.json +13 -0
- package/templates/minimal/files/AGENTS.md +45 -5
- package/templates/standard/agents-config.json +13 -0
- package/templates/standard/files/AGENTS.md +67 -9
- package/dist/chunk-ER23B6KS.js.map +0 -1
- package/dist/commands-ZNL7ZCHU.js +0 -4
- package/dist/commands-ZNL7ZCHU.js.map +0 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
**Viewing specs (additional):**
|
|
2
|
+
- `lean-spec view <spec> --raw` - Get raw markdown
|
|
3
|
+
- `lean-spec files <spec>` - List all files in a spec
|
|
4
|
+
|
|
5
|
+
**Project Overview:**
|
|
6
|
+
- `lean-spec board` - Kanban view with project health summary
|
|
7
|
+
- `lean-spec stats` - Quick project metrics
|
|
8
|
+
|
|
9
|
+
**Working with specs (additional):**
|
|
10
|
+
- `lean-spec update <spec> --priority <priority>` - Update spec priority
|
|
11
|
+
- `lean-spec update <spec> --tags <tag1,tag2>` - Update spec tags
|
|
12
|
+
- `lean-spec deps <spec>` - Show dependencies and relationships
|
|
13
|
+
|
|
14
|
+
**Token Management:**
|
|
15
|
+
- `lean-spec tokens <spec>` - Count tokens in a spec
|
|
16
|
+
- `lean-spec tokens` - Show token counts for all specs
|
|
17
|
+
|
|
18
|
+
**When in doubt (extended):** Run `lean-spec <command> --help` to discover available commands.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
When creating or updating specs, include YAML frontmatter with all relevant fields:
|
|
2
|
+
|
|
3
|
+
```yaml
|
|
4
|
+
---
|
|
5
|
+
status: draft|planned|in-progress|complete|blocked|cancelled
|
|
6
|
+
created: YYYY-MM-DD
|
|
7
|
+
tags: [security, api, compliance] # for discovery
|
|
8
|
+
priority: low|medium|high|critical
|
|
9
|
+
assignee: username
|
|
10
|
+
reviewer: reviewer-username # required for review
|
|
11
|
+
issue: JIRA-123 # link to issue tracker
|
|
12
|
+
epic: EPIC-456 # link to epic
|
|
13
|
+
compliance: [SOC2, GDPR, HIPAA] # applicable standards
|
|
14
|
+
depends_on:
|
|
15
|
+
- path/to/other/spec
|
|
16
|
+
---
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Required fields:**
|
|
20
|
+
- `status`, `created` - basic tracking
|
|
21
|
+
- `tags`, `priority` - planning and discovery
|
|
22
|
+
- `assignee`, `reviewer` - accountability
|
|
23
|
+
- `compliance` - regulatory requirements (if applicable)
|
|
24
|
+
|
|
25
|
+
**Integration fields:**
|
|
26
|
+
- `issue`, `epic` - link to external systems
|
|
27
|
+
- `depends_on` - explicit dependencies
|
|
28
|
+
|
|
29
|
+
**Update with:**
|
|
30
|
+
```bash
|
|
31
|
+
lean-spec update <spec> --status in-progress --assignee yourname
|
|
32
|
+
# or edit frontmatter directly
|
|
33
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
When creating or updating specs, add YAML frontmatter at the top:
|
|
2
|
+
|
|
3
|
+
```yaml
|
|
4
|
+
---
|
|
5
|
+
status: draft|planned|in-progress|complete|blocked|cancelled
|
|
6
|
+
created: YYYY-MM-DD
|
|
7
|
+
---
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
**Keep it simple:**
|
|
11
|
+
- Just `status` and `created` fields
|
|
12
|
+
- Other fields are optional - only add if helpful
|
|
13
|
+
- Update `status` as work progresses
|
|
14
|
+
|
|
15
|
+
**Update status with:**
|
|
16
|
+
```bash
|
|
17
|
+
lean-spec update <spec> --status in-progress
|
|
18
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
When creating or updating specs, include YAML frontmatter at the top:
|
|
2
|
+
|
|
3
|
+
```yaml
|
|
4
|
+
---
|
|
5
|
+
status: draft|planned|in-progress|complete|blocked|cancelled
|
|
6
|
+
created: YYYY-MM-DD
|
|
7
|
+
tags: [tag1, tag2] # helps with discovery
|
|
8
|
+
priority: low|medium|high # helps with planning
|
|
9
|
+
assignee: username # for team coordination
|
|
10
|
+
---
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
**Core fields:**
|
|
14
|
+
- `status` and `created` are required
|
|
15
|
+
- `tags` help with discovery and organization
|
|
16
|
+
- `priority` helps teams plan work
|
|
17
|
+
- `assignee` shows who's working on what
|
|
18
|
+
|
|
19
|
+
**Update status with:**
|
|
20
|
+
```bash
|
|
21
|
+
lean-spec update <spec> --status in-progress --assignee yourname
|
|
22
|
+
# or edit frontmatter directly
|
|
23
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
**CRITICAL - What "Work" Means:**
|
|
2
|
+
- ❌ **NOT**: Creating/writing the spec document itself
|
|
3
|
+
- ✅ **YES**: Implementing what the spec describes (code, docs, features, etc.)
|
|
4
|
+
- **Example**: Creating a spec for "API redesign" ≠ work complete
|
|
5
|
+
- Work = Actually redesigning the API as described in the spec
|
|
6
|
+
- Status `planned` until someone starts the redesign
|
|
7
|
+
- Status `in-progress` while redesigning
|
|
8
|
+
- Status `complete` after redesign is done
|
|
9
|
+
|
|
10
|
+
**Status Update Triggers:**
|
|
11
|
+
- ✅ **Before starting implementation** → `lean-spec update <spec> --status in-progress`
|
|
12
|
+
- ✅ **After completing implementation** → `lean-spec update <spec> --status complete`
|
|
13
|
+
- ✅ **If blocked or paused** → Update status and document why in spec
|
|
14
|
+
- ❌ **NEVER mark spec complete just because you finished writing it**
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Required for:
|
|
2
|
+
- Features touching PII or sensitive data
|
|
3
|
+
- Changes to authentication/authorization
|
|
4
|
+
- New external integrations
|
|
5
|
+
- Breaking changes to APIs
|
|
6
|
+
- Infrastructure changes
|
|
7
|
+
|
|
8
|
+
Optional for:
|
|
9
|
+
- Internal refactors
|
|
10
|
+
- Bug fixes (unless security-related)
|
|
11
|
+
- Minor UI changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
- Features that affect multiple parts of the system
|
|
2
|
+
- Breaking changes or significant refactors
|
|
3
|
+
- Design decisions that need thinking through
|
|
4
|
+
- Complex features that benefit from upfront planning
|
|
5
|
+
|
|
6
|
+
Skip specs for:
|
|
7
|
+
- Bug fixes
|
|
8
|
+
- Trivial changes
|
|
9
|
+
- Self-explanatory refactors
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
- Features that affect multiple parts of the system
|
|
2
|
+
- Breaking changes or significant refactors
|
|
3
|
+
- Design decisions that need team alignment
|
|
4
|
+
- Complex features that benefit from upfront thinking
|
|
5
|
+
|
|
6
|
+
Skip specs for:
|
|
7
|
+
- Bug fixes
|
|
8
|
+
- Trivial changes
|
|
9
|
+
- Self-explanatory refactors
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
1. **Discover context** - Run `lean-spec stats`, `lean-spec board`, or `lean-spec gantt`
|
|
2
|
+
2. **Search existing specs** - Use `lean-spec search` or `lean-spec list --tag=<relevant>`
|
|
3
|
+
3. **Check dependencies** - Run `lean-spec deps <spec>` to understand dependencies
|
|
4
|
+
4. **Create or update spec** - Add complete frontmatter with compliance tags (status: `planned`)
|
|
5
|
+
5. **Get reviews** - Assign reviewer, tag for security review if needed
|
|
6
|
+
6. **Start implementation** - Mark `in-progress` BEFORE implementing what the spec describes
|
|
7
|
+
7. **Implement changes** - Keep spec in sync, update status appropriately
|
|
8
|
+
8. **Complete implementation** - Mark `complete` AFTER implementing what the spec describes
|
|
9
|
+
9. **Archive when done** - `lean-spec archive <spec>` after completion
|
|
10
|
+
|
|
11
|
+
**Remember**: Status tracks implementation work, not spec document creation. Creating a spec = planning (stays `planned` until implementation starts).
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
1. **Discover context** - Run `lean-spec stats` or `lean-spec board` to see current state
|
|
2
|
+
2. **Search existing specs** - Use `lean-spec search` or `lean-spec list` to find relevant work
|
|
3
|
+
3. **Check dependencies** - Run `lean-spec deps <spec>` if working on existing spec
|
|
4
|
+
4. **Create or update spec** - Add frontmatter with required fields (status: `planned`)
|
|
5
|
+
5. **Start implementation** - Mark `in-progress` BEFORE implementing what the spec describes
|
|
6
|
+
6. **Implement changes** - Keep spec in sync as you learn
|
|
7
|
+
7. **Complete implementation** - Mark `complete` AFTER implementing what the spec describes
|
|
8
|
+
8. **Archive when done** - `lean-spec archive <spec>` moves to archive
|
|
9
|
+
|
|
10
|
+
**Remember**: Status tracks implementation work, not spec document creation. Creating a spec = planning (stays `planned` until implementation starts).
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
1. **Check existing work** - Run `lean-spec board` or `lean-spec search`
|
|
2
|
+
2. **Create or update spec** - Add frontmatter with `status` and `created` (status: `planned`)
|
|
3
|
+
3. **Start implementation** - Mark `in-progress` BEFORE implementing what the spec describes
|
|
4
|
+
4. **Implement changes** - Keep spec in sync as you learn
|
|
5
|
+
5. **Complete implementation** - Mark `complete` AFTER implementing what the spec describes
|
|
6
|
+
6. **Archive when done** - `lean-spec archive <spec>` moves to archive
|
|
7
|
+
|
|
8
|
+
**Remember**: Status tracks implementation work, not spec document creation. Creating a spec = planning (stays `planned` until implementation starts).
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# AI Agent Instructions
|
|
2
|
+
|
|
3
|
+
## Project: {{{project_name}}}
|
|
4
|
+
|
|
5
|
+
{{{description}}}
|
|
6
|
+
|
|
7
|
+
## Core Rules
|
|
8
|
+
|
|
9
|
+
{{{coreRules}}}
|
|
10
|
+
{{#if whenToUseEarly}}
|
|
11
|
+
|
|
12
|
+
## When to Use Specs
|
|
13
|
+
|
|
14
|
+
{{{whenToUse}}}
|
|
15
|
+
{{/if}}
|
|
16
|
+
|
|
17
|
+
## Discovery Commands
|
|
18
|
+
|
|
19
|
+
{{{discoveryCommands}}}
|
|
20
|
+
{{#if essentialCommands}}
|
|
21
|
+
|
|
22
|
+
{{{essentialCommands}}}
|
|
23
|
+
{{/if}}
|
|
24
|
+
|
|
25
|
+
## Spec Frontmatter
|
|
26
|
+
|
|
27
|
+
{{{frontmatter}}}
|
|
28
|
+
{{#each additionalSections}}
|
|
29
|
+
|
|
30
|
+
{{{this}}}
|
|
31
|
+
{{/each}}
|
|
32
|
+
|
|
33
|
+
## Workflow
|
|
34
|
+
|
|
35
|
+
{{{workflow}}}
|
|
36
|
+
|
|
37
|
+
## Quality Standards
|
|
38
|
+
|
|
39
|
+
{{{qualityStandards}}}
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
{{{closingNote}}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Enterprise-grade development with security and compliance requirements.",
|
|
3
|
+
"coreRules": ["core-rules-enterprise-additions.md", "core-rules-shared.md"],
|
|
4
|
+
"whenToUseEarly": false,
|
|
5
|
+
"discoveryCommands": ["discovery-commands-shared.md", "discovery-commands-enterprise-additions.md"],
|
|
6
|
+
"essentialCommands": ["essential-commands-shared.md", "essential-commands-enterprise-additions.md"],
|
|
7
|
+
"frontmatter": "frontmatter-enterprise.md",
|
|
8
|
+
"workflow": ["workflow-enterprise.md", "status-update-triggers.md"],
|
|
9
|
+
"qualityStandards": ["quality-standards-enterprise-additions.md", "quality-standards-shared.md"],
|
|
10
|
+
"closingNote": "**Remember**: Enterprise doesn't mean heavy. Keep specs lean while meeting governance needs.",
|
|
11
|
+
"additionalSections": [
|
|
12
|
+
"enterprise-compliance.md",
|
|
13
|
+
"enterprise-when-required.md",
|
|
14
|
+
"enterprise-approval.md"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -10,19 +10,69 @@ Enterprise-grade development with security and compliance requirements.
|
|
|
10
10
|
2. **Read specs/** - Check for compliance requirements
|
|
11
11
|
3. **Follow LeanSpec** - Lean doesn't mean skipping governance
|
|
12
12
|
4. **Document decisions** - Especially security and compliance choices
|
|
13
|
+
5. **Never use nested code blocks** - Markdown doesn't support code blocks within code blocks. Use indentation or describe the structure instead
|
|
13
14
|
|
|
14
15
|
## Discovery Commands
|
|
15
16
|
|
|
16
|
-
Before starting work, understand project context
|
|
17
|
+
Before starting work, understand project context:
|
|
17
18
|
|
|
18
|
-
- `lean-spec stats` - See work distribution
|
|
19
|
-
- `lean-spec board` - View specs
|
|
19
|
+
- `lean-spec stats` - See work distribution
|
|
20
|
+
- `lean-spec board` - View specs by status
|
|
21
|
+
- `lean-spec search "<query>"` - Find relevant work
|
|
22
|
+
- `lean-spec list` - List all specs
|
|
23
|
+
|
|
24
|
+
These help you understand what exists and what's in progress.
|
|
25
|
+
**Additional commands:**
|
|
20
26
|
- `lean-spec list --tag=<tag>` - Find specs by tag (e.g., `--tag=security`)
|
|
21
|
-
- `lean-spec search "<query>"` - Full-text search across specs
|
|
22
27
|
- `lean-spec deps <spec>` - Check dependencies before starting work
|
|
23
28
|
- `lean-spec gantt` - View project timeline and milestones
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
**Note:** For enterprise, also consider dependencies and project timelines when planning work.
|
|
31
|
+
|
|
32
|
+
## Essential Commands
|
|
33
|
+
|
|
34
|
+
**Discovery:**
|
|
35
|
+
- `lean-spec list` - See all specs
|
|
36
|
+
- `lean-spec search "<query>"` - Find relevant specs
|
|
37
|
+
|
|
38
|
+
**Viewing specs:**
|
|
39
|
+
- `lean-spec view <spec>` - View a spec (formatted)
|
|
40
|
+
- `lean-spec open <spec>` - Open spec in editor
|
|
41
|
+
|
|
42
|
+
**Working with specs:**
|
|
43
|
+
- `lean-spec create <name>` - Create a new spec
|
|
44
|
+
- `lean-spec update <spec> --status <status>` - Update spec status
|
|
45
|
+
|
|
46
|
+
**When in doubt:** Run `lean-spec --help` to see all available commands.
|
|
47
|
+
**Viewing specs (additional):**
|
|
48
|
+
- `lean-spec view <spec>/DESIGN.md` - View sub-spec file (DESIGN.md, TESTING.md, etc.)
|
|
49
|
+
- `lean-spec view <spec> --raw` - Get raw markdown (for parsing)
|
|
50
|
+
- `lean-spec view <spec> --json` - Get structured JSON
|
|
51
|
+
- `lean-spec files <spec>` - List all files in a spec (including sub-specs)
|
|
52
|
+
|
|
53
|
+
**Project Overview:**
|
|
54
|
+
- `lean-spec board` - Kanban view with project health summary
|
|
55
|
+
- `lean-spec stats` - Quick project metrics and insights
|
|
56
|
+
- `lean-spec stats --full` - Detailed analytics (all sections)
|
|
57
|
+
|
|
58
|
+
**Working with specs (additional):**
|
|
59
|
+
- `lean-spec update <spec> --status <status>` - Update spec status (REQUIRED - never edit frontmatter manually)
|
|
60
|
+
- `lean-spec update <spec> --priority <priority>` - Update spec priority (REQUIRED - never edit frontmatter manually)
|
|
61
|
+
- `lean-spec update <spec> --tags <tag1,tag2>` - Update spec tags (REQUIRED - never edit frontmatter manually)
|
|
62
|
+
- `lean-spec update <spec> --assignee <name>` - Update spec assignee (REQUIRED - never edit frontmatter manually)
|
|
63
|
+
- `lean-spec deps <spec>` - Show dependencies and relationships
|
|
64
|
+
|
|
65
|
+
**Token Management:**
|
|
66
|
+
- `lean-spec tokens <spec>` - Count tokens in a spec for LLM context management
|
|
67
|
+
- `lean-spec tokens` - Show token counts for all specs (sorted by token count)
|
|
68
|
+
- `lean-spec tokens <spec> --detailed` - Show content breakdown (prose vs code vs tables)
|
|
69
|
+
|
|
70
|
+
**Advanced Editing (AI Agent Orchestration):**
|
|
71
|
+
- `lean-spec analyze <spec>` - Analyze spec complexity and structure (returns JSON with --json flag)
|
|
72
|
+
- `lean-spec split <spec> --output FILE:LINES` - Split spec into multiple files by line ranges (spec 059)
|
|
73
|
+
- `lean-spec compact <spec> --remove LINES` - Remove specified line ranges from spec (spec 059)
|
|
74
|
+
|
|
75
|
+
**When in doubt (extended):** Run `lean-spec <command> --help` to discover available commands and options.
|
|
26
76
|
|
|
27
77
|
## Spec Frontmatter
|
|
28
78
|
|
|
@@ -103,11 +153,28 @@ Optional for:
|
|
|
103
153
|
1. **Discover context** - Run `lean-spec stats`, `lean-spec board`, or `lean-spec gantt`
|
|
104
154
|
2. **Search existing specs** - Use `lean-spec search` or `lean-spec list --tag=<relevant>`
|
|
105
155
|
3. **Check dependencies** - Run `lean-spec deps <spec>` to understand dependencies
|
|
106
|
-
4. **Create or update spec** - Add complete frontmatter with compliance tags
|
|
156
|
+
4. **Create or update spec** - Add complete frontmatter with compliance tags (status: `planned`)
|
|
107
157
|
5. **Get reviews** - Assign reviewer, tag for security review if needed
|
|
108
|
-
6. **
|
|
109
|
-
7. **
|
|
110
|
-
8. **
|
|
158
|
+
6. **Start implementation** - Mark `in-progress` BEFORE implementing what the spec describes
|
|
159
|
+
7. **Implement changes** - Keep spec in sync, update status appropriately
|
|
160
|
+
8. **Complete implementation** - Mark `complete` AFTER implementing what the spec describes
|
|
161
|
+
9. **Archive when done** - `lean-spec archive <spec>` after completion
|
|
162
|
+
|
|
163
|
+
**Remember**: Status tracks implementation work, not spec document creation. Creating a spec = planning (stays `planned` until implementation starts).
|
|
164
|
+
**CRITICAL - What "Work" Means:**
|
|
165
|
+
- ❌ **NOT**: Creating/writing the spec document itself
|
|
166
|
+
- ✅ **YES**: Implementing what the spec describes (code, docs, features, etc.)
|
|
167
|
+
- **Example**: Creating a spec for "API redesign" ≠ work complete
|
|
168
|
+
- Work = Actually redesigning the API as described in the spec
|
|
169
|
+
- Status `planned` until someone starts the redesign
|
|
170
|
+
- Status `in-progress` while redesigning
|
|
171
|
+
- Status `complete` after redesign is done
|
|
172
|
+
|
|
173
|
+
**Status Update Triggers:**
|
|
174
|
+
- ✅ **Before starting implementation** → `lean-spec update <spec> --status in-progress`
|
|
175
|
+
- ✅ **After completing implementation** → `lean-spec update <spec> --status complete`
|
|
176
|
+
- ✅ **If blocked or paused** → Update status and document why in spec
|
|
177
|
+
- ❌ **NEVER mark spec complete just because you finished writing it**
|
|
111
178
|
|
|
112
179
|
## Quality Standards
|
|
113
180
|
|
|
@@ -117,6 +184,10 @@ Optional for:
|
|
|
117
184
|
- Compliance checklist completed
|
|
118
185
|
- Code is clear and maintainable
|
|
119
186
|
- Specs stay in sync with implementation
|
|
187
|
+
- **Status tracking is mandatory:**
|
|
188
|
+
- Mark spec as `in-progress` BEFORE starting work
|
|
189
|
+
- Mark spec as `complete` IMMEDIATELY after finishing
|
|
190
|
+
- Never leave specs with stale status
|
|
120
191
|
|
|
121
192
|
---
|
|
122
193
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Lightweight spec methodology for AI-powered development.",
|
|
3
|
+
"coreRules": ["core-rules-base-additions.md", "core-rules-shared.md"],
|
|
4
|
+
"whenToUse": "when-to-use-minimal.md",
|
|
5
|
+
"whenToUseEarly": true,
|
|
6
|
+
"discoveryCommands": ["discovery-commands-shared.md", "discovery-commands-minimal-additions.md"],
|
|
7
|
+
"essentialCommands": ["essential-commands-shared.md", "essential-commands-minimal-additions.md"],
|
|
8
|
+
"frontmatter": "frontmatter-minimal.md",
|
|
9
|
+
"workflow": ["workflow-standard.md", "status-update-triggers.md"],
|
|
10
|
+
"qualityStandards": ["quality-standards-minimal-additions.md", "quality-standards-shared.md"],
|
|
11
|
+
"closingNote": "**Remember**: LeanSpec is a mindset. Adapt these guidelines to what actually helps.",
|
|
12
|
+
"additionalSections": []
|
|
13
|
+
}
|
|
@@ -10,6 +10,7 @@ Lightweight spec methodology for AI-powered development.
|
|
|
10
10
|
2. **Check specs/** - Review existing specs before starting
|
|
11
11
|
3. **Follow LeanSpec principles** - Clarity over documentation
|
|
12
12
|
4. **Keep it minimal** - If it doesn't add clarity, cut it
|
|
13
|
+
5. **Never use nested code blocks** - Markdown doesn't support code blocks within code blocks. Use indentation or describe the structure instead
|
|
13
14
|
|
|
14
15
|
## When to Use Specs
|
|
15
16
|
|
|
@@ -34,6 +35,24 @@ Before starting work, understand project context:
|
|
|
34
35
|
|
|
35
36
|
These help you understand what exists and what's in progress.
|
|
36
37
|
|
|
38
|
+
|
|
39
|
+
## Essential Commands
|
|
40
|
+
|
|
41
|
+
**Discovery:**
|
|
42
|
+
- `lean-spec list` - See all specs
|
|
43
|
+
- `lean-spec search "<query>"` - Find relevant specs
|
|
44
|
+
|
|
45
|
+
**Viewing specs:**
|
|
46
|
+
- `lean-spec view <spec>` - View a spec (formatted)
|
|
47
|
+
- `lean-spec open <spec>` - Open spec in editor
|
|
48
|
+
|
|
49
|
+
**Working with specs:**
|
|
50
|
+
- `lean-spec create <name>` - Create a new spec
|
|
51
|
+
- `lean-spec update <spec> --status <status>` - Update spec status
|
|
52
|
+
|
|
53
|
+
**When in doubt:** Run `lean-spec --help` to see all available commands.
|
|
54
|
+
|
|
55
|
+
|
|
37
56
|
## Spec Frontmatter
|
|
38
57
|
|
|
39
58
|
When creating or updating specs, add YAML frontmatter at the top:
|
|
@@ -58,18 +77,39 @@ lean-spec update <spec> --status in-progress
|
|
|
58
77
|
## Workflow
|
|
59
78
|
|
|
60
79
|
1. **Check existing work** - Run `lean-spec board` or `lean-spec search`
|
|
61
|
-
2. **Create or update spec** - Add frontmatter with `status` and `created`
|
|
62
|
-
3. **
|
|
63
|
-
4. **
|
|
64
|
-
5. **
|
|
80
|
+
2. **Create or update spec** - Add frontmatter with `status` and `created` (status: `planned`)
|
|
81
|
+
3. **Start implementation** - Mark `in-progress` BEFORE implementing what the spec describes
|
|
82
|
+
4. **Implement changes** - Keep spec in sync as you learn
|
|
83
|
+
5. **Complete implementation** - Mark `complete` AFTER implementing what the spec describes
|
|
84
|
+
6. **Archive when done** - `lean-spec archive <spec>` moves to archive
|
|
85
|
+
|
|
86
|
+
**Remember**: Status tracks implementation work, not spec document creation. Creating a spec = planning (stays `planned` until implementation starts).
|
|
87
|
+
**CRITICAL - What "Work" Means:**
|
|
88
|
+
- ❌ **NOT**: Creating/writing the spec document itself
|
|
89
|
+
- ✅ **YES**: Implementing what the spec describes (code, docs, features, etc.)
|
|
90
|
+
- **Example**: Creating a spec for "API redesign" ≠ work complete
|
|
91
|
+
- Work = Actually redesigning the API as described in the spec
|
|
92
|
+
- Status `planned` until someone starts the redesign
|
|
93
|
+
- Status `in-progress` while redesigning
|
|
94
|
+
- Status `complete` after redesign is done
|
|
95
|
+
|
|
96
|
+
**Status Update Triggers:**
|
|
97
|
+
- ✅ **Before starting implementation** → `lean-spec update <spec> --status in-progress`
|
|
98
|
+
- ✅ **After completing implementation** → `lean-spec update <spec> --status complete`
|
|
99
|
+
- ✅ **If blocked or paused** → Update status and document why in spec
|
|
100
|
+
- ❌ **NEVER mark spec complete just because you finished writing it**
|
|
65
101
|
|
|
66
102
|
## Quality Standards
|
|
67
103
|
|
|
68
|
-
- Code is clear and maintainable
|
|
69
104
|
- Tests cover critical paths
|
|
70
105
|
- No unnecessary complexity
|
|
71
106
|
- Documentation where needed (not everywhere)
|
|
107
|
+
- Code is clear and maintainable
|
|
72
108
|
- Specs stay in sync with implementation
|
|
109
|
+
- **Status tracking is mandatory:**
|
|
110
|
+
- Mark spec as `in-progress` BEFORE starting work
|
|
111
|
+
- Mark spec as `complete` IMMEDIATELY after finishing
|
|
112
|
+
- Never leave specs with stale status
|
|
73
113
|
|
|
74
114
|
---
|
|
75
115
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Lightweight spec methodology for AI-powered development.",
|
|
3
|
+
"coreRules": ["core-rules-base-additions.md", "core-rules-shared.md"],
|
|
4
|
+
"whenToUse": "when-to-use-standard.md",
|
|
5
|
+
"whenToUseEarly": true,
|
|
6
|
+
"discoveryCommands": ["discovery-commands-shared.md", "discovery-commands-standard-additions.md"],
|
|
7
|
+
"essentialCommands": ["essential-commands-shared.md", "essential-commands-standard-additions.md"],
|
|
8
|
+
"frontmatter": "frontmatter-standard.md",
|
|
9
|
+
"workflow": ["workflow-standard-detailed.md", "status-update-triggers.md"],
|
|
10
|
+
"qualityStandards": ["quality-standards-minimal-additions.md", "quality-standards-shared.md"],
|
|
11
|
+
"closingNote": "**Remember**: LeanSpec is a mindset. Adapt these guidelines to what actually helps.",
|
|
12
|
+
"additionalSections": []
|
|
13
|
+
}
|
|
@@ -10,6 +10,7 @@ Lightweight spec methodology for AI-powered development.
|
|
|
10
10
|
2. **Check specs/** - Review existing specs before starting
|
|
11
11
|
3. **Follow LeanSpec principles** - Clarity over documentation
|
|
12
12
|
4. **Keep it minimal** - If it doesn't add clarity, cut it
|
|
13
|
+
5. **Never use nested code blocks** - Markdown doesn't support code blocks within code blocks. Use indentation or describe the structure instead
|
|
13
14
|
|
|
14
15
|
## When to Use Specs
|
|
15
16
|
|
|
@@ -27,13 +28,49 @@ Skip specs for:
|
|
|
27
28
|
|
|
28
29
|
Before starting work, understand project context:
|
|
29
30
|
|
|
30
|
-
- `lean-spec stats` - See work distribution
|
|
31
|
-
- `lean-spec board` - View specs
|
|
31
|
+
- `lean-spec stats` - See work distribution
|
|
32
|
+
- `lean-spec board` - View specs by status
|
|
33
|
+
- `lean-spec search "<query>"` - Find relevant work
|
|
34
|
+
- `lean-spec list` - List all specs
|
|
35
|
+
|
|
36
|
+
These help you understand what exists and what's in progress.
|
|
37
|
+
**Additional commands:**
|
|
32
38
|
- `lean-spec list --tag=<tag>` - Find specs by tag (e.g., `--tag=api`)
|
|
33
|
-
- `lean-spec search "<query>"` - Full-text search across specs
|
|
34
39
|
- `lean-spec deps <spec>` - Check dependencies before starting work
|
|
35
40
|
|
|
36
|
-
|
|
41
|
+
## Essential Commands
|
|
42
|
+
|
|
43
|
+
**Discovery:**
|
|
44
|
+
- `lean-spec list` - See all specs
|
|
45
|
+
- `lean-spec search "<query>"` - Find relevant specs
|
|
46
|
+
|
|
47
|
+
**Viewing specs:**
|
|
48
|
+
- `lean-spec view <spec>` - View a spec (formatted)
|
|
49
|
+
- `lean-spec open <spec>` - Open spec in editor
|
|
50
|
+
|
|
51
|
+
**Working with specs:**
|
|
52
|
+
- `lean-spec create <name>` - Create a new spec
|
|
53
|
+
- `lean-spec update <spec> --status <status>` - Update spec status
|
|
54
|
+
|
|
55
|
+
**When in doubt:** Run `lean-spec --help` to see all available commands.
|
|
56
|
+
**Viewing specs (additional):**
|
|
57
|
+
- `lean-spec view <spec> --raw` - Get raw markdown
|
|
58
|
+
- `lean-spec files <spec>` - List all files in a spec
|
|
59
|
+
|
|
60
|
+
**Project Overview:**
|
|
61
|
+
- `lean-spec board` - Kanban view with project health summary
|
|
62
|
+
- `lean-spec stats` - Quick project metrics
|
|
63
|
+
|
|
64
|
+
**Working with specs (additional):**
|
|
65
|
+
- `lean-spec update <spec> --priority <priority>` - Update spec priority
|
|
66
|
+
- `lean-spec update <spec> --tags <tag1,tag2>` - Update spec tags
|
|
67
|
+
- `lean-spec deps <spec>` - Show dependencies and relationships
|
|
68
|
+
|
|
69
|
+
**Token Management:**
|
|
70
|
+
- `lean-spec tokens <spec>` - Count tokens in a spec
|
|
71
|
+
- `lean-spec tokens` - Show token counts for all specs
|
|
72
|
+
|
|
73
|
+
**When in doubt (extended):** Run `lean-spec <command> --help` to discover available commands.
|
|
37
74
|
|
|
38
75
|
## Spec Frontmatter
|
|
39
76
|
|
|
@@ -66,18 +103,39 @@ lean-spec update <spec> --status in-progress --assignee yourname
|
|
|
66
103
|
1. **Discover context** - Run `lean-spec stats` or `lean-spec board` to see current state
|
|
67
104
|
2. **Search existing specs** - Use `lean-spec search` or `lean-spec list` to find relevant work
|
|
68
105
|
3. **Check dependencies** - Run `lean-spec deps <spec>` if working on existing spec
|
|
69
|
-
4. **Create or update spec** - Add frontmatter with required fields
|
|
70
|
-
5. **
|
|
71
|
-
6. **
|
|
72
|
-
7. **
|
|
106
|
+
4. **Create or update spec** - Add frontmatter with required fields (status: `planned`)
|
|
107
|
+
5. **Start implementation** - Mark `in-progress` BEFORE implementing what the spec describes
|
|
108
|
+
6. **Implement changes** - Keep spec in sync as you learn
|
|
109
|
+
7. **Complete implementation** - Mark `complete` AFTER implementing what the spec describes
|
|
110
|
+
8. **Archive when done** - `lean-spec archive <spec>` moves to archive
|
|
111
|
+
|
|
112
|
+
**Remember**: Status tracks implementation work, not spec document creation. Creating a spec = planning (stays `planned` until implementation starts).
|
|
113
|
+
**CRITICAL - What "Work" Means:**
|
|
114
|
+
- ❌ **NOT**: Creating/writing the spec document itself
|
|
115
|
+
- ✅ **YES**: Implementing what the spec describes (code, docs, features, etc.)
|
|
116
|
+
- **Example**: Creating a spec for "API redesign" ≠ work complete
|
|
117
|
+
- Work = Actually redesigning the API as described in the spec
|
|
118
|
+
- Status `planned` until someone starts the redesign
|
|
119
|
+
- Status `in-progress` while redesigning
|
|
120
|
+
- Status `complete` after redesign is done
|
|
121
|
+
|
|
122
|
+
**Status Update Triggers:**
|
|
123
|
+
- ✅ **Before starting implementation** → `lean-spec update <spec> --status in-progress`
|
|
124
|
+
- ✅ **After completing implementation** → `lean-spec update <spec> --status complete`
|
|
125
|
+
- ✅ **If blocked or paused** → Update status and document why in spec
|
|
126
|
+
- ❌ **NEVER mark spec complete just because you finished writing it**
|
|
73
127
|
|
|
74
128
|
## Quality Standards
|
|
75
129
|
|
|
76
|
-
- Code is clear and maintainable
|
|
77
130
|
- Tests cover critical paths
|
|
78
131
|
- No unnecessary complexity
|
|
79
132
|
- Documentation where needed (not everywhere)
|
|
133
|
+
- Code is clear and maintainable
|
|
80
134
|
- Specs stay in sync with implementation
|
|
135
|
+
- **Status tracking is mandatory:**
|
|
136
|
+
- Mark spec as `in-progress` BEFORE starting work
|
|
137
|
+
- Mark spec as `complete` IMMEDIATELY after finishing
|
|
138
|
+
- Never leave specs with stale status
|
|
81
139
|
|
|
82
140
|
---
|
|
83
141
|
|