@arvorco/relentless 0.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 (107) hide show
  1. package/.claude/commands/relentless.analyze.md +20 -0
  2. package/.claude/commands/relentless.checklist.md +15 -0
  3. package/.claude/commands/relentless.clarify.md +19 -0
  4. package/.claude/commands/relentless.constitution.md +78 -0
  5. package/.claude/commands/relentless.implement.md +15 -0
  6. package/.claude/commands/relentless.plan.md +22 -0
  7. package/.claude/commands/relentless.plan.old.md +89 -0
  8. package/.claude/commands/relentless.specify.md +254 -0
  9. package/.claude/commands/relentless.tasks.md +25 -0
  10. package/.claude/commands/relentless.taskstoissues.md +15 -0
  11. package/.claude/settings.local.json +23 -0
  12. package/.claude/skills/analyze/SKILL.md +149 -0
  13. package/.claude/skills/checklist/SKILL.md +173 -0
  14. package/.claude/skills/checklist/templates/checklist-template.md +40 -0
  15. package/.claude/skills/clarify/SKILL.md +174 -0
  16. package/.claude/skills/constitution/SKILL.md +150 -0
  17. package/.claude/skills/constitution/templates/constitution-template.md +228 -0
  18. package/.claude/skills/implement/SKILL.md +141 -0
  19. package/.claude/skills/plan/SKILL.md +179 -0
  20. package/.claude/skills/plan/templates/plan-template.md +104 -0
  21. package/.claude/skills/prd/SKILL.md +242 -0
  22. package/.claude/skills/relentless/SKILL.md +265 -0
  23. package/.claude/skills/specify/SKILL.md +220 -0
  24. package/.claude/skills/specify/scripts/bash/check-prerequisites.sh +166 -0
  25. package/.claude/skills/specify/scripts/bash/common.sh +156 -0
  26. package/.claude/skills/specify/scripts/bash/create-new-feature.sh +305 -0
  27. package/.claude/skills/specify/scripts/bash/setup-plan.sh +61 -0
  28. package/.claude/skills/specify/scripts/bash/update-agent-context.sh +799 -0
  29. package/.claude/skills/specify/templates/spec-template.md +115 -0
  30. package/.claude/skills/tasks/SKILL.md +202 -0
  31. package/.claude/skills/tasks/templates/tasks-template.md +251 -0
  32. package/.claude/skills/taskstoissues/SKILL.md +97 -0
  33. package/.specify/memory/constitution.md +50 -0
  34. package/.specify/scripts/bash/check-prerequisites.sh +166 -0
  35. package/.specify/scripts/bash/common.sh +156 -0
  36. package/.specify/scripts/bash/create-new-feature.sh +297 -0
  37. package/.specify/scripts/bash/setup-plan.sh +61 -0
  38. package/.specify/scripts/bash/update-agent-context.sh +799 -0
  39. package/.specify/templates/agent-file-template.md +28 -0
  40. package/.specify/templates/checklist-template.md +40 -0
  41. package/.specify/templates/plan-template.md +104 -0
  42. package/.specify/templates/spec-template.md +115 -0
  43. package/.specify/templates/tasks-template.md +251 -0
  44. package/CHANGES_SUMMARY.md +255 -0
  45. package/CLAUDE.md +92 -0
  46. package/GEMINI_SETUP.md +256 -0
  47. package/LICENSE +21 -0
  48. package/README.md +1171 -0
  49. package/REFACTOR_SUMMARY.md +267 -0
  50. package/bin/relentless.ts +536 -0
  51. package/bun.lock +352 -0
  52. package/eslint.config.js +37 -0
  53. package/package.json +61 -0
  54. package/prd.json.example +64 -0
  55. package/prompt.md +108 -0
  56. package/ralph.sh +80 -0
  57. package/relentless/config.json +38 -0
  58. package/relentless/features/.gitkeep +0 -0
  59. package/relentless/features/ghsk-ideas/prd.json +229 -0
  60. package/relentless/features/ghsk-ideas/prd.md +191 -0
  61. package/relentless/features/ghsk-ideas/progress.txt +408 -0
  62. package/relentless/prompt.md +79 -0
  63. package/skills/checklist/SKILL.md +349 -0
  64. package/skills/clarify/SKILL.md +476 -0
  65. package/skills/prd/SKILL.md +242 -0
  66. package/skills/relentless/SKILL.md +268 -0
  67. package/skills/tasks/SKILL.md +577 -0
  68. package/src/agents/amp.ts +115 -0
  69. package/src/agents/claude.ts +185 -0
  70. package/src/agents/codex.ts +89 -0
  71. package/src/agents/droid.ts +90 -0
  72. package/src/agents/gemini.ts +109 -0
  73. package/src/agents/index.ts +16 -0
  74. package/src/agents/opencode.ts +88 -0
  75. package/src/agents/registry.ts +95 -0
  76. package/src/agents/types.ts +101 -0
  77. package/src/config/index.ts +8 -0
  78. package/src/config/loader.ts +237 -0
  79. package/src/config/schema.ts +115 -0
  80. package/src/execution/index.ts +8 -0
  81. package/src/execution/router.ts +49 -0
  82. package/src/execution/runner.ts +512 -0
  83. package/src/index.ts +11 -0
  84. package/src/init/index.ts +7 -0
  85. package/src/init/scaffolder.ts +377 -0
  86. package/src/prd/analyzer.ts +512 -0
  87. package/src/prd/index.ts +11 -0
  88. package/src/prd/issues.ts +249 -0
  89. package/src/prd/parser.ts +281 -0
  90. package/src/prd/progress.ts +198 -0
  91. package/src/prd/types.ts +170 -0
  92. package/src/tui/App.tsx +85 -0
  93. package/src/tui/TUIRunner.tsx +400 -0
  94. package/src/tui/components/AgentOutput.tsx +45 -0
  95. package/src/tui/components/AgentStatus.tsx +64 -0
  96. package/src/tui/components/CurrentStory.tsx +66 -0
  97. package/src/tui/components/Header.tsx +49 -0
  98. package/src/tui/components/ProgressBar.tsx +39 -0
  99. package/src/tui/components/StoryGrid.tsx +86 -0
  100. package/src/tui/hooks/useTUI.ts +147 -0
  101. package/src/tui/hooks/useTimer.ts +51 -0
  102. package/src/tui/index.tsx +17 -0
  103. package/src/tui/theme.ts +41 -0
  104. package/src/tui/types.ts +77 -0
  105. package/templates/constitution.md +228 -0
  106. package/templates/plan.md +273 -0
  107. package/tsconfig.json +27 -0
@@ -0,0 +1,28 @@
1
+ # [PROJECT NAME] Development Guidelines
2
+
3
+ Auto-generated from all feature plans. Last updated: [DATE]
4
+
5
+ ## Active Technologies
6
+
7
+ [EXTRACTED FROM ALL PLAN.MD FILES]
8
+
9
+ ## Project Structure
10
+
11
+ ```text
12
+ [ACTUAL STRUCTURE FROM PLANS]
13
+ ```
14
+
15
+ ## Commands
16
+
17
+ [ONLY COMMANDS FOR ACTIVE TECHNOLOGIES]
18
+
19
+ ## Code Style
20
+
21
+ [LANGUAGE-SPECIFIC, ONLY FOR LANGUAGES IN USE]
22
+
23
+ ## Recent Changes
24
+
25
+ [LAST 3 FEATURES AND WHAT THEY ADDED]
26
+
27
+ <!-- MANUAL ADDITIONS START -->
28
+ <!-- MANUAL ADDITIONS END -->
@@ -0,0 +1,40 @@
1
+ # [CHECKLIST TYPE] Checklist: [FEATURE NAME]
2
+
3
+ **Purpose**: [Brief description of what this checklist covers]
4
+ **Created**: [DATE]
5
+ **Feature**: [Link to spec.md or relevant documentation]
6
+
7
+ **Note**: This checklist is generated by the `/relentless.checklist` command based on feature context and requirements.
8
+
9
+ <!--
10
+ ============================================================================
11
+ IMPORTANT: The checklist items below are SAMPLE ITEMS for illustration only.
12
+
13
+ The /relentless.checklist command MUST replace these with actual items based on:
14
+ - User's specific checklist request
15
+ - Feature requirements from spec.md
16
+ - Technical context from plan.md
17
+ - Implementation details from tasks.md
18
+
19
+ DO NOT keep these sample items in the generated checklist file.
20
+ ============================================================================
21
+ -->
22
+
23
+ ## [Category 1]
24
+
25
+ - [ ] CHK001 First checklist item with clear action
26
+ - [ ] CHK002 Second checklist item
27
+ - [ ] CHK003 Third checklist item
28
+
29
+ ## [Category 2]
30
+
31
+ - [ ] CHK004 Another category item
32
+ - [ ] CHK005 Item with specific criteria
33
+ - [ ] CHK006 Final item in this category
34
+
35
+ ## Notes
36
+
37
+ - Check items off as completed: `[x]`
38
+ - Add comments or findings inline
39
+ - Link to relevant resources or documentation
40
+ - Items are numbered sequentially for easy reference
@@ -0,0 +1,104 @@
1
+ # Implementation Plan: [FEATURE]
2
+
3
+ **Branch**: `[###-feature-name]` | **Date**: [DATE] | **Spec**: [link]
4
+ **Input**: Feature specification from `/specs/[###-feature-name]/spec.md`
5
+
6
+ **Note**: This template is filled in by the `/relentless.plan` command. See `.specify/templates/commands/plan.md` for the execution workflow.
7
+
8
+ ## Summary
9
+
10
+ [Extract from feature spec: primary requirement + technical approach from research]
11
+
12
+ ## Technical Context
13
+
14
+ <!--
15
+ ACTION REQUIRED: Replace the content in this section with the technical details
16
+ for the project. The structure here is presented in advisory capacity to guide
17
+ the iteration process.
18
+ -->
19
+
20
+ **Language/Version**: [e.g., Python 3.11, Swift 5.9, Rust 1.75 or NEEDS CLARIFICATION]
21
+ **Primary Dependencies**: [e.g., FastAPI, UIKit, LLVM or NEEDS CLARIFICATION]
22
+ **Storage**: [if applicable, e.g., PostgreSQL, CoreData, files or N/A]
23
+ **Testing**: [e.g., pytest, XCTest, cargo test or NEEDS CLARIFICATION]
24
+ **Target Platform**: [e.g., Linux server, iOS 15+, WASM or NEEDS CLARIFICATION]
25
+ **Project Type**: [single/web/mobile - determines source structure]
26
+ **Performance Goals**: [domain-specific, e.g., 1000 req/s, 10k lines/sec, 60 fps or NEEDS CLARIFICATION]
27
+ **Constraints**: [domain-specific, e.g., <200ms p95, <100MB memory, offline-capable or NEEDS CLARIFICATION]
28
+ **Scale/Scope**: [domain-specific, e.g., 10k users, 1M LOC, 50 screens or NEEDS CLARIFICATION]
29
+
30
+ ## Constitution Check
31
+
32
+ *GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.*
33
+
34
+ [Gates determined based on constitution file]
35
+
36
+ ## Project Structure
37
+
38
+ ### Documentation (this feature)
39
+
40
+ ```text
41
+ specs/[###-feature]/
42
+ ├── plan.md # This file (/relentless.plan command output)
43
+ ├── research.md # Phase 0 output (/relentless.plan command)
44
+ ├── data-model.md # Phase 1 output (/relentless.plan command)
45
+ ├── quickstart.md # Phase 1 output (/relentless.plan command)
46
+ ├── contracts/ # Phase 1 output (/relentless.plan command)
47
+ └── tasks.md # Phase 2 output (/relentless.tasks command - NOT created by /relentless.plan)
48
+ ```
49
+
50
+ ### Source Code (repository root)
51
+ <!--
52
+ ACTION REQUIRED: Replace the placeholder tree below with the concrete layout
53
+ for this feature. Delete unused options and expand the chosen structure with
54
+ real paths (e.g., apps/admin, packages/something). The delivered plan must
55
+ not include Option labels.
56
+ -->
57
+
58
+ ```text
59
+ # [REMOVE IF UNUSED] Option 1: Single project (DEFAULT)
60
+ src/
61
+ ├── models/
62
+ ├── services/
63
+ ├── cli/
64
+ └── lib/
65
+
66
+ tests/
67
+ ├── contract/
68
+ ├── integration/
69
+ └── unit/
70
+
71
+ # [REMOVE IF UNUSED] Option 2: Web application (when "frontend" + "backend" detected)
72
+ backend/
73
+ ├── src/
74
+ │ ├── models/
75
+ │ ├── services/
76
+ │ └── api/
77
+ └── tests/
78
+
79
+ frontend/
80
+ ├── src/
81
+ │ ├── components/
82
+ │ ├── pages/
83
+ │ └── services/
84
+ └── tests/
85
+
86
+ # [REMOVE IF UNUSED] Option 3: Mobile + API (when "iOS/Android" detected)
87
+ api/
88
+ └── [same as backend above]
89
+
90
+ ios/ or android/
91
+ └── [platform-specific structure: feature modules, UI flows, platform tests]
92
+ ```
93
+
94
+ **Structure Decision**: [Document the selected structure and reference the real
95
+ directories captured above]
96
+
97
+ ## Complexity Tracking
98
+
99
+ > **Fill ONLY if Constitution Check has violations that must be justified**
100
+
101
+ | Violation | Why Needed | Simpler Alternative Rejected Because |
102
+ |-----------|------------|-------------------------------------|
103
+ | [e.g., 4th project] | [current need] | [why 3 projects insufficient] |
104
+ | [e.g., Repository pattern] | [specific problem] | [why direct DB access insufficient] |
@@ -0,0 +1,115 @@
1
+ # Feature Specification: [FEATURE NAME]
2
+
3
+ **Feature Branch**: `[###-feature-name]`
4
+ **Created**: [DATE]
5
+ **Status**: Draft
6
+ **Input**: User description: "$ARGUMENTS"
7
+
8
+ ## User Scenarios & Testing *(mandatory)*
9
+
10
+ <!--
11
+ IMPORTANT: User stories should be PRIORITIZED as user journeys ordered by importance.
12
+ Each user story/journey must be INDEPENDENTLY TESTABLE - meaning if you implement just ONE of them,
13
+ you should still have a viable MVP (Minimum Viable Product) that delivers value.
14
+
15
+ Assign priorities (P1, P2, P3, etc.) to each story, where P1 is the most critical.
16
+ Think of each story as a standalone slice of functionality that can be:
17
+ - Developed independently
18
+ - Tested independently
19
+ - Deployed independently
20
+ - Demonstrated to users independently
21
+ -->
22
+
23
+ ### User Story 1 - [Brief Title] (Priority: P1)
24
+
25
+ [Describe this user journey in plain language]
26
+
27
+ **Why this priority**: [Explain the value and why it has this priority level]
28
+
29
+ **Independent Test**: [Describe how this can be tested independently - e.g., "Can be fully tested by [specific action] and delivers [specific value]"]
30
+
31
+ **Acceptance Scenarios**:
32
+
33
+ 1. **Given** [initial state], **When** [action], **Then** [expected outcome]
34
+ 2. **Given** [initial state], **When** [action], **Then** [expected outcome]
35
+
36
+ ---
37
+
38
+ ### User Story 2 - [Brief Title] (Priority: P2)
39
+
40
+ [Describe this user journey in plain language]
41
+
42
+ **Why this priority**: [Explain the value and why it has this priority level]
43
+
44
+ **Independent Test**: [Describe how this can be tested independently]
45
+
46
+ **Acceptance Scenarios**:
47
+
48
+ 1. **Given** [initial state], **When** [action], **Then** [expected outcome]
49
+
50
+ ---
51
+
52
+ ### User Story 3 - [Brief Title] (Priority: P3)
53
+
54
+ [Describe this user journey in plain language]
55
+
56
+ **Why this priority**: [Explain the value and why it has this priority level]
57
+
58
+ **Independent Test**: [Describe how this can be tested independently]
59
+
60
+ **Acceptance Scenarios**:
61
+
62
+ 1. **Given** [initial state], **When** [action], **Then** [expected outcome]
63
+
64
+ ---
65
+
66
+ [Add more user stories as needed, each with an assigned priority]
67
+
68
+ ### Edge Cases
69
+
70
+ <!--
71
+ ACTION REQUIRED: The content in this section represents placeholders.
72
+ Fill them out with the right edge cases.
73
+ -->
74
+
75
+ - What happens when [boundary condition]?
76
+ - How does system handle [error scenario]?
77
+
78
+ ## Requirements *(mandatory)*
79
+
80
+ <!--
81
+ ACTION REQUIRED: The content in this section represents placeholders.
82
+ Fill them out with the right functional requirements.
83
+ -->
84
+
85
+ ### Functional Requirements
86
+
87
+ - **FR-001**: System MUST [specific capability, e.g., "allow users to create accounts"]
88
+ - **FR-002**: System MUST [specific capability, e.g., "validate email addresses"]
89
+ - **FR-003**: Users MUST be able to [key interaction, e.g., "reset their password"]
90
+ - **FR-004**: System MUST [data requirement, e.g., "persist user preferences"]
91
+ - **FR-005**: System MUST [behavior, e.g., "log all security events"]
92
+
93
+ *Example of marking unclear requirements:*
94
+
95
+ - **FR-006**: System MUST authenticate users via [NEEDS CLARIFICATION: auth method not specified - email/password, SSO, OAuth?]
96
+ - **FR-007**: System MUST retain user data for [NEEDS CLARIFICATION: retention period not specified]
97
+
98
+ ### Key Entities *(include if feature involves data)*
99
+
100
+ - **[Entity 1]**: [What it represents, key attributes without implementation]
101
+ - **[Entity 2]**: [What it represents, relationships to other entities]
102
+
103
+ ## Success Criteria *(mandatory)*
104
+
105
+ <!--
106
+ ACTION REQUIRED: Define measurable success criteria.
107
+ These must be technology-agnostic and measurable.
108
+ -->
109
+
110
+ ### Measurable Outcomes
111
+
112
+ - **SC-001**: [Measurable metric, e.g., "Users can complete account creation in under 2 minutes"]
113
+ - **SC-002**: [Measurable metric, e.g., "System handles 1000 concurrent users without degradation"]
114
+ - **SC-003**: [User satisfaction metric, e.g., "90% of users successfully complete primary task on first attempt"]
115
+ - **SC-004**: [Business metric, e.g., "Reduce support tickets related to [X] by 50%"]
@@ -0,0 +1,251 @@
1
+ ---
2
+
3
+ description: "Task list template for feature implementation"
4
+ ---
5
+
6
+ # Tasks: [FEATURE NAME]
7
+
8
+ **Input**: Design documents from `/specs/[###-feature-name]/`
9
+ **Prerequisites**: plan.md (required), spec.md (required for user stories), research.md, data-model.md, contracts/
10
+
11
+ **Tests**: The examples below include test tasks. Tests are OPTIONAL - only include them if explicitly requested in the feature specification.
12
+
13
+ **Organization**: Tasks are grouped by user story to enable independent implementation and testing of each story.
14
+
15
+ ## Format: `[ID] [P?] [Story] Description`
16
+
17
+ - **[P]**: Can run in parallel (different files, no dependencies)
18
+ - **[Story]**: Which user story this task belongs to (e.g., US1, US2, US3)
19
+ - Include exact file paths in descriptions
20
+
21
+ ## Path Conventions
22
+
23
+ - **Single project**: `src/`, `tests/` at repository root
24
+ - **Web app**: `backend/src/`, `frontend/src/`
25
+ - **Mobile**: `api/src/`, `ios/src/` or `android/src/`
26
+ - Paths shown below assume single project - adjust based on plan.md structure
27
+
28
+ <!--
29
+ ============================================================================
30
+ IMPORTANT: The tasks below are SAMPLE TASKS for illustration purposes only.
31
+
32
+ The /relentless.tasks command MUST replace these with actual tasks based on:
33
+ - User stories from spec.md (with their priorities P1, P2, P3...)
34
+ - Feature requirements from plan.md
35
+ - Entities from data-model.md
36
+ - Endpoints from contracts/
37
+
38
+ Tasks MUST be organized by user story so each story can be:
39
+ - Implemented independently
40
+ - Tested independently
41
+ - Delivered as an MVP increment
42
+
43
+ DO NOT keep these sample tasks in the generated tasks.md file.
44
+ ============================================================================
45
+ -->
46
+
47
+ ## Phase 1: Setup (Shared Infrastructure)
48
+
49
+ **Purpose**: Project initialization and basic structure
50
+
51
+ - [ ] T001 Create project structure per implementation plan
52
+ - [ ] T002 Initialize [language] project with [framework] dependencies
53
+ - [ ] T003 [P] Configure linting and formatting tools
54
+
55
+ ---
56
+
57
+ ## Phase 2: Foundational (Blocking Prerequisites)
58
+
59
+ **Purpose**: Core infrastructure that MUST be complete before ANY user story can be implemented
60
+
61
+ **⚠️ CRITICAL**: No user story work can begin until this phase is complete
62
+
63
+ Examples of foundational tasks (adjust based on your project):
64
+
65
+ - [ ] T004 Setup database schema and migrations framework
66
+ - [ ] T005 [P] Implement authentication/authorization framework
67
+ - [ ] T006 [P] Setup API routing and middleware structure
68
+ - [ ] T007 Create base models/entities that all stories depend on
69
+ - [ ] T008 Configure error handling and logging infrastructure
70
+ - [ ] T009 Setup environment configuration management
71
+
72
+ **Checkpoint**: Foundation ready - user story implementation can now begin in parallel
73
+
74
+ ---
75
+
76
+ ## Phase 3: User Story 1 - [Title] (Priority: P1) 🎯 MVP
77
+
78
+ **Goal**: [Brief description of what this story delivers]
79
+
80
+ **Independent Test**: [How to verify this story works on its own]
81
+
82
+ ### Tests for User Story 1 (OPTIONAL - only if tests requested) ⚠️
83
+
84
+ > **NOTE: Write these tests FIRST, ensure they FAIL before implementation**
85
+
86
+ - [ ] T010 [P] [US1] Contract test for [endpoint] in tests/contract/test_[name].py
87
+ - [ ] T011 [P] [US1] Integration test for [user journey] in tests/integration/test_[name].py
88
+
89
+ ### Implementation for User Story 1
90
+
91
+ - [ ] T012 [P] [US1] Create [Entity1] model in src/models/[entity1].py
92
+ - [ ] T013 [P] [US1] Create [Entity2] model in src/models/[entity2].py
93
+ - [ ] T014 [US1] Implement [Service] in src/services/[service].py (depends on T012, T013)
94
+ - [ ] T015 [US1] Implement [endpoint/feature] in src/[location]/[file].py
95
+ - [ ] T016 [US1] Add validation and error handling
96
+ - [ ] T017 [US1] Add logging for user story 1 operations
97
+
98
+ **Checkpoint**: At this point, User Story 1 should be fully functional and testable independently
99
+
100
+ ---
101
+
102
+ ## Phase 4: User Story 2 - [Title] (Priority: P2)
103
+
104
+ **Goal**: [Brief description of what this story delivers]
105
+
106
+ **Independent Test**: [How to verify this story works on its own]
107
+
108
+ ### Tests for User Story 2 (OPTIONAL - only if tests requested) ⚠️
109
+
110
+ - [ ] T018 [P] [US2] Contract test for [endpoint] in tests/contract/test_[name].py
111
+ - [ ] T019 [P] [US2] Integration test for [user journey] in tests/integration/test_[name].py
112
+
113
+ ### Implementation for User Story 2
114
+
115
+ - [ ] T020 [P] [US2] Create [Entity] model in src/models/[entity].py
116
+ - [ ] T021 [US2] Implement [Service] in src/services/[service].py
117
+ - [ ] T022 [US2] Implement [endpoint/feature] in src/[location]/[file].py
118
+ - [ ] T023 [US2] Integrate with User Story 1 components (if needed)
119
+
120
+ **Checkpoint**: At this point, User Stories 1 AND 2 should both work independently
121
+
122
+ ---
123
+
124
+ ## Phase 5: User Story 3 - [Title] (Priority: P3)
125
+
126
+ **Goal**: [Brief description of what this story delivers]
127
+
128
+ **Independent Test**: [How to verify this story works on its own]
129
+
130
+ ### Tests for User Story 3 (OPTIONAL - only if tests requested) ⚠️
131
+
132
+ - [ ] T024 [P] [US3] Contract test for [endpoint] in tests/contract/test_[name].py
133
+ - [ ] T025 [P] [US3] Integration test for [user journey] in tests/integration/test_[name].py
134
+
135
+ ### Implementation for User Story 3
136
+
137
+ - [ ] T026 [P] [US3] Create [Entity] model in src/models/[entity].py
138
+ - [ ] T027 [US3] Implement [Service] in src/services/[service].py
139
+ - [ ] T028 [US3] Implement [endpoint/feature] in src/[location]/[file].py
140
+
141
+ **Checkpoint**: All user stories should now be independently functional
142
+
143
+ ---
144
+
145
+ [Add more user story phases as needed, following the same pattern]
146
+
147
+ ---
148
+
149
+ ## Phase N: Polish & Cross-Cutting Concerns
150
+
151
+ **Purpose**: Improvements that affect multiple user stories
152
+
153
+ - [ ] TXXX [P] Documentation updates in docs/
154
+ - [ ] TXXX Code cleanup and refactoring
155
+ - [ ] TXXX Performance optimization across all stories
156
+ - [ ] TXXX [P] Additional unit tests (if requested) in tests/unit/
157
+ - [ ] TXXX Security hardening
158
+ - [ ] TXXX Run quickstart.md validation
159
+
160
+ ---
161
+
162
+ ## Dependencies & Execution Order
163
+
164
+ ### Phase Dependencies
165
+
166
+ - **Setup (Phase 1)**: No dependencies - can start immediately
167
+ - **Foundational (Phase 2)**: Depends on Setup completion - BLOCKS all user stories
168
+ - **User Stories (Phase 3+)**: All depend on Foundational phase completion
169
+ - User stories can then proceed in parallel (if staffed)
170
+ - Or sequentially in priority order (P1 → P2 → P3)
171
+ - **Polish (Final Phase)**: Depends on all desired user stories being complete
172
+
173
+ ### User Story Dependencies
174
+
175
+ - **User Story 1 (P1)**: Can start after Foundational (Phase 2) - No dependencies on other stories
176
+ - **User Story 2 (P2)**: Can start after Foundational (Phase 2) - May integrate with US1 but should be independently testable
177
+ - **User Story 3 (P3)**: Can start after Foundational (Phase 2) - May integrate with US1/US2 but should be independently testable
178
+
179
+ ### Within Each User Story
180
+
181
+ - Tests (if included) MUST be written and FAIL before implementation
182
+ - Models before services
183
+ - Services before endpoints
184
+ - Core implementation before integration
185
+ - Story complete before moving to next priority
186
+
187
+ ### Parallel Opportunities
188
+
189
+ - All Setup tasks marked [P] can run in parallel
190
+ - All Foundational tasks marked [P] can run in parallel (within Phase 2)
191
+ - Once Foundational phase completes, all user stories can start in parallel (if team capacity allows)
192
+ - All tests for a user story marked [P] can run in parallel
193
+ - Models within a story marked [P] can run in parallel
194
+ - Different user stories can be worked on in parallel by different team members
195
+
196
+ ---
197
+
198
+ ## Parallel Example: User Story 1
199
+
200
+ ```bash
201
+ # Launch all tests for User Story 1 together (if tests requested):
202
+ Task: "Contract test for [endpoint] in tests/contract/test_[name].py"
203
+ Task: "Integration test for [user journey] in tests/integration/test_[name].py"
204
+
205
+ # Launch all models for User Story 1 together:
206
+ Task: "Create [Entity1] model in src/models/[entity1].py"
207
+ Task: "Create [Entity2] model in src/models/[entity2].py"
208
+ ```
209
+
210
+ ---
211
+
212
+ ## Implementation Strategy
213
+
214
+ ### MVP First (User Story 1 Only)
215
+
216
+ 1. Complete Phase 1: Setup
217
+ 2. Complete Phase 2: Foundational (CRITICAL - blocks all stories)
218
+ 3. Complete Phase 3: User Story 1
219
+ 4. **STOP and VALIDATE**: Test User Story 1 independently
220
+ 5. Deploy/demo if ready
221
+
222
+ ### Incremental Delivery
223
+
224
+ 1. Complete Setup + Foundational → Foundation ready
225
+ 2. Add User Story 1 → Test independently → Deploy/Demo (MVP!)
226
+ 3. Add User Story 2 → Test independently → Deploy/Demo
227
+ 4. Add User Story 3 → Test independently → Deploy/Demo
228
+ 5. Each story adds value without breaking previous stories
229
+
230
+ ### Parallel Team Strategy
231
+
232
+ With multiple developers:
233
+
234
+ 1. Team completes Setup + Foundational together
235
+ 2. Once Foundational is done:
236
+ - Developer A: User Story 1
237
+ - Developer B: User Story 2
238
+ - Developer C: User Story 3
239
+ 3. Stories complete and integrate independently
240
+
241
+ ---
242
+
243
+ ## Notes
244
+
245
+ - [P] tasks = different files, no dependencies
246
+ - [Story] label maps task to specific user story for traceability
247
+ - Each user story should be independently completable and testable
248
+ - Verify tests fail before implementing
249
+ - Commit after each task or logical group
250
+ - Stop at any checkpoint to validate story independently
251
+ - Avoid: vague tasks, same file conflicts, cross-story dependencies that break independence