agentleFS
pdemagnypdemagny/logistics/.claude/skills/speckit-bug-test/SKILL.md

speckit-bug-test

Skill1 starsChanged 11 days agoMITView on GitHub

Validate that a previously fixed bug is resolved and record the verification

2 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

23 rules. About 0 are common, 5 are distinctive, and 18 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 18

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Interactive mode: ask the user which bug to validate and list the candidates.

    line 39
  2. Distinctive:

    Automated mode: stop with an error listing the candidates.

    line 40
  3. Very specific:

    If BUG_DIR/test.md already exists, ask the user whether to overwrite it (interactive mode) or refuse (automated mode).

    line 48
  4. Very specific:

    Read both assessment.md and fix.md in full so you know:

    line 49
  5. Very specific:

    Check if .specify/extensions.yml exists in the project root.

    line 58
  6. Very specific:

    If it exists, read it and look for entries under the hooks.before_bug_test key

    line 59
  7. Very specific:

    If the YAML cannot be parsed or is invalid, do not skip silently: tell the user that .specify/extensions.yml could not be read (include the …

    line 60
  8. Very specific:

    If the hook has no condition field, or it is null/empty, treat the hook as executable

    line 63
  9. Very specific:

    If the hook defines a non-empty condition, skip the hook and leave condition evaluation to the HookExecutor implementation

    line 64
  10. Very specific:

    When constructing command invocations from hook command names, replace dots (.) with hyphens (-).

    line 65
  11. Very specific:

    If no hooks are registered or .specify/extensions.yml does not exist, skip silently

    line 89
  12. Distinctive:

    Run the tests added or updated in the fix.

    line 96
  13. Distinctive:

    Run any broader regression suite that touches the changed files.

    line 97
  14. Very specific:

    If a check is destructive, network-dependent, or expensive, skip it and record it as skipped with a reason.

    line 104
  15. Very specific:

    If you cannot run a check at all (missing tooling, no test framework configured), record it as not-run with a reason instead of fabricating …

    line 105
  16. Distinctive:

    Do not over-claim. If reproduction was not actually performed (e.g., the bug required a production environment), say so explicitly.

    line 112
  17. Very specific:

    Write to BUG_DIR/test.md using this structure:

    line 116
  18. Very specific:

    If it does not exist, or no hooks are registered under hooks.after_bug_test, skip to the Completion Report.

    line 163
  19. Very specific:

    If it exists, read it and look for entries under the hooks.after_bug_test key.

    line 164
  20. Very specific:

    If the YAML cannot be parsed or is invalid, do not skip silently: tell the user that .specify/extensions.yml could not be read (include the …

    line 165
  21. Very specific:

    If the result is failed, recommend re-running /speckit-bug-assess with the new evidence captured in test.md.

    line 199
  22. Very specific:

    Never overwrite an existing test.md without confirmation.

    line 204
  23. Very specific:

    Never mark a fix as verified based on tests alone if the original assessment listed a reproduction that you did not actually exercise — …

    line 205

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Bug Test Skill

Test Bug Fix

Validate that the fix recorded by /speckit-bug-fix actually resolves the bug described by /speckit-bug-assess. The output is a verification report at .specify/bugs/<slug>/test.md.

User Input

$ARGUMENTS

The user input should identify the bug to validate. Accept any of:

  • slug=<bug-slug> or --slug <bug-slug> or a bare slug-like token.
  • A path that contains the slug (e.g. .specify/bugs/login-timeout/).
  • Nothing — fall back to context (see below).

Slug Resolution

Resolve BUG_SLUG in this order, stopping at the first match:

  1. Explicit user input — a slug passed in $ARGUMENTS (any of the forms above).
  2. Conversation context — if the current session has just run /speckit-bug-assess or /speckit-bug-fix, the slug it reported is the working slug. Reuse it without re-prompting. Confirm it by checking that .specify/bugs/<slug>/fix.md exists; if it does not, fall through.
  3. Single candidate on disk — list .specify/bugs/*/fix.md. If exactly one bug has a fix.md, use it.
  4. Disambiguate:
    • Interactive mode: ask the user which bug to validate and list the candidates.
    • Automated mode: stop with an error listing the candidates. Do not guess.

Once resolved, set BUG_SLUG and BUG_DIR = .specify/bugs/<BUG_SLUG>, and briefly state in your reply which resolution path was used (explicit / from context / single candidate / asked).

Prerequisites

  • BUG_DIR/assessment.md MUST exist.
  • BUG_DIR/fix.md MUST exist. If not, stop and instruct the user to run /speckit-bug-fix first.
  • If BUG_DIR/test.md already exists, ask the user whether to overwrite it (interactive mode) or refuse (automated mode).
  • Read both assessment.md and fix.md in full so you know:
    • The original symptom and reproduction steps (from assessment.md).
    • The actual code changes and tests added (from fix.md).

Pre-Execution Checks

By this point BUG_SLUG and BUG_DIR have been resolved, so a hook command run in this session can reuse them from the conversation; nothing is passed to it automatically.

Check for extension hooks (before bug verification):

  • Check if .specify/extensions.yml exists in the project root.
  • If it exists, read it and look for entries under the hooks.before_bug_test key
  • If the YAML cannot be parsed or is invalid, do not skip silently: tell the user that .specify/extensions.yml could not be read (include the parser error) and that no hooks were checked, including any mandatory (optional: false) hooks registered there, then continue normally
  • Filter out hooks where enabled is explicitly false. Treat hooks without an enabled field as enabled by default.
  • For each remaining hook, do not attempt to interpret or evaluate hook condition expressions:
    • If the hook has no condition field, or it is null/empty, treat the hook as executable
    • If the hook defines a non-empty condition, skip the hook and leave condition evaluation to the HookExecutor implementation
  • When constructing command invocations from hook command names, replace dots (.) with hyphens (-). For example, speckit.git.commit → /speckit-git-commit.
  • For each executable hook, output the following based on its optional flag:
    • Optional hook (optional: true):
      ## Extension Hooks
      
      **Optional Pre-Hook**: {extension}
      Command: `/{command}`
      Description: {description}
      
      Prompt: {prompt}
      To execute: `/{command}`
    • Mandatory hook (optional: false):
      ## Extension Hooks
      
      **Automatic Pre-Hook**: {extension}
      Executing: `/{command}`
      EXECUTE_COMMAND: {command}
      
      Wait for the result of the hook command before proceeding to Execution.
      After emitting the block above you MUST actually invoke the hook and wait for it to finish before continuing. Run it the same way you would run the command yourself in this agent/session (the invocation may differ from the literal {command} id shown above, e.g. a skills-mode agent runs it as /skill:speckit-... or $speckit-...). Emitting the block alone does not run the hook.
  • If no hooks are registered or .specify/extensions.yml does not exist, skip silently

Execution

  1. Plan the validation
    • Decide which checks prove the bug is gone:
      • Re-run the reproduction steps from the assessment (or their automated equivalent).
      • Run the tests added or updated in the fix.
      • Run any broader regression suite that touches the changed files.
    • Decide which checks prove nothing was broken:
      • Existing test suites for the changed modules.
      • Lint / type-check if the project uses them.
  2. Run the checks
    • Execute each planned check. Capture command, exit status, and a short excerpt of relevant output (last few lines, or the failing assertion).
    • If a check is destructive, network-dependent, or expensive, skip it and record it as skipped with a reason; do not run it without explicit user consent.
    • If you cannot run a check at all (missing tooling, no test framework configured), record it as not-run with a reason instead of fabricating a result.
  3. Judge the outcome
    • Mark the fix as:
      • verified — all critical checks pass and the original symptom no longer reproduces.
      • partial — the original symptom is gone but unrelated regressions appeared, or some checks are inconclusive.
      • failed — the symptom still reproduces or the regression suite is broken by the fix.
    • Do not over-claim. If reproduction was not actually performed (e.g., the bug required a production environment), say so explicitly.
  4. Write the verification report

    Write to BUG_DIR/test.md using this structure:

    # Bug Verification: <short title>
    
    - **Slug**: <BUG_SLUG>
    - **Tested**: <ISO 8601 date>
    - **Assessment**: ./assessment.md
    - **Fix**: ./fix.md
    - **Result**: verified | partial | failed
    
    ## Summary
    
    <One or two sentences: does the bug reproduce, did the fix hold, were any regressions found.>
    
    ## Checks Performed
    
    | Check | Command / Action | Result | Notes |
    |-------|------------------|--------|-------|
    | Reproduction (post-fix) | <command or manual steps> | pass / fail / skipped / not-run | <short note> |
    | New / updated tests | `<command>` | pass / fail | <short note> |
    | Regression suite | `<command>` | pass / fail / skipped | <short note> |
    | Lint / type-check | `<command>` | pass / fail / skipped | <short note> |
    
    ## Output Excerpts
    
    <Short snippets of relevant output (e.g., final summary line of a test run, the failing assertion). Keep it tight — no full logs.>
    
    ## Residual Risks
    
    - <known limitation, environment not covered, etc.>
    
    ## Recommendation
    
    <One paragraph. Examples:>
    - "Close the bug — verified end-to-end."
    - "Hold — reproduction inconclusive; needs verification in staging."
    - "Reopen — symptom still reproduces; rerun `/speckit-bug-assess`."

Mandatory Post-Execution Hooks

You MUST complete this section before reporting completion to the user.

By this point BUG_SLUG and BUG_DIR have been resolved and the written report is available, so a hook command run in this session can reuse them from the conversation; nothing is passed to it automatically.

Check if .specify/extensions.yml exists in the project root.

  • If it does not exist, or no hooks are registered under hooks.after_bug_test, skip to the Completion Report.
  • If it exists, read it and look for entries under the hooks.after_bug_test key.
  • If the YAML cannot be parsed or is invalid, do not skip silently: tell the user that .specify/extensions.yml could not be read (include the parser error) and that no hooks were checked, including any mandatory (optional: false) hooks registered there, then continue to the Completion Report.
  • Filter out hooks where enabled is explicitly false. Treat hooks without an enabled field as enabled by default.
  • For each remaining hook, do not attempt to interpret or evaluate hook condition expressions:
    • If the hook has no condition field, or it is null/empty, treat the hook as executable
    • If the hook defines a non-empty condition, skip the hook and leave condition evaluation to the HookExecutor implementation
  • When constructing command invocations from hook command names, replace dots (.) with hyphens (-). For example, speckit.git.commit → /speckit-git-commit.
  • For each executable hook, output the following based on its optional flag:
    • Mandatory hook (optional: false) — You MUST emit EXECUTE_COMMAND: for each mandatory hook:
      ## Extension Hooks
      
      **Automatic Hook**: {extension}
      Executing: `/{command}`
      EXECUTE_COMMAND: {command}
      After emitting the block above you MUST actually invoke the hook and wait for it to finish before continuing. Run it the same way you would run the command yourself in this agent/session (the invocation may differ from the literal {command} id shown above, e.g. a skills-mode agent runs it as /skill:speckit-... or $speckit-...). Emitting the block alone does not run the hook.
    • Optional hook (optional: true):
      ## Extension Hooks
      
      **Optional Hook**: {extension}
      Command: `/{command}`
      Description: {description}
      
      Prompt: {prompt}
      To execute: `/{command}`

Completion Report

Report back with:

  • The slug and BUG_DIR/test.md path.
  • The result (verified, partial, failed).
  • If the result is failed, recommend re-running /speckit-bug-assess with the new evidence captured in test.md.

Guardrails

  • This command MUST NOT modify source code. It only runs checks and writes inside .specify/bugs/<slug>/.
  • Never overwrite an existing test.md without confirmation.
  • Never mark a fix as verified based on tests alone if the original assessment listed a reproduction that you did not actually exercise — downgrade to partial and say so.

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.