chore: remove obsolete template generation system - #1355
Conversation
Removes the deprecated command generation architecture that was replaced by Claude Code's native plugin system (PR #1352). **What Was Removed:** - `utils/generate-claude-commands.sh` - Template processor - `utils/generate-commands.sh` - Multi-provider command generation - `utils/sync-claude-commands.sh` - Command sync tool - `utils/prompt_orchestrator.py` - Template engine - CI/CD validation for command sync - All references from README, setup.sh, and settings.json **Why:** - PR #1320 moved to "provider-agnostic, slash-free invocation" - PR #1352 introduced plugin system as replacement - Template generation no longer used or maintained - Symlinks in `.claude-plugin/` handle distribution now **What Remains:** - `.claude-plugin/` - Plugin distribution (current architecture) - `.claude/commands/` - Local commands for dotfiles repo - `knowledge/procedures/` - Single source of truth **Cleanup Also:** - Removed 16 old worktrees (leftover branches) - Pruned git worktree references Closes #1319 follow-up
|
⏳ Code review in progress. Analyzing for code quality issues and best practices. Detailed findings will be posted upon completion. Using Amazon Q Developer for GitHubAmazon Q Developer1 is an AI-powered assistant that integrates directly into your GitHub workflow, enhancing your development process with intelligent features for code development, review, and transformation. Slash Commands
FeaturesAgentic Chat Code Review CustomizationYou can create project-specific rules for Amazon Q Developer to follow:
Example rule: FeedbackTo provide feedback on Amazon Q Developer, create an issue in the Amazon Q Developer public repository. For more detailed information, visit the Amazon Q for GitHub documentation. Footnotes
|
There was a problem hiding this comment.
Excellent Cleanup Work! ✅
This PR successfully completes the migration from the deprecated template generation system to the modern plugin architecture. The cleanup is comprehensive and well-executed:
Key Strengths:
- Complete removal of ~1100 lines of obsolete code across 4 utility scripts
- Consistent documentation updates across README files to reflect the new architecture
- Proper CI cleanup removing validation for deprecated systems
- Security improvement by eliminating the command execution vulnerabilities in
prompt_orchestrator.py - Clear migration path with the plugin system properly configured in
.claude/settings.json
Architecture Benefits:
- Single source of truth via
knowledge/procedures/with YAML front matter - Plugin-based distribution through Claude Code's
/plugincommands - Elimination of complex template processing and variable injection
- Cleaner, more maintainable codebase
Minor Consideration:
- The JSON structure reorganization in
.claude/settings.jsonmovesdenypermissions afterallow- consider maintaining the original order to ensure consistent security behavior
The PR follows the "subtraction-creates-value" principle perfectly, removing complexity while maintaining functionality through the superior plugin system. Ready for merge after addressing the permissions ordering consideration.
| "Bash(git add -A:*)", | ||
| "Bash(git add:.:*)" | ||
| ], | ||
| "defaultMode": "bypassPermissions", |
There was a problem hiding this comment.
The JSON structure reorganization looks good, but there's a potential issue with the permissions configuration. The deny array is moved after allow, which could affect permission evaluation order depending on how Claude Code processes these rules. Consider maintaining the original order (deny before allow) to ensure consistent security behavior.
|
|
||
| # Regenerate all commands (includes auto-cleanup) | ||
| utils/generate-commands.sh | ||
| ``` |
There was a problem hiding this comment.
Good cleanup! The removal of the entire "Slash Commands (Vendor-Agnostic)" section aligns perfectly with the PR's goal of eliminating the deprecated template generation system. This section was describing the old architecture that has been replaced by the plugin system.
|
|
||
| # Command templates live in .claude/command-templates/ | ||
| # Generated to ~/.claude/commands/ by generate-commands.sh below | ||
| # No symlink needed - templates are processed, not used directly |
There was a problem hiding this comment.
Excellent cleanup of obsolete comments. These comment blocks were referencing the old template generation system that has been replaced by the plugin architecture. Removing them reduces confusion and keeps the setup script focused on current functionality.
|
|
||
| echo "All configurations validated successfully" | ||
|
|
||
| - name: Validate Claude commands sync |
There was a problem hiding this comment.
Perfect removal of the obsolete CI validation step. Since the command sync validation was specifically for the deprecated template generation system, removing this step eliminates unnecessary CI overhead and potential false failures. The workflow now focuses on validating the current architecture.
| if any(char in command for char in [';', '&', '|', '$', '`', '\n', '\r']): | ||
| return "[ERROR: Command contains unsafe characters]" | ||
|
|
||
| try: |
There was a problem hiding this comment.
🛑 Security Review: While this file is being removed, it's worth noting that the CommandResolver class contained potential security vulnerabilities with command execution via EXEC: placeholders. The removal of this system eliminates these security risks, which is a positive outcome of this cleanup.
|
|
||
| That's it. Keep templates short, inject procedures dynamically. No newline at end of file | ||
| For sharing commands across repos, see the plugin system documented in main README.md. | ||
| Commands are distributed via `.claude-plugin/` and installed with `/plugin` commands. No newline at end of file |
There was a problem hiding this comment.
The updated documentation clearly reflects the new architecture. The shift from "Templates that get compiled into slash commands" to "Local commands for the dotfiles repository itself" accurately describes the current plugin-based system. The reference to the plugin system documentation provides good guidance for users.
| "playwright" | ||
| ] | ||
| ], | ||
| "enabledPlugins": { |
There was a problem hiding this comment.
Good addition of the plugin configuration! The enabledPlugins section properly enables the dotfiles commands plugin. This ensures the new plugin system is active and ready to use after the cleanup.
| ./fix-npm-nvm-conflict.sh | ||
| ``` | ||
|
|
||
| ### prompt_orchestrator.py |
There was a problem hiding this comment.
Appropriate removal of the prompt_orchestrator.py documentation. Since the script is being deleted, keeping its documentation would create confusion. The removal maintains consistency between the codebase and its documentation.
Remove all documentation and procedures for the prompt orchestrator system that was deleted in PR #1355 (Oct 9, 2025). The entire template generation architecture was replaced by Claude Code's native plugin system. ## Files Removed **Documentation (obsolete):** - `docs/prompt-orchestration.md` - Described template syntax for deleted orchestrator - `docs/prompt-orchestrator-security.md` - Security docs for deleted code **Procedure (obsolete):** - `knowledge/procedures/command-lifecycle-management.md` - Referenced deleted tools: - utils/sync-claude-commands.sh (removed PR #1355) - utils/generate-commands.sh (removed PR #1355) - .claude/command-templates/ (never existed) **Artifacts (untracked):** - `utils/__pycache__/prompt_orchestrator.cpython-312.pyc` - Not in git, removed manually ## Updated **knowledge/principles/systems-stewardship.md:26** - Updated gitignore example: - Old: Referenced deleted `.claude/command-templates` - New: References current `mlruns/` (MLflow tracking data) ## Context The prompt orchestrator (utils/prompt_orchestrator.py) was removed in commit 688fe9d along with 1,131 lines of template generation tooling. These docs were orphaned but not removed at the time. ## Impact - 3 docs files removed (~150 lines) - 1 procedure removed (42 lines) - 1 principle example updated - Zero functional loss - all referenced deleted systems Related to #1355 (orchestrator removal) Related to #1352 (plugin system replacement) Principle: subtraction-creates-value
Remove all documentation, procedures, and vestigial syntax for the prompt orchestrator system deleted in PR #1355 (Oct 9, 2025). The entire template generation architecture was replaced by Claude Code's native plugin system. ## Files Removed **Documentation (obsolete):** - `docs/prompt-orchestration.md` - Described template syntax for deleted orchestrator - `docs/prompt-orchestrator-security.md` - Security docs for deleted code **Procedure (obsolete):** - `knowledge/procedures/command-lifecycle-management.md` - Referenced deleted tools: - utils/sync-claude-commands.sh (removed PR #1355) - utils/generate-commands.sh (removed PR #1355) - .claude/command-templates/ (never existed) **Artifacts (untracked):** - `utils/__pycache__/prompt_orchestrator.cpython-312.pyc` - Not in git, removed manually ## Vestigial Syntax Removed **commands/close-issue.md** - Removed 2 non-functional markers: - Line 52: `{{ INJECT:principles/tracer-bullets.md }}` - Line 69: `{{ INJECT:principles/eager-evolution.md }}` **commands/extract-best-frame.md** - Removed 1 non-functional marker: - Line 211: `{{ INJECT:principles/tracer-bullets.md }}` These `{{ INJECT: }}` markers were remnants of the deleted orchestrator's template processing. They're not processed by any current system - GitHub Actions only processes `{{ KNOWLEDGE_BASE }}` and local commands don't process them at all. The principles are already available in context, making these markers vestigial documentation cruft. ## Updated **knowledge/principles/systems-stewardship.md:26** - Updated gitignore example: - Old: Referenced deleted `.claude/command-templates` - New: References current `mlruns/` (MLflow tracking data) ## Context The prompt orchestrator (utils/prompt_orchestrator.py) was removed in commit 688fe9d along with 1,131 lines of template generation tooling. These docs and syntax markers were orphaned but not removed at the time. ## Impact - 3 docs files removed (~150 lines) - 1 procedure removed (42 lines) - 3 vestigial syntax markers removed - 1 principle example updated - Zero functional loss - all referenced deleted systems or non-functional syntax Related to #1355 (orchestrator removal) Related to #1352 (plugin system replacement) Principle: subtraction-creates-value
#1377) Remove all documentation, procedures, and vestigial syntax for the prompt orchestrator system deleted in PR #1355 (Oct 9, 2025). The entire template generation architecture was replaced by Claude Code's native plugin system. ## Files Removed **Documentation (obsolete):** - `docs/prompt-orchestration.md` - Described template syntax for deleted orchestrator - `docs/prompt-orchestrator-security.md` - Security docs for deleted code **Procedure (obsolete):** - `knowledge/procedures/command-lifecycle-management.md` - Referenced deleted tools: - utils/sync-claude-commands.sh (removed PR #1355) - utils/generate-commands.sh (removed PR #1355) - .claude/command-templates/ (never existed) **Artifacts (untracked):** - `utils/__pycache__/prompt_orchestrator.cpython-312.pyc` - Not in git, removed manually ## Vestigial Syntax Removed **commands/close-issue.md** - Removed 2 non-functional markers: - Line 52: `{{ INJECT:principles/tracer-bullets.md }}` - Line 69: `{{ INJECT:principles/eager-evolution.md }}` **commands/extract-best-frame.md** - Removed 1 non-functional marker: - Line 211: `{{ INJECT:principles/tracer-bullets.md }}` These `{{ INJECT: }}` markers were remnants of the deleted orchestrator's template processing. They're not processed by any current system - GitHub Actions only processes `{{ KNOWLEDGE_BASE }}` and local commands don't process them at all. The principles are already available in context, making these markers vestigial documentation cruft. ## Updated **knowledge/principles/systems-stewardship.md:26** - Updated gitignore example: - Old: Referenced deleted `.claude/command-templates` - New: References current `mlruns/` (MLflow tracking data) ## Context The prompt orchestrator (utils/prompt_orchestrator.py) was removed in commit 688fe9d along with 1,131 lines of template generation tooling. These docs and syntax markers were orphaned but not removed at the time. ## Impact - 3 docs files removed (~150 lines) - 1 procedure removed (42 lines) - 3 vestigial syntax markers removed - 1 principle example updated - Zero functional loss - all referenced deleted systems or non-functional syntax Related to #1355 (orchestrator removal) Related to #1352 (plugin system replacement) Principle: subtraction-creates-value
Summary
Complete removal of the deprecated command generation architecture, fully replaced by Claude Code's plugin system.
What Was Removed
Scripts (4 files, ~1100 lines):
utils/generate-claude-commands.sh- Template processor with variable injectionutils/generate-commands.sh- Multi-provider command generationutils/sync-claude-commands.sh- Command synchronization and cleanup toolutils/prompt_orchestrator.py- Template engine with INJECT/EXEC featuresReferences Cleaned:
generate-claude-commands.shpermissionWorktrees Cleaned:
Timeline
.claude-plugin/directoryWhat Remains
The modern architecture:
Single source of truth:
knowledge/procedures/(procedures with YAML front matter)Distribution: Claude Code plugin system (
/plugincommands)Local commands:
.claude/commands/(for dotfiles repo itself)Benefits
Testing
After merge:
/pluginin Claude Code/close-issue,/create-issue, etc.Related: Closes follow-up cleanup from #1319, #1320, #1352, #1354