feat: improve explore discovery questions#1017
feat: improve explore discovery questions#1017DanRioDev wants to merge 2 commits intoFission-AI:mainfrom
Conversation
📝 WalkthroughWalkthroughThis PR updates the explore workflow template to adopt a structured "decision-tree" interviewing approach, replacing freeform stance language with goal-tethered questioning. Changes include new "Relentless Interview Mode" guidance, proactive codebase consultation, upstream-first decision resolution, and expanded decision capture in summaries. Supporting changeset and test hash updates are included. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/core/templates/workflows/explore.ts (1)
17-113: Extract shared explore-policy text to a single source to prevent drift.The same long guidance is maintained twice (
instructionsand slash-commandcontent). This is likely to drift and forces repetitive hash-baseline churn for text-only edits.Also applies to: 450-553
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/core/templates/workflows/explore.ts` around lines 17 - 113, The file duplicates the long "explore" guidance in two places (the instructions block and the slash-command `content`) which will drift; extract the shared text into a single exported constant (e.g., EXPLORE_POLICY_TEXT or explorePolicyText) and replace the inline literals used by `instructions` and the slash-command `content` with references to that constant; update any imports/usages in the same module (and the other occurrence around lines 450-553) so both places read the single source, and add a short unit or snapshot check if the project uses text-baseline tests to prevent regressions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/core/templates/workflows/explore.ts`:
- Around line 38-44: Add "@/openspec/AGENTS.md" to the mandatory pre-question
context scan used by the explore workflow: update the list/constant that defines
required contexts (e.g., MANDATORY_PRE_QUESTION_CONTEXTS or
PRE_QUESTION_CHECKLIST) in the explore template in
src/core/templates/workflows/explore.ts so that any request mentioning
planning/proposals/spec/change/plan triggers loading/opening openspec/AGENTS.md
before prompting the user; ensure the path is included in the same scanning
order as other repo-authoritative files and adjust any helper that builds the
pre-question context bundle (e.g., collectPreQuestionContexts) to include it.
---
Nitpick comments:
In `@src/core/templates/workflows/explore.ts`:
- Around line 17-113: The file duplicates the long "explore" guidance in two
places (the instructions block and the slash-command `content`) which will
drift; extract the shared text into a single exported constant (e.g.,
EXPLORE_POLICY_TEXT or explorePolicyText) and replace the inline literals used
by `instructions` and the slash-command `content` with references to that
constant; update any imports/usages in the same module (and the other occurrence
around lines 450-553) so both places read the single source, and add a short
unit or snapshot check if the project uses text-baseline tests to prevent
regressions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9058fa01-5adc-4502-933b-60fbc57181f3
📒 Files selected for processing (3)
.changeset/curious-explore-questions.mdsrc/core/templates/workflows/explore.tstest/core/templates/skill-templates-parity.test.ts
| Before asking the user, check whether the answer is available from: | ||
|
|
||
| - Existing OpenSpec changes, specs, proposals, designs, or tasks | ||
| - Source code, tests, docs, configs, package metadata, or recent conventions | ||
| - Existing architecture, naming, integration, UX, or API patterns | ||
|
|
||
| Do not ask repository-answerable questions. Explore first, then state what you found. |
There was a problem hiding this comment.
Include openspec/AGENTS.md in the mandatory pre-question context scan.
The new “repository-answerable” checklist omits openspec/AGENTS.md, which is the authoritative source for proposal/spec conventions during planning conversations.
Suggested patch
Before asking the user, check whether the answer is available from:
+- openspec/AGENTS.md for proposal/spec conventions and project guidance
- Existing OpenSpec changes, specs, proposals, designs, or tasks
- Source code, tests, docs, configs, package metadata, or recent conventions
- Existing architecture, naming, integration, UX, or API patternsBased on learnings: Always open @/openspec/AGENTS.md when the request mentions planning/proposals/spec/change/plan so exploration follows authoritative project conventions.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/core/templates/workflows/explore.ts` around lines 38 - 44, Add
"@/openspec/AGENTS.md" to the mandatory pre-question context scan used by the
explore workflow: update the list/constant that defines required contexts (e.g.,
MANDATORY_PRE_QUESTION_CONTEXTS or PRE_QUESTION_CHECKLIST) in the explore
template in src/core/templates/workflows/explore.ts so that any request
mentioning planning/proposals/spec/change/plan triggers loading/opening
openspec/AGENTS.md before prompting the user; ensure the path is included in the
same scanning order as other repo-authoritative files and adjust any helper that
builds the pre-question context bundle (e.g., collectPreQuestionContexts) to
include it.
There was a problem hiding this comment.
Pull request overview
Updates the Explore workflow templates to guide users through more dependency-aware discovery when planning changes, while keeping Explore as a non-implementation mode.
Changes:
- Added “Relentless Interview Mode” guidance (decision-tree order, recommended defaults, one-question-at-a-time format, and “explore repo first” direction).
- Updated example dialogues and optional summary structure to reflect the new questioning approach.
- Refreshed template parity hashes and added a patch changeset for the package release.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/core/templates/workflows/explore.ts |
Updates Explore skill + /opsx:explore command prompt content to drive structured discovery and repo-first questioning. |
test/core/templates/skill-templates-parity.test.ts |
Updates expected hashes for modified Explore templates and generated content. |
.changeset/curious-explore-questions.md |
Adds a patch changeset describing the Explore guidance improvements. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| - Follow a script | ||
| - Ask the same questions every time | ||
| - Use a fixed questionnaire, but do maintain a live question tree for this specific problem |
| User: I'm thinking about adding real-time collaboration | ||
|
|
||
| You: Real-time collab is a big space. Let me think about this... | ||
|
|
||
| COLLABORATION SPECTRUM | ||
| ════════════════════════════════════════════ | ||
|
|
||
| Awareness Coordination Sync | ||
| │ │ │ | ||
| ▼ ▼ ▼ | ||
| ┌────────┐ ┌────────┐ ┌────────┐ | ||
| │Presence│ │Cursors │ │ CRDT │ | ||
| │ "3 │ │ Multi │ │Conflict│ | ||
| │online" │ │ select │ │ free │ | ||
| └────────┘ └────────┘ └────────┘ | ||
| │ │ │ | ||
| trivial moderate complex | ||
|
|
||
| Where's your head at? | ||
| First decision: what kind of collaboration are we actually building? | ||
|
|
||
| Why this matters: this determines whether we need CRDTs, | ||
| locking, or simple realtime events. | ||
|
|
|
|
||
| - Follow a script | ||
| - Ask the same questions every time | ||
| - Use a fixed questionnaire, but do maintain a live question tree for this specific problem | ||
| - Produce a specific artifact |
This updates explore mode so it behaves more like a focused discovery interview when a user is planning a change.
It keeps the loose thinking-partner stance, but adds guidance to walk decision branches in order, recommend defaults, and ask one useful question at a time. It also tells the agent to inspect OpenSpec artifacts and the codebase before asking questions the repo can answer.
That should reduce back-and-forth and make /opsx:explore more useful for shaping proposals before implementation. The generated skill and slash command templates were updated together, with parity hashes and a patch changeset.
Validated with build, lint, the template parity test, and the full test suite.
Summary by CodeRabbit
New Features
Tests