sedd 0.1.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 (90) hide show
  1. package/README.md +504 -0
  2. package/bin/sedd.js +6 -0
  3. package/commands/sedd.clarify.md +435 -0
  4. package/commands/sedd.dashboard.md +145 -0
  5. package/commands/sedd.implement.md +326 -0
  6. package/commands/sedd.migrate.md +249 -0
  7. package/commands/sedd.specify.md +198 -0
  8. package/commands/sedd.tasks.md +176 -0
  9. package/dist/cli/check.d.ts +6 -0
  10. package/dist/cli/check.d.ts.map +1 -0
  11. package/dist/cli/check.js +134 -0
  12. package/dist/cli/check.js.map +1 -0
  13. package/dist/cli/clarify.d.ts +2 -0
  14. package/dist/cli/clarify.d.ts.map +1 -0
  15. package/dist/cli/clarify.js +116 -0
  16. package/dist/cli/clarify.js.map +1 -0
  17. package/dist/cli/index.d.ts +8 -0
  18. package/dist/cli/index.d.ts.map +1 -0
  19. package/dist/cli/index.js +175 -0
  20. package/dist/cli/index.js.map +1 -0
  21. package/dist/cli/init.d.ts +9 -0
  22. package/dist/cli/init.d.ts.map +1 -0
  23. package/dist/cli/init.js +236 -0
  24. package/dist/cli/init.js.map +1 -0
  25. package/dist/cli/migrate.d.ts +7 -0
  26. package/dist/cli/migrate.d.ts.map +1 -0
  27. package/dist/cli/migrate.js +197 -0
  28. package/dist/cli/migrate.js.map +1 -0
  29. package/dist/cli/specify.d.ts +7 -0
  30. package/dist/cli/specify.d.ts.map +1 -0
  31. package/dist/cli/specify.js +131 -0
  32. package/dist/cli/specify.js.map +1 -0
  33. package/dist/cli/status.d.ts +6 -0
  34. package/dist/cli/status.d.ts.map +1 -0
  35. package/dist/cli/status.js +118 -0
  36. package/dist/cli/status.js.map +1 -0
  37. package/dist/cli/tasks.d.ts +7 -0
  38. package/dist/cli/tasks.d.ts.map +1 -0
  39. package/dist/cli/tasks.js +165 -0
  40. package/dist/cli/tasks.js.map +1 -0
  41. package/dist/core/changelog.d.ts +30 -0
  42. package/dist/core/changelog.d.ts.map +1 -0
  43. package/dist/core/changelog.js +97 -0
  44. package/dist/core/changelog.js.map +1 -0
  45. package/dist/core/file-splitter.d.ts +39 -0
  46. package/dist/core/file-splitter.d.ts.map +1 -0
  47. package/dist/core/file-splitter.js +162 -0
  48. package/dist/core/file-splitter.js.map +1 -0
  49. package/dist/core/migration-manager.d.ts +76 -0
  50. package/dist/core/migration-manager.d.ts.map +1 -0
  51. package/dist/core/migration-manager.js +230 -0
  52. package/dist/core/migration-manager.js.map +1 -0
  53. package/dist/core/timestamps.d.ts +17 -0
  54. package/dist/core/timestamps.d.ts.map +1 -0
  55. package/dist/core/timestamps.js +37 -0
  56. package/dist/core/timestamps.js.map +1 -0
  57. package/dist/index.d.ts +8 -0
  58. package/dist/index.d.ts.map +1 -0
  59. package/dist/index.js +7 -0
  60. package/dist/index.js.map +1 -0
  61. package/dist/types/index.d.ts +102 -0
  62. package/dist/types/index.d.ts.map +1 -0
  63. package/dist/types/index.js +83 -0
  64. package/dist/types/index.js.map +1 -0
  65. package/dist/utils/git.d.ts +63 -0
  66. package/dist/utils/git.d.ts.map +1 -0
  67. package/dist/utils/git.js +179 -0
  68. package/dist/utils/git.js.map +1 -0
  69. package/hooks/README.md +220 -0
  70. package/hooks/check-roadmap.js +231 -0
  71. package/hooks/check-roadmap.ps1 +343 -0
  72. package/package.json +60 -0
  73. package/scripts/bash/sedd-clarify.sh +142 -0
  74. package/scripts/bash/sedd-complete-task.sh +108 -0
  75. package/scripts/bash/sedd-specify.sh +147 -0
  76. package/scripts/powershell/sedd-clarify.ps1 +222 -0
  77. package/scripts/powershell/sedd-complete-task.ps1 +143 -0
  78. package/scripts/powershell/sedd-specify.ps1 +192 -0
  79. package/scripts/powershell/sedd-status.ps1 +153 -0
  80. package/scripts/powershell/sedd-tasks.ps1 +176 -0
  81. package/templates/changelog-template.md +6 -0
  82. package/templates/clarify-template.md +66 -0
  83. package/templates/config-template.json +20 -0
  84. package/templates/decisions-template.md +56 -0
  85. package/templates/interfaces-template.ts +131 -0
  86. package/templates/meta-template.json +12 -0
  87. package/templates/progress-template.md +61 -0
  88. package/templates/sedd.schema.json +95 -0
  89. package/templates/spec-template.md +114 -0
  90. package/templates/tasks-template.md +58 -0
@@ -0,0 +1,326 @@
1
+ # /sedd.implement - Execute Tasks
2
+
3
+ ## Purpose
4
+ Execute tasks from migrations, with optional migration ID filter.
5
+
6
+ ## Trigger
7
+ - `/sedd.implement` - Execute ALL pending tasks (asks between migrations)
8
+ - `/sedd.implement --all` or `-a` - Execute ALL without stopping (no prompts)
9
+ - `/sedd.implement 001` - Execute only migration 001 tasks
10
+ - `/sedd.implement 002` - Execute migrations up to 002
11
+
12
+ ## Pre-flight Checks
13
+
14
+ 1. **Read sedd.config.json** to get `specsDir` (default: `.sedd`, legacy: `specs`)
15
+ ```
16
+ Read sedd.config.json → specsDir = "specs" or ".sedd"
17
+ ```
18
+
19
+ 2. **Get current branch** from git
20
+ ```
21
+ git rev-parse --abbrev-ref HEAD → "023-agent-executor"
22
+ ```
23
+
24
+ 3. **Find feature directory**
25
+ ```
26
+ {specsDir}/{branch}/ → specs/023-agent-executor/
27
+ ```
28
+
29
+ 4. **Verify migrations exist** in feature directory (run /sedd.clarify first)
30
+
31
+ 5. **Load _meta.json** from feature directory to get migration list
32
+
33
+ 6. **Check for pending tasks** in migration tasks.md files
34
+
35
+ ## Workflow
36
+
37
+ ### Step 1: Determine Scope
38
+
39
+ Based on argument:
40
+ - No argument → All pending tasks from all migrations
41
+ - `001` → Only tasks from migration 001
42
+ - `002` → Tasks from migrations 001 AND 002
43
+
44
+ ### Step 2: Load Context
45
+
46
+ Read all relevant files:
47
+ - spec.md (reference)
48
+ - interfaces.ts (for Zod conversion)
49
+ - All relevant migration folders:
50
+ - `XXX_timestamp/clarify.md`
51
+ - `XXX_timestamp/tasks.md`
52
+ - `XXX_timestamp/decisions.md`
53
+
54
+ ### Step 3: Create/Update Progress File
55
+
56
+ Initialize `progress.md` if not exists:
57
+
58
+ ```markdown
59
+ # Implementation Progress
60
+
61
+ ## Current Status
62
+ - **Active Migration:** 001
63
+ - **Active Task:** T001-001
64
+ - **Overall Progress:** 0/5 (0%)
65
+
66
+ ## Task Log
67
+
68
+ | Task | Migration | Status | Started | Completed |
69
+ |------|-----------|--------|---------|-----------|
70
+ | T001-001 | 001 | pending | - | - |
71
+ | T001-002 | 001 | pending | - | - |
72
+ ```
73
+
74
+ ### Step 4: Convert Interfaces to Zod (First Run)
75
+
76
+ On first implementation, convert interfaces.ts:
77
+
78
+ ```typescript
79
+ // schemas/entities.ts
80
+ import { z } from 'zod';
81
+
82
+ export const ThemeSchema = z.enum(['light', 'dark', 'system']);
83
+
84
+ export const UserPreferencesSchema = z.object({
85
+ theme: ThemeSchema,
86
+ // ...
87
+ });
88
+
89
+ export type UserPreferences = z.infer<typeof UserPreferencesSchema>;
90
+ ```
91
+
92
+ ### Step 5: Task Execution Loop
93
+
94
+ For each task in order:
95
+
96
+ 1. **Mark as in-progress** in progress.md
97
+ ```
98
+ | T001-001 | 001 | in-progress | 10:30 | - |
99
+ ```
100
+
101
+ 2. **Show task context**
102
+ ```
103
+ 📌 Task T001-001 [Foundation]
104
+ Create ThemeContext in src/contexts/ThemeContext.tsx
105
+
106
+ From Decision D001-001: Theme persisted in user account
107
+ ```
108
+
109
+ 3. **Execute the task**
110
+
111
+ 4. **Update ALL task files** (CRITICAL - keep them in sync):
112
+
113
+ a. **Update tasks.md** in migration folder - change `[ ]` to `[x]`:
114
+ ```markdown
115
+ # Before
116
+ - [ ] T001-001 [Foundation] Create ThemeContext
117
+
118
+ # After
119
+ - [x] T001-001 [Foundation] Create ThemeContext
120
+ ```
121
+
122
+ b. **Update progress.md** - mark completed with timestamp:
123
+ ```markdown
124
+ - [x] T001-001 [10:30 → 10:45] Create ThemeContext
125
+ ```
126
+
127
+ c. **Update _meta.json** - increment tasksCompleted:
128
+ ```json
129
+ "tasksCompleted": 1
130
+ ```
131
+
132
+ 5. **Verify sync** - All three files must show same completed count
133
+
134
+ ### Step 6: Migration Boundaries
135
+
136
+ When completing a migration's tasks:
137
+
138
+ ```
139
+ ✅ Migration 001 complete!
140
+
141
+ All 5 tasks finished:
142
+ - T001-001 ✓
143
+ - T001-002 ✓
144
+ - T001-003 ✓
145
+ - T001-004 ✓
146
+ - T001-005 ✓
147
+ ```
148
+
149
+ ### Step 7: Expectation Verification (NEW)
150
+
151
+ After completing all tasks in a migration, verify against the original expectation:
152
+
153
+ ```markdown
154
+ ## Expectation Verification
155
+
156
+ **Original expectation:**
157
+ > User can toggle dark mode in settings and have it persist across sessions
158
+
159
+ **Delivered:**
160
+ - Implemented 5 tasks
161
+ - Created ThemeContext for state management
162
+ - Added database persistence
163
+ - Created toggle component in settings
164
+ - API endpoint for saving preference
165
+
166
+ **Alignment:** ✅ Expectation met
167
+ ```
168
+
169
+ #### When Not Met:
170
+
171
+ If expectation was not fully met:
172
+
173
+ ```
174
+ ⚠️ Expectation may not be fully met
175
+
176
+ **Original expectation:**
177
+ > User can toggle dark mode in settings and have it persist across sessions
178
+
179
+ **What may be missing:**
180
+ - [potential gap]
181
+
182
+ **Options:**
183
+ 1. Create new migration to address gaps
184
+ 2. Mark as complete anyway (partial delivery)
185
+
186
+ What would you like to do?
187
+ ```
188
+
189
+ If user chooses option 1, suggest running `/sedd.clarify` for a follow-up migration.
190
+
191
+ ### Step 8: Ask About Commit
192
+
193
+ ```
194
+ Do you want to commit?
195
+ Message: "feat(024): implement migration 001"
196
+ ```
197
+
198
+ ### Step 9: Update Changelog
199
+
200
+ After completing a migration:
201
+
202
+ ```markdown
203
+ ## [2026-01-11] - Migration 001 Implemented
204
+
205
+ - Completed 5 tasks
206
+ - Created ThemeContext
207
+ - Updated database schema
208
+ - Added settings toggle
209
+ ```
210
+
211
+ ### Step 10: Continue or Stop
212
+
213
+ **If `--all` or `-a` flag:**
214
+ - Do NOT ask, continue automatically
215
+ - Only ask about commit at the very end (all migrations done)
216
+ - Show progress summary between migrations:
217
+ ```
218
+ ✅ Migration 001 complete (5/5 tasks)
219
+ → Continuing to migration 002...
220
+ ```
221
+
222
+ **If NO flag (default):**
223
+ After each migration:
224
+
225
+ ```
226
+ Migration 001 complete!
227
+
228
+ Next pending migration: 002 (3 tasks)
229
+
230
+ Continue with migration 002? [Y/n]
231
+ ```
232
+
233
+ If user specified a migration ID, stop after that migration.
234
+
235
+ ## Task States
236
+
237
+ ```
238
+ pending → in-progress → completed
239
+ → blocked
240
+ ```
241
+
242
+ Only ONE task can be `in-progress` at a time.
243
+
244
+ ## Progress.md Structure
245
+
246
+ ```markdown
247
+ # Implementation Progress
248
+
249
+ ## Summary
250
+ | Migration | Total | Done | Progress |
251
+ |-----------|-------|------|----------|
252
+ | 001 | 5 | 5 | 100% |
253
+ | 002 | 3 | 1 | 33% |
254
+ | **Total** | **8** | **6** | **75%** |
255
+
256
+ ## Current Task
257
+ T002-002 [US2] Add validation
258
+
259
+ ## Task Log
260
+
261
+ ### Migration 001 (Completed)
262
+ - [x] T001-001 [10:30 → 10:45] Create ThemeContext
263
+ - [x] T001-002 [10:45 → 11:00] Update schema
264
+ - [x] T001-003 [11:00 → 11:30] Create toggle
265
+ - [x] T001-004 [11:30 → 11:45] Add to settings
266
+ - [x] T001-005 [11:45 → 12:00] API endpoint
267
+
268
+ ### Migration 002 (In Progress)
269
+ - [x] T002-001 [14:00 → 14:15] Add tests
270
+ - [ ] T002-002 [14:15 → ...] Add validation
271
+ - [ ] T002-003 Pending
272
+ ```
273
+
274
+ ## Filtering Examples
275
+
276
+ ```
277
+ /sedd.implement
278
+ ```
279
+ Executes: T001-001, T001-002... (asks between migrations)
280
+
281
+ ```
282
+ /sedd.implement --all
283
+ ```
284
+ Executes: ALL tasks from ALL migrations without stopping.
285
+ Only asks about commit at the very end.
286
+
287
+ ```
288
+ /sedd.implement -a
289
+ ```
290
+ Same as `--all` (shorthand).
291
+
292
+ ```
293
+ /sedd.implement 001
294
+ ```
295
+ Executes: T001-001, T001-002, T001-003, T001-004, T001-005
296
+ Stops after migration 001.
297
+
298
+ ```
299
+ /sedd.implement 002
300
+ ```
301
+ Executes: All tasks from 001 AND 002
302
+ Stops after migration 002.
303
+
304
+ ## Rules
305
+
306
+ - **CRITICAL: Update ALL 3 files when completing a task:**
307
+ 1. `{migration}/tasks.md` - change `[ ]` to `[x]`
308
+ 2. `progress.md` - mark task with `[x]` and timestamps
309
+ 3. `_meta.json` - increment tasksCompleted count
310
+ - ONE task in-progress at a time
311
+ - **With `--all` flag:** NO prompts between migrations, commit only at end
312
+ - **Without flag:** Ask about commit after each migration completes
313
+ - Convert interfaces to Zod on first run
314
+ - Update CHANGELOG after each migration
315
+ - Auto-split files > 400 lines
316
+
317
+ ## File Sync Checklist
318
+
319
+ After completing each task, verify:
320
+ ```
321
+ ✓ tasks.md → - [x] T001-001 ...
322
+ ✓ progress.md → - [x] T001-001 [time] ...
323
+ ✓ _meta.json → "tasksCompleted": N
324
+ ```
325
+
326
+ If files are out of sync, fix immediately before continuing.
@@ -0,0 +1,249 @@
1
+ # /sedd.migrate - Migrate Legacy Specs
2
+
3
+ ## Purpose
4
+ Convert existing speckit/legacy structure to new SEDD migrations structure.
5
+
6
+ ## Trigger
7
+ - `/sedd.migrate` - Migrate current feature
8
+ - `/sedd.migrate 023-agent-executor` - Migrate specific feature
9
+ - `/sedd.migrate --all` - Migrate all features
10
+
11
+ ## Legacy Structure → New Structure
12
+
13
+ ```
14
+ OLD: NEW:
15
+ specs/023-feature/ specs/023-feature/
16
+ ├── spec.md → ├── _meta.json
17
+ ├── plan.md → ├── CHANGELOG.md
18
+ ├── tasks.md → ├── spec.md
19
+ ├── research.md → ├── interfaces.ts (extracted)
20
+ ├── data-model.md → ├── progress.md
21
+ ├── contracts/ → │
22
+ ├── ui-specs/ → ├── 001_{{timestamp}}/
23
+ └── quickstart.md → │ ├── clarify.md (from plan)
24
+ │ ├── tasks.md (moved)
25
+ │ └── decisions.md (extracted)
26
+
27
+ └── archive/
28
+ ├── plan.md
29
+ ├── research.md
30
+ ├── data-model.md
31
+ ├── contracts/
32
+ └── quickstart.md
33
+ ```
34
+
35
+ ## Workflow
36
+
37
+ ### Step 1: Analyze Feature
38
+
39
+ Check existing files:
40
+ - spec.md → Keep in root
41
+ - plan.md → Extract decisions, archive
42
+ - tasks.md → Move to migration 001
43
+ - research.md → Archive
44
+ - data-model.md → Archive
45
+ - ui-specs/ → Move to ui-mockups/
46
+ - contracts/ → Archive
47
+ - quickstart.md → Archive
48
+
49
+ ### Step 2: Dry Run (Default)
50
+
51
+ ```
52
+ 📦 Migration Plan: 023-agent-executor
53
+
54
+ Will create:
55
+ ✓ _meta.json
56
+ ✓ CHANGELOG.md
57
+ ✓ interfaces.ts (extracted from spec)
58
+ ✓ progress.md
59
+ ✓ 001_2026-01-11_12-00-00/
60
+ ✓ archive/
61
+
62
+ Will move:
63
+ spec.md → (keep in place)
64
+ tasks.md → 001_.../tasks.md
65
+ ui-specs/ → ui-mockups/
66
+
67
+ Will extract:
68
+ plan.md decisions → 001_.../decisions.md
69
+ plan.md clarifications → 001_.../clarify.md
70
+ spec.md entities → interfaces.ts
71
+
72
+ Will archive:
73
+ plan.md → archive/plan.md
74
+ research.md → archive/research.md
75
+ data-model.md → archive/data-model.md
76
+ contracts/ → archive/contracts/
77
+ quickstart.md → archive/quickstart.md
78
+
79
+ Proceed? [y/N]
80
+ ```
81
+
82
+ ### Step 3: Extract Interfaces
83
+
84
+ Scan spec.md for entities and create interfaces.ts:
85
+
86
+ ```typescript
87
+ /**
88
+ * Interfaces extracted from spec.md
89
+ * Migration timestamp: 2026-01-11_12-00-00
90
+ */
91
+
92
+ export interface Agent {
93
+ id: string;
94
+ name: string;
95
+ // ... extracted from spec
96
+ }
97
+
98
+ export interface Tool {
99
+ id: string;
100
+ agentId: string;
101
+ // ... extracted from spec
102
+ }
103
+ ```
104
+
105
+ ### Step 4: Create Migration 001
106
+
107
+ Create first migration from existing files:
108
+
109
+ ```
110
+ 001_2026-01-11_12-00-00/
111
+ ├── clarify.md ← Extracted from plan.md
112
+ ├── tasks.md ← Moved from root
113
+ └── decisions.md ← Extracted from plan.md
114
+ ```
115
+
116
+ ### Step 5: Update Task IDs
117
+
118
+ Rename tasks to new format:
119
+
120
+ ```
121
+ OLD: - [ ] T001 Create component
122
+ NEW: - [ ] T001-001 Create component
123
+
124
+ OLD: - [ ] T015 Update schema
125
+ NEW: - [ ] T001-015 Update schema
126
+ ```
127
+
128
+ ### Step 6: Archive Old Files
129
+
130
+ Move to archive/:
131
+ ```
132
+ archive/
133
+ ├── plan.md # Original plan
134
+ ├── research.md # Research notes
135
+ ├── data-model.md # Data model
136
+ ├── contracts/ # API contracts
137
+ └── quickstart.md # Quickstart guide
138
+ ```
139
+
140
+ ### Step 7: Generate _meta.json
141
+
142
+ ```json
143
+ {
144
+ "featureId": "023",
145
+ "featureName": "agent-executor",
146
+ "branch": "023-agent-executor",
147
+ "createdAt": "2026-01-11T12:00:00Z",
148
+ "specCreatedAt": "2026-01-11T12:00:00Z",
149
+ "currentMigration": "001",
150
+ "migrations": {
151
+ "001": {
152
+ "id": "001",
153
+ "timestamp": "2026-01-11_12-00-00",
154
+ "folder": "001_2026-01-11_12-00-00",
155
+ "status": "in-progress",
156
+ "tasksTotal": 15,
157
+ "tasksCompleted": 8,
158
+ "createdAt": "2026-01-11T12:00:00Z"
159
+ }
160
+ },
161
+ "splits": [],
162
+ "commits": []
163
+ }
164
+ ```
165
+
166
+ ### Step 8: Generate CHANGELOG.md
167
+
168
+ ```markdown
169
+ # Changelog - 023: agent-executor
170
+
171
+ ## [2026-01-11] - Migrated to SEDD
172
+
173
+ - Converted from legacy speckit structure
174
+ - Created migration 001 with 15 tasks
175
+ - 8 tasks already completed
176
+ - Archived legacy files
177
+ ```
178
+
179
+ ### Step 9: Generate progress.md
180
+
181
+ Based on task checkboxes in original tasks.md:
182
+
183
+ ```markdown
184
+ # Implementation Progress
185
+
186
+ ## Summary
187
+ | Migration | Total | Done | Progress |
188
+ |-----------|-------|------|----------|
189
+ | 001 | 15 | 8 | 53% |
190
+
191
+ ## Task Log (Imported)
192
+
193
+ ### Migration 001
194
+ - [x] T001-001 Setup project structure
195
+ - [x] T001-002 Configure dependencies
196
+ - [x] T001-003 Create base types
197
+ ...
198
+ - [ ] T001-014 Add error handling
199
+ - [ ] T001-015 Update documentation
200
+ ```
201
+
202
+ ### Step 10: Verification
203
+
204
+ ```
205
+ ✅ Migration complete: 023-agent-executor
206
+
207
+ New structure:
208
+ specs/023-agent-executor/
209
+ ├── _meta.json
210
+ ├── CHANGELOG.md
211
+ ├── spec.md
212
+ ├── interfaces.ts
213
+ ├── progress.md
214
+ ├── ui-mockups/
215
+ ├── 001_2026-01-11_12-00-00/
216
+ │ ├── clarify.md
217
+ │ ├── tasks.md
218
+ │ └── decisions.md
219
+ └── archive/
220
+ ├── plan.md
221
+ ├── research.md
222
+ └── ...
223
+
224
+ Run `sedd status` to verify.
225
+ ```
226
+
227
+ ## Batch Migration
228
+
229
+ ```
230
+ /sedd.migrate --all
231
+
232
+ Found 5 features to migrate:
233
+ - 019-workflow-v2
234
+ - 020-chat-improvements
235
+ - 021-streaming-pipeline
236
+ - 022-google-sheets
237
+ - 023-agent-executor
238
+
239
+ Migrate all? [y/N]
240
+ ```
241
+
242
+ ## Rules
243
+
244
+ - NEVER delete files (archive instead)
245
+ - ALWAYS create _meta.json
246
+ - ALWAYS extract interfaces.ts
247
+ - Update task IDs to new format (TXXX-XXX)
248
+ - Preserve task completion status
249
+ - Archive preserves full history