@pigcloud/skills 1.0.2 → 1.0.4

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 (59) hide show
  1. package/CHANGELOG.md +4 -4
  2. package/README.en.md +39 -49
  3. package/README.md +74 -79
  4. package/bin/cli.js +34 -35
  5. package/bin/postinstall.js +1 -1
  6. package/package.json +1 -1
  7. package/rules/skill-profile-map.json +5 -5
  8. package/rules/skill-profile-map.md +2 -2
  9. package/scripts/validate-skill-shapes.js +2 -1
  10. package/skills/api-docs/SKILL.md +2 -2
  11. package/skills/code-review/SKILL.md +1 -1
  12. package/skills/domain-modeling/SKILL.md +4 -4
  13. package/skills/environment-deploy/SKILL.md +1 -1
  14. package/skills/extract-business-facts/SKILL.md +336 -0
  15. package/skills/extract-business-facts/scripts/write-knowledge-base.js +227 -0
  16. package/skills/feature-build/SKILL.md +1 -1
  17. package/skills/knowledge-capture/SKILL.md +16 -7
  18. package/skills/performance-check/SKILL.md +1 -1
  19. package/skills/project-bootstrap/SKILL.md +2 -2
  20. package/skills/references/business-fact-extraction.md +414 -0
  21. package/skills/references/golden-prompt-suite.js +64 -14
  22. package/skills/references/rule-loading-map.md +11 -3
  23. package/skills/references/skill-authoring-standard.md +2 -2
  24. package/skills/references/skill-boundary-template.md +56 -23
  25. package/skills/references/skill-enhanced-template.md +80 -30
  26. package/skills/references/skill-reference-matrix.md +18 -10
  27. package/skills/security-review/SKILL.md +1 -1
  28. package/skills/{spec-refinement → spec}/SKILL.md +19 -14
  29. package/skills/technical-design/SKILL.md +4 -4
  30. package/skills/test-design/SKILL.md +1 -1
  31. package/skills/workflow-router/SKILL.md +1 -1
  32. package/pig-cloud-skills-commands/.codex-plugin/plugin.json +0 -35
  33. package/pig-cloud-skills-commands/README.md +0 -24
  34. package/pig-cloud-skills-commands/commands/analyze.md +0 -21
  35. package/pig-cloud-skills-commands/commands/build.md +0 -21
  36. package/pig-cloud-skills-commands/commands/design.md +0 -21
  37. package/pig-cloud-skills-commands/commands/distill.md +0 -21
  38. package/pig-cloud-skills-commands/commands/doc.md +0 -21
  39. package/pig-cloud-skills-commands/commands/infra.md +0 -21
  40. package/pig-cloud-skills-commands/commands/init.md +0 -20
  41. package/pig-cloud-skills-commands/commands/kb.md +0 -20
  42. package/pig-cloud-skills-commands/commands/perf.md +0 -20
  43. package/pig-cloud-skills-commands/commands/prd.md +0 -21
  44. package/pig-cloud-skills-commands/commands/review.md +0 -21
  45. package/pig-cloud-skills-commands/commands/security.md +0 -21
  46. package/pig-cloud-skills-commands/commands/test.md +0 -21
  47. package/pig-cloud-skills-commands/commands/workflow.md +0 -20
  48. package/skills/product-intake/SKILL.md +0 -98
  49. package/skills/references/agent-personas.md +0 -34
  50. package/skills/references/flow-test-cases.md +0 -62
  51. package/skills/references/full-chain-replay-scenarios.md +0 -79
  52. package/skills/references/hooks.md +0 -67
  53. package/skills/references/negative-replay-scenarios.md +0 -49
  54. package/skills/references/prompt-replay-checklist.md +0 -128
  55. package/skills/references/requirements-separation-map.md +0 -71
  56. package/skills/references/slash-commands.md +0 -34
  57. package/skills/spec-refinement/references/ears-syntax.md +0 -127
  58. package/skills/spec-refinement/references/requirement-checklist.md +0 -139
  59. package/skills/spec-refinement/references/spec-workbook.md +0 -75
package/CHANGELOG.md CHANGED
@@ -8,9 +8,9 @@
8
8
 
9
9
  ### Changed
10
10
  - Made postinstall client-aware so it can auto-install into the detected client(s) from `INIT_CWD`.
11
- - Kept Codex as the only client with a real command pack so `/prd`, `/analyze`, and friends remain executable entries instead of fake aliases.
11
+ - Kept Codex as the only client with a real command pack so `/spec` remains the executable entry instead of a fake alias.
12
12
  - Extended `pig-skills auto` to install the matching client folders for Codex, Claude Code, Trae, Cursor, Copilot, and Windsurf.
13
- - Clarified in the README and usage docs that only Codex gets `/prd`-style command files, while other clients receive skills and rules.
13
+ - Clarified in the README and usage docs that only Codex gets `/spec`-style command files, while other clients receive skills and rules.
14
14
  - Unified the usage guides around the same client-detection and knowledge-capture model.
15
15
 
16
16
  ## [1.1.0] - 2026-06-18
@@ -19,7 +19,7 @@
19
19
  - 重构 skill 体系说明,按当前 13 个 skill 重新梳理 README 和使用方式
20
20
  - 补充统一校验入口 `validate-skills.js`,并增加 Windows / macOS / Linux 壳
21
21
  - 将便携 Python 纳入仓库内,避免依赖系统环境
22
- - 统一 `spec-refinement`、`knowledge-capture`、`workflow-router` 等高频 skill 的识别与门禁表达
22
+ - 统一 `spec`、`knowledge-capture`、`workflow-router` 等高频 skill 的识别与门禁表达
23
23
  - 收缩 skill frontmatter,按官方 validator 规范保留最小字段
24
24
  - 将 `handover` 合并进 `knowledge-capture`,删除独立交接 skill
25
25
 
@@ -41,7 +41,7 @@
41
41
 
42
42
  ### Skills
43
43
  - **Core**: workflow-router, technical-design, feature-build, code-review
44
- - **Analysis**: spec-refinement, domain-modeling
44
+ - **Analysis**: spec, domain-modeling
45
45
  - **Integration**: api-docs, test-design
46
46
  - **Collaboration**: knowledge-capture
47
47
  - **Infrastructure**: project-bootstrap, environment-deploy
package/README.en.md CHANGED
@@ -1,61 +1,47 @@
1
- # @pigcloud/skills
2
-
3
- > An AI skills pack for product, engineering, and QA workflows. `@pigcloud/skills` is the npm package name; `Pig Cloud` is the dedicated rules / scaffold context, while shared skills and specialized rule overlays stay separated.
1
+ # @pigcloud/skills
4
2
 
5
- ## What it is
3
+ > An AI skills pack for product, engineering, and QA collaboration. `skills/` carries reusable capabilities, `rules/` carries constraints and validation, `workflow-router` handles stage routing, and `CI / Test / Evidence` completes the delivery loop.
6
4
 
7
- - Pick the right skill before acting
8
- - Skills own task boundaries and handoff
9
- - `rules/` owns framework constraints and coding conventions
10
- - Loading and validation are handled by the loader / CLI
5
+ ## What this system does
11
6
 
12
- ## Common entry points
7
+ - Route first, then execute
8
+ - Constrain first, then generate
9
+ - Reuse first, then rewrite
10
+ - Verify first, then conclude
13
11
 
14
- - Product intake: `product-intake`
15
- - Requirement refinement: `spec-refinement`
12
+ ## Core Layers
13
+
14
+ 1. `workflow-router`: identifies the task type and chooses the next stage
15
+ 2. `skills/`: reusable capability modules
16
+ 3. `rules/`: project constraints, boundaries, and hard checks
17
+ 4. `CI / Test / Evidence`: verifiable delivery gates
18
+
19
+ ## Common Entry Points
20
+
21
+ - Spec: `spec`
16
22
  - Stage routing: `workflow-router`
17
23
  - Design and implementation: `technical-design` / `feature-build`
18
- - Review: `code-review` / `security-review` / `performance-check`
24
+ - Review and validation: `code-review` / `security-review` / `performance-check`
25
+ - Fact extraction: `extract-business-facts`
19
26
  - Knowledge capture: `knowledge-capture`
20
27
 
21
28
  ## Install
22
29
 
23
- ### Without npm
24
-
25
- Run the matching script from the repo root:
26
-
27
- - Windows: `install.cmd`
28
- - macOS / Linux: `bash install.sh`
29
-
30
- ### Auto-detect the current project
31
-
32
- ```bash
33
- npm install -g @pigcloud/skills
34
- ```
35
-
36
- ### Migration note
37
-
38
- - `@pig/skills` was the intermediate package name during migration.
39
- - New installs should use `@pigcloud/skills`.
40
- - `rules/overlays/pig-cloud/` remains the Pig Cloud-specific rule layer and is not the npm package name.
41
-
42
- ### Codex command entry
43
-
44
30
  ```bash
45
- pig-skills codex
31
+ npm install -g @pigcloud/skills
46
32
  ```
47
33
 
48
- ### Inspect rule loading
34
+ ## Client Setup
49
35
 
50
- ```bash
51
- pig-skills rules
52
- ```
36
+ - Codex: see [docs/CODEX-APP-GUIDE.md](docs/CODEX-APP-GUIDE.md)
37
+ - Trae: see [docs/TRAE-GUIDE.md](docs/TRAE-GUIDE.md)
38
+ - Claude Code: see [docs/CLAUDE-CODE-GUIDE.md](docs/CLAUDE-CODE-GUIDE.md)
39
+ - Unified installation guide: see [docs/client-installation-guide.md](docs/client-installation-guide.md)
53
40
 
54
- ### Bootstrap runtime
41
+ ## Governance Overview
55
42
 
56
- ```bash
57
- pig-skills bootstrap
58
- ```
43
+ - System overview: [docs/agent-governance-overview.md](docs/agent-governance-overview.md)
44
+ - Skills extension guide: [docs/skills-extension-guide.md](docs/skills-extension-guide.md)
59
45
 
60
46
  ## Validation
61
47
 
@@ -63,22 +49,26 @@ pig-skills bootstrap
63
49
  node validate-skills.js
64
50
  node scripts/validate-skill-shapes.js
65
51
  node scripts/validate-rules.js
52
+ node scripts/validate-skill-stop-rules.js
53
+ node scripts/validate-skill-replay-signals.js
54
+ node self-test-skills.js
66
55
  ```
67
56
 
68
- ## Directory map
57
+ ## Directory Map
69
58
 
70
59
  - `skills/`: skill bodies
71
60
  - `skills/references/`: authoring standard, reference matrix, loading map
72
61
  - `rules/`: rule entry point and bundles
73
- - `docs/`: usage notes, workflow design, and reports
62
+ - `docs/`: install, governance, and workflow notes
74
63
  - `bin/`: CLI, auto-install, postinstall
75
64
 
76
- ## Entry docs
65
+ ## Entry Docs
77
66
 
78
67
  - [AGENTS.md](AGENTS.md)
79
- - [docs/README.md](docs/README.md)
80
- - [docs/package-name-migration.md](docs/package-name-migration.md)
81
- - [skills/references/skill-authoring-standard.md](skills/references/skill-authoring-standard.md)
68
+ - [docs/README.md](docs/README.md)
69
+ - [docs/client-installation-guide.md](docs/client-installation-guide.md)
70
+ - [docs/agent-governance-overview.md](docs/agent-governance-overview.md)
71
+ - [docs/skills-extension-guide.md](docs/skills-extension-guide.md)
72
+ - [skills/references/skill-authoring-standard.md](skills/references/skill-authoring-standard.md)
82
73
  - [skills/references/skill-reference-matrix.md](skills/references/skill-reference-matrix.md)
83
74
  - [skills/references/rule-loading-map.md](skills/references/rule-loading-map.md)
84
- - [README.md](README.md)
package/README.md CHANGED
@@ -1,79 +1,74 @@
1
- # @pigcloud/skills
2
-
3
- > 面向产品、研发、测试协作的 AI skills pack。`@pigcloud/skills` 是 npm 包名;`Pig Cloud` 是专属规则/脚手架语境,通用 skills 与专属 rules overlay 分层并存。
4
-
5
- ## 它是什么
6
-
7
- 这套包的定位很简单:先选对 skill,再开始执行;skill 负责任务边界和交接;`rules/` 负责框架约束和编码规范;规则加载与校验由 `loader` / CLI 负责;面向 AI 的摘要和标签优先用英文,面向人的说明优先用中文。
8
-
9
- ## 常用入口
10
-
11
- 1. 产品收口:`product-intake`
12
- 2. 需求细化:`spec-refinement`
13
- 3. 阶段路由:`workflow-router`
14
- 4. 设计与实现:`technical-design` / `feature-build`
15
- 5. 审核:`code-review` / `security-review` / `performance-check`
16
- 6. 沉淀:`knowledge-capture`
17
-
18
- ## 安装
19
-
20
- ### 没有 npm
21
-
22
- 在仓库根目录执行对应脚本:
23
-
24
- 1. Windows: `install.cmd`
25
- 2. macOS / Linux: `bash install.sh`
26
-
27
- ### 自动识别当前项目
28
-
29
- ```bash
30
- npm install -g @pigcloud/skills
31
- ```
32
-
33
- ### 迁移说明
34
-
35
- 迁移时请记住三件事:`@pig/skills` 是前一版尝试的名称;现在请使用 `@pigcloud/skills`;仓库内的 `rules/overlays/pig-cloud/` 仍保留为 Pig Cloud 专属规则层,不等同于 npm 包名。
36
-
37
- ### Codex 命令入口
38
-
39
- ```bash
40
- pig-skills codex
41
- ```
42
-
43
- ### 查看规则加载
44
-
45
- ```bash
46
- pig-skills rules
47
- ```
48
-
49
- ### 补齐运行时
50
-
51
- ```bash
52
- pig-skills bootstrap
53
- ```
54
-
55
- ## 验证
56
-
57
- ```bash
58
- node validate-skills.js
59
- node scripts/validate-skill-shapes.js
60
- node scripts/validate-rules.js
61
- ```
62
-
63
- ## 目录
64
-
65
- 1. `skills/`: skill 本体
66
- 2. `skills/references/`: 作者规范、参考矩阵、加载图
67
- 3. `rules/`: 规则入口和 bundle
68
- 4. `docs/`: 说明、链路设计和报告
69
- 5. `bin/`: CLI、自动安装、postinstall
70
-
71
- ## 入口文档
72
-
73
- - [AGENTS.md](AGENTS.md)
74
- - [docs/README.md](docs/README.md)
75
- - [docs/package-name-migration.md](docs/package-name-migration.md)
76
- - [skills/references/skill-authoring-standard.md](skills/references/skill-authoring-standard.md)
77
- - [skills/references/skill-reference-matrix.md](skills/references/skill-reference-matrix.md)
78
- - [skills/references/rule-loading-map.md](skills/references/rule-loading-map.md)
79
- - [README.en.md](README.en.md)
1
+ # @pigcloud/skills
2
+
3
+ > 一个面向产品、研发、测试协作的 AI 技能包。`skills/` 负责任务边界与交接,`rules/` 负责规则约束与校验,`workflow-router` 负责阶段路由,`CI / Test / Evidence` 负责交付闭环。
4
+
5
+ ## 这套系统做什么
6
+
7
+ - 先路由,再执行
8
+ - 先约束,再生成
9
+ - 先复用,再改写
10
+ - 先验证,再结论
11
+
12
+ ## 核心层
13
+
14
+ 1. `workflow-router`:识别任务类型并选择下一阶段
15
+ 2. `skills/`:可复用的能力模块
16
+ 3. `rules/`:项目约束、边界和硬校验
17
+ 4. `CI / Test / Evidence`:可验证的交付门禁
18
+
19
+ ## 常用入口
20
+
21
+ - 规格澄清:`spec`
22
+ - 阶段路由:`workflow-router`
23
+ - 设计与实现:`technical-design` / `feature-build`
24
+ - 审查与验证:`code-review` / `security-review` / `performance-check`
25
+ - 事实抽取:`extract-business-facts`
26
+ - 知识沉淀:`knowledge-capture`
27
+
28
+ ## 安装
29
+
30
+ ```bash
31
+ npm install -g @pigcloud/skills
32
+ ```
33
+
34
+ ## 客户端接入
35
+
36
+ - Codex:见 [docs/CODEX-APP-GUIDE.md](docs/CODEX-APP-GUIDE.md)
37
+ - Trae:见 [docs/TRAE-GUIDE.md](docs/TRAE-GUIDE.md)
38
+ - Claude Code:见 [docs/CLAUDE-CODE-GUIDE.md](docs/CLAUDE-CODE-GUIDE.md)
39
+ - 统一安装指南:见 [docs/client-installation-guide.md](docs/client-installation-guide.md)
40
+
41
+ ## 治理概览
42
+
43
+ - 系统总览:见 [docs/agent-governance-overview.md](docs/agent-governance-overview.md)
44
+ - 技能扩展指南:见 [docs/skills-extension-guide.md](docs/skills-extension-guide.md)
45
+
46
+ ## 校验
47
+
48
+ ```bash
49
+ node validate-skills.js
50
+ node scripts/validate-skill-shapes.js
51
+ node scripts/validate-rules.js
52
+ node scripts/validate-skill-stop-rules.js
53
+ node scripts/validate-skill-replay-signals.js
54
+ node self-test-skills.js
55
+ ```
56
+
57
+ ## 目录说明
58
+
59
+ - `skills/`:技能正文
60
+ - `skills/references/`:编写标准、参考矩阵、加载映射
61
+ - `rules/`:规则入口与规则包
62
+ - `docs/`:安装、治理和工作流说明
63
+ - `bin/`:CLI、自动安装、postinstall
64
+
65
+ ## 入口文档
66
+
67
+ - [AGENTS.md](AGENTS.md)
68
+ - [docs/README.md](docs/README.md)
69
+ - [docs/client-installation-guide.md](docs/client-installation-guide.md)
70
+ - [docs/agent-governance-overview.md](docs/agent-governance-overview.md)
71
+ - [docs/skills-extension-guide.md](docs/skills-extension-guide.md)
72
+ - [skills/references/skill-authoring-standard.md](skills/references/skill-authoring-standard.md)
73
+ - [skills/references/skill-reference-matrix.md](skills/references/skill-reference-matrix.md)
74
+ - [skills/references/rule-loading-map.md](skills/references/rule-loading-map.md)
package/bin/cli.js CHANGED
@@ -7,16 +7,15 @@ const os = require('os');
7
7
  const { detectRulesBundle } = require('./rules-loader');
8
8
  const { ensureNpmRuntime } = require('./runtime-bootstrap');
9
9
 
10
- const PACKAGE_ROOT = path.join(__dirname, '..');
11
- const SKILLS_DIR = path.join(PACKAGE_ROOT, 'skills');
12
- const VERSION = require('../package.json').version;
13
- const CODEX_HOME = process.env.CODEX_HOME || path.join(os.homedir(), '.codex');
14
- const AGENTS_HOME = path.join(os.homedir(), '.agents');
15
- const COMMAND_PACK_NAME = 'pig-cloud-skills-commands';
16
- const COMMAND_PACK_SOURCE = path.join(PACKAGE_ROOT, COMMAND_PACK_NAME);
17
- const CODEX_HOME_SKILLS_DIR = path.join(CODEX_HOME, 'skills');
18
- const AGENTS_PLUGINS_DIR = path.join(AGENTS_HOME, 'plugins');
19
- const AGENTS_MARKETPLACE_FILE = path.join(AGENTS_PLUGINS_DIR, 'marketplace.json');
10
+ const PACKAGE_ROOT = path.join(__dirname, '..');
11
+ const SKILLS_DIR = path.join(PACKAGE_ROOT, 'skills');
12
+ const VERSION = require('../package.json').version;
13
+ const CODEX_HOME = process.env.CODEX_HOME || path.join(os.homedir(), '.codex');
14
+ const COMMAND_PACK_NAME = 'codex-commands';
15
+ const COMMAND_PACK_SOURCE = path.join(PACKAGE_ROOT, COMMAND_PACK_NAME);
16
+ const CODEX_HOME_SKILLS_DIR = path.join(CODEX_HOME, 'skills');
17
+ const CODEX_PLUGINS_DIR = path.join(CODEX_HOME, 'plugins');
18
+ const CODEX_MARKETPLACE_FILE = path.join(CODEX_PLUGINS_DIR, 'marketplace.json');
20
19
  const INSTALL_ROOT = path.resolve(process.env.INIT_CWD || process.cwd());
21
20
  const SUPPORTED_TOOLS = ['codex', 'claude', 'trae', 'cursor', 'copilot', 'windsurf'];
22
21
  const TOOL_ALIASES = {
@@ -43,12 +42,12 @@ const chalk = {
43
42
 
44
43
  const SKILLS = [
45
44
  { name: 'workflow-router', category: 'core', description: 'route workflow stages' },
45
+ { name: 'spec', category: 'analysis', description: 'turn product input into an executable spec' },
46
46
  { name: 'technical-design', category: 'core', description: 'shape implementation design' },
47
47
  { name: 'feature-build', category: 'core', description: 'implement features safely' },
48
48
  { name: 'code-review', category: 'core', description: 'review code changes' },
49
- { name: 'product-intake', category: 'analysis', description: 'capture product intent' },
50
- { name: 'spec-refinement', category: 'analysis', description: 'turn demand into specs' },
51
49
  { name: 'domain-modeling', category: 'analysis', description: 'extract domain knowledge' },
50
+ { name: 'extract-business-facts', category: 'analysis', description: 'extract business facts from code' },
52
51
  { name: 'api-docs', category: 'integration', description: 'document API contracts' },
53
52
  { name: 'test-design', category: 'integration', description: 'design test coverage' },
54
53
  { name: 'security-review', category: 'review', description: 'review security risks' },
@@ -58,11 +57,11 @@ const SKILLS = [
58
57
  { name: 'environment-deploy', category: 'infrastructure', description: 'deploy supporting environments' }
59
58
  ];
60
59
 
61
- const TOOL_CONFIGS = {
62
- codex: { dir: '.agents/skills', rootFile: '.agents/AGENTS.md', markers: ['.agents/AGENTS.md', '.agents'] },
63
- opencode: { dir: '.agents/skills', rootFile: '.agents/AGENTS.md', markers: ['.agents/AGENTS.md', '.agents'] },
64
- claude: { dir: '.claude/skills', rootFile: '.claude/CLAUDE.md', markers: ['.claude/CLAUDE.md', '.claude'] },
65
- claude_code: { dir: '.claude/skills', rootFile: '.claude/CLAUDE.md', markers: ['.claude/CLAUDE.md', '.claude'] },
60
+ const TOOL_CONFIGS = {
61
+ codex: { dir: '.codex/skills', rootFile: '.codex/AGENTS.md', markers: ['.codex/AGENTS.md', '.codex'] },
62
+ opencode: { dir: '.codex/skills', rootFile: '.codex/AGENTS.md', markers: ['.codex/AGENTS.md', '.codex'] },
63
+ claude: { dir: '.claude/skills', rootFile: '.claude/CLAUDE.md', markers: ['.claude/CLAUDE.md', '.claude'] },
64
+ claude_code: { dir: '.claude/skills', rootFile: '.claude/CLAUDE.md', markers: ['.claude/CLAUDE.md', '.claude'] },
66
65
  trae: { dir: '.trae/skills', rootFile: '.trae/AGENTS.md', markers: ['.trae/AGENTS.md', '.trae'] },
67
66
  cursor: { dir: '.cursor/rules', rootFile: '.cursor/rules/project-rules.mdc', markers: ['.cursor/rules/project-rules.mdc', '.cursor/rules'] },
68
67
  copilot: { dir: '.github', rootFile: '.github/copilot-instructions.md', markers: ['.github/copilot-instructions.md'] },
@@ -280,11 +279,11 @@ function buildMarketplaceEntry(pluginName) {
280
279
  };
281
280
  }
282
281
 
283
- async function writeCodexMarketplaceEntry(pluginName) {
284
- await ensureDir(AGENTS_PLUGINS_DIR);
285
- const existing = (await pathExists(AGENTS_MARKETPLACE_FILE))
286
- ? await readJson(AGENTS_MARKETPLACE_FILE)
287
- : { name: 'personal', interface: { displayName: 'Personal' }, plugins: [] };
282
+ async function writeCodexMarketplaceEntry(pluginName) {
283
+ await ensureDir(CODEX_PLUGINS_DIR);
284
+ const existing = (await pathExists(CODEX_MARKETPLACE_FILE))
285
+ ? await readJson(CODEX_MARKETPLACE_FILE)
286
+ : { name: 'personal', interface: { displayName: 'Personal' }, plugins: [] };
288
287
 
289
288
  if (!existing.name) existing.name = 'personal';
290
289
  if (!existing.interface) existing.interface = { displayName: 'Personal' };
@@ -298,19 +297,19 @@ async function writeCodexMarketplaceEntry(pluginName) {
298
297
  existing.plugins.push(entry);
299
298
  }
300
299
 
301
- await writeJson(AGENTS_MARKETPLACE_FILE, existing);
302
- }
303
-
304
- async function installCodexCommandPack() {
305
- if (!(await pathExists(COMMAND_PACK_SOURCE))) {
306
- throw new Error(`Codex command pack not found: ${COMMAND_PACK_SOURCE}`);
307
- }
308
-
309
- const destDir = path.join(AGENTS_PLUGINS_DIR, COMMAND_PACK_NAME);
310
- await ensureDir(AGENTS_PLUGINS_DIR);
311
- await copyDirectory(COMMAND_PACK_SOURCE, destDir);
312
- await writeCodexMarketplaceEntry(COMMAND_PACK_NAME);
313
- }
300
+ await writeJson(CODEX_MARKETPLACE_FILE, existing);
301
+ }
302
+
303
+ async function installCodexCommandPack() {
304
+ if (!(await pathExists(COMMAND_PACK_SOURCE))) {
305
+ throw new Error(`Codex command pack not found: ${COMMAND_PACK_SOURCE}`);
306
+ }
307
+
308
+ const destDir = path.join(CODEX_PLUGINS_DIR, COMMAND_PACK_NAME);
309
+ await ensureDir(CODEX_PLUGINS_DIR);
310
+ await copyDirectory(COMMAND_PACK_SOURCE, destDir);
311
+ await writeCodexMarketplaceEntry(COMMAND_PACK_NAME);
312
+ }
314
313
 
315
314
  async function installSharedWorkspaceAssets(cwd = getInstallRoot()) {
316
315
  const sharedAssets = [
@@ -39,7 +39,7 @@ function syncCodexSkills() {
39
39
  };
40
40
  }
41
41
 
42
- print('Pig Cloud Skills installed.');
42
+ print('Pig Skills installed.');
43
43
 
44
44
  if (autoSyncDisabled) {
45
45
  print('Auto-sync skipped because PIG_SKILLS_SKIP_AUTO_SYNC is set.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pigcloud/skills",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "AI skills pack with client-aware installation, shared skills and rules, Codex command entries, and Pig Cloud-specific overlays for requirements, implementation, and knowledge curation.",
5
5
  "author": "Pig Skills Maintainers",
6
6
  "license": "MIT",
@@ -3,11 +3,7 @@
3
3
  "bundle": "workflow",
4
4
  "profile": "router"
5
5
  },
6
- "product-intake": {
7
- "bundle": "product",
8
- "profile": "intake"
9
- },
10
- "spec-refinement": {
6
+ "spec": {
11
7
  "bundle": "workflow",
12
8
  "profile": "refinement"
13
9
  },
@@ -31,6 +27,10 @@
31
27
  "bundle": "product",
32
28
  "profile": "modeling"
33
29
  },
30
+ "extract-business-facts": {
31
+ "bundle": "product",
32
+ "profile": "modeling"
33
+ },
34
34
  "api-docs": {
35
35
  "bundle": "docs",
36
36
  "profile": "api"
@@ -7,13 +7,13 @@ This file explains which canonical skill loads which rules bundle and profile.
7
7
  | Skill | Bundle | Profile |
8
8
  |---|---|---|
9
9
  | `workflow-router` | `workflow` | `router` |
10
- | `product-intake` | `product` | `intake` |
11
- | `spec-refinement` | `workflow` | `refinement` |
10
+ | `spec` | `workflow` | `refinement` |
12
11
  | `technical-design` | `coding` | `analysis` |
13
12
  | `feature-build` | `coding` | `implementation` |
14
13
  | `test-design` | `coding` | `testing` |
15
14
  | `code-review` | `review` | `code` |
16
15
  | `domain-modeling` | `product` | `modeling` |
16
+ | `extract-business-facts` | `product` | `modeling` |
17
17
  | `api-docs` | `docs` | `api` |
18
18
  | `security-review` | `review` | `security` |
19
19
  | `performance-check` | `review` | `performance` |
@@ -6,12 +6,13 @@ const path = require('path');
6
6
  const repoRoot = path.join(__dirname, '..');
7
7
  const skillsRoot = path.join(repoRoot, 'skills');
8
8
  const enhancedTemplateSkills = new Set([
9
- 'spec-refinement',
9
+ 'spec',
10
10
  'technical-design',
11
11
  'feature-build',
12
12
  'code-review',
13
13
  'security-review',
14
14
  'performance-check',
15
+ 'extract-business-facts',
15
16
  ]);
16
17
  const enhancedSections = [
17
18
  '## Quick Start',
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: api-docs
3
- description: Document stable API behavior, request and response contracts, and examples when endpoints need reusable reference docs
3
+ description: 当接口需要可复用参考文档时,记录稳定的 API 行为、请求/响应契约和示例
4
4
  lifecycle_stage: capture
5
5
  rule_profile: api
6
6
  dependencies:
7
- - spec-refinement
7
+ - spec
8
8
  triggers:
9
9
  - API docs
10
10
  - contract
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: code-review
3
- description: Review a diff or pull request for correctness, maintainability, and regression risk when a generic code review is needed
3
+ description: 当需要通用代码审查时,对 diff PR 进行正确性、可维护性和回归风险审查
4
4
  lifecycle_stage: review
5
5
  rule_profile: code
6
6
  dependencies:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: domain-modeling
3
- description: Extract domain boundaries and core concepts from code or business language when the model is unclear
3
+ description: 当领域模型不清晰时,从代码或业务语言中提炼领域边界和核心概念
4
4
  lifecycle_stage: design
5
5
  rule_profile: modeling
6
6
  dependencies: []
@@ -23,7 +23,7 @@ workflow:
23
23
  - extract the core domain terms
24
24
  - group concepts by boundary
25
25
  - identify aggregates and dependencies
26
- - hand off to technical-design or spec-refinement
26
+ - hand off to technical-design or spec
27
27
  gates:
28
28
  - stop at domain boundaries
29
29
  - do not implement code
@@ -51,14 +51,14 @@ Extract domain boundaries and core concepts from messy input.
51
51
  1. Extract the core domain terms.
52
52
  2. Group concepts by boundary.
53
53
  3. Identify aggregates and dependencies.
54
- 4. Hand off to `technical-design` or `spec-refinement`.
54
+ 4. Hand off to `technical-design` or `spec`.
55
55
 
56
56
  ## Replay Signals
57
57
 
58
58
  - Input signal: existing business language, product context, code, or documents.
59
59
  - Output to verify: domain map, core concepts, boundary notes.
60
60
  - Stop signal: implementation code or PRD drafting.
61
- - Handoff signal: the boundary map is ready for `technical-design` or `spec-refinement`.
61
+ - Handoff signal: the boundary map is ready for `technical-design` or `spec`.
62
62
 
63
63
  ## Examples
64
64
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: environment-deploy
3
- description: Prepare deployment and runtime prerequisites when a workspace or target environment needs setup
3
+ description: 当工作区或目标环境需要配置时,准备部署和运行时前置条件
4
4
  lifecycle_stage: scaffold
5
5
  rule_profile: scaffold
6
6
  dependencies: