con un clic
f2s-kb-build
根据 .Knowledge/stock-docs 文档生成知识路由主题与索引;触发:生成项目上下文、f2s-kb-build、终稿生成上下文
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
根据 .Knowledge/stock-docs 文档生成知识路由主题与索引;触发:生成项目上下文、f2s-kb-build、终稿生成上下文
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Accept an explicit capability list or infer from zero input; first output a knowledge-base update outline, then write topics/index/manifest after confirmation; triggers: f2s-kb-sync、全局同步、知识库同步、已实现能力、global sync、sync knowledge base、implemented capability
可显式给出能力或零输入推断;先输出知识库更新大纲,确认后写入 topics/index/manifest;触发:f2s-kb-sync、全局同步、知识库同步、已实现能力
Clarify a PRD or requirement through follow-up questions until it is actionable, then use f2s-req-tech to produce a technical design; triggers: 需求澄清、PRD 澄清、requirement clarification、PRD clarification
Generate a technical design document from clarified requirements using the project knowledge base, Skills, and Rules; triggers: 生成技术方案、技术方案、f2s-req-tech、generate technical design、technical design
针对 PRD/需求反问直到清楚,再可用 f2s-req-tech 出技术方案;触发:需求澄清、PRD 澄清
根据澄清后的需求基于项目知识库/Skills/Rules 生成技术方案文档;触发:生成技术方案、技术方案、f2s-req-tech
| name | f2s-kb-build |
| description | 根据 .Knowledge/stock-docs 文档生成知识路由主题与索引;触发:生成项目上下文、f2s-kb-build、终稿生成上下文 |
执行口径:本技能只维护
.Knowledge(topics/index/manifest-routing/matchers分片),不改配置根rules/skills。不再维护.Knowledge/manifest-matchers.json(已废弃聚合文件;flow2spec init会删除遗留副本)。
subAgent / switchAgentVerification)语义以统一入口为唯一事实源:Cursor/Claude 读配置根 rules/f2s-flow2spec-unified-entry.*;Codex 读 .codex/topics/f2s-flow2spec-unified-entry.md(与上同源,flow2spec init 镜像)。本 SKILL 不复述。subAgent=true 且超出上述阈值):
.Knowledge/topics/<foo>.md,子 B 只写 .Knowledge/matchers/<m-foo>.json,路径互不重叠;.Knowledge/manifest-routing.json / .Knowledge/index.md(补 taskToTopicRules、topicPaths、matcherPath、topicDependencies、topicMetadata);.Knowledge/manifest-routing.json(含 topicMetadata)/ .Knowledge/index.md 恒由主 agent 落盘,子 agent 不得触碰。.Knowledge/stock-docs/。_终稿.md,或已由 f2s-doc-final 规范化;禁止以 f2s-doc-arch 产出的 *_初稿.md 作为入参直接执行本技能。_初稿、或用户刚完成架构初稿尚未执行 f2s-doc-final:停止,回复须先执行 f2s-doc-final <初稿路径>,待终稿落盘后再以终稿路径调用本技能。.Knowledge/req-docs/,提示用户先整理为 stock-docs 终稿后再执行。topics/:规则与流程正文(可执行知识)index.md:主题索引与语义说明(人读入口)manifest-routing.json + taskToTopicRules[].matcherPath 指向的 matchers/*.json:任务路由与关键词词表(机读入口).Knowledge/stock-docs/*.md。从文档中提炼:
matchers/<matcherId>.json 的 includeAny)topicDependencies)创作侧准则:本步骤涉及新增 / 修改 topic 与
topicDependencies,须先 Readrules/f2s-topic-authoring.*全文(Cursor/Claude:rules/f2s-topic-authoring.mdc;Codex:.codex/topics/f2s-topic-authoring.md),再继续步骤 3 / 步骤 5。命名、骨架、依赖判定、DAG 最小化、判定时机均以该条为准,本 SKILL 不复述。
拆分评估:若输入 stock-doc 超过 300–500 行,或语义分析后发现覆盖 3 个以上不相干职责域,须在输出摘要中说明:建议拆成多份 focused stock-doc(各自对应一个独立 topic),用户确认后再分批执行;若用户选择继续生成单个大 topic,不阻断,但在摘要中记录"主题偏大,建议后续拆分"。大功能主 topic 写业务闭环/入口/子模块 stock-doc 导航链接;子模块 topic 各自独立命中,不通过
topicDependencies串联概述与详情。
.Knowledge/topics/<topic>.md.Knowledge/index.md 的主题路由表。[标题](相对路径),优先 stock-docs/req-docs)。manifest-routing.topicPaths(topicId -> topic 文件路径)manifest-routing.taskToTopicRules[](任务到主题集合 + matcherId)manifest-routing.topicDependencies(先读依赖后读主主题)manifest-routing.topicMetadata(按需):仅给已存在或本次确认创建的 topicId 写入 { "primary": "feature|module|config|policy", "tags": ["..."], "confidence": "manual|inferred" };tags 可省略,且不得与 primary 重复。分类只用于治理、审计和阅读预期,不参与路由命中或执行强制性。新建 topic 时有明确证据可写 inferred;用户确认后才写 manual;证据不足时不写 metadata,并在摘要列为待确认。不得为了分类创建、重命名或拆分 topic。matchers/<matcherId>.json 的 includeAny(关键词词表;路径须与 taskToTopicRules[].matcherPath 一致)fallbackTopic、topicPaths、matcherId 引用有效sourceDoc 或文档引用统一指向 .Knowledge/stock-docs/<文件名>.md.Knowledge/req-docs/ 作为 topic 的 sourceDocrules/skillsindex 更新项用户输入:f2s-kb-build .Knowledge/stock-docs/<能力>_终稿.md,且现有 topics/<能力>.md 已存在。
<能力> 主题高度重合:原位更新 topics/<能力>.md,不要新建 <能力>-v2.md。topics/<能力>-<子域>.md,并在 manifest-routing.topicDependencies 中声明依赖关系。index 与路由清单,确保 topicPaths、fallbackTopic、matcherId 仍有效。.Knowledge/topics/*.md 与 manifest-routing.topicPaths 一一对应。index.md 主题表与 topics 文件集合一致,且每个主题都包含“关联文档(摘要)”。taskToTopicRules[].matcherPath 文件存在且其中 id 与 matcherId 一致。topicMetadata:key 是否均存在于 topicPaths;primary / tags / confidence 是否合法;tags 是否未与 primary 重复;是否未因分类改 topicId / 文件名。rules/skills。manifest-routing.json / .Knowledge/index.md 由主 agent 单点落盘,无子 agent 越权写入。