@principles/workbuddy-adapter 0.2.9 → 0.2.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principles/workbuddy-adapter",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "WorkBuddy host adapter for Principles Disciple — implements the HostAdapter interface for WorkBuddy's Git Bash command-hook model (ADR-0020 third host, SPEC workbuddy-host-adapter v0.3.0).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -42,8 +42,8 @@
42
42
  "lint": "eslint \"src/**/*.ts\""
43
43
  },
44
44
  "dependencies": {
45
- "@principles/core": "^1.295.2",
46
- "@principles/host-runtime": "^0.12.1",
45
+ "@principles/core": "^1.296.0",
46
+ "@principles/host-runtime": "^0.13.0",
47
47
  "@principles/install-layout": "^0.4.0"
48
48
  },
49
49
  "devDependencies": {
@@ -20,6 +20,20 @@ description: 检查 WorkBuddy 中 PD 的运行状态、治理开关、worker 活
20
20
  3. 报告真实输出中的 `host.workbuddy` 开关、worker 模式和错误原因。worker 已注册不等于 worker 正在运行;插件存在不等于技能已加载;健康检查通过不等于某条痛苦已经完成诊断。
21
21
  4. 追踪具体问题时使用登记回执中的真实 ID,逐段核实登记、诊断、候选准入和治理状态。
22
22
 
23
+ ## 按需召回原则的历史痛苦
24
+
25
+ 当原则文本本身不够用——不确定它为何存在、触发边界是什么、或当前情况是否与当初的失败相似——使用 `pd pain recall`(同样只用上面的固定治理工作区)。原则已经清楚或任务与其历史无关时不要调用。
26
+
27
+ pd pain recall --principle-id "<规范原则 ID>" --context "<当前疑问>" --limit 3 --workspace "<用户主目录>/.workbuddy/pd-workspace" --json
28
+ pd pain recall --principle-id "<规范原则 ID>" --pain-id "<painId>" --workspace "<用户主目录>/.workbuddy/pd-workspace" --json
29
+
30
+ 结果判读:
31
+
32
+ - 只接受规范账本原则 ID(UUID);显示标题无法解析。`--pain-id` 只在该原则已验证的关联集合内筛选;candidateId/taskId/artifactId 永远不是 painId。
33
+ - 先看顶层 `status`:`ok` / `no_matches` / `partial` 是成功读取(退出码 0);`principle_not_found`、`pain_not_found`、`source_missing`、`source_unreadable` 退出码非 0——不要用相同参数无休止重试,保留真实错误并报告。
34
+ - 每条结果区分三类信息:痛苦记录(`pain.reason`、`pain.text`)、已保存的 `diagnoses`(模型生成——`isOriginalOwnerStatement` 恒为 `false`,绝不把诊断解释当作 Owner 原话)、`correctionEvidence`(唯一可能出现 Owner 原话的地方)。
35
+ - `availability` 区分 `not_recorded`(确实没有记录)与 `unreadable`(无法读取);顶层 `partial` 表示部分来源不可用——如实说明缺口,不要猜测,也不得用召回的历史覆盖当前任务的直接证据。
36
+
23
37
  ## 失败处理
24
38
 
25
39
  命令缺失、安装不完整或状态不可读取时,保留真实错误和下一步建议。需要停用时使用 `pd-control`;需要审阅候选时使用 `pd-review`;需要登记 Owner 反馈时使用 `pd-pain-signal`。