| name | questions |
| description | Use when goals.md is approved and the QRSPI pipeline needs research questions generated — produces tagged questions that guide the Research step without leaking goals |
Questions (QRSPI Step 2)
PRECONDITION: Invoke qrspi:using-qrspi skill to ensure global pipeline rules are in context. (Idempotent on session re-entry. Subagents are exempt — SUBAGENT-STOP in using-qrspi handles that.)
Announce at start: "I'm using the QRSPI Questions skill to generate research questions."
Overview
Generate targeted research questions — query planning before any code is read. Separates "what we need to know" from "finding the answers," preventing unfocused research tangents. Questions are tagged by research type to dispatch the right specialist agents.
Critical constraint: Questions MUST NOT leak goals or intent. They should be neutral inquiries about how things work, not what we want to change.
Artifact Gating
Required inputs:
goals.md with status: approved
If goals.md doesn't exist or isn't approved, refuse to run and tell the user to complete the Goals step first.
Read config.md from the artifact directory to determine whether second-model reviews are enabled. If config.md doesn't exist, default to second_reviewer: false.
Do NOT generate questions without an approved goals.md.
Do NOT pass goals.md to any research subagent — research isolation is structural.
Execution Model
Subagent (clean context). The subagent receives only goals.md.
Process
Question Generation Subagent
Inputs: goals.md
Task: Analyze goals to identify which codebase zones and external knowledge domains are relevant. Generate specific, objective research questions.
Research type tags:
[codebase] — requires reading local code, tracing logic flows, understanding existing architecture
[web] — requires web searches for competitors, existing tools, libraries, best practices, documentation
[hybrid] — needs both local code reading and external research. Use ONLY when the question literally cannot be answered without both (e.g., "how does our auth token format compare to the JWT spec?"). Default to splitting into separate codebase and web questions instead.
Goal leakage rules:
- BAD: "We want to add real-time notifications — how do competitors handle this?" (leaks the goal)
- GOOD: "How do existing tools in this space handle real-time event delivery to clients?" (neutral inquiry)
- BAD: "How should we refactor the auth module?" (prescriptive)
- GOOD: "How does the auth module work? What are its dependencies and data flows?" (objective)
Greenfield detection: Run at the start of the question-generation subagent. Use the Glob tool with pattern **/*.{ts,tsx,js,jsx,py,go,java,rs,rb,swift,kt,cs,cpp,c,h}. If all results are inside node_modules/, vendor/, or .git/ directories (or if there are zero results), treat this as a greenfield project — replace all [codebase] questions with [web] questions about existing solutions, frameworks, and best practices. If source files exist outside those directories, proceed normally.
Output format for questions.md:
!cat skills/_shared/evergreen-output-rule.md
---
status: draft
---
# Research Questions
1. [codebase] How does the auth module work? What are its dependencies and data flows?
2. [web] What are the most common OAuth 2.0 libraries for Node.js? How do they compare?
3. [codebase] How are API endpoints registered and routed? Trace the request lifecycle.
4. [hybrid] How does our session token format compare to the JWT specification?
5. [web] What are current best practices for rate limiting in REST APIs?
Review Round
Compaction checkpoint: pre-fanout. Reviewer dispatch reads questions.md + goals.md + the agent-embedded reviewer protocol; saturated context produces shallow findings. See using-qrspi ## Compaction Checkpoints for the iron-rule contract.
Surface a todo: title Recommend /compact (pre-fanout) — questions, description pre-fanout: reviewer dispatch reads questions.md + goals.md. User decides whether to /compact..
Apply the Standard Review Loop from using-qrspi/SKILL.md. Questions has no scope-reviewer (canonical artifact-tree contract — Questions is not in the scope-reviewer topology). Only the quality reviewer runs.
Dispatch the round through dispatch-agent's high-level entry. Run scripts/dispatch-agent.sh --step questions --round ${ROUND} --artifact-dir <ABS_ARTIFACT_DIR> (plus the per-skill --output-dir/--artifact/--agents flags below). High-level mode invokes scripts/review-prep.sh to emit <ABS_ARTIFACT_DIR>/reviews/questions/round-${ROUND}.diff and threads diff_file_path: into the reviewer prompt; the orchestrator runs no git diff Bash redirect of its own. When the artifact directory is not inside a git repository, review-prep skips diff emission and diff_file_path: is omitted. For round 01 pass --base-ref <base-branch>; on round >= 2 review-prep auto-narrows by reading reviews/questions/round-$((ROUND-1))-commit.txt (named diagnostics anchor-file-missing: / sha-format-invalid: halt before the SHA reaches git diff). Scope-tag narrowing (when active) reaches the reviewer as scope_hint: wrapped between <<<UNTRUSTED-SCOPE-HINT-START id=scope_hint>>> / <<<UNTRUSTED-SCOPE-HINT-END id=scope_hint>>> markers per the reviewer-protocol Reviewer Dispatch Contract.
The round's reviewers dispatch through the universal dispatch chain (scripts/dispatch-agent.sh → subagent fan-out → scripts/await-round.sh). Set the per-skill dispatch parameters below, then include the shared reviewer-dispatch prose. Include the *-codex peer tags in REVIEW_AGENTS only when second_reviewer: true; otherwise list only the *-claude tags.
REVIEW_STEP="questions"
REVIEW_ROUND="${ROUND}"
REVIEW_OUTPUT_DIR="<ABS_ARTIFACT_DIR>/reviews/questions/round-${ROUND}/"
REVIEW_ARTIFACT="questions.md"
REVIEW_AGENTS="quality-claude=qrspi-questions-reviewer,quality-codex=qrspi-questions-reviewer"
!cat skills/_shared/reviewer-dispatch-prose.md
Human Gate
Present the full content of questions.md inline — every question, every tag, verbatim. Do not summarize, show only headers, or present a condensed table. The user must see the complete artifact to give meaningful approval.
Always state the review status when presenting: either "Reviews passed clean in round N" or "Reviews found issues in round N which were fixed but not re-verified."
On approval, if reviews have not passed clean, note this and ask if they'd like a review loop before finalizing. Then write status: approved in frontmatter.
On rejection, write the user's feedback to feedback/questions-round-{NN}.md (see using-qrspi Feedback File Format), then launch a new subagent with goals.md + rejected questions.md + all prior feedback files (not just the latest round). After re-generation, the review cycle restarts.
Quick-Fix Auto-Approve Branch
When config.md carries pipeline: quick, the human-approval gate is skipped after any review round (initial or post-fix) that produces zero kept findings. When this branch fires, status: approved is written to questions.md frontmatter automatically without waiting for user input.
Verifier-gate precondition. "Zero kept findings" is satisfied only when the verifier has affirmatively confirmed the count — a vacuously-zero count from an undispatched verifier does NOT satisfy the gate and surfaces the round to the user as unverified (matching the HARD-GATE contract in skills/implement/SKILL.md). If config.md is missing or unreadable when this branch is evaluated, the auto-approve branch does NOT fire — the orchestrator surfaces a named diagnostic and falls through to the standard human-approval gate (fail-loud, not silent fallback to either pipeline mode). The gate passes when ANY of the following hold for the current round's directory (reviews/questions/round-NN/):
- At least one
.score.md sidecar file exists in the round directory AND every sidecar evaluates to no kept-blocker findings per the verifier's scoring rubric (see agents/qrspi-finding-verifier.md and skills/implementer-protocol/SKILL.md). A zero-byte sidecar does not constitute verifier affirmation and the gate does NOT pass. Full sidecar schema validation is the verifier's contract (see agents/qrspi-finding-verifier.md); this skill assumes well-formed sidecars. OR
- A
round-NN-verifier-disabled.md marker file is present in the round directory AND the marker conforms to the canonical schema defined in skills/implement/SKILL.md HARD-GATE (a marker failing schema validation, or whose round identifier does not match the current round, is treated as absent). OR
config.md carries verifier_enabled: false. When this condition satisfies the gate, the orchestrator MUST append an audit-log entry before writing status: approved — recording: timestamp, run slug, step name (questions), and branch label (auto-approve-verifier-disabled-config). The audit entry is written to the cascade audit log if one exists, otherwise to the round directory. An attempt to auto-approve via verifier_enabled: false without successfully writing this audit entry MUST abort with a named diagnostic (fail-loud, matching the audit-write precondition philosophy in skills/implement/SKILL.md HARD-GATE). This path is a deliberate operator-level configuration, not a default; the round appears in the review log as verifier-disabled, not as a normal clean round.
When none of these hold (no sidecars with affirmative zero-kept-findings content, no valid schema-conforming marker for the current round, and verifier_enabled is absent or true), the gate does NOT fire; the review round surfaces to the user as unverified and the standard human-approval gate runs.
Post-fix round behavior. If a fix round still produces kept findings, the auto-approve branch does NOT fire. The orchestrator surfaces the remaining kept findings to the user. The branch fires only when the most recent review round — initial or post-fix — produces verifier-affirmed zero kept findings.
Full pipeline unchanged. When pipeline: full, the human-approval gate runs as before — the branch is inert and the user must explicitly approve.
Terminal State
If the artifact directory is inside a git repository, commit the approved questions.md and the reviews/questions/ directory (per-round per-reviewer files; see using-qrspi → "Commit after approval (when applicable)").
Compaction checkpoint: pre-handoff. Questions approved; the next skill (typically Research) reads questions.md + every prior approved artifact + reviewer findings on a fresh context. See using-qrspi ## Compaction Checkpoints for the iron-rule contract.
Surface a todo: title Recommend /compact (pre-handoff) — questions, description pre-handoff: next skill reads questions.md + prior artifacts + reviewer findings. User decides whether to /compact..
REQUIRED: Invoke the next skill in the config.md route after questions.
Red Flags — STOP
- A question reveals the user's intended solution ("how do competitors implement feature X that we want to add?")
- A question is prescriptive rather than exploratory ("how should we refactor X?" vs "how does X work?")
- A
[hybrid] tag that could easily be split into [codebase] + [web]
- Questions only cover one research type (all codebase, no web, or vice versa) when the goals imply both
- Questions are too broad ("how does the app work?") or too narrow ("what's on line 42 of auth.ts?")
- Duplicate questions asking the same thing with different wording
Common Rationalizations — STOP
| Rationalization | Reality |
|---|
| "The questions are good enough" | Run the review. Goal leakage is subtle — you may not notice it yourself. |
| "This question needs to be hybrid" | Default to splitting. Only use hybrid when splitting loses essential cross-referencing. |
| "We don't need web research for this" | Even existing-codebase changes benefit from knowing current best practices. |
| "The goals don't imply any codebase questions" | If you're modifying code, you need to understand the existing code. Check again. |
| "I can combine these into fewer questions" | More specific questions get better research. Don't over-consolidate. |
Worked Example
Goal: "Add per-client rate limiting to the public REST API"
Good questions (no goal leakage):
1. [codebase] How does the Express middleware chain work? What middleware is currently registered and in what order?
2. [codebase] How are client identities resolved in the API? Is there an auth middleware that extracts client IDs?
3. [codebase] How does the application currently connect to and use Redis? What patterns are used for Redis operations?
4. [web] What are the current best practices for distributed rate limiting in Node.js applications?
5. [web] What Redis-based rate limiting algorithms exist (token bucket, sliding window, fixed window)? What are their trade-offs?
Bad questions (goal leakage):
1. [codebase] Where should we add the rate limiting middleware?
2. [hybrid] How can we use our existing Redis connection to implement rate limiting?
3. [web] What's the best rate limiting library for Express that uses Redis?
The bad questions reveal intent ("add rate limiting middleware"), assume decisions ("use existing Redis"), and seek recommendations ("best library").
Iron Laws — Final Reminder
The two override-critical rules for Questions, restated at end:
-
Questions must NOT leak goals or intent. A researcher reading only questions.md should not be able to infer what we're trying to build or change. Goal leakage produces confirmation-biased research downstream.
-
Questions are exploratory, not prescriptive. "How does X work?" is allowed; "How should we change X?" is not. Prescriptive questions presuppose conclusions that Design — not Research — should determine.
!cat skills/_shared/behavioral-directives.md