@modus-ai/modus 0.2.11 → 0.3.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.
Files changed (98) hide show
  1. package/dist/cli/index.js +2 -0
  2. package/dist/cli/index.js.map +1 -1
  3. package/dist/commands/doctor.d.ts.map +1 -1
  4. package/dist/commands/doctor.js +8 -3
  5. package/dist/commands/doctor.js.map +1 -1
  6. package/dist/commands/init.d.ts +37 -0
  7. package/dist/commands/init.d.ts.map +1 -1
  8. package/dist/commands/init.js +215 -0
  9. package/dist/commands/init.js.map +1 -1
  10. package/dist/commands/status.d.ts.map +1 -1
  11. package/dist/commands/status.js +9 -3
  12. package/dist/commands/status.js.map +1 -1
  13. package/dist/generators/claude.d.ts +4 -2
  14. package/dist/generators/claude.d.ts.map +1 -1
  15. package/dist/generators/claude.js +17 -8
  16. package/dist/generators/claude.js.map +1 -1
  17. package/dist/generators/codebuddy.d.ts.map +1 -1
  18. package/dist/generators/codebuddy.js +5 -1
  19. package/dist/generators/codebuddy.js.map +1 -1
  20. package/dist/generators/codex.d.ts.map +1 -1
  21. package/dist/generators/codex.js +4 -4
  22. package/dist/generators/codex.js.map +1 -1
  23. package/dist/generators/continue.d.ts +3 -2
  24. package/dist/generators/continue.d.ts.map +1 -1
  25. package/dist/generators/continue.js +11 -5
  26. package/dist/generators/continue.js.map +1 -1
  27. package/dist/generators/copilot.d.ts.map +1 -1
  28. package/dist/generators/copilot.js +3 -2
  29. package/dist/generators/copilot.js.map +1 -1
  30. package/dist/generators/cursor.d.ts +4 -3
  31. package/dist/generators/cursor.d.ts.map +1 -1
  32. package/dist/generators/cursor.js +15 -10
  33. package/dist/generators/cursor.js.map +1 -1
  34. package/dist/generators/custom.d.ts +2 -2
  35. package/dist/generators/custom.js +1 -1
  36. package/dist/generators/index.d.ts.map +1 -1
  37. package/dist/generators/index.js +7 -0
  38. package/dist/generators/index.js.map +1 -1
  39. package/dist/generators/modus.d.ts +12 -0
  40. package/dist/generators/modus.d.ts.map +1 -0
  41. package/dist/generators/modus.js +225 -0
  42. package/dist/generators/modus.js.map +1 -0
  43. package/package.json +1 -1
  44. package/schemas/harness-schema.yaml +13 -13
  45. package/templates/agents/modus-analyst.md +2 -2
  46. package/templates/agents/modus-deployer.md +1 -1
  47. package/templates/agents/modus-designer.md +1 -1
  48. package/templates/agents/modus-developer.md +1 -1
  49. package/templates/agents/modus-perf-auditor.md +1 -1
  50. package/templates/agents/modus-reviewer.md +1 -1
  51. package/templates/agents/modus-security-auditor.md +1 -1
  52. package/templates/agents/modus-skill-creator.md +1 -1
  53. package/templates/agents/modus-tester.md +1 -1
  54. package/templates/commands/auto.md +3 -1
  55. package/templates/commands/commit.md +11 -5
  56. package/templates/commands/cr.md +14 -10
  57. package/templates/commands/harness.md +27 -18
  58. package/templates/commands/init.md +56 -23
  59. package/templates/commands/modus.md +33 -11
  60. package/templates/commands/plan.md +23 -19
  61. package/templates/commands/spec.md +30 -17
  62. package/templates/commands/upgrade.md +50 -38
  63. package/templates/commands/vibe.md +30 -20
  64. package/templates/domain-business-readme.md +69 -0
  65. package/templates/domain-code/SKILL.md +94 -0
  66. package/templates/domain-code/apis.md +48 -0
  67. package/templates/domain-code/data-models.md +57 -0
  68. package/templates/domain-code/entities.md +45 -0
  69. package/templates/domain-code/services.md +51 -0
  70. package/templates/domain-history-readme.md +60 -0
  71. package/templates/domain-scenarios-readme.md +58 -0
  72. package/templates/knowledge-base-map.md +78 -0
  73. package/templates/knowledge-base-service-graph.md +100 -0
  74. package/templates/knowledge-catalog.md +38 -43
  75. package/templates/paths-v4.md +156 -0
  76. package/templates/rules/modus-workflow/RULE.mdc +45 -38
  77. package/templates/skills/modus-agents/analyst/SKILL.md +1 -1
  78. package/templates/skills/modus-agents/developer/SKILL.md +1 -1
  79. package/templates/skills/modus-agents/reviewer/SKILL.md +1 -1
  80. package/templates/skills/modus-agents/skill-creator/SKILL.md +3 -3
  81. package/templates/skills/modus-auto/SKILL.md +19 -19
  82. package/templates/skills/modus-cr/SKILL.md +1 -1
  83. package/templates/skills/modus-design-brief/SKILL.md +3 -3
  84. package/templates/skills/modus-harness/SKILL.md +5 -5
  85. package/templates/skills/modus-init/SKILL.md +64 -64
  86. package/templates/skills/modus-init/shared/frontmatter-spec.md +2 -2
  87. package/templates/skills/modus-init/shared/stack-detection.md +1 -1
  88. package/templates/skills/modus-init/strategies/fallback-init.md +1 -1
  89. package/templates/skills/modus-plan/SKILL.md +6 -6
  90. package/templates/skills/modus-platform/SKILL.md +1 -1
  91. package/templates/skills/modus-spec/SKILL.md +1 -1
  92. package/templates/skills/modus-vibe/SKILL.md +10 -10
  93. package/templates/template/analysis.md +83 -0
  94. package/templates/template/design.md +160 -0
  95. package/templates/template/pid.md +97 -0
  96. package/templates/template/plan.md +91 -0
  97. package/templates/template/spec.md +78 -0
  98. package/templates/template/sprint-contract.md +101 -0
@@ -220,7 +220,7 @@ Modus Auto — 智能模式路由工具
220
220
  /modus:auto https://tapd.cn/.../1234 --scores-only --output json
221
221
  /modus:auto --resume
222
222
 
223
- 更多文档:modus/knowledge-catalog.md
223
+ 更多文档:modus/knowledge_base/map.md
224
224
  ```
225
225
 
226
226
  ---
@@ -264,8 +264,8 @@ except MCP_UNAVAILABLE:
264
264
 
265
265
  # 2. 尝试读取知识目录(文件系统不可用时跳过)
266
266
  try:
267
- catalog = read("modus/knowledge-catalog.md")
268
- # v3.2 路径:modus/knowledge/biz-*/SKILL.md(唯一权威)
267
+ catalog = read("modus/knowledge_base/map.md")
268
+ # v3.2 路径:modus/knowledge_base/domain/*/code/SKILL.md(唯一权威)
269
269
  except FILESYSTEM_UNAVAILABLE:
270
270
  catalog = None
271
271
  note += " | 文件系统不可用,跳过 Skill 加载,基于 Story 文本评分"
@@ -297,7 +297,7 @@ context_bundle:
297
297
  story_id: "1234567890"
298
298
  story_title: "{Story 标题}"
299
299
  domains: ["{domain}"]
300
- domain_skill_path: "modus/knowledge/{domain}/SKILL.md" # v3.2 路径
300
+ domain_skill_path: "modus/knowledge_base/domain/{domain}/code/SKILL.md" # v3.2 路径
301
301
  scores: {complexity: 2, risk: 1, clarity: 3, contract: 1}
302
302
  recommended_mode: "spec"
303
303
  skip_clarify: true
@@ -359,15 +359,15 @@ if cache.valid:
359
359
 
360
360
  #### Step 2:读取知识目录
361
361
 
362
- 读取 `modus/knowledge-catalog.md`:
362
+ 读取 `modus/knowledge_base/map.md`:
363
363
 
364
364
  ```
365
365
  知识库路径(v3.2 Single Source of Truth):
366
- modus/knowledge/biz-*/SKILL.md ← Layer 2 业务域(唯一权威,v3.1+ 迁移后)
367
- modus/knowledge/_tech-wiki/SKILL.md
368
- modus/knowledge/_conventions/SKILL.md
366
+ modus/knowledge_base/domain/*/code/SKILL.md ← Layer 2 业务域(唯一权威,v3.1+ 迁移后)
367
+ modus/knowledge_base/domain/_tech-wiki/code/SKILL.md
368
+ modus/knowledge_base/domain/_conventions/code/SKILL.md
369
369
 
370
- ⚠️ 注意(v3.1+ 变更):业务域 Skill 已迁移至 modus/knowledge/biz-*/SKILL.md,
370
+ ⚠️ 注意(v3.1+ 变更):业务域 Skill 已迁移至 modus/knowledge_base/domain/*/code/SKILL.md,
371
371
  .codebuddy/skills/modus-biz-* 为引用桩,不含实际内容,请勿从旧路径读取。
372
372
  ```
373
373
 
@@ -454,7 +454,7 @@ if cache.valid:
454
454
  若用户带 `--preview`,路由完成后输出产物目录预览,然后停止:
455
455
  ```
456
456
  预览:/modus:spec 将在以下路径生成产物
457
- modus/stories/{id}/spec/
457
+ modus/artifacts/{id}/code/spec/
458
458
  ├── .modus-state.yaml
459
459
  ├── delta/{domain}.md
460
460
  ├── design.md
@@ -521,7 +521,7 @@ if cache.valid:
521
521
  确认启动 /modus:plan
522
522
  Story 摘要: {标题 + 核心需求}
523
523
  业务域: {domain} [draft]
524
- 产物路径: modus/stories/{id}/plan.md ← v3.2 统一路由
524
+ 产物路径: modus/artifacts/{id}/code/plan.md ← v3.2 统一路由
525
525
  快速模式(--quick,跳过设计文档): [y/N]
526
526
 
527
527
  确认?[Y/n]
@@ -533,7 +533,7 @@ if cache.valid:
533
533
  Story URL: {原始 URL}
534
534
  业务域: {domain} [draft]
535
535
  规格级别: Full(因有接口契约变更)/ 可加 --lite 降级
536
- 产物路径: modus/stories/{id}/spec/ ← v3.2 统一路由
536
+ 产物路径: modus/artifacts/{id}/code/spec/ ← v3.2 统一路由
537
537
  验收标准: 已提取 {n} 条,将作为 Scenario 输入
538
538
 
539
539
  确认?[Y/n]
@@ -543,7 +543,7 @@ if cache.valid:
543
543
  ```
544
544
  确认启动 /modus:harness
545
545
  Story URL: {原始 URL}
546
- 产物路径: modus/stories/{id}/harness/ ← v3.2 统一路由
546
+ 产物路径: modus/artifacts/{id}/code/ ← v3.2 统一路由
547
547
  跳过阶段: 无(如需跳过:--skip [agents])
548
548
 
549
549
  ⚠️ Harness 将全自动执行多个 SubAgent,预计耗时较长。
@@ -562,7 +562,7 @@ context_bundle:
562
562
  acceptance_criteria: ["{ac1}", "{ac2}"]
563
563
  domains: ["{domain}"]
564
564
  domain_skill_paths: # v3.2 路径(唯一权威)
565
- - "modus/knowledge/{domain}/SKILL.md"
565
+ - "modus/knowledge_base/domain/{domain}/code/SKILL.md"
566
566
  domain_skills_loaded: true
567
567
  scores:
568
568
  complexity: 2
@@ -588,16 +588,16 @@ context_bundle:
588
588
 
589
589
  ```
590
590
  有 --story [id]:
591
- modus/stories/{id}/plan.md # plan 产物
592
- modus/stories/{id}/spec/ # spec 产物目录
593
- modus/stories/{id}/harness/ # harness 产物目录
591
+ modus/artifacts/{id}/code/plan.md # plan 产物
592
+ modus/artifacts/{id}/code/spec/ # spec 产物目录
593
+ modus/artifacts/{id}/code/ # harness 产物目录
594
594
 
595
595
  无 --story(自动推断 feature 名):
596
596
  modus/local/{feature-name}/plan.md
597
597
  modus/local/{feature-name}/spec/
598
598
  ```
599
599
 
600
- > **v3.2 变更说明**:废弃 `modus/plans/active/{id}/`,统一使用 `modus/stories/{id}/`。
600
+ > **v3.2 变更说明**:废弃 `modus/plans/active/{id}/`,统一使用 `modus/artifacts/{id}/`。
601
601
 
602
602
  ---
603
603
 
@@ -653,7 +653,7 @@ Modus Auto — 请提供需求来源:
653
653
  - **--no-confirm 默认生效**:Codex 环境视同携带此参数
654
654
  - **文件系统降级**:文件系统不可用时跳过 Skill 加载,仅基于 Story 文本评分,Context Bundle 不写文件
655
655
  - **结构化日志**:`--output json` 时输出完整 JSON,便于在 Codex 日志中机器解析
656
- - **Context Bundle 路径**:使用 `modus/knowledge/biz-*/SKILL.md`(v3.2 唯一权威路径),不读旧路径
656
+ - **Context Bundle 路径**:使用 `modus/knowledge_base/domain/*/code/SKILL.md`(v3.2 唯一权威路径),不读旧路径
657
657
 
658
658
  ---
659
659
 
@@ -51,7 +51,7 @@ disable: false
51
51
  - 若路径是目录,自动在目录内查找:`design.md` > `plan.md`,以及同级 `tasks.md`
52
52
  2. 若有 `--story`,调用 TAPD MCP(`tapd_mcp_http`)读取 Story 描述作为 PRD 补充
53
53
  3. `modus/config.yaml`:读取 `constitution`(`hard_rules`、`tech_stack`、`key_patterns`)
54
- 4. `modus/knowledge-catalog.md`:识别相关业务域,加载对应 `modus/knowledge/biz-{domain}/SKILL.md`(仅 hash 检查,不更新)
54
+ 4. `modus/knowledge_base/map.md`:识别相关业务域,加载对应 `modus/knowledge_base/domain/{domain}/code/SKILL.md`(仅 hash 检查,不更新)
55
55
 
56
56
  **输出上下文加载摘要:**
57
57
 
@@ -27,7 +27,7 @@ disable: false
27
27
 
28
28
  | `mode` 值 | 来源类型 | 处理方式 |
29
29
  |----------|---------|---------|
30
- | `harness` | 文件路径 | 读取 `modus/stories/{story-id}/harness/01-analysis.md`(v3.2 路径)|
30
+ | `harness` | 文件路径 | 读取 `modus/artifacts/{story_id}/pid/prd.md`(v3.2 路径)|
31
31
  | `spec` | 文件路径 | 读取调用方目录下的 `proposal.md`;若存在同级 `specs/*/spec.md` 也一并读取 |
32
32
  | `vibe` | 运行时字符串 | `analysis_doc` 参数是调用方直接传入的「用户意图摘要」字符串,**不读取任何文件**;直接将此字符串作为需求描述,与 Step 5 加载的 Skill 内容结合生成设计方案 |
33
33
 
@@ -108,7 +108,7 @@ disable: false
108
108
  将生成内容写入调用方指定路径:
109
109
  - plan 模式:`modus/plans/{name}/design-brief.md`
110
110
  - spec 模式:`modus/changes/{name}/design-brief.md`(gate_status 写 `passed`,此模式无 Gate 检查)
111
- - harness 模式:`modus/stories/{story-id}/harness/02-design-brief.md`
111
+ - harness 模式:`modus/artifacts/{story_id}/design/design.md`
112
112
  - **gate_status 必须由 `modus-designer` SubAgent 在 Step 4 后动态评估并填写**(见 `modus-harness-agents/01-5-design/SKILL.md` 的 gate_status 赋值规则)
113
113
  - 固定写 `passed` 将使 Gate A0.5 失效,严禁在 harness 模式下硬编码该字段
114
114
 
@@ -347,4 +347,4 @@ constitution: {constitution 字段内容}
347
347
 
348
348
  ### harness 模式调用方式
349
349
 
350
- 由 SubAgent 02(设计阶段,原 01.5)独立执行(见 `modus-harness-agents/01-5-design/SKILL.md`),输入为 `modus/stories/{story-id}/harness/01-analysis.md`,输出为 `modus/stories/{story-id}/harness/02-design-brief.md` 含 HANDOFF 块(`agent: "02-design"`)。
350
+ 由 SubAgent 02(设计阶段,原 01.5)独立执行(见 `modus-harness-agents/01-5-design/SKILL.md`),输入为 `modus/artifacts/{story_id}/pid/prd.md`,输出为 `modus/artifacts/{story_id}/design/design.md` 含 HANDOFF 块(`agent: "02-design"`)。
@@ -101,7 +101,7 @@ Step P1:读取 plan.md
101
101
  → continue_token:记录到工作目录 .harness-state.yaml
102
102
 
103
103
  Step P2:初始化工作目录
104
- 若 plan.md 含 story_id:工作目录 = modus/stories/{story_id}/harness/
104
+ 若 plan.md 含 story_id:工作目录 = modus/artifacts/{story_id}/code/
105
105
  若无 story_id:工作目录 = modus/plans/{PLAN_NAME}/harness/
106
106
 
107
107
  Step P3:输出接力摘要
@@ -130,10 +130,10 @@ Step P4:设置 SKIP_AGENTS = ["01", "02"](强制跳过 SA01 + SA02)
130
130
  读取 `{project}/modus/config.yaml`(即当前项目根目录下的 `modus/config.yaml`,多项目 workspace 需先通过 `workspace-catalog.md` 确认项目路径,如 `operations-job/modus/config.yaml`)的 `constitution` 字段,将 `hard_rules` 传递给所有 SubAgent 作为硬性约束。SubAgent 直接使用 Orchestrator 传入的 constitution 内容,无需独立解析路径。
131
131
 
132
132
  **检查业务 Skill:**
133
- 读取 `modus/knowledge-catalog.md`(Level 1 加载):
133
+ 读取 `modus/knowledge_base/map.md`(Level 1 加载):
134
134
  - 若不存在,强烈建议先运行 `/modus:init`:
135
135
  ```
136
- ⚠️ 未找到知识目录(modus/knowledge-catalog.md)!
136
+ ⚠️ 未找到知识目录(modus/knowledge_base/map.md)!
137
137
 
138
138
  /modus:harness 依赖业务 Skill 为 SubAgent 提供项目背景知识。
139
139
  建议:
@@ -143,14 +143,14 @@ B. 强制继续(无业务上下文,风险较高)
143
143
 
144
144
  **解析 Story ID + 初始化状态追踪:**
145
145
  - 从 TAPD URL 提取 Story ID(格式:`tapd.cn/{project}/stories/view/{id}`)
146
- - 创建工作目录:`modus/stories/{story-id}/harness/`
146
+ - 创建工作目录:`modus/artifacts/{story_id}/code/`
147
147
 
148
148
  **`.harness-state.yaml` 断点续跑机制(优先级高于 HANDOFF 块探测):**
149
149
 
150
150
  检查工作目录下是否存在 `.harness-state.yaml`;若存在部分产出物(含 HANDOFF frontmatter),也可从断点处继续。
151
151
 
152
152
  ```yaml
153
- # 示例:modus/stories/{story-id}/harness/.harness-state.yaml
153
+ # 示例:modus/artifacts/{story_id}/code/.harness-state.yaml
154
154
  story_id: "{story-id}"
155
155
  loop: 1 # 当前 Loop 轮次(1 或 2)
156
156
  # SubAgent ID 约定:00=INIT 阶段、01/02/03/04/05/06/07/08 为主流程;00-ARCHIVE=ARCHIVE 阶段
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: modus-init
3
- description: Use this skill when executing /modus:init command (or /modus:init --help/--enhance/--migrate/--dry-run etc.) to scan the codebase, classify business domains, generate Business Skill files in modus/knowledge/, update knowledge-catalog.md, and sync to multi-platform adapters. Trigger on /modus:init or any of its parameter variants. (Modus v3.3 — Router + Strategy)
3
+ description: Use this skill when executing /modus:init command (or /modus:init --help/--enhance/--migrate/--dry-run etc.) to scan the codebase, classify business domains, generate Business Skill files in modus/knowledge_base/, update knowledge-catalog.md, and sync to multi-platform adapters. Trigger on /modus:init or any of its parameter variants. (Modus v3.3 — Router + Strategy)
4
4
  allowed-tools: Read, Write, Glob, Bash
5
5
  disable: false
6
6
  architecture: router-strategy # v3.3 起:本文件为 Router;具体扫描 + Skill 生成委派给 strategies/{stack}-init.md
@@ -55,8 +55,8 @@ supported_platforms:
55
55
  --platform <p1,p2> 仅同步指定平台(claude,cursor,codex,copilot,逗号分隔)
56
56
  --dry-run 预览将生成/修改的文件清单,不写入磁盘
57
57
  --force 跳过所有「是否确认」交互,直接执行
58
- --no-sync 跳过多平台同步,仅生成 modus/knowledge/ 下的文件
59
- --migrate 将旧路径 .codebuddy/skills/modus-biz-* 迁移到 modus/knowledge/
58
+ --no-sync 跳过多平台同步,仅生成 modus/knowledge_base/ 下的文件
59
+ --migrate 将旧路径 .codebuddy/skills/modus-biz-* 迁移到 modus/knowledge_base/
60
60
  --verbose 输出详细扫描过程(文件列表、token 预估、hash 变化)
61
61
  --reset-maturity 重置所有 Skill 的 maturity 为 draft(谨慎使用)
62
62
 
@@ -64,7 +64,7 @@ supported_platforms:
64
64
  /modus:init # 全量初始化(首次或大重构后)
65
65
  /modus:init --enhance biz-track # 仅更新歌曲域知识
66
66
  /modus:init --migrate --dry-run # 预览迁移操作,不写入
67
- /modus:init --migrate # 执行知识库路径迁移(旧 → modus/knowledge/)
67
+ /modus:init --migrate # 执行知识库路径迁移(旧 → modus/knowledge_base/)
68
68
  /modus:init --enhance-all --no-sync # 重建所有业务域,不同步平台
69
69
  /modus:init --project operations-job --enhance biz-album # 多项目指定
70
70
  ```
@@ -82,7 +82,7 @@ Modus Init — 业务知识库初始化工具
82
82
  用途:
83
83
  扫描项目代码,按业务域分类,生成结构化 Skill 文件,作为后续所有
84
84
  Modus 命令(vibe/plan/spec/harness)的知识底座。
85
- 支持多项目工作区路由,知识库统一存放于 modus/knowledge/(平台无关)。
85
+ 支持多项目工作区路由,知识库统一存放于 modus/knowledge_base/(平台无关)。
86
86
 
87
87
  语法:
88
88
  /modus:init [参数]
@@ -96,14 +96,14 @@ Modus Init — 业务知识库初始化工具
96
96
  --dry-run 预览模式,不写入文件
97
97
  --force 跳过所有确认提示
98
98
  --no-sync 跳过多平台同步
99
- --migrate 迁移旧知识路径到 modus/knowledge/
99
+ --migrate 迁移旧知识路径到 modus/knowledge_base/
100
100
  --verbose 显示详细扫描日志
101
101
  --reset-maturity 重置 Skill 成熟度为 draft
102
102
 
103
103
  知识库路径(v3.1):
104
- modus/knowledge/_conventions/SKILL.md — Layer 0-T 团队约定
105
- modus/knowledge/_tech-wiki/SKILL.md — Layer 1 技术知识
106
- modus/knowledge/biz-*/SKILL.md — Layer 2 业务域知识(Single Source of Truth)
104
+ modus/knowledge_base/domain/_conventions/code/SKILL.md — Layer 0-T 团队约定
105
+ modus/knowledge_base/domain/_tech-wiki/code/SKILL.md — Layer 1 技术知识
106
+ modus/knowledge_base/domain/*/code/SKILL.md — Layer 2 业务域知识(Single Source of Truth)
107
107
 
108
108
  平台适配文件(引用式,勿直接编辑):
109
109
  .codebuddy/skills/modus-biz-*/SKILL.md — CodeBuddy 引用桩
@@ -256,20 +256,20 @@ Modus Init — 业务知识库初始化工具
256
256
 
257
257
  当用户运行 `/modus:init --migrate` 时执行此流程。
258
258
 
259
- **目标:** 将旧路径 `.codebuddy/skills/modus-biz-*` 迁移到 `modus/knowledge/biz-*`
259
+ **目标:** 将旧路径 `.codebuddy/skills/modus-biz-*` 迁移到 `modus/knowledge_base/domain/*/code`
260
260
 
261
261
  **执行步骤:**
262
262
 
263
263
  ```
264
264
  Step 1-1: 扫描现有文件
265
265
  检测 .codebuddy/skills/modus-biz-*/SKILL.md(旧路径)
266
- 检测 modus/knowledge/biz-*/SKILL.md(新路径,若已存在则提示)
266
+ 检测 modus/knowledge_base/domain/*/code/SKILL.md(新路径,若已存在则提示)
267
267
 
268
268
  Step 1-2: 展示迁移计划(即使不带 --dry-run 也先展示)
269
269
  迁移计划(共 N 个域):
270
270
  ┌──────────────────────────────────────────────────┐
271
271
  │ 从:.codebuddy/skills/modus-biz-track/SKILL.md │
272
- │ 到:modus/knowledge/biz-track/SKILL.md │
272
+ │ 到:modus/knowledge_base/domain/track/code/SKILL.md │
273
273
  │ 操作:复制 → 改写原文件为引用桩 │
274
274
  └──────────────────────────────────────────────────┘
275
275
  (重复 N 次)
@@ -281,16 +281,16 @@ Step 1-3: 用户确认(--force 时跳过)
281
281
 
282
282
  Step 1-4: 执行迁移
283
283
  对每个业务域:
284
- a. mkdir -p modus/knowledge/biz-{domain}/
284
+ a. mkdir -p modus/knowledge_base/domain/{domain}/code/
285
285
  b. 复制完整 SKILL.md 内容到新路径
286
286
  c. 将原 .codebuddy/skills/modus-biz-{domain}/SKILL.md 改写为引用桩:
287
287
  ---
288
288
  name: modus-biz-{domain}
289
- modus_ref: "{project}/modus/knowledge/biz-{domain}/SKILL.md"
289
+ modus_ref: "{project}/modus/knowledge_base/domain/{domain}/code/SKILL.md"
290
290
  stub: true
291
291
  ---
292
- <!-- MODUS_REF: {project}/modus/knowledge/biz-{domain}/SKILL.md -->
293
- > 业务知识已迁移至:`{project}/modus/knowledge/biz-{domain}/SKILL.md`
292
+ <!-- MODUS_REF: {project}/modus/knowledge_base/domain/{domain}/code/SKILL.md -->
293
+ > 业务知识已迁移至:`{project}/modus/knowledge_base/domain/{domain}/code/SKILL.md`
294
294
  d. 对 _conventions 和 _tech-wiki 同理处理
295
295
 
296
296
  Step 1-5: 更新所有引用文件
@@ -302,7 +302,7 @@ Step 1-5: 更新所有引用文件
302
302
  Step 1-6: 完成回报
303
303
  ✅ 迁移完成
304
304
  已迁移 N 个业务域:
305
- biz-track → modus/knowledge/biz-track/SKILL.md ✓
305
+ biz-track → modus/knowledge_base/domain/track/code/SKILL.md ✓
306
306
  ...
307
307
  已更新引用文件:knowledge-catalog.md, CLAUDE.md, AGENTS.md
308
308
  ```
@@ -315,8 +315,8 @@ Step 1-6: 完成回报
315
315
 
316
316
  ```
317
317
  Step 2-1: 确定目标域
318
- --enhance biz-track → 目标:modus/knowledge/biz-track/SKILL.md
319
- --enhance-all → 目标:所有 modus/knowledge/biz-*/SKILL.md
318
+ --enhance biz-track → 目标:modus/knowledge_base/domain/track/code/SKILL.md
319
+ --enhance-all → 目标:所有 modus/knowledge_base/domain/*/code/SKILL.md
320
320
 
321
321
  Step 2-2: hash 检查(跳过未变化的域)
322
322
  读取当前 Skill frontmatter 中的 last_hash
@@ -329,7 +329,7 @@ Step 2-3: 扫描目标域代码
329
329
  提取:核心实体变化、业务规则变化、API 契约变化
330
330
 
331
331
  Step 2-4: 重建 Skill 文件
332
- 更新 modus/knowledge/biz-{domain}/SKILL.md
332
+ 更新 modus/knowledge_base/domain/{domain}/code/SKILL.md
333
333
  更新 frontmatter: updated, last_hash, last_referenced
334
334
 
335
335
  Step 2-5: 同步引用桩(若平台适配文件存在)
@@ -369,7 +369,7 @@ Step 2-7: 完成回报
369
369
 
370
370
  #### 重新初始化分支检查(Step 3 末尾执行)
371
371
 
372
- 在进入 Step 4 之前,检查是否已有业务 Skill(`modus/knowledge/biz-*` 或 `.codebuddy/skills/modus-biz-*`):
372
+ 在进入 Step 4 之前,检查是否已有业务 Skill(`modus/knowledge_base/domain/*/code` 或 `.codebuddy/skills/modus-biz-*`):
373
373
 
374
374
  **若发现已存在业务 Skill:**
375
375
 
@@ -400,7 +400,7 @@ Step 2-7: 完成回报
400
400
  - 更新 `format_version`(v1→v2 或 v2→v3)、`version`(小版本 +1)和 `updated` 日期
401
401
  - 迁移完成后自动触发 Step 9 多平台同步(`--force` 时默认选择「仅新增缺失域」)
402
402
 
403
- 无论何种模式,都在最后更新 `modus/knowledge-catalog.md` 的索引信息。
403
+ 无论何种模式,都在最后更新 `modus/knowledge_base/map.md` 的索引信息。
404
404
 
405
405
  **若未发现已有 Skill:** 继续 Step 4 开始全新初始化流程。
406
406
 
@@ -437,7 +437,7 @@ Step 2-7: 完成回报
437
437
  2. **技术栈信息**(`techStack` 字段)
438
438
  - 从 `CLAUDE.md` 中寻找构建命令、框架名称等技术栈线索
439
439
 
440
- 3. **编码规范 / 团队约定**(→ `modus/knowledge/_conventions` Skill)
440
+ 3. **编码规范 / 团队约定**(→ `modus/knowledge_base/domain/_conventions/code` Skill)
441
441
  - 将各工具中找到的约定规则汇总,标注来源(如 `[来源: .cursor/rules/naming.mdc]`)
442
442
 
443
443
  4. **MCP 服务器配置**(→ `modus/config.yaml` `mcpServers` 字段)
@@ -459,7 +459,7 @@ Step 2-7: 完成回报
459
459
  .cursor/rules/naming.mdc(命名规范)
460
460
  .cursor/mcp.json(MCP: tapd)
461
461
 
462
- 将把以上规则融入 modus/knowledge/_conventions/SKILL.md,MCP 配置写入 modus/config.yaml。
462
+ 将把以上规则融入 modus/knowledge_base/domain/_conventions/code/SKILL.md,MCP 配置写入 modus/config.yaml。
463
463
  继续?[Y/n](--force 时自动确认)
464
464
  ```
465
465
 
@@ -710,9 +710,9 @@ Step 2-7: 完成回报
710
710
  用户在 Step 6 确认域列表后,立即并行启动 N 个 SubAgent:
711
711
 
712
712
  ```
713
- SubAgent-1 (biz-{domain1}) ──► 加载 strategy ──► 全量扫描 ──► 生成 modus/knowledge/biz-{domain1}/SKILL.md
714
- SubAgent-2 (biz-{domain2}) ──► 加载 strategy ──► 全量扫描 ──► 生成 modus/knowledge/biz-{domain2}/SKILL.md
715
- SubAgent-3 (biz-{domain3}) ──► 加载 strategy ──► 全量扫描 ──► 生成 modus/knowledge/biz-{domain3}/SKILL.md
713
+ SubAgent-1 (biz-{domain1}) ──► 加载 strategy ──► 全量扫描 ──► 生成 modus/knowledge_base/domain/{domain1}/code/SKILL.md
714
+ SubAgent-2 (biz-{domain2}) ──► 加载 strategy ──► 全量扫描 ──► 生成 modus/knowledge_base/biz-{domain2}/SKILL.md
715
+ SubAgent-3 (biz-{domain3}) ──► 加载 strategy ──► 全量扫描 ──► 生成 modus/knowledge_base/biz-{domain3}/SKILL.md
716
716
  │ │
717
717
  └──────────────────── 所有 SubAgent 完成 ─────────────────────────────┘
718
718
 
@@ -735,7 +735,7 @@ SubAgent-3 (biz-{domain3}) ──► 加载 strategy ──► 全量扫描 ─
735
735
  - 节号、节名、知识标签**严格遵循** `shared/universal-skill-format.md`(跨栈一致)
736
736
  - 节内填充语义按 strategy 的"17 节填充指南"分流
737
737
  - frontmatter 严格遵循 `shared/frontmatter-spec.md`
738
- 5. **目标路径**:`modus/knowledge/biz-{domain}/SKILL.md`
738
+ 5. **目标路径**:`modus/knowledge_base/domain/{domain}/code/SKILL.md`
739
739
 
740
740
  #### 8.4 Context 超限自动保护策略(栈无关)
741
741
 
@@ -766,8 +766,8 @@ SubAgent-3 (biz-{domain3}) ──► 加载 strategy ──► 全量扫描 ─
766
766
  #### 8.6 聚合等待(输出格式栈无关)
767
767
 
768
768
  ```
769
- ✓ modus/knowledge/biz-{domain1} 已生成(v3-{stack}/17节,{N1}个key_files,{M1}条规则,{K1}个API/endpoint)
770
- ✓ modus/knowledge/biz-{domain2} 已生成(v3-{stack}/17节,{N2}个key_files,{M2}条规则,{K2}个API/endpoint)
769
+ ✓ modus/knowledge_base/domain/{domain1}/code 已生成(v3-{stack}/17节,{N1}个key_files,{M1}条规则,{K1}个API/endpoint)
770
+ ✓ modus/knowledge_base/biz-{domain2} 已生成(v3-{stack}/17节,{N2}个key_files,{M2}条规则,{K2}个API/endpoint)
771
771
 
772
772
  跨域依赖 Section 10 回写完成:
773
773
  biz-{domain1}.upstream_skills = [biz-{domainX}, biz-{domainY}]
@@ -798,7 +798,7 @@ SubAgent-3 (biz-{domain3}) ──► 加载 strategy ──► 全量扫描 ─
798
798
  主流程在汇总 SubAgent 输出前,必须校验每个 Skill 的 frontmatter 完整性:
799
799
 
800
800
  ```
801
- 对每个 SubAgent 产出的 modus/knowledge/biz-{domain}/SKILL.md:
801
+ 对每个 SubAgent 产出的 modus/knowledge_base/domain/{domain}/code/SKILL.md:
802
802
 
803
803
  强制项检查:
804
804
  ✓ name / description / version / updated / status / format_version / stack
@@ -837,7 +837,7 @@ Business Skills(Step 8)全部生成后,读取 `modus/config.yaml` 的 `pla
837
837
 
838
838
  **核心设计原则:引用式适配(Reference over Copy)**
839
839
 
840
- `modus/knowledge/` 是 Single Source of Truth。各平台适配文件**不复制内容**,只写引用说明。
840
+ `modus/knowledge_base/` 是 Single Source of Truth。各平台适配文件**不复制内容**,只写引用说明。
841
841
 
842
842
  > **读取 platforms 配置**:使用 Read 工具读取 `modus/config.yaml` 完整内容,解析其中的 `platforms:` 列表。(Bash 环境也可用 `grep -A5 "^platforms:" modus/config.yaml`)
843
843
 
@@ -852,9 +852,9 @@ Business Skills(Step 8)全部生成后,读取 `modus/config.yaml` 的 `pla
852
852
 
853
853
  执行任何涉及业务逻辑的任务时:
854
854
 
855
- 1. 先读取 `modus/knowledge-catalog.md` 或 `modus/workspace-catalog.md`(多项目)
856
- 2. 按需加载 `{project}/modus/knowledge/biz-*/SKILL.md` 获取完整业务上下文
857
- 3. **知识库统一在 modus/knowledge/,不要去 .codebuddy/skills/modus-biz-* 读取(已是引用桩)**
855
+ 1. 先读取 `modus/knowledge_base/map.md` 或 `modus/workspace-catalog.md`(多项目)
856
+ 2. 按需加载 `{project}/modus/knowledge_base/domain/*/code/SKILL.md` 获取完整业务上下文
857
+ 3. **知识库统一在 modus/knowledge_base/,不要去 .codebuddy/skills/modus-biz-* 读取(已是引用桩)**
858
858
 
859
859
  可用命令:/modus:init | /modus:vibe | /modus:plan | /modus:spec | /modus:harness | /modus:auto
860
860
  ```
@@ -864,7 +864,7 @@ Business Skills(Step 8)全部生成后,读取 `modus/config.yaml` 的 `pla
864
864
  ```markdown
865
865
  ---
866
866
  name: modus-biz-{domain}
867
- description: "[MODUS:BIZ] {中文域名}业务知识。完整知识在 {project}/modus/knowledge/biz-{domain}/SKILL.md"
867
+ description: "[MODUS:BIZ] {中文域名}业务知识。完整知识在 {project}/modus/knowledge_base/domain/{domain}/code/SKILL.md"
868
868
  ---
869
869
  <!-- modus:meta
870
870
  last_hash: "{从 CodeBuddy 主文件读取的 last_hash 值}"
@@ -872,9 +872,9 @@ status: "{从 CodeBuddy 主文件读取的 status 值}"
872
872
  updated: "{从 CodeBuddy 主文件读取的 updated 日期}"
873
873
  -->
874
874
 
875
- <!-- MODUS_REF: {project}/modus/knowledge/biz-{domain}/SKILL.md -->
875
+ <!-- MODUS_REF: {project}/modus/knowledge_base/domain/{domain}/code/SKILL.md -->
876
876
  **域:** {中文域名} | **成熟度:** {maturity} | **更新:** {date}
877
- > 完整知识见:`{project}/modus/knowledge/biz-{domain}/SKILL.md`
877
+ > 完整知识见:`{project}/modus/knowledge_base/domain/{domain}/code/SKILL.md`
878
878
  ```
879
879
 
880
880
  > 注意:`<!-- modus:meta -->` 注释供工具层快速读取核心防腐字段,每次同步时自动从 CodeBuddy 主文件更新,禁止手动修改。
@@ -883,15 +883,15 @@ updated: "{从 CodeBuddy 主文件读取的 updated 日期}"
883
883
 
884
884
  ```markdown
885
885
  ---
886
- description: "[MODUS] 知识库引用规则 — 所有业务知识在 modus/knowledge/"
886
+ description: "[MODUS] 知识库引用规则 — 所有业务知识在 modus/knowledge_base/"
887
887
  alwaysApply: false
888
888
  ---
889
889
 
890
890
  <!-- MODUS v3.1 知识库路径 -->
891
- 业务知识(Single Source of Truth):`{project}/modus/knowledge/biz-*/SKILL.md`
892
- 团队约定:`{project}/modus/knowledge/_conventions/SKILL.md`
893
- 技术知识:`{project}/modus/knowledge/_tech-wiki/SKILL.md`
894
- 加载入口:`{project}/modus/knowledge-catalog.md`(~200 tokens)
891
+ 业务知识(Single Source of Truth):`{project}/modus/knowledge_base/domain/*/code/SKILL.md`
892
+ 团队约定:`{project}/modus/knowledge_base/domain/_conventions/code/SKILL.md`
893
+ 技术知识:`{project}/modus/knowledge_base/domain/_tech-wiki/code/SKILL.md`
894
+ 加载入口:`{project}/modus/knowledge_base/map.md`(~200 tokens)
895
895
  ```
896
896
 
897
897
  #### OpenAI Codex / OpenCode(`AGENTS.md`)
@@ -929,7 +929,7 @@ alwaysApply: false
929
929
 
930
930
  ### Step 10:生成团队约定 Skill(Layer 0-T)
931
931
 
932
- **目标路径(v3.1):** `modus/knowledge/_conventions/SKILL.md`
932
+ **目标路径(v3.1):** `modus/knowledge_base/domain/_conventions/code/SKILL.md`
933
933
 
934
934
  从以下来源提取团队规范(**按优先级排列**):
935
935
 
@@ -942,7 +942,7 @@ alwaysApply: false
942
942
 
943
943
  ### Step 11:生成技术知识 Skill(Layer 1)
944
944
 
945
- **目标路径(v3.1):** `modus/knowledge/_tech-wiki/SKILL.md`
945
+ **目标路径(v3.1):** `modus/knowledge_base/domain/_tech-wiki/code/SKILL.md`
946
946
 
947
947
  初始内容来源(按优先级):
948
948
  1. Step 4 扫描结果中的技术信息
@@ -953,14 +953,14 @@ alwaysApply: false
953
953
 
954
954
  ### Step 12:生成知识全景目录(knowledge-catalog.md)
955
955
 
956
- 在 `modus/knowledge-catalog.md`(项目级)创建全景索引。
956
+ 在 `modus/knowledge_base/map.md`(项目级)创建全景索引。
957
957
 
958
958
  > **单一真相来源**:目录结构、层级定义、字段格式以 `modus/templates/knowledge-catalog.md` 模板文件为准,本 Step 不再内嵌重复结构。执行时读取该模板文件并按以下规则替换占位符后写入目标路径。
959
959
 
960
960
  **路径说明(v3.1 格式):**
961
- - Layer 0-T 路径:`{project}/modus/knowledge/_conventions/SKILL.md`
962
- - Layer 1 路径:`{project}/modus/knowledge/_tech-wiki/SKILL.md`
963
- - Layer 2 路径:`{project}/modus/knowledge/biz-{domain}/SKILL.md`
961
+ - Layer 0-T 路径:`{project}/modus/knowledge_base/domain/_conventions/code/SKILL.md`
962
+ - Layer 1 路径:`{project}/modus/knowledge_base/domain/_tech-wiki/code/SKILL.md`
963
+ - Layer 2 路径:`{project}/modus/knowledge_base/domain/{domain}/code/SKILL.md`
964
964
 
965
965
  **操作步骤:**
966
966
  1. 读取 `{MODUS_PACKAGE}/templates/knowledge-catalog.md`(安装包模板)
@@ -976,7 +976,7 @@ alwaysApply: false
976
976
  - `{依赖域列表,无则写-}` → upstream_skills 依赖关系(Step 5 扫描结果)
977
977
  - `{last_hash 前8位}` → 运行 hash 计算后的实际值前 8 位;若无法计算,写入 `⚠️ PENDING` 并在知识目录顶部说明原因
978
978
  - `{待填入}` → 域依赖图(从 upstream 字段推导:biz-payment --> biz-order 等)
979
- - 写入后执行自检:`grep -n '{' modus/knowledge-catalog.md | grep -v '<!--'` 输出应为空(注释中的占位符示例不算)
979
+ - 写入后执行自检:`grep -n '{' modus/knowledge_base/map.md | grep -v '<!--'` 输出应为空(注释中的占位符示例不算)
980
980
 
981
981
  同时更新工作区顶层的 `modus/workspace-catalog.md`(若存在)中的项目更新时间。
982
982
 
@@ -996,17 +996,17 @@ alwaysApply: false
996
996
  ✅ Modus 知识库初始化完成(v3.2)
997
997
 
998
998
  知识库路径(Single Source of Truth):
999
- modus/knowledge/_conventions/SKILL.md (Layer 0-T) [draft]
1000
- modus/knowledge/_tech-wiki/SKILL.md (Layer 1) [draft]
1001
- modus/knowledge/biz-*/SKILL.md (Layer 2) [draft] × N 个域
999
+ modus/knowledge_base/domain/_conventions/code/SKILL.md (Layer 0-T) [draft]
1000
+ modus/knowledge_base/domain/_tech-wiki/code/SKILL.md (Layer 1) [draft]
1001
+ modus/knowledge_base/domain/*/code/SKILL.md (Layer 2) [draft] × N 个域
1002
1002
 
1003
1003
  已融合的已有 AI 工具配置(若有):
1004
1004
  Claude Code — CLAUDE.md + .claude/rules/ (M 条规则融入 _conventions)
1005
1005
  Cursor — .cursor/rules/ (K 条规则融入 _conventions)
1006
1006
 
1007
1007
  生成了 N 个业务 Skill(Layer 2):
1008
- - modus/knowledge/biz-order/SKILL.md [draft] [v3/17节]
1009
- - modus/knowledge/biz-payment/SKILL.md [draft] [v3/17节]
1008
+ - modus/knowledge_base/biz-order/SKILL.md [draft] [v3/17节]
1009
+ - modus/knowledge_base/biz-payment/SKILL.md [draft] [v3/17节]
1010
1010
  - ...
1011
1011
 
1012
1012
  多平台同步(引用式适配,来自 modus/config.yaml platforms 配置):
@@ -1017,12 +1017,12 @@ alwaysApply: false
1017
1017
  CodeBuddy → .codebuddy/skills/modus-biz-*/SKILL.md(N 个引用桩)
1018
1018
 
1019
1019
  初始化基础 Skill:
1020
- modus/knowledge/_conventions/SKILL.md (Layer 0-T) [draft]
1020
+ modus/knowledge_base/domain/_conventions/code/SKILL.md (Layer 0-T) [draft]
1021
1021
  └─ 融合来源:CLAUDE.md, .cursor/rules/, CONTRIBUTING.md, 代码注解模式
1022
- modus/knowledge/_tech-wiki/SKILL.md (Layer 1) [draft]
1022
+ modus/knowledge_base/domain/_tech-wiki/code/SKILL.md (Layer 1) [draft]
1023
1023
 
1024
1024
  知识目录:
1025
- modus/knowledge-catalog.md(所有命令的快速索引,~200 tokens)
1025
+ modus/knowledge_base/map.md(所有命令的快速索引,~200 tokens)
1026
1026
 
1027
1027
  📊 知识库质量评分报告:
1028
1028
  ┌─────────────────┬──────┬──────┬──────┬──────┬──────┬──────────┐
@@ -1060,12 +1060,12 @@ alwaysApply: false
1060
1060
 
1061
1061
  **重新初始化逻辑(已有 Skill 时):**
1062
1062
 
1063
- 如果 `modus/knowledge/biz-*` 下已存在业务 Skill:
1063
+ 如果 `modus/knowledge_base/domain/*/code` 下已存在业务 Skill:
1064
1064
 
1065
1065
  1. 展示已有域列表及 status、最后更新时间
1066
1066
  2. 询问:全量重建 / 仅更新指定域(`--enhance`)/ 新增缺失域
1067
1067
  3. 按用户选择执行(`--force` 时默认选择「仅新增缺失域」)
1068
- 4. 无论何种选择,都更新 `modus/knowledge-catalog.md` 的时间戳
1068
+ 4. 无论何种选择,都更新 `modus/knowledge_base/map.md` 的时间戳
1069
1069
 
1070
1070
  ### 防腐机制全链路图
1071
1071
 
@@ -1255,12 +1255,12 @@ name: modus-biz-{domain}
1255
1255
 
1256
1256
  | 文件 | 角色 | 防腐字段权威性 | 更新方式 |
1257
1257
  |------|------|-------------|---------|
1258
- | `modus/knowledge/biz-{domain}/SKILL.md` | **权威源** | 所有防腐字段的唯一权威存储 | 命令直接写入 |
1258
+ | `modus/knowledge_base/domain/{domain}/code/SKILL.md` | **权威源** | 所有防腐字段的唯一权威存储 | 命令直接写入 |
1259
1259
  | `.claude/agents/modus-biz-{domain}.md` | 只读快照 | 仅通过 `<!-- modus:meta -->` 注释暴露核心字段 | Step 6 同步时自动更新 |
1260
1260
  | `.cursor/rules/modus-knowledge.mdc` | 只读快照 | 不存储防腐字段(仅路径引用) | Step 6 同步时自动更新 |
1261
1261
 
1262
1262
  **关键原则**:
1263
- - 所有防腐机制的触发(hash 比对、衰减计算、`usage_count` 更新)**均只操作 `modus/knowledge/` 权威源文件**
1263
+ - 所有防腐机制的触发(hash 比对、衰减计算、`usage_count` 更新)**均只操作 `modus/knowledge_base/` 权威源文件**
1264
1264
  - 副本文件发生变更不触发防腐机制,不影响 status
1265
1265
  - 若副本与权威源不一致(如手动修改副本),以权威源为准,下次 Step 6 同步时强制覆盖
1266
1266
 
@@ -1325,7 +1325,7 @@ frontmatter 字段规范不在本区块——见 **`shared/frontmatter-spec.md`*
1325
1325
  - draft(fresh):usage_count = 0(Skill 刚生成,尚未用于真实任务)
1326
1326
  - draft(used) :usage_count ≥ 1(已用于至少一次开发,有反馈基础)
1327
1327
 
1328
- 1. 读取 modus/knowledge/biz-{domain}/SKILL.md 的 frontmatter(v3.2 Single Source of Truth)
1328
+ 1. 读取 modus/knowledge_base/domain/{domain}/code/SKILL.md 的 frontmatter(v3.2 Single Source of Truth)
1329
1329
 
1330
1330
  2. 运行质量自检清单:
1331
1331
  □ Section 3:每个 Entity 字段均有业务含义注释?
@@ -1384,7 +1384,7 @@ frontmatter 字段规范不在本区块——见 **`shared/frontmatter-spec.md`*
1384
1384
  **执行逻辑:**
1385
1385
 
1386
1386
  ```
1387
- 1. 读取 modus/knowledge/biz-{domain}/SKILL.md 的 frontmatter(v3.2 Single Source of Truth):
1387
+ 1. 读取 modus/knowledge_base/domain/{domain}/code/SKILL.md 的 frontmatter(v3.2 Single Source of Truth):
1388
1388
  - key_files 列表
1389
1389
  - last_hash(上次生成时的 SHA-1 值)
1390
1390
  - status(若已为 archived,询问用户是否继续)
@@ -231,11 +231,11 @@ archived (需人工确认)
231
231
 
232
232
  | 文件 | 角色 | 防腐字段权威性 | 更新方式 |
233
233
  |------|------|-------------|---------|
234
- | `modus/knowledge/biz-{domain}/SKILL.md` | **权威源** | 所有防腐字段的唯一权威存储 | 命令直接写入 |
234
+ | `modus/knowledge_base/domain/{domain}/code/SKILL.md` | **权威源** | 所有防腐字段的唯一权威存储 | 命令直接写入 |
235
235
  | 各平台同步副本(`.codebuddy/skills/biz-*/`、`.claude/agents/modus-biz-*.md`、`.continue/skills/biz-*/` 等) | 只读快照 | 仅通过 `<!-- modus:meta -->` 注释暴露核心字段 | Step 9 同步时自动更新 |
236
236
 
237
237
  **关键原则:**
238
- - 所有防腐机制的触发(hash 比对、衰减计算、`usage_count` 更新)**只操作 `modus/knowledge/` 权威源**
238
+ - 所有防腐机制的触发(hash 比对、衰减计算、`usage_count` 更新)**只操作 `modus/knowledge_base/` 权威源**
239
239
  - 副本变更不触发防腐机制
240
240
  - 副本与权威源不一致时,以权威源为准,下次同步强制覆盖
241
241
 
@@ -108,7 +108,7 @@ primaryStack: java # 见 PrimaryStack 类型定义
108
108
 
109
109
  ## 5. Skill frontmatter 的 `stack` 字段
110
110
 
111
- 每个生成的业务 Skill(`modus/knowledge/biz-*/SKILL.md`)必须在 frontmatter 中包含 `stack` 字段,与 `primaryStack` 保持一致:
111
+ 每个生成的业务 Skill(`modus/knowledge_base/domain/*/code/SKILL.md`)必须在 frontmatter 中包含 `stack` 字段,与 `primaryStack` 保持一致:
112
112
 
113
113
  ```yaml
114
114
  ---
@@ -135,7 +135,7 @@ Step 14 完成回报必须包含:
135
135
  - 升级路径:
136
136
  1. 等 Modus 后续版本支持本栈(Phase 4:go-init / python-init)
137
137
  2. 通过 /modus:platform -add 反馈需求(含范式样例)
138
- 3. 手动编辑 modus/knowledge/biz-*/SKILL.md 补充内容,运行 /modus:verify 升级
138
+ 3. 手动编辑 modus/knowledge_base/domain/*/code/SKILL.md 补充内容,运行 /modus:verify 升级
139
139
  ```
140
140
 
141
141
  ---