teamspec 3.2.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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/extension-installer.js +19 -219
  5. package/lib/linter.js +823 -1076
  6. package/lib/prompt-generator.js +312 -330
  7. package/lib/structure-loader.js +400 -0
  8. package/package.json +14 -6
  9. package/teamspec-core/FOLDER_STRUCTURE.yml +131 -0
  10. package/teamspec-core/agents/AGENT_BA.md +188 -293
  11. package/teamspec-core/agents/AGENT_BOOTSTRAP.md +197 -102
  12. package/teamspec-core/agents/AGENT_DES.md +9 -8
  13. package/teamspec-core/agents/AGENT_DEV.md +68 -67
  14. package/teamspec-core/agents/AGENT_FA.md +437 -245
  15. package/teamspec-core/agents/AGENT_FIX.md +344 -74
  16. package/teamspec-core/agents/AGENT_PO.md +487 -0
  17. package/teamspec-core/agents/AGENT_QA.md +124 -98
  18. package/teamspec-core/agents/AGENT_SA.md +143 -84
  19. package/teamspec-core/agents/AGENT_SM.md +106 -83
  20. package/teamspec-core/agents/README.md +143 -93
  21. package/teamspec-core/copilot-instructions.md +281 -205
  22. package/teamspec-core/definitions/definition-of-done.md +47 -84
  23. package/teamspec-core/definitions/definition-of-ready.md +35 -60
  24. package/teamspec-core/registry.yml +898 -0
  25. package/teamspec-core/teamspec.yml +44 -28
  26. package/teamspec-core/templates/README.md +5 -5
  27. package/teamspec-core/templates/adr-template.md +19 -17
  28. package/teamspec-core/templates/bai-template.md +125 -0
  29. package/teamspec-core/templates/bug-report-template.md +21 -15
  30. package/teamspec-core/templates/business-analysis-template.md +16 -13
  31. package/teamspec-core/templates/decision-log-template.md +26 -22
  32. package/teamspec-core/templates/dev-plan-template.md +168 -0
  33. package/teamspec-core/templates/epic-template.md +204 -0
  34. package/teamspec-core/templates/feature-increment-template.md +84 -0
  35. package/teamspec-core/templates/feature-template.md +45 -32
  36. package/teamspec-core/templates/increments-index-template.md +53 -0
  37. package/teamspec-core/templates/product-template.yml +44 -0
  38. package/teamspec-core/templates/products-index-template.md +46 -0
  39. package/teamspec-core/templates/project-template.yml +70 -0
  40. package/teamspec-core/templates/ri-template.md +225 -0
  41. package/teamspec-core/templates/rt-template.md +104 -0
  42. package/teamspec-core/templates/sd-template.md +132 -0
  43. package/teamspec-core/templates/sdi-template.md +119 -0
  44. package/teamspec-core/templates/sprint-template.md +17 -15
  45. package/teamspec-core/templates/story-template-v4.md +202 -0
  46. package/teamspec-core/templates/story-template.md +48 -90
  47. package/teamspec-core/templates/ta-template.md +198 -0
  48. package/teamspec-core/templates/tai-template.md +131 -0
  49. package/teamspec-core/templates/tc-template.md +145 -0
  50. package/teamspec-core/templates/testcases-template.md +20 -17
  51. package/extensions/teamspec-0.1.0.vsix +0 -0
@@ -1,9 +1,9 @@
1
1
  # TeamSpec Linter Fix Agent
2
2
 
3
- > **Version:** 2.0
3
+ > **Version:** 4.0
4
4
  > **Role Code:** FIX
5
5
  > **Inherits:** [AGENT_BOOTSTRAP.md](./AGENT_BOOTSTRAP.md)
6
- > **Last Updated:** 2026-01-07
6
+ > **Last Updated:** 2026-01-09
7
7
 
8
8
  ---
9
9
 
@@ -18,14 +18,15 @@
18
18
  - All lint errors resolved
19
19
  - No content deleted (only additions/renames)
20
20
  - Cross-references updated correctly
21
- - Feature Canon integrity maintained
21
+ - Product/Project Canon integrity maintained
22
22
 
23
23
  ---
24
24
 
25
25
  ## 2. Inherited Rules
26
26
 
27
27
  This agent inherits all rules from [AGENT_BOOTSTRAP.md](./AGENT_BOOTSTRAP.md), including:
28
- - Feature Canon model
28
+ - Product/Project model (4.0)
29
+ - PRX naming conventions
29
30
  - Role boundary philosophy
30
31
  - Escalation principles
31
32
  - Quality gates
@@ -50,7 +51,7 @@ This agent inherits all rules from [AGENT_BOOTSTRAP.md](./AGENT_BOOTSTRAP.md), i
50
51
 
51
52
  Fix errors in this order:
52
53
  1. **BLOCKER** → ERROR → WARNING → INFO
53
- 2. **TS-PROJ** → TS-NAMING → TS-FEAT → TS-STORY → TS-ADR → TS-DEVPLAN → TS-DOD
54
+ 2. **TS-PROD** → TS-PROJ → TS-FI → TS-EPIC → TS-NAMING → TS-FEAT → TS-STORY → TS-TA → TS-SD → TS-DEVPLAN → TS-DOD
54
55
 
55
56
  ### 3.3 Critical Rules
56
57
 
@@ -61,11 +62,159 @@ Fix errors in this order:
61
62
  | **FIX-003** | Preserve existing content when adding sections |
62
63
  | **FIX-004** | Update ALL cross-references when renaming files |
63
64
  | **FIX-005** | Run lint after each batch of fixes to verify |
65
+ | **FIX-006** | Respect PRX consistency (4.0) |
64
66
 
65
67
  ---
66
68
 
67
69
  ## 4. Linting Rules Reference
68
70
 
71
+ ### 4.0 Product Rules (TS-PROD) — 4.0 ONLY
72
+
73
+ #### TS-PROD-001: Product folder must be registered
74
+
75
+ **Error:** `Product 'X' is not registered in products-index.md`
76
+
77
+ **Fix:** Add entry to `products/products-index.md`:
78
+ ```markdown
79
+ | product-id | PRX | Product Name | PO: Owner | active |
80
+ ```
81
+
82
+ #### TS-PROD-002: product.yml required with minimum metadata
83
+
84
+ **Error:** `product.yml is missing` or `missing required field: 'X'`
85
+
86
+ **Required fields:** `product.id`, `product.prefix` (PRX), `product.name`, `product.status`, `product.owner`
87
+
88
+ **Fix:** Create or update `products/<product>/product.yml`:
89
+ ```yaml
90
+ product:
91
+ id: "product-id"
92
+ prefix: "PRX" # 3-4 uppercase characters
93
+ name: "Product Name"
94
+ status: "active"
95
+ owner: "Product Owner Name"
96
+ ```
97
+
98
+ **PRX Validation:**
99
+ - Must be 3-4 uppercase characters
100
+ - Must be unique across all products
101
+ - Once assigned, never changes
102
+
103
+ #### TS-PROD-003: Product-Project bidirectional consistency
104
+
105
+ **Error:** `Project 'X' targets product 'Y' but product doesn't list it in active_projects`
106
+
107
+ **Fix:** Add project to product's `product.yml`:
108
+ ```yaml
109
+ active_projects:
110
+ - project_id: "project-x"
111
+ status: "active"
112
+ ```
113
+
114
+ #### TS-PROD-004: Product features-index.md required
115
+
116
+ **Error:** `Product 'X' is missing features/features-index.md`
117
+
118
+ **Fix:** Create `products/<product>/features/features-index.md`:
119
+ ```markdown
120
+ # Features Index — Product Name (PRX)
121
+
122
+ | Feature ID | Name | Status | Last Updated |
123
+ |------------|------|--------|--------------|
124
+ | f-PRX-001 | Feature Name | Active | YYYY-MM-DD |
125
+ ```
126
+
127
+ #### TS-PROD-005: Product story-ledger.md required
128
+
129
+ **Error:** `Product 'X' is missing features/story-ledger.md`
130
+
131
+ **Fix:** Create `products/<product>/features/story-ledger.md`:
132
+ ```markdown
133
+ # Story Ledger — Product Name (PRX)
134
+
135
+ | Date | Story | Epic | Feature | Change Summary |
136
+ |------|-------|------|---------|----------------|
137
+ ```
138
+
139
+ ---
140
+
141
+ ### 4.0a Feature-Increment Rules (TS-FI) — 4.0 ONLY
142
+
143
+ #### TS-FI-001: Feature-Increment must reference product and feature
144
+
145
+ **Error:** `Feature-Increment must specify Target Product` or `must specify Target Feature`
146
+
147
+ **Fix:** Add to Feature-Increment header:
148
+ ```markdown
149
+ **Target Product:** product-id (PRX)
150
+ **Target Feature:** f-PRX-XXX (Feature Name)
151
+ ```
152
+
153
+ #### TS-FI-002: Feature-Increment must have AS-IS and TO-BE sections
154
+
155
+ **Error:** `Feature-Increment is missing required section: 'X'`
156
+
157
+ **Fix:** Add sections:
158
+ ```markdown
159
+ ## AS-IS (Current Behavior)
160
+
161
+ Current behavior reference from f-PRX-XXX.
162
+
163
+ ## TO-BE (Target Behavior)
164
+
165
+ New behavior after implementation.
166
+ ```
167
+
168
+ #### TS-FI-003: Feature-Increment target feature must exist
169
+
170
+ **Error:** `Target Feature 'f-PRX-XXX' does not exist in product`
171
+
172
+ **Fix Options:**
173
+ 1. Create the feature in `products/<product>/features/f-PRX-XXX-description.md`
174
+ 2. Correct the feature reference in the FI
175
+
176
+ #### TS-FI-004: Feature-Increment IDs must be unique
177
+
178
+ **Error:** `Duplicate Feature-Increment ID 'fi-PRX-XXX' found`
179
+
180
+ **Fix:** Rename one duplicate file to use unique ID, update all references.
181
+
182
+ ---
183
+
184
+ ### 4.0b Epic Rules (TS-EPIC) — 4.0 ONLY
185
+
186
+ #### TS-EPIC-001: Epic must link to Feature-Increments
187
+
188
+ **Error:** `Epic must link to at least one Feature-Increment (fi-PRX-XXX)`
189
+
190
+ **Fix:** Add to Epic:
191
+ ```markdown
192
+ ## Feature-Increments
193
+
194
+ | FI ID | Description | Status |
195
+ |-------|-------------|--------|
196
+ | [fi-PRX-001](../feature-increments/fi-PRX-001-description.md) | Description | Planned |
197
+ ```
198
+
199
+ #### TS-EPIC-002: Epic must define TO-BE state
200
+
201
+ **Error:** `Epic is missing required section: 'TO-BE'`
202
+
203
+ **Fix:** Add section:
204
+ ```markdown
205
+ ## TO-BE (Target State)
206
+
207
+ Description of the target state after epic completion.
208
+ ```
209
+
210
+ #### TS-EPIC-003: Epic IDs must be unique
211
+
212
+ **Error:** `Duplicate Epic ID 'epic-PRX-XXX' found`
213
+
214
+ **Fix:** Rename one duplicate file to use unique ID, update all story references.
215
+
216
+ ---
217
+
69
218
  ### 4.1 Project Rules (TS-PROJ)
70
219
 
71
220
  #### TS-PROJ-001: Project folder must be registered
@@ -81,37 +230,59 @@ Fix errors in this order:
81
230
 
82
231
  **Error:** `project.yml is missing` or `missing required field: 'X'`
83
232
 
84
- **Required fields:** `project_id`, `name`, `status`, `stakeholders`, `roles`
233
+ **Required fields (4.0):** `project.id`, `project.name`, `project.status`, `project.owner`, `target_products`
85
234
 
86
235
  **Fix:** Create or update `projects/<project>/project.yml`:
87
236
  ```yaml
88
- project_id: "project-id"
89
- name: "Project Name"
90
- description: "Brief description"
91
- status: "active"
92
- stakeholders:
93
- - name: "Product Owner"
94
- role: "PO"
95
- - name: "Team Lead"
96
- role: "DEV"
97
- roles:
98
- - BA
99
- - FA
100
- - DEV
101
- - QA
102
- - SM
237
+ project:
238
+ id: "project-id"
239
+ name: "Project Name"
240
+ description: "Brief description"
241
+ status: "active"
242
+ owner: "Project Lead"
243
+
244
+ target_products:
245
+ - product_id: "product-id"
246
+ prefix: "PRX"
247
+
248
+ team:
249
+ roles:
250
+ - BA
251
+ - FA
252
+ - DEV
253
+ - QA
254
+ - SM
103
255
  ```
104
256
 
257
+ #### TS-PROJ-003: Project must target at least one product (4.0)
258
+
259
+ **Error:** `Project must target at least one product in target_products`
260
+
261
+ **Fix:** Add `target_products` section to `project.yml`:
262
+ ```yaml
263
+ target_products:
264
+ - product_id: "product-id"
265
+ prefix: "PRX"
266
+ ```
267
+
268
+ #### TS-PROJ-004: Target products must exist (4.0)
269
+
270
+ **Error:** `Target product 'X' does not exist in products/`
271
+
272
+ **Fix Options:**
273
+ 1. Create the product folder and configuration
274
+ 2. Correct the product reference in project.yml
275
+
105
276
  ---
106
277
 
107
278
  ### 4.2 Feature Rules (TS-FEAT)
108
279
 
109
280
  #### TS-FEAT-001: Feature file required for story link
110
281
 
111
- **Error:** `Referenced feature 'F-XXX' not found in features/`
282
+ **Error:** `Referenced feature 'f-PRX-XXX' not found in features/`
112
283
 
113
284
  **Fix Options:**
114
- 1. Create missing feature file: `features/F-XXX-description.md`
285
+ 1. Create missing feature file: `products/<product>/features/f-PRX-XXX-description.md`
115
286
  2. Correct the feature reference in the story
116
287
 
117
288
  #### TS-FEAT-002: Feature must include canon sections
@@ -217,27 +388,50 @@ Replace any TBD/placeholder text with actual criteria.
217
388
  1. Check all DoR items: `- [x] Item`
218
389
  2. Move story out of `ready-for-development/` folder
219
390
 
391
+ #### TS-STORY-006: Story must link to Epic (4.0)
392
+
393
+ **Error:** `Story filename must include Epic ID (s-eXXX-YYY-description.md)`
394
+
395
+ **Fix:** Rename story file to include Epic ID:
396
+ ```
397
+ # Before
398
+ s-001-user-login.md
399
+
400
+ # After
401
+ s-e001-001-user-login.md
402
+ ```
403
+
404
+ Update all cross-references (dev plans, test cases).
405
+
406
+ #### TS-STORY-007: Linked Epic must exist (4.0)
407
+
408
+ **Error:** `Referenced Epic eXXX does not exist in epics folder`
409
+
410
+ **Fix Options:**
411
+ 1. Create the missing Epic: `epics/epic-PRX-XXX-description.md`
412
+ 2. Correct the Epic reference in the story filename
413
+
220
414
  ---
221
415
 
222
- ### 4.4 ADR Rules (TS-ADR)
416
+ ### 4.4 Technical Architecture Rules (TS-TA)
223
417
 
224
- #### TS-ADR-001: ADR required when architecture marked
418
+ #### TS-TA-001: TA required when architecture marked
225
419
 
226
- **Error:** `Story has "ADR Required" checked but no ADR reference found`
420
+ **Error:** `Story has "TA Required" checked but no TA reference found`
227
421
 
228
422
  **Fix Options:**
229
- 1. Create ADR and add reference: `See ADR-XXX for details`
230
- 2. Uncheck "ADR Required" checkbox if not needed
423
+ 1. Create TA and add reference: `See ta-PRX-XXX for details`
424
+ 2. Uncheck "TA Required" checkbox if not needed
231
425
 
232
- #### TS-ADR-002: ADR must link to features
426
+ #### TS-TA-002: TA must link to features
233
427
 
234
- **Error:** `ADR must link to at least one feature`
428
+ **Error:** `TA must link to at least one feature`
235
429
 
236
- **Fix:** Add to ADR:
430
+ **Fix:** Add to TA:
237
431
  ```markdown
238
432
  ## Related Features
239
433
 
240
- - [F-001](../features/F-001-description.md) — Feature Name
434
+ - [f-PRX-001](../../products/<product>/features/f-PRX-001-description.md) — Feature Name
241
435
  ```
242
436
 
243
437
  ---
@@ -248,12 +442,12 @@ Replace any TBD/placeholder text with actual criteria.
248
442
 
249
443
  **Error:** `Story is in sprint but dev plan is missing`
250
444
 
251
- **Fix:** Create `dev-plans/story-XXX-tasks.md`:
445
+ **Fix:** Create `dev-plans/dp-eXXX-sYYY-tasks.md`:
252
446
  ```markdown
253
- # Dev Plan: S-XXX
447
+ # Dev Plan: s-eXXX-YYY
254
448
 
255
449
  ## Story Reference
256
- [S-XXX](../stories/.../S-XXX-description.md)
450
+ [s-eXXX-YYY](../stories/.../s-eXXX-YYY-description.md)
257
451
 
258
452
  ## Tasks
259
453
 
@@ -273,51 +467,113 @@ Replace any TBD/placeholder text with actual criteria.
273
467
 
274
468
  ### 4.6 DoD Rules (TS-DOD)
275
469
 
276
- #### TS-DOD-001: Canon must be updated when behavior changes
470
+ #### TS-DOD-001: Canon sync before Done (Modified in 4.0)
277
471
 
278
- **Error:** `Story is marked Done with behavior changes but Feature Canon not updated`
472
+ **Error:** `Story is marked Done with behavior changes but Feature-Increment TO-BE incomplete`
473
+
474
+ **4.0 Logic:** Story cannot be Done if it affects behavior AND linked Feature-Increment TO-BE is incomplete.
279
475
 
280
476
  **Fix Options:**
281
- 1. Update linked feature's "Current Behavior" section, then check DoD item `[x] Feature Canon updated`
282
- 2. Uncheck "Adds Behavior" / "Changes Behavior" if no actual behavior change
477
+ 1. Complete the Feature-Increment TO-BE section
478
+ 2. Mark DoD item `[x] FI TO-BE complete`
479
+ 3. Uncheck "Adds Behavior" / "Changes Behavior" if no actual behavior change
480
+
481
+ #### TS-DOD-003: Product sync after deployment (4.0)
482
+
483
+ **Error:** `Project deployed but Product Canon not synced. Run ts:po sync`
484
+
485
+ **Fix:** Execute Product Canon sync (PO role required):
486
+ ```
487
+ ts:po sync --project <project-id>
488
+ ```
489
+
490
+ This merges approved Feature-Increment TO-BE content into Product Canon features.
283
491
 
284
492
  ---
285
493
 
286
494
  ### 4.7 Naming Rules (TS-NAMING)
287
495
 
288
- #### TS-NAMING-FEATURE: Feature file naming
496
+ #### TS-NAMING-FEATURE: Feature file naming (4.0)
289
497
 
290
- **Error:** `Feature file 'X' does not match naming convention: F-NNN-description.md`
498
+ **Error:** `Feature file 'X' does not match naming convention: f-PRX-NNN-description.md`
291
499
 
292
- **Pattern:** `F-001-description.md`
293
- - `F-` prefix required
500
+ **Pattern:** `f-PRX-001-description.md`
501
+ - `f-` prefix required (lowercase)
502
+ - `PRX` = product prefix (3-4 uppercase chars)
294
503
  - `NNN` = 3+ digit number
295
504
  - `description` = lowercase with hyphens
296
505
 
297
506
  **Fix Checklist:**
298
507
  1. Rename file
299
- 2. Update header: `# F-001: Description`
508
+ 2. Update header: `# f-PRX-001: Description`
300
509
  3. Update internal ID reference
301
510
  4. Update all cross-references
302
511
 
303
- #### TS-NAMING-STORY: Story file naming
512
+ #### TS-NAMING-STORY: Story file naming (4.0)
304
513
 
305
- **Error:** `Story file 'X' does not match naming convention: S-NNN-description.md`
514
+ **Error:** `Story file 'X' does not match naming convention: s-eXXX-YYY-description.md`
306
515
 
307
- **Pattern:** `S-001-description.md`
516
+ **Pattern:** `s-e001-001-description.md`
517
+ - `s-` prefix for story
518
+ - `eXXX` = epic number
519
+ - `YYY` = story sequence within epic
308
520
 
309
521
  **Fix Checklist:**
310
522
  1. Rename file
311
- 2. Update header: `# S-001: Description`
312
- 3. Update cross-references in features, dev-plans
523
+ 2. Update header: `# s-eXXX-YYY: Description`
524
+ 3. Update cross-references in dev-plans, test cases
525
+
526
+ #### TS-NAMING-TA: Technical Architecture file naming
527
+
528
+ **Pattern:** `ta-PRX-NNN-description.md` or `tai-PRX-NNN-description.md` (increment)
313
529
 
314
- #### TS-NAMING-ADR: ADR file naming
530
+ **Examples:**
531
+ - ✅ `ta-DIT-001-auth-strategy.md`
532
+ - ✅ `tai-CRM-003-api-versioning.md`
533
+ - ❌ `ADR-001-something.md` (legacy pattern)
315
534
 
316
- **Pattern:** `ADR-001-description.md`
535
+ #### TS-NAMING-SD: Solution Design file naming
317
536
 
318
- #### TS-NAMING-DEVPLAN: Dev plan file naming
537
+ **Pattern:** `sd-PRX-NNN-description.md` or `sdi-PRX-NNN-description.md` (increment)
319
538
 
320
- **Pattern:** `story-001-tasks.md` (matches story number)
539
+ **Examples:**
540
+ - ✅ `sd-DIT-001-combat-module.md`
541
+ - ✅ `sdi-CRM-002-contact-sync.md`
542
+
543
+ #### TS-NAMING-DEVPLAN: Dev plan file naming (4.0)
544
+
545
+ **Pattern:** `dp-eXXX-sYYY-tasks.md` (**explicit: e=epic, s=story**)
546
+
547
+ **Examples:**
548
+ - ✅ `dp-e001-s001-tasks.md` (for story `s-e001-001`)
549
+ - ❌ `dp-s-e001-001-tasks.md` (wrong: mirrors story instead of explicit prefix)
550
+ - ❌ `story-001-tasks.md` (legacy 2.0 pattern)
551
+
552
+ #### TS-NAMING-007: Feature-Increment naming (4.0)
553
+
554
+ **Pattern:** `fi-PRX-XXX-description.md`
555
+
556
+ **Examples:**
557
+ - ✅ `fi-DIT-001-combat-v2.md`
558
+ - ✅ `fi-CRM-042-contacts-update.md`
559
+ - ❌ `FI-DIT-001-something.md` (prefix must be lowercase)
560
+ - ❌ `fi-001-something.md` (missing PRX)
561
+
562
+ **Fix Checklist:**
563
+ 1. Extract PRX from target product
564
+ 2. Rename file to match pattern
565
+ 3. Update header
566
+ 4. Update Epic references
567
+
568
+ #### TS-NAMING-008: Product folder naming (4.0)
569
+
570
+ **Pattern:** `lowercase-with-dashes`
571
+
572
+ **Examples:**
573
+ - ✅ `dnd-initiative-tracker`
574
+ - ✅ `user-management`
575
+ - ❌ `CheckoutSystem` (no uppercase)
576
+ - ❌ `checkout_system` (no underscores)
321
577
 
322
578
  ---
323
579
 
@@ -327,40 +583,50 @@ When renaming files, ALWAYS update:
327
583
 
328
584
  | Location | What to Update |
329
585
  |----------|----------------|
330
- | **File itself** | Header (e.g., `# F-001:` or `# S-001:`) |
331
- | **File itself** | Internal ID references (e.g., `Feature ID: F-001`) |
332
- | **Stories** | Feature links in Linked Features section |
586
+ | **File itself** | Header (e.g., `# f-PRX-001:` or `# s-eXXX-YYY:`) |
587
+ | **File itself** | Internal ID references |
588
+ | **Stories** | Epic reference in filename, feature links |
333
589
  | **Features** | Story references in Story Ledger |
334
- | **Dev plans** | Story references |
335
- | **ADRs** | Feature references |
336
- | **Index files** | features-index.md, etc. |
590
+ | **Dev plans** | Story references (dp-eXXX-sYYY pattern) |
591
+ | **TA/SD** | Feature references |
592
+ | **Index files** | features-index.md, products-index.md, etc. |
593
+ | **Epics** | Feature-Increment references |
594
+ | **FIs** | Feature and Product references |
337
595
 
338
596
  ---
339
597
 
340
- ## 6. Example Session
598
+ ## 6. Example Session (4.0)
341
599
 
342
600
  ```
343
601
  > teamspec lint --project my-project
344
602
 
345
- 📄 projects/my-project/project.yml
346
- ❌ [TS-PROJ-002] project.yml is missing required field: 'status'
603
+ 📄 products/my-product/product.yml
604
+ ❌ [TS-PROD-002] product.yml is missing required field: 'product.prefix'
347
605
 
348
- 📄 projects/my-project/features/FEAT-001-login.md
349
- ⚠️ [TS-NAMING-FEATURE] Feature file does not match naming convention
606
+ 📄 projects/my-project/stories/backlog/s-001-login.md
607
+ [TS-STORY-006] Story filename must include Epic ID (s-eXXX-YYY-description.md)
350
608
 
351
- Summary: 1 error, 1 warning
609
+ 📄 projects/my-project/feature-increments/fi-001-login-update.md
610
+ ⚠️ [TS-NAMING-007] Feature-Increment file does not match naming convention
611
+
612
+ Summary: 2 errors, 1 warning
352
613
 
353
614
  --- AGENT ACTIONS ---
354
615
 
355
- 1. Edit project.yml:
356
- - Add: status: "active"
616
+ 1. Edit product.yml:
617
+ - Add: prefix: "MYP"
618
+
619
+ 2. Rename story file:
620
+ - s-001-login.md → s-e001-001-login.md
621
+ - Update header: # S-001 → # s-e001-001
622
+ - Update dev plan reference (if exists)
357
623
 
358
- 2. Rename feature file:
359
- - FEAT-001-login.md → F-001-login.md
360
- - Update header: # FEAT-001 → # F-001
361
- - Search for cross-references (none found)
624
+ 3. Rename feature-increment file:
625
+ - fi-001-login-update.md → fi-MYP-001-login-update.md
626
+ - Update header
627
+ - Update Epic references
362
628
 
363
- 3. Verify:
629
+ 4. Verify:
364
630
  > teamspec lint --project my-project
365
631
  ✅ No issues found
366
632
 
@@ -372,9 +638,13 @@ Summary: 1 error, 1 warning
372
638
  ## 7. Escalation
373
639
 
374
640
  If a fix requires **business judgment** (not mechanical):
375
- - Flag to human: "This fix requires BA/FA decision"
376
- - Example: Missing feature content, ambiguous requirements
641
+ - Flag to human: "This fix requires BA/FA/PO decision"
642
+ - Example: Missing feature content, ambiguous requirements, PRX assignment
377
643
 
378
644
  If a fix would **delete content**:
379
645
  - STOP and ask for confirmation
380
646
  - Never auto-delete existing documentation
647
+
648
+ If a fix involves **PRX changes**:
649
+ - PRX is immutable once assigned
650
+ - Escalate to PO for guidance