specky-sdd 3.5.0 → 3.6.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/.apm/hooks/scripts/ears-validator.sh +56 -17
- package/.apm/prompts/specky-api.prompt.md +1 -1
- package/.apm/prompts/specky-research.prompt.md +2 -2
- package/.apm/skills/research-analyst/SKILL.md +2 -2
- package/.apm/skills/specky-onboarding/SKILL.md +6 -4
- package/CHANGELOG.md +36 -0
- package/README.md +16 -3
- package/apm.yml +1 -1
- package/config.yml +1 -1
- package/dist/config.d.ts +3 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +10 -0
- package/dist/config.js.map +1 -1
- package/dist/services/diagram-generator.d.ts +53 -4
- package/dist/services/diagram-generator.d.ts.map +1 -1
- package/dist/services/diagram-generator.js +565 -178
- package/dist/services/diagram-generator.js.map +1 -1
- package/dist/services/doc-generator.d.ts +44 -0
- package/dist/services/doc-generator.d.ts.map +1 -1
- package/dist/services/doc-generator.js +352 -50
- package/dist/services/doc-generator.js.map +1 -1
- package/dist/services/document-converter.d.ts +10 -7
- package/dist/services/document-converter.d.ts.map +1 -1
- package/dist/services/document-converter.js +113 -38
- package/dist/services/document-converter.js.map +1 -1
- package/dist/services/iac-generator.d.ts +31 -3
- package/dist/services/iac-generator.d.ts.map +1 -1
- package/dist/services/iac-generator.js +509 -41
- package/dist/services/iac-generator.js.map +1 -1
- package/dist/services/pbt-generator.d.ts +12 -0
- package/dist/services/pbt-generator.d.ts.map +1 -1
- package/dist/services/pbt-generator.js +296 -145
- package/dist/services/pbt-generator.js.map +1 -1
- package/dist/services/state-machine.d.ts +15 -1
- package/dist/services/state-machine.d.ts.map +1 -1
- package/dist/services/state-machine.js +21 -3
- package/dist/services/state-machine.js.map +1 -1
- package/dist/services/test-generator.d.ts +8 -0
- package/dist/services/test-generator.d.ts.map +1 -1
- package/dist/services/test-generator.js +134 -33
- package/dist/services/test-generator.js.map +1 -1
- package/dist/services/test-traceability-mapper.d.ts.map +1 -1
- package/dist/services/test-traceability-mapper.js +8 -3
- package/dist/services/test-traceability-mapper.js.map +1 -1
- package/dist/services/work-item-exporter.d.ts +70 -9
- package/dist/services/work-item-exporter.d.ts.map +1 -1
- package/dist/services/work-item-exporter.js +115 -53
- package/dist/services/work-item-exporter.js.map +1 -1
- package/dist/templates/checklist.md +2 -3
- package/dist/templates/cross-analysis.md +2 -4
- package/dist/tools/documentation.d.ts.map +1 -1
- package/dist/tools/documentation.js +9 -3
- package/dist/tools/documentation.js.map +1 -1
- package/dist/tools/environment.d.ts.map +1 -1
- package/dist/tools/environment.js +75 -12
- package/dist/tools/environment.js.map +1 -1
- package/dist/tools/infrastructure.d.ts.map +1 -1
- package/dist/tools/infrastructure.js +7 -39
- package/dist/tools/infrastructure.js.map +1 -1
- package/dist/tools/input.js +4 -4
- package/dist/tools/input.js.map +1 -1
- package/dist/tools/integration.js +4 -4
- package/dist/tools/integration.js.map +1 -1
- package/dist/tools/pipeline.d.ts.map +1 -1
- package/dist/tools/pipeline.js +42 -4
- package/dist/tools/pipeline.js.map +1 -1
- package/dist/tools/quality.d.ts.map +1 -1
- package/dist/tools/quality.js +36 -9
- package/dist/tools/quality.js.map +1 -1
- package/dist/tools/testing.d.ts +10 -0
- package/dist/tools/testing.d.ts.map +1 -1
- package/dist/tools/testing.js +66 -13
- package/dist/tools/testing.js.map +1 -1
- package/dist/tools/transcript.d.ts.map +1 -1
- package/dist/tools/transcript.js +66 -41
- package/dist/tools/transcript.js.map +1 -1
- package/dist/tools/utility.d.ts.map +1 -1
- package/dist/tools/utility.js +22 -12
- package/dist/tools/utility.js.map +1 -1
- package/dist/tools/visualization.d.ts +21 -0
- package/dist/tools/visualization.d.ts.map +1 -1
- package/dist/tools/visualization.js +130 -29
- package/dist/tools/visualization.js.map +1 -1
- package/package.json +1 -1
- package/templates/checklist.md +2 -3
- package/templates/cross-analysis.md +2 -4
|
@@ -3,36 +3,75 @@
|
|
|
3
3
|
# Target: Claude Code (.claude/hooks/)
|
|
4
4
|
# Type: Advisory | Trigger: PostToolUse | Phase: 2,3
|
|
5
5
|
# Paper: arXiv:2601.03878 — EARS quality
|
|
6
|
+
#
|
|
7
|
+
# Advisory hook: missing EARS pattern types WARN but exit 0 — exit 1 is
|
|
8
|
+
# reserved for real failures (SPECIFICATION.md missing or unreadable).
|
|
9
|
+
# Body is POSIX-sh compatible (runs under dash/sh as well as bash), so
|
|
10
|
+
# plain `set -eu` instead of bash-only `set -o pipefail`.
|
|
6
11
|
|
|
7
|
-
set -
|
|
12
|
+
set -eu
|
|
8
13
|
|
|
9
14
|
LATEST=$(ls -td .specs/*/ 2>/dev/null | head -1 || true)
|
|
10
15
|
[ -z "$LATEST" ] && exit 0
|
|
11
16
|
SPEC="$LATEST/SPECIFICATION.md"
|
|
12
|
-
|
|
17
|
+
|
|
18
|
+
if [ ! -f "$SPEC" ] || [ ! -r "$SPEC" ]; then
|
|
19
|
+
echo "❌ EARS Validation: $SPEC is missing or unreadable."
|
|
20
|
+
echo " sdd_write_spec should have produced it — re-run the Specify phase."
|
|
21
|
+
exit 1
|
|
22
|
+
fi
|
|
13
23
|
|
|
14
24
|
echo "🔍 EARS Validation: $SPEC"
|
|
15
25
|
|
|
16
|
-
# Count
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
# Count one EARS pattern (POSIX ERE for macOS/Linux portability).
|
|
27
|
+
# grep -c prints the count but exits 1 when the count is 0; the old
|
|
28
|
+
# `|| echo "0"` appended a SECOND "0" line to the captured value, which
|
|
29
|
+
# broke the arithmetic below (and the whole hook, under set -e) for any
|
|
30
|
+
# spec missing even one pattern type. Capture the count and swallow the
|
|
31
|
+
# exit status instead.
|
|
32
|
+
count_pattern() {
|
|
33
|
+
_count=$(grep -cE "$1" "$SPEC" 2>/dev/null) || _count="${_count:-0}"
|
|
34
|
+
printf '%s' "${_count:-0}"
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
UBIQ=$(count_pattern 'The system shall')
|
|
38
|
+
EVENT=$(count_pattern 'When .*, the system shall')
|
|
39
|
+
STATE=$(count_pattern 'While .*, the system shall')
|
|
40
|
+
OPTION=$(count_pattern 'Where .*, the system shall')
|
|
41
|
+
UNWANTED=$(count_pattern 'If .*, then the system shall')
|
|
42
|
+
COMPLEX=$(count_pattern 'While .*, when .*, the system shall')
|
|
23
43
|
|
|
24
44
|
TOTAL=$((UBIQ + EVENT + STATE + OPTION + UNWANTED + COMPLEX))
|
|
25
|
-
REQS=$(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
echo "
|
|
45
|
+
REQS=$(count_pattern 'REQ-[A-Z]+-[0-9]+')
|
|
46
|
+
|
|
47
|
+
# Per-pattern coverage report
|
|
48
|
+
PRESENT=0
|
|
49
|
+
MISSING=""
|
|
50
|
+
report_pattern() {
|
|
51
|
+
# $1 = padded label, $2 = count, $3 = pattern name for the warning line
|
|
52
|
+
echo " $1 $2"
|
|
53
|
+
if [ "$2" -gt 0 ]; then
|
|
54
|
+
PRESENT=$((PRESENT + 1))
|
|
55
|
+
else
|
|
56
|
+
MISSING="$MISSING $3"
|
|
57
|
+
fi
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
report_pattern "Ubiquitous: " "$UBIQ" "ubiquitous"
|
|
61
|
+
report_pattern "Event-driven:" "$EVENT" "event-driven"
|
|
62
|
+
report_pattern "State-driven:" "$STATE" "state-driven"
|
|
63
|
+
report_pattern "Optional: " "$OPTION" "optional"
|
|
64
|
+
report_pattern "Unwanted: " "$UNWANTED" "unwanted-behavior"
|
|
65
|
+
report_pattern "Complex: " "$COMPLEX" "complex"
|
|
33
66
|
echo " ─────────────"
|
|
67
|
+
echo " Pattern coverage: $PRESENT/6 EARS pattern types present"
|
|
34
68
|
echo " EARS total: $TOTAL / $REQS requirements"
|
|
35
69
|
|
|
70
|
+
if [ -n "$MISSING" ]; then
|
|
71
|
+
echo "⚠️ Pattern types with zero requirements:$MISSING"
|
|
72
|
+
echo " Not every spec needs all 6 EARS patterns — advisory only."
|
|
73
|
+
fi
|
|
74
|
+
|
|
36
75
|
if [ "$TOTAL" -lt "$REQS" ]; then
|
|
37
76
|
echo "⚠️ $((REQS - TOTAL)) requirements may not follow EARS notation."
|
|
38
77
|
echo " Run sdd_validate_ears for detailed analysis."
|
|
@@ -12,4 +12,4 @@ Design an API using the Specky SDD pipeline.
|
|
|
12
12
|
Please:
|
|
13
13
|
1. Call @requirements-engineer to produce FRD + NFRD for the API
|
|
14
14
|
2. Call @sdd-init with project_type=api
|
|
15
|
-
3. Proceed through
|
|
15
|
+
3. Proceed through discover → specify → design phases
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Run SDD
|
|
2
|
+
description: Run SDD Discover phase (research)
|
|
3
3
|
---
|
|
4
|
-
Run the SDD
|
|
4
|
+
Run the SDD Discover phase (research) for feature [FEATURE NUMBER].
|
|
5
5
|
|
|
6
6
|
@research-analyst — scan the codebase, import relevant documents, run discovery questions, and produce RESEARCH.md.
|
|
@@ -214,10 +214,10 @@ Generate dependency graph and assess risk of each integration.
|
|
|
214
214
|
Structure the research artifact as:
|
|
215
215
|
|
|
216
216
|
```markdown
|
|
217
|
-
#
|
|
217
|
+
# Discovery Phase Report
|
|
218
218
|
**Project:** [name]
|
|
219
219
|
**Date:** [YYYY-MM-DD]
|
|
220
|
-
**Phase:** 1 -
|
|
220
|
+
**Phase:** 1 - Discover
|
|
221
221
|
**Status:** Complete
|
|
222
222
|
|
|
223
223
|
## Executive Summary
|
|
@@ -130,9 +130,9 @@ Check for:
|
|
|
130
130
|
|
|
131
131
|
**Utility (8):** sdd_get_status, sdd_get_template, sdd_write_bugfix, sdd_scan_codebase, sdd_amend, sdd_check_ecosystem, sdd_check_sync, sdd_metrics
|
|
132
132
|
|
|
133
|
-
**Governance (
|
|
133
|
+
**Governance (4):** sdd_model_routing, sdd_context_status, sdd_check_access, sdd_verify_audit
|
|
134
134
|
|
|
135
|
-
##
|
|
135
|
+
## 16 Hook Scripts
|
|
136
136
|
|
|
137
137
|
**Blocking (exit 2 = halt):**
|
|
138
138
|
- artifact-validator.sh — Prerequisite .md files exist
|
|
@@ -142,9 +142,11 @@ Check for:
|
|
|
142
142
|
|
|
143
143
|
**Advisory (exit 0 = warn):**
|
|
144
144
|
- branch-validator.sh — Branch matches phase expectations
|
|
145
|
-
-
|
|
146
|
-
-
|
|
145
|
+
- pipeline-guard.sh — Pipeline ordering / phase-skip guard
|
|
146
|
+
- lgtm-gate.sh — Human review reminder at Phases 2/4/5
|
|
147
|
+
- session-banner.sh — Session start pipeline-status banner
|
|
147
148
|
- spec-sync.sh — Detect spec-code drift
|
|
149
|
+
- auto-checkpoint.sh — Suggest checkpoint after writes
|
|
148
150
|
- spec-quality.sh — Specification quality metrics
|
|
149
151
|
- ears-validator.sh — EARS pattern compliance
|
|
150
152
|
- task-tracer.sh — Task dependency graph
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.6.0] - 2026-07-03
|
|
11
|
+
|
|
12
|
+
Delivery-honesty release. A black-box audit executed all 65 public product
|
|
13
|
+
promises against the real 3.5.0 server (`docs/AUDIT-DELIVERY-3.5.md` is the
|
|
14
|
+
full record: 30 delivered / 29 partial / 6 not delivered). This release fixes
|
|
15
|
+
every finding.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **`sdd_auto_pipeline` fabricated its quality gate** (hard-coded `APPROVE`/100% — the same defect fixed for other paths in 3.4.0 had survived here). It now runs the shared `AnalysisEngine`: real decision, real coverage, requirement-level traceability matrix in `ANALYSIS.md`. Auto-generated packages honestly report `CHANGES_NEEDED` until traceability is complete.
|
|
20
|
+
- **`sdd_get_status` reported a stale phase** (it preferred a per-feature state file no pipeline tool writes and fell back to a fresh default). Headline fields (current phase, progress, gate decision, next action) now reflect the state the pipeline actually persists.
|
|
21
|
+
- **Phase-skip loophole**: with no registered feature, `sdd_advance_phase` skipped every artifact check and could walk six phases with zero artifacts. Advancing past init now requires a registered feature.
|
|
22
|
+
- **Generated tests now compile/run**: pytest output was a Python syntax error (JS-style header); junit class names didn't match filenames and had duplicate methods; xunit had duplicate members; vitest/jest/playwright emitted markdown ToC noise as tests, traced to a nonexistent `REQ-000`, and truncated the `REQ-` prefix. All fixed, with structural (and where possible compile) tests.
|
|
23
|
+
- **PBT generators produce runnable property tests**: valid `fast-check` import, self-contained bodies (no undefined helpers), meaningful assertions, and real REQ IDs (never fabricated `REQ-GEN-00N` — untraceable items are skipped or explicitly labeled `UNTRACED-`).
|
|
24
|
+
- **`sdd_verify_tests` coverage scanned the wrong directories** (always 0%): it now scans where `sdd_generate_tests` writes (via a generated-tests manifest), so the REQ→test mapping and `next_steps` use real numbers.
|
|
25
|
+
- **Doc generators derive real content**: the "first 15 lines" summarizer (which captured only frontmatter + ToC) was replaced with requirement-aware extraction — generated docs now contain the actual EARS requirements; the runbook is derived from `DESIGN.md` (was 100% static template); onboarding explains the feature; API docs extract request/response examples from the design contracts (were always `{}`) and no longer duplicate endpoints from mermaid blocks; the journey doc joined the parallel batch and failures surface in the response.
|
|
26
|
+
- **Diagrams**: `er`/`dfd` emitted invalid Mermaid (unsanitized ids) — fixed; `class`/`state`/`c4_code` were byte-identical stubs regardless of input — now derived from the artifacts; `pie` fabricated numbers — now computed; `gantt` was header-only from spec/design and used a date syntax real Mermaid rejects — fixed; `sequence` derivation is readable (`Client->>System` per requirement). `sdd_generate_all_diagrams` now **writes `DIAGRAMS.md`** (it returned diagrams but wrote nothing) and covers c4_context + state (18 diagrams). ToC headings are no longer treated as architecture components; `sdd_figma_diagram` types differ structurally with meaningful edge labels.
|
|
27
|
+
- **Binary document imports fail honestly**: real (compressed) PDF/DOCX/PPTX used to import as gibberish flagged "success". Unsupported binaries now return a clear error pointing to md/txt conversion or the MarkItDown MCP; `sdd_batch_import` counts them as failed.
|
|
28
|
+
- **`sdd_export_work_items` payloads are target-specific** (GitHub `{title, body, labels}` / Jira `{fields: {project.key, issuetype…}}` / Azure Boards `System.*` fields + `area_path`/`iteration_path`) and honor the documented inputs that were silently discarded (`project_key`, `include_subtasks`, …).
|
|
29
|
+
- **Persisted `[TODO:]` placeholders**: `CHECKLIST.md` and `CROSS_ANALYSIS.md` now render the real items/alignment tables and recommendation (the data existed only in the JSON response).
|
|
30
|
+
- **Terraform generation emits real resources** parsed from the `DESIGN.md` tech stack (was a provider-only skeleton with four generic modules); devcontainer/local-env/codespaces honor the documented DESIGN.md fallback detection (`additional_services` is no longer always empty); the Codespaces payload no longer references a nonexistent `create_codespace` MCP tool.
|
|
31
|
+
- **`ears-validator.sh` hook** no longer fails (exit 1) whenever a spec lacks one of the 6 EARS pattern types — it reports per-pattern coverage as an advisory.
|
|
32
|
+
- **`sdd_figma_to_spec`** payload referenced nonexistent tool names (`sdd_gen_spec` → `sdd_write_spec` etc.).
|
|
33
|
+
- Cognitive-debt gate instrumentation resolved artifact paths against the process cwd instead of the workspace root, silently degrading in hosted (HTTP) mode.
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- **Opt-in server-side LGTM**: `pipeline.require_lgtm: true` in `.specky/config.yml` makes `sdd_advance_phase` refuse to pass the Specify/Design/Tasks gates without an explicit `lgtm: true` input. Default off; not flipped by the enterprise profile (human-review gating is a workflow choice, not a security control). Gate history records LGTM presence.
|
|
38
|
+
- **`docs/AUDIT-DELIVERY-3.5.md`** — the full promise-delivery audit as a public record.
|
|
39
|
+
- 6 new test suites (~112 new tests, 299 total) locking generated-content quality: compilable test output, valid Mermaid structure, target-specific export payloads, honest import failures, requirement-bearing docs, pipeline-state truthfulness.
|
|
40
|
+
|
|
41
|
+
### Container publishing docs
|
|
42
|
+
|
|
43
|
+
- Expanded GHCR/container documentation across README, install, enterprise deployment, and publishing guidance.
|
|
44
|
+
- Updated GHCR publish automation to preserve multi-arch `linux/amd64` + `linux/arm64` images.
|
|
45
|
+
|
|
10
46
|
## [3.5.0] - 2026-07-02
|
|
11
47
|
|
|
12
48
|
Enterprise mode — an **opt-in configuration profile** of the same 100%
|
package/README.md
CHANGED
|
@@ -352,7 +352,7 @@ The AI calls `sdd_import_document` → converts to Markdown, extracts sections,
|
|
|
352
352
|
|
|
353
353
|
The AI calls `sdd_batch_import` → processes every supported file in the directory.
|
|
354
354
|
|
|
355
|
-
> **
|
|
355
|
+
> **Honest note on binary formats:** the built-in extractor fully handles `md`/`txt` and simple uncompressed files. Real-world (compressed) PDF/DOCX/PPTX need one of: the optional `mammoth`/`pdfjs-dist` packages, or the recommended **MarkItDown MCP** integration. Since 3.6, unsupported binaries **fail with clear guidance** instead of silently importing garbage.
|
|
356
356
|
|
|
357
357
|
### 4. Figma Design (design-to-spec)
|
|
358
358
|
|
|
@@ -897,9 +897,12 @@ rbac:
|
|
|
897
897
|
default_role: contributor
|
|
898
898
|
rate_limit:
|
|
899
899
|
enabled: false # HTTP token bucket (60 rpm, burst 10)
|
|
900
|
+
pipeline:
|
|
901
|
+
require_lgtm: false # Server-side LGTM: sdd_advance_phase refuses to pass
|
|
902
|
+
# the Specify/Design/Tasks gates unless lgtm: true
|
|
900
903
|
```
|
|
901
904
|
|
|
902
|
-
When `templates_path` is set, Specky uses your custom templates instead of the built-in ones. When `audit_enabled` is true, tool invocations are logged locally. `profile: enterprise` turns audit, RBAC, rate limiting, and fail-closed auditing on by default (explicit values win) — see [docs/ENTERPRISE-DEPLOYMENT.md](docs/ENTERPRISE-DEPLOYMENT.md).
|
|
905
|
+
When `templates_path` is set, Specky uses your custom templates instead of the built-in ones. When `audit_enabled` is true, tool invocations are logged locally. `profile: enterprise` turns audit, RBAC, rate limiting, and fail-closed auditing on by default (explicit values win) — see [docs/ENTERPRISE-DEPLOYMENT.md](docs/ENTERPRISE-DEPLOYMENT.md). With `pipeline.require_lgtm: true`, the LGTM quality gates become server-enforced instead of an agent convention: advancing past Specify/Design/Tasks requires the explicit `lgtm: true` input on `sdd_advance_phase`.
|
|
903
906
|
|
|
904
907
|
|
|
905
908
|
## MCP Integration Architecture
|
|
@@ -1090,12 +1093,22 @@ npm run dev
|
|
|
1090
1093
|
# Verify MCP handshake (quick smoke test)
|
|
1091
1094
|
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | node dist/index.js 2>/dev/null
|
|
1092
1095
|
|
|
1093
|
-
#
|
|
1096
|
+
# Run the published image from GHCR (multi-arch: linux/amd64 + linux/arm64)
|
|
1097
|
+
docker pull ghcr.io/paulasilvatech/specky:latest # or pin a release: :3.5.0
|
|
1098
|
+
docker run --rm -p 3200:3200 ghcr.io/paulasilvatech/specky:latest
|
|
1099
|
+
curl http://localhost:3200/health # -> {"status":"ok","version":"3.5.0"}
|
|
1100
|
+
|
|
1101
|
+
# Or build and run locally from source
|
|
1094
1102
|
docker build -t specky-sdd:dev .
|
|
1095
1103
|
docker run -p 3200:3200 -v $(pwd):/workspace specky-sdd:dev
|
|
1096
1104
|
curl http://localhost:3200/health
|
|
1097
1105
|
```
|
|
1098
1106
|
|
|
1107
|
+
The published image binds `0.0.0.0:3200` inside the container (so `-p` works)
|
|
1108
|
+
and serves an unauthenticated `GET /health`. For hardened/authenticated
|
|
1109
|
+
deployments (enterprise profile, token auth, TLS proxy, private packages) see
|
|
1110
|
+
[docs/ENTERPRISE-DEPLOYMENT.md](docs/ENTERPRISE-DEPLOYMENT.md).
|
|
1111
|
+
|
|
1099
1112
|
|
|
1100
1113
|
## Roadmap
|
|
1101
1114
|
|
package/apm.yml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: specky-sdd
|
|
2
|
-
version: 3.
|
|
2
|
+
version: 3.6.0
|
|
3
3
|
description: "Agentic Spec-Driven Development — 10-phase pipeline with 58 MCP tools, 13 agents, 22 prompts, 8 skills, 16 hooks, EARS notation, model routing, and enterprise security"
|
|
4
4
|
author: Paula Silva
|
|
5
5
|
license: MIT
|
package/config.yml
CHANGED
package/dist/config.d.ts
CHANGED
|
@@ -30,6 +30,9 @@ declare const configSchema: z.ZodObject<{
|
|
|
30
30
|
admin: "admin";
|
|
31
31
|
}>>;
|
|
32
32
|
}, z.core.$strip>>;
|
|
33
|
+
pipeline: z.ZodDefault<z.ZodObject<{
|
|
34
|
+
require_lgtm: z.ZodDefault<z.ZodBoolean>;
|
|
35
|
+
}, z.core.$strip>>;
|
|
33
36
|
}, z.core.$strip>;
|
|
34
37
|
export type SpeckyConfig = z.infer<typeof configSchema>;
|
|
35
38
|
export type SpeckyProfile = SpeckyConfig["profile"];
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsCR,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;AAIpD,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1C;AAMD;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,aAAa,EAAE,aAAa,EAC5B,SAAS,GAAE,gBAAqB,GAC/B,aAAa,CAsBf;AAgCD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,GAAE,gBAAqB,GAAG,YAAY,CAyBhG"}
|
package/dist/config.js
CHANGED
|
@@ -53,6 +53,16 @@ const configSchema = z
|
|
|
53
53
|
default_role: z.enum(["viewer", "contributor", "admin"]).default("contributor"),
|
|
54
54
|
})
|
|
55
55
|
.default({ enabled: false, default_role: "contributor" }),
|
|
56
|
+
pipeline: z
|
|
57
|
+
.object({
|
|
58
|
+
// Server-side LGTM enforcement: when true, sdd_advance_phase refuses to
|
|
59
|
+
// complete the specify/design/tasks quality gates unless the caller
|
|
60
|
+
// passes lgtm: true. Off by default (zero behavior change) and NOT
|
|
61
|
+
// flipped by the enterprise profile — human-review gating is a workflow
|
|
62
|
+
// choice, not a security control.
|
|
63
|
+
require_lgtm: z.boolean().default(false),
|
|
64
|
+
})
|
|
65
|
+
.default({ require_lgtm: false }),
|
|
56
66
|
})
|
|
57
67
|
.strip();
|
|
58
68
|
const DEFAULT_CONFIG = configSchema.parse({});
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,kFAAkF;AAClF,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CACxC,CAAC,CAAC,EAAE,EAAE,CACJ,CAAC,KAAK,EA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C5F,CAAC"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* DiagramGenerator — Deterministic Mermaid diagram generation from spec artifacts.
|
|
3
3
|
* All generation is pure string manipulation — no AI calls.
|
|
4
|
+
*
|
|
5
|
+
* Invariants:
|
|
6
|
+
* - Every identifier position (node ids, entity names, class names, state ids,
|
|
7
|
+
* participants) contains only [A-Za-z0-9_]; human text lives in quoted labels.
|
|
8
|
+
* - No generator emits constant filler: output is derived from the artifact's
|
|
9
|
+
* requirements, sections, bullets, or (as a last resort) its title/words, so
|
|
10
|
+
* different inputs never produce byte-identical diagrams.
|
|
11
|
+
* - Numeric values (pie slices, gantt tasks) are real counts from the source,
|
|
12
|
+
* never fabricated percentages.
|
|
4
13
|
*/
|
|
5
14
|
import type { FileManager } from "./file-manager.js";
|
|
6
15
|
import type { DiagramSpec, AllDiagramsResult, DiagramType } from "../types.js";
|
|
@@ -12,9 +21,13 @@ export declare class DiagramGenerator {
|
|
|
12
21
|
*/
|
|
13
22
|
generateDiagram(content: string, type: DiagramType, title: string): DiagramSpec;
|
|
14
23
|
/**
|
|
15
|
-
* Generate ALL diagram types for a feature from its artifacts
|
|
24
|
+
* Generate ALL diagram types for a feature from its artifacts and write the
|
|
25
|
+
* full set to DIAGRAMS.md in the feature directory (grouped by source),
|
|
26
|
+
* replacing any scaffold left by earlier pipeline steps.
|
|
16
27
|
*/
|
|
17
|
-
generateAllDiagrams(specDir: string, featureDir: string): Promise<AllDiagramsResult
|
|
28
|
+
generateAllDiagrams(specDir: string, featureDir: string): Promise<AllDiagramsResult & {
|
|
29
|
+
diagrams_file: string | null;
|
|
30
|
+
}>;
|
|
18
31
|
/**
|
|
19
32
|
* Generate user story flow diagram.
|
|
20
33
|
*/
|
|
@@ -38,16 +51,52 @@ export declare class DiagramGenerator {
|
|
|
38
51
|
private generateNetworkTopology;
|
|
39
52
|
private extractListItems;
|
|
40
53
|
private extractActors;
|
|
41
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Derive request/response exchanges from EARS requirement sentences.
|
|
56
|
+
* "When X, the system shall Y" -> Client request "X", System response "Y".
|
|
57
|
+
*/
|
|
58
|
+
private extractRequirementExchanges;
|
|
42
59
|
private extractEntities;
|
|
43
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Class/interface candidates for class and c4_code diagrams.
|
|
62
|
+
* 1. Explicit `interface X { ... }` / `class X { ... }` declarations (methods
|
|
63
|
+
* read from the real body — never invented).
|
|
64
|
+
* 2. Real section names with methods derived from their bullet items.
|
|
65
|
+
* 3. Last resort: one class built from the artifact's opening words, so
|
|
66
|
+
* different artifacts never collapse to an identical stub.
|
|
67
|
+
*/
|
|
68
|
+
private extractClassCandidates;
|
|
44
69
|
private extractStates;
|
|
45
70
|
private extractSystems;
|
|
46
71
|
private extractComponents;
|
|
47
72
|
private extractTasks;
|
|
73
|
+
/**
|
|
74
|
+
* Real category counts for pie charts, tried in order:
|
|
75
|
+
* 1. Explicit EARS pattern tags, e.g. "(EVENT_DRIVEN)".
|
|
76
|
+
* 2. Classification of "shall" requirement sentences by EARS keyword.
|
|
77
|
+
* 3. REQ-ID prefixes (### REQ-XXX-NNN).
|
|
78
|
+
* 4. Section names weighted by their real bullet counts.
|
|
79
|
+
*/
|
|
48
80
|
private extractCategories;
|
|
49
81
|
private extractTopics;
|
|
82
|
+
/**
|
|
83
|
+
* Real (non-structural) sections with their bullet items — the shared
|
|
84
|
+
* source-derived skeleton used by fallback paths.
|
|
85
|
+
*/
|
|
86
|
+
private extractSections;
|
|
50
87
|
private sanitize;
|
|
88
|
+
/** Text safe outside quotes (gantt names/sections, message-free positions). */
|
|
89
|
+
private plainText;
|
|
90
|
+
/** Sequence message text — keeps it on one line and free of ':' markers. */
|
|
91
|
+
private messageText;
|
|
92
|
+
/** Identifier containing only [A-Za-z0-9_], never starting with a digit. */
|
|
93
|
+
private safeId;
|
|
94
|
+
private uniqueId;
|
|
95
|
+
private cleanHeading;
|
|
96
|
+
private toPascalCase;
|
|
97
|
+
private toCamelCase;
|
|
98
|
+
private isStructuralHeading;
|
|
99
|
+
private buildDiagramsMarkdown;
|
|
51
100
|
private safeRead;
|
|
52
101
|
}
|
|
53
102
|
//# sourceMappingURL=diagram-generator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagram-generator.d.ts","sourceRoot":"","sources":["../../src/services/diagram-generator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"diagram-generator.d.ts","sourceRoot":"","sources":["../../src/services/diagram-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAkB/E,qBAAa,gBAAgB;IACf,OAAO,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAE5C;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW;IA8D/E;;;;OAIG;IACG,mBAAmB,CACvB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,iBAAiB,GAAG;QAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IA2DhE;;OAEG;IACH,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAclE,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,gBAAgB;IA6BxB,OAAO,CAAC,WAAW;IA8BnB,OAAO,CAAC,oBAAoB;IA6B5B,OAAO,CAAC,oBAAoB;IAqC5B,OAAO,CAAC,iBAAiB;IAqBzB,OAAO,CAAC,mBAAmB;IAyB3B,OAAO,CAAC,aAAa;IAwDrB,OAAO,CAAC,WAAW;IA6BnB,OAAO,CAAC,e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