specky-sdd 3.0.0 → 3.2.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/CHANGELOG.md +94 -1
- package/README.md +234 -224
- package/SECURITY.md +137 -3
- 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 +5 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +9 -1
- package/dist/constants.js.map +1 -1
- package/dist/index.js +57 -6
- package/dist/index.js.map +1 -1
- package/dist/schemas/context.d.ts +9 -0
- package/dist/schemas/context.d.ts.map +1 -0
- package/dist/schemas/context.js +10 -0
- package/dist/schemas/context.js.map +1 -0
- package/dist/schemas/metrics.d.ts +9 -0
- package/dist/schemas/metrics.d.ts.map +1 -0
- package/dist/schemas/metrics.js +10 -0
- package/dist/schemas/metrics.js.map +1 -0
- package/dist/schemas/routing.d.ts +9 -0
- package/dist/schemas/routing.d.ts.map +1 -0
- package/dist/schemas/routing.js +21 -0
- package/dist/schemas/routing.js.map +1 -0
- package/dist/services/audit-logger.d.ts +46 -0
- package/dist/services/audit-logger.d.ts.map +1 -0
- package/dist/services/audit-logger.js +143 -0
- package/dist/services/audit-logger.js.map +1 -0
- package/dist/services/cognitive-debt-engine.d.ts +22 -0
- package/dist/services/cognitive-debt-engine.d.ts.map +1 -0
- package/dist/services/cognitive-debt-engine.js +52 -0
- package/dist/services/cognitive-debt-engine.js.map +1 -0
- package/dist/services/context-tiering-engine.d.ts +38 -0
- package/dist/services/context-tiering-engine.d.ts.map +1 -0
- package/dist/services/context-tiering-engine.js +66 -0
- package/dist/services/context-tiering-engine.js.map +1 -0
- package/dist/services/intent-drift-engine.d.ts +41 -0
- package/dist/services/intent-drift-engine.d.ts.map +1 -0
- package/dist/services/intent-drift-engine.js +101 -0
- package/dist/services/intent-drift-engine.js.map +1 -0
- package/dist/services/metrics-generator.d.ts +42 -0
- package/dist/services/metrics-generator.d.ts.map +1 -0
- package/dist/services/metrics-generator.js +200 -0
- package/dist/services/metrics-generator.js.map +1 -0
- package/dist/services/model-routing-engine.d.ts +38 -0
- package/dist/services/model-routing-engine.d.ts.map +1 -0
- package/dist/services/model-routing-engine.js +127 -0
- package/dist/services/model-routing-engine.js.map +1 -0
- 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 +16 -3
- package/dist/services/state-machine.d.ts.map +1 -1
- package/dist/services/state-machine.js +69 -7
- package/dist/services/state-machine.js.map +1 -1
- package/dist/services/template-engine.d.ts +5 -2
- package/dist/services/template-engine.d.ts.map +1 -1
- package/dist/services/template-engine.js +20 -5
- package/dist/services/template-engine.js.map +1 -1
- package/dist/services/test-result-parser.d.ts +23 -0
- package/dist/services/test-result-parser.d.ts.map +1 -0
- package/dist/services/test-result-parser.js +90 -0
- package/dist/services/test-result-parser.js.map +1 -0
- package/dist/services/test-traceability-mapper.d.ts +37 -0
- package/dist/services/test-traceability-mapper.d.ts.map +1 -0
- package/dist/services/test-traceability-mapper.js +102 -0
- package/dist/services/test-traceability-mapper.js.map +1 -0
- package/dist/tools/analysis.d.ts +2 -1
- package/dist/tools/analysis.d.ts.map +1 -1
- package/dist/tools/analysis.js +25 -1
- package/dist/tools/analysis.js.map +1 -1
- package/dist/tools/context.d.ts +9 -0
- package/dist/tools/context.d.ts.map +1 -0
- package/dist/tools/context.js +86 -0
- package/dist/tools/context.js.map +1 -0
- package/dist/tools/metrics.d.ts +11 -0
- package/dist/tools/metrics.d.ts.map +1 -0
- package/dist/tools/metrics.js +105 -0
- package/dist/tools/metrics.js.map +1 -0
- package/dist/tools/pipeline.d.ts.map +1 -1
- package/dist/tools/pipeline.js +21 -0
- package/dist/tools/pipeline.js.map +1 -1
- 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/dist/tools/response-builder.d.ts.map +1 -1
- package/dist/tools/response-builder.js +4 -0
- package/dist/tools/response-builder.js.map +1 -1
- package/dist/tools/routing.d.ts +7 -0
- package/dist/tools/routing.d.ts.map +1 -0
- package/dist/tools/routing.js +67 -0
- package/dist/tools/routing.js.map +1 -0
- package/dist/tools/testing.d.ts +3 -1
- package/dist/tools/testing.d.ts.map +1 -1
- package/dist/tools/testing.js +47 -3
- package/dist/tools/testing.js.map +1 -1
- package/dist/tools/utility.d.ts +2 -1
- package/dist/tools/utility.d.ts.map +1 -1
- package/dist/tools/utility.js +51 -1
- package/dist/tools/utility.js.map +1 -1
- package/dist/types.d.ts +16 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/context-helper.d.ts +13 -0
- package/dist/utils/context-helper.d.ts.map +1 -0
- package/dist/utils/context-helper.js +14 -0
- package/dist/utils/context-helper.js.map +1 -0
- package/dist/utils/routing-helper.d.ts +16 -0
- package/dist/utils/routing-helper.d.ts.map +1 -0
- package/dist/utils/routing-helper.js +16 -0
- package/dist/utils/routing-helper.js.map +1 -0
- package/package.json +5 -7
- 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/security-scan.md +0 -72
- package/hooks/spec-sync.md +0 -80
- package/hooks/srp-validator.md +0 -86
- 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}/terraform.md +0 -0
- /package/{templates → dist/templates}/test-stub.md +0 -0
- /package/{templates → dist/templates}/user-stories.md +0 -0
- /package/{templates → dist/templates}/verification.md +0 -0
- /package/{templates → dist/templates}/work-items.md +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,99 @@ 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
|
+
|
|
59
|
+
## [3.1.0] - 2026-04-12
|
|
60
|
+
|
|
61
|
+
### Intelligence Layer (Specs 003–007)
|
|
62
|
+
|
|
63
|
+
#### Model Routing Guidance (Spec 003)
|
|
64
|
+
- **`sdd_model_routing`** (NEW tool #54): Returns the full 10-phase model routing decision table with optimal model, mode, extended thinking settings, arXiv evidence, and cost savings calculator
|
|
65
|
+
- **`model_routing_hint`** field added to ALL 55 tool responses via `buildToolResponse()` — every response now tells the AI client which model to use for the current phase
|
|
66
|
+
- Complexity override: `implement`/`design` phases with >10 files escalate to Opus automatically
|
|
67
|
+
- `ModelRoutingEngine` service with empirically-grounded ROUTING_TABLE (arXiv:2601.08419)
|
|
68
|
+
|
|
69
|
+
#### Context Tiering (Spec 004)
|
|
70
|
+
- **`sdd_context_status`** (NEW tool #55): Returns Hot/Domain/Cold tier assignment for all spec artifacts with estimated token savings
|
|
71
|
+
- **`context_load_summary`** field added to ALL 55 tool responses — shows which files are loaded per call
|
|
72
|
+
- `ContextTieringEngine` service: CONSTITUTION.md=Hot, SPEC/DESIGN/TASKS=Domain, ANALYSIS/CHECKLIST/etc=Cold
|
|
73
|
+
- Token estimation: `Math.ceil(content.length / 4)` — matches GPT/Claude tokenization heuristic
|
|
74
|
+
|
|
75
|
+
#### Cognitive Debt Metrics (Spec 005)
|
|
76
|
+
- **`cognitive_debt`** field in `sdd_metrics` and `sdd_get_status` responses (when gate history available)
|
|
77
|
+
- Gate instrumentation in `sdd_advance_phase`: records mtime-based modified/unmodified detection per gate
|
|
78
|
+
- `CognitiveDebtEngine` service: LGTM-without-modification rate as cognitive surrender signal; score = `(lgtm_rate × 0.6) + (delta_normalized × 0.4)`, labels: healthy/caution/high_risk
|
|
79
|
+
- Warning shown in `sdd_advance_phase` response when unmodified approval is detected
|
|
80
|
+
|
|
81
|
+
#### Verified Test Loop (Spec 006)
|
|
82
|
+
- **`TestResultParser`** service: auto-detects and parses Vitest JSON, pytest JSON, and JUnit XML into normalized `TestResult[]`
|
|
83
|
+
- **`TestTraceabilityMapper`** service: maps test names to REQ-XXX IDs via `// REQ-XXX` comment convention, builds per-requirement coverage report and failure details with `suggested_fix_prompt`
|
|
84
|
+
- `sdd_verify_tests` enhanced: adds `enhanced_coverage` (per-requirement breakdown) and `failure_details` to response when parsers are wired
|
|
85
|
+
- JUnit XML parser bug fixed: self-closing `<testcase .../>` was greedily consumed by open-tag alternative, merging two testcases; fixed with negative lookbehind `(?<!\/)`
|
|
86
|
+
|
|
87
|
+
#### Intent Drift Detection (Spec 007)
|
|
88
|
+
- **`intent_drift`** report in `sdd_check_sync` and `sdd_metrics` responses
|
|
89
|
+
- **`drift_amendment_suggestion`** in `sdd_amend` response when last drift score > 40 — lists orphaned constitutional principles with recommended spec actions
|
|
90
|
+
- `IntentDriftEngine` service: extracts principles from CONSTITUTION.md `## Article` sections, keyword-overlap coverage detection (≥2 keywords threshold), trend analysis (improving/stable/worsening) over last 3 DriftSnapshots
|
|
91
|
+
- `drift_history` stored in `.sdd-state.json` (FIFO, max 100 entries)
|
|
92
|
+
|
|
93
|
+
### Stats
|
|
94
|
+
- **56 tools** (was 53, corrected to 56 — sdd_metrics, sdd_validate_ears, sdd_check_ecosystem were already implemented but undercounted): +sdd_model_routing, +sdd_context_status, count reconciled
|
|
95
|
+
- **24 services** (was 18): +ModelRoutingEngine, +ContextTieringEngine, +CognitiveDebtEngine, +IntentDriftEngine, +TestResultParser, +TestTraceabilityMapper
|
|
96
|
+
- **507 unit tests** across 30 test files (was 321 across 22 files)
|
|
97
|
+
- All 7 specs (001–007) at ≥93% acceptance criteria coverage
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
8
101
|
## [3.0.0] - 2026-03-26
|
|
9
102
|
|
|
10
103
|
### Pipeline Validation & Enforcement
|
|
@@ -105,7 +198,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
105
198
|
- `sdd_verify_tests` tool — verifies test results JSON against specification requirements, reports traceability coverage
|
|
106
199
|
- `.specky/config.yml` support — project-local configuration for templates path, default framework, compliance frameworks, audit toggle
|
|
107
200
|
- `src/config.ts` — centralized configuration loader with simple YAML parsing
|
|
108
|
-
- MCP integration test (`tests/integration/pipeline-e2e.test.ts`) —
|
|
201
|
+
- MCP integration test (`tests/integration/pipeline-e2e.test.ts`) — full pipeline validation with real FileManager
|
|
109
202
|
- Unit tests for 6 additional services: DocGenerator, GitManager, IacGenerator, WorkItemExporter, TranscriptParser, DocumentConverter
|
|
110
203
|
- OpenSSF Scorecard workflow (`.github/workflows/scorecard.yml`)
|
|
111
204
|
- SBOM generation (CycloneDX) in CI pipeline
|