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,7 +1,10 @@
1
1
  # Definition of Done (DoD)
2
2
 
3
- > **Version:** 2.0
4
- > **Owner:** QA (validates completeness), SM (enforces at sprint close)
3
+ > **Version:** 4.0
4
+ > **Status:** Normative
5
+ > **Owner:** FA (gates story completion)
6
+ > **Verifier:** QA (validates acceptance criteria)
7
+ > **Source:** [registry.yml](../registry.yml)
5
8
 
6
9
  A story is **Done** when ALL of the following are satisfied.
7
10
 
@@ -9,121 +12,81 @@ A story is **Done** when ALL of the following are satisfied.
9
12
 
10
13
  ## Mandatory Checklist
11
14
 
12
- ### 1. Code Complete
15
+ Before a story moves to `done/`:
13
16
 
14
- | Check | Required |
15
- |-------|----------|
16
- | All tasks in dev plan marked complete | ✓ |
17
- | Code merged to main/develop branch | ✓ |
18
- | No outstanding TODOs in code (for this story) | ✓ |
19
-
20
- ### 2. Tests Pass ✓
17
+ ### 1. Acceptance Criteria Verified ✓
21
18
 
22
19
  | Check | Required |
23
20
  |-------|----------|
24
- | Unit tests written and passing | ✓ |
25
- | Integration tests passing (if applicable) | ✓ |
26
- | Test coverage meets team threshold | ✓ |
27
-
28
- **Linter Rule:** `TS-DOD-002` — Tests are feature-level
21
+ | All ACs tested and passing | ✓ |
22
+ | QA sign-off obtained | ✓ |
23
+ | No critical bugs outstanding | ✓ |
29
24
 
30
- ### 3. Code Reviewed
25
+ ### 2. Code Complete
31
26
 
32
27
  | Check | Required |
33
28
  |-------|----------|
34
- | Pull request reviewed and approved | ✓ |
35
- | All review comments addressed | ✓ |
29
+ | Code reviewed and approved | ✓ |
30
+ | Code merged to main/develop branch | ✓ |
36
31
  | CI/CD pipeline passing | ✓ |
37
32
 
38
- ### 4. Acceptance Criteria Verified
33
+ ### 3. Tests Passing
39
34
 
40
35
  | Check | Required |
41
36
  |-------|----------|
42
- | All ACs tested and passing | ✓ |
43
- | QA sign-off obtained | ✓ |
44
- | No critical bugs outstanding | ✓ |
37
+ | Unit tests written and passing | ✓ |
38
+ | Integration tests passing (if applicable) | ✓ |
39
+ | All automated tests green | ✓ |
45
40
 
46
- ### 5. Feature Canon Updated (CRITICAL)
41
+ ### 4. Feature-Increment Complete
47
42
 
48
43
  | Check | Required |
49
44
  |-------|----------|
50
- | Feature file updated to reflect new behavior | ✓ |
51
- | Change Log entry added with story reference | ✓ |
52
- | Story Ledger updated | ✓ |
53
- | FA verified Canon sync | ✓ |
54
-
55
- **Linter Rule:** `TS-DOD-001` — Canon sync required before Done
45
+ | Feature-Increment TO-BE section complete | ✓ |
46
+ | TO-BE accurately reflects implemented behavior | ✓ |
47
+ | Ready for deployment | ✓ |
56
48
 
57
- > ⚠️ **A story CANNOT be Done if it changes behavior and the Feature Canon is NOT updated.**
49
+ **Note:** Feature-Increment TO-BE is merged into Product Canon AFTER deployment via `ts:po sync`.
58
50
 
59
51
  ---
60
52
 
61
- ## Canon Sync Process
53
+ ## What Done Does NOT Include
62
54
 
63
- Before marking a story Done:
55
+ | Action | When It Happens |
56
+ |--------|-----------------|
57
+ | Deployment to production | After DoD, during sprint close |
58
+ | Canon sync (`ts:po sync`) | After deployment + QA verification |
59
+ | Regression test update | At Deployment Verification Gate |
64
60
 
65
- 1. **FA runs `ts:fa sync`** Updates Feature Canon
66
- 2. **FA updates Change Log** — Links to story ID
67
- 3. **FA updates Story Ledger** — Records in `features/story-ledger.md`
68
- 4. **QA verifies** — Tests match updated Canon
69
-
70
- ### Change Log Entry Format
71
-
72
- ```markdown
73
- | Date | Story | Change Summary | Author |
74
- |------|-------|----------------|--------|
75
- | YYYY-MM-DD | S-XXX | Brief description | FA Name |
76
- ```
77
-
78
- ### Story Ledger Entry Format
79
-
80
- ```markdown
81
- | Story ID | Title | Sprint | Features Modified | Merged Date |
82
- |----------|-------|--------|-------------------|-------------|
83
- | S-XXX | Story title | Sprint N | F-001, F-002 | YYYY-MM-DD |
84
- ```
61
+ > ⚠️ **Canon is NEVER updated at DoD.** Canon sync happens POST-DEPLOY only.
85
62
 
86
63
  ---
87
64
 
88
- ## Optional (Profile-Dependent)
89
-
90
- These checks apply based on team profile:
91
-
92
- ### Regulated Profile
65
+ ## Enforcement
93
66
 
94
- | Check | Applies To |
95
- |-------|------------|
96
- | Compliance checklist signed off | regulated |
97
- | Audit trail documented | regulated |
98
- | Release notes updated | regulated |
99
-
100
- ### Enterprise Profile
101
-
102
- | Check | Applies To |
103
- |-------|------------|
104
- | Documentation updated | enterprise |
105
- | Stakeholder notification sent | enterprise |
67
+ | Actor | Responsibility |
68
+ |-------|----------------|
69
+ | FA | Marks story Done after QA verification |
70
+ | QA | Verifies all ACs, provides sign-off |
71
+ | DEV | Ensures code complete and merged |
72
+ | Linter | Automated validation via `teamspec lint` |
106
73
 
107
74
  ---
108
75
 
109
- ## Sprint Close Verification
76
+ ## Story State Flow
110
77
 
111
- At sprint close, SM verifies:
78
+ ```
79
+ backlog/ → ready-to-refine/ → in-progress/ → done/
80
+ ↑ │
81
+ DoR gate DoD gate
82
+ ```
112
83
 
113
- | Check | Owner |
114
- |-------|-------|
115
- | All "Done" stories have Canon sync | SM |
116
- | Story Ledger is current | FA |
117
- | No orphan stories (behavior change without Canon update) | QA |
84
+ After `done/`, story proceeds to deployment and eventually Canon sync.
118
85
 
119
86
  ---
120
87
 
121
- ## Quick Reference
122
-
123
- ```
124
- DoD = Code + Tests + Review + ACs + Feature Canon Updated
125
- ```
126
-
127
- **Most Common Failure:** Story marked "Done" without updating Feature Canon.
88
+ ## Related
128
89
 
129
- If Canon is not updated, the story is **NOT DONE**.
90
+ - [Definition of Ready](definition-of-ready.md)
91
+ - [Gates Overview](../gates.md)
92
+ - [Registry (Source of Truth)](../registry.yml)
@@ -1,7 +1,10 @@
1
1
  # Definition of Ready (DoR)
2
2
 
3
- > **Version:** 2.0
4
- > **Owner:** FA (gates story readiness), SM (enforces in sprint planning)
3
+ > **Version:** 4.0
4
+ > **Status:** Normative
5
+ > **Owner:** FA (gates story readiness)
6
+ > **Verifier:** SM (enforces in sprint planning)
7
+ > **Source:** [registry.yml](../registry.yml)
5
8
 
6
9
  A story is **Ready** for development when ALL of the following are satisfied.
7
10
 
@@ -9,26 +12,27 @@ A story is **Ready** for development when ALL of the following are satisfied.
9
12
 
10
13
  ## Mandatory Checklist
11
14
 
12
- ### 1. Feature Canon Link ✓
15
+ Before a story enters `in-progress/`:
16
+
17
+ ### 1. Epic Link ✓
13
18
 
14
19
  | Check | Required |
15
20
  |-------|----------|
16
- | Story links to existing Feature(s) in Feature Canon | ✓ |
17
- | Feature file exists in `features/` folder | ✓ |
18
- | Feature link uses correct format: `[F-XXX](../../features/F-XXX-name.md)` | ✓ |
21
+ | Story linked to Epic via filename (`s-eXXX-YYY-*.md`) | ✓ |
22
+ | Epic file exists in `projects/{project-id}/epics/` | ✓ |
19
23
 
20
- **Linter Rule:** `TS-STORY-001` — Feature link required
24
+ **Linter Rule:** `TS-STORY-001` — Epic link required
21
25
 
22
- ### 2. Delta Format
26
+ ### 2. Feature-Increment Reference
23
27
 
24
28
  | Check | Required |
25
29
  |-------|----------|
26
- | Story uses Before/After delta format | ✓ |
27
- | "Before" section references Feature Canon | ✓ |
28
- | "After" section describes ONLY the change | ✓ |
29
- | Story does NOT restate full feature behavior | ✓ |
30
+ | Story references a Feature-Increment (`fi-PRX-NNN-*.md`) | ✓ |
31
+ | Feature-Increment file exists in `projects/{project-id}/feature-increments/` | ✓ |
32
+ | Feature-Increment has AS-IS section (current Canon state) | ✓ |
33
+ | Feature-Increment has TO-BE section (proposed change) | ✓ |
30
34
 
31
- **Linter Rule:** `TS-STORY-002` — Delta-only format required
35
+ **Linter Rule:** `TS-FI-001` — AS-IS/TO-BE required
32
36
 
33
37
  ### 3. Acceptance Criteria ✓
34
38
 
@@ -36,69 +40,40 @@ A story is **Ready** for development when ALL of the following are satisfied.
36
40
  |-------|----------|
37
41
  | All ACs are testable (Given/When/Then or clear assertions) | ✓ |
38
42
  | No ambiguous terms ("should work well", "user-friendly") | ✓ |
39
- | ACs cover the delta, not the entire feature | ✓ |
43
+ | ACs describe the delta (change), not full feature behavior | ✓ |
40
44
 
41
45
  **Linter Rule:** `TS-STORY-003` — ACs must be testable
42
46
 
43
- ### 4. FA Acceptance Gate
47
+ ### 4. No Placeholders
44
48
 
45
49
  | Check | Required |
46
50
  |-------|----------|
47
- | FA has reviewed and initialed the story | ✓ |
48
- | FA confirms delta is correctly scoped | ✓ |
49
- | FA confirms feature link is correct | ✓ |
51
+ | No TBD/TODO/placeholder content in story | ✓ |
52
+ | No TBD/TODO content in linked Feature-Increment | ✓ |
50
53
 
51
- **Gate:** FA Acceptance section complete in story
54
+ **Linter Rule:** `TS-CONTENT-001` No placeholder content
52
55
 
53
- ### 5. Dev Plan Exists
56
+ ### 5. Estimate Assigned
54
57
 
55
58
  | Check | Required |
56
59
  |-------|----------|
57
- | Dev plan file exists in `dev-plans/` | ✓ |
58
- | Story links to dev plan | ✓ |
59
- | Dev plan has no TBD/TODO items | ✓ |
60
-
61
- **Linter Rule:** `TS-DEVPLAN-001` — Dev plan required before implementation
62
-
63
- ---
64
-
65
- ## Optional (Profile-Dependent)
66
-
67
- These checks apply based on team profile:
68
-
69
- ### Regulated Profile
70
-
71
- | Check | Applies To |
72
- |-------|------------|
73
- | Risk assessment completed | regulated |
74
- | Compliance impact documented | regulated |
75
- | Sign-off from compliance officer | regulated |
76
-
77
- ### Enterprise Profile
78
-
79
- | Check | Applies To |
80
- |-------|------------|
81
- | Architecture review completed | enterprise |
82
- | Cross-team dependencies identified | enterprise |
60
+ | Story has estimate (points or time) | ✓ |
61
+ | Estimate is realistic based on dev plan | ✓ |
83
62
 
84
63
  ---
85
64
 
86
- ## Workflow Gate
87
-
88
- Stories MUST be in `stories/ready-for-development/` folder to enter sprint.
65
+ ## Enforcement
89
66
 
90
- | From Folder | To Folder | Owner |
91
- |-------------|-----------|-------|
92
- | `backlog/` | `ready-to-refine/` | FA |
93
- | `ready-to-refine/` | `ready-for-development/` | DEV (after refinement) |
94
- | `ready-for-development/` | Sprint | SM (sprint planning) |
67
+ | Actor | Responsibility |
68
+ |-------|----------------|
69
+ | FA | Creates story, ensures all content is complete |
70
+ | SM | Verifies checklist before sprint planning |
71
+ | Linter | Automated validation via `teamspec lint` |
95
72
 
96
73
  ---
97
74
 
98
- ## Quick Reference
99
-
100
- ```
101
- DoR = Feature Link + Delta Format + Testable ACs + FA Gate + Dev Plan
102
- ```
75
+ ## Related
103
76
 
104
- If any check fails, the story is **NOT READY** for development.
77
+ - [Definition of Done](definition-of-done.md)
78
+ - [Gates Overview](../gates.md)
79
+ - [Registry (Source of Truth)](../registry.yml)