From mumei
This skill should be used BEFORE any feature design. It runs structured gleaning with the user — asking 5 high-leverage questions per round, up to 3 rounds, to extract Goal / Scope / Constraints / Edges / Done. Output is saved to .mumei/scratch/<topic>.md and used as input for /mumei:compose. Triggers include "I want to add X", "we need a feature for Y", "let's brainstorm Z", or any vague feature request.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mumei:gleanThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!--
Run a structured gleaning session with the user before they invoke /mumei:compose. The output is a scratch file at .mumei/scratch/<topic>.md that captures the user's intent in a form /mumei:compose can consume cleanly.
/mumei:glean directly.Do NOT use this skill if /mumei:compose is already running — compose does its own clarification.
Run up to 3 rounds of 5 questions each (15 total cap). Each round:
AskUserQuestion with multiple-choice options where possible.Aim to cover all five in this round. Use multiple-choice for speed:
| # | Axis | Example phrasing |
|---|---|---|
| Q1 | Goal / JTBD | "What problem does this solve? A) End-user authentication for SaaS B) Internal tool C) Prototype D) Other" |
| Q2 | Scope (MoSCoW Won't) | "Which of the following are EXPLICITLY out of scope for v1?" |
| Q3 | Existing constraints | "Which auth library/framework, if any?" |
| Q4 | Critical edge case | "Which failure modes matter most?" |
| Q5 | Done definition | "What is 'done'? A) Functions in dev B) Tests pass C) Deployed to staging D) Other" |
Pick the axes from Round 1 that ended in [ASSUMPTION] or [NEEDS CLARIFICATION] and ask up to 5 more questions.
Only if the user did not signal closure. 5 questions max.
mumei's scratch parser recognizes exactly two AC line prefixes; anything else is silently dropped (_mumei_scratch_count_acs returns 0 for the AC, and /mumei:compose cannot compute a vehicle recommendation from the scratch).
Use one of these forms:
- [Event] WHEN ... / - [Unwanted] IF ... / - [State] WHILE ... / - [Optional] WHERE ...- REQ-N.M WHEN ... (only when hand-authoring a scratch that imports into an existing spec; M is the AC index within that REQ)Do NOT use AC-N.M. It is silently dropped by the parser, which enforces the AC id pattern ^REQ-[0-9]+\.[0-9]+(\.[0-9]+)?$ (see hooks/_lib/scratch-parser.sh). This makes the scratch invisible to downstream tooling.
When hand-authoring mature spec form, determine the next REQ id first:
max="$(find .mumei/specs .mumei/archive -name state.json 2>/dev/null \
-exec jq -r '.id // empty' {} \; 2>/dev/null \
| grep -oE 'REQ-[0-9]+' | sort -V | tail -1)"
echo "${max:-REQ-0 (no prior REQ found)}"
Then increment from the highest existing id. The // empty guard skips plan-vehicle state.json files (which have no .id field); the 2>/dev/null redirections keep transient corruption / permission errors from polluting the output.
When drafting Acceptance Criteria, emit an inline Examples: block beneath each AC:
IF / UNLESS / WHILE clause, describes one unconditional action) MAY have zero examples.AskUserQuestion. Draft Examples directly from the AC's intent; the user edits the markdown if corrections are needed.WHEN / WHILE / IF / WHERE clause respectively.Stop and write the scratch file when ANY of these is true:
[CONFIRMED].The glean output follows the same language policy as /mumei:compose:
## Goal (JTBD), ## Scope, ## User Stories (draft), ## Acceptance Criteria (EARS, draft), ## Rejected Alternatives, ## Open Questions, ## Confidence Distribution, ## Interview Record).WHEN, WHILE, IF, WHERE, SHALL.[CONFIRMED], [ASSUMPTION], [NEEDS CLARIFICATION: ...].AskUserQuestion prompts to the user are in the user's language. The questions you ask should match how the user is writing to you.Write to .mumei/scratch/<topic-slug>.md:
# Brainstorm: <feature-name>
Generated: <ISO date>
Rounds: N/3 | Questions: M/15 | Status: PASS|NEEDS_IMPROVEMENT|MAJOR_ISSUES
## Goal (JTBD)
<1-2 sentences>
Confidence: [CONFIRMED] | [ASSUMPTION] | [NEEDS CLARIFICATION: ...]
## Scope
- Must: ...
- Should: ...
- Won't: ...
Confidence: [CONFIRMED]
## Constraints
- Existing stack: ... [CONFIRMED]
- Non-functional: ... [ASSUMPTION]
- Limits: ... [NEEDS CLARIFICATION]
## User Stories (draft)
### US-1: <title>
As a <role>, I want to <action>, so that <benefit>.
Confidence: [CONFIRMED]
#### Acceptance Criteria (EARS, draft)
- [Event] WHEN ..., the system SHALL ...
Examples:
- <happy path example, natural language>
- <edge or negative path example, optional>
- [Unwanted] IF ..., then the system SHALL ...
Examples:
- <happy path example>
- <edge or negative path example, optional>
Each AC carries an inline `Examples:` block of zero, one, or two natural-language list items. A simple AC (a single unconditional action with no `IF` / `UNLESS` / `WHILE` clause) may have 0 examples; cap at 2 (BDD collapse line: 3-7 scenarios per feature performs well, 20+ collapses). Write the Examples body in the same language as the AC body (per Language conventions).
## Rejected Alternatives
- <option A>: <reason for rejection, 1 line>
- <option B>: <reason>
## Open Questions
- [ ] <question to defer to design phase>
## Confidence Distribution
[CONFIRMED]: N items / [ASSUMPTION]: N items / [NEEDS CLARIFICATION]: N items
## Interview Record
| Round | Q | A | Confidence change |
| ----- | ----- | ------------- | ----------------------------------- |
| 1 | Goal? | (A) SaaS auth | [NEEDS CLARIFICATION] → [CONFIRMED] |
...
Tell the user:
Glean saved to
.mumei/scratch/<slug>.md. Run/mumei:compose <feature-name>to start spec creation. The compose skill will read this scratch file as input.
[ASSUMPTION] and surface them in the output.Out of Scope section. Closing scope is the strongest defense against scope creep./mumei:compose. Hand off via the scratch file and tell the user to invoke /mumei:compose themselves.Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub hir4ta/mumei --plugin mumei