Booca Docs
Developers

Conventions

Single source of truth for code naming, i18n translation glossary, and Chinese voice guide.

This page is the single source of truth for code naming, the i18n translation glossary, and the Chinese voice guide. Anything that used to live in packages/views/locales/glossary.md or in scattered comments now lives here.

If you write Booca code, change a translation, or write Chinese product copy, this is the page to reference.


1. Code naming

Routes

Pre-workspace routes (the routes that exist before the user is in a workspace) MUST use either a single word or the /{noun}/{verb} pattern.

  • ✅ /login, /inbox, /workspaces/new
  • ❌ /new-workspace, /create-team, /accept-invite

Hyphenated word groups at the root collide with user-chosen workspace slugs and force endless reserved-slug audits. Reserving the noun (workspaces) automatically protects the entire /workspaces/* subtree.

Workspace-scoped routes

Always live under /{slug}/{section} — /{slug}/issues, /{slug}/agents, /{slug}/settings. Never duplicate workspace routing logic; use useNavigation().push() from shared code, never framework-specific link APIs.

Packages and modules

The monorepo enforces strict package boundaries:

PackageMay depend onMust NOT depend on
packages/corenothing app-specificreact-dom, localStorage, process.env, next/*, UI libraries
packages/uinothing@booca/core, business logic
packages/viewscore/, ui/next/*, react-router-dom, stores
apps/web/platform/next/*other apps
apps/desktop/.../platform/react-router-dom, electronother apps
apps/mobile/types and pure functions from @booca/coreWeb/Desktop React pages, stores, and platform implementations

If logic appears in both apps, it MUST be extracted to a shared package. There are no exceptions for "small" duplication. Mobile owns a separate UI, data layer, and release process; it shares only types and pure functions.

Files and components

  • Files: kebab-case.tsx / kebab-case.ts (e.g. agent-row-actions.tsx)
  • Components: PascalCase (e.g. AgentRowActions)
  • Hooks: useCamelCase (e.g. useWorkspaceId)
  • Tests: colocated as <file>.test.ts(x)
  • Stores (Zustand): <feature>-store.ts, exported as use<Feature>Store

Database (Go + sqlc)

  • Tables: snake_case singular (user, workspace, agent_runtime)
  • Columns: snake_case (workspace_id, created_at, last_seen_at)
  • Foreign keys: <table>_id
  • Booleans: is_<state> or <state>_at (timestamp form preferred for state changes)
  • Migration files: NNN_descriptive_name.up.sql + .down.sql — always provide both directions
  • Do not create database foreign keys or use cascade deletes or updates; enforce relationships and cleanup in the application layer.
  • Every index must use CREATE INDEX CONCURRENTLY or CREATE UNIQUE INDEX CONCURRENTLY, with each concurrent index in its own single-statement migration file.

Go

  • Standard gofmt + go vet. No exceptions.
  • Handler files mirror domain: agent.go, auth.go, runtime.go
  • Tests: <file>_test.go colocated
  • For UUID parsing in handlers, follow the rule in the root CLAUDE.md — parseUUIDOrBadRequest for boundary input, parseUUID (panicking) for trusted round-trips, never util.ParseUUID directly without checking the error.

TypeScript

  • API responses on the wire are snake_case; the api client converts to camelCase at the boundary. Inside TS code, always camelCase.
  • Types: PascalCase (Issue, AgentRuntime); never IPrefix, never _t suffix.
  • Enums: prefer string literal unions; reserve enum for runtime-iterable cases.
  • TanStack Query keys: factory functions in <feature>/queries.ts, e.g. issueKeys.detail(id).

API boundaries

  • Parse network responses with parseWithFallback and zod schemas from packages/core/api/schema.ts; do not cast them directly with as T.
  • When adding or changing an endpoint, update its schema and cover missing or malformed fields in tests.
  • Downstream UI must provide defaults for optional fields, and every switch over a server enum must include a default branch.
  • An installed Desktop client may connect to a newer backend; never assume that frontend and backend versions always match.

Runtime display names

AgentRuntime.name is the daemon's raw technical name (e.g. Codex (host)); the user's alias lives in custom_name. User-visible copy must never render runtime.name directly — use the shared helpers so aliases and provider stay consistent (MUL-5248, #5260):

  • Standalone runtime label (lists, chips, confirm dialogs, document titles): runtimeDisplayLabel(runtime) → alias + provider, falling back to the daemon name.
  • When a provider icon/text already sits beside it: runtimeDisplayName(runtime) → alias only, no duplicated provider.
  • Inside a machine group: machine header uses machine.title, child rows use runtimeRowLabel(runtime, machine.title).
  • Runtime selectors group by machine via buildRuntimeMachines; do not build a flat list of raw names.

Raw runtime.name is allowed only for internal identity — hostname parsing, grouping, search haystacks, and protocol payloads — never for JSX text, i18n params, <Select> labels, or window titles.

Booca brand slogan

  • The official English slogan is Build Cooperative Agents. Keep this wording and capitalization in product copy and documentation.
  • The default web page title is Booca — Build Cooperative Agents. Page-specific titles retain the | Booca suffix.
  • This slogan update does not rename domains, URLs, email addresses, application identifiers, or module paths.

Booca naming

  • Product prose uses Booca; code namespace and CLI use booca; environment variables use BOOCA_*; workspace packages use @booca/*; Redis keys use booca:.
  • Product-owned persistent keys and protocol identifiers use Booca naming. Coordinate readers, writers and tests when changing a persisted or public contract.
  • Desktop identity is com.burnergames.booca. Mobile uses com.burnergames.booca.mobile, .dev / .staging environment suffixes, the booca URL scheme, and Expo slug booca-mobile. Reject unknown APP_ENV values before prebuild. Do not invent store or project IDs or copy credentials between application identities.
  • Domains, email senders, OAuth audience/issuer, image repositories and update feeds must identify configured, verified services.
  • Preserve third-party notices. Keep user content, issue identities and standard network terminology intact.

Daemon files

  • Managed runtime blocks, SDK identities, task scratch paths and generated skill collision suffixes use Booca naming.
  • Codex persistent stores use booca-sessions/<profile namespace>. Do not run concurrent writers or garbage collectors against the same store.
  • Task ownership markers and OS locks are safety boundaries. Preserve active owners and refuse ambiguous managed blocks before provider launch.
  • Model-visible skill names come from the provider's successful disk allocation, including dedicated workspaces. Never infer ownership from a user-chosen name or a marker substring.

Client storage

  • Platform storage preserves workspace/profile scope, drafts and attachment references. Reads must not overwrite concurrent edits or deletions.
  • Web/Desktop authentication uses booca_auth_epoch and booca_auth_credentials:<generation>. HTTP, WebSocket and CLI handoff use the confirmed current identity and reject late responses.
  • Mobile serializes native credential writes and cleanup. An explicit signed-out state must never restore a previous credential.
  • Locale persistence uses booca-locale; web routing and SSR share x-booca-locale.
  • Sign-out must durably invalidate the session. Do not infer that offline client data is absent from a sample of active sessions.

Desktop packaging identity

  • apps/desktop/electron-builder.yml uses appId: com.burnergames.booca and productName: Booca; package metadata and app.setName("Booca") agree.
  • Artifacts use booca-desktop-<version>-<platform>-<arch>.<ext>. The Linux executable is booca-desktop; booca is the Go CLI command.
  • Development builds use Booca Canary. The npm package is @booca/desktop, and the generic update feed is https://booca.burnergames.com/desktop/.
  • Local packaging uses --publish never; publishing requires a verified destination.

Issue keys

Every issue has a human-readable key like TST-123: workspace issue_prefix (uppercase letters and digits, typically 3 chars, max 10) + sequence number. Workspace admins can change the prefix in Settings → General; changing it renumbers every existing issue, so external references that embed the old prefix (PR titles, branch names, links in docs and chat) stop resolving.

Comments in code

English only. The repo enforces this for both Go and TypeScript. If you find a Chinese comment in code, it's a bug — replace it.

Commit messages

Conventional format: feat(scope), fix(scope), refactor(scope), docs, test(scope), chore(scope). Atomic commits grouped by intent.


2. i18n translation glossary

This is the mandatory glossary for every translation PR. It used to live at packages/views/locales/glossary.md; that file has been removed and this page replaces it.

The core distinction: everyday noun vs Booca-specific term

Booca's product nouns split into two categories:

  • Everyday noun — the word a user would say out loud for it. Translate fully, whether or not it is a database entity: issue → 任务, workspace → 工作区, project → 项目.
  • Booca-specific term — a concept no local word carries (skill), or a schema-level identifier a user may have to type or match (todo, in_progress, task_id). Render as lowercase English so it reads like a type name.

The Chinese pages under apps/docs/content/docs/*.zh.mdx are the de facto voice standard for everything else on this page. They still carry the old English issue in prose and are being swept separately — follow the table below, not those pages, for this term.

issue is the product's task — translate it

issue is the English product name for the thing a user files and an agent works on. In every other locale it is the everyday word for "task":

Entityenzh-Hansjako
the filed unit of work (issue)Issue任务タスク태스크
one agent execution run (task)Tasktask作業작업

Both nouns are user-visible and they are not the same thing — an issue can carry many runs. Never let one locale spell both with the same word, which is why the run keeps a visually distinct form in each locale.

What does not move:

  • API / DB fields stay issue / task / skill everywhere: issue_status, task_id, skill_uuid.
  • Code references and literal commands stay English: booca issue ..., the /issue Slack and Lark slash command.
  • skill keeps lowercase English in Chinese text — a Booca-specific concept with no established Chinese term; titles may capitalize as Skills.
  • issue in the "problem" sense (runtime health) is a plain noun, not the entity: {{count}} issues on a machine card is {{count}} 个异常, not 任务.

Why issue is translated while skill is not: users file and read issues all day, and "issue" has no meaning in Chinese, Japanese, or Korean outside of dev jargon. The everyday task word is what people already say for this. skill is a Booca-specific concept where no local word carries the meaning.

Other product nouns follow the same "translate what has a settled local word" test:

  • project → "项目": settled mainstream Chinese word. Feishu / Tower / Teambition / PingCode / GitHub Projects — every Chinese product translates it. No product keeps project in Chinese context.
  • autopilot → "自动化": in Chinese, "autopilot" associates with Tesla's "自动驾驶" and doesn't match what the feature does (run tasks on a schedule). Notion and Feishu both use "自动化"; that's the industry consensus.

Don't translate — brands and acronyms

CategoryTerms
BrandsBooca, GitHub, Slack, Google, Anthropic, OpenAI, Claude, Codex, Cursor, Linear, Jira
AcronymsAPI, CLI, URL, SDK, OAuth, JWT, SSO, WebSocket, HTTP, JSON, YAML, SQL

Translate fully — concepts

EnglishChinese
Workspace工作区
Agent智能体
Agent Cluster智群
Project项目
Autopilot自动化
Daemon守护进程
Runtime运行时
Inbox收件箱
Comment评论
Reply回复
Notifications通知
Member成员
Label标签
Settings设置
Onboarding上手引导

Translate fully — generic UI words

EnglishChinese
Invite / Invitation邀请
Search搜索
Email邮箱 (label) / 邮件 (action)
Password密码
Sign in / Log in登录
Sign up注册
Sign out / Log out退出登录
Save / Cancel / Delete保存 / 取消 / 删除
Confirm / Continue / Back确认 / 继续 / 返回
Edit / New / Create / Add编辑 / 新建 / 创建 / 添加
Remove / Send / Open / Close移除 / 发送 / 打开 / 关闭
Preview / Download / Upload预览 / 下载 / 上传
Done / Loading...完成 / 加载中...
Profile / Account / Appearance个人资料 / 账号 / 外观
Theme / Language主题 / 语言
Light / Dark / System浅色 / 深色 / 跟随系统
Active / Archived活跃 (or 启用) / 已归档
Status / Priority状态 / 优先级
Assignee / Reporter负责人 / 报告人
Description / Title描述 / 标题
Date / Time日期 / 时间
Today / Yesterday / Tomorrow今天 / 昨天 / 明天
Empty / Failed / Success空 / 失败 / 成功
Error / Warning错误 / 警告

Roles and status enums (lowercase English, not translated)

These are schema-level identifiers; render as lowercase English even in Chinese context.

  • Roles: owner / admin / member
  • Issue status: backlog / todo / in_progress / in_review / done / blocked / cancelled

In UI, surface them in English (optionally code-style wrapped):

  • "你需要 owner 权限"
  • "已切换到 in_progress"

Word combination rules

Always put a single space between an English word (entity / brand / acronym) and surrounding Chinese:

  • "Create new issue" → "新建任务"(任务 is Chinese, so no space)
  • "Assign to agent" → "分配给智能体"
  • "Configure runtime" → "配置运行时"
  • "Stop daemon" → "停止守护进程"

Plurals and counts

i18next uses _one / _other; Chinese has no grammatical number, only fill _other.

// en/issues.json
{
  "issue_count_one": "{{count}} issue",
  "issue_count_other": "{{count}} issues"
}

// zh-Hans/issues.json
{
  "issue_count_other": "{{count}} 个任务"
}

Common count formats:

  • {{count}} issues → {{count}} 个任务
  • {{count}} agents → {{count}} 个智能体
  • {{count}} workspaces → {{count}} 个工作区
  • {{count}} comments → {{count}} 条评论
  • {{count}} members → {{count}} 位成员
  • {{count}} skills → {{count}} 个 skill

Interpolation

Use {{var}}. Chinese translations may reorder for natural sentence flow.

// en
{ "welcome_message": "Welcome back, {{name}}!" }

// zh-Hans
{ "welcome_message": "欢迎回来,{{name}}!" }

Translation key naming

Three-level nesting: feature.component.action.

{
  "feature_or_component": {
    "subcomponent_or_section": {
      "action_or_label": "..."
    }
  }
}

Examples:

  • issues.toolbar.batch_update_success
  • issues.detail.comment_form.placeholder
  • inbox.empty.title
  • settings.preferences.language.title

Web-only / desktop-only copy

  • Shared copy: top level of the namespace JSON
  • Web-only: web section
  • Desktop-only: desktop section

See auth.json for the canonical example (the web section contains prefer_desktop / desktop_handoff.*).


3. Chinese voice and style

Punctuation

  • Full-width punctuation in Chinese: ,。:;!?
  • Quotes: straight double quotes "..." to match the English source. Do not use 「」 or curly quotes.
  • Ellipsis: three dots ... not the single character …. Match the English source.
  • Mixed Chinese-English: a single space on each side of the English word (see Word combination rules).

Style principles

  • Concise and direct. Avoid translation-ese: "对于 X 来说"、"作为 X"、"我们的"。
  • Error messages: gentle but clear. "无法保存修改" beats "保存修改失败了!".
  • Buttons: verb first, 2–4 characters. "取消"、"保存修改"、"立即同步".
  • Tooltips: full short sentence. "复制链接到剪贴板".
  • Placeholders: example-style. "输入任务标题...".

Where to look when in doubt

When the glossary doesn't cover a term, look at:

  1. apps/docs/content/docs/*.zh.mdx — the de facto Chinese voice standard, 20+ pages of consistent translation
  2. packages/views/locales/zh-Hans/auth.json and editor.json — JSON structure + selector API patterns
  3. packages/views/auth/login-page.tsx — component-level selector API call site
  4. packages/views/settings/components/preferences-tab.tsx — language switcher reference

Updating this page

If you change a rule here, also:

  1. Apply it in the relevant locale JSONs / CLAUDE.md / docs page
  2. Note the change in the PR description so reviewers know to look for downstream sweep

This page is the contract; nothing else overrides it.

Built-in workspace agent

The default workspace agent is displayed as Booca, using the orange B brand avatar. Keep the persisted system_key=mika and API routes stable for existing clients. Built-in skill identifiers follow the rules below. Only untouched default profile fields are backfilled; custom names, avatars and instructions remain workspace-owned.

Agent Cluster

Booca Agent Cluster (智群 in Chinese) is a project issue routing group of independent agents using round-robin or weighted round-robin. It has no leader and is not an assignee type. Use agent_cluster for wire/database identifiers, agent-clusters for routes/files, and camelCase for the new TypeScript domain after API parsing.

Built-in skills and default profiles

Product-owned skills use booca-* directories and builtin:booca-* IDs. Source maps, embedded paths, runtime references and bundle hashes stay consistent. Workspace and plugin skill names remain user-owned.

Builtin identity comes from the verified bundle source. If a user directory or another skill would displace a stable slug, refuse preparation before starting the provider and preserve user files. The onboarding assistant is Booca Helper; custom names, avatars and instructions remain workspace-owned.

Plugin protocols

  • Plugin archives use booca.plugin.json; published canonical content is immutable.
  • SDK consumers use booca and BoocaPluginError. A bootstrap port is claimed once; source, challenge, protocol and sandbox checks are mandatory.
  • Surface launch URLs use authenticated b2. tokens with a dedicated key domain. Failed verification must not downgrade to another domain.
  • Hook v2 uses whsec_b2_ secrets and the complete X-Booca-* header family, authenticating timestamp, installation UUID and raw bytes. Send one POST per delivery; do not downgrade after verification failure.
  • Pagination uses the indivisible X-Booca-Next-Before / X-Booca-Next-Before-Id pair. A partial pair is an error. Invalid retry/scope values must not trigger a fallback.
  • In-client navigation uses booca:navigate; HTML scroll messages use __booca with source and content-token checks. Do not dispatch duplicate events.
  • Slack outbound metadata uses booca_channel_outbound. Preserve historical messages and user content.

Stored identities

  • Channel binding business queries use booca_user_id. Identity consistency, constraint validation and index creation must be verified; generated internal scan fields must not leak into JSON.
  • Workspace deletion sets transaction-local booca.workspace_teardown. Failed or rolled-back transactions must not leak the setting into reused connections.
  • Channel media uses <!-- booca:channel-media:UUID -->. Conflict checks may normalize recognized provenance comments, while preserving real prose conflicts, malformed text and attachment permissions.
  • Product-owned runtime values use booca_agent and booca_daemon; custom profiles and provider aliases remain user-owned.
  • All concurrent writers must use the same seat-capacity advisory-lock identity. Changing a hash seed without coordinating writers breaks mutual exclusion.

Platform credentials

  • Issued credentials use booca_pat_, booca_daemon_, booca_task_, booca_plugin_install_ and booca_plugin_callback_. A prefix selects a verifier and never grants identity or permissions. External issuer contracts are verified separately.
  • Unset/empty BOOCA_TOKEN_ISSUANCE means booca; unsupported values reject startup before listeners or workers.
  • Hash the complete original token. Never rewrite credential bytes or database hashes. PAT renewal extends the same credential; rotation creates and validates a new credential before revoking the previous one.
  • Bearer validation determines the actor. Machine credentials cannot manage personal tokens, exchange a CLI JWT or rotate plugin credentials; Cookies and forged actor headers cannot override this boundary. Redact credentials from logs and stored task output.

Redis cache and coordination

  • Auth and runtime model catalog keys use booca:. Rebuild auth caches from authoritative data; preserve expiry and revocation semantics.
  • Fixed-window booca:ratelimit: and sliding-window booca:webhook:* / booca:invitation:* preserve usage and absolute expiry. All writers share the same namespace.
  • Runtime pending, heartbeat and claim/version/reclaim families use booca: with the {runtime_pending} hash tag where applicable. Generic ws:* transport keys remain distinct.
  • Channel leases use booca:channel-lease:v1:<namespace>:. Preserve random node ID/generation owner-token fencing. booca-api:<suffix> is the Redis client display name.
  • Preserve pending/terminal request bytes, identities and indices. Never requeue an executing import or infer that a consumer stopped from an expired request status.
  • Auth falls back to authoritative verification, public edge limits fail open, and invitation admission fails closed. Failed invalidation or concurrent fills can retain positive cache entries until their TTL.

Container images

  • Application images are booca-backend and booca-web. Record immutable digests, architecture, source revision and build time. BOOCA_IMAGE_NAMESPACE must match the configured repository owner in lowercase.
  • Build contexts include only listed server/Web/shared-package inputs. Exclude credentials, agent state, generated files and runtime data while retaining Go-embedded instructions. Preserve backend permissions and the Web nextjs user.
  • The entrypoint shares one fresh database startup timestamp between schema setup and API startup, propagates failures/signals, and execs the API only after schema setup succeeds.
  • Web API proxy configuration is read at runtime through REMOTE_API_URL; browser requests stay same-origin.

Compose and development storage

  • Compose projects, image tags, database/role defaults and development DB prefixes use booca. Generic service names remain stable.
  • Explicitly select external PostgreSQL and uploads volumes with BOOCA_PGDATA_VOLUME and BOOCA_UPLOADS_VOLUME. Missing selections fail before up. Initialize new storage with make storage-init; never replace existing data with an empty volume.
  • Preserve JWT and integration encryption keys, database ownership/ACLs, sequence state, attachment bytes and permissions during maintenance. Editing POSTGRES_DB / POSTGRES_USER does not rename an initialized database or role.
  • Development registries use ~/.booca/dev; explicit isolated registry overrides remain supported. Startup and destruction share a lifecycle lock.
  • Before deletion, revalidate the manifest, stopped writers/listeners and exact local database URL. Protect main and system databases. Cancellation or target rejection stops reset before recreation.
  • ENV_FILE selects the same configuration for initialization, Compose, health probes and database operations. make command-line values outrank its included env file, which outranks ambient values; direct Compose gives ambient values precedence. Verify native Windows ACLs on Windows.

Helm and Kubernetes

  • The source chart is deploy/helm/booca. Supply application repositories and exactly one tag or digest explicitly; chart metadata does not prove image availability.
  • Rendering checks existing Deployment ownership and complete immutable selectors before applying changes. Offline helm template cannot prove cluster upgrade safety. Never force ownership of another release's resources.
  • Chart-created PostgreSQL and uploads PVCs use helm.sh/resource-policy: keep. Verify UID, PV/claimRef and current data before selecting retained claims through postgres.persistence.existingClaim and backend.uploads.persistence.existingClaim. PostgreSQL and uploads require separate claims; another live Pod cannot share the PostgreSQL claim. Namespace deletion can still delete retained claims.
  • Disabling uploads persistence requires backend.config.s3Bucket. Cross-node uploads need suitable ReadWriteMany or object storage; ReadWriteOncePod allows one replica and requires CSI support.
  • Use a pre-created Secret and URL-safe built-in PostgreSQL passwords. External PostgreSQL uses an encoded DATABASE_URL. A Secret edit alone neither restarts Pods nor rotates existing credentials.
  • Multiple backend replicas require shared Redis and cross-Pod realtime validation in addition to the schema lock. URL validation cannot prove service availability; multi-replica Redis URL query options are unsupported.
  • Metrics use an optional ClusterIP port, separate from Ingress. Monitoring CRDs and selectors must discover this release; alerts retain namespace/release/service labels.
  • /healthz is readiness and /health is liveness. A temporary database outage removes ready endpoints without restarting a healthy process. Helm rollback restores configuration, not database contents or schema.

Release and installation safety

  • Release jobs require exact BOOCA_RELEASE_REPOSITORY and owner-matching BOOCA_IMAGE_NAMESPACE. Missing or foreign targets cannot publish. Desktop CI builds do not upload the update feed; Homebrew/Scoop publication is not configured.
  • Record image digests and Chart package SHA-256. latest and appVersion alone do not identify a deployment.
  • The versioned CLI installer feed (version, release.json, versions/<version>/) and latest updater (generation, versions/latest/) are separate protocols. Use BOOCA_RELEASE_BASE_URL for installers and booca update --release-url for updates.
  • Installers preserve unknown directories, reject foreign origins or tracked edits, and stop on fetch/checkout failure. Verify the source commit before Compose runs. Test console service registration in a separate user/container; temporary HOME does not isolate a macOS UID's launchd services.
  • Back up current storage and secrets privately before maintenance; verify restoration into independent storage. Preserve writes made after an upgrade when selecting compatible recovery artifacts.
  • Root installation/release guides and all four self-host quickstarts share naming, storage and Booca support requirements.