speccore 1.0.0
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.en.md +401 -0
- package/README.md +401 -0
- package/bin/speccore +2 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +450 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/archive.d.ts +10 -0
- package/dist/commands/archive.d.ts.map +1 -0
- package/dist/commands/archive.js +138 -0
- package/dist/commands/archive.js.map +1 -0
- package/dist/commands/audit.d.ts +10 -0
- package/dist/commands/audit.d.ts.map +1 -0
- package/dist/commands/audit.js +278 -0
- package/dist/commands/audit.js.map +1 -0
- package/dist/commands/baseline.d.ts +13 -0
- package/dist/commands/baseline.d.ts.map +1 -0
- package/dist/commands/baseline.js +227 -0
- package/dist/commands/baseline.js.map +1 -0
- package/dist/commands/bugfix.d.ts +13 -0
- package/dist/commands/bugfix.d.ts.map +1 -0
- package/dist/commands/bugfix.js +181 -0
- package/dist/commands/bugfix.js.map +1 -0
- package/dist/commands/change.d.ts +14 -0
- package/dist/commands/change.d.ts.map +1 -0
- package/dist/commands/change.js +150 -0
- package/dist/commands/change.js.map +1 -0
- package/dist/commands/config.d.ts +7 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +110 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/dashboard.d.ts +9 -0
- package/dist/commands/dashboard.d.ts.map +1 -0
- package/dist/commands/dashboard.js +209 -0
- package/dist/commands/dashboard.js.map +1 -0
- package/dist/commands/demo.d.ts +10 -0
- package/dist/commands/demo.d.ts.map +1 -0
- package/dist/commands/demo.js +151 -0
- package/dist/commands/demo.js.map +1 -0
- package/dist/commands/execute.d.ts +18 -0
- package/dist/commands/execute.d.ts.map +1 -0
- package/dist/commands/execute.js +127 -0
- package/dist/commands/execute.js.map +1 -0
- package/dist/commands/global-status.d.ts +9 -0
- package/dist/commands/global-status.d.ts.map +1 -0
- package/dist/commands/global-status.js +135 -0
- package/dist/commands/global-status.js.map +1 -0
- package/dist/commands/goal.d.ts +15 -0
- package/dist/commands/goal.d.ts.map +1 -0
- package/dist/commands/goal.js +282 -0
- package/dist/commands/goal.js.map +1 -0
- package/dist/commands/handover.d.ts +11 -0
- package/dist/commands/handover.d.ts.map +1 -0
- package/dist/commands/handover.js +169 -0
- package/dist/commands/handover.js.map +1 -0
- package/dist/commands/health.d.ts +7 -0
- package/dist/commands/health.d.ts.map +1 -0
- package/dist/commands/health.js +80 -0
- package/dist/commands/health.js.map +1 -0
- package/dist/commands/help.d.ts +10 -0
- package/dist/commands/help.d.ts.map +1 -0
- package/dist/commands/help.js +93 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/commands/history.d.ts +9 -0
- package/dist/commands/history.d.ts.map +1 -0
- package/dist/commands/history.js +87 -0
- package/dist/commands/history.js.map +1 -0
- package/dist/commands/impact.d.ts +12 -0
- package/dist/commands/impact.d.ts.map +1 -0
- package/dist/commands/impact.js +238 -0
- package/dist/commands/impact.js.map +1 -0
- package/dist/commands/import.d.ts +15 -0
- package/dist/commands/import.d.ts.map +1 -0
- package/dist/commands/import.js +366 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/init.d.ts +6 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +564 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/iteration/create.d.ts +7 -0
- package/dist/commands/iteration/create.d.ts.map +1 -0
- package/dist/commands/iteration/create.js +141 -0
- package/dist/commands/iteration/create.js.map +1 -0
- package/dist/commands/iteration/split.d.ts +9 -0
- package/dist/commands/iteration/split.d.ts.map +1 -0
- package/dist/commands/iteration/split.js +165 -0
- package/dist/commands/iteration/split.js.map +1 -0
- package/dist/commands/iteration-from-global.d.ts +11 -0
- package/dist/commands/iteration-from-global.d.ts.map +1 -0
- package/dist/commands/iteration-from-global.js +294 -0
- package/dist/commands/iteration-from-global.js.map +1 -0
- package/dist/commands/plan.d.ts +12 -0
- package/dist/commands/plan.d.ts.map +1 -0
- package/dist/commands/plan.js +126 -0
- package/dist/commands/plan.js.map +1 -0
- package/dist/commands/progress.d.ts +10 -0
- package/dist/commands/progress.d.ts.map +1 -0
- package/dist/commands/progress.js +89 -0
- package/dist/commands/progress.js.map +1 -0
- package/dist/commands/rename.d.ts +14 -0
- package/dist/commands/rename.d.ts.map +1 -0
- package/dist/commands/rename.js +298 -0
- package/dist/commands/rename.js.map +1 -0
- package/dist/commands/report.d.ts +10 -0
- package/dist/commands/report.d.ts.map +1 -0
- package/dist/commands/report.js +124 -0
- package/dist/commands/report.js.map +1 -0
- package/dist/commands/research.d.ts +14 -0
- package/dist/commands/research.d.ts.map +1 -0
- package/dist/commands/research.js +181 -0
- package/dist/commands/research.js.map +1 -0
- package/dist/commands/retro.d.ts +10 -0
- package/dist/commands/retro.d.ts.map +1 -0
- package/dist/commands/retro.js +130 -0
- package/dist/commands/retro.js.map +1 -0
- package/dist/commands/spec.d.ts +8 -0
- package/dist/commands/spec.d.ts.map +1 -0
- package/dist/commands/spec.js +155 -0
- package/dist/commands/spec.js.map +1 -0
- package/dist/commands/status.d.ts +7 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +48 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync-global.d.ts +13 -0
- package/dist/commands/sync-global.d.ts.map +1 -0
- package/dist/commands/sync-global.js +218 -0
- package/dist/commands/sync-global.js.map +1 -0
- package/dist/commands/sync.d.ts +13 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +170 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/task/new.d.ts +13 -0
- package/dist/commands/task/new.d.ts.map +1 -0
- package/dist/commands/task/new.js +195 -0
- package/dist/commands/task/new.js.map +1 -0
- package/dist/commands/template-add.d.ts +12 -0
- package/dist/commands/template-add.d.ts.map +1 -0
- package/dist/commands/template-add.js +65 -0
- package/dist/commands/template-add.js.map +1 -0
- package/dist/commands/validate.d.ts +10 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +37 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/commands/welcome.d.ts +9 -0
- package/dist/commands/welcome.d.ts.map +1 -0
- package/dist/commands/welcome.js +166 -0
- package/dist/commands/welcome.js.map +1 -0
- package/dist/core/context.d.ts +31 -0
- package/dist/core/context.d.ts.map +1 -0
- package/dist/core/context.js +145 -0
- package/dist/core/context.js.map +1 -0
- package/dist/core/global-layer.d.ts +124 -0
- package/dist/core/global-layer.d.ts.map +1 -0
- package/dist/core/global-layer.js +456 -0
- package/dist/core/global-layer.js.map +1 -0
- package/dist/core/index.d.ts +8 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +24 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/intent-recognition.d.ts +48 -0
- package/dist/core/intent-recognition.d.ts.map +1 -0
- package/dist/core/intent-recognition.js +485 -0
- package/dist/core/intent-recognition.js.map +1 -0
- package/dist/core/state.d.ts +26 -0
- package/dist/core/state.d.ts.map +1 -0
- package/dist/core/state.js +187 -0
- package/dist/core/state.js.map +1 -0
- package/dist/core/template-engine.d.ts +28 -0
- package/dist/core/template-engine.d.ts.map +1 -0
- package/dist/core/template-engine.js +57 -0
- package/dist/core/template-engine.js.map +1 -0
- package/dist/core/validator.d.ts +26 -0
- package/dist/core/validator.d.ts.map +1 -0
- package/dist/core/validator.js +246 -0
- package/dist/core/validator.js.map +1 -0
- package/dist/core/yaml-parser.d.ts +25 -0
- package/dist/core/yaml-parser.d.ts.map +1 -0
- package/dist/core/yaml-parser.js +113 -0
- package/dist/core/yaml-parser.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/file.d.ts +29 -0
- package/dist/utils/file.d.ts.map +1 -0
- package/dist/utils/file.js +126 -0
- package/dist/utils/file.js.map +1 -0
- package/dist/utils/git.d.ts +25 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +77 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/logger.d.ts +41 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +184 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +49 -0
package/README.en.md
ADDED
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
# SpecCore
|
|
2
|
+
|
|
3
|
+
> **Code by Spec, Not by Vibe.**
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/speccore)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
|
|
9
|
+
SpecCore is the official command-line tool for the [SpecCore](https://github.com/spec-core/spec-core) specification-driven development framework. It decouples deterministic operations (file creation, directory management, format validation, status statistics) from AI, executing them directly through code to improve efficiency and reduce Token consumption.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## One Minute Overview
|
|
14
|
+
|
|
15
|
+
| Question | Answer |
|
|
16
|
+
| :--- | :--- |
|
|
17
|
+
| **What is this?** | CLI tool for SpecCore framework, deterministic operations executed by code, intelligent decisions handled by AI |
|
|
18
|
+
| **What problem does it solve?** | AI file operations are error-prone, high Token consumption, context window waste |
|
|
19
|
+
| **What do I need to install?** | Node.js >= 18, run `npm install -g speccore` |
|
|
20
|
+
| **Relationship with Slash Commands?** | CLI is the underlying execution engine for Slash Commands, AI makes decisions, CLI executes |
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Feature Highlights
|
|
25
|
+
|
|
26
|
+
- **🚀 Quick Initialization**: Initialize a complete SpecCore project structure with one command
|
|
27
|
+
- **📁 Smart Directory Management**: Auto-create iterations, tasks, shared resource directories following specifications
|
|
28
|
+
- **✅ Auto Compliance Check**: Scan all Spec files, check required fields and formats
|
|
29
|
+
- **📊 Real-time Progress Tracking**: Auto-identify active iterations, calculate task completion rates
|
|
30
|
+
- **🏥 Health Dashboard**: Evaluate project health with 4 dimensions and 12 metrics
|
|
31
|
+
- **📈 One-click Reporting**: Support Markdown/HTML/JSON format output for project reports
|
|
32
|
+
- **🧠 Context Awareness**: Auto-read `.speccore/local/context.json`, intelligently fill default values
|
|
33
|
+
- **🔄 Deterministic Execution**: File operations, format validation, status statistics all executed locally with zero Token consumption
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Design Philosophy
|
|
38
|
+
|
|
39
|
+
SpecCore adopts an architecture that **decouples deterministic logic from intelligent logic**:
|
|
40
|
+
|
|
41
|
+
| Logic Type | Responsibility | Executor | Example |
|
|
42
|
+
| :--- | :--- | :--- | :--- |
|
|
43
|
+
| **Deterministic Logic** | Structured operations | CLI code | Create directories, move files, parse YAML, validate formats, count status |
|
|
44
|
+
| **Intelligent Logic** | Understanding & Decision | AI | Understand requirements, split tasks, generate code, review outputs |
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
User Input (Slash Command)
|
|
48
|
+
│
|
|
49
|
+
▼
|
|
50
|
+
┌───────────────────────────────────────┐
|
|
51
|
+
│ AI Layer (Intelligent Decision) │
|
|
52
|
+
│ - Understand user intent │
|
|
53
|
+
│ - Decide which operations to execute│
|
|
54
|
+
│ - Generate code content │
|
|
55
|
+
└───────────────────────────────────────┘
|
|
56
|
+
│ Call CLI Commands
|
|
57
|
+
▼
|
|
58
|
+
┌───────────────────────────────────────┐
|
|
59
|
+
│ CLI Layer (Deterministic Execution) │
|
|
60
|
+
│ - Create directory structure │
|
|
61
|
+
│ - Read/write files │
|
|
62
|
+
│ - Parse YAML │
|
|
63
|
+
│ - Validate formats │
|
|
64
|
+
│ - Output JSON results │
|
|
65
|
+
└───────────────────────────────────────┘
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Core Benefit**: Directory checking, YAML parsing, and status statistics are executed deterministically by code. AI only interprets results and formats outputs, significantly reducing Token consumption.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Requirements
|
|
73
|
+
|
|
74
|
+
- **Node.js**: >= 18.0.0
|
|
75
|
+
- **Operating System**: macOS / Linux / Windows
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Installation
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Global installation (recommended)
|
|
83
|
+
npm install -g speccore
|
|
84
|
+
|
|
85
|
+
# Or use npx (no installation required, always use latest version)
|
|
86
|
+
npx speccore --version
|
|
87
|
+
|
|
88
|
+
# Or install specific version
|
|
89
|
+
npm install -g speccore@1.0.0
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Quick Start
|
|
95
|
+
|
|
96
|
+
### 1. Initialize Project
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Enter your project directory
|
|
100
|
+
cd my-project
|
|
101
|
+
|
|
102
|
+
# Initialize SpecCore
|
|
103
|
+
speccore init --mode fresh
|
|
104
|
+
|
|
105
|
+
# Or migrate existing project
|
|
106
|
+
speccore init --mode migration
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
After execution, the following structure will be generated:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
.speccore/ # Global configuration directory
|
|
113
|
+
├── CONSTITUTION.md # Technical Constitution (tech stack, standards)
|
|
114
|
+
├── SETTINGS.md # Framework configuration (switches, modes)
|
|
115
|
+
├── ITERATIONS/ # Iteration records
|
|
116
|
+
├── PATTERNS/ # Pattern library
|
|
117
|
+
├── PROJECT/ # Project-level assets
|
|
118
|
+
│ ├── OVERVIEW.md
|
|
119
|
+
│ ├── TEAM.md
|
|
120
|
+
│ └── ...
|
|
121
|
+
├── RULES/ # Adjudication rules
|
|
122
|
+
└── local/ # Local state
|
|
123
|
+
└── context.json # Current context (iteration, task, user)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### 2. Create Iteration
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
speccore iteration create --name 2026-07-User-System
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Generates `Iteration-2026-07-User-System/` directory containing:
|
|
133
|
+
- `00-Requirements/REQUIREMENT.md`
|
|
134
|
+
- `00-Technical-Design/ARCHITECTURE.md`
|
|
135
|
+
- `00-Iteration-Overview/PROJECT_GRAPH.md`
|
|
136
|
+
|
|
137
|
+
### 3. Create Tasks
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
speccore task new --name User-Login --type feature
|
|
141
|
+
speccore task new --name Phone-Registration --type feature
|
|
142
|
+
speccore task new --name Password-Reset --type bugfix
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### 4. View Progress
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# View overall progress
|
|
149
|
+
speccore progress
|
|
150
|
+
|
|
151
|
+
# JSON format output (suitable for CI/CD)
|
|
152
|
+
speccore progress --format json
|
|
153
|
+
|
|
154
|
+
# View detailed progress
|
|
155
|
+
speccore progress --detail
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### 5. Validate Compliance
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
# Validate all tasks
|
|
162
|
+
speccore validate
|
|
163
|
+
|
|
164
|
+
# Auto-fix fixable issues
|
|
165
|
+
speccore validate --fix
|
|
166
|
+
|
|
167
|
+
# JSON format output (AI can read directly)
|
|
168
|
+
speccore validate --format json
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### 6. Generate Report
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# Markdown format (default)
|
|
175
|
+
speccore report
|
|
176
|
+
|
|
177
|
+
# HTML format (suitable for email)
|
|
178
|
+
speccore report --format html --output ./report.html
|
|
179
|
+
|
|
180
|
+
# JSON format (suitable for import into other systems)
|
|
181
|
+
speccore report --format json
|
|
182
|
+
|
|
183
|
+
# Include team analysis and risk analysis
|
|
184
|
+
speccore report --team --risk
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Full Command List
|
|
190
|
+
|
|
191
|
+
### Initialization & Import
|
|
192
|
+
|
|
193
|
+
| Command | Description | Corresponding Slash Command | Deterministic |
|
|
194
|
+
| :--- | :--- | :--- | :--- |
|
|
195
|
+
| `speccore init` | Initialize SpecCore project | `/spec-init` | ✅ |
|
|
196
|
+
| `speccore import` | Import existing project | `/spec-import` | ✅ |
|
|
197
|
+
|
|
198
|
+
### Iteration Management
|
|
199
|
+
|
|
200
|
+
| Command | Description | Corresponding Slash Command | Deterministic |
|
|
201
|
+
| :--- | :--- | :--- | :--- |
|
|
202
|
+
| `speccore iteration create` | Create iteration | `/spec-iteration-create` | ✅ |
|
|
203
|
+
| `speccore iteration split` | Requirement splitting (requires AI task list) | `/spec-iteration-split` | ⚠️ |
|
|
204
|
+
|
|
205
|
+
### Task Management
|
|
206
|
+
|
|
207
|
+
| Command | Description | Corresponding Slash Command | Deterministic |
|
|
208
|
+
| :--- | :--- | :--- | :--- |
|
|
209
|
+
| `speccore task new` | Create atomic task | `/spec-new-task` | ✅ |
|
|
210
|
+
|
|
211
|
+
### Execution & Scheduling
|
|
212
|
+
|
|
213
|
+
| Command | Description | Corresponding Slash Command | Deterministic |
|
|
214
|
+
| :--- | :--- | :--- | :--- |
|
|
215
|
+
| `speccore plan` | Generate scheduling plan (DAG analysis) | `/spec-plan` | ✅ |
|
|
216
|
+
| `speccore execute` | Execute task (requires AI collaboration) | `/spec-execute` | ⚠️ |
|
|
217
|
+
|
|
218
|
+
### Validation & Review
|
|
219
|
+
|
|
220
|
+
| Command | Description | Corresponding Slash Command | Deterministic |
|
|
221
|
+
| :--- | :--- | :--- | :--- |
|
|
222
|
+
| `speccore validate` | Compliance check | `/spec-validate` | ✅ |
|
|
223
|
+
| `speccore progress` | View progress | `/spec-progress` | ✅ |
|
|
224
|
+
| `speccore status` | Project status | `/spec-status` | ✅ |
|
|
225
|
+
| `speccore health` | Health dashboard (4 dimensions, 12 metrics) | `/spec-health` | ✅ |
|
|
226
|
+
| `speccore report` | Generate project report | `/spec-report` | ✅ |
|
|
227
|
+
|
|
228
|
+
### Archive & Configuration
|
|
229
|
+
|
|
230
|
+
| Command | Description | Corresponding Slash Command | Deterministic |
|
|
231
|
+
| :--- | :--- | :--- | :--- |
|
|
232
|
+
| `speccore archive` | Archive task | `/spec-archive` | ✅ |
|
|
233
|
+
| `speccore config` | Configuration management | `/spec-config` | ✅ |
|
|
234
|
+
|
|
235
|
+
- **✅** Pure deterministic logic, fully executable by code
|
|
236
|
+
- **⚠️** Requires AI participation for understanding/generation (e.g., requirement splitting, code generation)
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Project Structure
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
speccore/
|
|
244
|
+
├── package.json
|
|
245
|
+
├── tsconfig.json
|
|
246
|
+
├── README.md
|
|
247
|
+
├── bin/
|
|
248
|
+
│ └── speccore # CLI entry script
|
|
249
|
+
├── src/
|
|
250
|
+
│ ├── index.ts # Entry file
|
|
251
|
+
│ ├── cli.ts # CLI command registration (Commander.js)
|
|
252
|
+
│ │
|
|
253
|
+
│ ├── commands/ # All CLI command implementations
|
|
254
|
+
│ │ ├── init.ts # Initialize project
|
|
255
|
+
│ │ ├── import.ts # Import existing project
|
|
256
|
+
│ │ ├── iteration/
|
|
257
|
+
│ │ │ ├── create.ts # Create iteration
|
|
258
|
+
│ │ │ └── split.ts # Requirement splitting
|
|
259
|
+
│ │ ├── task/
|
|
260
|
+
│ │ │ └── new.ts # Create task
|
|
261
|
+
│ │ ├── plan.ts # Generate scheduling plan
|
|
262
|
+
│ │ ├── execute.ts # Execute task
|
|
263
|
+
│ │ ├── validate.ts # Compliance check
|
|
264
|
+
│ │ ├── archive.ts # Archive task
|
|
265
|
+
│ │ ├── progress.ts # View progress
|
|
266
|
+
│ │ ├── status.ts # Project status
|
|
267
|
+
│ │ ├── health.ts # Health dashboard
|
|
268
|
+
│ │ ├── report.ts # Generate report
|
|
269
|
+
│ │ └── config.ts # Configuration management
|
|
270
|
+
│ │
|
|
271
|
+
│ ├── core/ # Core engine
|
|
272
|
+
│ │ ├── context.ts # Context management (read context.json)
|
|
273
|
+
│ │ ├── state.ts # State management (read PROJECT_GRAPH.md)
|
|
274
|
+
│ │ ├── yaml-parser.ts # YAML parsing
|
|
275
|
+
│ │ ├── template-engine.ts # Template rendering (Handlebars)
|
|
276
|
+
│ │ └── validator.ts # Compliance check engine
|
|
277
|
+
│ │
|
|
278
|
+
│ ├── templates/ # Built-in templates
|
|
279
|
+
│ │ ├── spec/ # Spec file templates
|
|
280
|
+
│ │ │ └── project-readme.md
|
|
281
|
+
│ │ └── code/ # Code generation templates
|
|
282
|
+
│ │ ├── spring-controller.java
|
|
283
|
+
│ │ ├── spring-service.java
|
|
284
|
+
│ │ ├── spring-test.java
|
|
285
|
+
│ │ └── nest-controller.ts
|
|
286
|
+
│ │
|
|
287
|
+
│ └── utils/
|
|
288
|
+
│ ├── file.ts # File utilities
|
|
289
|
+
│ ├── git.ts # Git utilities (get username, etc.)
|
|
290
|
+
│ └── logger.ts # Logger (with progress bar, Spinner)
|
|
291
|
+
│
|
|
292
|
+
└── dist/ # Compiled output (TypeScript → JavaScript)
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Development Guide
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
# Clone repository
|
|
301
|
+
git clone https://github.com/windfallsheng/SpecCore-ts.git
|
|
302
|
+
cd SpecCore-ts
|
|
303
|
+
|
|
304
|
+
# Install dependencies
|
|
305
|
+
npm install
|
|
306
|
+
|
|
307
|
+
# Compile TypeScript
|
|
308
|
+
npm run build
|
|
309
|
+
|
|
310
|
+
# Development mode (watch for file changes and auto-compile)
|
|
311
|
+
npm run watch
|
|
312
|
+
|
|
313
|
+
# Local testing
|
|
314
|
+
node bin/speccore --version
|
|
315
|
+
|
|
316
|
+
# Link to global (development testing)
|
|
317
|
+
npm link
|
|
318
|
+
speccore --version
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
## Related Projects
|
|
324
|
+
|
|
325
|
+
| Project | Description | GitHub | Gitee |
|
|
326
|
+
| :--- | :--- | :--- | :--- |
|
|
327
|
+
| **SpecCore** | Specification-driven development framework (methodology + file templates + Slash Commands) | [windfallsheng/SpecCore](https://github.com/windfallsheng/SpecCore) | [windfullsheng/spec-core](https://gitee.com/windfullsheng/spec-core) |
|
|
328
|
+
| **SpecCore** | CLI tool (deterministic operation execution engine) | [windfallsheng/SpecCore-ts](https://github.com/windfallsheng/SpecCore-ts) | [windfullsheng/spec-core-ts](https://gitee.com/windfullsheng/spec-core-ts) |
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## FAQ
|
|
333
|
+
|
|
334
|
+
### Q: Command not found after installation?
|
|
335
|
+
|
|
336
|
+
A: Ensure npm global bin directory is in PATH:
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
# Check global installation path
|
|
340
|
+
npm bin -g
|
|
341
|
+
|
|
342
|
+
# Add to PATH (macOS/Linux)
|
|
343
|
+
export PATH="$(npm bin -g):$PATH"
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### Q: How to update to latest version?
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
npm update -g speccore
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Q: How to uninstall?
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
npm uninstall -g speccore
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Q: How to integrate with AI tools?
|
|
359
|
+
|
|
360
|
+
A: AI tools (like WorkBuddy) execute deterministic operations by calling CLI commands. For example:
|
|
361
|
+
|
|
362
|
+
```bash
|
|
363
|
+
# When AI executes /spec-validate, it internally calls:
|
|
364
|
+
speccore validate --json
|
|
365
|
+
|
|
366
|
+
# AI reads JSON results and generates user-friendly reports
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## Contributing
|
|
372
|
+
|
|
373
|
+
Welcome to submit Issues and Pull Requests!
|
|
374
|
+
|
|
375
|
+
1. Fork this repository
|
|
376
|
+
2. Create feature branch: `git checkout -b feature/my-feature`
|
|
377
|
+
3. Commit changes: `git commit -m 'feat: add some feature'`
|
|
378
|
+
4. Push branch: `git push origin feature/my-feature`
|
|
379
|
+
5. Create Pull Request
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## Changelog
|
|
384
|
+
|
|
385
|
+
### v1.0.0 (2026-07-05)
|
|
386
|
+
|
|
387
|
+
- Initial release
|
|
388
|
+
- Supports 14 CLI commands
|
|
389
|
+
- Core engine: context management, state management, YAML parsing, template rendering, compliance checking
|
|
390
|
+
- Built-in templates: Spring Boot Controller/Service/Test, NestJS Controller
|
|
391
|
+
- Support JSON/Markdown/HTML multi-format output
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## License
|
|
396
|
+
|
|
397
|
+
[MIT](https://opensource.org/licenses/MIT)
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
<p align="center">Built with ❤️ by the SpecCore Team</p>
|