Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/assets/banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ADOPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## What you are installing

BoCode gives a project two half-brains: `code/` (the source) and `book/` (the documentation stream and knowledge base), driving each other in both directions. You will install: the `book/` skeleton, the index tooling, the git policy tooling (optional), the four skills, and an `AGENTS.md` entry point. You will migrate the project's existing docs into the book. You will **not** refactor any code.
BoCode gives a project two halves: `code/` (the source) and `book/` (the documentation stream and knowledge base), driving each other in both directions. You will install: the `book/` skeleton, the index tooling, the git policy tooling (optional), the four skills, and an `AGENTS.md` entry point. You will migrate the project's existing docs into the book. You will **not** refactor any code.

Before starting, read in the BoCode repository: `AGENTS.md`, `book/guidelines/workflow.md`, and `skills/README.md` — this playbook assumes you know the target shape.

Expand Down Expand Up @@ -53,7 +53,7 @@ Every migrated file gets a frontmatter `description` — one plain-language line

## Step 5 — Install the skills

Copy `skills/bocode`, `skills/feature-flow`, `skills/book-writeback`, and `skills/bowrite` into the agent's skills directory (see BoCode's `skills/README.md` for per-tool locations). If the user's agent can't install skills, the workflow still works — the guidelines carry the same rules in prose.
Copy `skills/bocode`, `skills/boscope`, `skills/book-writeback`, and `skills/bowrite` into the agent's skills directory (see BoCode's `skills/README.md` for per-tool locations). If the user's agent can't install skills, the workflow still works — the guidelines carry the same rules in prose.

## Step 6 — Write the project's `AGENTS.md`

Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This project runs on the **BoCode workflow**: `code/` holds the source, `book/`
└── book/ # documentation stream and knowledge base
```

**code and book are the project's two half-brains — neither is optional.** The relationship runs both ways:
**code and book are the project's two halves — neither is optional.** The relationship runs both ways:

- **book → code**: plans drive implementation; guidelines provide the baseline; learn entries supply experience to consult before coding; issues provide direction for later iterations.
- **code → book**: after code changes, check whether book needs syncing; when a feature completes, write its summary / learn / issue back into book.
Expand Down
45 changes: 29 additions & 16 deletions README.ja.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src=".github/assets/banner.svg" alt="BoCode — ドキュメントがコードを駆動し、コードがドキュメントに書き戻す" width="720">
<img src=".github/assets/banner.svg" alt="BoCode — 人が方向を定め、エージェントが書き、book が覚える" width="720">
</p>

<p align="center">
Expand All @@ -12,9 +12,9 @@
<a href="https://github.com/Focus695/BoCode/generate"><img src="https://img.shields.io/badge/use_this-template-2ea44f.svg" alt="Use this template"></a>
</p>

**ドキュメントがコードを駆動し、コードがドキュメントに書き戻す、プロジェクトテンプレート。**
**人が方向を定め、エージェントがコードを書き、book がすべてを覚える。**

BoCode はリポジトリに二つの半脳を与えます——ソースを置く `code/` と、ドキュメントの流れとナレッジベースを置く `book/` です。両者は双方向に接続されます。今のソフトウェアが実際に書かれている方法、つまり人間と AI コーディングエージェントの共同開発を前提に設計されています。プロジェクトが複利的に成長するか、セッションごとにゼロリセットされるかは、知識が耐久性のある場所に置かれているかどうかで決まります
BoCode はリポジトリを二つに分けます——ソースを置く `code/` と、ドキュメントの流れとナレッジベースを置く `book/` です。両者は双方向に接続されます。今のソフトウェアが実際に書かれている方法、つまり人間と AI コーディングエージェントの共同開発を前提に設計されています。エージェントは速く、メモリもありますが、その記憶はエージェントだけのもの:人間には読めず、管理もできません。プロジェクトの知識がどこに置かれ、誰が読めるかが、速さが制御とともにあるか、制御のない速さになるかを決めます

## 一行で導入

Expand All @@ -24,7 +24,7 @@ BoCode はリポジトリに二つの半脳を与えます——ソースを置
https://github.com/Focus695/BoCode を読み(まず ADOPT.md から)、その手順どおりにこのプロジェクトを BoCode ワークフローへ移行してください。
```

ゼロから始める? 三コマンドのクイックスタートは下にあります
ゼロから始める? [クイックスタート](#クイックスタート)へ直接どうぞ

---

Expand All @@ -34,13 +34,13 @@ https://github.com/Focus695/BoCode を読み(まず ADOPT.md から)、そ

AI エージェントで開発するプロジェクトは、ほぼ必ず三つの問題にぶつかります。

1. **エージェントは状態を持たない。** セッションは毎回ゼロから始まります。書き残されていない知識は、再導出され、再質問され、再破壊されます
1. **記憶はエージェントだけのもの。** 今のエージェントにはメモリがありますが、それはブラックボックスです:人間には読めず、管理もできません。何が進み、どこでつまずき、何が修正待ちなのか——人間には何も見えない。エージェントが速いほど、人間のコントロール感は薄れます。足りないのは記憶ではなく、人間とエージェントが共に読む場所:進捗のまとめ、既知の罠、修正待ちリスト、プロジェクトの指針。エージェントはそこから働き、人間はそこで舵を取ります
2. **ドキュメントは腐る。** 立ち上げ時に一度書かれ、二度と更新されない。更新の利益は後で、スキップの利益は今なので、更新は常に後回しにされます。やがて誰も信じなくなります——古いドキュメントは信じる価値がありません。
3. **人間がハンドルを失う。** エージェントは頼まれたものに加えて、頼まれていない十二個の変更も実装します。ゲートのないスピードは、スコープの漂移と意思決定の未記録と、「なぜ」の蒸発を意味します。

三つとも同じ根っこを指しています:知識と制御は、チャット履歴でも誰かの記憶でもない場所に住む必要がある、と。

### 二つの半脳
### それぞれが半分を担う

BoCode の答えは構造です。プロジェクトには二つの半分があります。

Expand Down Expand Up @@ -86,21 +86,34 @@ BoCode の答えは構造です。プロジェクトには二つの半分があ

## 手法

### ブレーキではなくゲート
BoCode のルールは四つのスキルが分担し、それぞれ独立して呼び出されます:

すべての機能は六段階のワークフローを硬いゲート付きで通ります(`book/guidelines/workflow.md`、振る舞いは `feature-flow` スキルが強制):
| スキル | 中国語名 | 担当 | トリガー |
|-------|---------|------|----------|
| `bocode` | 薄码 | 構造マップとセッションの規律 | セッション開始時;ドキュメントの居場所 |
| `boscope` | 薄界 | 六段階のゲート——スコープを薄く、ゲートを硬く | 「実装して/変更して」 |
| `book-writeback` | 返写 | 書き戻しテンプレートと品質基準 | 機能の締めくくり;summary / learn / issue |
| `bowrite` | 薄写 | 薄く、うまく書く——文は減り、核は変わらない | 文書の執筆・改訂時 |

以下の節はルール本体、スキルはその実行層です。

### boscope(薄界)——ブレーキではなくゲート

すべての機能は六段階のワークフローを硬いゲート付きで通ります(ルール本体は `book/guidelines/workflow.md`):

| フェーズ | 産出 | ゲート |
|-------|--------|------|
| Step 0 — 要件ブリーフ | 背景、スコープ、除外項目、要件 | 全スロット記入——**除外リストは必須**。空の除外リストがスコープ外変更の最大の原因 |
| Step 0 — 要件ブリーフ | 背景、スコープ、除外項目、要件 | 全スロット記入 |
| 1 — 分析 | 影響マップ + リスク一覧 | コードは一行も変更しない |
| 2 — 設計 | データフロー、ファイル、インターフェース | **ユーザーの承認が必要** |
| 3 — 実装 | コード | 承認されたスコープの外には手を出さない |
| 4 — テスト | テスト(先に書く) | 全グリーン、アサーションを弱めない |
| 5 — レビュー | 発見事項リスト | 記録のみ、その場で直さない |
| 6 — クローズアップ | summary、learn、issue、changelog、インデックス | 記録のみ、その場で直さない |

設計意図:エージェントは実装を分単位に圧縮するので、ボトルネックは意思決定とスコープに移ります。ゲートは人間の手をまさにそこに置きます——Step 0 が要求に書かれていないことを埋め、Phase 2 で人が方向を承認し、Phase 5〜6 が観察と修正の分離を強制します。**レビューで見つかった問題は記録された issue になり、直すのは別の仕事です。** その場で直させないゲートこそが、レビューを正直に保つゲートです。
除外リストは Step 0 の急所です:空の「影響しない」リストこそ、Phase 3 でのスコープ外変更の最大の原因になります。

設計意図:エージェントは実装を分単位に圧縮するので、ボトルネックは意思決定とスコープに移ります。ゲートはまさにそこを守ります——Step 0 が要求に書かれていないことを埋め、Phase 2 で人が方向を承認し、Phase 5〜6 が観察と修正の分離を強制します。**レビューで見つかった問題は記録された issue になり、直すのは別の仕事です。** 記録のみにすることで、レビューの結論が信頼に足ります。

### 読者のために書く

Expand All @@ -111,9 +124,9 @@ book のドキュメントは産出物の種類ではなく読者で振り分け
| `summary/` | 人間 first | 報告書:背景 → 何をしたか → なぜ → 結果 |
| `learn/` | 人間 + エージェント | タグ付きの検索可能なナレッジエントリ——"timeout" のような症状タグも含む |
| `issue/` | 人間 + エージェント | 問題 + 再現 + 修正方向の提案 |
| `task/` | 作業メモリ | チェックリスト |
| `task/` | タスク管理 | チェックリスト |

diff を読まないと分からない summary は summary ではありません。タイトルだけで質問に答えられない learn は、次のセッションに検索されません。`book/notes/README.md` のテンプレートが品質基準を示しています
diff を読まないと分からない summary は summary ではありません。タイトルだけで質問に答えられない learn は、次のセッションに検索されません。`book/notes/README.md` のテンプレートが品質基準で、締めくくりの書き戻しは `book-writeback` スキルが担います

### インデックス契約

Expand All @@ -125,9 +138,9 @@ diff を読まないと分からない summary は summary ではありません

`book/README.md` は入口も兼ねます:エージェントはまずここで地図を手に入れる。フォルダはそのまま [Obsidian](https://obsidian.md) の vault として開けます。

### 人の言葉で書く
### bowrite(薄写)——人の言葉で書く

ドキュメントは何年も読まれ、数分で書かれる。だからスタイル規則は短く厳格です(`book/guidelines/writing-style.md`):具体的な人が具体的な状況で話すように書く——プロフェッショナルで構わないが、テンプレート的なのは不可。埋め草の前置きと空っぽのまとめを削り、事実は固定する——数値・コマンド・名前・責任の所在は動かさない。この基準は `bowrite` スキル(薄写:薄く書く——文は減り、核は変わらない;うまく書く——自然に、直接に)がエージェント側で担い、MrGeDiao の [shuorenhua](https://github.com/MrGeDiao/shuorenhua) と本プロジェクトのレビューで蓄積したパターンから蒸留されています
ドキュメントは何年も読まれ、数分で書かれる。だからスタイル規則は短く厳格です(`book/guidelines/writing-style.md`):具体的な人が具体的な状況で話すように書く——プロフェッショナルで構わないが、テンプレート的なのは不可。薄く:文は減り、核は変わらない——削るのは言葉であって情報ではない。うまく:自然に、直接に、無理な小賢しさなく、事実は固定——数値・コマンド・名前・責任の所在は動かさない。bowriteMrGeDiao の [shuorenhua](https://github.com/MrGeDiao/shuorenhua) と本プロジェクトのレビューで蓄積したパターン台帳から蒸留されています

### クリーンな git フロー

Expand All @@ -150,7 +163,7 @@ git clone <your-fork-url> myproject && cd myproject
bash scripts/init-project.sh myproject "What it does, in one line"

# 3. AI エージェントに四つのスキルをインストール:
cp -r skills/bocode skills/feature-flow skills/book-writeback skills/bowrite <your-skills-dir>/
cp -r skills/bocode skills/boscope skills/book-writeback skills/bowrite <your-skills-dir>/
# (ZCode: ~/.zcode/skills/ · Claude Code: ~/.claude/skills/ — 詳細は skills/README.md)

# 4. エージェントを AGENTS.md に向ける——ほとんどのツールが自動で読みます。
Expand All @@ -169,7 +182,7 @@ cp -r skills/bocode skills/feature-flow skills/book-writeback skills/bowrite <yo
| `book/plans/` | 実装プラン(施工図) |
| `book/notes/{summary,learn,task,issue}/` | 四種類のノート |
| `book/docs/{architecture,api,decisions}/` | スナップショット、契約、ADR |
| `skills/` | `bocode`、`feature-flow`、`book-writeback`、`bowrite` |
| `skills/` | `bocode`、`boscope`、`book-writeback`、`bowrite` |
| `code/tools/gen-book-index.mjs` | インデックスジェネレータ |
| `scripts/init-project.sh` | テンプレート → あなたのプロジェクト |
| `scripts/check-commit-message.mjs` | Clean Commit バリデータ(`.githooks/` 付き) |
Expand Down
Loading
Loading