Skip to content

Commit bd9cbad

Browse files
committed
docs: reorganize docs directory layout
- group repository docs under architecture, development, milestones, reference, and specs - update README and repository skill references to the new paths - keep docs root ready for a future docs/wiki subtree Signed-off-by: Chen Miao <chenmiao.ku@gmail.com>
1 parent 508c545 commit bd9cbad

File tree

12 files changed

+200
-72
lines changed

12 files changed

+200
-72
lines changed

.codex/skills/criew-development/SKILL.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: criew-development
3-
description: Repository-specific workflow and coding rules for the CRIEW codebase. Use when modifying or reviewing CRIEW Rust code, TUI behavior, sync/IMAP/reply/patch workflows, migrations, tests, docs, or config, and whenever the task must follow `docs/code-guildline.md` or `docs/code-guildline-cn.md`.
3+
description: Repository-specific workflow and coding rules for the CRIEW codebase. Use when modifying or reviewing CRIEW Rust code, TUI behavior, sync/IMAP/reply/patch workflows, migrations, tests, docs, or config, and whenever the task must follow `docs/development/code-guildline.md` or `docs/development/code-guildline-cn.md`.
44
---
55

66
# Criew Development
@@ -14,14 +14,14 @@ Read the repository docs first, then make focused changes that preserve the curr
1414

1515
Read the relevant repository docs before editing code.
1616

17-
- Read `docs/code-guildline.md` first for the canonical coding rules.
18-
- Read `docs/code-guildline-cn.md` when the user works in Chinese or explicitly asks for the Chinese guideline.
17+
- Read `docs/development/code-guildline.md` first for the canonical coding rules.
18+
- Read `docs/development/code-guildline-cn.md` when the user works in Chinese or explicitly asks for the Chinese guideline.
1919
- Read `README.md` or `README-zh.md` before changing user-visible behavior, install steps, naming, or operator workflow.
20-
- Read `docs/design.md` before changing architecture, module boundaries, sync flow, or data-model assumptions.
21-
- Read `docs/reply-format-spec.md` before changing reply composition, quoting, headers, or send flow.
22-
- Read `docs/config.example.toml` before changing config keys, defaults, or path semantics.
20+
- Read `docs/architecture/design.md` before changing architecture, module boundaries, sync flow, or data-model assumptions.
21+
- Read `docs/specs/reply-format-spec.md` before changing reply composition, quoting, headers, or send flow.
22+
- Read `docs/reference/config.example.toml` before changing config keys, defaults, or path semantics.
2323

24-
Treat `docs/code-guildline.md` as the priority source when a local convention is unclear.
24+
Treat `docs/development/code-guildline.md` as the priority source when a local convention is unclear.
2525
Then follow tool-enforced rules and the existing style in the touched module.
2626

2727
## Keep The CRIEW Boundaries
@@ -41,7 +41,7 @@ Do not reintroduce legacy Courier naming.
4141

4242
## Apply The Coding Rules Directly
4343

44-
Implement changes in the style required by `docs/code-guildline.md`.
44+
Implement changes in the style required by `docs/development/code-guildline.md`.
4545

4646
- Prefer descriptive, behavior-accurate names.
4747
- Encode units in names when the type system does not.
@@ -96,6 +96,6 @@ If time or environment constraints prevent a command from running, report that c
9696

9797
Load extra repository docs only when the task needs them.
9898

99-
- Read `docs/mvp-milestones.md` and `docs/reply-mvp-milestones.md` for historical intent or rollout sequencing.
100-
- Read `docs/vim-mvp-milestones.md` and `docs/code-preview-vim-prototype.md` for Vim-mode and code-preview behavior.
99+
- Read `docs/milestones/mvp-milestones.md` and `docs/milestones/reply-mvp-milestones.md` for historical intent or rollout sequencing.
100+
- Read `docs/milestones/vim-mvp-milestones.md` and `docs/specs/code-preview-vim-prototype.md` for Vim-mode and code-preview behavior.
101101
- Read `src/ui/tui/tests.rs` before extending TUI behavior that already has test coverage.

README-zh.md

Lines changed: 53 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@ CRIEW 是一个面向 Linux kernel patch 邮件工作流的 Rust TUI 工具,
1313

1414
English README: [README.md](README.md)
1515

16-
## 当前能力
16+
## 导航
17+
18+
- [项目概览](#项目概览)
19+
- [安装与配置](#安装与配置)
20+
- [使用](#使用)
21+
- [延伸阅读](#延伸阅读)
22+
23+
## 项目概览
24+
25+
### 当前能力
1726

1827
- 同步 `lore.kernel.org` 邮件列表,并按 checkpoint 做增量更新
1928
- 同步真实 IMAP `INBOX`,内置 `My Inbox` 订阅
@@ -22,7 +31,7 @@ English README: [README.md](README.md)
2231
- 在 TUI 中撰写回信,并通过 `git send-email` 发送
2332
- 浏览本地 kernel tree,支持内联 Vim-like 编辑和外部 Vim 编辑
2433

25-
## 发布基线
34+
### 发布基线
2635

2736
`v0.0.1` 是 CRIEW 第一版对外支持的发布基线。
2837
`v0.0.1` 开始,项目只使用 CRIEW 这一套命名:
@@ -32,7 +41,7 @@ English README: [README.md](README.md)
3241
如果你之前测试过 rename 落定前的预发布快照,或者更早打出的 `v0.0.1` tag,
3342
请重新拉取代码或重新安装,并按当前命名重新初始化 CRIEW 运行目录。
3443

35-
## 依赖
44+
### 依赖
3645

3746
- Rust stable
3847
- Git
@@ -51,9 +60,11 @@ criew doctor
5160

5261
它会检查 `b4``git send-email`、git 邮件身份和 IMAP 连接状态。
5362

54-
## 安装
63+
## 安装与配置
5564

56-
### 从 crates.io 安装
65+
### 安装
66+
67+
#### 从 crates.io 安装
5768

5869
```bash
5970
cargo install criew
@@ -64,7 +75,7 @@ cargo install criew
6475
CRIEW 会在首次需要时把它展开到 `~/.criew/vendor/b4/`
6576
这个 fallback 仍然需要系统可用的 Python 3。
6677

67-
### 从源码仓库安装
78+
#### 从源码仓库安装
6879

6980
如果你希望直接使用工作区里的 `./vendor/b4/b4.sh`,建议递归拉取子模块:
7081

@@ -80,7 +91,7 @@ cargo install --path . --locked
8091
git submodule update --init --recursive
8192
```
8293

83-
### 直接从 GitHub 安装
94+
#### 直接从 GitHub 安装
8495

8596
```bash
8697
cargo install --git https://github.com/ChenMiaoi/CRIEW.git --locked criew
@@ -89,14 +100,16 @@ cargo install --git https://github.com/ChenMiaoi/CRIEW.git --locked criew
89100
这种方式下,建议你自行通过 `b4.path``CRIEW_B4_PATH` 或系统 `PATH` 提供 `b4`
90101
如果 checkout 里也带着 `vendor/b4`,CRIEW 也能像源码模式一样直接使用它。
91102

92-
### 开发时直接运行
103+
#### 开发时直接运行
93104

94105
```bash
95106
cargo run -- doctor
96107
cargo run -- tui
97108
```
98109

99-
## 配置
110+
### 配置
111+
112+
#### 默认路径
100113

101114
默认配置文件路径:
102115

@@ -110,7 +123,9 @@ cargo run -- tui
110123
~/.criew/
111124
```
112125

113-
首次运行时,CRIEW 会自动生成一个最小配置文件。完整示例见 [docs/config.example.toml](docs/config.example.toml)
126+
#### 常见配置
127+
128+
首次运行时,CRIEW 会自动生成一个最小配置文件。完整示例见 [docs/reference/config.example.toml](docs/reference/config.example.toml)
114129

115130
一个常见配置如下:
116131

@@ -130,6 +145,8 @@ encryption = "ssl"
130145
tree = "/path/to/linux"
131146
```
132147

148+
#### 配置说明
149+
133150
配置说明:
134151

135152
- 相对路径会相对于配置文件所在目录解析
@@ -141,39 +158,43 @@ tree = "/path/to/linux"
141158
- `ui.inbox_auto_sync_interval_secs` 默认是 `30`
142159
- `~/.courier``courier-config.toml``courier.db``COURIER_B4_PATH``COURIER_IMAP_PROXY``v0.0.1` 起都不再受支持
143160

144-
## 基本使用
161+
## 使用
162+
163+
### 基本使用
145164

146-
### 1. 环境自检
165+
#### 1. 环境自检
147166

148167
```bash
149168
criew doctor
150169
```
151170

152-
### 2. 同步 lore 邮箱
171+
#### 2. 同步 lore 邮箱
153172

154173
```bash
155174
criew sync --mailbox io-uring
156175
```
157176

158-
### 3. 同步真实 IMAP 收件箱
177+
#### 3. 同步真实 IMAP 收件箱
159178

160179
```bash
161180
criew sync --mailbox INBOX
162181
```
163182

164-
### 4. 使用本地 `.eml` fixture 调试
183+
#### 4. 使用本地 `.eml` fixture 调试
165184

166185
```bash
167186
criew sync --mailbox test --fixture-dir ./fixtures
168187
```
169188

170-
### 5. 启动 TUI
189+
#### 5. 启动 TUI
171190

172191
```bash
173192
criew tui
174193
```
175194

176-
## TUI 常用操作
195+
### TUI 常用操作
196+
197+
#### 键位
177198

178199
- `:` 打开命令栏
179200
- `y` / `n` 启用或禁用当前订阅
@@ -184,6 +205,8 @@ criew tui
184205
- `r``e` 打开回信面板
185206
- `Tab` 在 Mail 页面和 Code Browser 页面之间切换
186207

208+
#### 命令栏命令
209+
187210
命令栏常见命令:
188211

189212
- `sync`
@@ -194,10 +217,12 @@ criew tui
194217
- `quit`
195218
- `!<shell command>`
196219

220+
#### 后台同步
221+
197222
如果 IMAP 配置完整,`My Inbox` 会参与启动自动同步,并在 TUI 保持打开时按配置周期持续做后台增量同步。
198223
启用的邮件列表订阅也会在 TUI 保持打开时按同一周期做后台增量同步,以持续拉取 Linux lore 和 QEMU GNU archive 上的新邮件。
199224

200-
## 回复邮件
225+
### 回复邮件
201226

202227
CRIEW 的 Reply Panel 会自动填充:
203228

@@ -210,16 +235,18 @@ CRIEW 的 Reply Panel 会自动填充:
210235

211236
同时会生成符合 kernel 邮件习惯的引用正文模板。发送时,底层走 `git send-email`
212237

213-
## 相关文档
238+
## 延伸阅读
239+
240+
### 相关文档
214241

215242
- [README.md](README.md): 英文项目说明
216-
- [docs/config.example.toml](docs/config.example.toml): 配置示例
217-
- [docs/design.md](docs/design.md): 设计文档
218-
- [docs/reply-format-spec.md](docs/reply-format-spec.md): 回信格式规范
219-
- [docs/mvp-milestones.md](docs/mvp-milestones.md): 历史里程碑
220-
- [docs/reply-mvp-milestones.md](docs/reply-mvp-milestones.md): 回信功能演进记录
243+
- [docs/reference/config.example.toml](docs/reference/config.example.toml): 配置示例
244+
- [docs/architecture/design.md](docs/architecture/design.md): 设计文档
245+
- [docs/specs/reply-format-spec.md](docs/specs/reply-format-spec.md): 回信格式规范
246+
- [docs/milestones/mvp-milestones.md](docs/milestones/mvp-milestones.md): 历史里程碑
247+
- [docs/milestones/reply-mvp-milestones.md](docs/milestones/reply-mvp-milestones.md): 回信功能演进记录
221248

222-
## 开发
249+
### 开发
223250

224251
```bash
225252
cargo fmt --all -- --check
@@ -228,7 +255,7 @@ cargo test --all-targets --all-features
228255
./scripts/check-coverage.sh
229256
```
230257

231-
## License
258+
### License
232259

233260
CRIEW 自身的 Rust 代码使用 [LGPL-2.1](LICENSE) 许可证发布。
234261
打包进来的 vendored 组件保留各自上游许可证,包括 `vendor/b4`(GPL-2.0)

0 commit comments

Comments
 (0)