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

Aperta
#5,340 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
markdown, python
Ambito
tooling

Direzione di ricerca

Start by reading the core command templates and the existing hook implementation; the issue does not name specific files or tests. Trace how hooks run before and after whole steps, then check how section markers could identify hook points within a command. Done means hooks can run before or after named sections while existing commands and hooks without section names continue to work.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

triage-nice-to-have

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.

Lingua principale
Python
Stelle
149k
Fork
13.4k
Merge medio
1g 5h
PR unite (30g)
223

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/spec-kit

Tutte le issue di github/spec-kit

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.