lean-spec 0.2.10 → 0.2.15-dev.21022397862
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/README.md +100 -8
- package/bin/lean-spec-rust.js +116 -0
- package/bin/lean-spec.js +9 -1
- package/binaries/darwin-arm64/lean-spec +0 -0
- package/binaries/darwin-arm64/package.json +20 -0
- package/binaries/darwin-x64/lean-spec +0 -0
- package/binaries/darwin-x64/package.json +20 -0
- package/binaries/linux-arm64/lean-spec +0 -0
- package/binaries/linux-arm64/package.json +20 -0
- package/binaries/linux-x64/lean-spec +0 -0
- package/binaries/linux-x64/package.json +20 -0
- package/binaries/windows-x64/lean-spec.exe +0 -0
- package/binaries/windows-x64/package.json +20 -0
- package/package.json +9 -43
- package/templates/detailed/AGENTS.md +18 -1
- package/templates/standard/AGENTS.md +18 -1
- package/dist/backfill-446GBTBC.js +0 -5
- package/dist/backfill-446GBTBC.js.map +0 -1
- package/dist/chunk-CJMVV46H.js +0 -2990
- package/dist/chunk-CJMVV46H.js.map +0 -1
- package/dist/chunk-H5MCUMBK.js +0 -741
- package/dist/chunk-H5MCUMBK.js.map +0 -1
- package/dist/chunk-KTNU4LUR.js +0 -8214
- package/dist/chunk-KTNU4LUR.js.map +0 -1
- package/dist/chunk-RF5PKL6L.js +0 -298
- package/dist/chunk-RF5PKL6L.js.map +0 -1
- package/dist/chunk-VN5BUHTV.js +0 -300
- package/dist/chunk-VN5BUHTV.js.map +0 -1
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -129
- package/dist/cli.js.map +0 -1
- package/dist/frontmatter-6ZBAGOEU.js +0 -3
- package/dist/frontmatter-6ZBAGOEU.js.map +0 -1
- package/dist/mcp-server.d.ts +0 -16
- package/dist/mcp-server.js +0 -8
- package/dist/mcp-server.js.map +0 -1
- package/dist/validate-DIWYTDEF.js +0 -5
- package/dist/validate-DIWYTDEF.js.map +0 -1
package/README.md
CHANGED
|
@@ -84,14 +84,15 @@ Works with any AI coding assistant via MCP or CLI:
|
|
|
84
84
|
|
|
85
85
|
## Features
|
|
86
86
|
|
|
87
|
-
| Feature
|
|
88
|
-
|
|
89
|
-
| **📊 Kanban Board**
|
|
90
|
-
| **🔍 Smart Search**
|
|
91
|
-
| **🔗 Dependencies**
|
|
92
|
-
| **🎨 Web UI**
|
|
93
|
-
| **📈 Project Stats** | `lean-spec stats` - health metrics and bottleneck detection
|
|
94
|
-
| **🤖 AI-Native**
|
|
87
|
+
| Feature | Description |
|
|
88
|
+
| ------------------- | ------------------------------------------------------------- |
|
|
89
|
+
| **📊 Kanban Board** | `lean-spec board` - visual project tracking |
|
|
90
|
+
| **🔍 Smart Search** | `lean-spec search` - find specs by content or metadata |
|
|
91
|
+
| **🔗 Dependencies** | Track spec relationships with `depends_on` and `related` |
|
|
92
|
+
| **🎨 Web UI** | `lean-spec ui` - browser-based dashboard |
|
|
93
|
+
| **📈 Project Stats** | `lean-spec stats` - health metrics and bottleneck detection |
|
|
94
|
+
| **🤖 AI-Native** | MCP server + CLI for AI assistants |
|
|
95
|
+
| **🖥️ Desktop App** | Native Tauri shell with tray + shortcuts (`pnpm dev:desktop`) |
|
|
95
96
|
|
|
96
97
|
<p align="center">
|
|
97
98
|
<img src="https://github.com/codervisor/lean-spec-docs/blob/main/static/img/ui/ui-board-view.png" alt="Kanban Board View" width="800">
|
|
@@ -99,6 +100,97 @@ Works with any AI coding assistant via MCP or CLI:
|
|
|
99
100
|
|
|
100
101
|
---
|
|
101
102
|
|
|
103
|
+
## Requirements
|
|
104
|
+
|
|
105
|
+
### Runtime
|
|
106
|
+
- **Node.js**: `>= 20.0.0`
|
|
107
|
+
- **pnpm**: `>= 10.0.0` (preferred package manager)
|
|
108
|
+
|
|
109
|
+
### Development
|
|
110
|
+
- **Node.js**: `>= 20.0.0`
|
|
111
|
+
- **Rust**: `>= 1.70` (for building CLI/MCP/HTTP binaries)
|
|
112
|
+
- **pnpm**: `>= 10.0.0`
|
|
113
|
+
|
|
114
|
+
**Quick Check:**
|
|
115
|
+
```bash
|
|
116
|
+
node --version # Should be v20.0.0 or higher
|
|
117
|
+
pnpm --version # Should be 10.0.0 or higher
|
|
118
|
+
rustc --version # Should be 1.70 or higher (dev only)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Desktop App
|
|
124
|
+
|
|
125
|
+
The `@leanspec/desktop` package wraps the Vite UI (`@leanspec/ui`) in a lightweight Tauri shell for local, multi-project workflows backed by Rust commands:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Launch the desktop shell with hot reload
|
|
129
|
+
pnpm install
|
|
130
|
+
pnpm dev:desktop
|
|
131
|
+
|
|
132
|
+
# Produce signed installers + embedded UI bundle
|
|
133
|
+
pnpm build:desktop
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Key capabilities:
|
|
137
|
+
- Frameless window with custom title bar + native controls
|
|
138
|
+
- Global shortcuts (`Cmd/Ctrl+Shift+L` to toggle, `Cmd/Ctrl+Shift+K` to open the project switcher, `Cmd/Ctrl+Shift+N` to add a spec)
|
|
139
|
+
- Shared project registry + native folder picker backed by `~/.lean-spec/projects.json`
|
|
140
|
+
- System tray with recent projects, background notifications, and update checks
|
|
141
|
+
- Embedded Vite static build + Rust HTTP server for offline packaging (macOS `.dmg`, Windows `.msi/.exe`, Linux `.AppImage/.deb/.rpm`)
|
|
142
|
+
|
|
143
|
+
See [packages/desktop/README.md](packages/desktop/README.md) for configuration details.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Developer Workflow
|
|
148
|
+
|
|
149
|
+
Common development tasks using `pnpm`:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# Development
|
|
153
|
+
pnpm install # Install dependencies
|
|
154
|
+
pnpm build # Build all packages
|
|
155
|
+
pnpm dev # Start dev mode (UI + Core)
|
|
156
|
+
pnpm dev:web # UI only
|
|
157
|
+
pnpm dev:cli # CLI only
|
|
158
|
+
pnpm dev:desktop # Desktop app
|
|
159
|
+
|
|
160
|
+
# Testing
|
|
161
|
+
pnpm test # Run all tests
|
|
162
|
+
pnpm test:ui # Tests with UI
|
|
163
|
+
pnpm test:coverage # Coverage report
|
|
164
|
+
pnpm typecheck # Type check all packages
|
|
165
|
+
|
|
166
|
+
# Rust
|
|
167
|
+
pnpm rust:build # Build Rust packages (release)
|
|
168
|
+
pnpm rust:build:dev # Build Rust (dev, faster)
|
|
169
|
+
pnpm rust:test # Run Rust tests
|
|
170
|
+
pnpm rust:check # Quick Rust check
|
|
171
|
+
pnpm rust:clippy # Rust linting
|
|
172
|
+
pnpm rust:fmt # Format Rust code
|
|
173
|
+
|
|
174
|
+
# CLI (run locally)
|
|
175
|
+
pnpm cli board # Show spec board
|
|
176
|
+
pnpm cli list # List specs
|
|
177
|
+
pnpm cli create my-feat # Create new spec
|
|
178
|
+
pnpm cli validate # Validate specs
|
|
179
|
+
|
|
180
|
+
# Documentation
|
|
181
|
+
pnpm docs:dev # Start docs site
|
|
182
|
+
pnpm docs:build # Build docs
|
|
183
|
+
|
|
184
|
+
# Release
|
|
185
|
+
pnpm pre-release # Run all pre-release checks
|
|
186
|
+
pnpm prepare-publish # Prepare for npm publish
|
|
187
|
+
pnpm restore-packages # Restore after publish
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
See [package.json](package.json) for all available scripts.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
102
194
|
## Documentation
|
|
103
195
|
|
|
104
196
|
📖 [Full Documentation](https://www.lean-spec.dev) · [CLI Reference](https://www.lean-spec.dev/docs/reference/cli) · [First Principles](https://www.lean-spec.dev/docs/advanced/first-principles) · [FAQ](https://www.lean-spec.dev/docs/faq) · [中文文档](https://www.lean-spec.dev/zh-Hans/)
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* LeanSpec CLI Binary Wrapper
|
|
4
|
+
*
|
|
5
|
+
* This script detects the current platform and architecture,
|
|
6
|
+
* then spawns the appropriate Rust binary with the provided arguments.
|
|
7
|
+
*
|
|
8
|
+
* The wrapper looks for binaries in the following locations:
|
|
9
|
+
* 1. Platform-specific npm package (lean-spec-darwin-x64, etc.)
|
|
10
|
+
* 2. Local binaries directory (for development)
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { spawn } from 'child_process';
|
|
14
|
+
import { createRequire } from 'module';
|
|
15
|
+
import { fileURLToPath } from 'url';
|
|
16
|
+
import { dirname, join } from 'path';
|
|
17
|
+
import { accessSync } from 'fs';
|
|
18
|
+
|
|
19
|
+
const require = createRequire(import.meta.url);
|
|
20
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
21
|
+
const __dirname = dirname(__filename);
|
|
22
|
+
|
|
23
|
+
// Debug mode - enable with LEANSPEC_DEBUG=1
|
|
24
|
+
const DEBUG = process.env.LEANSPEC_DEBUG === '1';
|
|
25
|
+
const debug = (...args) => DEBUG && console.error('[lean-spec debug]', ...args);
|
|
26
|
+
|
|
27
|
+
// Platform detection mapping
|
|
28
|
+
const PLATFORM_MAP = {
|
|
29
|
+
darwin: { x64: 'darwin-x64', arm64: 'darwin-arm64' },
|
|
30
|
+
linux: { x64: 'linux-x64', arm64: 'linux-arm64' },
|
|
31
|
+
win32: { x64: 'windows-x64', arm64: 'windows-arm64' }
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
function getBinaryPath() {
|
|
35
|
+
const platform = process.platform;
|
|
36
|
+
const arch = process.arch;
|
|
37
|
+
|
|
38
|
+
debug('Platform detection:', { platform, arch });
|
|
39
|
+
|
|
40
|
+
const platformKey = PLATFORM_MAP[platform]?.[arch];
|
|
41
|
+
if (!platformKey) {
|
|
42
|
+
console.error(`Unsupported platform: ${platform}-${arch}`);
|
|
43
|
+
console.error('Supported: macOS (x64/arm64), Linux (x64/arm64), Windows (x64)');
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const isWindows = platform === 'win32';
|
|
48
|
+
const binaryName = isWindows ? 'lean-spec.exe' : 'lean-spec';
|
|
49
|
+
const packageName = `@leanspec/cli-${platformKey}`;
|
|
50
|
+
|
|
51
|
+
debug('Binary info:', { platformKey, binaryName, packageName });
|
|
52
|
+
|
|
53
|
+
// Try to resolve platform package
|
|
54
|
+
try {
|
|
55
|
+
const resolvedPath = require.resolve(`${packageName}/${binaryName}`);
|
|
56
|
+
debug('Found platform package binary:', resolvedPath);
|
|
57
|
+
return resolvedPath;
|
|
58
|
+
} catch (e) {
|
|
59
|
+
debug('Platform package not found:', packageName, '-', e.message);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Try local binaries directory (for development/testing)
|
|
63
|
+
try {
|
|
64
|
+
const localPath = join(__dirname, '..', 'binaries', platformKey, binaryName);
|
|
65
|
+
debug('Trying local binary:', localPath);
|
|
66
|
+
accessSync(localPath);
|
|
67
|
+
debug('Found local binary:', localPath);
|
|
68
|
+
return localPath;
|
|
69
|
+
} catch (e) {
|
|
70
|
+
debug('Local binary not found:', e.message);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Try rust/target/release directory (for local development)
|
|
74
|
+
try {
|
|
75
|
+
const rustTargetPath = join(__dirname, '..', '..', '..', 'rust', 'target', 'release', binaryName);
|
|
76
|
+
debug('Trying rust target binary:', rustTargetPath);
|
|
77
|
+
accessSync(rustTargetPath);
|
|
78
|
+
debug('Found rust target binary:', rustTargetPath);
|
|
79
|
+
return rustTargetPath;
|
|
80
|
+
} catch (e) {
|
|
81
|
+
debug('Rust target binary not found:', e.message);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
console.error(`Binary not found for ${platform}-${arch}`);
|
|
85
|
+
console.error(`Expected package: ${packageName}`);
|
|
86
|
+
console.error('');
|
|
87
|
+
console.error('To install:');
|
|
88
|
+
console.error(' npm install -g lean-spec');
|
|
89
|
+
console.error('');
|
|
90
|
+
console.error('If you installed globally, try:');
|
|
91
|
+
console.error(' npm uninstall -g lean-spec && npm install -g lean-spec');
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Execute binary
|
|
96
|
+
const binaryPath = getBinaryPath();
|
|
97
|
+
const args = process.argv.slice(2);
|
|
98
|
+
|
|
99
|
+
debug('Spawning binary:', binaryPath);
|
|
100
|
+
debug('Arguments:', args);
|
|
101
|
+
|
|
102
|
+
const child = spawn(binaryPath, args, {
|
|
103
|
+
stdio: 'inherit',
|
|
104
|
+
windowsHide: true,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
child.on('exit', (code) => {
|
|
108
|
+
debug('Binary exited with code:', code);
|
|
109
|
+
process.exit(code ?? 1);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
child.on('error', (err) => {
|
|
113
|
+
console.error('Failed to start lean-spec:', err.message);
|
|
114
|
+
debug('Spawn error:', err);
|
|
115
|
+
process.exit(1);
|
|
116
|
+
});
|
package/bin/lean-spec.js
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* LeanSpec CLI Entry Point
|
|
4
|
+
*
|
|
5
|
+
* Thin wrapper that delegates to the Rust binary.
|
|
6
|
+
* The TypeScript implementation has been deprecated in favor of Rust.
|
|
7
|
+
*
|
|
8
|
+
* @see spec 181-typescript-deprecation-rust-migration
|
|
9
|
+
*/
|
|
10
|
+
import './lean-spec-rust.js';
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@leanspec/cli-darwin-arm64",
|
|
3
|
+
"version": "0.2.15-dev.21022397862",
|
|
4
|
+
"description": "LeanSpec CLI binary for macOS ARM64",
|
|
5
|
+
"os": [
|
|
6
|
+
"darwin"
|
|
7
|
+
],
|
|
8
|
+
"cpu": [
|
|
9
|
+
"arm64"
|
|
10
|
+
],
|
|
11
|
+
"main": "lean-spec",
|
|
12
|
+
"files": [
|
|
13
|
+
"lean-spec"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/codervisor/lean-spec.git"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT"
|
|
20
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@leanspec/cli-darwin-x64",
|
|
3
|
+
"version": "0.2.15-dev.21022397862",
|
|
4
|
+
"description": "LeanSpec CLI binary for macOS x64",
|
|
5
|
+
"os": [
|
|
6
|
+
"darwin"
|
|
7
|
+
],
|
|
8
|
+
"cpu": [
|
|
9
|
+
"x64"
|
|
10
|
+
],
|
|
11
|
+
"main": "lean-spec",
|
|
12
|
+
"files": [
|
|
13
|
+
"lean-spec"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/codervisor/lean-spec.git"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT"
|
|
20
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@leanspec/cli-linux-arm64",
|
|
3
|
+
"version": "0.2.15-dev.21022397862",
|
|
4
|
+
"description": "LeanSpec CLI binary for Linux ARM64",
|
|
5
|
+
"os": [
|
|
6
|
+
"linux"
|
|
7
|
+
],
|
|
8
|
+
"cpu": [
|
|
9
|
+
"arm64"
|
|
10
|
+
],
|
|
11
|
+
"main": "lean-spec",
|
|
12
|
+
"files": [
|
|
13
|
+
"lean-spec"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/codervisor/lean-spec.git"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT"
|
|
20
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@leanspec/cli-linux-x64",
|
|
3
|
+
"version": "0.2.15-dev.21022397862",
|
|
4
|
+
"description": "LeanSpec CLI binary for Linux x64",
|
|
5
|
+
"os": [
|
|
6
|
+
"linux"
|
|
7
|
+
],
|
|
8
|
+
"cpu": [
|
|
9
|
+
"x64"
|
|
10
|
+
],
|
|
11
|
+
"main": "lean-spec",
|
|
12
|
+
"files": [
|
|
13
|
+
"lean-spec"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/codervisor/lean-spec.git"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT"
|
|
20
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@leanspec/cli-windows-x64",
|
|
3
|
+
"version": "0.2.15-dev.21022397862",
|
|
4
|
+
"description": "LeanSpec CLI binary for Windows x64",
|
|
5
|
+
"os": [
|
|
6
|
+
"win32"
|
|
7
|
+
],
|
|
8
|
+
"cpu": [
|
|
9
|
+
"x64"
|
|
10
|
+
],
|
|
11
|
+
"main": "lean-spec.exe",
|
|
12
|
+
"files": [
|
|
13
|
+
"lean-spec.exe"
|
|
14
|
+
],
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/codervisor/lean-spec.git"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT"
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lean-spec",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15-dev.21022397862",
|
|
4
4
|
"description": "Specification-driven development made simple",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"lean-spec": "./bin/lean-spec.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"
|
|
11
|
-
"dev": "tsup --watch",
|
|
12
|
-
"typecheck": "tsc --noEmit",
|
|
13
|
-
"test": "vitest run",
|
|
14
|
-
"test:watch": "vitest"
|
|
10
|
+
"typecheck": "echo 'No TypeScript source to check'"
|
|
15
11
|
},
|
|
16
12
|
"keywords": [
|
|
17
13
|
"spec",
|
|
@@ -33,48 +29,18 @@
|
|
|
33
29
|
},
|
|
34
30
|
"files": [
|
|
35
31
|
"bin/",
|
|
36
|
-
"
|
|
32
|
+
"binaries/",
|
|
37
33
|
"templates/",
|
|
38
34
|
"README.md",
|
|
39
35
|
"LICENSE",
|
|
40
36
|
"CHANGELOG.md"
|
|
41
37
|
],
|
|
42
|
-
"
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"
|
|
46
|
-
"cli-
|
|
47
|
-
"cli-
|
|
48
|
-
"commander": "^14.0.2",
|
|
49
|
-
"dayjs": "^1.11.19",
|
|
50
|
-
"gray-matter": "^4.0.3",
|
|
51
|
-
"ink": "^6.4.0",
|
|
52
|
-
"ink-gradient": "^3.0.0",
|
|
53
|
-
"ink-progress-bar": "^3.0.0",
|
|
54
|
-
"ink-select-input": "^6.2.0",
|
|
55
|
-
"ink-spinner": "^5.0.0",
|
|
56
|
-
"ink-table": "^3.1.0",
|
|
57
|
-
"ink-text-input": "^6.0.0",
|
|
58
|
-
"js-yaml": "^4.1.0",
|
|
59
|
-
"marked": "^15.0.12",
|
|
60
|
-
"marked-terminal": "^7.3.0",
|
|
61
|
-
"open": "^11.0.0",
|
|
62
|
-
"ora": "^9.0.0",
|
|
63
|
-
"react": "^19.2.0",
|
|
64
|
-
"strip-ansi": "^7.1.2",
|
|
65
|
-
"tiktoken": "^1.0.22",
|
|
66
|
-
"tokenx": "^1.2.1",
|
|
67
|
-
"zod": "^3.25.76"
|
|
68
|
-
},
|
|
69
|
-
"devDependencies": {
|
|
70
|
-
"@leanspec/core": "^0.2.10",
|
|
71
|
-
"@types/js-yaml": "^4.0.9",
|
|
72
|
-
"@types/marked-terminal": "^6.1.1",
|
|
73
|
-
"@types/node": "^20.10.0",
|
|
74
|
-
"@types/react": "^19.2.2",
|
|
75
|
-
"tsup": "^8.0.1",
|
|
76
|
-
"typescript": "^5.3.3",
|
|
77
|
-
"vitest": "^4.0.6"
|
|
38
|
+
"optionalDependencies": {
|
|
39
|
+
"@leanspec/cli-darwin-arm64": "workspace:*",
|
|
40
|
+
"@leanspec/cli-darwin-x64": "workspace:*",
|
|
41
|
+
"@leanspec/cli-linux-arm64": "workspace:*",
|
|
42
|
+
"@leanspec/cli-linux-x64": "workspace:*",
|
|
43
|
+
"@leanspec/cli-windows-x64": "workspace:*"
|
|
78
44
|
},
|
|
79
45
|
"engines": {
|
|
80
46
|
"node": ">=20"
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
| Unlink specs | `unlink` | `lean-spec unlink <spec> --depends-on <other>` |
|
|
29
29
|
| Dependencies | `deps` | `lean-spec deps <spec>` |
|
|
30
30
|
| Token count | `tokens` | `lean-spec tokens <spec>` |
|
|
31
|
+
| Validate specs | `validate` | `lean-spec validate` |
|
|
31
32
|
|
|
32
33
|
## ⚠️ Core Rules
|
|
33
34
|
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
| **NEVER edit frontmatter manually** | Use `update`, `link`, `unlink` for: `status`, `priority`, `tags`, `assignee`, `transitions`, timestamps, `depends_on` |
|
|
37
38
|
| **ALWAYS link spec references** | Content mentions another spec → `lean-spec link <spec> --depends-on <other>` |
|
|
38
39
|
| **Track status transitions** | `planned` → `in-progress` (before coding) → `complete` (after done) |
|
|
40
|
+
| **Keep specs current** | Document progress, decisions, and learnings as work happens. Obsolete specs mislead both humans and AI |
|
|
39
41
|
| **No nested code blocks** | Use indentation instead |
|
|
40
42
|
|
|
41
43
|
### 🚫 Common Mistakes
|
|
@@ -46,13 +48,14 @@
|
|
|
46
48
|
| Skip discovery | Run `board` and `search` first |
|
|
47
49
|
| Leave status as "planned" | Update to `in-progress` before coding |
|
|
48
50
|
| Edit frontmatter manually | Use `update` tool |
|
|
51
|
+
| Complete spec without documentation | Document progress, prompts, learnings first |
|
|
49
52
|
|
|
50
53
|
## 📋 SDD Workflow
|
|
51
54
|
|
|
52
55
|
```
|
|
53
56
|
BEFORE: board → search → check existing specs
|
|
54
57
|
DURING: update status to in-progress → code → document decisions → link dependencies
|
|
55
|
-
AFTER: update status to complete
|
|
58
|
+
AFTER: document completion → update status to complete
|
|
56
59
|
```
|
|
57
60
|
|
|
58
61
|
**Status tracks implementation, NOT spec writing.**
|
|
@@ -84,6 +87,20 @@ lean-spec link <spec> --depends-on <other-spec>
|
|
|
84
87
|
| 3,500-5,000 | ⚠️ Consider splitting |
|
|
85
88
|
| >5,000 | 🔴 Must split |
|
|
86
89
|
|
|
90
|
+
## Quality Validation
|
|
91
|
+
|
|
92
|
+
Before completing work, validate spec quality:
|
|
93
|
+
```bash
|
|
94
|
+
lean-spec validate # Check structure and quality
|
|
95
|
+
lean-spec validate --check-deps # Verify dependency alignment
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Validation checks:
|
|
99
|
+
- Missing required sections
|
|
100
|
+
- Excessive length (>400 lines)
|
|
101
|
+
- Content/frontmatter dependency misalignment
|
|
102
|
+
- Invalid frontmatter fields
|
|
103
|
+
|
|
87
104
|
## First Principles (Priority Order)
|
|
88
105
|
|
|
89
106
|
1. **Context Economy** - <2,000 tokens optimal, >3,500 needs splitting
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
| Unlink specs | `unlink` | `lean-spec unlink <spec> --depends-on <other>` |
|
|
29
29
|
| Dependencies | `deps` | `lean-spec deps <spec>` |
|
|
30
30
|
| Token count | `tokens` | `lean-spec tokens <spec>` |
|
|
31
|
+
| Validate specs | `validate` | `lean-spec validate` |
|
|
31
32
|
|
|
32
33
|
## ⚠️ Core Rules
|
|
33
34
|
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
| **NEVER edit frontmatter manually** | Use `update`, `link`, `unlink` for: `status`, `priority`, `tags`, `assignee`, `transitions`, timestamps, `depends_on` |
|
|
37
38
|
| **ALWAYS link spec references** | Content mentions another spec → `lean-spec link <spec> --depends-on <other>` |
|
|
38
39
|
| **Track status transitions** | `planned` → `in-progress` (before coding) → `complete` (after done) |
|
|
40
|
+
| **Keep specs current** | Document progress, decisions, and learnings as work happens. Obsolete specs mislead both humans and AI |
|
|
39
41
|
| **No nested code blocks** | Use indentation instead |
|
|
40
42
|
|
|
41
43
|
### 🚫 Common Mistakes
|
|
@@ -46,13 +48,14 @@
|
|
|
46
48
|
| Skip discovery | Run `board` and `search` first |
|
|
47
49
|
| Leave status as "planned" | Update to `in-progress` before coding |
|
|
48
50
|
| Edit frontmatter manually | Use `update` tool |
|
|
51
|
+
| Complete spec without documentation | Document progress, prompts, learnings first |
|
|
49
52
|
|
|
50
53
|
## 📋 SDD Workflow
|
|
51
54
|
|
|
52
55
|
```
|
|
53
56
|
BEFORE: board → search → check existing specs
|
|
54
57
|
DURING: update status to in-progress → code → document decisions → link dependencies
|
|
55
|
-
AFTER: update status to complete
|
|
58
|
+
AFTER: document completion → update status to complete
|
|
56
59
|
```
|
|
57
60
|
|
|
58
61
|
**Status tracks implementation, NOT spec writing.**
|
|
@@ -84,6 +87,20 @@ lean-spec link <spec> --depends-on <other-spec>
|
|
|
84
87
|
| 3,500-5,000 | ⚠️ Consider splitting |
|
|
85
88
|
| >5,000 | 🔴 Must split |
|
|
86
89
|
|
|
90
|
+
## Quality Validation
|
|
91
|
+
|
|
92
|
+
Before completing work, validate spec quality:
|
|
93
|
+
```bash
|
|
94
|
+
lean-spec validate # Check structure and quality
|
|
95
|
+
lean-spec validate --check-deps # Verify dependency alignment
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Validation checks:
|
|
99
|
+
- Missing required sections
|
|
100
|
+
- Excessive length (>400 lines)
|
|
101
|
+
- Content/frontmatter dependency misalignment
|
|
102
|
+
- Invalid frontmatter fields
|
|
103
|
+
|
|
87
104
|
## First Principles (Priority Order)
|
|
88
105
|
|
|
89
106
|
1. **Context Economy** - <2,000 tokens optimal, >3,500 needs splitting
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"backfill-446GBTBC.js"}
|