agentleFS
Luis85Luis85/agentic-workflow/.claude/skills/design-twice/SKILL.md

design-twice

Skill0 starsChanged 6 months agoMITView on GitHub

Generate 2-3 radically different design alternatives in parallel via Task tool, then synthesize a pick. Use in stage 4 (Design). Triggers "design it twice", "explore options", "compare module shapes".

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After Ousterhout's "Design It Twice" and Pocock's design-an-interface.

    line 9
  2. Distinctive:

    If the user has stated a constraint that suggests a fourth axis, add it as D.

    line 33
  3. Very specific:

    When all three return, you (in the main thread) write specs/<slug>/design-comparison.md with sections:

    line 48
  4. Distinctive:

    Keep alternatives at interface/shape level.

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Design twice (or three times)

After Ousterhout's "Design It Twice" and Pocock's design-an-interface. The most expensive bug is a wrong design baked in early; the cheapest fix is a second alternative drafted before the first ships.

Procedure

Step 1 — Frame the design problem

Read upstream:

  • specs/<slug>/research.md
  • specs/<slug>/requirements.md
  • docs/CONTEXT.md, docs/glossary/*.md (per ADR-0010; legacy docs/UBIQUITOUS_LANGUAGE.md if present)

Restate the design problem in one sentence. Confirm with the user.

Step 2 — Pick three divergent constraints

Pick three constraints that will pull the design in genuinely different directions. Defaults that work for most module-shaping problems:

  • A — Minimize surface. Smallest possible public interface. Bias toward fewer methods, fewer parameters, more depth.
  • B — Maximize flexibility. Design for extension. Bias toward composition, plug points, orthogonal primitives.
  • C — Optimize the common case. The most frequent caller writes the least code. Bias toward affordances over generality.

For UI/UX problems, swap to: A — minimize click depth, B — maximize discoverability, C — minimize cognitive load. For architecture, swap to: A — minimize moving parts, B — maximize testability, C — minimize blast radius on failure.

If the user has stated a constraint that suggests a fourth axis, add it as D.

Step 3 — Dispatch three parallel subagents

Issue the Task calls in the same turn so they run concurrently. Each subagent gets:

  • The same upstream context references.
  • Its single divergent constraint.
  • Output destination: specs/<slug>/design-alt-<A|B|C>.md.
  • Return contract: 5–10 line summary, not full content.

Each subagent should produce: Module shape, Public interface (signatures only), Data flow, Trade-offs explicitly accepted.

Step 4 — Synthesize

When all three return, you (in the main thread) write specs/<slug>/design-comparison.md with sections:

  • Compared alternatives — one paragraph per option summarizing shape and trade-offs.
  • Recommendation — which one and why (cite specific upstream constraints).
  • Hybrid moves — borrow X from B, drop Y from A.
  • Rejected alternatives — what we lost by not picking each.

Then ask the user via AskUserQuestion: Adopt recommendation (Recommended) / Adopt alternative <X> / Synthesize a hybrid (you describe) / Run another design pass with a new constraint.

Step 5 — Hand off to /spec:design

The chosen alternative becomes input to /spec:design. The architect inside /spec:design reads design-comparison.md and writes the canonical design.md. Do not let design-twice pretend to be the design artifact itself — it is exploration, not commitment.

Rules

  • Constraints must be genuinely divergent, not three flavors of the same idea.
  • Subagents must not see each other's drafts during their pass.
  • Synthesis is your job in the main thread. Don't dispatch a fourth subagent to "pick the winner" — that defers your judgment.
  • Keep alternatives at interface/shape level. No implementation, no tests.
  • File ADRs for any irreversible decisions the synthesis bakes in (use the record-decision skill).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.