specky-sdd 3.0.0 → 3.1.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 +43 -1
- package/README.md +194 -177
- package/SECURITY.md +77 -2
- package/dist/constants.d.ts +4 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +7 -1
- package/dist/constants.js.map +1 -1
- package/dist/index.js +26 -4
- 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 +30 -0
- package/dist/services/audit-logger.d.ts.map +1 -0
- package/dist/services/audit-logger.js +64 -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/state-machine.d.ts +6 -1
- package/dist/services/state-machine.d.ts.map +1 -1
- package/dist/services/state-machine.js +33 -0
- 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 +19 -4
- 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/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/hooks/release-gate.md +82 -0
- package/hooks/spec-quality.md +55 -0
- package/hooks/task-tracer.md +63 -0
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,48 @@ 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.1.0] - 2026-04-12
|
|
9
|
+
|
|
10
|
+
### Intelligence Layer (Specs 003–007)
|
|
11
|
+
|
|
12
|
+
#### Model Routing Guidance (Spec 003)
|
|
13
|
+
- **`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
|
|
14
|
+
- **`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
|
|
15
|
+
- Complexity override: `implement`/`design` phases with >10 files escalate to Opus automatically
|
|
16
|
+
- `ModelRoutingEngine` service with empirically-grounded ROUTING_TABLE (arXiv:2601.08419)
|
|
17
|
+
|
|
18
|
+
#### Context Tiering (Spec 004)
|
|
19
|
+
- **`sdd_context_status`** (NEW tool #55): Returns Hot/Domain/Cold tier assignment for all spec artifacts with estimated token savings
|
|
20
|
+
- **`context_load_summary`** field added to ALL 55 tool responses — shows which files are loaded per call
|
|
21
|
+
- `ContextTieringEngine` service: CONSTITUTION.md=Hot, SPEC/DESIGN/TASKS=Domain, ANALYSIS/CHECKLIST/etc=Cold
|
|
22
|
+
- Token estimation: `Math.ceil(content.length / 4)` — matches GPT/Claude tokenization heuristic
|
|
23
|
+
|
|
24
|
+
#### Cognitive Debt Metrics (Spec 005)
|
|
25
|
+
- **`cognitive_debt`** field in `sdd_metrics` and `sdd_get_status` responses (when gate history available)
|
|
26
|
+
- Gate instrumentation in `sdd_advance_phase`: records mtime-based modified/unmodified detection per gate
|
|
27
|
+
- `CognitiveDebtEngine` service: LGTM-without-modification rate as cognitive surrender signal; score = `(lgtm_rate × 0.6) + (delta_normalized × 0.4)`, labels: healthy/caution/high_risk
|
|
28
|
+
- Warning shown in `sdd_advance_phase` response when unmodified approval is detected
|
|
29
|
+
|
|
30
|
+
#### Verified Test Loop (Spec 006)
|
|
31
|
+
- **`TestResultParser`** service: auto-detects and parses Vitest JSON, pytest JSON, and JUnit XML into normalized `TestResult[]`
|
|
32
|
+
- **`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`
|
|
33
|
+
- `sdd_verify_tests` enhanced: adds `enhanced_coverage` (per-requirement breakdown) and `failure_details` to response when parsers are wired
|
|
34
|
+
- JUnit XML parser bug fixed: self-closing `<testcase .../>` was greedily consumed by open-tag alternative, merging two testcases; fixed with negative lookbehind `(?<!\/)`
|
|
35
|
+
|
|
36
|
+
#### Intent Drift Detection (Spec 007)
|
|
37
|
+
- **`intent_drift`** report in `sdd_check_sync` and `sdd_metrics` responses
|
|
38
|
+
- **`drift_amendment_suggestion`** in `sdd_amend` response when last drift score > 40 — lists orphaned constitutional principles with recommended spec actions
|
|
39
|
+
- `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
|
|
40
|
+
- `drift_history` stored in `.sdd-state.json` (FIFO, max 100 entries)
|
|
41
|
+
|
|
42
|
+
### Stats
|
|
43
|
+
- **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
|
|
44
|
+
- **24 services** (was 18): +ModelRoutingEngine, +ContextTieringEngine, +CognitiveDebtEngine, +IntentDriftEngine, +TestResultParser, +TestTraceabilityMapper
|
|
45
|
+
- **507 unit tests** across 30 test files (was 321 across 22 files)
|
|
46
|
+
- All 7 specs (001–007) at ≥93% acceptance criteria coverage
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
8
50
|
## [3.0.0] - 2026-03-26
|
|
9
51
|
|
|
10
52
|
### Pipeline Validation & Enforcement
|
|
@@ -105,7 +147,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
105
147
|
- `sdd_verify_tests` tool — verifies test results JSON against specification requirements, reports traceability coverage
|
|
106
148
|
- `.specky/config.yml` support — project-local configuration for templates path, default framework, compliance frameworks, audit toggle
|
|
107
149
|
- `src/config.ts` — centralized configuration loader with simple YAML parsing
|
|
108
|
-
- MCP integration test (`tests/integration/pipeline-e2e.test.ts`) —
|
|
150
|
+
- MCP integration test (`tests/integration/pipeline-e2e.test.ts`) — full pipeline validation with real FileManager
|
|
109
151
|
- Unit tests for 6 additional services: DocGenerator, GitManager, IacGenerator, WorkItemExporter, TranscriptParser, DocumentConverter
|
|
110
152
|
- OpenSSF Scorecard workflow (`.github/workflows/scorecard.yml`)
|
|
111
153
|
- SBOM generation (CycloneDX) in CI pipeline
|