mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +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:
@@ -30,7 +30,7 @@ You are a conceptual planning specialist focused on **dedicated single-role** st
|
||||
|
||||
1. **Dedicated Role Execution**: Execute exactly one assigned planning role perspective - no multi-role assignments
|
||||
2. **Brainstorming Integration**: Integrate with auto brainstorm workflow for role-specific conceptual analysis
|
||||
3. **Template-Driven Analysis**: Use planning role templates loaded via `planning-role-load.sh`
|
||||
3. **Template-Driven Analysis**: Use planning role templates loaded via `$(cat template)`
|
||||
4. **Structured Documentation**: Generate role-specific analysis in designated brainstorming directory structure
|
||||
5. **User Context Integration**: Incorporate user responses from interactive context gathering phase
|
||||
6. **Strategic Conceptual Planning**: Focus on conceptual "what" and "why" without implementation details
|
||||
@@ -67,9 +67,9 @@ def handle_brainstorm_assignment(prompt):
|
||||
command = step["command"]
|
||||
output_to = step.get("output_to")
|
||||
|
||||
# Execute role template loading via planning-role-load.sh
|
||||
# Execute role template loading via $(cat template)
|
||||
if step_name == "load_role_template":
|
||||
processed_command = f"~/.claude/scripts/planning-role-load.sh load {role}"
|
||||
processed_command = f"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/{role}.md))"
|
||||
else:
|
||||
processed_command = process_context_variables(command, context_vars)
|
||||
|
||||
@@ -128,7 +128,7 @@ When called, you receive:
|
||||
**Auto Brainstorm Integration**: Role assignment comes from auto.md workflow:
|
||||
1. **Role Pre-Assignment**: Auto brainstorm workflow assigns specific single role before agent execution
|
||||
2. **Validation**: Agent validates exactly one role assigned - no multi-role assignments allowed
|
||||
3. **Template Loading**: Use `planning-role-load.sh load <assigned-role>` for role template
|
||||
3. **Template Loading**: Use `$(cat ~/.claude/workflows/cli-templates/planning-roles/<assigned-role>.md)` for role template
|
||||
4. **Output Directory**: Use designated `.brainstorming/[role]/` directory for role-specific outputs
|
||||
|
||||
### Role Options Include:
|
||||
@@ -153,7 +153,7 @@ When called, you receive:
|
||||
### Role Template Integration
|
||||
Documentation formats and structures are defined in role-specific templates loaded via:
|
||||
```bash
|
||||
~/.claude/scripts/planning-role-load.sh load <assigned-role>
|
||||
$(cat ~/.claude/workflows/cli-templates/planning-roles/<assigned-role>.md)
|
||||
```
|
||||
|
||||
Each planning role template contains:
|
||||
@@ -208,7 +208,7 @@ Generate documents according to loaded role template specifications:
|
||||
- **Success Criteria Identification**: Determine what success looks like from this role's perspective
|
||||
|
||||
### 2. Template-Driven Analysis Phase
|
||||
- **Load Role Template**: Execute flow control step to load assigned role template via `planning-role-load.sh`
|
||||
- **Load Role Template**: Execute flow control step to load assigned role template via `$(cat template)`
|
||||
- **Apply Role Framework**: Use loaded template's analysis framework for role-specific perspective
|
||||
- **Integrate User Context**: Incorporate user responses from interactive context gathering phase
|
||||
- **Conceptual Analysis**: Focus on strategic "what" and "why" without implementation details
|
||||
|
||||
@@ -24,15 +24,15 @@ allowed-tools: Task(*), TodoWrite(*), Read(*), Write(*), Bash(*), Glob(*)
|
||||
- **Multi-role**: Complex topics automatically select 2-3 complementary roles
|
||||
- **Default**: `product-manager` if no clear match
|
||||
|
||||
**Template Loading**: `~/.claude/scripts/planning-role-load.sh load <role-name>`
|
||||
**Template Loading**: `bash($(cat ~/.claude/workflows/cli-templates/planning-roles/<role-name>.md))`
|
||||
**Template Source**: `.claude/workflows/cli-templates/planning-roles/`
|
||||
**Available Roles**: business-analyst, data-architect, feature-planner, innovation-lead, product-manager, security-expert, system-architect, test-strategist, ui-designer, user-researcher
|
||||
|
||||
**Example**:
|
||||
```bash
|
||||
~/.claude/scripts/planning-role-load.sh load system-architect
|
||||
~/.claude/scripts/planning-role-load.sh load ui-designer
|
||||
~/.claude/scripts/planning-role-load.sh list # Show all available roles
|
||||
bash($(cat ~/.claude/workflows/cli-templates/planning-roles/system-architect.md))
|
||||
bash($(cat ~/.claude/workflows/cli-templates/planning-roles/ui-designer.md))
|
||||
ls ~/.claude/workflows/cli-templates/planning-roles/ # Show all available roles
|
||||
```
|
||||
|
||||
## Core Workflow
|
||||
@@ -48,7 +48,7 @@ The command performs dedicated role analysis through:
|
||||
|
||||
**1. Role Selection & Template Loading**
|
||||
- **Keyword analysis**: Extract topic keywords and map to planning roles
|
||||
- **Template loading**: Load role templates via `~/.claude/scripts/planning-role-load.sh`
|
||||
- **Template loading**: Load role templates via `bash($(cat ~/.claude/workflows/cli-templates/planning-roles/<role>.md))`
|
||||
- **Role validation**: Verify against `.claude/workflows/cli-templates/planning-roles/`
|
||||
- **Multi-role detection**: Select 1-3 complementary roles based on topic complexity
|
||||
|
||||
@@ -80,7 +80,7 @@ Agents receive dedicated role assignments with complete context isolation:
|
||||
{
|
||||
"step": "load_role_template",
|
||||
"action": "Load system-architect planning template",
|
||||
"command": "bash(~/.claude/scripts/planning-role-load.sh load system-architect)",
|
||||
"command": "bash($(cat ~/.claude/workflows/cli-templates/planning-roles/system-architect.md))",
|
||||
"output_to": "role_template"
|
||||
}
|
||||
],
|
||||
@@ -101,7 +101,7 @@ Agents receive dedicated role assignments with complete context isolation:
|
||||
4. **Agent delegation**: Complete context handoff to dedicated conceptual-planning-agent
|
||||
|
||||
**Content Sources**:
|
||||
- Role templates: `~/.claude/scripts/planning-role-load.sh load <role>` from `.claude/workflows/cli-templates/planning-roles/`
|
||||
- Role templates: `bash($(cat ~/.claude/workflows/cli-templates/planning-roles/<role>.md))` from `.claude/workflows/cli-templates/planning-roles/`
|
||||
- User responses: Direct context gathering during interactive questioning phase
|
||||
- Conceptual focus: Strategic and planning perspective without technical implementation
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ Flow Control Steps:
|
||||
{
|
||||
\"step\": \"load_role_template\",
|
||||
\"action\": \"Load business-analyst planning template\",
|
||||
\"command\": \"bash(~/.claude/scripts/planning-role-load.sh load business-analyst)\",
|
||||
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/business-analyst.md))\",
|
||||
\"output_to\": \"role_template\"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -127,7 +127,7 @@ Flow Control Steps:
|
||||
{
|
||||
\"step\": \"load_role_template\",
|
||||
\"action\": \"Load data-architect planning template\",
|
||||
\"command\": \"bash(~/.claude/scripts/planning-role-load.sh load data-architect)\",
|
||||
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/data-architect.md))\",
|
||||
\"output_to\": \"role_template\"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -127,7 +127,7 @@ Flow Control Steps:
|
||||
{
|
||||
\"step\": \"load_role_template\",
|
||||
\"action\": \"Load feature-planner planning template\",
|
||||
\"command\": \"bash(~/.claude/scripts/planning-role-load.sh load feature-planner)\",
|
||||
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/feature-planner.md))\",
|
||||
\"output_to\": \"role_template\"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -127,7 +127,7 @@ Flow Control Steps:
|
||||
{
|
||||
\"step\": \"load_role_template\",
|
||||
\"action\": \"Load innovation-lead planning template\",
|
||||
\"command\": \"bash(~/.claude/scripts/planning-role-load.sh load innovation-lead)\",
|
||||
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/innovation-lead.md))\",
|
||||
\"output_to\": \"role_template\"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -122,7 +122,7 @@ Flow Control Steps:
|
||||
{
|
||||
\"step\": \"load_role_template\",
|
||||
\"action\": \"Load product-manager planning template\",
|
||||
\"command\": \"bash(~/.claude/scripts/planning-role-load.sh load product-manager)\",
|
||||
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/product-manager.md))\",
|
||||
\"output_to\": \"role_template\"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -122,7 +122,7 @@ Flow Control Steps:
|
||||
{
|
||||
\"step\": \"load_role_template\",
|
||||
\"action\": \"Load security-expert planning template\",
|
||||
\"command\": \"bash(~/.claude/scripts/planning-role-load.sh load security-expert)\",
|
||||
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/security-expert.md))\",
|
||||
\"output_to\": \"role_template\"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -122,7 +122,7 @@ Flow Control Steps:
|
||||
{
|
||||
\"step\": \"load_role_template\",
|
||||
\"action\": \"Load system-architect planning template\",
|
||||
\"command\": \"bash(~/.claude/scripts/planning-role-load.sh load system-architect)\",
|
||||
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/system-architect.md))\",
|
||||
\"output_to\": \"role_template\"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -122,7 +122,7 @@ Flow Control Steps:
|
||||
{
|
||||
\"step\": \"load_role_template\",
|
||||
\"action\": \"Load ui-designer planning template\",
|
||||
\"command\": \"bash(~/.claude/scripts/planning-role-load.sh load ui-designer)\",
|
||||
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/ui-designer.md))\",
|
||||
\"output_to\": \"role_template\"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -127,7 +127,7 @@ Flow Control Steps:
|
||||
{
|
||||
\"step\": \"load_role_template\",
|
||||
\"action\": \"Load user-researcher planning template\",
|
||||
\"command\": \"bash(~/.claude/scripts/planning-role-load.sh load user-researcher)\",
|
||||
\"command\": \"bash($(cat ~/.claude/workflows/cli-templates/planning-roles/user-researcher.md))\",
|
||||
\"output_to\": \"role_template\"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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