its-magic 0.1.2-25 → 0.1.2-27
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 +1241 -1214
- package/bin/its-magic.js +5 -1
- package/installer.ps1 +215 -9
- package/installer.py +194 -8
- package/installer.sh +152 -10
- package/package.json +1 -1
- package/template/.cursor/commands/architecture.md +12 -0
- package/template/.cursor/commands/execute.md +134 -126
- package/template/.cursor/commands/intake.md +12 -0
- package/template/.cursor/commands/qa.md +111 -101
- package/template/.cursor/commands/refresh-context.md +12 -1
- package/template/.cursor/commands/release.md +409 -379
- package/template/.cursor/rules/core.mdc +11 -0
- package/template/README.md +1243 -1216
- package/template/docs/engineering/artifact-ordering-policy.md +3 -1
- package/template/docs/engineering/artifact-ownership-policy.md +57 -0
- package/template/docs/engineering/context/installer-owned-paths.manifest +2 -2
- package/template/docs/engineering/release-targets.json +123 -64
- package/template/docs/engineering/runbook.md +940 -886
- package/template/docs/engineering/runtime-connectivity.md +34 -0
- package/template/its_magic/.its-magic-version +1 -0
- package/template/its_magic/README.md +9 -0
- package/template/scripts/validate-and-push.ps1 +17 -2
- package/template/scripts/validate-and-push.sh +17 -2
package/README.md
CHANGED
|
@@ -1,1214 +1,1241 @@
|
|
|
1
|
-
# its-magic — AI dev team
|
|
2
|
-
|
|
3
|
-
[GitHub Repository](https://github.com/fl0wm0ti0n/its-magic)
|
|
4
|
-
|
|
5
|
-
Happy coding! Build something awesome.
|
|
6
|
-
|
|
7
|
-
Drop-in template repo that implements a structured its-magic workflow in Cursor:
|
|
8
|
-
intake -> discovery -> architecture -> sprint plan -> execute -> QA -> release,
|
|
9
|
-
with pause/resume, decision gates, and persistent artifacts.
|
|
10
|
-
|
|
11
|
-
## Features (what its-magic can do)
|
|
12
|
-
|
|
13
|
-
- Structured phase workflow with explicit artifacts.
|
|
14
|
-
- Artifact-first memory (state in files, not chat only).
|
|
15
|
-
- Decision gate + escalation (`decisions/DEC-xxxx.md`).
|
|
16
|
-
- Pause/resume with checkpoints (`handoffs/resume_brief.md`).
|
|
17
|
-
- Automated execute/QA loop with safety caps (optional).
|
|
18
|
-
- 3-layer quality chain: AI loop → local validate-and-push → CI auto-fix.
|
|
19
|
-
- CI/CD templates driven by `docs/engineering/runbook.md`.
|
|
20
|
-
- Team-friendly local overrides (`scratchpad.local.md`).
|
|
21
|
-
- Optional remote/docker execution and autonomous installs.
|
|
22
|
-
- Built-in benchmarks (live, prompted, headless).
|
|
23
|
-
- Multiplatform distribution (npm, Chocolatey, Homebrew).
|
|
24
|
-
|
|
25
|
-
## Setup
|
|
26
|
-
|
|
27
|
-
its-magic is an installer you run once per repo. It copies the AI dev team
|
|
28
|
-
workflow files (`.cursor/` commands, rules, agents, hooks, skills, plus `docs/`,
|
|
29
|
-
`sprints/`, `handoffs/`, etc.) into your project.
|
|
30
|
-
|
|
31
|
-
Starter artifacts are shipped as clean placeholders (no preloaded sprint/demo
|
|
32
|
-
history), so `/intake` starts from your own idea.
|
|
33
|
-
|
|
34
|
-
### 1) Install its-magic (once)
|
|
35
|
-
|
|
36
|
-
Pick one method:
|
|
37
|
-
|
|
38
|
-
| Method | Install command |
|
|
39
|
-
|--------|----------------|
|
|
40
|
-
| npm | `npm install -g its-magic` |
|
|
41
|
-
| npx | `npx its-magic --target . --mode missing` |
|
|
42
|
-
| Chocolatey | `choco install its-magic` (Admin shell) |
|
|
43
|
-
| Homebrew | `brew tap USER/tap && brew install its-magic` |
|
|
44
|
-
|
|
45
|
-
### 2) Apply to a repo
|
|
46
|
-
|
|
47
|
-
New repo:
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
mkdir my-project && cd my-project
|
|
51
|
-
git init
|
|
52
|
-
its-magic --target . --mode missing --create
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Existing repo (safe merge):
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
its-magic --target . --mode missing
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Existing repo (overwrite + backup):
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
its-magic --target . --mode overwrite --backup
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### Upgrading an existing repo
|
|
68
|
-
|
|
69
|
-
When you update its-magic to a newer version (`npm update -g its-magic`), run
|
|
70
|
-
upgrade mode to update framework files while preserving your project data:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
its-magic --target . --mode upgrade
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
What upgrade does:
|
|
77
|
-
|
|
78
|
-
- **Framework files** (commands, rules, agents, hooks, skills, CI, scripts) are
|
|
79
|
-
updated to the latest version.
|
|
80
|
-
- **User data** (docs, sprints, handoffs, decisions, runbook) is never touched.
|
|
81
|
-
- **Mixed files** (`.cursor/scratchpad.md`, `README.md`) are preserved. If the
|
|
82
|
-
template version has new content, a review notice is printed.
|
|
83
|
-
- A
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
# Show
|
|
104
|
-
its-magic
|
|
105
|
-
|
|
106
|
-
#
|
|
107
|
-
its-magic --
|
|
108
|
-
|
|
109
|
-
#
|
|
110
|
-
its-magic --
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
|
121
|
-
|
|
122
|
-
| `--
|
|
123
|
-
| `--mode
|
|
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
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
.cursor/
|
|
176
|
-
.cursor/
|
|
177
|
-
.cursor/
|
|
178
|
-
.cursor/
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
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
|
-
`
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
- `/
|
|
233
|
-
- `/
|
|
234
|
-
- `/
|
|
235
|
-
- `/
|
|
236
|
-
- `/
|
|
237
|
-
- `/
|
|
238
|
-
- `/verify
|
|
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
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
- `
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
- `docs/engineering/
|
|
320
|
-
|
|
321
|
-
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
- `
|
|
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
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
-
|
|
403
|
-
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
-
|
|
452
|
-
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
-
|
|
458
|
-
|
|
459
|
-
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
- Release
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
-
|
|
485
|
-
-
|
|
486
|
-
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
`
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
boundaries
|
|
525
|
-
|
|
526
|
-
- `
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
`
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
- `
|
|
675
|
-
- `
|
|
676
|
-
- `
|
|
677
|
-
- `
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
-
|
|
682
|
-
- `
|
|
683
|
-
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
- `
|
|
702
|
-
|
|
703
|
-
- `
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
- `
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
- `
|
|
730
|
-
-
|
|
731
|
-
- `
|
|
732
|
-
|
|
733
|
-
-
|
|
734
|
-
|
|
735
|
-
- `
|
|
736
|
-
|
|
737
|
-
-
|
|
738
|
-
|
|
739
|
-
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
-
|
|
755
|
-
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
- `
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
- `
|
|
777
|
-
- `
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
-
|
|
785
|
-
|
|
786
|
-
- `
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
- `
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
- `
|
|
811
|
-
- `
|
|
812
|
-
- `
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
###
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
- `
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
- `
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
`
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
###
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
-
|
|
1041
|
-
-
|
|
1042
|
-
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
- `
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
-
|
|
1068
|
-
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
- `
|
|
1081
|
-
- `
|
|
1082
|
-
- `
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
- `
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
| npm
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
-
|
|
1148
|
-
-
|
|
1149
|
-
-
|
|
1150
|
-
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
-
|
|
1156
|
-
-
|
|
1157
|
-
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
- `
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1
|
+
# its-magic — AI dev team
|
|
2
|
+
|
|
3
|
+
[GitHub Repository](https://github.com/fl0wm0ti0n/its-magic)
|
|
4
|
+
|
|
5
|
+
Happy coding! Build something awesome.
|
|
6
|
+
|
|
7
|
+
Drop-in template repo that implements a structured its-magic workflow in Cursor:
|
|
8
|
+
intake -> discovery -> architecture -> sprint plan -> execute -> QA -> release,
|
|
9
|
+
with pause/resume, decision gates, and persistent artifacts.
|
|
10
|
+
|
|
11
|
+
## Features (what its-magic can do)
|
|
12
|
+
|
|
13
|
+
- Structured phase workflow with explicit artifacts.
|
|
14
|
+
- Artifact-first memory (state in files, not chat only).
|
|
15
|
+
- Decision gate + escalation (`decisions/DEC-xxxx.md`).
|
|
16
|
+
- Pause/resume with checkpoints (`handoffs/resume_brief.md`).
|
|
17
|
+
- Automated execute/QA loop with safety caps (optional).
|
|
18
|
+
- 3-layer quality chain: AI loop → local validate-and-push → CI auto-fix.
|
|
19
|
+
- CI/CD templates driven by `docs/engineering/runbook.md`.
|
|
20
|
+
- Team-friendly local overrides (`scratchpad.local.md`).
|
|
21
|
+
- Optional remote/docker execution and autonomous installs.
|
|
22
|
+
- Built-in benchmarks (live, prompted, headless).
|
|
23
|
+
- Multiplatform distribution (npm, Chocolatey, Homebrew).
|
|
24
|
+
|
|
25
|
+
## Setup
|
|
26
|
+
|
|
27
|
+
its-magic is an installer you run once per repo. It copies the AI dev team
|
|
28
|
+
workflow files (`.cursor/` commands, rules, agents, hooks, skills, plus `docs/`,
|
|
29
|
+
`sprints/`, `handoffs/`, etc.) into your project.
|
|
30
|
+
|
|
31
|
+
Starter artifacts are shipped as clean placeholders (no preloaded sprint/demo
|
|
32
|
+
history), so `/intake` starts from your own idea.
|
|
33
|
+
|
|
34
|
+
### 1) Install its-magic (once)
|
|
35
|
+
|
|
36
|
+
Pick one method:
|
|
37
|
+
|
|
38
|
+
| Method | Install command |
|
|
39
|
+
|--------|----------------|
|
|
40
|
+
| npm | `npm install -g its-magic` |
|
|
41
|
+
| npx | `npx its-magic --target . --mode missing` |
|
|
42
|
+
| Chocolatey | `choco install its-magic` (Admin shell) |
|
|
43
|
+
| Homebrew | `brew tap USER/tap && brew install its-magic` |
|
|
44
|
+
|
|
45
|
+
### 2) Apply to a repo
|
|
46
|
+
|
|
47
|
+
New repo:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
mkdir my-project && cd my-project
|
|
51
|
+
git init
|
|
52
|
+
its-magic --target . --mode missing --create
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Existing repo (safe merge):
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
its-magic --target . --mode missing
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Existing repo (overwrite + backup):
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
its-magic --target . --mode overwrite --backup
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Upgrading an existing repo
|
|
68
|
+
|
|
69
|
+
When you update its-magic to a newer version (`npm update -g its-magic`), run
|
|
70
|
+
upgrade mode to update framework files while preserving your project data:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
its-magic --target . --mode upgrade
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
What upgrade does:
|
|
77
|
+
|
|
78
|
+
- **Framework files** (commands, rules, agents, hooks, skills, CI, scripts) are
|
|
79
|
+
updated to the latest version.
|
|
80
|
+
- **User data** (docs, sprints, handoffs, decisions, runbook) is never touched.
|
|
81
|
+
- **Mixed files** (`.cursor/scratchpad.md`, `README.md`) are preserved. If the
|
|
82
|
+
template version has new content, a review notice is printed.
|
|
83
|
+
- A canonical version marker is stored at `its_magic/.its-magic-version` in your repo.
|
|
84
|
+
- Installer bootstrap is OS-aware + stack-aware for runbook command defaults
|
|
85
|
+
(`TEST_COMMAND`, optional `LINT_COMMAND`/`TYPECHECK_COMMAND`) and preserves
|
|
86
|
+
explicit user overrides.
|
|
87
|
+
|
|
88
|
+
Upgrade with backup (backs up framework files before updating):
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
its-magic --target . --mode upgrade --backup
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 3) Open in Cursor
|
|
95
|
+
|
|
96
|
+
1. Open the project folder
|
|
97
|
+
2. Run `/intake` with your idea
|
|
98
|
+
3. Follow the workflow
|
|
99
|
+
|
|
100
|
+
### CLI quick commands
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Show banner + help
|
|
104
|
+
its-magic
|
|
105
|
+
|
|
106
|
+
# Show version only
|
|
107
|
+
its-magic --version
|
|
108
|
+
|
|
109
|
+
# Install workflow files into current repo
|
|
110
|
+
its-magic --target . --mode missing
|
|
111
|
+
|
|
112
|
+
# Clean previously installed workflow artifacts
|
|
113
|
+
its-magic --clean-repo --target .
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Installer options
|
|
117
|
+
|
|
118
|
+
**Install options**
|
|
119
|
+
|
|
120
|
+
| Flag | Description |
|
|
121
|
+
|------|-------------|
|
|
122
|
+
| `--target <path>` | Path to the repository where workflow files are installed. If omitted you are prompted interactively. |
|
|
123
|
+
| `--mode missing` | **Default.** Only copy files that do not exist yet. Safe for repos that already have some workflow files. |
|
|
124
|
+
| `--mode overwrite` | Replace every file, even if it already exists. Combine with `--backup` to keep a snapshot first. |
|
|
125
|
+
| `--mode interactive` | Ask per file whether to overwrite or skip. Useful when you want to cherry-pick updates. |
|
|
126
|
+
| `--mode upgrade` | Update framework files (commands, rules, agents, hooks, skills, CI, scripts) while preserving user data (docs, sprints, handoffs, decisions). Use after updating its-magic to a newer version. |
|
|
127
|
+
| `--backup` | Before overwriting, save existing files to `backups/<timestamp>/`. Ignored in `missing` mode (nothing gets replaced). |
|
|
128
|
+
| `--create` | Create the target directory if it does not exist. |
|
|
129
|
+
|
|
130
|
+
**Clean options**
|
|
131
|
+
|
|
132
|
+
| Flag | Description |
|
|
133
|
+
|------|-------------|
|
|
134
|
+
| `--clean-repo` | Remove installer-owned its-magic workflow artifacts from the target repo (manifest-owned paths including `.cursor`, `docs/product`, `docs/engineering`, `docs/user-guides`, `sprints`, `handoffs`, `decisions`, workflow scripts, CI files, installer metadata in `its_magic/`, and legacy `.its-magic-version`). Your own source code is never touched. |
|
|
135
|
+
| `--yes` | Skip the confirmation prompt when cleaning. |
|
|
136
|
+
|
|
137
|
+
**Info**
|
|
138
|
+
|
|
139
|
+
| Flag | Description |
|
|
140
|
+
|------|-------------|
|
|
141
|
+
| `--help`, `-h` | Show banner, version, repo URL, and full usage reference. |
|
|
142
|
+
| `--version`, `-v` | Print the installed its-magic version and exit. |
|
|
143
|
+
|
|
144
|
+
### Lifecycle QA matrix (US-0041)
|
|
145
|
+
|
|
146
|
+
`its-magic` lifecycle behavior is validated in both installer and CLI paths.
|
|
147
|
+
Primary coverage:
|
|
148
|
+
|
|
149
|
+
| Scenario | Local coverage | CI coverage | Expected evidence |
|
|
150
|
+
|---|---|---|---|
|
|
151
|
+
| Fresh install (`missing`) | `tests/run-tests.ps1`, `tests/run-tests.sh` | npm/brew/choco jobs | Required files + `its_magic/.its-magic-version` |
|
|
152
|
+
| Overwrite + backup | `tests/run-tests.ps1`, `tests/run-tests.sh` | lifecycle subset in CI jobs | Backup snapshot contains overwritten framework file |
|
|
153
|
+
| Upgrade lifecycle | `tests/run-tests.ps1`, `tests/run-tests.sh`, npm local package tests | lifecycle subset in CI jobs | Framework file restored, user-data preserved |
|
|
154
|
+
| Clean-repo safety | `tests/run-tests.ps1`, `tests/run-tests.sh`, npm local package tests | lifecycle subset in CI jobs | Framework artifacts removed, non-framework marker preserved |
|
|
155
|
+
| Negative-path invalid mode/args | `tests/run-tests.ps1`, `tests/run-tests.sh` | lifecycle subset in CI jobs | Non-zero fail-fast behavior |
|
|
156
|
+
|
|
157
|
+
Run locally:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
sh tests/run-tests.sh
|
|
161
|
+
powershell -ExecutionPolicy Bypass -File tests/run-tests.ps1
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## How-to
|
|
165
|
+
|
|
166
|
+
### Command usage pattern
|
|
167
|
+
|
|
168
|
+
- Best practice: use `/<command>` + 1-3 lines context.
|
|
169
|
+
- For quick ops (`/pause`, `/resume`, `/refresh-context`) command-only is fine.
|
|
170
|
+
|
|
171
|
+
### What gets installed
|
|
172
|
+
|
|
173
|
+
```text
|
|
174
|
+
your-project/
|
|
175
|
+
.cursor/commands/ Cursor slash commands
|
|
176
|
+
.cursor/rules/ AI behavior rules
|
|
177
|
+
.cursor/agents/ Subagent definitions
|
|
178
|
+
.cursor/skills/ Reusable skills
|
|
179
|
+
.cursor/hooks/ Automation hooks
|
|
180
|
+
.cursor/scratchpad.md Shared configuration flags
|
|
181
|
+
.cursor/scratchpad.local.example.md
|
|
182
|
+
docs/ Engineering & product docs, runbook
|
|
183
|
+
sprints/ Sprint tracking artifacts
|
|
184
|
+
handoffs/ Phase handoff artifacts
|
|
185
|
+
decisions/ Decision records
|
|
186
|
+
scripts/validate-and-push.ps1 Local test-fix-push loop (Windows)
|
|
187
|
+
scripts/validate-and-push.sh Local test-fix-push loop (Linux/Mac)
|
|
188
|
+
.github/workflows/ CI with auto-fix loop
|
|
189
|
+
README.md
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Team mode local overrides (recommended)
|
|
193
|
+
|
|
194
|
+
Use two layers:
|
|
195
|
+
|
|
196
|
+
- Shared defaults: `.cursor/scratchpad.md` (committed)
|
|
197
|
+
- Personal overrides: `.cursor/scratchpad.local.md` (gitignored)
|
|
198
|
+
|
|
199
|
+
Setup:
|
|
200
|
+
|
|
201
|
+
1. Copy `.cursor/scratchpad.local.example.md` to `.cursor/scratchpad.local.md`
|
|
202
|
+
2. Set personal values there (`TEAM_MEMBER`, `ACTIVE_TASK_IDS`, automation style)
|
|
203
|
+
3. Hook merges shared + local (local wins)
|
|
204
|
+
|
|
205
|
+
Upgrade behavior (US-0057):
|
|
206
|
+
- `.cursor/scratchpad.local.example.md` is framework-owned and refreshed on `--mode upgrade`.
|
|
207
|
+
- `.cursor/scratchpad.local.md` is user-owned and preserved on `--mode upgrade`.
|
|
208
|
+
- Installer output includes scratchpad example refresh status and local-preserved signal.
|
|
209
|
+
|
|
210
|
+
Deterministic ordering behavior (US-0058):
|
|
211
|
+
- Mutable artifacts follow `docs/engineering/artifact-ordering-policy.md`.
|
|
212
|
+
- `state.md` checkpoints are append-bottom; `backlog.md` and `acceptance.md`
|
|
213
|
+
remain sorted-canonical by story ID.
|
|
214
|
+
- Commands fail closed on ambiguous placement anchors using
|
|
215
|
+
`ARTIFACT_ORDERING_ANCHOR_AMBIGUOUS`.
|
|
216
|
+
- Commands fail closed on non-monotonic state checkpoint timestamps using
|
|
217
|
+
`STATE_TIMESTAMP_NON_MONOTONIC`.
|
|
218
|
+
|
|
219
|
+
Intake runtime safety behavior (US-0059):
|
|
220
|
+
- `/intake` requires role-specific `po` capability by default and fails fast with
|
|
221
|
+
`SUBAGENT_CAPABILITY_UNAVAILABLE` when unavailable.
|
|
222
|
+
- Silent in-band fallback is disabled by default and only allowed with explicit
|
|
223
|
+
`INTAKE_SUBAGENT_FALLBACK=allow`.
|
|
224
|
+
- Drift detection distinguishes self-write updates from external concurrent
|
|
225
|
+
writers; true conflicting external writes fail safe with
|
|
226
|
+
`INTAKE_CONCURRENT_WRITER_DETECTED`.
|
|
227
|
+
|
|
228
|
+
## Workflow
|
|
229
|
+
|
|
230
|
+
### Core commands
|
|
231
|
+
|
|
232
|
+
- `/ask`: ask questions using project context (read-only, no artifacts created).
|
|
233
|
+
- `/intake`: capture idea, backlog, acceptance.
|
|
234
|
+
- `/discovery`: collect UX/product references.
|
|
235
|
+
- `/research`: risks, patterns, dependencies.
|
|
236
|
+
- `/architecture`: technical approach and decisions.
|
|
237
|
+
- `/sprint-plan`: sprint and task list.
|
|
238
|
+
- `/plan-verify`: acceptance coverage check.
|
|
239
|
+
- `/execute`: implement tasks.
|
|
240
|
+
- `/qa`: test and report findings.
|
|
241
|
+
- `/verify-work`: UAT.
|
|
242
|
+
- `/release`: release notes + runbook updates.
|
|
243
|
+
- `/memory-audit`: read-only memory drift check with advisory report.
|
|
244
|
+
- `/pause`, `/resume`, `/refresh-context`.
|
|
245
|
+
- `/auto`: orchestration mode that spawns a fresh subagent per phase.
|
|
246
|
+
|
|
247
|
+
### Guided intake behavior (US-0033)
|
|
248
|
+
|
|
249
|
+
`/intake` supports two PO interaction modes via `.cursor/scratchpad.md`:
|
|
250
|
+
|
|
251
|
+
- `INTAKE_GUIDED_MODE=1` (default)
|
|
252
|
+
- asks targeted follow-up only when needed for concrete acceptance
|
|
253
|
+
- presents options/alternatives before recommendation
|
|
254
|
+
- preserves user decision authority
|
|
255
|
+
- runs intake-time research and persists R-xxxx evidence
|
|
256
|
+
- `INTAKE_GUIDED_MODE=0` (low-touch)
|
|
257
|
+
- skips proactive follow-up/options/research overhead unless user requests it
|
|
258
|
+
- still performs duplicate/overlap check against backlog
|
|
259
|
+
|
|
260
|
+
### Intake decomposition + risk-aware questioning (US-0051)
|
|
261
|
+
|
|
262
|
+
When guided mode is enabled, `/intake` now supports bounded decomposition for
|
|
263
|
+
broad/high-risk requests:
|
|
264
|
+
|
|
265
|
+
- runs deterministic breadth/risk heuristics (feature/workflow count,
|
|
266
|
+
cross-cutting impact, acceptance breadth, unknown dependencies)
|
|
267
|
+
- proposes bounded multi-story decomposition when heuristics indicate broad
|
|
268
|
+
scope; keeps single-story default for narrow scope
|
|
269
|
+
- enforces vertical-slice/workflow-step split quality (independently valuable,
|
|
270
|
+
testable stories; avoid technical-layer-only splits by default)
|
|
271
|
+
- preserves user control before persistence: accept, merge, or adjust split
|
|
272
|
+
- asks additional targeted questions on high-risk/high-impact intake (not
|
|
273
|
+
ambiguity-only), but keeps rounds bounded and concise
|
|
274
|
+
- keeps low-touch compatibility: no forced decomposition when
|
|
275
|
+
`INTAKE_GUIDED_MODE=0` unless explicitly requested
|
|
276
|
+
- records decomposition/questioning evidence in intake artifacts
|
|
277
|
+
(`docs/product/backlog.md`, `docs/product/acceptance.md`,
|
|
278
|
+
`handoffs/po_to_tl.md`)
|
|
279
|
+
|
|
280
|
+
### Optional ID namespace bootstrap (US-0052)
|
|
281
|
+
|
|
282
|
+
Fresh-project ID bootstrap behavior is explicit and default-off:
|
|
283
|
+
|
|
284
|
+
- `ID_NAMESPACE_BOOTSTRAP=0|1` in `.cursor/scratchpad.md` (default `0`)
|
|
285
|
+
|
|
286
|
+
When enabled (`1`), workflows use deterministic freshness checks before first ID
|
|
287
|
+
creation:
|
|
288
|
+
|
|
289
|
+
- no `US-` IDs in `docs/product/backlog.md`
|
|
290
|
+
- no `DEC-` IDs in `docs/engineering/decisions.md` / `decisions/DEC-*.md`
|
|
291
|
+
- no `R-` IDs in `docs/engineering/research.md`
|
|
292
|
+
|
|
293
|
+
If eligible, first IDs start at `US-0001`, `DEC-0001`, and `R-0001`. If not
|
|
294
|
+
eligible (or mode is off), generation continues from highest existing IDs.
|
|
295
|
+
Historical IDs are never rewritten or renumbered. Ineligible bootstrap requests
|
|
296
|
+
emit deterministic diagnostic `ID_BOOTSTRAP_NOT_FRESH`.
|
|
297
|
+
|
|
298
|
+
### Context compaction + tiered token profile (US-0053)
|
|
299
|
+
|
|
300
|
+
Token-cost behavior is controlled by `.cursor/scratchpad.md`:
|
|
301
|
+
|
|
302
|
+
- `TOKEN_PROFILE=lean|balanced|full` (default `balanced`)
|
|
303
|
+
|
|
304
|
+
Profile behavior:
|
|
305
|
+
|
|
306
|
+
- `lean`: reduce non-critical overhead defaults (automation/research/context
|
|
307
|
+
breadth) while keeping mandatory quality gates intact.
|
|
308
|
+
- `balanced`: preserve current capabilities with moderate overhead.
|
|
309
|
+
- `full`: maximize context breadth/autonomy for high-uncertainty work.
|
|
310
|
+
|
|
311
|
+
Manual override precedence:
|
|
312
|
+
|
|
313
|
+
- Explicit scratchpad flag values override profile defaults for that flag.
|
|
314
|
+
- Profile mode never disables mandatory `/qa` -> `/verify-work` -> `/release`
|
|
315
|
+
gate semantics.
|
|
316
|
+
|
|
317
|
+
Compaction behavior:
|
|
318
|
+
|
|
319
|
+
- `docs/engineering/state.md` is the active hot surface.
|
|
320
|
+
- Historical checkpoints move to append-only packs under
|
|
321
|
+
`docs/engineering/state-archive/`.
|
|
322
|
+
- `docs/engineering/decisions.md` stays a compact index with bounded summaries
|
|
323
|
+
and canonical links to `decisions/DEC-xxxx.md`.
|
|
324
|
+
- Enforced rollover thresholds:
|
|
325
|
+
- `STATE_HOT_MAX_LINES` (default `1200`)
|
|
326
|
+
- `STATE_HOT_MAX_CHECKPOINTS` (default `80`)
|
|
327
|
+
`/refresh-context` must archive oldest checkpoints into deterministic
|
|
328
|
+
`state-pack-*` files when thresholds are exceeded, keeping only bounded recent
|
|
329
|
+
checkpoints in hot surface.
|
|
330
|
+
Archive verification mismatch fails with
|
|
331
|
+
`STATE_ARCHIVE_VERIFICATION_FAILED`.
|
|
332
|
+
|
|
333
|
+
### Cross-phase artifact ownership guard (US-0061)
|
|
334
|
+
|
|
335
|
+
To prevent accidental history loss across workflow phases:
|
|
336
|
+
|
|
337
|
+
- canonical ownership policy: `docs/engineering/artifact-ownership-policy.md`
|
|
338
|
+
- non-authorized phases must not delete or rewrite other-phase owned sections
|
|
339
|
+
- `docs/engineering/architecture.md` is history-preserving (append or
|
|
340
|
+
target-section-only mutation)
|
|
341
|
+
- deterministic fail-safe diagnostics:
|
|
342
|
+
`PHASE_OWNERSHIP_VIOLATION`,
|
|
343
|
+
`PHASE_OVERRIDE_EVIDENCE_MISSING`,
|
|
344
|
+
`ARCH_HISTORY_DELETION_DETECTED`
|
|
345
|
+
|
|
346
|
+
`/ask` policy (read-only):
|
|
347
|
+
|
|
348
|
+
- question-scoped retrieval first
|
|
349
|
+
- targeted sections before broad file reads
|
|
350
|
+
- bounded expansion only when unresolved
|
|
351
|
+
- explicit "not found in artifacts" when still unresolved
|
|
352
|
+
|
|
353
|
+
### Configurable multi-target publish + confirmation gate (US-0054)
|
|
354
|
+
|
|
355
|
+
Post-release publish behavior is configurable per repository:
|
|
356
|
+
|
|
357
|
+
- `RELEASE_PUBLISH_MODE=disabled|confirm|auto` (default `confirm`)
|
|
358
|
+
- `RELEASE_TARGETS_FILE=docs/engineering/release-targets.json`
|
|
359
|
+
- `RELEASE_TARGETS_DEFAULT=` optional comma-separated default targets
|
|
360
|
+
|
|
361
|
+
Supported target types include:
|
|
362
|
+
|
|
363
|
+
- `npm`, `choco`, `brew`, `git`, `docker`, `cloud`
|
|
364
|
+
- `custom` (generic command target)
|
|
365
|
+
- `ssh` (generic server deployment over SSH)
|
|
366
|
+
- Connectivity metadata for remote/local operator context:
|
|
367
|
+
- `runtime.mode` (`local|remote`)
|
|
368
|
+
- endpoint fields (`domainEnv|ipEnv|hostEnv`, `port`, `protocol`)
|
|
369
|
+
- optional Traefik/ingress metadata
|
|
370
|
+
- optional `dockerOverSsh` contract for remote Docker execution over SSH
|
|
371
|
+
|
|
372
|
+
Safety defaults:
|
|
373
|
+
|
|
374
|
+
- Mandatory `/release` gates are unchanged and must pass first.
|
|
375
|
+
- `confirm` mode enforces explicit operator approval before publish execution.
|
|
376
|
+
- Sensitive values are env-referenced (for example `tokenEnv`, `authEnv`), not
|
|
377
|
+
inline literals.
|
|
378
|
+
- Remote connectivity config errors fail fast with
|
|
379
|
+
`REMOTE_CONNECTIVITY_CONFIG_INVALID`.
|
|
380
|
+
- Release/QA outputs use canonical operator connectivity doc:
|
|
381
|
+
`docs/engineering/runtime-connectivity.md`.
|
|
382
|
+
|
|
383
|
+
### Deterministic status reconciliation command (US-0055)
|
|
384
|
+
|
|
385
|
+
Use `/status-reconcile` to normalize status drift between canonical and derived
|
|
386
|
+
workflow artifacts before continuation:
|
|
387
|
+
|
|
388
|
+
- canonical source: `docs/product/backlog.md` story status
|
|
389
|
+
- derived targets: `docs/product/acceptance.md`, `docs/engineering/state.md`,
|
|
390
|
+
`handoffs/resume_brief.md`
|
|
391
|
+
- deterministic outcomes: apply/no-op/fail-safe reason codes with audit evidence
|
|
392
|
+
in `docs/engineering/status-normalization-report.md`
|
|
393
|
+
|
|
394
|
+
This command is the bounded repair counterpart to `/memory-audit`
|
|
395
|
+
(read-only detection).
|
|
396
|
+
|
|
397
|
+
### Optional cross-repo observability (US-0034)
|
|
398
|
+
|
|
399
|
+
Use optional compatibility visibility with default-safe off behavior:
|
|
400
|
+
|
|
401
|
+
- `CROSS_REPO_OBSERVABILITY=0|1` (default `0`)
|
|
402
|
+
- `COMPATIBILITY_GATE_ON_CRITICAL=0|1` (default `1`)
|
|
403
|
+
- `COMPATIBILITY_SOURCES=` monitored `repo/module/contract/docs` declarations
|
|
404
|
+
|
|
405
|
+
When disabled (`0`), workflow adds zero required compatibility overhead.
|
|
406
|
+
|
|
407
|
+
When enabled (`1`), compatibility signals/findings are tracked in:
|
|
408
|
+
|
|
409
|
+
- `docs/engineering/compatibility-signals.md`
|
|
410
|
+
- `docs/engineering/compatibility-report.md`
|
|
411
|
+
- `docs/engineering/manifests/registry.manifest.yaml`
|
|
412
|
+
- `docs/engineering/manifests/repo.manifest.yaml`
|
|
413
|
+
|
|
414
|
+
If unresolved critical findings remain and
|
|
415
|
+
`COMPATIBILITY_GATE_ON_CRITICAL=1`, release progression must stop for a
|
|
416
|
+
decision gate (`COMPATIBILITY_CRITICAL_OPEN`).
|
|
417
|
+
|
|
418
|
+
### Optional component-scoped execution (US-0035)
|
|
419
|
+
|
|
420
|
+
Enable scoped workflow behavior with:
|
|
421
|
+
|
|
422
|
+
- `COMPONENT_SCOPE_MODE=0|1` (default `0`)
|
|
423
|
+
- `TARGET_COMPONENTS=<comma-separated-component-ids>`
|
|
424
|
+
|
|
425
|
+
When disabled (`0`), workflow adds zero required scope overhead.
|
|
426
|
+
|
|
427
|
+
When enabled (`1`):
|
|
428
|
+
|
|
429
|
+
- Scope declaration is tracked in `docs/engineering/component-scope.md`.
|
|
430
|
+
- Sprint tasks should declare target components and expected impacted interfaces.
|
|
431
|
+
- QA records unaffected-component protection checks in
|
|
432
|
+
`docs/engineering/component-scope-report.md`.
|
|
433
|
+
- Unapproved out-of-scope impact must block release via decision gate
|
|
434
|
+
(`COMPONENT_SCOPE_VIOLATION_UNAPPROVED`).
|
|
435
|
+
|
|
436
|
+
### Optional spec-pack documentation (US-0031)
|
|
437
|
+
|
|
438
|
+
Optional Design Concept, CRS, and Technical Specification artifacts are
|
|
439
|
+
controlled by:
|
|
440
|
+
|
|
441
|
+
- `SPEC_PACK_MODE=0|1` (default `0`)
|
|
442
|
+
|
|
443
|
+
When disabled (`0`), intake/architecture/execute/qa/release add no required
|
|
444
|
+
spec-pack steps (zero overhead).
|
|
445
|
+
|
|
446
|
+
When enabled (`1`):
|
|
447
|
+
|
|
448
|
+
- Canonical paths per story: `docs/engineering/spec-pack/<story_id>-design-concept.md`,
|
|
449
|
+
`docs/engineering/spec-pack/<story_id>-crs.md`,
|
|
450
|
+
`docs/engineering/spec-pack/<story_id>-technical-specification.md`.
|
|
451
|
+
- Minimum required sections and ownership are in `docs/engineering/runbook.md`.
|
|
452
|
+
- Release gate validates completeness and blocks with `SPEC_PACK_INCOMPLETE` when
|
|
453
|
+
required sections are missing.
|
|
454
|
+
|
|
455
|
+
### Optional user-guide documentation (US-0032)
|
|
456
|
+
|
|
457
|
+
Optional per-feature user guides (end-user how-to docs) are controlled by:
|
|
458
|
+
|
|
459
|
+
- `USER_GUIDE_MODE=0|1` (default `0`)
|
|
460
|
+
|
|
461
|
+
When disabled (`0`), intake/architecture/sprint-plan/execute/qa/release add no
|
|
462
|
+
required user-guide steps or blocking checks (zero overhead).
|
|
463
|
+
|
|
464
|
+
When enabled (`1`):
|
|
465
|
+
|
|
466
|
+
- Canonical path per feature story: `docs/user-guides/US-xxxx.md`.
|
|
467
|
+
- Minimum required sections: Purpose, Prerequisites, Usage steps, Example,
|
|
468
|
+
Limitations, Troubleshooting (see `docs/engineering/runbook.md` and
|
|
469
|
+
`docs/user-guides/README.md`).
|
|
470
|
+
- Release gate validates guide completeness and blocks with `USER_GUIDE_INCOMPLETE`
|
|
471
|
+
when enabled and required sections are missing.
|
|
472
|
+
- User guides are end-user only; they do not duplicate spec-pack (US-0031) content.
|
|
473
|
+
|
|
474
|
+
### Release notes model (US-0040)
|
|
475
|
+
|
|
476
|
+
Release history is sprint-scoped and queue-backed:
|
|
477
|
+
|
|
478
|
+
- Canonical sprint notes: `handoffs/releases/Sxxxx-release-notes.md`
|
|
479
|
+
- Canonical queue tracker: `handoffs/release_queue.md`
|
|
480
|
+
- Legacy compatibility pointer: `handoffs/release_notes.md`
|
|
481
|
+
|
|
482
|
+
Deterministic release semantics:
|
|
483
|
+
- Only target sprint artifacts/queue row may be mutated during one `/release` run.
|
|
484
|
+
- Entering release flow sets target row to `unreleased`.
|
|
485
|
+
- Successful finalization transitions same row to `released`.
|
|
486
|
+
- Unresolved sprint identity or queue/notes mismatch fails closed with reason
|
|
487
|
+
codes and remediation guidance; no destructive reconciliation by default.
|
|
488
|
+
|
|
489
|
+
### Post-QA release issue workflow (US-0042)
|
|
490
|
+
|
|
491
|
+
Release gate chain (US-0039): `/release` enforces mandatory gates in order — check-in test, QA completion, UAT completion — then finalization. Blank optional runbook keys (`LINT_COMMAND`, `TYPECHECK_COMMAND`) do not block release; they are reported as skipped.
|
|
492
|
+
|
|
493
|
+
If a problem appears **after QA** (during `/release`), record it separately from
|
|
494
|
+
QA findings:
|
|
495
|
+
|
|
496
|
+
- Release findings artifact: `sprints/Sxxxx/release-findings.md`
|
|
497
|
+
- Release-to-dev handoff: `handoffs/release_to_dev.md`
|
|
498
|
+
|
|
499
|
+
Boundary:
|
|
500
|
+
- QA-phase issues -> `sprints/Sxxxx/qa-findings.md`
|
|
501
|
+
- Post-QA release-gate issues -> `sprints/Sxxxx/release-findings.md`
|
|
502
|
+
|
|
503
|
+
Each blocked release finding should include reason code, evidence refs,
|
|
504
|
+
remediation, and rerun criteria.
|
|
505
|
+
|
|
506
|
+
### Backlog reconciliation invariant (US-0043)
|
|
507
|
+
|
|
508
|
+
Release completion must not leave stale backlog status for target sprint stories.
|
|
509
|
+
At release finalization:
|
|
510
|
+
|
|
511
|
+
- reconcile target story status to `DONE` using canonical release evidence;
|
|
512
|
+
- reconcile target story acceptance checkboxes to checked state;
|
|
513
|
+
- mutate only target sprint stories (never unrelated backlog entries);
|
|
514
|
+
- fail safe with `BACKLOG_STATUS_DRIFT` if contradiction remains (e.g. released
|
|
515
|
+
sprint but backlog still `OPEN`/unchecked).
|
|
516
|
+
|
|
517
|
+
### Canonical story status + normalization guard (US-0045)
|
|
518
|
+
|
|
519
|
+
- `docs/product/backlog.md` is canonical for story `OPEN|DONE` status.
|
|
520
|
+
- `docs/product/acceptance.md` and `docs/engineering/state.md` are derived views
|
|
521
|
+
reconciled from canonical backlog status plus release evidence.
|
|
522
|
+
- One-time normalization baseline is recorded in
|
|
523
|
+
`docs/engineering/status-normalization-report.md`.
|
|
524
|
+
- Contradictory resolution at release/reconciliation boundaries fails safe with:
|
|
525
|
+
- `BACKLOG_STATUS_DRIFT`
|
|
526
|
+
- `CANONICAL_STATUS_CONFLICT`
|
|
527
|
+
|
|
528
|
+
### Agent isolation model
|
|
529
|
+
|
|
530
|
+
- Every phase command runs in a fresh agent/subagent context.
|
|
531
|
+
- Handoff files are the only cross-phase memory (`handoffs/*.md` + artifact
|
|
532
|
+
files).
|
|
533
|
+
- Never rely on "ignore prior chat"; use a new context boundary instead.
|
|
534
|
+
- `/auto` is orchestration only: it calls phase subagents and transfers context
|
|
535
|
+
through artifacts.
|
|
536
|
+
|
|
537
|
+
#### Per-phase isolation evidence (US-0048 / DEC-0029)
|
|
538
|
+
|
|
539
|
+
Isolation is enforced with auditable evidence written to `docs/engineering/state.md`.
|
|
540
|
+
Each phase run appends:
|
|
541
|
+
|
|
542
|
+
- `phase_id`, `role`, `fresh_context_marker`, `timestamp`, `evidence_ref`
|
|
543
|
+
|
|
544
|
+
Missing/invalid/stale evidence fails closed with reason codes:
|
|
545
|
+
`PHASE_CONTEXT_ISOLATION_MISSING`, `PHASE_CONTEXT_ISOLATION_VIOLATION`,
|
|
546
|
+
`ISOLATION_EVIDENCE_STALE`, `ISOLATION_EVIDENCE_INVALID`.
|
|
547
|
+
|
|
548
|
+
#### Strict runtime proof (US-0056 / DEC-0038)
|
|
549
|
+
|
|
550
|
+
Per-phase isolation also requires strict runtime attestation tuples at
|
|
551
|
+
boundaries (not artifact fields alone):
|
|
552
|
+
|
|
553
|
+
- `orchestrator_run_id`, `runtime_proof_id`, `phase_id`, `role`
|
|
554
|
+
- `proof_issued_at`, `proof_ttl_seconds`, `proof_hash`
|
|
555
|
+
|
|
556
|
+
Fail-closed reason codes:
|
|
557
|
+
`RUNTIME_PROOF_MISSING`, `RUNTIME_PROOF_INVALID`, `RUNTIME_PROOF_REUSED`,
|
|
558
|
+
`RUNTIME_PROOF_STALE`, `RUNTIME_PROOF_AMBIGUOUS_LINK`.
|
|
559
|
+
|
|
560
|
+
`/auto`, `/verify-work`, and `/release` must validate these tuples before
|
|
561
|
+
continuation/finalization.
|
|
562
|
+
|
|
563
|
+
### Lightweight interaction
|
|
564
|
+
|
|
565
|
+
Use `/ask` when you want to query the project without triggering the workflow:
|
|
566
|
+
|
|
567
|
+
- "What's the current sprint status?"
|
|
568
|
+
- "Which stories are still open?"
|
|
569
|
+
- "How does the upgrade mode work?"
|
|
570
|
+
- "What decision was made about X?"
|
|
571
|
+
|
|
572
|
+
`/ask` reads the project artifacts (state, backlog, architecture, decisions, sprint
|
|
573
|
+
progress) and answers from them. It never creates or modifies files. If your question
|
|
574
|
+
reveals a bug or feature idea, it will suggest running `/intake`.
|
|
575
|
+
|
|
576
|
+
### Memory drift auditing
|
|
577
|
+
|
|
578
|
+
Use `/memory-audit` to check whether project memory artifacts still match
|
|
579
|
+
repository reality. This is a read-only, non-blocking command that produces an
|
|
580
|
+
advisory report at `docs/engineering/memory-drift-report.md`.
|
|
581
|
+
|
|
582
|
+
**When to run:**
|
|
583
|
+
|
|
584
|
+
- **Pre-handoff**: before writing any role handoff artifact.
|
|
585
|
+
- **Pre-QA**: before `/qa` or `/verify-work`.
|
|
586
|
+
- **Pre-release**: before `/release`.
|
|
587
|
+
- **Ad-hoc**: after external code changes, long pauses, or whenever artifacts
|
|
588
|
+
feel stale.
|
|
589
|
+
|
|
590
|
+
**How to interpret output:**
|
|
591
|
+
|
|
592
|
+
The report contains a severity summary (`high` / `medium` / `low`) and a
|
|
593
|
+
findings table with concrete evidence for each inconsistency. High-severity
|
|
594
|
+
findings should be resolved before the next handoff or release. Medium and low
|
|
595
|
+
findings can be addressed during `/refresh-context` or the next sprint.
|
|
596
|
+
|
|
597
|
+
The report also includes a reference-only "Template drift" section. Template
|
|
598
|
+
drift remediation belongs to US-0017 — `/memory-audit` only flags it for
|
|
599
|
+
awareness.
|
|
600
|
+
|
|
601
|
+
**Follow-up commands:**
|
|
602
|
+
|
|
603
|
+
- `/refresh-context` — update stale artifacts.
|
|
604
|
+
- `/sprint-plan` — if new work is discovered.
|
|
605
|
+
- `/verify-work` — if acceptance status needs re-validation.
|
|
606
|
+
- `/intake` — if findings reveal a new story or bug.
|
|
607
|
+
|
|
608
|
+
### Workflow diagrams
|
|
609
|
+
|
|
610
|
+
```mermaid
|
|
611
|
+
flowchart TD
|
|
612
|
+
Intake[/intake/] --> Discovery[/discovery/]
|
|
613
|
+
Discovery --> Research[/research/]
|
|
614
|
+
Research --> Architecture[/architecture/]
|
|
615
|
+
Architecture --> SprintPlan[/sprint-plan/]
|
|
616
|
+
SprintPlan --> PlanVerify[/plan-verify/]
|
|
617
|
+
PlanVerify --> Execute[/execute/]
|
|
618
|
+
Execute --> QA[/qa/]
|
|
619
|
+
QA -->|fixes needed| Execute
|
|
620
|
+
QA --> VerifyWork[/verify-work/]
|
|
621
|
+
VerifyWork --> Release[/release/]
|
|
622
|
+
Release --> Refresh[/refresh-context/]
|
|
623
|
+
Execute --> Pause[/pause/]
|
|
624
|
+
QA --> Pause
|
|
625
|
+
Release --> Pause
|
|
626
|
+
Pause --> Resume[/resume/]
|
|
627
|
+
Resume --> Execute
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
```mermaid
|
|
631
|
+
flowchart TD
|
|
632
|
+
Start[Idea] --> Intake2[/intake/]
|
|
633
|
+
Intake2 -->|DecisionGate| Decision{DecisionRequired}
|
|
634
|
+
Decision -->|ChooseOption| Discovery2[/discovery/]
|
|
635
|
+
Decision -->|ChooseOption| Research2[/research/]
|
|
636
|
+
Decision -->|ChooseOption| Architecture2[/architecture/]
|
|
637
|
+
Decision -->|ChooseOption| SprintPlan2[/sprint-plan/]
|
|
638
|
+
Decision -->|ChooseOption| PlanVerify2[/plan-verify/]
|
|
639
|
+
Decision -->|ChooseOption| Execute2[/execute/]
|
|
640
|
+
Decision -->|ChooseOption| QA2[/qa/]
|
|
641
|
+
Decision -->|ChooseOption| VerifyWork2[/verify-work/]
|
|
642
|
+
Decision -->|ChooseOption| Release2[/release/]
|
|
643
|
+
Decision -->|ChooseOption| Refresh2[/refresh-context/]
|
|
644
|
+
Decision -->|ChooseOption| Pause2[/pause/]
|
|
645
|
+
Discovery2 --> Research2
|
|
646
|
+
Research2 --> Architecture2
|
|
647
|
+
Architecture2 --> SprintPlan2
|
|
648
|
+
SprintPlan2 --> PlanVerify2
|
|
649
|
+
PlanVerify2 --> Execute2
|
|
650
|
+
Execute2 --> QA2
|
|
651
|
+
QA2 -->|fixes needed| Execute2
|
|
652
|
+
QA2 --> VerifyWork2
|
|
653
|
+
VerifyWork2 --> Release2
|
|
654
|
+
Release2 --> Refresh2
|
|
655
|
+
Execute2 --> Pause2
|
|
656
|
+
QA2 --> Pause2
|
|
657
|
+
Release2 --> Pause2
|
|
658
|
+
Pause2 --> Resume2[/resume/]
|
|
659
|
+
Resume2 --> Execute2
|
|
660
|
+
Execute2 --> HandoffDevQA[handoffs/dev_to_qa.md]
|
|
661
|
+
QA2 --> HandoffQAD[handoffs/qa_to_dev.md]
|
|
662
|
+
Intake2 --> HandoffPOTL[handoffs/po_to_tl.md]
|
|
663
|
+
SprintPlan2 --> HandoffTLDev[handoffs/tl_to_dev.md]
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
### Automation modes
|
|
667
|
+
|
|
668
|
+
Configure in `.cursor/scratchpad.md`:
|
|
669
|
+
|
|
670
|
+
- `AUTO_FLOW_MODE=manual|auto_until_decision`
|
|
671
|
+
- `manual`: you trigger each phase/command yourself.
|
|
672
|
+
- `auto_until_decision`: `/auto` continues by spawning fresh phase subagents until a decision gate, blocker, or pause boundary.
|
|
673
|
+
- `PHASE_MODE=interactive|auto`
|
|
674
|
+
- `interactive`: agent asks clarifying questions more often.
|
|
675
|
+
- `auto`: agent minimizes prompts and proceeds with best effort.
|
|
676
|
+
- `PERMISSION_MODE=interactive|auto`
|
|
677
|
+
- `interactive`: ask before routine actions.
|
|
678
|
+
- `auto`: reduce routine permission prompts.
|
|
679
|
+
- `RUN_TESTS_ON_EDIT=0|1`
|
|
680
|
+
- `1`: runs configured tests after meaningful edits.
|
|
681
|
+
- `0`: tests only when you explicitly run QA/test phases.
|
|
682
|
+
- `LOOP_UNTIL_GREEN=0|1`
|
|
683
|
+
- `1`: keep iterating fix -> test until green (bounded).
|
|
684
|
+
- `0`: run one pass and report failures.
|
|
685
|
+
- `AUTO_IMPLEMENTATION_LOOP=0|1`
|
|
686
|
+
- `1`: enables execute -> QA -> execute loop automatically with new Dev/QA subagent instances on each cycle.
|
|
687
|
+
- `AUTO_LOOP_MAX_CYCLES=<n>`
|
|
688
|
+
- safety cap for auto loops (recommended `3-7`, default `5`).
|
|
689
|
+
- `AUTO_PAUSE_REQUEST=0|1`
|
|
690
|
+
- `1`: request graceful stop at next safe boundary.
|
|
691
|
+
- `AUTO_PAUSE_POLICY=after_task|after_phase`
|
|
692
|
+
- `after_task`: faster stop, more frequent boundaries.
|
|
693
|
+
- `after_phase`: cleaner checkpoints, fewer interruptions.
|
|
694
|
+
|
|
695
|
+
### Sync policy (US-0038)
|
|
696
|
+
|
|
697
|
+
Phase-triggered sync is policy-controlled and safe by default.
|
|
698
|
+
|
|
699
|
+
Scratchpad controls:
|
|
700
|
+
|
|
701
|
+
- `SYNC_POLICY_MODE=disabled|manual|by_phase|by_milestone|custom_phase_list`
|
|
702
|
+
- `SYNC_CUSTOM_PHASES=<comma-separated canonical phases>`
|
|
703
|
+
- `ALLOW_AUTO_PUSH=0|1`
|
|
704
|
+
- `AUTO_PUSH_BRANCH_ALLOWLIST=<comma-separated branches/patterns>`
|
|
705
|
+
|
|
706
|
+
Default-safe behavior:
|
|
707
|
+
|
|
708
|
+
- Default mode is `manual` with `ALLOW_AUTO_PUSH=0` (no automatic push).
|
|
709
|
+
- `disabled` and `manual` add near-zero overhead and preserve manual workflows.
|
|
710
|
+
- Sync policy is evaluated only at completed phase boundaries.
|
|
711
|
+
|
|
712
|
+
Guarded auto-push conditions (all must pass):
|
|
713
|
+
|
|
714
|
+
1. Boundary matches configured mode.
|
|
715
|
+
2. Auto-push is explicitly enabled (`ALLOW_AUTO_PUSH=1`).
|
|
716
|
+
3. QA-first safety holds (feature work cannot auto-push pre-QA).
|
|
717
|
+
4. No unresolved blocking QA findings/critical issues.
|
|
718
|
+
5. Branch safety holds (protected/default branches denied unless allowlisted).
|
|
719
|
+
6. Check chain passes (`TEST_COMMAND` required; optional lint/typecheck only if configured).
|
|
720
|
+
|
|
721
|
+
Deterministic reason codes include:
|
|
722
|
+
`SYNC_DISABLED`, `MANUAL_MODE_NO_AUTO`, `PRE_QA_AUTOPUSH_FORBIDDEN`,
|
|
723
|
+
`BLOCKING_QA_FINDINGS`, `BRANCH_NOT_ALLOWLISTED`, `TEST_COMMAND_MISSING`,
|
|
724
|
+
`TEST_FAILED`, `TEST_TIMEOUT`, `OPTIONAL_CHECK_FAILED`, `SYNC_PUSHED`.
|
|
725
|
+
|
|
726
|
+
### Full scratchpad reference (detailed)
|
|
727
|
+
|
|
728
|
+
- `MAGIC_CONTEXT_STRICT=0|1`
|
|
729
|
+
- `1`: enforces context refresh discipline after code edits.
|
|
730
|
+
- `DONE=0|1`
|
|
731
|
+
- `1`: stop hook reminder loops when session is complete.
|
|
732
|
+
- `MAGIC_BENCH_SESSION=<id>`
|
|
733
|
+
- enables live benchmark event logging under one session id.
|
|
734
|
+
- `AUTO_INSTALL_DEPS=0|1`
|
|
735
|
+
- `1`: agent may install dependencies/runtimes automatically.
|
|
736
|
+
- `AUTO_RELEASE_NOTES=0|1`
|
|
737
|
+
- `1`: auto-generate `handoffs/release_notes.md`.
|
|
738
|
+
- `REMOTE_EXECUTION=0|1`
|
|
739
|
+
- `1`: allow remote/docker execution if configured.
|
|
740
|
+
- `REMOTE_CONFIG=.cursor/remote.json`
|
|
741
|
+
- path to remote execution server config.
|
|
742
|
+
|
|
743
|
+
### Remote execution config (`.cursor/remote.json`)
|
|
744
|
+
|
|
745
|
+
Remote config is optional and mode-aware:
|
|
746
|
+
|
|
747
|
+
- `REMOTE_EXECUTION=0` (default): skip remote config checks entirely.
|
|
748
|
+
- `REMOTE_EXECUTION=1`: validate `.cursor/remote.json` first and fail fast on
|
|
749
|
+
missing/malformed/invalid or insecure config.
|
|
750
|
+
|
|
751
|
+
Canonical contract (DEC-0016):
|
|
752
|
+
|
|
753
|
+
- Required root fields:
|
|
754
|
+
- `version` (integer)
|
|
755
|
+
- `defaultTarget` (string)
|
|
756
|
+
- `targets` (array)
|
|
757
|
+
- Required target fields:
|
|
758
|
+
- `id` (string)
|
|
759
|
+
- `type` (`docker|ssh|vm`)
|
|
760
|
+
- `enabled` (boolean)
|
|
761
|
+
- `host` (string)
|
|
762
|
+
- `port` (integer `1..65535`)
|
|
763
|
+
- `workspaceRoot` (string)
|
|
764
|
+
- Optional:
|
|
765
|
+
- `auth.mode` (`none|env`)
|
|
766
|
+
- If `auth.mode=env`, use env-var references only (`tokenEnv`,
|
|
767
|
+
`passwordEnv`, `privateKeyPathEnv`, ...).
|
|
768
|
+
|
|
769
|
+
Two safe target examples are shipped in:
|
|
770
|
+
|
|
771
|
+
- `.cursor/remote.json` (active repo)
|
|
772
|
+
- `template/.cursor/remote.json` (template parity copy)
|
|
773
|
+
|
|
774
|
+
The examples include:
|
|
775
|
+
|
|
776
|
+
- `local-docker`: local network/docker-like endpoint.
|
|
777
|
+
- `remote-vm-ssh`: remote VM/SSH-like endpoint.
|
|
778
|
+
|
|
779
|
+
No secrets policy:
|
|
780
|
+
|
|
781
|
+
- Never commit inline tokens/passwords/private keys in `remote.json`.
|
|
782
|
+
- Commit env-var reference names only.
|
|
783
|
+
|
|
784
|
+
Fail-fast error format:
|
|
785
|
+
|
|
786
|
+
- `[REMOTE_CONFIG_ERROR] <path>: expected <rule>, got <actual>. Fix: <hint>.`
|
|
787
|
+
|
|
788
|
+
Troubleshooting quick guide:
|
|
789
|
+
|
|
790
|
+
- Missing file in remote mode:
|
|
791
|
+
- Create `.cursor/remote.json` from the template copy, or set
|
|
792
|
+
`REMOTE_EXECUTION=0`.
|
|
793
|
+
- Invalid enum/type/range:
|
|
794
|
+
- Update the failing field to match allowed values/ranges.
|
|
795
|
+
- Malformed JSON:
|
|
796
|
+
- Fix JSON syntax and retry.
|
|
797
|
+
- Secret-like inline value detected:
|
|
798
|
+
- Replace literal secret with an env-var reference field.
|
|
799
|
+
|
|
800
|
+
Team/local (recommended in `.cursor/scratchpad.local.md`):
|
|
801
|
+
|
|
802
|
+
- `TEAM_MODE=0|1`
|
|
803
|
+
- `TEAM_MEMBER=<your-id>`
|
|
804
|
+
- `ACTIVE_TASK_IDS=T-12,T-13`
|
|
805
|
+
|
|
806
|
+
### Automated feature loop (optional)
|
|
807
|
+
|
|
808
|
+
Enable:
|
|
809
|
+
|
|
810
|
+
- `AUTO_FLOW_MODE=auto_until_decision`
|
|
811
|
+
- `PHASE_MODE=auto`
|
|
812
|
+
- `PERMISSION_MODE=auto`
|
|
813
|
+
- `RUN_TESTS_ON_EDIT=1`
|
|
814
|
+
- `LOOP_UNTIL_GREEN=1`
|
|
815
|
+
- `AUTO_IMPLEMENTATION_LOOP=1`
|
|
816
|
+
- `AUTO_LOOP_MAX_CYCLES=5`
|
|
817
|
+
|
|
818
|
+
Then run `/auto`.
|
|
819
|
+
|
|
820
|
+
Graceful stop (for shutdown/end of day):
|
|
821
|
+
|
|
822
|
+
1. Set `AUTO_PAUSE_REQUEST=1`
|
|
823
|
+
2. Flow stops at next configured boundary (`AUTO_PAUSE_POLICY`)
|
|
824
|
+
3. `/pause` artifacts are written
|
|
825
|
+
4. Next day run `/resume` or `/auto`
|
|
826
|
+
|
|
827
|
+
### Recommended profiles
|
|
828
|
+
|
|
829
|
+
**Max automation (high autonomy):**
|
|
830
|
+
|
|
831
|
+
- `AUTO_FLOW_MODE=auto_until_decision`
|
|
832
|
+
- `PHASE_MODE=auto`
|
|
833
|
+
- `PERMISSION_MODE=auto`
|
|
834
|
+
- `RUN_TESTS_ON_EDIT=1`
|
|
835
|
+
- `LOOP_UNTIL_GREEN=1`
|
|
836
|
+
- `AUTO_IMPLEMENTATION_LOOP=1`
|
|
837
|
+
- `AUTO_LOOP_MAX_CYCLES=5`
|
|
838
|
+
- `AUTO_INSTALL_DEPS=1` (optional, if you trust auto installs)
|
|
839
|
+
- `AUTO_PAUSE_POLICY=after_phase`
|
|
840
|
+
|
|
841
|
+
**Safer automation (recommended for most teams):**
|
|
842
|
+
|
|
843
|
+
- same as above, but keep:
|
|
844
|
+
- `PERMISSION_MODE=interactive`
|
|
845
|
+
- `AUTO_INSTALL_DEPS=0`
|
|
846
|
+
- `AUTO_PAUSE_POLICY=after_task`
|
|
847
|
+
|
|
848
|
+
### Quality chain (3-layer auto-fix)
|
|
849
|
+
|
|
850
|
+
its-magic provides a complete quality chain that catches issues at three levels.
|
|
851
|
+
Each layer catches problems the previous layer missed:
|
|
852
|
+
|
|
853
|
+
```text
|
|
854
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
855
|
+
│ Layer 1: Cursor AI loop (in-editor) OFF by default │
|
|
856
|
+
│ AUTO_IMPLEMENTATION_LOOP + LOOP_UNTIL_GREEN │
|
|
857
|
+
│ execute → QA → fix → execute (bounded by AUTO_LOOP_MAX_CYCLES)│
|
|
858
|
+
└──────────────────────────┬──────────────────────────────────────┘
|
|
859
|
+
│ code ready to push
|
|
860
|
+
┌──────────────────────────▼──────────────────────────────────────┐
|
|
861
|
+
│ Layer 2: validate-and-push (local pre-push) MANUAL (run it)│
|
|
862
|
+
│ scripts/validate-and-push.sh / .ps1 │
|
|
863
|
+
│ test → format → lint-fix → test → commit + push │
|
|
864
|
+
└──────────────────────────┬──────────────────────────────────────┘
|
|
865
|
+
│ pushed to GitHub
|
|
866
|
+
┌──────────────────────────▼──────────────────────────────────────┐
|
|
867
|
+
│ Layer 3: CI auto-fix (GitHub Actions) OFF by default │
|
|
868
|
+
│ .github/workflows/ci.yml │
|
|
869
|
+
│ test/lint → auto-fix → commit → re-run (up to 3 retries) │
|
|
870
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
871
|
+
```
|
|
872
|
+
|
|
873
|
+
| Layer | Default | Enable |
|
|
874
|
+
|-------|---------|--------|
|
|
875
|
+
| 1 - Cursor AI loop | off | Set `AUTO_IMPLEMENTATION_LOOP=1` + `LOOP_UNTIL_GREEN=1` in scratchpad |
|
|
876
|
+
| 2 - validate-and-push | manual | Run `scripts/validate-and-push.sh` or `.ps1` before pushing |
|
|
877
|
+
| 3 - CI auto-fix | off | Set `CI_AUTO_FIX: true` in `docs/engineering/runbook.md` |
|
|
878
|
+
|
|
879
|
+
CI itself (tests, lint, typecheck) always runs on push/PR. Only the **auto-fix
|
|
880
|
+
retry loop** is gated behind `CI_AUTO_FIX`. When disabled, CI still reports
|
|
881
|
+
failures -- it just won't try to fix and commit automatically.
|
|
882
|
+
|
|
883
|
+
All commands are read from `docs/engineering/runbook.md`. Fill in your
|
|
884
|
+
project-specific commands once and every layer uses them:
|
|
885
|
+
|
|
886
|
+
```text
|
|
887
|
+
TEST_COMMAND: npm test
|
|
888
|
+
LINT_COMMAND: npx eslint .
|
|
889
|
+
LINT_FIX_COMMAND: npx eslint --fix .
|
|
890
|
+
FORMAT_COMMAND: npx prettier --write .
|
|
891
|
+
CI_AUTO_FIX: true
|
|
892
|
+
```
|
|
893
|
+
|
|
894
|
+
#### Layer 1: Cursor AI loop
|
|
895
|
+
|
|
896
|
+
Enabled via scratchpad flags (see [Automation modes](#automation-modes)).
|
|
897
|
+
The AI runs execute → QA → fix cycles inside Cursor until tests pass or
|
|
898
|
+
the safety cap (`AUTO_LOOP_MAX_CYCLES`) is reached.
|
|
899
|
+
|
|
900
|
+
#### Layer 2: Local validate-and-push
|
|
901
|
+
|
|
902
|
+
Run before pushing to catch anything the AI loop missed:
|
|
903
|
+
|
|
904
|
+
```bash
|
|
905
|
+
# Bash (Linux / macOS)
|
|
906
|
+
sh scripts/validate-and-push.sh
|
|
907
|
+
|
|
908
|
+
# PowerShell (Windows)
|
|
909
|
+
powershell scripts/validate-and-push.ps1
|
|
910
|
+
powershell scripts/validate-and-push.ps1 -MaxAttempts 3
|
|
911
|
+
```
|
|
912
|
+
|
|
913
|
+
The script:
|
|
914
|
+
1. Runs `FORMAT_COMMAND` and `LINT_FIX_COMMAND` to auto-fix what it can
|
|
915
|
+
2. Runs `LINT_COMMAND` and `TEST_COMMAND` to verify
|
|
916
|
+
3. If checks fail, pauses and waits for you to fix
|
|
917
|
+
4. Re-runs (up to 5 attempts, configurable)
|
|
918
|
+
5. When green, commits and pushes automatically
|
|
919
|
+
|
|
920
|
+
Use `-NoCommit` (PowerShell) or `false` as third arg (Bash) to skip auto-push.
|
|
921
|
+
|
|
922
|
+
#### Layer 3: CI auto-fix (GitHub Actions)
|
|
923
|
+
|
|
924
|
+
**Disabled by default.** Set `CI_AUTO_FIX: true` in `docs/engineering/runbook.md`
|
|
925
|
+
to enable. When enabled and CI fails after a push, the auto-fix job kicks in:
|
|
926
|
+
|
|
927
|
+
```text
|
|
928
|
+
push / PR ──> checks ──> PASS ──> done
|
|
929
|
+
│
|
|
930
|
+
FAIL
|
|
931
|
+
│
|
|
932
|
+
auto-fix job
|
|
933
|
+
│
|
|
934
|
+
run LINT_FIX_COMMAND
|
|
935
|
+
run FORMAT_COMMAND
|
|
936
|
+
│
|
|
937
|
+
changes found?
|
|
938
|
+
╱ ╲
|
|
939
|
+
yes no
|
|
940
|
+
│ │
|
|
941
|
+
commit + push report failure
|
|
942
|
+
│ (manual fix needed)
|
|
943
|
+
CI re-runs
|
|
944
|
+
(up to 3x)
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
Auto-fix commits appear as `ci: auto-fix attempt N/3`. After 3 retries the
|
|
948
|
+
workflow stops and points you to `scripts/validate-and-push` for local fixing.
|
|
949
|
+
|
|
950
|
+
## Examples
|
|
951
|
+
|
|
952
|
+
### Example 1: New feature from idea
|
|
953
|
+
|
|
954
|
+
1. `/intake`
|
|
955
|
+
2. `/research`
|
|
956
|
+
3. `/architecture`
|
|
957
|
+
4. `/sprint-plan`
|
|
958
|
+
5. `/plan-verify`
|
|
959
|
+
6. `/execute`
|
|
960
|
+
7. `/qa`
|
|
961
|
+
8. `/verify-work`
|
|
962
|
+
9. `/release`
|
|
963
|
+
10. `/refresh-context`
|
|
964
|
+
|
|
965
|
+
### Example 2: Mid-flight idea change
|
|
966
|
+
|
|
967
|
+
1. Set `AUTO_PAUSE_REQUEST=1`
|
|
968
|
+
2. Run `/intake` to update story/acceptance
|
|
969
|
+
3. Re-run `/sprint-plan` + `/plan-verify`
|
|
970
|
+
4. Resume via `/auto`
|
|
971
|
+
|
|
972
|
+
### Example 3: Pause/resume
|
|
973
|
+
|
|
974
|
+
1. `/pause`
|
|
975
|
+
2. Close work
|
|
976
|
+
3. `/resume` next session
|
|
977
|
+
|
|
978
|
+
### Deterministic `/auto` continuation
|
|
979
|
+
|
|
980
|
+
When resuming mid-process, `/auto` resolves start phase deterministically:
|
|
981
|
+
|
|
982
|
+
1. explicit `/auto start-from=<phase>`
|
|
983
|
+
2. `handoffs/resume_brief.md`
|
|
984
|
+
3. conservative `docs/engineering/state.md` fallback
|
|
985
|
+
4. fail-fast (no guessing)
|
|
986
|
+
|
|
987
|
+
Canonical phases:
|
|
988
|
+
`intake`, `discovery`, `research`, `architecture`, `sprint-plan`,
|
|
989
|
+
`plan-verify`, `execute`, `qa`, `verify-work`, `release`, `refresh-context`.
|
|
990
|
+
|
|
991
|
+
Fail-fast message format:
|
|
992
|
+
`[AUTO_RESUME_ERROR] <code>: <summary>. Source=<source>. Fix: <action>.`
|
|
993
|
+
|
|
994
|
+
Compatibility and safety:
|
|
995
|
+
- Manual/interactive workflow stays unchanged unless `/auto` continuation is used.
|
|
996
|
+
- Existing stop conditions remain enforced (decision gate, missing input,
|
|
997
|
+
pause request, loop max).
|
|
998
|
+
|
|
999
|
+
### Optional `/auto` backlog-drain mode (US-0044)
|
|
1000
|
+
|
|
1001
|
+
If you want `/auto` to continue across multiple planned stories in one run,
|
|
1002
|
+
enable backlog-drain switches in `.cursor/scratchpad.md`:
|
|
1003
|
+
|
|
1004
|
+
- `AUTO_BACKLOG_DRAIN=1`
|
|
1005
|
+
- `AUTO_BACKLOG_MAX_STORIES=<n>`
|
|
1006
|
+
- `AUTO_BACKLOG_ON_BLOCK=stop|skip`
|
|
1007
|
+
- `AUTO_STORY_SELECTION=priority_then_backlog_order`
|
|
1008
|
+
|
|
1009
|
+
Default-safe behavior remains unchanged with `AUTO_BACKLOG_DRAIN=0`.
|
|
1010
|
+
|
|
1011
|
+
### Explicit `/sprint-plan --bulk` mode (US-0046)
|
|
1012
|
+
|
|
1013
|
+
By default, `/sprint-plan` plans one scope at a time. For multi-story planning,
|
|
1014
|
+
run explicit bulk mode:
|
|
1015
|
+
|
|
1016
|
+
- `/sprint-plan --bulk`
|
|
1017
|
+
|
|
1018
|
+
Bulk planning remains bounded and deterministic via `.cursor/scratchpad.md`:
|
|
1019
|
+
|
|
1020
|
+
- `SPRINT_BULK_MAX_STORIES=<n>`
|
|
1021
|
+
- `SPRINT_BULK_MAX_SPRINTS=<n>`
|
|
1022
|
+
- `SPRINT_BULK_SELECTION=priority_then_backlog_order`
|
|
1023
|
+
|
|
1024
|
+
Bounded stop reason codes:
|
|
1025
|
+
`SPRINT_BULK_MAX_STORIES_REACHED`, `SPRINT_BULK_MAX_SPRINTS_REACHED`,
|
|
1026
|
+
`SPRINT_BULK_NO_ELIGIBLE_STORIES`, `SPRINT_BULK_MISSING_ACCEPTANCE`.
|
|
1027
|
+
|
|
1028
|
+
### Explicit `/auto --execute-bulk` mode (US-0047)
|
|
1029
|
+
|
|
1030
|
+
Bulk execution is explicit-mode only. Default `/auto` behavior remains unchanged.
|
|
1031
|
+
|
|
1032
|
+
Enable either way:
|
|
1033
|
+
|
|
1034
|
+
- one-run explicit argument: `/auto --execute-bulk`
|
|
1035
|
+
- scratchpad switch: `AUTO_EXECUTE_BULK=1`
|
|
1036
|
+
|
|
1037
|
+
Deterministic controls in `.cursor/scratchpad.md`:
|
|
1038
|
+
|
|
1039
|
+
- `AUTO_EXECUTE_MAX_ITEMS=<n>`
|
|
1040
|
+
- `AUTO_EXECUTE_ON_BLOCK=stop|skip`
|
|
1041
|
+
- `AUTO_EXECUTE_SELECTION=planned_then_priority`
|
|
1042
|
+
- `AUTO_TEAM_SCOPE_ENFORCE=0|1`
|
|
1043
|
+
|
|
1044
|
+
Deterministic reason codes:
|
|
1045
|
+
`EXEC_BULK_MAX_ITEMS_REACHED`, `EXEC_BULK_NO_ELIGIBLE_ITEMS`,
|
|
1046
|
+
`EXEC_BULK_ITEM_BLOCKED_STOP`, `EXEC_BULK_ITEM_BLOCKED_SKIPPED`,
|
|
1047
|
+
`EXEC_TEAM_SCOPE_BLOCKED`, `EXEC_TEAM_SCOPE_SKIPPED`.
|
|
1048
|
+
|
|
1049
|
+
Team-mode safety:
|
|
1050
|
+
- In `TEAM_MODE=1`, bulk execute records `TEAM_MODE`, `TEAM_MEMBER`,
|
|
1051
|
+
`ACTIVE_TASK_IDS` in state breadcrumbs.
|
|
1052
|
+
- With `AUTO_TEAM_SCOPE_ENFORCE=1`, out-of-scope tasks are blocked/skipped
|
|
1053
|
+
deterministically and never mutated.
|
|
1054
|
+
|
|
1055
|
+
### Example 4: Existing project onboarding
|
|
1056
|
+
|
|
1057
|
+
1. `/map-codebase`
|
|
1058
|
+
2. Review generated mapping artifacts
|
|
1059
|
+
3. Continue with `/intake` or `/architecture`
|
|
1060
|
+
|
|
1061
|
+
## Other useful capabilities
|
|
1062
|
+
|
|
1063
|
+
### Voice input (multilingual)
|
|
1064
|
+
|
|
1065
|
+
Voice is an input layer only; it feeds normal slash commands.
|
|
1066
|
+
|
|
1067
|
+
- OS dictation
|
|
1068
|
+
- Cursor voice (if available)
|
|
1069
|
+
- Local STT tooling
|
|
1070
|
+
|
|
1071
|
+
Reliable pattern:
|
|
1072
|
+
|
|
1073
|
+
- bind `/intake ` insertion shortcut
|
|
1074
|
+
- dictate only the content after the command
|
|
1075
|
+
|
|
1076
|
+
### Repository layout (quick orientation)
|
|
1077
|
+
|
|
1078
|
+
- `.cursor/`: commands, rules, agents, hooks, skills, scratchpad.
|
|
1079
|
+
- `docs/`: product + engineering docs.
|
|
1080
|
+
- `sprints/`: sprint planning/tracking.
|
|
1081
|
+
- `handoffs/`: role-to-role transfers.
|
|
1082
|
+
- `decisions/`: decision records.
|
|
1083
|
+
- `.github/workflows/`: CI/CD templates.
|
|
1084
|
+
|
|
1085
|
+
## Developer and release deep-dive
|
|
1086
|
+
|
|
1087
|
+
### CI/CD via runbook
|
|
1088
|
+
|
|
1089
|
+
Workflows read keys from `docs/engineering/runbook.md`:
|
|
1090
|
+
|
|
1091
|
+
- `TEST_COMMAND`
|
|
1092
|
+
- `LINT_COMMAND`
|
|
1093
|
+
- `TYPECHECK_COMMAND`
|
|
1094
|
+
- `DEPLOY_STAGING_COMMAND`
|
|
1095
|
+
- `DEPLOY_PROD_COMMAND`
|
|
1096
|
+
|
|
1097
|
+
Unset keys are skipped. The template ships with empty values for `LINT_COMMAND`,
|
|
1098
|
+
`FORMAT_COMMAND`, and `TYPECHECK_COMMAND` -- this is intentional. its-magic is a
|
|
1099
|
+
template/installer project; fill in your project-specific commands after setup.
|
|
1100
|
+
|
|
1101
|
+
US-0015 intent contract:
|
|
1102
|
+
- Empty optional runbook keys are valid defaults for this repository type.
|
|
1103
|
+
- They must not be treated as missing required configuration.
|
|
1104
|
+
|
|
1105
|
+
### Installer internals
|
|
1106
|
+
|
|
1107
|
+
- `installer.ps1` (Windows)
|
|
1108
|
+
- `installer.sh` (macOS/Linux)
|
|
1109
|
+
- `installer.py` (fallback)
|
|
1110
|
+
|
|
1111
|
+
Modes: `missing`, `overwrite`, `interactive`, `upgrade` (+ optional backup).
|
|
1112
|
+
|
|
1113
|
+
### Release automation
|
|
1114
|
+
|
|
1115
|
+
Unified release scripts:
|
|
1116
|
+
|
|
1117
|
+
- Windows: `scripts/release-all.ps1`
|
|
1118
|
+
- macOS/Linux: `scripts/release-all.sh`
|
|
1119
|
+
|
|
1120
|
+
NPM helpers:
|
|
1121
|
+
|
|
1122
|
+
- `npm run release:all`
|
|
1123
|
+
- `npm run release:all:patch|minor|major|beta|dry`
|
|
1124
|
+
- `npm run release:npm-only|choco-only|brew-only`
|
|
1125
|
+
|
|
1126
|
+
Release script flow:
|
|
1127
|
+
|
|
1128
|
+
1. bump `package.json` version
|
|
1129
|
+
2. publish npm
|
|
1130
|
+
3. create GitHub release
|
|
1131
|
+
4. update/publish Chocolatey package
|
|
1132
|
+
5. update/push Homebrew formula (stable or beta)
|
|
1133
|
+
|
|
1134
|
+
```mermaid
|
|
1135
|
+
flowchart LR
|
|
1136
|
+
ReleaseAll[scripts/release-all.*] --> VerCheck{version has -?}
|
|
1137
|
+
VerCheck -->|stable| NPM["npm publish --tag latest"]
|
|
1138
|
+
VerCheck -->|prerelease| NPMBeta["npm publish --tag beta"]
|
|
1139
|
+
ReleaseAll --> GH["gh release create"]
|
|
1140
|
+
VerCheck -->|prerelease| GHPre["--prerelease flag"]
|
|
1141
|
+
GH --> Choco[choco pack + push]
|
|
1142
|
+
GH --> BrewCheck{prerelease?}
|
|
1143
|
+
BrewCheck -->|no| BrewStable[its-magic.rb]
|
|
1144
|
+
BrewCheck -->|yes| BrewBeta[its-magic-beta.rb]
|
|
1145
|
+
NPM --> U1["npx its-magic"]
|
|
1146
|
+
NPMBeta --> U1b["npx its-magic@beta"]
|
|
1147
|
+
Choco --> U2["choco install its-magic"]
|
|
1148
|
+
Choco --> U2b["choco install its-magic --pre"]
|
|
1149
|
+
BrewStable --> U3["brew install its-magic"]
|
|
1150
|
+
BrewBeta --> U3b["brew install its-magic-beta"]
|
|
1151
|
+
```
|
|
1152
|
+
|
|
1153
|
+
Prereqs:
|
|
1154
|
+
|
|
1155
|
+
- `npm login`
|
|
1156
|
+
- `gh auth login`
|
|
1157
|
+
- Chocolatey API key (if choco publish)
|
|
1158
|
+
- Homebrew tap repo for formula distribution
|
|
1159
|
+
|
|
1160
|
+
### Package manager installation matrix
|
|
1161
|
+
|
|
1162
|
+
| Manager | Stable | Beta / Pre-release |
|
|
1163
|
+
|------------|-------------------------------------------|---------------------------------------------|
|
|
1164
|
+
| npm/npx | `npx its-magic --target . --mode missing` | `npx its-magic@beta --target . --mode missing` |
|
|
1165
|
+
| Chocolatey | `choco install its-magic` | `choco install its-magic --pre` |
|
|
1166
|
+
| Homebrew | `brew install USER/tap/its-magic` | `brew install USER/tap/its-magic-beta` |
|
|
1167
|
+
|
|
1168
|
+
### Release package contents
|
|
1169
|
+
|
|
1170
|
+
Published npm package includes runtime content only (commands/rules/agents/docs/installers).
|
|
1171
|
+
|
|
1172
|
+
Excluded from npm package:
|
|
1173
|
+
|
|
1174
|
+
- `benchmarks/`
|
|
1175
|
+
- `tests/`
|
|
1176
|
+
- `packaging/`
|
|
1177
|
+
- `Plan.md`
|
|
1178
|
+
|
|
1179
|
+
### Benchmarks
|
|
1180
|
+
|
|
1181
|
+
- Main benchmark: `benchmarks/run-bench.ps1` or `benchmarks/run-bench.sh`
|
|
1182
|
+
- Live benchmark: `benchmarks/live/run-live-bench.*`
|
|
1183
|
+
- Prompted benchmark: `benchmarks/prompts/run-prompts.*`
|
|
1184
|
+
- Headless benchmark: `benchmarks/headless/run-headless.*`
|
|
1185
|
+
|
|
1186
|
+
Reports:
|
|
1187
|
+
|
|
1188
|
+
- `benchmarks/bench-report.md`
|
|
1189
|
+
- `benchmarks/live/live-bench-report.md`
|
|
1190
|
+
- `benchmarks/headless/headless-report.md`
|
|
1191
|
+
- `benchmarks/headless/protocol.md`
|
|
1192
|
+
|
|
1193
|
+
```mermaid
|
|
1194
|
+
flowchart TD
|
|
1195
|
+
StartBench[Start benchmark] --> SelectScenario[Load scenarios]
|
|
1196
|
+
SelectScenario --> InstallKit[Install its-magic into temp workspace]
|
|
1197
|
+
InstallKit --> RunChecks[Validate required files/sections]
|
|
1198
|
+
RunChecks --> BenchReport[Write benchmarks/bench-report.md]
|
|
1199
|
+
```
|
|
1200
|
+
|
|
1201
|
+
```mermaid
|
|
1202
|
+
flowchart TD
|
|
1203
|
+
StartLive[Start live benchmark] --> SetSession[Set MAGIC_BENCH_SESSION]
|
|
1204
|
+
SetSession --> RunCommands[Run /* commands in Cursor]
|
|
1205
|
+
RunCommands --> LogHooks[Hook telemetry to bench-log.jsonl]
|
|
1206
|
+
LogHooks --> LiveReport[Write live-bench-report.md]
|
|
1207
|
+
```
|
|
1208
|
+
|
|
1209
|
+
```mermaid
|
|
1210
|
+
flowchart TD
|
|
1211
|
+
StartHeadless[Start headless run] --> LoadPrompt[Load prompt blocks]
|
|
1212
|
+
LoadPrompt --> TempWorkspace[Create temp workspace]
|
|
1213
|
+
TempWorkspace --> InstallHeadless[Install its-magic]
|
|
1214
|
+
InstallHeadless --> RunAgent[agent -p --force for each step]
|
|
1215
|
+
RunAgent --> ValidateOutputs[Validate files/sections/smoke checks]
|
|
1216
|
+
ValidateOutputs --> WriteProtocol[Write protocol.md]
|
|
1217
|
+
WriteProtocol --> WriteHeadlessReport[Write headless-report.md]
|
|
1218
|
+
```
|
|
1219
|
+
|
|
1220
|
+
### Rules
|
|
1221
|
+
|
|
1222
|
+
- `core.mdc`: phase flow, context pack, pause/resume, remote usage.
|
|
1223
|
+
- `quality.mdc`: small steps, tests/quality, optional auto-install.
|
|
1224
|
+
- `coding-standards.mdc`: strict language best practices and code quality rules.
|
|
1225
|
+
- `handoffs.mdc`: handoffs + state updates required.
|
|
1226
|
+
- `escalation.mdc`: decision gate and stop conditions.
|
|
1227
|
+
|
|
1228
|
+
### Hooks
|
|
1229
|
+
|
|
1230
|
+
- `beforeShellExecution`: blocks dangerous commands.
|
|
1231
|
+
- `beforeReadFile`: warns on secret-like files.
|
|
1232
|
+
- `afterFileEdit`: tracks code edits vs context refresh.
|
|
1233
|
+
- `stop`: reminds context refresh when needed.
|
|
1234
|
+
|
|
1235
|
+
### Artifacts (single source of truth)
|
|
1236
|
+
|
|
1237
|
+
- `docs/product/*`: vision, backlog, acceptance.
|
|
1238
|
+
- `docs/engineering/*`: architecture, decisions, state, runbook.
|
|
1239
|
+
- `sprints/Sxxxx/*`: sprint scope, tasks, progress, QA findings, summary.
|
|
1240
|
+
- `decisions/*`: decision records.
|
|
1241
|
+
- `handoffs/*`: role-to-role transfer notes.
|