specpro-cli 0.1.0__py3-none-any.whl

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 (76) hide show
  1. specpro_cli/__init__.py +16 -0
  2. specpro_cli/assets/commands/specpro.analyze.md +1102 -0
  3. specpro_cli/assets/commands/specpro.checklist.md +335 -0
  4. specpro_cli/assets/commands/specpro.clarify.md +581 -0
  5. specpro_cli/assets/commands/specpro.constitution.md +488 -0
  6. specpro_cli/assets/commands/specpro.feature.md +115 -0
  7. specpro_cli/assets/commands/specpro.implement.md +1881 -0
  8. specpro_cli/assets/commands/specpro.manual-test.md +206 -0
  9. specpro_cli/assets/commands/specpro.plan.md +3284 -0
  10. specpro_cli/assets/commands/specpro.qc.md +1489 -0
  11. specpro_cli/assets/commands/specpro.scenarios.md +154 -0
  12. specpro_cli/assets/commands/specpro.specify.md +1449 -0
  13. specpro_cli/assets/commands/specpro.status.md +863 -0
  14. specpro_cli/assets/commands/specpro.tasks.md +1207 -0
  15. specpro_cli/assets/commands/specpro.test-implement.md +462 -0
  16. specpro_cli/assets/commands/specpro.test-plan.md +383 -0
  17. specpro_cli/assets/commands/specpro.user-manual.md +178 -0
  18. specpro_cli/assets/scripts/bash/check-anti-coupling.sh +293 -0
  19. specpro_cli/assets/scripts/bash/check-prerequisites.sh +176 -0
  20. specpro_cli/assets/scripts/bash/common.sh +88 -0
  21. specpro_cli/assets/scripts/bash/create-new-feature.sh +336 -0
  22. specpro_cli/assets/scripts/bash/qc-auto-fix.sh +121 -0
  23. specpro_cli/assets/scripts/bash/setup-plan.sh +60 -0
  24. specpro_cli/assets/scripts/bash/verify-cumulative-records.sh +203 -0
  25. specpro_cli/assets/scripts/bash/verify-deliverables-tracked.sh +147 -0
  26. specpro_cli/assets/scripts/bash/verify-deployment.sh +239 -0
  27. specpro_cli/assets/scripts/bash/verify-frontmatter-yaml.sh +63 -0
  28. specpro_cli/assets/scripts/bash/verify-ledger.sh +376 -0
  29. specpro_cli/assets/scripts/bash/verify-shapes.sh +1082 -0
  30. specpro_cli/assets/scripts/git-hooks/pre-commit +243 -0
  31. specpro_cli/assets/scripts/install-git-hooks.sh +67 -0
  32. specpro_cli/assets/scripts/powershell/check-anti-coupling.ps1 +249 -0
  33. specpro_cli/assets/scripts/powershell/check-prerequisites.ps1 +148 -0
  34. specpro_cli/assets/scripts/powershell/common.ps1 +95 -0
  35. specpro_cli/assets/scripts/powershell/create-new-feature.ps1 +229 -0
  36. specpro_cli/assets/scripts/powershell/qc-auto-fix.ps1 +110 -0
  37. specpro_cli/assets/scripts/powershell/setup-plan.ps1 +61 -0
  38. specpro_cli/assets/scripts/powershell/verify-cumulative-records.ps1 +133 -0
  39. specpro_cli/assets/scripts/powershell/verify-deliverables-tracked.ps1 +112 -0
  40. specpro_cli/assets/scripts/powershell/verify-deployment.ps1 +278 -0
  41. specpro_cli/assets/scripts/powershell/verify-frontmatter-yaml.ps1 +56 -0
  42. specpro_cli/assets/scripts/powershell/verify-ledger.ps1 +383 -0
  43. specpro_cli/assets/scripts/powershell/verify-shapes.ps1 +978 -0
  44. specpro_cli/assets/templates/agent-context-template.md +49 -0
  45. specpro_cli/assets/templates/assumptions-template.md +248 -0
  46. specpro_cli/assets/templates/checklist-template.md +40 -0
  47. specpro_cli/assets/templates/clarifications-template.md +155 -0
  48. specpro_cli/assets/templates/constitution-template.md +50 -0
  49. specpro_cli/assets/templates/feature-spec-template.md +66 -0
  50. specpro_cli/assets/templates/plan-overview-template.md +150 -0
  51. specpro_cli/assets/templates/plan-template.md +387 -0
  52. specpro_cli/assets/templates/protocol-golden-bytes-guide.md +195 -0
  53. specpro_cli/assets/templates/requirements-template.md +356 -0
  54. specpro_cli/assets/templates/spec-template.md +267 -0
  55. specpro_cli/assets/templates/tasks-template.md +252 -0
  56. specpro_cli/assets/templates/test-tasks-template.md +174 -0
  57. specpro_cli/cli/__init__.py +5 -0
  58. specpro_cli/cli/cmd_init.py +416 -0
  59. specpro_cli/cli/cmd_remove.py +122 -0
  60. specpro_cli/cli/entry.py +181 -0
  61. specpro_cli/integrations/__init__.py +36 -0
  62. specpro_cli/integrations/base.py +601 -0
  63. specpro_cli/integrations/claude/__init__.py +101 -0
  64. specpro_cli/integrations/copilot/__init__.py +153 -0
  65. specpro_cli/integrations/cursor_agent/__init__.py +51 -0
  66. specpro_cli/integrations/gemini/__init__.py +44 -0
  67. specpro_cli/integrations/opencode/__init__.py +48 -0
  68. specpro_cli/integrations/qodercli/__init__.py +54 -0
  69. specpro_cli/integrations/registry.py +88 -0
  70. specpro_cli/packaged/__init__.py +5 -0
  71. specpro_cli/packaged/sync.py +106 -0
  72. specpro_cli-0.1.0.dist-info/METADATA +117 -0
  73. specpro_cli-0.1.0.dist-info/RECORD +76 -0
  74. specpro_cli-0.1.0.dist-info/WHEEL +4 -0
  75. specpro_cli-0.1.0.dist-info/entry_points.txt +2 -0
  76. specpro_cli-0.1.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,267 @@
1
+ # Feature Specification: [FEATURE NAME]
2
+
3
+ **Version**: [VERSION]
4
+ **Last Updated**: [DATE]
5
+ **Status**: Draft | Active | Deprecated
6
+ **Input**: User description: "$ARGUMENTS"
7
+
8
+ ---
9
+
10
+ ## Overview *(mandatory)*
11
+
12
+ [What this feature is, who it is for, and what problem it solves — the reader's entry
13
+ point to the spec. Two or three sentences; the requirements below carry the detail.]
14
+
15
+ ---
16
+
17
+ <!--
18
+ ============================================================================
19
+ USER STORY WRITING GUIDE - READ CAREFULLY BEFORE PROCEEDING
20
+ ============================================================================
21
+
22
+ PART 1: INDEPENDENT TEST
23
+
24
+ Purpose: Enable non-technical PMs/stakeholders to verify features
25
+
26
+ KEY FORMULA:
27
+ Independent Test = [Specific Action] + [Observable Result] + [User Value]
28
+
29
+ QUALITY CHECKLIST:
30
+ □ Concrete: Can actually perform the test
31
+ □ Observable: Results are visible without code
32
+ □ Non-technical: No coding or technical tools needed
33
+ □ Independent: Can verify without other features
34
+ □ Valuable: Delivers clear user value
35
+
36
+ GOOD EXAMPLE (US2 - Remote Viewing):
37
+ "1. Launch the remote desktop app
38
+ 2. Enter 192.168.1.100:5900 in the connection input field
39
+ 3. Click the 'Connect' button
40
+ 4. Observe the remote window open (< 3 seconds)
41
+ 5. Open a text editor on the student computer and type some text
42
+ 6. See the typed content appear on the teacher's screen (< 200ms latency)
43
+ 7. Click 'Disconnect'; the window closes with no errors
44
+
45
+ Pass criteria: all steps complete smoothly, latency acceptable, no crashes
46
+ User value: the teacher can monitor student computers in real time and step in promptly"
47
+
48
+ BAD EXAMPLE:
49
+ ❌ "Test that the connection works" (too vague)
50
+ ❌ "Verify the protocol implementation" (technical)
51
+
52
+ ===========================================================================
53
+
54
+ PART 2: ACCEPTANCE SCENARIOS
55
+
56
+ Purpose: Comprehensive scenario coverage (5-9 scenarios per User Story)
57
+
58
+ COVERAGE REQUIREMENTS:
59
+ - Total: 5-9 scenarios per User Story
60
+ - Happy Path: 1-2 scenarios (core success case)
61
+ - Error Scenarios: 2-3 scenarios (error handling and recovery)
62
+ - Edge Cases: 1-2 scenarios (boundary conditions, constraints)
63
+ - Permission Scenarios: 1-2 scenarios (access control, authentication)
64
+
65
+ FORMAT:
66
+ Given [initial state]
67
+ When [action]
68
+ Then [expected outcome]
69
+
70
+ QUALITY CHECKLIST:
71
+ □ Functional: Describes WHAT, not HOW
72
+ □ Observable: Results can be seen/verified
73
+ □ Specific: Clear state, action, outcome
74
+ □ Independent: Each scenario stands alone
75
+ □ Complete: Covers all 4 scenario types
76
+
77
+ EXAMPLE (US2 - Remote Viewing - 7 scenarios):
78
+
79
+ Happy Path (1-2):
80
+ 1. Given the teacher opens the remote viewing app and enters a valid server address 192.168.1.100:5900,
81
+ When clicking the "Connect" button,
82
+ Then the connection is established within 3 seconds and the remote desktop window opens showing the student's full desktop
83
+
84
+ 2. Given a remote connection is established and the teacher can see the student's desktop,
85
+ When the student performs actions on their computer (opening apps, typing, moving windows),
86
+ Then the teacher's screen reflects all changes within 200ms
87
+
88
+ Error Scenarios (2-3):
89
+ 3. Given the teacher opens the app and enters an invalid server address 192.168.1.999:5900,
90
+ When clicking the "Connect" button,
91
+ Then a friendly error message appears within 5 seconds: "Cannot connect to the server. Please check: 1) the server address, 2) that the server is running, 3) the network connection"
92
+
93
+ 4. Given a remote connection is established and the teacher is viewing the student's desktop,
94
+ When the network suddenly drops (unplug the cable or turn off Wi-Fi),
95
+ Then the app detects the disconnection within 10 seconds, shows "Connection lost, reconnecting...", and attempts auto-reconnect 3 times within 30 seconds
96
+
97
+ Edge Cases (1-2):
98
+ 5. Given a remote connection is established and a static desktop is displayed (using lossless encoding),
99
+ When the student starts playing a video (screen content becomes dynamic),
100
+ Then the app detects the content change within 2 seconds, switches to lossy H.264 encoding automatically, and video plays smoothly (> 15 FPS)
101
+
102
+ 6. Given a remote connection is established and the student's screen resolution is 1920x1080,
103
+ When the student changes the resolution dynamically (e.g., to 2560x1440 or down to 1280x720),
104
+ Then the app detects the resolution change and resizes the remote window seamlessly without reconnecting
105
+
106
+ Permission Scenarios (1-2):
107
+ 7. Given the server is password protected,
108
+ When the teacher attempts to connect without a password or with a wrong password,
109
+ Then a password dialog appears; a wrong password shows "Incorrect password, please retry" and the correct password connects successfully
110
+
111
+ COMMON MISTAKES:
112
+ ❌ Too few scenarios (<5): Missing edge cases or error handling
113
+ ❌ Too many scenarios (>9): Story is too large, needs splitting
114
+ ❌ Missing scenario type: Incomplete coverage
115
+ ❌ Technical details: "Database returns error" (should be: "System shows error message")
116
+ ❌ Vague outcomes: "Should work" (should be: "User sees confirmation message")
117
+ ❌ Performance metrics in scenarios: Use performance metrics in FR, not scenarios
118
+ (Exception: User-perceivable metrics like "200ms latency" are acceptable)
119
+
120
+ ===========================================================================
121
+ -->
122
+
123
+ ## Change Summary *(auto-generated on update)*
124
+
125
+ **Current Version**: [VERSION]
126
+ **Previous Version**: [PREV_VERSION] (if applicable)
127
+ **Update Type**: [Initial | Feature Addition | Refactor | Breaking Change | Bug Fix]
128
+
129
+ ### Changes Overview
130
+
131
+ - **Added**: N new User Stories, M new Requirements
132
+ - **Modified**: X existing items
133
+ - **Deprecated**: Y items (marked as deprecated, kept for reference)
134
+
135
+ <!-- ⚠️ **A four-table `### Detailed Changes` block used to sit here, and it was DELETED, not
136
+ moved** (`T239` / `ISS-212`). Two reasons, both checkable:
137
+ · **No consumer**: `grep -rn 'Detailed Changes' templates/ commands/` matched the heading
138
+ itself and nothing else — the sibling `### Changes Overview` *is* read (`specpro.specify.md`
139
+ greps it to build the commit message); this block was not.
140
+ · **It restated** what the per-item `**Lifecycle**:` fields and `### Changes Overview`
141
+ already carry — a second source for the same fact (形态 3), and the rule two paragraphs
142
+ down says why that is not allowed to stand.
143
+ ⇒ **Do not restore it.** Need the per-item detail? Read that item's own Lifecycle field —
144
+ that is the single source. -->
145
+ > Change Summary logs CHANGED items only ([create]/[update]/[deprecated]);
146
+ > unchanged items receive no entry (their Lifecycle fields stay as-is).
147
+ >
148
+ > ⚠️ **Never write a REMOVED value back into the summary.** When this block says
149
+ > it stopped restating something, point at the thing itself (the field, the
150
+ > section, the artifact) — **do not quote what was removed**, not even as a
151
+ > quotation in backticks. A value sitting in prose is **indistinguishable from a
152
+ > real Lifecycle field to any mechanical reader** (a `grep`, a leg count, a
153
+ > propagation scan), and a human scanning the file takes it as current. The rule
154
+ > is about the *action* of restating, not about the one instance that prompted
155
+ > it: it applies equally to counts and to identifiers.
156
+
157
+ ---
158
+
159
+ ## User Scenarios & Testing *(mandatory)*
160
+
161
+ <!--
162
+ IMPORTANT: User stories should be PRIORITIZED as user journeys ordered by importance.
163
+ Each user story/journey must be INDEPENDENTLY TESTABLE - meaning if you implement just ONE of them,
164
+ you should still have a viable MVP (Minimum Viable Product) that delivers value.
165
+
166
+ Assign priorities (P1, P2, P3, etc.) to each story, where P1 is the most critical.
167
+ Think of each story as a standalone slice of functionality that can be:
168
+ - Developed independently
169
+ - Tested independently
170
+ - Deployed independently
171
+ - Demonstrated to users independently
172
+ -->
173
+
174
+ ### US1 - [Brief Title] (Priority: P1)
175
+
176
+ **Lifecycle**: [specify:create][plan:create][tasks:create]
177
+
178
+ [Describe this user journey in plain language]
179
+
180
+ **Why this priority**: [Explain the value and why it has this priority level]
181
+
182
+ **Independent Test**: [Describe how this can be tested independently - e.g., "Can be fully tested by [specific action] and delivers [specific value]"]
183
+
184
+ **Acceptance Scenarios**:
185
+
186
+ 1. **Given** [initial state], **When** [action], **Then** [expected outcome]
187
+ 2. **Given** [initial state], **When** [action], **Then** [expected outcome]
188
+
189
+ ---
190
+
191
+ ### US2 - [Brief Title] (Priority: P2)
192
+
193
+ **Lifecycle**: [specify:create][plan:create][tasks:create]
194
+
195
+ [Describe this user journey in plain language]
196
+
197
+ **Why this priority**: [Explain the value and why it has this priority level]
198
+
199
+ **Independent Test**: [Describe how this can be tested independently]
200
+
201
+ **Acceptance Scenarios**:
202
+
203
+ 1. **Given** [initial state], **When** [action], **Then** [expected outcome]
204
+
205
+ ---
206
+
207
+ ### US3 - [Brief Title] (Priority: P3)
208
+
209
+ **Lifecycle**: [specify:create][plan:create][tasks:create]
210
+
211
+ [Describe this user journey in plain language]
212
+
213
+ **Why this priority**: [Explain the value and why it has this priority level]
214
+
215
+ **Independent Test**: [Describe how this can be tested independently]
216
+
217
+ **Acceptance Scenarios**:
218
+
219
+ 1. **Given** [initial state], **When** [action], **Then** [expected outcome]
220
+
221
+ ---
222
+
223
+ [Add more user stories as needed, each with an assigned priority]
224
+
225
+ ---
226
+
227
+ ## Requirements *(mandatory)*
228
+
229
+ ### Functional Requirements
230
+
231
+ All functional requirements are organized under the **"System MUST"** format and grouped by User Story for clear traceability.
232
+
233
+ #### [User Story Title] (US[ID])
234
+
235
+ - **FR-XXX**: [Requirement Title]
236
+ **Lifecycle**: [specify:create][plan:create][tasks:create]
237
+ System MUST [specific requirement].
238
+
239
+ - **FR-XXX**: [Requirement Title]
240
+ **Lifecycle**: [specify:create][plan:create][tasks:create]
241
+ System MUST [specific requirement].
242
+
243
+ #### [Another User Story Title] (US[ID])
244
+
245
+ - **FR-XXX**: [Requirement Title]
246
+ **Lifecycle**: [specify:create][plan:create][tasks:create]
247
+ System MUST [specific requirement].
248
+
249
+ ---
250
+
251
+ ## External Dependencies *(if applicable)*
252
+
253
+ [The outside systems this feature's requirements depend on — and, for each, the product's
254
+ behaviour when that system cannot be reached. ⚠️ Name the **functional** dependency (the
255
+ system the product talks to), never the library, protocol or vendor product that happens to
256
+ implement the connection: the implementation may change while the dependency stays the same.
257
+ Omit this section entirely when the feature depends on no outside system.]
258
+
259
+ - [Outside system] — [the product's behaviour when that system cannot be reached]
260
+
261
+ ---
262
+
263
+ ## Constitution Constraints *(if applicable)*
264
+
265
+ [Add constitution constraints if any]
266
+
267
+ ---
@@ -0,0 +1,252 @@
1
+ ---
2
+
3
+ description: "Task list template for feature implementation"
4
+ ---
5
+
6
+ # Tasks: [FEATURE NAME]
7
+
8
+ **Input**: Design documents from `/specs/`
9
+ **Prerequisites**: plan.md (required), spec.md (required for user stories), research.md, data-model.md, contracts/
10
+
11
+ **Tests**: Unit test tasks MAY be included here (OPTIONAL - only if explicitly requested in the feature specification). High-level tests (integration / component E2E / app E2E) are NOT defined in tasks.md.
12
+
13
+ **High-Level Test Ownership**: Integration, component E2E, and application E2E tests are planned by `/specpro-test-plan` into `specs/test-tasks.md` and executed by `/specpro-test-implement`.
14
+
15
+ **Organization**: Tasks are grouped by user story to enable independent implementation and testing of each story.
16
+
17
+ ## Format: `[ID] [P?] [Story] Description`
18
+
19
+ - **[P]**: Can run in parallel (different files, no dependencies)
20
+ - **[Story]**: Which user story this task belongs to (e.g., US1, US2, US3)
21
+ - Include exact file paths in descriptions
22
+
23
+ ## Path Conventions
24
+
25
+ - **Single project**: `src/`, `tests/` at repository root
26
+ - **Web app**: `backend/src/`, `frontend/src/`
27
+ - **Mobile**: `api/src/`, `ios/src/` or `android/src/`
28
+ - Paths shown below assume single project - adjust based on plan.md structure
29
+
30
+ <!--
31
+ ============================================================================
32
+ IMPORTANT: The tasks below are SAMPLE TASKS for illustration purposes only.
33
+
34
+ The /specpro-tasks command MUST replace these with actual tasks based on:
35
+ - User stories from spec.md (with their priorities P1, P2, P3...)
36
+ - Feature requirements from plan.md
37
+ - Entities from data-model.md
38
+ - Endpoints from contracts/
39
+
40
+ Tasks MUST be organized by user story so each story can be:
41
+ - Implemented independently
42
+ - Tested independently
43
+ - Delivered as an MVP increment
44
+
45
+ DO NOT keep these sample tasks in the generated tasks.md file.
46
+ ============================================================================
47
+ -->
48
+
49
+ ## Phase 1: Setup (Shared Infrastructure)
50
+
51
+ **Purpose**: Project initialization and basic structure
52
+
53
+ - [ ] T001 Create project structure per implementation plan
54
+ - [ ] T002 Initialize [language] project with [framework] dependencies
55
+ - [ ] T003 [P] Configure linting and formatting tools
56
+
57
+ ---
58
+
59
+ ## Phase 2: Foundational (Blocking Prerequisites)
60
+
61
+ **Purpose**: Core infrastructure that MUST be complete before ANY user story can be implemented
62
+
63
+ **⚠️ CRITICAL**: No user story work can begin until this phase is complete
64
+
65
+ Examples of foundational tasks (adjust based on your project):
66
+
67
+ - [ ] T004 Setup database schema and migrations framework
68
+ - [ ] T005 [P] Implement authentication/authorization framework
69
+ - [ ] T006 [P] Setup API routing and middleware structure
70
+ - [ ] T007 Create base models/entities that all stories depend on
71
+ - [ ] T008 Configure error handling and logging infrastructure
72
+ - [ ] T009 Setup environment configuration management
73
+
74
+ **Checkpoint**: Foundation ready - user story implementation can now begin in parallel
75
+
76
+ ---
77
+
78
+ ## Phase 3: User Story 1 - [Title] (Priority: P1) 🎯 MVP
79
+
80
+ **Goal**: [Brief description of what this story delivers]
81
+
82
+ **Independent Test**: [How to verify this story works on its own]
83
+
84
+ ### Tests for User Story 1 (OPTIONAL - only if tests requested) ⚠️
85
+
86
+ > High-level tests are owned by `/specpro-test-plan` (see `specs/test-tasks.md`). Only unit-test tasks, if any, remain here.
87
+
88
+ ### Implementation for User Story 1
89
+
90
+ - [ ] T012 [P] [US1] Create [Entity1] model in src/models/[entity1].py
91
+ - [ ] T013 [P] [US1] Create [Entity2] model in src/models/[entity2].py
92
+ - [ ] T014 [US1] Implement [Service] in src/services/[service].py (depends on T012, T013)
93
+ - [ ] T015 [US1] Implement [endpoint/feature] in src/[location]/[file].py
94
+ - [ ] T016 [US1] Add validation and error handling
95
+ - [ ] T017 [US1] Add logging for user story 1 operations
96
+
97
+ **Checkpoint**: At this point, User Story 1 should be fully functional and testable independently
98
+
99
+ ---
100
+
101
+ ## Phase 4: User Story 2 - [Title] (Priority: P2)
102
+
103
+ **Goal**: [Brief description of what this story delivers]
104
+
105
+ **Independent Test**: [How to verify this story works on its own]
106
+
107
+ ### Tests for User Story 2 (OPTIONAL - only if tests requested) ⚠️
108
+
109
+ > High-level tests are owned by `/specpro-test-plan` (see `specs/test-tasks.md`). Only unit-test tasks, if any, remain here.
110
+
111
+ ### Implementation for User Story 2
112
+
113
+ - [ ] T020 [P] [US2] Create [Entity] model in src/models/[entity].py
114
+ - [ ] T021 [US2] Implement [Service] in src/services/[service].py
115
+ - [ ] T022 [US2] Implement [endpoint/feature] in src/[location]/[file].py
116
+ - [ ] T023 [US2] Integrate with User Story 1 components (if needed)
117
+
118
+ **Checkpoint**: At this point, User Stories 1 AND 2 should both work independently
119
+
120
+ ---
121
+
122
+ ## Phase 5: User Story 3 - [Title] (Priority: P3)
123
+
124
+ **Goal**: [Brief description of what this story delivers]
125
+
126
+ **Independent Test**: [How to verify this story works on its own]
127
+
128
+ ### Tests for User Story 3 (OPTIONAL - only if tests requested) ⚠️
129
+
130
+ > High-level tests are owned by `/specpro-test-plan` (see `specs/test-tasks.md`). Only unit-test tasks, if any, remain here.
131
+
132
+ ### Implementation for User Story 3
133
+
134
+ - [ ] T026 [P] [US3] Create [Entity] model in src/models/[entity].py
135
+ - [ ] T027 [US3] Implement [Service] in src/services/[service].py
136
+ - [ ] T028 [US3] Implement [endpoint/feature] in src/[location]/[file].py
137
+
138
+ **Checkpoint**: All user stories should now be independently functional
139
+
140
+ ---
141
+
142
+ [Add more user story phases as needed, following the same pattern]
143
+
144
+ ---
145
+
146
+ ## Phase N: Polish & Cross-Cutting Concerns
147
+
148
+ **Purpose**: Improvements that affect multiple user stories
149
+
150
+ - [ ] TXXX [P] Documentation updates in docs/
151
+ - [ ] TXXX Code cleanup and refactoring
152
+ - [ ] TXXX Performance optimization across all stories
153
+ - [ ] TXXX [P] Additional unit tests (if requested) in the project's REAL unit-test source set (ground the path — never invent tests/unit/)
154
+ - [ ] TXXX Security hardening
155
+ - [ ] TXXX Run quickstart.md validation
156
+
157
+ ---
158
+
159
+ ## Dependencies & Execution Order
160
+
161
+ ### Phase Dependencies
162
+
163
+ - **Setup (Phase 1)**: No dependencies - can start immediately
164
+ - **Foundational (Phase 2)**: Depends on Setup completion - BLOCKS all user stories
165
+ - **User Stories (Phase 3+)**: All depend on Foundational phase completion
166
+ - User stories can then proceed in parallel (if staffed)
167
+ - Or sequentially in priority order (P1 → P2 → P3)
168
+ - **Polish (Final Phase)**: Depends on all desired user stories being complete
169
+
170
+ ### User Story Dependencies
171
+
172
+ - **User Story 1 (P1)**: Can start after Foundational (Phase 2) - No dependencies on other stories
173
+ - **User Story 2 (P2)**: Can start after Foundational (Phase 2) - May integrate with US1 but should be independently testable
174
+ - **User Story 3 (P3)**: Can start after Foundational (Phase 2) - May integrate with US1/US2 but should be independently testable
175
+
176
+ ### Within Each User Story
177
+
178
+ - Tests (if included) MUST be written and FAIL before implementation
179
+ - Models before services
180
+ - Services before endpoints
181
+ - Core implementation before integration
182
+ - Story complete before moving to next priority
183
+
184
+ ### Parallel Opportunities
185
+
186
+ - All Setup tasks marked [P] can run in parallel
187
+ - All Foundational tasks marked [P] can run in parallel (within Phase 2)
188
+ - Once Foundational phase completes, all user stories can start in parallel (if team capacity allows)
189
+ - All tests for a user story marked [P] can run in parallel
190
+ - Models within a story marked [P] can run in parallel
191
+ - Different user stories can be worked on in parallel by different team members
192
+
193
+ ---
194
+
195
+ ## Parallel Example: User Story 1
196
+
197
+ ```bash
198
+ # Launch all tests for User Story 1 together (if tests requested):
199
+ Task: "Contract test for [endpoint] in tests/contract/test_[name].py"
200
+ Task: "Integration test for [user journey] in tests/integration/test_[name].py"
201
+
202
+ # Launch all models for User Story 1 together:
203
+ Task: "Create [Entity1] model in src/models/[entity1].py"
204
+ Task: "Create [Entity2] model in src/models/[entity2].py"
205
+ ```
206
+
207
+ ---
208
+
209
+ ## Implementation Strategy
210
+
211
+ ### MVP First (User Story 1 Only)
212
+
213
+ 1. Complete Phase 1: Setup
214
+ 2. Complete Phase 2: Foundational (CRITICAL - blocks all stories)
215
+ 3. Complete Phase 3: User Story 1
216
+ 4. **STOP and VALIDATE**: Test User Story 1 independently
217
+ 5. Deploy/demo if ready
218
+
219
+ ### Incremental Delivery
220
+
221
+ 1. Complete Setup + Foundational → Foundation ready
222
+ 2. Add User Story 1 → Test independently → Deploy/Demo (MVP!)
223
+ 3. Add User Story 2 → Test independently → Deploy/Demo
224
+ 4. Add User Story 3 → Test independently → Deploy/Demo
225
+ 5. Each story adds value without breaking previous stories
226
+
227
+ ### Parallel Team Strategy
228
+
229
+ With multiple developers:
230
+
231
+ 1. Team completes Setup + Foundational together
232
+ 2. Once Foundational is done:
233
+ - Developer A: User Story 1
234
+ - Developer B: User Story 2
235
+ - Developer C: User Story 3
236
+ 3. Stories complete and integrate independently
237
+
238
+ ---
239
+
240
+ ## Notes
241
+
242
+ - [P] tasks = different files, no dependencies
243
+ - [Story] label maps task to specific user story for traceability
244
+ - Each user story should be independently completable and testable
245
+ - Verify tests fail before implementing
246
+ - Commit after each task or logical group
247
+ - Stop at any checkpoint to validate story independently
248
+ - Avoid: vague tasks, same file conflicts, cross-story dependencies that break independence
249
+
250
+ ---
251
+
252
+ > High-level tests (integration / component E2E / app E2E) are OUT of tasks.md scope: planned by `/specpro-test-plan`, executed by `/specpro-test-implement` (see `specs/test-tasks.md`).