sdd-cli 0.1.23 → 0.1.25

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 CHANGED
@@ -1,688 +1,112 @@
1
- # sdd-cli
2
-
3
- Specification-driven delivery CLI that turns requirements into specs, architecture, tests, and traceable docs.
4
-
5
- ## Repository overview
6
-
7
- This repo hosts the CLI implementation, domain flows, templates, schemas, and structured documentation for the SDD workflow.
8
-
9
- ## Vision (think pyramids)
10
-
11
- Build the foundation once, then lift everything else. The tool provides a durable structure: requirements, architecture, technical specs, quality gates, test plans, and decision logs. AI gets "wings" by being guided, constrained, and accountable at every step.
12
-
13
- Mission and vision live in `docs/MISSION.md` and `docs/VISION.md`.
14
-
15
- Start with `docs/INDEX.md` for a full documentation map and `docs/STYLE.md` for formatting guidance.
16
- Contributing guidelines live in `docs/CONTRIBUTING.md`.
17
- Contributor quickstart lives in `docs/CONTRIBUTOR_QUICKSTART.md`.
18
- Issue triage taxonomy lives in `docs/ISSUE_TRIAGE_PLAYBOOK.md`.
19
- Use the PR template in `.github/PULL_REQUEST_TEMPLATE.md`.
20
- Maintenance guidance lives in `docs/MAINTENANCE.md`.
21
- Install troubleshooting lives in `docs/TROUBLESHOOTING.md`.
22
-
23
- Deep process, commands, interactions, and diagrams live in:
24
- - `docs/PROCESS.md`
25
- - `docs/COMMANDS.md`
26
- - `docs/INTERACTIONS.md`
27
- - `docs/DIAGRAMS.md`
28
- - `docs/ARCHITECTURE.md`
29
- - `docs/SDD_CHECKLIST.md`
30
- - `docs/GLOSSARY.md`
31
- - `docs/VALIDATION_CHECKLIST.md`
32
- - `docs/FLOW_TEMPLATE_MAP.md`
33
- - `docs/GATE_PROMPT_MATRIX.md`
34
- - `docs/TEMPLATE_LINT_RULES.md`
35
- - `docs/FLOW_GATE_MAP.md`
36
- - `docs/FLOW_COMPLIANCE_CHECKLIST.md`
37
- - `docs/RELEASE_READINESS_CHECKLIST.md`
38
- - `docs/AUTOMATION_OUTLINE.md`
39
- - `docs/GATE_SCHEMA_MAP.md`
40
- - `docs/GATE_TEMPLATE_MAP.md`
41
- - `docs/KNOWLEDGE_MODE_CHECKLIST.md`
42
- - `docs/DOMAIN_COMPLETENESS_CHECKLIST.md`
43
- - `docs/IMPLEMENTATION_PLAN.md`
44
- - `docs/CLEAN_ARCHITECTURE_CHECKLIST.md`
45
- - `docs/REQUIREMENTS_ALIGNMENT.md`
46
- - `docs/GITFLOW.md`
47
- - `docs/RELEASE_PROCESS.md`
48
-
49
- Reports live in:
50
- - `docs/reports/E2E_REPORT.md`
51
- - `docs/reports/FLOW_COVERAGE.md`
52
- - `docs/reports/GATE_COVERAGE_REPORT.md`
53
- - `docs/reports/GATE_TEMPLATE_COVERAGE_REPORT.md`
54
- - `docs/reports/PACK_COVERAGE_REPORT.md`
55
- - `docs/reports/PROMPT_AUDIT_REPORT.md`
56
- - `docs/reports/PROMPT_COVERAGE_REPORT.md`
57
- - `docs/reports/QUALITY_SCORE_RUBRIC.md`
58
- - `docs/reports/SPEC_COMPLETENESS_REPORT.md`
59
-
60
- Examples and templates:
61
- - `examples/transcripts/`
62
- - `examples/artifacts/`
63
- - `examples/schemas/`
64
- - `examples/diagrams/`
65
- - `examples/packs/`
66
- - `examples/README.md`
67
- - `templates/README.md`
68
- - `schemas/README.md`
69
- - `flows/README.md`
70
- - `templates/`
71
- - `schemas/`
72
-
73
- Automation:
74
- - `scripts/e2e.ps1`
75
- - `scripts/e2e.sh`
76
-
77
- ### AI gets wings through structure
78
- - **Question banks** enforce clarity before planning.
79
- - **Quality contracts** enforce clean code across languages.
80
- - **Decision logs** make trade-offs explicit.
81
- - **Proof gates** ensure tests and acceptance criteria are met.
82
- - **Multi-agent roles** ensure no single blind spot dominates.
83
-
84
- ## Why SDD matters
85
-
86
- An SDD (Software Design Document) translates requirements into architecture and technical design decisions. It exists to reduce ambiguity, drive alignment, and protect quality across the lifecycle.
87
-
88
- Key properties:
89
- - Clear decisions and trade-offs.
90
- - Traceability from requirement to design and tests.
91
- - Versioned, auditable progress.
92
- - Designed for real delivery, not just documentation.
93
-
94
- ## What this tool generates
95
-
96
- - Requirements (functional + non-functional)
97
- - Functional specs (flows, use cases, rules)
98
- - Technical specs (stack, interfaces, data, security)
99
- - Architecture (C4, containers, components, deployment)
100
- - Best practices and quality gates
101
- - Test plan and acceptance criteria
102
- - Summary (objective, key decisions, open questions)
103
- - Decision log (ADR-style)
104
- - Progress log
105
- - Project README aligned to the SDD
106
-
107
- ## Install and run (cross-platform)
108
-
109
- ```
110
- npm install -g sdd-cli
111
- ```
112
-
113
- Then:
114
- ```
115
- sdd-cli hello
116
- ```
117
- Or run a zero-friction demo:
118
- ```
119
- sdd-cli quickstart --example saas
120
- ```
121
-
122
- Package name on npm is `sdd-cli` (CLI commands remain `sdd-cli` and `sdd`).
123
-
124
- Project names must use letters, numbers, spaces, `-` or `_`, and cannot include path separators.
125
-
126
- The `hello` command is the entry point: it connects to AI, lists active projects, and offers to create a new one or continue.
127
- Default behavior is now a guided autopilot from discovery to completion with minimal prompts.
128
- When you pass direct intent text (`sdd-cli hello "..."`), hello uses auto-guided defaults and minimizes confirmations.
129
- Use `--questions` when you want the manual question-by-question flow.
130
-
131
- ## The happy path (end-to-end flow)
132
-
133
- 1) **Start**
134
- `sdd-cli hello` connects to AI, shows active projects, and asks if you want to start new or continue.
135
-
136
- 2) **Autopilot Discovery**
137
- Creates a requirement draft in backlog with validated defaults.
138
-
139
- 3) **Autopilot Planning**
140
- Generates functional spec, technical spec, architecture, and test plan drafts.
141
-
142
- 4) **Autopilot Start**
143
- Creates implementation plan and quality artifacts; moves requirement to `in-progress`.
144
-
145
- 5) **Autopilot Verify**
146
- Updates/validates test-plan artifacts.
147
-
148
- 6) **Autopilot Finish**
149
- Finalizes requirement, writes project-level README artifacts, and moves requirement to `done`.
150
-
151
- 7) **Manual Detail (optional)**
152
- Run `sdd-cli hello --questions` when you prefer detailed prompt packs before drafting.
153
-
154
- ## Commands (proposed)
155
-
156
- ### Core
157
- - `sdd-cli hello` -- interactive session, project picker, full guided flow
158
- - `sdd-cli quickstart` -- one-command demo flow with built-in examples
159
- - `sdd-cli init` -- create SDD workspace and config
160
- - `sdd-cli list` -- list flows, router flows, templates, prompt packs, and projects
161
- - `sdd-cli status --next` -- show current project state and exact next command
162
- - `sdd-cli scope list` -- list monorepo workspace scopes
163
- - `sdd-cli scope status <scope>` -- show status summary for one scope
164
- - `sdd-cli doctor` -- validate completeness and consistency
165
- - `sdd-cli doctor --fix` -- apply safe remediations for missing requirement ops files
166
-
167
- ### Router
168
- - `sdd-cli route` -- classify user intent and route to the right flow
169
-
170
- ### Imports
171
- - `sdd-cli import issue <github-issue-url>` -- import issue context and bootstrap autopilot
172
- - `sdd-cli import jira <ticket-or-browse-url>` -- import Jira context and bootstrap autopilot
173
- - `sdd-cli import linear <ticket-or-issue-url>` -- import Linear context and bootstrap autopilot
174
- - `sdd-cli import azure <work-item-or-url>` -- import Azure Boards context and bootstrap autopilot
175
-
176
- ### Requirement lifecycle
177
- - `sdd-cli req create`
178
- - `sdd-cli req refine`
179
- - `sdd-cli req plan`
180
- - `sdd-cli req start`
181
- - `sdd-cli req finish`
182
-
183
- ### Generators
184
- - `sdd-cli gen requirements`
185
- - `sdd-cli gen functional-spec`
186
- - `sdd-cli gen technical-spec`
187
- - `sdd-cli gen architecture`
188
- - `sdd-cli gen best-practices`
189
- - `sdd-cli gen project-readme`
190
-
191
- ### Test planning
192
- - `sdd-cli test plan`
193
-
194
- ### Learning mode
195
- - `sdd-cli learn start`
196
- - `sdd-cli learn refine`
197
- - `sdd-cli learn deliver`
198
-
199
- ### PR review
200
- - `sdd-cli pr start`
201
- - `sdd-cli pr audit`
202
- - `sdd-cli pr respond`
203
- - `sdd-cli pr finish`
204
- - `sdd-cli pr report`
205
- - `sdd-cli pr bridge`
206
- - `sdd-cli pr risk`
207
- - `sdd-cli pr bridge-check`
208
-
209
- ### Flags
210
- - `--approve` -- run without extra confirmations
211
- - `--improve` -- re-open and enhance existing docs
212
- - `--output <path>` -- override workspace output
213
- - `--scope <name>` -- isolate artifacts by monorepo scope namespace
214
- - `--metrics-local` -- record local opt-in telemetry snapshots in `workspace/metrics`
215
- - `--project <name>` -- set project name
216
- - `--parallel` -- generate in parallel
217
- - `--questions` -- use manual question-driven discovery flow
218
- - `--non-interactive` -- run without confirmations (script/CI friendly)
219
- - `--beginner` -- show extra step-by-step explanations during hello autopilot
220
- - `--dry-run` -- preview autopilot stages without writing artifacts
221
- - `--from-step` -- resume autopilot from `create|plan|start|test|finish`
222
- - `--alias sdd` -- optional alias to run as `sdd`
223
-
224
- ## Beginner quickstart
225
-
226
- 1) Install:
227
- ```
228
- npm install -g sdd-cli
229
- ```
230
- 2) Run:
231
- ```
232
- sdd-cli hello "I want a simple booking system for appointments"
233
- ```
234
- 3) Follow minimal prompts (workspace/project confirmation).
235
- 4) Let autopilot complete the full flow.
236
- 5) Check output in:
237
- `<workspace>/<project>/requirements/done/<REQ-ID>/`
238
-
239
- For a full onboarding walkthrough, see:
240
- - `docs/FIRST_15_MINUTES.md`
241
- - `examples/transcripts/FIRST_15_MINUTES.md`
242
-
243
- ## Recovery quick commands
244
-
245
- - Continue an existing project:
246
- `sdd-cli --project <project-name> hello "continue"`
247
- - Resume from a specific stage:
248
- `sdd-cli --project <project-name> --from-step test hello "resume"`
249
- - Script-safe full default run:
250
- `sdd-cli --non-interactive hello "<your intent>"`
251
- - Preview autopilot steps without writing files:
252
- `sdd-cli --dry-run hello "<your intent>"`
253
-
254
- ## Execution tracking
255
-
256
- - Adoption execution tracker: `AGENTS.md`
257
- - 90-day roadmap: `docs/ADOPTION_ROADMAP_90D.md`
258
- - Value backlog: `docs/VALUE_BACKLOG.md`
259
- - Error codes and remediation guide: `docs/ERROR_CODES.md`
260
- - Integration adapters roadmap and contract: `docs/INTEGRATION_ADAPTERS.md`
261
-
262
- ## Where files are stored (clean repos)
263
-
264
- By default, the tool writes to a dedicated workspace, not into your repo:
265
-
266
- - Default (global workspace):
267
- - Windows: `%APPDATA%/sdd-cli/workspaces/<project>`
268
- - macOS/Linux: `~/.config/sdd-cli/workspaces/<project>`
269
-
270
- Optional:
271
- - `--output ./docs/sdd` to keep SDD next to the repo
272
- - `--output ../_sdd/<project>` for a separate shared directory
273
- - `--scope apps-payments` to isolate workspaces for one monorepo domain
274
-
275
- ## Release notes automation
276
-
277
- - Generate notes from conventional commits:
278
- `npm run release:notes`
279
- - Write notes to `docs/releases/<version>.md`:
280
- `npm run release:notes -- --write --version v0.1.20`
281
- - Generate post-release quality summary:
282
- `npm run release:metrics`
283
- - Run fast contributor smoke checks:
284
- `npm run dev:smoke`
285
- - Run contributor pre-PR release checks:
286
- `npm run dev:release-check`
287
- - Promote `Unreleased` changelog entries into a version:
288
- `npm run release:changelog -- --version v0.1.20`
289
- - Verify tag/version consistency:
290
- `npm run verify:release-tag -- --tag v0.1.20`
291
- - Verify npm publish bundle before publishing:
292
- `npm run verify:publish`
293
-
294
- ## Local metrics (opt-in)
295
-
296
- - Enable local snapshots:
297
- `sdd-cli --metrics-local hello "your intent"`
298
- - View summary from current workspace root:
299
- `npm run metrics:summary -- <workspace-path>`
300
-
301
- ## Lifecycle folders
302
-
303
- ```
304
- docs/
305
- requirements/
306
- backlog/
307
- wip/
308
- in-progress/
309
- done/
310
- archived/
311
- ```
312
-
313
- `wip/` is the planning and design stage. `in-progress/` is optional for implementation-specific tracking.
314
-
315
- ## How we ensure the right questions get asked
316
-
317
- ### Mandatory discovery fields
318
- - Clear objective (measurable)
319
- - Users/actors
320
- - Scope and out-of-scope
321
- - Acceptance criteria
322
- - Non-functional requirements (security, performance, availability)
323
- - Data sensitivity and compliance requirements
324
-
325
- ### Ambiguity detection
326
- - Vague adjectives require metrics ("fast", "secure", "scalable")
327
- - Missing scale (traffic, data size, concurrency) is blocked
328
- - External dependencies must be listed or the flow stops
329
-
330
- ### Persona-aware questions
331
- - The question bank adapts to the selected flow (law, education, data science, etc.).
332
- - Domain rules add extra checks (compliance, audit, bias, safety).
333
-
334
- ### Consistency gate
335
- `sdd-cli doctor` ensures every requirement has matching specs, tests, and ADRs.
336
-
337
- ## Clean code across any language
338
-
339
- ### Quality contract
340
- `quality.yml` defines global standards and language-specific toolchains.
341
-
342
- General rules:
343
- - Single responsibility per function/class
344
- - Explicit error handling and consistent logging
345
- - Formatting and linting required
346
- - Tests for critical flows
347
- - Max complexity threshold
348
-
349
- Language profiles (opt-in):
350
- - JS/TS: ESLint + Prettier + Vitest
351
- - Python: Ruff/Black + Pytest
352
- - Go: gofmt + golangci-lint + go test
353
- - Java: Checkstyle/SpotBugs + JUnit
354
-
355
- ## Multi-agent coordination
356
-
357
- ### Roles
358
- - **Req Analyst** -- clarity and acceptance criteria
359
- - **Solution Architect** -- design and trade-offs
360
- - **Tech Lead** -- implementation plan and quality
361
- - **QA** -- test plan, edge cases, coverage
362
- - **Docs Scribe** -- changelog, ADRs, progress log
363
-
364
- ### Agent exit contract
365
- Each agent must leave:
366
- - Summary of work
367
- - Changes made
368
- - Risks and open questions
369
- - Next steps
370
-
371
- ## Codex-ready workflow (skills)
372
-
373
- The tool is designed to work cleanly with Codex and other AI agents by providing:
374
- - A consistent folder structure and artifact names
375
- - Explicit question banks and ambiguity detection
376
- - Clear agent roles and handoffs
377
- - A required progress log and decision log
378
-
379
- See `skills/` for the agent protocol and prompt packs.
380
-
381
- ## AI "wings": the framework
382
-
383
- AI should not guess. It should be guided, constrained, and verified.
384
-
385
- 1) **Clarify** -- ask missing questions
386
- 2) **Commit** -- lock scope and acceptance criteria
387
- 3) **Design** -- architecture and trade-offs
388
- 4) **Prove** -- tests and validations
389
- 5) **Deliver** -- clean code and docs
390
- 6) **Reflect** -- changelog and decision log
391
-
392
- ## Intent router (multi-domain)
393
-
394
- The router identifies the user intent and routes to the correct flow, prompts, and artifacts.
395
-
396
- ### Example
397
- User: `sdd-cli hello`
398
- User input: "I have a bug: <link>. How to solve?"
399
-
400
- Router actions:
401
- 1) Detect intent: **bug fix**
402
- 2) Ask permission to fetch the link and read it
403
- 3) If approved, read and summarize the issue
404
- 4) Offer **5+ solution options** with trade-offs
405
- 5) Ask the user for their view of the bug and more context
406
- 6) Continue into requirements -> functional spec -> technical spec -> architecture
407
- 7) If not happy, user runs `--improve` to trigger self-audit and regenerate
408
-
409
- ### Router signals (high level)
410
- - **Bug fix**: "bug", "issue", "error", stack trace, repro steps
411
- - **Learning**: "learn", "explain", "teach me", "what is"
412
- - **Design/creative**: "logo", "brand", "layout", "art", "visual"
413
- - **Research**: "study", "paper", "literature", "survey"
414
- - **Data science**: "model", "dataset", "prediction"
415
- - **Business/economics**: "market", "pricing", "forecast"
416
- - **Legal/civic**: "court", "policy", "compliance"
417
- - **PR review**: "PR", "pull request", "review comments", "code review"
418
-
419
- ### Router output
420
- - Selected flow
421
- - Required prompts
422
- - Required artifacts
423
- - Quality gates
424
- - Suggested agents
425
-
426
- ## Router scripts and schemas
427
-
428
- - `router/` contains step-by-step conversation scripts by intent.
429
- - `schemas/` defines JSON schemas for core artifacts and session data.
430
-
431
- These files are the source of truth for the CLI behavior.
432
-
433
- ## Bug-first workflow (deep detail)
434
-
435
- When a user reports a bug, the tool must:
436
- - Gather the issue context (link, repo, environment)
437
- - Ask for reproduction steps and severity
438
- - Propose 5+ resolution paths (quick fix, rollback, root-cause, refactor, hotfix)
439
- - Ask the user to confirm the preferred path
440
- - Generate requirements and specs for the fix
441
- - Gate implementation until tests and risk checks are defined
442
-
443
- ## Cross-domain coverage
444
-
445
- The router supports **software and non-software** flows:
446
- - Software engineering (features, bugs, refactors)
447
- - Data science (models, pipelines, experiments)
448
- - Design and art (visual systems, branding, layout)
449
- - Humanities (history, sociology, education)
450
- - Business and economics (market, policy, pricing)
451
- - PR review and code feedback workflows
452
-
453
- ## Knowledge-first mode (deep research sessions)
454
-
455
- The tool is not only for software requirements. It can also run **knowledge journeys** where the user wants to learn a topic deeply (e.g., "I want to know more about Egypt").
456
-
457
- ### How it works
458
- 1) **Interview** the user to understand depth, audience, purpose, and constraints.
459
- 2) **Build a research plan** (outline, key questions, scope boundaries).
460
- 3) **Run multi-agent synthesis** with specialized roles (historian, critic, summarizer).
461
- 4) **Deliver layered outputs**: executive summary, deep dive, references, and follow-up prompts.
462
-
463
- ### Commands (proposed)
464
- - `sdd-cli learn start` -- begin a guided research session
465
- - `sdd-cli learn refine` -- refine scope or depth
466
- - `sdd-cli learn deliver` -- produce final output package
467
-
468
- ### Interview prompts (examples)
469
- - Why do you want to learn this topic?
470
- - What level of depth (overview, academic, expert)?
471
- - What format do you want (summary, syllabus, report, Q&A)?
472
- - Any focus areas (history, culture, economy, politics)?
473
- - Time available to read or study?
474
-
475
- ### Quality framework for answers
476
- - Bias checks and alternative viewpoints
477
- - Source reliability scoring
478
- - Clear assumptions and confidence levels
479
- - A "what to read next" section
480
-
481
- ### Outputs (knowledge workspace)
482
- - `brief.md` -- short explanation
483
- - `deep-dive.md` -- extended structured answer
484
- - `reading-list.md` -- curated sources
485
- - `qa.md` -- questions and answers
486
- - `progress-log.md` -- session history
487
-
488
- This mode uses the same "AI wings" principle: clarify, commit, design, prove, deliver, reflect.
489
-
490
- ## MVP v1 (exhaustive command and prompt scope)
491
-
492
- ### MVP goals
493
- - One command to enter (hello), one command to finish (req finish).
494
- - Always ask the right questions before planning or implementation.
495
- - Always create a workspace, never contaminate dependencies.
496
-
497
- ### MVP commands
498
- Core:
499
- - `sdd-cli hello`
500
- - `sdd-cli init`
501
- - `sdd-cli list`
502
- - `sdd-cli doctor`
503
-
504
- Requirements:
505
- - `sdd-cli req create`
506
- - `sdd-cli req refine`
507
- - `sdd-cli req plan`
508
- - `sdd-cli req start`
509
- - `sdd-cli req finish`
510
-
511
- Generators:
512
- - `sdd-cli gen requirements`
513
- - `sdd-cli gen functional-spec`
514
- - `sdd-cli gen technical-spec`
515
- - `sdd-cli gen architecture`
516
- - `sdd-cli gen best-practices`
517
- - `sdd-cli gen project-readme`
518
-
519
- ### MVP prompts (must-ask list)
520
- Discovery:
521
- - Objective (measurable outcome)
522
- - Users/actors and their needs
523
- - Scope and out-of-scope
524
- - Acceptance criteria
525
- - NFRs: security, performance, availability
526
- - Data sensitivity and compliance
527
- - Constraints (budget, deadlines, platforms)
528
-
529
- Persona-specific extensions:
530
- - Legal: privilege, retention, audit, jurisdiction
531
- - Education: rubric, accessibility, student privacy
532
- - Data science: bias, drift, metrics, monitoring
533
- - Software: dependencies, regression risk, rollout
534
- - Bug fix: repro steps, severity, rollback
535
-
536
- Planning:
537
- - Minimal viable architecture
538
- - Key integrations and dependencies
539
- - Data model outline
540
- - Error handling and logging strategy
541
- - Observability requirements
542
-
543
- Implementation readiness:
544
- - Test plan (critical paths + edge cases)
545
- - Quality contract profile
546
- - Definition of Done checklist
547
-
548
- ### MVP outputs (required)
549
- - `requirement.md`
550
- - `functional-spec.md`
551
- - `technical-spec.md`
552
- - `architecture.md`
553
- - `test-plan.md`
554
- - `quality.yml`
555
- - `decision-log/ADR-0001.md`
556
- - `progress-log.md`
557
- - `project-readme.md`
558
-
559
- ## Interactive session (hello) design
560
-
561
- ### Steps
562
- 1) **Connect** to AI and load local workspace index.
563
- 2) **List active projects** with status (backlog, wip, done).
564
- 3) **Choose**: start new or continue.
565
- 4) **Context**: ask domain and persona to load the right flow.
566
- 5) **Plan**: run discovery prompts and generate backlog artifacts.
567
- 6) **Advance**: offer refine, plan, or start automatically.
568
-
569
- ### Data model (concept)
570
- - `workspaces.json` tracks projects and last activity.
571
- - Each project has `metadata.json` with domain, status, language profile.
572
-
573
- ## End-to-end framework (single command experience)
574
-
575
- The goal is a single entry command that ends in a deliverable package:
576
- - Documents are structured
577
- - Decisions are logged
578
- - Tests are planned
579
- - Quality gates are in place
580
- - Users can resume at any point
581
-
582
- ## Workspace layout (canonical)
583
-
584
- Each project is self-contained and resumable:
585
- ```
586
- <workspace>/
587
- metadata.json
588
- requirements/
589
- backlog/
590
- wip/
591
- in-progress/
592
- done/
593
- archived/
594
- pr-reviews/
595
- PR-123/
596
- pr-comment-audit.md
597
- pr-review-summary.md
598
- pr-review-report.md
599
- pr-metrics.md
600
- pr-comment-lifecycle.md
601
- guides/
602
- responses/
603
- decision-log/
604
- progress-log.md
605
- quality.yml
606
- test-plan.md
607
- project-readme.md
608
- ```
609
-
610
- ## Artifact traceability
611
-
612
- Every requirement has:
613
- - A unique ID (REQ-XXXX)
614
- - Linked specs and test plan
615
- - Decision log references
616
- - A progress log trail
617
-
618
- ## Diagram generation (planned)
619
-
620
- The tool can generate C4-style diagrams using templates:
621
- - Context diagram
622
- - Container diagram
623
- - Component diagram
624
-
625
- These are exported as text (Mermaid/PlantUML) to keep them versionable.
626
-
627
- ## Provider abstraction (AI)
628
-
629
- The CLI is provider-agnostic:
630
- - Local model
631
- - Remote model
632
- - Codex-compatible
633
-
634
- The router selects agent roles, while the provider is configurable.
635
-
636
- ## Privacy and approvals
637
-
638
- - Any external link access requires explicit user approval.
639
- - All prompts and outputs are stored locally unless user opts in to sync.
640
-
641
- ## Gaps now covered
642
-
643
- - Single-entry "hello" flow
644
- - Multi-domain router and role activation
645
- - Persona-aware questions
646
- - Workspace isolation and resumable state
647
- - Diagram and architecture outputs
648
- - Cross-language quality gates
649
-
650
- ## Flows (domain playbooks)
651
-
652
- See `flows/` for detailed, domain-specific guides:
653
- - Lawyer
654
- - Teacher
655
- - Admissions admin
656
- - State admin
657
- - Taxes admin
658
- - Student (university)
659
- - Data scientist
660
- - Programmer
661
- - Bug fix
662
- - Ecommerce
663
- - Retail store
664
- - Court system
665
- - Graphic design
666
- - Art
667
- - History
668
- - Sociology
669
- - Economics
670
-
671
- These are opinionated, real-world flows that demonstrate how the CLI should be used in practice.
672
-
673
- ## References (public sources)
674
-
675
- - IEEE 1016: Software Design Description (SDD)
676
- - C4 Model: https://c4model.com
677
- - ADRs: https://adr.github.io
678
- - RFC 2119 (MUST/SHOULD): https://www.rfc-editor.org/rfc/rfc2119
679
- - User Stories: https://www.atlassian.com/agile/project-management/user-stories
680
- - INVEST: https://www.agilealliance.org/glossary/invest/
681
- - Definition of Done: https://www.atlassian.com/agile/project-management/definition-of-done
682
- - BDD: https://cucumber.io/docs/bdd/
683
- - arc42: https://arc42.org
684
- - OWASP ASVS: https://owasp.org/www-project-application-security-verification-standard/
685
- - Jobs to be Done: https://www.intercom.com/blog/jtbd/
686
- - Design Thinking: https://www.interaction-design.org/literature/topics/design-thinking
687
- - CRISP-DM: https://www.ibm.com/docs/en/spss-modeler/18.2.2?topic=dm-crisp
688
-
1
+ # sdd-cli
2
+
3
+ AI-orchestrated CLI for software delivery: it turns one product goal into requirements, specs, test plans, generated app code, quality checks, and optional GitHub publish.
4
+
5
+ ## What It Does
6
+
7
+ - Starts from one command:
8
+ - `sdd-tool "create a notes app with persistence"`
9
+ - Runs an end-to-end lifecycle:
10
+ - requirement draft
11
+ - functional/technical/architecture/test artifacts
12
+ - generated app in `generated-app/`
13
+ - quality gates and repair loop
14
+ - git init/commit
15
+ - optional GitHub publish
16
+ - Works with provider CLIs (Gemini by default, Codex optional).
17
+
18
+ ## Why Use It
19
+
20
+ - Reduces time from idea to usable baseline project.
21
+ - Enforces documentation + quality gates before accepting delivery.
22
+ - Keeps artifacts traceable from planning to implementation.
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ npm install -g sdd-cli
28
+ ```
29
+
30
+ Binary aliases:
31
+ - `sdd-cli`
32
+ - `sdd`
33
+ - `sdd-tool`
34
+
35
+ ## Fast Start
36
+
37
+ ```bash
38
+ sdd-tool "create a calculator app"
39
+ ```
40
+
41
+ Or explicit:
42
+
43
+ ```bash
44
+ sdd-cli hello "create a calculator app"
45
+ ```
46
+
47
+ ## Best-Payoff Commands
48
+
49
+ - `sdd-cli hello "<goal>"`: full autopilot flow.
50
+ - `sdd-cli suite "<goal>"`: continuous mode; asks only blocking questions.
51
+ - `sdd-cli status --next`: exact next command suggestion.
52
+ - `sdd-cli config show`: inspect active config.
53
+ - `sdd-cli config set <key> <value>`: set provider/model/workspace defaults.
54
+
55
+ ## Global Flags
56
+
57
+ - `--approve`, `--improve`, `--parallel`
58
+ - `--non-interactive`, `--dry-run`, `--beginner`, `--from-step`
59
+ - `--project`, `--output`, `--scope`, `--metrics-local`
60
+ - `--provider`, `--gemini`, `--model`
61
+
62
+ ## Config (Important)
63
+
64
+ Config file:
65
+ - Windows: `%APPDATA%/sdd-cli/config.yml`
66
+ - macOS/Linux: `~/.config/sdd-cli/config.yml`
67
+
68
+ Default values:
69
+ - `workspace.default_root: {{home}}/Documents/sdd-tool-projects`
70
+ - `ai.preferred_cli: gemini`
71
+ - `ai.model: gemini-2.5-flash-lite`
72
+ - `mode.default: guided`
73
+ - `git.publish_enabled: false`
74
+
75
+ Recommended first setup:
76
+
77
+ ```bash
78
+ sdd-cli config init
79
+ sdd-cli config set workspace.default_root "{{home}}/Documents/sdd-tool-projects"
80
+ sdd-cli config set ai.preferred_cli gemini
81
+ sdd-cli config set git.publish_enabled false
82
+ ```
83
+
84
+ ## Provider Notes
85
+
86
+ - Gemini default:
87
+ - `sdd-cli --provider gemini hello "<goal>"`
88
+ - shortcut: `sdd-cli --gemini hello "<goal>"`
89
+ - Auto-select available provider:
90
+ - `sdd-cli --provider auto hello "<goal>"`
91
+ - Verify provider wiring:
92
+ - `sdd-cli ai status`
93
+
94
+ ## Output Layout
95
+
96
+ Projects are created under your workspace root:
97
+
98
+ - `<workspace>/<project>/requirements/...`
99
+ - `<workspace>/<project>/generated-app/...`
100
+ - `<workspace>/<project>/decision-log/...`
101
+
102
+ ## Release and Docs
103
+
104
+ - Changelog: `docs/CHANGELOG.md`
105
+ - Command reference: `docs/COMMANDS.md`
106
+ - Error code map: `docs/ERROR_CODES.md`
107
+ - Release notes: `docs/releases/`
108
+ - Strategy and market docs: `docs/strategy/`
109
+
110
+ ## License
111
+
112
+ MIT