@double-codeing/flow2spec 2.2.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/README.md +90 -0
- package/cli.js +62 -0
- package/docs/Flow2Spec/344/275/277/347/224/250/350/257/264/346/230/216.md +170 -0
- package/docs/README-/344/275/223/347/263/273/344/270/216/345/216/237/347/220/206.md +132 -0
- package/docs/README-/345/221/275/344/273/244/350/257/264/346/230/216.md +258 -0
- package/docs/README-/347/233/256/345/275/225/344/270/216/350/267/257/345/276/204/347/272/246/345/256/232.md +119 -0
- package/docs/images//345/216/237/347/220/206/345/233/2761.png +0 -0
- package/docs/images//345/216/237/347/220/206/345/233/2762.png +0 -0
- package/docs/images//345/221/275/344/273/244/346/230/216/347/273/206/345/233/276.png +0 -0
- package/docs/images//346/227/245/345/270/270/346/223/215/344/275/234/346/265/201/347/250/213/345/233/276.png +0 -0
- package/docs/images//347/256/200/350/277/260/345/233/276.png +0 -0
- package/lib/agents.js +35 -0
- package/lib/init.js +68 -0
- package/package.json +59 -0
- package/templates/rules/implement-tech-design.mdc +177 -0
- package/templates/rules/stock-docs-vs-req-docs.mdc +14 -0
- package/templates/skills/f2s-ctx-build/SKILL.md +196 -0
- package/templates/skills/f2s-ctx-rm/SKILL.md +63 -0
- package/templates/skills/f2s-doc-arch/SKILL.md +74 -0
- package/templates/skills/f2s-doc-final/SKILL.md +85 -0
- package/templates/skills/f2s-doc-pdf/SKILL.md +63 -0
- package/templates/skills/f2s-kb-feat/SKILL.md +79 -0
- package/templates/skills/f2s-kb-fix/SKILL.md +67 -0
- package/templates/skills/f2s-kb-merge/SKILL.md +71 -0
- package/templates/skills/f2s-kb-sync/SKILL.md +88 -0
- package/templates/skills/f2s-req-backend/SKILL.md +52 -0
- package/templates/skills/f2s-req-clarify/SKILL.md +12 -0
- package/templates/skills/stock-docs-vs-req-docs/SKILL.md +27 -0
- package/templates/template//345/220/216/347/253/257/346/212/200/346/234/257/346/250/241/347/211/210.md +83 -0
- package/templates/template//347/273/210/347/250/277/346/250/241/347/211/210.md +93 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
> **「配置根」**:当前 agent 对应的 AI 工具配置目录(`flow2spec init` 写入,常见 **`.cursor/`**、**`.claude/`**、**`.codex/`**)。下文 **`配置根/...`** 指该目录下的相对路径。
|
|
2
|
+
|
|
3
|
+
# 终稿概述模版
|
|
4
|
+
|
|
5
|
+
> 本模板用于将「架构说明」「功能/技术方案」等文档整理为**终稿**形态,便于 **f2s-ctx-build** 技能生成 Rules、Skills 与文档索引。
|
|
6
|
+
> 适用:后端服务、前端/客户端、全栈、产品与设计说明等,按需保留或省略章节。
|
|
7
|
+
> **在 Flow2Spec 中**:本模版位于 **templates/template/**(与 docs 同级),init 时会将整目录复制到项目的 **`配置根/template/`**,本文件即 `配置根/template/终稿模版.md`。
|
|
8
|
+
> **执行 f2s-doc-final 技能时**:本模版仅作为**结构参考与写作提示**,不强制套用;转换以原文内容与逻辑为主,按需采纳章节建议。
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 核心概念
|
|
13
|
+
|
|
14
|
+
| 概念 | 说明 |
|
|
15
|
+
|------|------|
|
|
16
|
+
| (名词一) | 定义与用途。 |
|
|
17
|
+
| (名词二) | 定义与用途。 |
|
|
18
|
+
|
|
19
|
+
用表格列出**术语、实体、关键 ID**,便于 AI 提炼到 Rules/Skills。若为架构说明,可包含目录约定、模块划分、公共能力入口等;若为功能方案,可包含领域实体、配置 key、接口/页面名称等。
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 状态与流转
|
|
24
|
+
|
|
25
|
+
(若有状态、阶段或生命周期则填写;若无可简述或省略。)
|
|
26
|
+
|
|
27
|
+
- **状态 A**:含义;何时转为状态 B/C。
|
|
28
|
+
- **状态 B**:含义;后续流转。
|
|
29
|
+
|
|
30
|
+
若无复杂状态,可写「主流程上的阶段」或「本说明无状态机,见关键流程」。
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 业务规则
|
|
35
|
+
|
|
36
|
+
- 规则一:约束、限购、时效、权限等。
|
|
37
|
+
- 规则二:校验维度、失败条件、边界情况。
|
|
38
|
+
- 规则三:与配置/开关/环境的对应关系。
|
|
39
|
+
|
|
40
|
+
写清**约束、校验、配置项**,便于生成 Rules 的「规则要点」。前后端、配置、数据一致性、错误处理等均可在此列出。
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 关键流程
|
|
45
|
+
|
|
46
|
+
1. **流程一**:步骤简述;入口(接口/API/页面/事件);结果。
|
|
47
|
+
2. **流程二**:步骤简述;入口;结果。
|
|
48
|
+
3. **流程三**:步骤简述;入口;结果。
|
|
49
|
+
|
|
50
|
+
按「用户侧或系统侧」的主流程写,便于 AI 提炼到 Skills 的「关键流程」。可包含:接口调用顺序、页面跳转、事件触发、后台任务等。
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 接口 / API / 页面(可选)
|
|
55
|
+
|
|
56
|
+
(按文档类型择一或多选:后端写接口,前端写页面/组件与数据流,全栈可都写。)
|
|
57
|
+
|
|
58
|
+
### 接口 / API 名称或路径
|
|
59
|
+
|
|
60
|
+
- **请求**:入参说明(体/查询/头)。
|
|
61
|
+
- **返回**:出参说明;错误码或异常情况。
|
|
62
|
+
- **内部调用**:项目内方法、服务或模块(若有)。
|
|
63
|
+
|
|
64
|
+
### 页面 / 组件 / 路由(若有)
|
|
65
|
+
|
|
66
|
+
- **入口**:路由、入口组件或事件。
|
|
67
|
+
- **依赖数据**:接口、Store、本地状态。
|
|
68
|
+
- **产出**:页面/组件职责与关键交互。
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 配置 / 数据 / 错误(可选)
|
|
73
|
+
|
|
74
|
+
(按需选写,不必全部出现。)
|
|
75
|
+
|
|
76
|
+
- **配置**:配置项、key、必传/可选、含义;配置中心或环境变量约定。
|
|
77
|
+
- **数据**:核心数据模型、表结构、字段说明;或前端 Store/状态结构;与业务的对应关系。
|
|
78
|
+
- **错误码或异常**:code、场景、说明;或前端错误态、兜底逻辑。
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 实现位置与对接方式
|
|
83
|
+
|
|
84
|
+
- **实现位置**:代码/服务/仓库路径(如 `src/xxx/yyy`、服务名、仓库名),说明封装或实现所在位置。
|
|
85
|
+
- **对接方式**:新功能/新业务如何接入:需做哪些配置、建表、注册路由、引用组件等;无需改封装时的最小接入步骤。
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### 使用说明
|
|
90
|
+
|
|
91
|
+
- 将上述括号内的占位替换为实际内容;与文档类型无关的章节可整节删除或标「(不适用)」。
|
|
92
|
+
- 至少保留 **核心概念、业务规则、关键流程** 三个二级标题,其余按需增删。
|
|
93
|
+
- 保存为 `配置根/stock-docs/<方案名>_终稿.md` 后,按 **f2s-ctx-build** 技能、以该路径为入参即可生成 Rules、Skills、文档索引。
|