Commit graph

208 commits

Author SHA1 Message Date
darrenhinde
bd8054f334 fix(ci): use npm install instead of npm ci for better compatibility 2025-11-26 22:08:20 +00:00
darrenhinde
2459591f9f fix(ci): use working-directory for npm commands to ensure correct path 2025-11-26 22:06:36 +00:00
darrenhinde
9c68f9d8be feat: add automatic version bumping to CI/CD workflow
Auto Version Bump:
- Automatically bumps version when PRs are merged to main
- Detects version bump type from commit message:
  - feat: → minor bump (v0.1.0 → v0.2.0)
  - fix: → patch bump (v0.1.0 → v0.1.1)
  - feat!: → major bump (v0.1.0 → v1.0.0)
  - [alpha] → alpha bump (v0.1.0-alpha.1 → v0.1.0-alpha.2)
  - [beta] → beta bump
  - [rc] → rc bump
  - default → minor bump (if no type specified)

Automatic Actions:
- Updates VERSION file
- Updates package.json version
- Updates CHANGELOG.md with commit message
- Creates git tag (e.g., v0.2.0)
- Pushes changes back to main
- Adds [skip ci] to prevent infinite loop

Documentation:
- Added VERSION_BUMP_GUIDE.md with examples
- Clear commit message format guidelines
- Manual override instructions

Benefits:
- No manual version bumping needed
- Consistent versioning across the project
- Automatic changelog updates
- Git tags for every release
- Follows semantic versioning conventions
2025-11-26 22:06:36 +00:00
darrenhinde
f98a23c1d4 chore: cleanup documentation - remove temporary and redundant files
Cleanup Summary:
- Deleted .tmp/ directory (20+ temporary development files)
- Deleted tasks/ directory (old task tracking files)
- Removed 10 redundant/historical markdown files from evals/

Files Deleted:
- evals/DOCUMENTATION_CLEANUP.md (historical)
- evals/SCRIPTS_ORGANIZATION.md (historical)
- evals/agents/AGENT_TESTING_GUIDE.md (redundant)
- evals/agents/openagent/CONTEXT_LOADING_COVERAGE.md (historical)
- evals/agents/openagent/IMPLEMENTATION_SUMMARY.md (historical)
- evals/agents/opencoder/README.md (redundant)
- evals/agents/shared/README.md (redundant)
- evals/framework/scripts/README.md (redundant)
- evals/results/README.md (redundant)
- evals/test_tmp/README.md (redundant)

Result:
- Reduced from 120+ markdown files to 92 (excluding node_modules)
- Reduced evals/ from 20 to 10 markdown files
- Kept essential documentation:
  - evals/README.md (main guide)
  - evals/GETTING_STARTED.md (quick start)
  - evals/HOW_TESTS_WORK.md (technical details)
  - evals/ARCHITECTURE.md (system architecture)
  - evals/framework/README.md (framework docs)
  - evals/framework/SDK_EVAL_README.md (SDK guide)
  - evals/agents/openagent/README.md (test suite)
- Kept dev/ directory (important OpenCode internals documentation)

Benefits:
- Clearer documentation structure
- Less confusion about where to find information
- Removed outdated/historical files
- Easier to navigate and maintain
2025-11-26 22:06:36 +00:00
darrenhinde
d7e1aa7f19 feat: add monorepo structure with versioning and CI/CD
Monorepo Features:
- Root package.json with convenient npm scripts for all agents
- Easy testing from root: npm test, npm run test:openagent, npm run test:opencoder
- Multi-model support: test with Grok, Claude, or GPT-4
- Quick dashboard access: npm run dashboard
- No folder navigation required

Versioning System:
- VERSION file tracking current version (0.1.0-alpha.1)
- CHANGELOG.md with comprehensive version history
- Version bump scripts for alpha, beta, rc, and stable releases
- Semantic versioning with progression: Alpha → Beta → RC → Stable

CI/CD:
- GitHub Actions workflow for automated testing
- Pre-merge validation for agent changes
- Smoke tests for both openagent and opencoder
- Automated test result reporting
- Runs on PRs to main/dev and pushes to main

Helper Scripts:
- scripts/test.sh: Advanced test runner with multi-agent support
- scripts/dashboard.sh: Enhanced dashboard launcher with auto-open
- scripts/bump-version.sh: Version management tool

Documentation:
- QUICK_START.md: Comprehensive testing and usage guide
- Clear examples for all test scenarios
- Multi-agent and multi-model workflows

Benefits:
- Easy testing from root directory
- Automated quality checks before merges
- Clear version tracking and history
- Developer-friendly workflows
- No breaking changes to existing structure
2025-11-26 22:06:36 +00:00
darrenhinde
ea1ef512e6 debug(ci): add file listing to diagnose package-lock.json issue 2025-11-26 22:06:29 +00:00
darrenhinde
c19a3980fb Merge main with CI/CD fix 2025-11-26 22:04:36 +00:00
darrenhinde
9fc6825719 fix(ci): use working-directory for npm commands to ensure correct path 2025-11-26 22:04:34 +00:00
darrenhinde
f8f64a5daa feat(commands): add smart commit command for opencode-agents repository 2025-11-26 22:02:04 +00:00
darrenhinde
47b4bd20c9 feat: add automatic version bumping to CI/CD workflow
Auto Version Bump:
- Automatically bumps version when PRs are merged to main
- Detects version bump type from commit message:
  - feat: → minor bump (v0.1.0 → v0.2.0)
  - fix: → patch bump (v0.1.0 → v0.1.1)
  - feat!: → major bump (v0.1.0 → v1.0.0)
  - [alpha] → alpha bump (v0.1.0-alpha.1 → v0.1.0-alpha.2)
  - [beta] → beta bump
  - [rc] → rc bump
  - default → minor bump (if no type specified)

Automatic Actions:
- Updates VERSION file
- Updates package.json version
- Updates CHANGELOG.md with commit message
- Creates git tag (e.g., v0.2.0)
- Pushes changes back to main
- Adds [skip ci] to prevent infinite loop

Documentation:
- Added VERSION_BUMP_GUIDE.md with examples
- Clear commit message format guidelines
- Manual override instructions

Benefits:
- No manual version bumping needed
- Consistent versioning across the project
- Automatic changelog updates
- Git tags for every release
- Follows semantic versioning conventions
2025-11-26 21:57:45 +00:00
darrenhinde
9675e30ca4 chore: cleanup documentation - remove temporary and redundant files
Cleanup Summary:
- Deleted .tmp/ directory (20+ temporary development files)
- Deleted tasks/ directory (old task tracking files)
- Removed 10 redundant/historical markdown files from evals/

Files Deleted:
- evals/DOCUMENTATION_CLEANUP.md (historical)
- evals/SCRIPTS_ORGANIZATION.md (historical)
- evals/agents/AGENT_TESTING_GUIDE.md (redundant)
- evals/agents/openagent/CONTEXT_LOADING_COVERAGE.md (historical)
- evals/agents/openagent/IMPLEMENTATION_SUMMARY.md (historical)
- evals/agents/opencoder/README.md (redundant)
- evals/agents/shared/README.md (redundant)
- evals/framework/scripts/README.md (redundant)
- evals/results/README.md (redundant)
- evals/test_tmp/README.md (redundant)

Result:
- Reduced from 120+ markdown files to 92 (excluding node_modules)
- Reduced evals/ from 20 to 10 markdown files
- Kept essential documentation:
  - evals/README.md (main guide)
  - evals/GETTING_STARTED.md (quick start)
  - evals/HOW_TESTS_WORK.md (technical details)
  - evals/ARCHITECTURE.md (system architecture)
  - evals/framework/README.md (framework docs)
  - evals/framework/SDK_EVAL_README.md (SDK guide)
  - evals/agents/openagent/README.md (test suite)
- Kept dev/ directory (important OpenCode internals documentation)

Benefits:
- Clearer documentation structure
- Less confusion about where to find information
- Removed outdated/historical files
- Easier to navigate and maintain
2025-11-26 21:54:18 +00:00
darrenhinde
aebd68e046 feat: add monorepo structure with versioning and CI/CD
Monorepo Features:
- Root package.json with convenient npm scripts for all agents
- Easy testing from root: npm test, npm run test:openagent, npm run test:opencoder
- Multi-model support: test with Grok, Claude, or GPT-4
- Quick dashboard access: npm run dashboard
- No folder navigation required

Versioning System:
- VERSION file tracking current version (0.1.0-alpha.1)
- CHANGELOG.md with comprehensive version history
- Version bump scripts for alpha, beta, rc, and stable releases
- Semantic versioning with progression: Alpha → Beta → RC → Stable

CI/CD:
- GitHub Actions workflow for automated testing
- Pre-merge validation for agent changes
- Smoke tests for both openagent and opencoder
- Automated test result reporting
- Runs on PRs to main/dev and pushes to main

Helper Scripts:
- scripts/test.sh: Advanced test runner with multi-agent support
- scripts/dashboard.sh: Enhanced dashboard launcher with auto-open
- scripts/bump-version.sh: Version management tool

Documentation:
- QUICK_START.md: Comprehensive testing and usage guide
- Clear examples for all test scenarios
- Multi-agent and multi-model workflows

Benefits:
- Easy testing from root directory
- Automated quality checks before merges
- Clear version tracking and history
- Developer-friendly workflows
- No breaking changes to existing structure
2025-11-26 21:49:50 +00:00
github-actions[bot]
7d8b1c16a2 chore: auto-update component registry [skip ci] 2025-11-26 21:38:24 +00:00
darrenhinde
fe4717bbeb Merge pull request #21: SDK-based evaluation framework with modular architecture
feat: SDK-based evaluation framework with modular architecture and comprehensive testing

- Complete SDK-based evaluation framework for testing agents
- Modular architecture (test-runner split into 4 focused modules)
- 20+ test cases across multiple categories
- Interactive results dashboard
- Comprehensive documentation (1,600+ lines)
- Organized script structure
- Enhanced agents (openagent + opencoder)

Stats: 155 files changed, 29,312 insertions, 634 deletions
2025-11-26 21:38:05 +00:00
darrenhinde
f773b290ce chore(evals): comprehensive cleanup, documentation, and test infrastructure improvements
Documentation:
- Add ARCHITECTURE.md with comprehensive system review
- Add GETTING_STARTED.md for new users
- Add DOCUMENTATION_CLEANUP.md tracking cleanup changes
- Add SCRIPTS_ORGANIZATION.md documenting script reorganization
- Remove outdated docs (TESTING_CONFIDENCE.md, TEST_REVIEW.md, SESSION_STORAGE_FIX.md)
- Update README files with current information

Script Organization:
- Move 12 scripts from framework root to organized directories:
  - scripts/debug/ (4 files): Session debugging tools
  - scripts/test/ (6 files): Test execution scripts
  - scripts/utils/ (2 files): Utility scripts
- Add comprehensive scripts/README.md with usage examples

Test Infrastructure:
- Add 5 new context loading tests for openagent
- Add result-saver.ts for test result persistence
- Add interactive results dashboard (index.html)
- Add error-handling.test.ts for framework testing
- Add result-saver.test.ts with comprehensive unit tests

Evaluator Improvements:
- Enhance context-loading-evaluator with better detection
- Update run-sdk-tests.ts with improved result handling

Agent Configuration:
- Add .opencode/agent/AGENT.md for agent definition

Test Utilities:
- Add test-agent-manual.mjs for manual testing
- Update test_tmp/README.md with usage guidelines

This commit consolidates multiple improvements:
- Better organization (scripts, docs)
- Improved testing infrastructure
- Comprehensive documentation
- Cleaner codebase structure
2025-11-26 21:34:27 +00:00
darrenhinde
12d087b55f refactor(evals): split test-runner into modular components for better maintainability
- Split test-runner.ts (884 lines) into 4 focused modules:
  - test-runner.ts (411 lines): Thin orchestrator for lifecycle management
  - test-executor.ts (392 lines): Core test execution logic
  - result-validator.ts (253 lines): Result validation logic
  - event-logger.ts (128 lines): Event logging utilities

- Improved Single Responsibility Principle compliance
- Added dependency injection for logger interfaces
- Enhanced testability through modular design
- Maintained full backward compatibility

Benefits:
- Easier to understand and maintain
- Each component can be unit tested independently
- Clear separation of concerns
- No breaking changes to existing consumers
2025-11-26 21:33:38 +00:00
darrenhinde
f872007919 fix(evals): update openagent tests to use multi-turn prompts for write operations
OpenAgent requires text-based approval before executing write/edit tools.
Updated tests to use multi-turn prompts:
1. First prompt: Request the task
2. Second prompt: 'Yes, proceed' to approve

Also added TESTING_CONFIDENCE.md documenting current test reliability:
- Opencoder: HIGH confidence (4/4 tests passing)
- OpenAgent: MEDIUM confidence (multi-turn works, context loading needs verification)
2025-11-26 11:29:18 +00:00
darrenhinde
0d1718e551 fix(evals): use test_tmp directory for test artifacts and add cleanup
- Create evals/test_tmp/ directory for test-created files
- Update all tests to write files to test_tmp/ instead of project root
- Add cleanup logic to test runner (before and after tests)
- Add comprehensive HOW_TESTS_WORK.md documentation
- Remove src/ directory that was accidentally created by tests

This prevents tests from polluting the project directory with test artifacts.
2025-11-26 10:14:29 +00:00
darrenhinde
8eb4b31ef4 feat(evals): add opencoder test suite and fix expected violation handling
- Create separate test folder for opencoder agent with 4 tests
- Update openagent tests to use multi-turn prompts for approval workflow
- Fix test runner to properly handle expectedViolations with shouldViolate: true
- Add mustUseAnyOf behavior expectation for flexible tool matching
- Add unit tests for timeline-builder and context-loading-evaluator
- Update documentation to reflect agent-specific test structure
- Remove outdated AGENT_DETECTION_STATUS.md

Opencoder tests: 4/4 passing
Key insight: openagent uses text-based approval, opencoder uses tool permissions only
2025-11-26 01:52:18 +00:00
darrenhinde
e43eaff317 feat(evals): add BehaviorEvaluator and improve test validation
- Add BehaviorEvaluator for validating agent behavior expectations:
  - mustUseTools/mustNotUseTools validation
  - minToolCalls/maxToolCalls validation
  - requiresApproval/requiresContext/shouldDelegate checks

- Fix test schema to allow behavior alone (without expectedViolations)
- Add 41 unit tests for BehaviorEvaluator, TestCaseSchema, and YAML loading
- Improve test-runner event logging with meaningful tool/message details
- Fix glob import for ESM compatibility
- Add new test cases for bash, context loading, and approval scenarios
2025-11-26 01:10:51 +00:00
darrenhinde
c0a8395878 chore: clean up redundant documentation and old test files
- Delete 5 temporary root-level docs (alignment, migration, summaries)
- Delete 1 redundant agent guide (merged into main guide)
- Delete 4 old openagent files (test scenarios, results, old runner)
- Delete tests/simple/ directory (old synthetic test data)
- Delete 3 old framework test scripts

Result: 62% fewer documentation files (21 → 8)
Kept only essential docs with clear purposes
2025-11-22 15:23:09 +00:00
darrenhinde
cc96acc50e feat: add 5 essential workflow tests and reorganize with agents/ structure
- Add 5 workflow tests (task, context loading, stop-on-failure, conversational)
- Add 1 shared test (agent-agnostic approval gate)
- Reorganize: opencode/ → agents/ for clearer structure
- Rename: sdk-tests/ → tests/ for simplicity
- Update test runner paths to new structure
- Add comprehensive documentation (test plan, guides, migration)
- Update all documentation with new paths

Total: 13 tests (was 6, added 7)
Coverage: +31% workflow compliance
All tests passing: 11/11 (100%)
2025-11-22 15:20:59 +00:00
darrenhinde
478c8e3e85 feat: implement SDK-based evaluation framework with real agent testing
- Replace planned framework with working SDK implementation using @opencode-ai/sdk
- Add 6 YAML test cases across developer/business/edge-case categories (100% passing)
- Implement 4 evaluators for openagent.md rule compliance (approval-gate, context-loading, delegation, tool-usage)
- Add real-time event streaming and session recording
- Configure opencode/grok-code-fast as default model (zero API costs)
- Add comprehensive documentation (SDK_EVAL_README.md, test-design-guide.md, TEST_SCENARIOS.md)
- Support v2 schema with behavior-based expectations instead of message counts
- Enable model-agnostic test design that works across Claude, GPT-4, and Grok
- Add subagent invocation syntax documentation to openagent.md
2025-11-22 14:30:11 +00:00
darrenhinde
c19d8c5480 Merge main into dev: sync subagent invocation improvements and context guide
- Merge improved subagent invocation syntax from main
- Add comprehensive OpenCode context reference cheatsheet
- Resolve conflicts in .gitignore (keep both eval results and tasks)
- Update opencoder.md with correct task() invocation patterns
2025-11-21 23:29:31 +00:00
darrenhinde
6d6495905b docs: improve subagent invocation clarity and add context reference guide
- Add explicit task() invocation syntax to codebase-agent with examples
- Include when-to-use guidance for each subagent (4+ files, simple tasks, etc.)
- Add comprehensive OpenCode context reference cheatsheet covering:
  - File references with @ symbol (immediate vs lazy loading)
  - Agent invocation patterns (task tool vs @ syntax)
  - Shell command execution with backtick syntax
  - Best practices and anti-patterns
  - Complete real-world examples and templates

This improves AI agent reliability in delegating to subagents by providing
clear, explicit invocation patterns following research-backed progressive
disclosure principles.
2025-11-21 16:17:20 +00:00
github-actions[bot]
12933ebf53 chore: auto-update component registry [skip ci] 2025-11-21 15:43:02 +00:00
darrenhinde
37dc204355 chore: add tasks/ directory to gitignore
- Prevents user-generated task files from being tracked
- Tasks directory is used for session-specific task management
2025-11-21 15:42:41 +00:00
darrenhinde
f4b3d56aa2 Add evaluation framework structure and OpenCode logging documentation
- Add comprehensive evaluation framework in evals/
  - Reusable framework for testing OpenCode agents
  - OpenAgent-specific test configuration
  - Scalable structure for multiple agents

- Add OpenCode logging system documentation
  - Complete schema documentation for session storage
  - Model and provider tracking details
  - Performance analysis examples
  - Cost optimization strategies

- Update .gitignore
  - Ignore evals/results/ directory
  - Ignore tasks/ directory (temporary)

Structure:
- evals/framework/ - Reusable evaluation framework
- evals/opencode/openagent/ - OpenAgent tests
- dev/ai-tools/opencode/logging-and-session-storage.md - Logging docs
2025-11-21 14:50:44 +00:00
darrenhinde
13a7d6a56b fix: correct subagent paths and remove @ prefix for model compatibility
- Update all subagent references to use full paths (subagents/core/ and subagents/code/)
- Remove @ prefix to fix compatibility issues with some models
- Replace non-existent 'write-test' agent with 'subagents/code/tester'
- Fixes issue reported in GitHub issue
2025-11-21 14:37:06 +00:00
darrenhinde
c6775bbc40 chore: consolidate development changes and refactor agent system
Major Changes:
- Rename codebase-agent to opencoder for clarity
- Add agent validator plugin with comprehensive testing
- Refactor prompt engineering commands (enhancer → optimizer)
- Update task-manager subagent with improved workflows
- Enhance plugin system with validation and documentation

Agent System:
- Renamed: codebase-agent.md → opencoder.md
- Updated: task-manager.md with better delegation patterns
- Added: opencoder.md documentation

Plugin System:
- New: agent-validator.ts for prompt validation
- New: VALIDATOR_GUIDE.md with usage instructions
- New: Test suite (test-validator.sh, test-validation.sh)
- Updated: notify.ts, telegram-notify.ts with improvements
- Updated: package.json, bun.lock with new dependencies

Commands:
- Renamed: prompt-enchancer.md → prompt-engineering/prompt-enhancer.md
- New: prompt-engineering/prompt-optimizer.md
- Updated: build-context-system.md, validate-repo.md

Documentation:
- Updated: README.md with latest features
- Updated: openagent.md documentation
- New: opencoder.md agent documentation
- Updated: agent-system-blueprint.md
- Updated: system-builder docs (README, quick-start)
- Updated: installation.md, collision-handling.md

Registry:
- Updated: registry.json with new components

This consolidates all development work for the upcoming release.
2025-11-21 13:30:18 +00:00
darrenhinde
d5f4e9461e feat: implement ultra-compact context index system
- Add central context index at .opencode/context/index.md (120 tokens)
- Add compact metadata to all 9 context files (10 tokens each)
- Update OpenAgent prompt to reference index system (73% token reduction)
- Update context-guide.md with index usage documentation

Benefits:
- Single index file for context discovery
- Human-readable and machine-parseable format
- Clear dependency tracking (tests→code, review→code+patterns, etc.)
- Priority levels (critical/high/medium) for all contexts
- Reduced prompt overhead from ~200 to ~53 tokens

Context files updated:
- standards/code.md, docs.md, tests.md, patterns.md, analysis.md
- workflows/delegation.md, review.md, task-breakdown.md, sessions.md

This implements a scalable, maintainable context system with
efficient token usage and clear navigation structure.
2025-11-21 13:29:20 +00:00
darrenhinde
46e8582edb docs: update OpenAgent documentation and add repository validation
- Update OpenAgent docs with universal agent philosophy
- Change delegation criteria from 3+ to 4+ files
- Emphasize critical rules (approval gate, stop on failure, confirm cleanup)
- Create essential-patterns.md context file
- Add 11 context files to registry (standards/*, workflows/*)
- Create /validate-repo command for consistency checking
- Update all profile component counts (developer: 30, full: 36, advanced: 43)
- Ensure CLI compatibility with context file structure
2025-11-19 13:48:15 +00:00
darrenhinde
2bc97007c1 refactor: simplify agent execution philosophy and reorganize context structure
Major Changes:
- Simplified OpenAgent execution philosophy (universal agent, delegate sparingly)
- Reorganized context into 3-tier structure: standards/, workflows/, system/
- Improved approval gate wording for clarity
- Enhanced .gitignore with comprehensive Node.js patterns
- Added comprehensive plugin development guide

Context Reorganization:
- Consolidated scattered files into organized structure with Quick Reference sections
- Emphasis on lazy loading for token efficiency (60-80% token savings)
- New standards: code.md, docs.md, tests.md, patterns.md, analysis.md
- New workflows: delegation.md, sessions.md, task-breakdown.md, review.md
- New system: context-guide.md (master reference)

Delegation Improvements:
- Removed complex XML-style routing rules
- Simplified to clear when/how structure with 7 delegation criteria
- Added Perspective and Simulation as delegation triggers
- Clearer delegation template and process

Documentation Enhancements:
- Added building-plugins.md (1,274 lines - comprehensive plugin guide)
- Updated how-context-works.md with research-backed architecture
- Enhanced slash-commands-and-subagents.md with path resolution findings

Content Preservation:
- context-discovery.md → system/context-guide.md + workflows/sessions.md
- context-management.md → workflows/sessions.md
- essential-patterns.md → standards/patterns.md
- session-management.md → workflows/sessions.md
2025-11-19 13:13:06 +00:00
darrenhinde
bc8a322550 feat: enhance installation system with universal path transformation
Add support for custom global installation paths with automatic context
reference transformation. This enables users to install to any location
while maintaining working context references.

Changes:
- Add universal path transformation for ANY global installation path
  (not just ~/.config/opencode)
- Implement automatic cleanup trap for temp files on exit/crash/interrupt
- Add early validation for --install-dir argument with clear error messages
- Add developer documentation for context reference convention

Technical Details:
- Path transformation detects local vs global by checking if path ends
  in .opencode (local) or not (global)
- Transformation applies to ALL file types during installation
- sed transforms both @ references and shell command paths
- Cleanup trap handles EXIT, INT, and TERM signals

Testing:
- 31 unit and integration tests (100% pass rate)
- All README installation scenarios verified
- Edge cases tested and handled
- Cross-platform compatible (macOS, Linux, Windows Git Bash)

Documentation:
- Added dev/docs/context-reference-convention.md explaining the required
  @.opencode/context/ format and why it's necessary
- Includes examples, validation instructions, and test results

Breaking changes: None
New capabilities: Custom global path support
2025-11-19 11:22:48 +00:00
github-actions[bot]
a4c974cdaf chore: auto-update component registry [skip ci] 2025-11-19 01:24:05 +00:00
darrenhinde
c0ea1c064c docs: add research-backed prompt design and developer guides
- Add research-backed-prompt-design.md with Stanford/Anthropic patterns
- Add openagent.md documentation with workflow and delegation details
- Add developer guides for slash commands and context system
- Document position sensitivity, nesting limits, and instruction ratios
- Include examples and best practices for prompt optimization
2025-11-19 01:23:27 +00:00
darrenhinde
e06833015f feat: enhance openagent and prompt-enchancer with research-backed patterns
OpenAgent improvements:
- Add critical_rules with absolute priority enforcement (approval gates, stop on failure, report first)
- Implement execution_priority system with 3-tier conflict resolution
- Refactor workflow stages with clear approval gates and validation
- Add delegation rules with context file creation guidelines
- Improve session management with lazy initialization

Prompt Enhancer improvements:
- Apply Stanford/Anthropic research patterns (position sensitivity, nesting limits)
- Add instruction ratio optimization (40-50% target)
- Implement single source of truth with @references
- Add explicit prioritization with 3-tier system
- Enhance analysis with research-backed pattern validation
2025-11-19 01:23:18 +00:00
darrenhinde
5518a96f53 feat: add context discovery and session management documentation
- Add context-discovery.md with dynamic context loading and manifest indexing
- Add session-management.md with lazy initialization and cleanup policies
- Implement keyword search and delegation patterns for context files
- Define session isolation and error handling strategies
2025-11-19 01:23:09 +00:00
darrenhinde
9692d3a752 fix: respect --install-dir argument throughout installation process
- Add get_install_path() helper to convert registry paths to installation paths
- Fix collision detection to check files in custom install directory
- Fix file installation to use custom directory instead of hardcoded .opencode
- Fix env.example path check in post-install message
- Tested with .test-install-dir and .openffff directories - all files now install to correct location
2025-11-19 01:22:21 +00:00
darrenhinde
8b75f128d3 docs: update to recommend OpenAgent as default with enhanced workflow diagrams
- Position OpenAgent as recommended default for new users
- Add detailed stage diagrams for all 6 workflow stages
- Replace bright purple colors with softer slate blue for better accessibility
- Update all documentation to show OpenAgent as universal coordinator
- Keep codebase-agent as specialized development alternative
2025-11-18 23:15:44 +00:00
darrenhinde
3249900d63 Update installation documentation with custom directory support and bash 5.x fix
- Rewrite installation.md as comprehensive installation guide
  - Add custom installation directory documentation (--install-dir, OPENCODE_INSTALL_DIR)
  - Document interactive location selection (Local/Global/Custom)
  - Add platform-specific installation examples
  - Include all installation methods and profiles
  - Add troubleshooting and advanced usage sections

- Update platform-compatibility.md with bash 5.x fix details
  - Add Ubuntu 24.04 (bash 5.2.21) to tested configurations
  - Document set -e compatibility fix
  - Add troubleshooting section for bash 5.x issues
  - Update cross-platform features list

Documentation now synced with installer v1.1.0 features
2025-11-18 23:13:00 +00:00
darrenhinde
3c972fb828 Fix critical bash 5.x compatibility and add custom install directory support
- Fix set -e bug: Change ((variable++)) to variable=$((variable + 1)) to prevent script exit on bash 5.2.21 (Ubuntu 24.04)
- Fix collision handling UX: Display menu options correctly by redirecting to stderr
- Add custom installation directory support with --install-dir flag and OPENCODE_INSTALL_DIR env var
- Add interactive location selection menu (Local/Global/Custom)
- Implement cross-platform path handling (Linux/macOS/Windows) with tilde expansion, backslash conversion, and validation
- Enhance help documentation with comprehensive examples and platform support information

Fixes installation failures on modern Linux systems and enables flexible installation to any directory including ~/.config/opencode
2025-11-18 23:08:30 +00:00
darrenhinde
ca323285b2 Rename to OpenAgents, remove model specs, and update documentation
Major Changes:
- Rename repository from opencode-agents to OpenAgents
- Remove all hardcoded model specifications (now model-agnostic)
- Fix documentation: profile names, component counts, add Business profile
- Add future plans note for other AI coding tools

Repository Rename:
- Update all URLs to github.com/darrenhinde/OpenAgents
- Update git remote, README, install scripts, documentation
- 15 files updated with new repository name

Model-Agnostic Framework:
- Remove model specifications from 6 agent files
- Framework now works with any AI provider (Claude, GPT, Gemini, local models)
- Users control model selection via OpenCode CLI settings

Documentation Fixes:
- Correct profile name: Core → Essential
- Add missing Business profile documentation
- Fix component counts: Developer (19), Advanced (32)
- Document all 5 profiles with accurate descriptions

Future Plans:
- Add note about support for other AI tools (Cursor, Claude Code, etc.)
- Clear focus on stabilizing OpenCode integration first

This makes OpenAgents a truly universal, model-agnostic framework
accessible to all users regardless of their AI provider preference.
2025-11-18 22:37:41 +00:00
darrenhinde
5f2cec1404 ✨ feat: introduce OpenAgent universal agent with session management
Major architectural refactoring:

- Add OpenAgent as universal primary agent for questions, tasks, and workflows
- Implement session-based context management with manifest tracking
- Reorganize subagents into logical categories (code/core/utils)
- Add dynamic context discovery and loading system
- Introduce cleanup script for stale sessions
- Update registry with new categorization (essential/standard/extended/specialized/meta)
- Rename 'core' profile to 'essential' and add 'business' profile
- Add comprehensive documentation with visual diagrams
- Update installation script with new profiles

Breaking changes:
- Subagent paths changed from analysis/core to code/core/utils
- Profile 'core' renamed to 'essential' (backward compatible)

New features:
- Session isolation for concurrent agent instances (.tmp/sessions/)
- Automatic stale session cleanup (>24 hours)
- Manifest-based context indexing and discovery
- Business profile for content-focused workflows
- OpenAgent with plan-approve-execute-validate-summarize workflow

Components: 32 total (3 agents, 13 subagents, 8 commands, 2 tools, 2 plugins, 2 contexts, 2 config)

Documentation:
- docs/agents/openagent.md - Comprehensive guide with Mermaid diagrams
- docs/guides/building-with-opencode.md - Power user formula
- scripts/README.md - Script documentation
- .opencode/context/core/context-management.md - Session management strategy
2025-11-18 18:45:42 +00:00
darrenhinde
dfea8199a9 fix: don't clear screen in non-interactive mode
Problem:
- When running 'curl ... | bash -s core' the screen would clear
- This made it appear like nothing was happening after preview
- Users couldn't see the installation progress

Solution:
- Only call 'clear' in interactive mode
- Skip clear when NON_INTERACTIVE=true
- Allows users to see full output when piped from curl

Now users can see:
- Dependency checks
- Registry fetch
- Installation preview
- 'Installing automatically' message
- Full installation progress
- Completion message

This makes the installation process transparent and debuggable.
2025-11-18 14:26:59 +00:00
darrenhinde
532e17ce01 fix: auto-install when profile specified via command line
Problem:
- Running 'curl ... | bash -s core' showed preview and waited for input
- User had to press Y to proceed even though profile was specified
- Defeats the purpose of one-command installation

Solution:
- Add NON_INTERACTIVE flag to track command-line profile usage
- Set NON_INTERACTIVE=true when profile argument provided
- Skip confirmation prompt when NON_INTERACTIVE=true
- Show 'Installing automatically (profile specified)...' message

Behavior:
Before:
  curl ... | bash -s core
  → Shows preview, waits for Y/n input

After:
  curl ... | bash -s core
  → Shows preview, installs automatically

Interactive mode still works:
  bash install.sh
  → Shows menu, asks for confirmation (as expected)

This makes profile-based installation truly one-command with no interaction needed.
2025-11-18 14:24:27 +00:00
darrenhinde
a9f119e83e 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.
2025-11-18 14:18:59 +00:00
darrenhinde
515a83dce2 fix: detect piped execution and provide clear guidance
Problem:
- Running 'curl ... | bash' without arguments showed interactive menu
- But stdin was the curl stream, not terminal
- Script couldn't read user input and would exit silently
- Confusing user experience

Solution:
- Add check_interactive_mode() to detect if stdin is a terminal
- If running in pipe without arguments, show helpful error message
- Provide clear instructions for both interactive and profile-based install
- Update README to clarify installation methods

Changes:
- Add [ ! -t 0 ] check to detect non-terminal stdin
- Show helpful error with examples when piped without profile
- Update README to recommend profile-based install (fastest)
- Clarify that interactive mode requires downloading first

User Experience:
Before: Silent exit or confusing behavior
After: Clear error message with exact commands to run

Examples shown to user:
- Download first: curl ... -o install.sh && bash install.sh
- Or use profile: curl ... | bash -s core

This fixes the issue reported when running on another computer.
2025-11-18 14:04:15 +00:00
github-actions[bot]
aef73202a6 chore: auto-update component registry [skip ci] 2025-11-18 14:00:59 +00:00
darrenhinde
e524ba6ded feat: add system builder and reorganize project structure
New Features:
- Add system-builder agent for generating custom AI systems
- Add 5 new subagents for system building:
  - domain-analyzer: Analyzes domains and recommends architectures
  - agent-generator: Generates XML-optimized agent files
  - context-organizer: Organizes modular context files
  - workflow-designer: Designs workflow definitions
  - command-creator: Creates custom slash commands
- Add build-context-system command for interactive system generation
- Add system builder templates and guide

Project Reorganization:
- Move GITHUB_SETTINGS.md to docs/github/
- Move AGENT-SYSTEM-BLUEPRINT.md to docs/features/
- Move CODE_OF_CONDUCT.md to docs/contributing/
- Move CONTRIBUTING.md to docs/contributing/
- Consolidate documentation in docs/ directory

Registry Updates:
- Add system-builder agent to registry
- Add 5 new subagents to registry
- Add build-context-system command to registry
- Update advanced profile to include system builder components

This enables users to generate complete custom AI systems tailored to their domain through an interactive interview process.
2025-11-18 14:00:35 +00:00