sdd-cli 0.1.24 → 0.1.26

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