spec-lite 1.0.0 → 1.0.2

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.
@@ -1,13 +1,15 @@
1
1
  ---
2
2
  name: planning-and-task-breakdown
3
- description: Breaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.
3
+ description: Strategy guide for breaking work into ordered, verifiable tasks format-agnostic. Covers dependency mapping, vertical slicing, and task sizing. Invoked by wrapper skills (e.g. /plan) that own the output format; can also be used standalone.
4
4
  ---
5
5
 
6
6
  # Planning and Task Breakdown
7
7
 
8
8
  ## Overview
9
9
 
10
- Decompose work into small, verifiable tasks with explicit acceptance criteria. Good task breakdown is the difference between an agent that completes work reliably and one that produces a tangled mess. Every task should be small enough to implement, test, and verify in a single focused session.
10
+ Strategy guide for decomposing work into small, verifiable tasks. This skill is **format-agnostic** it defines *how to think* about breakdown (dependency mapping, slicing, sizing), not *how to write* the output. Output format is owned by the caller (e.g. `/plan` defines the exact markdown structure for SDD projects).
11
+
12
+ Good task breakdown is the difference between an agent that completes work reliably and one that produces a tangled mess. Every task should be small enough to implement, test, and verify in a single focused session.
11
13
 
12
14
  ## When to Use
13
15
 
@@ -39,15 +41,19 @@ Map what depends on what:
39
41
  ```
40
42
  Database schema
41
43
 
42
- ├── API models/types
43
- │ │
44
- │ ├── API endpoints
45
- │ │ │
46
- │ │ └── Frontend API client
47
- │ │ │
48
- │ │ └── UI components
44
+ ├── Domain models
49
45
  │ │
50
- │ └── Validation logic
46
+ │ └── Services
47
+ │ │
48
+ │ ├── Validation logic
49
+ │ │
50
+ │ └── API endpoints
51
+ │ │
52
+ │ ├── Middleware
53
+ │ │
54
+ │ └── Frontend API client
55
+ │ │
56
+ │ └── UI components
51
57
 
52
58
  └── Seed data / migrations
53
59
  ```
@@ -78,27 +84,23 @@ Each vertical slice delivers working, testable functionality.
78
84
 
79
85
  ### Step 4: Write Tasks
80
86
 
81
- Each task follows this structure:
82
-
83
- ```markdown
84
- #### T001 — [Short descriptive title, starts with a verb]
85
-
86
- [One paragraph describing what this task delivers]
87
+ Each task must capture:
87
88
 
88
- **depends:** [T-IDs this task depends on, or —]
89
- **verify:** [AC-001, AC-002] [specific test cases that must pass e.g. unit tests: valid input, missing field 400]
90
- ```
89
+ - **Title** short, starts with a verb
90
+ - **What it delivers**one sentence or short paragraph
91
+ - **Dependencies** — which tasks must complete first
92
+ - **Verification conditions** — specific and testable (not just "tests pass")
91
93
 
92
- **`verify:` field rules:**
94
+ **Verification rules:**
93
95
 
94
- | Task type | verify? | Example |
96
+ | Task type | Verify? | Example |
95
97
  |-----------|---------|---------|
96
- | Has behavior (service, endpoint, validation) | Yes — specific unit tests | `**verify:** [AC-001] unit tests valid input, missing field 400, duplicate 409` |
97
- | Pure infrastructure (migration, config) | Yes — smoke check | `**verify:** migration runs clean, rollback succeeds` |
98
- | Task IS the test (Verification phase) | Yes — result | `**verify:** integration tests pass — happy path + error cases` |
99
- | No behavior (docs, rename, comment) | No | *(omit field)* |
98
+ | Has behavior (service, endpoint, validation) | Yes — specific unit tests | unit tests: valid input, missing field 400, duplicate 409 |
99
+ | Pure infrastructure (migration, config) | Yes — smoke check | migration runs clean, rollback succeeds |
100
+ | Task IS the test (Verification phase) | Yes — result | integration tests pass — happy path + error cases |
101
+ | No behavior (docs, rename, comment) | No | *(omit)* |
100
102
 
101
- Rule: add `verify:` when *"if this code were deleted, which test would fail?"* can be answered. Must be specific enough for an agent to know what to write — not just "tests pass". Reference AC IDs when the task covers specific criteria.
103
+ Rule: add verification when *"if this code were deleted, which test would fail?"* can be answered. Must be specific enough for an agent to know what to write. Reference AC IDs when the task covers specific criteria.
102
104
 
103
105
  ### Step 5: Order and Phases
104
106
 
@@ -139,78 +141,6 @@ If a task is L or larger, it should be broken into smaller tasks. An agent perfo
139
141
  - It touches two or more independent subsystems (e.g., auth and billing)
140
142
  - You find yourself writing "and" in the task title (a sign it is two tasks)
141
143
 
142
- ## Output Files
143
-
144
- Save the plan as two files:
145
-
146
- - **`plan.md`** — design document: per-task description, dependencies, verify conditions. Stable after approval — not modified during execution.
147
- - **`todo.md`** — execution tracker: flat checklist. Agent ticks `[x]` after each task is done.
148
-
149
- ## Plan Document Template
150
-
151
- **`plan.md`:**
152
-
153
- ```markdown
154
- ---
155
- id: "{slug}"
156
- slug: "{slug}"
157
- title: "{title} — Implementation Plan"
158
- features: ["{F-XXX}"]
159
- status: draft
160
- created: {YYYY-MM-DD}
161
- ---
162
-
163
- ## Summary
164
-
165
- [2-3 sentences on what will be implemented]
166
-
167
- ## Tasks
168
-
169
- ### Phase 1: [Phase name]
170
-
171
- #### T001 — [task title]
172
-
173
- [What this task delivers]
174
-
175
- **depends:** —
176
- **verify:** [verify condition or omit if no behavior]
177
-
178
- #### T002 — [task title]
179
-
180
- [What this task delivers]
181
-
182
- **depends:** T001
183
- **verify:** [AC-001] unit tests — [specific cases]
184
-
185
- ### Phase N: Verification
186
-
187
- #### T00N — [integration test description]
188
-
189
- [End-to-end flow being tested]
190
-
191
- **depends:** T001, T002
192
- **verify:** integration tests pass — [happy path + error cases]
193
-
194
- ## Definition of Done
195
-
196
- - [ ] [AC from spec — concise, preserve intent]
197
- - [ ] All unit tests pass
198
- - [ ] All integration tests pass
199
- ```
200
-
201
- **`todo.md`:**
202
-
203
- ```markdown
204
- # [title] — Todo
205
-
206
- ### Phase 1: [Phase name]
207
- - [ ] T001 — [task title]
208
- - [ ] T002 — [task title]
209
-
210
- ### Phase N: Verification
211
- - [ ] T00N — [integration test description]
212
- ```
213
-
214
144
  ## Parallelization Opportunities
215
145
 
216
146
  When multiple agents or sessions are available:
@@ -241,7 +171,7 @@ When multiple agents or sessions are available:
241
171
 
242
172
  Before starting implementation, confirm:
243
173
 
244
- - [ ] Every task with behavior has a `verify:` field with specific test cases
174
+ - [ ] Every task with behavior has specific verification conditions (not just "tests pass")
245
175
  - [ ] Task dependencies are identified and ordered correctly
246
176
  - [ ] No task touches more than ~5 files
247
177
  - [ ] Final phase is Verification (integration/e2e tests)
@@ -9,7 +9,7 @@ description: Khởi tạo project scaffold dựa trên sad.md — tạo plan.md
9
9
 
10
10
  Đọc `specs/main/sad.md`, phân rã thành plan.md và todo.md cho bước khởi tạo project, sau đó thực thi từng task theo thứ tự.
11
11
 
12
- Khác với `/spec-plan` — skill này không dừng lại sau khi sinh plan. Sau khi user confirm, nó execute luôn.
12
+ Khác với `/plan` — skill này không dừng lại sau khi sinh plan. Sau khi user confirm, nó execute luôn.
13
13
 
14
14
  ## When to Use
15
15
 
@@ -117,7 +117,7 @@ Phân rã scaffold thành tasks có thứ tự. Mỗi task phải:
117
117
  - **Phase 4: Directory Structure** — tạo thư mục theo layer architecture trong sad.md
118
118
  - **Phase 5: Verify** — project chạy được, kết nối DB thành công
119
119
 
120
- **Output format** (theo spec-plan convention):
120
+ **Output format** (theo plan convention):
121
121
 
122
122
  ```markdown
123
123
  ---
@@ -70,11 +70,15 @@ Sections hiện có:
70
70
  [4] Scope (In Scope / Out of Scope)
71
71
  [5] Dependencies
72
72
  [A] All — viết lại toàn bộ từ đầu
73
+ [S] Lên spec từ frd.md hiện tại — frd.md đã đầy đủ, không cần chỉnh
73
74
 
74
- Chọn section cần cập nhật (có thể chọn nhiều, ví dụ: 2 3):
75
+ Chọn (có thể chọn nhiều section, ví dụ: 2 3):
75
76
  ```
76
77
 
77
- Lưu lại lựa chọn section. Nếu chọn `A` → xử lý như tạo mới toàn bộ. Sau đó chuyển sang Bước 2.
78
+ Lưu lại lựa chọn section.
79
+ - Nếu chọn `A` → xử lý như tạo mới toàn bộ. Sau đó chuyển sang Bước 2.
80
+ - Nếu chọn `S` → **bỏ qua Bước 3 (Interview)**. Dùng nội dung frd.md hiện tại làm input để sinh spec.md. Chuyển thẳng sang Bước 4.
81
+ - Nếu chọn số section → cập nhật section đó. Sau đó chuyển sang Bước 2.
78
82
 
79
83
  ---
80
84
 
@@ -28,14 +28,22 @@ Tạo `tech.md` cho một integration trong `specs/integrations/{slug}/`.
28
28
 
29
29
  ### Bước 1: Xác định integration
30
30
 
31
- Quét thư mục `specs/integrations/`. Liệt kê **tất cả** integrations `spec.md`, đánh dấu những cái đã có `tech.md`:
31
+ **NếuARGUMENT:**
32
+ - Parse argument: có thể là số thứ tự (`2`, `002`) hoặc slug (`002-implement-todo`)
33
+ - Quét `specs/integrations/*/spec.md`, tìm integration khớp với argument
34
+ - Nếu không tìm thấy → báo lỗi:
35
+ > Không tìm thấy integration khớp với "{argument}". Kiểm tra lại tên hoặc số thứ tự.
36
+ - Nếu tìm thấy → dùng integration đó, bắt đầu luôn
37
+
38
+ **Nếu không có ARGUMENT:**
39
+
40
+ Quét `specs/integrations/`. Liệt kê **tất cả** integrations có `spec.md`, đánh dấu những cái đã có `tech.md`:
32
41
 
33
42
  ```
34
43
  Integrations:
35
44
 
36
- [1] f001-authentication User Authentication
37
- [2] f003-app-browsing App Browsing & Opt-in tech.md
38
- [3] f004-credit-system — Credit System
45
+ [1] 001-implement-auth Implement Auth spec✓ tech✓
46
+ [2] 002-implement-todo Implement Todo Management spec✓ tech
39
47
 
40
48
  Chọn số integration:
41
49
  ```
@@ -43,8 +51,6 @@ Chọn số integration:
43
51
  Nếu không có integration nào → thông báo:
44
52
  > Chưa có integration nào. Hãy chạy `/spec-new` trước.
45
53
 
46
- **Nếu có ARGUMENT** → đây là số thứ tự trong danh sách trên (ví dụ `1`, `2`, hoặc `001`). Parse thành số nguyên, bỏ qua leading zeros, map vào integration tương ứng — không cần hiển thị danh sách, chọn luôn.
47
-
48
54
  Nếu integration đã có `tech.md` → hỏi trước khi tiếp tục:
49
55
  > `tech.md` đã tồn tại cho integration này. Tiếp tục sẽ ghi đè. Tiếp tục không?
50
56
 
@@ -162,7 +168,7 @@ Thông báo kết quả:
162
168
 
163
169
  Bước tiếp theo:
164
170
  - Review và approve tech.md
165
- - Implement theo tech.md
171
+ - /plan tạo plan.md và todo.md cho integration này
166
172
  - Sau khi done: đổi status F-XXX trong prd.md thành DONE
167
173
  - Nếu Cascade Proposals có thay đổi → chạy /spec-domain hoặc /spec-sad
168
174
  ```
@@ -7,32 +7,81 @@ status: draft
7
7
  created: {YYYY-MM-DD}
8
8
  referenced_by:
9
9
  - conventions.md > 4. Integration Artifacts > 4.5 plan.md > Cấu trúc
10
- - skills/spec-plan/SKILL.md > Output Format > plan.md
10
+ - skills/plan/SKILL.md > Output Format > plan.md
11
11
  ---
12
12
 
13
13
  ## Summary
14
14
 
15
15
  <!-- Mô tả ngắn những gì sẽ được implement trong integration này -->
16
16
 
17
+ ## Dependency Graph
18
+
19
+ ```
20
+ <!-- ASCII diagram — bottom = foundations, top = UI. Ví dụ:
21
+
22
+ Database schema
23
+
24
+ ├── Domain models
25
+ │ │
26
+ │ └── Services
27
+ │ │
28
+ │ └── API endpoints
29
+ │ │
30
+ │ └── UI components
31
+ -->
32
+ ```
33
+
17
34
  ## Tasks
18
35
 
19
36
  ### Phase 1: {tên phase}
20
37
 
21
- - [ ] T001{mô tả task}
22
- - [ ] T002 — {mô tả task}
23
- - [ ] T003 — {mô tả task} (depends: T001)
38
+ #### T001 · {task title bắt đầu bằng động từ}
24
39
 
25
- ### Phase 2: {tên phase}
40
+ **Mục tiêu:** {One sentence: what this task delivers}
26
41
 
27
- - [ ] T004 {mô tả task} (depends: T001, T002)
28
- - [ ] T005 — {mô tả task}
42
+ **depends:**
29
43
 
30
- <!-- Convention:
31
- - ID tăng dần trong phạm vi integration: T001, T002...
32
- - Dependency ghi rõ: (depends: T001, T003)
33
- - Tasks trong cùng phase không có dependency → có thể xử lý song song
34
- - Tasks across phases có dependency tuần tự
35
- -->
44
+ **Các bước:**
45
+ 1. {Concrete implementation step}
46
+ 2. {Concrete implementation step}
47
+
48
+ **Verification:**
49
+ - [ ] {specific test case hoặc observable result}
50
+
51
+ ---
52
+
53
+ #### T002 · {task title}
54
+
55
+ **Mục tiêu:** {One sentence}
56
+
57
+ **depends:** T001
58
+
59
+ **Các bước:**
60
+ 1. {Concrete implementation step}
61
+
62
+ **Verification:**
63
+ - [ ] {specific test case hoặc observable result}
64
+
65
+ ---
66
+
67
+ ### Phase N: Verification
68
+
69
+ #### T00N · Integration tests — {flow name}
70
+
71
+ **Mục tiêu:** {End-to-end flow being tested}
72
+
73
+ **depends:** T001, T002, ...
74
+
75
+ **Các bước:**
76
+ 1. {Test setup / seed data}
77
+ 2. {Execute happy path}
78
+ 3. {Execute error cases}
79
+
80
+ **Verification:**
81
+ - [ ] Happy path: {description}
82
+ - [ ] Error case: {description}
83
+
84
+ ---
36
85
 
37
86
  ## Definition of Done
38
87
 
@@ -24,21 +24,27 @@ referenced_by:
24
24
 
25
25
  ### Feature: {feature-name}
26
26
 
27
- **Feature-level AC:**
27
+ **Feature-level Acceptance Criteria:**
28
28
 
29
- - [ ] AC-F-001: GIVEN {precondition}
30
- WHEN {action}
31
- THEN {expected outcome}
29
+ - [ ] AC-F-001
30
+ - **Given** {precondition}
31
+ - **When** {action}
32
+ - **Then** {expected outcome}
32
33
 
33
34
  <!-- Lặp lại block Story bên dưới cho mỗi user story thuộc feature này -->
34
35
 
35
- **Story: {story-title}**
36
+ #### US-001: {Story title}
36
37
 
37
- > { tả user story — As a {role}, I want to {action} so that {benefit}}
38
+ **{Persona}** muốn **{hành động}** để **{mục tiêu}**.
38
39
 
39
- - [ ] AC-S-001: GIVEN {precondition}
40
- WHEN {action}
41
- THEN {expected outcome}
40
+ **Priority:** Must / Should / Could
41
+
42
+ **Acceptance Criteria:**
43
+
44
+ - [ ] AC-S-001
45
+ - **Given** {precondition}
46
+ - **When** {action}
47
+ - **Then** {expected outcome}
42
48
 
43
49
  ## Out of Scope
44
50
 
@@ -6,7 +6,7 @@ features: []
6
6
  created: {YYYY-MM-DD}
7
7
  referenced_by:
8
8
  - conventions.md > 4. Integration Artifacts > 4.6 todo.md > Cấu trúc
9
- - skills/spec-plan/SKILL.md > Output Format > todo.md
9
+ - skills/plan/SKILL.md > Output Format > todo.md
10
10
  ---
11
11
 
12
12
  # {title} — Todo
@@ -19,40 +19,44 @@ referenced_by:
19
19
 
20
20
  Criteria áp dụng cho toàn bộ feature — không gắn với story cụ thể (ví dụ: performance, security, accessibility).
21
21
 
22
- - [ ] GIVEN {precondition}
23
- WHEN {action}
24
- THEN {expected outcome}
22
+ - [ ]
23
+ - **Given** {precondition}
24
+ - **When** {action}
25
+ - **Then** {expected outcome}
25
26
 
26
27
  ## User Stories
27
28
 
28
29
  ### US-001: {Story title}
29
30
 
30
- As a {persona}, I want to {action} so that {value}.
31
+ **{Persona}** muốn **{hành động}** để **{mục tiêu}**.
31
32
 
32
33
  **Priority:** Must / Should / Could
33
34
 
34
35
  **Acceptance Criteria:**
35
36
 
36
- - [ ] GIVEN {precondition}
37
- WHEN {action}
38
- THEN {expected outcome}
39
- - [ ] GIVEN {precondition}
40
- WHEN {action}
41
- THEN {expected outcome}
37
+ - [ ]
38
+ - **Given** {precondition}
39
+ - **When** {action}
40
+ - **Then** {expected outcome}
41
+ - [ ]
42
+ - **Given** {precondition}
43
+ - **When** {action}
44
+ - **Then** {expected outcome}
42
45
 
43
46
  ---
44
47
 
45
48
  ### US-002: {Story title}
46
49
 
47
- As a {persona}, I want to {action} so that {value}.
50
+ **{Persona}** muốn **{hành động}** để **{mục tiêu}**.
48
51
 
49
52
  **Priority:** Must / Should / Could
50
53
 
51
54
  **Acceptance Criteria:**
52
55
 
53
- - [ ] GIVEN {precondition}
54
- WHEN {action}
55
- THEN {expected outcome}
56
+ - [ ]
57
+ - **Given** {precondition}
58
+ - **When** {action}
59
+ - **Then** {expected outcome}
56
60
 
57
61
  ---
58
62