principles-disciple 1.245.2 → 2.0.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/dist/bundle.js +545 -528
- package/dist/governance-audit.js +211 -211
- package/dist/hooks/prompt-helpers.d.ts +10 -17
- package/dist/hooks/prompt-types.d.ts +1 -3
- package/dist/openclaw.plugin.json +1 -1
- package/dist/rulehost-evidence.js +221 -221
- package/dist/templates/langs/en/skills/pd-cli-operator/SKILL.md +8 -1
- package/dist/templates/langs/en/skills/pd-pain-signal/SKILL.md +15 -6
- package/dist/templates/langs/en/skills/pd-runtime-v2/SKILL.md +17 -5
- package/dist/templates/langs/zh/skills/pd-cli-operator/SKILL.md +5 -1
- package/dist/templates/langs/zh/skills/pd-pain-signal/SKILL.md +11 -5
- package/dist/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +12 -4
- package/dist/utils/retry.d.ts +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/templates/langs/en/skills/pd-cli-operator/SKILL.md +8 -1
- package/templates/langs/en/skills/pd-pain-signal/SKILL.md +15 -6
- package/templates/langs/en/skills/pd-runtime-v2/SKILL.md +17 -5
- package/templates/langs/zh/skills/pd-cli-operator/SKILL.md +5 -1
- package/templates/langs/zh/skills/pd-pain-signal/SKILL.md +11 -5
- package/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +12 -4
|
@@ -20,7 +20,14 @@ pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --s
|
|
|
20
20
|
trajectory evidence, candidates likely gated (`needs_evidence`) by the
|
|
21
21
|
admission threshold — the CLI output warns about this.
|
|
22
22
|
- `--session <id>` is validated up front; a missing session fails with
|
|
23
|
-
`session_not_found` before anything is written.
|
|
23
|
+
`session_not_found` before anything is written. When the binding is
|
|
24
|
+
verified but the trajectory evidence is empty or unreadable, the record
|
|
25
|
+
degrades honestly to bound + evidence-unavailable and the admission gate
|
|
26
|
+
decides — no evidence is fabricated.
|
|
27
|
+
- A successful command returning a `painId` is only a record receipt; whether
|
|
28
|
+
the diagnosis produced candidates and whether they were admitted is decided
|
|
29
|
+
by `candidateIds` / `admissionResults` / `ledgerEntryIds` in the JSON
|
|
30
|
+
output. Activation is a separate stage that follows Owner approval.
|
|
24
31
|
|
|
25
32
|
Success requires:
|
|
26
33
|
- `status` is `succeeded`
|
|
@@ -6,10 +6,11 @@ disable-model-invocation: false
|
|
|
6
6
|
|
|
7
7
|
# Pain Signal (Runtime V2)
|
|
8
8
|
|
|
9
|
-
Session evidence is what
|
|
10
|
-
session
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
Session evidence is what lets a diagnosis carry real trajectory evidence. A
|
|
10
|
+
pain recorded without a session is a legal unbound Owner report: it carries no
|
|
11
|
+
trajectory evidence, its diagnosis confidence tends to be low, and its
|
|
12
|
+
candidates are likely gated as `needs_evidence` by the admission gate — the
|
|
13
|
+
Owner's report is stored, but usually nothing is internalized.
|
|
13
14
|
|
|
14
15
|
## In an OpenClaw session (preferred)
|
|
15
16
|
|
|
@@ -35,6 +36,11 @@ pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --s
|
|
|
35
36
|
|
|
36
37
|
- `--session <id>` is validated against the workspace trajectory: a missing
|
|
37
38
|
session fails with `session_not_found` before anything is written.
|
|
39
|
+
- When the `--session` binding is verified but the trajectory evidence is
|
|
40
|
+
empty or unreadable (the session is real), the record is submitted as an
|
|
41
|
+
honest bound + evidence-unavailable degrade: no evidence is fabricated and
|
|
42
|
+
the admission gate decides what empty evidence is worth, instead of a hard
|
|
43
|
+
refusal.
|
|
38
44
|
- Recording without `--session` is allowed as an unbound Owner report, but it
|
|
39
45
|
attaches no evidence and its candidates will likely be gated
|
|
40
46
|
(`needs_evidence`) by the admission gate — the CLI output says so explicitly.
|
|
@@ -57,6 +63,9 @@ pd runtime flow show --workspace "<workspace>" --json
|
|
|
57
63
|
|
|
58
64
|
Success requires admitted candidates, not merely generated ones: check
|
|
59
65
|
`admissionResults` for `admitted` decisions and non-empty `ledgerEntryIds`.
|
|
66
|
+
A successful command returning a `painId` is only a record receipt — it does
|
|
67
|
+
not mean the diagnosis produced candidates or that anything was admitted.
|
|
60
68
|
Candidates reported as `needs_evidence` or `deferred` were NOT internalized —
|
|
61
|
-
if
|
|
62
|
-
diagnosis carries real trajectory evidence.
|
|
69
|
+
if candidates are gated, re-record with `/pd-pain` or `--session` so the
|
|
70
|
+
diagnosis carries real trajectory evidence. Activation is a separate stage
|
|
71
|
+
that follows Owner approval; this flow never activates anything by itself.
|
|
@@ -21,8 +21,11 @@ Manual:
|
|
|
21
21
|
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
22
22
|
```
|
|
23
23
|
`--session` binds the report to a recorded session (validated up front) so
|
|
24
|
-
diagnosis carries real trajectory evidence;
|
|
25
|
-
|
|
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.
|
|
26
29
|
|
|
27
30
|
Forbidden:
|
|
28
31
|
- Do not write `.state/.pain_flag`.
|
|
@@ -59,16 +62,25 @@ pd candidate show --candidate-id "<candidateId>" --workspace "<workspace>" --jso
|
|
|
59
62
|
|
|
60
63
|
## Success Criteria
|
|
61
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
|
+
|
|
62
69
|
A diagnosis is successful only when:
|
|
63
70
|
- `status` is `succeeded`
|
|
64
71
|
- `candidateIds` is non-empty
|
|
65
|
-
- `
|
|
72
|
+
- `admissionResults` contains `admitted` decisions with non-empty
|
|
73
|
+
`ledgerEntryIds`
|
|
66
74
|
|
|
67
|
-
Task creation alone
|
|
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.
|
|
68
79
|
|
|
69
80
|
## If Manual Diagnosis Is Needed
|
|
70
81
|
|
|
71
82
|
1. Use `pd pain record`.
|
|
72
83
|
2. Inspect JSON output.
|
|
73
|
-
3. If `candidateIds` or `ledgerEntryIds` is empty,
|
|
84
|
+
3. If `candidateIds` or `ledgerEntryIds` is empty, or candidates are gated as
|
|
85
|
+
`needs_evidence` / `deferred`, treat it as not completed (not internalized).
|
|
74
86
|
4. Use `pd candidate list/show` and `pd runtime flow show` for follow-up.
|
|
@@ -18,7 +18,11 @@ pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --s
|
|
|
18
18
|
- 不带 `--session` 的记录是诚实的 unbound Owner 报告:没有轨迹证据,
|
|
19
19
|
候选大概率被准入阈值拦为 `needs_evidence` —— CLI 输出会明确警告。
|
|
20
20
|
- `--session <id>` 会先校验;会话不存在时以 `session_not_found` 失败,
|
|
21
|
-
|
|
21
|
+
不会写入任何内容。会话验证通过但轨迹证据为空或不可读时,按
|
|
22
|
+
bound + 证据不可用诚实降级提交,由 admission gate 评判,不会伪造证据。
|
|
23
|
+
- 命令成功返回 `painId` 只代表记录回执;诊断是否产出候选、候选是否被
|
|
24
|
+
准入,以 JSON 输出中的 `candidateIds` / `admissionResults` /
|
|
25
|
+
`ledgerEntryIds` 为准。激活是 Owner 批准之后的独立阶段。
|
|
22
26
|
|
|
23
27
|
成功标准:
|
|
24
28
|
- `status` 是 `succeeded`
|
|
@@ -6,9 +6,10 @@ disable-model-invocation: false
|
|
|
6
6
|
|
|
7
7
|
# Pain Signal(Runtime V2)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
`needs_evidence` —— Owner
|
|
9
|
+
会话证据决定诊断能否携带真实轨迹证据。未绑定会话的记录是合法的 unbound
|
|
10
|
+
Owner 报告:它不携带轨迹证据,诊断 confidence 通常偏低,候选大概率被
|
|
11
|
+
admission gate 拦为 `needs_evidence` —— Owner 的报告被保存,但通常不会进入
|
|
12
|
+
内化。
|
|
12
13
|
|
|
13
14
|
## 在 OpenClaw 会话中(首选)
|
|
14
15
|
|
|
@@ -32,6 +33,9 @@ pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --s
|
|
|
32
33
|
|
|
33
34
|
- `--session <id>` 会先对工作区轨迹做校验:会话不存在时以
|
|
34
35
|
`session_not_found` 失败,不会写入任何内容。
|
|
36
|
+
- `--session` 验证通过但轨迹证据为空或不可读(会话真实存在)时,记录按
|
|
37
|
+
bound + 证据不可用诚实降级提交:不伪造证据,由 admission gate 评判空
|
|
38
|
+
证据的价值,而不是直接拒绝。
|
|
35
39
|
- 不带 `--session` 的记录是允许的 unbound Owner 报告,但不附带证据,
|
|
36
40
|
候选大概率被 admission gate 拦为 `needs_evidence` —— CLI 输出会明确
|
|
37
41
|
提示这一点。
|
|
@@ -53,6 +57,8 @@ pd runtime flow show --workspace "<workspace>" --json
|
|
|
53
57
|
```
|
|
54
58
|
|
|
55
59
|
成功标准是候选被**准入**(admitted),而不只是被生成:检查
|
|
56
|
-
`admissionResults` 中的 `admitted` 决策和 `ledgerEntryIds`
|
|
57
|
-
|
|
60
|
+
`admissionResults` 中的 `admitted` 决策和 `ledgerEntryIds` 非空。命令成功
|
|
61
|
+
返回 `painId` 只代表记录回执,不代表诊断或准入成功。
|
|
62
|
+
`needs_evidence` 或 `deferred` 的候选没有被内化 —— 若候选被拦截,
|
|
58
63
|
请用 `/pd-pain` 或 `--session` 重新记录,让诊断携带真实轨迹证据。
|
|
64
|
+
激活(activation)是 Owner 批准之后的独立阶段,本流程不会直接产生激活。
|
|
@@ -21,7 +21,9 @@ disable-model-invocation: false
|
|
|
21
21
|
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
22
22
|
```
|
|
23
23
|
`--session` 把报告绑定到已记录的会话(先校验),让诊断携带真实轨迹
|
|
24
|
-
|
|
24
|
+
证据;会话验证通过但轨迹证据为空或不可读时,按 bound + 证据不可用诚实
|
|
25
|
+
降级提交,由 admission gate 评判;不带 `--session` 则是无证据的 unbound
|
|
26
|
+
Owner 报告(合法),候选大概率被拦。
|
|
25
27
|
|
|
26
28
|
禁止入口:
|
|
27
29
|
- 不要写 `.state/.pain_flag`。
|
|
@@ -58,16 +60,22 @@ pd candidate show --candidate-id "<candidateId>" --workspace "<workspace>" --jso
|
|
|
58
60
|
|
|
59
61
|
## 成功标准
|
|
60
62
|
|
|
63
|
+
一条痛苦的完整链路分四个阶段:记录回执(`painId`)→ 诊断(产出候选)→
|
|
64
|
+
准入(`admitted`,进入 ledger)→ Owner 批准与激活(activation)。
|
|
65
|
+
|
|
61
66
|
一次诊断只有在同时满足以下条件时才算成功:
|
|
62
67
|
- `status` 是 `succeeded`
|
|
63
68
|
- `candidateIds` 非空
|
|
64
|
-
- `ledgerEntryIds` 非空
|
|
69
|
+
- `admissionResults` 中出现 `admitted` 决策,且对应 `ledgerEntryIds` 非空
|
|
65
70
|
|
|
66
|
-
只创建 task
|
|
71
|
+
只创建 task、只生成候选或只有 ledger entry 都不算成功——没有 `admitted`
|
|
72
|
+
决策的候选并未被准入。激活是 Owner 决策之后的独立阶段,`pd pain record`
|
|
73
|
+
不会直接产生激活。
|
|
67
74
|
|
|
68
75
|
## 需要手动诊断时
|
|
69
76
|
|
|
70
77
|
1. 使用 `pd pain record`。
|
|
71
78
|
2. 检查 JSON 输出。
|
|
72
|
-
3. 如果 `candidateIds` 或 `ledgerEntryIds`
|
|
79
|
+
3. 如果 `candidateIds` 或 `ledgerEntryIds` 为空,或候选被拦为
|
|
80
|
+
`needs_evidence` / `deferred`,视为未完成(未内化)。
|
|
73
81
|
4. 用 `pd candidate list/show` 和 `pd runtime flow show` 继续排查。
|
package/dist/utils/retry.d.ts
CHANGED
|
@@ -168,7 +168,7 @@ export declare function clampTimeout(ms: number): number;
|
|
|
168
168
|
* This is the primary function used by WorkflowManager.
|
|
169
169
|
*
|
|
170
170
|
* @param dataSource - Source for historical duration data
|
|
171
|
-
* @param workflowType - e.g. '
|
|
171
|
+
* @param workflowType - e.g. 'correction-observer'
|
|
172
172
|
* @param defaultTimeout - Fallback when insufficient data (from spec)
|
|
173
173
|
* @returns Computed timeout in milliseconds
|
|
174
174
|
*/
|
package/openclaw.plugin.json
CHANGED
|
@@ -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": "
|
|
5
|
+
"version": "2.0.0",
|
|
6
6
|
"activation": {
|
|
7
7
|
"onStartup": true,
|
|
8
8
|
"onCapabilities": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "principles-disciple",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.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",
|
|
@@ -20,7 +20,14 @@ pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --s
|
|
|
20
20
|
trajectory evidence, candidates likely gated (`needs_evidence`) by the
|
|
21
21
|
admission threshold — the CLI output warns about this.
|
|
22
22
|
- `--session <id>` is validated up front; a missing session fails with
|
|
23
|
-
`session_not_found` before anything is written.
|
|
23
|
+
`session_not_found` before anything is written. When the binding is
|
|
24
|
+
verified but the trajectory evidence is empty or unreadable, the record
|
|
25
|
+
degrades honestly to bound + evidence-unavailable and the admission gate
|
|
26
|
+
decides — no evidence is fabricated.
|
|
27
|
+
- A successful command returning a `painId` is only a record receipt; whether
|
|
28
|
+
the diagnosis produced candidates and whether they were admitted is decided
|
|
29
|
+
by `candidateIds` / `admissionResults` / `ledgerEntryIds` in the JSON
|
|
30
|
+
output. Activation is a separate stage that follows Owner approval.
|
|
24
31
|
|
|
25
32
|
Success requires:
|
|
26
33
|
- `status` is `succeeded`
|
|
@@ -6,10 +6,11 @@ disable-model-invocation: false
|
|
|
6
6
|
|
|
7
7
|
# Pain Signal (Runtime V2)
|
|
8
8
|
|
|
9
|
-
Session evidence is what
|
|
10
|
-
session
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
Session evidence is what lets a diagnosis carry real trajectory evidence. A
|
|
10
|
+
pain recorded without a session is a legal unbound Owner report: it carries no
|
|
11
|
+
trajectory evidence, its diagnosis confidence tends to be low, and its
|
|
12
|
+
candidates are likely gated as `needs_evidence` by the admission gate — the
|
|
13
|
+
Owner's report is stored, but usually nothing is internalized.
|
|
13
14
|
|
|
14
15
|
## In an OpenClaw session (preferred)
|
|
15
16
|
|
|
@@ -35,6 +36,11 @@ pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --s
|
|
|
35
36
|
|
|
36
37
|
- `--session <id>` is validated against the workspace trajectory: a missing
|
|
37
38
|
session fails with `session_not_found` before anything is written.
|
|
39
|
+
- When the `--session` binding is verified but the trajectory evidence is
|
|
40
|
+
empty or unreadable (the session is real), the record is submitted as an
|
|
41
|
+
honest bound + evidence-unavailable degrade: no evidence is fabricated and
|
|
42
|
+
the admission gate decides what empty evidence is worth, instead of a hard
|
|
43
|
+
refusal.
|
|
38
44
|
- Recording without `--session` is allowed as an unbound Owner report, but it
|
|
39
45
|
attaches no evidence and its candidates will likely be gated
|
|
40
46
|
(`needs_evidence`) by the admission gate — the CLI output says so explicitly.
|
|
@@ -57,6 +63,9 @@ pd runtime flow show --workspace "<workspace>" --json
|
|
|
57
63
|
|
|
58
64
|
Success requires admitted candidates, not merely generated ones: check
|
|
59
65
|
`admissionResults` for `admitted` decisions and non-empty `ledgerEntryIds`.
|
|
66
|
+
A successful command returning a `painId` is only a record receipt — it does
|
|
67
|
+
not mean the diagnosis produced candidates or that anything was admitted.
|
|
60
68
|
Candidates reported as `needs_evidence` or `deferred` were NOT internalized —
|
|
61
|
-
if
|
|
62
|
-
diagnosis carries real trajectory evidence.
|
|
69
|
+
if candidates are gated, re-record with `/pd-pain` or `--session` so the
|
|
70
|
+
diagnosis carries real trajectory evidence. Activation is a separate stage
|
|
71
|
+
that follows Owner approval; this flow never activates anything by itself.
|
|
@@ -21,8 +21,11 @@ Manual:
|
|
|
21
21
|
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
22
22
|
```
|
|
23
23
|
`--session` binds the report to a recorded session (validated up front) so
|
|
24
|
-
diagnosis carries real trajectory evidence;
|
|
25
|
-
|
|
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.
|
|
26
29
|
|
|
27
30
|
Forbidden:
|
|
28
31
|
- Do not write `.state/.pain_flag`.
|
|
@@ -59,16 +62,25 @@ pd candidate show --candidate-id "<candidateId>" --workspace "<workspace>" --jso
|
|
|
59
62
|
|
|
60
63
|
## Success Criteria
|
|
61
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
|
+
|
|
62
69
|
A diagnosis is successful only when:
|
|
63
70
|
- `status` is `succeeded`
|
|
64
71
|
- `candidateIds` is non-empty
|
|
65
|
-
- `
|
|
72
|
+
- `admissionResults` contains `admitted` decisions with non-empty
|
|
73
|
+
`ledgerEntryIds`
|
|
66
74
|
|
|
67
|
-
Task creation alone
|
|
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.
|
|
68
79
|
|
|
69
80
|
## If Manual Diagnosis Is Needed
|
|
70
81
|
|
|
71
82
|
1. Use `pd pain record`.
|
|
72
83
|
2. Inspect JSON output.
|
|
73
|
-
3. If `candidateIds` or `ledgerEntryIds` is empty,
|
|
84
|
+
3. If `candidateIds` or `ledgerEntryIds` is empty, or candidates are gated as
|
|
85
|
+
`needs_evidence` / `deferred`, treat it as not completed (not internalized).
|
|
74
86
|
4. Use `pd candidate list/show` and `pd runtime flow show` for follow-up.
|
|
@@ -18,7 +18,11 @@ pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --s
|
|
|
18
18
|
- 不带 `--session` 的记录是诚实的 unbound Owner 报告:没有轨迹证据,
|
|
19
19
|
候选大概率被准入阈值拦为 `needs_evidence` —— CLI 输出会明确警告。
|
|
20
20
|
- `--session <id>` 会先校验;会话不存在时以 `session_not_found` 失败,
|
|
21
|
-
|
|
21
|
+
不会写入任何内容。会话验证通过但轨迹证据为空或不可读时,按
|
|
22
|
+
bound + 证据不可用诚实降级提交,由 admission gate 评判,不会伪造证据。
|
|
23
|
+
- 命令成功返回 `painId` 只代表记录回执;诊断是否产出候选、候选是否被
|
|
24
|
+
准入,以 JSON 输出中的 `candidateIds` / `admissionResults` /
|
|
25
|
+
`ledgerEntryIds` 为准。激活是 Owner 批准之后的独立阶段。
|
|
22
26
|
|
|
23
27
|
成功标准:
|
|
24
28
|
- `status` 是 `succeeded`
|
|
@@ -6,9 +6,10 @@ disable-model-invocation: false
|
|
|
6
6
|
|
|
7
7
|
# Pain Signal(Runtime V2)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
`needs_evidence` —— Owner
|
|
9
|
+
会话证据决定诊断能否携带真实轨迹证据。未绑定会话的记录是合法的 unbound
|
|
10
|
+
Owner 报告:它不携带轨迹证据,诊断 confidence 通常偏低,候选大概率被
|
|
11
|
+
admission gate 拦为 `needs_evidence` —— Owner 的报告被保存,但通常不会进入
|
|
12
|
+
内化。
|
|
12
13
|
|
|
13
14
|
## 在 OpenClaw 会话中(首选)
|
|
14
15
|
|
|
@@ -32,6 +33,9 @@ pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --s
|
|
|
32
33
|
|
|
33
34
|
- `--session <id>` 会先对工作区轨迹做校验:会话不存在时以
|
|
34
35
|
`session_not_found` 失败,不会写入任何内容。
|
|
36
|
+
- `--session` 验证通过但轨迹证据为空或不可读(会话真实存在)时,记录按
|
|
37
|
+
bound + 证据不可用诚实降级提交:不伪造证据,由 admission gate 评判空
|
|
38
|
+
证据的价值,而不是直接拒绝。
|
|
35
39
|
- 不带 `--session` 的记录是允许的 unbound Owner 报告,但不附带证据,
|
|
36
40
|
候选大概率被 admission gate 拦为 `needs_evidence` —— CLI 输出会明确
|
|
37
41
|
提示这一点。
|
|
@@ -53,6 +57,8 @@ pd runtime flow show --workspace "<workspace>" --json
|
|
|
53
57
|
```
|
|
54
58
|
|
|
55
59
|
成功标准是候选被**准入**(admitted),而不只是被生成:检查
|
|
56
|
-
`admissionResults` 中的 `admitted` 决策和 `ledgerEntryIds`
|
|
57
|
-
|
|
60
|
+
`admissionResults` 中的 `admitted` 决策和 `ledgerEntryIds` 非空。命令成功
|
|
61
|
+
返回 `painId` 只代表记录回执,不代表诊断或准入成功。
|
|
62
|
+
`needs_evidence` 或 `deferred` 的候选没有被内化 —— 若候选被拦截,
|
|
58
63
|
请用 `/pd-pain` 或 `--session` 重新记录,让诊断携带真实轨迹证据。
|
|
64
|
+
激活(activation)是 Owner 批准之后的独立阶段,本流程不会直接产生激活。
|
|
@@ -21,7 +21,9 @@ disable-model-invocation: false
|
|
|
21
21
|
pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --session "<session-id>" --json
|
|
22
22
|
```
|
|
23
23
|
`--session` 把报告绑定到已记录的会话(先校验),让诊断携带真实轨迹
|
|
24
|
-
|
|
24
|
+
证据;会话验证通过但轨迹证据为空或不可读时,按 bound + 证据不可用诚实
|
|
25
|
+
降级提交,由 admission gate 评判;不带 `--session` 则是无证据的 unbound
|
|
26
|
+
Owner 报告(合法),候选大概率被拦。
|
|
25
27
|
|
|
26
28
|
禁止入口:
|
|
27
29
|
- 不要写 `.state/.pain_flag`。
|
|
@@ -58,16 +60,22 @@ pd candidate show --candidate-id "<candidateId>" --workspace "<workspace>" --jso
|
|
|
58
60
|
|
|
59
61
|
## 成功标准
|
|
60
62
|
|
|
63
|
+
一条痛苦的完整链路分四个阶段:记录回执(`painId`)→ 诊断(产出候选)→
|
|
64
|
+
准入(`admitted`,进入 ledger)→ Owner 批准与激活(activation)。
|
|
65
|
+
|
|
61
66
|
一次诊断只有在同时满足以下条件时才算成功:
|
|
62
67
|
- `status` 是 `succeeded`
|
|
63
68
|
- `candidateIds` 非空
|
|
64
|
-
- `ledgerEntryIds` 非空
|
|
69
|
+
- `admissionResults` 中出现 `admitted` 决策,且对应 `ledgerEntryIds` 非空
|
|
65
70
|
|
|
66
|
-
只创建 task
|
|
71
|
+
只创建 task、只生成候选或只有 ledger entry 都不算成功——没有 `admitted`
|
|
72
|
+
决策的候选并未被准入。激活是 Owner 决策之后的独立阶段,`pd pain record`
|
|
73
|
+
不会直接产生激活。
|
|
67
74
|
|
|
68
75
|
## 需要手动诊断时
|
|
69
76
|
|
|
70
77
|
1. 使用 `pd pain record`。
|
|
71
78
|
2. 检查 JSON 输出。
|
|
72
|
-
3. 如果 `candidateIds` 或 `ledgerEntryIds`
|
|
79
|
+
3. 如果 `candidateIds` 或 `ledgerEntryIds` 为空,或候选被拦为
|
|
80
|
+
`needs_evidence` / `deferred`,视为未完成(未内化)。
|
|
73
81
|
4. 用 `pd candidate list/show` 和 `pd runtime flow show` 继续排查。
|