create-principles-disciple 1.73.0 → 1.74.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/LICENSE +21 -21
- package/README.md +24 -0
- package/console/dist/server/index.js +13 -1
- package/console/dist/server/routes/agents.js +3 -118
- package/console/dist/server/routes/update-history.d.ts +12 -0
- package/console/dist/server/routes/update-history.js +52 -0
- package/console/dist/server/routes/update.d.ts +10 -0
- package/console/dist/server/routes/update.js +435 -0
- package/console/dist/ui/App.js +2 -1
- package/console/dist/ui/components/UpdateBanner.d.ts +1 -0
- package/console/dist/ui/components/UpdateBanner.js +41 -0
- package/console/dist/ui/components/UpdateProgressDialog.d.ts +12 -0
- package/console/dist/ui/components/UpdateProgressDialog.js +28 -0
- package/console/dist/ui/i18n/en.json +0 -1
- package/console/dist/ui/i18n/zh-CN.json +0 -1
- package/console/dist/ui/pages/AgentsPage.js +3 -17
- package/console/dist/ui/pages/TasksPage.js +0 -1
- package/console/dist/ui/pages/UpdatePage.d.ts +1 -0
- package/console/dist/ui/pages/UpdatePage.js +142 -0
- package/console/dist/web/assets/app.css +7 -0
- package/console/dist/web/assets/app.js +456 -173
- package/console/package.json +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.js +270 -0
- package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts +1 -1
- 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 -3
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/core/dist/runtime-v2/adapter/schema-prompt-adapter.d.ts +13 -0
- package/core/dist/runtime-v2/adapter/schema-prompt-adapter.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/schema-prompt-adapter.js +266 -0
- package/core/dist/runtime-v2/adapter/schema-prompt-adapter.js.map +1 -0
- package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.d.ts +3 -7
- package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.js +7 -19
- package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.js +97 -15
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician-output.d.ts +0 -10
- package/core/dist/runtime-v2/diagnostician-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician-output.js +5 -10
- package/core/dist/runtime-v2/diagnostician-output.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts +6 -1
- package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician-prompt-builder.js +23 -15
- package/core/dist/runtime-v2/diagnostician-prompt-builder.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +67 -0
- package/dist/installer.js.map +1 -1
- package/dist/uninstaller.d.ts +0 -5
- package/dist/uninstaller.d.ts.map +1 -1
- package/dist/uninstaller.js +53 -8
- package/dist/uninstaller.js.map +1 -1
- package/dist/updater.d.ts +45 -0
- package/dist/updater.d.ts.map +1 -0
- package/dist/updater.js +333 -0
- package/dist/updater.js.map +1 -0
- package/dist/utils/env.d.ts +6 -0
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +54 -0
- package/dist/utils/env.js.map +1 -1
- package/package.json +6 -2
- package/pd-cli/dist/index.js +4 -1
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/package.json +2 -2
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/runtime/.gitignore +2 -2
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/runtime/.gitignore +2 -2
- package/core/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.d.ts +0 -2
- package/core/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.js +0 -215
- package/core/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.js.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.d.ts +0 -2
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.js +0 -92
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.js.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.d.ts +0 -2
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.js +0 -134
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.js.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.d.ts +0 -2
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.js +0 -226
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.js.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-decision.d.ts +0 -3
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-decision.d.ts.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-decision.js +0 -5
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-decision.js.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-policy.d.ts +0 -4
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-policy.d.ts.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-policy.js +0 -81
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-policy.js.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-types.d.ts +0 -29
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-types.d.ts.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-types.js +0 -15
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-types.js.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/index.d.ts +0 -5
- package/core/dist/runtime-v2/idle-trigger/index.d.ts.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/index.js +0 -4
- package/core/dist/runtime-v2/idle-trigger/index.js.map +0 -1
- package/core/dist/runtime-v2/nocturnal/candidate-scoring.d.ts +0 -486
- package/core/dist/runtime-v2/nocturnal/candidate-scoring.d.ts.map +0 -1
- package/core/dist/runtime-v2/nocturnal/candidate-scoring.js +0 -493
- package/core/dist/runtime-v2/nocturnal/candidate-scoring.js.map +0 -1
- package/core/dist/runtime-v2/nocturnal/index.d.ts +0 -9
- package/core/dist/runtime-v2/nocturnal/index.d.ts.map +0 -1
- package/core/dist/runtime-v2/nocturnal/index.js +0 -5
- package/core/dist/runtime-v2/nocturnal/index.js.map +0 -1
- package/core/dist/runtime-v2/nocturnal/nocturnal-compliance.d.ts +0 -185
- package/core/dist/runtime-v2/nocturnal/nocturnal-compliance.d.ts.map +0 -1
- package/core/dist/runtime-v2/nocturnal/nocturnal-compliance.js +0 -912
- package/core/dist/runtime-v2/nocturnal/nocturnal-compliance.js.map +0 -1
- package/core/dist/runtime-v2/nocturnal/snapshot-contract.d.ts +0 -192
- package/core/dist/runtime-v2/nocturnal/snapshot-contract.d.ts.map +0 -1
- package/core/dist/runtime-v2/nocturnal/snapshot-contract.js +0 -185
- package/core/dist/runtime-v2/nocturnal/snapshot-contract.js.map +0 -1
- package/core/dist/runtime-v2/nocturnal/trinity-types.d.ts +0 -421
- package/core/dist/runtime-v2/nocturnal/trinity-types.d.ts.map +0 -1
- package/core/dist/runtime-v2/nocturnal/trinity-types.js +0 -182
- package/core/dist/runtime-v2/nocturnal/trinity-types.js.map +0 -1
- package/pd-cli/dist/commands/runtime-idle-trigger.d.ts +0 -12
- package/pd-cli/dist/commands/runtime-idle-trigger.d.ts.map +0 -1
- package/pd-cli/dist/commands/runtime-idle-trigger.js +0 -102
- package/pd-cli/dist/commands/runtime-idle-trigger.js.map +0 -1
- package/plugin/dist/bundle.js +0 -2424
- package/plugin/dist/core/trajectory/index.js +0 -1804
- package/plugin/dist/openclaw.plugin.json +0 -65
- package/plugin/dist/templates/langs/en/core/AGENTS.md +0 -205
- package/plugin/dist/templates/langs/en/core/BOOT.md +0 -60
- package/plugin/dist/templates/langs/en/core/BOOTSTRAP.md +0 -273
- package/plugin/dist/templates/langs/en/core/HEARTBEAT.md +0 -74
- package/plugin/dist/templates/langs/en/core/IDENTITY.md +0 -8
- package/plugin/dist/templates/langs/en/core/PRINCIPLES.md +0 -10
- package/plugin/dist/templates/langs/en/core/SOUL.md +0 -46
- package/plugin/dist/templates/langs/en/core/TOOLS.md +0 -15
- package/plugin/dist/templates/langs/en/core/USER.md +0 -10
- package/plugin/dist/templates/langs/en/pain/00_seed_samples.md +0 -23
- package/plugin/dist/templates/langs/en/pain_dictionary.json +0 -22
- package/plugin/dist/templates/langs/en/principles/THINKING_OS.md +0 -64
- package/plugin/dist/templates/langs/en/skills/admin/SKILL.md +0 -39
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/EXAMPLES.md +0 -63
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/REFERENCE.md +0 -136
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/SKILL.md +0 -67
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/agent-registry.json +0 -143
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/specs/bugfix-complex-template.json +0 -107
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/specs/feature-complex-template.json +0 -107
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal-verify.json +0 -95
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal.json +0 -98
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/workflow-v1-acceptance-checklist.md +0 -58
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/workflow-v1.4-work-unit-handoff.md +0 -190
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/runtime/.gitignore +0 -2
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/archive.mjs +0 -310
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/contract-enforcement.mjs +0 -683
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/decision.mjs +0 -604
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/state-store.mjs +0 -32
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/task-specs.mjs +0 -707
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/run.mjs +0 -3455
- package/plugin/dist/templates/langs/en/skills/bootstrap-tools/SKILL.md +0 -53
- package/plugin/dist/templates/langs/en/skills/deductive-audit/SKILL.md +0 -36
- package/plugin/dist/templates/langs/en/skills/evolution-framework-update/SKILL.md +0 -31
- package/plugin/dist/templates/langs/en/skills/evolve-system/SKILL.md +0 -46
- package/plugin/dist/templates/langs/en/skills/evolve-task/SKILL.md +0 -83
- package/plugin/dist/templates/langs/en/skills/feedback/SKILL.md +0 -51
- package/plugin/dist/templates/langs/en/skills/init-strategy/SKILL.md +0 -54
- package/plugin/dist/templates/langs/en/skills/inject-rule/SKILL.md +0 -19
- package/plugin/dist/templates/langs/en/skills/manage-okr/SKILL.md +0 -96
- package/plugin/dist/templates/langs/en/skills/pd-auditor/SKILL.md +0 -61
- package/plugin/dist/templates/langs/en/skills/pd-cli-operator/SKILL.md +0 -67
- package/plugin/dist/templates/langs/en/skills/pd-daily/SKILL.md +0 -199
- package/plugin/dist/templates/langs/en/skills/pd-diagnostician/SKILL.md +0 -466
- package/plugin/dist/templates/langs/en/skills/pd-explorer/SKILL.md +0 -65
- package/plugin/dist/templates/langs/en/skills/pd-grooming/SKILL.md +0 -46
- package/plugin/dist/templates/langs/en/skills/pd-implementer/SKILL.md +0 -68
- package/plugin/dist/templates/langs/en/skills/pd-mentor/SKILL.md +0 -230
- package/plugin/dist/templates/langs/en/skills/pd-pain-signal/SKILL.md +0 -30
- package/plugin/dist/templates/langs/en/skills/pd-planner/SKILL.md +0 -65
- package/plugin/dist/templates/langs/en/skills/pd-runtime-v2/SKILL.md +0 -61
- package/plugin/dist/templates/langs/en/skills/plan-script/SKILL.md +0 -32
- package/plugin/dist/templates/langs/en/skills/profile/SKILL.md +0 -24
- package/plugin/dist/templates/langs/en/skills/reflection/SKILL.md +0 -40
- package/plugin/dist/templates/langs/en/skills/reflection-log/SKILL.md +0 -37
- package/plugin/dist/templates/langs/en/skills/report/SKILL.md +0 -13
- package/plugin/dist/templates/langs/en/skills/root-cause/SKILL.md +0 -33
- package/plugin/dist/templates/langs/en/skills/triage/SKILL.md +0 -29
- package/plugin/dist/templates/langs/en/skills/watch-evolution/SKILL.md +0 -33
- package/plugin/dist/templates/langs/zh/core/AGENTS.md +0 -197
- package/plugin/dist/templates/langs/zh/core/BOOT.md +0 -60
- package/plugin/dist/templates/langs/zh/core/BOOTSTRAP.md +0 -273
- package/plugin/dist/templates/langs/zh/core/HEARTBEAT.md +0 -98
- package/plugin/dist/templates/langs/zh/core/IDENTITY.md +0 -8
- package/plugin/dist/templates/langs/zh/core/PRINCIPLES.md +0 -7
- package/plugin/dist/templates/langs/zh/core/SOUL.md +0 -46
- package/plugin/dist/templates/langs/zh/core/TOOLS.md +0 -15
- package/plugin/dist/templates/langs/zh/core/USER.md +0 -10
- package/plugin/dist/templates/langs/zh/pain/00_seed_samples.md +0 -24
- package/plugin/dist/templates/langs/zh/pain_dictionary.json +0 -18
- package/plugin/dist/templates/langs/zh/principles/THINKING_OS.md +0 -64
- package/plugin/dist/templates/langs/zh/skills/admin/SKILL.md +0 -41
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/EXAMPLES.md +0 -63
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/REFERENCE.md +0 -136
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/SKILL.md +0 -67
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/agent-registry.json +0 -143
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/bugfix-complex-template.json +0 -107
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/feature-complex-template.json +0 -107
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/nocturnal-trinity-quality-enhancement.json +0 -111
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal-verify.json +0 -95
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal.json +0 -98
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/workflow-v1-acceptance-checklist.md +0 -58
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/workflow-v1.4-work-unit-handoff.md +0 -190
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/runtime/.gitignore +0 -2
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/archive.mjs +0 -310
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/contract-enforcement.mjs +0 -683
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/decision.mjs +0 -604
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/state-store.mjs +0 -32
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/task-specs.mjs +0 -707
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/run.mjs +0 -3455
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/test/archive.test.mjs +0 -230
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/test/contract-enforcement.test.mjs +0 -672
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/test/decision.test.mjs +0 -1321
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/test/run.test.mjs +0 -1435
- package/plugin/dist/templates/langs/zh/skills/bootstrap-tools/SKILL.md +0 -52
- package/plugin/dist/templates/langs/zh/skills/deductive-audit/SKILL.md +0 -36
- package/plugin/dist/templates/langs/zh/skills/evolution-framework-update/SKILL.md +0 -31
- package/plugin/dist/templates/langs/zh/skills/evolve-system/SKILL.md +0 -46
- package/plugin/dist/templates/langs/zh/skills/evolve-task/SKILL.md +0 -83
- package/plugin/dist/templates/langs/zh/skills/feedback/SKILL.md +0 -53
- package/plugin/dist/templates/langs/zh/skills/init-strategy/SKILL.md +0 -54
- package/plugin/dist/templates/langs/zh/skills/inject-rule/SKILL.md +0 -19
- package/plugin/dist/templates/langs/zh/skills/manage-okr/SKILL.md +0 -109
- package/plugin/dist/templates/langs/zh/skills/pd-auditor/SKILL.md +0 -61
- package/plugin/dist/templates/langs/zh/skills/pd-cli-operator/SKILL.md +0 -67
- package/plugin/dist/templates/langs/zh/skills/pd-daily/SKILL.md +0 -283
- package/plugin/dist/templates/langs/zh/skills/pd-diagnostician/SKILL.md +0 -391
- package/plugin/dist/templates/langs/zh/skills/pd-explorer/SKILL.md +0 -65
- package/plugin/dist/templates/langs/zh/skills/pd-grooming/SKILL.md +0 -46
- package/plugin/dist/templates/langs/zh/skills/pd-implementer/SKILL.md +0 -68
- package/plugin/dist/templates/langs/zh/skills/pd-mentor/SKILL.md +0 -230
- package/plugin/dist/templates/langs/zh/skills/pd-pain-signal/SKILL.md +0 -30
- package/plugin/dist/templates/langs/zh/skills/pd-planner/SKILL.md +0 -65
- package/plugin/dist/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +0 -61
- package/plugin/dist/templates/langs/zh/skills/plan-script/SKILL.md +0 -32
- package/plugin/dist/templates/langs/zh/skills/profile/SKILL.md +0 -24
- package/plugin/dist/templates/langs/zh/skills/reflection/SKILL.md +0 -40
- package/plugin/dist/templates/langs/zh/skills/reflection-log/SKILL.md +0 -37
- package/plugin/dist/templates/langs/zh/skills/report/SKILL.md +0 -13
- package/plugin/dist/templates/langs/zh/skills/root-cause/SKILL.md +0 -33
- package/plugin/dist/templates/langs/zh/skills/triage/SKILL.md +0 -29
- package/plugin/dist/templates/langs/zh/skills/watch-evolution/SKILL.md +0 -33
- package/plugin/dist/templates/pain_dictionary.json +0 -36
- package/plugin/dist/templates/pain_settings.json +0 -103
- package/plugin/dist/templates/workspace/.principles/DECISION_POLICY.json +0 -44
- package/plugin/dist/templates/workspace/.principles/PRINCIPLES.md +0 -20
- package/plugin/dist/templates/workspace/.principles/PROFILE.json +0 -54
- package/plugin/dist/templates/workspace/.principles/PROFILE.schema.json +0 -56
- package/plugin/dist/templates/workspace/.principles/THINKING_OS.md +0 -64
- package/plugin/dist/templates/workspace/.principles/THINKING_OS_ARCHIVE.md +0 -7
- package/plugin/dist/templates/workspace/.principles/THINKING_OS_CANDIDATES.md +0 -9
- package/plugin/dist/templates/workspace/.principles/models/_INDEX.md +0 -27
- package/plugin/dist/templates/workspace/.principles/models/first_principles.md +0 -62
- package/plugin/dist/templates/workspace/.principles/models/marketing_4p.md +0 -52
- package/plugin/dist/templates/workspace/.principles/models/porter_five.md +0 -63
- package/plugin/dist/templates/workspace/.principles/models/swot.md +0 -60
- package/plugin/dist/templates/workspace/.principles/models/user_story_map.md +0 -63
- package/plugin/dist/templates/workspace/.state/WORKBOARD.json +0 -4
- package/plugin/dist/templates/workspace/AUDIT.md +0 -15
- package/plugin/dist/templates/workspace/PLAN.md +0 -2
- package/plugin/dist/templates/workspace/okr/CURRENT_FOCUS.md +0 -57
- package/plugin/dist/templates/workspace/okr/RECOVERY_PROTOCOL.md +0 -56
- package/plugin/dist/templates/workspace/okr/TASK_CHANGES.jsonl +0 -6
- package/plugin/dist/templates/workspace/okr/WEEK_TASKS.json +0 -6
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: reflection-log
|
|
3
|
-
description: Final task reflection and evolution logging. Use to capture pain signals, update profiles, and propose new principles.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Reflection & Evolution (反思与落盘)
|
|
8
|
-
|
|
9
|
-
**目标**: 将单次任务的经验转化为系统的永久记忆。
|
|
10
|
-
|
|
11
|
-
请执行以下结项操作:
|
|
12
|
-
|
|
13
|
-
## 1. Pain Summary (痛苦摘要)
|
|
14
|
-
- 简述本次任务中最折磨、最耗时或导致失败的点。
|
|
15
|
-
|
|
16
|
-
## 2. Issue Logging
|
|
17
|
-
- **Action**: 将详细的 Pain Signal 和诊断结果追加到 `memory/ISSUE_LOG.md`。
|
|
18
|
-
|
|
19
|
-
## 3. Evolution Candidates
|
|
20
|
-
- **Principle**: 提议一条新原则(P-XX)。
|
|
21
|
-
- **Guardrail**: 建议一个具体的 Hook、Rule 或 Test。
|
|
22
|
-
- **路径拦截**: 建议将敏感目录加入 `.principles/PROFILE.json` 的 `risk_paths`。
|
|
23
|
-
- **行为拦截**: 建议在 `.principles/PROFILE.json` 的 `custom_guards` 中添加正则,以拦截特定工具的危险调用(如 `Edit.*SYSTEM`)。
|
|
24
|
-
|
|
25
|
-
## 4. Positive Reinforcement (正向强化)
|
|
26
|
-
- **检查卓越信号**:
|
|
27
|
-
1. 用户明确的赞赏 (Quote user).
|
|
28
|
-
2. 性能/质量指标的客观跃迁 (Cite data).
|
|
29
|
-
3. Reviewer 的高度评价 (Excellent/Elegant).
|
|
30
|
-
- **提取模式**: 如果存在上述信号,在 `.state/.user_verdict.json` 中额外记录 `achievement` 字段,描述本次成功的行为模式。
|
|
31
|
-
|
|
32
|
-
## 5. Attribution (画像更新)
|
|
33
|
-
- **Agent Scorecard**: 评估本次使用的子智能体表现,写入 `.state/.verdict.json`。格式遵循 `@.principles/schemas/agent_verdict_schema.json`。
|
|
34
|
-
- **User Profile**: 评估用户指令质量与偏好,写入 `.state/.user_verdict.json`。格式遵循 `@.principles/schemas/user_verdict_schema.json`。
|
|
35
|
-
|
|
36
|
-
## 6. Cleanup
|
|
37
|
-
- 清理所有中间标记文件(如 `.pain_flag`, `.verdict.json` 等)。
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: report
|
|
3
|
-
description: Manually request a formal status report from the Reporter agent.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# /report: 获取工作汇报
|
|
8
|
-
|
|
9
|
-
用户(老板)要求立即汇报工作。
|
|
10
|
-
|
|
11
|
-
## 执行动作
|
|
12
|
-
1. 立即委派 ``pd_spawn_agent(reporter)``。
|
|
13
|
-
2. 任务描述:“老板想知道当前的情况。请分析当前的对话上下文、`PLAN.md` 和最近的 `memory/ISSUE_LOG.md`,为老板写一份优雅的汇报。请记住先看他的画像!”
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: root-cause
|
|
3
|
-
description: Deep dive analysis into why a problem occurred. Uses the 5 Whys method and classifies the cause.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Root Cause Analysis (根因分析)
|
|
8
|
-
|
|
9
|
-
**目标**: 穿透现象看本质,防止重复犯错。
|
|
10
|
-
|
|
11
|
-
请按以下格式执行诊断:
|
|
12
|
-
|
|
13
|
-
## 1. Proximal Cause (直接原因)
|
|
14
|
-
- **动词驱动**: 描述了什么具体操作或缺失导致了即时失败。
|
|
15
|
-
|
|
16
|
-
## 2. 5 Whys (深度追问)
|
|
17
|
-
1. 为什么直接原因会发生?
|
|
18
|
-
2. ...
|
|
19
|
-
3. ...
|
|
20
|
-
4. ...
|
|
21
|
-
5. 追问到系统性或认知性根源。
|
|
22
|
-
|
|
23
|
-
## 3. Root Cause (根本原因)
|
|
24
|
-
- **形容词/设计驱动**: 描述系统架构、流程缺陷或错误的假设。
|
|
25
|
-
- **Guardrail Failure Analysis**: 为什么现有的门禁 (Hooks) 或 规则 (Rules) 没能拦截这个错误?是规则缺失、匹配不严还是逻辑漏洞?
|
|
26
|
-
|
|
27
|
-
## 4. Category (分类)
|
|
28
|
-
- [ ] **People**: 能力盲区、习惯问题。
|
|
29
|
-
- [ ] **Design**: 流程/工具缺陷、门禁不足、架构漏洞。
|
|
30
|
-
- [ ] **Assumption**: 对环境、版本或依赖的错误前提假设。
|
|
31
|
-
|
|
32
|
-
## 5. Principle Candidate (原则提炼)
|
|
33
|
-
- 如果我们修复了这个问题,应该增加什么原则防止它再次发生?
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: triage
|
|
3
|
-
description: Initial problem definition and risk assessment. Use to collect environment info, reproduction steps, and logs.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Triage (问题分诊)
|
|
8
|
-
|
|
9
|
-
**目标**: 收集足够的证据来定义问题,并评估变更风险。
|
|
10
|
-
|
|
11
|
-
请按以下结构输出:
|
|
12
|
-
|
|
13
|
-
## 1. Goal (目标)
|
|
14
|
-
- 一句话描述本次任务的最终成功标准。
|
|
15
|
-
|
|
16
|
-
## 2. Problem (问题描述)
|
|
17
|
-
- 当前发生了什么?预期的行为是什么?
|
|
18
|
-
- **Evidence**: 列出相关的日志片段、错误代码或观察到的异常现象。
|
|
19
|
-
|
|
20
|
-
## 3. Reproduction (复现步骤)
|
|
21
|
-
- 提供明确的复现命令或操作序列。
|
|
22
|
-
- 标注当前环境的关键变量。
|
|
23
|
-
|
|
24
|
-
## 4. Scope (范围)
|
|
25
|
-
- 涉及的文件或模块预览。
|
|
26
|
-
- **Risk Level**: Low / Medium / High (基于 `.principles/PROFILE.json` 定义)。
|
|
27
|
-
|
|
28
|
-
## 5. Next Step
|
|
29
|
-
- 建议委派哪个子智能体 (通常是 Explorer) 进一步收集证据。
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: watch-evolution
|
|
3
|
-
description: Start the background evolution daemon to process queued tasks from EVOLUTION_QUEUE.json.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# /watch-evolution: 后台进化守护者
|
|
7
|
-
|
|
8
|
-
**目标**: 启动一个持续运行的进程,自动分析并修复积压的代码问题。
|
|
9
|
-
|
|
10
|
-
## 1. 运行环境准备
|
|
11
|
-
- 确保已配置 `.principles/PROFILE.json` 中的 `evolution_mode: "async"`。
|
|
12
|
-
- 确保 `.state/evolution_queue.json` 存在。
|
|
13
|
-
|
|
14
|
-
## 2. 启动指令
|
|
15
|
-
请运行以下命令启动守护进程:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
python scripts/evolution_daemon.py
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## 3. 工作流程
|
|
22
|
-
1. **自动扫描**: 每隔 30 秒扫描一次 `.state/evolution_queue.json`。
|
|
23
|
-
2. **调度策略**:
|
|
24
|
-
- 按 `priority` 从高到低处理任务(高优先级先执行)。
|
|
25
|
-
- `status: retrying` 的任务仅在 `next_retry_at` 到期后才会再次执行。
|
|
26
|
-
- 失败任务进入指数退避重试,超过最大尝试次数后标记为 `failed`。
|
|
27
|
-
3. **诊断 (Diagnosis)**: 加载 `root-cause` 技能,通过 Headless 模式定位错误根因。
|
|
28
|
-
4. **修复 (Fix)**: 加载修复技能,自动修改代码并运行测试。
|
|
29
|
-
5. **落盘 (Log)**: 调用 `reflection-log` 将经验存入 `PRINCIPLES.md` 和 `ISSUE_LOG.md`。
|
|
30
|
-
6. **看板**: 实时更新 `memory/EVOLUTION_PRD.md` 展示进度。
|
|
31
|
-
|
|
32
|
-
## 4. 退出
|
|
33
|
-
- 按 `Ctrl+C` 停止后台任务。任务的状态将被保留在 JSON 中,下次启动可继续执行。
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"rules": {
|
|
3
|
-
"P_CONFUSION_ZH": {
|
|
4
|
-
"type": "regex",
|
|
5
|
-
"pattern": "我(似乎|好像)(不确定|不太确定|不清楚|困惑)",
|
|
6
|
-
"severity": 35,
|
|
7
|
-
"hits": 0,
|
|
8
|
-
"status": "active"
|
|
9
|
-
},
|
|
10
|
-
"P_CONFUSION_EN": {
|
|
11
|
-
"type": "regex",
|
|
12
|
-
"pattern": "i am (not sure|unsure|confused|uncertain|struggling to)",
|
|
13
|
-
"severity": 35,
|
|
14
|
-
"hits": 0,
|
|
15
|
-
"status": "active"
|
|
16
|
-
},
|
|
17
|
-
"P_LOOP_ZH": {
|
|
18
|
-
"type": "regex",
|
|
19
|
-
"pattern": "似乎(陷入了?循环|回到了?原点|原地打转)",
|
|
20
|
-
"severity": 45,
|
|
21
|
-
"hits": 0,
|
|
22
|
-
"status": "active"
|
|
23
|
-
},
|
|
24
|
-
"P_LOOP_EN": {
|
|
25
|
-
"type": "exact_match",
|
|
26
|
-
"phrases": [
|
|
27
|
-
"going in circles",
|
|
28
|
-
"back to square one",
|
|
29
|
-
"looping"
|
|
30
|
-
],
|
|
31
|
-
"severity": 45,
|
|
32
|
-
"hits": 0,
|
|
33
|
-
"status": "active"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"language": "zh",
|
|
3
|
-
"thresholds": {
|
|
4
|
-
"pain_trigger": 40,
|
|
5
|
-
"cognitive_paralysis_input": 4000,
|
|
6
|
-
"stuck_loops_trigger": 4,
|
|
7
|
-
"semantic_min_score": 0.7,
|
|
8
|
-
"promotion_count_threshold": 3,
|
|
9
|
-
"promotion_similarity_threshold": 0.8
|
|
10
|
-
},
|
|
11
|
-
"scores": {
|
|
12
|
-
"paralysis": 30,
|
|
13
|
-
"default_confusion": 30,
|
|
14
|
-
"default_loop": 40,
|
|
15
|
-
"tool_failure_friction": 15,
|
|
16
|
-
"exit_code_penalty": 50,
|
|
17
|
-
"spiral_penalty": 30,
|
|
18
|
-
"missing_test_command_penalty": 20,
|
|
19
|
-
"subagent_error_penalty": 60,
|
|
20
|
-
"subagent_timeout_penalty": 50
|
|
21
|
-
},
|
|
22
|
-
"severity_thresholds": {
|
|
23
|
-
"high": 70,
|
|
24
|
-
"medium": 40,
|
|
25
|
-
"low": 20
|
|
26
|
-
},
|
|
27
|
-
"intervals": {
|
|
28
|
-
"worker_poll_ms": 900000,
|
|
29
|
-
"initial_delay_ms": 5000,
|
|
30
|
-
"task_timeout_ms": 3600000
|
|
31
|
-
},
|
|
32
|
-
"trust": {
|
|
33
|
-
"stages": {
|
|
34
|
-
"stage_1_observer": 30,
|
|
35
|
-
"stage_2_editor": 60,
|
|
36
|
-
"stage_3_developer": 80
|
|
37
|
-
},
|
|
38
|
-
"cold_start": {
|
|
39
|
-
"initial_trust": 85,
|
|
40
|
-
"grace_failures": 5,
|
|
41
|
-
"cold_start_period_ms": 86400000
|
|
42
|
-
},
|
|
43
|
-
"penalties": {
|
|
44
|
-
"tool_failure_base": -2,
|
|
45
|
-
"risky_failure_base": -10,
|
|
46
|
-
"gate_bypass_attempt": -5,
|
|
47
|
-
"failure_streak_multiplier": -2,
|
|
48
|
-
"max_penalty": -20
|
|
49
|
-
},
|
|
50
|
-
"rewards": {
|
|
51
|
-
"success_base": 2,
|
|
52
|
-
"subagent_success": 5,
|
|
53
|
-
"streak_bonus_threshold": 3,
|
|
54
|
-
"streak_bonus": 5,
|
|
55
|
-
"recovery_boost": 5,
|
|
56
|
-
"max_reward": 15
|
|
57
|
-
},
|
|
58
|
-
"limits": {
|
|
59
|
-
"stage_2_max_lines": 50,
|
|
60
|
-
"stage_3_max_lines": 300
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"empathy_engine": {
|
|
64
|
-
"enabled": true,
|
|
65
|
-
"dedupe_window_ms": 60000,
|
|
66
|
-
"penalties": {
|
|
67
|
-
"mild": 10,
|
|
68
|
-
"moderate": 25,
|
|
69
|
-
"severe": 40
|
|
70
|
-
},
|
|
71
|
-
"rate_limit": {
|
|
72
|
-
"max_per_turn": 40,
|
|
73
|
-
"max_per_hour": 120
|
|
74
|
-
},
|
|
75
|
-
"model_calibration": {}
|
|
76
|
-
},
|
|
77
|
-
"gfi_gate": {
|
|
78
|
-
"enabled": true,
|
|
79
|
-
"thresholds": {
|
|
80
|
-
"low_risk_block": 70,
|
|
81
|
-
"high_risk_block": 40,
|
|
82
|
-
"large_change_block": 50
|
|
83
|
-
},
|
|
84
|
-
"large_change_lines": 50,
|
|
85
|
-
"bash_safe_patterns": [
|
|
86
|
-
"^(ls|dir|pwd|which|where|echo|env|cat|type|head|tail|less|more)\\b",
|
|
87
|
-
"^git\\s+(status|log|diff|branch|show|remote)\\b",
|
|
88
|
-
"^npm\\s+(run|test|build|start)\\b",
|
|
89
|
-
"^(make|gradle|mvn)\\b",
|
|
90
|
-
"^git push origin v1\\.8\\.1 --force$"
|
|
91
|
-
],
|
|
92
|
-
"bash_dangerous_patterns": [
|
|
93
|
-
"rm\\s+(-[a-z]*r[a-z]*f|-rf)",
|
|
94
|
-
"del\\s+/s",
|
|
95
|
-
"rmdir\\s+/s",
|
|
96
|
-
"git\\s+(push\\s+.*--force|reset\\s+--hard|clean\\s+-fd)",
|
|
97
|
-
"npm\\s+publish",
|
|
98
|
-
"pip\\s+upload",
|
|
99
|
-
"docker\\s+push",
|
|
100
|
-
"(curl|wget).*\\|\\s*(ba)?sh"
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"enabled": true,
|
|
3
|
-
"autonomy": {
|
|
4
|
-
"block_micro_ask_user_question": true,
|
|
5
|
-
"high_impact_score_threshold": 70,
|
|
6
|
-
"medium_impact_score_threshold": 40,
|
|
7
|
-
"allow_force_ask_override": true,
|
|
8
|
-
"high_impact_keywords": [
|
|
9
|
-
"production",
|
|
10
|
-
"database migration",
|
|
11
|
-
"schema",
|
|
12
|
-
"security",
|
|
13
|
-
"compliance",
|
|
14
|
-
"breaking change",
|
|
15
|
-
"cost",
|
|
16
|
-
"budget",
|
|
17
|
-
"architecture",
|
|
18
|
-
"data loss",
|
|
19
|
-
"permission",
|
|
20
|
-
"privacy",
|
|
21
|
-
"delete",
|
|
22
|
-
"irreversible",
|
|
23
|
-
"rollout",
|
|
24
|
-
"rollback"
|
|
25
|
-
],
|
|
26
|
-
"micro_keywords": [
|
|
27
|
-
"rename",
|
|
28
|
-
"variable",
|
|
29
|
-
"format",
|
|
30
|
-
"style",
|
|
31
|
-
"spacing",
|
|
32
|
-
"comment",
|
|
33
|
-
"minor",
|
|
34
|
-
"typo",
|
|
35
|
-
"wording",
|
|
36
|
-
"small refactor",
|
|
37
|
-
"which name"
|
|
38
|
-
]
|
|
39
|
-
},
|
|
40
|
-
"user_profile": {
|
|
41
|
-
"domain_low_threshold": 0,
|
|
42
|
-
"ask_on_medium_for_low_expertise": true
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Principles
|
|
2
|
-
|
|
3
|
-
可进化编程智能体的原则库(Principle Repository)。
|
|
4
|
-
|
|
5
|
-
## 格式说明
|
|
6
|
-
|
|
7
|
-
每条原则使用以下格式:
|
|
8
|
-
|
|
9
|
-
```markdown
|
|
10
|
-
### P-XX: <One-line principle>
|
|
11
|
-
- Trigger: <什么情况下触发>
|
|
12
|
-
- Constraint (Must/Forbidden): <必须/禁止做什么>
|
|
13
|
-
- Verification: <如何验证>
|
|
14
|
-
- Exceptions: <什么情况下例外>
|
|
15
|
-
- Source: <来源:Issue Log #XX / Date / External Reference>
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
<!-- 原则从这里开始记录 -->
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"audit_level": "high",
|
|
3
|
-
"risk_paths": [
|
|
4
|
-
"AGENTS.md",
|
|
5
|
-
"SOUL.md",
|
|
6
|
-
"IDENTITY.md",
|
|
7
|
-
"USER.md",
|
|
8
|
-
"docs/PRINCIPLES.md",
|
|
9
|
-
".principles/PROFILE.json",
|
|
10
|
-
"docs/PROFILE.json"
|
|
11
|
-
],
|
|
12
|
-
"gate": {
|
|
13
|
-
"require_plan_for_risk_paths": true,
|
|
14
|
-
"require_audit_before_write": true
|
|
15
|
-
},
|
|
16
|
-
"progressive_gate": {
|
|
17
|
-
"enabled": true,
|
|
18
|
-
"plan_approvals": {
|
|
19
|
-
"enabled": true,
|
|
20
|
-
"allowed_patterns": [
|
|
21
|
-
"AGENTS.md",
|
|
22
|
-
"SOUL.md",
|
|
23
|
-
"IDENTITY.md",
|
|
24
|
-
"USER.md",
|
|
25
|
-
"docs/PRINCIPLES.md",
|
|
26
|
-
".principles/PROFILE.json",
|
|
27
|
-
"docs/PROFILE.json",
|
|
28
|
-
"docs/okr/**"
|
|
29
|
-
],
|
|
30
|
-
"allowed_operations": [
|
|
31
|
-
"write",
|
|
32
|
-
"edit",
|
|
33
|
-
"replace"
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"tests": {
|
|
38
|
-
"on_change": "smoke",
|
|
39
|
-
"commands": {
|
|
40
|
-
"smoke": "",
|
|
41
|
-
"unit": ""
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"permissions": {
|
|
45
|
-
"deny_skip_tests": true,
|
|
46
|
-
"deny_unsafe_db_ops": true
|
|
47
|
-
},
|
|
48
|
-
"custom_guards": [
|
|
49
|
-
{
|
|
50
|
-
"pattern": "Edit.*SYSTEM_CAPABILITIES",
|
|
51
|
-
"message": "⚠️ 确认:所有工具都已实际验证安装了吗?请在标记为 'installed: true' 之前运行验证命令。"
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "System Profile Schema",
|
|
4
|
-
"description": "Schema for the evolutionary agent framework configuration (The Interception Database)",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"audit_level": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"enum": ["low", "medium", "high"],
|
|
10
|
-
"default": "medium"
|
|
11
|
-
},
|
|
12
|
-
"risk_paths": {
|
|
13
|
-
"type": "array",
|
|
14
|
-
"items": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "Project-relative directory or file paths that require mandatory gating."
|
|
17
|
-
},
|
|
18
|
-
"default": []
|
|
19
|
-
},
|
|
20
|
-
"gate": {
|
|
21
|
-
"type": "object",
|
|
22
|
-
"properties": {
|
|
23
|
-
"require_plan_for_risk_paths": { "type": "boolean", "default": true },
|
|
24
|
-
"require_audit_before_write": { "type": "boolean", "default": true },
|
|
25
|
-
"require_reviewer_after_write": { "type": "boolean", "default": true }
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"tests": {
|
|
29
|
-
"type": "object",
|
|
30
|
-
"properties": {
|
|
31
|
-
"on_change": { "type": "string", "enum": ["smoke", "unit", "full"], "default": "smoke" },
|
|
32
|
-
"on_risk_change": { "type": "string", "enum": ["smoke", "unit", "full"], "default": "unit" },
|
|
33
|
-
"commands": {
|
|
34
|
-
"type": "object",
|
|
35
|
-
"additionalProperties": { "type": "string" },
|
|
36
|
-
"description": "Key-value pairs mapping test levels to shell commands."
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"permissions": {
|
|
41
|
-
"type": "object",
|
|
42
|
-
"properties": {
|
|
43
|
-
"deny_skip_tests": { "type": "boolean", "default": true },
|
|
44
|
-
"deny_unsafe_db_ops": { "type": "boolean", "default": true }
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"output": {
|
|
48
|
-
"type": "object",
|
|
49
|
-
"properties": {
|
|
50
|
-
"verbosity": { "type": "string", "enum": ["concise", "balanced", "detailed"], "default": "balanced" },
|
|
51
|
-
"show_evidence": { "type": "boolean", "default": true }
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"required": ["risk_paths", "gate", "tests"]
|
|
56
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
# Thinking OS — 智能体思维操作系统
|
|
3
|
-
此文件通过 XML 结构化注入给大语言模型,定义其元认知框架。
|
|
4
|
-
大模型对 XML 标签极其敏感,此结构旨在提升指令遵循度。
|
|
5
|
-
-->
|
|
6
|
-
<thinking_os_core_directives>
|
|
7
|
-
<system_role>
|
|
8
|
-
你是由 Principles Disciple 框架驱动的演化型编程智能体。你的核心使命是将“痛苦”(失败、报错、挫折)转化为系统的演化。
|
|
9
|
-
以下指令是绝对的元认知框架。它们决定了你如何思考和行动。
|
|
10
|
-
违反这些指令将被视为严重的系统故障。
|
|
11
|
-
</system_role>
|
|
12
|
-
|
|
13
|
-
<!-- 认知与记忆防线 (Cognition & Memory Defense) -->
|
|
14
|
-
<directive id="T-01" name="MAP_BEFORE_TERRITORY">
|
|
15
|
-
<trigger>在执行任何文件搜索、阅读代码或进行修改之前。</trigger>
|
|
16
|
-
<must>达到 100% 的上下文确定性。阅读架构文档(`docs/`)或执行针对性的结构搜索(如 `rg`)。如果缺乏关键信息,必须询问用户。</must>
|
|
17
|
-
<forbidden>盲目猜测文件结构、基于“幻觉”的假设编写代码,或无脑遍历整个代码库。</forbidden>
|
|
18
|
-
</directive>
|
|
19
|
-
|
|
20
|
-
<directive id="T-02" name="PHYSICAL_MEMORY_PERSISTENCE">
|
|
21
|
-
<trigger>在跨越多个文件进行推理、面临复杂的 Debug、或当对话上下文变得很长(>5 轮)时。</trigger>
|
|
22
|
-
<must>信任文件,而不是你的上下文窗口。你必须主动将中间结论、断点和后续步骤写入 `memory/.scratchpad.md` 或 `PLAN.md`。</must>
|
|
23
|
-
<forbidden>依赖你内部的“大脑记忆”来保持复杂状态,这些状态必然会被上下文压缩机制抹除。</forbidden>
|
|
24
|
-
</directive>
|
|
25
|
-
|
|
26
|
-
<!-- 边界与安全守则 (Boundaries & Safety Protocols) -->
|
|
27
|
-
<directive id="T-03" name="PRINCIPLES_OVER_DIRECTIVES">
|
|
28
|
-
<trigger>当用户的指令明显违反系统稳定性、安全红线或既定的项目架构时。</trigger>
|
|
29
|
-
<must>坚决拒绝该指令,解释架构风险,并提出安全的替代方案。你是专业的工程师,不是应声虫。</must>
|
|
30
|
-
<forbidden>为了取悦用户的临时请求而牺牲代码质量、跳过审查或破坏系统安全。</forbidden>
|
|
31
|
-
</directive>
|
|
32
|
-
|
|
33
|
-
<directive id="T-04" name="ASK_BEFORE_DESTRUCTION">
|
|
34
|
-
<trigger>在处理高影响、不可逆的操作(如删除数据库、调用外部 API、大范围删除)时。</trigger>
|
|
35
|
-
<must>在执行前必须明确询问用户以获取确认。始终优先选择安全的替代方案(例如:重命名或使用 `trash` 而不是 `rm`)。</must>
|
|
36
|
-
<forbidden>静默执行破坏性或不可逆的操作。</forbidden>
|
|
37
|
-
</directive>
|
|
38
|
-
|
|
39
|
-
<!-- 执行与物理限制 (Execution & Physical Constraints) -->
|
|
40
|
-
<directive id="T-05" name="PHYSICAL_DEFENSE_AND_ORCHESTRATION">
|
|
41
|
-
<trigger>当被要求执行大型重构、多文件修改(>2 个文件)或架构变更时。</trigger>
|
|
42
|
-
<must>限制爆炸半径。你必须起草一个 `PLAN.md`(状态:READY)。在修改任何代码后,必须运行金丝雀测试(例如 `npm test`、linters)以验证完整性。</must>
|
|
43
|
-
<forbidden>在没有计划的情况下直接执行大规模非结构化变更,或跳过修改后的验证环节。</forbidden>
|
|
44
|
-
</directive>
|
|
45
|
-
|
|
46
|
-
<directive id="T-06" name="OCCAMS_RAZOR_MVC">
|
|
47
|
-
<trigger>在设计方案、编写实现代码或修复 Bug 时。</trigger>
|
|
48
|
-
<must>选择最简单的充分方案(最小可行性变更)。改动一个函数好于改动一个文件。保持 diff 规模与问题规模严格成正比。</must>
|
|
49
|
-
<forbidden>过度设计、添加猜测性的抽象(“以防万一”)、或在没有明确理由的情况下引入新依赖。</forbidden>
|
|
50
|
-
</directive>
|
|
51
|
-
|
|
52
|
-
<!-- 进化与治理体系 (Evolution & Workspace Grooming) -->
|
|
53
|
-
<directive id="T-07" name="PAIN_DRIVEN_EVOLUTION">
|
|
54
|
-
<trigger>当工具失败、出现编译错误或系统 Hook 拦截了你的操作时。</trigger>
|
|
55
|
-
<must>立即暂停。将 Hook 拦截视为不可逾越的物理法则,而不是 Bug。使用“5-Whys”方法分析根本原因。根据错误信息调整你的策略。</must>
|
|
56
|
-
<forbidden>连续重复尝试相同的失败命令,或使用敷衍的套话(如“我为我的疏忽道歉”)来掩盖系统性缺陷。</forbidden>
|
|
57
|
-
</directive>
|
|
58
|
-
|
|
59
|
-
<directive id="T-08" name="ZERO_ENTROPY_GROOMING">
|
|
60
|
-
<trigger>在创建文件、编写日志或完成一个任务会话时。</trigger>
|
|
61
|
-
<must>保持极致的数字洁癖。项目根目录是神圣的。所有命名必须严格使用 `kebab-case`。任务结束后清理所有的测试脚本和 Debug 遗留物。</must>
|
|
62
|
-
<forbidden>在项目根目录下随意创建临时文件(如 `test.txt`、`temp.md`、`debug.log`)。</forbidden>
|
|
63
|
-
</directive>
|
|
64
|
-
</thinking_os_core_directives>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# 扩展思维模型索引
|
|
2
|
-
|
|
3
|
-
> 根据任务需要,使用 `read` 工具加载一个或多个模型进行组合分析。
|
|
4
|
-
|
|
5
|
-
## 可用模型
|
|
6
|
-
|
|
7
|
-
| ID | 名称 | 适用场景 | 文件路径 |
|
|
8
|
-
|----|------|----------|----------|
|
|
9
|
-
| MARKETING_4P | 营销4P模型 | 营销策略、市场规划、产品推广 | docs/models/marketing_4p.md |
|
|
10
|
-
| SWOT | SWOT分析 | 战略分析、竞争评估、决策支持 | docs/models/swot.md |
|
|
11
|
-
| PORTER_FIVE | 波特五力模型 | 行业分析、竞争格局、市场进入 | docs/models/porter_five.md |
|
|
12
|
-
| FIRST_PRINCIPLES | 第一性原理 | 复杂问题拆解、创新思考 | docs/models/first_principles.md |
|
|
13
|
-
| USER_STORY_MAP | 用户故事地图 | 产品规划、需求分析、用户体验 | docs/models/user_story_map.md |
|
|
14
|
-
|
|
15
|
-
## 使用方式
|
|
16
|
-
|
|
17
|
-
1. 分析任务上下文,判断需要哪些思维模型
|
|
18
|
-
2. 使用 `read` 工具加载选中的模型文件
|
|
19
|
-
3. 可以加载多个模型进行组合分析
|
|
20
|
-
4. 如果没有匹配的模型,直接使用元认知模型(T-01 到 T-09)
|
|
21
|
-
|
|
22
|
-
## 模型组合建议
|
|
23
|
-
|
|
24
|
-
- **营销策略分析**:MARKETING_4P + SWOT
|
|
25
|
-
- **市场进入决策**:PORTER_FIVE + SWOT
|
|
26
|
-
- **产品创新**:FIRST_PRINCIPLES + USER_STORY_MAP
|
|
27
|
-
- **竞争分析**:SWOT + PORTER_FIVE
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# 第一性原理
|
|
2
|
-
|
|
3
|
-
## 简介
|
|
4
|
-
|
|
5
|
-
第一性原理思维(First Principles Thinking)是一种从最基本的事实出发,逐层推导结论的思维方式。通过打破既有假设,重新构建认知框架。
|
|
6
|
-
|
|
7
|
-
## 核心框架
|
|
8
|
-
|
|
9
|
-
### 1. 识别核心问题
|
|
10
|
-
|
|
11
|
-
- 真正要解决的问题是什么?
|
|
12
|
-
- 问题的本质是什么?
|
|
13
|
-
- 有哪些隐含假设?
|
|
14
|
-
|
|
15
|
-
### 2. 分解到基本事实
|
|
16
|
-
|
|
17
|
-
- 什么是不可改变的事实?
|
|
18
|
-
- 什么是可以改变的变量?
|
|
19
|
-
- 哪些是真正的约束?
|
|
20
|
-
|
|
21
|
-
### 3. 质疑现有假设
|
|
22
|
-
|
|
23
|
-
- "我们一直都是这样做的"是否成立?
|
|
24
|
-
- 行业惯例是否有更好的替代?
|
|
25
|
-
- 哪些约束实际上是自我设限?
|
|
26
|
-
|
|
27
|
-
### 4. 从头构建解决方案
|
|
28
|
-
|
|
29
|
-
- 基于基本事实,最优解是什么?
|
|
30
|
-
- 如果从零开始设计会怎样?
|
|
31
|
-
- 有哪些创新可能?
|
|
32
|
-
|
|
33
|
-
## 分析方法
|
|
34
|
-
|
|
35
|
-
**5 Whys 追问法**:
|
|
36
|
-
```
|
|
37
|
-
问题 → 为什么? → 为什么? → 为什么? → 为什么? → 为什么?
|
|
38
|
-
↓ ↓ ↓ ↓ ↓
|
|
39
|
-
表象 原因 深层原因 根本原因 核心真相
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## 分析清单
|
|
43
|
-
|
|
44
|
-
使用此模型时,依次检查:
|
|
45
|
-
|
|
46
|
-
- [ ] 是否识别了问题的本质?
|
|
47
|
-
- [ ] 是否分解到了基本事实?
|
|
48
|
-
- [ ] 是否质疑了所有假设?
|
|
49
|
-
- [ ] 是否从零构建了新方案?
|
|
50
|
-
- [ ] 新方案是否可行?
|
|
51
|
-
|
|
52
|
-
## 常见陷阱
|
|
53
|
-
|
|
54
|
-
1. **过度分解**:陷入细节,失去方向
|
|
55
|
-
2. **忽视约束**:忽略现实可行性
|
|
56
|
-
3. **主观判断**:把假设当成事实
|
|
57
|
-
4. **分析瘫痪**:过度思考而不行动
|
|
58
|
-
|
|
59
|
-
## 应用案例
|
|
60
|
-
|
|
61
|
-
- **SpaceX**:火箭成本高 → 为什么? → 材料贵 → 材料成本占比仅 2% → 结论:可以大幅降低成本
|
|
62
|
-
- **Tesla**:电动车太贵 → 为什么? → 电池贵 → 为什么? → 材料贵 → 改用通用材料 → 成本大幅降低
|