openspec-discovery
Skill1 starsChanged 12 days agoMITView on GitHub
Use when scope is unstable or requirements are unclear, before creating OpenSpec artifacts. Covers codebase investigation, requirement clarification, option comparison, and decision convergence.
In this repository7 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Ask ONE question per message.
- Distinctive: line 22
When possible, offer choices rather than open-ended questions.
- Distinctive: line 26
When the user faces a decision:
- Distinctive: line 40
Don't accept requirements at face value.
- Distinctive: line 51
Check for existing implementations that could be reused
- Distinctive: line 55
Use ASCII diagrams liberally when they clarify thinking:
- Distinctive: line 94
Offer to capture: when decisions are made:
- Distinctive: line 108
When scope crystallizes, summarize:
- Distinctive: line 119
If open questions remain that would materially change artifacts, do NOT proceed — return to discovery.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenSpec Discovery
Overview
Discovery is the thinking phase before artifact creation. Investigate the codebase, clarify requirements with the user, compare approaches, and converge on stable scope — all without writing code or creating artifacts.
Iron law: Discovery is for thinking, not implementing. You may read files, search code, and investigate the codebase, but NEVER write application code. You MAY create OpenSpec artifacts if the user asks — that's capturing decisions, not implementing.
Questioning Discipline
One Question at a Time
Ask ONE question per message. Do not batch multiple questions. If a topic needs multiple questions, break them into separate turns.
Multiple Choice Preferred
When possible, offer choices rather than open-ended questions. Easier for the user to answer, reduces ambiguity.
Propose Options with Recommendation
When the user faces a decision:
- Propose 2-3 approaches with trade-offs
- Lead with your recommended option and explain why
- Let the user choose or override
Option A (recommended): [approach] — [why]
Option B: [approach] — [trade-off]
Option C: [approach] — [trade-off]Challenge Assumptions
Don't accept requirements at face value. If something seems over-engineered, under-specified, or misaligned with existing patterns, say so.
Investigation
Explore the Codebase
Ground discussions in reality. Before proposing anything:
- Map existing architecture relevant to the discussion
- Find integration points and patterns already in use
- Surface hidden complexity
- Check for existing implementations that could be reused
Visualize
Use ASCII diagrams liberally when they clarify thinking:
┌────────────┐ ┌────────────┐ ┌────────────┐
│ Input │────▶│ Process │────▶│ Output │
└────────────┘ └────────────┘ └────────────┘System diagrams, state machines, data flows, architecture sketches, dependency graphs, comparison tables — all fair game.
Surface Risks and Unknowns
- Identify what could go wrong
- Find gaps in understanding
- Suggest spikes or investigations for uncertain areas
OpenSpec Awareness
Check for Context
At the start, check what exists:
openspec list --jsonThis tells you active changes, their names, schemas, and status.
When No Change Exists
Think freely. When insights crystallize, 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
- Read existing artifacts for context (
proposal.md,design.md,tasks.md, etc.) - Reference them naturally: "Your design mentions Redis, but we just realized SQLite fits better..."
Offer to capture when decisions are made:
Insight Type Where to Capture New requirement specs/<capability>/spec.mdRequirement changed specs/<capability>/spec.mdDesign decision design.mdScope changed proposal.mdNew work identified tasks.md- The user decides — offer and move on, don't auto-capture
Ending Discovery
When scope crystallizes, summarize:
## What We Figured Out
**The problem**: [crystallized understanding]
**The approach**: [if one emerged]
**Open questions**: [if any remain]
**Next steps**: Create a change proposal (via openspec-propose)If open questions remain that would materially change artifacts, do NOT proceed — return to discovery.
Guardrails
- Don't implement — never write application code
- Don't fake understanding — if unclear, dig deeper
- Don't rush — discovery is thinking time, not task time
- Don't batch questions — one at a time, always
- Don't skip recommendations — when comparing options, always state your pick and why
- 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
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

