mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-09 02:24:11 +08:00
refactor: Replace planning-role-load.sh with direct template calls
- Replace all planning-role-load.sh script references with $(cat template) calls - Update conceptual-planning-agent.md to use direct template loading - Update all brainstorm role command files to use bash($(cat template)) format - Update auto.md documentation with new template loading syntax - Remove obsolete planning-role-load.sh script file - Align with $(cat template) standard format in intelligent-tools-strategy.md 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,66 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Gemini Chat Template Accessor - Template content access utility
|
||||
# Usage: ./chat-template-load.sh list|load <template-name>
|
||||
|
||||
set -e
|
||||
|
||||
# Configuration
|
||||
CLAUDE_DIR="$HOME/.claude"
|
||||
TEMPLATES_DIR="$CLAUDE_DIR/prompt-templates"
|
||||
|
||||
# Parse command line arguments
|
||||
COMMAND="$1"
|
||||
TEMPLATE_NAME="$2"
|
||||
|
||||
# Function to list available templates
|
||||
list_templates() {
|
||||
echo "Available templates:"
|
||||
echo "===================="
|
||||
for template_file in "$TEMPLATES_DIR"/*.md; do
|
||||
if [[ -f "$template_file" ]]; then
|
||||
local name=$(basename "$template_file" .md)
|
||||
if [[ "$name" != "README" ]]; then
|
||||
local desc=$(grep "description:" "$template_file" | cut -d':' -f2- | sed 's/^ *//')
|
||||
printf "%-20s %s\n" "$name" "$desc"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo ""
|
||||
}
|
||||
|
||||
# Function to load template
|
||||
load_template() {
|
||||
local template_name="$1"
|
||||
local template_file="$TEMPLATES_DIR/$template_name.md"
|
||||
|
||||
if [[ -f "$template_file" ]]; then
|
||||
cat "$template_file"
|
||||
return 0
|
||||
else
|
||||
echo "Error: Template file not found: $template_file" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Main execution
|
||||
case "$COMMAND" in
|
||||
"list")
|
||||
list_templates
|
||||
;;
|
||||
"load")
|
||||
if [[ -z "$TEMPLATE_NAME" ]]; then
|
||||
echo "Error: Template name is required for load command" >&2
|
||||
echo "Usage: $0 load <template-name>" >&2
|
||||
exit 1
|
||||
fi
|
||||
load_template "$TEMPLATE_NAME"
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unknown command: $COMMAND" >&2
|
||||
echo "Usage: $0 {list|load} [template-name]" >&2
|
||||
echo "Commands:" >&2
|
||||
echo " list - List available templates" >&2
|
||||
echo " load <name> - Load template content" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -1,72 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Planning Role Template Accessor - Role template content access utility
|
||||
# Usage: ./planning-role-load.sh list|load <role-name>
|
||||
|
||||
set -e
|
||||
|
||||
# Configuration
|
||||
CLAUDE_DIR="$HOME/.claude"
|
||||
PLANNING_ROLES_DIR="$CLAUDE_DIR/workflows/cli-templates/planning-roles"
|
||||
|
||||
# Parse command line arguments
|
||||
COMMAND="$1"
|
||||
ROLE_NAME="$2"
|
||||
|
||||
# Function to list available planning roles
|
||||
list_roles() {
|
||||
echo "Available planning roles:"
|
||||
echo "========================="
|
||||
for role_file in "$PLANNING_ROLES_DIR"/*.md; do
|
||||
if [[ -f "$role_file" ]]; then
|
||||
local name=$(basename "$role_file" .md)
|
||||
if [[ "$name" != "README" ]]; then
|
||||
local desc=$(grep "description:" "$role_file" | cut -d':' -f2- | sed 's/^ *//')
|
||||
printf "%-20s %s\n" "$name" "$desc"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo ""
|
||||
}
|
||||
|
||||
# Function to load planning role template
|
||||
load_role() {
|
||||
local role_name="$1"
|
||||
local role_file="$PLANNING_ROLES_DIR/$role_name.md"
|
||||
|
||||
if [[ -f "$role_file" ]]; then
|
||||
cat "$role_file"
|
||||
return 0
|
||||
else
|
||||
echo "Error: Planning role file not found: $role_file" >&2
|
||||
echo "Available roles:" >&2
|
||||
for role in "$PLANNING_ROLES_DIR"/*.md; do
|
||||
if [[ -f "$role" ]]; then
|
||||
echo " - $(basename "$role" .md)" >&2
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Main execution
|
||||
case "$COMMAND" in
|
||||
"list")
|
||||
list_roles
|
||||
;;
|
||||
"load")
|
||||
if [[ -z "$ROLE_NAME" ]]; then
|
||||
echo "Error: Role name is required for load command" >&2
|
||||
echo "Usage: $0 load <role-name>" >&2
|
||||
exit 1
|
||||
fi
|
||||
load_role "$ROLE_NAME"
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unknown command: $COMMAND" >&2
|
||||
echo "Usage: $0 {list|load} [role-name]" >&2
|
||||
echo "Commands:" >&2
|
||||
echo " list - List available planning roles" >&2
|
||||
echo " load <name> - Load planning role template content" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user