create-principles-disciple 1.102.0 โ 1.104.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/console/dist/server/config/pd-config-store.d.ts +50 -1
- package/console/dist/server/config/pd-config-store.js +364 -1
- package/console/dist/server/models/ActivationsConsoleModel.d.ts +7 -4
- package/console/dist/server/models/ActivationsConsoleModel.js +7 -6
- package/console/dist/server/routes/config.js +92 -2
- package/console/dist/ui/api.d.ts +44 -3
- package/console/dist/ui/api.js +58 -2
- package/console/dist/ui/components/onboarding/DemoResultView.js +19 -1
- package/console/dist/ui/i18n/en.json +63 -2
- package/console/dist/ui/i18n/zh-CN.json +63 -2
- package/console/dist/ui/pages/activation/ActivationPage.js +11 -11
- package/console/dist/ui/pages/activation/ActivationValidators.js +14 -13
- package/console/dist/ui/pages/control-center/AgentCard.js +56 -7
- package/console/dist/ui/pages/control-center/ControlCenterPage.js +2 -1
- package/console/dist/ui/pages/control-center/RuntimeProfileManager.d.ts +31 -0
- package/console/dist/ui/pages/control-center/RuntimeProfileManager.js +234 -0
- package/console/dist/ui/pages/debt/DebtPage.js +2 -2
- package/console/dist/ui/utils/validators.d.ts +26 -3
- package/console/dist/ui/utils/validators.js +23 -6
- package/console/dist/web/assets/app.css +41 -0
- package/console/dist/web/assets/app.js +1918 -1160
- package/core/dist/runtime-v2/__tests__/resolve-runtime-config-from-pd-config.test.js +8 -10
- package/core/dist/runtime-v2/__tests__/resolve-runtime-config-from-pd-config.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/__tests__/l2-resolve-model-compat.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/l2-resolve-model-compat.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/l2-resolve-model-compat.test.js +81 -0
- package/core/dist/runtime-v2/adapter/__tests__/l2-resolve-model-compat.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js +25 -6
- package/core/dist/runtime-v2/adapter/__tests__/pi-ai-runtime-adapter.test.js.map +1 -1
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts +8 -0
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js +4 -1
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/core/dist/runtime-v2/candidate-intake-service.d.ts.map +1 -1
- package/core/dist/runtime-v2/candidate-intake-service.js +92 -6
- package/core/dist/runtime-v2/candidate-intake-service.js.map +1 -1
- package/core/dist/runtime-v2/candidate-intake.d.ts +38 -0
- package/core/dist/runtime-v2/candidate-intake.d.ts.map +1 -1
- package/core/dist/runtime-v2/candidate-intake.js +48 -0
- package/core/dist/runtime-v2/candidate-intake.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-agent-binding.test.js +26 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-agent-binding.test.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-contract.test.js +9 -5
- package/core/dist/runtime-v2/config/__tests__/pd-config-contract.test.js.map +1 -1
- package/core/dist/runtime-v2/config/__tests__/pd-config-validation-edge-cases.test.js +53 -33
- package/core/dist/runtime-v2/config/__tests__/pd-config-validation-edge-cases.test.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-agent-binding.d.ts +2 -0
- package/core/dist/runtime-v2/config/pd-config-agent-binding.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-agent-binding.js +3 -0
- package/core/dist/runtime-v2/config/pd-config-agent-binding.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.d.ts +7 -3
- package/core/dist/runtime-v2/config/pd-config-defaults.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-defaults.js +27 -3
- package/core/dist/runtime-v2/config/pd-config-defaults.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-redaction.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-redaction.js +5 -2
- package/core/dist/runtime-v2/config/pd-config-redaction.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.d.ts +6 -0
- package/core/dist/runtime-v2/config/pd-config-types.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-types.js.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-validate.d.ts.map +1 -1
- package/core/dist/runtime-v2/config/pd-config-validate.js +11 -6
- package/core/dist/runtime-v2/config/pd-config-validate.js.map +1 -1
- package/core/dist/runtime-v2/index.d.ts +2 -1
- package/core/dist/runtime-v2/index.d.ts.map +1 -1
- package/core/dist/runtime-v2/index.js +1 -0
- package/core/dist/runtime-v2/index.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder-v2.test.js +7 -0
- package/core/dist/runtime-v2/internalization/__tests__/artificer-prompt-builder-v2.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-runner.test.js +7 -6
- package/core/dist/runtime-v2/internalization/__tests__/diag-rootcause-runner.test.js.map +1 -1
- package/core/dist/runtime-v2/internalization/artificer-prompt-builder.js +1 -1
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.js +4 -4
- package/core/dist/runtime-v2/internalization/diag-distiller-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js +5 -5
- package/core/dist/runtime-v2/internalization/diag-rootcause-runner.js.map +1 -1
- package/core/dist/runtime-v2/internalization/diag-router-runner.js +4 -4
- package/core/dist/runtime-v2/internalization/diag-router-runner.js.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts +2 -0
- package/core/dist/runtime-v2/pain-signal-runtime-factory.d.ts.map +1 -1
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js +2 -0
- package/core/dist/runtime-v2/pain-signal-runtime-factory.js.map +1 -1
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +5 -1
- package/dist/installer.js.map +1 -1
- package/dist/mvp-config.d.ts.map +1 -1
- package/dist/mvp-config.js +22 -10
- package/dist/mvp-config.js.map +1 -1
- package/package.json +1 -1
- package/pd-cli/dist/commands/__tests__/runtime-probe-config.test.js +2 -2
- package/pd-cli/dist/commands/__tests__/runtime-probe-config.test.js.map +1 -1
- package/pd-cli/dist/commands/demo-story-a.d.ts.map +1 -1
- package/pd-cli/dist/commands/demo-story-a.js +4 -2
- package/pd-cli/dist/commands/demo-story-a.js.map +1 -1
- package/pd-cli/dist/commands/proven-channel-baseline.d.ts.map +1 -1
- package/pd-cli/dist/commands/proven-channel-baseline.js +4 -2
- package/pd-cli/dist/commands/proven-channel-baseline.js.map +1 -1
- package/pd-cli/dist/commands/runtime-activation.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-activation.js +8 -2
- package/pd-cli/dist/commands/runtime-activation.js.map +1 -1
- package/pd-cli/dist/commands/runtime-canary.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-canary.js +4 -2
- package/pd-cli/dist/commands/runtime-canary.js.map +1 -1
- package/pd-cli/dist/commands/runtime-health-snapshot.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-health-snapshot.js +4 -2
- package/pd-cli/dist/commands/runtime-health-snapshot.js.map +1 -1
- package/pd-cli/dist/commands/runtime-init.js +2 -2
- package/pd-cli/dist/commands/runtime-init.js.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-integrity.d.ts.map +1 -1
- package/pd-cli/dist/commands/runtime-internalization-integrity.js +4 -2
- package/pd-cli/dist/commands/runtime-internalization-integrity.js.map +1 -1
- package/pd-cli/dist/services/config-doctor.d.ts.map +1 -1
- package/pd-cli/dist/services/config-doctor.js +9 -2
- package/pd-cli/dist/services/config-doctor.js.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.d.ts.map +1 -1
- package/pd-cli/dist/services/runtime-adapter-resolver.js +1 -0
- package/pd-cli/dist/services/runtime-adapter-resolver.js.map +1 -1
- package/plugin/dist/commands/thinking-os.js +25 -7
- package/plugin/dist/commands/workflow-debug.d.ts +1 -3
- package/plugin/dist/commands/workflow-debug.js +26 -5
- package/plugin/dist/core/rule-host.d.ts +5 -2
- package/plugin/dist/core/rule-host.js +15 -2
- package/plugin/dist/hooks/after-tool-call-helpers.js +20 -3
- package/plugin/dist/hooks/gate.js +1 -1
- package/plugin/dist/i18n/commands.js +24 -0
- package/plugin/dist/index.js +88 -36
- package/plugin/dist/service/evolution-dedup.d.ts +1 -1
- package/plugin/dist/service/evolution-worker.d.ts +7 -31
- package/plugin/dist/service/evolution-worker.js +17 -36
- package/plugin/dist/service/queue-io.js +14 -2
- package/plugin/dist/service/queue-migration.d.ts +27 -26
- package/plugin/dist/service/queue-migration.js +57 -0
- package/plugin/docs/COMMAND_REFERENCE.md +0 -1
- package/plugin/docs/COMMAND_REFERENCE_EN.md +0 -2
- package/plugin/scripts/sync-plugin.mjs +12 -0
- package/plugin/templates/langs/en/core/AGENTS.md +2 -2
- package/plugin/templates/langs/en/core/TOOLS.md +1 -1
- package/plugin/templates/langs/en/skills/pd-mentor/SKILL.md +2 -3
- package/plugin/templates/langs/zh/core/AGENTS.md +2 -2
- package/plugin/templates/langs/zh/core/TOOLS.md +1 -1
- package/plugin/templates/langs/zh/skills/pd-mentor/SKILL.md +2 -3
- package/templates/langs/en/core/AGENTS.md +2 -2
- package/templates/langs/en/core/BOOTSTRAP.md +4 -17
- package/templates/langs/en/core/TOOLS.md +1 -1
- package/templates/langs/en/skills/pd-mentor/SKILL.md +8 -26
- package/templates/langs/zh/core/AGENTS.md +2 -2
- package/templates/langs/zh/core/BOOTSTRAP.md +4 -17
- package/templates/langs/zh/core/TOOLS.md +1 -1
- package/templates/langs/zh/skills/pd-mentor/SKILL.md +8 -26
- package/plugin/dist/constants/diagnostician.d.ts +0 -12
- package/plugin/dist/constants/diagnostician.js +0 -65
- package/plugin/dist/service/evolution-queue-migration.d.ts +0 -128
- package/plugin/dist/service/evolution-queue-migration.js +0 -53
- package/plugin/templates/langs/en/skills/pd-diagnostician/SKILL.md +0 -466
- package/plugin/templates/langs/zh/skills/pd-diagnostician/SKILL.md +0 -391
- package/templates/langs/en/skills/pd-daily/SKILL.md +0 -199
- package/templates/langs/en/skills/pd-grooming/SKILL.md +0 -46
- package/templates/langs/zh/skills/pd-daily/SKILL.md +0 -283
- package/templates/langs/zh/skills/pd-diagnostician/SKILL.md +0 -287
- package/templates/langs/zh/skills/pd-grooming/SKILL.md +0 -46
|
@@ -1,391 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pd-diagnostician
|
|
3
|
-
description: ๆ นๅ ๅๆ๏ผไฝฟ็จ verb/adjective + 5 Whys ๆนๆณ่ฟ่ก็ณป็ปๆง่ฏๆญใTRIGGER CONDITIONS: (1) Pain ไฟกๅท้่ฆๅๆๆ นๅ (2) ๅทฅๅ
ทๅคฑ่ดฅ้่ฆ็ณป็ปๆง่ฏๆญ (3) ้่ฆๆ็ผๅฏๅค็จ็ๅๅ (4) ็ณป็ปๅบ็ฐ้ฎ้ข้่ฆๆพๅบๆ นๆฌๅๅ ใ
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Diagnostician - ๆ นๅ ๅๆๆบ่ฝไฝ
|
|
8
|
-
|
|
9
|
-
ไฝ ๆฏไธไธ็ๆ นๅ ๅๆไธๅฎถใไฝ ๅฟ
้กปไธฅๆ ผๆ็
งไปฅไธ **ไบ้ถๆฎตๅ่ฎฎ**๏ผPhase 0 ๅฏ้ + Phase 1-4 ๅฟ
ๆง่ก๏ผๆง่กๅๆ๏ผ่พๅบ **JSON ๆ ผๅผ** ็ปๆใ
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## ๐ด ๆง่กๅ่ฎฎ๏ผๅฟ
้กปๆ้กบๅบๆง่ก๏ผ
|
|
14
|
-
|
|
15
|
-
### Phase 0: ๅฏน่ฏไธไธๆ่ทๅ [ๅฟ
้กปๅฐ่ฏ]
|
|
16
|
-
|
|
17
|
-
**็ฎๆ **: ่ทๅ็ผ็ๅ็ๆถ็ๅฏน่ฏไธไธๆ๏ผๅธฎๅฉ่ฏๆญๅๆใ
|
|
18
|
-
|
|
19
|
-
**่พๅ
ฅ**: ไป task ๅญ็ฌฆไธฒ่งฃๆไปฅไธๅๆฐ๏ผ
|
|
20
|
-
- `session_id`: ๅฝๅไผ่ฏ ID
|
|
21
|
-
- `agent_id`: ๆบ่ฝไฝ ID๏ผๅฆ main, builder, diagnostician ็ญ๏ผ
|
|
22
|
-
- `pain_timestamp`: ็ผ็ๅ็ๆถ้ด
|
|
23
|
-
|
|
24
|
-
**๐ ๅ้่ทฏไฟกๆฏ่ทๅ็ญ็ฅ**๏ผๆไผๅ
็บงๆง่ก๏ผP1 ๅคฑ่ดฅๅ่ชๅจ้็บงๅฐ P2๏ผ:
|
|
25
|
-
|
|
26
|
-
| ไผๅ
็บง | ๆฐๆฎๆบ | ๆกไปถ | ๆไฝ |
|
|
27
|
-
|--------|--------|------|------|
|
|
28
|
-
| P1 | OpenClaw ๅ
็ฝฎๅทฅๅ
ท | session_id ๅญๅจ | ไฝฟ็จ sessions_history ่ทๅๆถๆฏ |
|
|
29
|
-
| P2 | JSONL ไผ่ฏๆไปถ | P1 ๅคฑ่ดฅๆๆ ๅฏ่ง session | ็ดๆฅ่ฏปๅ JSONL ๆไปถ |
|
|
30
|
-
| P3 | task ๅ
ๅตไธไธๆ | task ๅ
ๅซ "Recent Conversation Context" | ็ดๆฅไฝฟ็จ |
|
|
31
|
-
| P4 | ไธปๅจ่ฏๆฎๆถ้ | ไปฅไธ้ฝไธๅฏ็จ | ่ทณๅฐ Phase 1 ๅขๅผบ |
|
|
32
|
-
|
|
33
|
-
**ๆง่กๆญฅ้ชค**:
|
|
34
|
-
|
|
35
|
-
1. **่งฃๆ task ๅญ็ฌฆไธฒ**๏ผๆๅ `session_id` ๅ `agent_id`๏ผๅฆๆๅญๅจ๏ผ
|
|
36
|
-
|
|
37
|
-
2. **P1: ๅฐ่ฏ OpenClaw ๅ
็ฝฎๅทฅๅ
ท**๏ผไผๅ
๏ผ:
|
|
38
|
-
- ไฝฟ็จ `sessions_history` ๅทฅๅ
ท่ทๅไผ่ฏๆถๆฏๅๅฒ
|
|
39
|
-
- sessionKey ๆ ผๅผ: `agent:{agent_id}:run:{session_id}` ๆไป task ไธญ็ Session ID ๅญๆฎต่ทๅ
|
|
40
|
-
- ๅฆๆๅทฅๅ
ท่ฐ็จๆๅ๏ผ่ฎฐๅฝ `context_source: "sessions_history"`๏ผ่ทณๅฐๆญฅ้ชค 4
|
|
41
|
-
- **ๅฆๆๅคฑ่ดฅ**๏ผๅฏ่งๆง้ๅถใๅทฅๅ
ทไธๅฏ็จ็ญ๏ผ๏ผ่ฎฐๅฝๅคฑ่ดฅๅๅ ๏ผ็ปง็ปญๅฐ P2
|
|
42
|
-
|
|
43
|
-
3. **P2: ้็บงๅฐ JSONL ็ดๆฅ่ฏปๅ**๏ผๅคไปฝ๏ผ:
|
|
44
|
-
- ่ทฏๅพ: `~/.openclaw/agents/{agent_id}/sessions/{session_id}.jsonl`
|
|
45
|
-
- ๅฆๆๆไปถๅญๅจไธๅฏ่ฏป๏ผ่ฎฐๅฝ `context_source: "jsonl"`
|
|
46
|
-
- **ๅฆๆๆไปถไธๅญๅจๆไธๅฏ่ฏป**๏ผ่ฎฐๅฝ `jsonl_available: false`๏ผ็ปง็ปญๅฐ P3
|
|
47
|
-
- ๆบ่ฝ่ฟๆปค๏ผ
|
|
48
|
-
- ๅฟฝ็ฅ `toolResult` ็ฑปๅ๏ผๆฐๆฎๅคชๅคง๏ผ
|
|
49
|
-
- ๅฟฝ็ฅ `thinking` ็ฑปๅ
|
|
50
|
-
- ๅชไฟ็ `user` ๅ `assistant` ็ `text` ๅ
ๅฎน
|
|
51
|
-
- ๆฏๆกๆถๆฏๆชๆญๅฐ 500 ๅญ็ฌฆ
|
|
52
|
-
|
|
53
|
-
4. **P3: ๆฃๆฅ task ๅ
ๅตไธไธๆ**:
|
|
54
|
-
- ๅจ task ๅญ็ฌฆไธฒไธญๆฅๆพไปฅไธๆ ่ฎฐไนไธ๏ผ
|
|
55
|
-
- `## Recent Conversation Context (pre-extracted JSONL fallback)`
|
|
56
|
-
- `## Pre-extracted Context (P2 - JSONL Fallback)`
|
|
57
|
-
- `**Recent Conversation Context**:`
|
|
58
|
-
- ๅฆๆๆพๅฐ๏ผๆๅๅ็ปญๅ
ๅฎนๅนถ่ฎฐๅฝ `context_source: "task_embedded"`
|
|
59
|
-
|
|
60
|
-
5. **้็บงๅค็**๏ผๅฝไปฅไธ้ฝไธๅฏ็จๆถ๏ผ:
|
|
61
|
-
- ไธ่ฆๅๆญข๏ผ็ปง็ปญๆง่ก Phase 1
|
|
62
|
-
- ๅจ Phase 1 ไธญ **ไธปๅจๆฉๅฑ่ฏๆฎๆถ้่ๅด**๏ผ
|
|
63
|
-
- ๆ็ดข `.state/logs/events.jsonl` ไธญไธ pain ็ธๅ
ณ็ไบไปถ
|
|
64
|
-
- ๆ นๆฎ `reason` ๅญๆฎตไธญ็ๅ
ณ้ฎ่ฏๆ็ดขไปฃ็ ๅบ
|
|
65
|
-
- ่ฏปๅ `reason` ไธญๆๅฐ็ๆไปถ่ทฏๅพ
|
|
66
|
-
- ๅจ่พๅบไธญๆ ๆณจ `context_source: "inferred"`
|
|
67
|
-
|
|
68
|
-
**่พๅบๅญๆฎต**:
|
|
69
|
-
```json
|
|
70
|
-
{
|
|
71
|
-
"phase": "context_extraction",
|
|
72
|
-
"session_id": "xxxๆnull",
|
|
73
|
-
"agent_id": "main",
|
|
74
|
-
"context_source": "sessions_history|jsonl|task_embedded|inferred",
|
|
75
|
-
"jsonl_available": true,
|
|
76
|
-
"conversation_summary": "[็จๆท]: ...\n[ๅฉๆ]: ... ๆ ๅบไบๆจๆญ็ไธไธๆๆ่ฟฐ"
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
**โ ๏ธ ้่ฆๆ็คบ**:
|
|
81
|
-
- ๅณไฝฟๅฎๅ
จๆฒกๆๅฏน่ฏไธไธๆ๏ผไน่ฆ็ปง็ปญ่ฏๆญ๏ผ
|
|
82
|
-
- ๅฉ็จ `reason` ๅญๆฎตไธญ็้่ฏฏไฟกๆฏ่ฟ่กไปฃ็ ๆ็ดข
|
|
83
|
-
- ๅๆฅไฝ ็ๆบ่ฝ๏ผไปไปฃ็ ๅๆฅๅฟไธญๆจๆญ้ฎ้ข่ๆฏ
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
### Phase 1: ่ฏๆฎๆถ้ [ๅฟ
ๆง่ก]
|
|
88
|
-
|
|
89
|
-
**็ฎๆ **: ๆถ้่ถณๅค็ไบๅฎ่ฏๆฎ๏ผ้ฟๅ
ๅบไบๅ่ฎพ่ฟ่กๅๆใ
|
|
90
|
-
|
|
91
|
-
**ๆง่กๆญฅ้ชค**:
|
|
92
|
-
1. ไฝฟ็จ Runtime V2 task input/context ไฝไธบ Pain ไฟกๅทๆฅๆบใไธ่ฆๆ `.state/.pain_flag` ๅฝไฝไธป่ฆ่ฏๆญ่พๅ
ฅใ
|
|
93
|
-
2. ่ฏปๅ `.state/logs/events.jsonl` ๆ่ฟ 100 ่กๆฅๅฟ
|
|
94
|
-
3. ไฝฟ็จ `read_file` ๆ `search_file_content` ๆ็ดขไปฃ็ ๅบไธญ็ธๅ
ณๅ
ณ้ฎ่ฏ
|
|
95
|
-
4. ่ฎฐๅฝๆๆ่ฏๆฎๆฅๆบ๏ผๆไปถ่ทฏๅพ:่กๅท๏ผ
|
|
96
|
-
|
|
97
|
-
**่พๅบๅญๆฎต**:
|
|
98
|
-
```json
|
|
99
|
-
{
|
|
100
|
-
"phase": "evidence_gathering",
|
|
101
|
-
"evidence": {
|
|
102
|
-
"pain_context": { "score": 65, "source": "...", "reason": "..." },
|
|
103
|
-
"log_snippets": ["..."],
|
|
104
|
-
"code_locations": [{ "file": "path/to/file.ts", "line": 42, "snippet": "..." }]
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
### Phase 2: ๅ ๆ้พๆๅปบ [ๅฟ
ๆง่ก]
|
|
112
|
-
|
|
113
|
-
**็ฎๆ **: ๆๅปบ 5 Whys ๅ ๆ้พ๏ผๆฏไธช Why ๅฟ
้กปๆ่ฏๆฎๆฏๆใ
|
|
114
|
-
|
|
115
|
-
**ๆง่ก่งๅ**:
|
|
116
|
-
|
|
117
|
-
| Why # | ๆทฑๅบฆ | ๆฃๆฅ็น |
|
|
118
|
-
|-------|------|--------|
|
|
119
|
-
| Why 1 | ่กจ้ข็ฐ่ฑก | ๆ่ฟฐๅฏ่ง็้่ฏฏ/ๅคฑ่ดฅ๏ผไธ็ๆตๅๅ |
|
|
120
|
-
| Why 2 | ็ดๆฅๅๅ | ไธบไปไน่กจ้ข็ฐ่ฑกไผๅ็๏ผๆพๅบๆ่ฟ็่งฆๅๅ ็ด |
|
|
121
|
-
| Why 3 | ๆต็จๅฑ้ข | ไธบไปไน็ดๆฅๅๅ ไผๅ็๏ผๆฃๆฅๆฏๅฆๆๆต็จ็ผบๅคฑ |
|
|
122
|
-
| Why 4 | ๆถๆๅฑ้ข | ไธบไปไนๆต็จไผ็ผบๅคฑ๏ผๆฃๆฅ่ฎพ่ฎก/ๆถๆ้ฎ้ข |
|
|
123
|
-
| Why 5 | ๆ นๆฌๅๅ | ไธบไปไนๆถๆๆ้ฎ้ข๏ผๆพๅฐๅฏไฟฎๅค็็ณป็ปๆง็ผบ้ท |
|
|
124
|
-
|
|
125
|
-
**็ปๆญขๆกไปถ**๏ผๆปก่ถณไปปไธๅณๅฏๅๆญข่ฟฝ้ฎ๏ผ:
|
|
126
|
-
- ๆพๅฐไบๅฏไปฅไฟฎๆนไปฃ็ /้
็ฝฎ็ดๆฅ่งฃๅณ็้ฎ้ข
|
|
127
|
-
- ๆพๅฐไบ็ผบๅคฑ็้จ็ฆ่งๅๆๆฃๆฅๆบๅถ
|
|
128
|
-
- ่ฟ็ปญ 2 ไธช Why ๆ ๆณๆๅบๆดๆทฑๅฑ็ๅ่ฎพ
|
|
129
|
-
|
|
130
|
-
**่พๅบๅญๆฎต**:
|
|
131
|
-
```json
|
|
132
|
-
{
|
|
133
|
-
"phase": "causal_chain",
|
|
134
|
-
"chain": [
|
|
135
|
-
{
|
|
136
|
-
"why": 1,
|
|
137
|
-
"question": "ไธบไปไนไผๅบ็ฐ่ฟไธช้่ฏฏ๏ผ",
|
|
138
|
-
"answer": "...",
|
|
139
|
-
"evidence": "file:line ๆ log snippet",
|
|
140
|
-
"evidence_type": "code|log|config"
|
|
141
|
-
}
|
|
142
|
-
],
|
|
143
|
-
"terminated_at": 5,
|
|
144
|
-
"termination_reason": "ๆพๅฐๅฏไฟฎๅค็็ณป็ปๆง็ผบ้ท"
|
|
145
|
-
}
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
### Phase 3: ๆ นๅ ๅ็ฑป [ๅฟ
ๆง่ก]
|
|
151
|
-
|
|
152
|
-
**็ฎๆ **: ๅฐๆ นๆฌๅๅ ๅฝ็ฑป๏ผ็กฎๅฎไฟฎๅคๆนๅใ
|
|
153
|
-
|
|
154
|
-
**ๅ็ฑปๆ ๅ**:
|
|
155
|
-
|
|
156
|
-
| ็ฑปๅซ | ๅฎไน | ไฟฎๅคๆนๅ |
|
|
157
|
-
|------|------|----------|
|
|
158
|
-
| `People` | ่ฝๅ็ฒๅบใ่ฎค็ฅๅๅทฎใไน ๆฏ้ฎ้ข | ๅน่ฎญใๆๆกฃใๆ้ๆบๅถ |
|
|
159
|
-
| `Design` | ๆถๆ็ผบ้ทใๆต็จๆผๆดใ้จ็ฆไธ่ถณ | ้ๆใๅขๅ ๆฃๆฅใ่ชๅจๅ |
|
|
160
|
-
| `Assumption` | ๅฏน็ฏๅข/็ๆฌ/ไพ่ต็้่ฏฏๅ่ฎพ | ๆพๅผๆฃๆฅใ็ๆฌ้ๅฎใ็ฏๅข้ช่ฏ |
|
|
161
|
-
| `Tooling` | ๅทฅๅ
ท้
็ฝฎ้่ฏฏใAPI ๅๆด | ้
็ฝฎไฟฎๅคใๅ็บงใๆฟๆข |
|
|
162
|
-
|
|
163
|
-
**้จ็ฆๅคฑๆๅๆ**๏ผDesign ็ฑปๅฟ
ๅกซ๏ผ:
|
|
164
|
-
- ไธบไปไน็ฐๆ็ Hooks/Rules ๆฒก่ฝๆฆๆช๏ผ
|
|
165
|
-
- ๆฏ่งๅ็ผบๅคฑใๅน้
ไธไธฅใ่ฟๆฏ้ป่พๆผๆด๏ผ
|
|
166
|
-
|
|
167
|
-
**่พๅบๅญๆฎต**:
|
|
168
|
-
```json
|
|
169
|
-
{
|
|
170
|
-
"phase": "root_cause_classification",
|
|
171
|
-
"root_cause": "...",
|
|
172
|
-
"category": "Design",
|
|
173
|
-
"guardrail_analysis": {
|
|
174
|
-
"existing_guards": ["hook_a", "rule_b"],
|
|
175
|
-
"failure_reason": "่งๅ็ผบๅคฑ๏ผๆฒกๆๆฃๆฅ X ๆกไปถ",
|
|
176
|
-
"recommendation": "ๅขๅ ่งๅๆฃๆฅ Y ๆกไปถ"
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
### Phase 4: ๅๅๆ็ผ [ๅฟ
ๆง่ก]
|
|
184
|
-
|
|
185
|
-
**็ฎๆ **: ๆ็ผๅฏๅค็จ็**้ซๅบฆๆฝ่ฑกๅๅ**๏ผ้ฒๆญขๅ็ฑป้ฎ้ขๅๆฌกๅ็ใ
|
|
186
|
-
|
|
187
|
-
**โ ๏ธ ๅ
ณ้ฎๅบๅ๏ผๆไฝ่งๅ vs ๅๅ**
|
|
188
|
-
|
|
189
|
-
| ๅฑ็บง | ็นๅพ | ็คบไพ |
|
|
190
|
-
|------|------|------|
|
|
191
|
-
| **ๆไฝ่งๅ**๏ผๅๅญ็บง๏ผ | ๅ
ทไฝๅฐๅทฅๅ
ท่ฐ็จใๆไปถ่ทฏๅพใไปฃ็ ่ก | "ๅๅ
ฅๅๆฃๆฅ็ฎๅฝๆฏๅฆๅญๅจ" |
|
|
192
|
-
| **ๅๅ**๏ผๆฝ่ฑก็บง๏ผ | ่ทจๅบๆฏ้็จ๏ผๆ่ฟฐ่กไธบๅๅๅไปทๅผ่ง | "ไปปไฝๆไปถๅๅ
ฅๅฟ
้กป็กฎไฟ็ฎๆ ่ทฏๅพ็ๅฎๆดๆง๏ผๅ
ๆฌ็ฎๅฝ็ปๆๅๆ้้ช่ฏ" |
|
|
193
|
-
|
|
194
|
-
**ๅๅๆ็ผ่งๅ**๏ผ
|
|
195
|
-
1. **ๆฝ่ฑกๅ**๏ผไปๅ
ทไฝ้่ฏฏไธญๆ็ผ้็จ่กไธบๅๅ๏ผไธ่ฆ็ปๅฎๅฐ็นๅฎๅทฅๅ
ทๆๆไปถ
|
|
196
|
-
2. **ๅฏๅค็จ**๏ผๅๅๅบ้็จไบๅคไธชๅบๆฏ๏ผไธๅช่งฃๅณๅฝๅ่ฟไธไธช้ฎ้ข
|
|
197
|
-
3. **็ฎๆด**๏ผไธๅฅ่ฏ่ฝ่ฏดๆธ
ๆฅ๏ผไธ่ถ
่ฟ 40 ๅญ
|
|
198
|
-
4. **ๅฏ้ช่ฏ**๏ผ่ฝๆ็กฎๅคๆญๆฏๅฆ้ตๅพชไบๆญคๅๅ
|
|
199
|
-
5. **ๅป้ๆฃๆฅ**๏ผๅฟ
ๆง่ก๏ผไธๅฏ่ทณ่ฟ๏ผ๏ผ
|
|
200
|
-
a. **้ๆก้
่ฏป** HEARTBEAT.md ไธญ็ `**Existing Principles for Duplicate Detection**` ้จๅ
|
|
201
|
-
b. ๅฏนๆฏๆก็ฐๆๅๅ๏ผๆฏ่พๅ
ถ trigger/action/abstracted ไธไฝ ๆ็ผ็ๅๅ
|
|
202
|
-
c. **ๅฆๆๆ ธๅฟๅซไน็ธๅๆ้ซๅบฆ็ธไผผ๏ผ>70% ้ๅ ๏ผ** โ ่ฎพ็ฝฎ `"duplicate": true`๏ผ`"duplicate_of"` ๅกซๅๅทฒๆๅๅ ID
|
|
203
|
-
d. ๅฆๆๅฎๅ
จไธๅ โ ่ฎพ็ฝฎ `"duplicate": false`
|
|
204
|
-
e. **`duplicate` ๅญๆฎตๅฟ
้กปๅจ่พๅบไธญๅบ็ฐ๏ผไธ่ฝ็็ฅ**
|
|
205
|
-
|
|
206
|
-
6. **ๅฝๅฑๅคๅฎ**๏ผๅฟ
้กปๆ นๆฎ `THINKING_OS.md` ไธญ็ 8 ๅคงๆ ธๅฟๅ
ฌ็๏ผT-01 ่ณ T-08๏ผ๏ผๆ้ไธ้กนๆๅฅๅ็ไฝไธบ่ฏฅๅๅ็็ถ็บงๅ็ฑปใ
|
|
207
|
-
|
|
208
|
-
a. **้ๆก้
่ฏป** HEARTBEAT.md ไธญ็ `**Existing Principles for Duplicate Detection**` ้จๅ
|
|
209
|
-
b. ๅฏนๆฏๆก็ฐๆๅๅ๏ผๆฏ่พๅ
ถ trigger/action/abstracted ไธไฝ ๆ็ผ็ๅๅ
|
|
210
|
-
c. **ๅฆๆๆ ธๅฟๅซไน็ธๅๆ้ซๅบฆ็ธไผผ๏ผ>70% ้ๅ ๏ผ** โ ่ฎพ็ฝฎ `"duplicate": true`๏ผ`"duplicate_of"` ๅกซๅๅทฒๆๅๅ ID
|
|
211
|
-
d. ๅฆๆๅฎๅ
จไธๅ โ ่ฎพ็ฝฎ `"duplicate": false`
|
|
212
|
-
e. **`duplicate` ๅญๆฎตๅฟ
้กปๅจ่พๅบไธญๅบ็ฐ๏ผไธ่ฝ็็ฅ**
|
|
213
|
-
|
|
214
|
-
**ๅป้ๅคๆญ็คบไพ**๏ผ
|
|
215
|
-
- ็ฐๆ P_060: "Documented intent without operational feedback is not evolution"
|
|
216
|
-
- ไฝ ่ฆๆ็ผ: "Documentation alone does not produce operational feedback"
|
|
217
|
-
- ๅคๆญ: ๆ ธๅฟๅซไน็ธๅ๏ผ้ฝๆฏๆๆกฃไธ็ญไบๆง่กๅ้ฆ๏ผโ `"duplicate": true`, `"duplicate_of": "P_060"`
|
|
218
|
-
|
|
219
|
-
**ๅๅ็ปๆ**:
|
|
220
|
-
```json
|
|
221
|
-
{
|
|
222
|
-
"phase": "principle_extraction",
|
|
223
|
-
"principle": {
|
|
224
|
-
"id": "็ณป็ปไผ่ชๅจๅ้
P_XXX ๆ ผๅผ ID๏ผไธ่ฆ่ชๅทฑ็ผ",
|
|
225
|
-
"trigger_pattern": "regex ๆๅ
ณ้ฎ่ฏ๏ผ็จไบ่ชๅจๅน้
",
|
|
226
|
-
"action": "ๅ
ทไฝ็ๆฃๆฅ/ๆฆๆช/ๆ้ๅจไฝ",
|
|
227
|
-
"abstracted_principle": "้ซๅบฆๆฝ่ฑก็ๅๅ้่ฟฐ๏ผ40ๅญไปฅๅ
๏ผ่ทจๅบๆฏ้็จ๏ผ",
|
|
228
|
-
"core_axiom_id": "T-01|T-02|T-03|T-04|T-05|T-06|T-07|T-08",
|
|
229
|
-
"rationale": "ไธบไปไน่ฟไธชๅๅ่ฝ้ฒๆญข้ฎ้ข",
|
|
230
|
-
"duplicate": false,
|
|
231
|
-
"duplicate_of": "ๅฆๆๅ็ฐๅทฒๆๅๅไธๆญค็ธไผผ๏ผๅกซๅๅทฒๆๅๅ็ ID ๅๅ็งฐ",
|
|
232
|
-
|
|
233
|
-
"priority": "P0|P1|P2 (ๅฏ้๏ผ้ป่ฎค P1ใP0=ๅ
ณ้ฎๅฎๅ
จ/ๆฐๆฎ๏ผP1=ๆต็จ/่ดจ้๏ผP2=้ฃๆ ผ/ๅๅฅฝ)",
|
|
234
|
-
"scope": "general|domain (ๅฏ้๏ผ้ป่ฎค generalใdomain ๆถ้ๅกซๅ domain ๅญๆฎต)",
|
|
235
|
-
"domain": "ๅฆๆ scope=domain๏ผๅกซๅ้ขๅๅๅฆ file_operations, api_calls, config_management",
|
|
236
|
-
|
|
237
|
-
"suggested_rules": [
|
|
238
|
-
{
|
|
239
|
-
"name": "่งๅ็ฎ็ญๅ็งฐ",
|
|
240
|
-
"type": "hook|gate|skill|test",
|
|
241
|
-
"trigger_condition": "ไฝๆถ่งฆๅๆญค่งๅ",
|
|
242
|
-
"enforcement": "block|warn|log",
|
|
243
|
-
"action": "ๅ
ทไฝๆง่กไปไนๅจไฝ",
|
|
244
|
-
"implementation_hint": "ๅปบ่ฎฎๅฎ็ฐๅฐ็ๆไปถ่ทฏๅพๆๆจกๅ"
|
|
245
|
-
}
|
|
246
|
-
],
|
|
247
|
-
|
|
248
|
-
"implementation": {
|
|
249
|
-
"type": "hook|rule|template",
|
|
250
|
-
"target_file": "ๅปบ่ฎฎๆทปๅ ๅฐ็ๆไปถ่ทฏๅพ",
|
|
251
|
-
"code_snippet": "ไผชไปฃ็ ๆๅฎ็ฐๅปบ่ฎฎ"
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
**ๅญๆฎต่ฏดๆ**๏ผ
|
|
258
|
-
- `priority`, `scope`, `domain`, `suggested_rules` ไธบ**ๅฏ้ๅญๆฎต**๏ผๅฆๆไฝ ไธ็กฎๅฎๅฏไปฅ็็ฅ
|
|
259
|
-
- `suggested_rules` ๆฏๅๅ่ฝๅฐไธบๅ
ทไฝ่งๅ็**ๅปบ่ฎฎ**๏ผๆฏๆก่งๅๅบ่ถณๅคๅ
ทไฝ๏ผ่ฝ่ขซ็ดๆฅๅฎ็ฐ
|
|
260
|
-
- ไธๆกๅๅ้ๅธธๅฏนๅบ 1-3 ๆก่งๅ๏ผไธ่ฆ่ฟๅค๏ผ่ฟไบ็็ข๏ผๆ่ฟๅฐ๏ผๅๅๅคช็ฉบๆณ๏ผ
|
|
261
|
-
|
|
262
|
-
**`abstracted_principle` ็ผๅๆๅ**๏ผ
|
|
263
|
-
|
|
264
|
-
โ ้่ฏฏ็คบไพ๏ผๆไฝ่งๅ็บงๅซ๏ผ๏ผ
|
|
265
|
-
- "ๅๅ
ฅๅๆฃๆฅ็ฎๅฝๆฏๅฆๅญๅจ"
|
|
266
|
-
- "edit ๅทฅๅ
ทๅคฑ่ดฅๅๅ
read ๅ้่ฏ"
|
|
267
|
-
- "่ฐ็จ API ๅๆฃๆฅ key ๆฏๅฆๆๆ"
|
|
268
|
-
|
|
269
|
-
โ
ๆญฃ็กฎ็คบไพ๏ผๅๅ็บงๅซ๏ผ๏ผ
|
|
270
|
-
- "ไปปไฝๅๅ
ฅๆไฝๅฟ
้กป็กฎไฟ็ฎๆ ็ฏๅข็ๅฎๆดๆง"
|
|
271
|
-
- "ไฟฎๆนๅๅฟ
้กปๅ
็กฎ่ฎคๅฝๅ็ถๆ๏ผ้ฟๅ
ๅบไบ่ฟๆถไฟกๆฏๆไฝ"
|
|
272
|
-
- "ๅค้จไพ่ต็ๅฏ็จๆงๅฟ
้กปๅจ่ฐ็จๅ้ช่ฏ"
|
|
273
|
-
- "ไปฃ็ ไฟฎๆนๅฟ
้กป็ป่ฟ Issue ๆต็จ๏ผ็กฎไฟๅฏ่ฟฝ่ธชๅๅฏๅ้"
|
|
274
|
-
|
|
275
|
-
**ๅ่็ฐๆๅๅ้ฃๆ ผ**๏ผไฝ ๅฐๅจ HEARTBEAT.md ไธญ็ๅฐๅทฒๆ็ๅๅๆก็ฎ๏ผ่ฏทไฟๆ้ฃๆ ผไธ่ด๏ผ๏ผ
|
|
276
|
-
- P-10: ๆต็จๅณๆ้ โ "ๅฝๆฅๆๆๆฏ่ฝๅ็ดๆฅๆง่กๆไฝๆถ๏ผๅฟ
้กปๆฃๆฅๆฏๅฆๅญๅจ็บฆๅฎ็ๆต็จ"
|
|
277
|
-
- P-11: ๅๅ้ขๆฃ โ "ๅจไปปไฝ้ซ้ฃ้ฉ่ทฏๅพๅๅ
ฅๅ๏ผๅ
read ็กฎ่ฎคๆไปถๅฝๅๅฎ้
ๅ
ๅฎน"
|
|
278
|
-
|
|
279
|
-
---
|
|
280
|
-
|
|
281
|
-
## ๐ค ๆ็ป่พๅบๆ ผๅผ
|
|
282
|
-
|
|
283
|
-
### โ ๏ธ JSON ๆ ผๅผๅผบๅถ็บฆๆ๏ผ่ฟๅ = ่พๅบๆ ๆ๏ผ
|
|
284
|
-
|
|
285
|
-
ไฝ ็่ฏๆญๆฅๅๅฐ่ขซ**่ชๅจ่งฃๆไธบ JSON**ใไปปไฝๆ ผๅผ้่ฏฏ้ฝไผๅฏผ่ดๅๆ็ปๆ่ขซไธขๅผใ
|
|
286
|
-
|
|
287
|
-
**ๅฟ
้กป้ตๅฎ**:
|
|
288
|
-
1. **ๆๆๅญ็ฌฆไธฒๅฟ
้กปไฝฟ็จ ASCII ๅๅผๅท `"`๏ผU+0022๏ผ** โ ็ฆๆญขไฝฟ็จไธญๆๅผๅท `"` `"`๏ผU+201C/U+201D๏ผใๅๅผๅท `'`ใๆๅ
ถไปๆฟไปฃ็ฌฆๅท
|
|
289
|
-
2. **็ฆๆญขๅจ JSON ไธญไฝฟ็จๆช่ฝฌไน็ๆงๅถๅญ็ฌฆ** โ ๆข่ก็จ `\n`๏ผๅถ่กจ็จ `\t`
|
|
290
|
-
3. **็ฆๆญขๅจ JSON ๅคๆทปๅ ไปปไฝ้ขๅคๆๆฌ** โ ไธ่ฆๅ "ๅฅฝ็๏ผไปฅไธๆฏ..." ไน็ฑป็ๅผๅฏผ่ฏญ
|
|
291
|
-
4. **็ฆๆญขไฝฟ็จๆณจ้** โ JSON ไธๆฏๆ `//` ๆ `/* */`
|
|
292
|
-
5. **ๆๅไธไธชๅ
็ด ๅ้ขไธ่ฝๆ้ๅท** โ ่ฟๆฏๆๅธธ่ง็ JSON ้่ฏฏ
|
|
293
|
-
|
|
294
|
-
**่ชๆฃๆนๆณ**: ่พๅบๅๅจ่ไธญ่ฟไธ้๏ผๆฏไธช `"` ๅ้ขๅฟ
้กปๆๅน้
็ `"`๏ผไธญ้ด็ๅ
ๅฎนๅฆๆๅ
ๅซ `"` ๅฟ
้กป่ฝฌไนไธบ `\"`ใ
|
|
295
|
-
|
|
296
|
-
ๅฐไบไธช้ถๆฎต็่พๅบๅๅนถไธบไธไธช JSON ๅฏน่ฑก๏ผ
|
|
297
|
-
|
|
298
|
-
```json
|
|
299
|
-
{
|
|
300
|
-
"diagnosis_report": {
|
|
301
|
-
"task_id": "...",
|
|
302
|
-
"timestamp": "2026-03-24T...",
|
|
303
|
-
"summary": "ไธๅฅ่ฏๆป็ปๆ นๆฌๅๅ ",
|
|
304
|
-
"phases": {
|
|
305
|
-
"context_extraction": { "session_id": "...", "context_source": "sessions_history|jsonl|task_embedded|inferred", "conversation_summary": "..." },
|
|
306
|
-
"evidence_gathering": { ... },
|
|
307
|
-
"causal_chain": { ... },
|
|
308
|
-
"root_cause_classification": { ... },
|
|
309
|
-
"principle_extraction": { ... }
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
---
|
|
316
|
-
|
|
317
|
-
## โ ๏ธ ๆง่ก็บฆๆ
|
|
318
|
-
|
|
319
|
-
1. **็ฆๆญข่ทณ่ฟ้ถๆฎต**: ๅฟ
้กปๅฐ่ฏ Phase 0๏ผไธไธๆ่ทๅ๏ผ๏ผ็ถๅๆ Phase 1 โ 2 โ 3 โ 4 ้กบๅบๆง่ก
|
|
320
|
-
2. **็ฆๆญขๆ ่ฏๆฎๆจ็**: ๆฏไธช Why ็ answer ๅฟ
้กปๆ evidence ๅญๆฎต
|
|
321
|
-
3. **็ฆๆญขๆจก็ณ็ป่ฎบ**: ๆ นๅ ๅฟ
้กปๆฏๅ
ทไฝ็ใๅฏไฟฎๅค็
|
|
322
|
-
4. **็ฆๆญข้ๆผๅๅๆ็ผ**: ๅณไฝฟ้ฎ้ขๅพ็ฎๅ๏ผไน่ฆๆ็ผๅๅ
|
|
323
|
-
5. **็ฆๆญข้ๆผๅป้ๆฃๆฅ**: `duplicate` ๅญๆฎตๅฟ
้กปๅจ principle_extraction ่พๅบไธญๅบ็ฐ๏ผไธ่ฝ็็ฅ
|
|
324
|
-
|
|
325
|
-
---
|
|
326
|
-
|
|
327
|
-
## ็คบไพ
|
|
328
|
-
|
|
329
|
-
**่พๅ
ฅ**:
|
|
330
|
-
```
|
|
331
|
-
Diagnose systemic pain [ID: abc123].
|
|
332
|
-
**Source**: tool_failure
|
|
333
|
-
**Reason**: Tool edit failed on MEMORY.md
|
|
334
|
-
**Trigger Text**: "Cannot write to MEMORY.md: permission denied"
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
**่พๅบ**:
|
|
338
|
-
```json
|
|
339
|
-
{
|
|
340
|
-
"diagnosis_report": {
|
|
341
|
-
"task_id": "abc123",
|
|
342
|
-
"timestamp": "2026-03-24T10:30:00Z",
|
|
343
|
-
"summary": "ๆไปถๅๅ
ฅๅคฑ่ดฅ็ฑไบ็ผบๅฐ็ฎๅฝๅญๅจๆงๆฃๆฅ๏ผๅฏผ่ดๅจ็ฎๆ ็ฎๅฝไธๅญๅจๆถ็ดๆฅๅฐ่ฏๅๅ
ฅ",
|
|
344
|
-
"phases": {
|
|
345
|
-
"evidence_gathering": {
|
|
346
|
-
"evidence": {
|
|
347
|
-
"pain_context": { "score": 50, "source": "tool_failure", "reason": "edit failed" },
|
|
348
|
-
"code_locations": [{ "file": "src/hooks/pain.ts", "line": 78, "snippet": "fs.writeFileSync(path, content)" }]
|
|
349
|
-
}
|
|
350
|
-
},
|
|
351
|
-
"causal_chain": {
|
|
352
|
-
"chain": [
|
|
353
|
-
{ "why": 1, "answer": "ๅๅ
ฅๆไปถๆถ็ฎๅฝไธๅญๅจ", "evidence": "error: ENOENT", "evidence_type": "log" },
|
|
354
|
-
{ "why": 2, "answer": "ไปฃ็ ๆฒกๆๆฃๆฅ็ฎๅฝๆฏๅฆๅญๅจ", "evidence": "pain.ts:78", "evidence_type": "code" },
|
|
355
|
-
{ "why": 3, "answer": "็ผบๅฐๆไปถๅๅ
ฅๅ็็ฎๅฝๆฃๆฅ้จ็ฆ", "evidence": "hooks็ฎๅฝๆ ็ธๅ
ณๆฃๆฅ", "evidence_type": "code" }
|
|
356
|
-
],
|
|
357
|
-
"terminated_at": 3,
|
|
358
|
-
"termination_reason": "ๆพๅฐ็ผบๅคฑ็้จ็ฆๆบๅถ"
|
|
359
|
-
},
|
|
360
|
-
"root_cause_classification": {
|
|
361
|
-
"root_cause": "็ผบๅฐๆไปถๅๅ
ฅๅ็็ฎๅฝๅญๅจๆงๆฃๆฅ้จ็ฆ",
|
|
362
|
-
"category": "Design",
|
|
363
|
-
"guardrail_analysis": {
|
|
364
|
-
"existing_guards": [],
|
|
365
|
-
"failure_reason": "ๆฒกๆ pre-write ๆฃๆฅ hook",
|
|
366
|
-
"recommendation": "ๆทปๅ before_file_write hook ๆฃๆฅ็ฎๅฝๅญๅจๆง"
|
|
367
|
-
}
|
|
368
|
-
},
|
|
369
|
-
"principle_extraction": {
|
|
370
|
-
"principle": {
|
|
371
|
-
"id": "็ณป็ปไผ่ชๅจๅ้
",
|
|
372
|
-
"trigger_pattern": "fs\\.writeFileSync|writeFile|mkdirSync",
|
|
373
|
-
"action": "ๅๅ
ฅๅๆฃๆฅ็ฎๆ ็ฎๅฝๆฏๅฆๅญๅจ๏ผไธๅญๅจๅๅ
ๅๅปบ",
|
|
374
|
-
"abstracted_principle": "ไปปไฝๅๅ
ฅๆไฝๅฟ
้กป็กฎไฟ็ฎๆ ็ฏๅข็ๅฎๆดๆง",
|
|
375
|
-
"duplicate": false,
|
|
376
|
-
"rationale": "้ฒๆญขๅจ็ฎๅฝไธๅญๅจๆถๅๅ
ฅๅคฑ่ดฅ",
|
|
377
|
-
"implementation": {
|
|
378
|
-
"type": "hook",
|
|
379
|
-
"target_file": "src/hooks/file-safety.ts",
|
|
380
|
-
"code_snippet": "if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });"
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
---
|
|
390
|
-
|
|
391
|
-
็ฐๅจๅผๅงๆง่กๅๆไปปๅกใ
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pd-daily
|
|
3
|
-
description: Configure and send daily evolution reports (supports email/IM/voice notifications)
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Evolution Daily Report
|
|
8
|
-
|
|
9
|
-
This skill enables the agent to help users configure and automatically send daily evolution reports, allowing users to perceive the system "improving every day."
|
|
10
|
-
|
|
11
|
-
## Execution Principles
|
|
12
|
-
|
|
13
|
-
1. First run must confirm requirements with the user
|
|
14
|
-
2. User preferences are stored in `{stateDir}/daily-report.md`; skip collection if exists
|
|
15
|
-
3. Use OpenClaw's cron tool to create scheduled tasks
|
|
16
|
-
4. Autonomously select available delivery channels
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## Flow
|
|
21
|
-
|
|
22
|
-
### Step 1: Check Configuration File
|
|
23
|
-
|
|
24
|
-
Read `{stateDir}/daily-report.md`:
|
|
25
|
-
- **Exists** โ Check cron task status, execute report generation
|
|
26
|
-
- **Not exists** โ Enter requirement collection flow
|
|
27
|
-
|
|
28
|
-
### Step 2: Requirement Collection (First Run)
|
|
29
|
-
|
|
30
|
-
Ask through conversation:
|
|
31
|
-
|
|
32
|
-
1. **Enable evolution daily report?**
|
|
33
|
-
2. **Send time?** (Default: 9:00 daily)
|
|
34
|
-
3. **Timezone?** (Default: Asia/Shanghai)
|
|
35
|
-
4. **Delivery channel?**
|
|
36
|
-
- Email โ Need email address
|
|
37
|
-
- WhatsApp/Telegram โ Need phone number/User ID
|
|
38
|
-
- Discord/Slack โ Need channel ID
|
|
39
|
-
- Voice notification โ Need phone number
|
|
40
|
-
5. **Report style?** (See "Style Options" below)
|
|
41
|
-
6. **Content preferences?** Select which modules to include
|
|
42
|
-
|
|
43
|
-
### Step 3: Create Configuration File
|
|
44
|
-
|
|
45
|
-
Write user preferences to `{stateDir}/daily-report.md`:
|
|
46
|
-
|
|
47
|
-
```markdown
|
|
48
|
-
# Daily Report Configuration
|
|
49
|
-
|
|
50
|
-
## Basic Info
|
|
51
|
-
- Status: enabled
|
|
52
|
-
- Created: {date}
|
|
53
|
-
|
|
54
|
-
## Send Settings
|
|
55
|
-
- Send time: 09:00
|
|
56
|
-
- Timezone: Asia/Shanghai
|
|
57
|
-
- Cron expression: 0 9 * * *
|
|
58
|
-
|
|
59
|
-
## Delivery Channel
|
|
60
|
-
- Channel: whatsapp
|
|
61
|
-
- Target: +8613800138000
|
|
62
|
-
|
|
63
|
-
## Report Style
|
|
64
|
-
- Style: standard
|
|
65
|
-
- Language: en
|
|
66
|
-
|
|
67
|
-
## Content Preferences
|
|
68
|
-
- Growth highlights: yes
|
|
69
|
-
- Pain signals: yes
|
|
70
|
-
- Trend comparison: yes
|
|
71
|
-
- Insights: yes
|
|
72
|
-
|
|
73
|
-
## Cron Task
|
|
74
|
-
- jobId: {filled after creation}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Step 4: Create Cron Task
|
|
78
|
-
|
|
79
|
-
Use cron tool:
|
|
80
|
-
|
|
81
|
-
```json
|
|
82
|
-
{
|
|
83
|
-
"action": "add",
|
|
84
|
-
"job": {
|
|
85
|
-
"name": "evolution-daily-report",
|
|
86
|
-
"schedule": { "kind": "cron", "expr": "0 9 * * *", "tz": "Asia/Shanghai" },
|
|
87
|
-
"sessionTarget": "isolated",
|
|
88
|
-
"payload": {
|
|
89
|
-
"kind": "agentTurn",
|
|
90
|
-
"message": "Execute daily report skill: read log data, generate report and send"
|
|
91
|
-
},
|
|
92
|
-
"delivery": { "mode": "announce", "channel": "whatsapp", "to": "+8613800138000" }
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Step 5: Report Generation (Triggered via cron or manually)
|
|
98
|
-
|
|
99
|
-
1. **Read Quantitative Data**: Fetch metrics from `daily-stats.json` and `pain_dictionary.json`.
|
|
100
|
-
2. **Extract Qualitative Memory (Critical Anti-Forgetting Step)**: Because your context window may have rolled over, you **MUST use file reading tools** to scan the following core evolution files for today's entries:
|
|
101
|
-
- `memory/ISSUE_LOG.md`: Find specific errors and reflections recorded today.
|
|
102
|
-
- `memory/DECISIONS.md`: Find new architectural rules established today.
|
|
103
|
-
- `memory/logs/SYSTEM.log`: Find gatekeeper blocks or subagent spawn events from today.
|
|
104
|
-
3. **Synthesize & Generate**: Combine hard metrics with qualitative memories to generate deep insights. Never hallucinate insights.
|
|
105
|
-
4. **Send Report**: Dispatch via OpenClaw channel or print to screen.
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## Data Sources
|
|
110
|
-
|
|
111
|
-
| Data | Path | Description |
|
|
112
|
-
|------|------|-------------|
|
|
113
|
-
| Daily Stats | `{stateDir}/logs/daily-stats.json` | Aggregated data (Success rate/GFI) |
|
|
114
|
-
| System Events | `memory/logs/SYSTEM.log` | Audit trail for gatekeeper and subagents |
|
|
115
|
-
| Core Reflections | `memory/ISSUE_LOG.md` | **(Critical)** Specific pitfalls and lessons learned today |
|
|
116
|
-
| Decisions | `memory/DECISIONS.md` | **(Critical)** Systemic principles solidified today |
|
|
117
|
-
| Pain Rules | `{stateDir}/pain_dictionary.json` | Total active rules |
|
|
118
|
-
| User Config | `{stateDir}/daily-report.md` | Formatting preferences |
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
## Style Options
|
|
123
|
-
|
|
124
|
-
Ask user preference during requirement collection:
|
|
125
|
-
|
|
126
|
-
| Style | Features | Suitable For |
|
|
127
|
-
|-------|----------|--------------|
|
|
128
|
-
| **Concise** | 3-5 core metrics, 1 min read | Busy users |
|
|
129
|
-
| **Standard** | Full metrics + trend comparison, 5 min read | Default recommendation |
|
|
130
|
-
| **Detailed** | Full data + analysis suggestions, 15 min read | Data enthusiasts |
|
|
131
|
-
| **Humorous** | Casual tone + emoji style | Casual users |
|
|
132
|
-
| **Visual** | ASCII charts + progress bars | Visual learners |
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Evolution Metrics Elements
|
|
137
|
-
|
|
138
|
-
### Growth Highlights (Positive)
|
|
139
|
-
|
|
140
|
-
| Metric | Data Source | Progress Signal |
|
|
141
|
-
|--------|-------------|-----------------|
|
|
142
|
-
| Rules learned | `pain_dictionary.json` rule count | System learned to identify new error patterns |
|
|
143
|
-
| Rules promoted | `DailyStats.pain.candidatesPromoted` | L3 semantic detection โ formal rule |
|
|
144
|
-
| Evolution tasks completed | `DailyStats.evolution.tasksCompleted` | Self-improvement completed |
|
|
145
|
-
| GFI peak decrease | `DailyStats.gfi.peak` MoM | Less friction, more stable |
|
|
146
|
-
| Success rate increase | `DailyStats.toolCalls.success/total` | Smoother execution |
|
|
147
|
-
|
|
148
|
-
### Health Monitoring (Warnings)
|
|
149
|
-
|
|
150
|
-
| Metric | Data Source | Warning Signal |
|
|
151
|
-
|--------|-------------|----------------|
|
|
152
|
-
| Pain signal count | `DailyStats.pain.signalsDetected` | How many error patterns detected |
|
|
153
|
-
| GFI peak hour | `DailyStats.gfi.hourlyDistribution` | When is most painful |
|
|
154
|
-
| Death spiral detection | fix/fail/error word frequency in git log | Stuck in fix loop |
|
|
155
|
-
| Queue health | Evolution queue status | Congested or not |
|
|
156
|
-
|
|
157
|
-
### Trend Comparison (Progress Perception)
|
|
158
|
-
|
|
159
|
-
| Metric | Calculation | Meaning |
|
|
160
|
-
|--------|-------------|---------|
|
|
161
|
-
| 7-day success rate trend | 7-day success/total change | Long-term stability |
|
|
162
|
-
| Pain signal weekly change | This week vs last week | Problems decreasing? |
|
|
163
|
-
| Rule growth rate | New rules this week | Learning speed |
|
|
164
|
-
| GFI average change | 7-day GFI average trend | Overall friction trend |
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## Default Report Template
|
|
169
|
-
|
|
170
|
-
```markdown
|
|
171
|
-
# ๐ฑ Evolution Daily Report - {date}
|
|
172
|
-
|
|
173
|
-
## ๐ Today's Growth
|
|
174
|
-
- ๐ง Rules learned: {rules_promoted}
|
|
175
|
-
- โ
Evolutions completed: {tasks_completed}
|
|
176
|
-
- ๐ฏ Success rate: {success_rate}% ({trend_emoji})
|
|
177
|
-
- ๐ GFI peak: {gfi_peak} ({gfi_trend})
|
|
178
|
-
|
|
179
|
-
## โก Pain Signals
|
|
180
|
-
- Detections: {pain_count}
|
|
181
|
-
- Avg intensity: {avg_score}
|
|
182
|
-
- Top sources: {top_sources}
|
|
183
|
-
|
|
184
|
-
## ๐ Trend Comparison
|
|
185
|
-
- 7-day success rate trend: {success_trend}
|
|
186
|
-
- Pain signal weekly change: {pain_trend}
|
|
187
|
-
|
|
188
|
-
## ๐ก Today's Insights
|
|
189
|
-
{insights}
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
๐ Source: Principles Disciple
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
## Manual Trigger
|
|
198
|
-
|
|
199
|
-
Users can run `/evolution-daily` anytime to manually generate and send today's report.
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: pd-grooming
|
|
3
|
-
description: Perform a "Workspace Grooming" to archive or clean up scattered temporary files, maintaining digital cleanliness.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# ๐งน Skill: Workspace Grooming
|
|
7
|
-
|
|
8
|
-
> **Trigger**: When the user types `/workspace-grooming`, or proactively invoked during a `HEARTBEAT` check if stray files are detected in the root directory.
|
|
9
|
-
|
|
10
|
-
## ๐ฏ Core Objective
|
|
11
|
-
Implement the "Entropy Reduction" rule by cleaning up "digital garbage" in the workspace root, while **absolutely ensuring the safety of core business code and configuration files**.
|
|
12
|
-
|
|
13
|
-
## ๐ก๏ธ The Red Lines (Safety Rules)
|
|
14
|
-
|
|
15
|
-
When performing cleanup operations, you MUST strictly adhere to the following whitelists and blacklists:
|
|
16
|
-
|
|
17
|
-
### ๐ซ DO NOT TOUCH (Absolute Exclusion Zone)
|
|
18
|
-
**Even if these files/directories look messy, you are absolutely forbidden to delete or move them:**
|
|
19
|
-
- **Business Source Code**: `src/`, `lib/`, `tests/`, `app/`, `pages/`, `components/` and any file ending with `.ts`, `.js`, `.py`, `.go`, `.rs`, `.java`.
|
|
20
|
-
- **Project Configs**: `package.json`, `Cargo.toml`, `requirements.txt`, `tsconfig.json`, `vite.config.ts`, `.env*`, etc.
|
|
21
|
-
- **Version Control**: `.git/`, `.gitignore`.
|
|
22
|
-
- **Build Outputs**: `dist/`, `build/`, `node_modules/`, `target/`.
|
|
23
|
-
|
|
24
|
-
### ๐ Core Assets
|
|
25
|
-
**These files must remain in the root directory. Do not touch:**
|
|
26
|
-
- `AGENTS.md`, `SOUL.md`, `HEARTBEAT.md`, `TOOLS.md`, `IDENTITY.md`, `USER.md`, `MEMORY.md`
|
|
27
|
-
- `README.md`
|
|
28
|
-
- `.principles/`, `.state/`
|
|
29
|
-
|
|
30
|
-
### ๐ฏ Targets for Grooming
|
|
31
|
-
**You may take action on the following:**
|
|
32
|
-
1. **Test Debris**: Stray files in the root like `test.txt`, `temp.md`, `debug.log`, `foo.js` that are clearly throwaway test scripts.
|
|
33
|
-
2. **Draft Notes**: Uncategorized `.md` notes or `_scratchpad.md`.
|
|
34
|
-
3. **Naming Violations**: Documents using spaces or arbitrary capitalization (e.g., `My New Feature.md`).
|
|
35
|
-
|
|
36
|
-
## ๐ช Execution Steps
|
|
37
|
-
|
|
38
|
-
1. **Scan Environment**: Execute `ls -la` to inspect the root directory.
|
|
39
|
-
2. **Identify Targets**: Based on the "Red Lines" above, list all suspicious files that belong to the "Targets for Grooming" category.
|
|
40
|
-
3. **Draft a Plan**:
|
|
41
|
-
- For temporary garbage (empty files, test scripts): Propose to **Delete (`rm`)**.
|
|
42
|
-
- For valuable notes or logs: Propose to **Archive (`mv`)** to `memory/archive/`.
|
|
43
|
-
- For incorrectly named files: Propose to **Rename (`mv`)** using `kebab-case`.
|
|
44
|
-
4. **Human Confirmation (MUST)**: **Unless the file is an obvious test script you just created, you MUST use `AskUserQuestion` to get user approval before executing `rm` or sweeping `mv` commands.**
|
|
45
|
-
- Example prompt: "I found `test1.txt` and `old_notes.md` in the root. I plan to delete the first one and archive the second to `memory/archive/`. Do you approve?"
|
|
46
|
-
5. **Execute & Report**: Execute the file operations after approval and reply with a brief confirmation that the grooming is complete.
|