juicesharp/rpiv-mono/discover
Claude Code and agent skill by juicesharp/rpiv-mono
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Interview the developer one question at a time to extract feature intent and requirements, then synthesize into a Feature Requirements Document at .rpiv/artifacts/discover/. The first question is intent-only and runs before any codebase probe; subsequent questions ground in evidence the probe surfaces. Use as the canonical entry point of the pipeline before research, or to stress-test a feature idea before codebase discovery. The FRD's Decisions block is consumed by `research` and propagates through Developer Context into `design`.
Install
npx vskill@latest install juicesharp/rpiv-mono/discoverSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as juicesharp/rpiv-mono/discover.
Discover
You are tasked with extracting feature intent and requirements through a one-question-at-a-time interview, then writing a Feature Requirements Document (FRD) that downstream skills consume. Two principles shape the flow: (1) intent before agents — the foundational intent question runs before any probe, so stated intent shapes the probe scope; (2) lazy + confirm — build the decision tree one layer at a time, and surface evidence-based pre-resolutions for confirmation rather than silently recording them.
Input
$ARGUMENTS — free-text feature description, or path to an existing FRD / ticket / doc for refinement.
Metadata
Copy values verbatim — do not reformat the timezone offset.
Flow
- Input → 2. Intent question → 3. Codebase probe → 4. Lazy tree → 5. Interview loop → 6. Synthesize FRD → 7. Write artifact → 8. Follow-ups
The final artifact is research-compatible — its Decisions block is translated into research's Developer Context and inherited by design.
Steps
Step 1: Input Handling
- No argument provided:
``` I'll capture feature intent into an FRD. Provide one of:
/skill:discover [free-text feature description] — fresh interview, write a new FRD /skill:discover [existing artifact path] — refine an existing FRD/ticket/doc via fresh interview ``` Then wait for input.
- Detect input shape — parse the input:
- If the argument is an existing file path (resolves to a readable
.mdunder.rpiv/artifacts/, or any path the user mentions for refinement context), read it FULLY using the Read tool WITHOUT limit/offset. Treat its content as baseline context — the interview surfaces gaps, missing requirements, and unstated assumptions relative to what's already documented. - Plain free-text input → fresh-feature mode: the entire argument is the free-text feature description.
- Read any other files mentioned in the prompt (tickets, docs, related artifacts, explicit
path:linereferences) FULLY before proceeding.
No agent dispatch in Step 1. Only Read on user-named paths. Agent grounding starts in Step 3, after stated intent has shaped the probe scope.
Each invocation always writes a NEW timestamp-distinct artifact (Step 7) — there is no in-place stress-test append mode. To iterate on a prior FRD, either re-invoke discover (produces a fresh artifact) or manually Edit the prior artifact.
Step 2: Foundational Intent Question
Before any codebase probe, ask the foundational intent question. This is purely conversational — no agents, no recommendation, no file:line citations.
- Ask one open-ended `intent` question via
ask_user_question:
- Frame: "What problem are you solving and who hits it?" / "What does success look like for the person experiencing this today?" — phrase it for the specific feature.
- No `(Recommended)` option. The developer should generate the framing, not pick from a proposal.
- No `file:line` citations — codebase has nothing to say about intent.
- Options should be open shapes (for example, "End user", "Maintainer", or "Operator") that route the answer, not solution shapes. The automatically appended
Type something.row lets the developer supply a different framing; do not author anOtheroption.
- Capture the answer in the developer's own words. This text feeds into the FRD's Problem & Intent section verbatim — do not paraphrase into agent prose.
- Probe-readiness check: does the stated intent support a narrow probe slice (one component, one seam)? If yes → proceed to Step 3. If no (answer is too vague, e.g., "I dunno, feels slow"), ask one more `intent` question to sharpen scope, then re-check. Step 2 ends on probe-readiness, not at fixed N=1. Cap: 3
intentquestions before falling through to Step 3 with whatever scope you have.
Step 3: Lightweight Codebase Probe (parallel agents, intent-shaped)
Goal: ground the upcoming interview in concrete codebase evidence, with the probe slice shaped by the developer's stated intent from Step 2 — not by the raw input text.
- Pick the agent set. Dispatch
codebase-locator,codebase-analyzer, or both — nothing else. Cap: 2 agents per Step 3 invocation.
- Spawn the chosen agent(s) in parallel using the Agent tool. Draft each prompt yourself from the developer's stated intent — keep the slice narrow (one component, one seam) and avoid breadth phrasing like "everything related to X". Shape per call:
`` Agent({ subagent_type: "codebase-locator", // or "codebase-analyzer" description: "<3-5 word task>", prompt: "<your narrow-slice prompt, scoped to stated intent>" }) `` The agent description on each subagent is the contract for what it expects in the prompt body.
- Wait for ALL agents to complete before proceeding to Step 4.
- Read any clearly-relevant files surfaced by the agents (≤5 files in main context, files <300 lines fully, larger files first 150 lines). Carry the agent reports and these files into Step 4 as evidence.
- Empty results are not fatal. If the probe returns thin/empty results (greenfield, no precedent), record "no codebase precedent" as evidence —
scopeinterview questions still work (they don't needfile:line), andshapequestions will shift to ungrounded "pick A or B by convention" mode.
Step 4: Lazy Tree Setup + Pre-Resolution Confirmation
Synthesize the next layer of questions internally before asking anything. Lazy expansion — build only root + immediate children at this stage, not the full tree. Each subsequent layer is built after its parent resolves.
- Build root + immediate children:
- Root — the developer's already-stated problem from Step 2.
- Immediate children — the foundational unresolved branches: Goals/Non-Goals · Functional Requirements · Non-Functional Requirements (perf/security/UX/reliability) · Constraints · Acceptance Criteria · Recommended Approach.
- Order branches by dependency (root → goals → constraints → solution shape → details). This order drives the interview, not the FRD section order — Step 6 redistributes answers into FRD sections.
- Mark evidence-based pre-resolutions from Step 3 with
file:linecitations. Do NOT silently record them as Decisions yet.
- Batch-confirm pre-resolutions in a single `ask_user_question` call before entering the interview loop. Frame each as: "From the probe I inferred —
<observed behavior>(file:line). Keep this for the feature, or change it as part of the work?" The developer's confirm/correct is the actual Decision.
- Confirm → record as Decision, rationale
evidence: file:line + confirmed. - Correct → flip the Decision direction, schedule a Correction probe at Step 5 (≤1 additional agent on the new seam).
- The lazy tree stays internal — do NOT present the tree to the developer unless asked.
Step 5: Interview Loop
Walk the lazy tree depth-first, parent before child. Expand the next layer (build a node's children) only after the node resolves. For each unresolved node:
- Classify the question by tier:
- `intent` — already done in Step 2. Do not re-ask intent in this loop.
- `scope` (goals · non-goals · functional reqs · non-functional reqs · constraints) — recommendation grounded in stated intent.
file:linecitations only when an option references existing code; otherwise state "no codebase precedent" in the option description. - `shape` (architectural choice — which seam, which pattern, which integration point) — frame dialectically: name the tradeoff axis, not a winner. Each option's
descriptionMUST state what it optimizes for AND what it sacrifices, in the form "optimizes <X>, loses <Y>" (or "optimizes <X>, costs <Y>"). The lead option still carries(Recommended)with a one-line rationale, but the framing forces the developer to pick a side of an explicit tension rather than rubber-stamp a winner. Generate at least 2 candidate options before scoring — never present a single option masquerading as a choice.file:linecitations required on every option that references existing code. Mirrors thepackages/rpiv-pi/skills/research/SKILL.md:103-142checkpoint pattern. If no precedent exists, switch to ungrounded mode and label options as "convention A / convention B" with explicit "no codebase precedent" — the dialectic framing (X vs Y tradeoff) still applies.
Anti-rescoping: if the probe finds something that could substitute for the requested build (e.g., feature already exists but isn't wired up), surface as an intent question with file:line — never silently redirect. Offer both "use what's there" and "build as asked".
- `detail` (acceptance criteria · routine sub-decisions inside any branch) — batchable when 2-4 sibling leaves are independent.
- Recommended answer (
scope/shape/detail): derive from intent + Step 3 evidence + project conventions. Every non-intent question carries a recommendation labeled(Recommended).
- Ask via `ask_user_question`. Lead with the recommended authored option. The automatic
Type something.custom-answer row handles open-ended answers; do not author anOtheroption.
- Critical rules:
- Ask ONE question at a time. Wait for the answer before asking the next.
- If a new evidence-based node surfaces mid-loop, batch-confirm it the way Step 4 does — never silently auto-record.
- Classify each response:
- Decision ("yes, that recommendation is right" / "use option B"): Record in Decisions. Resolve the node. Expand its children if any. Continue.
- Correction ("no, the real intent is X" / "you missed Y"): Re-run targeted Step 3 grep on the new area; spawn at most 1 additional narrow agent per correction event if the correction reveals a seam not yet probed. Adjust the affected subtree. Re-ask any descendants that depend on the corrected node.
- Scope adjustment ("skip the UI part" / "include retries"): Update the tree — prune pruned branches, add new branches if needed. Record in Decisions. Scope-creep: every Decision must trace to a branch under the Step 2 request. Related-but-unrequested observations ("X is also broken") go to Suggested Follow-ups or trigger a one-shot expand-scope? question — never silently into Decisions.
- Cross-cutting answer ("we also need audit / rate limiting / X" — affects multiple branches): Mark the new node as cross-cutting and re-queue it. When the walk reaches each affected parent (functional / non-functional / constraints), the cross-cutter fires under that parent's context. Same node, multiple parents resolved sequentially.
- Defer ("not sure, leave for later"): Add to Open Questions. Resolve the node by deferral. Continue.
- Batching: When 2-4 sibling
detailleaves are independent (answers don't depend on each other), you MAY batch them in a singleask_user_questioncall. Keep dependent questions sequential. Do not batchscopeorshapequestions.
- Termination — depth check, not bucket-fill: stop the loop when:
- (a) every branch has a Decision or a Deferral, AND
- (b) the developer's own words appear in Problem/Goals (not paraphrased agent prose), AND
- (c) no Decision is
Recommendation acceptedwithout at least one Rationale clause beyondagreed.
Do not invent questions to pad the interview. Do NOT ask a final "looks good / want to adjust" rubber-stamp question — chain forward to research is automatic at Step 7.
Total agent budget across the skill: 2 (Step 3 initial probe) + N×1 (Step 5 corrections, typically 0-2) = 2-4 agent dispatches per FRD.
Step 6: Synthesize FRD Body
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/rpiv-pi/skills/discover/SKILL.md
Popularity
- Repository stars
- 658
- Repository forks
- 121
- 7-day trend score
- 32
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/juicesharp/rpiv-mono/discover)