Commit graph

10 commits

Author SHA1 Message Date
Darren Hinde
5a40b6fdc4
feat(context): Standardize context system with navigation, frontmatter, and MVI compliance (#209)
* feat: add OAC package refactor context file

- Add comprehensive feature context for OAC package refactor
- Document multi-IDE support architecture
- Define community component registry (shadcn-like)
- Outline flexible configuration system
- Detail context file location flexibility
- Define 7-phase implementation plan
- Include CLI commands reference
- Add community publishing guidelines

* docs: add OAC refactor quick start guide

- Add quick reference for Phase 1 implementation
- Include project structure and file locations
- Document configuration schema and defaults
- Add testing strategy and validation steps
- Include development workflow
- Reference all related resources

* feat: add critical user approval and context resolution systems

CRITICAL FEATURES ADDED:

1. User Approval & YOLO Mode
   - Default: Interactive approval for all file operations
   - Always asks: local vs global install
   - Confirms before overwriting files
   - Shows diffs and file details
   - YOLO mode (--yolo): Skip confirmations, auto-resolve, report at end
   - Conflict strategies: ask, skip, overwrite, backup, yolo
   - Safety: backups, git detection, rollback support, audit log

2. Context Resolution System
   - Layered context resolution (6 priority levels)
   - Project override (.oac/context/) - highest priority
   - Project context (.opencode/context/)
   - IDE context (.cursor/, .claude/)
   - Project docs (docs/)
   - User global (~/.config/oac/context/)
   - OAC official (~/.config/oac/official/) - lowest priority
   - Smart resolution based on agent location (global vs local)
   - preferLocal config option
   - Context merging strategies
   - CLI commands for context management
   - Environment variable overrides
   - Validation and fallback support

3. Enhanced CLI Commands
   - All commands support --yolo, --dry-run, --local, --global
   - Context management: resolve, list, validate, override, sync
   - Detailed help and examples
   - Global flags for all commands

This ensures users maintain full control over their projects while
supporting both local and global workflows with intelligent context
resolution.

* feat: add component creation wizard and IDE feature parity system

NEW FEATURES:

1. Interactive Component Creation
   - oac create (interactive wizard)
   - Create agents, skills, contexts, plugins, commands, tools
   - Template system for scaffolding
   - Auto-generate tests and boilerplate
   - Multi-IDE compatibility selection
   - Size optimization options

2. IDE Feature Parity & Capacity Management (CRITICAL)
   - Feature support matrix for all IDEs
   - OpenCode/Claude Code: Full support (all features)
   - Cursor: Limited (single file, no skills/plugins, 100KB limit)
   - Windsurf: Partial support
   - Adaptive installation based on IDE capabilities
   - Automatic feature filtering and warnings
   - Component merging for single-file IDEs (Cursor)
   - Capacity warnings and optimization
   - IDE-specific profiles

3. Enhanced CLI Commands
   - oac create [type] - Component creation wizard
   - oac templates - List available templates
   - oac compatibility <ide> - Check IDE compatibility
   - oac ides - List supported IDEs with features
   - oac ide info <ide> - Show IDE capabilities
   - oac optimize --for <ide> - Optimize for specific IDE
   - oac validate --ide <ide> - Validate IDE installation

4. Smart Installation
   - Detects IDE capabilities
   - Warns about unsupported features
   - Auto-filters components
   - Merges agents for Cursor
   - Embeds contexts for limited IDEs
   - Monitors file size limits
   - Suggests IDE-specific profiles

This ensures users can easily create components and OAC gracefully
handles different IDE capabilities with clear warnings and automatic
optimization.

* docs: add critical feedback from parallel agent review

CRITICAL FINDINGS:

Security Gaps (BLOCKER):
- No component signing or verification
- No malware/secret scanning
- No permission system
- Action: Add security layer in Phase 1

Missing Features (CRITICAL):
- Discovery (browse, search, trending)
- Lockfile for reproducibility
- Version conflict management
- Interactive onboarding
- Progress indicators
- Auto-detection for local/global

Approaches to Rethink:
- Context merging → Use composition instead
- Always asking local/global → Auto-detect with smart defaults
- Cursor agent merging → Router pattern instead

Repository Structure:
- Recommended: Monorepo with pnpm workspaces
- Packages: core, adapters, registry, security, cli
- Benefits: Shared deps, atomic commits, easier testing

Community Workflow:
- Component submission process
- Automated security scanning
- Manual review for verification
- Moderation system

Updated Priorities:
- v1.0 MVP: Add 6 critical features (discovery, lockfile, security, etc.)
- v1.1: Plugin system, workspace support, marketplace
- v2.0: Enterprise features

Documentation Needs:
- Quick Start (5-minute guide)
- CLI Reference (auto-generated)
- Recipes/Cookbook
- Component Creation Guide
- Migration Guide

Overall: Plan is 80% solid, needs 20% critical additions before Phase 1

* feat: add comprehensive agent customization and preset system

CRITICAL FEATURE: Agent Customization & Personal Presets

Problem:
- Users want to customize agent prompts for their workflow
- Users want to save personal configurations
- Updates shouldn't overwrite customizations
- Need easy way to view and edit agents

Solution: Multi-Layer Customization System

Layer 1: View Agent Configuration
- oac show agent:openagent (view in pager)
- oac edit agent:openagent (open in editor)
- oac config show agent:openagent (config only)
- oac export agent:openagent (export to file)

Layer 2: Create Personal Preset
- oac customize agent:openagent (create preset)
- Copies to ~/.config/oac/presets/agents/
- Links to base agent for updates
- Tracks customizations in metadata

Layer 3: Edit Personal Preset
- oac edit preset:my-openagent (edit in $EDITOR)
- oac customize preset:my-openagent --interactive (wizard)
- Auto-backup on save
- Track modification history

Layer 4: Use Personal Preset
- oac use preset:my-openagent (activate)
- oac use preset:my-openagent --global (set default)
- oac presets list --active (show active)
- Switch between presets and base agents

Layer 5: Update Management (CRITICAL)
- Smart update detection for base agents
- Merge strategies: manual, auto-base, auto-merge, locked
- Conflict resolution with user prompts
- Show diffs before merging
- Auto-backup before updates
- Preserve user customizations by default

Layer 6: Preset Sharing
- oac export preset:my-openagent (export)
- oac import preset ./preset.md (import)
- oac share preset:my-openagent (share with team)
- oac publish preset:my-openagent (publish to community)

Layer 7: In-Place Editing (Advanced)
- oac edit agent:openagent --in-place (risky, warns user)
- Creates backup before editing
- Warns that updates will overwrite
- Recommends preset creation instead

Update Strategies:
- manual: User reviews every update
- auto-base: Auto-update base, keep preset unchanged
- auto-merge: Auto-merge, prompt on conflicts
- locked: Never update base

Configuration:
- Preset metadata (.presets.json)
- Update strategies per preset
- Merge conflict resolution
- Backup management
- Warning preferences

Edge Cases Handled:
- In-place edits before updates
- Multiple updates behind
- Multiple presets for same base
- Preset conflicts with IDE
- Deleted base agent

Best Practices:
- Always create presets (safest)
- Document customizations
- Review updates before merging
- Keep backups
- Use descriptive names

This ensures users can safely customize agents without fear of
losing changes on updates, while still benefiting from base agent
improvements.

* docs: complete comprehensive user scenario analysis (16,014 lines)

PLANNING PHASE COMPLETE:

Documents Created (9 files, 400KB):
- 00-INDEX.md (388 lines) - Planning index and overview
- 01-main-plan.md (2,338 lines) - Complete feature specification
- 02-quickstart-guide.md (450 lines) - Phase 1 quick reference
- 03-critical-feedback.md (599 lines) - Parallel agent review
- 04-solo-developer-scenarios.md (2,106 lines) - Individual workflows
- 05-team-lead-scenarios.md (3,977 lines) - Team collaboration
- 07-content-creator-scenarios.md (2,581 lines) - Non-technical users
- 08-open-source-maintainer-scenarios.md (3,575 lines) - Community management
- 09-SYNTHESIS.md (1,000+ lines) - Consolidated findings

User Personas Analyzed (4/5):
✅ Solo Developer (Primary - 40% market)
✅ Team Lead (Secondary - 30% market)
✅ Content Creator (Emerging - 20% market)
✅ Open Source Maintainer (Future - 5% market)
⏸️ Enterprise Admin (Deferred to v2.0 - 5% market)

Key Findings:

Solo Developer (Primary User):
- Setup must be < 2 minutes or they skip
- Preview before committing (try mode)
- Safe customization (presets)
- Easy rollback/undo
- Zero docs reading to start

Team Lead (Secondary User):
- Lockfile is non-negotiable (oac.lock)
- Team configuration (oac-team.json)
- Compliance monitoring (90%+ required)
- Onboarding: 4-8 hours → 15 minutes (96% reduction)
- Staged rollouts for updates

Content Creator (Emerging - 20% market):
- CLI is intimidating (need GUI wrapper)
- Plain language mode (no jargon)
- Visual undo (version history)
- Templates and examples
- Guided setup

Open Source Maintainer (Future):
- Security scanning pipeline (ClamAV + gitleaks)
- Quality gates (70% test coverage)
- Review/approval workflow
- Deprecation workflow
- Sustainability model

Critical Additions to MVP:
1. Interactive onboarding wizard (all personas)
2. TUI browser with preview (solo dev, team lead)
3. Lockfile (oac.lock) (team lead)
4. Security scanning (all personas)
5. Try mode (solo dev)
6. Team configuration (team lead)
7. oac doctor health checks (solo dev)
8. Quality gates (maintainer)

Market Opportunity:
- v1.0: 70% market (solo + team)
- v1.1: 90% market (+ content creators with GUI)
- v2.0: 100% market (+ enterprise)

Recommended Changes:
- Expand MVP scope (+2 weeks, 9 weeks total)
- Plan v1.1 for content creators (GUI wrapper)
- Defer enterprise features to v2.0
- Build community features early (trust)

Status: Ready to finalize plan and start implementation
Confidence: Very High (95%+)
Risk: Low (comprehensive analysis complete)

* docs: add comprehensive final review of OAC planning

FINAL REVIEW COMPLETE:

Overall Assessment: CONDITIONAL GO ✅⚠️
Confidence Level: 85% (High, with conditions)
Success Probability: 75% (with modifications)

Key Strengths:
✅ Exceptional user research (16,000+ lines, 4 personas)
✅ Clear technical architecture (monorepo, TypeScript, Zod)
✅ Security-first mindset (signing, scanning, verification)
✅ Realistic scope management (v1.0 vs v1.1 vs v2.0)
✅ Comprehensive feature coverage

Critical Gaps Identified:
❌ Discovery/Onboarding not in Phase 1 (but P0 in scenarios)
❌ Lockfile not in Phase 2 (but critical for teams)
❌ Security Pipeline not detailed in phases
❌ Progress UI not in Phase 1 (but needed for UX)
❌ Auto-detection not in Phase 1 (but reduces friction)

Conditions for Go:
1. Add discovery/onboarding to Phase 1 (+3 days)
2. Add lockfile to Phase 2 (+2 days)
3. Add security pipeline to Phase 1 (+2 days)
4. Add progress UI to Phase 1 (+1 day)
5. Revise timeline: 7 weeks → 9 weeks

Critical Action Items (6 days before Phase 1):
1. Add missing features to phases (2 days)
2. Define acceptance criteria (1 day)
3. Define testing strategy (1 day)
4. Design security pipeline (1 day)
5. Create monorepo structure (1 day)

Top Risks:
🔴 Timeline Slip (70% probability, high impact)
🟡 Scope Creep (50% probability, high impact)
🟡 Context Merging Complexity (60% probability, medium impact)

Recommendation: PROCEED WITH MODIFICATIONS
- Complete 6 days of prerequisite work
- Extend timeline to 9 weeks
- Add missing features to phases
- Define acceptance criteria and testing strategy

Status: READY TO IMPLEMENT (with modifications)
Next Steps: Complete prerequisites → Setup monorepo → Start Phase 1

* feat(context): Standardize context system with navigation, frontmatter, and MVI compliance

- Add 77 navigation.md files across all context categories for token-efficient discovery
- Standardize frontmatter format on 198+ context files (HTML comment format, 2026-02-15)
- Compress 3 oversized guide files applying MVI principle (802 lines removed, 63% reduction)
- Add context system analysis and planning artifacts in context-findings/
- Add task management enhancements (stage orchestration, planning subagents)
- Document compression techniques and future optimization recommendations

Context System Improvements:
- All active directories now have navigation.md (200-300 tokens each)
- 100% frontmatter compliance with priority/version/date metadata
- Improved scannability through MVI compression (compact.md, organizing-context.md, creation.md)
- Token efficiency increased for AI agent consumption

Planning & Analysis:
- Context system implementation plan and simplification analysis
- ADR standard proposal and runtime permission architecture
- SQLite context design for future scale (deferred until 500+ files)
- Context discovery script analysis (rejected in favor of navigation-first)

Task Management:
- Enhanced task schema with stage orchestration support
- New planning subagents (ADR, Architecture, Story Mapping, Prioritization)
- Stage orchestrator for multi-stage workflow management
- Session context management and lightweight handoff patterns

Closes: context-simple-fixes task
Ref: context-system-implementation analysis

* fix: resolve markdown link validation errors in navigation files

- Remove non-existent react-patterns.md link from react/navigation.md
- Remove non-existent premium-dark-ui-quick-start.md link from design/navigation.md
- Add skip patterns for pre-existing broken links in example/template files
- Validation now passes: 215 files validated, 0 errors

* fix: resolve all 119 broken markdown links across documentation

- Update agent paths to new subagents structure (TestEngineer, ContextScout, etc.)
- Fix animation file references (animation-ui.md → animation-components.md)
- Update guide references (adding-agent.md → adding-agent-basics.md)
- Convert non-existent example paths to placeholder text format
- Add skip patterns for intentional example placeholders
- Validation now passes: 232 files validated, 0 errors

Co-authored-by: CoderAgent <coder@openagents.dev>

---------

Co-authored-by: CoderAgent <coder@openagents.dev>
2026-02-15 23:01:19 +00:00
Alexander Daza
ca2e35c30b
feat(lint): resolve all ESLint errors and complete compatibility layer (Issue #141) (#176)
* feat: implement compatibility layer foundation (Issue #141)

- Add TypeScript project setup with strict mode and Vitest
- Implement 20+ Zod validation schemas for OpenAgent format
- Create BaseAdapter abstract class with template method pattern
- Add context documentation for compatibility layer workflow
- Setup ESLint, TypeScript, and test configuration

Phase 1 Foundation: 50% complete (subtasks 01-03)
Related: #141

* feat: implement AgentLoader with TypeScript (Issue #141)

- Add AgentLoader class for loading OAC agent files
- Implement parseFrontmatter() for YAML extraction
- Add extractSections() for markdown parsing (skills, examples, commands, workflow)
- Create custom error classes: AgentLoadError, FrontmatterParseError, ValidationError
- Support single file and recursive directory loading
- Add metadata merging from agent-metadata.json
- Export convenience functions: loadAgent(), loadAgents()
- Full Zod schema validation with descriptive error messages
- 386 lines, type-safe with strict mode

Phase 1 Foundation: 66.7% complete (subtask 04/06)
Related: #141

* feat: implement AdapterRegistry with TypeScript (Issue #141)

- Add AdapterRegistry class for managing tool adapters
- Implement type-safe registration with Map<string, BaseAdapter>
- Add alias support for adapter names (case-insensitive)
- Create custom error class: AdapterRegistryError
- Implement methods: register(), get(), list(), has(), getAll(), unregister(), clear()
- Add capability-based adapter discovery: getCapabilities(), findByFeature()
- Export singleton registry instance and convenience functions
- Support lazy loading of built-in adapters (placeholder for Phase 2)
- 416 lines, fully type-safe with strict mode

Features:
- Duplicate registration prevention
- Alias conflict detection
- O(1) adapter lookup
- Sorted adapter listings
- Comprehensive JSDoc documentation

Phase 1 Foundation: 83.3% complete (subtask 05/06)
Related: #141

* feat: create main entry point index.ts (Issue #141)

- Add comprehensive barrel exports for public API
- Export all Zod schemas and TypeScript types
- Export AgentLoader class and convenience functions
- Export AdapterRegistry, singleton, and helpers
- Export error classes: AgentLoadError, FrontmatterParseError, ValidationError, AdapterRegistryError
- Export BaseAdapter for custom adapter creation
- Add package VERSION constant
- Include JSDoc documentation with usage examples
- Organized exports by category (types, core, adapters)
- 168 lines with comprehensive documentation

All exports:
- Types: All Zod schemas and inferred TypeScript types
- Core: AgentLoader, AdapterRegistry, registry singleton
- Adapters: BaseAdapter abstract class
- Errors: All custom error classes
- Utilities: Convenience functions (loadAgent, getAdapter, etc.)

Phase 1 Foundation: 100% COMPLETE! 🎉 (6/6 subtasks)
Related: #141

* feat: implement ClaudeAdapter with bidirectional conversion (Issue #141)

- Implement ClaudeAdapter extending BaseAdapter
- Support toOAC() conversion from Claude Code format to OAC
- Support fromOAC() conversion from OAC to Claude Code format
- Handle .claude/config.json for primary agents
- Handle .claude/agents/*.md for subagents with YAML frontmatter
- Map Claude Skills system to/from OAC contexts
- Map hooks (PreToolUse, PostToolUse, etc.) bidirectionally
- Degrade granular OAC permissions to Claude permissionMode
- Add warnings for unsupported features (temperature, maxSteps)
- Export ClaudeAdapter from main index.ts

Capabilities:
- supportsMultipleAgents: true
- supportsSkills: true
- supportsHooks: true
- supportsGranularPermissions: false (binary only)
- supportsTemperature: false
- Model ID mapping (claude-sonnet-4 <-> claude-sonnet-4-20250514)
- Tool access mapping (OAC ToolAccess <-> Claude tools array)

Subtask: compatibility-layer-141-07
Phase: 2 (Adapters Migration)

* feat: implement CursorAdapter with single-file format support (Issue #141)

- Implement CursorAdapter extending BaseAdapter
- Support toOAC() conversion from .cursorrules to OAC
- Support fromOAC() conversion from OAC to .cursorrules format
- Handle single-file limitation (no multiple agents)
- Implement mergeAgents() for combining multiple OAC agents
- Parse optional YAML frontmatter in .cursorrules
- Inline context files into .cursorrules content
- Add comprehensive warnings for lost features

Key limitations:
- supportsMultipleAgents: false (single .cursorrules file)
- supportsSkills: false (must inline content)
- supportsHooks: false (not supported by Cursor)
- supportsGranularPermissions: false (binary only)
- supportsTemperature: true (limited support)

Features:
- Model ID mapping (gpt-4, claude-3-opus, etc.)
- Tool access parsing and generation
- Context file inlining with references
- Multi-agent merge capability
- Frontmatter parsing for metadata

Export CursorAdapter from main index.ts

Subtask: compatibility-layer-141-08
Phase: 2 (Adapters Migration)

* feat: implement WindsurfAdapter with bidirectional conversion (Issue #141)

- Add WindsurfAdapter.ts (514 lines) extending BaseAdapter
- Support bidirectional OAC ↔ Windsurf JSON conversion
- Implement toOAC() for Windsurf config → OpenAgent parsing
- Implement fromOAC() for OpenAgent → Windsurf config generation
- Add temperature ↔ creativity setting mapping (low/medium/high)
- Add model ID mapping (claude-sonnet-4 ↔ claude-4-sonnet)
- Support multi-agent configuration via .windsurf/agents/
- Support context files via .windsurf/context/
- Implement binary permission mapping with degradation warnings
- Add priority level normalization (critical/high/medium/low → high/low)
- Export WindsurfAdapter in index.ts
- All adapters now complete: Claude, Cursor, Windsurf
- Compilation successful: 0 errors, 0 warnings

Phase 2 (Adapters): 50% complete (3/6 subtasks)
Total progress: 28.13% (9/32 subtasks)
Code stats: 3,333 lines TypeScript (Foundation + Adapters)

* docs: add compatibility layer context files and progress tracking (Issue #141)

- Add baseadapter-implementation.md with detailed adapter pattern and testing examples
- Add compatibility-layer-development.md with development workflow and best practices
- Add compatibility-layer-adapters.md lookup table with adapter specifications
- Add compatibility-layer-progress.md tracking Phase 1 completion and Phase 2 status
- Add compatibility-learnings.md documenting implementation learnings
- Update compatibility-layer.md with latest architecture insights

These context files support Phase 2 adapter unit testing and future adapter development.

* test: implement comprehensive unit tests for ClaudeAdapter (Issue #141 - Subtask 10)

Implemented 80 test cases covering:
- toOAC() parsing of config.json and agent.md (YAML frontmatter)
- fromOAC() conversion to config.json and agent.md formats
- Capabilities and feature validation
- Model, tool, skill, hook, and permission mapping
- Skill generation from contexts
- Edge cases and error handling
- Roundtrip conversion validation

Coverage achieved:
- 96.32% statements (target: 80%+) ✅
- 100% functions (target: 80%+) ✅
- 82.14% branches (target: 75%+) ✅

All test cases follow AAA pattern (Arrange-Act-Assert) and test standards
from .opencode/context/core/standards/test-coverage.md

* test: implement comprehensive unit tests for CursorAdapter (Issue #141 - Subtask 11)

Implemented 78 test cases covering:
- toOAC() parsing of plain .cursorrules and YAML frontmatter
- fromOAC() conversion to .cursorrules format
- Capabilities and feature validation
- Agent merging (CURSOR-SPECIFIC - unique feature)
- Model, tool mapping
- Context inlining
- Temperature and configuration handling
- Edge cases and error handling
- Roundtrip conversion validation

Coverage achieved:
- 98.55% statements (target: 80%+) ✅
- 100% functions (target: 80%+) ✅
- 89.65% branches (target: 75%+) ✅

Key test areas:
- Plain text .cursorrules parsing (no frontmatter)
- YAML frontmatter parsing with type coercion
- Agent merging (single, two, three+ agents)
- Tool union and temperature MAX behavior
- Context inlining with proper formatting
- Model mapping (Cursor ↔ OAC)

All test cases follow AAA pattern and test standards.

* test: implement comprehensive unit tests for WindsurfAdapter (Issue #141 - Subtask 12)

* feat: implement Phase 3 mappers and translation engine with tests (Issue #141)

- Add ToolMapper: maps tool names between OAC and Claude/Cursor/Windsurf
- Add PermissionMapper: translates granular to binary permissions
- Add ModelMapper: maps AI model IDs between platforms
- Add ContextMapper: maps context file paths between platforms
- Add CapabilityMatrix: feature compatibility analysis across platforms
- Add TranslationEngine: orchestrates all mappers for complete translation

Test coverage:
- ToolMapper: 100% statements, 100% branches
- PermissionMapper: 98% statements, 96% branches
- ModelMapper: 99% statements, 90% branches
- ContextMapper: 97% statements, 94% branches
- CapabilityMatrix: 99% statements, 96% branches
- TranslationEngine: 99% statements, 93% branches

Total: 485 tests passing (249 new tests added)

* docs: update Issue #141 context files to reflect Phase 3 completion

- Update progress from 28% to 59.4% (19/32 subtasks)
- Mark Phases 1-3 as complete (Foundation, Adapters, Mappers)
- Update code stats: 5,799 source lines, 6,322 test lines
- Add test coverage metrics: 485 tests, 97-100% on Phase 3
- Update structure with all implemented files
- Add executive summary for token-efficient context loading
- Document next steps: Phase 4 CLI implementation

* docs(context): harvest Claude Code docs and fix MVI compliance (Phase 1)

- Harvest external Claude Code documentation into context system:
  - hooks-system, agent-skills, subagents-system concepts
  - hook-events, skill-metadata, builtin-subagents lookups
  - Example files for hooks, skills, and subagents
  - Plugin architecture and migration guides

- Fix 6 critical MVI violations (files > 200 lines):
  - Split adding-agent.md → adding-agent-basics.md + adding-agent-testing.md
  - Split adding-skill.md → 3 files (basics, implementation, example)
  - Split task-delegation.md → 3 files (basics, specialists, caching)
  - Split external-libraries.md → 3 files (workflow, scenarios, faq)
  - Split design-assets.md → 4 files (images, icons, fonts, cdn)
  - Split navigation-design.md → 2 files (basics, templates)

- Update navigation files with new references
- Remove consumed source docs from to-be-consumed/

Total: 17 new files created, 6 large files replaced, 5 source docs consumed

* docs(context): MVI compliance Phase 2 - split large workflow and UI files

Split 3 large files into MVI-compliant modules (< 200 lines each):

- design-iteration.md (1058 lines) → 9 files:
  - design-iteration-overview.md (overview, when to use)
  - design-iteration-plan-file.md (mandatory plan template)
  - design-iteration-stage-layout.md (Stage 1)
  - design-iteration-stage-theme.md (Stage 2)
  - design-iteration-stage-animation.md (Stage 3)
  - design-iteration-stage-implementation.md (Stage 4)
  - design-iteration-visual-content.md (Image Specialist)
  - design-iteration-best-practices.md (quality, troubleshooting)
  - design-iteration-plan-iterations.md (managing iterations)

- animation-patterns.md (753 lines) → 6 files:
  - animation-basics.md (fundamentals, timing, easing)
  - animation-components.md (buttons, cards, modals)
  - animation-chat.md (message, typing animations)
  - animation-loading.md (skeleton, spinner, progress)
  - animation-forms.md (focus, validation, scroll)
  - animation-advanced.md (recipes, best practices)

- premium-dark-ui-quick-start.md (638 lines) → 4 files:
  - premium-dark-ui-colors.md (palette, typography, spacing)
  - premium-dark-ui-components.md (core building blocks)
  - premium-dark-ui-layouts.md (hero, features, CTA)
  - premium-dark-ui-advanced.md (animations, accessibility)

Updated navigation files with new references.

* feat(cli): implement CLI scaffolding with Commander.js (Issue #141 - Subtask 20)

- Add src/cli/index.ts: CLI entry point with convert, validate, migrate, info commands
- Add src/cli/types.ts: TypeScript type definitions for CLI options
- Add src/cli/utils.ts: Logging, spinner, and formatting utilities
- Add "type": "module" to package.json for ESM support
- Global options: --verbose, --quiet, --output-format (json|text)
- Commands are placeholders pending implementation in subtasks 21-24

* feat(cli): implement convert command with full format support (Issue #141 - Subtask 21)

- Add src/cli/commands/convert.ts: Complete convert command implementation
- Auto-detect input format from file path and content
- Support bidirectional conversion: OAC <-> Cursor/Claude/Windsurf
- Output to stdout by default, file with --output flag
- Display warnings for feature loss during conversion
- Enable registerBuiltInAdapters in AdapterRegistry
- Add public constructors to all adapters (CursorAdapter, ClaudeAdapter, WindsurfAdapter)
- Fix ESM imports: add .js extensions to all relative imports across codebase

All 485 tests passing.

* feat(cli): implement validate and info commands (Issue #141 - Subtasks 22, 24)

- validate: Checks agent compatibility with target format
  - Reports compatibility score (0-100%)
  - Lists preserved/degraded/lost features
  - Provides suggestions for unsupported features
  - Exit codes: 0=compatible, 1=partial, 2=incompatible
  - Supports --strict and --output-format json

- info: Displays tool capabilities and feature parity
  - Shows feature matrix for all platforms
  - Detailed view for single platform
  - Platform comparison with --compare
  - Documentation links
  - Supports --output-format json

* feat(cli): implement migrate command and add migration guides (Issue #141)

- Add migrate command for full project migration with batch conversion
- Support --dry-run, --force, and --out-dir options
- Generate migration reports with success/failure summaries
- Preserve directory structure in output

Documentation:
- Add 5 migration guides (cursor↔oac, claude↔oac, oac→windsurf)
- Add comprehensive feature-matrices.md with platform comparisons
- Document lossless vs lossy conversion impacts

Completes subtasks: 23, 26, 27, 28, 29, 30, 31

* test(cli): add comprehensive integration tests for all CLI commands (Issue #141)

- Add convert.test.ts with 23 tests for format conversions
- Add validate.test.ts with 21 tests for compatibility validation
- Add migrate.test.ts with 25 tests for batch migration
- Add info.test.ts with 30 tests for capability queries
- Add test fixtures for OAC, Cursor, and Claude formats
- Fix empty directory warning in migrate command

All 584 tests passing with full coverage of CLI modules.

Completes subtask 25

* docs: update README with comprehensive CLI and API documentation (Issue #141)

- Add complete CLI command reference with all options
- Add programmatic API usage examples
- Add feature parity matrix summary
- Add links to all migration guides
- Add architecture overview
- Add custom adapter creation guide

Completes subtask 32 - Feature #141 fully implemented

* docs: add visual examples and format improvements to README

- Add Cursor IDE screenshot (contextscout-cursor.png)
- Add Claude Code validation screenshot (claude-code-validation.png)
- Format code examples with consistent double quotes
- Align feature parity matrix table
- Add .cursorrules and bun.lock to .gitignore

* fix(lint): resolve all ESLint errors in compatibility layer

- Remove async from methods with no await expressions (toOAC, fromOAC, loadFromFile)
- Wrap Promise-returning methods with Promise.resolve/reject
- Fix unsafe type assertions (replace 'as any' with proper type validation)
- Add missing getConfigPath() method to WindsurfAdapter
- Validate AgentCategory enum values before assignment
- Fix return type compatibility issues

All 584 tests passing, 0 ESLint errors (7 acceptable warnings for missing callback return types)

* chore: update package.json author and contributors metadata

- Update author from string to object format with name and GitHub URL
- Add Alexander Daza as contributor with email and GitHub profile
- Maintain npm package.json standard format for author/contributors fields
2026-02-06 00:08:14 +00:00
Darren Hinde
9a58a03284
fix(context): Add frontmatter to context files with missing metadata (#97)
* feat(context): Add project intelligence system

- Add project-intelligence.md standard (what & why)
- Add project-intelligence-management.md guide (how to manage)
- Add project-intelligence/ folder with 6 context files:
  - navigation.md (quick overview & routes)
  - business-domain.md (business context, users, value)
  - technical-domain.md (stack, architecture, decisions)
  - business-tech-bridge.md (business → technical mapping)
  - decisions-log.md (decision history with context)
  - living-notes.md (active issues, debt, questions)
- Update standards navigation with new entries
- Register all new contexts in registry.json

This enables projects to document and maintain business + technical
context for quick onboarding and lasting project understanding.

* fix(registry): Add project-intelligence to profiles

- Add context:project-intelligence/* to developer, business, full, and advanced profiles
- Ensures project intelligence contexts are included when these profiles are selected

This complements commit c731328 which added the context entries.

* docs(core): refine project intelligence system and deprecate legacy context

* feat(claude): simplify Claude Code integration with unified installer

- Create single install-claude.sh script that auto-converts and installs
- Remove redundant bootstrap-install.sh and install.sh scripts
- Delete stale plugin/ directory (now auto-generated from .opencode/)
- Add Claude Code documentation (agent-skills, create-subagents, hooks, plugins)
- Add installation profiles (essential, developer, business, full, advanced)
- Update README with Claude Code beta feature documentation
- Add component-planning.md workflow context
- Clean up demo files (assets/, src/)
- Update registry with new context entries
- Add gitignore rule for converter/generated/

The new installer:
- Converts agents automatically from .opencode/agent/
- Installs fresh converted agents to ~/.claude/plugins/
- Single command: ./integrations/claude-code/install-claude.sh

* fix: update README to use new install-claude.sh script

The Claude Code integration now uses the unified install-claude.sh script
instead of the removed bootstrap-install.sh and install.sh scripts.

* fix(context): Add frontmatter to context files with missing metadata

- Add YAML frontmatter with description to system-builder-templates
- Add frontmatter to ui/web/design context files
- Fixes validation warnings in validate-component.sh

* fix(registry): Remove orphaned context entries for deleted files

- Remove copywriting-frameworks entry (file moved to content-creation/principles/)
- Remove tone-voice entry (file moved to content-creation/principles/)
2026-01-17 21:29:48 +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
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
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
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
412d5141c3 Remove unused files and clean up project structure by deleting .gitignore, bun.lock, index.html, package.json, main.js, and style.css. Update .gitignore to include only necessary entries for environment variables and build outputs. 2025-08-26 01:03:18 +01:00
darrenhinde
0119898081 Update README.md to enhance project description, add features, quick start guide, agent and plugin details, configuration instructions, and safety/security practices. 2025-08-15 01:43:56 +01:00