v0.3.0 d226234

tasks-template.md RawHistoryFolder

Tasks: [FEATURE NAME]

Input: Design documents from /specs/[###-feature-name]/ Prerequisites: plan.md (required), research.md, data-model.md, contracts/

Execution Flow (main)

1. Load plan.md from feature directory
   → If not found: ERROR "No implementation plan found"
   → Extract: tech stack, libraries, structure
2. Load optional design documents:
   → data-model.md: Extract entities → model tasks
   → contracts/: Each file → contract test task
   → research.md: Extract decisions → setup tasks
3. Generate tasks by category:
   → Setup: project init, dependencies, linting
   → Tests: contract tests, integration tests
   → Core: models, services, CLI commands
   → Integration: DB, middleware, logging
   → Polish: unit tests, performance, docs
4. Apply task rules:
   → Different files = mark [P] for parallel
   → Same file = sequential (no [P])
   → Tests before implementation (TDD)
5. Number tasks sequentially (T001, T002...)
6. Generate dependency graph
7. Create parallel execution examples
8. Validate task completeness:
   → All contracts have tests?
   → All entities have models?
   → All endpoints implemented?
9. Return: SUCCESS (tasks ready for execution)

Format: [ID] [P?] Description

  • [P]: Can run in parallel (different files, no dependencies)
  • Include exact file paths in descriptions

Path Conventions

  • Single project: src/, tests/ at repository root
  • Web app: backend/src/, frontend/src/
  • Mobile: api/src/, ios/src/ or android/src/
  • Paths shown below assume single project - adjust based on plan.md structure

Phase 3.1: Setup

  • T001 Create project structure per implementation plan
  • T002 Initialize [language] project with [framework] dependencies
  • T003 [P] Configure linting and formatting tools

Phase 3.2: Tests First (TDD) ⚠️ MUST COMPLETE BEFORE 3.3

CRITICAL: These tests MUST be written and MUST FAIL before ANY implementation

  • T004 [P] Contract test POST /api/users in tests/contract/test_users_post.py
  • T005 [P] Contract test GET /api/users/{id} in tests/contract/test_users_get.py
  • T006 [P] Integration test user registration in tests/integration/test_registration.py
  • T007 [P] Integration test auth flow in tests/integration/test_auth.py

Phase 3.3: Core Implementation (ONLY after tests are failing)

  • T008 [P] User model in src/models/user.py
  • T009 [P] UserService CRUD in src/services/user_service.py
  • T010 [P] CLI --create-user in src/cli/user_commands.py
  • T011 POST /api/users endpoint
  • T012 GET /api/users/{id} endpoint
  • T013 Input validation
  • T014 Error handling and logging

Phase 3.4: Integration

  • T015 Connect UserService to DB
  • T016 Auth middleware
  • T017 Request/response logging
  • T018 CORS and security headers

Phase 3.5: Polish

  • T019 [P] Unit tests for validation in tests/unit/test_validation.py
  • T020 Performance tests (<200ms)
  • T021 [P] Update docs/api.md
  • T022 Remove duplication
  • T023 Run manual-testing.md

Dependencies

  • Tests (T004-T007) before implementation (T008-T014)
  • T008 blocks T009, T015
  • T016 blocks T018
  • Implementation before polish (T019-T023)

Parallel Example

# Launch T004-T007 together:
Task: "Contract test POST /api/users in tests/contract/test_users_post.py"
Task: "Contract test GET /api/users/{id} in tests/contract/test_users_get.py"
Task: "Integration test registration in tests/integration/test_registration.py"
Task: "Integration test auth in tests/integration/test_auth.py"

Notes

  • [P] tasks = different files, no dependencies
  • Verify tests fail before implementing
  • Commit after each task
  • Avoid: vague tasks, same file conflicts

Task Generation Rules

Applied during main() execution

  1. From Contracts:

    • Each contract file → contract test task [P]
    • Each endpoint → implementation task
  2. From Data Model:

    • Each entity → model creation task [P]
    • Relationships → service layer tasks
  3. From User Stories:

    • Each story → integration test [P]
    • Quickstart scenarios → validation tasks
  4. Ordering:

    • Setup → Tests → Models → Services → Endpoints → Polish
    • Dependencies block parallel execution

Validation Checklist

GATE: Checked by main() before returning

  • All contracts have corresponding tests
  • All entities have model tasks
  • All tests come before implementation
  • Parallel tasks truly independent
  • Each task specifies exact file path
  • No task modifies same file as another [P] task
source
1# Tasks: [FEATURE NAME]
2
3**Input**: Design documents from `/specs/[###-feature-name]/`
4**Prerequisites**: plan.md (required), research.md, data-model.md, contracts/
5
6## Execution Flow (main)
7```
81. Load plan.md from feature directory
9   → If not found: ERROR "No implementation plan found"
10   → Extract: tech stack, libraries, structure
112. Load optional design documents:
12   → data-model.md: Extract entities → model tasks
13   → contracts/: Each file → contract test task
14   → research.md: Extract decisions → setup tasks
153. Generate tasks by category:
16   → Setup: project init, dependencies, linting
17   → Tests: contract tests, integration tests
18   → Core: models, services, CLI commands
19   → Integration: DB, middleware, logging
20   → Polish: unit tests, performance, docs
214. Apply task rules:
22   → Different files = mark [P] for parallel
23   → Same file = sequential (no [P])
24   → Tests before implementation (TDD)
255. Number tasks sequentially (T001, T002...)
266. Generate dependency graph
277. Create parallel execution examples
288. Validate task completeness:
29   → All contracts have tests?
30   → All entities have models?
31   → All endpoints implemented?
329. Return: SUCCESS (tasks ready for execution)
33```
34
35## Format: `[ID] [P?] Description`
36- **[P]**: Can run in parallel (different files, no dependencies)
37- Include exact file paths in descriptions
38
39## Path Conventions
40- **Single project**: `src/`, `tests/` at repository root
41- **Web app**: `backend/src/`, `frontend/src/`
42- **Mobile**: `api/src/`, `ios/src/` or `android/src/`
43- Paths shown below assume single project - adjust based on plan.md structure
44
45## Phase 3.1: Setup
46- [ ] T001 Create project structure per implementation plan
47- [ ] T002 Initialize [language] project with [framework] dependencies
48- [ ] T003 [P] Configure linting and formatting tools
49
50## Phase 3.2: Tests First (TDD) ⚠️ MUST COMPLETE BEFORE 3.3
51**CRITICAL: These tests MUST be written and MUST FAIL before ANY implementation**
52- [ ] T004 [P] Contract test POST /api/users in tests/contract/test_users_post.py
53- [ ] T005 [P] Contract test GET /api/users/{id} in tests/contract/test_users_get.py
54- [ ] T006 [P] Integration test user registration in tests/integration/test_registration.py
55- [ ] T007 [P] Integration test auth flow in tests/integration/test_auth.py
56
57## Phase 3.3: Core Implementation (ONLY after tests are failing)
58- [ ] T008 [P] User model in src/models/user.py
59- [ ] T009 [P] UserService CRUD in src/services/user_service.py
60- [ ] T010 [P] CLI --create-user in src/cli/user_commands.py
61- [ ] T011 POST /api/users endpoint
62- [ ] T012 GET /api/users/{id} endpoint
63- [ ] T013 Input validation
64- [ ] T014 Error handling and logging
65
66## Phase 3.4: Integration
67- [ ] T015 Connect UserService to DB
68- [ ] T016 Auth middleware
69- [ ] T017 Request/response logging
70- [ ] T018 CORS and security headers
71
72## Phase 3.5: Polish
73- [ ] T019 [P] Unit tests for validation in tests/unit/test_validation.py
74- [ ] T020 Performance tests (<200ms)
75- [ ] T021 [P] Update docs/api.md
76- [ ] T022 Remove duplication
77- [ ] T023 Run manual-testing.md
78
79## Dependencies
80- Tests (T004-T007) before implementation (T008-T014)
81- T008 blocks T009, T015
82- T016 blocks T018
83- Implementation before polish (T019-T023)
84
85## Parallel Example
86```
87# Launch T004-T007 together:
88Task: "Contract test POST /api/users in tests/contract/test_users_post.py"
89Task: "Contract test GET /api/users/{id} in tests/contract/test_users_get.py"
90Task: "Integration test registration in tests/integration/test_registration.py"
91Task: "Integration test auth in tests/integration/test_auth.py"
92```
93
94## Notes
95- [P] tasks = different files, no dependencies
96- Verify tests fail before implementing
97- Commit after each task
98- Avoid: vague tasks, same file conflicts
99
100## Task Generation Rules
101*Applied during main() execution*
102
1031. **From Contracts**:
104   - Each contract file → contract test task [P]
105   - Each endpoint → implementation task
106   
1072. **From Data Model**:
108   - Each entity → model creation task [P]
109   - Relationships → service layer tasks
110   
1113. **From User Stories**:
112   - Each story → integration test [P]
113   - Quickstart scenarios → validation tasks
114
1154. **Ordering**:
116   - Setup → Tests → Models → Services → Endpoints → Polish
117   - Dependencies block parallel execution
118
119## Validation Checklist
120*GATE: Checked by main() before returning*
121
122- [ ] All contracts have corresponding tests
123- [ ] All entities have model tasks
124- [ ] All tests come before implementation
125- [ ] Parallel tasks truly independent
126- [ ] Each task specifies exact file path
127- [ ] No task modifies same file as another [P] task

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close