Repository navigation
[Feature]: Hook events for the bundled bug extension commands #4799
Description
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
- Intake before assess: reduce an attached log, fetch a trace or a Sentry
export, symbolicate a core dump (see [Feature]:evidence.mdconvention forspeckit.bug.assess(pre-digested inputs such as reduced logs) #4804 for one concrete case). - Jira or issue-tracker sync after
after_bug_assess. - Notifications after
after_bug_test.
Acceptance Criteria
-
speckit.bug.{assess,fix,test}check.specify/extensions.ymlfor their
before_*/after_*events using the same block as core commands. -
before_bug_assessfires afterBUG_DIRexists and before Ingest. - The new events are listed under Hook Events in
EXTENSION-API-REFERENCE.md. - With no hooks registered, the command output is unchanged.
I'm happy to send the PR.
Additional Context
- Builds on feat(extensions): add bundled bug triage workflow extension #2870 / feat(extensions): add bundled bug triage workflow extension #2871 (the bundled
bugextension). - Split from the original version of this issue at a maintainer's request. The
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.
Activity
mnriem commentedon Sep 30, 2026
Can you separate this into 2 issues?
[-][Feature]: Hook events for the bundled `bug` extension (log intake as a pre-assess step)[/-][+][Feature]: Hook events for the bundled `bug` extension commands[/+]alexcpn commentedon Oct 1, 2026
Done. I've narrowed this issue to the hook events and moved the
evidence.mdconvention (with the log-reduction motivation) to #4804.github-actions commentedon Oct 1, 2026
Feature assessment — hook-events-bug-extension · Stage 1/5: Intake
Idea Intake: Hook events for the bundled bug extension commands
bugextension commands #4799 and its issue commentsIdea (as captured)
Issue comments add that the request was split so this issue covers hook events, while the
evidence.mdconvention and log-reduction motivation moved to #4804.Restated
The bundled bug extension should expose lifecycle hook events around its assess, fix, and test commands, using the existing extension hook mechanism and preserving current behavior when no hooks are configured.
Origin & Context
First-Glance Unknowns
github-actions commentedon Oct 1, 2026
Feature assessment — hook-events-bug-extension · Stage 2/5: Research
Idea Research: Hook events for the bundled bug extension commands
Users & Demand
before_bug_assess, but the event does not fire, preventing other extensions from inserting workflow steps — [source: GitHub issue [Feature]: Hook events for the bundledbugextension commands #4799] (confidence: high).bugextension commands #4799] (confidence: medium).evidence.mdconvention, and a follow-up comment states that this issue was narrowed to hook events. That is stakeholder signal for a bounded request, not demand volume — [source: issue comments on [Feature]: Hook events for the bundledbugextension commands #4799] (confidence: high).Prior Art
.specify/extensions.ymlbefore and after command work;templates/commands/plan.mdis a direct internal precedent — [source:templates/commands/plan.md] (confidence: high).HookExecutor, and standard core events, but its Hook Events list contains nobefore_bug_*orafter_bug_*events — [source:extensions/EXTENSION-API-REFERENCE.md] (confidence: high).extensions/bug/extension.yml,extensions/bug/README.md] (confidence: high).tests/extensions/bug/test_bug_extension.py] (confidence: high).Market & Context
bugextension commands #4799] (confidence: medium).templates/commands/plan.md,extensions/EXTENSION-API-REFERENCE.md] (confidence: high).Data & Constraints
before_bug_assessafter slug resolution/prerequisites and before ingest, with the matching post-hook after the artifact is written — [source: GitHub issue [Feature]: Hook events for the bundledbugextension commands #4799] (confidence: high).extensions/EXTENSION-API-REFERENCE.md] (confidence: medium).bugextension commands #4799] (confidence: high).Evidence Against the Idea
bugextension commands #4799 and comments] (confidence: high).templates/commands/plan.md, issue acceptance criteria] (confidence: medium).Gaps & Open Questions
before_bug_*andafter_bug_*event names intentionally free-form, or must they be registered in code in addition to the API reference?]Sources
bugextension commands #4799 (host: github.com, policy: allowlisted)bugextension commands #4799 (host: github.com, policy: allowlisted)templates/commands/plan.md(repository source)extensions/EXTENSION-API-REFERENCE.md(repository source)extensions/bug/extension.yml(repository source)extensions/bug/README.md(repository source)tests/extensions/bug/test_bug_extension.py(repository source)github-actions commentedon Oct 1, 2026
Feature assessment — hook-events-bug-extension · Stage 3/5: Problem
Problem Definition: Hook events for the bundled bug extension commands
Problem Statement
Extension authors cannot reliably augment the bundled bug workflow at its assess, fix, or test boundaries because the commands do not expose the standard lifecycle-hook checks that core commands expose. A hook declaration may be accepted in configuration while producing no workflow step, leaving bug-related integrations without a supported extension point.
Affected Users & Stakeholders
bugextension commands #4799).Goals
Non-Goals
evidence.mdconvention moved to issue [Feature]:evidence.mdconvention forspeckit.bug.assess(pre-digested inputs such as reduced logs) #4804.Success Metrics
Cost of Inaction
Without a supported boundary, extensions that need to participate in the bug workflow remain unable to do so through the standard mechanism. They may duplicate workflow logic or operate outside the lifecycle, while configuration that appears valid can continue to create false expectations. The size of this cost is not quantified because no usage data was supplied.
Open Questions
github-actions commentedon Oct 1, 2026
Feature assessment — hook-events-bug-extension · Stage 4/5: Concept
Concept: Hook events for the bundled bug extension commands
Options
Option A — Mirror the established lifecycle contract
Option B — Introduce a shared bug-workflow hook contract
Option C — Do not add bug lifecycle hooks
Recommendation
Recommend Option A. It directly addresses the stated problem using the repository's existing lifecycle-hook precedent, fits a small appetite, and can be evaluated against the issue's measurable boundaries: six events documented, correct pre/post placement, and no change when no hooks are configured. Option B should be reconsidered only if specification work confirms a separate machine-readable registry or validation change is required.
Out of Scope (for the recommended option)
evidence.mdconvention and log-reduction work moved to [Feature]:evidence.mdconvention forspeckit.bug.assess(pre-digested inputs such as reduced logs) #4804.Assumptions to Validate
github-actions commentedon Oct 1, 2026
Feature assessment — hook-events-bug-extension · Stage 5/5: Decision — verdict go
Decision: Hook events for the bundled bug extension commands
Scorecard
Verdict & Rationale
Go. The problem is specific and grounded in both the issue and repository artifacts, the evidence is adequate rather than assumption-only, and Option A provides a small, coherent path that fits the existing extension model. The open questions concern implementation boundaries and validation details, not whether the underlying gap exists; they should be carried into specification and resolved before implementation.
If go — Handoff to
/speckit-specifyevidence.mdwork, a new hook engine or manifest schema, external adapters, and broad command refactoring.Add lifecycle hooks to the bug workflow (#4878)