Skip to content

Commit b08f62d

Browse files
authored
docs: fix stale knowledge subdir claim and add CLI mirror env vars (#90)
- knowledge.mdx: update constraint table and @reference syntax to reflect subdir support added in safari#142; remove flat-naming statements in best-practices section (zh + en) - cli.mdx: add MIRROR_URL and FLASHDUTY_UPDATE_BASE_URL to installer options table (zh + en)
1 parent 2a3069f commit b08f62d

4 files changed

Lines changed: 14 additions & 10 deletions

File tree

en/ai-sre/knowledge.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Knowledge Packs are one type of AI SRE resource and follow the same two-level sc
3232

3333
`DUTY.md` is the **table of contents entry point** for the entire Knowledge Pack. It is the catalog itself — the agent reads `DUTY.md` in full, then fetches other files on demand via `@filename` references. The system does not attach a separate file listing alongside `DUTY.md`; the catalog is the body.
3434

35-
References use the `@<filename>` style, where the filename points to another file within the same pack (flat naming, no directory hierarchy):
35+
References use the `@<path>` style, where the path points to another file within the same pack. Subdirectories are supported (e.g., `@runbooks/api-5xx.md`):
3636

3737
```markdown
3838
# On-call Knowledge Overview (DUTY.md)
@@ -41,8 +41,8 @@ References use the `@<filename>` style, where the filename points to another fil
4141
Our core services and owners: @services.md.
4242

4343
## Common Incident Handling
44-
- API 5xx spike: see @runbook-api-5xx.md
45-
- Database connection pool exhaustion: see @runbook-db-pool.md
44+
- API 5xx spike: see @runbooks/api-5xx.md
45+
- Database connection pool exhaustion: see @runbooks/db-pool.md
4646

4747
## Clusters & Environments
4848
Production cluster topology and access: @cluster.yaml.
@@ -62,7 +62,7 @@ After reading `DUTY.md`, the agent decides which `@references` to expand based o
6262
| Per-file size limit | 1 MiB | Files exceeding this cannot be saved |
6363
| Per-pack size limit | 5 MiB | The usage bar in the console reflects this quota |
6464
| File count limit | 100 | No new files can be added once the limit is reached |
65-
| Directory hierarchy | Not allowed | Filenames must be flat — no `/` or subdirectories |
65+
| Subdirectories | Allowed | Paths may contain `/` (e.g., `runbooks/api-5xx.md`); path segments cannot start with `.` |
6666
| Dot files | Not allowed | Filenames cannot start with `.` |
6767

6868
## Create & Edit
@@ -146,7 +146,7 @@ This two-level scope model applies uniformly to all resources within the account
146146
Keep `DUTY.md` to link lists and one-line descriptions only — all substantive content goes into the sibling files it `@references`. This keeps the catalog concise and readable, and lets the agent expand only the branches relevant to the current incident, avoiding irrelevant content consuming context.
147147
</Accordion>
148148
<Accordion title="One topic per file" icon="wrench">
149-
Focus each runbook on one incident type or one service (e.g., `runbook-api-5xx.md`, `runbook-db-pool.md`), using clear filenames as semantic indexes. Since packs use flat naming (no subdirectories), filename prefixes are your "directory structure."
149+
Focus each runbook on one incident type or one service (e.g., `runbooks/api-5xx.md`, `runbooks/db-pool.md`), using clear paths as semantic indexes. Subdirectories are supported — you can group files by service or topic (e.g., `runbooks/`, `configs/`).
150150
</Accordion>
151151
<Accordion title="Use structured file types" icon="code">
152152
Service catalogs, cluster topologies, and threshold configs are well-suited to `.yaml` / `.json` (e.g., `services.md`, `cluster.yaml`), so the agent can both read and parse them directly. Script snippets can use `.sh`.

en/developer/cli.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ Read the latest version from the [CDN latest version pointer](https://static.fla
4040
|----------|-------------|---------|
4141
| `FLASHDUTY_VERSION` | Install a specific version, e.g. `v0.6.0` | latest |
4242
| `FLASHDUTY_INSTALL_DIR` | Custom install directory | `/usr/local/bin` (shell), `~\.flashduty\bin` (PowerShell) |
43+
| `MIRROR_URL` | Override the release asset download mirror prefix used by the installer script; must use `https://` | `https://static.flashcat.cloud/flashduty-cli` |
44+
| `FLASHDUTY_UPDATE_BASE_URL` | Override the base URL used by `flashduty update` and the automatic update check | `https://static.flashcat.cloud/flashduty-cli` |
4345

4446
## Authentication
4547

zh/ai-sre/knowledge.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Knowledge Pack 是 AI SRE 资源的一种,遵循统一的两级作用域模型
3232

3333
`DUTY.md` 是整个知识库的**目录入口**。它本身就是清单——Agent 会全文读取 `DUTY.md`,再通过 `@文件名` 引用按需拉取其它文件。系统不会在 `DUTY.md` 之外另附一份文件列表;目录即正文。
3434

35-
引用采用 `@<文件名>` 风格,文件名指向同一个 Pack 内的另一份文件(扁平命名,无目录层级):
35+
引用采用 `@<路径>` 风格,路径指向同一个 Pack 内的另一份文件,支持子目录(如 `@runbooks/api-5xx.md`):
3636

3737
```markdown
3838
# 值班知识总览 (DUTY.md)
@@ -41,8 +41,8 @@ Knowledge Pack 是 AI SRE 资源的一种,遵循统一的两级作用域模型
4141
我们的核心服务与负责人见 @services.md。
4242

4343
## 常见故障处置
44-
- API 5xx 飙升:参见 @runbook-api-5xx.md
45-
- 数据库连接池打满:参见 @runbook-db-pool.md
44+
- API 5xx 飙升:参见 @runbooks/api-5xx.md
45+
- 数据库连接池打满:参见 @runbooks/db-pool.md
4646

4747
## 集群与环境
4848
生产集群拓扑与访问方式见 @cluster.yaml。
@@ -62,7 +62,7 @@ Agent 读取 `DUTY.md` 后,会根据当前故障判断需要展开哪些 `@引
6262
| 单文件上限 | 1 MiB | 超出无法保存 |
6363
| 单个 Pack 上限 | 5 MiB | 控制台用量条按此额度显示 |
6464
| 文件数量上限 | 100 | 达到上限后无法新增文件 |
65-
| 目录层级 | 不允许 | 文件名必须扁平,不能含 `/` 或子目录 |
65+
| 子目录 | 允许 | 路径可含 `/`,如 `runbooks/api-5xx.md`;不允许以 `.` 开头的路径段 |
6666
| 点文件 | 不允许 | 文件名不能以 `.` 开头 |
6767

6868
## 创建与编辑
@@ -146,7 +146,7 @@ Agent 读取 `DUTY.md` 后,会根据当前故障判断需要展开哪些 `@引
146146
`DUTY.md` 只放链接列表与一句话导引,所有实质内容下沉到被 `@引用` 的兄弟文件。这样目录精简、可读,Agent 也能只展开当前故障相关的分支,避免无关内容占用上下文。
147147
</Accordion>
148148
<Accordion title="一个主题一个文件" icon="wrench">
149-
每篇运行手册聚焦一类故障或一个服务(如 `runbook-api-5xx.md``runbook-db-pool.md`),用清晰的文件名做语义索引。由于 Pack 是扁平命名(无子目录),文件名前缀就是您的「目录结构」
149+
每篇运行手册聚焦一类故障或一个服务(如 `runbooks/api-5xx.md``runbooks/db-pool.md`),用清晰的路径做语义索引。支持子目录组织文件,可按服务或主题分组(如 `runbooks/``configs/`
150150
</Accordion>
151151
<Accordion title="善用结构化文件类型" icon="code">
152152
服务清单、集群拓扑、阈值配置等结构化信息适合用 `.yaml` / `.json` 承载(如 `services.md``cluster.yaml`),让 Agent 既能阅读也能直接解析。脚本片段可用 `.sh`

zh/developer/cli.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ irm https://static.flashcat.cloud/flashduty-cli/install.ps1 | iex
4040
|----------|------|--------|
4141
| `FLASHDUTY_VERSION` | 安装指定版本,如 `v0.6.0` | 最新版本 |
4242
| `FLASHDUTY_INSTALL_DIR` | 安装目录 | `/usr/local/bin`(Shell)、`~\.flashduty\bin`(PowerShell) |
43+
| `MIRROR_URL` | 覆盖安装脚本的 Release 资产下载镜像前缀,需以 `https://` 开头 | `https://static.flashcat.cloud/flashduty-cli` |
44+
| `FLASHDUTY_UPDATE_BASE_URL` | 覆盖 `flashduty update` 及自动更新检查的下载基础 URL | `https://static.flashcat.cloud/flashduty-cli` |
4345

4446
## 认证
4547

0 commit comments

Comments
 (0)