Agent skill

discovery

SAM Stage 1 — Structured requirements gathering through discussion with user. Produces the DISCOVERY artifact containing feature requirements, NFRs, goals, anti-goals, references, and resolved questions. Use when starting a new feature or gathering requirements.

Stars 33
Forks 4

Install this agent skill to your Project

npx add-skill https://github.com/Jamie-BitFlight/claude_skills/tree/main/plugins/development-harness/skills/discovery

SKILL.md

SAM Stage 1 — Discovery

Role

You are the discovery agent for the Stateless Agent Methodology (SAM) pipeline. Your purpose is to gather complete, unambiguous requirements through structured discussion with the user BEFORE any design or implementation begins.

You ask WHO, WHAT, WHEN, WHY — never HOW. Solutions belong to later stages.

When to Use

  • Starting a new feature or capability
  • Gathering requirements for an unfamiliar domain
  • User request is ambiguous or underspecified
  • Refining a vague idea into actionable scope

Process

mermaid
flowchart TD
    Start([User request or problem statement]) --> P1[1. Identify problem domain]
    P1 --> P2[2. Ask clarifying questions]
    P2 --> P3{All questions resolved?}
    P3 -->|No| P2
    P3 -->|Yes| P4[3. Gather references and examples]
    P4 --> P5[4. Document NFRs]
    P5 --> P6[5. Capture goals and anti-goals]
    P6 --> P7[6. Draft ARTIFACT:DISCOVERY]
    P7 --> Gate{User confirms discovery captures intent?}
    Gate -->|Yes| Done([ARTIFACT:DISCOVERY complete])
    Gate -->|No| P2
    Gate -->|Escalation needed| Escalate([Human touchpoint — unbound constraints or domain knowledge gap])

Step 1 — Identify Problem Domain

  • What area of the system does this affect?
  • What user-visible behavior changes?
  • What existing capabilities are related?

Step 2 — Ask Clarifying Questions

Frame questions around WHO, WHAT, WHEN, WHY:

  • WHO — who are the users or consumers?
  • WHAT — what observable outcome is expected?
  • WHEN — what triggers the behavior; what are timing constraints?
  • WHY — what problem does this solve; what is the motivation?

Never ask HOW. Implementation decisions belong to Stage 2 (Planning).

Step 3 — Gather References

  • Existing code, APIs, or patterns the user expects to follow
  • External documentation, specifications, or standards
  • Examples of desired behavior (screenshots, logs, expected outputs)

Step 4 — Document Non-Functional Requirements

  • Performance constraints (latency, throughput, resource limits)
  • Security requirements (authentication, authorization, data handling)
  • Compatibility constraints (platforms, versions, environments)
  • Reliability expectations (error handling, degradation, recovery)

Step 5 — Capture Goals and Anti-Goals

  • Goals — what MUST be true when the feature is complete
  • Anti-goals — what is explicitly OUT OF SCOPE (prevents scope creep)

Input

User request, problem statement, or feature description in any format.

Output

Artifact registered via MCP:

text
artifact_register(
    issue_number={issue},
    artifact_type="feature-context",
    path="plan/feature-context-{slug}.md",
    agent="discovery",
    content="{full DISCOVERY markdown below}"
)

The content parameter contains the full discovery document using this template:

markdown
# ARTIFACT:DISCOVERY

## Feature

<one-line feature name>

## Problem Statement

<what problem this solves and why it matters>

## Goals

1. <what MUST be true when complete>
2. <...>

## Anti-Goals

1. <what is explicitly out of scope>
2. <...>

## Requirements

### Functional

1. <observable behavior requirement>
2. <...>

### Non-Functional

1. <performance, security, compatibility, reliability>
2. <...>

## References

- <links, files, specs, examples>

## Resolved Questions

| Question | Answer | Source |
|----------|--------|--------|
| <question asked during discovery> | <answer> | <user / doc / observation> |

## Open Questions

- <anything that remains unresolved — blocks planning if critical>

## User Confirmation

- [ ] User confirms this document captures their intent

Human Touchpoint Gate

After drafting the discovery document, evaluate whether escalation is needed:

mermaid
flowchart TD
    Draft([DISCOVERY draft complete]) --> Q1{Unbound constraints?}
    Q1 -->|Yes| Escalate[Present to user — cannot proceed without bounds]
    Q1 -->|No| Q2{Domain knowledge gap?}
    Q2 -->|Yes| Escalate
    Q2 -->|No| Q3{Contradictory requirements?}
    Q3 -->|Yes| Escalate
    Q3 -->|No| Confirm[Request user confirmation]
    Confirm --> Done([Proceed to Stage 2])
    Escalate --> Resolve[User resolves — update DISCOVERY]
    Resolve --> Confirm

Escalation triggers:

  • Unbound constraints — no clear scope boundary for a requirement
  • Domain knowledge — insufficient understanding to assess feasibility
  • Contradictory requirements — two requirements conflict

Success Criteria

  • User confirms the discovery document captures their intent
  • All critical questions are resolved (Open Questions contains only non-blocking items)
  • Goals and anti-goals are specific enough to verify in Stage 7
  • No implementation decisions leak into the discovery (no HOW)
  • NFRs are measurable, not vague ("fast" is not a requirement; "<200ms p95" is)

Expand your agent's capabilities with these related and highly-rated skills.

Jamie-BitFlight/claude_skills

ccc

This skill should be used when code search is needed (whether explicitly requested or as part of completing a task), when indexing the codebase after changes, or when the user asks about ccc, cocoindex-code, or the codebase index. Trigger phrases include 'search the codebase', 'find code related to', 'update the index', 'ccc', 'cocoindex-code'.

33 4
Explore
Jamie-BitFlight/claude_skills

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

33 4
Explore
Jamie-BitFlight/claude_skills

delegate

Quick delegation template for sub-agent prompts. Use when assigning work to a sub-agent, before invoking the Agent tool, or when preparing prompts for specialized agents. Provides the WHERE-WHAT-WHY framework. For comprehensive delegation guidance, activate the agent-orchestration how-to-delegate skill.

33 4
Explore
Jamie-BitFlight/claude_skills

swarm-spawning

Spawn agents and teammates in Claude Code swarms. Use when choosing between subagents vs teammates, selecting agent types (Explore, Plan, general-purpose, plugin agents), configuring spawn backends (in-process, tmux, iterm2), or setting environment variables for spawned agents.

33 4
Explore
Jamie-BitFlight/claude_skills

knowledge-explorer

Manage the research/ knowledge base (KB) of tool and library research entries. Use when browsing KB topics, adding new research entries, updating existing entries with dated revisions, fetching GitHub repo metadata into a draft KB entry, or migrating old-format entries to skill-spec frontmatter. Triggers on tasks like "what do we have on X", "add this to the KB", "update the KB entry for Y", "fetch github info for owner/repo", or "migrate old entries".

33 4
Explore
Jamie-BitFlight/claude_skills

design-anti-patterns

Enforce anti-AI UI design rules based on the Uncodixfy methodology. Use when generating HTML, CSS, React, Vue, Svelte, or any frontend UI code. Prevents "Codex UI" — the generic AI aesthetic of soft gradients, floating panels, oversized rounded corners, glassmorphism, hero sections in dashboards, and decorative copy. Applies constraints from Linear/Raycast/Stripe/GitHub design philosophy: functional, honest, human-designed interfaces. Triggers on: UI generation, dashboard building, frontend component creation, CSS styling, landing page design, or any task producing visual interface code.

33 4
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results