- Monorepo managed by
bunworkspaces and Turborepo. apps/storybook: Storybook for component docs; stories inapps/storybook/stories.apps/sample: Next.js sample app; code inapps/sample/src, assets inapps/sample/public.packages/krds: Core KRDS design system (TypeScript, React, MUI). Source inpackages/krds/src, build output indist.packages/krds-icons: React icon components. Source inpackages/krds-icons/src, build output indist.
- Root install:
bun install(usesbun@1). - Develop all (parallel):
bun run dev(Turbo runs each package’sdev). - Build all:
bun run build(Turbo cachesdist,.next,storybook-static). - Test (watch/interactive):
bun run test— Vitest acrossapps/*andpackages/*. - Test (CI):
bun run test:ci— non-watch run. - Per app/package examples:
- Storybook:
bun run --cwd apps/storybook dev|bun run --cwd apps/storybook build - Sample app:
bun run --cwd apps/sample dev|bun run --cwd apps/sample build - Libraries:
bun run --cwd packages/krds dev|bun run --cwd packages/krds-icons dev(tsup watch)
- Storybook:
- Language: TypeScript; React 19; MUI v7 peer deps in
packages/krds. - Formatter/Linter: Biome (
biome.json). Spaces indentation; double quotes; organized imports;kebab-casefilenames enforced. - Pre-commit: lint-staged runs
biome check --fix;package.jsonis normalized bysort-package-json. - Do not edit
dist; change files undersrconly.
- Framework: Vitest (
vitest.config.ts;passWithNoTests: true). - Location/Names: co-locate tests with code using
*.test.tsor*.test.tsx. - Run:
bun run testlocally; add UI changes to Storybook stories inapps/storybook/stories.
- Commits: Conventional Commits enforced by commitlint (e.g.,
feat:,fix:,docs:,chore:). - PRs should include: clear description, linked issues, screenshots/GIFs for UI, and notes on Storybook/story or test updates.
- Keep diffs minimal and focused; update docs and stories when introducing or changing components.
- Use
bunconsistently; avoidnpm/yarn/pnpmlockfiles. - Never commit secrets; if needed for apps, use local
.envfiles ignored by VCS. - Publishing: root script
publish-packagesruns builds and Changesets; do not run it from forks.
- SSOT:
.agents/directory (do not modify directly) - Response language: Follows
languagein.agents/oma-config.yaml - Skills:
.agents/skills/(domain specialists) - Workflows:
.agents/workflows/(multi-step orchestration) - Subagents: Same-vendor native dispatch via Codex custom agents in
.codex/agents/{name}.toml; cross-vendor fallback viaoma agent:spawn
- Resolve
target_vendor_for_agentfrom.agents/oma-config.yaml. - If
target_vendor_for_agent === current_runtime_vendor, use the runtime's native subagent path. - If vendors differ, or native subagents are unavailable, use
oma agent:spawnfor that agent only.
Execute by naming the workflow in your prompt. Keywords are auto-detected via hooks.
| Workflow | File | Description |
|---|---|---|
| orchestrate | orchestrate.md |
Parallel subagents + Review Loop |
| work | work.md |
Step-by-step with remediation loop |
| ultrawork | ultrawork.md |
5-Phase Gate Loop (11 reviews) |
| plan | plan.md |
PM task breakdown |
| brainstorm | brainstorm.md |
Design-first ideation |
| review | review.md |
QA audit |
| debug | debug.md |
Root cause + minimal fix |
| scm | scm.md |
SCM + Git operations + Conventional Commits |
To execute: read and follow .agents/workflows/{name}.md step by step.
Hooks: UserPromptSubmit (keyword detection), PreToolUse, Stop (persistent mode)
Keywords defined in .agents/hooks/core/triggers.json (multi-language).
Persistent workflows (orchestrate, ultrawork, work) block termination until complete.
Deactivate: say "workflow done".
- Do not modify
.agents/files — SSOT protection - Workflows execute via keyword detection or explicit naming — never self-initiated
- Response language follows
.agents/oma-config.yaml
Read the relevant file from .agents/rules/ when working on matching code.
| Rule | File | Scope |
|---|---|---|
| backend | .agents/rules/backend.md |
on request |
| commit | .agents/rules/commit.md |
on request |
| database | .agents/rules/database.md |
**/*.{sql,prisma} |
| debug | .agents/rules/debug.md |
on request |
| design | .agents/rules/design.md |
on request |
| dev-workflow | .agents/rules/dev-workflow.md |
on request |
| frontend | .agents/rules/frontend.md |
**/*.{tsx,jsx,css,scss} |
| i18n-guide | .agents/rules/i18n-guide.md |
always |
| infrastructure | .agents/rules/infrastructure.md |
**/*.{tf,tfvars,hcl} |
| mobile | .agents/rules/mobile.md |
**/*.{dart,swift,kt} |
| quality | .agents/rules/quality.md |
on request |