-
Notifications
You must be signed in to change notification settings - Fork 20
Case Study Window Picker Plan
rtd edited this page Jan 12, 2026
·
1 revision
Type: WRITE (Planning) Skill: cc-construction-prerequisites Time: 1m 52s planning

Before any implementation details:
"Fuzzy window selection that focuses the chosen window and warps the mouse cursor to it."
Instead of a monolithic task, work broken into 5 discrete phases:
| Phase | Objective | Why Separate |
|---|---|---|
| 1 | Command structure | Establishes CLI foundation before logic |
| 2 | Window list generation | Pure data transformation, testable in isolation |
| 3 | Picker invocation | IPC complexity isolated from business logic |
| 4 | Focus + mouse warp | Depends on phases 2-3 working |
| 5 | Hotkey integration | Optional enhancement, not blocking core feature |
Each phase has a validation checkpoint before proceeding:
Phase 1 → Build Gate → Phase 2 → Test Validation → Phase 3 → Capability Proof → Phase 4 → Integration Test → Phase 5 → Code Review
This prevents "Phase 4 discovers Phase 2 was wrong" scenarios.
| Risk | Likelihood | Mitigation |
|---|---|---|
| Binary not found | Medium | Check multiple locations, clear error message |
| Window closed between selection | Low | Handle gracefully, inform user |
| App icons hard to determine | Medium | Use default icon "🪟" for MVP, enhance later |
The same skill reviewed the plan against a 192-line checklist:
User: Can you review this plan using code-foundations?
Skill(cc-construction-prerequisites) in CHECKER mode
Read 192 lines of checklist
| Category | PASS | WARNING | VIOLATION |
|---|---|---|---|
| Requirements | 4 | 3 | 0 |
| Architecture | 4 | 4 | 0 |
| Upstream Prerequisites | 3 | 1 | 0 |
| Construction Practices | 4 | 1 | 0 |
| Total | 15 | 9 | 0 |
HIGH Priority:
- PickerItem data contract not fully specified
- Error-handling strategy vague ("handle gracefully")
- Config exclusions behavior not specified
MEDIUM Priority: 4. Package location for PickerItem struct 5. Config for binary path 6. Pre-commit checklist
| Without Skill | With Skill |
|---|---|
| Built focus logic first, then discovered picker doesn't work | Phases in dependency order |
| Hardcoded paths | Risk register called out xdg package |
| Built all phases, discovered JSON schema mismatch | Checkpoints validate between phases |
| Scope creep (icon detection) | Deferred to "enhance later" |
| Missing error handling | Risk register surfaced edge cases |
Define Objective → Decompose Phases → Add Checkpoints → Identify Risks → Document Assumptions
The 1m 52s spent planning saves hours of rework.
- Prerequisites before code - Planning time prevents rework
- Checkpoints as save points - Each gate validates before proceeding
- Risk register - Surfacing risks upfront leads to better error handling
- Phased decomposition - Each phase is testable in isolation
- Dual purpose - The skill generates AND reviews plans
- Quantified assessment - 15 PASS, 9 WARNING, 0 VIOLATION is actionable
Task Guides
Case Studies
- Picker History Review ⭐
- Comment Renumbering
- Critical Path Review
- Border Cleanup
- Picker Text Overflow
- Tab Indicator Removal
- Picker Focus Bug
- Window Picker Plan
Reference