docs: apply hierarchy across the corpus

This commit is contained in:
Turtle
2026-08-04 00:54:19 +08:00
parent f07f8f15ed
commit dd8d446286
112 changed files with 705 additions and 1057 deletions

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write packages/settings/README.md
README.md: 7a91355dd01805938944f0abce77765021288e6d
README.zh.md: 2df40b67eb8ce6cfc693ed6bf3574815c0219ec0
README.md: 3f43647f0558abf53c373ef7d97af16c0e17d2fe
README.zh.md: b5779bfe5da4cae148bcc6515ef13790f78bca7a

View File

@@ -2,11 +2,9 @@
English | [中文](README.zh.md)
The user-settings seam and its providers. The interface package owns the abstract `Settings` service — namespace registration, layered resolution, and change commits; providers implement raw-document storage and push external edits through the seam. All **product** packages.
This family resolves user-editable configuration through registered namespaces and swappable storage providers.
| Package | Role | ctx key |
|---|---|---|
| `settings/` | Settings seam: namespace registry, layered resolution, commit events | `ctx.settings` |
| `settings-local/` | File-backed provider (`settings.yaml`/`.json`) with hot reload and comment-preserving write-back | (registers `ctx.settings`) |
The interface lives at `settings/settings/`; providers are flat siblings. A network configuration-center provider (for example a nacos-style backend) joins here and registers on `ctx.settings`. Composition config stays in `cordis.yml`: a settings namespace carries only the user-editable subset, resolved as schema defaults, then the registrant's composition `base`, then the user document.
| [`settings/`](settings/README.md) | Defines namespace registration, layered resolution, and commits | `ctx.settings` |
| [`settings-local/`](settings-local/README.md) | Stores settings in a local file and observes external edits | registers on `ctx.settings` |

View File

@@ -1,12 +1,10 @@
# settings/用户设置能力族
# settings/用户设置能力族
[English](README.md) | 中文
用户设置 seam 及其 provider。接口包拥有抽象 `Settings` 服务——namespace 注册、分层解析与变更提交provider 实现原始文档存储并把外部修改推入 seam。全部为**产品**包
该包族通过注册的命名空间与可替换存储 provider 解析用户可编辑配置
| 包 | 角色 | ctx key |
| 包 | 职责 | ctx key |
|---|---|---|
| `settings/` | 设置 seamnamespace 注册、分层解析提交事件 | `ctx.settings` |
| `settings-local/` | 文件 provider`settings.yaml`/`.json`),热重载与保留注释的写回 | 注册 `ctx.settings` |
接口位于 `settings/settings/`provider 平级并列。网络配置中心 provider例如 nacos 类后端)加入本组并注册到 `ctx.settings`。组合配置仍留在 `cordis.yml`settings namespace 只承载用户可编辑子集,解析顺序为 schema 默认值、注册方的组合 `base`、用户文档。
| [`settings/`](settings/README.md) | 定义命名空间注册、分层解析提交 | `ctx.settings` |
| [`settings-local/`](settings-local/README.md) | 在本地文件中存储设置并观察外部编辑 | 注册 `ctx.settings` |