speckeeper 0.9.4 → 0.10.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/README.md +122 -2
- package/cli-contract.yaml +739 -25
- package/dist/cli.js +1177 -1
- package/dist/cli.js.map +1 -1
- package/docs/cli-reference.md +345 -20
- package/docs/design/cli-commands.md +181 -0
- package/docs/model-guide.md +102 -98
- package/package.json +13 -2
package/docs/cli-reference.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
TypeScript-first specification validation framework — validate design consistency, external SSOT integrity, and traceability with type-safe TypeScript DSL. Supports design lint, external source checks (OpenAPI, DDL, annotations), drift detection, impact analysis, and scaffolding from Mermaid flowcharts.
|
|
4
4
|
|
|
5
|
-
**Version:** 0.
|
|
5
|
+
**Version:** 0.10.0
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
|
|
@@ -15,6 +15,10 @@ TypeScript-first specification validation framework — validate design consiste
|
|
|
15
15
|
- [new](#speckeeper-new)
|
|
16
16
|
- [impact](#speckeeper-impact)
|
|
17
17
|
- [scaffold](#speckeeper-scaffold)
|
|
18
|
+
- [audit-requirements](#speckeeper-audit-requirements)
|
|
19
|
+
- [propose-trace-links](#speckeeper-propose-trace-links)
|
|
20
|
+
- [explain-impact](#speckeeper-explain-impact)
|
|
21
|
+
- [propose-acceptance-criteria](#speckeeper-propose-acceptance-criteria)
|
|
18
22
|
|
|
19
23
|
---
|
|
20
24
|
|
|
@@ -48,7 +52,7 @@ speckeeper init --force
|
|
|
48
52
|
|
|
49
53
|
| Option | Aliases | Required | Default | Description |
|
|
50
54
|
|---|---|---|---|---|
|
|
51
|
-
| `--force` | -
|
|
55
|
+
| `--force` | -F | No | `false` | Overwrite existing files. |
|
|
52
56
|
|
|
53
57
|
#### Exit Codes
|
|
54
58
|
|
|
@@ -64,11 +68,12 @@ speckeeper init --force
|
|
|
64
68
|
|
|
65
69
|
```yaml
|
|
66
70
|
x-agent:
|
|
67
|
-
riskLevel:
|
|
68
|
-
requiresConfirmation:
|
|
71
|
+
riskLevel: medium
|
|
72
|
+
requiresConfirmation: true
|
|
69
73
|
idempotent: false
|
|
70
74
|
sideEffects:
|
|
71
75
|
- file_write
|
|
76
|
+
sideEffectNote: Creates config file and design/ directory structure. With --force, overwrites existing files.
|
|
72
77
|
```
|
|
73
78
|
|
|
74
79
|
---
|
|
@@ -120,6 +125,7 @@ x-agent:
|
|
|
120
125
|
idempotent: true
|
|
121
126
|
sideEffects:
|
|
122
127
|
- file_write
|
|
128
|
+
sideEffectNote: When --watch is used, the process runs indefinitely and is unsuitable for non-interactive agent invocation. Always writes generated files to docs/ and specs/.
|
|
123
129
|
```
|
|
124
130
|
|
|
125
131
|
---
|
|
@@ -156,11 +162,11 @@ speckeeper lint --phase HLD --fix
|
|
|
156
162
|
|
|
157
163
|
**Exit 0:** No lint issues found (or all issues auto-fixed).
|
|
158
164
|
|
|
159
|
-
- **stdout:** format=`
|
|
165
|
+
- **stdout:** format=`{options.format}`
|
|
160
166
|
|
|
161
167
|
**Exit 1:** Lint issues found (errors or warnings with --strict).
|
|
162
168
|
|
|
163
|
-
- **
|
|
169
|
+
- **stdout:** format=`{options.format}`
|
|
164
170
|
|
|
165
171
|
#### Extensions
|
|
166
172
|
|
|
@@ -170,7 +176,9 @@ x-agent:
|
|
|
170
176
|
requiresConfirmation: false
|
|
171
177
|
idempotent: true
|
|
172
178
|
sideEffects:
|
|
173
|
-
|
|
179
|
+
- file_write
|
|
180
|
+
sideEffectNote: file_write applies only when --fix is provided. Without --fix the command is read-only.
|
|
181
|
+
safeDryRunOption: Omit --fix to run in read-only mode.
|
|
174
182
|
```
|
|
175
183
|
|
|
176
184
|
---
|
|
@@ -206,21 +214,22 @@ speckeeper drift --update --format diff
|
|
|
206
214
|
|
|
207
215
|
**Exit 0:** No drift detected (or drift auto-updated with --update).
|
|
208
216
|
|
|
209
|
-
- **stdout:** format=`
|
|
217
|
+
- **stdout:** format=`{options.format}`
|
|
210
218
|
|
|
211
219
|
**Exit 1:** Drift detected (with --fail-on-drift), or update failed.
|
|
212
220
|
|
|
213
|
-
- **
|
|
221
|
+
- **stdout:** format=`{options.format}`
|
|
214
222
|
|
|
215
223
|
#### Extensions
|
|
216
224
|
|
|
217
225
|
```yaml
|
|
218
226
|
x-agent:
|
|
219
|
-
riskLevel:
|
|
220
|
-
requiresConfirmation:
|
|
227
|
+
riskLevel: medium
|
|
228
|
+
requiresConfirmation: true
|
|
221
229
|
idempotent: true
|
|
222
230
|
sideEffects:
|
|
223
|
-
|
|
231
|
+
- file_write
|
|
232
|
+
sideEffectNote: file_write applies only when --update is provided. Without --update the command is read-only.
|
|
224
233
|
safeDryRunOption: Omit --update to run in read-only mode.
|
|
225
234
|
```
|
|
226
235
|
|
|
@@ -261,16 +270,17 @@ speckeeper check openapi --strict
|
|
|
261
270
|
| `--strict` | | No | `false` | Treat warnings as errors. |
|
|
262
271
|
| `--verbose` | -v | No | `false` | Show detailed output (e.g. list unmatched specs). |
|
|
263
272
|
| `--coverage` | | No | `false` | Check if all testable acceptance criteria are covered by TestRefs. |
|
|
273
|
+
| `--format` | -f | No | `"text"` | Output format: text, json, github. |
|
|
264
274
|
|
|
265
275
|
#### Exit Codes
|
|
266
276
|
|
|
267
277
|
**Exit 0:** All checks passed (all specs found in sources, deep validation passed).
|
|
268
278
|
|
|
269
|
-
- **stdout:** format=`
|
|
279
|
+
- **stdout:** format=`{options.format}`
|
|
270
280
|
|
|
271
281
|
**Exit 1:** Check failures found (missing specs, structural mismatches, or coverage gaps).
|
|
272
282
|
|
|
273
|
-
- **
|
|
283
|
+
- **stdout:** format=`{options.format}`
|
|
274
284
|
|
|
275
285
|
#### Extensions
|
|
276
286
|
|
|
@@ -317,10 +327,11 @@ speckeeper new usecase --template custom-template.ts
|
|
|
317
327
|
| `--name` | -n | No | | Name of the element. |
|
|
318
328
|
| `--output` | -o | No | | Output directory path. |
|
|
319
329
|
| `--template` | -t | No | | Path to template file. |
|
|
330
|
+
| `--dry-run` | | No | `false` | Preview generated file content and ID without writing to disk. |
|
|
320
331
|
|
|
321
332
|
#### Exit Codes
|
|
322
333
|
|
|
323
|
-
**Exit 0:** Element file created with auto-generated ID.
|
|
334
|
+
**Exit 0:** Element file created (or previewed with --dry-run) with auto-generated ID.
|
|
324
335
|
|
|
325
336
|
- **stdout:** format=`text`
|
|
326
337
|
|
|
@@ -337,6 +348,8 @@ x-agent:
|
|
|
337
348
|
idempotent: false
|
|
338
349
|
sideEffects:
|
|
339
350
|
- file_write
|
|
351
|
+
sideEffectNote: Creates a new TypeScript spec file with auto-generated ID. With --dry-run, only previews the generated content without writing.
|
|
352
|
+
safeDryRunOption: --dry-run
|
|
340
353
|
```
|
|
341
354
|
|
|
342
355
|
---
|
|
@@ -370,7 +383,7 @@ speckeeper impact COMP-AUTH --format mermaid
|
|
|
370
383
|
| Option | Aliases | Required | Default | Description |
|
|
371
384
|
|---|---|---|---|---|
|
|
372
385
|
| `--config` | -c | No | | Path to config file. |
|
|
373
|
-
| `--depth` | -d | No | `
|
|
386
|
+
| `--depth` | -d | No | `3` | Analysis depth (reference tracking level). |
|
|
374
387
|
| `--direction` | | No | `"both"` | Analysis direction: upstream, downstream, both. |
|
|
375
388
|
| `--format` | -f | No | `"text"` | Output format: text, json, mermaid. |
|
|
376
389
|
|
|
@@ -378,7 +391,7 @@ speckeeper impact COMP-AUTH --format mermaid
|
|
|
378
391
|
|
|
379
392
|
**Exit 0:** Impact analysis completed and displayed.
|
|
380
393
|
|
|
381
|
-
- **stdout:** format=`
|
|
394
|
+
- **stdout:** format=`{options.format}`
|
|
382
395
|
|
|
383
396
|
**Exit 1:** Analysis failed (ID not found or config error).
|
|
384
397
|
|
|
@@ -421,7 +434,7 @@ speckeeper scaffold --source arch.md --dry-run
|
|
|
421
434
|
|---|---|---|---|---|
|
|
422
435
|
| `--source` | -s | Yes | | Path to Markdown file containing Mermaid flowchart. |
|
|
423
436
|
| `--output` | -o | No | `"design/"` | Output directory. |
|
|
424
|
-
| `--force` | -
|
|
437
|
+
| `--force` | -F | No | `false` | Overwrite existing files. |
|
|
425
438
|
| `--dry-run` | | No | `false` | Preview generated files without writing. |
|
|
426
439
|
|
|
427
440
|
#### Exit Codes
|
|
@@ -438,12 +451,324 @@ speckeeper scaffold --source arch.md --dry-run
|
|
|
438
451
|
|
|
439
452
|
```yaml
|
|
440
453
|
x-agent:
|
|
441
|
-
riskLevel:
|
|
442
|
-
requiresConfirmation:
|
|
454
|
+
riskLevel: high
|
|
455
|
+
requiresConfirmation: true
|
|
443
456
|
idempotent: false
|
|
444
457
|
sideEffects:
|
|
445
458
|
- file_write
|
|
459
|
+
sideEffectNote: --force overwrites existing TypeScript model source files.
|
|
460
|
+
safeDryRunOption: --dry-run
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
### audit-requirements
|
|
466
|
+
|
|
467
|
+
Run LLM-based requirement quality audit.
|
|
468
|
+
|
|
469
|
+
Performs semantic analysis of design specs using LLM to identify quality issues that static lint cannot detect. Evaluates verifiability, ambiguity, granularity, terminology consistency, and design-mixing. Requires agent-contracts-runtime as an optional peer dependency.
|
|
470
|
+
|
|
471
|
+
**Usage:**
|
|
472
|
+
|
|
473
|
+
```
|
|
474
|
+
speckeeper audit-requirements
|
|
475
|
+
```
|
|
476
|
+
```
|
|
477
|
+
speckeeper audit-requirements --adapter gemini --dry-run
|
|
478
|
+
```
|
|
479
|
+
```
|
|
480
|
+
speckeeper audit-requirements --report-format json --output audit.json
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
#### Options
|
|
484
|
+
|
|
485
|
+
| Option | Aliases | Required | Default | Description |
|
|
486
|
+
|---|---|---|---|---|
|
|
487
|
+
| `--config` | -c | No | | Path to config file. |
|
|
488
|
+
| `--adapter` | -a | No | | SDK adapter to use for LLM execution. |
|
|
489
|
+
| `--model` | | No | | LLM model override. |
|
|
490
|
+
| `--dry-run` | -n | No | `false` | Output the constructed prompt without calling LLM. |
|
|
491
|
+
| `--show-prompt` | | No | `false` | Display the constructed LLM prompt on stderr. |
|
|
492
|
+
| `--fail-on` | | No | `"error"` | Minimum severity that causes a non-zero exit. |
|
|
493
|
+
| `--output` | -o | No | | Write result to a file instead of stdout. |
|
|
494
|
+
| `--report-format` | | No | `"json"` | Output format for the audit report. |
|
|
495
|
+
|
|
496
|
+
#### Exit Codes
|
|
497
|
+
|
|
498
|
+
**Exit 0:** Audit completed, no blocking findings.
|
|
499
|
+
|
|
500
|
+
- **stdout:** format=`{options.report-format}`
|
|
501
|
+
|
|
502
|
+
**Exit 1:** Unexpected error.
|
|
503
|
+
|
|
504
|
+
- **stderr:** format=`text`
|
|
505
|
+
|
|
506
|
+
**Exit 2:** Configuration or input error.
|
|
507
|
+
|
|
508
|
+
- **stderr:** format=`text`
|
|
509
|
+
|
|
510
|
+
**Exit 10:** Completed with blocking findings.
|
|
511
|
+
|
|
512
|
+
- **stdout:** format=`{options.report-format}`
|
|
513
|
+
|
|
514
|
+
**Exit 11:** Runtime dependency missing (agent-contracts-runtime).
|
|
515
|
+
|
|
516
|
+
- **stderr:** format=`text`
|
|
517
|
+
|
|
518
|
+
**Exit 12:** LLM provider or adapter error.
|
|
519
|
+
|
|
520
|
+
- **stderr:** format=`text`
|
|
521
|
+
|
|
522
|
+
#### Extensions
|
|
523
|
+
|
|
524
|
+
```yaml
|
|
525
|
+
x-agent:
|
|
526
|
+
riskLevel: medium
|
|
527
|
+
requiresConfirmation: false
|
|
528
|
+
idempotent: true
|
|
529
|
+
sideEffects:
|
|
530
|
+
- network
|
|
531
|
+
- file_write
|
|
532
|
+
sideEffectNote: Network calls to LLM provider when adapter is not mock. Filesystem write when --output is specified. Exit 10 = valid output with blocking findings (stdout contains result). Exit 11 = missing runtime dependency (non-retryable).
|
|
533
|
+
safeDryRunOption: --dry-run
|
|
534
|
+
expectedDurationMs: 120000
|
|
535
|
+
retryableExitCodes:
|
|
536
|
+
- 12
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
---
|
|
540
|
+
|
|
541
|
+
### propose-trace-links
|
|
542
|
+
|
|
543
|
+
LLM-based traceability link proposal.
|
|
544
|
+
|
|
545
|
+
Analyzes spec definitions and external source scan results to propose candidate traceability links between specs and implementation artifacts. Each link includes a confidence score and rationale.
|
|
546
|
+
|
|
547
|
+
**Usage:**
|
|
548
|
+
|
|
549
|
+
```
|
|
550
|
+
speckeeper propose-trace-links
|
|
551
|
+
```
|
|
552
|
+
```
|
|
553
|
+
speckeeper propose-trace-links --adapter claude --report-format json
|
|
554
|
+
```
|
|
555
|
+
```
|
|
556
|
+
speckeeper propose-trace-links --dry-run
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
#### Options
|
|
560
|
+
|
|
561
|
+
| Option | Aliases | Required | Default | Description |
|
|
562
|
+
|---|---|---|---|---|
|
|
563
|
+
| `--config` | -c | No | | Path to config file. |
|
|
564
|
+
| `--adapter` | -a | No | | SDK adapter to use for LLM execution. |
|
|
565
|
+
| `--model` | | No | | LLM model override. |
|
|
566
|
+
| `--dry-run` | -n | No | `false` | Output the constructed prompt without calling LLM. |
|
|
567
|
+
| `--show-prompt` | | No | `false` | Display the constructed LLM prompt on stderr. |
|
|
568
|
+
| `--fail-on` | | No | `"error"` | Minimum severity that causes a non-zero exit. |
|
|
569
|
+
| `--output` | -o | No | | Write result to a file instead of stdout. |
|
|
570
|
+
| `--report-format` | | No | `"json"` | Output format for the report. |
|
|
571
|
+
|
|
572
|
+
#### Exit Codes
|
|
573
|
+
|
|
574
|
+
**Exit 0:** Proposal completed, no blocking findings.
|
|
575
|
+
|
|
576
|
+
- **stdout:** format=`{options.report-format}`
|
|
577
|
+
|
|
578
|
+
**Exit 1:** Unexpected error.
|
|
579
|
+
|
|
580
|
+
- **stderr:** format=`text`
|
|
581
|
+
|
|
582
|
+
**Exit 2:** Configuration or input error.
|
|
583
|
+
|
|
584
|
+
- **stderr:** format=`text`
|
|
585
|
+
|
|
586
|
+
**Exit 10:** Completed with blocking findings.
|
|
587
|
+
|
|
588
|
+
- **stdout:** format=`{options.report-format}`
|
|
589
|
+
|
|
590
|
+
**Exit 11:** Runtime dependency missing (agent-contracts-runtime).
|
|
591
|
+
|
|
592
|
+
- **stderr:** format=`text`
|
|
593
|
+
|
|
594
|
+
**Exit 12:** LLM provider or adapter error.
|
|
595
|
+
|
|
596
|
+
- **stderr:** format=`text`
|
|
597
|
+
|
|
598
|
+
#### Extensions
|
|
599
|
+
|
|
600
|
+
```yaml
|
|
601
|
+
x-agent:
|
|
602
|
+
riskLevel: medium
|
|
603
|
+
requiresConfirmation: false
|
|
604
|
+
idempotent: true
|
|
605
|
+
sideEffects:
|
|
606
|
+
- network
|
|
607
|
+
- file_write
|
|
608
|
+
sideEffectNote: Network calls to LLM provider when adapter is not mock. Filesystem write when --output is specified. Exit 10 = valid output with blocking findings (stdout contains result). Exit 11 = missing runtime dependency (non-retryable).
|
|
609
|
+
safeDryRunOption: --dry-run
|
|
610
|
+
expectedDurationMs: 120000
|
|
611
|
+
retryableExitCodes:
|
|
612
|
+
- 12
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
---
|
|
616
|
+
|
|
617
|
+
### explain-impact
|
|
618
|
+
|
|
619
|
+
LLM-based explanation of impact analysis output.
|
|
620
|
+
|
|
621
|
+
Reads JSON output from speckeeper impact on stdin and generates a human-readable explanation suitable for PM/executive audiences. Includes affected artifact categorization, test considerations, and release risk assessment.
|
|
622
|
+
|
|
623
|
+
**Usage:**
|
|
624
|
+
|
|
625
|
+
```
|
|
626
|
+
speckeeper impact FR-001 --format json | speckeeper explain-impact
|
|
627
|
+
```
|
|
628
|
+
```
|
|
629
|
+
speckeeper impact ENT-ORDER --format json | speckeeper explain-impact --adapter claude
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
#### Options
|
|
633
|
+
|
|
634
|
+
| Option | Aliases | Required | Default | Description |
|
|
635
|
+
|---|---|---|---|---|
|
|
636
|
+
| `--config` | -c | No | | Path to config file. |
|
|
637
|
+
| `--adapter` | -a | No | | SDK adapter to use for LLM execution. |
|
|
638
|
+
| `--model` | | No | | LLM model override. |
|
|
639
|
+
| `--dry-run` | -n | No | `false` | Output the constructed prompt without calling LLM. |
|
|
640
|
+
| `--show-prompt` | | No | `false` | Display the constructed LLM prompt on stderr. |
|
|
641
|
+
| `--fail-on` | | No | `"error"` | Minimum severity that causes a non-zero exit. |
|
|
642
|
+
| `--output` | -o | No | | Write result to a file instead of stdout. |
|
|
643
|
+
| `--report-format` | | No | `"json"` | Output format for the report. |
|
|
644
|
+
|
|
645
|
+
#### Exit Codes
|
|
646
|
+
|
|
647
|
+
**Exit 0:** Explanation completed successfully.
|
|
648
|
+
|
|
649
|
+
- **stdout:** format=`{options.report-format}`
|
|
650
|
+
|
|
651
|
+
**Exit 1:** Unexpected error.
|
|
652
|
+
|
|
653
|
+
- **stderr:** format=`text`
|
|
654
|
+
|
|
655
|
+
**Exit 2:** Configuration or input error.
|
|
656
|
+
|
|
657
|
+
- **stderr:** format=`text`
|
|
658
|
+
|
|
659
|
+
**Exit 3:** No input on stdin.
|
|
660
|
+
|
|
661
|
+
- **stderr:** format=`text`
|
|
662
|
+
|
|
663
|
+
**Exit 10:** Completed with blocking findings.
|
|
664
|
+
|
|
665
|
+
- **stdout:** format=`{options.report-format}`
|
|
666
|
+
|
|
667
|
+
**Exit 11:** Runtime dependency missing (agent-contracts-runtime).
|
|
668
|
+
|
|
669
|
+
- **stderr:** format=`text`
|
|
670
|
+
|
|
671
|
+
**Exit 12:** LLM provider or adapter error.
|
|
672
|
+
|
|
673
|
+
- **stderr:** format=`text`
|
|
674
|
+
|
|
675
|
+
#### Extensions
|
|
676
|
+
|
|
677
|
+
```yaml
|
|
678
|
+
x-agent:
|
|
679
|
+
riskLevel: medium
|
|
680
|
+
requiresConfirmation: false
|
|
681
|
+
idempotent: true
|
|
682
|
+
sideEffects:
|
|
683
|
+
- network
|
|
684
|
+
- file_write
|
|
685
|
+
sideEffectNote: Network calls to LLM provider when adapter is not mock. Filesystem write when --output is specified. Exit 10 = valid output with blocking findings (stdout contains result). Exit 11 = missing runtime dependency (non-retryable).
|
|
686
|
+
safeDryRunOption: --dry-run
|
|
687
|
+
expectedDurationMs: 120000
|
|
688
|
+
retryableExitCodes:
|
|
689
|
+
- 12
|
|
690
|
+
```
|
|
691
|
+
|
|
692
|
+
---
|
|
693
|
+
|
|
694
|
+
### propose-acceptance-criteria
|
|
695
|
+
|
|
696
|
+
LLM-based acceptance criteria proposal.
|
|
697
|
+
|
|
698
|
+
Analyzes design specs and proposes testable acceptance criteria for each target spec. Optionally takes spec IDs as arguments to scope the proposal. Criteria are proposed in Given/When/Then or verification format.
|
|
699
|
+
|
|
700
|
+
**Usage:**
|
|
701
|
+
|
|
702
|
+
```
|
|
703
|
+
speckeeper propose-acceptance-criteria
|
|
704
|
+
```
|
|
705
|
+
```
|
|
706
|
+
speckeeper propose-acceptance-criteria FR-001 FR-002
|
|
707
|
+
```
|
|
708
|
+
```
|
|
709
|
+
speckeeper propose-acceptance-criteria --adapter gemini --dry-run
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
#### Arguments
|
|
713
|
+
|
|
714
|
+
| Name | Required | Description |
|
|
715
|
+
|---|---|---|
|
|
716
|
+
| `specIds` *(variadic)* | No | Spec IDs to propose criteria for. Defaults to all specs if omitted. |
|
|
717
|
+
|
|
718
|
+
#### Options
|
|
719
|
+
|
|
720
|
+
| Option | Aliases | Required | Default | Description |
|
|
721
|
+
|---|---|---|---|---|
|
|
722
|
+
| `--config` | -c | No | | Path to config file. |
|
|
723
|
+
| `--adapter` | -a | No | | SDK adapter to use for LLM execution. |
|
|
724
|
+
| `--model` | | No | | LLM model override. |
|
|
725
|
+
| `--dry-run` | -n | No | `false` | Output the constructed prompt without calling LLM. |
|
|
726
|
+
| `--show-prompt` | | No | `false` | Display the constructed LLM prompt on stderr. |
|
|
727
|
+
| `--fail-on` | | No | `"error"` | Minimum severity that causes a non-zero exit. |
|
|
728
|
+
| `--output` | -o | No | | Write result to a file instead of stdout. |
|
|
729
|
+
| `--report-format` | | No | `"json"` | Output format for the report. |
|
|
730
|
+
|
|
731
|
+
#### Exit Codes
|
|
732
|
+
|
|
733
|
+
**Exit 0:** Proposal completed, no blocking findings.
|
|
734
|
+
|
|
735
|
+
- **stdout:** format=`{options.report-format}`
|
|
736
|
+
|
|
737
|
+
**Exit 1:** Unexpected error.
|
|
738
|
+
|
|
739
|
+
- **stderr:** format=`text`
|
|
740
|
+
|
|
741
|
+
**Exit 2:** Configuration or input error.
|
|
742
|
+
|
|
743
|
+
- **stderr:** format=`text`
|
|
744
|
+
|
|
745
|
+
**Exit 10:** Completed with blocking findings.
|
|
746
|
+
|
|
747
|
+
- **stdout:** format=`{options.report-format}`
|
|
748
|
+
|
|
749
|
+
**Exit 11:** Runtime dependency missing (agent-contracts-runtime).
|
|
750
|
+
|
|
751
|
+
- **stderr:** format=`text`
|
|
752
|
+
|
|
753
|
+
**Exit 12:** LLM provider or adapter error.
|
|
754
|
+
|
|
755
|
+
- **stderr:** format=`text`
|
|
756
|
+
|
|
757
|
+
#### Extensions
|
|
758
|
+
|
|
759
|
+
```yaml
|
|
760
|
+
x-agent:
|
|
761
|
+
riskLevel: medium
|
|
762
|
+
requiresConfirmation: false
|
|
763
|
+
idempotent: true
|
|
764
|
+
sideEffects:
|
|
765
|
+
- network
|
|
766
|
+
- file_write
|
|
767
|
+
sideEffectNote: Network calls to LLM provider when adapter is not mock. Filesystem write when --output is specified. Exit 10 = valid output with blocking findings (stdout contains result). Exit 11 = missing runtime dependency (non-retryable).
|
|
446
768
|
safeDryRunOption: --dry-run
|
|
769
|
+
expectedDurationMs: 120000
|
|
770
|
+
retryableExitCodes:
|
|
771
|
+
- 12
|
|
447
772
|
```
|
|
448
773
|
|
|
449
774
|
---
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
| init | Initialize a new speckeeper project with starter templates |
|
|
10
10
|
| new | Create a new element with auto-generated ID |
|
|
11
11
|
| scaffold | Generate _models/ from a mermaid flowchart definition |
|
|
12
|
+
| audit-requirements | Semantic requirement quality audit via LLM (verifiability, ambiguity, granularity, terminology, design-mixing) |
|
|
13
|
+
| propose-trace-links | Propose candidate traceability links between specs with confidence scores and rationale |
|
|
14
|
+
| explain-impact | Translate impact analysis JSON (from stdin) into human-readable explanation for PM/executive audiences |
|
|
15
|
+
| propose-acceptance-criteria | Propose testable acceptance criteria in Given/When/Then format for specified specs |
|
|
12
16
|
| impact | Analyze the change impact scope of a specified ID |
|
|
13
17
|
|
|
14
18
|
---
|
|
@@ -293,6 +297,183 @@ speckeeper scaffold -s spec.md --dry-run
|
|
|
293
297
|
|
|
294
298
|
---
|
|
295
299
|
|
|
300
|
+
## CMD-AUDIT-REQ: audit-requirements
|
|
301
|
+
|
|
302
|
+
Semantic requirement quality audit via LLM (verifiability, ambiguity, granularity, terminology, design-mixing)
|
|
303
|
+
|
|
304
|
+
### Usage
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
speckeeper audit-requirements [options]
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### Parameters
|
|
311
|
+
|
|
312
|
+
| Name | Kind | Type | Required | Default | Description |
|
|
313
|
+
|------|------|------|----------|---------|-------------|
|
|
314
|
+
| -c, --config | option | path | | - | Path to config file |
|
|
315
|
+
| -a, --adapter | option | enum | | - | SDK adapter for LLM execution |
|
|
316
|
+
| --model | option | string | | - | LLM model override |
|
|
317
|
+
| -n, --dry-run | option | boolean | | false | Output constructed prompt without calling LLM |
|
|
318
|
+
| --fail-on | option | enum | | error | Minimum severity for non-zero exit |
|
|
319
|
+
| -o, --output | option | path | | - | Write result to file instead of stdout |
|
|
320
|
+
| --report-format | option | enum | | json | Output format for audit report |
|
|
321
|
+
| --show-prompt | option | boolean | | false | Display constructed LLM prompt on stderr |
|
|
322
|
+
|
|
323
|
+
### Examples
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
speckeeper audit-requirements
|
|
327
|
+
speckeeper audit-requirements --adapter openai --dry-run
|
|
328
|
+
speckeeper audit-requirements --report-format json --output audit.json
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Exit Codes
|
|
332
|
+
|
|
333
|
+
| Code | Description |
|
|
334
|
+
|------|-------------|
|
|
335
|
+
| 0 | No blocking findings |
|
|
336
|
+
| 1 | Unexpected error |
|
|
337
|
+
| 2 | Configuration or input error |
|
|
338
|
+
| 10 | Completed with blocking findings |
|
|
339
|
+
| 11 | Runtime dependency missing |
|
|
340
|
+
| 12 | LLM provider or adapter error |
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## CMD-PROPOSE-TRACE: propose-trace-links
|
|
345
|
+
|
|
346
|
+
Propose candidate traceability links between specs with confidence scores and rationale
|
|
347
|
+
|
|
348
|
+
### Usage
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
speckeeper propose-trace-links [options]
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### Parameters
|
|
355
|
+
|
|
356
|
+
| Name | Kind | Type | Required | Default | Description |
|
|
357
|
+
|------|------|------|----------|---------|-------------|
|
|
358
|
+
| -c, --config | option | path | | - | Path to config file |
|
|
359
|
+
| -a, --adapter | option | enum | | - | SDK adapter for LLM execution |
|
|
360
|
+
| --model | option | string | | - | LLM model override |
|
|
361
|
+
| -n, --dry-run | option | boolean | | false | Output constructed prompt without calling LLM |
|
|
362
|
+
| --fail-on | option | enum | | error | Minimum severity for non-zero exit |
|
|
363
|
+
| -o, --output | option | path | | - | Write result to file instead of stdout |
|
|
364
|
+
| --report-format | option | enum | | json | Output format for report |
|
|
365
|
+
| --show-prompt | option | boolean | | false | Display constructed LLM prompt on stderr |
|
|
366
|
+
|
|
367
|
+
### Examples
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
speckeeper propose-trace-links
|
|
371
|
+
speckeeper propose-trace-links --adapter claude --report-format json
|
|
372
|
+
speckeeper propose-trace-links --dry-run
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
### Exit Codes
|
|
376
|
+
|
|
377
|
+
| Code | Description |
|
|
378
|
+
|------|-------------|
|
|
379
|
+
| 0 | No blocking findings |
|
|
380
|
+
| 1 | Unexpected error |
|
|
381
|
+
| 2 | Configuration or input error |
|
|
382
|
+
| 10 | Completed with blocking findings |
|
|
383
|
+
| 11 | Runtime dependency missing |
|
|
384
|
+
| 12 | LLM provider or adapter error |
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## CMD-EXPLAIN-IMPACT: explain-impact
|
|
389
|
+
|
|
390
|
+
Translate impact analysis JSON (from stdin) into human-readable explanation for PM/executive audiences
|
|
391
|
+
|
|
392
|
+
### Usage
|
|
393
|
+
|
|
394
|
+
```bash
|
|
395
|
+
speckeeper explain-impact [options]
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
### Parameters
|
|
399
|
+
|
|
400
|
+
| Name | Kind | Type | Required | Default | Description |
|
|
401
|
+
|------|------|------|----------|---------|-------------|
|
|
402
|
+
| -c, --config | option | path | | - | Path to config file |
|
|
403
|
+
| -a, --adapter | option | enum | | - | SDK adapter for LLM execution |
|
|
404
|
+
| --model | option | string | | - | LLM model override |
|
|
405
|
+
| -n, --dry-run | option | boolean | | false | Output constructed prompt without calling LLM |
|
|
406
|
+
| --fail-on | option | enum | | error | Minimum severity for non-zero exit |
|
|
407
|
+
| -o, --output | option | path | | - | Write result to file instead of stdout |
|
|
408
|
+
| --report-format | option | enum | | json | Output format for report |
|
|
409
|
+
| --show-prompt | option | boolean | | false | Display constructed LLM prompt on stderr |
|
|
410
|
+
|
|
411
|
+
### Examples
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
speckeeper impact FR-001 --format json | speckeeper explain-impact
|
|
415
|
+
speckeeper impact ENT-ORDER --format json | speckeeper explain-impact --adapter claude
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
### Exit Codes
|
|
419
|
+
|
|
420
|
+
| Code | Description |
|
|
421
|
+
|------|-------------|
|
|
422
|
+
| 0 | Explanation completed |
|
|
423
|
+
| 1 | Unexpected error |
|
|
424
|
+
| 2 | Configuration or input error |
|
|
425
|
+
| 3 | No input on stdin |
|
|
426
|
+
| 10 | Completed with blocking findings |
|
|
427
|
+
| 11 | Runtime dependency missing |
|
|
428
|
+
| 12 | LLM provider or adapter error |
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
## CMD-PROPOSE-AC: propose-acceptance-criteria
|
|
433
|
+
|
|
434
|
+
Propose testable acceptance criteria in Given/When/Then format for specified specs
|
|
435
|
+
|
|
436
|
+
### Usage
|
|
437
|
+
|
|
438
|
+
```bash
|
|
439
|
+
speckeeper propose-acceptance-criteria [options]
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
### Parameters
|
|
443
|
+
|
|
444
|
+
| Name | Kind | Type | Required | Default | Description |
|
|
445
|
+
|------|------|------|----------|---------|-------------|
|
|
446
|
+
| <specIds> | argument | string | | - | Spec IDs to propose criteria for (defaults to all) |
|
|
447
|
+
| -c, --config | option | path | | - | Path to config file |
|
|
448
|
+
| -a, --adapter | option | enum | | - | SDK adapter for LLM execution |
|
|
449
|
+
| --model | option | string | | - | LLM model override |
|
|
450
|
+
| -n, --dry-run | option | boolean | | false | Output constructed prompt without calling LLM |
|
|
451
|
+
| --fail-on | option | enum | | error | Minimum severity for non-zero exit |
|
|
452
|
+
| -o, --output | option | path | | - | Write result to file instead of stdout |
|
|
453
|
+
| --report-format | option | enum | | json | Output format for report |
|
|
454
|
+
| --show-prompt | option | boolean | | false | Display constructed LLM prompt on stderr |
|
|
455
|
+
|
|
456
|
+
### Examples
|
|
457
|
+
|
|
458
|
+
```bash
|
|
459
|
+
speckeeper propose-acceptance-criteria
|
|
460
|
+
speckeeper propose-acceptance-criteria FR-001 FR-002
|
|
461
|
+
speckeeper propose-acceptance-criteria --adapter gemini --dry-run
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
### Exit Codes
|
|
465
|
+
|
|
466
|
+
| Code | Description |
|
|
467
|
+
|------|-------------|
|
|
468
|
+
| 0 | No blocking findings |
|
|
469
|
+
| 1 | Unexpected error |
|
|
470
|
+
| 2 | Configuration or input error |
|
|
471
|
+
| 10 | Completed with blocking findings |
|
|
472
|
+
| 11 | Runtime dependency missing |
|
|
473
|
+
| 12 | LLM provider or adapter error |
|
|
474
|
+
|
|
475
|
+
---
|
|
476
|
+
|
|
296
477
|
## CMD-IMPACT: impact
|
|
297
478
|
|
|
298
479
|
Analyze the change impact scope of a specified ID
|