[tech] 🚀 feat(skills): 主链无二次确认 + Core-only 更新自动代跑 - #60
Merged
Conversation
[摘要] 拿掉澄清→技术方案→创建 task→实现前提问四处二次确认,Core-only 更新改由 Agent 无需征询直接代跑 update+init,Template 变更才走 f2s-kb-upgrade;sync 反馈从 8 项压成 3 段主体 + <details> 详情。 四条行为改造(zh-CN/en-US 双语同步): - f2s-req-clarify:澄清落盘后过渡行改推进型措辞(→/继续),加"过渡行硬约束"禁"是否/正在按X生成"等等待型措辞,落盘后同轮立即调用 f2s-req-tech。 - f2s-req-plan:步骤 2 从"输出草稿并等待确认"改为"同轮展示+落盘";仅当输入含 ≥3 处 TBD 标记 / 未指明模块范围 / 用户明确停步语时才停下列问题。约束段与步骤 3 引子同步。 - f2s-implement-tech-design:步骤 3"实现前提问"从必做改为条件触发(默认跳过),触发条件与 f2s-req-plan 同口径。约束段同步。 - f2s-kb-sync:步骤 2《更新大纲》从 8 大项改为 3 段主体(📥 入库 / 🚫 不入库 / y/n)+ <details> 折叠详情(拟改文件/元数据/终稿/来源/不改动范围);输出摘要格式同构简化。y/n 门禁不变。 - f2s-update-check.js:buildNotice() Core-only 分支改"无需征询用户 + 5 步动作"(一行前置告知 + flow2spec update --cli fallback npx + 幂等 init + 删缓存 + 一行完成报告);Template 分支明确"询问后代跑走 f2s-kb-upgrade"。 - f2s-flow2spec-unified-entry:知识库版本自检小节改写为分两场景(Core-only 主动代跑无需征询 / Template 询问后代跑走 f2s-kb-upgrade)。 伴随沉淀两份 req-docs:《需求澄清》《技术方案》。 自检:template-knowledge / cli-update / npm test 全绿;hook node -c 语法通过。 来源:Session ff3c3636-0689-47f2-818a-87a18d73850d + Issue #38。
[摘要] 补齐 Core 3.8.0 + Template 3.7.0 发版后未跟着 flow2spec init 分发到本仓的 3 份配置根 hook 与 manifest 版本号,让本仓 SessionStart 探测口径与最新发版对齐。 - .claude / .codex / .cursor 三份 f2s-update-check.js 的 GENERATED_CORE_VERSION=3.8.0、GENERATED_TEMPLATE_VERSION=3.7.0 - .Knowledge/manifest-routing.json version=3.7.0,projectRev 3→3(与 pkgRev 对齐) - .Knowledge/index.md 路由段一句摘要收尾符号对齐
This was referenced Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Session
ff3c3636-0689-47f2-818a-87a18d73850d反映主链上有多个二次确认阻塞点让 Agent 停下等待;GitHub Issue #38 反映f2s-kb-sync大纲文案过复杂看不清"入哪 / 改什么 / 不入哪";同时 CLI/Core 兼容更新场景 hook 仅提示不代跑,用户需手工介入。改动一览
一次性调整四条主链行为(Q1–Q4)+ 一条自动更新分场景(Q5),所有变更仅落
packages/core/templates/{zh-CN,en-US}/(本仓开发纪律硬约束),双语同步。Q1 澄清 → 技术方案自动衔接
packages/core/templates/{zh,en}/skills/f2s-req-clarify/SKILL.md→/继续),加"过渡行硬约束"禁"是否 / 请确认 / 等您回复 / 正在按 X 生成"等等待型措辞;落盘后同轮立即调用f2s-req-tech,不停止工具调用。Q2 任何场景创建 task 不 2 次确认
packages/core/templates/{zh,en}/skills/f2s-req-plan/SKILL.md:步骤 2 从"输出草稿并等待确认"改为"同轮展示 + 落盘";步骤 3 引子从"用户确认后"改为"步骤 2 展示后同轮执行";约束段同步。packages/core/templates/{zh,en}/rules/f2s-implement-tech-design.md:步骤 3"实现前提问"从"必做不可跳过"改为"条件触发默认跳过";约束段同步。可机器判定的歧义例外(唯一停步条件):
未命中一律不停下问,直接展示 + 落盘 + 进入下一步。
Q3 sync 反馈简化(Issue #38)
packages/core/templates/{zh,en}/skills/f2s-kb-sync/SKILL.md:《更新大纲》从 8 大项改为 3 段主体 +<details>折叠详情:y/n 门禁不变(保留人工把关)。「输出摘要格式(建议)」同构简化为 ✅ 已修改 / ⏭️ 未执行 / 详情折叠。
Q4/Q5 自动更新分两场景
packages/core/templates/{zh,en}/hooks/f2s-update-check.jsbuildNotice()两分支改写:coreUpdateAvailable && !templateUpdateAvailable:Agent 无需征询用户,5 步动作序列——① 一行前置告知"正在自动更新 CLI/Core,不涉及知识库主题变更";②flow2spec update --cli(fallbacknpx @double-coding/flow2spec update --cli;仍失败一行报告不阻塞);③ 幂等flow2spec init <agents>;④ 删.Knowledge/update-check.json;⑤ 一行完成报告。不进入f2s-kb-upgrade。templateUpdateAvailable:Agent 转告 + 询问用户是否代跑;用户同意后代跑 update + init;若projectRev ≠ pkgRev走f2s-kb-upgrade。packages/core/templates/{zh,en}/rules/f2s-flow2spec-unified-entry.md「知识库版本自检」小节:同步分两场景措辞。附带产物
.Knowledge/req-docs/流程无二次确认与自动更新_需求澄清.md(264 行).Knowledge/req-docs/流程无二次确认与自动更新_技术方案.md(374 行).Knowledge/manifest-routing.json/index.md自检
用户后续动作
merge 后本仓 npm 发布前,用户新起会话或跑 `flow2spec init` / `npm run sync:agents` 让配置根
.claude//.cursor//.codex/追上 templates。新发版本(Core patch + Template minor bump)将带上这些改动分发到下游业务仓。边界
flow2spec.config.json新开关字段;Q2 例外阈值写死在 skill/rule 里。f2s-kb-sync是否入库门禁(保留 y/n),只改文案。npm install;Agent 层代跑更可控(Q5a A 方案)。f2s-kb-upgradeskill 本体。触发来源
ff3c3636-0689-47f2-818a-87a18d73850d🤖 Generated with Claude Code