Conversation
- 将 activation-map.yaml 移入 references/,成为唯一真相源 - 构建时自动从 YAML 生成路由表注入 SKILL.md(build-allinone-skill.ts) - 精简 SKILL.md:删除 Quick Reference / Core Capabilities / Professional Skill Reference 冗余章节 - MCP 详细配置移至 references/mcp-setup.md - SKILL.md 从 434 行降至 199 行 - build-allinone-skill.ts 新增:复制 guideline references、注入路由表
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da907c5afe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const SOURCES = { | ||
| mainRules: 'config/source/guideline/cloudbase/SKILL.md', | ||
| skillsDir: 'config/source/skills', | ||
| guidelineReferences: 'config/source/guideline/cloudbase/references', |
There was a problem hiding this comment.
Preserve legacy activation-map path or update all consumers
This change moves the routing source from config/source/guideline/cloudbase/activation-map.yaml to .../references/activation-map.yaml via SOURCES.guidelineReferences, but existing consumers still read the old path (for example tests/skill-activation-routing.test.js lines 10-17). As merged, those reads now fail with ENOENT, which breaks routing-contract validation and any tooling still pinned to the previous canonical location. Please either keep a compatibility file at the old path or update all in-repo readers in the same commit.
Useful? React with 👍 / 👎.
| fallbackMarker + '.*?(?=\\n### )', | ||
| `${marker}\n\n${table}\n`, | ||
| 's' // dotall mode |
There was a problem hiding this comment.
Use a real regex for fallback routing-table injection
The fallback branch intended to replace the "canonical routing contract" section is currently ineffective: String.replace is called with a plain string pattern plus a third 's' argument, but JavaScript ignores extra args and does not interpret the pattern as regex. If the marker comment is absent, the replacement silently fails and the table is not injected, reintroducing drift between SKILL.md and activation-map.yaml.
Useful? React with 👍 / 👎.
- activation-map.yaml: 给所有 scenario 加上 label 和 mustCheckBeforeAction 字段 - build-allinone-skill.ts: generateRoutingTableFromYaml() 生成完整 5 列表格 - skill-activation-routing.test.js: 更新 ACTIVATION_MAP_FILE 路径到 references/
改动说明
问题
SKILL.md434 行过长,AI 处理时有效信息密度下降解决
activation-map.yaml移入references/,成为唯一真相源build-allinone-skill.ts)自动从 YAML 生成路由表注入SKILL.md,不再双写references/mcp-setup.md,存放 MCP 详细配置(从 SKILL.md 移出)SKILL.md从 434 行 → 199 行改动文件
config/source/guideline/cloudbase/SKILL.md— 精简config/source/guideline/cloudbase/references/activation-map.yaml— 新增(从上层目录移入)config/source/guideline/cloudbase/references/mcp-setup.md— 新增scripts/build-allinone-skill.ts— 新增 guideline references 复制 + 路由表注入