sdd-jc-methodology 0.2.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 (148) hide show
  1. package/.claude/commands/sdd-archive.md +122 -0
  2. package/.claude/commands/sdd-constitution.md +240 -0
  3. package/.claude/commands/sdd-execute.md +132 -0
  4. package/.claude/commands/sdd-propose.md +149 -0
  5. package/.claude/commands/sdd-seo.md +251 -0
  6. package/.claude/commands/sdd-specify.md +264 -0
  7. package/.claude/commands/sdd-test.md +128 -0
  8. package/.claude/commands/sdd-validate.md +165 -0
  9. package/.claude/skills/api-design-principles/SKILL.md +528 -0
  10. package/.claude/skills/api-design-principles/assets/api-design-checklist.md +155 -0
  11. package/.claude/skills/api-design-principles/assets/rest-api-template.py +182 -0
  12. package/.claude/skills/api-design-principles/references/graphql-schema-design.md +583 -0
  13. package/.claude/skills/api-design-principles/references/rest-best-practices.md +408 -0
  14. package/.claude/skills/aws-serverless/SKILL.md +323 -0
  15. package/.claude/skills/brainstorming/SKILL.md +96 -0
  16. package/.claude/skills/error-handling-patterns/SKILL.md +641 -0
  17. package/.claude/skills/frontend-design/LICENSE.txt +177 -0
  18. package/.claude/skills/frontend-design/SKILL.md +272 -0
  19. package/.claude/skills/nestjs-expert/SKILL.md +552 -0
  20. package/.claude/skills/product-manager-toolkit/SKILL.md +351 -0
  21. package/.claude/skills/product-manager-toolkit/references/prd_templates.md +317 -0
  22. package/.claude/skills/product-manager-toolkit/scripts/customer_interview_analyzer.py +441 -0
  23. package/.claude/skills/product-manager-toolkit/scripts/rice_prioritizer.py +296 -0
  24. package/.claude/skills/react-doctor/AGENTS.md +15 -0
  25. package/.claude/skills/react-doctor/SKILL.md +19 -0
  26. package/.claude/skills/shadcn-ui/SKILL.md +1677 -0
  27. package/.claude/skills/shadcn-ui/references/learn.md +145 -0
  28. package/.claude/skills/shadcn-ui/references/official-ui-reference.md +1725 -0
  29. package/.claude/skills/shadcn-ui/references/reference.md +586 -0
  30. package/.claude/skills/shadcn-ui/references/ui-reference.md +1578 -0
  31. package/.claude/skills/stitch-design/README.md +50 -0
  32. package/.claude/skills/stitch-design/SKILL.md +84 -0
  33. package/.claude/skills/stitch-design/examples/DESIGN.md +22 -0
  34. package/.claude/skills/stitch-design/examples/enhanced-prompt.md +28 -0
  35. package/.claude/skills/stitch-design/references/design-mappings.md +45 -0
  36. package/.claude/skills/stitch-design/references/prompt-keywords.md +114 -0
  37. package/.claude/skills/stitch-design/references/tool-schemas.md +76 -0
  38. package/.claude/skills/stitch-design/workflows/edit-design.md +44 -0
  39. package/.claude/skills/stitch-design/workflows/generate-design-md.md +63 -0
  40. package/.claude/skills/stitch-design/workflows/text-to-design.md +47 -0
  41. package/.claude/skills/systematic-debugging/CREATION-LOG.md +119 -0
  42. package/.claude/skills/systematic-debugging/SKILL.md +296 -0
  43. package/.claude/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  44. package/.claude/skills/systematic-debugging/condition-based-waiting.md +115 -0
  45. package/.claude/skills/systematic-debugging/defense-in-depth.md +122 -0
  46. package/.claude/skills/systematic-debugging/find-polluter.sh +63 -0
  47. package/.claude/skills/systematic-debugging/root-cause-tracing.md +169 -0
  48. package/.claude/skills/systematic-debugging/test-academic.md +14 -0
  49. package/.claude/skills/systematic-debugging/test-pressure-1.md +58 -0
  50. package/.claude/skills/systematic-debugging/test-pressure-2.md +68 -0
  51. package/.claude/skills/systematic-debugging/test-pressure-3.md +69 -0
  52. package/.claude/skills/tailwind-design-system/SKILL.md +874 -0
  53. package/.claude/skills/ui-ux-pro-max/SKILL.md +377 -0
  54. package/.claude/skills/ui-ux-pro-max/data/charts.csv +26 -0
  55. package/.claude/skills/ui-ux-pro-max/data/colors.csv +97 -0
  56. package/.claude/skills/ui-ux-pro-max/data/icons.csv +101 -0
  57. package/.claude/skills/ui-ux-pro-max/data/landing.csv +31 -0
  58. package/.claude/skills/ui-ux-pro-max/data/products.csv +97 -0
  59. package/.claude/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  60. package/.claude/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  61. package/.claude/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  62. package/.claude/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  63. package/.claude/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  64. package/.claude/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  65. package/.claude/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  66. package/.claude/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  67. package/.claude/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  68. package/.claude/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  69. package/.claude/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  70. package/.claude/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  71. package/.claude/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  72. package/.claude/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  73. package/.claude/skills/ui-ux-pro-max/data/styles.csv +68 -0
  74. package/.claude/skills/ui-ux-pro-max/data/typography.csv +58 -0
  75. package/.claude/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  76. package/.claude/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  77. package/.claude/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  78. package/.claude/skills/ui-ux-pro-max/scripts/core.py +253 -0
  79. package/.claude/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  80. package/.claude/skills/ui-ux-pro-max/scripts/search.py +114 -0
  81. package/.claude/skills/vercel-react-best-practices/AGENTS.md +2934 -0
  82. package/.claude/skills/vercel-react-best-practices/SKILL.md +136 -0
  83. package/.claude/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  84. package/.claude/skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
  85. package/.claude/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
  86. package/.claude/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
  87. package/.claude/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
  88. package/.claude/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
  89. package/.claude/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
  90. package/.claude/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
  91. package/.claude/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
  92. package/.claude/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
  93. package/.claude/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
  94. package/.claude/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  95. package/.claude/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
  96. package/.claude/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
  97. package/.claude/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
  98. package/.claude/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
  99. package/.claude/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
  100. package/.claude/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
  101. package/.claude/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
  102. package/.claude/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
  103. package/.claude/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
  104. package/.claude/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
  105. package/.claude/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
  106. package/.claude/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
  107. package/.claude/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
  108. package/.claude/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
  109. package/.claude/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
  110. package/.claude/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
  111. package/.claude/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
  112. package/.claude/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
  113. package/.claude/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  114. package/.claude/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
  115. package/.claude/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
  116. package/.claude/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  117. package/.claude/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  118. package/.claude/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  119. package/.claude/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
  120. package/.claude/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  121. package/.claude/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
  122. package/.claude/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
  123. package/.claude/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  124. package/.claude/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
  125. package/.claude/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
  126. package/.claude/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  127. package/.claude/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  128. package/.claude/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
  129. package/.claude/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  130. package/.claude/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  131. package/.claude/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
  132. package/.claude/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  133. package/.claude/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
  134. package/.claude/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
  135. package/.claude/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
  136. package/.claude/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
  137. package/.claude/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
  138. package/.claude/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
  139. package/.claude/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
  140. package/.mcp.json.example +12 -0
  141. package/CHANGELOG.md +61 -0
  142. package/LICENSE +21 -0
  143. package/README.md +571 -0
  144. package/assets/jc-fox-mark.svg +10 -0
  145. package/assets/jc-methodology-badge.png +0 -0
  146. package/bin/sdd-jc.js +379 -0
  147. package/package.json +43 -0
  148. package/scripts/gsc_verify.py +162 -0
@@ -0,0 +1,122 @@
1
+ # Archive SDD Spec
2
+
3
+ Archive a completed SDD spec path after implementation, testing, and validation are done.
4
+
5
+ Archiving preserves the full decision trail. It keeps active `docs/specs/` easier to scan while retaining proposal, requirements, design, tasks, execution notes, test evidence, and validation evidence for future review.
6
+
7
+ ## Usage
8
+
9
+ ```
10
+ /sdd-archive <spec-path>
11
+ ```
12
+
13
+ **Examples:**
14
+
15
+ - `/sdd-archive changes/add-remember-me`
16
+ - `/sdd-archive bugfix/login-redirect`
17
+ - `/sdd-archive enhancements/renewals`
18
+
19
+ ## Arguments
20
+
21
+ - `$ARGUMENTS` - Relative path under `docs/specs/` that should be archived.
22
+
23
+ ## Output
24
+
25
+ Move the completed spec folder from:
26
+
27
+ ```text
28
+ docs/specs/$ARGUMENTS/
29
+ ```
30
+
31
+ to:
32
+
33
+ ```text
34
+ docs/specs/archive/YYYY-MM-DD-$SAFE_NAME/
35
+ ```
36
+
37
+ Where `$SAFE_NAME` is `$ARGUMENTS` converted to a filesystem-safe flat name by replacing `/` with `--`.
38
+
39
+ Example:
40
+
41
+ ```text
42
+ docs/specs/bugfix/login-redirect/
43
+ docs/specs/archive/2026-05-16-bugfix--login-redirect/
44
+ ```
45
+
46
+ ## Behavior
47
+
48
+ ### Step 0: Load Context
49
+
50
+ 1. Confirm `docs/specs/$ARGUMENTS/` exists.
51
+ 2. Read all available files in that folder, especially:
52
+ - `proposal.md` if present
53
+ - `requirements.md`
54
+ - `design.md`
55
+ - `tasks.md`
56
+ - `execution.md` if present
57
+ - `test-report.md` if present
58
+ - `validation-report.md` if present
59
+ 3. Read project-level context only if needed to interpret archive readiness:
60
+ - `docs/prd.md`
61
+ - `docs/system-design/design.md`
62
+ - `docs/detailed-design/detailed-design.md`
63
+ - `docs/specs/general-setup/`
64
+
65
+ ### Step 1: Check Archive Readiness
66
+
67
+ Verify the spec is ready to archive:
68
+
69
+ - `requirements.md`, `design.md`, and `tasks.md` exist
70
+ - all required tasks are marked `[x]`, or incomplete tasks are explicitly accepted as follow-up work
71
+ - `test-report.md` exists, or the absence is explicitly accepted
72
+ - `validation-report.md` exists, or the absence is explicitly accepted
73
+ - no unresolved FAIL findings remain in `validation-report.md`
74
+ - WARN findings are either accepted or assigned to follow-up tasks
75
+ - implementation drift is reflected in the SDD docs or execution notes
76
+
77
+ If readiness is unclear, stop and ask the user whether to proceed, validate first, or keep the spec active.
78
+
79
+ ### Step 2: Create Archive Summary
80
+
81
+ Before moving the folder, create or update:
82
+
83
+ ```text
84
+ docs/specs/$ARGUMENTS/archive-summary.md
85
+ ```
86
+
87
+ The summary must include:
88
+
89
+ 1. Document Control
90
+ 2. Original Spec Path
91
+ 3. Archive Date
92
+ 4. Final Status
93
+ 5. Requirements Delivered
94
+ 6. Files Changed Summary, based on `execution.md` when available
95
+ 7. Test Evidence Summary
96
+ 8. Validation Summary
97
+ 9. Accepted Warnings Or Follow-Ups
98
+ 10. Historical Notes
99
+
100
+ ### Step 3: Move Folder
101
+
102
+ 1. Ensure `docs/specs/archive/` exists.
103
+ 2. Move `docs/specs/$ARGUMENTS/` to `docs/specs/archive/YYYY-MM-DD-$SAFE_NAME/`.
104
+ 3. If the target archive folder already exists, do not overwrite it. Add a numeric suffix such as `-2` and report the final path.
105
+
106
+ ### Step 4: Report To User
107
+
108
+ Present:
109
+
110
+ 1. archived source path
111
+ 2. final archive path
112
+ 3. final validation status
113
+ 4. unresolved follow-ups, if any
114
+ 5. whether the active spec directory is now clean
115
+
116
+ ## Error Handling
117
+
118
+ - If the spec path does not exist, report the missing path and stop.
119
+ - If required docs are missing, ask whether to archive anyway or run the missing command first.
120
+ - If validation has unresolved FAIL findings, recommend fixing or explicitly accepting risk before archive.
121
+ - If moving the folder fails, leave the original folder in place and report the reason.
122
+ - Do not delete spec folders as part of archiving; only move them into `docs/specs/archive/`.
@@ -0,0 +1,240 @@
1
+ # Establish SDD Constitution
2
+
3
+ Establish or strengthen the project-wide SDD foundation. This command creates the documentation baseline that all later module-level SDD work depends on.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /sdd-constitution
9
+ ```
10
+
11
+ ## Behavior
12
+
13
+ ### Step 0: Foundation Setup
14
+
15
+ 1. Ensure `docs/` exists.
16
+ 2. Ensure `docs/specs/` exists.
17
+ 3. Ensure `docs/specs/general-setup/` exists.
18
+ 4. Default behavior is to enhance existing project docs in place instead of creating parallel copies.
19
+
20
+ The constitutional baseline must cover these files:
21
+
22
+ - `docs/prd.md`
23
+ - `docs/system-design/design.md`
24
+ - `docs/detailed-design/detailed-design.md`
25
+ - `docs/specs/general-setup/requirements.md`
26
+ - `docs/specs/general-setup/design.md`
27
+ - `docs/specs/general-setup/task.md`
28
+ - `CLAUDE.md`
29
+
30
+ ---
31
+
32
+ ### Step 1: Read Project Context First
33
+
34
+ Before writing anything, read the repository context carefully:
35
+
36
+ 1. Root `CLAUDE.md` if it exists
37
+ 2. Package-level `CLAUDE.md` files if they exist
38
+ 3. Existing `docs/prd.md`
39
+ 4. Existing `docs/system-design/design.md`
40
+ 5. Existing `docs/detailed-design/detailed-design.md`
41
+ 6. Existing `docs/specs/` folders to extract terminology, taxonomy, and prior feature history
42
+ 7. Any architecture, infrastructure, setup, or product docs already present under `docs/`
43
+
44
+ Also inspect the codebase to understand:
45
+
46
+ - Product domain and business model
47
+ - Main user roles and workflows
48
+ - Current frontend/backend/shared architecture
49
+ - Existing visual patterns and design system signals
50
+ - Technical constraints already enforced by the repo
51
+ - Existing spec taxonomy under `docs/specs/` such as domain, enhancement, bugfix, or epic folders
52
+
53
+ Do not write generic placeholder documentation when the repository already contains enough context to infer a strong baseline.
54
+
55
+ ---
56
+
57
+ ### Step 2: Clarify Missing Business Context
58
+
59
+ If essential product context is missing or ambiguous, ask focused user questions before drafting the documents.
60
+
61
+ Focus especially on:
62
+
63
+ - The core problem the product solves
64
+ - Primary personas and user roles
65
+ - Business goals and expected outcomes
66
+ - Success metrics or KPIs
67
+ - Scope boundaries and non-goals
68
+ - Known constraints, dependencies, and risks
69
+ - Preferred `docs/specs/` taxonomy when the repo does not already imply one
70
+
71
+ Ask only what is needed to avoid unstable assumptions.
72
+
73
+ ---
74
+
75
+ ### Step 3: Create or Enhance the General PRD
76
+
77
+ Create or enhance `docs/prd.md` as a concise living document.
78
+
79
+ **Primary skill:** `product-manager-toolkit`
80
+
81
+ **PRD rules:**
82
+
83
+ - Lead with the why: problem statement, business context, user need
84
+ - Keep it concise and maintainable
85
+ - Define measurable success metrics before implementation begins
86
+ - Define explicit out-of-scope items
87
+ - Use user-centric requirements and user stories
88
+ - Use testable acceptance criteria
89
+ - Collaborate through assumptions and open questions rather than pretending certainty
90
+ - Keep it AI-ready with clean headings and concise bullets
91
+
92
+ **Pitfalls to avoid:**
93
+
94
+ - Do not mix goals with requirements
95
+ - Do not use vague language like "fast" or "intuitive" without measurable meaning
96
+ - Do not treat the PRD as static
97
+ - Do not force a predetermined technical solution into the PRD
98
+
99
+ **Required PRD structure:**
100
+
101
+ 1. Overview & Purpose
102
+ 2. Problem Statement
103
+ 3. Target Personas
104
+ 4. Goals & Success Metrics
105
+ 5. Scope (In / Out)
106
+ 6. User Stories
107
+ 7. Acceptance Criteria
108
+ 8. Assumptions, Dependencies, & Constraints
109
+ 9. Open Questions
110
+
111
+ When `docs/prd.md` already exists, preserve useful content and upgrade weak sections to follow the rules above.
112
+
113
+ ---
114
+
115
+ ### Step 4: Create or Enhance the System Design Document
116
+
117
+ Create or enhance `docs/system-design/design.md` as the UI/UX system blueprint.
118
+
119
+ **Preferred skill chain:**
120
+
121
+ - `ui-ux-pro-max` if available
122
+ - otherwise `frontend-design` + `stitch-design`
123
+
124
+ This document represents the visual and interaction system, not the low-level technical implementation.
125
+
126
+ **Required structure:**
127
+
128
+ 1. Product Experience Principles
129
+ 2. Information Architecture
130
+ 3. Primary User Flows
131
+ 4. Screen Inventory
132
+ 5. Navigation Model
133
+ 6. Layout Patterns
134
+ 7. Design Tokens
135
+ 8. Component Inventory
136
+ 9. Responsive Behavior
137
+ 10. Accessibility Expectations
138
+ 11. Dark Mode Behavior
139
+ 12. Design Decisions
140
+ 13. Open Gaps / Open Questions
141
+
142
+ **Document intent:**
143
+
144
+ - Define a reusable, consistent UI/UX system
145
+ - Capture visual consistency, accessibility, and interaction rules
146
+ - Reference existing brand, color, typography, and component patterns from the repository when available
147
+ - Prefer clarity over decorative language
148
+
149
+ When the file already exists, refine it in place instead of replacing established valid patterns.
150
+
151
+ ---
152
+
153
+ ### Step 5: Create or Enhance the Detailed Design Document
154
+
155
+ Create or enhance `docs/detailed-design/detailed-design.md` as the technical implementation blueprint.
156
+
157
+ **Use skills when relevant:**
158
+
159
+ - `nestjs-expert`
160
+ - `api-design-principles`
161
+ - `error-handling-patterns`
162
+ - `aws-serverless`
163
+ - `shadcn-ui`
164
+ - `tailwind-design-system`
165
+ - `vercel-react-best-practices`
166
+
167
+ **Required structure:**
168
+
169
+ 1. System Overview
170
+ 2. Domain Modules & Responsibilities
171
+ 3. Data Model & Entities
172
+ 4. API Surface & Contracts
173
+ 5. Backend Workflows & Business Rules
174
+ 6. Frontend Architecture & State Boundaries
175
+ 7. Integration Points
176
+ 8. Security & Authorization Model
177
+ 9. Error Handling & Observability
178
+ 10. Testing Strategy
179
+ 11. Technical Constraints & Assumptions
180
+
181
+ ---
182
+
183
+ ### Step 6: Create or Enhance General Setup Templates
184
+
185
+ Create or enhance the canonical templates under `docs/specs/general-setup/`.
186
+
187
+ These files define the format that `/sdd-specify` must follow later:
188
+
189
+ 1. `requirements.md` — requirement numbering, structure, and writing standards
190
+ 2. `design.md` — architecture, data model, API, frontend, and decision-record structure
191
+ 3. `task.md` — task format, dependency graph format, testing expectations, and execution conventions
192
+
193
+ These are methodology templates for future specs, not a feature spec themselves.
194
+
195
+ They must reflect:
196
+
197
+ - The repo's current architecture and package layout
198
+ - The chosen `docs/specs/` taxonomy
199
+ - The approved PRD, system design, and detailed design conventions
200
+
201
+ ---
202
+
203
+ ### Step 7: Update the Root CLAUDE Guide
204
+
205
+ Update root `CLAUDE.md` so it references:
206
+
207
+ - `docs/prd.md`
208
+ - `docs/system-design/design.md`
209
+ - `docs/detailed-design/detailed-design.md`
210
+ - `docs/specs/general-setup/`
211
+
212
+ The update should explain briefly:
213
+
214
+ - What each document is for
215
+ - When Claude should consult each one
216
+ - That these documents form the constitutional baseline for future SDD work
217
+ - How module specs should be organized under `docs/specs/`
218
+
219
+ Preserve the repository's existing `CLAUDE.md` conventions and extend them.
220
+
221
+ ---
222
+
223
+ ### Step 8: Present and Confirm
224
+
225
+ After drafting or enhancing the documents, present a concise summary covering:
226
+
227
+ - What was created vs enhanced
228
+ - The chosen spec taxonomy under `docs/specs/`
229
+ - The main problem statement and personas captured in the PRD
230
+ - The main UX/system decisions captured in system design
231
+ - The main technical decisions captured in detailed design
232
+ - Any assumptions and open questions that still need validation
233
+
234
+ Ask the user whether to approve or request changes. If changes are requested, revise the affected documents and re-present.
235
+
236
+ ---
237
+
238
+ ## Outcome
239
+
240
+ At the end of `/sdd-constitution`, the repository should have a project-level baseline that future `/sdd-specify`, `/sdd-execute`, `/sdd-validate`, and `/sdd-test` work can rely on without guessing the structure or conventions.
@@ -0,0 +1,132 @@
1
+ # Execute SDD Tasks
2
+
3
+ Execute implementation tasks from an approved SDD spec path. Read `tasks.md`, choose the next eligible task, implement only that task's scope, verify it, update task status, and record progress in `execution.md`.
4
+
5
+ Execution should be incremental. Do not turn one approved task into a broader refactor unless the spec explicitly requires it or the user approves the scope change.
6
+
7
+ ## Usage
8
+
9
+ ```
10
+ /sdd-execute <spec-path>
11
+ ```
12
+
13
+ **Examples:**
14
+
15
+ - `/sdd-execute loan`
16
+ - `/sdd-execute enhancements/renewals`
17
+
18
+ ## Arguments
19
+
20
+ - `$ARGUMENTS` — Relative path under `docs/specs/` that already contains `requirements.md`, `design.md`, and `tasks.md`.
21
+
22
+ ## Output
23
+
24
+ Each successful task execution should produce:
25
+
26
+ - focused code or documentation changes within task scope
27
+ - updated task status in `tasks.md`
28
+ - an appended entry in `execution.md`
29
+ - verification evidence from the command or check listed in the task
30
+
31
+ Use `[~]` for a started but incomplete task, `[x]` for a completed task, and `[ ]` for pending work.
32
+
33
+ ---
34
+
35
+ ## Behavior
36
+
37
+ ### Step 0: Load Context
38
+
39
+ 1. Read the SDD documents for the spec path:
40
+ - `docs/specs/$ARGUMENTS/requirements.md`
41
+ - `docs/specs/$ARGUMENTS/design.md`
42
+ - `docs/specs/$ARGUMENTS/tasks.md`
43
+ 2. Read `docs/specs/$ARGUMENTS/execution.md` if it exists.
44
+ 3. Read the project constitutional docs:
45
+ - `docs/prd.md`
46
+ - `docs/system-design/design.md`
47
+ - `docs/detailed-design/detailed-design.md`
48
+ - `docs/specs/general-setup/`
49
+ 4. Read root and package-level `CLAUDE.md` files if they exist.
50
+ 5. Identify current task state: `[x]`, `[~]`, `[ ]`.
51
+
52
+ ### Step 1: Select Next Task
53
+
54
+ 1. Find the next executable task by document order where:
55
+ - status is `[ ]` or `[~]`
56
+ - all dependencies are `[x]`
57
+ 2. If a task is `[~]`, resume it using `execution.md` context.
58
+ 3. If no tasks are eligible, report completion or blocking state and stop.
59
+ 4. If multiple tasks are eligible, prefer the first task by document order unless there is a clear dependency or risk reason to choose another.
60
+
61
+ ### Step 2: Execute Task
62
+
63
+ #### 2.1 — Read Scope & Design
64
+
65
+ - Re-read the specific design sections referenced by the task.
66
+ - Re-read the requirements and scenarios covered by the task.
67
+ - Read the existing files that will be touched.
68
+ - Confirm the implementation still matches the constitutional docs and module spec.
69
+ - Identify the smallest safe change that satisfies the task.
70
+
71
+ #### 2.2 — Invoke Relevant Skills
72
+
73
+ - Load only the skills listed in the task.
74
+ - If the task is UI-heavy, prefer `ui-ux-pro-max` when available.
75
+ - Otherwise use the documented fallback skills from the task or design.
76
+
77
+ #### 2.3 — Implement
78
+
79
+ - Keep changes minimal and within task scope.
80
+ - Follow the design specification exactly unless the spec is clearly incomplete or contradictory.
81
+ - If the design is ambiguous, ask the user for clarification before making up a direction.
82
+ - If implementation discovery invalidates the spec, stop and propose the smallest required spec update before continuing.
83
+ - Do not mark unrelated cleanup or opportunistic refactors as part of the task unless they are necessary for correctness.
84
+
85
+ #### 2.4 — Verify
86
+
87
+ - Run the verification command listed in the task.
88
+ - Fix failures before marking the task complete.
89
+ - If the listed command is unavailable, identify the closest repository-specific build, lint, test, or manual check and record the substitution in `execution.md`.
90
+
91
+ ### Step 3: Update Status
92
+
93
+ 1. Update `tasks.md` from `[ ]` to `[x]` when complete.
94
+ 2. Use `[~]` when the task is partially complete or blocked.
95
+ 3. Append implementation notes to `execution.md`.
96
+
97
+ ### Step 4: Continue or Pause
98
+
99
+ After completing a task, summarize the task result, verification outcome, and next eligible task. Ask whether to continue, pause, or skip the next task.
100
+
101
+ ---
102
+
103
+ ## Execution Log Format (`execution.md`)
104
+
105
+ The execution log is created on first run and appended to on subsequent runs.
106
+
107
+ Minimum sections:
108
+
109
+ 1. Document Control
110
+ 2. Task Execution History
111
+ 3. Summary when all tasks are complete
112
+
113
+ Each task entry should record:
114
+
115
+ - status
116
+ - date
117
+ - task ID and title
118
+ - files changed
119
+ - requirements covered
120
+ - decisions made
121
+ - issues encountered
122
+ - verification result
123
+
124
+ ---
125
+
126
+ ## Error Handling
127
+
128
+ - If required SDD files are missing, stop and report what is missing.
129
+ - If the design is ambiguous, ask the user before proceeding.
130
+ - If verification fails, debug and fix before marking complete.
131
+ - If a task is blocked, report the blocker and move to the next eligible task if appropriate.
132
+ - If implementation requires changing the approved requirements or design, pause and ask for approval before expanding scope.
@@ -0,0 +1,149 @@
1
+ # Propose SDD Change
2
+
3
+ Create a lightweight proposal for one bounded change before generating full SDD documents.
4
+
5
+ The proposal is the reviewable intent layer. It should help the user decide whether the change is worth specifying before time is spent on requirements, design, tasks, or implementation.
6
+
7
+ ## Usage
8
+
9
+ ```
10
+ /sdd-propose <change-name-or-spec-path>
11
+ ```
12
+
13
+ **Examples:**
14
+
15
+ - `/sdd-propose add-remember-me`
16
+ - `/sdd-propose bugfix/login-redirect`
17
+ - `/sdd-propose enhancements/renewals`
18
+
19
+ ## Arguments
20
+
21
+ - `$ARGUMENTS` - A change name or a relative path under `docs/specs/`.
22
+
23
+ Path resolution:
24
+
25
+ - If `$ARGUMENTS` contains `/`, treat it as the literal spec path.
26
+ - If `$ARGUMENTS` is a bare name, use `changes/$ARGUMENTS` as the spec path.
27
+
28
+ Examples:
29
+
30
+ | Input | Spec Path | Proposal Path |
31
+ |---|---|---|
32
+ | `add-remember-me` | `changes/add-remember-me` | `docs/specs/changes/add-remember-me/proposal.md` |
33
+ | `bugfix/login-redirect` | `bugfix/login-redirect` | `docs/specs/bugfix/login-redirect/proposal.md` |
34
+
35
+ ## Output
36
+
37
+ Create or update:
38
+
39
+ ```text
40
+ docs/specs/$SPEC_PATH/proposal.md
41
+ ```
42
+
43
+ Do not create `requirements.md`, `design.md`, or `tasks.md` in this command unless the user explicitly asks. Those belong to `/sdd-specify`.
44
+
45
+ ## Behavior
46
+
47
+ ### Step 0: Resolve Path And Load Context
48
+
49
+ 1. Resolve `$SPEC_PATH` using the path rules above.
50
+ 2. Create `docs/specs/$SPEC_PATH/` if it does not exist.
51
+ 3. Read project-level context when available:
52
+ - `docs/prd.md`
53
+ - `docs/system-design/design.md`
54
+ - `docs/detailed-design/detailed-design.md`
55
+ - `docs/specs/general-setup/`
56
+ - root `CLAUDE.md`
57
+ - package-level `CLAUDE.md` files
58
+ 4. Read nearby or related specs under `docs/specs/`.
59
+ 5. Inspect relevant code paths only enough to understand current behavior and likely impact.
60
+
61
+ ### Step 1: Clarify Intent
62
+
63
+ Use `brainstorming` and, when helpful, `product-manager-toolkit` to clarify:
64
+
65
+ - problem being solved
66
+ - target users, actors, or systems
67
+ - current behavior
68
+ - desired behavior
69
+ - scope boundaries
70
+ - non-goals
71
+ - dependencies and constraints
72
+ - success criteria
73
+
74
+ Ask focused questions only when the proposal would otherwise depend on unstable assumptions.
75
+
76
+ ### Step 2: Write `proposal.md`
77
+
78
+ Create a concise proposal with this structure:
79
+
80
+ 1. Document Control
81
+ 2. Intent
82
+ 3. Problem / Current Behavior
83
+ 4. Proposed Outcome
84
+ 5. Scope
85
+ 6. Non-Goals
86
+ 7. Affected Users, Systems, And Specs
87
+ 8. Requirement Delta Preview
88
+ 9. Approach Options
89
+ 10. Recommended Approach
90
+ 11. Risks, Dependencies, And Open Questions
91
+ 12. Success Criteria
92
+ 13. Next Step
93
+
94
+ ### Requirement Delta Preview
95
+
96
+ When the change affects existing behavior, include a lightweight preview using these sections where relevant:
97
+
98
+ ```markdown
99
+ ## Requirement Delta Preview
100
+
101
+ ### ADDED Requirements
102
+
103
+ - New behavior that does not exist today.
104
+
105
+ ### MODIFIED Requirements
106
+
107
+ - Existing behavior that will change.
108
+
109
+ ### REMOVED Requirements
110
+
111
+ - Existing behavior that will be deprecated or deleted.
112
+ ```
113
+
114
+ This preview is not the final spec. `/sdd-specify` converts approved intent into full requirements, scenarios, design, and tasks.
115
+
116
+ ### Approach Options
117
+
118
+ For non-trivial work, include 2 or 3 options with trade-offs. Recommend one option and explain why it is the smallest safe path.
119
+
120
+ ### Next Step
121
+
122
+ End the proposal with the exact next command:
123
+
124
+ ```text
125
+ /sdd-specify $SPEC_PATH
126
+ ```
127
+
128
+ ## Review Checklist
129
+
130
+ Before presenting the proposal, verify:
131
+
132
+ - [ ] The problem is clear.
133
+ - [ ] Scope and non-goals are explicit.
134
+ - [ ] The proposed outcome is behavior-focused.
135
+ - [ ] Affected specs or code areas are listed.
136
+ - [ ] Risks and open questions are visible.
137
+ - [ ] The next command uses the resolved spec path.
138
+
139
+ ## Report To User
140
+
141
+ Present a short summary with:
142
+
143
+ 1. proposal path
144
+ 2. resolved spec path
145
+ 3. recommended approach
146
+ 4. main risks or open questions
147
+ 5. next command to run after approval
148
+
149
+ Ask whether to approve the proposal, revise it, or stop.