Commit b7e4fa58858eec5577f352a980fb072ee33b8eb7

Authored by zichun
1 parent d875806a

refactor: group skills by phase — skills/plan/ + skills/coding/

Visual clarity: the file tree now matches the README's phase model.
- skills/plan/   — 8 skills (plan-start entry + A0~A6)
- skills/coding/ — 1 skill (coding-start thin entry)

Slugs unchanged. /erp-workflow:<name> still resolves identically because
each SKILL.md declares its own `name:` frontmatter (verified for all 9).

Plugin loader treats the default `./skills/` scan as flat, so the nested
layout is opted into via an explicit path array in plugin.json — the only
mechanism Claude Code provides for nested skill discovery.

Changes:
- mv skills/{plan-start,project-init,scope-lock,skeleton-gen,
       db-design-gen,db-init,downstream-gen,frontend-scope-lock}
     → skills/plan/<same>/
- mv skills/coding-start → skills/coding/coding-start/
- .claude-plugin/plugin.json: skills[] now lists all 9 explicit paths
- README.md: directory tree + Skill 清单 heading updated to reflect grouping

No code touches any skill path (only README did, and only in the tree
diagram). lib tests still pass (62/62).
Showing 36 changed files with 25 additions and 13 deletions
.claude-plugin/plugin.json
... ... @@ -2,5 +2,15 @@
2 2 "name": "erp-workflow",
3 3 "description": "ERP 项目全流程框架:阶段 A 计划(plan-start 入口 + A0~A6 共 7 个 skill + B 阶段瘦入口 coding-start = 9 个 skill;plan-start 终结闸 5 项前移硬校验) + 阶段 B 编码(单个静默 Workflow 脚本 coding.mjs,子代理自动跑后端+前端功能循环、测试闸门、本地里程碑 tag)。",
4 4 "version": "0.2.0",
5   - "skills": ["./skills"]
  5 + "skills": [
  6 + "./skills/plan/plan-start",
  7 + "./skills/plan/project-init",
  8 + "./skills/plan/scope-lock",
  9 + "./skills/plan/skeleton-gen",
  10 + "./skills/plan/db-design-gen",
  11 + "./skills/plan/db-init",
  12 + "./skills/plan/downstream-gen",
  13 + "./skills/plan/frontend-scope-lock",
  14 + "./skills/coding/coding-start"
  15 + ]
6 16 }
... ...
README.md
... ... @@ -95,7 +95,7 @@ Claude Code 插件:ERP / 后端管理系统全流程开发框架。
95 95 ```
96 96 erp-workflow-plugin/
97 97 ├── .claude-plugin/
98   -│ └── plugin.json # 插件清单,声明 ./skills(9 skill)
  98 +│ └── plugin.json # 插件清单,显式列出 9 个 skill 路径
99 99 ├── README.md # 本文档
100 100 ├── workflows/
101 101 │ └── coding.mjs # 阶段 B:整个编码阶段编排为单个静默 Workflow
... ... @@ -107,23 +107,25 @@ erp-workflow-plugin/
107 107 │ └── *.test.mjs # 各助手的 node:test 单测
108 108 ├── agents/
109 109 │ └── code-reviewer.md # 统一 reviewer(coding.mjs review stage 调用,phase 选维度集)
110   -└── skills/ # 阶段 A:9 个 skill(扁平,无中间层)
111   - ├── plan-start/ # A 阶段入口 + Plan 终结硬闸
112   - ├── project-init/ # A0
113   - ├── scope-lock/ # A1
114   - ├── skeleton-gen/ # A2
115   - ├── db-design-gen/ # A3
116   - ├── db-init/ # A4
117   - ├── downstream-gen/ # A5
118   - ├── frontend-scope-lock/ # A6
119   - └── coding-start/ # B 阶段瘦入口(启动 coding.mjs)
  110 +└── skills/ # 按阶段分组(slug 不变,由 SKILL.md frontmatter name 决定)
  111 + ├── plan/ # 阶段 A:8 个 skill(入口 + A0~A6)
  112 + │ ├── plan-start/ # A 阶段入口 + Plan 终结硬闸
  113 + │ ├── project-init/ # A0
  114 + │ ├── scope-lock/ # A1
  115 + │ ├── skeleton-gen/ # A2
  116 + │ ├── db-design-gen/ # A3
  117 + │ ├── db-init/ # A4
  118 + │ ├── downstream-gen/ # A5
  119 + │ └── frontend-scope-lock/ # A6
  120 + └── coding/ # 阶段 B:1 个 skill(瘦入口)
  121 + └── coding-start/ # 启动 workflows/coding.mjs
120 122 ```
121 123  
122 124 ## Hook 清单(0 个)
123 125  
124 126 本插件**不再注册任何 hook**。原"跨模块改动留痕"hook(`log-cross-module.sh`)已删除,其职责由 `workflows/coding.mjs` 的 cross-module stage 在模块循环内承担。
125 127  
126   -## Skill 清单(9 个,扁平于 `skills/`
  128 +## Skill 清单(9 个,按阶段分组于 `skills/{plan,coding}/`;slug 由 SKILL.md frontmatter 决定,未受目录调整影响
127 129  
128 130 ### 入口(2 个)
129 131  
... ...
skills/coding-start/SKILL.md renamed to skills/coding/coding-start/SKILL.md
skills/db-design-gen/SKILL.md renamed to skills/plan/db-design-gen/SKILL.md
skills/db-design-gen/templates/docs-03-header-template.md renamed to skills/plan/db-design-gen/templates/docs-03-header-template.md
skills/db-design-gen/templates/docs-03-table-template.md renamed to skills/plan/db-design-gen/templates/docs-03-table-template.md
skills/db-init/SKILL.md renamed to skills/plan/db-init/SKILL.md
skills/downstream-gen/SKILL.md renamed to skills/plan/downstream-gen/SKILL.md
skills/downstream-gen/templates/docs-02-template.md renamed to skills/plan/downstream-gen/templates/docs-02-template.md
skills/downstream-gen/templates/docs-05-endpoint-template.md renamed to skills/plan/downstream-gen/templates/docs-05-endpoint-template.md
skills/downstream-gen/templates/docs-05-header-template.md renamed to skills/plan/downstream-gen/templates/docs-05-header-template.md
skills/downstream-gen/templates/docs-06-module-pagelist-template.md renamed to skills/plan/downstream-gen/templates/docs-06-module-pagelist-template.md
skills/downstream-gen/templates/docs-08-module-row-template.md renamed to skills/plan/downstream-gen/templates/docs-08-module-row-template.md
skills/downstream-gen/templates/docs-10-header-template.md renamed to skills/plan/downstream-gen/templates/docs-10-header-template.md
skills/frontend-scope-lock/SKILL.md renamed to skills/plan/frontend-scope-lock/SKILL.md
skills/frontend-scope-lock/templates/fe-scope-template.md renamed to skills/plan/frontend-scope-lock/templates/fe-scope-template.md
skills/plan-start/SKILL.md renamed to skills/plan/plan-start/SKILL.md
skills/project-init/SKILL.md renamed to skills/plan/project-init/SKILL.md
skills/project-init/templates/CLAUDE-template.md renamed to skills/plan/project-init/templates/CLAUDE-template.md
skills/project-init/templates/docs-01-index-template.md renamed to skills/plan/project-init/templates/docs-01-index-template.md
skills/project-init/templates/docs-04-stack-template.md renamed to skills/plan/project-init/templates/docs-04-stack-template.md
skills/project-init/templates/docs-08-initial-template.md renamed to skills/plan/project-init/templates/docs-08-initial-template.md
skills/scope-lock/SKILL.md renamed to skills/plan/scope-lock/SKILL.md
skills/scope-lock/templates/_module-template.md renamed to skills/plan/scope-lock/templates/_module-template.md
skills/scope-lock/templates/config-vars-template.yaml renamed to skills/plan/scope-lock/templates/config-vars-template.yaml
skills/scope-lock/templates/req-card-template.md renamed to skills/plan/scope-lock/templates/req-card-template.md
skills/skeleton-gen/SKILL.md renamed to skills/plan/skeleton-gen/SKILL.md
skills/skeleton-gen/templates/docs-04-skeleton-template.md renamed to skills/plan/skeleton-gen/templates/docs-04-skeleton-template.md
skills/skeleton-gen/templates/docs-06-static-template.md renamed to skills/plan/skeleton-gen/templates/docs-06-static-template.md
skills/skeleton-gen/templates/docs-07-env-template.md renamed to skills/plan/skeleton-gen/templates/docs-07-env-template.md
skills/skeleton-gen/templates/docs-09-structure-template.md renamed to skills/plan/skeleton-gen/templates/docs-09-structure-template.md
skills/skeleton-gen/templates/env-local-template renamed to skills/plan/skeleton-gen/templates/env-local-template
skills/skeleton-gen/templates/gitignore-append-template renamed to skills/plan/skeleton-gen/templates/gitignore-append-template
skills/skeleton-gen/templates/scripts-setup-test-db-template.mjs renamed to skills/plan/skeleton-gen/templates/scripts-setup-test-db-template.mjs
skills/skeleton-gen/templates/scripts-test-template.mjs renamed to skills/plan/skeleton-gen/templates/scripts-test-template.mjs
skills/skeleton-gen/templates/styles-tokens-template.css renamed to skills/plan/skeleton-gen/templates/styles-tokens-template.css