feat(integrations): generalize post-processing to all format types#3311
Open
rhuss wants to merge 1 commit into
Open
feat(integrations): generalize post-processing to all format types#3311rhuss wants to merge 1 commit into
rhuss wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new per-integration hook (post_process_command_content) so non-skills command outputs (Markdown/TOML/YAML) can be post-processed during CommandRegistrar.register_commands(), while preserving the existing skills-only post_process_skill_content() behavior.
Changes:
- Add
IntegrationBase.post_process_command_content(content) -> strwith a no-op default. - Invoke
post_process_command_content()fromCommandRegistrar.register_commands()for non-skills outputs before writing to disk. - Add tests covering the no-op default, non-skills hook application, and skills exclusion (plus a large set of spec/brainstorm/.specify artifacts and updated ignore rules).
Reviewed changes
Copilot reviewed 94 out of 96 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/test_post_process.py |
New tests for the post-processing hook behavior (non-skills applied, skills excluded, no-op default). |
src/specify_cli/integrations/base.py |
Adds the post_process_command_content() hook to IntegrationBase. |
src/specify_cli/agents.py |
Calls the new hook for non-skills command outputs during registration. |
specs/004-generalize-post-processing/spec.md |
Feature spec describing the generalized post-processing hook. |
specs/004-generalize-post-processing/checklists/requirements.md |
Requirements-quality checklist for the feature spec. |
CLAUDE.md |
Adds an auto-generated development guidelines/context file. |
brainstorm/02-script-based-hook-enforcement.md |
Brainstorm document about script-based hook enforcement. |
brainstorm/02-generalize-post-processing.md |
Brainstorm document about the generalized post-processing hook. |
brainstorm/01-extension-capability-system.md |
Brainstorm document for a broader capability system concept. |
.specify/workflows/workflow-registry.json |
Adds workflow registry state/artifact under .specify/. |
.specify/workflows/speckit/workflow.yml |
Adds a bundled workflow definition under .specify/. |
.specify/templates/tasks-template.md |
Adds/updates tasks template under .specify/. |
.specify/templates/spec-template.md |
Adds/updates spec template under .specify/. |
.specify/templates/plan-template.md |
Adds/updates plan template under .specify/. |
.specify/templates/constitution-template.md |
Adds/updates constitution template under .specify/. |
.specify/templates/checklist-template.md |
Adds/updates checklist template under .specify/. |
.specify/templates/agent-file-template.md |
Adds/updates agent-file template under .specify/. |
.specify/sdd-traits.json |
Adds .specify traits state/artifact. |
.specify/scripts/bash/setup-plan.sh |
Adds/updates a .specify bash script. |
.specify/scripts/bash/check-prerequisites.sh |
Adds/updates a consolidated prerequisites script. |
.specify/memory/constitution-bak.md |
Adds a backup constitution file under .specify/memory/. |
.specify/integrations/speckit.manifest.json |
Adds .specify integration manifest artifact. |
.specify/integrations/claude.manifest.json |
Adds .specify integration manifest artifact. |
.specify/integration.json |
Adds .specify integration selection artifact. |
.specify/init-options.json |
Adds .specify init-options artifact. |
.specify/feature.json |
Adds .specify feature directory artifact. |
.specify/extensions/spex/extension.yml |
Adds a spex extension definition under .specify/extensions/. |
.specify/extensions/spex/commands/speckit.spex.spec-refactoring.md |
Adds a spex command template under .specify/extensions/. |
.specify/extensions/spex/commands/speckit.spex.help.md |
Adds a spex command template under .specify/extensions/. |
.specify/extensions/spex/commands/speckit.spex.flow-state.md |
Adds a spex command template under .specify/extensions/. |
.specify/extensions/spex/commands/speckit.spex.extensions.md |
Adds a spex command template under .specify/extensions/. |
.specify/extensions/spex/commands/speckit.spex.clear.md |
Adds a spex command template under .specify/extensions/. |
.specify/extensions/spex-worktrees/extension.yml |
Adds a spex-worktrees extension definition under .specify/extensions/. |
.specify/extensions/spex-teams/extension.yml |
Adds a spex-teams extension definition under .specify/extensions/. |
.specify/extensions/spex-teams/config-template.yml |
Adds a spex-teams config template under .specify/extensions/. |
.specify/extensions/spex-teams/commands/speckit.spex-teams.research.md |
Adds a spex-teams command template under .specify/extensions/. |
.specify/extensions/spex-teams/commands/speckit.spex-teams.orchestrate.md |
Adds a spex-teams command template under .specify/extensions/. |
.specify/extensions/spex-teams/commands/speckit.spex-teams.implement.md |
Adds a spex-teams command template under .specify/extensions/. |
.specify/extensions/spex-gates/extension.yml |
Adds a spex-gates extension definition under .specify/extensions/. |
.specify/extensions/spex-gates/commands/speckit.spex-gates.stamp.md |
Adds a spex-gates command template under .specify/extensions/. |
.specify/extensions/spex-gates/commands/speckit.spex-gates.review-plan.md |
Adds a spex-gates command template under .specify/extensions/. |
.specify/extensions/spex-detach/extension.yml |
Adds a spex-detach extension definition under .specify/extensions/. |
.specify/extensions/spex-detach/config-template.yml |
Adds a spex-detach config template under .specify/extensions/. |
.specify/extensions/spex-detach/commands/speckit.spex-detach.detach.md |
Adds a spex-detach command template under .specify/extensions/. |
.specify/extensions/spex-deep-review/extension.yml |
Adds a spex-deep-review extension definition under .specify/extensions/. |
.specify/extensions/spex-deep-review/config-template.yml |
Adds a spex-deep-review config template under .specify/extensions/. |
.specify/extensions/spex-collab/templates/reviewers-template.md |
Adds a spex-collab template under .specify/extensions/. |
.specify/extensions/spex-collab/extension.yml |
Adds a spex-collab extension definition under .specify/extensions/. |
.specify/extensions/spex-collab/config-template.yml |
Adds a spex-collab config template under .specify/extensions/. |
.specify/extensions/spex-collab/commands/speckit.spex-collab.revise.md |
Adds a spex-collab command template under .specify/extensions/. |
.specify/extensions/spex-collab/commands/speckit.spex-collab.reviewers.md |
Adds a spex-collab command template under .specify/extensions/. |
.specify/extensions/spex-collab/commands/speckit.spex-collab.reconcile.md |
Adds a spex-collab command template under .specify/extensions/. |
.specify/extensions/spex-collab/commands/speckit.spex-collab.phase-split.md |
Adds a spex-collab command template under .specify/extensions/. |
.specify/extensions/git/scripts/powershell/initialize-repo.ps1 |
Adds a git extension PowerShell script under .specify/extensions/. |
.specify/extensions/git/scripts/powershell/git-common.ps1 |
Adds git extension PowerShell utilities under .specify/extensions/. |
.specify/extensions/git/scripts/powershell/auto-commit.ps1 |
Adds a git extension PowerShell auto-commit script under .specify/extensions/. |
.specify/extensions/git/scripts/bash/initialize-repo.sh |
Adds a git extension bash script under .specify/extensions/. |
.specify/extensions/git/scripts/bash/git-common.sh |
Adds git extension bash utilities under .specify/extensions/. |
.specify/extensions/git/scripts/bash/auto-commit.sh |
Adds a git extension bash auto-commit script under .specify/extensions/. |
.specify/extensions/git/README.md |
Adds documentation for the git extension under .specify/extensions/. |
.specify/extensions/git/git-config.yml |
Adds git extension configuration under .specify/extensions/. |
.specify/extensions/git/extension.yml |
Adds a git extension definition under .specify/extensions/. |
.specify/extensions/git/config-template.yml |
Adds a git extension config template under .specify/extensions/. |
.specify/extensions/git/commands/speckit.git.validate.md |
Adds a git extension command template under .specify/extensions/. |
.specify/extensions/git/commands/speckit.git.remote.md |
Adds a git extension command template under .specify/extensions/. |
.specify/extensions/git/commands/speckit.git.initialize.md |
Adds a git extension command template under .specify/extensions/. |
.specify/extensions/git/commands/speckit.git.feature.md |
Adds a git extension command template under .specify/extensions/. |
.specify/extensions/git/commands/speckit.git.commit.md |
Adds a git extension command template under .specify/extensions/. |
.specify/extensions/.registry |
Adds extensions registry state/artifact. |
.specify/extensions/.cache/catalog.json |
Adds cached extension catalog artifact. |
.specify/extensions/.cache/catalog-metadata.json |
Adds cached catalog metadata artifact. |
.specify/extensions/.cache/catalog-ebf165086500aab1-metadata.json |
Adds cached community catalog metadata artifact. |
.specify/extensions.yml |
Adds extensions configuration file artifact. |
.specify/.spex-state |
Adds spex state artifact. |
.gitignore |
Updates ignore rules (including ignoring brainstorm/ and broad .specify patterns). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ormat types Add post_process_command_content(self, content: str) -> str to IntegrationBase with a no-op default. Wire it into register_commands() for non-skills format types (Markdown, TOML, YAML) after format rendering, before writing to disk. Also applies to aliases rendered via the inject_name path (cline, forge). Skills-format agents are excluded to preserve the existing post_process_skill_content() path and avoid double-processing. This gives extension authors a clean per-agent content transformation seam for all 21 non-skills integrations that previously had no post-processing hook. Ref: github#3303 Assisted-By: 🤖 Claude Code
5270a4f to
70d165e
Compare
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.
Summary
post_process_command_content(self, content: str) -> strtoIntegrationBasewith no-op defaultregister_commands()for non-skills format types (Markdown, TOML, YAML)post_process_skill_content()path)This gives extension authors a clean per-agent content transformation seam for all 21 non-skills integrations that previously had no post-processing hook.
Ref: #3303 (the
post_process_command_content()portion welcomed by maintainer)Test plan
post_process_command_content()called🤖 Generated with Claude Code