docs(agents): regenerate AGENTS.md hierarchy with init-deep
- Root: preserve 3 CRITICAL sections (PR target, OpenCode source, English-only) - Update all 10 AGENTS.md files with current codebase analysis - Add complexity hotspots, agent models, anti-patterns - Sync line counts and structure with actual implementation
This commit is contained in:
18
AGENTS.md
18
AGENTS.md
@@ -1,7 +1,7 @@
|
||||
# PROJECT KNOWLEDGE BASE
|
||||
|
||||
**Generated:** 2026-02-02T21:16:00+09:00
|
||||
**Commit:** d80adac3
|
||||
**Generated:** 2026-02-03T16:10:30+09:00
|
||||
**Commit:** d7679e14
|
||||
**Branch:** dev
|
||||
|
||||
---
|
||||
@@ -120,7 +120,7 @@ This is an **international open-source project**. To ensure accessibility and ma
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
O P E N C O D E plugin: multi-model agent orchestration (Claude Opus 4.5, GPT-5.2, Gemini 3 Flash). 34 lifecycle hooks, 20+ tools (LSP, AST-Grep, delegation), 11 specialized agents, full Claude Code compatibility. "oh-my-zsh" for O P E N C O D E.
|
||||
OpenCode plugin: multi-model agent orchestration (Claude Opus 4.5, GPT-5.2, Gemini 3 Flash). 34 lifecycle hooks, 20+ tools (LSP, AST-Grep, delegation), 11 specialized agents, full Claude Code compatibility. "oh-my-zsh" for OpenCode.
|
||||
|
||||
## STRUCTURE
|
||||
|
||||
@@ -131,7 +131,7 @@ oh-my-opencode/
|
||||
│ ├── hooks/ # 34 lifecycle hooks - see src/hooks/AGENTS.md
|
||||
│ ├── tools/ # 20+ tools - see src/tools/AGENTS.md
|
||||
│ ├── features/ # Background agents, Claude Code compat - see src/features/AGENTS.md
|
||||
│ ├── shared/ # 55 cross-cutting utilities - see src/shared/AGENTS.md
|
||||
│ ├── shared/ # 66 cross-cutting utilities - see src/shared/AGENTS.md
|
||||
│ ├── cli/ # CLI installer, doctor - see src/cli/AGENTS.md
|
||||
│ ├── mcp/ # Built-in MCPs - see src/mcp/AGENTS.md
|
||||
│ ├── config/ # Zod schema, TypeScript types
|
||||
@@ -189,12 +189,16 @@ oh-my-opencode/
|
||||
| Versioning | Local version bump - CI manages |
|
||||
| Type Safety | `as any`, `@ts-ignore`, `@ts-expect-error` |
|
||||
| Error Handling | Empty catch blocks |
|
||||
| Testing | Deleting failing tests |
|
||||
| Testing | Deleting failing tests, writing implementation before test |
|
||||
| Agent Calls | Sequential - use `delegate_task` parallel |
|
||||
| Hook Logic | Heavy PreToolUse - slows every call |
|
||||
| Commits | Giant (3+ files), separate test from impl |
|
||||
| Temperature | >0.3 for code agents |
|
||||
| Trust | Agent self-reports - ALWAYS verify |
|
||||
| Git | `git add -i`, `git rebase -i` (no interactive input) |
|
||||
| Git | Skip hooks (--no-verify), force push without request |
|
||||
| Bash | `sleep N` - use conditional waits |
|
||||
| Bash | `cd dir && cmd` - use workdir parameter |
|
||||
|
||||
## AGENT MODELS
|
||||
|
||||
@@ -230,7 +234,7 @@ bun test # 100 test files
|
||||
| File | Lines | Description |
|
||||
|------|-------|-------------|
|
||||
| `src/features/builtin-skills/skills.ts` | 1729 | Skill definitions |
|
||||
| `src/features/background-agent/manager.ts` | 1457 | Task lifecycle, concurrency |
|
||||
| `src/features/background-agent/manager.ts` | 1418 | Task lifecycle, concurrency |
|
||||
| `src/agents/prometheus-prompt.ts` | 1283 | Planning agent prompt |
|
||||
| `src/tools/delegate-task/tools.ts` | 1135 | Category-based delegation |
|
||||
| `src/hooks/atlas/index.ts` | 757 | Orchestrator hook |
|
||||
@@ -253,6 +257,6 @@ Three-tier system:
|
||||
|
||||
## NOTES
|
||||
|
||||
- **O P E N C O D E**: Requires >= 1.0.150
|
||||
- **OpenCode**: Requires >= 1.0.150
|
||||
- **Flaky tests**: ralph-loop (CI timeout), session-state (parallel pollution)
|
||||
- **Trusted deps**: @ast-grep/cli, @ast-grep/napi, @code-yeongyu/comment-checker
|
||||
|
||||
@@ -30,7 +30,8 @@ features/
|
||||
├── tmux-subagent/ # Tmux session management
|
||||
├── mcp-oauth/ # MCP OAuth handling
|
||||
├── sisyphus-swarm/ # Swarm coordination
|
||||
└── sisyphus-tasks/ # Task tracking
|
||||
├── sisyphus-tasks/ # Task tracking
|
||||
└── claude-tasks/ # Task schema/storage - see AGENTS.md
|
||||
```
|
||||
|
||||
## LOADER PRIORITY
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## OVERVIEW
|
||||
|
||||
55 cross-cutting utilities. Import via barrel pattern: `import { log, deepMerge } from "../../shared"`
|
||||
66 cross-cutting utilities. Import via barrel pattern: `import { log, deepMerge } from "../../shared"`
|
||||
|
||||
**Categories**: Path resolution, Token truncation, Config parsing, Model resolution, System directives, Tool restrictions
|
||||
|
||||
@@ -10,16 +10,16 @@
|
||||
```
|
||||
shared/
|
||||
├── tmux/ # Tmux TUI integration (types, utils, constants)
|
||||
├── logger.ts # File-based logging (/tmp/oh-my-opencode.log)
|
||||
├── logger.ts # File-based logging (/tmp/oh-my-opencode.log) - 53 imports
|
||||
├── dynamic-truncator.ts # Token-aware context window management (194 lines)
|
||||
├── model-resolver.ts # 3-step resolution (Override → Fallback → Default)
|
||||
├── model-requirements.ts # Agent/category model fallback chains (162 lines)
|
||||
├── model-availability.ts # Provider model fetching & fuzzy matching (154 lines)
|
||||
├── jsonc-parser.ts # JSONC parsing with comment support
|
||||
├── frontmatter.ts # YAML frontmatter extraction (JSON_SCHEMA only)
|
||||
├── frontmatter.ts # YAML frontmatter extraction (JSON_SCHEMA only) - 9 imports
|
||||
├── data-path.ts # XDG-compliant storage resolution
|
||||
├── opencode-config-dir.ts # ~/.config/opencode resolution (143 lines)
|
||||
├── claude-config-dir.ts # ~/.claude resolution
|
||||
├── opencode-config-dir.ts # ~/.config/opencode resolution (143 lines) - 9 imports
|
||||
├── claude-config-dir.ts # ~/.claude resolution - 9 imports
|
||||
├── migration.ts # Legacy config migration logic (231 lines)
|
||||
├── opencode-version.ts # Semantic version comparison
|
||||
├── permission-compat.ts # Agent tool restriction enforcement
|
||||
@@ -36,12 +36,14 @@ shared/
|
||||
```
|
||||
|
||||
## MOST IMPORTED
|
||||
| Utility | Users | Purpose |
|
||||
|---------|-------|---------|
|
||||
| logger.ts | 16+ | Background task visibility |
|
||||
| system-directive.ts | 8+ | Message filtering |
|
||||
| opencode-config-dir.ts | 8+ | Path resolution |
|
||||
| permission-compat.ts | 6+ | Tool restrictions |
|
||||
| Utility | Imports | Purpose |
|
||||
|---------|---------|---------|
|
||||
| logger.ts | 53 | Background task visibility |
|
||||
| opencode-config-dir.ts | 9 | Path resolution |
|
||||
| claude-config-dir.ts | 9 | Path resolution |
|
||||
| frontmatter.ts | 9 | YAML parsing |
|
||||
| system-directive.ts | 8 | Message filtering |
|
||||
| permission-compat.ts | 6 | Tool restrictions |
|
||||
|
||||
## WHEN TO USE
|
||||
| Task | Utility |
|
||||
|
||||
@@ -18,6 +18,7 @@ tools/
|
||||
├── lsp/ # 6 tools: definition, references, symbols, diagnostics, rename (client.ts 540 lines)
|
||||
├── ast-grep/ # 2 tools: search, replace (25 languages)
|
||||
├── delegate-task/ # Category-based routing (1135 lines)
|
||||
├── task/ # 4 tools: create, get, list, update (Claude Code compatible)
|
||||
├── session-manager/ # 4 tools: list, read, search, info
|
||||
├── grep/ # Custom grep with timeout (60s, 10MB)
|
||||
├── glob/ # 60s timeout, 100 file limit
|
||||
|
||||
Reference in New Issue
Block a user