byterover

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ByteRover — durable project memory

ByteRover — 持久化项目记忆

ByteRover keeps project knowledge as a deterministic context tree. You are the brain; the engine never calls an LLM. You do the reasoning, then run the bundled deterministic scripts (via your Bash tool) to retrieve or persist knowledge.
ByteRover 将项目知识存储为确定性上下文树。你是核心大脑;引擎绝不会调用LLM。 由你来进行推理,然后运行内置的确定性脚本(通过你的Bash工具)来检索或留存知识。

Iron Law

铁律

  1. Query before you think. At the start of any non-trivial task, retrieve what the project already knows so you don't re-derive or contradict it.
  2. Curate after you implement. When you finish something worth remembering (a decision, a gotcha, a pattern), write it back so the next session inherits it.
  1. 思考前先查询。在开展任何重要任务前,先检索项目已有的知识,避免重复推导或与已有内容冲突。
  2. 实现后再整理。当你完成值得记录的内容(一项决策、一个易错点、一种模式)时,将其写回系统,以便后续会话可以继承这些知识。

Where memory lives

记忆存储位置

The engine resolves the right context tree from your working directory. You do not compute, look up, or override the storage path. Run commands from inside the project (any subdirectory works) and the right tree is found automatically — the resolver and registry are engine-internal.
引擎会从你的工作目录中解析出对应的上下文树。你无需计算、查找或覆盖存储路径。 在项目内(任何子目录均可)运行命令,系统会自动找到对应的树——解析器和注册表是引擎内部组件。

Language

语言规则

Match the user's input language. Author the human-readable content in whatever language the user is conversing in — body text of
<bv-*>
elements, list items, and the
title
/
summary
attributes on
<bv-topic>
. There is no setting and no flag; you infer the language from the conversation, the same way you already do when replying.
The schema stays English. Keep tag names (
<bv-fact>
, never a translated tag), attribute names (
subject
,
category
,
severity
), enum values (
category="project"
,
subject="visa_required"
), and the
path
attribute in English for tooling consistency. Code snippets and identifiers stay verbatim.
Concrete (Vietnamese conversation):
path="travel/vietnam_visa"
and
subject="visa_required" category="project"
stay English, while
title="Yêu cầu visa Việt Nam"
and the
<bv-fact>
body (
Người Mỹ cần visa để vào Việt Nam.
) are Vietnamese. Same rule for Chinese, Japanese, Korean, Russian, Arabic, etc.
匹配用户输入的语言。用户对话使用什么语言,你就用什么语言编写人类可读的内容——包括
<bv-*>
元素的正文、列表项,以及
<bv-topic>
title
/
summary
属性。无需设置或标记,你只需像回复用户一样,从对话中推断语言即可。
架构部分保持英文。请保持标签名称(如
<bv-fact>
,绝不要翻译)、属性名称(如
subject
category
severity
)、枚举值(如
category="project"
subject="visa_required"
)和**
path
**属性为英文,以保证工具的一致性。代码片段和标识符保持原样。
示例(越南语对话场景):
path="travel/vietnam_visa"
subject="visa_required" category="project"
保持英文,而
title="Yêu cầu visa Việt Nam"
以及
<bv-fact>
的正文(
Người Mỹ cần visa để vào Việt Nam.
)使用越南语。中文、日语、韩语、俄语、阿拉伯语等语言遵循相同规则。

Commands

命令列表

Run from inside the project (any subdirectory). Topics are stored as
<bv-*>
HTML. Spaces (including the default) are provisioned through the ByteRover desktop app — the agent never creates them.
NeedCommand
Retrieve
node scripts/query.mjs "<question>" --limit 5
Save (rich, multi-element topics)
node scripts/record.mjs "<topic-path>" --html '<bv-topic …>…</bv-topic>'
see the worked example in "Authoring rich topics" below; do NOT improvise the shape from this row
Save (simple, single-fact topics)
node scripts/record.mjs "<topic-path>" --title "T" --summary "S" --keywords a,b --body "..."
Save many topics in one call
node scripts/record.mjs --batch --input <ndjson-file>
(one JSON spec per line:
{"path":"...","html":"<bv-topic …>…</bv-topic>","overwrite"?:true}
; one auth check + one manifest/index rebuild for the whole batch — meaningfully faster than recording N topics one-at-a-time; per-line failures are reported in
failed[]
and don't abort the run)
Required
<bv-topic>
attributes:
path
and
title
MUST be present and non-empty on the topic root or the writer rejects the call. The
path
on
<bv-topic>
should match the positional
<topic-path>
you pass to
record.mjs
. See vocabulary.md for the full attribute spec. | Read |
node scripts/brv.mjs read "<topic-path>.html" [--raw]
(use
--raw
to get the on-disk HTML byte-for-byte — required when round-tripping through
record --html
, since
elements[].text
flattens inner
<ul>
/
<li>
/
<strong>
formatting) | | List |
node scripts/brv.mjs list
| | Rebuild manifest + index |
node scripts/manifest.mjs
| | Detect consolidation opportunities |
node scripts/dream.mjs --mode merge\|link\|prune\|synthesize
(proposes — never executes) | | Fold one topic into another |
node scripts/merge.mjs <survivor> <loser> [--title "…"] [--summary "…"] [--tags a,b] [--keywords a,b] [--reason "…"] [--related @x.html,@y.html]
(use
--title
to give the survivor a new title that reflects the merged scope — without it, the survivor keeps its own title even when the merged content is broader) | | Remove redundant topics |
node scripts/prune.mjs <topic-path>...
(variadic, atomic — aborts on first failure with a partial report) | | Combine many topics into a new one |
node scripts/synthesize.mjs <new-path> --html '<bv-topic …>…</bv-topic>' --absorb a.html,b.html,c.html
| | Rename / move / re-parent a topic within the current space |
node scripts/move.mjs <topic-path> --to-path <new-path>
(atomic — siblings'
related=
refs are rewritten to the new path; signal sidecar carries over; covers all of rename, move-to-new-parent, deep re-parent, and combined) | | Add or remove a
related=
cross-link between two topics |
node scripts/brv.mjs link "<a>" "<b>" [--bidirectional] [--remove]
(atomic byte-preserving edit of the
<bv-topic related="…">
attribute — use this instead of hand-editing the opening tag, which is unsafe for summaries containing
>
characters; idempotent — re-linking is a noop; refuses to add a ref to a topic that doesn't exist (would dangle) — but
--remove
allows missing targets so you can clean up existing dangling refs) | | Move a topic to a different space |
node scripts/move.mjs <topic-path> --from-space <name> --to-space <name>
(rebuilds manifest + index in both spaces; reports any sibling
related=
refs in the source that now dangle) | | Migrate legacy markdown |
node scripts/migrate.mjs [--dry-run]
| | Migrate a self-hosted v3 VPS → v4 (full guided procedure) | follow migrate-v3-to-v4.md | | Authenticate / log in to ByteRover |
node scripts/auth.mjs
— returns at once; the user approves in the browser, then
auth.mjs status
; see Authenticate with ByteRover | | Check whether signed in (local, no network) |
node scripts/auth.mjs whoami
— prints
{ ok, authed, providerKind }
(a credential exists locally; not a server-side validity check) | | Log out of ByteRover |
node scripts/logout.mjs
| | See which space this folder uses |
node scripts/space.mjs current
| | List spaces (grouped by
team_name
) |
node scripts/space.mjs list
| | Bind this folder to a space |
node scripts/space.mjs bind "<name>"
|
To delete a topic, surface the request to the user — deletions happen through the ByteRover desktop app.
Every command prints a JSON result. On
{ "ok": false, ... }
read troubleshooting.md.
在项目内(任何子目录均可)运行以下命令。主题以
<bv-*>
格式的HTML存储。存储空间(包括默认空间)通过ByteRover桌面应用配置——Agent绝不会自行创建空间。
需求命令
检索知识
node scripts/query.mjs "<question>" --limit 5
保存(富文本、多元素主题)
node scripts/record.mjs "<topic-path>" --html '<bv-topic …>…</bv-topic>'
请参考下方「创作富文本主题」中的示例;请勿根据本行内容自行编写格式
保存(简单、单事实主题)
node scripts/record.mjs "<topic-path>" --title "T" --summary "S" --keywords a,b --body "..."
批量保存多个主题
node scripts/record.mjs --batch --input <ndjson-file>
(每行一个JSON规范:
{"path":"...","html":"<bv-topic …>…</bv-topic>","overwrite"?:true}
;整个批量操作仅需一次身份验证 + 一次清单/索引重建——比逐个保存N个主题快得多;每行的失败信息会记录在
failed[]
中,且不会终止整个运行)
<bv-topic>
必填属性:
主题根元素必须包含非空的
path
title
,否则写入操作会被拒绝。
<bv-topic>
path
应与你传递给
record.mjs
<topic-path>
参数一致。完整属性规范请参考vocabulary.md。 | 读取主题 |
node scripts/brv.mjs read "<topic-path>.html" [--raw]
(使用
--raw
参数可获取磁盘上的原始HTML字节内容——当通过
record --html
进行往返操作时必须使用该参数,因为
elements[].text
会扁平化内部
<ul>
/
<li>
/
<strong>
等格式) | | 列出主题 |
node scripts/brv.mjs list
| | 重建清单与索引 |
node scripts/manifest.mjs
| | 检测知识整合机会 |
node scripts/dream.mjs --mode merge\|link\|prune\|synthesize
(仅提出建议——绝不会自动执行) | | 合并主题 |
node scripts/merge.mjs <survivor> <loser> [--title "…"] [--summary "…"] [--tags a,b] [--keywords a,b] [--reason "…"] [--related @x.html,@y.html]
(使用
--title
参数可为保留的主题设置新标题,以反映合并后的范围——若不设置,保留的主题将沿用原标题,即使合并后的内容范围更广) | | 删除冗余主题 |
node scripts/prune.mjs <topic-path>...
(支持多个参数,原子操作——首次失败时会终止并返回部分报告) | | 将多个主题合并为新主题 |
node scripts/synthesize.mjs <new-path> --html '<bv-topic …>…</bv-topic>' --absorb a.html,b.html,c.html
| | 在当前空间内重命名/移动/重新归类主题 |
node scripts/move.mjs <topic-path> --to-path <new-path>
(原子操作——会自动重写同级主题的
related=
引用为新路径;附带的信号文件会一并转移;支持重命名、移动到新父目录、深度重新归类及组合操作) | | 在两个主题间添加或移除
related=
交叉链接 |
node scripts/brv.mjs link "<a>" "<b>" [--bidirectional] [--remove]
(对
<bv-topic related="…">
属性进行原子化的字节级编辑——请使用该命令而非手动编辑起始标签,因为手动编辑可能会破坏包含
>
字符的摘要;该命令具有幂等性——重复链接不会产生副作用;拒绝添加指向不存在主题的引用(避免无效链接)——但
--remove
参数允许针对不存在的目标进行操作,以便清理现有的无效链接) | | 将主题移动到其他空间 |
node scripts/move.mjs <topic-path> --from-space <name> --to-space <name>
(会重建两个空间的清单与索引;会报告源空间中现在变为无效的同级
related=
引用) | | 迁移旧版Markdown内容 |
node scripts/migrate.mjs [--dry-run]
| | 将自托管v3 VPS迁移至v4(完整引导流程) | 遵循migrate-v3-to-v4.md文档操作 | | ByteRover身份验证/登录 |
node scripts/auth.mjs
— 立即返回结果;用户在浏览器中完成授权后,运行
auth.mjs status
;请参考「ByteRover身份验证」章节 | | 检查本地登录状态(无需网络) |
node scripts/auth.mjs whoami
— 输出
{ ok, authed, providerKind }
(表示本地存在凭证;不涉及服务器端有效性检查) | | ByteRover登出 |
node scripts/logout.mjs
| | 查看当前文件夹绑定的空间 |
node scripts/space.mjs current
| | 列出所有空间(按
team_name
分组) |
node scripts/space.mjs list
| | 将当前文件夹绑定到指定空间 |
node scripts/space.mjs bind "<name>"
|
删除主题需向用户发起请求——删除操作需通过ByteRover桌面应用完成。
所有命令均输出JSON格式结果。若返回
{ "ok": false, ... }
,请查阅troubleshooting.md文档。

Citing retrieved memory

引用检索到的记忆

After a
query
answer materially drew on the returned hits, append the
citation_block
from the query envelope to your response
so the user can see — and click through to — what was used. The engine pre-formats the block; your job is decisional, not formatting.
When the query envelope has
should_cite: true
AND your answer genuinely used the retrieved memory:
  1. Add ONE blank line after your answer.
  2. Emit the
    citation_block
    string verbatim — character for character — including the
    […](…)
    Markdown link wrapping each title, the indented
    "snippet"
    line when present, and the
    Updated by <agent> · <relative>
    trailer when present. Every host the engine targets (Codex CLI, Claude Code CLI, Claude Code Desktop) renders the wrapped title as a clickable inline link.
  3. Don't reformat, paraphrase, or add agent-generated relevance scores to the citations. The user judges relevance from the title.
  4. Do NOT unwrap the Markdown link. The engine deliberately emits
    - [Title  ·  Recalled N×](http://…)
    — rewriting it as a plain title with the URL on a separate row undoes the format that hides the long URL behind clickable text. Same rule for the snippet and updated-by lines: keep them indented exactly as the engine emitted them, never merged into the title row or stripped of their leading spaces.
When
should_cite
is
false
, OR when you didn't actually use the returned hits to answer, OR when the user asked for no sources — skip the block entirely. The engine intentionally suppresses low-confidence retrievals; don't second-guess by surfacing them in prose.
Example final response shape (the
📚 …
block comes from the engine, emit it verbatim):
ATM: Er Rak Error is a 2012 Thai romantic comedy by Mez Tharatorn …

📚 From ByteRover:
- [ATM: Er Rak Error (2012 Thai film) (fact)  ·  Recalled 14×](http://127.0.0.1:<port>/i/topic/<space-id>/context-tree/movies/atm_er_rak_error.html#bve-a1b2c3d4)
    "matched-context preview that explains why this hit ranked here"
    Updated by claude · 3d ago
- [Pee Mak Phra Khanong (2013) (highlights)](http://127.0.0.1:<port>/i/topic/<space-id>/context-tree/movies/pee_mak_phra_khanong.html#bve-e5f6g7h8,k1m2n3p4)
query
查询结果为你的回答提供了实质性依据时,请将查询结果中的
citation_block
附加到你的回复末尾
,以便用户查看并点击访问所引用的内容。引擎已预格式化该区块;你只需决定是否添加,无需进行格式调整。
当查询结果中
should_cite: true
且你的回答确实使用了检索到的记忆时:
  1. 在你的回答后添加一个空行。
  2. 完全原样输出
    citation_block
    字符串——包括每个标题外的
    […](…)
    Markdown链接、存在时的缩进
    snippet
    行,以及存在时的
    Updated by <agent> · <relative>
    尾部信息。引擎针对的所有宿主(Codex CLI、Claude Code CLI、Claude Code Desktop)都会将带链接的标题渲染为可点击的内联链接。
  3. 请勿重新格式化、改写或添加Agent生成的相关性评分。用户会通过标题判断相关性。
  4. 请勿拆解Markdown链接。引擎特意输出
    - [Title  ·  Recalled N×](http://…)
    格式——将其改写为纯标题加单独一行URL的形式,会破坏隐藏长URL的可点击文本格式。对于snippet行和更新信息行,同样要保持引擎输出的缩进格式,绝不要合并到标题行或移除前导空格。
should_cite
false
,或你并未实际使用检索结果来回答,或用户要求不显示来源时,请完全跳过该区块。引擎会有意过滤低置信度的检索结果;请不要自行在正文中提及这些结果。
最终回复格式示例(
📚 …
区块来自引擎,请原样输出):
ATM: Er Rak Error是Mez Tharatorn于2012年执导的泰国浪漫喜剧……

📚 来自ByteRover:
- [ATM: Er Rak Error (2012 Thai film) (fact)  ·  Recalled 14×](http://127.0.0.1:<port>/i/topic/<space-id>/context-tree/movies/atm_er_rak_error.html#bve-a1b2c3d4)
    "matched-context preview that explains why this hit ranked here"
    Updated by claude · 3d ago
- [Pee Mak Phra Khanong (2013) (highlights)](http://127.0.0.1:<port>/i/topic/<space-id>/context-tree/movies/pee_mak_phra_khanong.html#bve-e5f6g7h8,k1m2n3p4)

Authenticate with ByteRover

ByteRover身份验证

Run this when the user wants to authenticate / log in / sign in / connect / link ByteRover for this workspace (or when ByteRover reports the session has expired):
bash
node scripts/auth.mjs
This returns immediately with
{ "ok": true, "pending": true, "verifyUrl": …, "userCode": …, "expiresInS": … }
while a background process waits for the approval. Relay the
verifyUrl
(and the code) to the user verbatim, tell them how long the code lives (
expiresInS
, typically a few minutes), and tell them to come back and say "approved" once they have approved in the browser. End your turn — do NOT poll or re-run commands while waiting.
When the user returns, confirm with:
bash
node scripts/auth.mjs status
  • { "state": "approved" }
    → connected; tell the user.
  • { "state": "pending" }
    → not through yet — ask them to finish the browser step (the result re-includes
    verifyUrl
    ) and say so again.
  • { "state": "expired" }
    → the code died; run
    node scripts/auth.mjs
    again for a fresh one and re-relay it.
  • { "state": "denied" }
    → the user declined; stop and surface it.
Re-running
auth.mjs
while a flow is pending is safe — it returns the SAME code (
"reused": true
), never a competing one. No secret is ever pasted into the chat — only the short code. To log out / sign out:
bash
node scripts/logout.mjs
For non-interactive / CI environments only, an API key may be supplied by file (never inline in the conversation):
node scripts/auth.mjs --key-file <path>
. A blocking variant that waits in the foreground until approval (for scripted use, NOT for conversations) is
node scripts/auth.mjs --wait
.
Authentication is not required — every command works without it. See sync.md for what authenticating enables, and troubleshooting.md if
auth.mjs
returns
{ "ok": false }
.
当用户希望为当前工作区authenticate / log in / sign in / connect / link ByteRover(或ByteRover报告会话已过期)时,运行以下命令:
bash
node scripts/auth.mjs
该命令会立即返回
{ "ok": true, "pending": true, "verifyUrl": …, "userCode": …, "expiresInS": … }
,同时后台进程等待用户授权。请将
verifyUrl
(以及验证码)原样告知用户,说明验证码的有效期(
expiresInS
,通常为几分钟),并告知用户在浏览器中完成授权后返回并告知"已授权"。结束当前对话轮次——等待期间请勿轮询或重新运行命令。
当用户返回后,运行以下命令确认状态:
bash
node scripts/auth.mjs status
  • { "state": "approved" }
    → 已连接;告知用户。
  • { "state": "pending" }
    → 尚未完成授权——请用户完成浏览器端操作(结果会重新包含
    verifyUrl
    ),并完成后告知。
  • { "state": "expired" }
    → 验证码已过期;重新运行
    node scripts/auth.mjs
    获取新验证码并告知用户。
  • { "state": "denied" }
    → 用户拒绝授权;停止操作并告知用户。
在授权流程pending状态下重新运行
auth.mjs
是安全的——它会返回相同的验证码
"reused": true
),绝不会生成冲突的验证码。聊天中绝不会传递密钥——仅会传递短验证码。要log out / sign out
bash
node scripts/logout.mjs
仅针对非交互式/CI环境,可通过文件提供API密钥(绝不要在对话中直接输入):
node scripts/auth.mjs --key-file <path>
。还有一种阻塞式变体,会在前台等待直到授权完成(用于脚本,请勿用于对话):
node scripts/auth.mjs --wait
身份验证并非必需——所有命令均可在未验证状态下运行。验证后可实现的功能请参考sync.md文档;若
auth.mjs
返回
{ "ok": false }
,请查阅troubleshooting.md文档。

Authoring rich topics

创作富文本主题

Topics render in four sections and you should author with that structure in mind. Each
<bv-*>
element belongs to one section; the renderer ignores order within a section but you should emit them in section order to keep the source readable.
SectionElementsWhat it carries
## Reason
(the WHY)
<bv-reason>
The "why" of this curation, 1–2 sentences. Almost always include this.
## Raw Concept
(the WHAT and HOW)
<bv-task>
,
<bv-changes>
,
<bv-files>
,
<bv-flow>
,
<bv-timestamp>
,
<bv-author>
,
<bv-pattern>
The concept itself: subject, changes, related files, process flow, date, author, regex patterns.
## Narrative
(the EXPLANATION)
<bv-structure>
,
<bv-dependencies>
,
<bv-highlights>
,
<bv-rule>
,
<bv-examples>
,
<bv-diagram>
Structural docs, deps, key highlights, project rules, worked examples, preserved diagrams.
## Facts
(the EXTRACTED DATA)
<bv-fact>
Discrete, queryable facts — one per element. Not a dumping ground for content that belongs in Narrative.
Runbook (any section)
<bv-decision>
,
<bv-bug>
+
<bv-fix>
(siblings)
Standalone runbook records.
Every topic MUST include:
  1. A
    <bv-reason>
    explaining the WHY of the curation (the topic isn't useful without context for why it was captured).
  2. A
    <bv-task>
    describing what the topic is about (one sentence), OR an
    <h1>
    + intro
    <p>
    if "task" doesn't fit.
  3. At least one Narrative or Raw Concept element beyond the task:
    <bv-changes>
    /
    <bv-files>
    /
    <bv-flow>
    /
    <bv-structure>
    /
    <bv-dependencies>
    /
    <bv-highlights>
    /
    <bv-decision>
    /
    <bv-bug>
    /
    <bv-fix>
    . A topic with only
    <bv-fact>
    siblings is a placeholder, not a topic.
  4. <bv-timestamp>
    in ISO 8601 if the content has a reference date.
  5. <bv-fact subject="snake_case" category="…" value="…">canonical statement</bv-fact>
    for each extracted fact —
    subject
    is snake_case,
    category
    is one of
    personal
    /
    project
    /
    preference
    /
    convention
    /
    team
    /
    environment
    /
    other
    ,
    value
    carries the extracted form, and the body text is the canonical natural-language statement (not a label).
主题会渲染为四个部分,创作时请遵循该结构。每个
<bv-*>
元素属于一个部分;渲染器会忽略同一部分内元素的顺序,但为了保持源代码可读性,你应按部分顺序输出元素。
部分元素承载内容
## Reason
(原因)
<bv-reason>
本次整理的原因,1-2句话。几乎必须包含。
## Raw Concept
(核心概念)
<bv-task>
,
<bv-changes>
,
<bv-files>
,
<bv-flow>
,
<bv-timestamp>
,
<bv-author>
,
<bv-pattern>
概念本身:主题内容、变更记录、相关文件、流程、日期、作者、正则模式。
## Narrative
(说明)
<bv-structure>
,
<bv-dependencies>
,
<bv-highlights>
,
<bv-rule>
,
<bv-examples>
,
<bv-diagram>
结构化文档、依赖关系、关键要点、项目规则、示例、保留的图表。
## Facts
(提取的事实)
<bv-fact>
离散的、可查询的事实——每个元素对应一个事实。不要将属于Narrative部分的内容放在这里。
Runbook(任何部分)
<bv-decision>
,
<bv-bug>
+
<bv-fix>
(同级元素)
独立的Runbook记录。
每个主题必须包含:
  1. 一个
    <bv-reason>
    元素
    ,说明本次整理的原因(如果没有记录原因,主题的价值会大打折扣)。
  2. 一个
    <bv-task>
    元素
    ,描述主题的内容(一句话);如果"任务"不适合,可使用
    <h1>
    +介绍性
    <p>
  3. 至少一个除task外的Narrative或Raw Concept元素
    <bv-changes>
    /
    <bv-files>
    /
    <bv-flow>
    /
    <bv-structure>
    /
    <bv-dependencies>
    /
    <bv-highlights>
    /
    <bv-decision>
    /
    <bv-bug>
    /
    <bv-fix>
    。仅包含
    <bv-fact>
    同级元素的主题是占位符,而非完整主题。
  4. 如果内容有参考日期,需包含
    <bv-timestamp>
    元素
    ,格式为ISO 8601。
  5. 每个提取的事实对应一个
    <bv-fact subject="snake_case" category="…" value="…">规范陈述</bv-fact>
    ——
    subject
    为蛇形命名,
    category
    可选值为
    personal
    /
    project
    /
    preference
    /
    convention
    /
    team
    /
    environment
    /
    other
    value
    为提取的结构化内容,正文为规范的自然语言陈述(而非标签)。

Worked example — research/profile-style topic

示例——调研/档案类主题

This is the shape an agent must author. Copy this skeleton and fill the slots; do not invent a flatter shape:
bash
node scripts/record.mjs "movies/atm_er_rak_error" --html '
<bv-topic path="movies/atm_er_rak_error"
          title="ATM: Er Rak Error (2012 Thai film)"
          summary="GTH 2012 romantic comedy by Mez Tharatorn — secretly-dating bank employees bet their jobs on recovering money from a malfunctioning ATM."
          keywords="atm_er_rak_error,gth,thai_romcom,mez_tharatorn,2012"
          tags="film,thai,gth,romcom"
          related="@movies/pee_mak_phra_khanong.html">

  <bv-reason>
    Anchor topic for cross-references between Thai GTH romcoms; documents
    the studio box-office record holder before Pee Mak (2013).
  </bv-reason>

  <bv-task>Profile of ATM: Er Rak Error (2012) — credits, plot, awards, legacy.</bv-task>

  <bv-timestamp>2012-01-19</bv-timestamp>

  <bv-highlights>
    Premise: a bank no-fraternization policy forces a secret 5-year couple
    into a winner-keeps-the-job bet over money from a glitching ATM.
    Was GTH biggest hit until Pee Mak (2013) topped it.
  </bv-highlights>

  <bv-structure>
    <p>Credits:</p>
    <ul>
      <li><strong>Director:</strong> Mez Tharatorn</li>
      <li><strong>Writers:</strong> Mez Tharatorn, Aummaraporn Phandintong</li>
      <li><strong>Studio:</strong> GTH (GMM Tai Hub)</li>
    </ul>
    <p>Lead cast:</p>
    <ul>
      <li><strong>Sua:</strong> Ter Chantavit Dhanasevi</li>
      <li><strong>Jib:</strong> Ice Preechaya Pongthananikorn</li>
    </ul>
  </bv-structure>

  <bv-flow>
    Sua and Jib are bank staff who dated secretly for 5 years under the
    bank no-fraternization policy. An ATM glitches and dispenses 130,000
    baht. They bet: whoever recovers the money keeps their job. The
    sequence escalates into a chaotic showdown involving manager Pakorn,
    Sergeant Sam, and Sam pet crocodile Jack.
  </bv-flow>

  <bv-fact subject="release_date" category="project" value="2012-01-19">
    The film was released theatrically in Thailand on January 19, 2012.
  </bv-fact>

  <bv-fact subject="runtime_minutes" category="project" value="123">
    The film runs 123 minutes.
  </bv-fact>

  <bv-fact subject="box_office" category="project" value="150.11 million baht">
    The film grossed 150.11 million baht, reaching Thailand 7th highest-
    grossing film within four weeks of release.
  </bv-fact>

  <bv-fact subject="record_vs_pee_mak" category="project" value="GTH highest-grossing film until Pee Mak (2013)">
    ATM was GTH/GMM Tai Hub highest-grossing film until Pee Mak surpassed it in 2013.
  </bv-fact>

  <bv-changes>
    <li>2013-11-30 to 2014-02-08: TV sequel ATM 2: Koo ver Error Er Rak aired (21 episodes, One 31).</li>
    <li>Chinese-language remake released as Welcome to the Beartown.</li>
  </bv-changes>

</bv-topic>'
Note what carries WHAT:
  • <bv-reason>
    carries the WHY
    of this curation. Missing this is the single most common authoring failure — don't skip it.
  • <bv-task>
    +
    <bv-timestamp>
    carry the WHAT and WHEN.
  • <bv-highlights>
    +
    <bv-flow>
    carry the HOW
    (the explanation, the process).
  • <bv-structure>
    carries grouped lists
    like cast/credits/file layouts — NOT a pile of
    <bv-fact>
    siblings. Reserve
    <bv-fact>
    for discrete queryable claims (release date, runtime, box office, awards).
这是Agent必须遵循的创作格式。请复制该骨架并填充内容;请勿自行编写扁平化格式:
bash
node scripts/record.mjs "movies/atm_er_rak_error" --html '
<bv-topic path="movies/atm_er_rak_error"
          title="ATM: Er Rak Error (2012 Thai film)"
          summary="GTH 2012 romantic comedy by Mez Tharatorn — secretly-dating bank employees bet their jobs on recovering money from a malfunctioning ATM."
          keywords="atm_er_rak_error,gth,thai_romcom,mez_tharatorn,2012"
          tags="film,thai,gth,romcom"
          related="@movies/pee_mak_phra_khanong.html">

  <bv-reason>
    作为泰国GTH浪漫喜剧之间交叉引用的锚点主题;记录《Pee Mak》(2013年)之前的工作室票房纪录保持者。
  </bv-reason>

  <bv-task>《ATM: Er Rak Error》(2012年)档案——演职员、剧情、奖项、影响。</bv-task>

  <bv-timestamp>2012-01-19</bv-timestamp>

  <bv-highlights>
    剧情:银行禁止同事恋爱的规定,迫使一对秘密交往5年的情侣,就从故障ATM中找回钱款一事进行赌注,胜者保留工作。
    是《Pee Mak》(2013年)之前GTH的票房最高作品。
  </bv-highlights>

  <bv-structure>
    <p>演职员:</p>
    <ul>
      <li><strong>导演:</strong> Mez Tharatorn</li>
      <li><strong>编剧:</strong> Mez Tharatorn, Aummaraporn Phandintong</li>
      <li><strong>出品方:</strong> GTH (GMM Tai Hub)</li>
    </ul>
    <p>主演:</p>
    <ul>
      <li><strong>Sua:</strong> Ter Chantavit Dhanasevi</li>
      <li><strong>Jib:</strong> Ice Preechaya Pongthananikorn</li>
    </ul>
  </bv-structure>

  <bv-flow>
    Sua和Jib是银行员工,在禁止同事恋爱的规定下秘密交往了5年。一台ATM发生故障,吐出了13万泰铢。他们打赌:谁找回钱款谁就保留工作。事件逐渐升级为一场混乱的对决,涉及经理Pakorn、Sam警官和Sam的宠物鳄鱼Jack。
  </bv-flow>

  <bv-fact subject="release_date" category="project" value="2012-01-19">
    该片于2012年1月19日在泰国院线上映。
  </bv-fact>

  <bv-fact subject="runtime_minutes" category="project" value="123">
    片长123分钟。
  </bv-fact>

  <bv-fact subject="box_office" category="project" value="150.11 million baht">
    该片票房达1.5011亿泰铢,上映四周内成为泰国票房第7高的电影。
  </bv-fact>

  <bv-fact subject="record_vs_pee_mak" category="project" value="GTH highest-grossing film until Pee Mak (2013)">
    《ATM》是GTH/GMM Tai Hub的票房最高作品,直到2013年被《Pee Mak》超越。
  </bv-fact>

  <bv-changes>
    <li>2013年11月30日至2014年2月8日:电视剧续集《ATM 2: Koo ver Error Er Rak》播出(共21集,One 31频道)。</li>
    <li>推出中文翻拍版《欢迎来到熊镇》。</li>
  </bv-changes>

</bv-topic>'
请注意各元素的内容分工:
  • <bv-reason>
    承载整理的原因
    。缺失该元素是最常见的创作失误——请勿省略。
  • <bv-task>
    +
    <bv-timestamp>
    承载内容主题与时间
  • <bv-highlights>
    +
    <bv-flow>
    承载内容说明与流程
  • <bv-structure>
    承载分组列表
    ,如演职员/文件布局——不要用一堆
    <bv-fact>
    同级元素代替。
    <bv-fact>
    仅用于离散的可查询事实(上映日期、片长、票房、奖项)。

Output contract (hard rules)

输出规范(硬性规则)

The schema is permissive — the writer accepts violations silently — but output that ignores these rules ranks worse and reads worse:
  • All attribute values are double-quoted strings. Not single quotes.
  • All attribute names are lowercase.
  • Path segments are snake_case with underscores between words:
    movies/atm_er_rak_error
    , NOT
    movies/atm-er-rak-error
    (hyphens).
  • related=
    uses
    @path.html
    for file targets,
    @path
    bare for folder/domain targets. The
    @
    prefix is required.
  • No code fence wrapper. The
    --html
    argument is bare HTML — first character
    <
    , last characters
    </bv-topic>
    . No
    ```
    , no
    ```html
    .
  • Don't set
    createdat
    ,
    updatedat
    ,
    id
    ,
    importance
    ,
    maturity
    , or
    recency
    on
    <bv-topic>
    . The writer system-stamps the first three; the last three are sidecar runtime signals the LLM does not author.
  • Don't invent custom elements outside the 19-element
    <bv-*>
    vocabulary, or attributes outside each element's documented schema.
架构允许一定灵活性——写入器会静默接受违规内容,但不符合以下规则的输出排序优先级更低、可读性更差:
  • 所有属性值均为双引号包裹的字符串。不要使用单引号。
  • 所有属性名称均为小写
  • 路径段使用蛇形命名,单词间用下划线分隔
    movies/atm_er_rak_error
    ,不要使用
    movies/atm-er-rak-error
    (连字符)。
  • related=
    属性
    使用**
    @path.html
    指向文件目标,使用
    @path
    **指向文件夹/域目标。必须包含
    @
    前缀。
  • 不要添加代码块包裹
    --html
    参数为纯HTML——第一个字符是
    <
    ,最后一个字符是
    </bv-topic>
    。不要添加
    ```
    ```html
  • 不要在
    <bv-topic>
    上设置
    createdat
    updatedat
    id
    importance
    maturity
    recency
    属性
    。前三个属性由写入器系统自动标记;后三个是LLM无需创作的运行时信号文件属性。
  • 不要创建19种
    <bv-*>
    元素之外的自定义元素
    ,也不要使用各元素文档化架构之外的属性。

Sensitivity — mark facts you intend to share

敏感度设置——标记你打算共享的事实

A topic can be shared at three views: full (everything), redacted (only
<bv-fact disclosure="public">
plus structural prose), and metadata (an opaque catalog handle — no content). Mark a fact you intend to share with
disclosure="public"
; otherwise the fact defaults to restricted and is stripped from the redacted view.
Three rules to write by:
  • <bv-fact>
    is the SOLE unit of per-item restriction.
    The topic
    title
    and all prose text (inside
    <bv-structure>
    ,
    <p>
    ,
    <bv-flow>
    ,
    <bv-highlights>
    , etc.) are public-by-contract — they survive the redacted view verbatim. Never put a secret in the title or in prose; move it into a
    <bv-fact>
    (which can then default to restricted).
  • Absent or misspelled
    disclosure
    is treated as restricted.
    Fail- closed: a typo never accidentally publishes, but it can accidentally hide. Double-check the spelling.
  • <bv-topic visibility>
    does NOT make facts public.
    It's an informational label only. The redacted view consults each fact's own
    disclosure
    attribute, never the topic-level default.
See vocabulary.md for the full model, the canonical example, and guidance on choosing public vs restricted for any given fact.
主题可通过三种视图共享:完整视图(全部内容)、脱敏视图(仅包含
<bv-fact disclosure="public">
元素及结构化 prose)、元数据视图(仅包含不透明的目录句柄——无内容)。为打算共享的事实标记
disclosure="public"
;否则事实默认为受限状态,会从脱敏视图中移除。
需遵循三条规则:
  • <bv-fact>
    是唯一的逐项限制单元
    。主题的
    title
    和所有prose文本(
    <bv-structure>
    <p>
    <bv-flow>
    <bv-highlights>
    等内部的文本)默认公开——会完整保留在脱敏视图中。绝不要将机密内容放在标题或prose文本中;应将其移至
    <bv-fact>
    元素(该元素默认受限)。
  • 未设置或拼写错误的
    disclosure
    属性会被视为受限
    。默认关闭:拼写错误绝不会意外公开内容,但可能会意外隐藏内容。请仔细检查拼写。
  • <bv-topic visibility>
    属性不会使事实公开
    。它仅为信息性标签。脱敏视图会参考每个事实自身的
    disclosure
    属性,而非主题级默认值。
完整模型、规范示例及选择公开/受限的指导请参考vocabulary.md文档。

Two record forms

两种记录格式

  • Simple form (
    --title --body
    )
    wraps the body in a single
    <bv-fact>
    . Use it ONLY when the topic is genuinely one fact ("we use OAuth 2.0 with PKCE"). For anything else the wrapper structure is wrong.
  • Rich form (
    --html
    )
    is everything else — profile dumps, decisions+reasons+rules+facts, bug+fix runbooks, research notes.
For the full element registry, schema-level attributes, and the authoritative anti-patterns list, read vocabulary.md. For commit-quality recording guidance, read record.md.
  • **简单格式(
    --title --body
    )**会将正文包裹在单个
    <bv-fact>
    元素中。仅当主题确实为单一事实时使用(如"我们使用OAuth 2.0与PKCE")。对于其他内容,该格式结构不正确。
  • **富文本格式(
    --html
    )**适用于所有其他场景——档案记录、决策+原因+规则+事实、Bug+修复手册、调研笔记等。
完整元素注册表、架构级属性及权威反模式列表请查阅vocabulary.md文档。符合提交质量的记录指导请查阅record.md文档。

When to read what

文档查阅指南

  • First time in a repo, or no memory exists for the project → onboarding.md
  • Before retrieving → query.md
  • Before saving knowledge → record.md
  • Choosing the right
    <bv-*>
    element → vocabulary.md
  • Periodic cleanup / consolidation → dream.md
Note: topics are
<bv-*>
HTML (not markdown).
scripts/*.mjs
are generated from
@byterover/skill-runtime
by
pnpm build:skill
; if missing, build first.
  • 首次进入仓库或项目无记忆时 → onboarding.md
  • 检索知识前 → query.md
  • 保存知识前 → record.md
  • 选择合适的
    <bv-*>
    元素时 → vocabulary.md
  • 定期清理/整合知识时 → dream.md
注意:主题为
<bv-*>
格式的HTML(而非Markdown)。
scripts/*.mjs
@byterover/skill-runtime
通过
pnpm build:skill
生成;若缺失,请先执行构建。