omgkit 2.1.0 → 2.2.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.
- package/package.json +1 -1
- package/plugin/skills/SKILL_STANDARDS.md +743 -0
- package/plugin/skills/databases/mongodb/SKILL.md +797 -28
- package/plugin/skills/databases/postgresql/SKILL.md +494 -18
- package/plugin/skills/databases/prisma/SKILL.md +776 -30
- package/plugin/skills/databases/redis/SKILL.md +885 -25
- package/plugin/skills/devops/aws/SKILL.md +686 -28
- package/plugin/skills/devops/docker/SKILL.md +466 -18
- package/plugin/skills/devops/github-actions/SKILL.md +684 -29
- package/plugin/skills/devops/kubernetes/SKILL.md +621 -24
- package/plugin/skills/frameworks/django/SKILL.md +920 -20
- package/plugin/skills/frameworks/express/SKILL.md +1361 -35
- package/plugin/skills/frameworks/fastapi/SKILL.md +1260 -33
- package/plugin/skills/frameworks/laravel/SKILL.md +1244 -31
- package/plugin/skills/frameworks/nestjs/SKILL.md +1005 -26
- package/plugin/skills/frameworks/nextjs/SKILL.md +407 -44
- package/plugin/skills/frameworks/rails/SKILL.md +594 -28
- package/plugin/skills/frameworks/react/SKILL.md +1006 -32
- package/plugin/skills/frameworks/spring/SKILL.md +528 -35
- package/plugin/skills/frameworks/vue/SKILL.md +1296 -27
- package/plugin/skills/frontend/accessibility/SKILL.md +1108 -34
- package/plugin/skills/frontend/frontend-design/SKILL.md +1304 -26
- package/plugin/skills/frontend/responsive/SKILL.md +847 -21
- package/plugin/skills/frontend/shadcn-ui/SKILL.md +976 -38
- package/plugin/skills/frontend/tailwindcss/SKILL.md +831 -35
- package/plugin/skills/frontend/threejs/SKILL.md +1298 -29
- package/plugin/skills/languages/javascript/SKILL.md +935 -31
- package/plugin/skills/languages/python/SKILL.md +489 -25
- package/plugin/skills/languages/typescript/SKILL.md +379 -30
- package/plugin/skills/methodology/brainstorming/SKILL.md +597 -23
- package/plugin/skills/methodology/defense-in-depth/SKILL.md +832 -34
- package/plugin/skills/methodology/dispatching-parallel-agents/SKILL.md +665 -31
- package/plugin/skills/methodology/executing-plans/SKILL.md +556 -24
- package/plugin/skills/methodology/finishing-development-branch/SKILL.md +595 -25
- package/plugin/skills/methodology/problem-solving/SKILL.md +429 -61
- package/plugin/skills/methodology/receiving-code-review/SKILL.md +536 -24
- package/plugin/skills/methodology/requesting-code-review/SKILL.md +632 -21
- package/plugin/skills/methodology/root-cause-tracing/SKILL.md +641 -30
- package/plugin/skills/methodology/sequential-thinking/SKILL.md +262 -3
- package/plugin/skills/methodology/systematic-debugging/SKILL.md +571 -32
- package/plugin/skills/methodology/test-driven-development/SKILL.md +779 -24
- package/plugin/skills/methodology/testing-anti-patterns/SKILL.md +691 -29
- package/plugin/skills/methodology/token-optimization/SKILL.md +598 -29
- package/plugin/skills/methodology/verification-before-completion/SKILL.md +543 -22
- package/plugin/skills/methodology/writing-plans/SKILL.md +590 -18
- package/plugin/skills/omega/omega-architecture/SKILL.md +838 -39
- package/plugin/skills/omega/omega-coding/SKILL.md +636 -39
- package/plugin/skills/omega/omega-sprint/SKILL.md +855 -48
- package/plugin/skills/omega/omega-testing/SKILL.md +940 -41
- package/plugin/skills/omega/omega-thinking/SKILL.md +703 -50
- package/plugin/skills/security/better-auth/SKILL.md +1065 -28
- package/plugin/skills/security/oauth/SKILL.md +968 -31
- package/plugin/skills/security/owasp/SKILL.md +894 -33
- package/plugin/skills/testing/playwright/SKILL.md +764 -38
- package/plugin/skills/testing/pytest/SKILL.md +873 -36
- package/plugin/skills/testing/vitest/SKILL.md +980 -35
|
@@ -1,34 +1,606 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: writing-plans
|
|
3
|
-
description:
|
|
3
|
+
description: Implementation planning with task breakdown, risk assessment, and dependency management
|
|
4
|
+
category: methodology
|
|
5
|
+
triggers:
|
|
6
|
+
- writing plans
|
|
7
|
+
- implementation plan
|
|
8
|
+
- planning
|
|
9
|
+
- task breakdown
|
|
10
|
+
- project planning
|
|
11
|
+
- feature plan
|
|
12
|
+
- roadmap
|
|
4
13
|
---
|
|
5
14
|
|
|
6
|
-
# Writing Plans
|
|
15
|
+
# Writing Plans
|
|
16
|
+
|
|
17
|
+
Master the art of **implementation planning** with structured task breakdown, clear dependencies, and comprehensive risk assessment. This skill enables effective project execution through well-defined plans that teams can follow autonomously.
|
|
18
|
+
|
|
19
|
+
## Purpose
|
|
20
|
+
|
|
21
|
+
Transform vague requirements into actionable plans:
|
|
22
|
+
|
|
23
|
+
- Break complex features into manageable tasks
|
|
24
|
+
- Identify dependencies and sequencing
|
|
25
|
+
- Estimate effort and allocate resources
|
|
26
|
+
- Anticipate and mitigate risks
|
|
27
|
+
- Enable parallel execution where possible
|
|
28
|
+
- Create clear success criteria
|
|
29
|
+
- Document decisions and rationale
|
|
30
|
+
|
|
31
|
+
## Features
|
|
32
|
+
|
|
33
|
+
### 1. Plan Structure Template
|
|
7
34
|
|
|
8
|
-
## Plan Structure
|
|
9
35
|
```markdown
|
|
10
|
-
# Plan: [Feature Name]
|
|
36
|
+
# Plan: [Feature/Project Name]
|
|
37
|
+
|
|
38
|
+
## Metadata
|
|
39
|
+
- Author: [Name]
|
|
40
|
+
- Created: [Date]
|
|
41
|
+
- Status: Draft | In Review | Approved | In Progress | Complete
|
|
42
|
+
- Estimated Duration: [X days/weeks]
|
|
43
|
+
- Priority: P0 | P1 | P2 | P3
|
|
44
|
+
|
|
45
|
+
## Executive Summary
|
|
46
|
+
[2-3 sentences describing what will be built and why]
|
|
47
|
+
|
|
48
|
+
## Goals & Non-Goals
|
|
49
|
+
|
|
50
|
+
### Goals
|
|
51
|
+
- [What this plan WILL accomplish]
|
|
52
|
+
- [Measurable outcome 1]
|
|
53
|
+
- [Measurable outcome 2]
|
|
54
|
+
|
|
55
|
+
### Non-Goals
|
|
56
|
+
- [What this plan will NOT address]
|
|
57
|
+
- [Explicitly out of scope items]
|
|
58
|
+
|
|
59
|
+
## Background & Context
|
|
60
|
+
[Why is this needed? What problem does it solve?]
|
|
61
|
+
|
|
62
|
+
### Current State
|
|
63
|
+
[Description of how things work today]
|
|
64
|
+
|
|
65
|
+
### Desired State
|
|
66
|
+
[Description of how things should work after]
|
|
67
|
+
|
|
68
|
+
## Design Overview
|
|
69
|
+
[High-level approach and key decisions]
|
|
70
|
+
|
|
71
|
+
### Architecture Diagram
|
|
72
|
+
```
|
|
73
|
+
[Component A] ──► [Component B] ──► [Component C]
|
|
74
|
+
│ │
|
|
75
|
+
▼ ▼
|
|
76
|
+
[Database] [Cache]
|
|
77
|
+
```
|
|
11
78
|
|
|
12
|
-
|
|
13
|
-
|
|
79
|
+
### Key Decisions
|
|
80
|
+
| Decision | Options Considered | Choice | Rationale |
|
|
81
|
+
|----------|-------------------|--------|-----------|
|
|
82
|
+
| [Topic] | A, B, C | B | [Why B] |
|
|
14
83
|
|
|
15
|
-
## Tasks
|
|
16
|
-
1. [ ] [Task] - [2-5 min] - `path/file.ts:line`
|
|
17
|
-
2. [ ] [Task] - [2-5 min] - `path/file.ts:line`
|
|
84
|
+
## Implementation Tasks
|
|
18
85
|
|
|
19
|
-
|
|
20
|
-
|
|
86
|
+
### Phase 1: [Foundation] - [X days]
|
|
87
|
+
|
|
88
|
+
#### Task 1.1: [Task Name]
|
|
89
|
+
- **Description:** [What needs to be done]
|
|
90
|
+
- **Owner:** [Name/Team]
|
|
91
|
+
- **Estimate:** [X hours/days]
|
|
92
|
+
- **Files:** `path/to/file.ts:line`
|
|
93
|
+
- **Dependencies:** None
|
|
94
|
+
- **Acceptance Criteria:**
|
|
95
|
+
- [ ] [Criterion 1]
|
|
96
|
+
- [ ] [Criterion 2]
|
|
97
|
+
|
|
98
|
+
#### Task 1.2: [Task Name]
|
|
99
|
+
- **Description:** [What needs to be done]
|
|
100
|
+
- **Owner:** [Name/Team]
|
|
101
|
+
- **Estimate:** [X hours/days]
|
|
102
|
+
- **Files:** `path/to/file.ts:line`
|
|
103
|
+
- **Dependencies:** Task 1.1
|
|
104
|
+
- **Acceptance Criteria:**
|
|
105
|
+
- [ ] [Criterion 1]
|
|
106
|
+
|
|
107
|
+
### Phase 2: [Core Implementation] - [X days]
|
|
108
|
+
[Continue with tasks...]
|
|
21
109
|
|
|
22
110
|
## Testing Strategy
|
|
23
|
-
|
|
24
|
-
|
|
111
|
+
|
|
112
|
+
### Unit Tests
|
|
113
|
+
- [Component A] - [What to test]
|
|
114
|
+
- [Component B] - [What to test]
|
|
115
|
+
|
|
116
|
+
### Integration Tests
|
|
117
|
+
- [Flow 1] - [What to verify]
|
|
118
|
+
- [Flow 2] - [What to verify]
|
|
119
|
+
|
|
120
|
+
### E2E Tests
|
|
121
|
+
- [Critical path 1]
|
|
122
|
+
- [Critical path 2]
|
|
123
|
+
|
|
124
|
+
### Manual Testing
|
|
125
|
+
- [ ] [Scenario to test manually]
|
|
126
|
+
|
|
127
|
+
## Rollout Plan
|
|
128
|
+
|
|
129
|
+
### Phase 1: Internal Testing
|
|
130
|
+
- Deploy to staging
|
|
131
|
+
- Internal team testing
|
|
132
|
+
- Duration: [X days]
|
|
133
|
+
|
|
134
|
+
### Phase 2: Beta
|
|
135
|
+
- Feature flag: 5% of users
|
|
136
|
+
- Monitor metrics
|
|
137
|
+
- Duration: [X days]
|
|
138
|
+
|
|
139
|
+
### Phase 3: GA
|
|
140
|
+
- Gradual rollout: 25% → 50% → 100%
|
|
141
|
+
- Duration: [X days]
|
|
142
|
+
|
|
143
|
+
## Risks & Mitigations
|
|
144
|
+
|
|
145
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
146
|
+
|------|------------|--------|------------|
|
|
147
|
+
| [Risk 1] | High | High | [Strategy] |
|
|
148
|
+
| [Risk 2] | Medium | Medium | [Strategy] |
|
|
149
|
+
|
|
150
|
+
## Success Metrics
|
|
151
|
+
- [Metric 1]: Baseline [X] → Target [Y]
|
|
152
|
+
- [Metric 2]: Baseline [X] → Target [Y]
|
|
153
|
+
|
|
154
|
+
## Open Questions
|
|
155
|
+
- [ ] [Question 1]
|
|
156
|
+
- [ ] [Question 2]
|
|
157
|
+
|
|
158
|
+
## References
|
|
159
|
+
- [Link to PRD]
|
|
160
|
+
- [Link to design doc]
|
|
161
|
+
- [Link to related work]
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### 2. Task Breakdown Framework
|
|
165
|
+
|
|
166
|
+
```markdown
|
|
167
|
+
## Task Sizing Guidelines
|
|
168
|
+
|
|
169
|
+
### Ideal Task Size
|
|
170
|
+
- Duration: 2-4 hours (half-day blocks)
|
|
171
|
+
- Max: 1 day (break down if larger)
|
|
172
|
+
- Clear completion criteria
|
|
173
|
+
- Single owner
|
|
174
|
+
|
|
175
|
+
### Breakdown Techniques
|
|
176
|
+
|
|
177
|
+
#### Horizontal Slicing (by layer)
|
|
178
|
+
```
|
|
179
|
+
Feature: User Profile Update
|
|
180
|
+
├── Database migration
|
|
181
|
+
├── API endpoint
|
|
182
|
+
├── Service logic
|
|
183
|
+
├── Frontend form
|
|
184
|
+
└── Tests
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
#### Vertical Slicing (by user story)
|
|
188
|
+
```
|
|
189
|
+
Feature: User Profile Update
|
|
190
|
+
├── Update name (DB → API → UI → Test)
|
|
191
|
+
├── Update email (DB → API → UI → Test)
|
|
192
|
+
├── Update avatar (DB → API → UI → Test)
|
|
193
|
+
└── Update preferences (DB → API → UI → Test)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
#### Functional Decomposition
|
|
197
|
+
```
|
|
198
|
+
Feature: Payment Processing
|
|
199
|
+
├── Input validation
|
|
200
|
+
├── Payment gateway integration
|
|
201
|
+
├── Transaction logging
|
|
202
|
+
├── Error handling
|
|
203
|
+
├── Receipt generation
|
|
204
|
+
└── Notification sending
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Task Template
|
|
208
|
+
```yaml
|
|
209
|
+
task:
|
|
210
|
+
id: "TASK-001"
|
|
211
|
+
title: "Add user email validation"
|
|
212
|
+
description: |
|
|
213
|
+
Implement email format validation in the user
|
|
214
|
+
registration flow with proper error messages.
|
|
215
|
+
|
|
216
|
+
type: feature | bugfix | refactor | test | docs
|
|
217
|
+
|
|
218
|
+
size: XS | S | M | L | XL
|
|
219
|
+
# XS: < 1 hour
|
|
220
|
+
# S: 1-2 hours
|
|
221
|
+
# M: 2-4 hours
|
|
222
|
+
# L: 4-8 hours
|
|
223
|
+
# XL: > 8 hours (should be broken down)
|
|
224
|
+
|
|
225
|
+
files:
|
|
226
|
+
- path: "src/validators/email.ts"
|
|
227
|
+
action: create
|
|
228
|
+
- path: "src/components/RegistrationForm.tsx"
|
|
229
|
+
action: modify
|
|
230
|
+
lines: "45-60"
|
|
231
|
+
|
|
232
|
+
dependencies:
|
|
233
|
+
- "TASK-000" # Must complete first
|
|
234
|
+
|
|
235
|
+
acceptance_criteria:
|
|
236
|
+
- Valid emails are accepted
|
|
237
|
+
- Invalid emails show error message
|
|
238
|
+
- Edge cases handled (empty, special chars)
|
|
239
|
+
|
|
240
|
+
testing:
|
|
241
|
+
unit:
|
|
242
|
+
- Email validator function
|
|
243
|
+
integration:
|
|
244
|
+
- Registration form submission
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### 3. Dependency Mapping
|
|
248
|
+
|
|
249
|
+
```markdown
|
|
250
|
+
## Dependency Types
|
|
251
|
+
|
|
252
|
+
### Hard Dependencies
|
|
253
|
+
Must complete before starting next task.
|
|
254
|
+
```
|
|
255
|
+
[Task A] ──BLOCKS──► [Task B]
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Soft Dependencies
|
|
259
|
+
Preferred order but can work around.
|
|
260
|
+
```
|
|
261
|
+
[Task A] ──INFORMS──► [Task B]
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Parallel Opportunities
|
|
265
|
+
No dependencies, can run concurrently.
|
|
266
|
+
```
|
|
267
|
+
[Task A] ║ [Task B] ║ [Task C]
|
|
268
|
+
║ ║
|
|
269
|
+
▼ ▼
|
|
270
|
+
[Task D: Integration]
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Dependency Diagram
|
|
274
|
+
```
|
|
275
|
+
┌─────────────────────────────────────────┐
|
|
276
|
+
│ START │
|
|
277
|
+
└──────────────┬──────────────────────────┘
|
|
278
|
+
│
|
|
279
|
+
┌───────────────────────┼───────────────────────┐
|
|
280
|
+
│ │ │
|
|
281
|
+
▼ ▼ ▼
|
|
282
|
+
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
|
283
|
+
│ Task 1 │ │ Task 2 │ │ Task 3 │
|
|
284
|
+
│ Database │ │ Design │ │ Research │
|
|
285
|
+
│ Schema │ │ Mockups │ │ API Docs │
|
|
286
|
+
└──────┬──────┘ └──────┬──────┘ └──────┬──────┘
|
|
287
|
+
│ │ │
|
|
288
|
+
│ │ │
|
|
289
|
+
▼ ▼ │
|
|
290
|
+
┌─────────────┐ ┌─────────────┐ │
|
|
291
|
+
│ Task 4 │ │ Task 5 │ │
|
|
292
|
+
│ API Layer │◄────────│ Frontend │ │
|
|
293
|
+
└──────┬──────┘ └─────────────┘ │
|
|
294
|
+
│ │
|
|
295
|
+
▼ ▼
|
|
296
|
+
┌─────────────┐ ┌─────────────┐
|
|
297
|
+
│ Task 6 │◄────────────────────────────────│ Task 7 │
|
|
298
|
+
│ Integration │ │ 3rd Party │
|
|
299
|
+
│ Testing │ │ Integration │
|
|
300
|
+
└──────┬──────┘ └─────────────┘
|
|
301
|
+
│
|
|
302
|
+
▼
|
|
303
|
+
┌─────────────┐
|
|
304
|
+
│ COMPLETE │
|
|
305
|
+
└─────────────┘
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Critical Path Analysis
|
|
309
|
+
```markdown
|
|
310
|
+
## Critical Path
|
|
311
|
+
|
|
312
|
+
The longest path through the dependency graph determines minimum duration.
|
|
313
|
+
|
|
314
|
+
Path Analysis:
|
|
315
|
+
- Path A: Task 1 → Task 4 → Task 6 = 5 days
|
|
316
|
+
- Path B: Task 2 → Task 5 = 3 days
|
|
317
|
+
- Path C: Task 3 → Task 7 → Task 6 = 6 days ← CRITICAL PATH
|
|
318
|
+
|
|
319
|
+
**Critical Path:** Task 3 → Task 7 → Task 6
|
|
320
|
+
**Minimum Duration:** 6 days
|
|
321
|
+
|
|
322
|
+
**Optimization Opportunities:**
|
|
323
|
+
- Start Task 3 first
|
|
324
|
+
- Assign more resources to critical path
|
|
325
|
+
- Look for ways to parallelize Task 7
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### 4. Risk Assessment Matrix
|
|
329
|
+
|
|
330
|
+
```markdown
|
|
331
|
+
## Risk Assessment Framework
|
|
332
|
+
|
|
333
|
+
### Risk Categories
|
|
334
|
+
|
|
335
|
+
| Category | Examples |
|
|
336
|
+
|----------|----------|
|
|
337
|
+
| Technical | New technology, complexity, integration |
|
|
338
|
+
| Resource | Team availability, skills gap |
|
|
339
|
+
| External | Third-party dependencies, API changes |
|
|
340
|
+
| Timeline | Deadline pressure, scope creep |
|
|
341
|
+
| Business | Requirements change, priority shift |
|
|
342
|
+
|
|
343
|
+
### Likelihood Scale
|
|
344
|
+
| Level | Description | Probability |
|
|
345
|
+
|-------|-------------|-------------|
|
|
346
|
+
| Rare | Unlikely to occur | <10% |
|
|
347
|
+
| Low | Could occur | 10-25% |
|
|
348
|
+
| Medium | Likely to occur | 25-50% |
|
|
349
|
+
| High | Expected to occur | 50-75% |
|
|
350
|
+
| Very High | Almost certain | >75% |
|
|
351
|
+
|
|
352
|
+
### Impact Scale
|
|
353
|
+
| Level | Schedule | Cost | Quality |
|
|
354
|
+
|-------|----------|------|---------|
|
|
355
|
+
| Minimal | <1 day slip | <5% over | Cosmetic |
|
|
356
|
+
| Minor | 1-3 days | 5-10% | Minor bugs |
|
|
357
|
+
| Moderate | 1 week | 10-25% | Some features cut |
|
|
358
|
+
| Major | 2+ weeks | 25-50% | Core features affected |
|
|
359
|
+
| Severe | Project at risk | >50% | Failure |
|
|
360
|
+
|
|
361
|
+
### Risk Matrix
|
|
362
|
+
```
|
|
363
|
+
IMPACT
|
|
364
|
+
Low Medium High Severe
|
|
365
|
+
┌────────┬────────┬────────┬────────┐
|
|
366
|
+
High │ Medium │ High │Critical│Critical│
|
|
367
|
+
├────────┼────────┼────────┼────────┤
|
|
368
|
+
Medium │ Low │ Medium │ High │Critical│
|
|
369
|
+
LIKELY ├────────┼────────┼────────┼────────┤
|
|
370
|
+
Low │ Low │ Low │ Medium │ High │
|
|
371
|
+
├────────┼────────┼────────┼────────┤
|
|
372
|
+
Rare │ Accept │ Low │ Low │ Medium │
|
|
373
|
+
└────────┴────────┴────────┴────────┘
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### Risk Register Template
|
|
377
|
+
```markdown
|
|
378
|
+
| ID | Risk | Category | Likelihood | Impact | Score | Mitigation | Owner | Status |
|
|
379
|
+
|----|------|----------|------------|--------|-------|------------|-------|--------|
|
|
380
|
+
| R1 | Third-party API down | External | Medium | High | High | Implement fallback, cache responses | @eng | Open |
|
|
381
|
+
| R2 | Performance regression | Technical | Low | Medium | Low | Add load testing to CI | @qa | Mitigated |
|
|
382
|
+
| R3 | Key developer unavailable | Resource | Medium | Medium | Medium | Document decisions, cross-train | @lead | Monitoring |
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### 5. Effort Estimation
|
|
386
|
+
|
|
387
|
+
```markdown
|
|
388
|
+
## Estimation Techniques
|
|
389
|
+
|
|
390
|
+
### T-Shirt Sizing
|
|
391
|
+
Quick relative sizing for initial planning.
|
|
392
|
+
|
|
393
|
+
| Size | Hours | Description |
|
|
394
|
+
|------|-------|-------------|
|
|
395
|
+
| XS | <1 | Trivial change, well-understood |
|
|
396
|
+
| S | 1-2 | Small change, low risk |
|
|
397
|
+
| M | 2-4 | Standard task, some complexity |
|
|
398
|
+
| L | 4-8 | Larger task, may need research |
|
|
399
|
+
| XL | 8+ | Complex, should be broken down |
|
|
400
|
+
|
|
401
|
+
### Three-Point Estimation
|
|
402
|
+
For more accurate estimates:
|
|
403
|
+
|
|
404
|
+
```
|
|
405
|
+
Estimate = (Optimistic + 4×MostLikely + Pessimistic) / 6
|
|
406
|
+
|
|
407
|
+
Example:
|
|
408
|
+
Task: Implement OAuth flow
|
|
409
|
+
- Optimistic: 4 hours (if everything works first try)
|
|
410
|
+
- Most Likely: 8 hours (normal development)
|
|
411
|
+
- Pessimistic: 16 hours (unexpected issues)
|
|
412
|
+
|
|
413
|
+
Estimate = (4 + 4×8 + 16) / 6 = 8.7 hours
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
### Estimation Adjustments
|
|
417
|
+
|
|
418
|
+
| Factor | Multiplier | When to Apply |
|
|
419
|
+
|--------|------------|---------------|
|
|
420
|
+
| New technology | 1.5x | First time using |
|
|
421
|
+
| Complex integration | 1.3x | Multiple systems |
|
|
422
|
+
| Unclear requirements | 1.5x | Needs clarification |
|
|
423
|
+
| Junior developer | 1.5x | Less experience |
|
|
424
|
+
| Code review included | 1.2x | If not separate task |
|
|
425
|
+
| Testing included | 1.3x | If not separate task |
|
|
426
|
+
|
|
427
|
+
### Buffer Recommendations
|
|
428
|
+
- Individual tasks: 20% buffer
|
|
429
|
+
- Phase total: 30% buffer
|
|
430
|
+
- Project total: 40% buffer
|
|
431
|
+
|
|
432
|
+
```markdown
|
|
433
|
+
Example:
|
|
434
|
+
Raw estimate: 40 hours
|
|
435
|
+
With 30% buffer: 52 hours
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
### 6. File-Level Planning
|
|
439
|
+
|
|
440
|
+
```markdown
|
|
441
|
+
## Code Change Mapping
|
|
442
|
+
|
|
443
|
+
### New Files
|
|
444
|
+
```yaml
|
|
445
|
+
new_files:
|
|
446
|
+
- path: "src/services/PaymentService.ts"
|
|
447
|
+
purpose: "Handle payment processing logic"
|
|
448
|
+
size: ~200 lines
|
|
449
|
+
template: "service"
|
|
450
|
+
|
|
451
|
+
- path: "src/api/payments.ts"
|
|
452
|
+
purpose: "Payment API endpoints"
|
|
453
|
+
size: ~100 lines
|
|
454
|
+
template: "api-route"
|
|
455
|
+
|
|
456
|
+
- path: "tests/services/PaymentService.test.ts"
|
|
457
|
+
purpose: "Unit tests for payment service"
|
|
458
|
+
size: ~150 lines
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### Modified Files
|
|
462
|
+
```yaml
|
|
463
|
+
modified_files:
|
|
464
|
+
- path: "src/routes/index.ts"
|
|
465
|
+
changes:
|
|
466
|
+
- line: 45
|
|
467
|
+
change: "Add payment routes import"
|
|
468
|
+
- line: 78
|
|
469
|
+
change: "Register payment router"
|
|
470
|
+
|
|
471
|
+
- path: "src/types/index.ts"
|
|
472
|
+
changes:
|
|
473
|
+
- line: "end"
|
|
474
|
+
change: "Add Payment types"
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
### Migration Files
|
|
478
|
+
```yaml
|
|
479
|
+
migrations:
|
|
480
|
+
- name: "add_payments_table"
|
|
481
|
+
up: |
|
|
482
|
+
CREATE TABLE payments (
|
|
483
|
+
id UUID PRIMARY KEY,
|
|
484
|
+
amount DECIMAL(10,2),
|
|
485
|
+
status VARCHAR(20),
|
|
486
|
+
created_at TIMESTAMP
|
|
487
|
+
)
|
|
488
|
+
down: "DROP TABLE payments"
|
|
489
|
+
```
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
## Use Cases
|
|
493
|
+
|
|
494
|
+
### API Feature Plan
|
|
495
|
+
|
|
496
|
+
```markdown
|
|
497
|
+
# Plan: Add User Preferences API
|
|
498
|
+
|
|
499
|
+
## Executive Summary
|
|
500
|
+
Add CRUD endpoints for user preferences to enable personalized
|
|
501
|
+
experiences across mobile and web clients.
|
|
502
|
+
|
|
503
|
+
## Implementation Tasks
|
|
504
|
+
|
|
505
|
+
### Phase 1: Database (Day 1)
|
|
506
|
+
|
|
507
|
+
#### Task 1.1: Create preferences table migration
|
|
508
|
+
- **Estimate:** 1 hour
|
|
509
|
+
- **Files:** `migrations/20240115_add_preferences.ts`
|
|
510
|
+
- **Dependencies:** None
|
|
511
|
+
- **Criteria:**
|
|
512
|
+
- [ ] Table with user_id, key, value, updated_at
|
|
513
|
+
- [ ] Foreign key to users table
|
|
514
|
+
- [ ] Unique constraint on (user_id, key)
|
|
515
|
+
|
|
516
|
+
#### Task 1.2: Add Prisma model
|
|
517
|
+
- **Estimate:** 30 min
|
|
518
|
+
- **Files:** `prisma/schema.prisma:lines 45-55`
|
|
519
|
+
- **Dependencies:** Task 1.1
|
|
520
|
+
- **Criteria:**
|
|
521
|
+
- [ ] Model defined with relations
|
|
522
|
+
- [ ] Types generated
|
|
523
|
+
|
|
524
|
+
### Phase 2: API Layer (Days 2-3)
|
|
525
|
+
|
|
526
|
+
#### Task 2.1: Create PreferencesService
|
|
527
|
+
- **Estimate:** 3 hours
|
|
528
|
+
- **Files:** `src/services/PreferencesService.ts`
|
|
529
|
+
- **Dependencies:** Task 1.2
|
|
530
|
+
- **Criteria:**
|
|
531
|
+
- [ ] getPreferences(userId)
|
|
532
|
+
- [ ] setPreference(userId, key, value)
|
|
533
|
+
- [ ] deletePreference(userId, key)
|
|
534
|
+
- [ ] Unit tests with 80%+ coverage
|
|
535
|
+
|
|
536
|
+
#### Task 2.2: Add API endpoints
|
|
537
|
+
- **Estimate:** 2 hours
|
|
538
|
+
- **Files:** `src/api/preferences.ts`
|
|
539
|
+
- **Dependencies:** Task 2.1
|
|
540
|
+
- **Criteria:**
|
|
541
|
+
- [ ] GET /users/:id/preferences
|
|
542
|
+
- [ ] PUT /users/:id/preferences/:key
|
|
543
|
+
- [ ] DELETE /users/:id/preferences/:key
|
|
544
|
+
- [ ] Request validation
|
|
545
|
+
- [ ] Error handling
|
|
546
|
+
|
|
547
|
+
### Phase 3: Testing & Documentation (Day 4)
|
|
548
|
+
|
|
549
|
+
#### Task 3.1: Integration tests
|
|
550
|
+
- **Estimate:** 2 hours
|
|
551
|
+
- **Files:** `tests/api/preferences.test.ts`
|
|
552
|
+
- **Dependencies:** Task 2.2
|
|
553
|
+
- **Criteria:**
|
|
554
|
+
- [ ] Happy path tests
|
|
555
|
+
- [ ] Auth required tests
|
|
556
|
+
- [ ] Validation error tests
|
|
557
|
+
|
|
558
|
+
#### Task 3.2: Update API documentation
|
|
559
|
+
- **Estimate:** 1 hour
|
|
560
|
+
- **Files:** `docs/api/preferences.md`
|
|
561
|
+
- **Dependencies:** Task 2.2
|
|
562
|
+
- **Criteria:**
|
|
563
|
+
- [ ] OpenAPI spec updated
|
|
564
|
+
- [ ] Examples for each endpoint
|
|
25
565
|
|
|
26
566
|
## Risks
|
|
27
567
|
| Risk | Likelihood | Impact | Mitigation |
|
|
568
|
+
|------|------------|--------|------------|
|
|
569
|
+
| Schema conflicts | Low | Medium | Run migrations in staging first |
|
|
570
|
+
| Performance at scale | Medium | High | Add caching, pagination |
|
|
28
571
|
```
|
|
29
572
|
|
|
30
|
-
##
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
573
|
+
## Best Practices
|
|
574
|
+
|
|
575
|
+
### Do's
|
|
576
|
+
|
|
577
|
+
- Keep tasks to 2-4 hour chunks
|
|
578
|
+
- Include exact file locations when known
|
|
579
|
+
- Specify clear acceptance criteria
|
|
580
|
+
- Map dependencies explicitly
|
|
581
|
+
- Build in buffer for unknowns
|
|
582
|
+
- Include testing in the plan
|
|
583
|
+
- Document key decisions and rationale
|
|
584
|
+
- Review plan with stakeholders
|
|
585
|
+
- Update plan as you learn
|
|
586
|
+
- Track actual vs estimated time
|
|
587
|
+
|
|
588
|
+
### Don'ts
|
|
589
|
+
|
|
590
|
+
- Don't skip the background/context section
|
|
591
|
+
- Don't leave tasks vague ("implement feature")
|
|
592
|
+
- Don't ignore non-functional requirements
|
|
593
|
+
- Don't underestimate integration work
|
|
594
|
+
- Don't forget rollback plans
|
|
595
|
+
- Don't plan too far in detail (2 weeks max)
|
|
596
|
+
- Don't hide risks or uncertainties
|
|
597
|
+
- Don't skip the testing strategy
|
|
598
|
+
- Don't forget documentation tasks
|
|
599
|
+
- Don't assume requirements are complete
|
|
600
|
+
|
|
601
|
+
## References
|
|
602
|
+
|
|
603
|
+
- [Shape Up - Basecamp](https://basecamp.com/shapeup)
|
|
604
|
+
- [Agile Estimation](https://www.mountaingoatsoftware.com/agile/planning-poker)
|
|
605
|
+
- [Risk Management](https://www.pmi.org/learning/library/risk-identification-life-cycle-9135)
|
|
606
|
+
- [Critical Path Method](https://www.projectmanager.com/guides/critical-path-method)
|