Skip to content

chore: remove obsolete template generation system - #1355

Merged
atxtechbro merged 1 commit into
mainfrom
chore/remove-obsolete-template-generation-system
Oct 9, 2025
Merged

chore: remove obsolete template generation system#1355
atxtechbro merged 1 commit into
mainfrom
chore/remove-obsolete-template-generation-system

Conversation

@atxtechbro

Copy link
Copy Markdown
Owner

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 injection
  • utils/generate-commands.sh - Multi-provider command generation
  • utils/sync-claude-commands.sh - Command synchronization and cleanup tool
  • utils/prompt_orchestrator.py - Template engine with INJECT/EXEC features

References Cleaned:

  • README.md: Removed entire "Slash Commands (Vendor-Agnostic)" section
  • .claude/README.md: Updated to reflect plugin system
  • utils/README.md: Removed prompt_orchestrator documentation
  • .claude/settings.json: Removed generate-claude-commands.sh permission
  • .github/workflows/validate-dotfiles.yml: Removed command sync validation
  • setup.sh: Removed 3 obsolete comment blocks

Worktrees Cleaned:

  • Removed 16 old worktrees from various closed PRs
  • Pruned git worktree references

Timeline

What Remains

The modern architecture:

.claude-plugin/
├── plugin.json
├── marketplace.json
└── commands/              # Symlinks to knowledge/procedures/
    ├── close-issue.md
    ├── create-issue.md
    ├── extract-best-frame.md
    └── retro.md

Single source of truth: knowledge/procedures/ (procedures with YAML front matter)
Distribution: Claude Code plugin system (/plugin commands)
Local commands: .claude/commands/ (for dotfiles repo itself)

Benefits

  • ✅ Removes ~1100 lines of unused code
  • ✅ Eliminates confusion between two systems
  • ✅ No more CI validation for deprecated architecture
  • ✅ Cleaner codebase focused on current plugin system
  • ✅ Follows subtraction-creates-value principle

Testing

After merge:

  • Verify plugin still works: /plugin in Claude Code
  • Confirm commands load: /close-issue, /create-issue, etc.
  • Check CI passes without sync validation

Related: Closes follow-up cleanup from #1319, #1320, #1352, #1354

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
@amazon-q-developer

Copy link
Copy Markdown
Contributor

Code review in progress. Analyzing for code quality issues and best practices. Detailed findings will be posted upon completion.

Using Amazon Q Developer for GitHub

Amazon 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

Command Description
/q <message> Chat with the agent to ask questions or request revisions
/q review Requests an Amazon Q powered code review
/q help Displays usage information

Features

Agentic Chat
Enables interactive conversation with Amazon Q to ask questions about the pull request or request specific revisions. Use /q <message> in comment threads or the review body to engage with the agent directly.

Code Review
Analyzes pull requests for code quality, potential issues, and security concerns. Provides feedback and suggested fixes. Automatically triggered on new or reopened PRs (can be disabled for AWS registered installations), or manually with /q review slash command in a comment.

Customization

You can create project-specific rules for Amazon Q Developer to follow:

  1. Create a .amazonq/rules folder in your project root.
  2. Add Markdown files in this folder to define rules (e.g., cdk-rules.md).
  3. Write detailed prompts in these files, such as coding standards or best practices.
  4. Amazon Q Developer will automatically use these rules when generating code or providing assistance.

Example rule:

All Amazon S3 buckets must have encryption enabled, enforce SSL, and block public access.
All Amazon DynamoDB Streams tables must have encryption enabled.
All Amazon SNS topics must have encryption enabled and enforce SSL.
All Amazon SNS queues must enforce SSL.

Feedback

To 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

  1. Amazon Q Developer uses generative AI. You may need to verify generated code before using it in your environment. See the AWS Responsible AI Policy.

@amazon-q-developer amazon-q-developer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /plugin commands
  • Elimination of complex template processing and variable injection
  • Cleaner, more maintainable codebase

Minor Consideration:

  • The JSON structure reorganization in .claude/settings.json moves deny permissions after allow - 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.

Comment thread .claude/settings.json
"Bash(git add -A:*)",
"Bash(git add:.:*)"
],
"defaultMode": "bypassPermissions",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread README.md

# Regenerate all commands (includes auto-cleanup)
utils/generate-commands.sh
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread setup.sh

# 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 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.

Comment thread .claude/README.md

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .claude/settings.json
"playwright"
]
],
"enabledPlugins": {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread utils/README.md
./fix-npm-nvm-conflict.sh
```

### prompt_orchestrator.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@atxtechbro
atxtechbro merged commit 688fe9d into main Oct 9, 2025
8 checks passed
atxtechbro added a commit that referenced this pull request Oct 10, 2025
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
atxtechbro added a commit that referenced this pull request Oct 10, 2025
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
atxtechbro added a commit that referenced this pull request Oct 10, 2025
#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
@atxtechbro
atxtechbro deleted the chore/remove-obsolete-template-generation-system branch October 10, 2025 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant