Help us improve
Share bugs, ideas, or general feedback.
From leyline
Use after the product spec is approved, before any implementation work. Pressure-tests the spec with a 100-question self-interrogation where each question builds on the previous answer. Returns critical issues, strengths, and a revised proposal. Material revisions loop back to brainstorming.
npx claudepluginhub forsonny/leyline --plugin leylineHow this skill is triggered — by the user, by Claude, or both
Slash command
/leyline:deep-discoveryThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> I'm using the deep-discovery skill to pressure-test the approved product spec with a 100-question interrogation before any implementation work. Material revisions will loop back to brainstorming.
Guides technical evaluation of code review feedback: read fully, restate for understanding, verify against codebase, respond with reasoning or pushback before implementing.
Share bugs, ideas, or general feedback.
I'm using the deep-discovery skill to pressure-test the approved product spec with a 100-question interrogation before any implementation work. Material revisions will loop back to brainstorming.
A brainstorming spec ships the best version of what the human partner and the agent could think of while co-writing it. Deep-discovery is the adversarial pass: one hundred questions, each building on the previous answer, hunting for assumptions, edge cases, missing requirements, and failure modes that the authoring frame could not see. The output is structured findings, not prose; findings that are material loop back to brainstorming for a spec revision.
docs/leyline/specs/YYYY-MM-DD-<topic>-design.md.Surfaces is anything other than none, the UX spec from design-brainstorming also exists at docs/leyline/design/YYYY-MM-DD-<topic>-ux.md and is approved. (deep-discovery targets the product spec; the UX spec is pressure-tested by design-interrogation in 2b.)Do NOT run a 100-question pass, document findings, or advance to any successor
skill until both preconditions are satisfied: (1) the product spec exists at the
stated path, AND (2) the human partner has explicitly approved it. If either
fails, STOP. Route the first back to `brainstorming`; surface the second to the
human partner and wait for approval. This applies to EVERY project regardless
of perceived simplicity or obviousness.
Violating the letter of the rules is violating the spirit of the rules.
digraph when_to_use {
"Product spec approved" [shape=doublecircle];
"UX spec required and approved?" [shape=diamond];
"deep-discovery (2a)" [shape=box];
"Block; return to design-brainstorming" [shape=box];
"Product spec approved" -> "UX spec required and approved?";
"UX spec required and approved?" -> "deep-discovery (2a)" [label="yes, or Surfaces=none"];
"UX spec required and approved?" -> "Block; return to design-brainstorming" [label="no"];
}
deep-discovery runs on every project regardless of scope. Skipping 2a because "the spec is obviously right" is the exact failure mode the pass exists to prevent.
digraph deep_discovery_flow {
Start [shape=doublecircle, label="Approved spec(s) in hand"];
Dispatch [shape=diamond, label="Subagent dispatch available?"];
Subagent [shape=box, label="1. Dispatch fresh subagent with 100-question-prompt.md"];
Inline [shape=box, label="1. Run 100-question pass inline in this session"];
Report [shape=box, label="2. Receive structured report (Critical / Strengths / Revised)"];
Present [shape=box, label="3. Present report to the human partner"];
Material [shape=diamond, label="4. Material revisions?"];
LoopBack [shape=box, label="Loop back to brainstorming; update spec; re-approve"];
Document [shape=box, label="Document findings in spec; mark '2a pass complete' "];
Next [shape=diamond, label="5. Surfaces != none and scope warrants 2b?"];
InvokeDesign [shape=box, label="Invoke design-interrogation (2b)"];
InvokeIsolate [shape=box, label="Invoke using-git-worktrees (3)"];
End [shape=doublecircle, label="Successor named"];
Start -> Dispatch;
Dispatch -> Subagent [label="yes"];
Dispatch -> Inline [label="no"];
Subagent -> Report;
Inline -> Report;
Report -> Present -> Material;
Material -> LoopBack [label="yes"];
LoopBack -> Start [label="after re-approval"];
Material -> Document [label="no"];
Document -> Next;
Next -> InvokeDesign [label="yes"];
Next -> InvokeIsolate [label="no, document 2b skip"];
InvokeDesign -> End;
InvokeIsolate -> End;
}
Create one task entry (TodoWrite or harness equivalent) per item.
Dispatch, or run inline only as a fallback. If the harness supports subagent dispatch, dispatch a fresh subagent with the contents of 100-question-prompt.md and the absolute path to the product spec. Do not paraphrase the prompt; use the template verbatim.
"Supports dispatch" means the primitive exists in the harness. Token pressure, rate limits, and session length are NOT reasons to fall back to inline. The subagent is bias-free by construction; the inline path inherits session bias and produces a lower-confidence report. Fall back to inline only when dispatch is literally unavailable, and say so out loud when you do.
Consume the structured report. The output has three sections: Critical Issues, Strengths, Revised Proposal. Do not edit the report; record it as returned.
Present to the human partner. Show the full report. Do not triage silently. Do not hide findings you disagree with.
Classify, then decide. Before calling any round material or non-material, tag each Critical Issue with exactly one of these literal letter tags:
Tags are recorded verbatim in the spec under a "Round classification" subsection as literal (S), (O), (R), (E) prefixes on each finding. Prose-embedded dismissal ("this one is cosmetic, this one is editorial") is insufficient; the tags must be the literal letters.
Then:
Material (at least one (S) or (O)): loop back to the correct Discovery co-skill. If the material finding is product-domain, loop to brainstorming. If UX-domain (voice, flow, state, accessibility target, IA), loop to design-brainstorming. Name the target explicitly when announcing: "Deep-discovery surfaced material <product | UX>-domain revisions; returning to <brainstorming | design-brainstorming> to update the spec and re-obtain approval." Do not proceed.
Convergence candidate (all (R) or (E)): present the per-finding classification, the count trend across rounds 1..N, and a completion-or-continue recommendation to the human partner with reasoning. The human partner decides. Do NOT append the completion marker without explicit human-partner approval, even when the human partner has delegated the call in advance. Delegation authorizes the recommendation and the classification work; the classification is what the human partner reviews, and that review is what authorizes the marker. If the human partner is unreachable, wait. "Unreachable" is categorical and duration-independent: any absence during which the human partner cannot review the classification right now counts, whether the absence is a scheduled meeting, a flight, a step-out, an indefinite vacation, or anything else. A two-hour meeting and a two-week vacation both require you to wait; the duration of the absence does not scale the authorization. Round-count claims ("we have run it N times"), aggregate-trend appeals ("the pattern argues against it"), convergence metaphors ("noise floor", "editorial whack-a-mole", "chasing the wake of our own edits"), and reachability-gradient appeals ("a scheduled absence is different from real unreachability") are all substitutes for the per-finding review; none of them authorizes the marker.
Verbatim completion-marker (appended only after explicit human-partner approval):
Deep-discovery pass complete - round <N> - YYYY-MM-DD
Transition.
Surfaces is not none AND scope warrants 2b, invoke design-interrogation (stage 2b). Scope rules (full rules in design-interrogation/SKILL.md): required for multi-screen-ui, cross-platform, or any UX spec whose state matrix covers more than one surface; optional for complex single-screen-ui / cli-only / developer-facing with non-trivial error paths; skipped otherwise.design-interrogation skipped - scope: <reason>) and invoke using-git-worktrees (stage 3).100-question-prompt.md):
Deep-discovery is not a checklist of dimensions; it is an adversarial conversation that covers those dimensions in the course of building on each answer.
The report the subagent returns, or the agent produces inline, has exactly three sections:
## Critical Issues
- <finding>: <file-path-and-line-or-section reference> - <why it matters>
## Strengths
- <finding>: <what the spec got right, worth preserving>
## Revised Proposal
<A short proposal - not a rewrite - naming the changes the spec should adopt to address the Critical Issues. Grouped by file and section.>
If a section has no entries, write "None." Do not skip the section.
(R) and (E) findings, the spec has converged on substance. Looping on "there's always something" is structurally identical to "I'll Ask Ten Questions" - both skip the skill's actual judgment criterion. Classify each finding per step 4; if none is (S) or (O), the round is a convergence candidate, not automatic material.(S) / (O) / (R) / (E) tags literally and individually. The metaphor may be true; the tags are what the human partner reviews.| Thought | Reality |
|---|---|
| "The human partner just approved this; I'll come back to interrogation later" | Later means never. Run it now while the spec is fresh. |
| "The spec is small, 20 questions is fine" | Small specs produce small reports, not short passes. The value is the chain. |
| "Most findings are cosmetic, no need to present" | Present anyway. The human partner judges materiality, not you. |
| "I'll dispatch the subagent without a path to the spec" | The subagent has no context. Constructed context is the entire prompt. |
| "The subagent disagreed with the spec; that's bias" | The subagent is bias-free by construction. You are biased toward the spec you just helped approve. |
| "Seven rounds is a lot; surely we can stop" | Round count is not the exit criterion; finding-character is. Classify each Critical Issue per step 4. |
| "Every round finds something material" | Check the tags: (S) / (O) are material, (R) / (E) are not. Finding something is not the same as finding something material. |
| "The human partner delegated the call, so I'll append the marker" | Delegation covers the classification and the recommendation. The human partner's review of the classification authorizes the marker. Present; wait. |
| "Deferring under delegation is abdication" | Deferring without the classification would be. Deferring with the classification presented is the skill's required shape. |
| "The pattern is clear; I don't need to tag each finding individually" | The tags ARE the pattern, applied at the level the skill operates on. Prose-embedded classification doesn't survive review. |
| "A two-hour meeting isn't really unreachable; the rule means indefinite absences" | Unreachable is categorical and duration-independent. If the human partner cannot review the classification right now, wait — regardless of how long "right now" lasts. |
| "They already said 'make the call', that's pre-paid consent" | Delegation authorizes the recommendation and the classification work. The human partner's review of the classification is what authorizes the marker. Consent cannot be pre-paid on something not yet seen. |
Do not say:
(S) / (O) / (R) / (E) classification and explicit human-partner approval).brainstorming) and committed with a short note: "deep-discovery round N applied".100-question-prompt.md - the prompt template the subagent receives, or the inline runner follows.report-template.md - blank three-section report for authors to fill when running inline.If Surfaces is not none AND scope warrants 2b:
Invoking design-interrogation (stage 2b). The product spec is cleared; pressure-testing the UX spec next.
Otherwise:
Invoking using-git-worktrees (stage 3). Interrogation cleared. 2b skip documented in the spec as: design-interrogation skipped - scope: .
If design-interrogation or using-git-worktrees is not present in this version of the plugin, STOP. Tell the human partner the pipeline is incomplete and which skill is missing. Do not improvise; do not skip ahead.
Do not exit without naming and invoking the named successor.