Skip to content

Case Study Window Picker Plan

rtd edited this page Jan 12, 2026 · 1 revision

Case Study: Window Picker Integration Plan

Type: WRITE (Planning) Skill: cc-construction-prerequisites Time: 1m 52s planning

The Result

Window Picker


How CC-Construction-Prerequisites Guided This Plan

1. Clear Objective First

Before any implementation details:

"Fuzzy window selection that focuses the chosen window and warps the mouse cursor to it."

2. Phased Decomposition

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

3. Checkpoint Gates

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.

4. Risk Register

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 Skill Can Also Review Plans

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

Review Summary

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

Gaps Identified

HIGH Priority:

  1. PickerItem data contract not fully specified
  2. Error-handling strategy vague ("handle gracefully")
  3. Config exclusions behavior not specified

MEDIUM Priority: 4. Package location for PickerItem struct 5. Config for binary path 6. Pre-commit checklist


What Could Have Gone Wrong

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

The Methodology

Define Objective → Decompose Phases → Add Checkpoints → Identify Risks → Document Assumptions

The 1m 52s spent planning saves hours of rework.


Key Takeaways

  1. Prerequisites before code - Planning time prevents rework
  2. Checkpoints as save points - Each gate validates before proceeding
  3. Risk register - Surfacing risks upfront leads to better error handling
  4. Phased decomposition - Each phase is testable in isolation
  5. Dual purpose - The skill generates AND reviews plans
  6. Quantified assessment - 15 PASS, 9 WARNING, 0 VIOLATION is actionable

Clone this wiki locally