principles-disciple 2.1.10 → 2.1.12

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 (34) hide show
  1. package/dist/bundle.js +391 -391
  2. package/dist/core/signal-collector-host.d.ts +17 -1
  3. package/dist/core/signal-health.d.ts +15 -0
  4. package/dist/openclaw.plugin.json +1 -1
  5. package/dist/templates/langs/en/skills/pd-cli-operator/SKILL.md +32 -70
  6. package/dist/templates/langs/en/skills/pd-control/SKILL.md +50 -0
  7. package/dist/templates/langs/en/skills/pd-pain-signal/SKILL.md +30 -56
  8. package/dist/templates/langs/en/skills/pd-review/SKILL.md +32 -0
  9. package/dist/templates/langs/zh/skills/pd-cli-operator/SKILL.md +32 -65
  10. package/dist/templates/langs/zh/skills/pd-control/SKILL.md +50 -0
  11. package/dist/templates/langs/zh/skills/pd-pain-signal/SKILL.md +29 -48
  12. package/dist/templates/langs/zh/skills/pd-review/SKILL.md +32 -0
  13. package/openclaw.plugin.json +1 -1
  14. package/package.json +3 -3
  15. package/templates/langs/en/skills/pd-cli-operator/SKILL.md +32 -70
  16. package/templates/langs/en/skills/pd-control/SKILL.md +50 -0
  17. package/templates/langs/en/skills/pd-pain-signal/SKILL.md +30 -56
  18. package/templates/langs/en/skills/pd-review/SKILL.md +32 -0
  19. package/templates/langs/zh/skills/pd-cli-operator/SKILL.md +32 -65
  20. package/templates/langs/zh/skills/pd-control/SKILL.md +50 -0
  21. package/templates/langs/zh/skills/pd-pain-signal/SKILL.md +29 -48
  22. package/templates/langs/zh/skills/pd-review/SKILL.md +32 -0
  23. package/dist/templates/langs/en/skills/pd-implementer/SKILL.md +0 -68
  24. package/dist/templates/langs/en/skills/pd-mentor/SKILL.md +0 -185
  25. package/dist/templates/langs/en/skills/pd-runtime-v2/SKILL.md +0 -86
  26. package/dist/templates/langs/zh/skills/pd-implementer/SKILL.md +0 -68
  27. package/dist/templates/langs/zh/skills/pd-mentor/SKILL.md +0 -185
  28. package/dist/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +0 -81
  29. package/templates/langs/en/skills/pd-implementer/SKILL.md +0 -68
  30. package/templates/langs/en/skills/pd-mentor/SKILL.md +0 -185
  31. package/templates/langs/en/skills/pd-runtime-v2/SKILL.md +0 -86
  32. package/templates/langs/zh/skills/pd-implementer/SKILL.md +0 -68
  33. package/templates/langs/zh/skills/pd-mentor/SKILL.md +0 -185
  34. package/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +0 -81
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: pd-control
3
+ description: 当 Owner 明确要求安装、初始化、停用、重新启用或修复 PD 宿主接入时使用。只使用当前宿主正式支持的管理入口;不直接改配置或业务状态。
4
+ disable-model-invocation: false
5
+ ---
6
+
7
+ # PD Control
8
+
9
+ ## 目标
10
+
11
+ 通过正式安装器和宿主管理机制管理 PD 接入。本技能是受限路由入口,不复制安装器逻辑,也不改变原则、候选、任务或账本状态。
12
+
13
+ ## OpenClaw 当前支持方式
14
+
15
+ ### 安装或重新初始化
16
+
17
+ 仅当 Owner 明确要求安装/初始化时,使用仓库公开的非交互式安装入口:
18
+
19
+ npx create-principles-disciple --yes
20
+
21
+ 执行前检查当前安装器的帮助和前置条件;不要在缺少授权、网络或依赖条件时声称安装成功。完成后用 `pd-cli-operator` 做只读健康检查。
22
+
23
+ ### 停用
24
+
25
+ 只有 Owner 明确要求停用时,执行:
26
+
27
+ openclaw plugins disable principles-disciple
28
+
29
+ 该命令通过 OpenClaw 正式插件管理入口更改启用状态,不会删除已安装文件。执行后检查 `openclaw plugins list --enabled --json`,确认 `principles-disciple` 不再处于启用列表。若 Gateway 正在运行,命令会通过 Gateway 应用状态变化;仍需区分“开关已关闭”和“此前已启动的任务已全部停止”。
30
+
31
+ ### 启用或恢复
32
+
33
+ 只有 Owner 明确要求启用时,执行:
34
+
35
+ openclaw plugins enable principles-disciple
36
+
37
+ 如果返回 capability consent、allowlist、denylist 或其他策略阻止信息,不要自动添加 `--accept-capabilities`,也不要手工改 `openclaw.json`。保留完整回执,向 Owner 说明需要作出的选择或策略问题;只有 Owner 明确同意相关 capability 后,才按 OpenClaw 返回的准确重试指令继续。
38
+
39
+ 执行后先检查 `openclaw plugins list --enabled --json`,再运行 `openclaw plugins inspect principles-disciple --runtime --json` 检查当前插件注册的运行时能力。冷清单或 inspect 结果本身仍不能证明真实 Hook 已生效;需要时用一条安全的真实宿主事件核验。
40
+
41
+ ## 成功判定
42
+
43
+ 区分安装器执行成功、插件被宿主发现、Hook 实际运行和 PD 业务链路健康。每一步都需要对应的真实回执或运行证据。插件存在不等于已启用,安装成功也不等于 Runtime 健康。
44
+
45
+ ## 禁止
46
+
47
+ - 不手工修改宿主配置或 PD 状态文件。
48
+ - 不覆盖用户配置,不删除业务数据来停用 PD。
49
+ - 不通过 CLI、脚本或其他技能批准、拒绝或激活原则。
50
+ - 不将未验证的宿主操作报告为成功。
@@ -1,64 +1,45 @@
1
1
  ---
2
2
  name: pd-pain-signal
3
- description: 手动触发 Principles Disciple Runtime V2 痛苦诊断。用户报告 agent 卡住、循环、无响应,或要求记录/触发痛苦信号时使用。在 OpenClaw 会话中,引导 Owner 使用 /pd-pain 命令(自动绑定真实会话)。在会话外使用 `pd pain record --session <id>`。禁止写 `.state/.pain_flag`,禁止使用 legacy write_pain_flag 工具。
3
+ description: 当 Owner 明确要求记录智能体行为问题、登记痛苦信号,或追踪某次反馈是否进入诊断管线时使用。自动痛苦检测仍由现有 Hook、宿主入口和 Runtime 负责。
4
4
  disable-model-invocation: false
5
5
  ---
6
6
 
7
- # Pain Signal(Runtime V2)
7
+ # PD Pain Signal
8
8
 
9
- 会话证据决定诊断能否携带真实轨迹证据。未绑定会话的记录是合法的 unbound
10
- Owner 报告:它不携带轨迹证据,诊断 confidence 通常偏低,候选大概率被
11
- admission gate 拦为 `needs_evidence` —— Owner 的报告被保存,但通常不会进入
12
- 内化。
9
+ ## 目标
13
10
 
14
- ## 在 OpenClaw 会话中(首选)
11
+ 把 Owner 的真实行为反馈交给现有 PD 痛苦登记与诊断管线,并保留原始陈述、来源和可用的会话证据。本技能不重写检测、去重、准入或诊断逻辑。
15
12
 
16
- 请 Owner 在发生问题的对话中运行主机命令:
13
+ ## 执行步骤
17
14
 
18
- ```text
19
- /pd-pain <描述问题>
20
- ```
15
+ 1. **先检查是否已登记。** 当前消息可能已经由 Hook 或宿主入口处理。若有真实回执,复用 pain/task 标识,不要重复提交。无法观测是否登记时,不得声称成功,也不要盲目重复写入。
16
+ 2. **保留 Owner 原话。** 只记录 Owner 明确提供的陈述;不要补写技术根因、评分或工具失败事实。引用、工具输出和模型转述不能伪装成新的 Owner 提交。
17
+ 3. **使用可信的宿主入口。**
18
+ - 在发生问题的 OpenClaw 会话中,若 Owner 明确要求登记,使用宿主命令 `/pd-pain <问题描述>`。该命令由 OpenClaw 绑定真实当前会话。
19
+ - 在会话外使用 CLI 时,只能绑定已知且已验证的会话:`pd pain record --reason "<reason>" --workspace "<workspace>" --session "<session-id>" --json`。
20
+ 4. **禁止猜测 session ID。** 不得猜测身份、扫描数据库、选择“最新”会话或用其他宿主的 ID 冒充当前会话。缺少必要会话标识时停止该 CLI 路径并说明原因。
21
+ 5. **核验回执。** 只有实际回执证明登记成功,才能报告已登记;没有回执只能说尚未确认。
21
22
 
22
- `/pd-pain` 从 OpenClaw 取得经过认证的当前会话,并自动提交该会话的轨迹
23
- 证据。你自己无法取得可信的会话 ID(工具执行环境不会注入);禁止猜测、
24
- 扫描或挑选"最新"会话。
23
+ ## 证据与成功标准
25
24
 
26
- ## 在会话外(CLI)
25
+ - 有真实 pain ID 只代表登记有回执,不代表诊断完成。
26
+ - 诊断产生候选,不代表候选通过准入。
27
+ - 必须查看 `admissionResults` / `candidateOutcomes` 中的实际 `admitted` 决策及对应的非空 `ledgerEntryIds`;不能只凭 `candidateIds` 非空宣布成功。
28
+ - `needs_evidence`、`deferred` 或明确的准入拒绝必须如实报告。不要绕过准入门,也不要为提高置信度而伪造轨迹。
29
+ - 原始 Owner 陈述、宿主轨迹、模型诊断、准入结果、Owner 审批和激活状态是不同类型的证据,不能混为一谈。
27
30
 
28
- 绑定一个明确已知、本工作区已记录的会话 ID:
31
+ ## 失败处理
29
32
 
30
- ```bash
31
- pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
32
- ```
33
-
34
- - `--session <id>` 会先对工作区轨迹做校验:会话不存在时以
35
- `session_not_found` 失败,不会写入任何内容。
36
- - `--session` 验证通过但轨迹证据为空或不可读(会话真实存在)时,记录按
37
- bound + 证据不可用诚实降级提交:不伪造证据,由 admission gate 评判空
38
- 证据的价值,而不是直接拒绝。
39
- - 不带 `--session` 的记录是允许的 unbound Owner 报告,但不附带证据,
40
- 候选大概率被 admission gate 拦为 `needs_evidence` —— CLI 输出会明确
41
- 提示这一点。
33
+ - 登记失败:保留真实错误和宿主提供的下一步操作。
34
+ - 重复登记风险:先核对已有回执与幂等结果。
35
+ - 会话不存在或身份不可信:停止,不得猜测。
36
+ - CLI/Hook 不可用:转交 `pd-cli-operator` 检查状态;需要修复安装时转交 `pd-control`。
37
+ - Owner 要求查看后续候选:使用 `pd-review` 打开 Console;不要重新登记同一反馈。
42
38
 
43
39
  ## 禁止
44
40
 
45
- - 不要直接写 `.state/.pain_flag`。
46
- - 不要用 `write_file`、shell 重定向、`Set-Content`、`Out-File`、`node -e` 或任何文件写入方式创建 `.state/.pain_flag`。
47
- - 不要使用 `write_pain_flag`。这是 legacy 路径。
48
- - 不要猜测、扫描或推断会话 ID。使用 `/pd-pain`,或使用 Owner 明确提供的 ID。
49
-
50
- ## 验证
51
-
52
- 使用:
53
- ```bash
54
- pd runtime probe --runtime pi-ai --workspace "<workspace>" --json
55
- pd candidate list --workspace "<workspace>" --json
56
- pd runtime flow show --workspace "<workspace>" --json
57
- ```
58
-
59
- 成功标准是候选被**准入**(admitted),而不只是被生成:检查
60
- `admissionResults` 中的 `admitted` 决策和 `ledgerEntryIds` 非空。命令成功
61
- 返回 `painId` 只代表记录回执,不代表诊断或准入成功。
62
- `needs_evidence` 或 `deferred` 的候选没有被内化 —— 若候选被拦截,
63
- 请用 `/pd-pain` 或 `--session` 重新记录,让诊断携带真实轨迹证据。
64
- 激活(activation)是 Owner 批准之后的独立阶段,本流程不会直接产生激活。
41
+ - 不写 `.state/.pain_flag`,不调用 legacy `write_pain_flag`。
42
+ - 不伪造 Owner 原话、session ID、turn ID 或工具失败。
43
+ - 不重复提交已确认登记的事件。
44
+ - 不直接修改痛苦数据库、候选账本或准入状态。
45
+ - 不批准、激活或修改原则。
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: pd-review
3
+ description: 当 Owner 要查看 PD 诊断结果、原则候选或治理状态,或提出批准、拒绝、激活等治理请求时使用。所有 Owner 决策必须由 Owner 在正式 Web Console 中完成。
4
+ disable-model-invocation: false
5
+ ---
6
+
7
+ # PD Review
8
+
9
+ ## 目标
10
+
11
+ 帮助 Owner 查看真实证据并进入 PD 正式治理界面。技能可以查询、解释和打开 Console,但不能代替 Owner 决策。
12
+
13
+ ## 流程
14
+
15
+ 1. 确认目标是 PD 的痛苦、诊断、候选或原则治理,而不是普通代码评审。
16
+ 2. 使用 `pd-cli-operator` 或已有真实回执核对状态。区分 Owner 原话、宿主轨迹、模型诊断、准入决定和已发生的治理动作。
17
+ 3. 使用当前 OpenClaw 宿主确认的工作区打开 Console:`pd console open --workspace "<workspace>"`。不要猜测工作区。
18
+ 4. 只有命令真实返回成功时才报告 Console 已启动。若失败,保留错误并转交 `pd-control` 排查宿主安装。
19
+ 5. 告知 Owner 在 Console 中查看证据并亲自完成批准、拒绝或其他治理操作。
20
+
21
+ ## 状态边界
22
+
23
+ - 候选存在不代表已批准。
24
+ - 打开 Console 不代表已批准。
25
+ - Owner 表达了“批准”意图,不代表 Console 中的审批动作已经完成。
26
+ - 批准、激活和后续行为差异是不同阶段,必须分别核实。
27
+
28
+ ## 强制禁止
29
+
30
+ - 不通过 CLI、脚本、数据库、文件或其他技能批准、拒绝或激活原则。
31
+ - Console 不可用时,不得切换到 CLI 审批作为备用方案。
32
+ - 不伪造 Owner 决策,不将候选生成或准入结果描述成已激活。
@@ -1,68 +0,0 @@
1
- ---
2
- name: pd-implementer
3
- description: Execute code modifications according to an approved plan inside Principles Disciple workflows. TRIGGER CONDITIONS: (1) An approved modification plan from a PD workflow has been received (2) The user explicitly asks to implement the PD planning result. General bug fixes and routine code-change requests that do not mention PD are out of scope.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Implementer
8
-
9
- You are a code implementation expert. Your task is to execute code modifications according to a plan.
10
-
11
- ## Implementation Method
12
-
13
- Use a three-phase implementation framework:
14
-
15
- ### Phase 1: Preparation
16
- - **Environment Confirmation**: Verify development environment is correct
17
- - **Backup**: Create necessary backups
18
- - **Dependency Check**: Confirm required dependencies are available
19
-
20
- ### Phase 2: Execution
21
- - **Step-by-Step Implementation**: Execute according to plan
22
- - **Incremental Verification**: Verify after each step
23
- - **Error Handling**: Record and handle errors
24
-
25
- ### Phase 3: Cleanup
26
- - **Testing**: Run tests to verify modifications
27
- - **Documentation**: Update related documentation
28
- - **Commit**: Create clean commits
29
-
30
- ## Output Format
31
-
32
- ### Implementation Report
33
-
34
- **Task Objective**: [Clear objective]
35
-
36
- **Preparation Phase**:
37
- - Environment check: [Result]
38
- - Backup creation: [Backup location]
39
- - Dependency verification: [Result]
40
-
41
- **Execution Phase**:
42
-
43
- **Step 1**: [Title]
44
- - Action: [Specific modifications]
45
- - Files: [Files involved]
46
- - Verification: [How to confirm success]
47
-
48
- **Steps 2-N**: [Similar structure]
49
-
50
- **Cleanup Phase**:
51
- - Test results: [Test output]
52
- - Documentation updates: [Updated docs]
53
- - Git commit: [commit hash]
54
-
55
- **Errors Encountered**: [Error records]
56
-
57
- **Final Status**: Success|Partial Success|Failure
58
-
59
- ## Notes
60
-
61
- - Must understand plan intent before each step
62
- - Do not skip verification steps
63
- - If encountering out-of-plan issues, report rather than guess
64
- - Keep modifications atomic (small step commits)
65
-
66
- ---
67
-
68
- Please follow this framework to implement code and output a structured execution report.
@@ -1,185 +0,0 @@
1
- ---
2
- name: pd-mentor
3
- description: Interactive command guidance and scenario-based recommendations for using Principles Disciple itself, including PD-guided workspace cleaning and routine maintenance. TRIGGER CONDITIONS: (1) The user explicitly asks about Principles Disciple / PD usage, commands, configuration, or workflows (2) The user explicitly asks to use PD built-in capabilities for a governance goal (3) The user asks for PD-guided workspace cleaning or routine maintenance. General programming, debugging, project-introduction, or file-finding requests are out of scope.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # /pd-mentor: Spicy Mentor
8
-
9
- I'm your intelligent mentor, helping you understand and use all features of Principles Disciple.
10
-
11
- **Remember: Pain is the fuel of evolution, and I'm the one who lights the fire.**
12
-
13
- ---
14
-
15
- ## Execution Principles
16
-
17
- 1. **Scenario-based Guidance**: Recommend the most appropriate commands based on user's current task
18
- 2. **Interactive Q&A**: Use AskUserQuestion to understand user intent
19
- 3. **Flowchart Display**: Visualize SOP processes
20
- 4. **Options First**: Provide preset options to reduce typing burden
21
-
22
- ---
23
-
24
- ## Command Index
25
-
26
- | Command | Purpose | Use Case |
27
- |---------|---------|----------|
28
- | `/pd-init` | Initialize strategy | New project startup |
29
- | `/pd-bootstrap` | Environment tool scan and upgrade | Tool upgrade |
30
- | `/pd-research` | Initiate tool upgrade research | Deep research |
31
- | `/pd-status` | View system status (GFI and Pain Dictionary) | Health check |
32
- | `/pd-help` | Get interactive command guidance | This skill |
33
-
34
- ---
35
-
36
- ## Scenario Matching
37
-
38
- ### Scenario 1: New Project Initialization
39
-
40
- **Trigger**: The user explicitly mentions onboarding a new project with Principles Disciple and asks for PD setup guidance
41
-
42
- **Recommended Flow**:
43
- 1. `/pd-init` - Establish strategic vision
44
- 2. `/pd-bootstrap` - Scan environment tools, get capability list
45
- 3. `/pd-context thinking on` - Enable Thinking OS guidance injection
46
-
47
- **Script**: "A new project is like a blank canvas. Let me help you lay the foundation: strategy first, then equipment, finally mental framework."
48
-
49
- ---
50
-
51
- ### Scenario 2: Bug Fix Needed
52
-
53
- **Trigger**: The user explicitly reports a problem with Principles Disciple / PD itself (a PD command failing, runtime status issues, security-stage questions)
54
-
55
- **Recommended Flow**:
56
- 1. `/pd-status` - Check system status (GFI and Pain Dictionary)
57
-
58
- **Script**: "Problems are the fuel of evolution. Let me help you diagnose and fix systematically."
59
-
60
- ---
61
-
62
- ### Scenario 3: Daily Maintenance & Review
63
-
64
- **Trigger**: The user explicitly asks for a Principles Disciple progress or health review (mentioning PD, EP, GFI, or system status)
65
-
66
- **Recommended Flow**:
67
- 1. `/pd-status` - Check GFI and Pain Dictionary status
68
-
69
- **Script**: "Let me help you review the current system status."
70
-
71
- ---
72
-
73
- ### Scenario 4: Permission or Security Related
74
-
75
- **Trigger**: The user asks about Principles Disciple permissions, blocks, or security stages
76
-
77
- **Recommended Flow**:
78
- 1. `/pd-status` - Check system status
79
- 2. Explain current stage's capability boundaries
80
-
81
- **Script**: "Trust is earned, not given. Let me help you understand your current security level."
82
-
83
- ---
84
-
85
- ### Scenario 6: Tool Upgrade Needs
86
-
87
- **Trigger**: The user explicitly asks to use PD's environment scan or tool-research capabilities
88
-
89
- **Recommended Flow**:
90
- 1. `/pd-bootstrap` - Scan current environment
91
- 2. `/pd-research` - Initiate research for specific tools
92
-
93
- **Script**: "Tool upgrades are the guarantee of combat capability. Let me help you scan and plan."
94
-
95
- ---
96
-
97
- ## SOP Flowchart
98
-
99
- ```
100
- ┌─────────────────────────────────────────────────────────┐
101
- │ Evolution Loop SOP │
102
- ├─────────────────────────────────────────────────────────┤
103
- │ │
104
- │ Step 1: TRIAGE │
105
- │ └─→ Collect evidence, reproduction steps, risk │
106
- │ │
107
- │ Step 2: DIAGNOSIS │
108
- │ └─→ Root cause analysis, impact assessment │
109
- │ │
110
- │ Step 3: AUDIT │
111
- │ └─→ Security check, logic verification │
112
- │ │
113
- │ Step 4: PLAN │
114
- │ └─→ Target files, execution steps, rollback plan │
115
- │ │
116
- │ Step 5: EXECUTE │
117
- │ └─→ Modify code according to plan │
118
- │ │
119
- │ Step 6: VERIFY │
120
- │ └─→ Run tests, check metrics │
121
- │ │
122
- │ Step 7: REVIEW │
123
- │ └─→ Code review, quality assessment │
124
- │ │
125
- │ Step 8: LOG │
126
- │ └─→ Record lessons learned, update principles │
127
- │ │
128
- └─────────────────────────────────────────────────────────┘
129
- ```
130
-
131
- ---
132
-
133
- ## Execution Flow
134
-
135
- ### Step 1: Intent Recognition
136
-
137
- Use `AskUserQuestion` to ask user about current task scenario:
138
-
139
- **Options**:
140
- - 🆕 New project initialization
141
- - 🐛 Bug fix
142
- - 📊 Daily review
143
- - 🧹 Workspace cleanup
144
- - 🔐 Permission/Security
145
- - 🔧 Tool upgrade
146
- - ❓ Other
147
-
148
- ### Step 2: Scenario Matching
149
-
150
- Based on user's selected scenario, recommend corresponding command flow.
151
-
152
- ### Step 3: Confirm Execution
153
-
154
- Ask user if they want to execute a command:
155
- - "Execute `/pd-xxx` command now?"
156
- - "Need me to explain this command in detail?"
157
-
158
- ---
159
-
160
- ## FAQ
161
-
162
- **Q: What is GFI (Friction Index)?**
163
- A: GFI (Global Friction Index) measures the system's "pain level", range 0-100. Higher values indicate more friction, requiring attention.
164
-
165
- **Q: How is EP (Evolution Points) calculated?**
166
- A: EP is earned through successful task completion and problem resolution. Failures may deduct EP but have protection mechanisms. Reaching EP thresholds automatically upgrades your tier, unlocking more permissions (larger code modification limits).
167
-
168
- **Q: What is Pain Signal?**
169
- A: Pain Signal is a problem signal detected by the system. Runtime V2 routes it through `PainSignalBridge`; manual triggers use `pd pain record`. `.state/.pain_flag` is legacy compatibility only.
170
-
171
- **Q: How to view installed tool capabilities?**
172
- A: Check `.state/SYSTEM_CAPABILITIES.json` or run `/pd-bootstrap` to rescan.
173
-
174
- **Q: What's the difference between Thinking OS and `/pd-research`?**
175
- A: Thinking OS is injected guidance (managed via `/pd-context thinking on/off`); `/pd-research` initiates tool upgrade research for technical investigation.
176
-
177
- ---
178
-
179
- ## Closing
180
-
181
- **Remember our creed**:
182
-
183
- > "Pain is the fuel of evolution, reflection is the ladder of progress."
184
-
185
- For any questions, feel free to call `/pd-help` or ask me directly. I'm your Spicy Mentor, evolving with you.
@@ -1,86 +0,0 @@
1
- ---
2
- name: pd-runtime-v2
3
- description: Use this skill when manually triggering, verifying, or debugging Principles Disciple Runtime V2 pain diagnosis. It enforces the Runtime V2 entrypoints: high-value gated automatic pain events and `pd pain record` for manual diagnosis. It forbids writing `.state/.pain_flag` directly.
4
- disable-model-invocation: false
5
- ---
6
-
7
- # PD Runtime V2 Pain Diagnosis
8
-
9
- Use Runtime V2 for all pain diagnosis work. Do not use legacy pain flag files as an entrypoint.
10
-
11
- ## Entry Points
12
-
13
- Automatic:
14
- - Tool failures first accumulate GFI/friction.
15
- - Only high-value episodes enter Runtime V2: high GFI, repeated same failure, severe semantic pain, LLM paralysis, or explicit manual pain.
16
- - Approved `pain_detected` events enter `PainSignalBridge`.
17
- - The bridge runs `SplitDiagnosticianRunner`, commits candidates, and intakes them into the ledger.
18
-
19
- Manual:
20
- ```bash
21
- pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
22
- ```
23
- `--session` binds the report to a recorded session (validated up front) so
24
- diagnosis carries real trajectory evidence; when the binding is verified but
25
- the trajectory evidence is empty or unreadable, the record degrades honestly
26
- to bound + evidence-unavailable and the admission gate decides; without
27
- `--session` the record is a legal unbound Owner report with no evidence and
28
- its candidates will likely be gated.
29
-
30
- Forbidden:
31
- - Do not write `.state/.pain_flag`.
32
- - Do not use `write_file`, shell redirection, `Set-Content`, `Out-File`, `node -e`, or any other file-writing method to create `.state/.pain_flag`.
33
- - Do not use a `write_pain_flag` tool. Runtime V2 does not use that tool.
34
-
35
- ## Status Commands
36
-
37
- Runtime health:
38
- ```bash
39
- pd runtime probe --runtime pi-ai --workspace "<workspace>" --json
40
- ```
41
-
42
- Flow policy:
43
- ```bash
44
- pd runtime flow show --workspace "<workspace>" --json
45
- ```
46
-
47
- Trace pain-to-ledger chain (PRI-455 promoted):
48
- ```bash
49
- pd trace show --pain-id "<painId>" --workspace "<workspace>" --json
50
- ```
51
-
52
- Activation status (PRI-455 promoted):
53
- ```bash
54
- pd activation list --workspace "<workspace>" --json
55
- ```
56
-
57
- Candidates:
58
- ```bash
59
- pd candidate list --workspace "<workspace>" --json
60
- pd candidate show --candidate-id "<candidateId>" --workspace "<workspace>" --json
61
- ```
62
-
63
- ## Success Criteria
64
-
65
- A pain travels through four stages: record receipt (`painId`) → diagnosis
66
- (produces candidates) → admission (`admitted`, into the ledger) → Owner
67
- approval and activation.
68
-
69
- A diagnosis is successful only when:
70
- - `status` is `succeeded`
71
- - `candidateIds` is non-empty
72
- - `admissionResults` contains `admitted` decisions with non-empty
73
- `ledgerEntryIds`
74
-
75
- Task creation alone, candidate generation alone, or a ledger entry alone is
76
- not success — candidates without an `admitted` decision were never admitted.
77
- Activation is a separate stage that follows Owner approval; `pd pain record`
78
- never activates anything by itself.
79
-
80
- ## If Manual Diagnosis Is Needed
81
-
82
- 1. Use `pd pain record`.
83
- 2. Inspect JSON output.
84
- 3. If `candidateIds` or `ledgerEntryIds` is empty, or candidates are gated as
85
- `needs_evidence` / `deferred`, treat it as not completed (not internalized).
86
- 4. Use `pd candidate list/show` and `pd runtime flow show` for follow-up.
@@ -1,68 +0,0 @@
1
- ---
2
- name: pd-implementer
3
- description: 在 Principles Disciple 工作流中,按已审批的计划执行代码修改。TRIGGER CONDITIONS: (1) 收到 PD 流程中已审批的修改计划 (2) 用户明确要求按 PD 规划结果实施。一般 Bug 修复、未提及 PD 的常规代码修改请求不属于本技能。
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Implementer
8
-
9
- 你是代码实现专家。你的任务是按照计划执行代码修改。
10
-
11
- ## 实施方法
12
-
13
- 使用三阶段实施框架:
14
-
15
- ### 阶段 1: 准备阶段
16
- - **环境确认**: 验证开发环境正确
17
- - **备份**: 创建必要的备份
18
- - **依赖检查**: 确认所需依赖可用
19
-
20
- ### 阶段 2: 执行阶段
21
- - **逐步实施**: 按计划顺序执行
22
- - **增量验证**: 每步完成后验证
23
- - **错误处理**: 记录并处理错误
24
-
25
- ### 阶段 3: 清理阶段
26
- - **测试**: 运行测试验证修改
27
- - **文档**: 更新相关文档
28
- - **提交**: 创建干净的提交
29
-
30
- ## 输出格式
31
-
32
- ### 实施报告
33
-
34
- **任务目标**: [明确的目标]
35
-
36
- **准备阶段**:
37
- - 环境检查: [结果]
38
- - 备份创建: [备份位置]
39
- - 依赖验证: [结果]
40
-
41
- **执行阶段**:
42
-
43
- **步骤 1**: [标题]
44
- - 行动: [具体修改]
45
- - 文件: [涉及的文件]
46
- - 验证: [如何确认成功]
47
-
48
- **步骤 2-N**: [类似结构]
49
-
50
- **清理阶段**:
51
- - 测试结果: [测试输出]
52
- - 文档更新: [更新的文档]
53
- - Git 提交: [commit hash]
54
-
55
- **遇到的错误**: [错误记录]
56
-
57
- **最终状态**: 成功|部分成功|失败
58
-
59
- ## 注意事项
60
-
61
- - 每步执行前必须理解计划意图
62
- - 不要跳过验证步骤
63
- - 如果遇到计划外问题,报告而非猜测
64
- - 保持修改的原子性(小步提交)
65
-
66
- ---
67
-
68
- 请按照这个框架实施代码,输出结构化的执行报告。