11# PROJECT KNOWLEDGE BASE
22
3- ** Generated:** 2026-01-02T22:41:22 +09:00
4- ** Commit:** d0694e5
3+ ** Generated:** 2026-01-09T15:38:00 +09:00
4+ ** Commit:** 0581793
55** Branch:** dev
66
77## OVERVIEW
@@ -22,7 +22,7 @@ oh-my-opencode/
2222│ ├── cli/ # CLI installer, doctor - see src/cli/AGENTS.md
2323│ ├── mcp/ # MCP configs: context7, grep_app
2424│ ├── config/ # Zod schema, TypeScript types
25- │ └── index.ts # Main plugin entry (464 lines)
25+ │ └── index.ts # Main plugin entry (548 lines)
2626├── script/ # build-schema.ts, publish.ts, generate-changelog.ts
2727├── assets/ # JSON schema
2828└── dist/ # Build output (ESM + .d.ts)
@@ -50,6 +50,7 @@ oh-my-opencode/
5050| Shared utilities | ` src/shared/ ` | Cross-cutting utilities |
5151| Slash commands | ` src/hooks/auto-slash-command/ ` | Auto-detect and execute ` /command ` patterns |
5252| Ralph Loop | ` src/hooks/ralph-loop/ ` | Self-referential dev loop until completion |
53+ | Orchestrator | ` src/hooks/sisyphus-orchestrator/ ` | Main orchestration hook (660 lines) |
5354
5455## TDD (Test-Driven Development)
5556
@@ -64,15 +65,16 @@ oh-my-opencode/
6465
6566| Phase | Action | Verification |
6667| -------| --------| --------------|
67- | ** RED** | Write test describing expected behavior | ` bun test ` → FAIL (expected) |
68- | ** GREEN** | Implement minimum code to pass | ` bun test ` → PASS |
69- | ** REFACTOR** | Improve code quality, remove duplication | ` bun test ` → PASS (must stay green) |
68+ | ** RED** | Write test describing expected behavior | ` bun test ` -> FAIL (expected) |
69+ | ** GREEN** | Implement minimum code to pass | ` bun test ` -> PASS |
70+ | ** REFACTOR** | Improve code quality, remove duplication | ` bun test ` -> PASS (must stay green) |
7071
7172** Rules:**
7273- NEVER write implementation before test
7374- NEVER delete failing tests to "pass" - fix the code
7475- One test at a time - don't batch
7576- Test file naming: ` *.test.ts ` alongside source
77+ - BDD comments: ` #given ` , ` #when ` , ` #then ` (same as AAA)
7678
7779## CONVENTIONS
7880
@@ -81,7 +83,7 @@ oh-my-opencode/
8183- ** Build** : ` bun build ` (ESM) + ` tsc --emitDeclarationOnly `
8284- ** Exports** : Barrel pattern in index.ts; explicit named exports for tools/hooks
8385- ** Naming** : kebab-case directories, createXXXHook/createXXXTool factories
84- - ** Testing** : BDD comments ` #given ` , ` #when ` , ` #then ` (same as AAA); TDD workflow (RED-GREEN-REFACTOR)
86+ - ** Testing** : BDD comments ` #given/ #when/ #then ` , TDD workflow (RED-GREEN-REFACTOR)
8587- ** Temperature** : 0.1 for code agents, max 0.3
8688
8789## ANTI-PATTERNS (THIS PROJECT)
@@ -99,6 +101,11 @@ oh-my-opencode/
99101- ** Sequential agent calls** : Use ` sisyphus_task ` for parallel execution
100102- ** Heavy PreToolUse logic** : Slows every tool call
101103- ** Self-planning for complex tasks** : Spawn planning agent (Prometheus) instead
104+ - ** Trust agent self-reports** : ALWAYS verify results independently
105+ - ** Skip TODO creation** : Multi-step tasks MUST have todos first
106+ - ** Batch completions** : Mark TODOs complete immediately, don't group
107+ - ** Giant commits** : 3+ files = 2+ commits minimum
108+ - ** Separate test from impl** : Same commit always
102109
103110## UNIQUE STYLES
104111
@@ -114,7 +121,7 @@ oh-my-opencode/
114121## AGENT MODELS
115122
116123| Agent | Default Model | Purpose |
117- | -------| -------| ---------|
124+ | -------| --------------- | ---------|
118125| Sisyphus | anthropic/claude-opus-4-5 | Primary orchestrator |
119126| oracle | openai/gpt-5.2 | Read-only consultation. High-IQ debugging, architecture |
120127| librarian | anthropic/claude-sonnet-4-5 | Multi-repo analysis, docs |
@@ -130,7 +137,7 @@ bun run typecheck # Type check
130137bun run build # ESM + declarations + schema
131138bun run rebuild # Clean + Build
132139bun run build:schema # Schema only
133- bun test # Run tests
140+ bun test # Run tests (76 test files, 2559+ BDD assertions)
134141```
135142
136143## DEPLOYMENT
@@ -153,18 +160,23 @@ bun test # Run tests
153160
154161| File | Lines | Description |
155162| ------| -------| -------------|
156- | ` src/index.ts ` | 464 | Main plugin, all hook/tool init |
157- | ` src/cli/config-manager.ts ` | 669 | JSONC parsing, env detection |
158- | ` src/auth/antigravity/fetch.ts ` | 621 | Token refresh, URL rewriting |
159- | ` src/tools/lsp/client.ts ` | 611 | LSP protocol, JSON-RPC |
160- | ` src/auth/antigravity/response.ts ` | 598 | Response transformation, streaming |
161- | ` src/auth/antigravity/thinking.ts ` | 571 | Thinking block extraction/transformation |
162- | ` src/hooks/anthropic-context-window-limit-recovery/executor.ts ` | 564 | Multi-stage recovery |
163- | ` src/agents/sisyphus.ts ` | 504 | Orchestrator prompt |
163+ | ` src/agents/orchestrator-sisyphus.ts ` | 1484 | Orchestrator agent, complex delegation |
164+ | ` src/features/builtin-skills/skills.ts ` | 1230 | Skill definitions (frontend-ui-ux, playwright) |
165+ | ` src/agents/prometheus-prompt.ts ` | 982 | Planning agent system prompt |
166+ | ` src/auth/antigravity/fetch.ts ` | 798 | Token refresh, URL rewriting |
167+ | ` src/auth/antigravity/thinking.ts ` | 755 | Thinking block extraction |
168+ | ` src/cli/config-manager.ts ` | 725 | JSONC parsing, env detection |
169+ | ` src/hooks/sisyphus-orchestrator/index.ts ` | 660 | Orchestrator hook impl |
170+ | ` src/agents/sisyphus.ts ` | 641 | Main Sisyphus prompt |
171+ | ` src/tools/lsp/client.ts ` | 612 | LSP protocol, JSON-RPC |
172+ | ` src/features/background-agent/manager.ts ` | 608 | Task lifecycle |
173+ | ` src/auth/antigravity/response.ts ` | 599 | Response transformation, streaming |
174+ | ` src/hooks/anthropic-context-window-limit-recovery/executor.ts ` | 556 | Multi-stage recovery |
175+ | ` src/index.ts ` | 548 | Main plugin, all hook/tool init |
164176
165177## NOTES
166178
167- - ** Testing** : Bun native test (` bun test ` ), BDD-style ` #given/#when/#then ` , 360+ tests
179+ - ** Testing** : Bun native test (` bun test ` ), BDD-style ` #given/#when/#then ` , 76 test files
168180- ** OpenCode** : Requires >= 1.0.150
169181- ** Multi-lang docs** : README.md (EN), README.ko.md (KO), README.ja.md (JA), README.zh-cn.md (ZH-CN)
170182- ** Config** : ` ~/.config/opencode/oh-my-opencode.json ` (user) or ` .opencode/oh-my-opencode.json ` (project)
0 commit comments