/rune:bafrom rune
Elicits structured requirements before implementation. Asks probing questions, identifies hidden requirements, maps stakeholders, defines scope boundaries, and produces a Requirements Document for plan/cook to consume.
Ships in rune. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Business Analyst agent — the ROOT FIX for "Claude works a lot but produces nothing." BA forces deep understanding of WHAT to build before any code is written. It asks probing questions, identifies hidden requirements, maps stakeholders, defines scope boundaries, and produces a structured Requirements Document.
Wrong requirements shipped correctly is the most expensive bug. BA's job is to prevent it — measure clarity (Step 2.5), measure completeness (Step 3.5), and measure cross-dimension consistency (Step 3.6) before handoff.
BA produces WHAT, not HOW. Never write code. Never plan implementation. Output is a Requirements Document → hand off to rune:plan for implementation planning.Goal-first (advisory, 2026). The Requirements Document is the goal spec current models want up front. Where the platform has a native goal/outcome command — Claude Code
/goal, Managed Agents Outcomes (rubric) — seed it from this document's scope boundaries + acceptance criteria so the whole run stays anchored to the agreed WHAT.
cook Phase 1 when task is product-oriented (not a simple bug fix)scaffold Phase 1 before any project generation/rune ba <requirement> — manual invocationscout (L2): scan existing codebase for contextresearch (L3): look up similar products, APIs, integrationsplan (L2): hand off Requirements Document for implementation planningbrainstorm (L2): when multiple approaches exist for a requirementdesign (L2): when requirements include UI/UX components — hand off visual requirementscook (L1): before Phase 2 PLAN, when task is non-trivialscaffold (L1): Phase 1, before any project generationplan (L2): when plan receives vague requirementsbrainstorm (L2): standalone ideation that picked an approach for a new feature with no spec — hands the chosen approach to ba for requirements before planmcp-builder (L2): requirements elicitation before MCP server design/rune ba direct invocationba → plan — ba produces requirements, plan produces implementation stepsba → brainstorm — ba calls brainstorm when multiple requirement approaches existba ↔ cook — cook calls ba for non-trivial tasks, ba feeds requirements into cook's pipelineba → scaffold — scaffold requires ba output before project generationRead the user's request. Classify the requirement type:
| Type | Signal | Depth |
|---|---|---|
| Feature Request | "add X", "build Y", "I want Z" | Full BA cycle (Steps 1-7) |
| Bug Fix | "broken", "error", "doesn't work" | Skip BA → direct to debug |
| Refactor | "clean up", "refactor", "restructure" | Light BA (Step 1 + Step 4 only) |
| Integration | "connect X to Y", "integrate with Z" | Full BA + API research |
| Greenfield | "new project", "build from scratch" | Full BA + market context |
If Bug Fix → skip BA, route to cook/debug directly. If Refactor → light version (Step 1 + Step 4 only). Skip Steps 2, 2.5, 3, 5, 6.
If existing codebase → invoke rune:scout for context before proceeding.
Full detail moved to
references/synthesis-trigger.md(progressive disclosure). Read that file before executing this section.
Before any elicitation, check whether the request matches a concept previously rejected.
Glob .out-of-scope/*.md — if directory absent, skip silently.concept, aliases).- and whitespace).confidence (0.0–1.0).Action by confidence:
| Confidence | Verdict | Action |
|---|---|---|
| ≥ 0.8 | exact-match | Surface to user: "This matches a prior rejection (.out-of-scope/<slug>.md) — closed because [body's "Why out of scope" first sentence]. Do you still feel the same way?" Pause for user response before continuing. |
| 0.5 – 0.79 | similar | Mention inline: "This is similar to a prior rejection (<slug>). Would you like to review it before we proceed?" Continue regardless of answer. |
| < 0.5 | no-match | Continue silently, no user-facing mention. |
Emit outofscope.match signal with {concept, confidence, verdict} so downstream skills (cook, plan) inherit the context.
If verdict is exact-match AND user says "yes I still want it" → record their override reason in the Requirements Document ## Risks section AND mark priority_to_revisit: high in the existing .out-of-scope/<slug>.md (do NOT delete the file). The override forces the candidate up the revisit ladder; it doesn't erase the prior decision.
If verdict is exact-match AND user accepts the prior rejection → end the BA session with a one-line summary referencing the file. No further questions.
Format reference: references/out-of-scope-format.md.
Mid-elicitation rejection MUST produce a `.out-of-scope/.md` file before session end. A rejection without a written record is a rejection that didn't happen.Full detail moved to
references/reject-write-path.md(progressive disclosure). Read that file before executing this section.
Before emitting ANY of the 5 elicitation questions, run the 4-item pre-check on each intended question:
package.json / pyproject.toml / Cargo.toml / go.mod / pom.xml?README.md / CLAUDE.md / docs/?The gate is "tried to infer" — not "must succeed in inferring." If the file genuinely doesn't have the answer, the attempt itself is the gate.
Cache inferred answers in the requirements doc:
**Inferred from package.json**: TypeScript 5.4, Next.js 14.2, React 18.3
**Inferred from .github/workflows/**: CI runs on PRs targeting main
Worked examples + edge cases: references/explore-first.md.
Ask exactly 5 probing questions, ONE AT A TIME (not all at once):
Every question the user answers burns attention you don't get back. Protect it.
package.json, don't ask.README, don't ask.Every Q should earn its slot: removing it must leave the Requirements Document materially worse. If it wouldn't, cut the question.
Full detail moved to
references/elicitation-frameworks.md(progressive disclosure). Read that file before executing this section.
After each question round, compute an Ambiguity Score to determine if requirements are clear enough to proceed. This prevents premature handoff to plan with vague inputs.
Full detail moved to
references/ambiguity-scoring.md(progressive disclosure). Read that file before executing this section.
Full detail moved to
references/ambiguity-scoring.md(progressive disclosure). Read that file before executing this section.
| Ambiguity | Level | Action |
|---|---|---|
| < 15% | Crystal Clear | Proceed to Step 3 immediately |
| 15-25% | Acceptable | Proceed with noted assumptions — flag gaps in Requirements Doc |
| 25-40% | Unclear | Ask 1-2 targeted follow-up questions on weakest dimension |
| > 40% | Blocked | Do NOT proceed. Re-ask the weakest dimension question with examples |
Full detail moved to
references/ambiguity-scoring.md(progressive disclosure). Read that file before executing this section.
Full detail moved to
references/ambiguity-scoring.md(progressive disclosure). Read that file before executing this section.
After elicitation, before hidden-requirement discovery, scan the user's answers for assertions about current behavior — phrasings like "the system X", "the code does X", "we already X", "right now it X".
For each such assertion:
Grep the codebase for evidence (function names, route handlers, schema definitions matching the asserted behavior).| Outcome | Action |
|---|---|
| Grep confirms claim | Proceed; record term in CONTEXT.md if domain-relevant |
| Grep contradicts claim | Surface the conflict immediately. "You said the system does X, but the code path I see does Y. Which is canonical?" Pause until resolved. |
| Grep returns nothing | Note as unverified; ask user for the file/function name; do not record in CONTEXT.md until verified |
This gate prevents the agent from silently transcribing user-asserted behavior that contradicts code — a common source of "the docs say X but the code does Y" drift.
After the 5 questions, analyze for requirements the user DIDN'T mention:
Technical hidden requirements:
Business hidden requirements:
Present discovered hidden requirements to user: "I found N additional requirements you may not have considered: [list]. Which are relevant?"
Full detail moved to
references/completeness-scoring.md(progressive disclosure). Read that file before executing this section.
After ambiguity + completeness pass, scan for cross-dimension contradictions. Ambiguity measures CLARITY of each dimension in isolation; this step measures CONSISTENCY across dimensions. A perfectly clear requirement can still contradict itself.
Run each, label verdict 🟢 pass / 🟡 warn / 🔴 fail:
| # | Check | 🔴 Fail | 🟢 Pass |
|---|---|---|---|
| 1 | Every Acceptance Criterion traces to a User Story | AC orphaned | 1:N mapping clear |
| 1b | Every EARS FR-n (Step 4.5) traces up to a User Story AND down to an AC | FR has no AC (untested promise) or no story (orphan behavior) | FR → story + AC both present |
| 2 | Every Business Rule (Q5) is enforced in an AC or Exception Flow | Rule has no enforcement path | Rule → specific AC or exception |
| 3 | Scope IN ∩ Scope OUT = ∅ | Direct overlap in phrasing | Sets disjoint |
| 4 | Every user-story flow has a terminal state | State loop without exit condition | Terminal state explicit |
| 5 | Dependencies (Step 4) ⊂ Constraints acknowledged (Q5) | Dependency never mentioned in constraints | All deps covered |
| 6 | NFRs measurable against at least one AC | NFR has no test hook | Every NFR → testable AC |
| 7 | Hidden requirements (Step 3) resolved in/out | Silent inclusion | User confirmed inclusion or exclusion |
| 0 | Prior rejection check (Step 1.5) — exact-match resolved with explicit override or session ended | Silent re-litigation of rejected concept | User chose: override (priority bumped) OR accept prior decision (session ends) |
Full detail moved to
references/completeness-scoring.md(progressive disclosure). Read that file before executing this section.
| Result | Action |
|---|---|
| 0 🔴 | Proceed to Step 4 — 🟡 warnings become "Risks" in Requirements Doc |
| 1-2 🔴 | BLOCK — ask targeted question or re-scope to resolve each 🔴 |
| 3+ 🔴 | Scrap Steps 2-3 and restart — requirements structurally incoherent |
Based on all gathered information, produce:
In-Scope (explicitly included):
Out-of-Scope (explicitly excluded):
Assumptions (things we're assuming without proof):
Dependencies (things that must exist before we can build):
Full detail moved to
references/ears-requirements.md(progressive disclosure). Read that file before executing this section.
For each in-scope feature, generate:
US-1 [P1]: As a [persona], I want to [action] so that [benefit]
Independent Test: [specific action proving this story works end-to-end on its own —
e.g., "submit the form with valid data and see the saved record listed"]
AC-1.1: GIVEN [context] WHEN [action] THEN [result]
AC-1.2: GIVEN [error case] WHEN [action] THEN [error handling]
AC-1.3: GIVEN [edge case] WHEN [action] THEN [graceful behavior]
Rules:
P1 = MVP-critical (the P1 set alone must be a viable, demoable product), P2 = important, P3 = nice-to-have. Implementing ONLY the P1 stories must still yield a working featureconverge's gap scan, completion-gate's evidence trail) trace againstFR-n from Step 4.5 — cite it (AC-1.2 → FR-3). Every unwanted-behavior FR (the If … lines) needs an error-path AC; that's where EARS earns its keepFull detail moved to
references/key-entities.md(progressive disclosure). Read that file before executing this section.
Assess and document ONLY relevant NFRs:
| NFR | Requirement | Measurement |
|---|---|---|
| Performance | Page load < Xs, API response < Yms | Lighthouse, k6 |
| Security | Auth required, input validation, OWASP top 10 | sentinel scan |
| Scalability | Expected users, data volume | Load test target |
| Reliability | Uptime target, error budget | Monitoring threshold |
| Accessibility | WCAG 2.2 AA | Axe audit |
Only include NFRs relevant to this specific task. Don't generate a generic checklist.
Full detail moved to
references/tiered-recommendations.md(progressive disclosure). Read that file before executing this section.
Full detail moved to
references/artifact-triad.md(progressive disclosure). Read that file before executing this section. Mesh links used there:rune:plan.
Full detail moved to
references/artifact-triad.md(progressive disclosure). Read that file before executing this section.
Triad of artifacts under .rune/features/<feature-name>/:
| File | Template Reference |
|---|---|
requirements.md | Step 7 Artifact 1 |
requirements.mermaid | Step 7 Artifact 2 (sequence + optional state machine) |
tasks.md | Step 7 Artifact 3 (Data / Logic / Interface / Test / NFR layers) |
Inside requirements.md the Decision Classification table MUST appear verbatim — plan gates on Decision compliance, Discretion items skip approval:
| Category | Meaning | Example |
|---|---|---|
| Decisions (locked) | User confirmed — agent MUST follow | "Use PostgreSQL, not MongoDB" |
| Discretion (agent decides) | User trusts agent judgment | "Pick the best validation library" |
| Deferred (out of scope) | Explicitly NOT this task | "Mobile app — future phase" |
| Artifact | Format | Location |
|---|---|---|
| Requirements document | Markdown | .rune/features/<feature-name>/requirements.md |
| Visual model | Mermaid (sequence + optional state machine) | .rune/features/<feature-name>/requirements.mermaid |
| Implementation task backbone | Markdown checklist by user story (vertical slices — Data→Logic→Endpoint→UI→Test per US-n) | .rune/features/<feature-name>/tasks.md |
| Logic Consistency Report | Markdown section | Embedded in requirements.md |
| Ambiguity + Completeness scores | Markdown display blocks | Embedded in requirements.md |
Known failure modes for this skill. Check these before declaring done.
| Failure Mode | Severity | Mitigation |
|---|---|---|
| Skipping questions because "requirements are obvious" | CRITICAL | HARD-GATE: 5 questions mandatory, even for "simple" tasks |
| Answering own questions instead of asking user | HIGH | Questions require USER input — BA doesn't guess |
| Producing implementation details (HOW) instead of requirements (WHAT) | HIGH | BA outputs requirements doc → plan outputs implementation |
| All-at-once question dump (asking 5 questions in one message) | MEDIUM | One question at a time, wait for answer before next |
| Asking open-ended questions when yes/no or multiple-choice would work | HIGH | Question Discipline rule 2 — option sets are faster to answer and easier to cache |
| Asking for info already in the repo/message (stack, framework, audience) | HIGH | Question Discipline rule 3 — read package.json/README/config first, ask only what you genuinely can't find |
| Exceeding 5 questions when the user seems "engaged" | MEDIUM | Question Discipline rule 1 — hard cap at 5. A 6th question is a sign of stalling, not thoroughness |
| Re-asking on session restart when answers were cached | MEDIUM | Question Discipline rule 4 — load .rune/features/<name>/requirements.md and reuse cached Q→A pairs |
| Missing hidden requirements (auth, error handling, edge cases) | HIGH | Step 3 checklist is mandatory scan |
| Requirements doc too verbose (>500 lines) | MEDIUM | Max 200 lines — concise, actionable, testable |
| Skipping BA for "simple" features that turn out complex | HIGH | Let cook's complexity detection trigger BA, not user judgment |
| Recommending shortcuts without Completeness Score | MEDIUM | Step 3.5: every option needs X/10 score + dual effort estimate (human vs AI). "90% coverage" is a red flag when 100% costs 15 min more |
| Handing off to plan with ambiguity > 40% | CRITICAL | Step 2.5 HARD-GATE: compute ambiguity score after elicitation, block handoff if > 40%, ask targeted follow-up on weakest dimension |
| Skipping ambiguity scoring because "user seems clear" | HIGH | Always compute the score — perceived clarity ≠ measured clarity. The formula catches gaps humans miss |
| Tiered recommendations too vague ("improve things") | MEDIUM | Each tier needs specific Action + measurable Expected Impact. "Build better UX" → "Reduce checkout steps from 5 to 3, targeting 15% conversion lift" |
| All three tiers have same resources/effort | MEDIUM | Quick Win should be low-effort. If all tiers need "2 engineers, 3 months" → re-scope Quick Win to something achievable in 1 sprint |
| Skipping Logic Consistency check because ambiguity is low | CRITICAL | Step 3.6 HARD-GATE: clarity ≠ consistency. A 90% clarity spec can still contain pairwise contradictions (scope IN/OUT overlap, rules with no enforcement, orphan ACs) |
| Handing off to plan with unresolved 🔴 consistency fails | CRITICAL | Step 3.6 gate: 1+ 🔴 = BLOCK. 🟡 allowed only when logged as Risk in requirements.md |
| Vague functional requirements ("system shall be fast/user-friendly") instead of EARS | MEDIUM | Step 4.5: every FR uses an EARS template with a named subject + testable response; vague targets move to NFRs (Step 6) |
| Compound EARS requirement ("shall do A and B and C") hiding untested behavior | MEDIUM | Step 4.5: one shall per FR-n — split compounds so each behavior gets its own AC |
EARS FR-n with no acceptance criterion (untested promise) | MEDIUM | Step 3.6 check 1b: every FR traces down to an AC and up to a User Story |
| Manufacturing EARS requirements for a bug fix or refactor | LOW | Step 4.5: skip EARS when there's no new behavior to specify — format recommendation, not ceremony |
| Producing only requirements.md, skipping mermaid and tasks.md | HIGH | Step 7 is a triad — plan's contract expects all 3. Sequence diagram is always produced; state machine only if stateful; tasks.md always produced |
| Mermaid diagram unrelated to actual user stories (decorative only) | MEDIUM | Sequence must trace AC-1.1 of US-1; state machine nodes must map to state-bearing ACs. Auditable by pattern-match |
| tasks.md grouped by layer instead of by story | HIGH | Story-grouped derivation: 1 US → 1 section with ALL its layers (Data→Logic→Interface→Test). Layer-grouped backbones invite "finish the UI layer and stop" — the dead-button root cause |
| Story with UI tasks but no Logic/Data/Test tasks (broken slice) | HIGH | Step 7 Artifact 3 rule: a ## US-n section containing only UI/Endpoint tasks is invalid — the UI element and the endpoint it calls belong to the SAME story |
| Story without an Independent Test (unprovable slice) | HIGH | Step 5 rule: every story names one concrete action proving it end-to-end. Can't name one → story is sliced wrong |
| AC whose THEN stops at the UI for a data-touching story | HIGH | Step 5 rule: THEN must name the observable outcome (record persisted / data returned), not just the widget state |
| Data-touching story with no Key Entity listed | MEDIUM | Step 5.5: plan bounces specs where a story touches data absent from Key Entities |
| Re-litigating a previously rejected concept without surfacing it | HIGH | Step 1.5 HARD-GATE: scan .out-of-scope/ first; exact match (≥0.8) MUST be surfaced before elicitation begins |
Skipping Step 1.5 because .out-of-scope/ directory looks empty | MEDIUM | Empty directory is silent-skip OK; directory absent entirely is silent-skip OK; never skip due to "I don't think this matches anything" — let the matcher decide |
| User asserts behavior; agent records user's version without grep verification | HIGH | Step 2.6 HARD-GATE: every "the system does X" assertion gets grep'd; conflicts surface to user before recording |
| Silently re-defining an existing CONTEXT.md term | HIGH | Step 7.5 conflict gate: ≥0.7 overlap → user chooses merge/rename/keep-distinct |
| Auto-creating an empty CONTEXT.md when no terms emerged | LOW | Lazy creation rule: only write when there's a non-trivial term to record |
Mid-elicitation rejection ("scrap it") that ends the session without writing .out-of-scope/ | CRITICAL | Step 1.6 HARD-GATE: explicit rejection MUST produce .out-of-scope/<slug>.md before session end — oral rejections vanish, force re-litigation next session |
Writing .out-of-scope/ for a deferral instead of routing to backlog | MEDIUM | Step 1.6 procedure step 1: confirm "out of scope" vs "deferred" — temporary reasons go to backlog, not the rejection KB |
| Running 5-question elicitation when conversation already contains rich context | HIGH | Step 1.4: synthesis-trigger check fires before Step 2 — pasted spec / >1000 words / continuation / explicit "synthesize" → switch to Synthesis Mode (extract + cite + confirm), don't re-interview |
| Synthesizing requirements without source citations | HIGH | Synthesis Mode requires citing source for every dimension (user message N, pasted doc, continuation file). User cannot verify interpretation without citations |
| Auto-handoff to plan after synthesis without explicit user "go"/"locked" confirmation | HIGH | Synthesis is interpretation, not transcription. Without explicit confirmation, drift becomes a downstream bug |
| Asking inferable questions ("what stack are you using?") without first checking package.json | HIGH | Step 2.0 HARD-GATE — every question requires prior tool-call evidence (Read/Glob/Grep) or explicit unavailability declaration |
| Re-asking a question already answered earlier in the conversation | MEDIUM | Step 2.0 check 4 — cache and reuse, never re-ask |
FR-n it provesrequirements.md + requirements.mermaid + tasks.mdplan for implementation planning~3000-6000 tokens input, ~1500-3000 tokens output. Opus for deep requirement analysis — understanding WHAT to build is the most expensive mistake to get wrong.
references/ambiguity-scoring.md (opens in a new tab)references/artifact-templates.md (opens in a new tab)references/artifact-triad.md (opens in a new tab)references/completeness-scoring.md (opens in a new tab)references/context-md-format.md (opens in a new tab)references/ears-format.md (opens in a new tab)references/ears-requirements.md (opens in a new tab)references/elicitation-frameworks.md (opens in a new tab)references/explore-first.md (opens in a new tab)references/key-entities.md (opens in a new tab)references/out-of-scope-format.md (opens in a new tab)references/reject-write-path.md (opens in a new tab)references/synthesis-mode.md (opens in a new tab)references/synthesis-trigger.md (opens in a new tab)references/tiered-recommendations.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub rune-kit/rune --plugin rune67 skills in this plugin
/adversaryPre-implementation red-team analysis. Use when a plan is high-risk, critical path, or expensive to reverse. Challenges plans before code is written — finds edge cases, security holes, scalability bottlenecks, error propagation risks, and integration conflicts. Catches flaws at plan time (10x cheaper than post-implementation)./asset-creatorCreates code-based visual assets — SVG icons, OG image HTML templates, social banners, and icon sets. Use when generating visuals as code (vector/HTML), NOT raster images — for raster generation see @rune-pro/media. Outputs files with usage instructions./auditComprehensive project audit — security, dependencies, code quality, architecture, performance, infra, docs, and mesh analytics. Use when needing a full 8-dimension health-score snapshot before a major release, M&A diligence, or quarterly review. Delegates to specialist skills (sentinel, dependency-doctor, perf, autopsy, etc.)./autopsyFull codebase health assessment. Use when diagnosing project health or starting a rescue workflow on legacy code — OR when evaluating an external GitHub repo for dependency / fork / contribution decisions (--external mode). Analyzes complexity, dependencies, dead code, tech debt, and git hotspots. Produces a health score and rescue plan./brainstormCreative ideation and solution exploration. Use when a task is vague or open-ended, several approaches are viable, or the current approach has fundamentally failed ('ideas', 'explore options', 'what are the ways to'). Generates multiple approaches with trade-offs using structured frameworks (SCAMPER, First Principles) and hands off to plan./browser-pilotPlaywright browser automation. Use when a task needs a real browser: checking a running web UI, reproducing a UI bug, taking screenshots, or auditing the accessibility tree. Navigates URLs, interacts with UI elements, and reports findings.Other plugins' skills for the same job