Personal learning notes and research on AI coding agents, focusing on architecture, implementation patterns, and context management strategies.
Comprehensive documentation on OpenCode and Oh-My-OpenCode architecture and design.
Topics covered:
- Agent system architecture (build, plan, explore, oracle, librarian)
- Session lifecycle and state management
- Tool registry and execution
- Model Context Protocol (MCP) integration
- Prompt design and optimization
- OpenCode vs Oh-My-OpenCode comparison
- Task completion detection and TODO system
- LSP integration and refactoring tools
Key documents:
- 01_overview.md - High-level architecture
- 02_agent_system.md - Agent orchestration
- 06_prompt_design.md - Prompt engineering
- 07_opencode_vs_oh_my_opencode.md - Architecture comparison
- 09_task_completion_detection.md - Task flow
- 10_todo_system.md - TODO tracking
See opencode_learning/README.md for complete documentation index.
In-depth analysis of Roo Code (VS Code extension) architecture, with focus on the XML β Native protocol transition.
Topics covered:
- System prompt structure (Architect vs Code modes)
- Native Protocol vs XML Protocol
- Tool definitions and API integration
- Skills system (Agent Skills specification)
- Conversation flow and task completion
- Error handling and malformed JSON resilience
- Incremental JSON parsing
Key documents:
- architect_mode_prompt.md - Planning mode prompt
- code_mode_prompt.md - Implementation mode prompt
- native_protocol_and_completion.md - Protocol deep dive
- conv_example.md - Complete conversation example
- error_handling_malformed_json.md - Error resilience
- tool_definitions.md - Tool system architecture
- skills_handling.md - Extensibility via skills
See roocode_learning/README.md for detailed documentation map.
Comprehensive documentation for OpenClaw - a personal AI assistant platform with multi-channel support, gateway-based architecture, and extensive security controls.
Topics covered:
- Gateway architecture and WebSocket control plane
- Multi-channel support (WhatsApp, Telegram, Discord, Slack, iMessage, Signal)
- Workspace files (SOUL.md, AGENTS.md, WORKSPACE.md)
- Tool system with approval and sandbox isolation
- Skills discovery, installation, and eligibility
- DM pairing and access control systems
- Security audit and compliance tools
- Agent run lifecycle and task completion detection
Key documents:
- 01_overview.md - Architecture and tech stack
- 02_prompt_system.md - Workspace files and prompt engineering
- 03_tool_system.md - Tool execution and approvals
- 04_skills_system.md - Skills discovery and installation
- 05_access_control.md - DM pairing, allowlists, security audit
- 06_task_completion.md - Agent run lifecycle and session management
See openclaw_learning/README.md for complete documentation index.
Deep dive into Oh My OpenCode (OMO), a "battery-included" orchestration suite for OpenCode that introduces the Sisyphus agent.
Topics covered:
- Sisyphus Orchestrator & "Ultrawork" workflow
- Specialized sub-agents (Oracle, Librarian, Explore)
- Mandatory Category/Skill delegation protocols
- Prompt engineering analysis of
sisyphus-prompt.md - "Todo Continuation Enforcer" for persistence
- Boulder pattern for persistent multi-step plans
- 160+ lifecycle hook architecture
Key documents:
- 01_overview.md - Core philosophy and features
- 02_architecture_and_agents.md - Agent hierarchy and delegation
- 04_prompt_engineering.md - Analysis of the Sisyphus system prompt
- 09_boulder_pattern.md - Persistent task state and continuation
- 10_hook_architecture.md - 160+ hook system deep dive
See oh_my_opencode_learning/README.md for detailed index.
Research on context selection and management methodologies in open-source coding agents.
Focus areas:
- Context selection strategies given a prompt
- Context management during execution
- Comparative analysis across different agents
- Limitations and trade-offs
Analyzed agents:
- Cursor
- Augment
- Aider
- Continue
- Cline
- OpenHands
- Roo-Code
- Pi-Agent
- And more...
See coding_agent_research/readme.md for research objectives.
- Primary agents (user-facing): build, plan
- Specialized subagents: explore (contextual grep), oracle (expert advisor), librarian (reference search)
- Agent orchestration: Parallel execution, delegation patterns, background tasks
- Gateway-based architecture (OpenClaw): WebSocket control plane, multi-channel routing
- XML Protocol: Tools embedded in system prompt (deprecated)
- Native Protocol: Tools passed as separate API parameter (current standard)
- Benefits: Token savings, type safety, cleaner parsing
- Session-based conversation history
- Snapshot and diff systems
- Message compaction strategies
- Tool permission systems
- Workspace files (SOUL.md, AGENTS.md, WORKSPACE.md)
- Multi-layer prompt assembly
- Provider-specific optimizations
- Dynamic context injection
- Mode-specific behaviors (Architect vs Code)
- Personality configuration via workspace files
- DM Pairing: Ephemeral codes for user authentication
- Allowlist Matching: Platform-specific identifier matching
- Exec Approvals: Bash command approval system (~/.openclaw/exec-approvals.json)
- Sandbox Policies: Tool allow/deny lists for isolated execution
- Security Audit: Automated vulnerability scanning
- LLM finish reason detection (stop, tool-calls, length, error)
- Streaming architecture and event processing
- TODO continuation enforcement
- Decision logic (continue vs stop vs compact)
- Agent run lifecycle management
- Read opencode_learning/01_overview.md for big picture
- Explore opencode_learning/02_agent_system.md for agent orchestration
- Review opencode_learning/07_opencode_vs_oh_my_opencode.md for architecture comparison
- Start with roocode_learning/conv_example.md to see complete conversation flow
- Read roocode_learning/native_protocol_and_completion.md for protocol details
- Explore mode prompts: architect_mode_prompt.md and code_mode_prompt.md
- Read openclaw_learning/01_overview.md for architecture overview
- Explore openclaw_learning/02_prompt_system.md for workspace file configuration
- Review openclaw_learning/05_access_control.md for security setup
- Review coding_agent_research/ for context management strategies
- Compare different approaches across agents
- OpenCode Learning: 13+ comprehensive documents covering architecture, agents, tools, and prompts
- Roo Code Learning: 7 documents totaling ~4,375 lines of in-depth analysis
- OpenClaw Learning: 6+ documents covering gateway architecture, security, skills, and agent lifecycle
- Oh My OpenCode Learning: 4 documents detailing the Sisyphus orchestrator and delegation system
- Coding Agent Research: Analysis of 10+ open-source coding agents
- GitHub: anomalyco/opencode
- Discord: https://opencode.ai/discord
- Documentation: https://opencode.ai/docs
- VS Code Extension: Search "Roo Code" in VS Code Marketplace
- Agent Skills Spec: https://agentskills.io/
- GitHub: openclaw/openclaw
- Pi Coding Agent: mariozechner/pi-coding-agent
- GitHub: code-yeongyu/oh-my-opencode
- Community: Discord Server
- GitHub (Original): badlogic/pi-mono - 29k+ stars
- GitHub (Fork): can1357/oh-my-pi - 2.5k stars
- Various open-source coding agent repositories (see coding_agent_research/)
This is a personal learning repository documenting my exploration of AI coding agent architectures. The materials are organized for:
- Understanding: Deep dives into how these systems work
- Comparison: Side-by-side analysis of different approaches
- Implementation: Practical insights for building similar systems
- Research: Context management and selection strategies
This is a personal learning repository. However, if you find errors or have suggestions:
- Open an issue to discuss
- Submit a pull request with corrections
Keep documentation accurate, clear, and well-referenced.
Created: January 2026
Last Updated: March 4, 2026
Focus: AI coding agent architecture, protocols, context management, and multi-channel platforms
- New: OpenCode State Update (2026-03) - Workspace/control-plane and reliability direction update
- New: OMOS State Update (2026-03) - Delegation recovery hooks and runtime fallback model routing
- New: Roo Code State Update (2026-03) - v3.44-v3.50 evolution and CLI maturity
- New: OpenCode vs OMOS vs Roo Philosophical Comparison (2026-03)
- New: OMOS Boulder Pattern - Persistent task state and Ralph Loop enforcement
- New: OMOS Hook Architecture - Deep dive into 160+ lifecycle hooks
- Enhanced: OMOS Skills System - 5-tier discovery, auto-permissions, intent-based loading
- Fixed: Path corrections in main README for oh_my_opencode_learning
- Removed: Empty latte_learning directory