kramme-cc-workflow/skills/kramme:siw:discovery/SKILL.md
Deep discovery interview that uncovers what you actually want, not what you think you should want. Works pre-spec or on existing specs until 90% confident. Pass --decision-tree, or ask to walk depth-first, to resolve tightly coupled decisions one at a time.
npx skillsauth add abildtoft/kramme-cc-workflow kramme:siw:discoveryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"Interview me until you have 90% confidence about what I actually want, not what I think I should want."
The gap between what someone says they want and what they actually need is where most failed projects begin. This skill makes the AI the interviewer — probing, challenging, and digging until it genuinely understands the work before a single line of spec or code is written.
Do NOT use for: implementation planning (use generate-phases), issue definition (use issue-define), or spec quality auditing (use spec-audit).
/kramme:siw:discovery [topic | spec-file(s) | 'siw'] [--apply] [--decision-tree]
│
▼
[Step 1: Detect mode & resolve context]
│
▼
[Step 2: Autonomous framing — draft hypothesis before asking anything]
│
▼
[Step 3: Initial confidence assessment OR root decision map]
│
▼
[Step 4: Discovery interview loop]
│ ├─ Coverage mode: pick dimensions, ask 1-3 questions, update confidence
│ ├─ Decision-tree mode: resolve dependencies one question at a time
│ ├─ Check whether the codebase already answers each question
│ ├─ Offer ADR handoff for durable tradeoff decisions
│ └─ Repeat until target confidence or decision tree closure
│
▼
[Step 5: Synthesize findings]
│ ├─ Greenfield → siw/DISCOVERY_BRIEF.md
│ └─ Refinement → siw/SPEC_STRENGTHENING_PLAN.md
│
▼
[Step 6: Optional apply (--apply or user request)]
Use these markers in user-facing output to keep downstream tooling parseable:
CONFUSION — when the working hypothesis doesn't match the user's framing, or when answers contradict earlier ones.MISSING REQUIREMENT — when a confidence dimension can't be answered from the spec or artifact and needs user input.UNVERIFIED — when you assert something you haven't confirmed (e.g., a hypothesis still awaiting validation).STALE — when repo-level strategy context exists but its last_updated value is old enough to verify before relying on it.MISSING PRODUCT CONTEXT — when strategy grounding would materially improve discovery but no STRATEGY.md exists.PLAN — the label applied to the synthesized brief or strengthening plan at hand-off.Parse $ARGUMENTS as shell-style arguments so quoted paths stay intact.
--apply is present, set apply_changes=true and remove from argument list. --apply has no effect in Greenfield mode (the brief is the output); if Greenfield mode is detected later, tell the user the flag was ignored and continue.--decision-tree is present, set decision_tree_requested=true and remove from argument list.decision_tree_requested=true without removing the user's topic words unless the phrase is only an instruction.siw keyword.Detect mode automatically. First classify the current siw/ state:
has_spec_files: siw/*.md excluding the synced SIW spec-exclusion contract. Synced SIW spec-exclusion contract (keep aligned across SIW spec detectors): LOG.md, OPEN_ISSUES_OVERVIEW.md, DISCOVERY_BRIEF.md, SPEC_STRENGTHENING_PLAN.md, AUDIT_*.md, PRODUCT_AUDIT.md, SIW_*.md.has_discovery_brief: siw/DISCOVERY_BRIEF.md existshas_strengthening_plan: siw/SPEC_STRENGTHENING_PLAN.md existsBefore branching into Greenfield vs Refinement, handle the ambiguous case explicitly:
siw/DISCOVERY_BRIEF.md already exist, ask whether the user wants to refine the existing SIW documents or start a separate discovery thread.siw.siw/ directory. Tell them to archive/remove the existing SIW files first or use a different workspace, then stop. Never overwrite an existing siw/DISCOVERY_BRIEF.md.siw/SPEC_STRENGTHENING_PLAN.md exists without spec files or siw/DISCOVERY_BRIEF.md, do not offer a "refine existing" branch. Treat it as an unresolved strengthening artifact that must be applied, archived, or removed before starting another discovery pass.Greenfield mode when:
siw/ directory exists, ORsiw/ exists but contains neither spec files, siw/DISCOVERY_BRIEF.md, nor siw/SPEC_STRENGTHENING_PLAN.mdRefinement mode when:
siw keyword is used and spec files, siw/DISCOVERY_BRIEF.md, or siw/SPEC_STRENGTHENING_PLAN.md exist, ORsiw/DISCOVERY_BRIEF.md, or siw/SPEC_STRENGTHENING_PLAN.md existGreenfield:
topic_hintheader: "What are you building?"
question: "Describe the project, problem, or idea you want to explore. Don't worry about being precise — that's what this interview is for."
freeform: true
Refinement:
siw/DISCOVERY_BRIEF.md and siw/SPEC_STRENGTHENING_PLAN.md also exists, stop. Tell the user to apply, archive, or discard the pending strengthening plan before running another refinement interview against the brief.siw/DISCOVERY_BRIEF.md)siw/SPEC_STRENGTHENING_PLAN.md exists in the workspace, read that plan, tell the user there is already an unresolved strengthening artifact in this workspace, and stop. They should apply, archive, or remove it before starting another discovery pass.siw/*.md except the synced SIW spec-exclusion contract from mode detection. Also include siw/supporting-specs/*.md.siw/DISCOVERY_BRIEF.md does, target that brief so no-argument reruns resume the saved discovery output..out-of-scope/ for prior matches against the topic. Two-step protocol: (a) list filenames in .out-of-scope/ (skip silently if the directory is absent or empty); (b) read the body of any file whose slug plausibly matches topic_hint (greenfield) or the resolved spec scope (refinement). When a match is found, surface as "This is similar to .out-of-scope/<slug>.md (decided <date>) — we rejected this before because <one-line summary>. Continue, or honor the prior rejection?" and route the answer through AskUserQuestion. If the user honors the prior rejection, stop; otherwise continue and note the prior rejection in the discovery brief output. If /kramme:docs:out-of-scope is installed in this environment, mention it as the storage skill; omit the mention otherwise.siw/AUDIT_SPEC_REPORT.md exists, read it and lower the matching confidence dimension to Low for every section the audit flagged as missing, vague, or contradictory before starting the interview.Look for ## Work Context section in spec files:
Work Type to the closest Work Context profile using the mapping in references/confidence-framework.mdPriority Dimensions and Deprioritized values from siw:init as interview-ordering hints onlywork_contextdecision_tree_requested=true, use Decision-Tree mode and read references/decision-tree-mode.md before Step 3.Before Step 2, check for UBIQUITOUS_LANGUAGE.md at the project root:
{term} as {canonical meaning}, but you seem to mean {observed meaning}. Which meaning should I use?"Before Step 2, check for STRATEGY.md at the project root:
STRATEGY_CONTEXT and use it as product grounding for the interview and synthesized artifact.last_updated frontmatter is older than 90 days, mark relevant strategy context as STALE: in the initial hypothesis and treat it as a question to verify.STRATEGY.md exists, proceed silently for narrow refinement. For greenfield product discovery or broad repo-level direction work, emit MISSING PRODUCT CONTEXT: once; if /kramme:product:strategy is installed in this environment, suggest it as an optional precursor without blocking discovery, and omit the suggestion otherwise.Before asking a single question, draft a working hypothesis based on available context:
Greenfield: Use the topic hint to infer:
STRATEGY_CONTEXT, when presentRefinement: Read the spec and infer:
STRATEGY_CONTEXT, when presentPresent the hypothesis to the user, prefixed with UNVERIFIED: so downstream readers know it is a working assumption awaiting interview validation:
UNVERIFIED: Here's my initial read on what you're building:
[2-4 sentence hypothesis]
I'll use this as a starting point and validate/correct it during the interview. Let me know if I'm wildly off before we begin, or we can let the interview surface the corrections naturally.
Proceed immediately — don't wait for a response unless the user offers one. The hypothesis is a conversation opener, not a gate.
If the hypothesis clearly clashes with the user's framing, additionally prefix it with CONFUSION: and name what doesn't fit.
If STRATEGY_CONTEXT exists and the target work appears to conflict with an active track, target user, metric, or non-goal, name the conflict in the hypothesis. This is a product-alignment prompt, not a blocker; the user may confirm that strategy should change.
Read references/confidence-framework.md for dimension definitions and scoring rubrics.
In Decision-Tree mode, also read references/decision-tree-mode.md, then replace the initial confidence dashboard with:
Start all 7 dimensions at Low, unless the topic hint is rich enough to justify Medium on specific dimensions.
Map spec content to confidence dimensions using the mapping table in the framework reference. Score each:
If Work Context exists, apply the adjustments from the framework reference:
In Coverage mode, show the confidence dashboard (format in references/confidence-framework.md) with initial scores and overall percentage. In Decision-Tree mode, show the root decision, unresolved dependency branches, and any confidence dimensions that still need coverage before synthesis.
Read references/probing-techniques.md for the technique library and selection guide.
Use Coverage mode by default. Use Decision-Tree mode when selected in Step 1.5.
Before asking any question in either mode, decide whether the answer can be found by exploring the workspace, target spec, existing SIW docs, or provided artifacts.
After each resolved decision in either mode, evaluate the ADR test. Offer /kramme:docs:adr only when it is installed in this environment (skip the hook entirely otherwise) and all three are true:
Prompt once: "This looks ADR-worthy because it is hard to reverse, surprising without context, and tradeoff-driven. Record it via /kramme:docs:adr?" Do not author the ADR inside this skill.
Repeat until confidence target is met (see "When to Stop" in framework reference):
Pick the 1-2 lowest-confidence dimensions, weighted by criticality:
Use the technique selection guide to pick 1-2 techniques appropriate for the focus dimensions.
Early rounds (1-3): prefer Solution Stripping, Why Chain, and Minimum Viable Test — these establish the foundation.
Middle rounds (4-6): prefer Forced Tradeoff, Negative Space, and Constraint Removal — these sharpen boundaries.
Late rounds (7+): prefer Restatement Challenge, Inversion, and Stakeholder Lens — these validate and stress-test understanding.
Use AskUserQuestion. Ask 1-3 high-value questions per round. For each question:
When the technique calls for it, deliberately restate something the user said earlier — slightly differently — to test whether your model matches theirs.
After each round:
CONFUSION: and probeMISSING REQUIREMENT: before asking the targeted follow-up.Show the confidence dashboard with updated scores. Mark focus areas for next round with ◄. Include round number and overall percentage.
If confidence dropped on any dimension (due to contradiction or revelation), note it:
⚠ Scope Boundaries dropped from High to Medium — your answer about [X] suggests the scope is wider than the spec indicates.
Stop when:
Also stop when:
Continue when:
Read references/decision-tree-mode.md for the detailed process. Then repeat until the active decision tree is resolved or remaining gaps are independent enough for Coverage mode:
Choose the highest-dependency unresolved branch: the decision that unlocks the most downstream choices. Do not ask about downstream branches until their prerequisite decision is settled.
Ask one question at a time by default. Batch only routine sibling questions that are independent and low-stakes. Apply the Codebase-as-Answer-Source Rule before asking.
Record:
If the answer changes the root decision, redraw the active dependency tree before asking again.
Run the ADR-Offer Hook for each resolved durable decision. Exit Decision-Tree mode when the coupled branch is resolved; continue in Coverage mode for independent confidence gaps.
In either mode, if a dimension remains unanswered, keep the relevant placeholder in the generated artifact and insert MISSING REQUIREMENT: {dimension} immediately above that section so unresolved gaps survive the hand-off artifact.
Create siw/ if it does not already exist. Then read assets/discovery-brief-template.md, populate it from the interview, and write the result to siw/DISCOVERY_BRIEF.md. Emit PLAN: Written to siw/DISCOVERY_BRIEF.md. at hand-off.
After writing, suggest next steps:
/kramme:siw:init siw/DISCOVERY_BRIEF.md — to bootstrap a full SIW workflow from this brief/kramme:siw:discovery siw/DISCOVERY_BRIEF.md --apply — to iterate on the brief and fold clarified decisions back into itWhen the host runtime supports it (Claude Code) and the user wants to move directly into implementation planning rather than the SIW spec/issue workflow, offer to call EnterPlanMode so the brief becomes the seed of an interactive plan. Ask once via AskUserQuestion (Enter plan mode now / Stick with SIW) — don't auto-trigger. If the runtime doesn't expose EnterPlanMode, skip this step silently.
Read assets/spec-strengthening-plan-template.md, populate it from the interview, and write the result to siw/SPEC_STRENGTHENING_PLAN.md. Emit PLAN: Written to siw/SPEC_STRENGTHENING_PLAN.md. at hand-off.
If the refinement target is siw/DISCOVERY_BRIEF.md, reference sections from the brief in the patch plan and treat the brief as the target document for optional apply. Treat siw/SPEC_STRENGTHENING_PLAN.md as a temporary handoff artifact: it should remain only while waiting for review or manual application, and it should be removed once the plan has been applied.
If apply_changes=true or the user asks to apply:
Refinement mode:
siw/DISCOVERY_BRIEF.mdMISSING REQUIREMENT: markers for unresolved dimensions instead of filling those sections with guessessiw/LOG.md Decision Log with:
siw/SPEC_STRENGTHENING_PLAN.md using a trash-first, verified deletion:
trash is installed, run trash siw/SPEC_STRENGTHENING_PLAN.md without suppressing errors.trash is missing, warn that the file will be permanently deleted and ask for explicit confirmation before running rm -f siw/SPEC_STRENGTHENING_PLAN.md.[ ! -e siw/SPEC_STRENGTHENING_PLAN.md ]. Report a failure if the file still exists instead of claiming it was removed.
This prevents future runs from treating the applied plan as unresolved state while keeping deletion recoverable when possible.Greenfield mode:
/kramme:siw:init siw/DISCOVERY_BRIEF.md for full workflow setupEvery finding must be:
Do NOT finish with generic advice like "improve clarity" or "add more detail." If you can't point to a specific gap grounded in the interview, it's not a real finding.
/kramme:siw:discovery
# Auto-detect mode: greenfield if no spec, refinement if spec exists
/kramme:siw:discovery build a notification system for our platform
# Greenfield discovery with topic hint
/kramme:siw:discovery siw
# Refinement: strengthen existing SIW specs
/kramme:siw:discovery siw/FEATURE_SPEC.md
# Refinement: focus on one spec file
/kramme:siw:discovery siw --apply
# Refinement: discover and directly apply spec improvements
/kramme:siw:discovery --decision-tree "design the event store schema"
# Decision-tree discovery: resolve coupled choices depth-first
MISSING REQUIREMENT: and ask.Before writing the brief or strengthening plan, confirm:
MISSING REQUIREMENT: marker, not a fabricated answer.PLAN: marker is present at hand-off.development
Runs kramme:pr:code-review as a closeout review loop for local or PR branch changes before commit, ship, or final response. Use when the user asks for autoreview, second-model review, or a final code-review pass after non-trivial edits. Not for UX, visual, accessibility, or product review.
development
Guides topic-level understanding verification for a PR, branch, feature, document, spec, design decision, bug fix, or other concrete subject. Use when the user asks to confirm, quiz, drill, teach-and-check, or verify that they understand a topic. Maintains a topic-specific checklist artifact and requires demonstrated understanding before marking the topic complete. Not for ordinary explanations without verification, end-of-session summaries, or code/test correctness checks.
testing
Design a CI/CD pipeline with quality gates, a <10-minute budget, feature-flag lifecycle, and an exit checklist. Use when adding a new CI pipeline, changing gate configuration, or planning a rollout for a new service. Complementary to kramme:pr:fix-ci (which fixes failures in an existing pipeline). Covers gate ordering, secrets storage, branch protection, rollback mechanism, and staged-rollout guardrails — not a rollout-execution runbook.
tools
--- name: kramme:visual:demo-reel description: Capture local demo evidence for observable product behavior: screenshots, before/after image sets, browser reels, terminal recordings, and short GIF/video proof. Use when shipping UI changes, CLI features, or any change where PR reviewers would benefit from visual or behavioral evidence. argument-hint: "[what to capture] [--url <url>|auto] [--tier static|before-after|browser-reel|terminal-recording]" disable-model-invocation: true user-invocable: tr