Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Knowledge/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
| flow2spec-dsh-adapter | `.Knowledge/topics/flow2spec-dsh-adapter.md` | `flow2spec init dsh`、DeepSeek Harness 项目技能发现与 `.dsh/` 目录适配 | 用户文档:`docs/使用说明.md` / `docs/en/usage-guide.md`;实现:`lib/dshAgentsAdapter.js` |
| flow2spec-core-package | `.Knowledge/topics/flow2spec-core-package.md` | `@double-coding/flow2spec-core` 职责边界:核心实现、发包模板真源、原生插件 API 与 CLI/legacy shim 消费关系 | 开发者文档:`packages/core/README.md`;入口:`packages/core/index.js` |
| flow2spec-qoder-plugin | `.Knowledge/topics/flow2spec-qoder-plugin.md` | Qoder 插件构建、`build:qoder-plugin`、zip 打包与插件市场分发 | 构建脚本:`scripts/build-qoder-plugin.js`;内容源:`packages/core/index.js`(resources API) |
| kb-routing-summary | `.Knowledge/topics/kb-routing-summary.md` | 路由初筛 `taskToTopicRules[].summary` 字段:frontmatter 唯一手写源、kb build 机械同步、kb check 质量校验与存量修复 | 引擎:`packages/core/lib/knowledgeEngine.js`;创作规范:配置根 `rules/f2s-topic-authoring.*` |

每主题保留 **1–3 条** 可点击摘要链接;全量路径对照写入 `.Knowledge/migration-report.md`(迁移场景)。
其中 **`implement-tech-design`**、**`f2s-doc-routing`**、**`config-precheck`**、**`f2s-task`** 在 `topics/` 内为**路由摘要**;执行长文见配置根 **`rules/f2s-*.md(c)`**;使用 Codex 时见 **`.codex/AGENTS.md`**、**`.codex/topics/f2s-*.md`**(`f2s-config-check` 与 `AGENTS` 前置同源,按需打开)。**`f2s-knowledge-preflight`** 与 **`f2s-kb-feedback-closing`** 是普通问答首读 / 源码补答收口门禁,作为配置根规则 / Codex 专题长文生效,不写入 `topicPaths` 或 `taskToTopicRules`;**`f2s-kb-feedback-closing`** 在 cases 1–3 建议执行 **`f2s-kb-distill`**。
Expand Down
70 changes: 51 additions & 19 deletions .Knowledge/manifest-routing.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"flow2spec-collaboration": ".Knowledge/topics/flow2spec-collaboration.md",
"flow2spec-doctor": ".Knowledge/topics/flow2spec-doctor.md",
"flow2spec-core-package": ".Knowledge/topics/flow2spec-core-package.md",
"flow2spec-qoder-plugin": ".Knowledge/topics/flow2spec-qoder-plugin.md"
"flow2spec-qoder-plugin": ".Knowledge/topics/flow2spec-qoder-plugin.md",
"kb-routing-summary": ".Knowledge/topics/kb-routing-summary.md"
},
"taskToTopicRules": [
{
Expand All @@ -43,7 +44,8 @@
"matcherPath": ".Knowledge/matchers/m-f2s-config-precheck.json",
"topics": [
"config-precheck"
]
],
"summary": "f2s 技能执行前必读 flow2spec.config.json 的开关口径"
},
{
"task": "implement-from-spec",
Expand All @@ -52,135 +54,161 @@
"topics": [
"f2s-doc-routing",
"implement-tech-design"
]
],
"summary": "stock-docs 与 req-docs 目录分工:需求、方案、沉淀文档放哪;按技术方案/需求文档实现代码的流程与门禁"
},
{
"task": "doc-routing",
"matcherId": "m-doc-routing",
"matcherPath": ".Knowledge/matchers/m-doc-routing.json",
"topics": [
"f2s-doc-routing"
]
],
"summary": "stock-docs 与 req-docs 目录分工:需求、方案、沉淀文档放哪"
},
{
"task": "change-tracking",
"matcherId": "m-change-tracking",
"matcherPath": ".Knowledge/matchers/m-change-tracking.json",
"topics": [
"f2s-task"
]
],
"summary": "任务清单 .task 目录的创建、续作与归档规则"
},
{
"task": "req-plan",
"matcherId": "m-req-plan",
"matcherPath": ".Knowledge/matchers/m-req-plan.json",
"topics": [
"f2s-req-plan"
]
],
"summary": "需求/变更的任务规划拆解与并行实现流程"
},
{
"task": "flow2spec-dsh-adapter",
"matcherId": "m-flow2spec-dsh-adapter",
"matcherPath": ".Knowledge/matchers/m-flow2spec-dsh-adapter.json",
"topics": [
"flow2spec-dsh-adapter"
]
],
"summary": "DeepSeek Harness 项目级技能初始化与目录适配"
},
{
"task": "git-commit",
"matcherId": "m-f2s-git-commit",
"matcherPath": ".Knowledge/matchers/m-f2s-git-commit.json",
"topics": [
"f2s-git-commit"
]
],
"summary": "Git 提交流程:变更检查、提交信息生成与知识库覆盖检查"
},
{
"task": "flow2spec-presentations",
"matcherId": "m-flow2spec-presentations",
"matcherPath": ".Knowledge/matchers/m-flow2spec-presentations.json",
"topics": [
"flow2spec-presentations"
]
],
"summary": "对外网站与 HTML 演示稿的位置、预览与维护边界"
},
{
"task": "flow2spec-milestones",
"matcherId": "m-flow2spec-milestones",
"matcherPath": ".Knowledge/matchers/m-flow2spec-milestones.json",
"topics": [
"flow2spec-milestones"
]
],
"summary": "Flow2Spec 产品自身的版本演进与里程碑时间线"
},
{
"task": "skill-authoring",
"matcherId": "m-skill-authoring",
"matcherPath": ".Knowledge/matchers/m-skill-authoring.json",
"topics": [
"skill-authoring"
]
],
"summary": "本仓 f2s-* SKILL 的小标题命名与排列顺序规范"
},
{
"task": "req-tech",
"matcherId": "m-req-tech",
"matcherPath": ".Knowledge/matchers/m-req-tech.json",
"topics": [
"f2s-req-tech"
]
],
"summary": "基于需求与知识库生成技术方案文档,落盘 req-docs"
},
{
"task": "dev-workflow-constraints",
"matcherId": "m-f2s-dev-workflow-constraints",
"matcherPath": ".Knowledge/matchers/m-f2s-dev-workflow-constraints.json",
"topics": [
"f2s-dev-workflow-constraints"
]
],
"summary": "Flow2Spec 本仓的模板真源、配置根、版本发布与分发边界"
},
{
"task": "kb-distill",
"matcherId": "m-f2s-kb-distill",
"matcherPath": ".Knowledge/matchers/m-f2s-kb-distill.json",
"topics": [
"f2s-kb-distill"
]
],
"summary": "f2s-kb-distill:Q&A 驱动知识提取与入库"
},
{
"task": "flow2spec-init-defaults",
"matcherId": "m-flow2spec-init-defaults",
"matcherPath": ".Knowledge/matchers/m-flow2spec-init-defaults.json",
"topics": [
"flow2spec-init-defaults"
]
],
"summary": "init 写入 flow2spec.config.json 的默认值与字段语义"
},
{
"task": "flow2spec-collaboration",
"matcherId": "m-flow2spec-collaboration",
"matcherPath": ".Knowledge/matchers/m-flow2spec-collaboration.json",
"topics": [
"flow2spec-collaboration"
]
],
"summary": "任务状态本地隔离、共享知识 delta 合入与 revision 冲突处理"
},
{
"task": "flow2spec-doctor",
"matcherId": "m-flow2spec-doctor",
"matcherPath": ".Knowledge/matchers/m-flow2spec-doctor.json",
"topics": [
"flow2spec-doctor"
]
],
"summary": "只读检查 Flow2Spec 环境、初始化、协作上下文与知识库健康"
},
{
"task": "flow2spec-core-package",
"matcherId": "m-flow2spec-core-package",
"matcherPath": ".Knowledge/matchers/m-flow2spec-core-package.json",
"topics": [
"flow2spec-core-package"
]
],
"summary": "Core/CLI 所有权、公共 API、独立版本、独立发布与更新兼容契约"
},
{
"task": "flow2spec-qoder-plugin",
"matcherId": "m-flow2spec-qoder-plugin",
"matcherPath": ".Knowledge/matchers/m-flow2spec-qoder-plugin.json",
"topics": [
"flow2spec-qoder-plugin"
]
],
"summary": "Qoder 插件的构建、zip 打包与插件市场分发"
},
{
"task": "kb-routing-summary",
"matcherId": "m-kb-routing-summary",
"matcherPath": ".Knowledge/matchers/m-kb-routing-summary.json",
"topics": [
"kb-routing-summary"
],
"summary": "初筛召回 summary 字段的同步、校验与创作规范"
}
],
"projectRev": 2,
Expand Down Expand Up @@ -279,6 +307,10 @@
"tags": [
"module"
]
},
"kb-routing-summary": {
"primary": "feature",
"confidence": "manual"
}
}
}
16 changes: 16 additions & 0 deletions .Knowledge/matchers/m-kb-routing-summary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "m-kb-routing-summary",
"version": "1.0.0",
"schema": "flow2spec.matcher.v1",
"includeAny": [
"summary",
"初筛",
"召回",
"路由摘要",
"命中率",
"路由 miss",
"matcher",
"includeAny",
"语义锚"
]
}
2 changes: 1 addition & 1 deletion .Knowledge/topics/f2s-config-precheck.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: config-precheck
revision: 0
summary: "config-precheck(路由摘要)"
summary: "f2s 技能执行前必读 flow2spec.config.json 的开关口径"
primary: config
confidence: manual
tags: [policy]
Expand Down
2 changes: 1 addition & 1 deletion .Knowledge/topics/f2s-fallback-triage.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: fallback-triage
revision: 0
summary: fallback-triage
summary: "路由未命中时的兜底分诊与补召回流程"
primary: policy
confidence: manual
---
Expand Down
2 changes: 1 addition & 1 deletion .Knowledge/topics/f2s-flow2spec-milestones.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: flow2spec-milestones
revision: 1
summary: flow2spec-milestones
summary: "Flow2Spec 产品自身的版本演进与里程碑时间线"
primary: feature
confidence: inferred
---
Expand Down
2 changes: 1 addition & 1 deletion .Knowledge/topics/f2s-flow2spec-presentations.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: flow2spec-presentations
revision: 0
summary: flow2spec-presentations
summary: "对外网站与 HTML 演示稿的位置、预览与维护边界"
primary: feature
confidence: inferred
---
Expand Down
2 changes: 1 addition & 1 deletion .Knowledge/topics/f2s-git-commit.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: f2s-git-commit
revision: 0
summary: "f2s-git-commit(路由摘要)"
summary: "Git 提交流程:变更检查、提交信息生成与知识库覆盖检查"
primary: policy
confidence: manual
---
Expand Down
2 changes: 1 addition & 1 deletion .Knowledge/topics/f2s-implement-tech-design.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: implement-tech-design
revision: 0
summary: "implement-tech-design(路由摘要)"
summary: "按技术方案/需求文档实现代码的流程与门禁"
dependsOn: [f2s-doc-routing]
primary: policy
confidence: manual
Expand Down
2 changes: 1 addition & 1 deletion .Knowledge/topics/f2s-init-defaults.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: flow2spec-init-defaults
revision: 2
summary: "flow2spec-init-defaults(路由摘要)"
summary: "init 写入 flow2spec.config.json 的默认值与字段语义"
primary: config
confidence: inferred
tags: [policy]
Expand Down
2 changes: 1 addition & 1 deletion .Knowledge/topics/f2s-req-plan.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: f2s-req-plan
revision: 0
summary: "f2s-req-plan(路由摘要)"
summary: "需求/变更的任务规划拆解与并行实现流程"
dependsOn: [f2s-task]
primary: policy
confidence: manual
Expand Down
2 changes: 1 addition & 1 deletion .Knowledge/topics/f2s-req-tech.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: f2s-req-tech
revision: 0
summary: "f2s-req-tech(路由摘要)"
summary: "基于需求与知识库生成技术方案文档,落盘 req-docs"
primary: policy
confidence: inferred
---
Expand Down
2 changes: 1 addition & 1 deletion .Knowledge/topics/f2s-stock-docs-vs-req-docs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: f2s-doc-routing
revision: 0
summary: "f2s-doc-routing(路由摘要)"
summary: "stock-docs 与 req-docs 目录分工:需求、方案、沉淀文档放哪"
primary: policy
confidence: manual
---
Expand Down
2 changes: 1 addition & 1 deletion .Knowledge/topics/f2s-task.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: f2s-task
revision: 0
summary: "f2s-task(路由摘要)"
summary: "任务清单 .task 目录的创建、续作与归档规则"
primary: policy
confidence: manual
---
Expand Down
2 changes: 1 addition & 1 deletion .Knowledge/topics/flow2spec-qoder-plugin.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: flow2spec-qoder-plugin
revision: 2
summary: "Qoder 原生插件构建:从 Core 全量生成 skills/rules/hooks 并打包 zip"
summary: "Qoder 插件的构建、zip 打包与插件市场分发"
primary: feature
confidence: inferred
tags: [module]
Expand Down
41 changes: 41 additions & 0 deletions .Knowledge/topics/kb-routing-summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
id: kb-routing-summary
revision: 0
summary: "初筛召回 summary 字段的同步、校验与创作规范"
primary: feature
confidence: manual
---
# 路由初筛 summary 字段(初筛召回锚)

## 适用场景

路由初筛命中率、`taskToTopicRules[].summary` 字段语义、rule.summary 同步机制、路由 miss 排查、summary/includeAny 创作与校验问题。

## 机制

- `taskToTopicRules[].summary` 是初筛阶段的常驻语义锚;初筛证据 = `task` 名 + `summary` + topic id + 依赖 + metadata(`includeAny` 仅在命中后打开的 matcher 分片中)。
- **唯一手写源 = topic frontmatter `summary`**;manifest 侧由 `kb build` 经 `normalizeRoutingWithGraph` 机械同步:多 topic 规则按全角「;」拼接,topic 无 summary 时保留规则既有值不清空。
- 同步点位复用:`kb build` / `kb apply` / `kb status`(drift 检测)三点位走同一函数;手改 manifest 的 `rule.summary` 会被判 routing drift。

## 质量校验(kb check)

- **warning**(`--strict` 才影响结果):summary 缺失;占位(`<topicId>(路由摘要)` / `routing summary` / TODO / TBD / 待补充 / 占位 / 与 topicId 相同);超长(含 CJK 时 > 40 字符,纯英文 > 20 词)。
- **issue**(直接失败):`rule.summary` 非字符串。
- CLI `kb check` 文本输出打印前 10 条 warning 明细。

## 创作与存量修复

- 写法规范(软 30 字 / 硬 40 字、职责 + 用户会问的核心名词、`includeAny` 单概念词优先、落盘前模拟问句自测)以 `f2s-topic-authoring`「初筛召回规范」为准,本 topic 不复述。
- 存量修复走 `f2s-kb-upgrade` 完整流程步骤 3a.7 / 3a.8:`kb build --fix-topics` 补占位头部 → `kb check --strict` 报 summary warning → agent 逐个 Read 正文补写语义摘要 → `kb build` 同步进 `rule.summary`。

## 边界

- `task` 字段保持稳定 id 语义(kb 引擎按 `task` 合并规则),不承载召回语义。
- 禁止手写 manifest 的 `rule.summary`,一律由 `kb build` 生成。
- verify 错命中闸门(命中正文未覆盖问句核心名词时并读次高候选)属统一入口规则条文,见 `rules/f2s-flow2spec-unified-entry`。

## 实现位置

- 引擎:`packages/core/lib/knowledgeEngine.js`(`deriveRoutingOverlayFromGraph.topicSummaries`、`normalizeRoutingWithGraph`、`validateKnowledgeGraph` 的 summary 校验)。
- CLI:`packages/cli/cli.js` kb check 的 warning 明细输出。
- 模板:Template 3.6.0 / projectRev 3 起,双语言 manifest 与 7 个 topic 均带定稿 summary。
2 changes: 1 addition & 1 deletion .Knowledge/topics/skill-authoring.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: skill-authoring
revision: 0
summary: "skill-authoring(路由摘要)"
summary: "本仓 f2s-* SKILL 的小标题命名与排列顺序规范"
primary: policy
confidence: inferred
---
Expand Down
Loading
Loading