create-principles-disciple 1.145.13 → 1.145.15
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/_release/product-identity.json +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js +1 -1
- package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-intent-preflight.d.ts +16 -2
- package/core/dist/runtime-v2/internalization/artificer-intent-preflight.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-intent-preflight.js +88 -4
- package/core/dist/runtime-v2/internalization/artificer-intent-preflight.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-runner.d.ts.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-runner.js +21 -2
- package/core/dist/runtime-v2/internalization/artificer-runner.js.map +1 -1
- package/core/package.json +1 -1
- package/dist/installers/codex-host-installer.d.ts +1 -1
- package/dist/installers/codex-host-installer.js +3 -3
- package/dist/installers/codex-host-installer.js.map +1 -1
- package/dist/installers/workbuddy-host-installer.js +1 -1
- package/dist/installers/workbuddy-host-installer.js.map +1 -1
- package/host-runtime/dist/governance-signal-admission.d.ts +16 -2
- package/host-runtime/dist/governance-signal-admission.js +27 -7
- package/host-runtime/package.json +1 -1
- package/package.json +2 -2
- package/pd-cli/dist/commands/codex-setup.js +1 -1
- package/pd-cli/dist/commands/config-doctor.d.ts.map +1 -1
- package/pd-cli/dist/commands/config-doctor.js +5 -1
- package/pd-cli/dist/commands/config-doctor.js.map +1 -1
- package/pd-cli/dist/commands/health-codex-install.d.ts +6 -6
- package/pd-cli/dist/commands/health-codex-install.d.ts.map +1 -1
- package/pd-cli/dist/commands/health-codex-install.js +7 -7
- package/pd-cli/dist/commands/health-codex-install.js.map +1 -1
- package/pd-cli/dist/commands/health-codex.js +1 -1
- package/pd-cli/dist/commands/health-codex.js.map +1 -1
- package/pd-cli/dist/commands/run.d.ts +2 -0
- package/pd-cli/dist/commands/run.d.ts.map +1 -1
- package/pd-cli/dist/commands/run.js +9 -4
- package/pd-cli/dist/commands/run.js.map +1 -1
- package/pd-cli/dist/index.js +6 -4
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/dist/services/config-doctor.d.ts +4 -0
- package/pd-cli/dist/services/config-doctor.d.ts.map +1 -1
- package/pd-cli/dist/services/config-doctor.js +15 -0
- package/pd-cli/dist/services/config-doctor.js.map +1 -1
- package/pd-cli/package.json +1 -1
- package/plugin/dist/bundle.js +375 -375
- package/plugin/dist/core/signal-collector-host.d.ts +17 -1
- package/plugin/dist/core/signal-health.d.ts +15 -0
- package/plugin/dist/openclaw.plugin.json +1 -1
- package/plugin/dist/templates/langs/en/skills/pd-cli-operator/SKILL.md +32 -70
- package/plugin/dist/templates/langs/en/skills/pd-control/SKILL.md +50 -0
- package/plugin/dist/templates/langs/en/skills/pd-pain-signal/SKILL.md +30 -56
- package/plugin/dist/templates/langs/en/skills/pd-review/SKILL.md +32 -0
- package/plugin/dist/templates/langs/zh/skills/pd-cli-operator/SKILL.md +32 -65
- package/plugin/dist/templates/langs/zh/skills/pd-control/SKILL.md +50 -0
- package/plugin/dist/templates/langs/zh/skills/pd-pain-signal/SKILL.md +29 -48
- package/plugin/dist/templates/langs/zh/skills/pd-review/SKILL.md +32 -0
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/plugin/templates/langs/en/skills/pd-cli-operator/SKILL.md +32 -70
- package/plugin/templates/langs/en/skills/pd-control/SKILL.md +50 -0
- package/plugin/templates/langs/en/skills/pd-pain-signal/SKILL.md +30 -56
- package/plugin/templates/langs/en/skills/pd-review/SKILL.md +32 -0
- package/plugin/templates/langs/zh/skills/pd-cli-operator/SKILL.md +32 -65
- package/plugin/templates/langs/zh/skills/pd-control/SKILL.md +50 -0
- package/plugin/templates/langs/zh/skills/pd-pain-signal/SKILL.md +29 -48
- package/plugin/templates/langs/zh/skills/pd-review/SKILL.md +32 -0
- package/release-manager/dist/installers/codex-host-installer.d.ts +1 -1
- package/release-manager/dist/installers/codex-host-installer.js +3 -3
- package/release-manager/dist/installers/codex-host-installer.js.map +1 -1
- package/release-manager/dist/installers/workbuddy-host-installer.js +1 -1
- package/release-manager/dist/installers/workbuddy-host-installer.js.map +1 -1
- package/release-manager/package.json +2 -2
- package/workbuddy-adapter/dist/explicit-owner-statement.js +9 -2
- package/workbuddy-adapter/dist/pd-hook.js +5 -2
- package/workbuddy-adapter/package.json +1 -1
- package/workbuddy-adapter/plugin/skills/pd-cli-operator/SKILL.md +32 -0
- package/workbuddy-adapter/plugin/skills/pd-control/SKILL.md +31 -0
- package/workbuddy-adapter/plugin/skills/pd-pain-signal/SKILL.md +35 -0
- package/workbuddy-adapter/plugin/skills/pd-review/SKILL.md +22 -8
- package/plugin/dist/templates/langs/en/skills/pd-implementer/SKILL.md +0 -68
- package/plugin/dist/templates/langs/en/skills/pd-mentor/SKILL.md +0 -185
- package/plugin/dist/templates/langs/en/skills/pd-runtime-v2/SKILL.md +0 -86
- package/plugin/dist/templates/langs/zh/skills/pd-implementer/SKILL.md +0 -68
- package/plugin/dist/templates/langs/zh/skills/pd-mentor/SKILL.md +0 -185
- package/plugin/dist/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +0 -81
- package/plugin/templates/langs/en/skills/pd-implementer/SKILL.md +0 -68
- package/plugin/templates/langs/en/skills/pd-mentor/SKILL.md +0 -185
- package/plugin/templates/langs/en/skills/pd-runtime-v2/SKILL.md +0 -86
- package/plugin/templates/langs/zh/skills/pd-implementer/SKILL.md +0 -68
- package/plugin/templates/langs/zh/skills/pd-mentor/SKILL.md +0 -185
- package/plugin/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +0 -81
- package/workbuddy-adapter/plugin/skills/pd-disable/SKILL.md +0 -18
- package/workbuddy-adapter/plugin/skills/pd-record-pain/SKILL.md +0 -21
- package/workbuddy-adapter/plugin/skills/pd-status/SKILL.md +0 -17
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pd-cli-operator
|
|
3
|
+
description: 检查 WorkBuddy 中 PD 的运行状态、治理开关、worker 活性,或只读查询痛苦、任务和证据链。使用 WorkBuddy 固定治理工作区,不负责登记痛苦、Owner 审阅或启停操作。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PD CLI Operator(WorkBuddy)
|
|
7
|
+
|
|
8
|
+
## 工作区
|
|
9
|
+
|
|
10
|
+
始终使用 WorkBuddy 固定治理工作区 `~/.workbuddy/pd-workspace`,先将 `~` 解析为当前用户主目录的绝对路径。不得切换到当前项目目录、Codex 工作区或 OpenClaw 工作区。
|
|
11
|
+
|
|
12
|
+
## 检查步骤
|
|
13
|
+
|
|
14
|
+
1. 先运行以下只读命令,确认 Runtime 功能和 worker 状态:
|
|
15
|
+
|
|
16
|
+
pd runtime features --workspace "<用户主目录>/.workbuddy/pd-workspace" --json
|
|
17
|
+
pd workbuddy worker --status --workspace "<用户主目录>/.workbuddy/pd-workspace" --json
|
|
18
|
+
|
|
19
|
+
2. 按需使用 CLI 帮助确认其他只读命令的可用性,再查询痛苦、任务、运行记录、候选或证据链,例如 `pd pain list --workspace "<workspace>" --json`、`pd task show "<taskId>" --workspace "<workspace>" --json`、`pd run show "<runId>" --workspace "<workspace>"`、`pd runtime trace show --pain-id "<painId>" --workspace "<workspace>" --json`。其中 `<workspace>` 必须替换为上面的 WorkBuddy 固定治理工作区,不能换成当前项目目录。
|
|
20
|
+
3. 报告真实输出中的 `host.workbuddy` 开关、worker 模式和错误原因。worker 已注册不等于 worker 正在运行;插件存在不等于技能已加载;健康检查通过不等于某条痛苦已经完成诊断。
|
|
21
|
+
4. 追踪具体问题时使用登记回执中的真实 ID,逐段核实登记、诊断、候选准入和治理状态。
|
|
22
|
+
|
|
23
|
+
## 失败处理
|
|
24
|
+
|
|
25
|
+
命令缺失、安装不完整或状态不可读取时,保留真实错误和下一步建议。需要停用时使用 `pd-control`;需要审阅候选时使用 `pd-review`;需要登记 Owner 反馈时使用 `pd-pain-signal`。
|
|
26
|
+
|
|
27
|
+
## 禁止
|
|
28
|
+
|
|
29
|
+
- 不初始化项目目录或切换到其他宿主的治理库。
|
|
30
|
+
- 不手工修改配置、数据库或内部工件。
|
|
31
|
+
- 不将 worker 注册/插件存在描述为真实运行或行为生效。
|
|
32
|
+
- 不通过 CLI 或脚本批准、拒绝或激活原则。
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pd-control
|
|
3
|
+
description: 当 Owner 明确要求管理 WorkBuddy 的 PD 接入、停用或修复时使用。当前随插件交付的控制脚本只提供停用操作;不得猜测启用命令或手工修改配置。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PD Control(WorkBuddy)
|
|
7
|
+
|
|
8
|
+
## 前提
|
|
9
|
+
|
|
10
|
+
只在 Owner 明确要求停用 WorkBuddy PD 时执行操作。WorkBuddy 的固定治理工作区是 `~/.workbuddy/pd-workspace`;安装/注册插件不等于启用治理,插件默认状态为关闭。
|
|
11
|
+
|
|
12
|
+
## 停用
|
|
13
|
+
|
|
14
|
+
根据当前技能文件所在位置定位同一插件根目录,运行随插件交付的控制脚本:
|
|
15
|
+
|
|
16
|
+
node "<plugin-root>/scripts/pd-control.cjs" disable
|
|
17
|
+
|
|
18
|
+
不要搜索任意 npm 缓存,也不要使用其他宿主的脚本。
|
|
19
|
+
|
|
20
|
+
只有退出码为 0 且 JSON 回执确认 `ok=true`、`enabled=false`、`host=workbuddy` 时,才能报告停用成功。报告真实回执中的工作区与状态。新 Hook 调用读取该开关;已运行中的任务是否停止必须另行核验。
|
|
21
|
+
|
|
22
|
+
## 安装、启用与修复
|
|
23
|
+
|
|
24
|
+
当前插件内的 `pd-control.cjs` 只实现停用。安装/注册、启用或修复必须使用正式 WorkBuddy 插件安装器/宿主管理流程。若该流程没有提供可验证的启用操作,明确报告不支持;不得猜测命令、手工修改配置或调用私有安装器函数。
|
|
25
|
+
|
|
26
|
+
## 禁止
|
|
27
|
+
|
|
28
|
+
- 不直接编辑配置、数据库、Runtime 或业务状态文件。
|
|
29
|
+
- 不删除数据来实现停用。
|
|
30
|
+
- 不将安装、注册或配置存在描述为 PD 已实际启用。
|
|
31
|
+
- 不批准、拒绝或激活原则。
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pd-pain-signal
|
|
3
|
+
description: 当 Owner 要求记录 WorkBuddy 智能体的行为错误、痛苦反馈或行为改进证据时使用。只使用 Owner 当前明确提交的原文和 WorkBuddy 原生 Hook 回执。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PD Pain Signal(WorkBuddy)
|
|
7
|
+
|
|
8
|
+
## 唯一的正常入口
|
|
9
|
+
|
|
10
|
+
Owner 在当前 WorkBuddy 会话中提交:
|
|
11
|
+
|
|
12
|
+
PD记录痛苦:<Owner 原文>
|
|
13
|
+
|
|
14
|
+
- 前缀必须位于 Owner 消息开头,使用全角冒号;正文为 1–500 个字符。
|
|
15
|
+
- 超长输入必须拒绝并请 Owner 精简,不能静默截断。
|
|
16
|
+
- 只记录 Owner 明确提供的原文,不补写根因、评分或模型自述。
|
|
17
|
+
- 代理生成的文本、引用和工具输出不构成新的 Owner 提交。不要代发或模拟宿主事件。
|
|
18
|
+
- 如果当前消息没有此前缀,只提供格式示例,请 Owner 在当前会话中提交;不要绕过 Hook 直接调用 CLI。
|
|
19
|
+
|
|
20
|
+
## 回执
|
|
21
|
+
|
|
22
|
+
若当前消息已触发 UserPromptSubmit Hook,读取本次 Hook 的真实回执。只有回执包含真实 `painId`、`taskId`、`host=workbuddy` 和状态时,才能报告登记成功;否则明确说明尚未确认,并保留实际拒绝原因。
|
|
23
|
+
|
|
24
|
+
WorkBuddy 的治理工作区固定为 `~/.workbuddy/pd-workspace`。不得猜测或扫描 session/turn 标识,不得使用 OpenClaw 的 `/pd-pain`,也不得用通用 CLI 手工重建 WorkBuddy 的宿主 lineage 来代替原生入口。
|
|
25
|
+
|
|
26
|
+
## 下游结果
|
|
27
|
+
|
|
28
|
+
Owner 陈述是未经独立验证的 `owner_statement`。登记成功只证明痛苦和任务已登记;诊断、候选准入、原则审批和生效必须分别查证。需要检查状态时使用 `pd-cli-operator`;需要 Owner 审阅时使用 `pd-review`。
|
|
29
|
+
|
|
30
|
+
## 禁止
|
|
31
|
+
|
|
32
|
+
- 不改写 Owner 原话,不伪造宿主身份或行为轨迹。
|
|
33
|
+
- 不重复提交已确认登记的同一事件。
|
|
34
|
+
- 不直接写痛苦数据库、候选账本或准入状态。
|
|
35
|
+
- 不自动批准或激活原则。
|
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pd-review
|
|
3
|
-
description: 打开 WorkBuddy 的 PD Owner
|
|
3
|
+
description: 打开 WorkBuddy 的 PD Owner Console,审阅痛苦、诊断、候选或原则治理状态。所有批准、拒绝和激活决定必须由 Owner 在正式 Web Console 中完成。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# WorkBuddy
|
|
6
|
+
# PD Review(WorkBuddy)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## 固定治理工作区
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
pd console open --workspace "<用户主目录>/.workbuddy/pd-workspace"
|
|
12
|
-
```
|
|
10
|
+
WorkBuddy 的治理工作区固定为 `~/.workbuddy/pd-workspace`,与 WorkBuddy Hook 和 worker 使用的数据库一致。将 `~` 解析为当前用户主目录的绝对路径;不得用当前项目目录或其他宿主的工作区替代。
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
## 打开 Console
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
运行正式 CLI:
|
|
15
|
+
|
|
16
|
+
pd console open --workspace "<用户主目录>/.workbuddy/pd-workspace"
|
|
17
|
+
|
|
18
|
+
只报告命令真实返回的 Console 地址和状态。失败时保留错误原因,不声称已打开;需要排查安装/运行状态时使用 `pd-cli-operator`,需要修复宿主接入时使用 `pd-control`。
|
|
19
|
+
|
|
20
|
+
## Owner 治理
|
|
21
|
+
|
|
22
|
+
帮助 Owner 区分原始反馈、宿主证据、模型诊断和准入决定。Owner 在 Console 中审阅证据并亲自批准、拒绝或完成其他治理动作。
|
|
23
|
+
|
|
24
|
+
打开 Console 不构成审批;候选存在不代表已批准;批准不自动证明原则已激活或后续行为已改变。
|
|
25
|
+
|
|
26
|
+
## 强制禁止
|
|
27
|
+
|
|
28
|
+
- 不通过 CLI、脚本、数据库或文件批准、拒绝或激活原则。
|
|
29
|
+
- Console 不可用时,不得切换到 CLI 审批。
|
|
30
|
+
- 不伪造 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
|
-
请按照这个框架实施代码,输出结构化的执行报告。
|