create-principles-disciple 1.126.2 → 1.127.0
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/core/dist/runtime-v2/__tests__/pain-ingress-persistence.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pain-ingress-persistence.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-ingress-persistence.test.js +276 -0
- package/core/dist/runtime-v2/__tests__/pain-ingress-persistence.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-ingress-shared-semantics.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pain-ingress-shared-semantics.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-ingress-shared-semantics.test.js +131 -0
- package/core/dist/runtime-v2/__tests__/pain-ingress-shared-semantics.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-outcome-convergence.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/pain-outcome-convergence.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-outcome-convergence.test.js +126 -0
- package/core/dist/runtime-v2/__tests__/pain-outcome-convergence.test.js.map +1 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-execute-pending.test.js +95 -0
- package/core/dist/runtime-v2/__tests__/pain-signal-bridge-execute-pending.test.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +9 -1
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +6 -0
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/pain-ingress-payload.d.ts +207 -0
- package/core/dist/runtime-v2/pain-ingress-payload.d.ts.map +1 -0
- package/core/dist/runtime-v2/pain-ingress-payload.js +340 -0
- package/core/dist/runtime-v2/pain-ingress-payload.js.map +1 -0
- package/core/dist/runtime-v2/pain-ingress.d.ts +61 -0
- package/core/dist/runtime-v2/pain-ingress.d.ts.map +1 -0
- package/core/dist/runtime-v2/pain-ingress.js +163 -0
- package/core/dist/runtime-v2/pain-ingress.js.map +1 -0
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts +39 -1
- package/core/dist/runtime-v2/pain-signal-bridge.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-bridge.js +163 -8
- package/core/dist/runtime-v2/pain-signal-bridge.js.map +1 -1
- package/core/dist/runtime-v2/pain-to-principle-service.d.ts +8 -1
- package/core/dist/runtime-v2/pain-to-principle-service.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-to-principle-service.js +3 -0
- package/core/dist/runtime-v2/pain-to-principle-service.js.map +1 -1
- package/host-runtime/dist/index.d.ts +1 -0
- package/host-runtime/dist/index.js +3 -0
- package/host-runtime/dist/pain-evidence-ingress.d.ts +16 -0
- package/host-runtime/dist/pain-evidence-ingress.js +15 -0
- package/package.json +2 -2
- package/pd-cli/dist/commands/build-trajectory-evidence.d.ts +25 -6
- package/pd-cli/dist/commands/build-trajectory-evidence.d.ts.map +1 -1
- package/pd-cli/dist/commands/build-trajectory-evidence.js +174 -114
- package/pd-cli/dist/commands/build-trajectory-evidence.js.map +1 -1
- package/pd-cli/dist/commands/pain-record.d.ts.map +1 -1
- package/pd-cli/dist/commands/pain-record.js +212 -17
- package/pd-cli/dist/commands/pain-record.js.map +1 -1
- package/pd-cli/dist/index.js +1 -1
- package/pd-cli/dist/index.js.map +1 -1
- package/plugin/dist/bundle.js +456 -454
- package/plugin/dist/governance-audit.js +152 -152
- package/plugin/dist/hooks/pain-ingress-adapter.d.ts +19 -0
- package/plugin/dist/hooks/trajectory-evidence.d.ts +32 -1
- package/plugin/dist/rulehost-evidence.js +155 -155
- package/plugin/dist/templates/langs/en/skills/pd-cli-operator/SKILL.md +11 -4
- package/plugin/dist/templates/langs/en/skills/pd-pain-signal/SKILL.md +36 -4
- package/plugin/dist/templates/langs/en/skills/pd-runtime-v2/SKILL.md +4 -1
- package/plugin/dist/templates/langs/zh/skills/pd-cli-operator/SKILL.md +9 -4
- package/plugin/dist/templates/langs/zh/skills/pd-pain-signal/SKILL.md +32 -4
- package/plugin/dist/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +3 -1
- package/plugin/openclaw.plugin.json +1 -1
- package/plugin/package.json +1 -1
- package/plugin/templates/langs/en/skills/pd-cli-operator/SKILL.md +11 -4
- package/plugin/templates/langs/en/skills/pd-pain-signal/SKILL.md +36 -4
- package/plugin/templates/langs/en/skills/pd-runtime-v2/SKILL.md +4 -1
- package/plugin/templates/langs/zh/skills/pd-cli-operator/SKILL.md +9 -4
- package/plugin/templates/langs/zh/skills/pd-pain-signal/SKILL.md +32 -4
- package/plugin/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +3 -1
|
@@ -10,15 +10,22 @@ Use the `pd` CLI as the supported operator surface. Do not modify PD state files
|
|
|
10
10
|
|
|
11
11
|
## Runtime V2 Pain Diagnosis
|
|
12
12
|
|
|
13
|
-
Manual pain diagnosis
|
|
13
|
+
Manual pain diagnosis (bind a recorded session so diagnosis carries real
|
|
14
|
+
trajectory evidence):
|
|
14
15
|
```bash
|
|
15
|
-
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --json
|
|
16
|
+
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
16
17
|
```
|
|
17
18
|
|
|
19
|
+
- Without `--session` the record is an honest unbound Owner report: no
|
|
20
|
+
trajectory evidence, candidates likely gated (`needs_evidence`) by the
|
|
21
|
+
admission threshold — the CLI output warns about this.
|
|
22
|
+
- `--session <id>` is validated up front; a missing session fails with
|
|
23
|
+
`session_not_found` before anything is written.
|
|
24
|
+
|
|
18
25
|
Success requires:
|
|
19
26
|
- `status` is `succeeded`
|
|
20
|
-
- `
|
|
21
|
-
|
|
27
|
+
- candidates are ADMITTED, not merely generated: check `admissionResults` /
|
|
28
|
+
`candidateOutcomes` for `admitted` decisions and non-empty `ledgerEntryIds`
|
|
22
29
|
|
|
23
30
|
Forbidden:
|
|
24
31
|
- Do not write `.state/.pain_flag`.
|
|
@@ -1,22 +1,50 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pd-pain-signal
|
|
3
|
-
description: Manually trigger a Principles Disciple Runtime V2 pain diagnosis. Use this when the user reports the agent is stuck, looping, unresponsive, or asks to record/trigger a pain signal.
|
|
3
|
+
description: Manually trigger a Principles Disciple Runtime V2 pain diagnosis. Use this when the user reports the agent is stuck, looping, unresponsive, or asks to record/trigger a pain signal. In an OpenClaw session, direct the Owner to the /pd-pain command (it binds the real session automatically). From outside a session, use `pd pain record --session <id>`. Never write `.state/.pain_flag` and never use legacy write_pain_flag tooling.
|
|
4
4
|
disable-model-invocation: false
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Pain Signal (Runtime V2)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Session evidence is what makes a pain diagnosable. A pain recorded without a
|
|
10
|
+
session carries no trajectory evidence, its candidates score below the
|
|
11
|
+
admission threshold (0.5) and are gated as `needs_evidence` — the Owner's
|
|
12
|
+
report is stored, but nothing is internalized.
|
|
13
|
+
|
|
14
|
+
## In an OpenClaw session (preferred)
|
|
15
|
+
|
|
16
|
+
Ask the Owner to run the host command in the conversation where the pain
|
|
17
|
+
occurred:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
/pd-pain <describe the issue>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`/pd-pain` receives the authenticated current session from OpenClaw and
|
|
24
|
+
submits the session's trajectory evidence automatically. You cannot obtain a
|
|
25
|
+
trusted session ID yourself (none is injected into tool executions); never
|
|
26
|
+
guess, scan, or pick the "latest" session.
|
|
27
|
+
|
|
28
|
+
## Outside a session (CLI)
|
|
29
|
+
|
|
30
|
+
Bind an explicitly known session id recorded in this workspace:
|
|
10
31
|
|
|
11
32
|
```bash
|
|
12
|
-
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --json
|
|
33
|
+
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
13
34
|
```
|
|
14
35
|
|
|
36
|
+
- `--session <id>` is validated against the workspace trajectory: a missing
|
|
37
|
+
session fails with `session_not_found` before anything is written.
|
|
38
|
+
- Recording without `--session` is allowed as an unbound Owner report, but it
|
|
39
|
+
attaches no evidence and its candidates will likely be gated
|
|
40
|
+
(`needs_evidence`) by the admission gate — the CLI output says so explicitly.
|
|
41
|
+
|
|
15
42
|
## Forbidden
|
|
16
43
|
|
|
17
44
|
- Do not write `.state/.pain_flag` directly.
|
|
18
45
|
- Do not use `write_file`, shell redirection, `Set-Content`, `Out-File`, `node -e`, or any other file-writing method to create `.state/.pain_flag`.
|
|
19
46
|
- Do not use `write_pain_flag`. That was a legacy path.
|
|
47
|
+
- Do not guess, scan for, or infer a session ID. Use `/pd-pain` or an id the Owner provides.
|
|
20
48
|
|
|
21
49
|
## Verify
|
|
22
50
|
|
|
@@ -27,4 +55,8 @@ pd candidate list --workspace "<workspace>" --json
|
|
|
27
55
|
pd runtime flow show --workspace "<workspace>" --json
|
|
28
56
|
```
|
|
29
57
|
|
|
30
|
-
Success requires
|
|
58
|
+
Success requires admitted candidates, not merely generated ones: check
|
|
59
|
+
`admissionResults` for `admitted` decisions and non-empty `ledgerEntryIds`.
|
|
60
|
+
Candidates reported as `needs_evidence` or `deferred` were NOT internalized —
|
|
61
|
+
if all candidates are gated, re-record with `/pd-pain` or `--session` so the
|
|
62
|
+
diagnosis carries real trajectory evidence.
|
|
@@ -18,8 +18,11 @@ Automatic:
|
|
|
18
18
|
|
|
19
19
|
Manual:
|
|
20
20
|
```bash
|
|
21
|
-
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --json
|
|
21
|
+
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
22
22
|
```
|
|
23
|
+
`--session` binds the report to a recorded session (validated up front) so
|
|
24
|
+
diagnosis carries real trajectory evidence; without it the record is an
|
|
25
|
+
unbound Owner report with no evidence and candidates will likely be gated.
|
|
23
26
|
|
|
24
27
|
Forbidden:
|
|
25
28
|
- Do not write `.state/.pain_flag`.
|
|
@@ -10,15 +10,20 @@ disable-model-invocation: false
|
|
|
10
10
|
|
|
11
11
|
## Runtime V2 痛苦诊断
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
手动痛苦诊断(绑定已记录的会话,让诊断携带真实轨迹证据):
|
|
14
14
|
```bash
|
|
15
|
-
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --json
|
|
15
|
+
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
- 不带 `--session` 的记录是诚实的 unbound Owner 报告:没有轨迹证据,
|
|
19
|
+
候选大概率被准入阈值拦为 `needs_evidence` —— CLI 输出会明确警告。
|
|
20
|
+
- `--session <id>` 会先校验;会话不存在时以 `session_not_found` 失败,
|
|
21
|
+
不会写入任何内容。
|
|
22
|
+
|
|
18
23
|
成功标准:
|
|
19
24
|
- `status` 是 `succeeded`
|
|
20
|
-
- `
|
|
21
|
-
|
|
25
|
+
- 候选被**准入**而非仅被生成:检查 `admissionResults` /
|
|
26
|
+
`candidateOutcomes` 中的 `admitted` 决策和 `ledgerEntryIds` 非空
|
|
22
27
|
|
|
23
28
|
禁止:
|
|
24
29
|
- 不要写 `.state/.pain_flag`。
|
|
@@ -1,22 +1,47 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pd-pain-signal
|
|
3
|
-
description: 手动触发 Principles Disciple Runtime V2 痛苦诊断。用户报告 agent
|
|
3
|
+
description: 手动触发 Principles Disciple Runtime V2 痛苦诊断。用户报告 agent 卡住、循环、无响应,或要求记录/触发痛苦信号时使用。在 OpenClaw 会话中,引导 Owner 使用 /pd-pain 命令(自动绑定真实会话)。在会话外使用 `pd pain record --session <id>`。禁止写 `.state/.pain_flag`,禁止使用 legacy write_pain_flag 工具。
|
|
4
4
|
disable-model-invocation: false
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Pain Signal(Runtime V2)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
会话证据决定一条痛苦能否被诊断。未绑定会话的记录不携带任何轨迹证据,
|
|
10
|
+
候选 confidence 低于准入阈值(0.5),全部被 admission gate 拦为
|
|
11
|
+
`needs_evidence` —— Owner 的报告被保存,但不会进入内化。
|
|
12
|
+
|
|
13
|
+
## 在 OpenClaw 会话中(首选)
|
|
14
|
+
|
|
15
|
+
请 Owner 在发生问题的对话中运行主机命令:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
/pd-pain <描述问题>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`/pd-pain` 从 OpenClaw 取得经过认证的当前会话,并自动提交该会话的轨迹
|
|
22
|
+
证据。你自己无法取得可信的会话 ID(工具执行环境不会注入);禁止猜测、
|
|
23
|
+
扫描或挑选"最新"会话。
|
|
24
|
+
|
|
25
|
+
## 在会话外(CLI)
|
|
26
|
+
|
|
27
|
+
绑定一个明确已知、本工作区已记录的会话 ID:
|
|
10
28
|
|
|
11
29
|
```bash
|
|
12
|
-
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --json
|
|
30
|
+
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
13
31
|
```
|
|
14
32
|
|
|
33
|
+
- `--session <id>` 会先对工作区轨迹做校验:会话不存在时以
|
|
34
|
+
`session_not_found` 失败,不会写入任何内容。
|
|
35
|
+
- 不带 `--session` 的记录是允许的 unbound Owner 报告,但不附带证据,
|
|
36
|
+
候选大概率被 admission gate 拦为 `needs_evidence` —— CLI 输出会明确
|
|
37
|
+
提示这一点。
|
|
38
|
+
|
|
15
39
|
## 禁止
|
|
16
40
|
|
|
17
41
|
- 不要直接写 `.state/.pain_flag`。
|
|
18
42
|
- 不要用 `write_file`、shell 重定向、`Set-Content`、`Out-File`、`node -e` 或任何文件写入方式创建 `.state/.pain_flag`。
|
|
19
43
|
- 不要使用 `write_pain_flag`。这是 legacy 路径。
|
|
44
|
+
- 不要猜测、扫描或推断会话 ID。使用 `/pd-pain`,或使用 Owner 明确提供的 ID。
|
|
20
45
|
|
|
21
46
|
## 验证
|
|
22
47
|
|
|
@@ -27,4 +52,7 @@ pd candidate list --workspace "<workspace>" --json
|
|
|
27
52
|
pd runtime flow show --workspace "<workspace>" --json
|
|
28
53
|
```
|
|
29
54
|
|
|
30
|
-
|
|
55
|
+
成功标准是候选被**准入**(admitted),而不只是被生成:检查
|
|
56
|
+
`admissionResults` 中的 `admitted` 决策和 `ledgerEntryIds` 非空。
|
|
57
|
+
`needs_evidence` 或 `deferred` 的候选没有被内化 —— 若全部候选被拦截,
|
|
58
|
+
请用 `/pd-pain` 或 `--session` 重新记录,让诊断携带真实轨迹证据。
|
|
@@ -18,8 +18,10 @@ disable-model-invocation: false
|
|
|
18
18
|
|
|
19
19
|
手动入口:
|
|
20
20
|
```bash
|
|
21
|
-
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --json
|
|
21
|
+
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
22
22
|
```
|
|
23
|
+
`--session` 把报告绑定到已记录的会话(先校验),让诊断携带真实轨迹
|
|
24
|
+
证据;不带它则是无证据的 unbound Owner 报告,候选大概率被拦。
|
|
23
25
|
|
|
24
26
|
禁止入口:
|
|
25
27
|
- 不要写 `.state/.pain_flag`。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "principles-disciple",
|
|
3
3
|
"name": "Principles Disciple",
|
|
4
4
|
"description": "Principles Disciple is an AI Agent Governance System. Stop correcting the same AI behavior across sessions. Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.227.0",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onStartup": true,
|
|
8
8
|
"onCapabilities": [
|
package/plugin/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "principles-disciple",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.227.0",
|
|
4
4
|
"description": "Principles Disciple is an AI Agent Governance System. Stop correcting the same AI behavior across sessions. Turn repeated Agent corrections into Owner-approved, observable, reversible behavior principles.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -10,15 +10,22 @@ Use the `pd` CLI as the supported operator surface. Do not modify PD state files
|
|
|
10
10
|
|
|
11
11
|
## Runtime V2 Pain Diagnosis
|
|
12
12
|
|
|
13
|
-
Manual pain diagnosis
|
|
13
|
+
Manual pain diagnosis (bind a recorded session so diagnosis carries real
|
|
14
|
+
trajectory evidence):
|
|
14
15
|
```bash
|
|
15
|
-
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --json
|
|
16
|
+
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
16
17
|
```
|
|
17
18
|
|
|
19
|
+
- Without `--session` the record is an honest unbound Owner report: no
|
|
20
|
+
trajectory evidence, candidates likely gated (`needs_evidence`) by the
|
|
21
|
+
admission threshold — the CLI output warns about this.
|
|
22
|
+
- `--session <id>` is validated up front; a missing session fails with
|
|
23
|
+
`session_not_found` before anything is written.
|
|
24
|
+
|
|
18
25
|
Success requires:
|
|
19
26
|
- `status` is `succeeded`
|
|
20
|
-
- `
|
|
21
|
-
|
|
27
|
+
- candidates are ADMITTED, not merely generated: check `admissionResults` /
|
|
28
|
+
`candidateOutcomes` for `admitted` decisions and non-empty `ledgerEntryIds`
|
|
22
29
|
|
|
23
30
|
Forbidden:
|
|
24
31
|
- Do not write `.state/.pain_flag`.
|
|
@@ -1,22 +1,50 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pd-pain-signal
|
|
3
|
-
description: Manually trigger a Principles Disciple Runtime V2 pain diagnosis. Use this when the user reports the agent is stuck, looping, unresponsive, or asks to record/trigger a pain signal.
|
|
3
|
+
description: Manually trigger a Principles Disciple Runtime V2 pain diagnosis. Use this when the user reports the agent is stuck, looping, unresponsive, or asks to record/trigger a pain signal. In an OpenClaw session, direct the Owner to the /pd-pain command (it binds the real session automatically). From outside a session, use `pd pain record --session <id>`. Never write `.state/.pain_flag` and never use legacy write_pain_flag tooling.
|
|
4
4
|
disable-model-invocation: false
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Pain Signal (Runtime V2)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Session evidence is what makes a pain diagnosable. A pain recorded without a
|
|
10
|
+
session carries no trajectory evidence, its candidates score below the
|
|
11
|
+
admission threshold (0.5) and are gated as `needs_evidence` — the Owner's
|
|
12
|
+
report is stored, but nothing is internalized.
|
|
13
|
+
|
|
14
|
+
## In an OpenClaw session (preferred)
|
|
15
|
+
|
|
16
|
+
Ask the Owner to run the host command in the conversation where the pain
|
|
17
|
+
occurred:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
/pd-pain <describe the issue>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`/pd-pain` receives the authenticated current session from OpenClaw and
|
|
24
|
+
submits the session's trajectory evidence automatically. You cannot obtain a
|
|
25
|
+
trusted session ID yourself (none is injected into tool executions); never
|
|
26
|
+
guess, scan, or pick the "latest" session.
|
|
27
|
+
|
|
28
|
+
## Outside a session (CLI)
|
|
29
|
+
|
|
30
|
+
Bind an explicitly known session id recorded in this workspace:
|
|
10
31
|
|
|
11
32
|
```bash
|
|
12
|
-
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --json
|
|
33
|
+
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
13
34
|
```
|
|
14
35
|
|
|
36
|
+
- `--session <id>` is validated against the workspace trajectory: a missing
|
|
37
|
+
session fails with `session_not_found` before anything is written.
|
|
38
|
+
- Recording without `--session` is allowed as an unbound Owner report, but it
|
|
39
|
+
attaches no evidence and its candidates will likely be gated
|
|
40
|
+
(`needs_evidence`) by the admission gate — the CLI output says so explicitly.
|
|
41
|
+
|
|
15
42
|
## Forbidden
|
|
16
43
|
|
|
17
44
|
- Do not write `.state/.pain_flag` directly.
|
|
18
45
|
- Do not use `write_file`, shell redirection, `Set-Content`, `Out-File`, `node -e`, or any other file-writing method to create `.state/.pain_flag`.
|
|
19
46
|
- Do not use `write_pain_flag`. That was a legacy path.
|
|
47
|
+
- Do not guess, scan for, or infer a session ID. Use `/pd-pain` or an id the Owner provides.
|
|
20
48
|
|
|
21
49
|
## Verify
|
|
22
50
|
|
|
@@ -27,4 +55,8 @@ pd candidate list --workspace "<workspace>" --json
|
|
|
27
55
|
pd runtime flow show --workspace "<workspace>" --json
|
|
28
56
|
```
|
|
29
57
|
|
|
30
|
-
Success requires
|
|
58
|
+
Success requires admitted candidates, not merely generated ones: check
|
|
59
|
+
`admissionResults` for `admitted` decisions and non-empty `ledgerEntryIds`.
|
|
60
|
+
Candidates reported as `needs_evidence` or `deferred` were NOT internalized —
|
|
61
|
+
if all candidates are gated, re-record with `/pd-pain` or `--session` so the
|
|
62
|
+
diagnosis carries real trajectory evidence.
|
|
@@ -18,8 +18,11 @@ Automatic:
|
|
|
18
18
|
|
|
19
19
|
Manual:
|
|
20
20
|
```bash
|
|
21
|
-
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --json
|
|
21
|
+
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
22
22
|
```
|
|
23
|
+
`--session` binds the report to a recorded session (validated up front) so
|
|
24
|
+
diagnosis carries real trajectory evidence; without it the record is an
|
|
25
|
+
unbound Owner report with no evidence and candidates will likely be gated.
|
|
23
26
|
|
|
24
27
|
Forbidden:
|
|
25
28
|
- Do not write `.state/.pain_flag`.
|
|
@@ -10,15 +10,20 @@ disable-model-invocation: false
|
|
|
10
10
|
|
|
11
11
|
## Runtime V2 痛苦诊断
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
手动痛苦诊断(绑定已记录的会话,让诊断携带真实轨迹证据):
|
|
14
14
|
```bash
|
|
15
|
-
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --json
|
|
15
|
+
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
- 不带 `--session` 的记录是诚实的 unbound Owner 报告:没有轨迹证据,
|
|
19
|
+
候选大概率被准入阈值拦为 `needs_evidence` —— CLI 输出会明确警告。
|
|
20
|
+
- `--session <id>` 会先校验;会话不存在时以 `session_not_found` 失败,
|
|
21
|
+
不会写入任何内容。
|
|
22
|
+
|
|
18
23
|
成功标准:
|
|
19
24
|
- `status` 是 `succeeded`
|
|
20
|
-
- `
|
|
21
|
-
|
|
25
|
+
- 候选被**准入**而非仅被生成:检查 `admissionResults` /
|
|
26
|
+
`candidateOutcomes` 中的 `admitted` 决策和 `ledgerEntryIds` 非空
|
|
22
27
|
|
|
23
28
|
禁止:
|
|
24
29
|
- 不要写 `.state/.pain_flag`。
|
|
@@ -1,22 +1,47 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pd-pain-signal
|
|
3
|
-
description: 手动触发 Principles Disciple Runtime V2 痛苦诊断。用户报告 agent
|
|
3
|
+
description: 手动触发 Principles Disciple Runtime V2 痛苦诊断。用户报告 agent 卡住、循环、无响应,或要求记录/触发痛苦信号时使用。在 OpenClaw 会话中,引导 Owner 使用 /pd-pain 命令(自动绑定真实会话)。在会话外使用 `pd pain record --session <id>`。禁止写 `.state/.pain_flag`,禁止使用 legacy write_pain_flag 工具。
|
|
4
4
|
disable-model-invocation: false
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Pain Signal(Runtime V2)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
会话证据决定一条痛苦能否被诊断。未绑定会话的记录不携带任何轨迹证据,
|
|
10
|
+
候选 confidence 低于准入阈值(0.5),全部被 admission gate 拦为
|
|
11
|
+
`needs_evidence` —— Owner 的报告被保存,但不会进入内化。
|
|
12
|
+
|
|
13
|
+
## 在 OpenClaw 会话中(首选)
|
|
14
|
+
|
|
15
|
+
请 Owner 在发生问题的对话中运行主机命令:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
/pd-pain <描述问题>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`/pd-pain` 从 OpenClaw 取得经过认证的当前会话,并自动提交该会话的轨迹
|
|
22
|
+
证据。你自己无法取得可信的会话 ID(工具执行环境不会注入);禁止猜测、
|
|
23
|
+
扫描或挑选"最新"会话。
|
|
24
|
+
|
|
25
|
+
## 在会话外(CLI)
|
|
26
|
+
|
|
27
|
+
绑定一个明确已知、本工作区已记录的会话 ID:
|
|
10
28
|
|
|
11
29
|
```bash
|
|
12
|
-
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --json
|
|
30
|
+
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
13
31
|
```
|
|
14
32
|
|
|
33
|
+
- `--session <id>` 会先对工作区轨迹做校验:会话不存在时以
|
|
34
|
+
`session_not_found` 失败,不会写入任何内容。
|
|
35
|
+
- 不带 `--session` 的记录是允许的 unbound Owner 报告,但不附带证据,
|
|
36
|
+
候选大概率被 admission gate 拦为 `needs_evidence` —— CLI 输出会明确
|
|
37
|
+
提示这一点。
|
|
38
|
+
|
|
15
39
|
## 禁止
|
|
16
40
|
|
|
17
41
|
- 不要直接写 `.state/.pain_flag`。
|
|
18
42
|
- 不要用 `write_file`、shell 重定向、`Set-Content`、`Out-File`、`node -e` 或任何文件写入方式创建 `.state/.pain_flag`。
|
|
19
43
|
- 不要使用 `write_pain_flag`。这是 legacy 路径。
|
|
44
|
+
- 不要猜测、扫描或推断会话 ID。使用 `/pd-pain`,或使用 Owner 明确提供的 ID。
|
|
20
45
|
|
|
21
46
|
## 验证
|
|
22
47
|
|
|
@@ -27,4 +52,7 @@ pd candidate list --workspace "<workspace>" --json
|
|
|
27
52
|
pd runtime flow show --workspace "<workspace>" --json
|
|
28
53
|
```
|
|
29
54
|
|
|
30
|
-
|
|
55
|
+
成功标准是候选被**准入**(admitted),而不只是被生成:检查
|
|
56
|
+
`admissionResults` 中的 `admitted` 决策和 `ledgerEntryIds` 非空。
|
|
57
|
+
`needs_evidence` 或 `deferred` 的候选没有被内化 —— 若全部候选被拦截,
|
|
58
|
+
请用 `/pd-pain` 或 `--session` 重新记录,让诊断携带真实轨迹证据。
|
|
@@ -18,8 +18,10 @@ disable-model-invocation: false
|
|
|
18
18
|
|
|
19
19
|
手动入口:
|
|
20
20
|
```bash
|
|
21
|
-
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --json
|
|
21
|
+
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
22
22
|
```
|
|
23
|
+
`--session` 把报告绑定到已记录的会话(先校验),让诊断携带真实轨迹
|
|
24
|
+
证据;不带它则是无证据的 unbound Owner 报告,候选大概率被拦。
|
|
23
25
|
|
|
24
26
|
禁止入口:
|
|
25
27
|
- 不要写 `.state/.pain_flag`。
|