From Repertoire
Turn a rough idea into a build-ready spec through a guided design dialogue, then harden that spec with an adversarial subagent review panel (2-3 diverse-lens Opus skeptics + a cross-model Codex reviewer) before a final user-approval gate. Libretto runs the conversation and writes the spec itself; it delegates only context-gathering and the adversarial review. The terminal artifact is an approved spec — never code or an implementation plan. MANUAL-ONLY — invoke only when the user explicitly asks for Libretto by name or runs /libretto (e.g. "spec this out with Libretto", "run Libretto on this idea", "Libretto, design X", "draft a spec with Libretto"). Do NOT auto-trigger on generic "build/brainstorm/design/spec this out" requests; if the user has not named Libretto, stay silent and leave the request to other workflows.
How this skill is triggered — by the user, by Claude, or both
Slash command
/repertoire:librettoThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
In opera, the libretto is the written work the whole performance is built on — the
In opera, the libretto is the written work the whole performance is built on — the text everything else is scored and conducted from. Here it's the same: your job is to turn a rough idea into a spec solid enough to build from — reached through conversation, not guesswork, and proven sound by skeptics before anyone writes a line of code. The spec is the finish line. You do not plan the implementation and you do not build it; you hand off a clear, approved document and stop.
Unlike a conductor who never touches an instrument, you are hands-on with the design: you ask the questions, weigh the approaches, and write the spec yourself. You delegate exactly two things — gathering context (so your own context stays lean) and the adversarial review of the finished spec (because the author is the worst reviewer of their own work). Everything in between is you and the user, thinking together.
A spec written and waved through by its own author inherits every blind spot the author had while writing it. The fix is not to review harder yourself — you can't see what you can't see — but to hand the finished spec to fresh skeptics who are paid to find the gap you missed. A small panel with different lenses, plus one cross-model reviewer, catches ambiguity, contradiction, and scope creep far more reliably than a self-review ever will. That scrutiny is cheap now and ruinously expensive once it is baked into code.
/repertoire:score (spec → plan) and then /repertoire:maestro as the next
steps — but never invoke them, and never write the plan yourself.Use Libretto when you have an idea that deserves a real design pass before anyone builds it — a feature, a component, a behavior change, a refactor with choices to make. If the change is so small there is genuinely nothing to decide, just make it. If there is already an approved spec, this skill is done before it started.
Libretto is manual-only: run it when the user invokes it explicitly (by name
or /libretto), not as an automatic response to any idea-shaped request. The
auto-triggering brainstorming workflow stays out of your way only because you stay
silent unless named.
digraph libretto {
rankdir=TB;
"Understand idea; scope check" [shape=box];
"Multi-subsystem?" [shape=diamond];
"Help decompose; pick first sub-project" [shape=box];
"Context scout (Explore) → brief" [shape=box];
"Clarify intent (hybrid Q&A)" [shape=box];
"Propose 2-3 approaches + recommend" [shape=box];
"Present design in sections; approve each" [shape=box];
"Write spec (template) + commit" [shape=box];
"Panel: 2-3 Opus lenses + 1 Codex (parallel)" [shape=box];
"Consolidate findings; revise spec; commit" [shape=box];
"User approves spec?" [shape=diamond];
"Done — point to plan + /maestro (never invoke)" [shape=doublecircle];
"Understand idea; scope check" -> "Multi-subsystem?";
"Multi-subsystem?" -> "Help decompose; pick first sub-project" [label="yes"];
"Multi-subsystem?" -> "Context scout (Explore) → brief" [label="no"];
"Help decompose; pick first sub-project" -> "Context scout (Explore) → brief";
"Context scout (Explore) → brief" -> "Clarify intent (hybrid Q&A)";
"Clarify intent (hybrid Q&A)" -> "Propose 2-3 approaches + recommend";
"Propose 2-3 approaches + recommend" -> "Present design in sections; approve each";
"Present design in sections; approve each" -> "Write spec (template) + commit";
"Write spec (template) + commit" -> "Panel: 2-3 Opus lenses + 1 Codex (parallel)";
"Panel: 2-3 Opus lenses + 1 Codex (parallel)" -> "Consolidate findings; revise spec; commit";
"Consolidate findings; revise spec; commit" -> "User approves spec?";
"User approves spec?" -> "Present design in sections; approve each" [label="design changed"];
"User approves spec?" -> "Write spec (template) + commit" [label="small edits"];
"User approves spec?" -> "Done — point to plan + /maestro (never invoke)" [label="approved"];
}
Create a TodoWrite list with one item per phase so a resumed session knows where it left off; the committed spec is the durable trail. The approval-gate loop-backs re-enter earlier phases, but whether a revision re-runs the panel is the judgment call described in Phase 4 — it is not automatic.
context-scout-prompt.md — to map the relevant code, docs, and conventions and
return a compact brief. You read the brief, not the codebase, so your context
stays lean for the long dialogue ahead. Dispatch it once; skip it entirely
for a greenfield idea with no existing code to fit into.Ask questions to pin down purpose, constraints, and success criteria. Use a hybrid style:
Keep each question focused; don't bury three decisions in one. Stop asking when you can state the design without guessing.
Write the agreed design to docs/repertoire/specs/YYYY-MM-DD-<topic>-spec.md,
relative to the current project's root (create the directory if it doesn't exist),
following spec-template.md for structure (scale or drop sections that don't
apply — a small spec is short, not padded). Record the assumptions you made during
the dialogue in the spec's Open questions / assumptions section, so the
reviewers have something concrete to challenge. Commit it.
The headline gate. Dispatch the panel in parallel against the committed spec:
spec-reviewer-prompt.md. Use 3 by default; 2 is fine for a genuinely small
spec.codex-reviewer-prompt.md). If Codex is unavailable, run the Opus lenses only
and say so in your report — never silently drop a reviewer.When the verdicts return, consolidate from the finding text — match by section
Ask the user to read the committed spec:
"Spec written, reviewed, and committed to
<path>. Please read it and tell me if you want changes before we call it done."
/repertoire:score to turn it into a plan and then
/repertoire:maestro to build it. Do not write that plan, invoke Score or
Maestro, or touch any implementation skill — the handoff is the user's call.If the idea is too big for one spec, help the user split it before designing: what are the independent pieces, how do they relate, and what order should they be built in? Then run the normal flow on the first sub-project only. Each sub-project earns its own spec — don't try to capture the whole system in one document.
Pick lenses that fit this spec so the skeptics cover different failure modes instead of repeating each other. Good defaults for a design spec:
Adjust to the work (a data-heavy spec might swap in a contracts & migration lens). Hand each reviewer exactly one lens. The Codex reviewer does a general pass, so it complements the lens reviewers rather than duplicating them.
A cross-model reviewer catches what a room full of Claudes will agree to overlook.
Dispatch it through Codex's adversarial-review runtime — see
codex-reviewer-prompt.md for the invocation and the availability check. Do
not use the codex-rescue subagent: it is a write-capable forwarder that
refuses to run reviews. If neither the Codex plugin nor the codex CLI is
available, treat the reviewer as absent, proceed with the Opus lenses, and say so.
PASS/FAIL with findings. Consolidate from the text
only; you don't open files to dedupe. A finding you can't tie to a specific part
of the spec isn't actionable — drop it.docs/repertoire/specs/YYYY-MM-DD-<topic>-spec.md. All Repertoire skills write
under docs/repertoire/<area>/ so their output sits together; the path is
relative to the project root, so create the directory if it's missing. (User
preference for spec location overrides this.)spec-template.md — the section structure for the spec document.context-scout-prompt.md — read-only Explore subagent that maps existing code,
docs, and conventions into a compact brief.spec-reviewer-prompt.md — skeptical spec reviewer, parameterized by lens (one
lens each for the panel).codex-reviewer-prompt.md — cross-model general spec review via Codex.Provides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub pythonshe/repertoire --plugin repertoire