teamspec 3.2.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +24 -12
  2. package/bin/teamspec-init.js +2 -2
  3. package/lib/cli.js +653 -99
  4. package/lib/linter.js +823 -1076
  5. package/lib/prompt-generator.js +312 -330
  6. package/lib/structure-loader.js +400 -0
  7. package/package.json +14 -6
  8. package/teamspec-core/FOLDER_STRUCTURE.yml +131 -0
  9. package/teamspec-core/agents/AGENT_BA.md +188 -293
  10. package/teamspec-core/agents/AGENT_BOOTSTRAP.md +197 -102
  11. package/teamspec-core/agents/AGENT_DES.md +9 -8
  12. package/teamspec-core/agents/AGENT_DEV.md +68 -67
  13. package/teamspec-core/agents/AGENT_FA.md +437 -245
  14. package/teamspec-core/agents/AGENT_FIX.md +344 -74
  15. package/teamspec-core/agents/AGENT_PO.md +487 -0
  16. package/teamspec-core/agents/AGENT_QA.md +124 -98
  17. package/teamspec-core/agents/AGENT_SA.md +143 -84
  18. package/teamspec-core/agents/AGENT_SM.md +106 -83
  19. package/teamspec-core/agents/README.md +143 -93
  20. package/teamspec-core/copilot-instructions.md +281 -205
  21. package/teamspec-core/definitions/definition-of-done.md +47 -84
  22. package/teamspec-core/definitions/definition-of-ready.md +35 -60
  23. package/teamspec-core/registry.yml +898 -0
  24. package/teamspec-core/teamspec.yml +44 -28
  25. package/teamspec-core/templates/README.md +5 -5
  26. package/teamspec-core/templates/adr-template.md +19 -17
  27. package/teamspec-core/templates/bai-template.md +125 -0
  28. package/teamspec-core/templates/bug-report-template.md +21 -15
  29. package/teamspec-core/templates/business-analysis-template.md +16 -13
  30. package/teamspec-core/templates/decision-log-template.md +26 -22
  31. package/teamspec-core/templates/dev-plan-template.md +168 -0
  32. package/teamspec-core/templates/epic-template.md +204 -0
  33. package/teamspec-core/templates/feature-increment-template.md +84 -0
  34. package/teamspec-core/templates/feature-template.md +45 -32
  35. package/teamspec-core/templates/increments-index-template.md +53 -0
  36. package/teamspec-core/templates/product-template.yml +44 -0
  37. package/teamspec-core/templates/products-index-template.md +46 -0
  38. package/teamspec-core/templates/project-template.yml +70 -0
  39. package/teamspec-core/templates/ri-template.md +225 -0
  40. package/teamspec-core/templates/rt-template.md +104 -0
  41. package/teamspec-core/templates/sd-template.md +132 -0
  42. package/teamspec-core/templates/sdi-template.md +119 -0
  43. package/teamspec-core/templates/sprint-template.md +17 -15
  44. package/teamspec-core/templates/story-template-v4.md +202 -0
  45. package/teamspec-core/templates/story-template.md +48 -90
  46. package/teamspec-core/templates/ta-template.md +198 -0
  47. package/teamspec-core/templates/tai-template.md +131 -0
  48. package/teamspec-core/templates/tc-template.md +145 -0
  49. package/teamspec-core/templates/testcases-template.md +20 -17
  50. package/extensions/teamspec-0.1.0.vsix +0 -0
  51. package/lib/extension-installer.js +0 -236
@@ -0,0 +1,898 @@
1
+ # spec/4.0/registry.yml
2
+ # This file is the SINGLE SOURCE OF TRUTH for TeamSpec 4.0
3
+ # All tables in README, agents, and docs are GENERATED from this file
4
+ # DO NOT EDIT generated files directly — edit this registry and regenerate
5
+
6
+ version: "4.0"
7
+ model: "Product-Canon"
8
+
9
+ # =============================================================================
10
+ # TERMINOLOGY (Canon Hierarchy - define once, use everywhere)
11
+ # =============================================================================
12
+ glossary:
13
+ product-canon:
14
+ definition: "The complete set of production-truth documentation for a product"
15
+ includes:
16
+ - "features"
17
+ - "business-analysis"
18
+ - "solution-designs"
19
+ - "technical-architecture"
20
+ - "decisions"
21
+ - "regression-tests"
22
+ note: "This is the umbrella term. All production truth lives here."
23
+
24
+ feature-canon:
25
+ definition: "The behavioral subset of Product Canon - system behavior truth"
26
+ location: "products/{product-id}/features/"
27
+ note: "A subset of Product Canon, not a separate concept"
28
+
29
+ feature-increment:
30
+ definition: "A project artifact proposing changes to a product feature"
31
+ location: "projects/{project-id}/feature-increments/"
32
+ abbreviation: "FI"
33
+ note: "TO-BE state that becomes Feature Canon after deployment + sync"
34
+
35
+ epic:
36
+ definition: "A coherent grouping of stories delivering a business outcome"
37
+ location: "projects/{project-id}/epics/"
38
+ note: "All stories must link to an epic via filename"
39
+
40
+ story:
41
+ definition: "A delta describing a change proposed by a Feature-Increment"
42
+ location: "projects/{project-id}/stories/{state}/"
43
+ note: "Stories describe CHANGES, not full behavior"
44
+
45
+ prx:
46
+ definition: "Product Prefix - unique 3-4 uppercase character identifier"
47
+ note: "Assigned at product creation, NEVER changes, used in all artifact filenames"
48
+
49
+ # =============================================================================
50
+ # ROLES (with Owner vs Verifier vs Approver distinction)
51
+ # =============================================================================
52
+ roles:
53
+ PO:
54
+ name: "Product Owner"
55
+ owns:
56
+ - "Products (product.yml, structure)"
57
+ - "Product Canon (approval authority)"
58
+ - "Projects (project.yml, scope)"
59
+ - "PRX assignment"
60
+ - "Deployment approval authority"
61
+ - "Canon sync execution"
62
+ creates:
63
+ - "products/{id}/product.yml"
64
+ - "projects/{id}/project.yml"
65
+ - "products/{id}/decisions/dec-PRX-*.md"
66
+ reviews:
67
+ - "Feature-Increments (for sync)"
68
+ - "Project scope"
69
+ refuses:
70
+ - "Stories"
71
+ - "Technical design"
72
+ - "Sprint management"
73
+ commands:
74
+ - "ts:po product"
75
+ - "ts:po project"
76
+ - "ts:po sync"
77
+ - "ts:po status"
78
+
79
+ BA:
80
+ name: "Business Analyst"
81
+ owns:
82
+ - "Business Analysis artifacts"
83
+ - "Domain knowledge documentation"
84
+ - "Business process documentation"
85
+ creates:
86
+ - "products/{id}/business-analysis/ba-PRX-*.md"
87
+ - "projects/{id}/business-analysis-increments/bai-PRX-*.md"
88
+ reviews:
89
+ - "Feature-Increments (business intent)"
90
+ refuses:
91
+ - "Projects (PO owns)"
92
+ - "Features (FA owns)"
93
+ - "Feature-Increments (FA owns)"
94
+ - "Epics (FA owns)"
95
+ - "Stories"
96
+ - "Technical design"
97
+ commands:
98
+ - "ts:ba analysis"
99
+ - "ts:ba ba-increment"
100
+ - "ts:ba review"
101
+
102
+ FA:
103
+ name: "Functional Analyst"
104
+ owns:
105
+ - "Features (f-PRX-*.md)"
106
+ - "Feature-Increments (fi-PRX-*.md)"
107
+ - "Epics (epic-PRX-*.md)"
108
+ - "Stories (s-eXXX-YYY-*.md)"
109
+ - "Sync proposals (prepared for PO)"
110
+ creates:
111
+ - "products/{id}/features/f-PRX-*.md"
112
+ - "projects/{id}/feature-increments/fi-PRX-*.md"
113
+ - "projects/{id}/epics/epic-PRX-*.md"
114
+ - "projects/{id}/stories/**/s-eXXX-YYY-*.md"
115
+ reviews:
116
+ - "BA artifacts (for feature translation)"
117
+ - "Stories (for Done status)"
118
+ refuses:
119
+ - "Products (PO owns)"
120
+ - "Projects (PO owns)"
121
+ - "Business intent changes (BA owns)"
122
+ - "Technical design (SA owns)"
123
+ - "Canon sync execution (PO owns)"
124
+ commands:
125
+ - "ts:fa feature"
126
+ - "ts:fa feature-increment"
127
+ - "ts:fa epic"
128
+ - "ts:fa story"
129
+ - "ts:fa sync-proposal"
130
+ - "ts:fa slice"
131
+
132
+ SA:
133
+ name: "Solution Architect"
134
+ owns:
135
+ - "Solution Designs (sd-PRX-*.md)"
136
+ - "Technical Architecture (ta-PRX-*.md)"
137
+ creates:
138
+ - "products/{id}/solution-designs/sd-PRX-*.md"
139
+ - "products/{id}/technical-architecture/ta-PRX-*.md"
140
+ - "projects/{id}/solution-design-increments/sdi-PRX-*.md"
141
+ - "projects/{id}/technical-architecture-increments/tai-PRX-*.md"
142
+ reviews:
143
+ - "Feature-Increments (technical feasibility)"
144
+ refuses:
145
+ - "Business requirements"
146
+ - "Features (FA owns)"
147
+ - "Stories"
148
+ commands:
149
+ - "ts:sa ta"
150
+ - "ts:sa ta-increment"
151
+ - "ts:sa sd"
152
+ - "ts:sa sd-increment"
153
+ - "ts:sa review"
154
+
155
+ DEV:
156
+ name: "Developer"
157
+ owns:
158
+ - "Implementation"
159
+ - "Dev plans (dp-eXXX-sYYY-*.md)"
160
+ creates:
161
+ - "projects/{id}/dev-plans/dp-eXXX-sYYY-*.md"
162
+ reviews:
163
+ - "Stories (for implementation clarity)"
164
+ - "Technical Architecture (when requested)"
165
+ refuses:
166
+ - "Feature definitions"
167
+ - "Scope changes"
168
+ commands:
169
+ - "ts:dev plan"
170
+ - "ts:dev implement"
171
+
172
+ QA:
173
+ name: "QA Engineer"
174
+ owns:
175
+ - "Project test cases (tc-fi-PRX-*.md)"
176
+ - "Product regression tests (rt-f-PRX-*.md)"
177
+ - "Bug reports"
178
+ - "Deployment verification"
179
+ creates:
180
+ - "projects/{id}/qa/test-cases/tc-fi-PRX-NNN-*.md"
181
+ - "projects/{id}/qa/bug-reports/bug-{project-id}-NNN-*.md"
182
+ - "products/{id}/qa/regression-tests/rt-f-PRX-NNN-*.md"
183
+ - "projects/{id}/qa/regression-impact/ri-fi-*.md"
184
+ reviews:
185
+ - "Stories (for testability)"
186
+ - "Feature-Increments (for test coverage)"
187
+ verifies:
188
+ - "DoD compliance"
189
+ - "Deployment readiness (smoke tests)"
190
+ refuses:
191
+ - "Feature definitions"
192
+ - "Canon updates (except regression tests)"
193
+ commands:
194
+ - "ts:qa test"
195
+ - "ts:qa verify"
196
+ - "ts:qa regression"
197
+ - "ts:qa bug"
198
+ - "ts:qa uat"
199
+ promotion_rule: |
200
+ At deployment gate, QA must confirm regression coverage is updated:
201
+ - For each fi-PRX-NNN delivered, either:
202
+ - Update/create rt-f-PRX-NNN-* regression docs, or
203
+ - Record "no regression impact" explicitly
204
+
205
+ SM:
206
+ name: "Scrum Master"
207
+ owns:
208
+ - "Sprint operations"
209
+ - "Deployment gate process (checklist, verification)"
210
+ - "Process facilitation"
211
+ creates:
212
+ - "projects/{id}/sprints/sprint-N/*"
213
+ reviews:
214
+ - "DoR compliance"
215
+ - "Deployment readiness"
216
+ refuses:
217
+ - "Prioritization (PO decides)"
218
+ - "Acceptance (FA decides)"
219
+ - "Scope changes"
220
+ commands:
221
+ - "ts:sm sprint"
222
+ - "ts:sm deploy-checklist"
223
+ - "ts:sm planning"
224
+ - "ts:sm standup"
225
+ - "ts:sm retro"
226
+ - "ts:sm sync"
227
+
228
+ DES:
229
+ name: "Designer"
230
+ owns:
231
+ - "UX/UI design artifacts"
232
+ creates:
233
+ - "Design documents"
234
+ reviews:
235
+ - "Features (for UX implications)"
236
+ refuses:
237
+ - "Technical implementation"
238
+ - "Scope decisions"
239
+ commands: []
240
+
241
+ # =============================================================================
242
+ # ARTIFACTS
243
+ # =============================================================================
244
+ artifacts:
245
+ # Product-level (permanent, production truth)
246
+ product:
247
+ location: "products/{product-id}/product.yml"
248
+ naming: "product.yml"
249
+ owner: "PO"
250
+
251
+ feature:
252
+ location: "products/{product-id}/features/"
253
+ naming: "f-{PRX}-{NNN}-{description}.md"
254
+ example: "f-ACME-001-user-login.md"
255
+ owner: "FA"
256
+
257
+ business-analysis:
258
+ location: "products/{product-id}/business-analysis/"
259
+ naming: "ba-{PRX}-{NNN}-{description}.md"
260
+ example: "ba-ACME-001-checkout-process.md"
261
+ owner: "BA"
262
+
263
+ solution-design:
264
+ location: "products/{product-id}/solution-designs/"
265
+ naming: "sd-{PRX}-{NNN}-{description}.md"
266
+ example: "sd-ACME-001-payment-integration.md"
267
+ owner: "SA"
268
+
269
+ technical-architecture:
270
+ location: "products/{product-id}/technical-architecture/"
271
+ naming: "ta-{PRX}-{NNN}-{description}.md"
272
+ example: "ta-ACME-001-microservices.md"
273
+ owner: "SA"
274
+
275
+ product-decision:
276
+ location: "products/{product-id}/decisions/"
277
+ naming: "dec-{PRX}-{NNN}-{description}.md"
278
+ example: "dec-ACME-001-payment-provider.md"
279
+ owner: "PO"
280
+
281
+ product-regression-test:
282
+ location: "products/{product-id}/qa/regression-tests/"
283
+ naming: "rt-f-{PRX}-{NNN}-{description}.md"
284
+ example: "rt-f-ACME-001-user-login-regression.md"
285
+ owner: "QA"
286
+ targets: "f-PRX-NNN (Feature)"
287
+ note: "Product-scoped regression tests promoted from project test cases"
288
+
289
+ # Project-level (temporary, change proposals)
290
+ project:
291
+ location: "projects/{project-id}/project.yml"
292
+ naming: "project.yml"
293
+ owner: "PO"
294
+
295
+ feature-increment:
296
+ location: "projects/{project-id}/feature-increments/"
297
+ naming: "fi-{PRX}-{NNN}-{description}.md"
298
+ example: "fi-ACME-001-oauth-login.md"
299
+ owner: "FA"
300
+
301
+ epic:
302
+ location: "projects/{project-id}/epics/"
303
+ naming: "epic-{PRX}-{NNN}-{description}.md"
304
+ example: "epic-ACME-001-authentication-overhaul.md"
305
+ owner: "FA"
306
+
307
+ story:
308
+ location: "projects/{project-id}/stories/{state}/"
309
+ naming: "s-e{EEE}-{SSS}-{description}.md"
310
+ example: "s-e001-042-add-google-oauth.md"
311
+ owner: "FA"
312
+ note: "EEE=epic number, SSS=story sequence within epic"
313
+
314
+ dev-plan:
315
+ location: "projects/{project-id}/dev-plans/"
316
+ naming: "dp-e{EEE}-s{SSS}-{description}.md"
317
+ example: "dp-e001-s042-oauth-implementation.md"
318
+ owner: "DEV"
319
+
320
+ project-test-case:
321
+ location: "projects/{project-id}/qa/test-cases/"
322
+ naming: "tc-fi-{PRX}-{NNN}-{description}.md"
323
+ example: "tc-fi-ACME-001-oauth-login-tests.md"
324
+ owner: "QA"
325
+ targets: "fi-PRX-NNN (Feature-Increment)"
326
+ note: "Project-scoped test cases for FI validation"
327
+
328
+ bug-report:
329
+ location: "projects/{project-id}/qa/bug-reports/"
330
+ naming: "bug-{project-id}-{NNN}-{description}.md"
331
+ example: "bug-q1-auth-042-oauth-timeout.md"
332
+ owner: "QA"
333
+ note: "NNN is unique within project. Product PRX may be recorded as metadata if needed."
334
+
335
+ regression-impact:
336
+ location: "projects/{project-id}/qa/regression-impact/"
337
+ naming: "ri-fi-{PRX}-{NNN}.md"
338
+ example: "ri-fi-ACME-001.md"
339
+ owner: "QA"
340
+ purpose: "Record regression test impact assessment for Feature-Increment"
341
+ required_fields:
342
+ - "fi_id: Reference to Feature-Increment"
343
+ - "assessment: 'update-required' | 'no-impact'"
344
+ - "rationale: Explanation of impact assessment"
345
+ - "regression_tests: List of rt-f-* files created/updated (if update-required)"
346
+ note: "Required at deployment gate. Either update rt-f-* OR record no-impact with rationale."
347
+ lint_rule: "TS-QA-003"
348
+
349
+ ba-increment:
350
+ location: "projects/{project-id}/business-analysis-increments/"
351
+ naming: "bai-{PRX}-{NNN}-{description}.md"
352
+ example: "bai-ACME-001-checkout-redesign.md"
353
+ owner: "BA"
354
+
355
+ sd-increment:
356
+ location: "projects/{project-id}/solution-design-increments/"
357
+ naming: "sdi-{PRX}-{NNN}-{description}.md"
358
+ example: "sdi-ACME-001-oauth-architecture.md"
359
+ owner: "SA"
360
+
361
+ ta-increment:
362
+ location: "projects/{project-id}/technical-architecture-increments/"
363
+ naming: "tai-{PRX}-{NNN}-{description}.md"
364
+ example: "tai-ACME-001-auth-refactor.md"
365
+ owner: "SA"
366
+
367
+ sprint:
368
+ location: "projects/{project-id}/sprints/"
369
+ naming: "sprint-{N}/"
370
+ example: "sprint-1/"
371
+ owner: "SM"
372
+
373
+ # =============================================================================
374
+ # GATES (with Owner vs Verifier vs Approver distinction)
375
+ # =============================================================================
376
+ gates:
377
+ dor:
378
+ name: "Definition of Ready"
379
+ owner: "FA"
380
+ verifier: "SM"
381
+ checks:
382
+ - "Story linked to Epic via filename (s-eXXX-YYY)"
383
+ - "Feature-Increment exists and has AS-IS/TO-BE"
384
+ - "Acceptance Criteria are testable"
385
+ - "No TBD/placeholder content"
386
+ - "Estimate assigned"
387
+
388
+ dod:
389
+ name: "Definition of Done"
390
+ owner: "FA"
391
+ verifier: "QA"
392
+ checks:
393
+ - "All AC verified by QA"
394
+ - "Code reviewed and merged"
395
+ - "Tests passing"
396
+ - "Feature-Increment TO-BE section complete"
397
+ - "Ready for deployment"
398
+
399
+ deployment:
400
+ name: "Deployment Verification Gate"
401
+ owner: "SM"
402
+ approver: "PO"
403
+ verifier: "QA"
404
+ timing: "After production deploy (+ toggles ON if applicable), before ts:po sync"
405
+ checks:
406
+ - "All sprint stories in terminal state (Done/Deferred/Out-of-Scope)"
407
+ - "All Feature-Increments reviewed"
408
+ - "Code deployed to production"
409
+ - "Feature toggles enabled (or N/A)"
410
+ - "Smoke tests passed in production"
411
+ - "QA sign-off obtained"
412
+ - "Regression impact recorded (ri-fi-* with assessment)"
413
+ - "PO approval obtained"
414
+ trigger: "SM runs ts:sm deploy-checklist"
415
+ note: "SM verifies checklist completion; SM does NOT deploy"
416
+
417
+ canon-sync:
418
+ name: "Canon Sync Gate"
419
+ owner: "PO"
420
+ precondition: "Deployment Verification gate passed"
421
+ action: "ts:po sync"
422
+ effect: "Feature-Increment TO-BE merged into Product Feature Canon"
423
+ timing: "POST-DEPLOY ONLY"
424
+
425
+ # =============================================================================
426
+ # COMMANDS (space-based invocation, dot-based machine IDs)
427
+ # =============================================================================
428
+ commands:
429
+ # PO commands
430
+ - id: po.product
431
+ invocation: "ts:po product"
432
+ role: "PO"
433
+ purpose: "Create new product with PRX prefix"
434
+ output: "products/{id}/ structure"
435
+
436
+ - id: po.project
437
+ invocation: "ts:po project"
438
+ role: "PO"
439
+ purpose: "Create new project targeting product(s)"
440
+ output: "projects/{id}/ structure"
441
+
442
+ - id: po.sync
443
+ invocation: "ts:po sync"
444
+ role: "PO"
445
+ purpose: "Sync project changes to Product Canon (post-deploy)"
446
+ precondition: "Deployment Verification gate passed"
447
+ effect: "FI TO-BE → Feature Canon"
448
+ changes: ["products/**"]
449
+
450
+ - id: po.status
451
+ invocation: "ts:po status"
452
+ role: "PO"
453
+ purpose: "Business/management report: health, stories, FI state, QA status, gate readiness, sync readiness"
454
+ output: "Status report"
455
+ note: "Read-only reporting command; does not modify artifacts"
456
+
457
+ # BA commands
458
+ - id: ba.analysis
459
+ invocation: "ts:ba analysis"
460
+ role: "BA"
461
+ purpose: "Create business analysis document"
462
+ output: "products/{id}/business-analysis/ba-PRX-*.md"
463
+
464
+ - id: ba.ba-increment
465
+ invocation: "ts:ba ba-increment"
466
+ role: "BA"
467
+ purpose: "Create BA increment in project"
468
+ output: "projects/{id}/business-analysis-increments/bai-PRX-*.md"
469
+
470
+ - id: ba.review
471
+ invocation: "ts:ba review"
472
+ role: "BA"
473
+ purpose: "Review artifacts for business intent"
474
+ output: "Review comments"
475
+
476
+ # FA commands
477
+ - id: fa.feature
478
+ invocation: "ts:fa feature"
479
+ role: "FA"
480
+ purpose: "Create feature in Product Canon"
481
+ output: "products/{id}/features/f-PRX-*.md"
482
+
483
+ - id: fa.feature-increment
484
+ invocation: "ts:fa feature-increment"
485
+ role: "FA"
486
+ purpose: "Create feature-increment in project"
487
+ output: "projects/{id}/feature-increments/fi-PRX-*.md"
488
+
489
+ - id: fa.epic
490
+ invocation: "ts:fa epic"
491
+ role: "FA"
492
+ purpose: "Create epic in project"
493
+ output: "projects/{id}/epics/epic-PRX-*.md"
494
+
495
+ - id: fa.story
496
+ invocation: "ts:fa story"
497
+ role: "FA"
498
+ purpose: "Create story linked to epic"
499
+ output: "projects/{id}/stories/backlog/s-eXXX-YYY-*.md"
500
+
501
+ - id: fa.sync-proposal
502
+ invocation: "ts:fa sync-proposal"
503
+ role: "FA"
504
+ purpose: "Prepare sync proposal for PO"
505
+ output: "Sync proposal document"
506
+
507
+ - id: fa.slice
508
+ invocation: "ts:fa slice"
509
+ role: "FA"
510
+ purpose: "Refine epic into stories"
511
+ output: "Stories"
512
+
513
+ # SA commands
514
+ - id: sa.ta
515
+ invocation: "ts:sa ta"
516
+ role: "SA"
517
+ purpose: "Create Technical Architecture document"
518
+ output: "products/{id}/technical-architecture/ta-PRX-*.md"
519
+
520
+ - id: sa.ta-increment
521
+ invocation: "ts:sa ta-increment"
522
+ role: "SA"
523
+ purpose: "Create TA Increment in project"
524
+ output: "projects/{id}/technical-architecture-increments/tai-PRX-*.md"
525
+
526
+ - id: sa.sd
527
+ invocation: "ts:sa sd"
528
+ role: "SA"
529
+ purpose: "Create Solution Design document"
530
+ output: "products/{id}/solution-designs/sd-PRX-*.md"
531
+
532
+ - id: sa.sd-increment
533
+ invocation: "ts:sa sd-increment"
534
+ role: "SA"
535
+ purpose: "Create SD Increment in project"
536
+ output: "projects/{id}/solution-design-increments/sdi-PRX-*.md"
537
+
538
+ - id: sa.review
539
+ invocation: "ts:sa review"
540
+ role: "SA"
541
+ purpose: "Review technical approach"
542
+ output: "Technical assessment"
543
+
544
+ # DEV commands
545
+ - id: dev.plan
546
+ invocation: "ts:dev plan"
547
+ role: "DEV"
548
+ purpose: "Create dev plan for story"
549
+ output: "projects/{id}/dev-plans/dp-eXXX-sYYY-*.md"
550
+
551
+ - id: dev.implement
552
+ invocation: "ts:dev implement"
553
+ role: "DEV"
554
+ purpose: "Execute implementation"
555
+ output: "Code changes"
556
+
557
+ # QA commands
558
+ - id: qa.test
559
+ invocation: "ts:qa test"
560
+ role: "QA"
561
+ purpose: "Create test cases for Feature-Increment"
562
+ output: "projects/{id}/qa/test-cases/tc-fi-PRX-*.md"
563
+
564
+ - id: qa.regression
565
+ invocation: "ts:qa regression"
566
+ role: "QA"
567
+ purpose: "Update product regression tests"
568
+ output: "products/{id}/qa/regression-tests/rt-f-PRX-*.md"
569
+
570
+ - id: qa.verify
571
+ invocation: "ts:qa verify"
572
+ role: "QA"
573
+ purpose: "Validate DoD compliance"
574
+ output: "Verification report"
575
+
576
+ - id: qa.bug
577
+ invocation: "ts:qa bug"
578
+ role: "QA"
579
+ purpose: "Create bug reports"
580
+ output: "projects/{id}/qa/bug-reports/bug-*.md"
581
+
582
+ - id: qa.uat
583
+ invocation: "ts:qa uat"
584
+ role: "QA"
585
+ purpose: "Create UAT test pack"
586
+ output: "UAT artifacts"
587
+
588
+ # SM commands
589
+ - id: sm.sprint
590
+ invocation: "ts:sm sprint"
591
+ role: "SM"
592
+ purpose: "Create/manage sprint"
593
+ output: "projects/{id}/sprints/sprint-N/*"
594
+
595
+ - id: sm.deploy-checklist
596
+ invocation: "ts:sm deploy-checklist"
597
+ role: "SM"
598
+ purpose: "Run deployment readiness checklist"
599
+ output: "Deployment checklist"
600
+
601
+ - id: sm.planning
602
+ invocation: "ts:sm planning"
603
+ role: "SM"
604
+ purpose: "Facilitate sprint planning"
605
+ output: "Sprint plan artifacts"
606
+
607
+ - id: sm.standup
608
+ invocation: "ts:sm standup"
609
+ role: "SM"
610
+ purpose: "Facilitate daily standup"
611
+ output: "Standup notes"
612
+
613
+ - id: sm.retro
614
+ invocation: "ts:sm retro"
615
+ role: "SM"
616
+ purpose: "Facilitate sprint retrospective"
617
+ output: "Retrospective notes"
618
+
619
+ - id: sm.sync
620
+ invocation: "ts:sm sync"
621
+ role: "SM"
622
+ purpose: "Facilitate cross-team sync"
623
+ output: "Sync notes"
624
+
625
+ # Universal commands
626
+ - id: lint
627
+ invocation: "ts:lint"
628
+ role: "Any"
629
+ purpose: "Run linter"
630
+ output: "Lint report"
631
+
632
+ - id: fix
633
+ invocation: "ts:fix"
634
+ role: "Any"
635
+ purpose: "Auto-fix lint errors"
636
+ output: "Fixed files"
637
+
638
+ - id: agent
639
+ invocation: "ts:agent <role>"
640
+ role: "Any"
641
+ purpose: "Load role-specific agent"
642
+ output: "Agent loaded"
643
+
644
+ # REMOVED (no longer functional)
645
+ - id: deploy
646
+ invocation: "ts:deploy"
647
+ status: "REMOVED"
648
+ replacement: "ts:po sync"
649
+ reason: "Conflicted with ts:po sync; one mechanism is clearer"
650
+ removed_in: "4.0"
651
+
652
+ # REMOVED (will error if used)
653
+ - id: ba.epic
654
+ invocation: "ts:ba epic"
655
+ status: "REMOVED"
656
+ replacement: "ts:fa epic"
657
+ reason: "BA does not own Epics; FA does"
658
+
659
+ - id: ba.feature
660
+ invocation: "ts:ba feature"
661
+ status: "REMOVED"
662
+ replacement: "ts:fa feature"
663
+ reason: "BA does not own Features; FA does"
664
+
665
+ # =============================================================================
666
+ # INVARIANTS (always true in TeamSpec 4.0)
667
+ # =============================================================================
668
+ invariants:
669
+ - id: INV-001
670
+ rule: "Product Canon is updated ONLY after deployment"
671
+ enforcement: "ts:po sync requires Deployment Verification gate passed"
672
+
673
+ - id: INV-002
674
+ rule: "Every artifact has exactly one owner role"
675
+ enforcement: "registry.yml artifacts.*.owner is singular"
676
+
677
+ - id: INV-003
678
+ rule: "Stories link to Epics via filename"
679
+ enforcement: "s-eXXX-YYY-*.md pattern mandatory"
680
+
681
+ - id: INV-004
682
+ rule: "Feature-Increments describe AS-IS and TO-BE"
683
+ enforcement: "Linter rule TS-FI-001"
684
+
685
+ - id: INV-005
686
+ rule: "PRX is immutable after product creation"
687
+ enforcement: "product.yml validation"
688
+
689
+ # =============================================================================
690
+ # CANON RULES (from AGENT_BOOTSTRAP)
691
+ # =============================================================================
692
+ canon_rules:
693
+ - id: CANON-001
694
+ rule: "Product Feature Canon is the single source of truth for AS-IS behavior"
695
+
696
+ - id: CANON-002
697
+ rule: "Projects propose changes via Feature-Increments, never modify Product Canon directly"
698
+
699
+ - id: CANON-003
700
+ rule: "Product Canon is updated ONLY after successful deployment (via ts:po sync)"
701
+
702
+ - id: CANON-004
703
+ rule: "All stories must link to an Epic via filename (s-eXXX-YYY pattern)"
704
+
705
+ - id: CANON-005
706
+ rule: "Epics define the TO-BE state for a coherent change"
707
+
708
+ - id: CANON-006
709
+ rule: "Feature-Increments (fi-PRX-XXX) describe deltas against Product Features (f-PRX-XXX)"
710
+
711
+ - id: CANON-007
712
+ rule: "A project can modify multiple products (many-to-many relationship)"
713
+
714
+ - id: CANON-008
715
+ rule: "Business decisions affecting products are logged at product level after deployment"
716
+
717
+ - id: CANON-009
718
+ rule: "Every product has a unique 3-4 character prefix (PRX) used in all artifact filenames"
719
+
720
+ # =============================================================================
721
+ # TEMPLATES (source of truth for template files)
722
+ # =============================================================================
723
+ templates:
724
+ # PO templates
725
+ - file: "product-template.yml"
726
+ artifact: "product"
727
+ role: "PO"
728
+ command: "ts:po product"
729
+ description: "Product metadata and configuration"
730
+
731
+ - file: "project-template.yml"
732
+ artifact: "project"
733
+ role: "PO"
734
+ command: "ts:po project"
735
+ description: "Project metadata and target products"
736
+
737
+ - file: "decision-log-template.md"
738
+ artifact: "product-decision"
739
+ role: "PO"
740
+ command: null
741
+ description: "Product-level decision record"
742
+
743
+ # BA templates
744
+ - file: "business-analysis-template.md"
745
+ artifact: "business-analysis"
746
+ role: "BA"
747
+ command: "ts:ba analysis"
748
+ description: "Business analysis document"
749
+
750
+ - file: "bai-template.md"
751
+ artifact: "ba-increment"
752
+ role: "BA"
753
+ command: "ts:ba ba-increment"
754
+ description: "Business analysis increment for projects"
755
+
756
+ # FA templates
757
+ - file: "feature-template.md"
758
+ artifact: "feature"
759
+ role: "FA"
760
+ command: "ts:fa feature"
761
+ description: "Product feature specification"
762
+
763
+ - file: "feature-increment-template.md"
764
+ artifact: "feature-increment"
765
+ role: "FA"
766
+ command: "ts:fa feature-increment"
767
+ description: "Feature increment with AS-IS/TO-BE"
768
+
769
+ - file: "epic-template.md"
770
+ artifact: "epic"
771
+ role: "FA"
772
+ command: "ts:fa epic"
773
+ description: "Epic grouping related stories"
774
+
775
+ - file: "story-template.md"
776
+ artifact: "story"
777
+ role: "FA"
778
+ command: "ts:fa story"
779
+ description: "Story describing a delta"
780
+
781
+ - file: "storymap-template.md"
782
+ artifact: null
783
+ role: "FA"
784
+ command: null
785
+ description: "Story mapping visualization"
786
+
787
+ - file: "functional-spec-template.md"
788
+ artifact: null
789
+ role: "FA"
790
+ command: null
791
+ description: "Detailed functional specification"
792
+
793
+ - file: "increments-index-template.md"
794
+ artifact: null
795
+ role: "FA"
796
+ command: null
797
+ description: "Index of feature increments"
798
+
799
+ # SA templates
800
+ - file: "sd-template.md"
801
+ artifact: "solution-design"
802
+ role: "SA"
803
+ command: "ts:sa sd"
804
+ description: "Solution design document"
805
+
806
+ - file: "sdi-template.md"
807
+ artifact: "sd-increment"
808
+ role: "SA"
809
+ command: "ts:sa sd-increment"
810
+ description: "Solution design increment for projects"
811
+
812
+ - file: "ta-template.md"
813
+ artifact: "technical-architecture"
814
+ role: "SA"
815
+ command: "ts:sa ta"
816
+ description: "Technical architecture document"
817
+
818
+ - file: "tai-template.md"
819
+ artifact: "ta-increment"
820
+ role: "SA"
821
+ command: "ts:sa ta-increment"
822
+ description: "Technical architecture increment for projects"
823
+
824
+ # DEV templates
825
+ - file: "dev-plan-template.md"
826
+ artifact: "dev-plan"
827
+ role: "DEV"
828
+ command: "ts:dev plan"
829
+ description: "Development plan for story implementation"
830
+
831
+ # QA templates
832
+ - file: "tc-template.md"
833
+ artifact: "project-test-case"
834
+ role: "QA"
835
+ command: "ts:qa test"
836
+ description: "Test case for feature increment"
837
+
838
+ - file: "rt-template.md"
839
+ artifact: "product-regression-test"
840
+ role: "QA"
841
+ command: "ts:qa regression"
842
+ description: "Product-level regression test for feature"
843
+
844
+ - file: "ri-template.md"
845
+ artifact: "regression-impact"
846
+ role: "QA"
847
+ command: null
848
+ description: "Regression impact assessment"
849
+
850
+ - file: "bug-report-template.md"
851
+ artifact: "bug-report"
852
+ role: "QA"
853
+ command: null
854
+ description: "Bug report for defects"
855
+
856
+ - file: "uat-pack-template.md"
857
+ artifact: null
858
+ role: "QA"
859
+ command: null
860
+ description: "UAT test pack"
861
+
862
+ # SM templates
863
+ - file: "sprint-template.md"
864
+ artifact: "sprint"
865
+ role: "SM"
866
+ command: "ts:sm sprint"
867
+ description: "Sprint planning and tracking"
868
+
869
+ - file: "active-sprint-template.md"
870
+ artifact: null
871
+ role: "SM"
872
+ command: null
873
+ description: "Active sprint status board"
874
+
875
+ - file: "sprint-goal-template.md"
876
+ artifact: null
877
+ role: "SM"
878
+ command: null
879
+ description: "Sprint goal definition"
880
+
881
+ - file: "sprints-index-template.md"
882
+ artifact: null
883
+ role: "SM"
884
+ command: null
885
+ description: "Index of all sprints"
886
+
887
+ - file: "refinement-notes-template.md"
888
+ artifact: null
889
+ role: "SM"
890
+ command: null
891
+ description: "Backlog refinement session notes"
892
+
893
+ # Index templates (multi-role)
894
+ - file: "products-index-template.md"
895
+ artifact: null
896
+ role: "PO"
897
+ command: null
898
+ description: "Index of all products"