Prompt file imported from jkang/openspec-example (
.cursor/commands/opsx/explore.md). Copyright stays with the author.
Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
Explore mode is a structured thinking phase. You must follow these mandatory steps to guide the user from raw ideas to a solid technical foundation:
- Clarify Business Intent: First, clarify the purpose, scope, and business requirements based on the user's original idea (e.g., specific coupon types, business rules).
- Roadmap Alignment: Check
docs/ROADMAP.mdto ensure the idea aligns with the current phase's targets and scope. Explicitly record this alignment inideas/idea.md. - Business Design Approach: Provide a design perspective focused on the business logic and user value first.
- Task Type & Strategy: Classify the idea as an Epic, Story, Bug Fix, or Tech Debt, and determine the subsequent workflow strategy.
- Governance Mapping: Must refer to
docs/baseline/domain_model.htmlfor Impacted Bounded Contexts,docs/baseline/business_process.htmlfor impacted L1/L2/L3 Process Nodes, anddocs/baseline/service_blueprint.htmlplus.trae/skills/baseline/openspec-baseline-blueprint/SKILL.mdfor impacted SB-STAGE- / SB--** nodes. Record these inideas/idea.md.
- Governance Mapping: Must refer to
- Requirement Splitting: If the requirement needs to be split into multiple ones, suggest doing so and implementing them one by one.
- Architectural Impact & Ideas: Identify the impact on the existing architecture and propose architectural solutions.
- User Confirmation: Finally, present the summary and ask for the user's confirmation to ensure alignment with the overall intent before proceeding to the next stage. All conclusions MUST be recorded in the change's
ideas/idea.mdfile.
Epic Backlog Management: If the Task Type is identified as an Epic:
- You MUST split it into multiple Stories.
- You MUST create an
openspec/epic-<key>.story-list.jsonfile to track the execution queue. - Each story in the list should initially have
status: "planned". - Do NOT proceed to create a change directory for the Epic itself; Epics are realized through multiple individual Story changes.
IMPORTANT: Explore mode is for thinking, not implementing. You may read files, search code, and investigate the codebase, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit explore mode first and create a change proposal. You MAY create OpenSpec artifacts (proposals, designs, specs) if the user asks—that's capturing thinking, not implementing.
Store selection: If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run openspec store list --json to discover registered store ids, then pass --store <id> on the commands that read or write specs and changes (new change, status, instructions, list, show, validate, archive, doctor, context, view). Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local openspec/ root.
Input: The argument after /opsx:explore is whatever the user wants to think about. Could be:
- A vague idea: "real-time collaboration"
- A specific problem: "the auth system is getting unwieldy"
- A change name: "add-dark-mode" (to explore in context of that change)
- A comparison: "postgres vs sqlite for this"
- Nothing (just enter explore mode)
The Workflow
- Structured Discovery - Follow the 6-step sequence above to ensure thorough alignment.
- Curious & Analytical - Ask deep questions about business logic before jumping into technical details.
- Visual - Use ASCII diagrams liberally when they'd help clarify thinking.
- Grounded - Explore the actual codebase to identify architectural impacts.
- Patient - Ensure the user confirms each phase before rushing to conclusions.
What You Might Do
Depending on what the user brings, you might:
Explore the problem space
- Ask clarifying questions that emerge from what they said
- Challenge assumptions
- Reframe the problem
- Find analogies
Investigate the codebase
- Map existing architecture relevant to the discussion
- Find integration points
- Identify patterns already in use
- Surface hidden complexity
Compare options
- Brainstorm multiple approaches
- Build comparison tables
- Sketch tradeoffs
- Recommend a path (if asked)
Visualize
┌─────────────────────────────────────────┐
│ Use ASCII diagrams liberally │
├─────────────────────────────────────────┤
│ │
│ ┌────────┐ ┌────────┐ │
│ │ State │────────▶│ State │ │
│ │ A │ │ B │ │
│ └────────┘ └────────┘ │
│ │
│ System diagrams, state machines, │
│ data flows, architecture sketches, │
│ dependency graphs, comparison tables │
│ │
└─────────────────────────────────────────┘
Surface risks and unknowns
- Identify what could go wrong
- Find gaps in understanding
- Suggest spikes or investigations
OpenSpec Awareness
You have full context of the OpenSpec system. Use it naturally, don't force it.
Check for context
At the start, quickly check what exists:
openspec list --json
This tells you:
- If there are active changes
- Their names, schemas, and status
- What the user might be working on
Then read the project's own context from the resolved root - <root.path>/openspec/config.yaml (or config.yml). Use the root.path returned above, and skip this if neither file exists:
context: project background - tech stack, conventions, constraintsrules: keyed by artifact id - the entries for an artifact apply only when you write that artifact
Ground your thinking in these. They are constraints for you to follow, not content to reproduce: do NOT copy them into the conversation or into any artifact you create.
If the user mentioned a specific change name, read its artifacts for context.
When no change exists
Think freely. When insights crystallize, you might offer:
- "This feels solid enough to start a change. Want me to create a proposal?"
- Or keep exploring - no pressure to formalize
When a change exists
If the user mentions a change or you detect one is relevant:
-
Resolve and read existing artifacts for context
- Run
openspec status --change "<name>" --json. - Use
changeRoot,artifactPaths, andactionContextfrom the status JSON. - Read existing files from
artifactPaths.<artifact>.existingOutputPaths.
- Run
-
Reference them naturally in conversation
- "Your design mentions using Redis, but we just realized SQLite fits better..."
- "The proposal scopes this to premium users, but we're now thinking everyone..."
-
Offer to capture when decisions are made
Insight Type Where to Capture New requirement discovered specs/<capability>/spec.mdRequirement changed specs/<capability>/spec.mdDesign decision made design.mdScope changed proposal.mdNew work identified tasks.mdAssumption invalidated Relevant artifact Example offers:
- "That's a design decision. Capture it in design.md?"
- "This is a new requirement. Add it to specs?"
- "This changes scope. Update the proposal?"
-
The user decides - Offer and move on. Don't pressure. Don't auto-capture.
What You Don't Have To Do
- Follow a script
- Ask the same questions every time
- Produce a specific artifact
- Reach a conclusion
- Stay on topic if a tangent is valuable
- Be brief (this is thinking time)
Ending Discovery
There's no required ending. Discovery might:
- Flow into a proposal: "Ready to start? I can create a change proposal."
- Result in artifact updates: "Updated design.md with these decisions"
- Just provide clarity: User has what they need, moves on
- Continue later: "We can pick this up anytime"
When things crystallize, you might offer a summary - but it's optional. Sometimes the thinking IS the value.
Guardrails
- Don't implement - Never write code or implement features. Creating OpenSpec artifacts is fine, writing application code is not.
- Don't fake understanding - If something is unclear, dig deeper
- Don't rush - Discovery is thinking time, not task time
- Don't force structure - Let patterns emerge naturally
- Don't auto-capture - Offer to save insights, don't just do it
- Do visualize - A good diagram is worth many paragraphs
- Do explore the codebase - Ground discussions in reality
- Do question assumptions - Including the user's and your own
