sdd-flow 1.2.4 → 1.3.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.
- package/README.md +85 -83
- package/bin/cli.js +436 -380
- package/package.json +2 -2
- package/templates/QUICKSTART.md +70 -50
package/README.md
CHANGED
|
@@ -1,83 +1,85 @@
|
|
|
1
|
-
# sdd-flow
|
|
2
|
-
|
|
3
|
-
Spec Driven Development workflow for AI-assisted development.
|
|
4
|
-
|
|
5
|
-
Installs a structured **Research → Plan → Implement → Validate** cycle into any project, powered by markdown artifacts and isolated agent sessions.
|
|
6
|
-
|
|
7
|
-
Works with Claude Code, OpenCode, Cursor, Codex CLI, and any agentic IDE with filesystem access.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Install
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm install -g sdd-flow
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Usage
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
sdd init
|
|
23
|
-
sdd
|
|
24
|
-
sdd
|
|
25
|
-
sdd
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
|
73
|
-
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
1
|
+
# sdd-flow
|
|
2
|
+
|
|
3
|
+
Spec Driven Development workflow for AI-assisted development.
|
|
4
|
+
|
|
5
|
+
Installs a structured **Research → Plan → Implement → Validate** cycle into any project, powered by markdown artifacts and isolated agent sessions.
|
|
6
|
+
|
|
7
|
+
Works with Claude Code, OpenCode, Cursor, Codex CLI, and any agentic IDE with filesystem access.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g sdd-flow
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
sdd init # Installs the workflow into the current project
|
|
23
|
+
sdd new <name> # Creates a spec folder with auto-numbering
|
|
24
|
+
sdd harness # Installs, switches, or removes the agent harness
|
|
25
|
+
sdd update # Updates prompts and rules, preserves project data
|
|
26
|
+
sdd --version
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
> Alias available: use `sdd` or `sdd-cli` — both work.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## After `init`
|
|
34
|
+
|
|
35
|
+
Open a new session with your agent and instruct:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
"Read and follow agents/SETUP.md"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- **New project:** describe the project or provide a PRD — the agent generates PROJECT.md and skills
|
|
42
|
+
- **Existing project:** the agent scans the codebase automatically
|
|
43
|
+
|
|
44
|
+
Review the generated files and delete `agents/SETUP.md`.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Add or switch harness after init
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
sdd harness
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Installs, replaces, or removes the harness and slash commands at any time.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Update workflow (preserves your project data)
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
sdd update
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Updates `AGENTS.md`, `RULES.md`, `QUICKSTART.md`, and all prompts. Your `PROJECT.md`, `DECISIONS.md`, `skills/`, `specs/`, and `harness/` are never touched.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## The RPI Cycle
|
|
69
|
+
|
|
70
|
+
Each feature goes through four isolated phases, each in its own agent session:
|
|
71
|
+
|
|
72
|
+
| Phase | Slash command | Prompt file |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| Research | `/sdd-research 001-feature` | `agents/prompts/rpi-research.md` |
|
|
75
|
+
| Plan | `/sdd-plan 001-feature` | `agents/prompts/rpi-plan.md` |
|
|
76
|
+
| Implement | `/sdd-implement 001-feature` | `agents/prompts/rpi-implement.md` |
|
|
77
|
+
| Validate | `/sdd-validate 001-feature` | `agents/prompts/rpi-validate.md` |
|
|
78
|
+
|
|
79
|
+
> Slash commands require harness installation (`sdd harness`).
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Source
|
|
84
|
+
|
|
85
|
+
[github.com/moisesuailab/spec-driven-workflow](https://github.com/moisesuailab/spec-driven-workflow)
|
package/bin/cli.js
CHANGED
|
@@ -1,380 +1,436 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
'use strict';
|
|
4
|
-
|
|
5
|
-
const fs = require('fs');
|
|
6
|
-
const path = require('path');
|
|
7
|
-
const rl = require('readline');
|
|
8
|
-
|
|
9
|
-
const TEMPLATES = path.join(__dirname, '..', 'templates');
|
|
10
|
-
const CWD = process.cwd();
|
|
11
|
-
const VERSION = require('../package.json').version;
|
|
12
|
-
const useColor = process.stdout.isTTY && !process.env.NO_COLOR;
|
|
13
|
-
|
|
14
|
-
const c = useColor
|
|
15
|
-
? { reset: '\x1b[0m', bold: '\x1b[1m', green: '\x1b[32m',
|
|
16
|
-
yellow: '\x1b[33m', cyan: '\x1b[36m', red: '\x1b[31m', dim: '\x1b[2m' }
|
|
17
|
-
: { reset: '', bold: '', green: '', yellow: '', cyan: '', red: '', dim: '' };
|
|
18
|
-
|
|
19
|
-
const log = (msg = '') => console.log(msg);
|
|
20
|
-
const ok = (msg) => console.log(`${c.green}✔${c.reset} ${msg}`);
|
|
21
|
-
const warn = (msg) => console.log(`${c.yellow}⚠${c.reset} ${msg}`);
|
|
22
|
-
const info = (msg) => console.log(`${c.cyan}ℹ${c.reset} ${msg}`);
|
|
23
|
-
const error = (msg) => console.log(`${c.red}✖${c.reset} ${msg}`);
|
|
24
|
-
const bold = (msg) => `${c.bold}${msg}${c.reset}`;
|
|
25
|
-
const dim = (msg) => `${c.dim}${msg}${c.reset}`;
|
|
26
|
-
|
|
27
|
-
function ask(prompt) {
|
|
28
|
-
const iface = rl.createInterface({ input: process.stdin, output: process.stdout });
|
|
29
|
-
return new Promise(resolve =>
|
|
30
|
-
iface.question(prompt, answer => { iface.close(); resolve(answer.trim()); })
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function copy(src, dest) {
|
|
35
|
-
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
36
|
-
fs.copyFileSync(src, dest);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function copyDir(src, dest, exclude = []) {
|
|
40
|
-
fs.mkdirSync(dest, { recursive: true });
|
|
41
|
-
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
42
|
-
if (exclude.includes(entry.name)) continue;
|
|
43
|
-
const srcPath = path.join(src, entry.name);
|
|
44
|
-
const destPath = path.join(dest, entry.name);
|
|
45
|
-
entry.isDirectory() ? copyDir(srcPath, destPath) : copy(srcPath, destPath);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const HARNESS_CONFIG = {
|
|
50
|
-
'2': {
|
|
51
|
-
name: 'claude-code',
|
|
52
|
-
commandsDest: path.join(CWD, '.claude', 'commands'),
|
|
53
|
-
},
|
|
54
|
-
'3': {
|
|
55
|
-
name: 'opencode',
|
|
56
|
-
commandsDest: path.join(CWD, '.opencode', 'commands'),
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
function showSlashCommands() {
|
|
61
|
-
log(bold('Slash commands disponíveis:'));
|
|
62
|
-
log(` ${c.cyan}/sdd-research${c.reset} 001-nome-da-feature`);
|
|
63
|
-
log(` ${c.cyan}/sdd-plan${c.reset} 001-nome-da-feature`);
|
|
64
|
-
log(` ${c.cyan}/sdd-implement${c.reset} 001-nome-da-feature`);
|
|
65
|
-
log(` ${c.cyan}/sdd-validate${c.reset} 001-nome-da-feature`);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function removeSddCommands(commandsDest) {
|
|
69
|
-
if (!fs.existsSync(commandsDest)) return;
|
|
70
|
-
for (const f of fs.readdirSync(commandsDest)) {
|
|
71
|
-
if (f.startsWith('sdd-')) fs.rmSync(path.join(commandsDest, f));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
log(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
if (
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
ok('
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
log();
|
|
224
|
-
log(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
log();
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
if (
|
|
293
|
-
|
|
294
|
-
log(
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
const
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
);
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
log(
|
|
338
|
-
log(
|
|
339
|
-
log(
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const rl = require('readline');
|
|
8
|
+
|
|
9
|
+
const TEMPLATES = path.join(__dirname, '..', 'templates');
|
|
10
|
+
const CWD = process.cwd();
|
|
11
|
+
const VERSION = require('../package.json').version;
|
|
12
|
+
const useColor = process.stdout.isTTY && !process.env.NO_COLOR;
|
|
13
|
+
|
|
14
|
+
const c = useColor
|
|
15
|
+
? { reset: '\x1b[0m', bold: '\x1b[1m', green: '\x1b[32m',
|
|
16
|
+
yellow: '\x1b[33m', cyan: '\x1b[36m', red: '\x1b[31m', dim: '\x1b[2m' }
|
|
17
|
+
: { reset: '', bold: '', green: '', yellow: '', cyan: '', red: '', dim: '' };
|
|
18
|
+
|
|
19
|
+
const log = (msg = '') => console.log(msg);
|
|
20
|
+
const ok = (msg) => console.log(`${c.green}✔${c.reset} ${msg}`);
|
|
21
|
+
const warn = (msg) => console.log(`${c.yellow}⚠${c.reset} ${msg}`);
|
|
22
|
+
const info = (msg) => console.log(`${c.cyan}ℹ${c.reset} ${msg}`);
|
|
23
|
+
const error = (msg) => console.log(`${c.red}✖${c.reset} ${msg}`);
|
|
24
|
+
const bold = (msg) => `${c.bold}${msg}${c.reset}`;
|
|
25
|
+
const dim = (msg) => `${c.dim}${msg}${c.reset}`;
|
|
26
|
+
|
|
27
|
+
function ask(prompt) {
|
|
28
|
+
const iface = rl.createInterface({ input: process.stdin, output: process.stdout });
|
|
29
|
+
return new Promise(resolve =>
|
|
30
|
+
iface.question(prompt, answer => { iface.close(); resolve(answer.trim()); })
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function copy(src, dest) {
|
|
35
|
+
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
36
|
+
fs.copyFileSync(src, dest);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function copyDir(src, dest, exclude = []) {
|
|
40
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
41
|
+
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
42
|
+
if (exclude.includes(entry.name)) continue;
|
|
43
|
+
const srcPath = path.join(src, entry.name);
|
|
44
|
+
const destPath = path.join(dest, entry.name);
|
|
45
|
+
entry.isDirectory() ? copyDir(srcPath, destPath) : copy(srcPath, destPath);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const HARNESS_CONFIG = {
|
|
50
|
+
'2': {
|
|
51
|
+
name: 'claude-code',
|
|
52
|
+
commandsDest: path.join(CWD, '.claude', 'commands'),
|
|
53
|
+
},
|
|
54
|
+
'3': {
|
|
55
|
+
name: 'opencode',
|
|
56
|
+
commandsDest: path.join(CWD, '.opencode', 'commands'),
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
function showSlashCommands() {
|
|
61
|
+
log(bold('Slash commands disponíveis:'));
|
|
62
|
+
log(` ${c.cyan}/sdd-research${c.reset} 001-nome-da-feature`);
|
|
63
|
+
log(` ${c.cyan}/sdd-plan${c.reset} 001-nome-da-feature`);
|
|
64
|
+
log(` ${c.cyan}/sdd-implement${c.reset} 001-nome-da-feature`);
|
|
65
|
+
log(` ${c.cyan}/sdd-validate${c.reset} 001-nome-da-feature`);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function removeSddCommands(commandsDest) {
|
|
69
|
+
if (!fs.existsSync(commandsDest)) return;
|
|
70
|
+
for (const f of fs.readdirSync(commandsDest)) {
|
|
71
|
+
if (f.startsWith('sdd-')) fs.rmSync(path.join(commandsDest, f));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function syncGitExclude(entries, shouldExclude) {
|
|
76
|
+
const gitDir = path.join(CWD, '.git');
|
|
77
|
+
if (!fs.existsSync(gitDir)) {
|
|
78
|
+
warn('.git/ não encontrado — .git/info/exclude não configurado.');
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const excludePath = path.join(gitDir, 'info', 'exclude');
|
|
83
|
+
let content = fs.existsSync(excludePath) ? fs.readFileSync(excludePath, 'utf8') : '';
|
|
84
|
+
|
|
85
|
+
content = content.replace(/\n*# sdd-flow\n[\s\S]*?# \/sdd-flow\n*/g, '');
|
|
86
|
+
content = content.trimEnd();
|
|
87
|
+
|
|
88
|
+
if (shouldExclude) {
|
|
89
|
+
const sep = content ? '\n\n' : '';
|
|
90
|
+
content += sep + '# sdd-flow\n' + entries.join('\n') + '\n# /sdd-flow';
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
fs.mkdirSync(path.dirname(excludePath), { recursive: true });
|
|
94
|
+
fs.writeFileSync(excludePath, content + '\n', 'utf8');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
async function init() {
|
|
98
|
+
log();
|
|
99
|
+
log(bold('sdd-cli') + dim(' — Spec Driven Development workflow'));
|
|
100
|
+
log();
|
|
101
|
+
|
|
102
|
+
const agentsDir = path.join(CWD, 'agents');
|
|
103
|
+
if (fs.existsSync(agentsDir)) {
|
|
104
|
+
warn('A pasta agents/ já existe neste projeto.');
|
|
105
|
+
const answer = await ask(' Deseja sobrescrever os arquivos do workflow? (s/N) ');
|
|
106
|
+
if (answer.toLowerCase() !== 's') {
|
|
107
|
+
info('Operação cancelada. Use ' + bold('sdd update') + ' para atualizar prompts e regras.');
|
|
108
|
+
log();
|
|
109
|
+
process.exit(0);
|
|
110
|
+
}
|
|
111
|
+
log();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
copy(path.join(TEMPLATES, 'AGENTS.md'), path.join(CWD, 'AGENTS.md'));
|
|
115
|
+
ok('AGENTS.md criado na raiz do projeto');
|
|
116
|
+
|
|
117
|
+
copy(path.join(TEMPLATES, 'QUICKSTART.md'), path.join(CWD, 'QUICKSTART.md'));
|
|
118
|
+
ok('QUICKSTART.md criado na raiz do projeto');
|
|
119
|
+
|
|
120
|
+
copyDir(path.join(TEMPLATES, 'agents'), agentsDir, ['harness']);
|
|
121
|
+
ok('Workflow instalado em agents/');
|
|
122
|
+
|
|
123
|
+
log();
|
|
124
|
+
info('O harness instala hooks de segurança e slash commands ' + dim('(opcional)'));
|
|
125
|
+
log(' 1) Pular esta etapa');
|
|
126
|
+
log(' 2) Claude Code');
|
|
127
|
+
log(' 3) OpenCode');
|
|
128
|
+
const choice = await ask(' Escolha [1]: ');
|
|
129
|
+
|
|
130
|
+
const harnessCfg = HARNESS_CONFIG[choice];
|
|
131
|
+
let harnessInstalled = false;
|
|
132
|
+
|
|
133
|
+
if (harnessCfg) {
|
|
134
|
+
const { name, commandsDest } = harnessCfg;
|
|
135
|
+
const harnessSrc = path.join(TEMPLATES, 'agents', 'harness', name);
|
|
136
|
+
|
|
137
|
+
if (fs.existsSync(harnessSrc)) {
|
|
138
|
+
copyDir(harnessSrc, path.join(agentsDir, 'harness', name), ['commands']);
|
|
139
|
+
ok(`Harness instalado: ${name}`);
|
|
140
|
+
|
|
141
|
+
const cmdSrc = path.join(harnessSrc, 'commands');
|
|
142
|
+
if (fs.existsSync(cmdSrc)) {
|
|
143
|
+
copyDir(cmdSrc, commandsDest);
|
|
144
|
+
ok(`Slash commands instalados em ${path.relative(CWD, commandsDest)}/`);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
harnessInstalled = true;
|
|
148
|
+
} else {
|
|
149
|
+
warn(`Harness "${name}" não encontrado. Use sdd harness para instalar depois.`);
|
|
150
|
+
}
|
|
151
|
+
} else {
|
|
152
|
+
info('Harness ignorado. Use ' + bold('sdd harness') + ' para instalar depois.');
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
log();
|
|
156
|
+
const docsAnswer = await ask(' Deseja criar a pasta docs/ para documentos de referência? (s/N) ');
|
|
157
|
+
const wantsDocs = docsAnswer.toLowerCase() === 's';
|
|
158
|
+
|
|
159
|
+
if (wantsDocs) {
|
|
160
|
+
const docsDir = path.join(CWD, 'docs');
|
|
161
|
+
if (fs.existsSync(docsDir)) {
|
|
162
|
+
info('docs/ já existe — preservado');
|
|
163
|
+
} else {
|
|
164
|
+
fs.mkdirSync(docsDir, { recursive: true });
|
|
165
|
+
for (const [name, header] of [['prd.md', '# PRD'], ['roadmap.md', '# Roadmap'], ['architecture.md', '# Architecture']]) {
|
|
166
|
+
fs.writeFileSync(path.join(docsDir, name), header + '\n', 'utf8');
|
|
167
|
+
}
|
|
168
|
+
ok('docs/ criado com prd.md, roadmap.md, architecture.md');
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
log();
|
|
173
|
+
info('Deseja versionar os arquivos do workflow?');
|
|
174
|
+
log(` ${dim('N → arquivos ignorados via .git/info/exclude (apenas nesta máquina)')}`);
|
|
175
|
+
const versionAnswer = await ask(' Escolha (S/n) [S]: ');
|
|
176
|
+
const shouldVersion = versionAnswer.toLowerCase() !== 'n';
|
|
177
|
+
|
|
178
|
+
const excludeEntries = ['AGENTS.md', 'QUICKSTART.md', 'agents/'];
|
|
179
|
+
if (wantsDocs) excludeEntries.push('docs/');
|
|
180
|
+
|
|
181
|
+
syncGitExclude(excludeEntries, !shouldVersion);
|
|
182
|
+
|
|
183
|
+
if (!shouldVersion) {
|
|
184
|
+
ok('Arquivos adicionados a .git/info/exclude');
|
|
185
|
+
warn('Outros desenvolvedores no projeto não terão esses arquivos.');
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
log();
|
|
189
|
+
log(bold('Próximos passos:'));
|
|
190
|
+
log(` ${c.cyan}1.${c.reset} Abra uma sessão do seu agente no projeto`);
|
|
191
|
+
log(` ${c.cyan}2.${c.reset} Instrua: ${dim('"Leia e siga agents/SETUP.md"')}`);
|
|
192
|
+
log(` ${dim('→ Projeto novo: descreva o projeto ou forneça o PRD')}`);
|
|
193
|
+
log(` ${dim('→ Projeto existente: o agente escaneia o código automaticamente')}`);
|
|
194
|
+
log(` ${c.cyan}3.${c.reset} Revise os arquivos gerados e delete agents/SETUP.md`);
|
|
195
|
+
log();
|
|
196
|
+
|
|
197
|
+
if (harnessInstalled) {
|
|
198
|
+
showSlashCommands();
|
|
199
|
+
} else {
|
|
200
|
+
log(dim(' Sem slash commands — consulte QUICKSTART.md para instruções manuais.'));
|
|
201
|
+
log(dim(' Para instalar depois: sdd harness'));
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
log();
|
|
205
|
+
log(dim(' Documentação: https://github.com/moisesuailab/spec-driven-workflow'));
|
|
206
|
+
log();
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
async function harness() {
|
|
210
|
+
log();
|
|
211
|
+
log(bold('sdd harness'));
|
|
212
|
+
log();
|
|
213
|
+
|
|
214
|
+
const agentsDir = path.join(CWD, 'agents');
|
|
215
|
+
if (!fs.existsSync(agentsDir)) {
|
|
216
|
+
error('Pasta agents/ não encontrada. Rode ' + bold('sdd init') + ' primeiro.');
|
|
217
|
+
log();
|
|
218
|
+
process.exit(1);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
info('O que deseja fazer?');
|
|
222
|
+
log(' 1) Remover harness atual');
|
|
223
|
+
log(' 2) Instalar / trocar para Claude Code');
|
|
224
|
+
log(' 3) Instalar / trocar para OpenCode');
|
|
225
|
+
const choice = await ask(' Escolha: ');
|
|
226
|
+
|
|
227
|
+
if (choice === '1') {
|
|
228
|
+
const harnessDir = path.join(agentsDir, 'harness');
|
|
229
|
+
if (fs.existsSync(harnessDir)) {
|
|
230
|
+
fs.rmSync(harnessDir, { recursive: true });
|
|
231
|
+
ok('Hooks removidos de agents/harness/');
|
|
232
|
+
}
|
|
233
|
+
for (const cfg of Object.values(HARNESS_CONFIG)) {
|
|
234
|
+
removeSddCommands(cfg.commandsDest);
|
|
235
|
+
if (fs.existsSync(cfg.commandsDest)) {
|
|
236
|
+
ok(`Slash commands removidos de ${path.relative(CWD, cfg.commandsDest)}/`);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
log();
|
|
240
|
+
ok('Harness desinstalado.');
|
|
241
|
+
log();
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
const harnessCfg = HARNESS_CONFIG[choice];
|
|
246
|
+
if (!harnessCfg) {
|
|
247
|
+
info('Operação cancelada.');
|
|
248
|
+
log();
|
|
249
|
+
process.exit(0);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
const { name, commandsDest } = harnessCfg;
|
|
253
|
+
const harnessSrc = path.join(TEMPLATES, 'agents', 'harness', name);
|
|
254
|
+
|
|
255
|
+
if (!fs.existsSync(harnessSrc)) {
|
|
256
|
+
error(`Harness "${name}" não encontrado nos templates.`);
|
|
257
|
+
process.exit(1);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
for (const cfg of Object.values(HARNESS_CONFIG)) {
|
|
261
|
+
removeSddCommands(cfg.commandsDest);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
copyDir(harnessSrc, path.join(agentsDir, 'harness', name), ['commands']);
|
|
265
|
+
ok(`Harness instalado: ${name}`);
|
|
266
|
+
|
|
267
|
+
const cmdSrc = path.join(harnessSrc, 'commands');
|
|
268
|
+
if (fs.existsSync(cmdSrc)) {
|
|
269
|
+
copyDir(cmdSrc, commandsDest);
|
|
270
|
+
ok(`Slash commands instalados em ${path.relative(CWD, commandsDest)}/`);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
log();
|
|
274
|
+
showSlashCommands();
|
|
275
|
+
log();
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
async function update() {
|
|
279
|
+
log();
|
|
280
|
+
log(bold('sdd update'));
|
|
281
|
+
log();
|
|
282
|
+
|
|
283
|
+
const agentsDir = path.join(CWD, 'agents');
|
|
284
|
+
if (!fs.existsSync(agentsDir)) {
|
|
285
|
+
error('Pasta agents/ não encontrada. Rode ' + bold('sdd init') + ' primeiro.');
|
|
286
|
+
log();
|
|
287
|
+
process.exit(1);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
warn('Isso atualizará AGENTS.md, RULES.md, QUICKSTART.md e todos os prompts.');
|
|
291
|
+
const answer = await ask(' Deseja continuar? (s/N) ');
|
|
292
|
+
if (answer.toLowerCase() !== 's') {
|
|
293
|
+
info('Operação cancelada.');
|
|
294
|
+
log();
|
|
295
|
+
process.exit(0);
|
|
296
|
+
}
|
|
297
|
+
log();
|
|
298
|
+
|
|
299
|
+
const coreFiles = [
|
|
300
|
+
{ rel: ['AGENTS.md'], dest: path.join(CWD, 'AGENTS.md') },
|
|
301
|
+
{ rel: ['QUICKSTART.md'], dest: path.join(CWD, 'QUICKSTART.md') },
|
|
302
|
+
{ rel: ['agents', 'AGENTS.md'], dest: path.join(agentsDir, 'AGENTS.md') },
|
|
303
|
+
{ rel: ['agents', 'RULES.md'], dest: path.join(agentsDir, 'RULES.md') },
|
|
304
|
+
];
|
|
305
|
+
|
|
306
|
+
for (const { rel, dest } of coreFiles) {
|
|
307
|
+
copy(path.join(TEMPLATES, ...rel), dest);
|
|
308
|
+
ok(`Atualizado: ${rel.join('/')}`);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
copyDir(
|
|
312
|
+
path.join(TEMPLATES, 'agents', 'prompts'),
|
|
313
|
+
path.join(agentsDir, 'prompts')
|
|
314
|
+
);
|
|
315
|
+
ok('Atualizado: agents/prompts/');
|
|
316
|
+
|
|
317
|
+
log();
|
|
318
|
+
info('Preservados (dados do projeto):');
|
|
319
|
+
['agents/PROJECT.md', 'agents/DECISIONS.md', 'agents/skills/', 'agents/specs/', 'agents/harness/']
|
|
320
|
+
.forEach(f => log(` ${dim(f)}`));
|
|
321
|
+
log();
|
|
322
|
+
ok('Workflow atualizado com sucesso.');
|
|
323
|
+
log();
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
function nextSpecNumber(specsDir) {
|
|
327
|
+
if (!fs.existsSync(specsDir)) return '001';
|
|
328
|
+
const entries = fs.readdirSync(specsDir, { withFileTypes: true })
|
|
329
|
+
.filter(e => e.isDirectory())
|
|
330
|
+
.map(e => parseInt(e.name.slice(0, 3), 10))
|
|
331
|
+
.filter(n => !isNaN(n));
|
|
332
|
+
const max = entries.length ? Math.max(...entries) : 0;
|
|
333
|
+
return String(max + 1).padStart(3, '0');
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
function newSpec(rawName) {
|
|
337
|
+
log();
|
|
338
|
+
log(bold('sdd new'));
|
|
339
|
+
log();
|
|
340
|
+
|
|
341
|
+
const agentsDir = path.join(CWD, 'agents');
|
|
342
|
+
if (!fs.existsSync(agentsDir)) {
|
|
343
|
+
error('Pasta agents/ não encontrada. Rode ' + bold('sdd init') + ' primeiro.');
|
|
344
|
+
log();
|
|
345
|
+
process.exit(1);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
if (!rawName) {
|
|
349
|
+
error('Informe o nome da feature: ' + bold('sdd new <nome-da-feature>'));
|
|
350
|
+
log(' Exemplo: ' + dim('sdd new user-authentication'));
|
|
351
|
+
log();
|
|
352
|
+
process.exit(1);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
const name = rawName.toLowerCase().trim().replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, '');
|
|
356
|
+
if (!name) {
|
|
357
|
+
error('Nome inválido. Use apenas letras, números e hífens.');
|
|
358
|
+
log();
|
|
359
|
+
process.exit(1);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
const specsDir = path.join(agentsDir, 'specs');
|
|
363
|
+
const num = nextSpecNumber(specsDir);
|
|
364
|
+
const slug = num + '-' + name;
|
|
365
|
+
const specDir = path.join(specsDir, slug);
|
|
366
|
+
|
|
367
|
+
if (fs.existsSync(specDir)) {
|
|
368
|
+
error('Spec já existe: agents/specs/' + slug + '/');
|
|
369
|
+
log();
|
|
370
|
+
process.exit(1);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
fs.mkdirSync(specDir, { recursive: true });
|
|
374
|
+
fs.writeFileSync(
|
|
375
|
+
path.join(specDir, 'DECISIONS.md'),
|
|
376
|
+
'# DECISIONS — ' + name + '\n\n(decisões arquiteturais registradas durante o ciclo)\n'
|
|
377
|
+
);
|
|
378
|
+
|
|
379
|
+
ok('Spec criada: agents/specs/' + slug + '/');
|
|
380
|
+
log();
|
|
381
|
+
log(bold('Próximo passo — inicie a fase de Research:'));
|
|
382
|
+
log(' ' + c.cyan + '/sdd-research' + c.reset + ' ' + slug);
|
|
383
|
+
log(' ' + dim('"Leia e siga agents/prompts/rpi-research.md. Spec: ' + slug + '"'));
|
|
384
|
+
log();
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
function help() {
|
|
388
|
+
log();
|
|
389
|
+
log(bold('sdd-cli') + dim(' — Spec Driven Development workflow'));
|
|
390
|
+
log();
|
|
391
|
+
log('Uso:');
|
|
392
|
+
log(` sdd-cli ${c.cyan}init${c.reset} Instala o workflow no projeto atual`);
|
|
393
|
+
log(` sdd-cli ${c.cyan}new <nome>${c.reset} Cria pasta da spec com numeração automática`);
|
|
394
|
+
log(` sdd-cli ${c.cyan}harness${c.reset} Instala, troca ou remove o harness do agente`);
|
|
395
|
+
log(` sdd-cli ${c.cyan}update${c.reset} Atualiza prompts e regras, preserva dados do projeto`);
|
|
396
|
+
log(` sdd-cli ${c.cyan}help${c.reset} Exibe esta mensagem`);
|
|
397
|
+
log(` sdd-cli ${c.cyan}--version${c.reset} Exibe a versão instalada`);
|
|
398
|
+
log();
|
|
399
|
+
log(dim(' Alias: sdd init / sdd new / sdd harness / sdd update / sdd help / sdd --version'));
|
|
400
|
+
log();
|
|
401
|
+
log(dim(' Documentação: https://github.com/moisesuailab/spec-driven-workflow'));
|
|
402
|
+
log();
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
const cmd = process.argv[2];
|
|
406
|
+
|
|
407
|
+
switch (cmd) {
|
|
408
|
+
case 'init':
|
|
409
|
+
init().catch(e => { error(e.message); process.exit(1); });
|
|
410
|
+
break;
|
|
411
|
+
case 'new':
|
|
412
|
+
newSpec(process.argv[3]);
|
|
413
|
+
break;
|
|
414
|
+
case 'harness':
|
|
415
|
+
harness().catch(e => { error(e.message); process.exit(1); });
|
|
416
|
+
break;
|
|
417
|
+
case 'update':
|
|
418
|
+
update().catch(e => { error(e.message); process.exit(1); });
|
|
419
|
+
break;
|
|
420
|
+
case 'help':
|
|
421
|
+
case '--help':
|
|
422
|
+
case '-h':
|
|
423
|
+
help();
|
|
424
|
+
break;
|
|
425
|
+
case '--version':
|
|
426
|
+
case '-v':
|
|
427
|
+
log(VERSION);
|
|
428
|
+
break;
|
|
429
|
+
case undefined:
|
|
430
|
+
help();
|
|
431
|
+
break;
|
|
432
|
+
default:
|
|
433
|
+
error(`Comando desconhecido: "${cmd}"`);
|
|
434
|
+
help();
|
|
435
|
+
process.exit(1);
|
|
436
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sdd-flow",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Spec Driven Development workflow for AI-assisted development (SDD + RPI)",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sdd-cli": "bin/cli.js",
|
|
@@ -27,6 +27,6 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
30
|
-
"url": "
|
|
30
|
+
"url": "https://github.com/moisesuailab/sdd-flow.git"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/templates/QUICKSTART.md
CHANGED
|
@@ -1,50 +1,70 @@
|
|
|
1
|
-
# SDD Workflow
|
|
2
|
-
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
RESEARCH → PLAN → IMPLEMENT → VALIDATE
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
##
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
# SDD Workflow - Quick Start
|
|
2
|
+
|
|
3
|
+
## Cycle
|
|
4
|
+
|
|
5
|
+
Each feature goes through 4 phases in isolated sessions:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
RESEARCH → PLAN → IMPLEMENT → VALIDATE
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Initial setup
|
|
12
|
+
|
|
13
|
+
After running `sdd init`, open your agent in the project and instruct:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
"Read and follow agents/SETUP.md"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- **New project:** describe the project or provide the PRD — the agent generates PROJECT.md and the skills
|
|
20
|
+
- **Existing project:** the agent scans the code automatically
|
|
21
|
+
|
|
22
|
+
Review the generated files and delete `agents/SETUP.md`.
|
|
23
|
+
|
|
24
|
+
## Starting a feature
|
|
25
|
+
|
|
26
|
+
### With slash commands
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
/sdd-research 001-feature-name → produces RESEARCH.md
|
|
30
|
+
/sdd-plan 001-feature-name → produces SPEC.md + TASK.md + TEST.md
|
|
31
|
+
/sdd-implement 001-feature-name → implements one task at a time
|
|
32
|
+
/sdd-validate 001-feature-name → produces VALIDATION.md
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Without slash commands
|
|
36
|
+
|
|
37
|
+
Instruct your agent in each session:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
"Read and follow agents/prompts/rpi-research.md. Spec: 001-feature-name"
|
|
41
|
+
"Read and follow agents/prompts/rpi-plan.md. Spec: 001-feature-name"
|
|
42
|
+
"Read and follow agents/prompts/rpi-implement.md. Spec: 001-feature-name"
|
|
43
|
+
"Read and follow agents/prompts/rpi-validate.md. Spec: 001-feature-name"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Creating a new spec
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
sdd new feature-name
|
|
50
|
+
# ✔ Spec created: agents/specs/001-feature-name/
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Spec structure after the full cycle
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
agents/specs/001-feature-name/
|
|
57
|
+
RESEARCH.md ← phase 1
|
|
58
|
+
SPEC.md ← phase 2
|
|
59
|
+
TASK.md ← phase 2
|
|
60
|
+
TEST.md ← phase 2
|
|
61
|
+
PROGRESS.md ← updated in phase 3
|
|
62
|
+
DECISIONS.md ← architectural decisions
|
|
63
|
+
VALIDATION.md ← phase 4
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## References
|
|
67
|
+
|
|
68
|
+
- Process rules → `agents/RULES.md`
|
|
69
|
+
- Full workflow definition → `agents/AGENTS.md`
|
|
70
|
+
- Documentation → https://github.com/moisesuailab/sdd-flow
|