design-an-interface
Installation
SKILL.md
/design-an-interface
From "Design It Twice" (Ousterhout): your first idea is rarely the best. The value is in contrast — not in any single design.
Step 1 — Gather Requirements
Shallow intake produces shallow designs. Ask these specifically — not just "what does it do?":
- What is the one-sentence job of this module?
- Who are the callers? (other modules, end users, tests, CLI, external systems)
- Walk me through the happy path in code — what does the call site actually look like?
- What are the failure modes? What can go wrong, and who handles it?
- What must the interface hide? What should callers never need to know about?
- Any hard constraints? (performance, compatibility with existing patterns, language idioms)
- Is there a "most common case" that should be especially ergonomic?
Don't proceed until you have real answers. One vague sentence is not enough.