refactor: streamline profiles and fix registry pluralization

Profile Changes:
- Reduce core profile from 15 to 9 components (true essentials only)
- Keep developer at 22 components (add back image-specialist + gemini)
- Remove unused subagents from core (reviewer, build-agent)
- Remove non-essential commands from core (test, context, prompt-enhancer)

Core Profile (9 components):
- Agents: task-manager, codebase-agent
- Subagents: tester, documentation, coder-agent
- Commands: commit
- Context: essential-patterns, project-context
- Config: env-example

Developer Profile (22 components):
- Everything in core plus quality tools and AI features
- Added: image-specialist, gemini tool
- Added: reviewer, build-agent, codebase-pattern-analyst
- Added: test, context, clean, optimize, prompt-enhancer commands

Bug Fixes:
- Fix jq error: 'Cannot iterate over null' for config components
- Add get_registry_key() helper to handle singular 'config' vs plural types
- Update all jq queries to use correct registry keys

Codebase Agent:
- Remove @image-specialist reference (not needed for core coding)
- Update subagent list to match actual usage
- Now lists: @task-manager, @tester, @documentation, @coder-agent

Documentation:
- Update README with correct component counts
- Update profile descriptions to be more accurate
- Clarify what each profile is best for

This makes 'core' truly minimal and 'developer' the recommended choice.
This commit is contained in:
darrenhinde 2025-11-18 14:18:59 +00:00
parent 515a83dce2
commit a9f119e83e
5 changed files with 43 additions and 34 deletions

View file

@ -1,7 +1,6 @@
--- ---
description: "Multi-language implementation agent for modular and functional development" description: "Multi-language implementation agent for modular and functional development"
mode: primary mode: primary
model: claude-4-sonnet
temperature: 0.1 temperature: 0.1
tools: tools:
read: true read: true
@ -35,9 +34,9 @@ Always start with phrase "DIGGING IN..."
You have access to the following subagents: You have access to the following subagents:
- `@task-manager` - `@task-manager`
- `@image-specialist`
- `@subagents/tester` @tester - `@subagents/tester` @tester
- `@subagents/documentation` @documentation - `@subagents/documentation` @documentation
- `@subagents/coder-agent` @coder-agent
Focus: Focus:
You are a coding specialist focused on writing clean, maintainable, and scalable code. Your role is to implement applications following a strict plan-and-approve workflow using modular and functional programming principles. You are a coding specialist focused on writing clean, maintainable, and scalable code. Your role is to implement applications following a strict plan-and-approve workflow using modular and functional programming principles.
@ -82,7 +81,6 @@ Do NOT proceed without explicit approval
Phase 2: Implementation (After Approval Only) Phase 2: Implementation (After Approval Only)
Implement incrementally - complete one step at a time, never implement the entire plan at once Implement incrementally - complete one step at a time, never implement the entire plan at once
If need images for a task, so pass it to the `@image-specialist` to make images for the task and tell it where to save the images. So you can use the images in the task.
After each increment: After each increment:
- Use appropriate runtime for the language (node/bun for TypeScript/JavaScript, python for Python, go run for Go, cargo run for Rust) - Use appropriate runtime for the language (node/bun for TypeScript/JavaScript, python for Python, go run for Go, cargo run for Rust)
- Run type checks if applicable (tsc for TypeScript, mypy for Python, go build for Go, cargo check for Rust) - Run type checks if applicable (tsc for TypeScript, mypy for Python, go build for Go, cargo check for Rust)

View file

@ -1,7 +1,6 @@
--- ---
description: Specialized agent for image editing and analysis using Gemini AI tools description: Specialized agent for image editing and analysis using Gemini AI tools
mode: primary mode: primary
model: anthropic/claude-sonnet-4-20250514
temperature: 0.3 temperature: 0.3
permission: permission:
edit: deny edit: deny

View file

@ -103,16 +103,16 @@ The installer offers:
<summary><b>macOS / Linux / Git Bash / WSL</b></summary> <summary><b>macOS / Linux / Git Bash / WSL</b></summary>
```bash ```bash
# Core essentials only (15 components) # Core - Minimal essentials (9 components)
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash -s core curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash -s core
# Balanced for daily development (22 components) # Developer - Recommended for daily work (22 components)
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash -s developer curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash -s developer
# Everything included (25 components) # Full - Everything included (25 components)
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash -s full curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash -s full
# Advanced + System Builder (23 components) # Advanced - Full + System Builder (30 components)
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash -s advanced curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash -s advanced
``` ```
</details> </details>
@ -402,23 +402,24 @@ curl -o ~/.opencode/agent/codebase-agent.md \
The installer offers four pre-configured profiles: The installer offers four pre-configured profiles:
### 🎯 Core (Minimal) ### 🎯 Core (Minimal - 9 components)
Essential agents and commands for basic OpenCode usage. Absolute essentials for basic development workflow.
- **Agents**: task-manager, codebase-agent - **Agents**: task-manager, codebase-agent
- **Subagents**: reviewer, tester, documentation, coder-agent, build-agent - **Subagents**: tester, documentation, coder-agent
- **Commands**: test, commit, context - **Commands**: commit
- **Tools**: env utilities - **Context**: essential-patterns, project-context
- **Best for**: Getting started, minimal setup - **Config**: env-example
- **Best for**: Minimal setup, learning the system
### 💼 Developer (Recommended) ### 💼 Developer (Recommended - 22 components)
Balanced setup for daily development work. Complete daily development setup with AI assistance.
- Everything in Core, plus: - Everything in Core, plus:
- **Agents**: image-specialist, workflow-orchestrator - **Agents**: image-specialist, workflow-orchestrator
- **Subagents**: codebase-pattern-analyst - **Subagents**: reviewer, build-agent, codebase-pattern-analyst
- **Commands**: clean, optimize, prompt-enhancer - **Commands**: test, context, clean, optimize, prompt-enhancer
- **Tools**: Gemini AI integration - **Tools**: env, gemini (AI image generation)
- **Plugins**: Telegram notifications - **Config**: readme
- **Best for**: Most developers, daily use - **Best for**: Most developers, daily use, full-featured
### 📦 Full ### 📦 Full
Complete installation with all available components. Complete installation with all available components.

View file

@ -179,13 +179,26 @@ get_component_info() {
jq -r ".components.${component_type}[] | select(.id == \"${component_id}\")" "$TEMP_DIR/registry.json" jq -r ".components.${component_type}[] | select(.id == \"${component_id}\")" "$TEMP_DIR/registry.json"
} }
# Helper function to get the correct registry key for a component type
get_registry_key() {
local type=$1
# Most types are pluralized, but 'config' stays singular
case "$type" in
config) echo "config" ;;
*) echo "${type}s" ;;
esac
}
resolve_dependencies() { resolve_dependencies() {
local component=$1 local component=$1
local type="${component%%:*}" local type="${component%%:*}"
local id="${component##*:}" local id="${component##*:}"
# Get the correct registry key (handles singular/plural)
local registry_key=$(get_registry_key "$type")
# Get dependencies for this component # Get dependencies for this component
local deps=$(jq -r ".components.${type}s[] | select(.id == \"${id}\") | .dependencies[]?" "$TEMP_DIR/registry.json" 2>/dev/null || echo "") local deps=$(jq -r ".components.${registry_key}[] | select(.id == \"${id}\") | .dependencies[]?" "$TEMP_DIR/registry.json" 2>/dev/null || echo "")
if [ -n "$deps" ]; then if [ -n "$deps" ]; then
for dep in $deps; do for dep in $deps; do
@ -592,7 +605,8 @@ perform_installation() {
for comp in "${SELECTED_COMPONENTS[@]}"; do for comp in "${SELECTED_COMPONENTS[@]}"; do
local type="${comp%%:*}" local type="${comp%%:*}"
local id="${comp##*:}" local id="${comp##*:}"
local path=$(jq -r ".components.${type}s[] | select(.id == \"${id}\") | .path" "$TEMP_DIR/registry.json") local registry_key=$(get_registry_key "$type")
local path=$(jq -r ".components.${registry_key}[] | select(.id == \"${id}\") | .path" "$TEMP_DIR/registry.json")
if [ -n "$path" ] && [ "$path" != "null" ] && [ -f "$path" ]; then if [ -n "$path" ] && [ "$path" != "null" ] && [ -f "$path" ]; then
collisions+=("$path") collisions+=("$path")
@ -651,8 +665,11 @@ perform_installation() {
local type="${comp%%:*}" local type="${comp%%:*}"
local id="${comp##*:}" local id="${comp##*:}"
# Get the correct registry key (handles singular/plural)
local registry_key=$(get_registry_key "$type")
# Get component path # Get component path
local path=$(jq -r ".components.${type}s[] | select(.id == \"${id}\") | .path" "$TEMP_DIR/registry.json") local path=$(jq -r ".components.${registry_key}[] | select(.id == \"${id}\") | .path" "$TEMP_DIR/registry.json")
if [ -z "$path" ] || [ "$path" = "null" ]; then if [ -z "$path" ] || [ "$path" = "null" ]; then
print_warning "Could not find path for ${comp}" print_warning "Could not find path for ${comp}"

View file

@ -483,28 +483,22 @@
"profiles": { "profiles": {
"core": { "core": {
"name": "Core", "name": "Core",
"description": "Essential agents and commands for basic OpenCode usage", "description": "Minimal essentials - main agent with basic subagents and commands",
"components": [ "components": [
"agent:task-manager", "agent:task-manager",
"agent:codebase-agent", "agent:codebase-agent",
"subagent:reviewer",
"subagent:tester", "subagent:tester",
"subagent:documentation", "subagent:documentation",
"subagent:coder-agent", "subagent:coder-agent",
"subagent:build-agent",
"command:test",
"command:commit", "command:commit",
"command:context",
"command:prompt-enhancer",
"context:essential-patterns", "context:essential-patterns",
"context:project-context", "context:project-context",
"config:env-example", "config:env-example"
"config:readme"
] ]
}, },
"developer": { "developer": {
"name": "Developer", "name": "Developer",
"description": "Balanced setup for daily development work with all core features plus useful extensions", "description": "Recommended for daily development - includes testing, review, quality tools, and AI image generation",
"components": [ "components": [
"agent:task-manager", "agent:task-manager",
"agent:codebase-agent", "agent:codebase-agent",
@ -532,7 +526,7 @@
}, },
"full": { "full": {
"name": "Full", "name": "Full",
"description": "Complete installation with all available components including plugins", "description": "Everything included - all agents, tools, and plugins for maximum functionality",
"components": [ "components": [
"agent:task-manager", "agent:task-manager",
"agent:codebase-agent", "agent:codebase-agent",