specky-sdd 3.1.0 → 3.2.1
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/CHANGELOG.md +51 -0
- package/README.md +76 -95
- package/SECURITY.md +61 -2
- package/dist/config.d.ts +14 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +90 -18
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +2 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +3 -1
- package/dist/constants.js.map +1 -1
- package/dist/index.js +48 -3
- package/dist/index.js.map +1 -1
- package/dist/services/audit-logger.d.ts +20 -4
- package/dist/services/audit-logger.d.ts.map +1 -1
- package/dist/services/audit-logger.js +91 -12
- package/dist/services/audit-logger.js.map +1 -1
- package/dist/services/rate-limiter.d.ts +33 -0
- package/dist/services/rate-limiter.d.ts.map +1 -0
- package/dist/services/rate-limiter.js +61 -0
- package/dist/services/rate-limiter.js.map +1 -0
- package/dist/services/rbac-engine.d.ts +29 -0
- package/dist/services/rbac-engine.d.ts.map +1 -0
- package/dist/services/rbac-engine.js +85 -0
- package/dist/services/rbac-engine.js.map +1 -0
- package/dist/services/state-machine.d.ts +10 -2
- package/dist/services/state-machine.d.ts.map +1 -1
- package/dist/services/state-machine.js +36 -7
- package/dist/services/state-machine.js.map +1 -1
- package/dist/services/template-engine.js +1 -1
- package/dist/services/template-engine.js.map +1 -1
- package/dist/templates/templates/analysis.md +55 -0
- package/dist/templates/templates/api-docs.md +40 -0
- package/dist/templates/templates/bugfix.md +46 -0
- package/dist/templates/templates/checklist.md +29 -0
- package/dist/templates/templates/compliance.md +28 -0
- package/dist/templates/templates/constitution.md +57 -0
- package/dist/templates/templates/cross-analysis.md +46 -0
- package/dist/templates/templates/data-model.md +35 -0
- package/dist/templates/templates/design.md +104 -0
- package/dist/templates/templates/devcontainer.md +36 -0
- package/dist/templates/templates/dockerfile.md +34 -0
- package/dist/templates/templates/journey.md +73 -0
- package/dist/templates/templates/onboarding.md +49 -0
- package/dist/templates/templates/research.md +39 -0
- package/dist/templates/templates/runbook.md +40 -0
- package/dist/templates/templates/specification.md +50 -0
- package/dist/templates/templates/sync-report.md +44 -0
- package/dist/templates/templates/tasks.md +39 -0
- package/dist/templates/terraform.md +38 -0
- package/dist/templates/test-stub.md +34 -0
- package/dist/templates/user-stories.md +39 -0
- package/dist/templates/verification.md +33 -0
- package/dist/templates/work-items.md +27 -0
- package/dist/tools/rbac.d.ts +8 -0
- package/dist/tools/rbac.d.ts.map +1 -0
- package/dist/tools/rbac.js +64 -0
- package/dist/tools/rbac.js.map +1 -0
- package/package.json +3 -6
- package/hooks/auto-checkpoint.md +0 -22
- package/hooks/auto-docs.md +0 -53
- package/hooks/auto-test.md +0 -61
- package/hooks/changelog.md +0 -74
- package/hooks/release-gate.md +0 -82
- package/hooks/security-scan.md +0 -72
- package/hooks/spec-quality.md +0 -55
- package/hooks/spec-sync.md +0 -80
- package/hooks/srp-validator.md +0 -86
- package/hooks/task-tracer.md +0 -63
- package/media/specky-icon-128.png +0 -0
- package/media/specky-icon-256.png +0 -0
- package/references/design-patterns.md +0 -434
- package/references/ears-notation.md +0 -605
- package/references/spec-templates.md +0 -936
- /package/{templates → dist/templates}/analysis.md +0 -0
- /package/{templates → dist/templates}/api-docs.md +0 -0
- /package/{templates → dist/templates}/bugfix.md +0 -0
- /package/{templates → dist/templates}/checklist.md +0 -0
- /package/{templates → dist/templates}/compliance.md +0 -0
- /package/{templates → dist/templates}/constitution.md +0 -0
- /package/{templates → dist/templates}/cross-analysis.md +0 -0
- /package/{templates → dist/templates}/data-model.md +0 -0
- /package/{templates → dist/templates}/design.md +0 -0
- /package/{templates → dist/templates}/devcontainer.md +0 -0
- /package/{templates → dist/templates}/dockerfile.md +0 -0
- /package/{templates → dist/templates}/journey.md +0 -0
- /package/{templates → dist/templates}/onboarding.md +0 -0
- /package/{templates → dist/templates}/research.md +0 -0
- /package/{templates → dist/templates}/runbook.md +0 -0
- /package/{templates → dist/templates}/specification.md +0 -0
- /package/{templates → dist/templates}/sync-report.md +0 -0
- /package/{templates → dist/templates}/tasks.md +0 -0
- /package/{templates → dist/templates/templates}/terraform.md +0 -0
- /package/{templates → dist/templates/templates}/test-stub.md +0 -0
- /package/{templates → dist/templates/templates}/user-stories.md +0 -0
- /package/{templates → dist/templates/templates}/verification.md +0 -0
- /package/{templates → dist/templates/templates}/work-items.md +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,57 @@ All notable changes to Specky are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.2.0] - 2026-04-12
|
|
9
|
+
|
|
10
|
+
### Enterprise Security Hardening
|
|
11
|
+
|
|
12
|
+
#### Rate Limiting (opt-in)
|
|
13
|
+
- **`RateLimiter` service**: Token bucket algorithm — no external deps, pure TypeScript
|
|
14
|
+
- HTTP transport now supports `rate_limit.enabled: true` in `.specky/config.yml`
|
|
15
|
+
- Config: `max_requests_per_minute` (default 60), `burst` (default 10)
|
|
16
|
+
- Returns HTTP 429 with `Retry-After` header when limit exceeded
|
|
17
|
+
- stdio mode bypasses rate limiting by design (single-session, process-isolated)
|
|
18
|
+
|
|
19
|
+
#### State File Integrity
|
|
20
|
+
- **`StateMachine.saveState()`** now writes HMAC-SHA256 signature to `.sdd-state.json.sig`
|
|
21
|
+
- **`StateMachine.loadState()`** verifies signature on every load — tamper warning to stderr on mismatch
|
|
22
|
+
- Key: `SDD_STATE_KEY` env var, or derived from workspace path using SHA-256
|
|
23
|
+
- Missing `.sig` treated as unverified (no warning) — backward-compatible with pre-v3.2.0 state files
|
|
24
|
+
|
|
25
|
+
#### Enhanced Audit Logger
|
|
26
|
+
- **Hash-chaining**: every `AuditEntry` includes `previous_hash` (SHA-256 of previous line, seed `specky-audit-v1`)
|
|
27
|
+
- **Log rotation**: rotates `.audit.jsonl` → `.audit.jsonl.1` when `audit.max_file_size_mb` exceeded (default 10 MB)
|
|
28
|
+
- **Syslog export**: RFC 5424 format written to `.audit.syslog` when `audit.export_format: syslog`
|
|
29
|
+
- **OTLP stub**: `audit.export_format: otlp` logs placeholder — implementation in next release
|
|
30
|
+
|
|
31
|
+
#### RBAC Foundation (opt-in)
|
|
32
|
+
- **`RbacEngine` service**: `viewer` / `contributor` / `admin` roles; disabled by default
|
|
33
|
+
- **`sdd_check_access`** (NEW tool #57): Returns active role, per-tool access check, full role summary
|
|
34
|
+
- Role enforcement via `SDD_ROLE` env var or `rbac.default_role` in config
|
|
35
|
+
- Viewer: read-only tools only; Contributor: all except `sdd_create_pr`; Admin: all 57 tools
|
|
36
|
+
- Config: `rbac.enabled: true`, `rbac.default_role: contributor`
|
|
37
|
+
|
|
38
|
+
#### Config Extension
|
|
39
|
+
- `.specky/config.yml` now supports nested blocks: `rate_limit:`, `audit:`, `rbac:`
|
|
40
|
+
- Parser upgraded to handle indented YAML child keys (dot-notation flattening)
|
|
41
|
+
- All new options opt-in with safe defaults — existing behavior unchanged from v3.1.0
|
|
42
|
+
|
|
43
|
+
### NPM-as-Default Migration
|
|
44
|
+
- Global install (`npm install -g specky-sdd`) is now the recommended installation method
|
|
45
|
+
- npx retained as an "alternative" option for per-workspace and convenience use
|
|
46
|
+
- All docs updated: README.md, GETTING-STARTED.md, SYSTEM-DESIGN.md, ONBOARDING.md, SECURITY.md
|
|
47
|
+
- New "Enterprise Installation Methods" section in GETTING-STARTED.md
|
|
48
|
+
- New "NPX Supply Chain Risk" + "MCP Security Framework Compliance" sections in SECURITY.md
|
|
49
|
+
|
|
50
|
+
### Security Documentation
|
|
51
|
+
- **CoSAI MCP Security White Paper** — full T-01 through T-12 threat coverage table in SECURITY.md
|
|
52
|
+
- **OWASP MCP Top 10** — M1 through M10 coverage table in SECURITY.md
|
|
53
|
+
|
|
54
|
+
### Tests
|
|
55
|
+
- 561 tests (+54): `rate-limiter.test.ts` (11), `state-integrity.test.ts` (8), `audit-enhanced.test.ts` (12), `rbac-engine.test.ts` (15), plus existing suite maintained at 100%
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
8
59
|
## [3.1.0] - 2026-04-12
|
|
9
60
|
|
|
10
61
|
### Intelligence Layer (Specs 003–007)
|
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<br>
|
|
3
3
|
<img src="media/specky-brand-logo.svg" alt="Specky" height="80">
|
|
4
4
|
<br><br>
|
|
5
|
-
<p><strong>
|
|
5
|
+
<p><strong>57 MCP tools. 10-phase pipeline. Works in any IDE.</strong></p>
|
|
6
6
|
<p>Agentic Spec-Driven Development</p>
|
|
7
7
|
|
|
8
8
|
<p>
|
|
9
|
-
<img src="https://img.shields.io/badge/tools-
|
|
9
|
+
<img src="https://img.shields.io/badge/tools-57_MCP-7c3aed?style=flat-square" alt="57 Tools"/>
|
|
10
10
|
<img src="https://img.shields.io/badge/phases-10_enforced-6d28d9?style=flat-square" alt="10 Phases"/>
|
|
11
11
|
<img src="https://img.shields.io/badge/diagrams-17_types-5b21b6?style=flat-square" alt="17 Diagrams"/>
|
|
12
12
|
<img src="https://img.shields.io/badge/compliance-6_frameworks-4c1d95?style=flat-square" alt="6 Compliance"/>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</p>
|
|
22
22
|
|
|
23
23
|
<p>
|
|
24
|
-
<a href="https://paulasilvatech.github.io/specky/">Website</a> ·
|
|
24
|
+
<a href="https://paulasilvatech.github.io/specky-site/">Website</a> ·
|
|
25
25
|
<a href="GETTING-STARTED.md">Getting Started</a> ·
|
|
26
26
|
<a href="https://www.npmjs.com/package/specky-sdd">npm</a> ·
|
|
27
27
|
<a href="SECURITY.md">Security</a>
|
|
@@ -41,17 +41,17 @@
|
|
|
41
41
|
| | [Input Methods](#input-methods-6-ways-to-start) | 6 ways to feed Specky |
|
|
42
42
|
| | [Three Project Types](#three-project-types-one-pipeline) | Greenfield, Brownfield, Modernization |
|
|
43
43
|
| **Pipeline** | [Pipeline and LGTM Gates](#pipeline-and-lgtm-gates) | 10 phases with human review gates |
|
|
44
|
-
| | [All
|
|
44
|
+
| | [All 57 Tools](#all-57-tools) | Complete tool reference by category |
|
|
45
45
|
| | [EARS Notation](#ears-notation) | The 6 requirement patterns |
|
|
46
46
|
| **Enterprise** | [Compliance Frameworks](#compliance-frameworks) | HIPAA, SOC2, GDPR, PCI-DSS, ISO 27001 |
|
|
47
47
|
| | [Enterprise Ready](#enterprise-ready) | Security, audit trail, quality gates |
|
|
48
48
|
| **Platform** | [The SDD Platform](#the-spec-driven-development-platform) | Built on Spec-Kit, everything included |
|
|
49
|
-
| | [Roadmap](#roadmap) | v3.
|
|
49
|
+
| | [Roadmap](#roadmap) | v3.2 current, v3.3+ planned |
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
## What is Specky?
|
|
53
53
|
|
|
54
|
-
Specky is an open-source **MCP server** that turns the [Spec-Kit](https://github.com/paulasilvatech/spec-kit) SDD methodology into a **programmable enforcement engine** with
|
|
54
|
+
Specky is an open-source **MCP server** that turns the [Spec-Kit](https://github.com/paulasilvatech/spec-kit) SDD methodology into a **programmable enforcement engine** with 57 validated tools. It provides a deterministic pipeline from **any input** (meeting transcripts, documents, Figma designs, or natural language prompts) through specifications, architecture, infrastructure as code, implementation, and deployment.
|
|
55
55
|
|
|
56
56
|
**Spec-Kit** provides the methodology: EARS notation, gated pipeline phases, constitution model, quality patterns. **Specky** reimplements all of it as MCP tools and adds programmatic enforcement: a state machine that blocks phase-skipping, an EARS validator, cross-artifact analysis, compliance engines, test generation, and MCP-to-MCP routing.
|
|
57
57
|
|
|
@@ -98,8 +98,8 @@ Specky adds a **deterministic engine** between your intent and your code:
|
|
|
98
98
|
|
|
99
99
|
| Capability | Specky |
|
|
100
100
|
|---|---|
|
|
101
|
-
| Any input (PDF, DOCX, PPTX, transcript, Figma) to spec |
|
|
102
|
-
| EARS validation (programmatic, not AI guessing) |
|
|
101
|
+
| Any input (PDF, DOCX, PPTX, transcript, Figma) to spec | 57 MCP tools handle all input formats |
|
|
102
|
+
| EARS validation (programmatic, not AI guessing) | 6 patterns enforced at schema level |
|
|
103
103
|
| Enforced pipeline (not suggestions) | 10 phases with actual gates that block advancement |
|
|
104
104
|
| 17 diagram types generated automatically | C4 (4 levels), sequence, ER, activity, use case, DFD, deployment, network |
|
|
105
105
|
| Infrastructure as Code | Terraform, Bicep, Dockerfile from DESIGN.md |
|
|
@@ -132,65 +132,65 @@ Specky adds a **deterministic engine** between your intent and your code:
|
|
|
132
132
|
### Step 2: Install
|
|
133
133
|
|
|
134
134
|
<details open>
|
|
135
|
-
<summary><strong>
|
|
135
|
+
<summary><strong>Global (recommended): Install once, use everywhere</strong></summary>
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
Install globally so `specky-sdd` is always available — no re-download on every run:
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
```bash
|
|
140
|
+
npm install -g specky-sdd
|
|
141
|
+
```
|
|
140
142
|
|
|
143
|
+
Then configure your IDE to use the global install:
|
|
144
|
+
|
|
145
|
+
**VS Code** (`.vscode/mcp.json`):
|
|
141
146
|
```json
|
|
142
147
|
{
|
|
143
148
|
"servers": {
|
|
144
149
|
"specky": {
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"env": {
|
|
148
|
-
"SDD_WORKSPACE": "${workspaceFolder}"
|
|
149
|
-
}
|
|
150
|
+
"type": "stdio",
|
|
151
|
+
"command": "specky-sdd"
|
|
150
152
|
}
|
|
151
153
|
}
|
|
152
154
|
}
|
|
153
155
|
```
|
|
154
156
|
|
|
155
|
-
**
|
|
156
|
-
|
|
157
|
+
**Claude Code**:
|
|
157
158
|
```bash
|
|
158
|
-
claude mcp add specky --
|
|
159
|
+
claude mcp add specky -- specky-sdd
|
|
159
160
|
```
|
|
160
161
|
|
|
161
|
-
**
|
|
162
|
+
**Claude Desktop** (`claude_desktop_config.json`):
|
|
163
|
+
|
|
164
|
+
| OS | Config location |
|
|
165
|
+
|----|----------------|
|
|
166
|
+
| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
167
|
+
| Linux | `~/.config/Claude/claude_desktop_config.json` |
|
|
168
|
+
| Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
162
169
|
|
|
163
170
|
```json
|
|
164
171
|
{
|
|
165
|
-
"
|
|
166
|
-
"
|
|
167
|
-
|
|
172
|
+
"mcpServers": {
|
|
173
|
+
"specky": {
|
|
174
|
+
"command": "specky-sdd"
|
|
175
|
+
}
|
|
168
176
|
}
|
|
169
177
|
}
|
|
170
178
|
```
|
|
171
179
|
|
|
172
|
-
> **Tip:** Commit the config file to Git so every team member gets Specky automatically when they clone the repo.
|
|
173
|
-
|
|
174
180
|
</details>
|
|
175
181
|
|
|
176
182
|
<details>
|
|
177
|
-
<summary><strong>
|
|
178
|
-
|
|
179
|
-
Install globally and Specky is available everywhere on your machine:
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
npm install -g specky-sdd
|
|
183
|
-
```
|
|
183
|
+
<summary><strong>Per Workspace (alternative): npx, no global install</strong></summary>
|
|
184
184
|
|
|
185
|
-
|
|
185
|
+
Add a config file to the repo so teammates get Specky automatically on clone — no global install needed.
|
|
186
186
|
|
|
187
187
|
**VS Code** (`.vscode/mcp.json`):
|
|
188
188
|
```json
|
|
189
189
|
{
|
|
190
190
|
"servers": {
|
|
191
191
|
"specky": {
|
|
192
|
-
"
|
|
193
|
-
"
|
|
192
|
+
"type": "stdio",
|
|
193
|
+
"command": "specky-sdd"
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
}
|
|
@@ -201,24 +201,7 @@ Then configure your IDE to use the global install:
|
|
|
201
201
|
claude mcp add specky -- specky-sdd
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
| OS | Config location |
|
|
207
|
-
|----|----------------|
|
|
208
|
-
| macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
209
|
-
| Linux | `~/.config/Claude/claude_desktop_config.json` |
|
|
210
|
-
| Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
211
|
-
|
|
212
|
-
```json
|
|
213
|
-
{
|
|
214
|
-
"mcpServers": {
|
|
215
|
-
"specky": {
|
|
216
|
-
"command": "specky-sdd",
|
|
217
|
-
"env": { "SDD_WORKSPACE": "/path/to/your/project" }
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
```
|
|
204
|
+
> Commit `.vscode/mcp.json` to Git so every team member gets Specky automatically.
|
|
222
205
|
|
|
223
206
|
</details>
|
|
224
207
|
|
|
@@ -255,7 +238,7 @@ Open your AI IDE and type:
|
|
|
255
238
|
> What tools does Specky have?
|
|
256
239
|
```
|
|
257
240
|
|
|
258
|
-
The AI should list the
|
|
241
|
+
The AI should list the 57 SDD tools. If you see them, Specky is working.
|
|
259
242
|
|
|
260
243
|
### Try It Now
|
|
261
244
|
|
|
@@ -541,7 +524,7 @@ The AI calls:
|
|
|
541
524
|
|
|
542
525
|
The AI calls `sdd_export_work_items` + `sdd_create_pr` → generates work item payloads and PR body with full spec traceability.
|
|
543
526
|
|
|
544
|
-
> **Next:** **Next:** Learn about [EARS notation](#ears-notation) to understand the requirement patterns, or see [All
|
|
527
|
+
> **Next:** **Next:** Learn about [EARS notation](#ears-notation) to understand the requirement patterns, or see [All 57 Tools](#all-57-tools) for a complete reference.
|
|
545
528
|
|
|
546
529
|
|
|
547
530
|
## Brownfield Project: Add Features to Existing Code
|
|
@@ -734,9 +717,9 @@ The AI calls `sdd_advance_phase` → moves the pipeline forward if all prerequis
|
|
|
734
717
|
All artifacts are saved in [`.specs/NNN-feature/`](#where-specifications-live). See [Input Methods](#input-methods-6-ways-to-start) for how to feed data into the pipeline.
|
|
735
718
|
|
|
736
719
|
|
|
737
|
-
## All
|
|
720
|
+
## All 57 Tools
|
|
738
721
|
|
|
739
|
-
### Input and Conversion (
|
|
722
|
+
### Input and Conversion (6)
|
|
740
723
|
|
|
741
724
|
| Tool | Description |
|
|
742
725
|
|------|-------------|
|
|
@@ -744,9 +727,10 @@ All artifacts are saved in [`.specs/NNN-feature/`](#where-specifications-live).
|
|
|
744
727
|
| `sdd_import_transcript` | Parse meeting transcripts (Teams, Zoom, Google Meet) |
|
|
745
728
|
| `sdd_auto_pipeline` | Any input to complete spec pipeline (all documents) |
|
|
746
729
|
| `sdd_batch_import` | Process folder of mixed documents |
|
|
730
|
+
| `sdd_batch_transcripts` | Process folder of meeting transcripts |
|
|
747
731
|
| `sdd_figma_to_spec` | Figma design to requirements specification |
|
|
748
732
|
|
|
749
|
-
### Pipeline Core (
|
|
733
|
+
### Pipeline Core (9)
|
|
750
734
|
|
|
751
735
|
| Tool | Description |
|
|
752
736
|
|------|-------------|
|
|
@@ -756,6 +740,7 @@ All artifacts are saved in [`.specs/NNN-feature/`](#where-specifications-live).
|
|
|
756
740
|
| `sdd_clarify` | Resolve ambiguities with decision tree |
|
|
757
741
|
| `sdd_write_design` | 12-section system design (C4 model) with sequence diagrams, ERD, API flow |
|
|
758
742
|
| `sdd_write_tasks` | Task breakdown with dependency graph |
|
|
743
|
+
| `sdd_write_bugfix` | Bugfix specification from issue description |
|
|
759
744
|
| `sdd_run_analysis` | Quality gate analysis with coverage heatmap |
|
|
760
745
|
| `sdd_advance_phase` | Move to next pipeline phase |
|
|
761
746
|
|
|
@@ -794,7 +779,7 @@ All artifacts are saved in [`.specs/NNN-feature/`](#where-specifications-live).
|
|
|
794
779
|
| `sdd_setup_codespaces` | GitHub Codespaces configuration |
|
|
795
780
|
| `sdd_generate_devcontainer` | .devcontainer/devcontainer.json generation |
|
|
796
781
|
|
|
797
|
-
### Integration and Export (
|
|
782
|
+
### Integration and Export (7)
|
|
798
783
|
|
|
799
784
|
| Tool | Description |
|
|
800
785
|
|------|-------------|
|
|
@@ -803,17 +788,20 @@ All artifacts are saved in [`.specs/NNN-feature/`](#where-specifications-live).
|
|
|
803
788
|
| `sdd_create_pr` | PR payload with spec summary |
|
|
804
789
|
| `sdd_implement` | Ordered implementation plan with checkpoints |
|
|
805
790
|
| `sdd_research` | Resolve unknowns in RESEARCH.md |
|
|
791
|
+
| `sdd_check_sync` | Detect drift between specification and implementation |
|
|
792
|
+
| `sdd_detect_drift` | Intent drift detection with amendment suggestions |
|
|
806
793
|
|
|
807
|
-
### Documentation (
|
|
794
|
+
### Documentation (5)
|
|
808
795
|
|
|
809
796
|
| Tool | Description |
|
|
810
797
|
|------|-------------|
|
|
811
798
|
| `sdd_generate_docs` | Complete auto-documentation |
|
|
799
|
+
| `sdd_generate_all_docs` | Generate all documentation types in parallel |
|
|
812
800
|
| `sdd_generate_api_docs` | API documentation from design |
|
|
813
801
|
| `sdd_generate_runbook` | Operational runbook |
|
|
814
802
|
| `sdd_generate_onboarding` | Developer onboarding guide |
|
|
815
803
|
|
|
816
|
-
### Utility (
|
|
804
|
+
### Utility (8)
|
|
817
805
|
|
|
818
806
|
| Tool | Description |
|
|
819
807
|
|------|-------------|
|
|
@@ -822,6 +810,9 @@ All artifacts are saved in [`.specs/NNN-feature/`](#where-specifications-live).
|
|
|
822
810
|
| `sdd_scan_codebase` | Detect tech stack and structure |
|
|
823
811
|
| `sdd_metrics` | Project metrics dashboard |
|
|
824
812
|
| `sdd_amend` | Amend project constitution |
|
|
813
|
+
| `sdd_context_status` | Context tiering status (Hot/Domain/Cold) |
|
|
814
|
+
| `sdd_model_routing` | Model routing guidance for current task |
|
|
815
|
+
| `sdd_check_access` | RBAC access check for current role |
|
|
825
816
|
|
|
826
817
|
### Testing (3)
|
|
827
818
|
|
|
@@ -883,13 +874,14 @@ Together they form the **SDD layer** of the GitHub + Microsoft enterprise platfo
|
|
|
883
874
|
{
|
|
884
875
|
"servers": {
|
|
885
876
|
"specky": {
|
|
886
|
-
"
|
|
887
|
-
"
|
|
877
|
+
"type": "stdio",
|
|
878
|
+
"command": "specky-sdd"
|
|
888
879
|
}
|
|
889
880
|
}
|
|
890
881
|
}
|
|
891
882
|
```
|
|
892
883
|
|
|
884
|
+
> **Note:** This example assumes `specky-sdd` is installed globally (`npm install -g specky-sdd`). See the [Quick Start](#quick-start) section for per-workspace and Docker alternatives.
|
|
893
885
|
|
|
894
886
|
## Project Configuration
|
|
895
887
|
|
|
@@ -1001,7 +993,7 @@ Specky is built with enterprise adoption in mind.
|
|
|
1001
993
|
- **Zod `.strict()` validation** — every tool input is schema-validated; unknown fields rejected
|
|
1002
994
|
- **security-scan hook** blocks commits containing hardcoded secrets (exit code 2)
|
|
1003
995
|
- See [SECURITY.md](SECURITY.md) for full OWASP Top 10 coverage
|
|
1004
|
-
- See [
|
|
996
|
+
- See [SECURITY.md](SECURITY.md) for complete security architecture
|
|
1005
997
|
|
|
1006
998
|
### Security Best Practices
|
|
1007
999
|
|
|
@@ -1057,46 +1049,29 @@ Every pipeline phase produces a traceable artifact in `.specs/NNN-feature/`. The
|
|
|
1057
1049
|
- **EARS Validator** — programmatic requirement quality enforcement
|
|
1058
1050
|
- **Cross-Artifact Analysis** — automatic alignment checking between spec, design, and tasks
|
|
1059
1051
|
- **Phase Enforcement** — state machine blocks phase-skipping; required files gate advancement
|
|
1060
|
-
- **
|
|
1052
|
+
- **Comprehensive test suite** — CI enforces thresholds on every push
|
|
1061
1053
|
|
|
1062
1054
|
|
|
1063
1055
|
## Development
|
|
1064
1056
|
|
|
1065
1057
|
```bash
|
|
1066
|
-
#
|
|
1067
|
-
|
|
1068
|
-
cd specky
|
|
1069
|
-
npm install
|
|
1070
|
-
|
|
1071
|
-
# Build
|
|
1072
|
-
npm run build
|
|
1073
|
-
|
|
1074
|
-
# Run tests (292 tests coverage)
|
|
1075
|
-
npm test
|
|
1076
|
-
|
|
1077
|
-
# Run tests with coverage report
|
|
1078
|
-
npm run test:coverage
|
|
1079
|
-
|
|
1080
|
-
# Development mode (auto-reload on file changes)
|
|
1081
|
-
npm run dev
|
|
1058
|
+
# Install globally
|
|
1059
|
+
npm install -g specky-sdd
|
|
1082
1060
|
|
|
1083
1061
|
# Verify MCP handshake (quick smoke test)
|
|
1084
|
-
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' |
|
|
1085
|
-
|
|
1086
|
-
# Build and run with Docker locally
|
|
1087
|
-
docker build -t specky-sdd:dev .
|
|
1088
|
-
docker run -p 3200:3200 -v $(pwd):/workspace specky-sdd:dev
|
|
1089
|
-
curl http://localhost:3200/health
|
|
1062
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | specky-sdd 2>/dev/null
|
|
1090
1063
|
```
|
|
1091
1064
|
|
|
1065
|
+
For contributors, see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
1066
|
+
|
|
1092
1067
|
|
|
1093
1068
|
## Roadmap
|
|
1094
1069
|
|
|
1095
|
-
### v3.
|
|
1070
|
+
### v3.2 (current)
|
|
1096
1071
|
|
|
1097
1072
|
| Capability | Status |
|
|
1098
1073
|
|------------|--------|
|
|
1099
|
-
|
|
|
1074
|
+
| 57 MCP tools across 10 enforced pipeline phases | Stable |
|
|
1100
1075
|
| Phase validation on every tool with gate enforcement | Stable |
|
|
1101
1076
|
| 17 software engineering diagram types (C4, sequence, ER, DFD, deployment, network) | Stable |
|
|
1102
1077
|
| 12-section system design template (C4 model, security, infrastructure) | Stable |
|
|
@@ -1105,15 +1080,22 @@ curl http://localhost:3200/health
|
|
|
1105
1080
|
| Turnkey spec from natural language (`sdd_turnkey_spec`) | Stable |
|
|
1106
1081
|
| Property-based testing with fast-check and Hypothesis (`sdd_generate_pbt`) | Stable |
|
|
1107
1082
|
| Checkpoint/restore for spec artifacts | Stable |
|
|
1108
|
-
|
|
|
1083
|
+
| Intelligence layer: model routing hints on all tools | Stable |
|
|
1084
|
+
| Context tiering: Hot/Domain/Cold with token savings | Stable |
|
|
1085
|
+
| Cognitive debt metrics at LGTM gates | Stable |
|
|
1086
|
+
| Test traceability: REQ-ID → test coverage mapping | Stable |
|
|
1087
|
+
| Intent drift detection with amendment suggestions | Stable |
|
|
1088
|
+
| 10 automation hooks (2 blocking) | Stable |
|
|
1109
1089
|
| 12 Claude Code commands + 5 Copilot agents | Stable |
|
|
1110
1090
|
| 6 compliance frameworks (HIPAA, SOC2, GDPR, PCI-DSS, ISO 27001) | Stable |
|
|
1111
1091
|
| 6 input types (transcript, PDF, DOCX, Figma, codebase, raw text) | Stable |
|
|
1112
1092
|
| Test generation for 6 frameworks (vitest, jest, playwright, pytest, junit, xunit) | Stable |
|
|
1113
1093
|
| MCP-to-MCP routing (GitHub, Azure DevOps, Jira, Terraform, Figma, Docker) | Stable |
|
|
1114
|
-
|
|
|
1094
|
+
| SBOM + cosign signing on Docker image | Stable |
|
|
1095
|
+
| JSONL audit logger (optional) | Stable |
|
|
1096
|
+
| Comprehensive test suite | Stable |
|
|
1115
1097
|
|
|
1116
|
-
### v3.
|
|
1098
|
+
### v3.3+ (planned)
|
|
1117
1099
|
|
|
1118
1100
|
| Feature | Description |
|
|
1119
1101
|
|---------|-------------|
|
|
@@ -1121,10 +1103,9 @@ curl http://localhost:3200/health
|
|
|
1121
1103
|
| Observability | OpenTelemetry metrics and structured logging |
|
|
1122
1104
|
| Internationalization | Spec templates in PT-BR, ES, FR, DE, JA |
|
|
1123
1105
|
| Automated shrinking | fast-check/Hypothesis shrinking feedback into spec refinement |
|
|
1124
|
-
|
|
|
1125
|
-
| Persistent audit log | Centralized audit trail beyond `.sdd-state.json` |
|
|
1106
|
+
| Centralized audit log | SIEM-integrated tamper-evident audit trail |
|
|
1126
1107
|
| Multi-tenant | Isolated workspaces for multiple teams |
|
|
1127
|
-
|
|
|
1108
|
+
| SSO / SAML | Federated identity for enterprise auth |
|
|
1128
1109
|
|
|
1129
1110
|
Have a feature request? [Open an issue](https://github.com/paulasilvatech/specky/issues).
|
|
1130
1111
|
|
package/SECURITY.md
CHANGED
|
@@ -26,7 +26,7 @@ If you discover a security vulnerability in Specky, please report it responsibly
|
|
|
26
26
|
|
|
27
27
|
### Input Validation
|
|
28
28
|
|
|
29
|
-
All
|
|
29
|
+
All 56 MCP tool inputs are validated using [Zod](https://zod.dev/) schemas with `.strict()` mode. No unknown fields are accepted. This prevents injection of unexpected parameters through the MCP JSON-RPC interface.
|
|
30
30
|
|
|
31
31
|
```
|
|
32
32
|
AI Client → JSON-RPC → Zod .strict() validation → Service layer
|
|
@@ -116,7 +116,7 @@ When using HTTP transport mode (`--http`), bind to `localhost` only. Do not expo
|
|
|
116
116
|
|
|
117
117
|
| Practice | Details |
|
|
118
118
|
|----------|---------|
|
|
119
|
-
| **Use stdio mode by default** | `
|
|
119
|
+
| **Use stdio mode by default** | `specky-sdd` (global install) — no network exposure, process-level isolation |
|
|
120
120
|
| **Never expose HTTP mode publicly** | `--http` mode has no authentication or TLS. If you need remote access, place behind a reverse proxy (nginx, Caddy, Traefik) with TLS and authentication |
|
|
121
121
|
| **Protect `.specs/` directory** | Contains architecture details, API contracts, security models. Add to `.gitignore` for sensitive projects, or use a private repository |
|
|
122
122
|
| **Protect `.checkpoints/`** | Contains full copies of all spec artifacts. Treat like source code |
|
|
@@ -183,3 +183,62 @@ These are **architectural guarantees**, not configuration options:
|
|
|
183
183
|
- **Never logs sensitive data** — logs go to stderr, contain only operational messages
|
|
184
184
|
|
|
185
185
|
See [docs/SYSTEM-DESIGN.md](docs/SYSTEM-DESIGN.md) for the complete security architecture with threat model.
|
|
186
|
+
|
|
187
|
+
## NPX Supply Chain Risk
|
|
188
|
+
|
|
189
|
+
Running `npx specky-sdd` without a pinned version downloads the latest package from npm on every invocation. This creates a supply-chain exposure: a compromised npm registry entry or a typosquat could execute malicious code in your environment before Specky even starts.
|
|
190
|
+
|
|
191
|
+
**Recommended mitigations:**
|
|
192
|
+
|
|
193
|
+
| Approach | Risk reduction | Notes |
|
|
194
|
+
|----------|---------------|-------|
|
|
195
|
+
| `npm install -g specky-sdd` | **High** — fetches once, runs offline after | Recommended default |
|
|
196
|
+
| `npm install -g specky-sdd@3.2.0` | **Higher** — version-pinned, no silent upgrades | Best for reproducible environments |
|
|
197
|
+
| Docker (`ghcr.io/paulasilvatech/specky:3.2.0`) | **Highest** — immutable image by digest | Best for CI/CD and air-gapped |
|
|
198
|
+
| `npx specky-sdd` (unversioned) | **Baseline** — re-downloads on each invocation | Avoid in production pipelines |
|
|
199
|
+
|
|
200
|
+
**Workspace isolation pattern** (CI/CD):
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
# Install into a local vendor directory — no global write permissions needed
|
|
204
|
+
npm install specky-sdd@3.2.0 --prefix ./vendor --ignore-scripts
|
|
205
|
+
./vendor/node_modules/.bin/specky-sdd
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
The `--ignore-scripts` flag prevents npm lifecycle scripts from running during install, which is a common supply-chain attack vector.
|
|
209
|
+
|
|
210
|
+
## MCP Security Framework Compliance
|
|
211
|
+
|
|
212
|
+
### CoSAI MCP Security White Paper — Threat Category Coverage
|
|
213
|
+
|
|
214
|
+
Specky addresses the 12 threat categories from the CoSAI MCP Security White Paper:
|
|
215
|
+
|
|
216
|
+
| ID | Threat Category | Specky Mitigation |
|
|
217
|
+
|----|----------------|-------------------|
|
|
218
|
+
| T-01 | Tool Poisoning | Zod `.strict()` on all 57 tool inputs — no unknown fields accepted |
|
|
219
|
+
| T-02 | Prompt Injection via Tool Results | No user-controlled data interpolated into tool responses |
|
|
220
|
+
| T-03 | Excessive Tool Permissions | Thin Tools pattern — each tool does exactly one operation |
|
|
221
|
+
| T-04 | Insecure Data Storage | FileManager enforces workspace boundary; no secrets in files |
|
|
222
|
+
| T-05 | Insufficient Input Validation | All inputs validated with Zod schemas before reaching service layer |
|
|
223
|
+
| T-06 | Uncontrolled Resource Consumption | Rate limiter (opt-in) for HTTP mode; stdio is single-session |
|
|
224
|
+
| T-07 | Broken Access Control | RBAC engine (opt-in) — viewer/contributor/admin roles; path sanitization |
|
|
225
|
+
| T-08 | Supply Chain Compromise | 2 runtime deps only; Dependabot enabled; global install recommended |
|
|
226
|
+
| T-09 | Credential Leakage | No secrets in logs (stderr only); no credentials in spec artifacts |
|
|
227
|
+
| T-10 | Insecure Communication | stdio mode has zero network exposure; HTTP mode binds to localhost |
|
|
228
|
+
| T-11 | State Manipulation | HMAC-SHA256 signature on `.sdd-state.json`; tamper detection on load |
|
|
229
|
+
| T-12 | Audit Trail Integrity | Hash-chained JSONL audit log; rotation; syslog/OTLP export (opt-in) |
|
|
230
|
+
|
|
231
|
+
### OWASP MCP Top 10 Coverage
|
|
232
|
+
|
|
233
|
+
| # | OWASP MCP Risk | Specky Mitigation |
|
|
234
|
+
|---|---------------|-------------------|
|
|
235
|
+
| M1 | Prompt Injection | No dynamic content in tool descriptions; outputs are structured JSON |
|
|
236
|
+
| M2 | Insecure Tool Design | Thin Tools / Fat Services — tools are pure input/output wrappers |
|
|
237
|
+
| M3 | Excessive Agency | No shell execution, no outbound network, no code eval |
|
|
238
|
+
| M4 | Insufficient Authentication | HTTP mode delegates to reverse proxy; stdio is process-isolated |
|
|
239
|
+
| M5 | Broken Object-Level Authorization | RBAC engine enforces per-tool access by role (opt-in) |
|
|
240
|
+
| M6 | Sensitive Data Exposure | FileManager path boundary; no credential logging; workspace-scoped I/O |
|
|
241
|
+
| M7 | Insecure Plugin Composition | Fixed tool set at startup — no dynamic plugin loading |
|
|
242
|
+
| M8 | Improper Error Handling | All service errors caught; tools return structured error responses |
|
|
243
|
+
| M9 | Insufficient Logging | Hash-chained audit trail; syslog export available |
|
|
244
|
+
| M10 | Vulnerable Dependencies | 2 runtime deps; `npm audit` in CI; Dependabot on GitHub |
|
package/dist/config.d.ts
CHANGED
|
@@ -3,10 +3,23 @@ export interface SpeckyConfig {
|
|
|
3
3
|
default_framework?: string;
|
|
4
4
|
compliance_frameworks?: string[];
|
|
5
5
|
audit_enabled?: boolean;
|
|
6
|
+
rate_limit?: {
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
max_requests_per_minute?: number;
|
|
9
|
+
burst?: number;
|
|
10
|
+
};
|
|
11
|
+
audit?: {
|
|
12
|
+
export_format?: "jsonl" | "syslog" | "otlp";
|
|
13
|
+
max_file_size_mb?: number;
|
|
14
|
+
};
|
|
15
|
+
rbac?: {
|
|
16
|
+
enabled?: boolean;
|
|
17
|
+
default_role?: "viewer" | "contributor" | "admin";
|
|
18
|
+
};
|
|
6
19
|
}
|
|
7
20
|
/**
|
|
8
21
|
* Load `.specky/config.yml` from workspace root. Returns defaults if not found.
|
|
9
|
-
*
|
|
22
|
+
* Handles both flat keys (key: value) and nested blocks (key:\n sub: value).
|
|
10
23
|
*/
|
|
11
24
|
export declare function loadConfig(workspaceRoot: string): Required<SpeckyConfig>;
|
|
12
25
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,YAAY;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,YAAY;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE;QACX,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,uBAAuB,CAAC,EAAE,MAAM,CAAC;QACjC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,KAAK,CAAC,EAAE;QACN,aAAa,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;QAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B,CAAC;IACF,IAAI,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,YAAY,CAAC,EAAE,QAAQ,GAAG,aAAa,GAAG,OAAO,CAAC;KACnD,CAAC;CACH;AAYD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,QAAQ,CAAC,YAAY,CAAC,CA6DxE"}
|