@pigcloud/skills 1.0.2 → 1.0.3

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.
package/README.en.md CHANGED
@@ -1,84 +1,83 @@
1
1
  # @pigcloud/skills
2
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.
4
-
5
- ## What it is
6
-
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
11
-
12
- ## Common entry points
13
-
14
- - Product intake: `product-intake`
15
- - Requirement refinement: `spec-refinement`
16
- - Stage routing: `workflow-router`
17
- - Design and implementation: `technical-design` / `feature-build`
18
- - Review: `code-review` / `security-review` / `performance-check`
19
- - Knowledge capture: `knowledge-capture`
20
-
21
- ## Install
22
-
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
-
3
+ > An AI skills pack for product, engineering, and QA collaboration. `@pigcloud/skills` is the npm package name; `skills/` carries reusable capabilities, `rules/` carries constraints and validation, `workflow-router` handles stage routing, and `CI / Test / Evidence` completes the delivery loop.
4
+
5
+ ## What this system does
6
+
7
+ - Route first, then execute
8
+ - Constrain first, then generate
9
+ - Reuse first, then rewrite
10
+ - Verify first, then conclude
11
+
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
+ - Product intake: `product-intake`
22
+ - Requirement refinement: `spec-refinement`
23
+ - Stage routing: `workflow-router`
24
+ - Design and implementation: `technical-design` / `feature-build`
25
+ - Review and validation: `code-review` / `security-review` / `performance-check`
26
+ - Knowledge capture: `knowledge-capture`
27
+
28
+ ## Install
29
+
32
30
  ```bash
33
31
  npm install -g @pigcloud/skills
34
32
  ```
35
33
 
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
- ```bash
45
- pig-skills codex
46
- ```
47
-
48
- ### Inspect rule loading
49
-
50
- ```bash
51
- pig-skills rules
52
- ```
53
-
54
- ### Bootstrap runtime
55
-
56
- ```bash
57
- pig-skills bootstrap
58
- ```
59
-
60
- ## Validation
61
-
62
- ```bash
63
- node validate-skills.js
64
- node scripts/validate-skill-shapes.js
65
- node scripts/validate-rules.js
66
- ```
67
-
68
- ## Directory map
69
-
70
- - `skills/`: skill bodies
71
- - `skills/references/`: authoring standard, reference matrix, loading map
72
- - `rules/`: rule entry point and bundles
73
- - `docs/`: usage notes, workflow design, and reports
74
- - `bin/`: CLI, auto-install, postinstall
75
-
76
- ## Entry docs
77
-
78
- - [AGENTS.md](AGENTS.md)
34
+ ## Migration Note
35
+
36
+ - `@pig-cloud/skills` is the historical package name
37
+ - `@pig/skills` was the intermediate migration name
38
+ - New installs should use `@pigcloud/skills`
39
+ - `Pig Cloud` is only the repository-specific rules/scaffold context, not the npm package name
40
+
41
+ ## Client Setup
42
+
43
+ - Codex: see [docs/CODEX-APP-GUIDE.md](docs/CODEX-APP-GUIDE.md)
44
+ - Trae: see [docs/TRAE-GUIDE.md](docs/TRAE-GUIDE.md)
45
+ - Cloud Code / Claude Code: see [docs/CLAUDE-CODE-GUIDE.md](docs/CLAUDE-CODE-GUIDE.md)
46
+ - Unified installation guide: see [docs/client-installation-guide.md](docs/client-installation-guide.md)
47
+
48
+ ## Governance Overview
49
+
50
+ - System overview: [docs/agent-governance-overview.md](docs/agent-governance-overview.md)
51
+ - Skills extension guide: [docs/skills-extension-guide.md](docs/skills-extension-guide.md)
52
+ - Package migration note: [docs/package-name-migration.md](docs/package-name-migration.md)
53
+
54
+ ## Validation
55
+
56
+ ```bash
57
+ node validate-skills.js
58
+ node scripts/validate-skill-shapes.js
59
+ node scripts/validate-rules.js
60
+ node scripts/validate-skill-stop-rules.js
61
+ node scripts/validate-skill-replay-signals.js
62
+ node self-test-skills.js
63
+ ```
64
+
65
+ ## Directory Map
66
+
67
+ - `skills/`: skill bodies
68
+ - `skills/references/`: authoring standard, reference matrix, loading map
69
+ - `rules/`: rule entry point and bundles
70
+ - `docs/`: install, governance, migration, and workflow notes
71
+ - `bin/`: CLI, auto-install, postinstall
72
+
73
+ ## Entry Docs
74
+
75
+ - [AGENTS.md](AGENTS.md)
79
76
  - [docs/README.md](docs/README.md)
77
+ - [docs/client-installation-guide.md](docs/client-installation-guide.md)
78
+ - [docs/agent-governance-overview.md](docs/agent-governance-overview.md)
79
+ - [docs/skills-extension-guide.md](docs/skills-extension-guide.md)
80
80
  - [docs/package-name-migration.md](docs/package-name-migration.md)
81
81
  - [skills/references/skill-authoring-standard.md](skills/references/skill-authoring-standard.md)
82
- - [skills/references/skill-reference-matrix.md](skills/references/skill-reference-matrix.md)
83
- - [skills/references/rule-loading-map.md](skills/references/rule-loading-map.md)
84
- - [README.md](README.md)
82
+ - [skills/references/skill-reference-matrix.md](skills/references/skill-reference-matrix.md)
83
+ - [skills/references/rule-loading-map.md](skills/references/rule-loading-map.md)
package/README.md CHANGED
@@ -1,30 +1,33 @@
1
1
  # @pigcloud/skills
2
2
 
3
- > 面向产品、研发、测试协作的 AI skills pack。`@pigcloud/skills` 是 npm 包名;`Pig Cloud` 是专属规则/脚手架语境,通用 skills 与专属 rules overlay 分层并存。
3
+ > 一个面向产品、研发、测试协作的 AI skills pack。`@pigcloud/skills` 是 npm 包名;`skills/` 负责能力执行,`rules/` 负责约束与校验,`workflow-router` 负责阶段编排,`CI / Test / Evidence` 负责交付闭环。
4
4
 
5
- ## 它是什么
5
+ ## 这套体系做什么
6
6
 
7
- 这套包的定位很简单:先选对 skill,再开始执行;skill 负责任务边界和交接;`rules/` 负责框架约束和编码规范;规则加载与校验由 `loader` / CLI 负责;面向 AI 的摘要和标签优先用英文,面向人的说明优先用中文。
7
+ - 先路由,再执行
8
+ - 先约束,再生成
9
+ - 先复用,再重写
10
+ - 先验证,再结论
8
11
 
9
- ## 常用入口
12
+ ## 核心分层
10
13
 
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`
14
+ 1. `workflow-router`:识别任务类型并决定下一阶段
15
+ 2. `skills/`:承载可复用能力模块
16
+ 3. `rules/`:承载项目规范、边界和强约束
17
+ 4. `CI / Test / Evidence`:承载可验证交付
17
18
 
18
- ## 安装
19
-
20
- ### 没有 npm
19
+ ## 常见入口
21
20
 
22
- 在仓库根目录执行对应脚本:
21
+ - 产品收口:`product-intake`
22
+ - 需求细化:`spec-refinement`
23
+ - 阶段路由:`workflow-router`
24
+ - 设计与实现:`technical-design` / `feature-build`
25
+ - 审核与验证:`code-review` / `security-review` / `performance-check`
26
+ - 知识沉淀:`knowledge-capture`
23
27
 
24
- 1. Windows: `install.cmd`
25
- 2. macOS / Linux: `bash install.sh`
28
+ ## 安装
26
29
 
27
- ### 自动识别当前项目
30
+ ### 全局安装
28
31
 
29
32
  ```bash
30
33
  npm install -g @pigcloud/skills
@@ -32,25 +35,23 @@ npm install -g @pigcloud/skills
32
35
 
33
36
  ### 迁移说明
34
37
 
35
- 迁移时请记住三件事:`@pig/skills` 是前一版尝试的名称;现在请使用 `@pigcloud/skills`;仓库内的 `rules/overlays/pig-cloud/` 仍保留为 Pig Cloud 专属规则层,不等同于 npm 包名。
38
+ - `@pig-cloud/skills` 是历史包名
39
+ - `@pig/skills` 是迁移中间名
40
+ - 现在请使用 `@pigcloud/skills`
41
+ - `Pig Cloud` 仅表示仓库里的专属规则/脚手架语境,不再表示 npm 包名
36
42
 
37
- ### Codex 命令入口
43
+ ## 客户端接入
38
44
 
39
- ```bash
40
- pig-skills codex
41
- ```
45
+ - Codex:见 [docs/CODEX-APP-GUIDE.md](docs/CODEX-APP-GUIDE.md)
46
+ - Trae:见 [docs/TRAE-GUIDE.md](docs/TRAE-GUIDE.md)
47
+ - Cloud Code / Claude Code:见 [docs/CLAUDE-CODE-GUIDE.md](docs/CLAUDE-CODE-GUIDE.md)
48
+ - 统一安装说明:见 [docs/client-installation-guide.md](docs/client-installation-guide.md)
42
49
 
43
- ### 查看规则加载
50
+ ## 治理总览
44
51
 
45
- ```bash
46
- pig-skills rules
47
- ```
48
-
49
- ### 补齐运行时
50
-
51
- ```bash
52
- pig-skills bootstrap
53
- ```
52
+ - 体系总览:见 [docs/agent-governance-overview.md](docs/agent-governance-overview.md)
53
+ - 技能扩展:见 [docs/skills-extension-guide.md](docs/skills-extension-guide.md)
54
+ - 包名迁移:见 [docs/package-name-migration.md](docs/package-name-migration.md)
54
55
 
55
56
  ## 验证
56
57
 
@@ -58,22 +59,27 @@ pig-skills bootstrap
58
59
  node validate-skills.js
59
60
  node scripts/validate-skill-shapes.js
60
61
  node scripts/validate-rules.js
62
+ node scripts/validate-skill-stop-rules.js
63
+ node scripts/validate-skill-replay-signals.js
64
+ node self-test-skills.js
61
65
  ```
62
66
 
63
67
  ## 目录
64
68
 
65
- 1. `skills/`: skill 本体
66
- 2. `skills/references/`: 作者规范、参考矩阵、加载图
67
- 3. `rules/`: 规则入口和 bundle
68
- 4. `docs/`: 说明、链路设计和报告
69
- 5. `bin/`: CLI、自动安装、postinstall
69
+ - `skills/`:技能主体
70
+ - `skills/references/`:作者规范、参考矩阵、规则加载地图
71
+ - `rules/`:规则入口和 bundle
72
+ - `docs/`:安装、治理、迁移、工作流说明
73
+ - `bin/`:CLI、自动安装、postinstall
70
74
 
71
75
  ## 入口文档
72
76
 
73
77
  - [AGENTS.md](AGENTS.md)
74
78
  - [docs/README.md](docs/README.md)
79
+ - [docs/client-installation-guide.md](docs/client-installation-guide.md)
80
+ - [docs/agent-governance-overview.md](docs/agent-governance-overview.md)
81
+ - [docs/skills-extension-guide.md](docs/skills-extension-guide.md)
75
82
  - [docs/package-name-migration.md](docs/package-name-migration.md)
76
83
  - [skills/references/skill-authoring-standard.md](skills/references/skill-authoring-standard.md)
77
84
  - [skills/references/skill-reference-matrix.md](skills/references/skill-reference-matrix.md)
78
85
  - [skills/references/rule-loading-map.md](skills/references/rule-loading-map.md)
79
- - [README.en.md](README.en.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pigcloud/skills",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
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",
@@ -1,6 +1,6 @@
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:
@@ -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: []
@@ -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:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: feature-build
3
- description: Implement approved design changes when code, refactor, or integration work needs to stay within agreed boundaries
3
+ description: 在代码、重构或集成工作需要保持在既定边界内时,实现已批准的设计变更
4
4
  lifecycle_stage: build
5
5
  rule_profile: implementation
6
6
  dependencies:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: knowledge-capture
3
- description: Capture reusable decisions, requirements knowledge, realtime code facts, codewiki facts, and handoff notes when downstream work needs a durable summary
3
+ description: 当下游工作需要可持续沉淀时,捕捉可复用的决策、需求知识、实时代码事实、CodeWiki 事实和交接说明
4
4
  lifecycle_stage: capture
5
5
  rule_profile: capture
6
6
  dependencies: []
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: performance-check
3
- description: Review a change for latency, throughput, or resource bottlenecks when performance findings are needed
3
+ description: 当需要性能结论时,对变更中的延迟、吞吐量或资源瓶颈进行审查
4
4
  lifecycle_stage: review
5
5
  rule_profile: performance
6
6
  dependencies:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: product-intake
3
- description: Capture product intent and separate it from project facts, prototypes, and current implementation facts into a PRD-ready brief when the goal, scope, or priority is still fuzzy
3
+ description: 捕捉产品意图,并将其与项目事实、原型和当前实现事实分离,形成可进入 PRD 的简报,适用于目标、范围或优先级仍不清晰时
4
4
  lifecycle_stage: intake
5
5
  rule_profile: intake
6
6
  dependencies: []
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: project-bootstrap
3
- description: Bootstrap a new workspace with the right skills and rules bundle when a project needs initial setup
3
+ description: 当项目需要初始化时,为新工作区装载合适的技能和规则包
4
4
  lifecycle_stage: scaffold
5
5
  rule_profile: scaffold
6
6
  dependencies: []
@@ -1,10 +1,18 @@
1
- # Rule Loading Map
2
-
3
- ## Goal
4
-
5
- Keep rule loading separate from skill routing. Load the smallest rule set that matches the current task, then add the stack-specific overlay only when needed. When changed files are available, prefer them over workspace-wide heuristics.
6
-
7
- ## Load Order
1
+ # Rule Loading Map
2
+
3
+ ## Goal
4
+
5
+ Keep rule loading separate from skill routing. Load the smallest rule set that matches the current task, then add the stack-specific overlay only when needed. When changed files are available, prefer them over workspace-wide heuristics.
6
+
7
+ ## Governance Context
8
+
9
+ - `workflow-router` decides the next stage.
10
+ - `skills/` decides the reusable execution pattern.
11
+ - `rules/` decides the project constraints and must/never checks.
12
+ - `CI / Test / Evidence` decides whether the result can be accepted.
13
+ - For the higher-level explanation, see [docs/agent-governance-overview.md](../../docs/agent-governance-overview.md).
14
+
15
+ ## Load Order
8
16
 
9
17
  ### 1. Core Layer
10
18
 
@@ -1,6 +1,13 @@
1
- # Skill Reference Matrix
2
-
3
- ## Borrowed Patterns
1
+ # Skill Reference Matrix
2
+
3
+ ## Governance Context
4
+
5
+ - Skills are the execution layer.
6
+ - Rules are the constraint layer.
7
+ - Workflow decides routing before execution.
8
+ - For a broader system view, see [docs/agent-governance-overview.md](../../docs/agent-governance-overview.md).
9
+
10
+ ## Borrowed Patterns
4
11
 
5
12
  | Source | Best Practice | Applies To |
6
13
  |---|---|---|
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: security-review
3
- description: Review a diff, endpoint, or design note for auth, secret, or data exposure risks when security findings are needed
3
+ description: 当需要安全结论时,对 diff、接口或设计说明中的认证、密钥或数据暴露风险进行审查
4
4
  lifecycle_stage: review
5
5
  rule_profile: security
6
6
  dependencies:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: spec-refinement
3
- description: Refine approved demand into an executable spec by aligning product intent, project facts, prototypes, implementation facts, and knowledge-base evidence when acceptance gaps, constraints, or implementation inputs remain
3
+ description: 通过对齐产品意图、项目事实、原型、实现事实和知识库证据,将已批准的需求细化为可执行规格,适用于仍存在验收缺口、约束或实现输入时
4
4
  lifecycle_stage: refinement
5
5
  rule_profile: refinement
6
6
  dependencies:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: technical-design
3
- description: Shape architecture and implementation boundaries from a stable spec when modules, interfaces, or dependencies still need decisions
3
+ description: 当模块、接口或依赖仍需决策时,在稳定规格基础上梳理架构与实现边界
4
4
  lifecycle_stage: design
5
5
  rule_profile: analysis
6
6
  dependencies:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: test-design
3
- description: Design and validate test coverage for an implemented change when regression risk or edge cases need verification
3
+ description: 当需要验证回归风险或边界场景时,为已实现的变更设计并验证测试覆盖
4
4
  lifecycle_stage: verify
5
5
  rule_profile: testing
6
6
  dependencies:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: workflow-router
3
- description: Route work into the next skill and stage when intent, ownership, or handoff is unclear
3
+ description: 当意图、归属或交接不清楚时,将工作路由到下一技能和阶段
4
4
  lifecycle_stage: routing
5
5
  rule_profile: router
6
6
  dependencies: []