agentleFS
fightZyfightZy/simple-skills/.agents/skills/openspec-discovery/SKILL.md

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.

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
  1. Distinctive:

    Ask ONE question per message.

    line 18
  2. Distinctive:

    When possible, offer choices rather than open-ended questions.

    line 22
  3. Distinctive:

    When the user faces a decision:

    line 26
  4. Distinctive:

    Don't accept requirements at face value.

    line 40
  5. Distinctive:

    Check for existing implementations that could be reused

    line 51
  6. Distinctive:

    Use ASCII diagrams liberally when they clarify thinking:

    line 55
  7. Distinctive:

    Offer to capture: when decisions are made:

    line 94
  8. Distinctive:

    When scope crystallizes, summarize:

    line 108
  9. Distinctive:

    If open questions remain that would materially change artifacts, do NOT proceed — return to discovery.

    line 119

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  1. Propose 2-3 approaches with trade-offs
  2. Lead with your recommended option and explain why
  3. 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 --json

This 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

  1. Read existing artifacts for context (proposal.md, design.md, tasks.md, etc.)
  2. Reference them naturally: "Your design mentions Redis, but we just realized SQLite fits better..."
  3. Offer to capture when decisions are made:

    Insight TypeWhere to Capture
    New requirementspecs/<capability>/spec.md
    Requirement changedspecs/<capability>/spec.md
    Design decisiondesign.md
    Scope changedproposal.md
    New work identifiedtasks.md
  4. 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.