OpenWriterControle/.opencode/context/openagents-repo/guides/profile-validation.md
Darren Hinde d7a4cb8031
feat: Context path configuration and documentation reorganization (#143)
* feat: add npm package support for @openagents/control

- Convert package to publishable npm package with scoped name @openagents/control
- Add CLI entry point bin/oac.js for global installation
- Create .npmignore to exclude dev files and node_modules
- Configure package.json with proper files, bin, and metadata
- Add comprehensive NPM_PUBLISHING_GUIDE.md with publishing instructions
- Package size: 610KB (2.4MB unpacked) with 353 files
- Includes .opencode/tool/ directory without node_modules
- CLI command: oac (e.g., 'oac developer' or 'oac --help')

Users can install with: npm install -g @openagents/control

* chore: remove telegram bot files from package

- Delete .opencode/_lib/telegram-bot.ts (unused)
- Delete .opencode/plugin/telegram-notify.ts (depends on deleted file)
- Remove _lib directory reference from package.json files field
- Reduces package size from 610KB to 607KB
- Total files: 351 (down from 353)

* chore: remove all telegram references from registry and docs

- Remove telegram-bot and telegram-notify plugin entries from registry.json
- Remove telegram plugin references from all profiles (developer, business, full, advanced)
- Update profile-validation.md to remove telegram from business profile documentation
- Clean package with no telegram dependencies

* docs: enhance README clarity and add configuration examples

- Add Core Philosophy section with 4 key principles
- Add Quick Concepts for First-Time Users (scannable format)
- Add prominent Oh My OpenCode comparison link
- Add comprehensive Model Configuration section
- Add Customizing Agents section with practical examples
- Streamline model selection recommendations
- Add emoji headers for visual consistency
- Remove redundant FAQ entry

Addresses user feedback about documentation clarity and first-time user experience.

* refactor: remove OpenImplementer agent

- Delete OpenImplementer agent file (redundant with OpenAgent)
- Remove from registry.json and all profiles
- Update OpenCoder delegation rules (now handles 1-4 files directly)
- Clean up all context file references
- Remove from commands and documentation

Rationale: OpenImplementer only added 1 file to OpenAgent's capability (3→4 files), creating unnecessary complexity. OpenAgent and OpenCoder provide clearer separation: OpenAgent for general + focused tasks (1-4 files), OpenCoder for complex architecture (4+ files).

* fix: remove stale OpenImplementer reference from OpenCoder

- Remove OpenImplementer from Available Subagents list
- Clarify CoderAgent is used via TaskManager for complex tasks
- Keep delegation rules as-is (execute 1-4 files directly, delegate complex to CoderAgent)

* docs: remove remaining OpenImplementer references

- Update developer profile description (OpenAgent vs OpenCoder)
- Update registry.json profile description
- Update docs/README.md to remove OpenImplementer
- Update CHANGELOG.md to reflect simplified architecture

All OpenImplementer references now removed. Registry validation passes.

* docs: enhance README with first-time user improvements

- Add 'your secret weapon!' to Context System in Quick Concepts
- Add First-Time User Checklist after Get Started section
- Add visual comparison table for AOC vs Oh My OpenCode in FAQ
- Improve scannability and clarity for new users

Based on DocWriter review recommendations.

* docs: clarify project-context.md is created during installation

Minor enhancement to First-Time User Checklist step 2 for extra clarity.

* docs: change 'I' to 'we' for collaborative tone

- Update 'Why I Built This' to 'Why We Built This'
- Change 'I've spent' to 'We've spent'
- Change 'I use this' to 'We use this'
- Makes the project feel more collaborative and team-oriented

* docs: make intro more neutral and objective

- Change 'Why We Built This' to 'Why This Exists'
- Remove personal perspective ('We've spent 14+ years')
- Change 'We use this' to 'It's built for shipping'
- More professional and objective tone

* docs: major README rewrite based on user feedback

Key improvements based on real user confusion:

1. **Clear 'What Is AOC?' section** - Explains scaffold vs plugin approach upfront
2. **Model configuration prominently featured** - Addresses #1 user question
3. **Hook with quantified paradox** - Grabs attention in 15 seconds
4. **Context System promoted** - Moved to top, explains the differentiator
5. **Comparison table** - AOC vs Oh My OpenCode side-by-side
6. **Eliminated 60% redundancy** - Merged overlapping sections
7. **Simplified deep dives** - Model config and customization tightened

Based on user feedback: 'I just expected that behaviour because it was not
documented properly... the only thing really lacking was a clear explanation
of its purpose and how to configure models and adjust agents.'

Addresses: Confusion about scaffold vs plugin, model configuration, and
first-time user expectations.

* chore: publish package as @nextsystems/oac v0.7.0

- Changed package name from @openagents/control to @nextsystems/oac
- Successfully published to npm registry
- Users can install with: npm install -g @nextsystems/oac
- CLI command: oac

* feat: add context path configuration and reorganize documentation

- Add configurable context root via paths.json (@reference support)
- Add /add-context command for interactive context setup
- Move NPM_PUBLISHING_GUIDE.md to context system (guides/npm-publishing.md)
- Add GitHub issues workflow guide
- Update agents to support custom context directories
- Update navigation with new guides and file counts

This enables projects to use custom context directories (e.g., .context, .ai/context)
while maintaining backward compatibility with default .opencode/context/ structure.
2026-01-30 17:18:05 +00:00

9.6 KiB

Guide: Profile Validation

Purpose: Ensure installation profiles include all appropriate components
Priority: HIGH - Check this when adding new agents or updating registry


What Are Profiles?

Profiles are pre-configured component bundles in registry.json that users install:

  • essential - Minimal setup (openagent + core subagents)
  • developer - Full dev environment (all dev agents + tools)
  • business - Content/product focus (content agents + tools)
  • full - Everything (all agents, subagents, tools)
  • advanced - Full + meta-level (system-builder, repo-manager)

The Problem

Issue: New agents added to components.agents[] but NOT added to profiles

Result: Users install a profile but don't get the new agents

Example (v0.5.0 bug):

// ✅ Agent exists in components
{
  "id": "devops-specialist",
  "path": ".opencode/agent/development/devops-specialist.md"
}

// ❌ But NOT in developer profile
"developer": {
  "components": [
    "agent:openagent",
    "agent:opencoder"
    // Missing: "agent:devops-specialist"
  ]
}

Validation Checklist

When adding a new agent, ALWAYS check:

1. Agent Added to Components

# Check agent exists in registry
cat registry.json | jq '.components.agents[] | select(.id == "your-agent")'

2. Agent Added to Appropriate Profiles

Development agents → Add to:

  • ✅ developer profile
  • ✅ full profile
  • ✅ advanced profile

Content agents → Add to:

  • ✅ business profile
  • ✅ full profile
  • ✅ advanced profile

Data agents → Add to:

  • ✅ business profile (if business-focused)
  • ✅ full profile
  • ✅ advanced profile

Meta agents → Add to:

  • ✅ advanced profile only

Core agents → Add to:

  • ✅ essential profile
  • ✅ All other profiles

3. Verify Profile Includes Agent

# Check if agent is in developer profile
cat registry.json | jq '.profiles.developer.components[] | select(. == "agent:your-agent")'

# Check if agent is in business profile
cat registry.json | jq '.profiles.business.components[] | select(. == "agent:your-agent")'

# Check if agent is in full profile
cat registry.json | jq '.profiles.full.components[] | select(. == "agent:your-agent")'

Profile Assignment Rules

Developer Profile

Include:

  • Core agents (openagent, opencoder)
  • Development specialist subagents (frontend, devops)
  • All code subagents (tester, reviewer, coder-agent, build-agent)
  • Dev commands (commit, test, validate-repo, analyze-patterns)
  • Dev context (standards/code, standards/tests, workflows/*)
  • Utility subagents (image-specialist for website images)
  • Tools (env, gemini for image generation)

Exclude:

  • Content agents (copywriter, technical-writer)
  • Data agents (data-analyst)
  • Meta agents (system-builder, repo-manager)

Business Profile

Include:

  • Core agent (openagent)
  • Content specialists (copywriter, technical-writer)
  • Data specialists (data-analyst)
  • Image tools (gemini, image-specialist)
  • Notification tools (notify)

Exclude:

  • Development specialists
  • Code subagents
  • Meta agents

Full Profile

Include:

  • Everything from developer profile
  • Everything from business profile
  • All agents except meta agents

Exclude:

  • Meta agents (system-builder, repo-manager)

Advanced Profile

Include:

  • Everything from full profile
  • Meta agents (system-builder, repo-manager)
  • Meta subagents (domain-analyzer, agent-generator, etc.)
  • Meta commands (build-context-system)

Automated Validation

Script to Check Profile Coverage

#!/bin/bash
# Check if all agents are in appropriate profiles

echo "Checking profile coverage..."

# Get all agent IDs
agents=$(cat registry.json | jq -r '.components.agents[].id')

for agent in $agents; do
  # Get agent category
  category=$(cat registry.json | jq -r ".components.agents[] | select(.id == \"$agent\") | .category")
  
  # Check which profiles include this agent
  in_developer=$(cat registry.json | jq ".profiles.developer.components[] | select(. == \"agent:$agent\")" 2>/dev/null)
  in_business=$(cat registry.json | jq ".profiles.business.components[] | select(. == \"agent:$agent\")" 2>/dev/null)
  in_full=$(cat registry.json | jq ".profiles.full.components[] | select(. == \"agent:$agent\")" 2>/dev/null)
  in_advanced=$(cat registry.json | jq ".profiles.advanced.components[] | select(. == \"agent:$agent\")" 2>/dev/null)
  
  # Validate based on category
  case $category in
    "development")
      if [[ -z "$in_developer" ]]; then
        echo "❌ $agent (development) missing from developer profile"
      fi
      if [[ -z "$in_full" ]]; then
        echo "❌ $agent (development) missing from full profile"
      fi
      if [[ -z "$in_advanced" ]]; then
        echo "❌ $agent (development) missing from advanced profile"
      fi
      ;;
    "content"|"data")
      if [[ -z "$in_business" ]]; then
        echo "❌ $agent ($category) missing from business profile"
      fi
      if [[ -z "$in_full" ]]; then
        echo "❌ $agent ($category) missing from full profile"
      fi
      if [[ -z "$in_advanced" ]]; then
        echo "❌ $agent ($category) missing from advanced profile"
      fi
      ;;
    "meta")
      if [[ -z "$in_advanced" ]]; then
        echo "❌ $agent (meta) missing from advanced profile"
      fi
      ;;
    "essential"|"standard")
      if [[ -z "$in_full" ]]; then
        echo "❌ $agent ($category) missing from full profile"
      fi
      if [[ -z "$in_advanced" ]]; then
        echo "❌ $agent ($category) missing from advanced profile"
      fi
      ;;
  esac
done

echo "✅ Profile coverage check complete"

Save this as: scripts/registry/validate-profile-coverage.sh


Manual Validation Steps

After Adding a New Agent

  1. Add agent to components:

    ./scripts/registry/auto-detect-components.sh --auto-add
    
  2. Manually add to profiles: Edit registry.json and add "agent:your-agent" to appropriate profiles

  3. Validate registry:

    ./scripts/registry/validate-registry.sh
    
  4. Test local install:

    # Test developer profile
    REGISTRY_URL="file://$(pwd)/registry.json" ./install.sh --list
    
    # Verify agent appears in profile
    REGISTRY_URL="file://$(pwd)/registry.json" ./install.sh --list | grep "your-agent"
    
  5. Test actual install:

    # Install to temp directory
    mkdir -p /tmp/test-install
    cd /tmp/test-install
    REGISTRY_URL="file://$(pwd)/registry.json" bash <(curl -s https://raw.githubusercontent.com/darrenhinde/OpenAgentsControl/main/install.sh) developer
    
    # Check if agent was installed
    ls .opencode/agent/category/your-agent.md
    

Common Mistakes

❌ Mistake 1: Only Adding to Components

// Added to components
"components": {
  "agents": [
    {"id": "new-agent", ...}
  ]
}

// But forgot to add to profiles
"profiles": {
  "developer": {
    "components": [
      // Missing: "agent:new-agent"
    ]
  }
}

❌ Mistake 2: Wrong Profile Assignment

// Development agent added to business profile
"business": {
  "components": [
    "agent:devops-specialist"  // ❌ Should be in developer
  ]
}

❌ Mistake 3: Inconsistent Profile Coverage

// Added to full but not advanced
"full": {
  "components": ["agent:new-agent"]
},
"advanced": {
  "components": [
    // ❌ Missing: "agent:new-agent"
  ]
}

Best Practices

✅ Use auto-detect - Adds to components automatically
✅ Check all profiles - Verify agent in correct profiles
✅ Test locally - Install and verify before pushing
✅ Validate - Run validation script after changes
✅ Document - Update CHANGELOG with profile changes


CI/CD Integration

Add profile validation to CI:

# .github/workflows/validate-registry.yml
- name: Validate Registry
  run: ./scripts/registry/validate-registry.sh

- name: Validate Profile Coverage
  run: ./scripts/registry/validate-profile-coverage.sh

Quick Reference

Agent Category Essential Developer Business Full Advanced
core ✅ ✅ ✅ ✅ ✅
development* ❌ ✅ ❌ ✅ ✅
content ❌ ❌ ✅ ✅ ✅
data ❌ ❌ ✅ ✅ ✅
meta ❌ ❌ ❌ ❌ ✅

*Note: Development category includes agents (opencoder) and specialist subagents (frontend, devops)


Development Profile Changes (v2.0.0)

What Changed:

  • frontend-specialist: Agent → Subagent (specialized executor)
  • devops-specialist: Agent → Subagent (specialized executor)
  • backend-specialist: Removed (functionality covered by opencoder)
  • codebase-pattern-analyst: Removed (replaced by analyze-patterns command)
  • analyze-patterns: New command for pattern analysis

Why:

  • Streamlined main agents to 2 (openagent, opencoder)
  • Specialist subagents provide focused expertise when needed
  • Reduced cognitive load for new users
  • Clearer separation between main agents and specialized tools

Impact:

  • Developer profile now has 2 main agents + 8 subagents
  • Smaller, more focused profile
  • Same capabilities, better organization
  • No breaking changes for existing workflows

  • Registry concepts: core-concepts/registry.md
  • Updating registry: guides/updating-registry.md
  • Adding agents: guides/adding-agent.md

Last Updated: 2025-01-28
Version: 0.5.2