groundwork-discovery

Use BEFORE brainstorming — when the user wants to capture WHAT a feature should do as Gherkin scenarios. Trigger when the user says "I need to build X", "let's spec this out", "what should this feature do?", or wants to formally capture a new edge case or bug as a BDD scenario.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "groundwork-discovery" with this command: npx skills add mogui/groundwork/mogui-groundwork-groundwork-discovery

groundwork-discovery

Elicits complete Gherkin scenarios through structured conversation — before any code is written. The .feature files produced here are the source of truth for both Superpowers (implementation) and groundwork-verify (validation).

Where this fits in the Superpowers flow

groundwork-discovery (WHAT) → brainstorming (HOW) → writing-plans → implementation → groundwork-scaffold-interface → groundwork-verify

This skill captures observable behaviour as Gherkin scenarios through conversation only. It does NOT decide architecture, tech choices, or implementation approach — that's brainstorming's job. After discovery writes the .feature file, suggest the user continues with the brainstorming skill.

Epistemic constraint: Do not read application code (src/, app/, lib/) to generate scenarios. Scenarios describe intended behaviour from the user's perspective — reading code would encode implementation details into the specification.

When to use

  • User wants to specify WHAT a feature should do — before deciding HOW to build it
  • User says "I need to build X" — start here to capture behaviour, then hand off to brainstorming
  • A bug or edge case was found and needs formal capture as a scenario
  • User says "let's spec this out", "what should this feature do?", "what are the edge cases?"

When NOT to use

  • User already knows WHAT and wants to decide HOW (architecture, tech choices) → use brainstorming directly
  • User already has .feature files and wants to generate tests → use groundwork-verify
  • User wants to run or debug existing tests
  • The task is pure implementation with no specification gap

Quick reference

CommandPurposeOutput
/groundwork new <feature>Full discovery interview from scratchdocs/specs/features/<domain>/<feature>.feature
/groundwork extend <feature>Append scenarios to existing featureSame file, new scenarios appended
/groundwork review [feature]Format features as Superpowers contextFormatted context block

First action

Read docs/specs/CONVENTIONS.md if it exists. If not, use the defaults in this skill and offer to create it at the end.


Commands

/groundwork new <feature-name>

Discovery from scratch for a new feature.

Flow:

  1. Ask for a high-level description of the feature in one or two sentences
  2. Enter interview mode — one question at a time, in this order:
PhaseQuestion focus
Happy pathWalk me through the ideal use of this feature step by step
ActorsWho can use this feature? Are there different roles with different permissions?
Input validationWhat input does this feature receive? What can be malformed, empty, or out of range?
System errorsWhat can go wrong outside the user's control? (network, database, third-party services)
IdempotencyWhat happens if the operation is repeated? Is it safe to call twice?
ConcurrencyWhat if two users trigger this simultaneously?
RollbackCan this operation be undone? What is the expected behaviour if it fails halfway?
  1. For each answer, build the Gherkin scenario internally
  2. When all phases are covered (or explicitly skipped), write the .feature file

Interview rules:

  • Ask one question at a time. Wait for the answer before continuing.
  • Keep questions concrete and provocative, not abstract. Instead of "are there error cases?" ask "what happens if the user submits the form while already logged in on another device?"
  • Stop a phase when: the user gave a concrete behaviour, explicitly excluded the case, or the next question would be redundant with a previous answer

Escape hatches — recognise these responses at any point:

User saysBehaviour
"I don't know yet" / "not sure"Tag scenario @pending, continue to next phase
"doesn't matter" / "not relevant"Tag case @out-of-scope with a brief note, continue
"move on" / "next" / "skip"Close current phase, move to next
"that's enough" / "done"End interview, write file

Output: docs/specs/features/<domain>/<feature-name>.feature

After writing the file, suggest continuing with the superpowers flow:

"The feature spec is ready. To design HOW to build this, continue with the brainstorming skill."


/groundwork extend <feature-name>

Add new scenarios to an existing feature — typically edge cases discovered during use.

Flow:

  1. Read the existing .feature file
  2. Summarise the scenarios already covered (2-3 lines max)
  3. Ask what new case the user discovered or wants to add
  4. Enter focused interview mode — only ask about gaps not already covered
  5. Append new scenarios to the file

Critical rule: Never modify existing scenarios. Append only.

After appending, suggest continuing with the superpowers flow:

"New scenarios added. If this changes the implementation approach, continue with the brainstorming skill to revisit the design."


/groundwork review [feature-name]

Prepare .feature files as context for a Superpowers session.

Flow:

  1. List all available .feature files under docs/specs/features/
  2. If no argument given, ask which features are relevant to the current session
  3. Output a formatted context block ready to paste into Superpowers

Gherkin writing rules

Granularity

Scenarios must describe observable behaviour, not implementation details or UI specifics.

# Wrong — fragile, breaks on every UI change
When the user clicks the button with id "btn-submit"
Then they see "Password incorrect" in red below the password field

# Right — behavioural, survives refactoring
When the user attempts login with incorrect credentials
Then the operation fails with an authentication error

Interface type tag

Every .feature file must have a tag on the Feature: line declaring the interface type. These tags match the ## Type values in SPEC-INTERFACE.md.

@rest       # REST or GraphQL API
@web        # browser-based frontend
@rest+web   # both API and web UI
@cli        # command-line interface

Scenario tags

TagMeaning
@pendingIdentified but behaviour not yet defined
@out-of-scopeExplicitly excluded — decision documented
@wipIn progress, not yet stable
@criticalBlocking — if this fails, the feature is not shippable

Output format

@rest
Feature: <feature name>
  <one-line description>

  Background:
    Given <shared precondition if any>

  @critical
  Scenario: <happy path name>
    Given <initial state>
    When <action>
    Then <observable outcome>
    And <additional outcome if needed>

  Scenario: <edge case name>
    ...

  @pending
  Scenario: <case not yet defined>
    # TODO: define expected behaviour

  @out-of-scope
  Scenario: <excluded case>
    # Decision: <brief reason>

File structure

docs/
  specs/
    CONVENTIONS.md
    features/
      <domain>/
      <feature-name>.feature

If the docs/specs/ directory doesn't exist, create it. If CONVENTIONS.md doesn't exist, offer to create it after the first .feature file is written.


Common mistakes

MistakeFix
Writing UI-specific steps ("clicks button with id btn-submit")Write behavioural steps ("attempts login with incorrect credentials")
Forgetting the interface tag (@rest, @web, @rest+web, @cli) on Feature lineAlways ask which interface the feature exposes — must match ## Type in SPEC-INTERFACE.md
Asking multiple questions at onceOne question per message — wait for the answer before continuing
Skipping phases because "it's a simple feature"Run all phases — skip only when the user explicitly says "skip" or "move on"
Modifying existing scenarios in /groundwork extendAppend only — never change existing scenarios
Writing implementation details in scenariosScenarios describe observable behaviour, not how the system achieves it
Discussing architecture or tech choices during discoveryDiscovery captures WHAT, not HOW — redirect architecture questions to brainstorming
Skipping the brainstorming handoff after writing the feature fileAlways suggest continuing with brainstorming to design the implementation

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

groundwork-verify

No summary provided by upstream source.

Repository SourceNeeds Review
General

understanding-feature-requests

No summary provided by upstream source.

Repository SourceNeeds Review
General

image-gen

Generate AI images from text prompts. Triggers on: "生成图片", "画一张", "AI图", "generate image", "配图", "create picture", "draw", "visualize", "generate an image".

Archived SourceRecently Updated