Skip to content

feat: improve explore discovery questions#1017

Open
DanRioDev wants to merge 2 commits intoFission-AI:mainfrom
DanRioDev:improve-explore-questions
Open

feat: improve explore discovery questions#1017
DanRioDev wants to merge 2 commits intoFission-AI:mainfrom
DanRioDev:improve-explore-questions

Conversation

@DanRioDev
Copy link
Copy Markdown

@DanRioDev DanRioDev commented Apr 28, 2026

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

    • Enhanced explore mode with a structured decision-tree questioning approach that checks existing repositories to avoid redundant questions and resolves decisions in dependency order.
  • Tests

    • Updated test baselines for explore mode outputs.

Copilot AI review requested due to automatic review settings April 28, 2026 01:03
@DanRioDev DanRioDev requested a review from TabishB as a code owner April 28, 2026 01:03
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Explore Workflow Template Revision
src/core/templates/workflows/explore.ts
Refactored explore mode guidance from freeform stance toward structured decision-tree interviewing. Added "Relentless Interview Mode" section covering proactive repo/OpenSpec checks, intent/tradeoff/constraint questioning only, and dependency-ordered resolution. Updated example prompts to ask upstream-first questions and consolidated branching scenarios. Expanded "crystallize" summary template to capture resolved decisions, defaults, dependencies, and repo-derived findings.
Changeset & Test Updates
.changeset/curious-explore-questions.md, test/core/templates/skill-templates-parity.test.ts
Added changeset documenting patch version bump for @fission-ai/openspec with explore mode guidance updates. Updated three baseline cryptographic hashes in the parity test to reflect explore template changes (getExploreSkillTemplate, getOpsxExploreCommandTemplate, and generated skill content).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • TabishB

Poem

🐰✨ Questions asked with deeper care,
Exploring paths upstream, laid bare,
Dependencies mapped with wisdom true,
No redundant asks—just what's new,
The interview hops from root to leave! 🌳

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: improve explore discovery questions' directly aligns with the main change: revising explore workflow to ask better discovery questions with a focused interview approach and dependency-aware guidance.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (instructions and slash-command content). 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3c7a05c and d55854e.

📒 Files selected for processing (3)
  • .changeset/curious-explore-questions.md
  • src/core/templates/workflows/explore.ts
  • test/core/templates/skill-templates-parity.test.ts

Comment on lines +38 to +44
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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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 patterns

Based 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Comment on lines 241 to +263
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.

Comment on lines 668 to 672

- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants