Repository navigation
Conversation
Allow extension authors to register before/after bindings at the design and task-generation boundaries without replacing a core template. Assisted-by: OpenAI Codex (model: GPT-6, autonomous)
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Manifest bindings and named-section hooks introduce interacting execution-order, artifact-availability, and mandatory-hook continuation semantics that require human review.
No open issues 🎉
What changed in this PR
Adds hooks around named sections in Spec Kit’s plan and tasks commands, allowing extensions to run intermediate checks without copying command templates.
Changes:
- Accepts
before/afterbinding lists and converts them to existing hook event keys. - Adds boundaries around plan design and task generation.
- Documents the syntax and tests binding validation and boundary placement.
| File | Description |
|---|---|
tests/test_extensions.py |
Tests binding registration and invalid inputs. |
tests/test_command_template_hooks.py |
Tests section markers and hook boundaries. |
templates/commands/tasks.md |
Adds hooks around task generation. |
templates/commands/plan.md |
Adds hooks around design generation. |
src/specify_cli/extensions/__init__.py |
Validates and normalizes hook binding lists. |
docs/extensions/api.md |
Documents named-section hooks and supported targets. |
Review effort: Balanced (adaptive)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #5340.
An extension can now register
after: plan.designto review the generated design before the final constitution check, orbefore: tasks.generateto check inputs before tasks are derived. Both sections have a matching hook on the other side. Installation translates these bindings into ordinary event keys, so existing hook filtering, ordering and removal apply.Testing
specify --helpfrom an editable install.On the base revision, the binding list failed to install with
Invalid hooks: expected a mapping, and both template boundary tests failed. On Windows, 755 tests passed and 24 skipped. Two existing symlink tests also failed on the base revision with WinError 1314 and were deselected for the repeat run. The same seven test files passed in full under WSL with a POSIX temporary directory (781 tests). The repository's pinned Ruff check and the API guide's Markdown lint passed.In the offline sample project, I followed the installed Codex skills against a small line-counting feature. A local extension recorded which artifacts existed at each hook.
$speckit-specify$speckit-plan$speckit-tasksAI Disclosure
OpenAI Codex (GPT-6) worked autonomously on behalf of @Yui1x. It wrote the implementation, templates, documentation, tests and PR description, ran the checks, and exercised the sample workflow. The reasoning-effort setting was not exposed in this session.