byterover
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseByteRover — 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
铁律
- 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.
- 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.
- 思考前先查询。在开展任何重要任务前,先检索项目已有的知识,避免重复推导或与已有内容冲突。
- 实现后再整理。当你完成值得记录的内容(一项决策、一个易错点、一种模式)时,将其写回系统,以便后续会话可以继承这些知识。
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 elements,
list items, and the / attributes on . There is no
setting and no flag; you infer the language from the conversation, the same way
you already do when replying.
<bv-*>titlesummary<bv-topic>The schema stays English. Keep tag names (, never a
translated tag), attribute names (, , ),
enum values (, ), and the
attribute in English for tooling consistency. Code snippets and
identifiers stay verbatim.
<bv-fact>subjectcategoryseveritycategory="project"subject="visa_required"pathConcrete (Vietnamese conversation): and
stay English, while
and the body
() are Vietnamese. Same rule for Chinese,
Japanese, Korean, Russian, Arabic, etc.
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.匹配用户输入的语言。用户对话使用什么语言,你就用什么语言编写人类可读的内容——包括元素的正文、列表项,以及的/属性。无需设置或标记,你只需像回复用户一样,从对话中推断语言即可。
<bv-*><bv-topic>titlesummary架构部分保持英文。请保持标签名称(如,绝不要翻译)、属性名称(如、、)、枚举值(如、)和****属性为英文,以保证工具的一致性。代码片段和标识符保持原样。
<bv-fact>subjectcategoryseveritycategory="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
HTML. Spaces (including the default) are provisioned through the ByteRover
desktop app — the agent never creates them.
<bv-*>| Need | Command |
|---|---|
| Retrieve | |
| Save (rich, multi-element topics) | |
| Save (simple, single-fact topics) | |
| Save many topics in one call | |
Requiredattributes:<bv-topic>andpathMUST be present and non-empty on the topic root or the writer rejects the call. Thetitleonpathshould match the positional<bv-topic>you pass to<topic-path>. See vocabulary.md for the full attribute spec. | Read |record.mjs(usenode scripts/brv.mjs read "<topic-path>.html" [--raw]to get the on-disk HTML byte-for-byte — required when round-tripping through--raw, sincerecord --htmlflattens innerelements[].text/<ul>/<li>formatting) | | List |<strong>| | Rebuild manifest + index |node scripts/brv.mjs list| | Detect consolidation opportunities |node scripts/manifest.mjs(proposes — never executes) | | Fold one topic into another |node scripts/dream.mjs --mode merge\|link\|prune\|synthesize(usenode scripts/merge.mjs <survivor> <loser> [--title "…"] [--summary "…"] [--tags a,b] [--keywords a,b] [--reason "…"] [--related @x.html,@y.html]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 |--title(variadic, atomic — aborts on first failure with a partial report) | | Combine many topics into a new one |node scripts/prune.mjs <topic-path>...| | Rename / move / re-parent a topic within the current space |node scripts/synthesize.mjs <new-path> --html '<bv-topic …>…</bv-topic>' --absorb a.html,b.html,c.html(atomic — siblings'node scripts/move.mjs <topic-path> --to-path <new-path>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 arelated=cross-link between two topics |related=(atomic byte-preserving edit of thenode scripts/brv.mjs link "<a>" "<b>" [--bidirectional] [--remove]attribute — use this instead of hand-editing the opening tag, which is unsafe for summaries containing<bv-topic related="…">characters; idempotent — re-linking is a noop; refuses to add a ref to a topic that doesn't exist (would dangle) — but>allows missing targets so you can clean up existing dangling refs) | | Move a topic to a different space |--remove(rebuilds manifest + index in both spaces; reports any siblingnode scripts/move.mjs <topic-path> --from-space <name> --to-space <name>refs in the source that now dangle) | | Migrate legacy markdown |related=| | Migrate a self-hosted v3 VPS → v4 (full guided procedure) | follow migrate-v3-to-v4.md | | Authenticate / log in to ByteRover |node scripts/migrate.mjs [--dry-run]— returns at once; the user approves in the browser, thennode scripts/auth.mjs; see Authenticate with ByteRover | | Check whether signed in (local, no network) |auth.mjs status— printsnode scripts/auth.mjs whoami(a credential exists locally; not a server-side validity check) | | Log out of ByteRover |{ ok, authed, providerKind }| | See which space this folder uses |node scripts/logout.mjs| | List spaces (grouped bynode scripts/space.mjs current) |team_name| | Bind this folder to a space |node scripts/space.mjs list|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 read
troubleshooting.md.
{ "ok": false, ... }在项目内(任何子目录均可)运行以下命令。主题以格式的HTML存储。存储空间(包括默认空间)通过ByteRover桌面应用配置——Agent绝不会自行创建空间。
<bv-*>| 需求 | 命令 |
|---|---|
| 检索知识 | |
| 保存(富文本、多元素主题) | |
| 保存(简单、单事实主题) | |
| 批量保存多个主题 | |
必填属性: 主题根元素必须包含非空的<bv-topic>和path,否则写入操作会被拒绝。title的<bv-topic>应与你传递给path的record.mjs参数一致。完整属性规范请参考vocabulary.md。 | 读取主题 |<topic-path>(使用node scripts/brv.mjs read "<topic-path>.html" [--raw]参数可获取磁盘上的原始HTML字节内容——当通过--raw进行往返操作时必须使用该参数,因为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>引用) | | 迁移旧版Markdown内容 |related=| | 将自托管v3 VPS迁移至v4(完整引导流程) | 遵循migrate-v3-to-v4.md文档操作 | | ByteRover身份验证/登录 |node scripts/migrate.mjs [--dry-run]— 立即返回结果;用户在浏览器中完成授权后,运行node scripts/auth.mjs;请参考「ByteRover身份验证」章节 | | 检查本地登录状态(无需网络) |auth.mjs status— 输出node scripts/auth.mjs whoami(表示本地存在凭证;不涉及服务器端有效性检查) | | ByteRover登出 |{ ok, authed, providerKind }| | 查看当前文件夹绑定的空间 |node scripts/logout.mjs| | 列出所有空间(按node scripts/space.mjs current分组) |team_name| | 将当前文件夹绑定到指定空间 |node scripts/space.mjs list|node scripts/space.mjs bind "<name>"
删除主题需向用户发起请求——删除操作需通过ByteRover桌面应用完成。
所有命令均输出JSON格式结果。若返回,请查阅troubleshooting.md文档。
{ "ok": false, ... }Citing retrieved memory
引用检索到的记忆
After a answer materially drew on the returned hits, append the
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.
querycitation_blockWhen the query envelope has AND your answer
genuinely used the retrieved memory:
should_cite: true- Add ONE blank line after your answer.
- Emit the string verbatim — character for character — including the
citation_blockMarkdown link wrapping each title, the indented[…](…)line when present, and the"snippet"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.Updated by <agent> · <relative> - Don't reformat, paraphrase, or add agent-generated relevance scores to the citations. The user judges relevance from the title.
- Do NOT unwrap the Markdown link. The engine deliberately emits
— 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.
- [Title · Recalled N×](http://…)
When is , 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.
should_citefalseExample 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)当查询结果为你的回答提供了实质性依据时,请将查询结果中的附加到你的回复末尾,以便用户查看并点击访问所引用的内容。引擎已预格式化该区块;你只需决定是否添加,无需进行格式调整。
querycitation_block当查询结果中且你的回答确实使用了检索到的记忆时:
should_cite: true- 在你的回答后添加一个空行。
- 完全原样输出字符串——包括每个标题外的
citation_blockMarkdown链接、存在时的缩进[…](…)行,以及存在时的snippet尾部信息。引擎针对的所有宿主(Codex CLI、Claude Code CLI、Claude Code Desktop)都会将带链接的标题渲染为可点击的内联链接。Updated by <agent> · <relative> - 请勿重新格式化、改写或添加Agent生成的相关性评分。用户会通过标题判断相关性。
- 请勿拆解Markdown链接。引擎特意输出格式——将其改写为纯标题加单独一行URL的形式,会破坏隐藏长URL的可点击文本格式。对于snippet行和更新信息行,同样要保持引擎输出的缩进格式,绝不要合并到标题行或移除前导空格。
- [Title · Recalled N×](http://…)
当为,或你并未实际使用检索结果来回答,或用户要求不显示来源时,请完全跳过该区块。引擎会有意过滤低置信度的检索结果;请不要自行在正文中提及这些结果。
should_citefalse最终回复格式示例(区块来自引擎,请原样输出):
📚 …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.mjsThis returns immediately with while a background process waits for the
approval. Relay the (and the code) to the user verbatim, tell them
how long the code lives (, 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.
{ "ok": true, "pending": true, "verifyUrl": …, "userCode": …, "expiresInS": … }verifyUrlexpiresInSWhen the user returns, confirm with:
bash
node scripts/auth.mjs status- → connected; tell the user.
{ "state": "approved" } - → not through yet — ask them to finish the browser step (the result re-includes
{ "state": "pending" }) and say so again.verifyUrl - → the code died; run
{ "state": "expired" }again for a fresh one and re-relay it.node scripts/auth.mjs - → the user declined; stop and surface it.
{ "state": "denied" }
Re-running while a flow is pending is safe — it returns the SAME
code (), never a competing one. No secret is ever pasted into
the chat — only the short code. To log out / sign out:
auth.mjs"reused": truebash
node scripts/logout.mjsFor non-interactive / CI environments only, an API key may be supplied by file
(never inline in the conversation): .
A blocking variant that waits in the foreground until approval (for scripted
use, NOT for conversations) is .
node scripts/auth.mjs --key-file <path>node scripts/auth.mjs --waitAuthentication is not required — every command works without it. See
sync.md for what authenticating enables, and
troubleshooting.md if returns .
auth.mjs{ "ok": false }当用户希望为当前工作区authenticate / log in / sign in / connect / link ByteRover(或ByteRover报告会话已过期)时,运行以下命令:
bash
node scripts/auth.mjs该命令会立即返回,同时后台进程等待用户授权。请将(以及验证码)原样告知用户,说明验证码的有效期(,通常为几分钟),并告知用户在浏览器中完成授权后返回并告知"已授权"。结束当前对话轮次——等待期间请勿轮询或重新运行命令。
{ "ok": true, "pending": true, "verifyUrl": …, "userCode": …, "expiresInS": … }verifyUrlexpiresInS当用户返回后,运行以下命令确认状态:
bash
node scripts/auth.mjs status- → 已连接;告知用户。
{ "state": "approved" } - → 尚未完成授权——请用户完成浏览器端操作(结果会重新包含
{ "state": "pending" }),并完成后告知。verifyUrl - → 验证码已过期;重新运行
{ "state": "expired" }获取新验证码并告知用户。node scripts/auth.mjs - → 用户拒绝授权;停止操作并告知用户。
{ "state": "denied" }
在授权流程pending状态下重新运行是安全的——它会返回相同的验证码(),绝不会生成冲突的验证码。聊天中绝不会传递密钥——仅会传递短验证码。要log out / sign out:
auth.mjs"reused": truebash
node scripts/logout.mjs仅针对非交互式/CI环境,可通过文件提供API密钥(绝不要在对话中直接输入):。还有一种阻塞式变体,会在前台等待直到授权完成(用于脚本,请勿用于对话):。
node scripts/auth.mjs --key-file <path>node scripts/auth.mjs --wait身份验证并非必需——所有命令均可在未验证状态下运行。验证后可实现的功能请参考sync.md文档;若返回,请查阅troubleshooting.md文档。
auth.mjs{ "ok": false }Authoring rich topics
创作富文本主题
Topics render in four sections and you should author with that
structure in mind. Each 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.
<bv-*>| Section | Elements | What it carries |
|---|---|---|
| | The "why" of this curation, 1–2 sentences. Almost always include this. |
| | The concept itself: subject, changes, related files, process flow, date, author, regex patterns. |
| | Structural docs, deps, key highlights, project rules, worked examples, preserved diagrams. |
| | Discrete, queryable facts — one per element. Not a dumping ground for content that belongs in Narrative. |
| Runbook (any section) | | Standalone runbook records. |
Every topic MUST include:
- A explaining the WHY of the curation (the topic isn't useful without context for why it was captured).
<bv-reason> - A describing what the topic is about (one sentence), OR an
<bv-task>+ intro<h1>if "task" doesn't fit.<p> - 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>. A topic with only<bv-fix>siblings is a placeholder, not a topic.<bv-fact> - in ISO 8601 if the content has a reference date.
<bv-timestamp> - for each extracted fact —
<bv-fact subject="snake_case" category="…" value="…">canonical statement</bv-fact>is snake_case,subjectis one ofcategory/personal/project/preference/convention/team/environment,othercarries the extracted form, and the body text is the canonical natural-language statement (not a label).value
主题会渲染为四个部分,创作时请遵循该结构。每个元素属于一个部分;渲染器会忽略同一部分内元素的顺序,但为了保持源代码可读性,你应按部分顺序输出元素。
<bv-*>| 部分 | 元素 | 承载内容 |
|---|---|---|
| | 本次整理的原因,1-2句话。几乎必须包含。 |
| | 概念本身:主题内容、变更记录、相关文件、流程、日期、作者、正则模式。 |
| | 结构化文档、依赖关系、关键要点、项目规则、示例、保留的图表。 |
| | 离散的、可查询的事实——每个元素对应一个事实。不要将属于Narrative部分的内容放在这里。 |
| Runbook(任何部分) | | 独立的Runbook记录。 |
每个主题必须包含:
- 一个元素,说明本次整理的原因(如果没有记录原因,主题的价值会大打折扣)。
<bv-reason> - 一个元素,描述主题的内容(一句话);如果"任务"不适合,可使用
<bv-task>+介绍性<h1>。<p> - 至少一个除task外的Narrative或Raw Concept元素:/
<bv-changes>/<bv-files>/<bv-flow>/<bv-structure>/<bv-dependencies>/<bv-highlights>/<bv-decision>/<bv-bug>。仅包含<bv-fix>同级元素的主题是占位符,而非完整主题。<bv-fact> - 如果内容有参考日期,需包含元素,格式为ISO 8601。
<bv-timestamp> - 每个提取的事实对应一个——
<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:
- carries the WHY of this curation. Missing this is the single most common authoring failure — don't skip it.
<bv-reason> - +
<bv-task>carry the WHAT and WHEN.<bv-timestamp> - +
<bv-highlights>carry the HOW (the explanation, the process).<bv-flow> - carries grouped lists like cast/credits/file layouts — NOT a pile of
<bv-structure>siblings. Reserve<bv-fact>for discrete queryable claims (release date, runtime, box office, awards).<bv-fact>
这是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:
, NOT
movies/atm_er_rak_error(hyphens).movies/atm-er-rak-error - uses
related=for file targets,@path.htmlbare for folder/domain targets. The@pathprefix is required.@ - No code fence wrapper. The argument is bare HTML — first character
--html, last characters<. No</bv-topic>, no```.```html - Don't set ,
createdat,updatedat,id,importance, ormaturityonrecency. The writer system-stamps the first three; the last three are sidecar runtime signals the LLM does not author.<bv-topic> - Don't invent custom elements outside the 19-element vocabulary, or attributes outside each element's documented schema.
<bv-*>
架构允许一定灵活性——写入器会静默接受违规内容,但不符合以下规则的输出排序优先级更低、可读性更差:
- 所有属性值均为双引号包裹的字符串。不要使用单引号。
- 所有属性名称均为小写。
- 路径段使用蛇形命名,单词间用下划线分隔:,不要使用
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属性。前三个属性由写入器系统自动标记;后三个是LLM无需创作的运行时信号文件属性。recency - 不要创建19种元素之外的自定义元素,也不要使用各元素文档化架构之外的属性。
<bv-*>
Sensitivity — mark facts you intend to share
敏感度设置——标记你打算共享的事实
A topic can be shared at three views: full (everything), redacted
(only plus structural prose), and
metadata (an opaque catalog handle — no content). Mark a fact you
intend to share with ; otherwise the fact defaults
to restricted and is stripped from the redacted view.
<bv-fact disclosure="public">disclosure="public"Three rules to write by:
- is the SOLE unit of per-item restriction. The topic
<bv-fact>and all prose text (insidetitle,<bv-structure>,<p>,<bv-flow>, 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-highlights>(which can then default to restricted).<bv-fact> - Absent or misspelled is treated as restricted. Fail- closed: a typo never accidentally publishes, but it can accidentally hide. Double-check the spelling.
disclosure - does NOT make facts public. It's an informational label only. The redacted view consults each fact's own
<bv-topic visibility>attribute, never the topic-level default.disclosure
See vocabulary.md
for the full model, the canonical example, and guidance on choosing
public vs restricted for any given fact.
主题可通过三种视图共享:完整视图(全部内容)、脱敏视图(仅包含元素及结构化 prose)、元数据视图(仅包含不透明的目录句柄——无内容)。为打算共享的事实标记;否则事实默认为受限状态,会从脱敏视图中移除。
<bv-fact disclosure="public">disclosure="public"需遵循三条规则:
- 是唯一的逐项限制单元。主题的
<bv-fact>和所有prose文本(title、<bv-structure>、<p>、<bv-flow>等内部的文本)默认公开——会完整保留在脱敏视图中。绝不要将机密内容放在标题或prose文本中;应将其移至<bv-highlights>元素(该元素默认受限)。<bv-fact> - 未设置或拼写错误的属性会被视为受限。默认关闭:拼写错误绝不会意外公开内容,但可能会意外隐藏内容。请仔细检查拼写。
disclosure - 属性不会使事实公开。它仅为信息性标签。脱敏视图会参考每个事实自身的
<bv-topic visibility>属性,而非主题级默认值。disclosure
完整模型、规范示例及选择公开/受限的指导请参考vocabulary.md文档。
Two record forms
两种记录格式
- Simple form () wraps the body in a single
--title --body. 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.<bv-fact> - Rich form () is everything else — profile dumps, decisions+reasons+rules+facts, bug+fix runbooks, research notes.
--html
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元素中。仅当主题确实为单一事实时使用(如"我们使用OAuth 2.0与PKCE")。对于其他内容,该格式结构不正确。<bv-fact> - **富文本格式()**适用于所有其他场景——档案记录、决策+原因+规则+事实、Bug+修复手册、调研笔记等。
--html
完整元素注册表、架构级属性及权威反模式列表请查阅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 element → vocabulary.md
<bv-*> - Periodic cleanup / consolidation → dream.md
Note: topics areHTML (not markdown).<bv-*>are generated fromscripts/*.mjsby@byterover/skill-runtime; if missing, build first.pnpm build:skill
- 首次进入仓库或项目无记忆时 → onboarding.md
- 检索知识前 → query.md
- 保存知识前 → record.md
- 选择合适的元素时 → vocabulary.md
<bv-*> - 定期清理/整合知识时 → dream.md
注意:主题为格式的HTML(而非Markdown)。<bv-*>由scripts/*.mjs通过@byterover/skill-runtime生成;若缺失,请先执行构建。pnpm build:skill