chore(web): move site under packages

This commit is contained in:
YeonGyu-Kim
2026-05-18 16:44:02 +09:00
parent 5e9a26c1c5
commit bf96794599
82 changed files with 27 additions and 27 deletions
+3 -3
View File
@@ -4,13 +4,13 @@ on:
push:
branches: [master, dev]
paths:
- "web/**"
- "packages/web/**"
- "docs/**"
- ".github/workflows/web-ci.yml"
pull_request:
branches: [master, dev]
paths:
- "web/**"
- "packages/web/**"
- "docs/**"
- ".github/workflows/web-ci.yml"
@@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
working-directory: packages/web
steps:
- uses: actions/checkout@v4
+3 -3
View File
@@ -10,7 +10,7 @@ on:
push:
branches: [master, dev]
paths:
- "web/**"
- "packages/web/**"
- "docs/**"
- ".github/workflows/web-deploy.yml"
@@ -26,7 +26,7 @@ jobs:
url: https://ohmyopenagent.com
defaults:
run:
working-directory: web
working-directory: packages/web
permissions:
contents: read
deployments: write
@@ -52,5 +52,5 @@ jobs:
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: web
workingDirectory: packages/web
command: ${{ inputs.environment && format('deploy --env {0}', inputs.environment) || 'deploy' }}
+7 -7
View File
@@ -4,7 +4,7 @@
## OVERVIEW
OpenCode plugin (npm: `oh-my-opencode`, dual-published as `oh-my-openagent` during the rename transition) extending OpenCode with 11 agents, 5461 lifecycle hooks (base / +team-mode) across 59 dirs, 2039 tools (gated by config flags including team-mode), 3-tier MCP system (built-in + .mcp.json + skill-embedded), Hashline LINE#ID edit tool, IntentGate keyword detector, Team Mode (parallel multi-agent coordination, OFF by default), Boulder feature (boulder-state work tracking + cli/boulder subcommand), configurable agent ordering, and Claude Code compatibility. **Repository contains 2165 TypeScript files across `src/`, `script/`, `test-support/`, and `web/`, ~314k LOC; `src/` itself has 122 barrel `index.ts` files.** Entry: `src/index.ts` is now an 18-line wrapper that delegates to `src/testing/create-plugin-module.ts` `createPluginModule()` → 7-step init.
OpenCode plugin (npm: `oh-my-opencode`, dual-published as `oh-my-openagent` during the rename transition) extending OpenCode with 11 agents, 5461 lifecycle hooks (base / +team-mode) across 59 dirs, 2039 tools (gated by config flags including team-mode), 3-tier MCP system (built-in + .mcp.json + skill-embedded), Hashline LINE#ID edit tool, IntentGate keyword detector, Team Mode (parallel multi-agent coordination, OFF by default), Boulder feature (boulder-state work tracking + cli/boulder subcommand), configurable agent ordering, and Claude Code compatibility. **Repository contains 2165 TypeScript files across `src/`, `script/`, `test-support/`, and `packages/web/`, ~314k LOC; `src/` itself has 122 barrel `index.ts` files.** Entry: `src/index.ts` is now an 18-line wrapper that delegates to `src/testing/create-plugin-module.ts` `createPluginModule()` → 7-step init.
## STRUCTURE
@@ -30,8 +30,8 @@ oh-my-opencode/
│ ├── openclaw/ # Bidirectional external integration (Discord/Telegram/HTTP/shell + reply listener daemon)
│ ├── generated/ # model-capabilities.generated.json (refreshed via build:model-capabilities)
│ └── testing/ # Test utilities + `create-plugin-module.ts` (extracted plugin entry factory, 182 LOC)
├── web/ # Marketing site (Next.js 15 + Cloudflare Workers, deployed to ohmyopenagent.com via opennextjs-cloudflare). Independent package with own bun.lock — see web/AGENTS.md
├── packages/ # 11 platform-specific binary packages + lsp-tools-mcp submodule
├── packages/ # 11 platform-specific binary packages, lsp-tools-mcp submodule, and web package
│ └── web/ # Marketing site (Next.js 15 + Cloudflare Workers). Independent package with own bun.lock
├── bin/ # Platform-detection JS shim (oh-my-opencode + oh-my-openagent)
├── script/ # Build/publish automation (singular, not scripts/)
├── docs/ # User-facing docs (guide/, reference/, examples/, legal/, manifesto.md, superpowers/, troubleshooting/)
@@ -197,7 +197,7 @@ Schema autocomplete: `"$schema": "https://raw.githubusercontent.com/code-yeongyu
- **Factory pattern:** `createXXX()` for all tools, hooks, agents.
- **File naming:** kebab-case for files and directories.
- **Module structure:** `index.ts` barrel exports, **no catch-all files** (`utils.ts`, `helpers.ts`, `service.ts` banned), 200 LOC soft limit per file.
- **Imports:** relative within a module, barrel imports across modules (`import { log } from "./shared"`). **No path aliases in `src/`** — never `@/`. `web/` is the only exception: it uses `@/*` (Next.js convention) and has its own tsconfig.
- **Imports:** relative within a module, barrel imports across modules (`import { log } from "./shared"`). **No path aliases in `src/`** — never `@/`. `packages/web/` is the only exception: it uses `@/*` (Next.js convention) and has its own tsconfig.
- **Config format:** JSONC with comments + trailing commas, Zod v4 validation, snake_case keys.
- **Dual package:** `oh-my-opencode` + `oh-my-openagent` published simultaneously during the rename transition.
- **Comments:** AI slop comment patterns blocked by `comment-checker` hook (binary: `@code-yeongyu/comment-checker`). Use `// @allow` to bypass single line, `// comment-checker-disable-file` at file top to bypass file. Sparingly.
@@ -247,8 +247,8 @@ bunx oh-my-opencode mcp-oauth login <server-url> # Tier-3 MCP OAuth (PKCE + DCR
| `refresh-model-capabilities.yml` | weekly cron / dispatch | Refresh model capabilities from models.dev API |
| `cla.yml` | issue_comment / PR | CLA assistant for contributors |
| `lint-workflows.yml` | push/PR touching `.github/workflows/**` | actionlint only (`shellcheck=""` disables shellcheck) |
| `web-ci.yml` | push/PR to master/dev touching `web/**`, `docs/**`, or the workflow file itself | format-check, lint, type-check, next build, opennextjs-cloudflare build |
| `web-deploy.yml` | push to master/dev touching `web/**`, `docs/**`, or the workflow file itself, OR manual dispatch | Cloudflare Workers deploy via `cloudflare/wrangler-action@v3` (requires `CLOUDFLARE_API_TOKEN` + `CLOUDFLARE_ACCOUNT_ID` secrets) |
| `web-ci.yml` | push/PR to master/dev touching `packages/web/**`, `docs/**`, or the workflow file itself | format-check, lint, type-check, next build, opennextjs-cloudflare build |
| `web-deploy.yml` | push to master/dev touching `packages/web/**`, `docs/**`, or the workflow file itself, OR manual dispatch | Cloudflare Workers deploy via `cloudflare/wrangler-action@v3` (requires `CLOUDFLARE_API_TOKEN` + `CLOUDFLARE_ACCOUNT_ID` secrets) |
## NOTES
@@ -259,7 +259,7 @@ bunx oh-my-opencode mcp-oauth login <server-url> # Tier-3 MCP OAuth (PKCE + DCR
- **Two fallback systems:** `model-fallback` (proactive, chat.params, hardcoded chains) vs `runtime-fallback` (reactive, session.error, configurable per-category/agent).
- **Config migration:** idempotent via `_migrations` tracking, atomic writes with timestamped backups.
- **Build:** `bun build` (ESM) + `tsc --emitDeclarationOnly`, externals: `@ast-grep/napi`, `zod`.
- **CI tests:** root tests run through plain `bun test`; `web/**` has its own package-level CI workflow.
- **CI tests:** root tests run through plain `bun test`; `packages/web/**` has its own package-level CI workflow.
- **122 barrel `index.ts` files** establish module boundaries.
- **Architecture rules** enforced via the `rules-injector` hook reading `.omo/rules/*.md`. As of v4.2.0 only `test-discipline.md` ships; legacy `modular-code-enforcement.md` was retired.
- **Windows builds:** run on `windows-latest` (not cross-compiled) to avoid Bun segfaults.
+1 -1
View File
@@ -1,3 +1,3 @@
[test]
preload = ["./test-setup.ts"]
pathIgnorePatterns = ["web/**", "packages/lsp-tools-mcp/**"]
pathIgnorePatterns = ["packages/web/**", "packages/lsp-tools-mcp/**"]
+12 -12
View File
@@ -1,4 +1,4 @@
# web/ — Marketing Site (Next.js + Cloudflare Workers)
# packages/web/ — Marketing Site (Next.js + Cloudflare Workers)
**Generated:** 2026-05-14
@@ -22,7 +22,7 @@ Public-facing marketing site for oh-my-opencode / oh-my-openagent. Next.js 15 (A
## STRUCTURE
```
web/
packages/web/
├── app/[locale]/ # localized routes (App Router)
├── components/ # shared UI primitives + shadcn-generated
├── lib/ # utility helpers (cn, etc.)
@@ -46,7 +46,7 @@ web/
## SCRIPTS
```bash
# from web/ directory
# from packages/web/ directory
bun install
bun run dev # next dev (local Node.js)
bun run lint # biome lint + eslint
@@ -63,10 +63,10 @@ bun run cf-typegen # regenerate cloudflare-env.d.ts from wrangler.toml bin
## CI/CD
| Workflow | Trigger | What |
| ---------------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------- |
| `.github/workflows/web-ci.yml` | push/PR to master/dev that touches `web/**` | format check, lint, type-check, next build, opennextjs-cloudflare build |
| `.github/workflows/web-deploy.yml` | push to master that touches `web/**` OR manual dispatch | full deploy via `cloudflare/wrangler-action@v3` |
| Workflow | Trigger | What |
| ---------------------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `.github/workflows/web-ci.yml` | push/PR to master/dev that touches `packages/web/**` | format check, lint, type-check, next build, opennextjs-cloudflare build |
| `.github/workflows/web-deploy.yml` | push to master that touches `packages/web/**` OR manual dispatch | full deploy via `cloudflare/wrangler-action@v3` |
**Required secrets** (must be configured in repo settings before deploy works):
@@ -77,19 +77,19 @@ A `web-production` GitHub environment is referenced by the deploy workflow so de
## RELATIONSHIP TO npm PACKAGE
The npm package `oh-my-opencode` ships only `dist/`, `bin/`, and `postinstall.mjs` (see root `package.json` `files` field). `web/` is **not** included in any npm publish — it is exclusively a separate Cloudflare deployment target.
The npm package `oh-my-opencode` ships only `dist/`, `bin/`, and `postinstall.mjs` (see root `package.json` `files` field). `packages/web/` is **not** included in any npm publish — it is exclusively a separate Cloudflare deployment target.
Root `bun test` is scoped to `bin script src` (see root `package.json`) so `web/e2e/*.spec.ts` does not pollute plugin tests.
Root `bun test` ignores `packages/web/**` through `bunfig.toml` so `packages/web/e2e/*.spec.ts` does not pollute plugin tests.
## CONVENTIONS
- **No path aliases globally** in the omo project, but `web/` is a Next.js app where `@/*` aliases are the framework default. Keep `@/*` confined to web/.
- **No path aliases globally** in the omo project, but `packages/web/` is a Next.js app where `@/*` aliases are the framework default. Keep `@/*` confined to packages/web/.
- Use the existing shadcn primitives in `components/ui/` rather than installing new UI libs.
- All user-facing copy goes through `messages/{locale}.json`; never hardcode strings in components.
- Format with prettier before commit — `web-ci.yml` enforces `format:check`.
## ANTI-PATTERNS
- Never run `npm install` in `web/`. Use `bun install` only. (Root `.gitignore` already blocks `package-lock.json`.)
- Never commit `.next/`, `.open-next/`, `.wrangler/`, `node_modules/` (covered by `web/.gitignore`).
- Never run `npm install` in `packages/web/`. Use `bun install` only. (Root `.gitignore` already blocks `package-lock.json`.)
- Never commit `.next/`, `.open-next/`, `.wrangler/`, `node_modules/` (covered by `packages/web/.gitignore`).
- Never deploy locally with `bun run deploy` against production — use the GitHub Actions workflow so Cloudflare credentials live in one place.

Before

Width:  |  Height:  |  Size: 292 B

After

Width:  |  Height:  |  Size: 292 B

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 283 B

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Before

Width:  |  Height:  |  Size: 743 KiB

After

Width:  |  Height:  |  Size: 743 KiB

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Before

Width:  |  Height:  |  Size: 888 KiB

After

Width:  |  Height:  |  Size: 888 KiB

@@ -14,7 +14,7 @@ const SECTIONS = [
{ id: "manifesto", file: "manifesto.md" },
]
const DOCS_ROOT = path.resolve(process.cwd(), "..", "docs")
const DOCS_ROOT = path.resolve(process.cwd(), "..", "..", "docs")
const OUTPUT = path.resolve(process.cwd(), "lib", "docs-content.generated.ts")
const sectionIdByFile = new Map(SECTIONS.map((section) => [section.file, section.id]))