doukui 0.8.0 → 0.9.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/README.en.md +85 -18
- package/README.md +8 -8
- package/bin/commands/help.js +2 -0
- package/bin/commands/plan-lint.js +105 -0
- package/bin/commands/verify.js +263 -0
- package/bin/doukui.js +2 -0
- package/package.json +1 -1
- package/plugins/core/hook-session-start/index.js +1 -1
- package/plugins/core/hook-skill-gate/index.js +64 -15
- package/plugins/core/hook-skill-gate/plugin.json +1 -1
- package/plugins/core/skill-agent-dispatcher/cleanup-reference.md +7 -28
- package/plugins/core/skill-agent-dispatcher/monitoring-reference.md +5 -177
- package/plugins/core/skill-agent-dispatcher/plugin.json +1 -1
- package/plugins/core/skill-agent-dispatcher/recovery-reference.md +99 -58
- package/plugins/core/skill-agent-dispatcher/roles-reference.md +9 -22
- package/plugins/core/skill-agent-dispatcher/skill.md +112 -524
- package/plugins/core/skill-agentic-loop/mirror-rules.md +15 -3
- package/plugins/core/skill-agentic-loop/plugin.json +1 -1
- package/plugins/core/skill-agentic-loop/skill.md +123 -324
- package/plugins/core/skill-batch-task-creator/plugin.json +1 -1
- package/plugins/core/skill-checklist/skill.md +15 -141
- package/plugins/core/skill-completion-report/plugin.json +1 -1
- package/plugins/core/skill-doukui-plan/plugin.json +1 -1
- package/plugins/core/skill-doukui-plan/skill.md +22 -22
- package/plugins/core/skill-experience-logger/plugin.json +1 -1
- package/plugins/core/skill-human-checkpoint/skill.md +1 -0
- package/plugins/core/skill-split-work-package/plugin.json +1 -1
- package/plugins/core/skill-task-creator/plugin.json +1 -1
- package/plugins/core/skill-task-creator/skill.md +1 -139
- package/plugins/core/skill-workflow-orchestrator/plugin.json +1 -1
- package/plugins/plugin-registry.json +0 -36
- package/plugins/runtime/harness-build.js +5 -5
- package/plugins/runtime/plan-reader.js +21 -3
- package/plugins/runtime/resolve-plugin-path.js +2 -2
- package/plugins/contracts/capabilities.js +0 -268
- package/plugins/core/provider-memory-store/index.js +0 -510
- package/plugins/core/provider-memory-store/plugin.json +0 -9
- package/plugins/core/provider-state-store/index.js +0 -244
- package/plugins/core/provider-state-store/plugin.json +0 -9
- package/plugins/core/provider-watchdog/assets/daemon-config.template.json +0 -32
- package/plugins/core/provider-watchdog/assets/lib/watchdog-multi-window.js +0 -676
- package/plugins/core/provider-watchdog/assets/watchdog.js +0 -754
- package/plugins/core/provider-watchdog/index.js +0 -151
- package/plugins/core/provider-watchdog/plugin.json +0 -13
- package/plugins/core/skill-agent-dispatcher/daemon-helpers-reference.md +0 -249
- package/plugins/core/skill-watchdog-manager/plugin.json +0 -10
- package/plugins/core/skill-watchdog-manager/skill.md +0 -143
- package/plugins/core/validator-doc-sync/index.js +0 -248
- package/plugins/core/validator-doc-sync/plugin.json +0 -12
- package/plugins/core/validator-work-package/index.js +0 -300
- package/plugins/core/validator-work-package/plugin.json +0 -12
- package/plugins/runtime/audit-logger.js +0 -311
- package/plugins/runtime/build-cli.js +0 -89
- package/plugins/runtime/event-bus.js +0 -207
- package/plugins/runtime/hook-dispatcher.js +0 -315
- package/plugins/runtime/plugin-loader.js +0 -798
- package/plugins/runtime/plugin-trust.js +0 -182
- package/plugins/runtime/sandbox-context.js +0 -235
- package/plugins/runtime/sandbox-manager.js +0 -609
- package/plugins/runtime/sandbox-worker.js +0 -215
- package/plugins/runtime/text-tokenize.js +0 -24
- package/plugins/runtime/validator-pipeline.js +0 -475
|
@@ -7,6 +7,18 @@
|
|
|
7
7
|
> 与阈值默认值的**唯一真相源**,阈值数字自持于本文件。skill.md 是行为正文(流程编排 + Act 委托)。
|
|
8
8
|
> 修改判定规则或默认阈值:**直接改本文件**——不存在 JS 判定代码镜像,也没有 CI 镜像锁。
|
|
9
9
|
|
|
10
|
+
## 阈值默认值(唯一自持)
|
|
11
|
+
|
|
12
|
+
loop 的全部阈值数字只在本表定义,skill.md Step 1 只引用不复制。用户可在触发 skill 时随参数传入、或在 P1 确认时覆盖任一项,覆盖值写入 Step 2 的 loop 记录;未指定取本表默认值。
|
|
13
|
+
|
|
14
|
+
| 阈值 | 默认值 | 含义 |
|
|
15
|
+
|------|--------|------|
|
|
16
|
+
| `max_iterations` | 6 | 轮次上限 |
|
|
17
|
+
| `max_round_time_ms` | 600000 | 单轮最长时间(10 分钟) |
|
|
18
|
+
| `max_wall_time_ms` | 3600000 | 总墙钟上限(1 小时) |
|
|
19
|
+
| `divergence_threshold` | 3 | 连续 N 轮 proximity 无进展即判发散 |
|
|
20
|
+
| `proximity_goal` | 0.9 | 达成判定阈值 |
|
|
21
|
+
|
|
10
22
|
## 主循环骨架
|
|
11
23
|
|
|
12
24
|
**Claude 循环执行 Observe→Think→Act→Reflect→Decide 一轮,按 verdict 分流**。判定规则即下方各步规则框(本文件是唯一真相源)。
|
|
@@ -98,7 +110,7 @@ while rounds < safetyMaxRounds:
|
|
|
98
110
|
|
|
99
111
|
**沉淀**(loop 关闭时,achieved / diverged / timeout 均执行):
|
|
100
112
|
1. 把本次 loop 的 🔴陷阱 / env-fact / 结转提示 从 `PROGRESS.md` history 提炼为条目
|
|
101
|
-
2. 追加到 `.claude/agents/memories/lead.md`(目录为
|
|
113
|
+
2. 追加到 `.claude/agents/memories/lead.md`(目录为 doukui 记忆约定目录;文件不存在则创建):
|
|
102
114
|
```
|
|
103
115
|
## {日期} {loopId} {主题}
|
|
104
116
|
- <事实一行:现象 + 根因/规避>
|
|
@@ -137,7 +149,7 @@ while rounds < safetyMaxRounds:
|
|
|
137
149
|
- `divergenceStreak`:从 history 末尾数连续多少轮 proximity 不增(含回退)
|
|
138
150
|
- `diverged`:`divergenceStreak >= divergence_threshold`(默认 3);已达成态(proximity≥goal 且 allPassed)不算发散
|
|
139
151
|
- `failingDrivers`:由 `CheckResult.failedItems` 归一化产出,每项结构 `{wpId, category, item, reason}`(WP-176-1)
|
|
140
|
-
- **verify 结算纪律**:WP 结算时,checklist 项带 verify 声明 → Lead **先实跑命令看退出码再下判断**;命令失败即该项 fail,不凭 Teamee 自述放行;命令本身不可执行(PATH/环境)→ 记为环境 fail 并在 `failingDrivers`
|
|
152
|
+
- **verify 结算纪律**:WP 结算时,checklist 项带 verify 声明 → Lead **先实跑命令看退出码再下判断**;命令失败即该项 fail,不凭 Teamee 自述放行;命令本身不可执行(PATH/环境)→ 记为环境 fail 并在 `failingDrivers` 标注;verify 项可经 `doukui verify <plan路径> --wp WP-NNN` 批跑(退出码 0 全过 / 1 有失败 / 2 无 verify 项),命令失败口径不变
|
|
141
153
|
|
|
142
154
|
> **`failingDrivers` refine 通道(完整流转,修复偏差2)**——以下五步必须打通同一条链路:
|
|
143
155
|
> 1. **产出**:Reflect 把 `lastChecklist.failedItems` 归一化为 `failingDrivers`(写入 `EvalResult.failingDrivers`)。
|
|
@@ -150,7 +162,7 @@ while rounds < safetyMaxRounds:
|
|
|
150
162
|
|
|
151
163
|
## Step 3d: Decide 规则(熔断 > 发散 > 达成 > 上限 > 继续)
|
|
152
164
|
优先级 **熔断 > 发散 > 达成 > 上限 > 继续**(「达成」上提到「上限」之前——修复末轮 `iteration==max_iterations` 时 proximity 已达标却被抢判 `timeout` 的 bug:末轮达标应判 `achieved`,未达标才判 `timeout` 兜底):
|
|
153
|
-
1.
|
|
165
|
+
1. **熔断**:人主动全局终止(skill Step 6 通道)→ `circuit_broken`(人要求全局终止即触发)
|
|
154
166
|
2. **发散**:`divergenceStreak >= divergence_threshold` → `diverged`
|
|
155
167
|
3. **达成**:`allPassed && proximity >= proximity_goal && noPending && noFailed` → `achieved`
|
|
156
168
|
4. **上限**:`iteration >= max_iterations`、墙钟超 `max_wall_time_ms`、或单轮时长超 `max_round_time_ms` → `timeout`(兜底:本轮未达成才判 timeout)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "skill",
|
|
5
5
|
"description": "Use when user says \"自主循环\", \"agentic loop\", \"目标驱动执行\", or needs a goal-driven P2↔P3 self-closing loop that retries failed checklist items autonomously until achieved/diverged/timeout, then returns to P1 human-checkpoint or proceeds to P4",
|
|
6
6
|
"triggers": ["自主循环", "agentic loop", "目标驱动", "自闭环", "自动重试", "P2P3 loop", "skill-agentic-loop"],
|
|
7
|
-
"dependencies": [
|
|
7
|
+
"dependencies": [],
|
|
8
8
|
"provides": ["skill:agentic-loop"],
|
|
9
9
|
"metadata": {
|
|
10
10
|
"gatedByCode": true
|