@tanlinfeng/project-docs-workflow 2.3.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@tanlinfeng/project-docs-workflow",
3
- "version": "2.3.0",
3
+ "version": "3.0.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "description": "项目文档工作流 skill 包:提供 issue tracker / ADR / PDR / 术语表与工作流约定,自带轻量依赖 skill 与 ref 兜底,可独立分发。",
7
+ "description": "项目文档工作流 skill 包:提供 issue tracker / ADR / PDR / 术语表与工作流约定;随包分发主 skill 与 doc-opt / docs-html-view,内置依赖回退 ref(不随包分发独立依赖 skill),可独立使用。",
8
8
  "license": "MIT",
9
9
  "bin": {
10
10
  "project-docs-workflow": "bin/install.js"
@@ -20,10 +20,16 @@ Run it manually, once per project — on adoption, or again after the skill's te
20
20
 
21
21
  ## 依赖解析(两级)
22
22
 
23
- External skill references resolve in two levels:
23
+ External capability references resolve in two levels:
24
24
 
25
- 1. **Invoke the skill by name** — the user has the full version installed, or the bundled lite version ships with the package (canonical names: `grilling`, `domain-modeling`, `tdd`, `deepwork`, `retro`, `doc-opt`, `improve-codebase-architecture`; the full version wins when present).
26
- 2. **Fallback** — if that skill is absent, follow `references/deps/<name>.md`; `deepwork` / `retro` / `improve-codebase-architecture` share `references/deps/boundaries.md`.
25
+ 1. **Invoke the installed skill by name** — when the user has the standalone skill installed (canonical names: `grilling`, `grill-me`, `grill-with-docs`, `domain-modeling`, `tdd`, `deepwork`, `retro`, `improve-codebase-architecture`, plus the first-party `doc-opt`); the installed version wins.
26
+ 2. **Internal fallback** — otherwise **execute** the bundled reference(s) as instructions; do **not** invoke them as skills (there are none). Most names map to `references/deps/<name>.md`; the aliases map explicitly:
27
+ - `grill-me` → `references/deps/grilling.md` (entry alias of `grilling`, no separate flow)
28
+ - `grill-with-docs` → `references/deps/grilling.md` **+** `references/deps/domain-modeling.md`, interleaved (grilling rounds + immediate term/ADR writes)
29
+ - `deepwork` / `retro` / `improve-codebase-architecture` → `references/deps/boundaries.md`
30
+ The package ships **no** standalone dependency skills; these internal references are the always-available fallback.
31
+
32
+ > **Trigger policy.** Follow each installed skill's invocation metadata; wrappers such as `grill-me` / `grill-with-docs` may be user-invoked only. An optional name does **not** imply availability: if it is not installed, use the internal fallback — never invoke a missing skill or autonomously invoke a user-only wrapper. Per-name routing lives in `references/workflow.md`.
27
33
 
28
34
  Canonical wording (templates use the same line with the deps path parameterized): 调用 `<skill>`(未安装则按 `<deps 路径>/<file>.md` 执行)— skill-internal docs use `references/deps/<file>.md`, materialized project files use `docs/agents/deps/<file>.md`.
29
35
 
@@ -107,11 +113,11 @@ Rules carry the detail; read the one you need.
107
113
  - `references/rendering.md` — optional docs HTML rendering contract: render scope (`docs/pdr` + `docs/current` + the complete `docs/adr`, not issues / agents), link-authoring rules (PDR↔Current, optional descriptive ADR path links), sources never rewritten, manual opt-in.
108
114
  - `references/terminology.md` — `CONTEXT.md` primary glossary, domain glossary, usage rules.
109
115
  - `references/workflow.md` — recommended single-issue development flow (five steps, alignment, granularity, tracking, docs-sync hooks, skill boundaries).
110
- - `references/coexistence.md` — how this profile sits beside `domain-modeling`, `grilling`, `deepwork`, `tdd`, `retro`, and the bundled `doc-opt`; and how its docs/issues conventions supersede older `.scratch`-style trackers.
111
- - `references/deps/` — fallback procedures for the two-level resolution: `grilling` / `domain-modeling` / `tdd` / `doc-opt` / `boundaries` (`deepwork` / `retro` / `improve-codebase-architecture` share `boundaries.md`).
116
+ - `references/coexistence.md` — how this profile sits beside `domain-modeling`, `grilling`, `deepwork`, `tdd`, `retro`, and the first-party `doc-opt`; and how its docs/issues conventions supersede older `.scratch`-style trackers.
117
+ - `references/deps/` — internal fallback references for the two-level resolution: `grilling` / `domain-modeling` / `tdd` / `doc-opt` / `boundaries` (`deepwork` / `retro` / `improve-codebase-architecture` share `boundaries.md`).
112
118
 
113
119
  ## Templates
114
120
 
115
121
  - `assets/templates/project/*` — the files init materializes (Chinese). They carry the provenance marker (current generation: `v2`; in `agents-block.md` it sits just under the `## Agent skills` heading) — keep it; future generations update the marker so stale copies are detectable.
116
- - `references/deps/*` — fallback procedures when an external skill is absent. init copies the whole directory as-is into the project's `docs/agents/deps/`; they are not materialized templates and carry no provenance marker.
122
+ - `references/deps/*` — internal fallback references used when a standalone dependency skill is absent. init copies the whole directory as-is into the project's `docs/agents/deps/`; they are not materialized templates and carry no provenance marker.
117
123
  - `assets/templates/entries/*` — day-to-day authoring aids used when this skill is at hand (copy the skeleton when creating a new entry). NOT materialized by init; the rule docs are self-sufficient without them; materialized docs may reference their path opportunistically.
@@ -11,9 +11,9 @@
11
11
  - 根目录的 **`CONTEXT.md`**。
12
12
  - **`docs/adr/`**:读取与将要改动的领域相关的 ADR;规则与目录见 `docs/adr/README.md`。
13
13
 
14
- 如果这些文件不存在,**静默继续**:不要提示缺失,也不要主动建议创建它们。`/domain-modeling`(未安装则按 `docs/agents/deps/domain-modeling.md` 执行;经 `/grill-with-docs` 与 `/improve-codebase-architecture` 到达,后者未安装则按 `docs/agents/deps/boundaries.md` 执行)会在词条或决策真正定案时按需创建。
14
+ 如果这些文件不存在,**静默继续**:不要提示缺失,也不要主动建议创建它们。`domain-modeling`(未安装则按 `docs/agents/deps/domain-modeling.md` 执行)会在词条或决策真正定案时按需创建。
15
15
 
16
- 外部技能未安装时的兜底流程物化在 `docs/agents/deps/`。
16
+ 外部技能未安装时的兜底流程物化在 `docs/agents/deps/`。**组合回退**:`grill-with-docs` 是 `grilling` + `domain-modeling` 的包装(术语确定即写入 `CONTEXT.md`,满足三条判据记 ADR);未安装该包装时,按 `docs/agents/deps/grilling.md` 与 `docs/agents/deps/domain-modeling.md` 交织执行。`improve-codebase-architecture` 未安装时按 `docs/agents/deps/boundaries.md` 执行。以上均为**可选的独立技能名,不代表本包已随附**;本 skill 不会自动安装它们。
17
17
 
18
18
  ## File structure
19
19
 
@@ -35,7 +35,7 @@
35
35
 
36
36
  当你的产出提到某个领域概念(issue 标题、重构提案、假设、测试名)时,使用 `CONTEXT.md` 中定义的术语。不要漂移到术语表明确回避的同义词。
37
37
 
38
- 如果你需要的概念还不在术语表里,这本身是一个信号:要么你在发明项目不使用的语言(重新考虑),要么存在真实缺口(记下来,交给 `/domain-modeling`;未安装则按 `docs/agents/deps/domain-modeling.md` 执行)。
38
+ 如果你需要的概念还不在术语表里,这本身是一个信号:要么你在发明项目不使用的语言(重新考虑),要么存在真实缺口(记下来,交给 `domain-modeling`;未安装则按 `docs/agents/deps/domain-modeling.md` 执行)。
39
39
 
40
40
  ## Flag ADR conflicts
41
41
 
@@ -8,31 +8,33 @@ Single-context layouts. Multi-context (`CONTEXT-MAP.md`) is not covered by this
8
8
 
9
9
  Active model-sharpening conversations. The base CONTEXT and ADR formats are compatible. Where both apply, **this profile's materialized rules govern project docs** — it is a superset of the base formats (ADR lifecycle v2 (in-place edit + Log, delete→tombstone stub, reference sweep, catalog-style README); issue routing). Do not fork or redefine the base formats beyond this house variant.
10
10
 
11
- Bundled lite version ships with the package; fallback doc `references/deps/domain-modeling.md`.
11
+ Standalone skill optional; internal fallback `references/deps/domain-modeling.md`.
12
+
13
+ > The package ships **no** standalone dependency skills: each referenced capability resolves by installed-skill name, otherwise by the internal fallback reference in `references/deps/`. Standalone names below may remain as optional upstream names.
12
14
 
13
15
  ## `grill-with-docs`
14
16
 
15
- A wrapper: `grilling` + `domain-modeling`. Unaffected. `grill-me` is only an entry alias of `grilling`.
17
+ A wrapper: `grilling` + `domain-modeling`, **interleaved** — as each grilling round surfaces terms or decisions, they are written down immediately: a settled term goes into `CONTEXT.md`; a decision meeting the three ADR criteria (hard to reverse / surprising without context / real trade-off) is recorded as an ADR. `grill-me` is only an entry alias of `grilling` and has no separate flow.
16
18
 
17
- Bundled lite `grilling` ships with the package; fallback doc `references/deps/grilling.md` (and `references/deps/domain-modeling.md`).
19
+ Standalone skills are optional; internal fallbacks `references/deps/grilling.md` + `references/deps/domain-modeling.md`.
18
20
 
19
21
  ## `deepwork`
20
22
 
21
23
  Large or high-risk multi-phase efforts run under `deepwork`. This profile's `workflow.md` is for routine single-issue development; the two are never stacked — pick one per effort.
22
24
 
23
- Bundled lite version ships with the package; fallback doc `references/deps/boundaries.md`.
25
+ Standalone skill optional; internal fallback `references/deps/boundaries.md`.
24
26
 
25
27
  ## `tdd`
26
28
 
27
29
  Nests inside the Details step of `workflow.md` (red → green loop). Seam confirmation is folded into the Plan alignment — no second gate.
28
30
 
29
- Bundled lite version ships with the package; fallback doc `references/deps/tdd.md`.
31
+ Standalone skill optional; internal fallback `references/deps/tdd.md`.
30
32
 
31
33
  ## `retro`
32
34
 
33
35
  The workflow's fifth step 收尾回顾 is documentation sync only. Session / agent retrospectives belong to `retro`, not here.
34
36
 
35
- Bundled lite version ships with the package; fallback doc `references/deps/boundaries.md`.
37
+ Standalone skill optional; internal fallback `references/deps/boundaries.md`.
36
38
 
37
39
  ## `doc-opt`
38
40
 
@@ -1,5 +1,7 @@
1
1
  # 回退:边界类 skill(deepwork / retro / improve-codebase-architecture)
2
2
 
3
+ > 内部回退(精简版),裁剪 / 改编自 [mattpocock/skills](https://github.com/mattpocock/skills) 的 deepwork / retro / improve-codebase-architecture(MIT License, Copyright (c) 2026 Matt Pocock)。若环境已安装对应完整 skill,请优先使用完整版。
4
+
3
5
  > 当某个边界类 skill 被引用但环境未安装时,按对应小节执行。
4
6
 
5
7
  ## deepwork
@@ -16,11 +18,11 @@
16
18
 
17
19
  1. **发生了什么**:读指定会话的原始记录(未指定则默认当前会话)。
18
20
  2. **保留什么**:哪些做法或环境配置有效。
19
- 3. **改变什么**:给出针对 agent 环境的改进候选,按严重程度排序。
21
+ 3. **改变什么**:给出针对 agent **环境**的改进候选(导航指针、自动化检查、编码规范、全局指令瘦身、工具经济性、多余指令、信息可达性),按严重程度排序呈现给用户。
20
22
 
21
23
  ## improve-codebase-architecture
22
24
 
23
- 代码库架构改进的路线(找出「深化模块」的机会,把浅模块变深,提升可测试性与 AI 可导航性),建立在领域模型与架构词汇之上。
25
+ 代码库架构改进的路线(找出「深化模块」的机会,把浅模块变深,提升可测试性与 AI 可导航性),建立在领域模型与共享架构词汇(module / interface / depth / seam / adapter / leverage / locality)之上。
24
26
 
25
27
  **无完整流程时**:本技能包不提供扫描与 HTML 报告流程;需要术语或 ADR 支持时,**转 `domain-modeling`**(未安装则见同目录 `domain-modeling.md`)。
26
28
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > 当需要调用 `domain-modeling` 但环境未安装该 skill 时,按本文执行。
4
4
 
5
- > 轻量精简版,裁剪自 [mattpocock/skills](https://github.com/mattpocock/skills) 的 domain-modeling(MIT License, Copyright (c) 2026 Matt Pocock)。若环境已安装同名完整 skill,请优先使用完整版。
5
+ > 内部回退(精简版),裁剪自 [mattpocock/skills](https://github.com/mattpocock/skills) 的 domain-modeling(MIT License, Copyright (c) 2026 Matt Pocock)。若环境已安装同名完整 skill,请优先使用完整版。
6
6
 
7
7
  主动构建并打磨项目的领域模型:挑战术语、构造边界场景、在术语与决策成型时立刻写下。**修改**模型才算本流程;只是为查词而读 `CONTEXT.md` 不算。
8
8
 
@@ -2,7 +2,9 @@
2
2
 
3
3
  > 当需要调用 `grilling` 但环境未安装该 skill 时,按本文执行。
4
4
 
5
- > 轻量精简版,裁剪自 [mattpocock/skills](https://github.com/mattpocock/skills) 的 grilling(MIT License, Copyright (c) 2026 Matt Pocock)。若环境已安装同名完整 skill,请优先使用完整版。
5
+ > 内部回退(精简版),裁剪自 [mattpocock/skills](https://github.com/mattpocock/skills) 的 grilling(MIT License, Copyright (c) 2026 Matt Pocock)。若环境已安装同名完整 skill,请优先使用完整版。
6
+
7
+ > `grill-me` 只是本流程的入口别名,本身不含独立流程;`grill-with-docs` = 本流程 + `domain-modeling`(见同目录 `domain-modeling.md`),两者交织进行。
6
8
 
7
9
  持续追问用户,直到对方案达成共同理解。把它建模成一棵**设计树**:每个决策分叉出依赖它的子决策。用**轮次**遍历这棵树。
8
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > 当需要调用 `tdd` 但环境未安装该 skill 时,按本文执行。
4
4
 
5
- > 轻量精简版,裁剪自 [mattpocock/skills](https://github.com/mattpocock/skills) 的 tdd(MIT License, Copyright (c) 2026 Matt Pocock)。若环境已安装同名完整 skill,请优先使用完整版。
5
+ > 内部回退(精简版),裁剪自 [mattpocock/skills](https://github.com/mattpocock/skills) 的 tdd(MIT License, Copyright (c) 2026 Matt Pocock)。若环境已安装同名完整 skill,请优先使用完整版。
6
6
 
7
7
  以测试先行的方式构建功能或修 bug:red → green 循环。
8
8
 
@@ -12,7 +12,7 @@
12
12
  2. **红**:写一个失败的测试。测试通过公共接口验证行为,读起来像规格(描述 WHAT 而非 HOW),每个测试一个逻辑断言。不要 mock 内部协作者,不要走旁路(绕过接口查数据库)。
13
13
  3. **绿**:只写刚好让这个测试通过的实现。不加预判未来测试的投机功能。
14
14
  4. **重复**:以**纵向切片**推进——一个测试 → 一个实现 → 重复,每个测试是回应上一轮所学的一发**曳光弹**。不要「先写完所有测试再写所有实现」。
15
- 5. **重构**不属于 red → green 循环;它属于评审阶段。
15
+ 5. **重构**不属于 red → green 循环;它属于评审阶段(代码评审;若环境有 `code-review` 则按其执行)。
16
16
 
17
17
  探索代码库时读 `CONTEXT.md`(若存在),让测试名匹配领域语言,并遵守相关 ADR。
18
18
 
@@ -1,15 +0,0 @@
1
- ---
2
- name: deepwork
3
- description: 高成本、多阶段、高风险深度工作会议的边界占位;与五步流程互斥,需要完整工作流时请另行安装。
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Deepwork(边界占位)
8
-
9
- 本 skill 只界定边界,不含完整流程;需要完整的 deepwork 工作流时请单独安装。
10
-
11
- - **适用**:成本高、风险大、需跨多个阶段推进的整块工作。
12
- - **互斥**:与 `project-docs-workflow` 的五步流程(规划 / 骨架 / 细节 / 异常 / 回顾)互斥——同一个 effort 只能选一个,绝不叠加。
13
- - **无完整 deepwork 时**:退回一个最小的分阶段计划,每个阶段设评审闸门:计划 → 实现 → 评审,逐阶段推进。
14
-
15
- 术语或 ADR 需求交给 `domain-modeling`。
@@ -1,83 +0,0 @@
1
- ---
2
- name: domain-modeling
3
- description: 构建并打磨项目的领域模型与术语。当讨论代码库术语、编写或修改 CONTEXT.md、或记录/编辑 ADR 时使用。
4
- ---
5
-
6
- # Domain Modeling(领域建模)
7
-
8
- > 轻量精简版,裁剪自 [mattpocock/skills](https://github.com/mattpocock/skills) 的 domain-modeling(MIT License, Copyright (c) 2026 Matt Pocock)。若环境已安装同名完整 skill,请优先使用完整版。
9
-
10
- 在设计的同时**主动**构建并打磨项目的领域模型。这是主动的纪律:质疑术语、构造边界场景、在术语和决策成型的那一刻就把它们写下来。(只是为查词而读 `CONTEXT.md` 不算本 skill——那是任何 skill 都能做的一行习惯;本 skill 用于**修改**模型,而不只是消费它。)
11
-
12
- ## 文件结构
13
-
14
- 多数仓库只有一个上下文:
15
-
16
- ```
17
- /
18
- ├── CONTEXT.md
19
- ├── docs/
20
- │ └── adr/
21
- │ ├── 0001-event-sourced-orders.md
22
- │ └── 0002-postgres-for-write-model.md
23
- └── src/
24
- ```
25
-
26
- 若根目录存在 `CONTEXT-MAP.md`,说明仓库有多个上下文,由它指向每个上下文的位置。
27
-
28
- **惰性创建**:只在有内容可写时才建文件。没有 `CONTEXT.md`,就在第一个术语确定时创建;没有 `docs/adr/`,就在需要第一条 ADR 时创建。
29
-
30
- ## 会话中的动作
31
-
32
- - **对照词汇表质疑**:用户用词与 `CONTEXT.md` 冲突时立刻指出。「你的词汇表把 cancellation 定义为 X,但你说的似乎是 Y,到底是哪个?」
33
- - **锐化模糊表达**:用户用含糊或一词多义的词时,提出精确的规范术语。「你说的 account 是指 Customer 还是 User?这是两回事。」
34
- - **讨论具体场景**:讨论领域关系时用具体场景压力测试,逼用户把概念边界说清楚。
35
- - **与代码交叉验证**:用户描述某处如何工作时,核对代码是否一致;矛盾要当面提出。「你的代码取消整个 Order,但你刚说可以部分取消,哪个对?」
36
- - **立即更新 CONTEXT.md**:术语一确定就当场写入,不要攒批。
37
-
38
- `CONTEXT.md` 必须完全不含实现细节:它是词汇表,不是 spec、草稿本或实现决策仓库。
39
-
40
- ## CONTEXT.md 格式
41
-
42
- ```md
43
- # {上下文名称}
44
-
45
- {一两句话说明这是什么上下文、为什么存在。}
46
-
47
- ## Language
48
-
49
- **Order**:
50
- {一或两句话的术语描述}
51
- _Avoid_: Purchase, transaction
52
- ```
53
-
54
- 规则:
55
-
56
- - **有主见**:同一概念有多个词时,选最好的一个,其余列入 `_Avoid_`。
57
- - **定义紧致**:最多一两句,定义它**是什么**,不是**做什么**。
58
- - **只收本项目特有概念**:通用编程概念(超时、错误类型、工具模式)不进,哪怕项目大量使用它们。
59
- - **自然成簇时可分子标题**;单一内聚领域用平铺列表即可。
60
-
61
- ## ADR
62
-
63
- ADRs 放在 `docs/adr/`,顺序编号:`0001-slug.md`、`0002-slug.md`。编号时扫描现有文件取最大号加一。
64
-
65
- **模板极简**(一条 ADR 可以只有一段):
66
-
67
- ```md
68
- # {决策的简短标题}
69
-
70
- {1-3 句:背景是什么、决定了什么、为什么。}
71
- ```
72
-
73
- 价值在于记录**做过这个决策**及其**原因**,而非填满小节。可选小节仅在确有价值时加:`Status` frontmatter(`proposed | accepted | deprecated | superseded by ADR-NNNN`)、Considered Options、Consequences。
74
-
75
- **仅当以下三条同时成立才提议写 ADR**:
76
-
77
- 1. **难以逆转**:以后改主意的代价可观。
78
- 2. **无背景会令人意外**:未来的读者会想「当初为什么这么做?」
79
- 3. **是真实取舍的结果**:确有替代方案,且有特定理由选中这一个。
80
-
81
- 缺任何一条就跳过——容易反悔的将来直接反悔即可;不意外的没人会问;没有替代方案的记下来也只是「我们做了显而易见的事」。
82
-
83
- 典型合格情形:架构形态;上下文间的集成模式;带锁定的技术选型(数据库、消息总线、认证、部署目标);边界与范围决策(显式的「不做」同样有价值);刻意偏离常规路径的做法;代码里看不见的约束;拒绝理由非显然的替代方案。
@@ -1,3 +0,0 @@
1
- interface:
2
- display_name: "Domain Modeling"
3
- short_description: "Build and sharpen a domain model"
@@ -1,13 +0,0 @@
1
- ---
2
- name: grill-me
3
- description: 追问式访谈(grilling)的入口别名,用于把计划或设计压到没有含糊之处。
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Grill Me
8
-
9
- > 轻量精简版,裁剪自 [mattpocock/skills](https://github.com/mattpocock/skills) 的 grill-me(MIT License, Copyright (c) 2026 Matt Pocock)。若环境已安装同名完整 skill,请优先使用完整版。
10
-
11
- `grill-me` 只是 `grilling` 的入口别名,本身不含流程。
12
-
13
- 请改调用 `grilling` skill;若环境未安装,按 `project-docs-workflow/references/deps/grilling.md` 执行。
@@ -1,18 +0,0 @@
1
- ---
2
- name: grill-with-docs
3
- description: 追问式访谈的同时产出文档(ADR 与术语表)。
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Grill with Docs
8
-
9
- > 轻量精简版,裁剪自 [mattpocock/skills](https://github.com/mattpocock/skills) 的 grill-with-docs(MIT License, Copyright (c) 2026 Matt Pocock)。若环境已安装同名完整 skill,请优先使用完整版。
10
-
11
- `grill-with-docs` 是一个包装器:把 `grilling` 与 `domain-modeling` 一起跑。
12
-
13
- - 用 `grilling` 推进设计树、逐轮追问,直到达成共同理解。
14
- - 同时用 `domain-modeling`:术语确定时当场写入 `CONTEXT.md`;决策满足「难以逆转 / 无背景会意外 / 真实取舍」三条时记录 ADR。
15
-
16
- 两个流程交织进行:每轮追问中浮现的术语与决策,立刻落成文档。
17
-
18
- 若环境未安装,按 `project-docs-workflow/references/deps/grilling.md` 与 `project-docs-workflow/references/deps/domain-modeling.md` 执行。
@@ -1,46 +0,0 @@
1
- ---
2
- name: grilling
3
- description: 追问式访谈,把计划、决策或想法压到没有含糊之处。当用户想压力测试自己的思路、或说出任何 "grill" 触发短语时使用。
4
- ---
5
-
6
- # Grilling(追问式访谈)
7
-
8
- > 轻量精简版,裁剪自 [mattpocock/skills](https://github.com/mattpocock/skills) 的 grilling(MIT License, Copyright (c) 2026 Matt Pocock)。若环境已安装同名完整 skill,请优先使用完整版。
9
-
10
- 持续追问用户,直到双方对方案达成共同理解。把这次访谈建模成一棵**设计树(design tree)**:每个决策都会分叉出依赖它的子决策。
11
-
12
- ## 按轮次推进
13
-
14
- **frontier(前沿)** = 所有前置条件已确定的决策:也就是你现在就能问、不必臆测尚未听到的答案的问题。
15
-
16
- 1. 一轮处理当前 frontier:把 frontier 上的问题**一次性全部提出**。
17
- 2. 每个问题**编号**,并给出**你推荐的答案**。
18
- 3. 等用户回答后,再进入下一轮。
19
-
20
- 轮次格式:
21
-
22
- ```
23
- ❓ **Q1** - **<问题标题>**:<问题正文,可多段,可含多选项>
24
-
25
- ➡️ <你推荐的答案>
26
-
27
- ---
28
-
29
- ❓ **Q2** - **<问题标题>**:<问题正文>
30
-
31
- ➡️ <你推荐的答案>
32
- ```
33
-
34
- 用户每一轮的回答会重塑整棵树:已确定的决策把 frontier 向外推,解锁依赖它们的问题。每轮结束都**重新计算 frontier**,再问下一轮。若某问题的答案依赖本轮尚未解决的另一个问题,它属于**后面的轮次**,不属于本轮。
35
-
36
- ## 事实 vs 决策
37
-
38
- - **事实是 agent 的活,永远不要问用户。** 当某个 frontier 问题需要环境中的事实(文件系统、工具、外部文档等),派子 agent 去查,不要问用户你本可以自己查的东西。
39
- - **不要因此阻塞**:一个还在跑的探查本身就是一个未确定的前置条件,所以只有它下游的问题需要等子 agent 回报;frontier 上其余问题现在就问。
40
- - **决策是用户的活。** 每个决策都摆到用户面前并等待回答,绝不替用户拍板。
41
-
42
- ## 完成条件
43
-
44
- 当 frontier 为空——设计树每个分支都走过、没有任何东西被默默假设——本次访谈结束。
45
-
46
- **在用户确认你们达成了共同理解之前,不要动手实施。**
@@ -1,3 +0,0 @@
1
- interface:
2
- display_name: "Grilling"
3
- short_description: "Stress-test thinking a round of questions at a time"
@@ -1,15 +0,0 @@
1
- ---
2
- name: improve-codebase-architecture
3
- description: 代码库架构改进路线的占位;需要术语或 ADR 支持时转 domain-modeling。
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Improve Codebase Architecture(路径占位)
8
-
9
- > 轻量精简版,裁剪自 [mattpocock/skills](https://github.com/mattpocock/skills) 的 improve-codebase-architecture(MIT License, Copyright (c) 2026 Matt Pocock)。若环境已安装同名完整 skill,请优先使用完整版。
10
-
11
- 本 skill 只标出代码库架构改进的路线,不含完整流程。
12
-
13
- - **目标**:找出「深化模块」的机会(把浅模块变深),提升可测试性与 AI 可导航性。
14
- - **基础**:建立在领域模型与共享架构词汇(module / interface / depth / seam / adapter / leverage / locality)之上;领域术语来自 `CONTEXT.md`,决策记录在 `docs/adr/`。
15
- - **无完整流程时**:本技能包不提供扫描与 HTML 报告流程。若环境未安装完整 skill,而你需要术语或 ADR 支持,转 `domain-modeling`(未安装则见 `project-docs-workflow/references/deps/domain-modeling.md`)。
@@ -1,19 +0,0 @@
1
- ---
2
- name: retro
3
- description: 对编码会话或 agent 表现做回顾,输出针对 agent 环境的改进建议。
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Retro(会话回顾)
8
-
9
- > 轻量精简版,裁剪自 [mattpocock/skills](https://github.com/mattpocock/skills) 的 retro(MIT License, Copyright (c) 2026 Matt Pocock)。若环境已安装同名完整 skill,请优先使用完整版。
10
-
11
- 会话/agent 回顾的所有权属于本 skill;`project-docs-workflow` 第五步「回顾」只是文档同步,不做会话回顾。
12
-
13
- 最小回顾至少覆盖三问:
14
-
15
- 1. **发生了什么**:读指定会话的原始记录(未指定则默认当前会话),尽量取原始来源。
16
- 2. **保留什么**:哪些做法或环境配置有效,值得延续。
17
- 3. **改变什么**:给出针对 agent **环境**的改进候选(导航指针、自动化检查、编码规范、全局指令瘦身、工具经济性、多余指令、信息可达性),按严重程度排序呈现给用户。
18
-
19
- 若环境未安装完整 skill,按 `project-docs-workflow/references/deps/boundaries.md` 的最小三问回顾执行。
@@ -1,50 +0,0 @@
1
- ---
2
- name: tdd
3
- description: 测试驱动开发。当用户想以测试先行方式构建功能或修 bug、提到 "red-green-refactor"、或需要集成测试时使用。
4
- ---
5
-
6
- # TDD(测试驱动开发)
7
-
8
- > 轻量精简版,裁剪自 [mattpocock/skills](https://github.com/mattpocock/skills) 的 tdd(MIT License, Copyright (c) 2026 Matt Pocock)。若环境已安装同名完整 skill,请优先使用完整版。
9
-
10
- TDD 就是 red → green 循环。本 skill 是让这个循环产出**值得保留**的测试的参考:什么算好测试、测试放哪里、反模式、以及循环的规则。每一节在**每个循环**都适用——在循环前和循环中都查阅,而不是事后。
11
-
12
- 探索代码库时读 `CONTEXT.md`(若存在),让测试名与接口词汇匹配项目领域语言,并遵守所涉区域的 ADR。
13
-
14
- ## 什么是好测试
15
-
16
- 测试通过**公共接口**验证行为,而非实现细节。代码可以整个换掉,测试不应跟着变。好测试读起来像规格说明:「user can checkout with valid cart」准确告诉你存在什么能力,且因为不关心内部结构,能扛住重构。
17
-
18
- 特征:测试用户/调用方真正关心的行为;只用公共 API;重构后仍存活;描述 WHAT 而非 HOW;每个测试一个逻辑断言。
19
-
20
- ## Seam:测试放哪里
21
-
22
- **seam(接缝)** 是你据以测试的公共边界:无需伸手进内部即可观察行为的接口。测试住在 seam 上,绝不针对内部。
23
-
24
- - **只在事先约定的 seam 上测试。** 写任何测试前,先写下待测 seam 并与用户确认。未确认的 seam 上不写测试。你无法测试一切,事先约定 seam 才能把测试精力落在关键路径和复杂逻辑上,而不是每个边界情况。
25
- - 问:「公共接口是什么?我们该测哪些 seam?」
26
-
27
- 当接口形状本身存疑(模块多深、seam 该在哪、接口暴露什么)时,调用 `codebase-design` skill 获取 module / interface / depth / seam / adapter / leverage / locality 的共享词汇;它是参考,不是要跑的一次会话。
28
-
29
- ## 反模式
30
-
31
- - **耦合实现**:mock 内部协作者、测私有方法、或走旁路验证(绕过接口直接查数据库)。信号:重构后行为未变,测试却坏了。
32
- - **同义反复(tautological)**:断言以代码的算法重算期望值(`expect(add(a, b)).toBe(a + b)`、手工按同样方式推出的快照、常量自比),于是它只会通过、永远无法与代码唱反调。期望值必须来自独立真相源:已知良好的字面量、算好的例子、规格。
33
- - **横切切片**:先写完所有测试,再写所有实现。批量测试验证的是**想象中**的行为:测的是事物的**形状**而非面向用户的行为,测试对真实变化变得迟钝,且你在理解实现前就锁定了测试结构。改用**纵向切片**:一个测试 → 一个实现 → 重复,每个测试都是**曳光弹**,回应上一轮学到的东西。
34
-
35
- ## 循环规则
36
-
37
- - **先红后绿。** 先写失败的测试,再只写刚好让它通过的代码。不要预判未来测试或加投机功能。
38
- - **一次一片。** 每个循环一个 seam、一个测试、一个最小实现。
39
- - **重构不属于循环。** 它属于评审阶段(见 `code-review` skill),不属于 red → green 实现循环。
40
-
41
- ## 模拟(mock)
42
-
43
- **只在系统边界 mock**:外部 API(支付、邮件等)、数据库(有时——优先用测试库)、时间/随机性、文件系统(有时)。
44
-
45
- **不要 mock**:你自己的类/模块、内部协作者、任何你控制得了的东西。
46
-
47
- 边界接口的设计要便于 mock:
48
-
49
- - **依赖注入**:把外部依赖传进来,而不是在内部创建。`processPayment(order, paymentClient)` 好过内部 `new StripeClient(...)`。
50
- - **优先 SDK 式接口而非通用 fetcher**:每个外部操作一个具体函数(`getUser` / `getOrders` / `createOrder`),而不是一个带条件逻辑的通用 `fetch`。这样每个 mock 只返回一种确定形状,测试准备里没有条件逻辑,也更容易看出测试覆盖了哪些端点。
@@ -1,3 +0,0 @@
1
- interface:
2
- display_name: "TDD"
3
- short_description: "Test-driven red-green-refactor"