lean-spec 0.2.5 → 0.2.6-dev.20251125015611
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-7WXYOHZU.js → chunk-RTEGSMVL.js} +1253 -678
- package/dist/chunk-RTEGSMVL.js.map +1 -0
- package/dist/cli.js +7 -1
- package/dist/cli.js.map +1 -1
- package/dist/mcp-server.js +1 -1
- package/package.json +2 -3
- package/templates/detailed/AGENTS.md +113 -0
- package/templates/detailed/README.md +28 -0
- package/templates/detailed/files/DESIGN.md +43 -0
- package/templates/detailed/files/PLAN.md +59 -0
- package/templates/detailed/files/README.md +30 -0
- package/templates/detailed/files/TEST.md +71 -0
- package/templates/examples/api-refactor/README.md +81 -0
- package/templates/examples/api-refactor/package.json +16 -0
- package/templates/examples/api-refactor/src/app.js +40 -0
- package/templates/examples/api-refactor/src/services/currencyService.js +43 -0
- package/templates/examples/api-refactor/src/services/timezoneService.js +41 -0
- package/templates/examples/api-refactor/src/services/weatherService.js +42 -0
- package/templates/examples/dark-theme/README.md +66 -0
- package/templates/examples/dark-theme/package.json +16 -0
- package/templates/examples/dark-theme/src/public/app.js +277 -0
- package/templates/examples/dark-theme/src/public/index.html +225 -0
- package/templates/examples/dark-theme/src/public/style.css +625 -0
- package/templates/examples/dark-theme/src/server.js +18 -0
- package/templates/examples/dashboard-widgets/README.md +70 -0
- package/templates/examples/dashboard-widgets/index.html +12 -0
- package/templates/examples/dashboard-widgets/package.json +22 -0
- package/templates/examples/dashboard-widgets/src/App.css +20 -0
- package/templates/examples/dashboard-widgets/src/App.jsx +16 -0
- package/templates/examples/dashboard-widgets/src/components/Dashboard.css +17 -0
- package/templates/examples/dashboard-widgets/src/components/Dashboard.jsx +15 -0
- package/templates/examples/dashboard-widgets/src/components/WidgetWrapper.css +23 -0
- package/templates/examples/dashboard-widgets/src/components/WidgetWrapper.jsx +16 -0
- package/templates/examples/dashboard-widgets/src/components/widgets/ChartWidget.css +33 -0
- package/templates/examples/dashboard-widgets/src/components/widgets/ChartWidget.jsx +28 -0
- package/templates/examples/dashboard-widgets/src/components/widgets/StatsWidget.css +24 -0
- package/templates/examples/dashboard-widgets/src/components/widgets/StatsWidget.jsx +22 -0
- package/templates/examples/dashboard-widgets/src/index.css +13 -0
- package/templates/examples/dashboard-widgets/src/main.jsx +10 -0
- package/templates/examples/dashboard-widgets/src/utils/mockData.js +30 -0
- package/templates/examples/dashboard-widgets/vite.config.js +6 -0
- package/templates/standard/AGENTS.md +113 -0
- package/templates/standard/README.md +4 -2
- package/dist/chunk-7WXYOHZU.js.map +0 -1
- package/templates/_shared/agents-components/core-rules-base-additions.md +0 -4
- package/templates/_shared/agents-components/core-rules-enterprise-additions.md +0 -4
- package/templates/_shared/agents-components/core-rules-shared.md +0 -1
- package/templates/_shared/agents-components/discovery-commands-enterprise-additions.md +0 -6
- package/templates/_shared/agents-components/discovery-commands-minimal-additions.md +0 -0
- package/templates/_shared/agents-components/discovery-commands-shared.md +0 -8
- package/templates/_shared/agents-components/discovery-commands-standard-additions.md +0 -3
- package/templates/_shared/agents-components/enterprise-approval.md +0 -10
- package/templates/_shared/agents-components/enterprise-compliance.md +0 -12
- package/templates/_shared/agents-components/enterprise-when-required.md +0 -13
- package/templates/_shared/agents-components/essential-commands-enterprise-additions.md +0 -29
- package/templates/_shared/agents-components/essential-commands-minimal-additions.md +0 -1
- package/templates/_shared/agents-components/essential-commands-shared.md +0 -15
- package/templates/_shared/agents-components/essential-commands-standard-additions.md +0 -18
- package/templates/_shared/agents-components/frontmatter-enterprise.md +0 -33
- package/templates/_shared/agents-components/frontmatter-minimal.md +0 -18
- package/templates/_shared/agents-components/frontmatter-standard.md +0 -23
- package/templates/_shared/agents-components/quality-standards-enterprise-additions.md +0 -4
- package/templates/_shared/agents-components/quality-standards-minimal-additions.md +0 -3
- package/templates/_shared/agents-components/quality-standards-shared.md +0 -6
- package/templates/_shared/agents-components/status-update-triggers.md +0 -14
- package/templates/_shared/agents-components/when-to-use-enterprise.md +0 -11
- package/templates/_shared/agents-components/when-to-use-minimal.md +0 -9
- package/templates/_shared/agents-components/when-to-use-standard.md +0 -9
- package/templates/_shared/agents-components/workflow-enterprise.md +0 -11
- package/templates/_shared/agents-components/workflow-standard-detailed.md +0 -10
- package/templates/_shared/agents-components/workflow-standard.md +0 -8
- package/templates/_shared/agents-template.hbs +0 -43
- package/templates/enterprise/README.md +0 -25
- package/templates/enterprise/agents-config.json +0 -16
- package/templates/enterprise/files/AGENTS.md +0 -194
- package/templates/enterprise/spec-template.md +0 -80
- package/templates/minimal/README.md +0 -18
- package/templates/minimal/agents-config.json +0 -13
- package/templates/minimal/config.json +0 -15
- package/templates/minimal/files/AGENTS.md +0 -116
- package/templates/minimal/spec-template.md +0 -25
- package/templates/standard/agents-config.json +0 -13
- package/templates/standard/files/AGENTS.md +0 -142
- /package/templates/{enterprise → detailed}/config.json +0 -0
- /package/templates/standard/{spec-template.md → files/README.md} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5. **Never use nested code blocks** - Markdown doesn't support code blocks within code blocks. Use indentation or describe the structure instead
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
**Additional commands:**
|
|
2
|
-
- `lean-spec list --tag=<tag>` - Find specs by tag (e.g., `--tag=security`)
|
|
3
|
-
- `lean-spec deps <spec>` - Check dependencies before starting work
|
|
4
|
-
- `lean-spec gantt` - View project timeline and milestones
|
|
5
|
-
|
|
6
|
-
**Note:** For enterprise, also consider dependencies and project timelines when planning work.
|
|
File without changes
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
Before starting work, understand project context:
|
|
2
|
-
|
|
3
|
-
- `lean-spec stats` - See work distribution
|
|
4
|
-
- `lean-spec board` - View specs by status
|
|
5
|
-
- `lean-spec search "<query>"` - Find relevant work
|
|
6
|
-
- `lean-spec list` - List all specs
|
|
7
|
-
|
|
8
|
-
These help you understand what exists and what's in progress.
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
## Approval Workflow
|
|
2
|
-
|
|
3
|
-
1. **Discover context** - Run `lean-spec stats`, `lean-spec board`, `lean-spec deps`
|
|
4
|
-
2. **Create spec** - Include all required frontmatter fields
|
|
5
|
-
3. **Technical review** - Assign reviewer in frontmatter
|
|
6
|
-
4. **Security team review** - For security/compliance-tagged specs
|
|
7
|
-
5. **Stakeholder sign-off** - Update status to `planned`
|
|
8
|
-
6. **Implementation** - Update status to `in-progress`, keep spec in sync
|
|
9
|
-
7. **Final review** - Before deployment
|
|
10
|
-
8. **Complete & archive** - Mark `complete`, then archive
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
## Security & Compliance in Frontmatter
|
|
2
|
-
|
|
3
|
-
Tag specs with relevant compliance standards:
|
|
4
|
-
```yaml
|
|
5
|
-
tags: [security, api, pii]
|
|
6
|
-
compliance: [SOC2, GDPR]
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
This helps with:
|
|
10
|
-
- Compliance audits and reporting
|
|
11
|
-
- Security review prioritization
|
|
12
|
-
- Regulatory requirement tracking
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
## When Specs Are Required
|
|
2
|
-
|
|
3
|
-
Required for:
|
|
4
|
-
- Features touching PII or sensitive data
|
|
5
|
-
- Changes to authentication/authorization
|
|
6
|
-
- New external integrations
|
|
7
|
-
- Breaking changes to APIs
|
|
8
|
-
- Infrastructure changes
|
|
9
|
-
|
|
10
|
-
Optional for:
|
|
11
|
-
- Internal refactors
|
|
12
|
-
- Bug fixes (unless security-related)
|
|
13
|
-
- Minor UI changes
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
**Viewing specs (additional):**
|
|
2
|
-
- `lean-spec view <spec>/DESIGN.md` - View sub-spec file (DESIGN.md, TESTING.md, etc.)
|
|
3
|
-
- `lean-spec view <spec> --raw` - Get raw markdown (for parsing)
|
|
4
|
-
- `lean-spec view <spec> --json` - Get structured JSON
|
|
5
|
-
- `lean-spec files <spec>` - List all files in a spec (including sub-specs)
|
|
6
|
-
|
|
7
|
-
**Project Overview:**
|
|
8
|
-
- `lean-spec board` - Kanban view with project health summary
|
|
9
|
-
- `lean-spec stats` - Quick project metrics and insights
|
|
10
|
-
- `lean-spec stats --full` - Detailed analytics (all sections)
|
|
11
|
-
|
|
12
|
-
**Working with specs (additional):**
|
|
13
|
-
- `lean-spec update <spec> --status <status>` - Update spec status (REQUIRED - never edit frontmatter manually)
|
|
14
|
-
- `lean-spec update <spec> --priority <priority>` - Update spec priority (REQUIRED - never edit frontmatter manually)
|
|
15
|
-
- `lean-spec update <spec> --tags <tag1,tag2>` - Update spec tags (REQUIRED - never edit frontmatter manually)
|
|
16
|
-
- `lean-spec update <spec> --assignee <name>` - Update spec assignee (REQUIRED - never edit frontmatter manually)
|
|
17
|
-
- `lean-spec deps <spec>` - Show dependencies and relationships
|
|
18
|
-
|
|
19
|
-
**Token Management:**
|
|
20
|
-
- `lean-spec tokens <spec>` - Count tokens in a spec for LLM context management
|
|
21
|
-
- `lean-spec tokens` - Show token counts for all specs (sorted by token count)
|
|
22
|
-
- `lean-spec tokens <spec> --detailed` - Show content breakdown (prose vs code vs tables)
|
|
23
|
-
|
|
24
|
-
**Advanced Editing (AI Agent Orchestration):**
|
|
25
|
-
- `lean-spec analyze <spec>` - Analyze spec complexity and structure (returns JSON with --json flag)
|
|
26
|
-
- `lean-spec split <spec> --output FILE:LINES` - Split spec into multiple files by line ranges (spec 059)
|
|
27
|
-
- `lean-spec compact <spec> --remove LINES` - Remove specified line ranges from spec (spec 059)
|
|
28
|
-
|
|
29
|
-
**When in doubt (extended):** Run `lean-spec <command> --help` to discover available commands and options.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
## Essential Commands
|
|
2
|
-
|
|
3
|
-
**Discovery:**
|
|
4
|
-
- `lean-spec list` - See all specs
|
|
5
|
-
- `lean-spec search "<query>"` - Find relevant specs
|
|
6
|
-
|
|
7
|
-
**Viewing specs:**
|
|
8
|
-
- `lean-spec view <spec>` - View a spec (formatted)
|
|
9
|
-
- `lean-spec open <spec>` - Open spec in editor
|
|
10
|
-
|
|
11
|
-
**Working with specs:**
|
|
12
|
-
- `lean-spec create <name>` - Create a new spec
|
|
13
|
-
- `lean-spec update <spec> --status <status>` - Update spec status
|
|
14
|
-
|
|
15
|
-
**When in doubt:** Run `lean-spec --help` to see all available commands.
|
|
@@ -1,18 +0,0 @@
|
|
|
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.
|
|
@@ -1,33 +0,0 @@
|
|
|
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
|
-
```
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
```
|
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
```
|
|
@@ -1,14 +0,0 @@
|
|
|
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**
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
|
@@ -1,11 +0,0 @@
|
|
|
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).
|
|
@@ -1,10 +0,0 @@
|
|
|
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).
|
|
@@ -1,8 +0,0 @@
|
|
|
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).
|
|
@@ -1,43 +0,0 @@
|
|
|
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}}}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Enterprise Template
|
|
2
|
-
|
|
3
|
-
Governance-ready setup with compliance, security reviews, and approval workflows.
|
|
4
|
-
|
|
5
|
-
## What's Included
|
|
6
|
-
|
|
7
|
-
- **AGENTS.md** - AI agent instructions with security standards
|
|
8
|
-
- Spec structure with approvals and compliance sections
|
|
9
|
-
- Enterprise-grade defaults
|
|
10
|
-
|
|
11
|
-
## When to Use
|
|
12
|
-
|
|
13
|
-
- Regulated industries (finance, healthcare, etc.)
|
|
14
|
-
- Large organizations with compliance requirements
|
|
15
|
-
- Projects requiring security reviews and sign-offs
|
|
16
|
-
|
|
17
|
-
## Philosophy
|
|
18
|
-
|
|
19
|
-
Balance governance with agility. Required checks without bureaucracy. Lean principles still apply - just with guardrails.
|
|
20
|
-
|
|
21
|
-
## Next Steps
|
|
22
|
-
|
|
23
|
-
1. Customize AGENTS.md with your security requirements
|
|
24
|
-
2. Update approval workflows for your org
|
|
25
|
-
3. Create first spec: `lean-spec create my-feature`
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
# AI Agent Instructions
|
|
2
|
-
|
|
3
|
-
## Project: {project_name}
|
|
4
|
-
|
|
5
|
-
Enterprise-grade development with security and compliance requirements.
|
|
6
|
-
|
|
7
|
-
## Core Rules
|
|
8
|
-
|
|
9
|
-
1. **Security first** - Follow security standards, no shortcuts
|
|
10
|
-
2. **Read specs/** - Check for compliance requirements
|
|
11
|
-
3. **Follow LeanSpec** - Lean doesn't mean skipping governance
|
|
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
|
|
14
|
-
|
|
15
|
-
## Discovery Commands
|
|
16
|
-
|
|
17
|
-
Before starting work, understand project context:
|
|
18
|
-
|
|
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:**
|
|
26
|
-
- `lean-spec list --tag=<tag>` - Find specs by tag (e.g., `--tag=security`)
|
|
27
|
-
- `lean-spec deps <spec>` - Check dependencies before starting work
|
|
28
|
-
- `lean-spec gantt` - View project timeline and milestones
|
|
29
|
-
|
|
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.
|
|
76
|
-
|
|
77
|
-
## Spec Frontmatter
|
|
78
|
-
|
|
79
|
-
When creating or updating specs, include YAML frontmatter with all relevant fields:
|
|
80
|
-
|
|
81
|
-
```yaml
|
|
82
|
-
---
|
|
83
|
-
status: draft|planned|in-progress|complete|blocked|cancelled
|
|
84
|
-
created: YYYY-MM-DD
|
|
85
|
-
tags: [security, api, compliance] # for discovery
|
|
86
|
-
priority: low|medium|high|critical
|
|
87
|
-
assignee: username
|
|
88
|
-
reviewer: reviewer-username # required for review
|
|
89
|
-
issue: JIRA-123 # link to issue tracker
|
|
90
|
-
epic: EPIC-456 # link to epic
|
|
91
|
-
compliance: [SOC2, GDPR, HIPAA] # applicable standards
|
|
92
|
-
depends_on:
|
|
93
|
-
- path/to/other/spec
|
|
94
|
-
---
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
**Required fields:**
|
|
98
|
-
- `status`, `created` - basic tracking
|
|
99
|
-
- `tags`, `priority` - planning and discovery
|
|
100
|
-
- `assignee`, `reviewer` - accountability
|
|
101
|
-
- `compliance` - regulatory requirements (if applicable)
|
|
102
|
-
|
|
103
|
-
**Integration fields:**
|
|
104
|
-
- `issue`, `epic` - link to external systems
|
|
105
|
-
- `depends_on` - explicit dependencies
|
|
106
|
-
|
|
107
|
-
**Update with:**
|
|
108
|
-
```bash
|
|
109
|
-
lean-spec update <spec> --status in-progress --assignee yourname
|
|
110
|
-
# or edit frontmatter directly
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Security & Compliance in Frontmatter
|
|
114
|
-
|
|
115
|
-
Tag specs with relevant compliance standards:
|
|
116
|
-
```yaml
|
|
117
|
-
tags: [security, api, pii]
|
|
118
|
-
compliance: [SOC2, GDPR]
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
This helps with:
|
|
122
|
-
- Compliance audits and reporting
|
|
123
|
-
- Security review prioritization
|
|
124
|
-
- Regulatory requirement tracking
|
|
125
|
-
|
|
126
|
-
## When Specs Are Required
|
|
127
|
-
|
|
128
|
-
Required for:
|
|
129
|
-
- Features touching PII or sensitive data
|
|
130
|
-
- Changes to authentication/authorization
|
|
131
|
-
- New external integrations
|
|
132
|
-
- Breaking changes to APIs
|
|
133
|
-
- Infrastructure changes
|
|
134
|
-
|
|
135
|
-
Optional for:
|
|
136
|
-
- Internal refactors
|
|
137
|
-
- Bug fixes (unless security-related)
|
|
138
|
-
- Minor UI changes
|
|
139
|
-
|
|
140
|
-
## Approval Workflow
|
|
141
|
-
|
|
142
|
-
1. **Discover context** - Run `lean-spec stats`, `lean-spec board`, `lean-spec deps`
|
|
143
|
-
2. **Create spec** - Include all required frontmatter fields
|
|
144
|
-
3. **Technical review** - Assign reviewer in frontmatter
|
|
145
|
-
4. **Security team review** - For security/compliance-tagged specs
|
|
146
|
-
5. **Stakeholder sign-off** - Update status to `planned`
|
|
147
|
-
6. **Implementation** - Update status to `in-progress`, keep spec in sync
|
|
148
|
-
7. **Final review** - Before deployment
|
|
149
|
-
8. **Complete & archive** - Mark `complete`, then archive
|
|
150
|
-
|
|
151
|
-
## Workflow
|
|
152
|
-
|
|
153
|
-
1. **Discover context** - Run `lean-spec stats`, `lean-spec board`, or `lean-spec gantt`
|
|
154
|
-
2. **Search existing specs** - Use `lean-spec search` or `lean-spec list --tag=<relevant>`
|
|
155
|
-
3. **Check dependencies** - Run `lean-spec deps <spec>` to understand dependencies
|
|
156
|
-
4. **Create or update spec** - Add complete frontmatter with compliance tags (status: `planned`)
|
|
157
|
-
5. **Get reviews** - Assign reviewer, tag for security review if needed
|
|
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**
|
|
178
|
-
|
|
179
|
-
## Quality Standards
|
|
180
|
-
|
|
181
|
-
- Security requirements verified
|
|
182
|
-
- Tests include security scenarios
|
|
183
|
-
- Documentation complete
|
|
184
|
-
- Compliance checklist completed
|
|
185
|
-
- Code is clear and maintainable
|
|
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
|
|
191
|
-
|
|
192
|
-
---
|
|
193
|
-
|
|
194
|
-
**Remember**: Enterprise doesn't mean heavy. Keep specs lean while meeting governance needs.
|