Skip to content

Commit a2c2922

Browse files
committed
fix(publish): add --tag for prerelease versions
npm requires --tag flag when publishing prerelease versions. Extracts tag from version string (e.g., 'beta' from '3.0.0-beta.2').
1 parent 0581793 commit a2c2922

File tree

8 files changed

+92
-43
lines changed

8 files changed

+92
-43
lines changed

AGENTS.md

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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
130137
bun run build # ESM + declarations + schema
131138
bun run rebuild # Clean + Build
132139
bun 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)

script/publish.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,22 @@ async function getContributors(previous: string): Promise<string[]> {
106106
return notes
107107
}
108108

109-
async function buildAndPublish(): Promise<void> {
109+
function getDistTag(version: string): string | null {
110+
if (!version.includes("-")) return null
111+
const prerelease = version.split("-")[1]
112+
const tag = prerelease?.split(".")[0]
113+
return tag || "next"
114+
}
115+
116+
async function buildAndPublish(version: string): Promise<void> {
110117
console.log("\nPublishing to npm...")
111-
// --ignore-scripts: workflow에서 이미 빌드 완료, prepublishOnly 재실행 방지
118+
const distTag = getDistTag(version)
119+
const tagArgs = distTag ? ["--tag", distTag] : []
120+
112121
if (process.env.CI) {
113-
await $`npm publish --access public --provenance --ignore-scripts`
122+
await $`npm publish --access public --provenance --ignore-scripts ${tagArgs}`
114123
} else {
115-
await $`npm publish --access public --ignore-scripts`
124+
await $`npm publish --access public --ignore-scripts ${tagArgs}`
116125
}
117126
}
118127

@@ -174,7 +183,7 @@ async function main() {
174183
const contributors = await getContributors(previous)
175184
const notes = [...changelog, ...contributors]
176185

177-
await buildAndPublish()
186+
await buildAndPublish(newVersion)
178187
await gitTagAndRelease(newVersion, notes)
179188

180189
console.log(`\n=== Successfully published ${PACKAGE_NAME}@${newVersion} ===`)

src/agents/AGENTS.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@ AI agent definitions for multi-model orchestration. 7 specialized agents: Sisyph
88

99
```
1010
agents/
11-
├── sisyphus.ts # Primary orchestrator (Claude Opus 4.5)
11+
├── orchestrator-sisyphus.ts # Orchestrator agent (1484 lines) - complex delegation
12+
├── sisyphus.ts # Main Sisyphus prompt (641 lines)
13+
├── sisyphus-junior.ts # Junior variant for delegated tasks
1214
├── oracle.ts # Strategic advisor (GPT-5.2)
1315
├── librarian.ts # Multi-repo research (Claude Sonnet 4.5)
1416
├── explore.ts # Fast codebase grep (Grok Code)
1517
├── frontend-ui-ux-engineer.ts # UI generation (Gemini 3 Pro)
16-
├── document-writer.ts # Technical docs (Gemini 3 Flash)
18+
├── document-writer.ts # Technical docs (Gemini 3 Pro)
1719
├── multimodal-looker.ts # PDF/image analysis (Gemini 3 Flash)
20+
├── prometheus-prompt.ts # Planning agent prompt (982 lines)
21+
├── metis.ts # Plan Consultant agent (404 lines)
22+
├── momus.ts # Plan Reviewer agent (404 lines)
1823
├── build-prompt.ts # Shared build agent prompt
1924
├── plan-prompt.ts # Shared plan agent prompt
2025
├── types.ts # AgentModelConfig interface

src/auth/AGENTS.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,20 @@ Google Antigravity OAuth for Gemini models. Token management, fetch interception
99
```
1010
auth/
1111
└── antigravity/
12-
├── plugin.ts # Main export, hooks registration
12+
├── plugin.ts # Main export, hooks registration (554 lines)
1313
├── oauth.ts # OAuth flow, token acquisition
1414
├── token.ts # Token storage, refresh logic
15-
├── fetch.ts # Fetch interceptor (621 lines)
16-
├── response.ts # Response transformation (598 lines)
17-
├── thinking.ts # Thinking block extraction (571 lines)
15+
├── fetch.ts # Fetch interceptor (798 lines)
16+
├── response.ts # Response transformation (599 lines)
17+
├── thinking.ts # Thinking block extraction (755 lines)
1818
├── thought-signature-store.ts # Signature caching
1919
├── message-converter.ts # Format conversion
20+
├── accounts.ts # Multi-account management
21+
├── browser.ts # Browser automation for OAuth
22+
├── cli.ts # CLI interaction
2023
├── request.ts # Request building
2124
├── project.ts # Project ID management
25+
├── storage.ts # Token persistence
2226
├── tools.ts # OAuth tool registration
2327
├── constants.ts # API endpoints, model mappings
2428
└── types.ts

src/cli/AGENTS.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,20 @@ CLI for oh-my-opencode: interactive installer, health diagnostics (doctor), runt
99
```
1010
cli/
1111
├── index.ts # Commander.js entry, subcommand routing
12-
├── install.ts # Interactive TUI installer (477 lines)
13-
├── config-manager.ts # JSONC parsing, env detection (669 lines)
12+
├── install.ts # Interactive TUI installer (436 lines)
13+
├── config-manager.ts # JSONC parsing, env detection (725 lines)
1414
├── types.ts # CLI-specific types
15+
├── commands/ # CLI subcommands
1516
├── doctor/ # Health check system
1617
│ ├── index.ts # Doctor command entry
18+
│ ├── runner.ts # Health check orchestration
1719
│ ├── constants.ts # Check categories
1820
│ ├── types.ts # Check result interfaces
19-
│ └── checks/ # 17+ individual checks
21+
│ └── checks/ # 17+ individual checks (auth, config, dependencies, gh, lsp, mcp, opencode, plugin, version)
2022
├── get-local-version/ # Version detection
2123
└── run/ # OpenCode session launcher
24+
├── completion.ts # Completion logic
25+
└── events.ts # Event handling
2226
```
2327

2428
## CLI COMMANDS

src/features/AGENTS.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,23 @@ Claude Code compatibility layer + core feature modules. Commands, skills, agents
88

99
```
1010
features/
11-
├── background-agent/ # Task lifecycle, notifications (460 lines)
11+
├── background-agent/ # Task lifecycle, notifications (608 lines)
12+
├── boulder-state/ # Boulder state persistence
1213
├── builtin-commands/ # Built-in slash commands
13-
├── builtin-skills/ # Built-in skills (playwright)
14+
│ └── templates/ # start-work, refactor, init-deep, ralph-loop
15+
├── builtin-skills/ # Built-in skills
16+
│ ├── git-master/ # Atomic commits, rebase, history search
17+
│ └── frontend-ui-ux/ # Designer-turned-developer skill
1418
├── claude-code-agent-loader/ # ~/.claude/agents/*.md
1519
├── claude-code-command-loader/ # ~/.claude/commands/*.md
1620
├── claude-code-mcp-loader/ # .mcp.json files
1721
│ └── env-expander.ts # ${VAR} expansion
18-
├── claude-code-plugin-loader/ # installed_plugins.json (484 lines)
22+
├── claude-code-plugin-loader/ # installed_plugins.json (486 lines)
1923
├── claude-code-session-state/ # Session state persistence
24+
├── context-injector/ # Context collection and injection
2025
├── opencode-skill-loader/ # Skills from OpenCode + Claude paths
2126
├── skill-mcp-manager/ # MCP servers in skill YAML
27+
├── task-toast-manager/ # Task toast notifications
2228
└── hook-message-injector/ # Inject messages into conversation
2329
```
2430

src/hooks/AGENTS.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,42 @@
22

33
## OVERVIEW
44

5-
22 lifecycle hooks intercepting/modifying agent behavior. Context injection, error recovery, output control, notifications.
5+
22+ lifecycle hooks intercepting/modifying agent behavior. Context injection, error recovery, output control, notifications.
66

77
## STRUCTURE
88

99
```
1010
hooks/
11-
├── anthropic-context-window-limit-recovery/ # Auto-compact at token limit (554 lines)
11+
├── anthropic-context-window-limit-recovery/ # Auto-compact at token limit (556 lines)
1212
├── auto-slash-command/ # Detect and execute /command patterns
1313
├── auto-update-checker/ # Version notifications, startup toast
1414
├── background-notification/ # OS notify on task complete
15-
├── claude-code-hooks/ # settings.json PreToolUse/PostToolUse/etc
15+
├── claude-code-hooks/ # settings.json PreToolUse/PostToolUse/etc (408 lines)
1616
├── comment-checker/ # Prevent excessive AI comments
17-
│ └── filters/ # docstring, directive, bdd, etc
17+
│ ├── filters/ # docstring, directive, bdd, shebang
18+
│ └── output/ # XML builder, formatter
1819
├── compaction-context-injector/ # Preserve context during compaction
1920
├── directory-agents-injector/ # Auto-inject AGENTS.md
2021
├── directory-readme-injector/ # Auto-inject README.md
22+
├── edit-error-recovery/ # Recover from edit failures
2123
├── empty-message-sanitizer/ # Sanitize empty messages
2224
├── interactive-bash-session/ # Tmux session management
2325
├── keyword-detector/ # ultrawork/search keyword activation
2426
├── non-interactive-env/ # CI/headless handling
2527
├── preemptive-compaction/ # Pre-emptive at 85% usage
28+
├── prometheus-md-only/ # Restrict prometheus to read-only
2629
├── ralph-loop/ # Self-referential dev loop
2730
├── rules-injector/ # Conditional rules from .claude/rules/
28-
├── session-recovery/ # Recover from errors (430 lines)
31+
├── session-recovery/ # Recover from errors (432 lines)
32+
├── sisyphus-orchestrator/ # Main orchestration hook (660 lines)
33+
├── start-work/ # Initialize Sisyphus work session
34+
├── task-resume-info/ # Track task resume state
2935
├── think-mode/ # Auto-detect thinking triggers
36+
├── thinking-block-validator/ # Validate thinking block format
3037
├── agent-usage-reminder/ # Remind to use specialists
3138
├── context-window-monitor.ts # Monitor usage (standalone)
3239
├── session-notification.ts # OS notify on idle
33-
├── todo-continuation-enforcer.ts # Force TODO completion
40+
├── todo-continuation-enforcer.ts # Force TODO completion (413 lines)
3441
└── tool-output-truncator.ts # Truncate verbose outputs
3542
```
3643

src/tools/AGENTS.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@ tools/
1919
├── interactive-bash/ # Tmux session management
2020
├── look-at/ # Multimodal analysis (PDF, images)
2121
├── lsp/ # 11 LSP tools
22-
│ ├── client.ts # LSP connection lifecycle
22+
│ ├── client.ts # LSP connection lifecycle (612 lines)
23+
│ ├── utils.ts # LSP utilities (461 lines)
2324
│ ├── config.ts # Server configurations
24-
│ ├── tools.ts # Tool implementations
25+
│ ├── tools.ts # Tool implementations (405 lines)
2526
│ └── types.ts
2627
├── session-manager/ # OpenCode session file management
2728
│ ├── constants.ts # Storage paths, descriptions
2829
│ ├── types.ts # Session data interfaces
2930
│ ├── storage.ts # File I/O operations
3031
│ ├── utils.ts # Formatting, filtering
3132
│ └── tools.ts # Tool implementations
33+
├── sisyphus-task/ # Category-based task delegation (493 lines)
3234
├── skill/ # Skill loading and execution
3335
├── skill-mcp/ # Skill-embedded MCP invocation
3436
├── slashcommand/ # Slash command execution

0 commit comments

Comments
 (0)