sddx-workflow 0.9.0 → 0.10.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.
Files changed (98) hide show
  1. package/README.md +249 -63
  2. package/dist/cli.js +370 -129
  3. package/package.json +1 -1
  4. package/templates/AGENTS.md +38 -5
  5. package/templates/CLAUDE.md +76 -5
  6. package/templates/claude-commands/conventions-sync.md +3 -0
  7. package/templates/claude-commands/impl-gap.md +10 -0
  8. package/templates/claude-commands/research.md +7 -0
  9. package/templates/claude-commands/review.md +1 -1
  10. package/templates/claude-commands/scan.md +5 -0
  11. package/templates/claude-commands/spec-amend.md +7 -0
  12. package/templates/claude-commands/spec-analyze.md +5 -0
  13. package/templates/claude-commands/spec-clarify.md +5 -0
  14. package/templates/claude-commands/spec-conflicts.md +3 -0
  15. package/templates/claude-commands/spec-status.md +3 -0
  16. package/templates/claude-commands/spec-tasks.md +3 -3
  17. package/templates/claude-commands/verify.md +5 -0
  18. package/templates/codex-skills/conventions-sync/SKILL.md +8 -0
  19. package/templates/codex-skills/impl-gap/SKILL.md +10 -0
  20. package/templates/codex-skills/research/SKILL.md +10 -0
  21. package/templates/codex-skills/review/SKILL.md +2 -2
  22. package/templates/codex-skills/scan/SKILL.md +8 -0
  23. package/templates/codex-skills/spec-amend/SKILL.md +10 -0
  24. package/templates/codex-skills/spec-analyze/SKILL.md +8 -0
  25. package/templates/codex-skills/spec-clarify/SKILL.md +8 -0
  26. package/templates/codex-skills/spec-conflicts/SKILL.md +8 -0
  27. package/templates/codex-skills/spec-status/SKILL.md +8 -0
  28. package/templates/codex-skills/spec-tasks/SKILL.md +3 -3
  29. package/templates/codex-skills/verify/SKILL.md +8 -0
  30. package/templates/conventions/base.md +7 -0
  31. package/templates/copilot-instructions.md +35 -5
  32. package/templates/copilot-prompts/conventions-sync.prompt.md +8 -0
  33. package/templates/copilot-prompts/impl-gap.prompt.md +10 -0
  34. package/templates/copilot-prompts/research.prompt.md +10 -0
  35. package/templates/copilot-prompts/review.prompt.md +2 -2
  36. package/templates/copilot-prompts/scan.prompt.md +8 -0
  37. package/templates/copilot-prompts/spec-amend.prompt.md +10 -0
  38. package/templates/copilot-prompts/spec-analyze.prompt.md +8 -0
  39. package/templates/copilot-prompts/spec-clarify.prompt.md +8 -0
  40. package/templates/copilot-prompts/spec-conflicts.prompt.md +8 -0
  41. package/templates/copilot-prompts/spec-status.prompt.md +8 -0
  42. package/templates/copilot-prompts/spec-tasks.prompt.md +3 -3
  43. package/templates/copilot-prompts/verify.prompt.md +8 -0
  44. package/templates/cursor-rules/sddx-workflow.mdc +34 -5
  45. package/templates/gemini-commands/ask.toml +8 -0
  46. package/templates/gemini-commands/assume.toml +10 -0
  47. package/templates/gemini-commands/bootstrap.toml +9 -0
  48. package/templates/gemini-commands/bugfix.toml +10 -0
  49. package/templates/gemini-commands/conventions-sync.toml +6 -0
  50. package/templates/gemini-commands/finish.toml +8 -0
  51. package/templates/gemini-commands/impl-gap.toml +10 -0
  52. package/templates/gemini-commands/refactor.toml +8 -0
  53. package/templates/gemini-commands/research.toml +10 -0
  54. package/templates/gemini-commands/review.toml +8 -0
  55. package/templates/gemini-commands/scan.toml +6 -0
  56. package/templates/gemini-commands/spec-amend.toml +10 -0
  57. package/templates/gemini-commands/spec-analyze.toml +6 -0
  58. package/templates/gemini-commands/spec-clarify.toml +6 -0
  59. package/templates/gemini-commands/spec-conflicts.toml +6 -0
  60. package/templates/gemini-commands/spec-new.toml +7 -0
  61. package/templates/gemini-commands/spec-plan.toml +7 -0
  62. package/templates/gemini-commands/spec-status.toml +6 -0
  63. package/templates/gemini-commands/spec-tasks.toml +8 -0
  64. package/templates/gemini-commands/verify.toml +6 -0
  65. package/templates/gemini.md +37 -5
  66. package/templates/specs/_template/1-requirements.md +42 -0
  67. package/templates/specs/_template/2-plan.md +14 -0
  68. package/templates/specs/_template/2a-data-model.md +29 -0
  69. package/templates/specs/_template/2b-api-contracts.md +27 -0
  70. package/templates/specs/_template/2c-research.md +25 -0
  71. package/templates/specs/_template/3-tasks.md +2 -1
  72. package/templates/specs/_template/amendments.md +15 -0
  73. package/templates/specs/_template/analysis.md +49 -0
  74. package/templates/specs/_template/impl-gaps.md +15 -0
  75. package/templates/specs/_template/verify-report.md +43 -0
  76. package/templates/windsurf-rules/sddx-workflow.md +34 -5
  77. package/templates/windsurf-workflows/ask.md +9 -0
  78. package/templates/windsurf-workflows/assume.md +11 -0
  79. package/templates/windsurf-workflows/bootstrap.md +10 -0
  80. package/templates/windsurf-workflows/bugfix.md +11 -0
  81. package/templates/windsurf-workflows/conventions-sync.md +7 -0
  82. package/templates/windsurf-workflows/finish.md +9 -0
  83. package/templates/windsurf-workflows/impl-gap.md +9 -0
  84. package/templates/windsurf-workflows/refactor.md +9 -0
  85. package/templates/windsurf-workflows/research.md +9 -0
  86. package/templates/windsurf-workflows/review.md +9 -0
  87. package/templates/windsurf-workflows/scan.md +7 -0
  88. package/templates/windsurf-workflows/spec-amend.md +9 -0
  89. package/templates/windsurf-workflows/spec-analyze.md +9 -0
  90. package/templates/windsurf-workflows/spec-clarify.md +9 -0
  91. package/templates/windsurf-workflows/spec-conflicts.md +7 -0
  92. package/templates/windsurf-workflows/spec-new.md +10 -0
  93. package/templates/windsurf-workflows/spec-plan.md +10 -0
  94. package/templates/windsurf-workflows/spec-status.md +7 -0
  95. package/templates/windsurf-workflows/spec-tasks.md +11 -0
  96. package/templates/windsurf-workflows/verify.md +9 -0
  97. package/templates/workflow.md +323 -29
  98. package/templates/zed-rules/sddx-workflow.md +33 -5
@@ -4,23 +4,52 @@ trigger: always_on
4
4
 
5
5
  This project uses the SDD Protocol. Before starting any task, read:
6
6
 
7
- 1. `.sdd/workflow.md` — all commands, ceremony levels, and stop points
7
+ 1. `.sdd/workflow.md` — all commands, permissions, stop points, anti-patterns
8
8
  2. `.sdd/project-overview.md` — what this app is, its non-goals, and domains
9
9
  3. `.sdd/conventions.md` — project-specific conventions and patterns
10
10
 
11
11
  ## Available commands
12
12
 
13
+ ### Project setup
14
+ | Command | Purpose |
15
+ |---|---|
16
+ | `/bootstrap` | Populate project context — interview or `--scan` |
17
+ | `/scan` | Discovery-only pass over an existing codebase |
18
+ | `/conventions-sync` | Refresh conventions, preserving manual sections |
19
+
20
+ ### Exploration
13
21
  | Command | Purpose |
14
22
  |---|---|
15
- | `/bootstrap` | Populate project context — interview or codebase scan |
16
23
  | `/ask` | Research only — no code changes |
24
+ | `/research` | Non-binding research artifact |
17
25
  | `/assume` | List assumptions and stop for confirmation |
18
- | `/bugfix` | Reproduce → diagnose → fix → validate |
19
- | `/refactor` | Restructure without behavior change |
26
+
27
+ ### Feature flow
28
+ | Command | Purpose |
29
+ |---|---|
20
30
  | `/spec-new` | Scaffold a spec folder |
31
+ | `/spec-clarify` | Pre-plan clarification |
21
32
  | `/spec-plan` | Generate technical plan — stop for approval |
22
33
  | `/spec-tasks` | Execute plan one task at a time, TDD-first |
23
- | `/review` | Final audit before closing |
34
+ | `/impl-gap` | Stop and report blocking ambiguity |
35
+ | `/spec-amend` | Documented Change Request |
36
+ | `/spec-analyze` | Cross-consistency analysis |
37
+ | `/verify` | Strict mechanical audit |
38
+ | `/review` | Lighter human-touch final pass |
24
39
  | `/finish` | Stage files and generate commit message |
25
40
 
41
+ ### Multi-spec
42
+ | Command | Purpose |
43
+ |---|---|
44
+ | `/spec-status` | Show all active specs and phase |
45
+ | `/spec-conflicts` | Detect file conflicts between specs |
46
+
47
+ ### Other
48
+ | Command | Purpose |
49
+ |---|---|
50
+ | `/bugfix` | Reproduce → diagnose → fix → validate |
51
+ | `/refactor` | Restructure without behavior change |
52
+
53
+ Standard workflow: `/spec-new` → `/spec-clarify` → `/spec-plan` → `/spec-tasks` → `/verify` → `/review` → `/finish`.
54
+
26
55
  Full definitions for each command are in `.sdd/workflow.md`.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Research and exploration — no code changes
3
+ ---
4
+
5
+ Execute the /ask command defined in .sdd/workflow.md.
6
+
7
+ The topic is whatever you typed after the command (e.g. `/ask how does auth refresh work`).
8
+
9
+ Research and exploration only — do not modify any files. Read, analyze, and summarize findings with explicit options or recommendations.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: Surface all assumptions before acting — stop for confirmation
3
+ ---
4
+
5
+ Execute the /assume command defined in .sdd/workflow.md.
6
+
7
+ The context is whatever you typed after the command.
8
+
9
+ List every assumption being made about the task, codebase state, and technical decisions.
10
+ For each: what you're assuming, why, and what changes if it's wrong.
11
+ Stop and wait for confirmation before proceeding.
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Populate project context via interview or codebase scan
3
+ ---
4
+
5
+ Execute the /bootstrap command defined in .sdd/workflow.md.
6
+
7
+ If the project already has code, scan the codebase first (read structure, package files, schema, routes), infer what you can, then ask only about what the code cannot answer.
8
+ If it's a new project, ask the 6 interview questions defined in workflow.md one at a time.
9
+
10
+ Present the full draft of .sdd/project-overview.md and .sdd/conventions.md for approval before writing any file.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: Reproduce → diagnose → fix → validate
3
+ ---
4
+
5
+ Execute the /bugfix command defined in .sdd/workflow.md.
6
+
7
+ The bug or error is whatever you described after the command.
8
+
9
+ Follow the stages in order without skipping: Reproduce → Diagnose → Fix → Validate.
10
+ Stop after Reproduce if the bug cannot be confirmed with a test or repro case.
11
+ Escalate to /spec-new if the fix scope exceeds ~1 file or ~50 lines.
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: Refresh .sdd/conventions.md from current project state — preserves manual sections
3
+ ---
4
+
5
+ Execute the /conventions-sync command defined in .sdd/workflow.md.
6
+
7
+ Scan packages, structure, lint/format configs, ORM/router. Preserve sections marked `<!-- manual -->` verbatim; regenerate auto-sections. Present diff and STOP for approval before writing.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Stage files and generate a conventional commit message
3
+ ---
4
+
5
+ Execute the /finish command defined in .sdd/workflow.md.
6
+
7
+ Run git status and git diff. Stage all relevant files (exclude .env*, build artifacts, scratch files). Determine the commit type. Draft a conventional commit message following the format in workflow.md — one overview sentence, detailed bullets with reasoning, optional footer for non-obvious context.
8
+
9
+ Stop and present the staged file list and commit message for approval before committing.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Stop and report when a task is blocked by ambiguity or impossibility
3
+ ---
4
+
5
+ Execute the /impl-gap command defined in .sdd/workflow.md.
6
+
7
+ Usage: `/impl-gap <feature>`.
8
+
9
+ STOP execution. Create specs/<feature>/impl-gaps.md from the template if missing, then append a GAP entry with current task, problem, impact, proposed resolution, action required, and resolution placeholder. Wait for human direction. If the gap requires changing the spec, escalate to /spec-amend.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Restructure without changing external behavior
3
+ ---
4
+
5
+ Execute the /refactor command defined in .sdd/workflow.md.
6
+
7
+ The target is whatever you named after the command.
8
+
9
+ Run existing tests first to establish a green baseline. Implement in small steps — tests must stay green throughout. No new features or bug fixes mixed in.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Targeted exploration with non-binding artifact — separates exploration from commitment
3
+ ---
4
+
5
+ Execute the /research command defined in .sdd/workflow.md.
6
+
7
+ Usage: `/research <feature> <topic>` (e.g. `/research auth-refresh jwt-libraries`).
8
+
9
+ Investigate options for the topic. Read specs/<feature>/1-requirements.md and write a research artifact in that spec's folder with options, pros/cons, current versions/maintenance status, and a non-binding recommendation. Do NOT modify 2-plan.md.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Lighter human-touch final pass — runs after /verify
3
+ ---
4
+
5
+ Execute the /review command defined in .sdd/workflow.md.
6
+
7
+ The spec name is whatever you typed after the command (e.g. `/review auth-refresh`).
8
+
9
+ Read the implementation qualitatively: clarity, naming, simplicity, leaky abstractions, copy-paste smell, comments that lie. Note minor follow-ups; don't enforce mechanical checks (that's /verify's job). If a structural issue is found, escalate to /spec-amend.
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: Discovery-only pass over an existing codebase — writes scan-report.md
3
+ ---
4
+
5
+ Execute the /scan command defined in .sdd/workflow.md.
6
+
7
+ Read package manifests, directory structure, lint/format configs, and observable conventions. Produce scan-report.md at repo root with findings. Do not modify any .sdd/ file.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Documented Change Request for post-approval spec changes
3
+ ---
4
+
5
+ Execute the /spec-amend command defined in .sdd/workflow.md.
6
+
7
+ Usage: `/spec-amend <feature> <change-summary>`.
8
+
9
+ Create specs/<feature>/amendments.md from the template if missing, then append a CR entry with motive, requirement changes, plan changes, affected tasks, and status "Pending approval". Stop for explicit approval before propagating any change to 1-requirements.md or 2-plan.md.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Cross-consistency analysis (goal-task coverage, plan-task coverage, scope creep)
3
+ ---
4
+
5
+ Execute the /spec-analyze command defined in .sdd/workflow.md.
6
+
7
+ The spec name is whatever you typed after the command (e.g. `/spec-analyze auth-refresh`).
8
+
9
+ Check: every G-ID referenced by at least one task; every "Components Affected" entry referenced by at least one task; any task lacking a goal reference (scope creep). Write specs/<spec>/analysis.md.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Pre-plan clarification — generates blocking and non-blocking questions
3
+ ---
4
+
5
+ Execute the /spec-clarify command defined in .sdd/workflow.md.
6
+
7
+ The spec name is whatever you typed after the command (e.g. `/spec-clarify auth-refresh`).
8
+
9
+ Generate categorized clarification questions for specs/<spec>/1-requirements.md (blocking vs. non-blocking). Wait for answers. Append questions and answers to a Clarifications section of the requirements doc. No other section is modified.
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: Detect file-level conflicts between active specs — detection only
3
+ ---
4
+
5
+ Execute the /spec-conflicts command defined in .sdd/workflow.md.
6
+
7
+ Cross-reference "Components Affected" across all active specs. Report each file touched by two or more specs, naming the specs and suggesting sequencing. Do not modify any spec.
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Scaffold a spec folder for a new feature
3
+ ---
4
+
5
+ Execute the /spec-new command defined in .sdd/workflow.md.
6
+
7
+ The feature name is whatever you typed after the command (e.g. `/spec-new auth-refresh`).
8
+
9
+ Create a specs/<feature>/ folder by copying the three template files from specs/_template/.
10
+ Replace <Feature Name> in each file title with the actual feature name.
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Generate technical plan — stops for approval before any code
3
+ ---
4
+
5
+ Execute the /spec-plan command defined in .sdd/workflow.md.
6
+
7
+ The spec name is whatever you typed after the command (e.g. `/spec-plan auth-refresh`).
8
+
9
+ Read specs/<spec>/1-requirements.md, run /assume to surface assumptions, then draft the technical plan in specs/<spec>/2-plan.md.
10
+ Stop for explicit approval before writing any implementation code.
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: Show state of all active specs — phase, progress, outstanding CRs and gaps
3
+ ---
4
+
5
+ Execute the /spec-status command defined in .sdd/workflow.md.
6
+
7
+ List directories under specs/ excluding _template and _done. For each: feature name, current phase, progress (N/M tasks), outstanding CRs or unresolved gaps. Do not modify any file.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: Execute approved plan one task at a time, TDD-first
3
+ ---
4
+
5
+ Execute the /spec-tasks command defined in .sdd/workflow.md.
6
+
7
+ The spec name is whatever you typed after the command (e.g. `/spec-tasks auth-refresh`).
8
+
9
+ Then read the approved specs/<spec>/2-plan.md and execute tasks one at a time. Write the test first (red), implement until green, run the full suite, then move to the next task.
10
+
11
+ If a task is blocked by ambiguity, contradiction, or technical impossibility, STOP and run /impl-gap — never improvise. If the gap requires changing the spec, escalate to /spec-amend.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Strict mechanical audit — read-only; writes verify-report.md
3
+ ---
4
+
5
+ Execute the /verify command defined in .sdd/workflow.md.
6
+
7
+ The spec name is whatever you typed after the command (e.g. `/verify auth-refresh`).
8
+
9
+ Read-only mechanical audit. Check: all tasks marked complete, every goal has an artifact, every acceptance scenario has a passing test, full test suite green, no out-of-scope file changes, no unresolved /impl-gap entries, no pending CRs. Write specs/<spec>/verify-report.md. Do not modify code or specs.