Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
7706b56
docs: add Japanese translations for identity & protocol docs (#6072)
Nov 10, 2026
77766ba
docs: align identity-channels.ja diagram indent with EN (byte-identic…
Nov 10, 2026
36f683b
docs: un-cross README row labels in docs/index.zh-CN.md (English labe…
Nov 10, 2026
2eac884
fix: msgid-infrastructure.ja.md — space after '5.' so item 5 renders …
Nov 10, 2026
e482650
fix: opencode-responses-websocket.ja.md — restore dropped 'responsesC…
Nov 10, 2026
5850992
docs: add Japanese translations for message-identity & session-identi…
Nov 10, 2026
e7d30da
docs: session-identity.ja.md — keep TRUNCATION_LINEAGE_WINDOW code sp…
Nov 10, 2026
084cdee
docs: message-identity.ja.md — close full-width bracket in heading (#…
Nov 10, 2026
06a1c91
docs: add Japanese version of the docs directory landing page (#6072)
Nov 10, 2026
a264448
fix: message-identity.ja.md — close full-width bracket in '(rollout g…
Nov 10, 2026
be0324b
fix: README.ja.md — use standard Japanese term ランディングページ for 'landing…
Nov 10, 2026
282adfa
docs: add Japanese version of clients.md (#6072)
Nov 10, 2026
b7b2480
docs: add Japanese version of technical-notes.md (#6072)
ranxianglei Nov 12, 2026
6c6857a
docs: add Japanese architecture hub + 8 module pages (#6072)
ranxianglei Nov 12, 2026
4d3e72e
docs: ja hub/module pages link to ja hub; add English link in ja hub
ranxianglei Nov 12, 2026
c5b7ac0
docs: add Japanese version of configuration.md + generator/guard/CI s…
ranxianglei Nov 12, 2026
db2e1de
docs: root redirect stubs for Japanese + ja links in docs indexes (#6…
ranxianglei Nov 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ jobs:
node-version: 22
- run: node tools/gen-config-docs.mjs generate
- name: Fail on artifact drift
run: git diff --exit-code -- docs/configuration.md docs/configuration.zh-CN.md website/main.js website/docs/index.html
run: git diff --exit-code -- docs/configuration.md docs/configuration.zh-CN.md docs/configuration.ja.md website/main.js website/docs/index.html

# #2107 drift guard B: every BILI_*/ACP_* env var read in src/ and every
# FileConfig top-level key must have a seed entry — an undocumented param
Expand Down
1 change: 1 addition & 0 deletions CLIENTS.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> 移動先 [docs/clients.ja.md](docs/clients.ja.md)。リダイレクト用プレースホルダー。1–2 リリース後に削除予定。
1 change: 1 addition & 0 deletions CONFIGURATION.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> 移動先 [docs/configuration.ja.md](docs/configuration.ja.md)。リダイレクト用プレースホルダー。1–2 リリース後に削除予定。
1 change: 1 addition & 0 deletions MESSAGE-IDENTITY.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> 移動先 [docs/message-identity.ja.md](docs/message-identity.ja.md)。リダイレクト用プレースホルダー。1–2 リリース後に削除予定。
1 change: 1 addition & 0 deletions SESSION-IDENTITY.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> 移動先 [docs/session-identity.ja.md](docs/session-identity.ja.md)。リダイレクト用プレースホルダー。1–2 リリース後に削除予定。
1 change: 1 addition & 0 deletions TECHNICAL-NOTES.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> 移動先 [docs/technical-notes.ja.md](docs/technical-notes.ja.md)。リダイレクト用プレースホルダー。1–2 リリース後に削除予定。
24 changes: 24 additions & 0 deletions docs/README.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# ドキュメント

**billion-context** のシステム文書はすべてこのディレクトリに集約されています。リポジトリのルートには 4 つの**コア**入口ファイル——`README.md`、`README.zh-CN.md`、`AGENTS.md`、`CHANGELOG.md`——と、承認済みのコミュニティ維持 README 訳本(`README.<locale>.md`、例 `README.ja.md`、2026-11-09 に承認、#6000)のみを保持します。旧ルート文書パスはルートに一行的なリダイレクト用プレースホルダを残します(追跡は [lifecycle §5](lifecycle.md#5-卫生记录))。

> **全カタログ:** [index.md](index.md) / [index.zh-CN.md](index.zh-CN.md) — 全文書を一行説明付きで一覧。このページはディレクトリのランディングページで、何がどこにあるか、そして何を live に保つかというルールを示します。

## セクション

| セクション | 文書 | 中身 |
|---|---|---|
| **ここから始める** | [configuration](configuration.md) · [clients](clients.md) · [how-it-works](how-it-works.en.svg) | 全量設定リファレンス(生成物、ドリフトガード付き) · クライアント別統合の深掘り · フロー全体を一枚の図で |
| **システムアーキテクチャ** | [architecture](architecture.md) / [中文](architecture.zh-CN.md) | **LIVE hub**: 全体図 + モジュール毎の一ページ(pipeline / lanes / kernel / identity / fastpaths / storage / webui / update)、各々に独自の図を掲載 — 鮮度は CI が強制(`architecture-docs` レーン) |
| **アイデンティティとプロトコル** | [message-identity](message-identity.md) · [session-identity](session-identity.md) · [session-identity-resolution](session-identity-resolution.md) · [identity-channels](identity-channels.md) · [msgid-infrastructure](msgid-infrastructure.md) · [opencode-responses-websocket](opencode-responses-websocket.md) · [plugin-protocol](plugin-protocol.md) | アイデンティティ教義(msg id、session id、persona フォーク、#5825 のチャンネル配線)とクライアント別プロトコル注記 |
| **エンジニアリングと運用** | [technical-notes](technical-notes.md) · [lifecycle](lifecycle.md) · [auto-merge-guardrails](auto-merge-guardrails.md) · [unified-loop-spec](unified-loop-spec.md) | 機構の深掘り · 移行/退役台帳(CI 強制) · `AGENTS.md` §7 裏のエビデンス付録 · 歴史的設計(コードにより置き換え済み) |

## ルール(このディレクトリが読みやすい状態を保つ理由)

1. **既定バイリンガル** — 英語ベース名 + `*.zh-CN.md` ミラー;単一言語の文書はその理由を [index](index.md) エントリに明記すること。
2. **新規または移動した文書はすべて同じ PR で [index.md](index.md) + [index.zh-CN.md](index.zh-CN.md) に記載** — 未記載の文書は存在しないものと同じ。
3. **アーキテクチャ文書は LIVE** — 構造変更は影響するページ・図・hub 台帳行を同じ PR で更新;機械的な部分は CI レーン `architecture-docs` が強制。
4. **手順は [`../reference/`](../reference/README.md) に置く** — ここではなく。`docs/` は意思決定/レビューア向けのリファレンス;`reference/` は遅延読み込みの how-to 資料(testing / release / git-pr / env-vars / KDD 全文台帳)を保持。
5. **移動はスタブを残す** — 旧パスに一行的なリダイレクト + [lifecycle.md](lifecycle.md) §5 に明示的な削除条件付きの衛生台帳エントリ。

これらのルールの権威ある文言: [`AGENTS.md` §3 "Documentation Layout"](../AGENTS.md)。
50 changes: 50 additions & 0 deletions docs/architecture.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# アーキテクチャ

> システムのアーキテクチャに関するハブページです。このページには**全体図**と**モジュール台帳**を掲載しています。各モジュールは、このディレクトリ内に独自のページ(英語 + `.zh-CN`)を持ち、それぞれに独自の図が用意されています。
> 中国語版: [architecture.zh-CN.md](./architecture.zh-CN.md)
> English: [architecture.md](./architecture.md)
>
> **ライブドキュメント(オーナー裁定 2026-11-08)。** モジュール境界、図示されたデータフロー、テーブル、レーン、またはワイヤーパスを変更する PR は、同じ PR 内で影響を受けるページ、図、およびこのハブテーブルを更新する必要があります。CI は機械的な部分(`tools/check-architecture-docs.mjs`)を強制します。ルールの本文は [AGENTS.md](../AGENTS.md) の "Documentation Layout" セクションにあります。

## 全体アーキテクチャ(2026-11-08 時点、master、ストレージスキーマ v11)

![全体アーキテクチャ](./architecture/assets/architecture-current.en.svg)
(ビットマップフォールバック: [architecture-current.en.png](./architecture/assets/architecture-current.en.png))

読み方:

- **左から右へは 1 つのモデルリクエストの流れです。** ホストレーン(dsh / pi / opencode / codex / ベアプロキシクライアント)はすでにアイデンティティ(ヘッダー内のセッション ID。プラグインレーンはエンベロープ内で要素ごとのホスト msgid を保持 — #5842 コレクター)を保持しています。イングレスアダプター(`prepare-*`)はワイヤーを正規化し、`lane-decisions` はリクエストの形状 × スティッキーセッションバインディングに基づいてリクエストを 4 つのレーンのいずれかにルーティングします。レーンは正規化されたコアを **acp-kernel** 圧縮エンジン(フォールド判定 / サマリー / リファレンス台帳 — コアはホスト作業によって書き換えられることはありません)に渡し、エグレスマッピング(`coreTo*`)は 4 つのワイヤー向けに再シリアライズし、モデルエンドポイントが応答します。
- **インディゴ色の帯は単一の SQLite ファイル**(スキーマ v11)です:行レベルのソースオブトゥルース。12 個のテーブルチップと赤い **kstate JSON** チップ。
- **右側の 3 つの赤いボックスは、#5643 の進化(スナップショットテーブル圧縮基盤)が対象とする構造的なペインポイント**です:3 か所に分散して存在する状態、ディスクに永続化されないホストアイデンティティ、そして統一されたスナップショットテーブルではなく各スライスを個別にパッチするファストパス。下部のストリップは進化の目標(6 段階の固定チェーン、単一のストレージソースオブトゥルース)を示しています — これは*提案*(#5643)であり、まだ構築されていません。

## モジュール台帳

| モジュール | 一行説明 | ページ | ステータス |
|---|---|---|---|
| `storage` | 統合 SQLite: テーブルファミリー、kstate、チェックポイント、GC | [storage.md](./architecture/storage.md) · [zh](./architecture/storage.zh-CN.md) · [ja](./architecture/storage.ja.md) | ✅ |
| `pipeline` | リクエストパイプライン(handle / prepare-* / relay / inject) | [pipeline.md](./architecture/pipeline.md) · [zh](./architecture/pipeline.zh-CN.md) · [ja](./architecture/pipeline.ja.md) | ✅ |
| `lanes` | ホストレーン(dsh / pi / opencode / codex / ベアプロキシ + lane-decisions) | [lanes.md](./architecture/lanes.md) · [zh](./architecture/lanes.zh-CN.md) · [ja](./architecture/lanes.ja.md) | ✅ |
| `kernel` | 圧縮エンジン(acp-kernel: フォールド、サマリー、リファレンス台帳) | [kernel.md](./architecture/kernel.md) · [zh](./architecture/kernel.zh-CN.md) · [ja](./architecture/kernel.ja.md) | ✅ |
| `identity` | セッションおよびメッセージのアイデンティティ(セッション ID、ペルソナフォーク、msgid チャネル) | [identity.md](./architecture/identity.md) · [zh](./architecture/identity.zh-CN.md) · [ja](./architecture/identity.ja.md) | ✅ |
| `fastpaths` | ファストパス(増分レーン、v5 ウォーターマーク、D レーンのスナップショットレンダリング) | [fastpaths.md](./architecture/fastpaths.md) · [zh](./architecture/fastpaths.zh-CN.md) · [ja](./architecture/fastpaths.ja.md) | ✅ |
| `webui` | Web パネルおよび管理画面 | [webui.md](./architecture/webui.md) · [zh](./architecture/webui.zh-CN.md) · [ja](./architecture/webui.ja.md) | ✅ |
| `update` | セルフアップデート、アドバイザリー、プラグインインストール | [update.md](./architecture/update.md) · [zh](./architecture/update.zh-CN.md) · [ja](./architecture/update.ja.md) | ✅ |

上記のハブテーブルは単一の台帳です — CI は `✅` の行にページペアが存在し、余分なページが存在しないことをチェックします。

## 他のドキュメントとの関係

- **ファイルレベルのマップ**(どのファイルが何をするか、各 1 行): [reference/architecture.md](../reference/architecture.md) — CI は `src/` のすべてのファイルをカバーしていることを強制します。
- **構築手順**(ビルド / テスト / リリース / git の仕組み): [reference/](../reference/README.md)。
- **アイデンティティ教義**(アイデンティティルールの背後にある「なぜ」): [message-identity](./message-identity.md) · [session-identity](./session-identity.md) · [identity-channels](./identity-channels.md)。
- **リーダー向け概要**(README がリンクしているもの): [how-it-works](../how-it-works.en.svg)。

## メンテナンスルール

- **同一 PR ルール**(オーナー裁定 2026-11-08): 構造的変更 ⇒ ドキュメント + 図 + 台帳行を同じ PR で更新。「後でドキュメントを更新する」は禁止。
- **CI レーン `architecture-docs`**(`tools/check-architecture-docs.mjs`)は機械的な部分を強制します:
1. `reference/architecture.md` がすべての追跡対象 `src/` ファイルを列挙していること(欠落なし、ゴーストなし);
2. すべての `✅` 台帳行に両方のページファイル(英語 + `.zh-CN`)が存在し、孤立したページが存在しないこと;
3. すべてのページが `assets/<module>.{en,zh-CN}.svg` **および** `.png` フォールバックを参照し、それらがすべて存在すること;
4. すべての SVG が基本的な well-formed であること(タグのバランス、エスケープされていない `&` なし — かつて壊れた英語図をレンダリングした失敗モード)。
- 図の**視覚的な鮮度**は機械的にチェックできません:同一 PR ルールおよびレビューに依存します。図はベクター優先(SVG)であり、PNG はフォールバックとして提供されます(AGENTS.md のドキュメントルールに従う)。
19 changes: 10 additions & 9 deletions docs/architecture.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Architecture

> One hub for the system's architecture. This page holds the **overall diagram** and the **module ledger**; each module gets its own page (en + `.zh-CN`) in this directory, each with its own diagram.
> One hub for the system's architecture. This page holds the **overall diagram** and the **module ledger**; each module gets its own page (en + `.zh-CN` + `.ja`) in this directory, each with its own diagram.
> 中文: [architecture.zh-CN.md](./architecture.zh-CN.md)
> 日本語: [architecture.ja.md](./architecture.ja.md)
>
> **Live document (owner ruling 2026-11-08).** A PR that changes a module boundary, a depicted data flow, a table, a lane, or a wire path MUST update the affected page(s), diagram(s), and this hub table in the same PR. CI enforces the mechanical parts (`tools/check-architecture-docs.mjs`); the rule text lives in [AGENTS.md](../AGENTS.md) "Documentation Layout".

Expand All @@ -20,14 +21,14 @@ How to read it:

| Module | One line | Pages | Status |
|---|---|---|---|
| `storage` | Unified SQLite: table family, kstate, checkpoints, GC | [storage.md](./architecture/storage.md) · [zh](./architecture/storage.zh-CN.md) | ✅ |
| `pipeline` | Request pipeline (handle / prepare-* / relay / inject) | [pipeline.md](./architecture/pipeline.md) · [zh](./architecture/pipeline.zh-CN.md) | ✅ |
| `lanes` | Host lanes (dsh / pi / opencode / codex / bare proxy + lane-decisions) | [lanes.md](./architecture/lanes.md) · [zh](./architecture/lanes.zh-CN.md) | ✅ |
| `kernel` | Compression engine (acp-kernel: folds, summaries, ref ledger) | [kernel.md](./architecture/kernel.md) · [zh](./architecture/kernel.zh-CN.md) | ✅ |
| `identity` | Session & message identity (session id, persona fork, msgid channels) | [identity.md](./architecture/identity.md) · [zh](./architecture/identity.zh-CN.md) | ✅ |
| `fastpaths` | Fastpaths (incremental lane, v5 watermark, D-lane snapshot render) | [fastpaths.md](./architecture/fastpaths.md) · [zh](./architecture/fastpaths.zh-CN.md) | ✅ |
| `webui` | Web panel & admin surface | [webui.md](./architecture/webui.md) · [zh](./architecture/webui.zh-CN.md) | ✅ |
| `update` | Self-update, advisory, plugin install | [update.md](./architecture/update.md) · [zh](./architecture/update.zh-CN.md) | ✅ |
| `storage` | Unified SQLite: table family, kstate, checkpoints, GC | [storage.md](./architecture/storage.md) · [zh](./architecture/storage.zh-CN.md) · [ja](./architecture/storage.ja.md) | ✅ |
| `pipeline` | Request pipeline (handle / prepare-* / relay / inject) | [pipeline.md](./architecture/pipeline.md) · [zh](./architecture/pipeline.zh-CN.md) · [ja](./architecture/pipeline.ja.md) | ✅ |
| `lanes` | Host lanes (dsh / pi / opencode / codex / bare proxy + lane-decisions) | [lanes.md](./architecture/lanes.md) · [zh](./architecture/lanes.zh-CN.md) · [ja](./architecture/lanes.ja.md) | ✅ |
| `kernel` | Compression engine (acp-kernel: folds, summaries, ref ledger) | [kernel.md](./architecture/kernel.md) · [zh](./architecture/kernel.zh-CN.md) · [ja](./architecture/kernel.ja.md) | ✅ |
| `identity` | Session & message identity (session id, persona fork, msgid channels) | [identity.md](./architecture/identity.md) · [zh](./architecture/identity.zh-CN.md) · [ja](./architecture/identity.ja.md) | ✅ |
| `fastpaths` | Fastpaths (incremental lane, v5 watermark, D-lane snapshot render) | [fastpaths.md](./architecture/fastpaths.md) · [zh](./architecture/fastpaths.zh-CN.md) · [ja](./architecture/fastpaths.ja.md) | ✅ |
| `webui` | Web panel & admin surface | [webui.md](./architecture/webui.md) · [zh](./architecture/webui.zh-CN.md) · [ja](./architecture/webui.ja.md) | ✅ |
| `update` | Self-update, advisory, plugin install | [update.md](./architecture/update.md) · [zh](./architecture/update.zh-CN.md) · [ja](./architecture/update.ja.md) | ✅ |

The hub table above is the single ledger — CI checks that `✅` rows have their page pairs and no extra pages exist.

Expand Down
1 change: 1 addition & 0 deletions docs/architecture.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

> 系统架构的唯一枢纽。本页放**整体架构图**与**模块总表**;每个模块在本目录下有独立页面(中英各一份),每页配自己的图。
> English: [architecture.md](./architecture.md)
> 日本語: [architecture.ja.md](./architecture.ja.md)
>
> **实时维护文档(owner 裁定 2026-11-08)**:任何改动模块边界 / 数据流 / 表 / 车道 / 线上路径的 PR,必须**同一 PR** 更新对应页面 + 图 + 本总表。机械部分由 CI 强制(`tools/check-architecture-docs.mjs`);规则条文见 [AGENTS.md](../AGENTS.md)「Documentation Layout」。

Expand Down
Loading
Loading