|
| 1 | +# Large/XL Plan Template (L-XL) |
| 2 | + |
| 3 | +Use for work with high subsystem fan-out, architecture decisions, new components, or phased rollout. |
| 4 | + |
| 5 | +## Key Principle |
| 6 | + |
| 7 | +Hit the right level of specificity — everything the plan needs, nothing it doesn't. Large plans are long-lived reference documents that future you (and the AI) will re-read during implementation. Invest in design decisions, non-goals, and scope boundaries. But don't pre-specify implementation details that will change during the build — TO BE CLEAR ONLY INCLUDE code snippets, test stubs, layouts, etc. when they're genuinely the clearest way to communicate an approach. |
| 8 | + |
| 9 | +## Template |
| 10 | + |
| 11 | +```markdown |
| 12 | +# Feature: [Title] |
| 13 | + |
| 14 | +**GitHub Issue:** [#NNN](link) |
| 15 | + |
| 16 | +## Background |
| 17 | + |
| 18 | +[Problem statement, how it works today, history of related issues. Include tables of related issues if there's a trail.] |
| 19 | + |
| 20 | +## Goal |
| 21 | + |
| 22 | +[What we're building and what it enables for the user. 2-5 sentences.] |
| 23 | + |
| 24 | +## Non-Goals |
| 25 | + |
| 26 | +[Explicitly state what this plan does NOT cover. This is critical for preventing scope creep. Each item should be a concrete thing someone might reasonably expect to be included but isn't.] |
| 27 | + |
| 28 | +- **[Thing A]** — [why it's out of scope or deferred] |
| 29 | +- **[Thing B]** — [why] |
| 30 | + |
| 31 | +## Key Decisions Summary |
| 32 | + |
| 33 | +| Decision | Choice | Rationale | |
| 34 | +|----------|--------|-----------| |
| 35 | + |
| 36 | +## Current Architecture (if modifying existing systems) |
| 37 | + |
| 38 | +[Tables of existing components, data flow, key insight that unlocks the approach.] |
| 39 | + |
| 40 | +## Design Decisions |
| 41 | + |
| 42 | +[Detailed sections for non-obvious choices. Each with options considered and rationale.] |
| 43 | + |
| 44 | +## Implementation Plan |
| 45 | + |
| 46 | +### Phase 0: [Infrastructure / Setup] |
| 47 | + |
| 48 | +[Substeps (0a, 0b, 0c if needed), each independently verifiable. Describe what changes and why. Only include code snippets or layouts when prose alone can't convey the approach clearly.] |
| 49 | + |
| 50 | +### Phase N: [Name] |
| 51 | + |
| 52 | +[Same pattern. Large plans typically have 4-10 phases grouped into milestones.] |
| 53 | + |
| 54 | +### Milestone Checkpoint |
| 55 | + |
| 56 | +[What milestone N delivers. Validate before proceeding.] |
| 57 | + |
| 58 | +## Files to Modify/Create |
| 59 | + |
| 60 | +### New Files |
| 61 | + |
| 62 | +| File | Purpose | |
| 63 | +|------|---------| |
| 64 | + |
| 65 | +### Modified Files |
| 66 | + |
| 67 | +| File | Changes | |
| 68 | +|------|---------| |
| 69 | + |
| 70 | +## Testing Plan |
| 71 | + |
| 72 | +[Describe what needs to be tested and why, organized by Robolectric vs instrumentation. Name the scenarios to cover — including edge cases and error handling — but don't write full test stubs. The implementation will determine the exact test shape.] |
| 73 | + |
| 74 | +### Unit Tests (Robolectric) |
| 75 | + |
| 76 | +[Key scenarios per component. Edge case and error handling scenarios inline with the component they cover.] |
| 77 | + |
| 78 | +### Instrumentation Tests |
| 79 | + |
| 80 | +[Only for things requiring real Android APIs. Name what must be validated on a real device/emulator.] |
| 81 | + |
| 82 | +## Future Enhancements (if applicable) |
| 83 | + |
| 84 | +[Numbered phases beyond current scope. Brief descriptions only.] |
| 85 | + |
| 86 | +## Notes |
| 87 | + |
| 88 | +[Design principles, behavior clarifications, technical notes that don't fit elsewhere.] |
| 89 | + |
| 90 | +## Related Work |
| 91 | + |
| 92 | +[Links to related docs in docs/architecture/, docs/dev_completed/, docs/dev_todo/.] |
| 93 | +``` |
| 94 | + |
| 95 | +## Reference Examples |
| 96 | + |
| 97 | +### events_view_lookahead.md (Size XL) |
| 98 | + |
| 99 | +`docs/dev_todo/events_view_lookahead.md` — the gold standard for a large plan: |
| 100 | + |
| 101 | +- **Key Decisions Summary** table up front for quick reference |
| 102 | +- **UI Vision** with ASCII mockups |
| 103 | +- **Current Architecture** tables showing existing components |
| 104 | +- **Implementation Plan** with 7 phases grouped into 3 milestones |
| 105 | +- **Phase substeps** (0a, 0b, 0c) each independently verifiable |
| 106 | +- **Code snippets** where they clarify non-obvious approaches |
| 107 | +- **Testing Plan** organized by Robolectric vs instrumentation, with edge cases (empty states, error handling, refresh triggers) as named scenarios |
| 108 | +- **Files to Modify/Create** split into New and Modified tables |
| 109 | +- **Future Enhancements** as numbered phases beyond current scope |
| 110 | +- **Notes** with design principles and technical clarifications |
| 111 | +- Total: ~2000 lines |
| 112 | + |
| 113 | +### settings_backup.md (Size L) |
| 114 | + |
| 115 | +`docs/dev_completed/settings_backup.md` — good example of a large (not XL) plan: |
| 116 | + |
| 117 | +- **Research Notes** documenting investigation findings |
| 118 | +- **Current Architecture** of settings storage |
| 119 | +- **4 phases** with clear boundaries |
| 120 | +- **Permission Strategy** as a dedicated section (domain-specific concern) |
| 121 | +- **Open Questions** with recommendations |
| 122 | +- **Appendix** for implementation notes discovered during the build |
| 123 | +- Total: ~360 lines |
| 124 | + |
| 125 | +## Non-Goals Section Guidance |
| 126 | + |
| 127 | +The Non-Goals section is **mandatory** for L/XL plans. Good non-goals are: |
| 128 | + |
| 129 | +- Things adjacent to the feature that someone might assume are included |
| 130 | +- Explicitly deferred work (with reasoning) |
| 131 | +- Scope boundaries that prevent creep |
| 132 | + |
| 133 | +**Example** (from a hypothetical navigation refactor): |
| 134 | + |
| 135 | +```markdown |
| 136 | +## Non-Goals |
| 137 | + |
| 138 | +- **Bidirectional sync** — stays as-is; the delete+reupload approach sidesteps sync issues |
| 139 | +- **Animated tab transitions** — visual polish deferred to a future phase |
| 140 | +- **Deep link support** — existing deep links continue to work; new deep link routes are future work |
| 141 | +- **Tablet layout** — single-column layout only; responsive layouts are a separate effort |
| 142 | +``` |
| 143 | + |
| 144 | +## What L/XL Plans MUST Include (that S-M plans skip) |
| 145 | + |
| 146 | +- Non-Goals section |
| 147 | +- Key Decisions Summary table |
| 148 | +- Testing Plan with named scenarios (including edge cases and error handling), split by Robolectric vs instrumentation |
| 149 | +- Files to Modify/Create split into New and Modified |
| 150 | +- Milestone checkpoints between major phases |
0 commit comments