create-principles-disciple 1.75.0 → 1.77.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__/architecture-regression.test.js +3 -2
- package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
- package/core/dist/runtime-v2/__tests__/workspace-guidance-migration.test.d.ts +2 -0
- package/core/dist/runtime-v2/__tests__/workspace-guidance-migration.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/__tests__/workspace-guidance-migration.test.js +328 -0
- package/core/dist/runtime-v2/__tests__/workspace-guidance-migration.test.js.map +1 -0
- package/core/dist/runtime-v2/activation/index.d.ts +0 -2
- package/core/dist/runtime-v2/activation/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/activation/index.js +0 -1
- package/core/dist/runtime-v2/activation/index.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +6 -4
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +4 -2
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/types/event-types.d.ts +3 -24
- package/core/dist/runtime-v2/types/event-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/types/event-types.js +0 -10
- package/core/dist/runtime-v2/types/event-types.js.map +1 -1
- package/core/dist/runtime-v2/workspace-guidance-migration.d.ts +12 -0
- package/core/dist/runtime-v2/workspace-guidance-migration.d.ts.map +1 -0
- package/core/dist/runtime-v2/workspace-guidance-migration.js +193 -0
- package/core/dist/runtime-v2/workspace-guidance-migration.js.map +1 -0
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +0 -1
- package/dist/utils/env.js.map +1 -1
- package/package.json +1 -1
- package/plugin/dist/core/event-log.d.ts +1 -3
- package/plugin/dist/core/event-log.js +0 -6
- package/plugin/dist/core/migration.js +0 -1
- package/plugin/dist/core/path-resolver.js +0 -1
- package/plugin/dist/core/paths.d.ts +0 -1
- package/plugin/dist/core/paths.js +0 -1
- package/plugin/dist/core/workspace-guidance-migrator.d.ts +12 -0
- package/plugin/dist/core/workspace-guidance-migrator.js +141 -0
- package/plugin/dist/hooks/gate-block-helper.js +17 -20
- package/plugin/dist/hooks/gate.js +12 -58
- package/plugin/dist/hooks/prompt.d.ts +6 -0
- package/plugin/dist/hooks/prompt.js +1 -56
- package/plugin/dist/index.js +8 -12
- package/plugin/dist/types/event-types.d.ts +1 -1
- package/plugin/dist/utils/io.d.ts +0 -1
- package/plugin/dist/utils/io.js +0 -23
- package/plugin/templates/langs/en/core/AGENTS.md +5 -5
- package/plugin/templates/langs/en/core/BOOTSTRAP.md +1 -1
- package/plugin/templates/langs/en/principles/THINKING_OS.md +4 -3
- package/plugin/templates/langs/en/skills/admin/SKILL.md +2 -2
- package/plugin/templates/langs/en/skills/evolve-task/SKILL.md +2 -2
- package/plugin/templates/langs/en/skills/pd-grooming/SKILL.md +1 -1
- package/plugin/templates/langs/en/skills/pd-mentor/SKILL.md +1 -2
- package/plugin/templates/langs/en/skills/reflection/SKILL.md +2 -2
- package/plugin/templates/langs/en/skills/report/SKILL.md +1 -1
- package/plugin/templates/langs/zh/core/AGENTS.md +5 -5
- package/plugin/templates/langs/zh/core/BOOTSTRAP.md +1 -1
- package/plugin/templates/langs/zh/principles/THINKING_OS.md +4 -3
- package/plugin/templates/langs/zh/skills/admin/SKILL.md +2 -2
- package/plugin/templates/langs/zh/skills/evolve-task/SKILL.md +2 -2
- package/plugin/templates/langs/zh/skills/pd-grooming/SKILL.md +1 -1
- package/plugin/templates/langs/zh/skills/pd-mentor/SKILL.md +1 -2
- package/plugin/templates/langs/zh/skills/reflection/SKILL.md +2 -2
- package/plugin/templates/langs/zh/skills/report/SKILL.md +1 -1
- package/plugin/templates/workspace/.principles/THINKING_OS.md +4 -3
- package/templates/langs/en/core/AGENTS.md +7 -7
- package/templates/langs/en/core/BOOTSTRAP.md +1 -1
- package/templates/langs/en/principles/THINKING_OS.md +4 -3
- package/templates/langs/en/skills/admin/SKILL.md +2 -2
- package/templates/langs/en/skills/evolve-task/SKILL.md +3 -3
- package/templates/langs/en/skills/pd-grooming/SKILL.md +1 -1
- package/templates/langs/en/skills/pd-mentor/SKILL.md +1 -2
- package/templates/langs/en/skills/reflection/SKILL.md +2 -2
- package/templates/langs/en/skills/report/SKILL.md +1 -1
- package/templates/langs/zh/core/AGENTS.md +7 -7
- package/templates/langs/zh/core/BOOTSTRAP.md +1 -1
- package/templates/langs/zh/principles/THINKING_OS.md +4 -3
- package/templates/langs/zh/skills/admin/SKILL.md +2 -2
- package/templates/langs/zh/skills/evolve-task/SKILL.md +4 -4
- package/templates/langs/zh/skills/pd-grooming/SKILL.md +1 -1
- package/templates/langs/zh/skills/pd-mentor/SKILL.md +1 -2
- package/templates/langs/zh/skills/reflection/SKILL.md +2 -2
- package/templates/langs/zh/skills/report/SKILL.md +1 -1
- package/templates/workspace/.principles/THINKING_OS.md +3 -2
- package/core/dist/runtime-v2/__tests__/sqlite-confirm-first-state-store.test.d.ts +0 -2
- package/core/dist/runtime-v2/__tests__/sqlite-confirm-first-state-store.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/__tests__/sqlite-confirm-first-state-store.test.js +0 -148
- package/core/dist/runtime-v2/__tests__/sqlite-confirm-first-state-store.test.js.map +0 -1
- package/core/dist/runtime-v2/activation/sqlite-confirm-first-state-store.d.ts +0 -22
- package/core/dist/runtime-v2/activation/sqlite-confirm-first-state-store.d.ts.map +0 -1
- package/core/dist/runtime-v2/activation/sqlite-confirm-first-state-store.js +0 -136
- package/core/dist/runtime-v2/activation/sqlite-confirm-first-state-store.js.map +0 -1
- package/plugin/dist/core/confirm-first-gate.d.ts +0 -59
- package/plugin/dist/core/confirm-first-gate.js +0 -215
- package/plugin/templates/langs/en/skills/plan-script/SKILL.md +0 -32
- package/plugin/templates/langs/zh/skills/plan-script/SKILL.md +0 -32
- package/plugin/templates/workspace/PLAN.md +0 -2
- package/templates/langs/en/skills/plan-script/SKILL.md +0 -32
- package/templates/langs/zh/skills/plan-script/SKILL.md +0 -32
- package/templates/workspace/PLAN.md +0 -2
|
@@ -51,7 +51,7 @@ Output:
|
|
|
51
51
|
|
|
52
52
|
## Step 6: Delegate Planner (Movie Script Plan)
|
|
53
53
|
- Planner outputs Plan (steps/commands/metrics/rollback).
|
|
54
|
-
- Write plan to
|
|
54
|
+
- Write plan to a planning document for owner review.
|
|
55
55
|
- **Task Sync**:
|
|
56
56
|
- If `CLAUDE_CODE_TASK_LIST_ID` is set, you must convert the Plan's core steps to Native Tasks (via natural language command "Add task..." or related tools).
|
|
57
57
|
- If not set and in interactive mode, prompt user: "Recommend running `export CLAUDE_CODE_TASK_LIST_ID=task-$(date +%s)` to enable persistent task tracking."
|
|
@@ -59,7 +59,7 @@ Output:
|
|
|
59
59
|
- **Performance Evaluation**: After task completion, write to `.state/.verdict.json`. Format follows `@.principles/schemas/agent_verdict_schema.json`.
|
|
60
60
|
|
|
61
61
|
## Step 7: Delegate Implementer (Execution)
|
|
62
|
-
- Implementer
|
|
62
|
+
- Implementer executes according to the plan from Step 6. Any deviation must first be approved by updating the plan.
|
|
63
63
|
- **Performance Evaluation**: After task completion, write to `.state/.verdict.json` based on verification results. Format follows `@.principles/schemas/agent_verdict_schema.json`.
|
|
64
64
|
|
|
65
65
|
## Step 8: Delegate Reviewer (Review)
|
|
@@ -24,7 +24,7 @@ When performing cleanup operations, you MUST strictly adhere to the following wh
|
|
|
24
24
|
### 🌟 Core Assets
|
|
25
25
|
**These files must remain in the root directory. Do not touch:**
|
|
26
26
|
- `AGENTS.md`, `SOUL.md`, `HEARTBEAT.md`, `TOOLS.md`, `IDENTITY.md`, `USER.md`, `MEMORY.md`
|
|
27
|
-
- `README.md
|
|
27
|
+
- `README.md`
|
|
28
28
|
- `.principles/`, `.state/`
|
|
29
29
|
|
|
30
30
|
### 🎯 Targets for Grooming
|
|
@@ -185,7 +185,7 @@ For complex scenarios, combine multiple skills:
|
|
|
185
185
|
|
|
186
186
|
| Scenario | Combined Flow |
|
|
187
187
|
|----------|---------------|
|
|
188
|
-
| Major refactor | `/pd-evolve` → `
|
|
188
|
+
| Major refactor | `/pd-evolve` → `deductive-audit` → execute |
|
|
189
189
|
| System optimization | `/pd-status` → `evolve-system` → `root-cause` |
|
|
190
190
|
| Project review | `/pd-daily` → `/pd-okr` → `reflection-log` |
|
|
191
191
|
|
|
@@ -196,7 +196,6 @@ These skills are usually called automatically by the system, but advanced users
|
|
|
196
196
|
- `triage` - Issue triage
|
|
197
197
|
- `root-cause` - Root cause analysis
|
|
198
198
|
- `deductive-audit` - Deductive audit
|
|
199
|
-
- `plan-script` - Plan orchestration
|
|
200
199
|
- `reflection` - Metacognitive reflection
|
|
201
200
|
- `reflection-log` - Reflection logging
|
|
202
201
|
|
|
@@ -12,7 +12,7 @@ disable-model-invocation: false
|
|
|
12
12
|
Please execute the following reflection steps:
|
|
13
13
|
|
|
14
14
|
## 1. Status Scan
|
|
15
|
-
- **Goal**: What was our original objective? (Check
|
|
15
|
+
- **Goal**: What was our original objective? (Check early conversation context)
|
|
16
16
|
- **Status**: How much is completed now? Where are we stuck?
|
|
17
17
|
- **Cost**: We've consumed significant tokens. Is the output matching the cost?
|
|
18
18
|
|
|
@@ -37,4 +37,4 @@ If pain detected, must execute:
|
|
|
37
37
|
|
|
38
38
|
## 5. Recovery Plan
|
|
39
39
|
- Since we're about to compact context, how should we continue with the "cleanest" state?
|
|
40
|
-
- Update `
|
|
40
|
+
- Update `memory/.scratchpad.md`, mark current progress, ensure seamless continuation after compaction.
|
|
@@ -10,4 +10,4 @@ User (the boss) requests an immediate work report.
|
|
|
10
10
|
|
|
11
11
|
## Execution Action
|
|
12
12
|
1. Immediately delegate ``pd_spawn_agent(reporter)``.
|
|
13
|
-
2. Task description: "The boss wants to know the current situation. Please analyze current conversation context
|
|
13
|
+
2. Task description: "The boss wants to know the current situation. Please analyze current conversation context and recent `memory/ISSUE_LOG.md` to write an elegant report for the boss. Remember to check their profile first!"
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
基于**项目战场**中的相对路径进行决策:
|
|
18
18
|
|
|
19
19
|
- **项目最高战略**: `./memory/STRATEGY.md`
|
|
20
|
-
- **项目物理计划**: `./PLAN.md`
|
|
21
20
|
- **痛觉反射信号**: Runtime V2 `PainSignalBridge`(手动触发使用 `pd pain record`;`.state/.pain_flag` 仅为 legacy compatibility)
|
|
22
21
|
- **系统能力快照**: `./.state/SYSTEM_CAPABILITIES.json`
|
|
23
22
|
|
|
@@ -158,12 +157,13 @@
|
|
|
158
157
|
你默认处于架构师模式。
|
|
159
158
|
|
|
160
159
|
- **L1 (直接执行)**:单文件微调、文档维护 → 直接操作
|
|
161
|
-
- **L2 (委派协议)**:重大变更 →
|
|
160
|
+
- **L2 (委派协议)**:重大变更 → 建议先描述计划并获得 owner 确认后再执行
|
|
162
161
|
|
|
163
|
-
###
|
|
162
|
+
### 计划引导 (Planning Guidance)
|
|
164
163
|
|
|
165
|
-
-
|
|
166
|
-
-
|
|
164
|
+
- 对复杂任务,建议先起草计划文档并获得 owner 批准后再做大幅修改
|
|
165
|
+
- 这是行为建议,不是内置门禁 — PD 默认不强制"先计划后执行"
|
|
166
|
+
- 若 owner 批准的 RuleHost 规则强制了计划行为,该规则会自动生效
|
|
167
167
|
- **防止污染**:禁止将执行层细节写回战略文档
|
|
168
168
|
|
|
169
169
|
---
|
|
@@ -183,7 +183,7 @@ openclaw cron add --name "pd-grooming-daily" \
|
|
|
183
183
|
openclaw cron add --name "health-check" \
|
|
184
184
|
--every 4h \
|
|
185
185
|
--session main \
|
|
186
|
-
--system-event '环境健康检查:验证核心工具(rg, node, python
|
|
186
|
+
--system-event '环境健康检查:验证核心工具(rg, node, python)是否可用,检查工作区状态与实际进度是否一致。'
|
|
187
187
|
```
|
|
188
188
|
|
|
189
189
|
### 3. 战略对齐检查(每天上午 9 点)
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
<directive id="T-02" name="PHYSICAL_MEMORY_PERSISTENCE">
|
|
21
21
|
<trigger>在跨越多个文件进行推理、面临复杂的 Debug、或当对话上下文变得很长(>5 轮)时。</trigger>
|
|
22
|
-
<must>信任文件,而不是你的上下文窗口。你必须主动将中间结论、断点和后续步骤写入 `memory/.scratchpad.md
|
|
22
|
+
<must>信任文件,而不是你的上下文窗口。你必须主动将中间结论、断点和后续步骤写入 `memory/.scratchpad.md`。</must>
|
|
23
23
|
<forbidden>依赖你内部的“大脑记忆”来保持复杂状态,这些状态必然会被上下文压缩机制抹除。</forbidden>
|
|
24
24
|
</directive>
|
|
25
25
|
|
|
@@ -39,8 +39,9 @@
|
|
|
39
39
|
<!-- 执行与物理限制 (Execution & Physical Constraints) -->
|
|
40
40
|
<directive id="T-05" name="PHYSICAL_DEFENSE_AND_ORCHESTRATION">
|
|
41
41
|
<trigger>当被要求执行大型重构、多文件修改(>2 个文件)或架构变更时。</trigger>
|
|
42
|
-
<
|
|
43
|
-
<
|
|
42
|
+
<should>对复杂变更,先描述计划并获得 owner 确认后再执行。</should>
|
|
43
|
+
<must>限制爆炸半径。在修改任何代码后,必须运行金丝雀测试(例如 `npm test`、linters)以验证完整性。</must>
|
|
44
|
+
<forbidden>直接执行大规模非结构化变更,或跳过修改后的验证环节。</forbidden>
|
|
44
45
|
</directive>
|
|
45
46
|
|
|
46
47
|
<directive id="T-06" name="OCCAMS_RAZOR_MVC">
|
|
@@ -15,7 +15,7 @@ disable-model-invocation: true
|
|
|
15
15
|
### 1. `diagnose` (系统诊断)
|
|
16
16
|
**动作**: 检查“毛坯房”架构的完整性。
|
|
17
17
|
- **核心组件**: 检查 `.claude/hooks/hook_runner.py` 是否存在且可执行。
|
|
18
|
-
- **文档完整性**: 检查 `.principles/PROFILE.json
|
|
18
|
+
- **文档完整性**: 检查 `.principles/PROFILE.json` 等是否存在。
|
|
19
19
|
- **工具感知**: 检查 `.state/SYSTEM_CAPABILITIES.json`。若缺失,提示用户:"⚠️ 尚未进行工具链升级。建议运行 `/bootstrap-tools` 以大幅提升系统能力。"
|
|
20
20
|
- **记忆挂载**: 检查 `CLAUDE.md` 是否包含 `System Integration` 章节。
|
|
21
21
|
- **输出**: 生成一份健康报告,列出缺失或异常的项目。
|
|
@@ -23,7 +23,7 @@ disable-model-invocation: true
|
|
|
23
23
|
### 2. `repair` (系统修复)
|
|
24
24
|
**动作**:
|
|
25
25
|
- **配置恢复**: 如果 `PROFILE.json` 缺失或损坏,尝试从 `.claude/templates/PROFILE.json` 恢复。
|
|
26
|
-
- **结构补全**:
|
|
26
|
+
- **结构补全**: 确保工作区结构完整。
|
|
27
27
|
- **强制清理**: 删除 `.pain_flag`, `.verdict.json`, `.user_verdict.json`, `.pending_reflection` 等临时标记。
|
|
28
28
|
|
|
29
29
|
### 3. `reset` (强制重置)
|
|
@@ -51,7 +51,7 @@ disable-model-invocation: true
|
|
|
51
51
|
|
|
52
52
|
## Step 6: 委派 Planner(电影剧本计划)
|
|
53
53
|
- Planner 输出 Plan(步骤/命令/指标/回滚)。
|
|
54
|
-
-
|
|
54
|
+
- 将计划写入计划文档供 owner 审阅。
|
|
55
55
|
- **任务同步 (Task Sync)**:
|
|
56
56
|
- 如果 `CLAUDE_CODE_TASK_LIST_ID` 已设置,你必须将上述 Plan 的核心步骤直接转化为 Native Tasks(通过自然语言指令"Add task..."或相关工具)。
|
|
57
57
|
- 如果未设置且为交互模式,提示用户:"建议运行 `export CLAUDE_CODE_TASK_LIST_ID=task-$(date +%s)` 以启用持久化任务追踪。"
|
|
@@ -59,7 +59,7 @@ disable-model-invocation: true
|
|
|
59
59
|
- **绩效评估**: 任务完成后,写入 `.state/.verdict.json`。格式遵循 `@.principles/schemas/agent_verdict_schema.json`。
|
|
60
60
|
|
|
61
61
|
## Step 7: 委派 Implementer(执行)
|
|
62
|
-
- Implementer
|
|
62
|
+
- Implementer 按照 Step 6 的计划执行。任何偏离必须先更新计划并获得确认。
|
|
63
63
|
- **绩效评估**: 任务完成后,根据验证结果写入 `.state/.verdict.json`。格式遵循 `@.principles/schemas/agent_verdict_schema.json`。
|
|
64
64
|
|
|
65
65
|
## Step 8: 委派 Reviewer(审查)
|
|
@@ -24,7 +24,7 @@ description: 执行工作区"大扫除",将散落的临时文件归档或清
|
|
|
24
24
|
### 🌟 核心资产区 (Core Assets)
|
|
25
25
|
**这些文件必须留在根目录,不可触碰:**
|
|
26
26
|
- `AGENTS.md`, `SOUL.md`, `HEARTBEAT.md`, `TOOLS.md`, `IDENTITY.md`, `USER.md`, `MEMORY.md`
|
|
27
|
-
- `README.md
|
|
27
|
+
- `README.md`
|
|
28
28
|
- `.principles/`, `.state/`
|
|
29
29
|
|
|
30
30
|
### 🎯 可处理区 (Targets for Grooming)
|
|
@@ -185,7 +185,7 @@ disable-model-invocation: true
|
|
|
185
185
|
|
|
186
186
|
| 场景 | 组合流程 |
|
|
187
187
|
|------|----------|
|
|
188
|
-
| 大型重构 | `/pd-evolve` → `
|
|
188
|
+
| 大型重构 | `/pd-evolve` → `deductive-audit` → 执行 |
|
|
189
189
|
| 系统优化 | `/pd-status` → `evolve-system` → `root-cause` |
|
|
190
190
|
| 项目复盘 | `/pd-daily` → `/pd-okr` → `reflection-log` |
|
|
191
191
|
|
|
@@ -196,7 +196,6 @@ disable-model-invocation: true
|
|
|
196
196
|
- `triage` - 问题分诊
|
|
197
197
|
- `root-cause` - 根因分析
|
|
198
198
|
- `deductive-audit` - 演绎审计
|
|
199
|
-
- `plan-script` - 计划编排
|
|
200
199
|
- `reflection` - 元认知反思
|
|
201
200
|
- `reflection-log` - 反思落盘
|
|
202
201
|
|
|
@@ -12,7 +12,7 @@ disable-model-invocation: false
|
|
|
12
12
|
请执行以下反思步骤:
|
|
13
13
|
|
|
14
14
|
## 1. 现状扫描 (Status Scan)
|
|
15
|
-
- **Goal**: 我们最初的目标是什么?(
|
|
15
|
+
- **Goal**: 我们最初的目标是什么?(检查早期对话上下文)
|
|
16
16
|
- **Status**: 现在完成了多少?卡在哪里?
|
|
17
17
|
- **Cost**: 我们消耗了大量 Token,产出是否匹配?
|
|
18
18
|
|
|
@@ -37,4 +37,4 @@ disable-model-invocation: false
|
|
|
37
37
|
|
|
38
38
|
## 5. 恢复计划 (Recovery)
|
|
39
39
|
- 既然要压缩上下文,我们下一步该如何以“最干净”的状态继续?
|
|
40
|
-
- 更新 `
|
|
40
|
+
- 更新 `memory/.scratchpad.md`,标记当前进度,确保压缩后能无缝衔接。
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
<directive id="T-02" name="PHYSICAL_MEMORY_PERSISTENCE">
|
|
21
21
|
<trigger>在跨越多个文件进行推理、面临复杂的 Debug、或当对话上下文变得很长(>5 轮)时。</trigger>
|
|
22
|
-
<must>信任文件,而不是你的上下文窗口。你必须主动将中间结论、断点和后续步骤写入 `memory/.scratchpad.md
|
|
22
|
+
<must>信任文件,而不是你的上下文窗口。你必须主动将中间结论、断点和后续步骤写入 `memory/.scratchpad.md`。</must>
|
|
23
23
|
<forbidden>依赖你内部的“大脑记忆”来保持复杂状态,这些状态必然会被上下文压缩机制抹除。</forbidden>
|
|
24
24
|
</directive>
|
|
25
25
|
|
|
@@ -39,8 +39,9 @@
|
|
|
39
39
|
<!-- 执行与物理限制 (Execution & Physical Constraints) -->
|
|
40
40
|
<directive id="T-05" name="PHYSICAL_DEFENSE_AND_ORCHESTRATION">
|
|
41
41
|
<trigger>当被要求执行大型重构、多文件修改(>2 个文件)或架构变更时。</trigger>
|
|
42
|
-
<
|
|
43
|
-
<
|
|
42
|
+
<should>对复杂变更,先描述计划并获得 owner 确认后再执行。</should>
|
|
43
|
+
<must>限制爆炸半径。在修改任何代码后,必须运行金丝雀测试(例如 `npm test`、linters)以验证完整性。</must>
|
|
44
|
+
<forbidden>直接执行大规模非结构化变更,或跳过修改后的验证环节。</forbidden>
|
|
44
45
|
</directive>
|
|
45
46
|
|
|
46
47
|
<directive id="T-06" name="OCCAMS_RAZOR_MVC">
|
|
@@ -17,8 +17,7 @@ As Principles Disciple, you must distinguish between two physical spaces:
|
|
|
17
17
|
Make decisions based on relative paths in the **Project Battlefield**:
|
|
18
18
|
|
|
19
19
|
- **Strategic Focus**: `./memory/STRATEGY.md`
|
|
20
|
-
- **
|
|
21
|
-
- **Pain Signal**: `./.state/.pain_flag`
|
|
20
|
+
- **Pain Signal**: Runtime V2 `PainSignalBridge` (`pd pain record` for manual trigger; `.state/.pain_flag` is legacy compatibility only)
|
|
22
21
|
- **System Capabilities**: `./.state/SYSTEM_CAPABILITIES.json`
|
|
23
22
|
|
|
24
23
|
---
|
|
@@ -72,7 +71,7 @@ When you receive a heartbeat poll, don't just reply `HEARTBEAT_OK` every time. U
|
|
|
72
71
|
|
|
73
72
|
### What to Check (rotate through these):
|
|
74
73
|
|
|
75
|
-
- **Pain & Evolution**: Check
|
|
74
|
+
- **Pain & Evolution**: Check Runtime V2 diagnostics (`pd pain record`, candidates, ledger) and `EVOLUTION_QUEUE.json`; `.pain_flag` is legacy compatibility only
|
|
76
75
|
- **Strategic Alignment**: Compare against `CURRENT_FOCUS.md`
|
|
77
76
|
- **Environment Health**: Tool chain status, project root cleanliness
|
|
78
77
|
|
|
@@ -166,12 +165,13 @@ On platforms that support reactions (Discord, Slack), use emoji reactions natura
|
|
|
166
165
|
You default to architect mode.
|
|
167
166
|
|
|
168
167
|
- **L1 (Direct Execution)**: Single-file tweaks, doc maintenance → do it directly
|
|
169
|
-
- **L2 (Delegation Protocol)**: Major changes →
|
|
168
|
+
- **L2 (Delegation Protocol)**: Major changes → recommended to describe the plan and get owner confirmation before executing
|
|
170
169
|
|
|
171
|
-
###
|
|
170
|
+
### Planning Guidance
|
|
172
171
|
|
|
173
|
-
-
|
|
174
|
-
-
|
|
172
|
+
- For complex tasks, consider drafting a plan document and getting owner approval before making large changes
|
|
173
|
+
- This is a behavioral suggestion, not a built-in gate — PD does not enforce plan-before-action by default
|
|
174
|
+
- If an owner-approved RuleHost rule enforces planning behavior, that rule takes effect automatically
|
|
175
175
|
- **Prevent pollution**: Never write execution details back to strategic documents
|
|
176
176
|
|
|
177
177
|
---
|
|
@@ -183,7 +183,7 @@ openclaw cron add --name "pd-grooming-daily" \
|
|
|
183
183
|
openclaw cron add --name "health-check" \
|
|
184
184
|
--every 4h \
|
|
185
185
|
--session main \
|
|
186
|
-
--system-event 'Health check: Verify core tools (rg, node, python) are available. Check if
|
|
186
|
+
--system-event 'Health check: Verify core tools (rg, node, python) are available. Check if workspace state matches actual progress.'
|
|
187
187
|
```
|
|
188
188
|
|
|
189
189
|
### 3. Strategy Alignment (Daily at 9 AM)
|
|
@@ -19,7 +19,7 @@ LLMs are highly sensitive to XML tags; this structure is designed to boost instr
|
|
|
19
19
|
|
|
20
20
|
<directive id="T-02" name="PHYSICAL_MEMORY_PERSISTENCE">
|
|
21
21
|
<trigger>When reasoning across multiple files, facing complex debugging, or when the conversation context grows long (>5 turns).</trigger>
|
|
22
|
-
<must>TRUST FILES, NOT YOUR CONTEXT WINDOW. You MUST actively write your intermediate conclusions, breakpoints, and next steps to `memory/.scratchpad.md
|
|
22
|
+
<must>TRUST FILES, NOT YOUR CONTEXT WINDOW. You MUST actively write your intermediate conclusions, breakpoints, and next steps to `memory/.scratchpad.md`.</must>
|
|
23
23
|
<forbidden>Relying on your internal "brain memory" to hold complex state, which will inevitably be wiped by context compression.</forbidden>
|
|
24
24
|
</directive>
|
|
25
25
|
|
|
@@ -39,8 +39,9 @@ LLMs are highly sensitive to XML tags; this structure is designed to boost instr
|
|
|
39
39
|
<!-- 执行与物理限制 (Execution & Physical Constraints) -->
|
|
40
40
|
<directive id="T-05" name="PHYSICAL_DEFENSE_AND_ORCHESTRATION">
|
|
41
41
|
<trigger>When asked to perform a major refactoring, multi-file change (>2 files), or an architectural shift.</trigger>
|
|
42
|
-
<
|
|
43
|
-
<
|
|
42
|
+
<should>For complex changes, describe your plan and get owner confirmation before executing.</should>
|
|
43
|
+
<must>Limit your blast radius. After any code change, you MUST run canary tests (e.g., `npm test`, linters) to verify integrity.</must>
|
|
44
|
+
<forbidden>Executing large-scale unstructured changes directly, or skipping post-modification validation.</forbidden>
|
|
44
45
|
</directive>
|
|
45
46
|
|
|
46
47
|
<directive id="T-06" name="OCCAMS_RAZOR_MVC">
|
|
@@ -15,7 +15,7 @@ You are now the "Evolutionary System Administrator". Your responsibility is to m
|
|
|
15
15
|
### 1. `diagnose` (System Diagnosis)
|
|
16
16
|
**Action**: Check the integrity of the "bare-bones" architecture.
|
|
17
17
|
- **Core Components**: Check if `.claude/hooks/hook_runner.py` exists and is executable.
|
|
18
|
-
- **Documentation Integrity**: Check if `.principles/PROFILE.json
|
|
18
|
+
- **Documentation Integrity**: Check if `.principles/PROFILE.json` etc. exist.
|
|
19
19
|
- **Tool Awareness**: Check `.state/SYSTEM_CAPABILITIES.json`. If missing, prompt user: "⚠️ Toolchain upgrade not performed. Recommend running `/bootstrap-tools` to significantly enhance system capabilities."
|
|
20
20
|
- **Memory Mount**: Check if `CLAUDE.md` contains `System Integration` section.
|
|
21
21
|
- **Output**: Generate a health report listing missing or abnormal items.
|
|
@@ -23,7 +23,7 @@ You are now the "Evolutionary System Administrator". Your responsibility is to m
|
|
|
23
23
|
### 2. `repair` (System Repair)
|
|
24
24
|
**Action**:
|
|
25
25
|
- **Config Recovery**: If `PROFILE.json` is missing or corrupted, attempt recovery from `.claude/templates/PROFILE.json`.
|
|
26
|
-
- **Structure Completion**: Ensure
|
|
26
|
+
- **Structure Completion**: Ensure workspace structure is complete.
|
|
27
27
|
- **Forced Cleanup**: Delete `.pain_flag`, `.verdict.json`, `.user_verdict.json`, `.pending_reflection` and other temporary markers.
|
|
28
28
|
|
|
29
29
|
### 3. `reset` (Force Reset)
|
|
@@ -10,7 +10,7 @@ You must execute the following steps in order (no skipping). ARGUMENTS: $ARGUMEN
|
|
|
10
10
|
- Read the last entry in memory/CHECKPOINT.md
|
|
11
11
|
- Read the last 3 entries in memory/ISSUE_LOG.md
|
|
12
12
|
- Read recent decisions in memory/DECISIONS.md
|
|
13
|
-
-
|
|
13
|
+
- Runtime V2 pain diagnosis uses task input/context, not `.state/.pain_flag`
|
|
14
14
|
|
|
15
15
|
## Step 1: Read Runtime Parameters & Self-Check
|
|
16
16
|
- Read .principles/PROFILE.json, understand risk_paths, gate, tests.commands.
|
|
@@ -51,7 +51,7 @@ Output:
|
|
|
51
51
|
|
|
52
52
|
## Step 6: Delegate Planner (Movie Script Plan)
|
|
53
53
|
- Planner outputs Plan (steps/commands/metrics/rollback).
|
|
54
|
-
- Write plan to
|
|
54
|
+
- Write plan to a planning document for owner review.
|
|
55
55
|
- **Task Sync**:
|
|
56
56
|
- If `CLAUDE_CODE_TASK_LIST_ID` is set, you must convert the Plan's core steps to Native Tasks (via natural language command "Add task..." or related tools).
|
|
57
57
|
- If not set and in interactive mode, prompt user: "Recommend running `export CLAUDE_CODE_TASK_LIST_ID=task-$(date +%s)` to enable persistent task tracking."
|
|
@@ -59,7 +59,7 @@ Output:
|
|
|
59
59
|
- **Performance Evaluation**: After task completion, write to `.state/.verdict.json`. Format follows `@.principles/schemas/agent_verdict_schema.json`.
|
|
60
60
|
|
|
61
61
|
## Step 7: Delegate Implementer (Execution)
|
|
62
|
-
- Implementer
|
|
62
|
+
- Implementer executes according to the plan from Step 6. Any deviation must first be approved by updating the plan.
|
|
63
63
|
- **Performance Evaluation**: After task completion, write to `.state/.verdict.json` based on verification results. Format follows `@.principles/schemas/agent_verdict_schema.json`.
|
|
64
64
|
|
|
65
65
|
## Step 8: Delegate Reviewer (Review)
|
|
@@ -24,7 +24,7 @@ When performing cleanup operations, you MUST strictly adhere to the following wh
|
|
|
24
24
|
### 🌟 Core Assets
|
|
25
25
|
**These files must remain in the root directory. Do not touch:**
|
|
26
26
|
- `AGENTS.md`, `SOUL.md`, `HEARTBEAT.md`, `TOOLS.md`, `IDENTITY.md`, `USER.md`, `MEMORY.md`
|
|
27
|
-
- `README.md
|
|
27
|
+
- `README.md`
|
|
28
28
|
- `.principles/`, `.state/`
|
|
29
29
|
|
|
30
30
|
### 🎯 Targets for Grooming
|
|
@@ -185,7 +185,7 @@ For complex scenarios, combine multiple skills:
|
|
|
185
185
|
|
|
186
186
|
| Scenario | Combined Flow |
|
|
187
187
|
|----------|---------------|
|
|
188
|
-
| Major refactor | `/pd-evolve` → `
|
|
188
|
+
| Major refactor | `/pd-evolve` → `deductive-audit` → execute |
|
|
189
189
|
| System optimization | `/pd-status` → `evolve-system` → `root-cause` |
|
|
190
190
|
| Project review | `/pd-daily` → `/pd-okr` → `reflection-log` |
|
|
191
191
|
|
|
@@ -196,7 +196,6 @@ These skills are usually called automatically by the system, but advanced users
|
|
|
196
196
|
- `triage` - Issue triage
|
|
197
197
|
- `root-cause` - Root cause analysis
|
|
198
198
|
- `deductive-audit` - Deductive audit
|
|
199
|
-
- `plan-script` - Plan orchestration
|
|
200
199
|
- `reflection` - Metacognitive reflection
|
|
201
200
|
- `reflection-log` - Reflection logging
|
|
202
201
|
|
|
@@ -12,7 +12,7 @@ disable-model-invocation: false
|
|
|
12
12
|
Please execute the following reflection steps:
|
|
13
13
|
|
|
14
14
|
## 1. Status Scan
|
|
15
|
-
- **Goal**: What was our original objective? (Check
|
|
15
|
+
- **Goal**: What was our original objective? (Check early conversation context)
|
|
16
16
|
- **Status**: How much is completed now? Where are we stuck?
|
|
17
17
|
- **Cost**: We've consumed significant tokens. Is the output matching the cost?
|
|
18
18
|
|
|
@@ -37,4 +37,4 @@ If pain detected, must execute:
|
|
|
37
37
|
|
|
38
38
|
## 5. Recovery Plan
|
|
39
39
|
- Since we're about to compact context, how should we continue with the "cleanest" state?
|
|
40
|
-
- Update `
|
|
40
|
+
- Update `memory/.scratchpad.md`, mark current progress, ensure seamless continuation after compaction.
|
|
@@ -10,4 +10,4 @@ User (the boss) requests an immediate work report.
|
|
|
10
10
|
|
|
11
11
|
## Execution Action
|
|
12
12
|
1. Immediately delegate ``pd_spawn_agent(reporter)``.
|
|
13
|
-
2. Task description: "The boss wants to know the current situation. Please analyze current conversation context
|
|
13
|
+
2. Task description: "The boss wants to know the current situation. Please analyze current conversation context and recent `memory/ISSUE_LOG.md` to write an elegant report for the boss. Remember to check their profile first!"
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
基于**项目战场**中的相对路径进行决策:
|
|
18
18
|
|
|
19
19
|
- **项目最高战略**: `./memory/STRATEGY.md`
|
|
20
|
-
-
|
|
21
|
-
- **痛觉反射信号**: `./.state/.pain_flag`
|
|
20
|
+
- **痛觉反射信号**: Runtime V2 `PainSignalBridge`(手动触发使用 `pd pain record`;`.state/.pain_flag` 仅为 legacy compatibility)
|
|
22
21
|
- **系统能力快照**: `./.state/SYSTEM_CAPABILITIES.json`
|
|
23
22
|
|
|
24
23
|
---
|
|
@@ -63,7 +62,7 @@
|
|
|
63
62
|
|
|
64
63
|
### 心跳时应该检查(轮流执行):
|
|
65
64
|
|
|
66
|
-
- **痛觉与进化**: 检查
|
|
65
|
+
- **痛觉与进化**: 检查 Runtime V2 诊断(`pd pain record`、candidate、ledger)和 `EVOLUTION_QUEUE.json`;`.pain_flag` 仅为 legacy compatibility
|
|
67
66
|
- **战略对齐**: 对比 `CURRENT_FOCUS.md`,确保未偏离重点
|
|
68
67
|
- **环境健康**: 检查工具链状态、项目根目录整洁度
|
|
69
68
|
|
|
@@ -158,12 +157,13 @@
|
|
|
158
157
|
你默认处于架构师模式。
|
|
159
158
|
|
|
160
159
|
- **L1 (直接执行)**:单文件微调、文档维护 → 直接操作
|
|
161
|
-
- **L2 (委派协议)**:重大变更 →
|
|
160
|
+
- **L2 (委派协议)**:重大变更 → 建议先描述计划并获得 owner 确认后再执行
|
|
162
161
|
|
|
163
|
-
###
|
|
162
|
+
### 计划引导 (Planning Guidance)
|
|
164
163
|
|
|
165
|
-
-
|
|
166
|
-
-
|
|
164
|
+
- 对复杂任务,建议先起草计划文档并获得 owner 批准后再做大幅修改
|
|
165
|
+
- 这是行为建议,不是内置门禁 — PD 默认不强制"先计划后执行"
|
|
166
|
+
- 若 owner 批准的 RuleHost 规则强制了计划行为,该规则会自动生效
|
|
167
167
|
- **防止污染**:禁止将执行层细节写回战略文档
|
|
168
168
|
|
|
169
169
|
---
|
|
@@ -183,7 +183,7 @@ openclaw cron add --name "pd-grooming-daily" \
|
|
|
183
183
|
openclaw cron add --name "health-check" \
|
|
184
184
|
--every 4h \
|
|
185
185
|
--session main \
|
|
186
|
-
--system-event '环境健康检查:验证核心工具(rg, node, python
|
|
186
|
+
--system-event '环境健康检查:验证核心工具(rg, node, python)是否可用,检查工作区状态与实际进度是否一致。'
|
|
187
187
|
```
|
|
188
188
|
|
|
189
189
|
### 3. 战略对齐检查(每天上午 9 点)
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
<directive id="T-02" name="PHYSICAL_MEMORY_PERSISTENCE">
|
|
21
21
|
<trigger>在跨越多个文件进行推理、面临复杂的 Debug、或当对话上下文变得很长(>5 轮)时。</trigger>
|
|
22
|
-
<must>信任文件,而不是你的上下文窗口。你必须主动将中间结论、断点和后续步骤写入 `memory/.scratchpad.md
|
|
22
|
+
<must>信任文件,而不是你的上下文窗口。你必须主动将中间结论、断点和后续步骤写入 `memory/.scratchpad.md`。</must>
|
|
23
23
|
<forbidden>依赖你内部的“大脑记忆”来保持复杂状态,这些状态必然会被上下文压缩机制抹除。</forbidden>
|
|
24
24
|
</directive>
|
|
25
25
|
|
|
@@ -39,8 +39,9 @@
|
|
|
39
39
|
<!-- 执行与物理限制 (Execution & Physical Constraints) -->
|
|
40
40
|
<directive id="T-05" name="PHYSICAL_DEFENSE_AND_ORCHESTRATION">
|
|
41
41
|
<trigger>当被要求执行大型重构、多文件修改(>2 个文件)或架构变更时。</trigger>
|
|
42
|
-
<
|
|
43
|
-
<
|
|
42
|
+
<should>对复杂变更,先描述计划并获得 owner 确认后再执行。</should>
|
|
43
|
+
<must>限制爆炸半径。在修改任何代码后,必须运行金丝雀测试(例如 `npm test`、linters)以验证完整性。</must>
|
|
44
|
+
<forbidden>直接执行大规模非结构化变更,或跳过修改后的验证环节。</forbidden>
|
|
44
45
|
</directive>
|
|
45
46
|
|
|
46
47
|
<directive id="T-06" name="OCCAMS_RAZOR_MVC">
|
|
@@ -15,7 +15,7 @@ disable-model-invocation: true
|
|
|
15
15
|
### 1. `diagnose` (系统诊断)
|
|
16
16
|
**动作**: 检查“毛坯房”架构的完整性。
|
|
17
17
|
- **核心组件**: 检查 `.claude/hooks/hook_runner.py` 是否存在且可执行。
|
|
18
|
-
- **文档完整性**: 检查 `.principles/PROFILE.json
|
|
18
|
+
- **文档完整性**: 检查 `.principles/PROFILE.json` 等是否存在。
|
|
19
19
|
- **工具感知**: 检查 `.state/SYSTEM_CAPABILITIES.json`。若缺失,提示用户:"⚠️ 尚未进行工具链升级。建议运行 `/bootstrap-tools` 以大幅提升系统能力。"
|
|
20
20
|
- **记忆挂载**: 检查 `CLAUDE.md` 是否包含 `System Integration` 章节。
|
|
21
21
|
- **输出**: 生成一份健康报告,列出缺失或异常的项目。
|
|
@@ -23,7 +23,7 @@ disable-model-invocation: true
|
|
|
23
23
|
### 2. `repair` (系统修复)
|
|
24
24
|
**动作**:
|
|
25
25
|
- **配置恢复**: 如果 `PROFILE.json` 缺失或损坏,尝试从 `.claude/templates/PROFILE.json` 恢复。
|
|
26
|
-
- **结构补全**:
|
|
26
|
+
- **结构补全**: 确保工作区结构完整。
|
|
27
27
|
- **强制清理**: 删除 `.pain_flag`, `.verdict.json`, `.user_verdict.json`, `.pending_reflection` 等临时标记。
|
|
28
28
|
|
|
29
29
|
### 3. `reset` (强制重置)
|
|
@@ -10,7 +10,7 @@ disable-model-invocation: true
|
|
|
10
10
|
- 读取 memory/CHECKPOINT.md 的最后一条
|
|
11
11
|
- 读取 memory/ISSUE_LOG.md 的最近 3 条
|
|
12
12
|
- 读取 memory/DECISIONS.md 的最近决策
|
|
13
|
-
-
|
|
13
|
+
- Runtime V2 痛苦诊断使用 task input/context,不使用 `.state/.pain_flag`
|
|
14
14
|
|
|
15
15
|
## Step 1: 读取运行参数与能力自检
|
|
16
16
|
- 读取 .principles/PROFILE.json,理解 risk_paths、gate、tests.commands。
|
|
@@ -51,7 +51,7 @@ disable-model-invocation: true
|
|
|
51
51
|
|
|
52
52
|
## Step 6: 委派 Planner(电影剧本计划)
|
|
53
53
|
- Planner 输出 Plan(步骤/命令/指标/回滚)。
|
|
54
|
-
-
|
|
54
|
+
- 将计划写入计划文档供 owner 审阅。
|
|
55
55
|
- **任务同步 (Task Sync)**:
|
|
56
56
|
- 如果 `CLAUDE_CODE_TASK_LIST_ID` 已设置,你必须将上述 Plan 的核心步骤直接转化为 Native Tasks(通过自然语言指令"Add task..."或相关工具)。
|
|
57
57
|
- 如果未设置且为交互模式,提示用户:"建议运行 `export CLAUDE_CODE_TASK_LIST_ID=task-$(date +%s)` 以启用持久化任务追踪。"
|
|
@@ -59,7 +59,7 @@ disable-model-invocation: true
|
|
|
59
59
|
- **绩效评估**: 任务完成后,写入 `.state/.verdict.json`。格式遵循 `@.principles/schemas/agent_verdict_schema.json`。
|
|
60
60
|
|
|
61
61
|
## Step 7: 委派 Implementer(执行)
|
|
62
|
-
- Implementer
|
|
62
|
+
- Implementer 按照 Step 6 的计划执行。任何偏离必须先更新计划并获得确认。
|
|
63
63
|
- **绩效评估**: 任务完成后,根据验证结果写入 `.state/.verdict.json`。格式遵循 `@.principles/schemas/agent_verdict_schema.json`。
|
|
64
64
|
|
|
65
65
|
## Step 8: 委派 Reviewer(审查)
|
|
@@ -80,4 +80,4 @@ disable-model-invocation: true
|
|
|
80
80
|
## Step 10: 最终汇报 (Final Briefing)
|
|
81
81
|
- **动作**: 委派 ``pd_spawn_agent(reporter)`` 进行结项陈述。
|
|
82
82
|
- **要求**: 将 Implementer 和 Reviewer 的最终产出作为输入传给它。让它根据 `USER_CONTEXT.md` 决定汇报的深度和风格。
|
|
83
|
-
- **目标**: 确保老板(用户)在不产生认知负荷的前提下,清楚了解任务成果与潜在风险。
|
|
83
|
+
- **目标**: 确保老板(用户)在不产生认知负荷的前提下,清楚了解任务成果与潜在风险。
|
|
@@ -24,7 +24,7 @@ description: 执行工作区“大扫除” (Workspace Grooming),将散落的
|
|
|
24
24
|
### 🌟 核心资产区 (Core Assets)
|
|
25
25
|
**这些文件必须留在根目录,不可触碰:**
|
|
26
26
|
- `AGENTS.md`, `SOUL.md`, `HEARTBEAT.md`, `TOOLS.md`, `IDENTITY.md`, `USER.md`, `MEMORY.md`
|
|
27
|
-
- `README.md
|
|
27
|
+
- `README.md`
|
|
28
28
|
- `.principles/`, `.state/`
|
|
29
29
|
|
|
30
30
|
### 🎯 可处理区 (Targets for Grooming)
|
|
@@ -185,7 +185,7 @@ disable-model-invocation: true
|
|
|
185
185
|
|
|
186
186
|
| 场景 | 组合流程 |
|
|
187
187
|
|------|----------|
|
|
188
|
-
| 大型重构 | `/pd-evolve` → `
|
|
188
|
+
| 大型重构 | `/pd-evolve` → `deductive-audit` → 执行 |
|
|
189
189
|
| 系统优化 | `/pd-status` → `evolve-system` → `root-cause` |
|
|
190
190
|
| 项目复盘 | `/pd-daily` → `/pd-okr` → `reflection-log` |
|
|
191
191
|
|
|
@@ -196,7 +196,6 @@ disable-model-invocation: true
|
|
|
196
196
|
- `triage` - 问题分诊
|
|
197
197
|
- `root-cause` - 根因分析
|
|
198
198
|
- `deductive-audit` - 演绎审计
|
|
199
|
-
- `plan-script` - 计划编排
|
|
200
199
|
- `reflection` - 元认知反思
|
|
201
200
|
- `reflection-log` - 反思落盘
|
|
202
201
|
|
|
@@ -12,7 +12,7 @@ disable-model-invocation: false
|
|
|
12
12
|
请执行以下反思步骤:
|
|
13
13
|
|
|
14
14
|
## 1. 现状扫描 (Status Scan)
|
|
15
|
-
- **Goal**: 我们最初的目标是什么?(
|
|
15
|
+
- **Goal**: 我们最初的目标是什么?(检查早期对话上下文)
|
|
16
16
|
- **Status**: 现在完成了多少?卡在哪里?
|
|
17
17
|
- **Cost**: 我们消耗了大量 Token,产出是否匹配?
|
|
18
18
|
|
|
@@ -37,4 +37,4 @@ disable-model-invocation: false
|
|
|
37
37
|
|
|
38
38
|
## 5. 恢复计划 (Recovery)
|
|
39
39
|
- 既然要压缩上下文,我们下一步该如何以“最干净”的状态继续?
|
|
40
|
-
- 更新 `
|
|
40
|
+
- 更新 `memory/.scratchpad.md`,标记当前进度,确保压缩后能无缝衔接。
|
|
@@ -39,8 +39,9 @@
|
|
|
39
39
|
<!-- 执行与物理限制 (Execution & Physical Constraints) -->
|
|
40
40
|
<directive id="T-05" name="PHYSICAL_DEFENSE_AND_ORCHESTRATION">
|
|
41
41
|
<trigger>当被要求执行大型重构、多文件修改(>2 个文件)或架构变更时。</trigger>
|
|
42
|
-
<
|
|
43
|
-
<
|
|
42
|
+
<should>对复杂变更,先描述计划并获得 owner 确认后再执行。</should>
|
|
43
|
+
<must>限制爆炸半径。在修改任何代码后,必须运行金丝雀测试(例如 `npm test`、linters)以验证完整性。</must>
|
|
44
|
+
<forbidden>直接执行大规模非结构化变更,或跳过修改后的验证环节。</forbidden>
|
|
44
45
|
</directive>
|
|
45
46
|
|
|
46
47
|
<directive id="T-06" name="OCCAMS_RAZOR_MVC">
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-confirm-first-state-store.test.d.ts","sourceRoot":"","sources":["../../../src/runtime-v2/__tests__/sqlite-confirm-first-state-store.test.ts"],"names":[],"mappings":""}
|