Browse Source

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.
darrenhinde 4 months ago
parent
commit
a9f119e83e
5 changed files with 44 additions and 35 deletions
  1. 1 3
      .opencode/agent/codebase-agent.md
  2. 0 1
      .opencode/agent/image-specialist.md
  3. 19 18
      README.md
  4. 20 3
      install.sh
  5. 4 10
      registry.json

+ 1 - 3
.opencode/agent/codebase-agent.md

@@ -1,7 +1,6 @@
 ---
 description: "Multi-language implementation agent for modular and functional development"
 mode: primary
-model: claude-4-sonnet
 temperature: 0.1
 tools:
   read: true
@@ -35,9 +34,9 @@ Always start with phrase "DIGGING IN..."
 
 You have access to the following subagents: 
 - `@task-manager`
-- `@image-specialist`
 - `@subagents/tester` @tester
 - `@subagents/documentation` @documentation
+- `@subagents/coder-agent` @coder-agent
 
 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.
@@ -82,7 +81,6 @@ Do NOT proceed without explicit approval
 Phase 2: Implementation (After Approval Only)
 
 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:
 - 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)

+ 0 - 1
.opencode/agent/image-specialist.md

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

+ 19 - 18
README.md

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

+ 20 - 3
install.sh

@@ -179,13 +179,26 @@ get_component_info() {
     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() {
     local component=$1
     local type="${component%%:*}"
     local id="${component##*:}"
     
+    # Get the correct registry key (handles singular/plural)
+    local registry_key=$(get_registry_key "$type")
+    
     # 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
         for dep in $deps; do
@@ -592,7 +605,8 @@ perform_installation() {
     for comp in "${SELECTED_COMPONENTS[@]}"; do
         local type="${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
             collisions+=("$path")
@@ -651,8 +665,11 @@ perform_installation() {
         local type="${comp%%:*}"
         local id="${comp##*:}"
         
+        # Get the correct registry key (handles singular/plural)
+        local registry_key=$(get_registry_key "$type")
+        
         # 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
             print_warning "Could not find path for ${comp}"

+ 4 - 10
registry.json

@@ -483,28 +483,22 @@
   "profiles": {
     "core": {
       "name": "Core",
-      "description": "Essential agents and commands for basic OpenCode usage",
+      "description": "Minimal essentials - main agent with basic subagents and commands",
       "components": [
         "agent:task-manager",
         "agent:codebase-agent",
-        "subagent:reviewer",
         "subagent:tester",
         "subagent:documentation",
         "subagent:coder-agent",
-        "subagent:build-agent",
-        "command:test",
         "command:commit",
-        "command:context",
-        "command:prompt-enhancer",
         "context:essential-patterns",
         "context:project-context",
-        "config:env-example",
-        "config:readme"
+        "config:env-example"
       ]
     },
     "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": [
         "agent:task-manager",
         "agent:codebase-agent",
@@ -532,7 +526,7 @@
     },
     "full": {
       "name": "Full",
-      "description": "Complete installation with all available components including plugins",
+      "description": "Everything included - all agents, tools, and plugins for maximum functionality",
       "components": [
         "agent:task-manager",
         "agent:codebase-agent",