Add /diff and /template commands

- /diff command to compare config with backups
  - Shows added/removed/changed files
  - JSON-aware comparison for config files
  - List available backups
- /template command for session templates
  - Built-in templates: daily-standup, code-review, troubleshoot, deploy
  - Each template includes checklist, initial commands, prompt
  - Create custom templates interactively or non-interactively
- Updated shell completions with 21 aliases total
- Test suite now covers 29 tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OpenCode Test
2026-01-01 19:06:14 -08:00
parent 4169f5b9a4
commit de89f3066c
10 changed files with 714 additions and 3 deletions

View File

@@ -69,6 +69,18 @@ _claude_agent_info() {
COMPREPLY=($(compgen -W "--tree --list" -- "${cur}"))
}
_claude_diff() {
local cur="${COMP_WORDS[COMP_CWORD]}"
COMPREPLY=($(compgen -W "--backup --list --json" -- "${cur}"))
}
_claude_template() {
local cur="${COMP_WORDS[COMP_CWORD]}"
COMPREPLY=($(compgen -W "--list --create --use --delete" -- "${cur}"))
}
_claude_memory_add() {
local cur="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"
@@ -108,6 +120,8 @@ complete -F _claude_upgrade upgrade.sh
complete -F _claude_workflow workflow-info.py
complete -F _claude_skill_info skill-info.py
complete -F _claude_agent_info agent-info.py
complete -F _claude_diff config-diff.py
complete -F _claude_template session-template.py
# Alias completions for convenience
alias claude-validate='~/.claude/automation/validate-setup.sh'
@@ -130,8 +144,10 @@ alias claude-upgrade='~/.claude/automation/upgrade.sh'
alias claude-workflow='python3 ~/.claude/automation/workflow-info.py'
alias claude-skill='python3 ~/.claude/automation/skill-info.py'
alias claude-agent='python3 ~/.claude/automation/agent-info.py'
alias claude-diff='python3 ~/.claude/automation/config-diff.py'
alias claude-template='python3 ~/.claude/automation/session-template.py'
echo "Claude Code completions loaded. Available aliases:"
echo " claude-{validate,status,backup,restore,clean,memory-add,memory-list,search}"
echo " claude-{history,install,test,maintenance,log,debug,export,mcp,upgrade}"
echo " claude-{workflow,skill,agent}"
echo " claude-{workflow,skill,agent,diff,template}"