@double-codeing/flow2spec 3.0.7 → 3.0.9
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/README.en.md +114 -0
- package/README.md +78 -75
- package/docs/architecture.en.md +122 -0
- package/docs/commands-reference.en.md +605 -0
- package/docs/design-principles.en.md +592 -0
- package/docs/directory-conventions.en.md +49 -0
- package/docs/usage-guide.en.md +165 -0
- package/docs/usage-scenarios.en.md +222 -0
- package/package.json +1 -1
- package/templates/skills/f2s-ctx-build/SKILL.md +1 -0
- package/docs/Flow2Spec-/346/274/224/350/256/262/347/250/277.md +0 -411
- package/docs/images//346/212/200/350/203/275/351/227/255/347/216/257/345/233/276.png +0 -0
package/README.en.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Flow2Spec — Let AI Always Know What You're Doing
|
|
2
|
+
|
|
3
|
+
> Cures the "amnesia" of Cursor / Claude Code — with one `init` command, AI
|
|
4
|
+
> remembers project context across sessions. No more re-explaining every time.
|
|
5
|
+
>
|
|
6
|
+
> 🌐 **[中文](./README.md)** · 中 / EN
|
|
7
|
+
|
|
8
|
+
🎬 **[Live Demo (English)](https://lands-1203.github.io/Flow2Spec/en/)** | **[中文演示](https://lands-1203.github.io/Flow2Spec/)** (13-slide HTML PPT, `←` `→` to navigate, `S` for presenter mode)
|
|
9
|
+
|
|
10
|
+
🔧 **Quick start**:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npx @double-codeing/flow2spec@latest init
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Before / After
|
|
19
|
+
|
|
20
|
+
The exact same request, two conversations:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
> Update the batch re-scoring of the review template library
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Without Flow2Spec**:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
AI: Which module has this table?
|
|
30
|
+
AI: Is batchReScore sync or async?
|
|
31
|
+
AI: Is there a lock? What's the idempotency key?
|
|
32
|
+
AI: What's the response format? What's the error code?
|
|
33
|
+
AI: (Digging through 416 APIs, 796 files, 4.7 MB of source code…)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Repeated introductions · Repeated code searches · Repeated mistakes
|
|
37
|
+
|
|
38
|
+
**With Flow2Spec**:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
[matcher hit] m-product-review-template-library
|
|
42
|
+
[loading deps] 4 topics · ~300 lines
|
|
43
|
+
AI: Known — fire-and-forget
|
|
44
|
+
Redis lock smp:product-review:template-library:batch-rescore:lock (TTL 10 min)
|
|
45
|
+
Max 100 items per batch · error code 101
|
|
46
|
+
AI: Starting implementation, 3 files affected.
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
4.7 MB → 300 lines · Pinpoint accuracy in seconds
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## What Flow2Spec Does (3 Things)
|
|
54
|
+
|
|
55
|
+
**① Remembers project context across devices and sessions**
|
|
56
|
+
`.Knowledge/` structured knowledge base: routing manifest (`manifest-routing.json`) + keyword indices (matchers) + topic shards (topics). AI only loads what's relevant.
|
|
57
|
+
|
|
58
|
+
**② Routing manifest means AI doesn't dig through your repo**
|
|
59
|
+
Each task hits 1–4 topics, ~300 lines. Business constraints — Redis lock keys, error codes, batch limits — are all in the topics. AI doesn't have to guess from source code.
|
|
60
|
+
|
|
61
|
+
**③ f2s-* skills update knowledge as you code**
|
|
62
|
+
`/f2s-kb-feat` writes topics while writing features, `/f2s-kb-fix` corrects topics while fixing bugs, `/f2s-git-commit` checks topic coverage before committing. Changing code == updating knowledge. No separate "documentation maintenance."
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Getting Started
|
|
67
|
+
|
|
68
|
+
**Minimum viable setup is an empty skeleton.**
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npx @double-codeing/flow2spec@latest init
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
1 minute generates the directory structure + routing config. Empty, ready to use. **Next requirement hits whichever area → you document that area.** No upfront investment needed.
|
|
75
|
+
|
|
76
|
+
Real data from a production repo running for 3 months:
|
|
77
|
+
|
|
78
|
+
| Metric | Value |
|
|
79
|
+
|---|---|
|
|
80
|
+
| Public APIs | 416 |
|
|
81
|
+
| Source code | 796 files / 4.7 MB / ~100K lines |
|
|
82
|
+
| Flow2Spec per-task load | **≈ 300 lines** (99% noise removed) |
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## When NOT to Use
|
|
87
|
+
|
|
88
|
+
- **One-off scripts** — throwaway code is faster with a few Markdown files for AI context
|
|
89
|
+
- **Solo small projects** — a single CLAUDE.md is enough; routing overhead > benefits
|
|
90
|
+
- **Team won't maintain .Knowledge/** — tools can't replace discipline
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Documentation
|
|
95
|
+
|
|
96
|
+
### English
|
|
97
|
+
- [Usage Guide](./docs/usage-guide.en.md) — skill chains, config details
|
|
98
|
+
- [Commands Reference](./docs/commands-reference.en.md) — all f2s-* command reference
|
|
99
|
+
- [Directory Conventions](./docs/directory-conventions.en.md)
|
|
100
|
+
- [Architecture & Principles](./docs/architecture.en.md)
|
|
101
|
+
- [Usage Scenarios](./docs/usage-scenarios.en.md)
|
|
102
|
+
- [Design Principles](./docs/design-principles.en.md)
|
|
103
|
+
|
|
104
|
+
### 中文
|
|
105
|
+
- [使用说明](./docs/Flow2Spec使用说明.md)
|
|
106
|
+
- [命令说明](./docs/README-命令说明.md)
|
|
107
|
+
- [目录与路径约定](./docs/README-目录与路径约定.md)
|
|
108
|
+
- [体系与原理](./docs/README-体系与原理.md)
|
|
109
|
+
- [使用案例·模拟对话](./docs/Flow2Spec-使用案例-模拟对话.md)
|
|
110
|
+
- [设计说明](./docs/Flow2Spec-设计说明.md)
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
MIT. Copyright © 2026 兰涛
|
package/README.md
CHANGED
|
@@ -1,112 +1,115 @@
|
|
|
1
|
-
# Flow2Spec
|
|
1
|
+
# Flow2Spec — 让 AI 一直知道你在做什么
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> 解决 Cursor / Claude Code 的「失忆症」——用一个命令初始化,让 AI
|
|
4
|
+
> 跨会话记住项目上下文,不用每轮重新交代。
|
|
5
|
+
>
|
|
6
|
+
> 🌐 **[English](./README.en.md)** · 中 / EN
|
|
4
7
|
|
|
5
|
-
-
|
|
6
|
-
- **规则与技能能力**保留在各 agent 配置根(`.cursor/`、`.claude/`、`.codex/`)
|
|
8
|
+
🎬 **[在线演示(中文)](https://lands-1203.github.io/Flow2Spec/)** | **[English Demo](https://lands-1203.github.io/Flow2Spec/en/)**(13 页 HTML PPT,`←` `→` 翻页,`S` 演讲者模式)
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## 快速开始
|
|
10
|
+
🔧 **快速体验**:
|
|
13
11
|
|
|
14
12
|
```bash
|
|
15
13
|
npx @double-codeing/flow2spec@latest init
|
|
16
|
-
npx @double-codeing/flow2spec@latest init cursor claude codex
|
|
17
14
|
```
|
|
18
15
|
|
|
19
|
-
|
|
16
|
+
---
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
npm install -g @double-codeing/flow2spec@latest
|
|
23
|
-
```
|
|
18
|
+
## Before / After
|
|
24
19
|
|
|
25
|
-
|
|
20
|
+
同样一句话,两段对话:
|
|
26
21
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
| `.Knowledge/req-docs/` | 需求澄清与技术方案 |
|
|
31
|
-
| `.Knowledge/topics/` | 主题路由摘要 |
|
|
32
|
-
| `.Knowledge/template/` | 终稿与技术方案模板 |
|
|
33
|
-
| `.Knowledge/manifest-routing.json` + `matchers/` | 机器可读路由与关键词索引 |
|
|
34
|
-
| `配置根/rules/` + `配置根/skills/` | 各工具规则与技能入口 |
|
|
35
|
-
| `flow2spec.config.json` | 控制 `subAgent`、`switchAgentVerification`、`changeTracking`(各技能独立子项),默认均为 `false` |
|
|
22
|
+
```
|
|
23
|
+
> 改一下评价模板文案库的批量重评分
|
|
24
|
+
```
|
|
36
25
|
|
|
37
|
-
|
|
26
|
+
**没有 Flow2Spec**:
|
|
38
27
|
|
|
39
|
-
|
|
28
|
+
```
|
|
29
|
+
AI: 这个模块的表在哪?
|
|
30
|
+
AI: batchReScore 是同步还是异步?
|
|
31
|
+
AI: 有没有锁?幂等键是什么?
|
|
32
|
+
AI: 返回格式是什么?错误码是多少?
|
|
33
|
+
AI: (翻遍 416 个接口、796 份文件、4.7 MB 源码…)
|
|
34
|
+
```
|
|
35
|
+
反复介绍 · 反复翻代码 · 反复踩坑
|
|
40
36
|
|
|
41
|
-
|
|
37
|
+
**有 Flow2Spec**:
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
```
|
|
40
|
+
[matcher 命中] m-product-review-template-library
|
|
41
|
+
[加载依赖] 4 个 topic · 约 300 行
|
|
42
|
+
AI: 已知 — fire-and-forget
|
|
43
|
+
Redis 锁 smp:product-review:template-library:batch-rescore:lock(TTL 10 分钟)
|
|
44
|
+
单次最多 100 条 · 错误码 101
|
|
45
|
+
AI: 开始改,预计 3 处文件。
|
|
46
|
+
```
|
|
47
|
+
4.7 MB → 300 行 · 秒级定位到硬约束
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
---
|
|
46
50
|
|
|
47
|
-
|
|
48
|
-
> ```bash
|
|
49
|
-
> npm install -g @double-codeing/flow2spec@latest
|
|
50
|
-
> ```
|
|
51
|
-
> 其余场景以仓库内已初始化的规则与技能为准。
|
|
51
|
+
## Flow2Spec 做三件事
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
**① 跨设备会话记住项目上下文**
|
|
54
|
+
`.Knowledge/` 结构化知识库:路由清单(manifest-routing.json)+ 关键词索引(matchers)+ 主题分片(topics)。AI
|
|
55
|
+
启动时只读该读的。
|
|
54
56
|
|
|
55
|
-
|
|
57
|
+
**② 路由清单让 AI 不翻仓库,只拿该拿的**
|
|
58
|
+
每次需求命中 1~4 个 topic,约 300 行。业务的硬约束——锁的 key、错误码、上限——都在
|
|
59
|
+
topic 里,AI 不用从源码猜。
|
|
56
60
|
|
|
57
|
-
|
|
61
|
+
**③ f2s-* 技能改代码顺手更新知识**
|
|
62
|
+
`/f2s-kb-feat` 写功能时同步写 topic,`/f2s-kb-fix` 修 bug 时更正 topic,
|
|
63
|
+
`/f2s-git-commit` 提交前检查 topic 覆盖。改代码就是记知识,没有"单独维护文档"这件事。
|
|
58
64
|
|
|
59
|
-
|
|
60
|
-
|------|--------|------|
|
|
61
|
-
| 有 PRD,需澄清后出方案并落地 | `f2s-req-clarify` → `f2s-req-backend` → `f2s-implement-tech-design` → `f2s-kb-feat` | 澄清纪要 → 技术方案 → 实现+知识库 |
|
|
62
|
-
| 已有方案,需强制任务清单后实现 | `f2s-req-plan` | 可确认任务清单与实现编排 |
|
|
65
|
+
---
|
|
63
66
|
|
|
64
|
-
|
|
67
|
+
## 上手成本
|
|
65
68
|
|
|
66
|
-
|
|
69
|
+
**最小可用集是一个空骨架。**
|
|
67
70
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
| 外部文档转知识库 | `f2s-doc-final` → `f2s-ctx-build` | 可检索 Markdown + 路由索引 |
|
|
72
|
-
| 存量代码/散稿补录 | `f2s-doc-add` 或 `f2s-kb-sync` | 自动提取能力 → 主题索引 |
|
|
71
|
+
```bash
|
|
72
|
+
npx @double-codeing/flow2spec@latest init
|
|
73
|
+
```
|
|
73
74
|
|
|
74
|
-
|
|
75
|
+
1 分钟生成目录结构 + 路由配置,空的,直接跑。**下次需求命中哪块,写哪块**,不提前建设。
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
真实仓库跑了三个月的数据:
|
|
77
78
|
|
|
78
|
-
|
|
|
79
|
-
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
| 解决合并冲突 | `f2s-kb-merge` |
|
|
79
|
+
| 指标 | 数值 |
|
|
80
|
+
|---|---|
|
|
81
|
+
| 对外接口数 | 416 |
|
|
82
|
+
| 源码体积 | 796 文件 / 4.7 MB / ~10 万行 |
|
|
83
|
+
| Flow2Spec 每次加载 | **≈ 300 行**(噪声切掉 99%) |
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
---
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
## 什么时候别用
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
| 模板对齐(包升级后同步) | `f2s-kb-upgrade` | 可重复执行 |
|
|
89
|
+
- **一次性脚本** — 写完就删的东西,直接丢几个 Markdown 给 AI 更快
|
|
90
|
+
- **单人小项目** — 一份 CLAUDE.md 就够,路由和分片的开销大于收益
|
|
91
|
+
- **团队不愿同步 .Knowledge/** — 工具不能替代纪律
|
|
93
92
|
|
|
94
93
|
---
|
|
95
94
|
|
|
96
|
-
##
|
|
95
|
+
## 详细文档
|
|
97
96
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
### 中文
|
|
98
|
+
- [使用说明](./docs/Flow2Spec使用说明.md) — 技能链、配置详解
|
|
99
|
+
- [命令说明](./docs/README-命令说明.md) — 所有 f2s-* 命令速查
|
|
100
|
+
- [目录与路径约定](./docs/README-目录与路径约定.md)
|
|
101
|
+
- [体系与原理](./docs/README-体系与原理.md)
|
|
102
|
+
- [使用案例·模拟对话](./docs/Flow2Spec-使用案例-模拟对话.md)
|
|
103
|
+
- [设计说明](./docs/Flow2Spec-设计说明.md)
|
|
101
104
|
|
|
102
|
-
|
|
105
|
+
### English
|
|
106
|
+
- [Usage Guide](./docs/usage-guide.en.md)
|
|
107
|
+
- [Commands Reference](./docs/commands-reference.en.md)
|
|
108
|
+
- [Directory Conventions](./docs/directory-conventions.en.md)
|
|
109
|
+
- [Architecture & Principles](./docs/architecture.en.md)
|
|
110
|
+
- [Usage Scenarios](./docs/usage-scenarios.en.md)
|
|
111
|
+
- [Design Principles](./docs/design-principles.en.md)
|
|
103
112
|
|
|
104
|
-
##
|
|
113
|
+
## 协议
|
|
105
114
|
|
|
106
|
-
|
|
107
|
-
- [README-命令说明](./docs/README-命令说明.md)
|
|
108
|
-
- [README-目录与路径约定](./docs/README-目录与路径约定.md)
|
|
109
|
-
- [README-体系与原理](./docs/README-体系与原理.md)
|
|
110
|
-
- [Flow2Spec-使用案例-模拟对话](./docs/Flow2Spec-使用案例-模拟对话.md)
|
|
111
|
-
- [Flow2Spec-设计说明](./docs/Flow2Spec-设计说明.md)
|
|
112
|
-
- [Flow2Spec-演讲稿](./docs/Flow2Spec-演讲稿.md)
|
|
115
|
+
MIT. Copyright © 2026 兰涛
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
[中文](./README-体系与原理.md) | [English](./architecture.en.md)
|
|
2
|
+
|
|
3
|
+
# Architecture & Principles
|
|
4
|
+
|
|
5
|
+
Flow2Spec's goal is to separate "business knowledge curation" from "Agent capability loading":
|
|
6
|
+
|
|
7
|
+
- **Knowledge layer**: `.Knowledge` (documents and index)
|
|
8
|
+
- **Execution layer**: config root `rules/skills` (natively loaded by each tool)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. Two-Layer Structure
|
|
13
|
+
|
|
14
|
+
| Layer | Location | Role |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| Knowledge layer | `.Knowledge/` | Stores business documents, index, routing |
|
|
17
|
+
| Execution layer | `.cursor/.claude/.codex` | Stores rules and skill entry points |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 2. Progressive Reading
|
|
22
|
+
|
|
23
|
+
The recommended unified order:
|
|
24
|
+
|
|
25
|
+
1. `.Knowledge/manifest-routing.json`
|
|
26
|
+
2. `.Knowledge/matchers/<matcher>.json` (on demand: directly located by `manifest-routing.taskToTopicRules[].matcherPath`)
|
|
27
|
+
3. `.Knowledge/index.md`
|
|
28
|
+
4. The matched `stock-docs` / `req-docs` documents
|
|
29
|
+
5. Source code drill-down when necessary
|
|
30
|
+
|
|
31
|
+
After reading, execute the four-step pipeline `match -> expand -> verify -> act`: expand dependency topics after hitting the primary candidate, perform gap analysis, execute only when confidence is sufficient; clarify first when confidence is low.
|
|
32
|
+
|
|
33
|
+
Simultaneously, loading behavior is governed by the config root entry points (Flow2Spec package rules: `f2s-flow2spec-unified-entry.mdc` / `f2s-flow2spec-unified-entry.md`; legacy business repos commonly use `main.md(c)`; and `AGENTS.md`).
|
|
34
|
+
Codex does not read the `rules/` directory; execution constraints are carried through `.codex/AGENTS.md` + `skills/`.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 3. Key Chains
|
|
39
|
+
|
|
40
|
+
- Documentation curation chain: `f2s-doc-arch` -> `f2s-doc-final` -> `f2s-ctx-build`
|
|
41
|
+
- Implementation chain: `.Knowledge/req-docs/*.md` -> `implement-tech-design` -> code
|
|
42
|
+
- Maintenance chain: `f2s-kb-fix` / `f2s-kb-feat` / `f2s-kb-sync` / `f2s-kb-merge`
|
|
43
|
+
- Requirements planning chain: `f2s-req-plan` (planning + implementation, always creates task checklist)
|
|
44
|
+
- Change tracking chain: `changeTracking.*` config -> `f2s-task` rules (automatic) -> `.task/` task checklist -> cross-session continuation
|
|
45
|
+
- Package template/routing shape alignment with config root: `f2s-kb-upgrade` (**do not** equate running `flow2spec init` alone with "knowledge base upgrade"); migrate legacy repo structure into `.Knowledge`: `f2s-kb-migrate`
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 4. Agent Execution Model
|
|
50
|
+
|
|
51
|
+
Flow2Spec controls execution behavior through two fields in the project root `flow2spec.config.json`: `subAgent` and `switchAgentVerification`.
|
|
52
|
+
|
|
53
|
+
**How the Agent reads the above truth values**: multi-end prompts + **Read** as authority, see [usage-guide.en.md § 1 (the only detailed table)](./usage-guide.en.md); design summary see [design-principles.en.md § 4, 5.1](./design-principles.en.md).
|
|
54
|
+
|
|
55
|
+
### 4.1 Primary/Sub Agent Responsibility Division Principle
|
|
56
|
+
|
|
57
|
+
**`subAgent: false` (default)**: All `f2s-*` skills execute sequentially within the primary agent, no parallel decomposition.
|
|
58
|
+
|
|
59
|
+
**`subAgent: true`**: When the scale threshold agreed upon in the skill body is reached, sub-agents may be spawned for parallel processing. Responsibility boundaries are as follows:
|
|
60
|
+
|
|
61
|
+
| Role | Responsibility Boundary |
|
|
62
|
+
|------|----------|
|
|
63
|
+
| Primary agent | Overall planning, determining task granularity and allocation strategy, aggregating sub-agent output, verifying cross-unit consistency, final write-to-disk |
|
|
64
|
+
| Sub agent | Processes the assigned unit (module/document/topic), outputs results in the agreed format, does not make cross-unit decisions |
|
|
65
|
+
|
|
66
|
+
The decomposition boundaries for sub-agents are progressively defined by each `f2s-*` skill body (e.g., thresholds for module count, document count, code line count). **There is currently no unified stage table at the template layer**; the skill body takes precedence.
|
|
67
|
+
|
|
68
|
+
### 4.2 Verification Ownership Principle
|
|
69
|
+
|
|
70
|
+
**Default (whoever writes to disk verifies)**: Verification after write-to-disk or changes is performed within the agent that wrote to disk. If a sub-agent wrote, the sub-agent self-verifies; if the primary agent wrote, the primary agent self-verifies.
|
|
71
|
+
|
|
72
|
+
**Cross-verification (`switchAgentVerification: true`)**: The counterpart agent bears the verification responsibility, suitable for scenarios requiring higher confidence. The enabling conditions must be **satisfied simultaneously**:
|
|
73
|
+
|
|
74
|
+
1. Configuration `switchAgentVerification: true`
|
|
75
|
+
2. The currently executing `f2s-*` skill body **explicitly states** that the step depends on this field
|
|
76
|
+
|
|
77
|
+
Cross-verification rules:
|
|
78
|
+
|
|
79
|
+
| Writer | Verifier | Prerequisite |
|
|
80
|
+
|--------|--------|----------|
|
|
81
|
+
| Sub-agent writes | Primary agent verifies | No additional conditions |
|
|
82
|
+
| Primary agent writes | Sub-agent verifies | Requires `subAgent: true` and that sub-tasks have actually been decomposed; otherwise, the primary agent self-verifies |
|
|
83
|
+
|
|
84
|
+
Design intent: Cross-verification introduces an external perspective, reducing the blind spots in the writer's self-verification, but increases execution overhead. It is therefore an explicit opt-in rather than the default behavior.
|
|
85
|
+
|
|
86
|
+
### 4.3 Change Tracking (changeTracking)
|
|
87
|
+
|
|
88
|
+
`changeTracking` is a third dimension independent of `subAgent` / `switchAgentVerification`. It controls whether the skill automatically creates a task checklist that can be continued across sessions during execution.
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"changeTracking": {
|
|
93
|
+
"feat": false,
|
|
94
|
+
"fix": false,
|
|
95
|
+
"implement": false
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
- Each skill sub-item is independently controlled and does not affect each other
|
|
101
|
+
- When enabled: automatically checks `.task/todo.json` before skill execution, creates or resumes tasks; automatically archives upon completion
|
|
102
|
+
- Cross-session: when a new session describes related content, the `f2s-task` rule (`alwaysApply`) loads the remaining checklist and corresponding skill context after keyword matching
|
|
103
|
+
- `f2s-req-plan` is not constrained by this configuration and always creates a task checklist
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 5. Design Benefits
|
|
108
|
+
|
|
109
|
+
1. Share the same business knowledge source across tools
|
|
110
|
+
2. Does not break the rule loading conventions of Claude/Cursor/Codex
|
|
111
|
+
3. Controls task routing and dependencies via `manifest-routing` + `matcherPath` shards (`matchers/*.json`), reducing misreading and full scans
|
|
112
|
+
4. Clear primary/sub-agent responsibility boundaries: the primary agent always holds the global view, sub-agents focus on unit processing, consistency is ensured by the primary agent
|
|
113
|
+
5. Configurable verification ownership: default self-verification by the writer keeps overhead low; cross-verification can be enabled on demand to boost confidence in critical scenarios
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 6. Related Documents
|
|
118
|
+
|
|
119
|
+
- [Usage Guide](./usage-guide.en.md)
|
|
120
|
+
- [Commands Reference](./commands-reference.en.md)
|
|
121
|
+
- [Directory Conventions](./directory-conventions.en.md)
|
|
122
|
+
- [Usage Scenarios](./usage-scenarios.en.md)
|