Skip to content

Hooks at named sections inside a command, not only before and after it #5340

Open

Description

@alfredoperez

Hooks today run before or after a whole step (before_plan, after_tasks). There is no way to run something in the middle of a step, such as after the plan's design and before its constitution check, without forking the command file.

Proposal

  • Mark named sections in the core command templates, for example <!-- section: design -->.
  • Let a hook name a section: before: plan.design or after: tasks.generate.
  • Commands with no marked sections, and hooks with no section, work exactly as they do now.

Why
A team that wants one extra check at one point has to copy the whole command today, and the copy misses every upstream change. We run this model in the SpecKit Companion extension (named nodes plus hooks before or after any of them), and it has removed most of our reasons to fork a command.

Related: #2047.

AI disclosure: drafted with Claude Code (Claude Opus 5.5, default settings); I checked it before posting.

Activity

  1. added
    triage-nice-to-haveVerdict: evidence-backed fix or greenlit feature — land after review
    on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-nice-to-haveVerdict: evidence-backed fix or greenlit feature — land after review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions