Commit Graph

31 Commits

Author SHA1 Message Date
Turtle
dd8d446286 docs: apply hierarchy across the corpus 2026-08-05 16:13:28 +08:00
ZiyaZhang
612b527cd2 fix(i18n): pin translation snapshots against gc 2026-07-28 10:28:49 -07:00
ZiyaZhang
7febd4b557 fix(i18n): persist uncommitted translation snapshots 2026-07-28 04:34:05 -07:00
Tianyi Cui
e423bfbee6 Merge remote-tracking branch 'origin/master' into worktree-i18n-update-workflow
# Conflicts:
#	.agents/notes/implemented/process/2026-07-02-bilingual-docs-and-pairing-gate.i18n.yaml
#	.agents/skills/dsh-translate-docs/SKILL.md
#	docs/i18n/README.i18n.yaml
2026-07-27 09:39:54 +08:00
Tianyi Cui
53283003e9 feat(i18n): unit-mapped briefings with mechanical --apply, adopting the #684 planner mechanics
The briefing now maps each update at the narrowest safely aligned
granularity, widening deterministically on mapping failure: a change
confined to the pair's byte-identical code fences is computed outright
(--apply splices it into the counterpart and validates the result
against the pairing gate's structural signature before writing);
otherwise changed Markdown units — headings, paragraphs, table rows,
list items, fences, block quotes, HTML blocks, thematic breaks, link
definitions, matched by container-scoped kind sequences — each carry
their last-confirmed source, current source, and current counterpart
text; units that do not align fall back to depth-matched heading
sections (depth only, so translated heading text still maps); and when
sections do not align either, or both sides drifted, the briefing says
so and withholds the mapping. Terminology rows now match the changed
spans only, English terms on word boundaries with plural inflections,
and Chinese-target briefings track each relevant term's document-wide
first occurrence — a moved occurrence pulls the vacated and receiving
spans into the briefing with an explanatory note.

The unit mapping, mechanical code splice, and first-occurrence tracking
adopt the planner design from the incremental prompt-pipeline PR (#684),
whose provider-backed bake-off independently validated the same scope
ladder; this PR carries those mechanics into the agent-facing briefing
path so both consumers of the consistency records behave alike. The
prior line-hunk section mapping and its heading-text alignment (which
could not map cross-language sections) are replaced wholesale.

Docs: SKILL.md update path, i18n README pair, development.md pair, and
the briefed-updates Agent Note pair brought along; the development.md
fence edit was applied with --apply itself, and the prose updates were
made through the new unit/section briefings.
2026-07-27 02:31:07 +08:00
Tianyi Cui
3841c4ee58 docs(i18n): briefed update path in the workflow, contract, and Agent Note
The dsh-translate-docs skill now triages updates onto a briefing-driven
path — gen-translation-brief output as the translator's whole working
set, orchestrator-applied mechanical fence edits, scoped record/check —
while the whole-document path for new pairs is unchanged. The i18n
README documents the scoped gate forms and the briefing tool;
development.md lists the new command; the new bilingual Agent Note
records the decision and the ten-example benchmark behind it (briefed
path ~1/3 the tokens and wall clock of the corpus-loading path at equal
judged quality; whole-document re-translation rejected on preservation
collapse). Counterpart updates in this commit were produced with the
new briefed path; the new note's Chinese side is a whole-document
translation.
2026-07-27 00:44:22 +08:00
Tianyi Cui
37140bf823 docs(notes): archive low-value decision records 2026-07-26 23:06:00 +08:00
Tianyi Cui
b4d032c1a2 docs: make bilingual pairing universal 2026-07-26 15:06:51 +08:00
Tianyi Cui
37bfac749b docs: enforce bilingual README coverage 2026-07-26 03:39:30 +08:00
Tianyi Cui
f2cf29bd04 docs: deduplicate paired code-block checks 2026-07-26 02:52:48 +08:00
Tianyi Cui
f32d3f207f docs: require bilingual non-README documentation 2026-07-26 02:33:53 +08:00
Tianyi Cui
e6bd126ef3 Merge remote-tracking branch 'origin/master' into worktree/pr343-retarget-latest-master
# Conflicts:
#	docs/i18n/README.i18n.yaml
#	docs/i18n/README.zh.md
2026-07-23 23:43:08 +08:00
Tianyi Cui
216b0bfb6c Merge remote-tracking branch 'origin/master' into worktree/pr348-retarget-latest-master
# Conflicts:
#	docs/i18n/README.i18n.yaml
#	docs/i18n/translation-prompt.md
#	pnpm-lock.yaml
2026-07-23 21:18:14 +08:00
Tianyi Cui
3fd5d5dc2b docs(i18n): address core translation review 2026-07-22 22:11:02 +08:00
Tianyi Cui
31c0589439 chore: keep local git hooks fast 2026-07-22 16:37:20 +08:00
ZiyaZhang
64d70670e8 docs(i18n): address ds-review-bot on the v4 restoration
解析器:三段闭合标签改为行首锚定(正文提及 </translation> 不再截
断)、重复段全文扫描并校验段序(补两条回归测试)。切换行:v4 模板
保持字面占位不变,资产文档写明全新配对由流水线在解析后按目标文件
名机械插入、配对门禁兜底。加粗后空格限定于字母/数字/汉字、标点前
一律不加;RFC 2119 关键词改为保留源侧强调标记(斜体归斜体、加粗
归加粗)。i18n README 双侧同步 v4 契约描述(不再承诺 CDATA 协议与
规则注入)并重录配对。
2026-07-20 19:46:46 -07:00
Tianyi Cui
e8eddc7ef8 Rename RFCs to Agent Notes 2026-07-19 22:52:03 +08:00
Tianyi Cui
3caaa43797 fix(i18n): make translation contracts executable 2026-07-14 23:09:01 +08:00
Tianyi Cui
19504f7e34 fix(i18n): resolve pairing workflow review findings 2026-07-14 22:38:17 +08:00
Tianyi Cui
f0fc20ca42 docs: align prose with runtime contracts 2026-07-14 16:21:41 +08:00
Tianyi Cui
1ab64dba62 Merge remote-tracking branch 'origin/master' into codex/trim-ai-prose
# Conflicts:
#	docs/config-catalog.md
#	docs/development.i18n.yaml
#	docs/development.zh.md
#	docs/rfc/implemented/feature/2026-06-14-acp-agent-client-protocol.md
#	docs/rfc/implemented/feature/2026-07-06-sandbox.md
#	examples/AGENTS.md
#	examples/README.md
#	examples/acp-agent/README.md
#	examples/acp-agent/cordis.yml
#	examples/acp-agent/tests/acp.e2e.ts
#	examples/acp-agent/tests/escalation.e2e.ts
#	examples/sandbox-acp-agent/README.md
#	examples/sandbox-acp-agent/cordis.snapshot.yml
#	examples/sandbox-acp-agent/cordis.yml
#	examples/sandbox-acp-agent/tests/acp.snapshot.ts
#	packages/ui/acp-agent/src/bin.ts
#	packages/ui/acp/README.md
#	packages/ui/jsonrpc-agent/README.md
#	packages/ui/jsonrpc-agent/src/bin.ts
#	scripts/verify-translation-pairing.ts
2026-07-14 12:34:14 +08:00
Ziya
1d288f1bca docs(i18n): address ds-review-bot round-2 — switcher placeholders, regex anchor, contract completeness
新增 {{source_filename}}/{{source_filename_zh}} 占位符:切换行指令
可执行化,新配对(源文件尚无切换行)也必须生成(critical)。加粗
后空格规则限定于拉丁字母/数字,不再与全角标点规则冲突。日期匹配
锚定 basename 开头,release-notes-2026-* 类文件不再误判。金标
development.zh 补回 RFC 指引句与 agent 首现括注、pre-push 描述改
为 check:pre-push 调度器实况。术语表补回单文件可执行 RFC 配对在用
的 5 行(VFS/deploy root/peer dependency/serving surface/wheel)。
双语 README 的门禁清单补第 4 条(日期分界强制配对)。
2026-07-13 20:37:21 -07:00
Ziya
472fbb992b Merge remote-tracking branch 'upstream/master' into docs/i18n-capability
# Conflicts:
#	docs/i18n/README.i18n.yaml
#	docs/i18n/terminology.md
#	scripts/translation-pairing.manifest.json
2026-07-13 19:31:51 -07:00
imccyu
ade150b719 python: deepseek-harness SDK and runtime carrier packages 2026-07-13 15:50:09 +08:00
Ziya
8ad6dbc359 docs(i18n): commit the pipeline translation prompt as a repo asset
自动翻译流水线的 prompt 模板进仓(docs/i18n/translation-prompt.md):
占位符契约(source_lang/target_lang/terminology 三个,旧 %% 分段协议
废弃)+ 逐字模板正文(三段 XML 输出、分类自审、8 组正误例)。列入
配对排除清单;skill 与流水线自此共用同一套规则文件。
2026-07-12 20:34:19 -07:00
Ziya
abb145d99f docs(i18n): translation capability — style samples, voice rules, two-pass skill
Human-annotated gold pairs land as docs/i18n/style-samples.md (bilingual
by construction, excluded from pairing) and outrank prose tone rules.
translation-rules gains a Voice section; shape stays gate-owned so the
writer optimizes for natural Chinese. The skill's translate step becomes
two passes: native-author writing, then clause-level fidelity check.
Terminology rulings: hash -> 哈希 (blob 哈希/提交哈希), HMR and fiber
confirmed as tabled.
2026-07-05 06:03:14 -07:00
Ziya
0bccb483a5 docs(i18n): state the requiredSince grandfather semantics explicitly
Files dated before the cutoff are the grandfathered backlog by
definition (including cutoff-eve creations); backdating is a
review-visible RFC-convention violation, not a loophole.
2026-07-04 05:54:22 -07:00
Ziya
f5774a2a26 feat(i18n): new documents merge bilingual — the requiredSince date frontier
New docs must not enlarge the translation backlog: any date-named
document (yyyy-mm-dd-*.md, i.e. an RFC) dated on/after the manifest's
requiredSince cutoff must merge with its complete pair, independent of
the required back-catalog list. Cutoff ships at 2026-07-05, so the
existing 2026-07-04 RFC wave is grandfathered into the batch backlog
and everything after is bilingual from birth.

The date comes from the filename, deliberately: it is deterministic
from tree content alone — no git history (shallow CI checkouts hold),
no PR base ref — matching the gate's pure-content design. A proposal
dated before the cutoff that merges later escapes the rule; that is
the graceful grandfathering of in-flight work, not a hole.

--list marks such files (required by date); contract and RFC updated
in both languages and the pairs re-recorded.
2026-07-04 05:41:18 -07:00
Ziya
ec05295a0c docs: equal-authority pairing with sidecar consistency records
Redesign per review: neither language is canonical. A pair is three
sibling files — foo.md, foo.zh.md, foo.i18n.yaml — and either language
may be authored first (a Chinese-first RFC is as legitimate as an
English-first one). The sidecar record holds the FULL git blob hash of
both sides as of the last confirmed-consistent state, replacing the
in-file one-directional fingerprint; editing either side without
re-confirming the pair goes red. New --write mode re-records a pair
after both sides are brought in line, making the confirmation a
reviewable yaml diff. Pairs merge whole (completeness enforced).

- gate rewritten around pair anchors (union of .zh.md and .i18n.yaml
  remnants) so half-deleted pairs are caught from either side; red/green
  proven for en-only edit, zh-only edit, missing record, and a record
  for an excluded file
- verify-rfc-classification now skips .zh.md counterparts (same RFC,
  indexed via its English filename; the pairing gate owns consistency)
- docs/i18n/README.md + translation-rules.md reframed bidirectionally
  (terminology table binds both directions; typography section governs
  the Chinese side); zh counterparts updated; skill workflow updated
- RFC amended to the shipped design, records the English-canonical
  in-file-fingerprint model as considered-and-revised; RFC translated
  (docs/rfc/.../2026-07-02-bilingual-docs-and-pairing-gate.zh.md) and
  added to the required frontier
- generated docs stay excluded with the follow-up recorded: teach the
  generators to emit Chinese, then de-list
2026-07-03 07:41:24 -07:00
Ziya
a899226397 docs: harden pairing gate per review — structural signature, not counts
Review findings addressed:

- The gate compared only heading and code-block COUNTS, understating the
  contract it claims to enforce. It now compares ordered structural
  signatures: heading depths, fenced code blocks verbatim (info string +
  content), table column counts, list kinds, and every link target except
  the language switcher. Proven red on a heading demotion, a reworded
  code-block comment, and a retargeted link; green on all existing pairs.
- Stated the gate's limit explicitly (header comment + docs/i18n/README.md
  both languages): green means fresh and structurally sound, NOT verified —
  translation quality is the reviewer's half of the contract.
- first-line extraction no longer silently drops the last character of a
  newline-less file (split with limit instead of indexOf slice).
- isExcluded documents the trailing-slash-is-the-boundary invariant.
- Rollout guidance: grow the required frontier at the pace translation
  review is resourced.
- dsh-code-review's doc-sync sublist is now the exhaustive chain.

docs/i18n/README.zh.md updated via the minimal-diff workflow and
re-fingerprinted.
2026-07-03 02:06:57 -07:00
Ziya
4d89bb3e74 docs: bilingual docs contract, translation skill, and pairing gate
Establish EN->ZH bilingual documentation for the README and docs tree:

- docs/i18n/README.md — the pairing contract: sibling foo.md <-> foo.zh.md,
  English canonical, blob-hash source fingerprints, language switchers,
  scope/exclusions, and a manifest-driven rollout ratchet.
- docs/i18n/translation-rules.md — how to translate: faithfulness, structure
  preservation, terminology discipline over docs/i18n/terminology.md, and
  typography rules grounded in MDN/K8s/Vue/clreq conventions.
- .agents/skills/dsh-translate-docs — the committed agent workflow, following
  the dsh-code-review pattern of deferring to docs as sources of truth.
- scripts/verify-translation-pairing.ts + manifest — a doc-sync gate: required
  pairs exist; every existing .zh.md is fresh (fingerprint = current source
  blob), switcher-linked, structure-matched, and non-orphaned; excluded
  (generated) docs stay unpaired. --list prints the translation work list.
- RFC (implemented/process) recording the decision and the alternatives.
- Dogfood: README.zh.md and the two i18n docs translated under their own rules.

Gates: doc-sync green including the new gate; red/green proven for stale
fingerprint, orphan, and excluded-file violations.
2026-07-02 23:12:25 -07:00