Problem Statement
Core commands (plan, tasks, implement, …) check .specify/extensions.yml
for before_* / after_* hooks. The three commands in the bundled bug
extension (speckit.bug.assess, speckit.bug.fix, speckit.bug.test) do not,
and no *_bug_* events are defined. That leaves other extensions no way to add
a step to the bug workflow. A manifest that registers before_bug_assess passes
validation, but the hook never fires.
Proposed Solution
Add the standard hook-check block (the same block templates/commands/plan.md
uses) to each bug command, for these events:
| Event |
Where it fires |
before_bug_assess |
After Slug Resolution/Prerequisites (so BUG_SLUG / BUG_DIR exist), before Execution → Ingest |
after_bug_assess |
After assessment.md is written |
before_bug_fix / after_bug_fix |
Around fix.md |
before_bug_test / after_bug_test |
Around test.md |
before_bug_assess has to run after slug resolution rather than at the top
of the command, because a pre-hook needs to know BUG_DIR to write into. This
uses the handoff the bug commands already rely on: "downstream commands in the
same session may reuse [the slug] from context without re-prompting."
With no hooks registered, behavior is exactly as today.
Alternatives Considered
- Hook at the very top of
assess, before slug resolution. That is
consistent with core commands, but the hook would have nowhere to write and
would have to guess the slug.
Component
Extensions: bundled bug extension (extensions/bug/)
AI Agent (if applicable)
All. Hooks are plain command-template instructions.
Use Cases
Acceptance Criteria
I'm happy to send the PR.
Additional Context
AI Disclosure
Drafted with Claude Code (Claude Opus 5.5) from my notes. I reviewed it.
Problem Statement
Core commands (
plan,tasks,implement, …) check.specify/extensions.ymlfor
before_*/after_*hooks. The three commands in the bundledbugextension (
speckit.bug.assess,speckit.bug.fix,speckit.bug.test) do not,and no
*_bug_*events are defined. That leaves other extensions no way to adda step to the bug workflow. A manifest that registers
before_bug_assesspassesvalidation, but the hook never fires.
Proposed Solution
Add the standard hook-check block (the same block
templates/commands/plan.mduses) to each bug command, for these events:
before_bug_assessBUG_SLUG/BUG_DIRexist), before Execution → Ingestafter_bug_assessassessment.mdis writtenbefore_bug_fix/after_bug_fixfix.mdbefore_bug_test/after_bug_testtest.mdbefore_bug_assesshas to run after slug resolution rather than at the topof the command, because a pre-hook needs to know
BUG_DIRto write into. Thisuses the handoff the bug commands already rely on: "downstream commands in the
same session may reuse [the slug] from context without re-prompting."
With no hooks registered, behavior is exactly as today.
Alternatives Considered
assess, before slug resolution. That isconsistent with core commands, but the hook would have nowhere to write and
would have to guess the slug.
Component
Extensions: bundled
bugextension (extensions/bug/)AI Agent (if applicable)
All. Hooks are plain command-template instructions.
Use Cases
export, symbolicate a core dump (see [Feature]:
evidence.mdconvention forspeckit.bug.assess(pre-digested inputs such as reduced logs) #4804 for one concrete case).after_bug_assess.after_bug_test.Acceptance Criteria
speckit.bug.{assess,fix,test}check.specify/extensions.ymlfor theirbefore_*/after_*events using the same block as core commands.before_bug_assessfires afterBUG_DIRexists and before Ingest.EXTENSION-API-REFERENCE.md.I'm happy to send the PR.
Additional Context
bugextension).evidence.mdconvention is now [Feature]:evidence.mdconvention forspeckit.bug.assess(pre-digested inputs such as reduced logs) #4804.AI Disclosure
Drafted with Claude Code (Claude Opus 5.5) from my notes. I reviewed it.