Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .agent/scripts/generate-opencode-commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ echo -e " ${GREEN}✓${NC} Created /pr command (alias for /create-pr)"
cat > "$OPENCODE_COMMAND_DIR/create-prd.md" << 'EOF'
---
description: Generate a Product Requirements Document for a feature
agent: Plan+
agent: Build+
---
Comment on lines 541 to 545

Choose a reason for hiding this comment

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

medium

To improve maintainability and prevent hardcoded values from becoming stale in the future, consider defining the agent name as a variable (e.g., BUILD_AGENT=\"Build+\") at the top of the script. You can then reference this variable in all the command generation blocks. This makes future updates much easier and less error-prone.

This pattern should be applied to all commands being updated in this PR.

Note that you'll need to change << 'EOF' to << EOF in each block to enable variable expansion.

Suggested change
cat > "$OPENCODE_COMMAND_DIR/create-prd.md" << 'EOF'
---
description: Generate a Product Requirements Document for a feature
agent: Plan+
agent: Build+
---
cat > "$OPENCODE_COMMAND_DIR/create-prd.md" << EOF
---
description: Generate a Product Requirements Document for a feature
agent: ${BUILD_AGENT}
---


Read ~/.aidevops/agents/workflows/plans.md and follow its PRD generation instructions.
Expand Down Expand Up @@ -579,7 +579,7 @@ echo -e " ${GREEN}✓${NC} Created /create-prd command"
cat > "$OPENCODE_COMMAND_DIR/generate-tasks.md" << 'EOF'
---
description: Generate implementation tasks from a PRD
agent: Plan+
agent: Build+
---

Read ~/.aidevops/agents/workflows/plans.md and follow its task generation instructions.
Expand Down Expand Up @@ -619,7 +619,7 @@ echo -e " ${GREEN}✓${NC} Created /generate-tasks command"
cat > "$OPENCODE_COMMAND_DIR/list-todo.md" << 'EOF'
---
description: List tasks and plans with sorting, filtering, and grouping
agent: Plan+
agent: Build+
---

Read TODO.md and todo/PLANS.md and display tasks based on arguments.
Expand Down Expand Up @@ -707,7 +707,7 @@ echo -e " ${GREEN}✓${NC} Created /list-todo command"
cat > "$OPENCODE_COMMAND_DIR/save-todo.md" << 'EOF'
---
description: Save current discussion as task or plan (auto-detects complexity)
agent: Plan+
agent: Build+
---

Analyze the current conversation and save appropriately based on complexity.
Expand Down Expand Up @@ -773,7 +773,7 @@ echo -e " ${GREEN}✓${NC} Created /save-todo command"
cat > "$OPENCODE_COMMAND_DIR/plan-status.md" << 'EOF'
---
description: Show active plans and TODO.md status
agent: Plan+
agent: Build+
---

Read TODO.md and todo/PLANS.md to show current planning status.
Expand Down Expand Up @@ -1017,7 +1017,7 @@ echo -e " ${GREEN}✓${NC} Created /webmaster-keywords command"
cat > "$OPENCODE_COMMAND_DIR/onboarding.md" << 'EOF'
---
description: Interactive onboarding wizard - discover services, configure integrations
agent: AI-DevOps
agent: Build+
---

Read ~/.aidevops/agents/onboarding.md and follow its instructions.
Expand Down
Loading