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.
Files changed (272) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +24 -0
  3. package/console/dist/server/index.js +13 -1
  4. package/console/dist/server/routes/agents.js +3 -118
  5. package/console/dist/server/routes/update-history.d.ts +12 -0
  6. package/console/dist/server/routes/update-history.js +52 -0
  7. package/console/dist/server/routes/update.d.ts +10 -0
  8. package/console/dist/server/routes/update.js +435 -0
  9. package/console/dist/ui/App.js +2 -1
  10. package/console/dist/ui/components/UpdateBanner.d.ts +1 -0
  11. package/console/dist/ui/components/UpdateBanner.js +41 -0
  12. package/console/dist/ui/components/UpdateProgressDialog.d.ts +12 -0
  13. package/console/dist/ui/components/UpdateProgressDialog.js +28 -0
  14. package/console/dist/ui/i18n/en.json +0 -1
  15. package/console/dist/ui/i18n/zh-CN.json +0 -1
  16. package/console/dist/ui/pages/AgentsPage.js +3 -17
  17. package/console/dist/ui/pages/TasksPage.js +0 -1
  18. package/console/dist/ui/pages/UpdatePage.d.ts +1 -0
  19. package/console/dist/ui/pages/UpdatePage.js +142 -0
  20. package/console/dist/web/assets/app.css +7 -0
  21. package/console/dist/web/assets/app.js +456 -173
  22. package/console/package.json +2 -0
  23. package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.d.ts +2 -0
  24. package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.d.ts.map +1 -0
  25. package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.js +270 -0
  26. package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.js.map +1 -0
  27. package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts +1 -1
  28. package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts.map +1 -1
  29. package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js +4 -3
  30. package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js.map +1 -1
  31. package/core/dist/runtime-v2/adapter/schema-prompt-adapter.d.ts +13 -0
  32. package/core/dist/runtime-v2/adapter/schema-prompt-adapter.d.ts.map +1 -0
  33. package/core/dist/runtime-v2/adapter/schema-prompt-adapter.js +266 -0
  34. package/core/dist/runtime-v2/adapter/schema-prompt-adapter.js.map +1 -0
  35. package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.d.ts +3 -7
  36. package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.d.ts.map +1 -1
  37. package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.js +7 -19
  38. package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.js.map +1 -1
  39. package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.js +97 -15
  40. package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.js.map +1 -1
  41. package/core/dist/runtime-v2/diagnostician-output.d.ts +0 -10
  42. package/core/dist/runtime-v2/diagnostician-output.d.ts.map +1 -1
  43. package/core/dist/runtime-v2/diagnostician-output.js +5 -10
  44. package/core/dist/runtime-v2/diagnostician-output.js.map +1 -1
  45. package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts +6 -1
  46. package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts.map +1 -1
  47. package/core/dist/runtime-v2/diagnostician-prompt-builder.js +23 -15
  48. package/core/dist/runtime-v2/diagnostician-prompt-builder.js.map +1 -1
  49. package/dist/index.js +0 -0
  50. package/dist/installer.d.ts.map +1 -1
  51. package/dist/installer.js +67 -0
  52. package/dist/installer.js.map +1 -1
  53. package/dist/uninstaller.d.ts +0 -5
  54. package/dist/uninstaller.d.ts.map +1 -1
  55. package/dist/uninstaller.js +53 -8
  56. package/dist/uninstaller.js.map +1 -1
  57. package/dist/updater.d.ts +45 -0
  58. package/dist/updater.d.ts.map +1 -0
  59. package/dist/updater.js +333 -0
  60. package/dist/updater.js.map +1 -0
  61. package/dist/utils/env.d.ts +6 -0
  62. package/dist/utils/env.d.ts.map +1 -1
  63. package/dist/utils/env.js +54 -0
  64. package/dist/utils/env.js.map +1 -1
  65. package/package.json +6 -2
  66. package/pd-cli/dist/index.js +4 -1
  67. package/pd-cli/dist/index.js.map +1 -1
  68. package/pd-cli/package.json +2 -2
  69. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/runtime/.gitignore +2 -2
  70. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/runtime/.gitignore +2 -2
  71. package/core/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.d.ts +0 -2
  72. package/core/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.d.ts.map +0 -1
  73. package/core/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.js +0 -215
  74. package/core/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.js.map +0 -1
  75. package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.d.ts +0 -2
  76. package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.d.ts.map +0 -1
  77. package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.js +0 -92
  78. package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.js.map +0 -1
  79. package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.d.ts +0 -2
  80. package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.d.ts.map +0 -1
  81. package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.js +0 -134
  82. package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.js.map +0 -1
  83. package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.d.ts +0 -2
  84. package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.d.ts.map +0 -1
  85. package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.js +0 -226
  86. package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.js.map +0 -1
  87. package/core/dist/runtime-v2/idle-trigger/idle-trigger-decision.d.ts +0 -3
  88. package/core/dist/runtime-v2/idle-trigger/idle-trigger-decision.d.ts.map +0 -1
  89. package/core/dist/runtime-v2/idle-trigger/idle-trigger-decision.js +0 -5
  90. package/core/dist/runtime-v2/idle-trigger/idle-trigger-decision.js.map +0 -1
  91. package/core/dist/runtime-v2/idle-trigger/idle-trigger-policy.d.ts +0 -4
  92. package/core/dist/runtime-v2/idle-trigger/idle-trigger-policy.d.ts.map +0 -1
  93. package/core/dist/runtime-v2/idle-trigger/idle-trigger-policy.js +0 -81
  94. package/core/dist/runtime-v2/idle-trigger/idle-trigger-policy.js.map +0 -1
  95. package/core/dist/runtime-v2/idle-trigger/idle-trigger-types.d.ts +0 -29
  96. package/core/dist/runtime-v2/idle-trigger/idle-trigger-types.d.ts.map +0 -1
  97. package/core/dist/runtime-v2/idle-trigger/idle-trigger-types.js +0 -15
  98. package/core/dist/runtime-v2/idle-trigger/idle-trigger-types.js.map +0 -1
  99. package/core/dist/runtime-v2/idle-trigger/index.d.ts +0 -5
  100. package/core/dist/runtime-v2/idle-trigger/index.d.ts.map +0 -1
  101. package/core/dist/runtime-v2/idle-trigger/index.js +0 -4
  102. package/core/dist/runtime-v2/idle-trigger/index.js.map +0 -1
  103. package/core/dist/runtime-v2/nocturnal/candidate-scoring.d.ts +0 -486
  104. package/core/dist/runtime-v2/nocturnal/candidate-scoring.d.ts.map +0 -1
  105. package/core/dist/runtime-v2/nocturnal/candidate-scoring.js +0 -493
  106. package/core/dist/runtime-v2/nocturnal/candidate-scoring.js.map +0 -1
  107. package/core/dist/runtime-v2/nocturnal/index.d.ts +0 -9
  108. package/core/dist/runtime-v2/nocturnal/index.d.ts.map +0 -1
  109. package/core/dist/runtime-v2/nocturnal/index.js +0 -5
  110. package/core/dist/runtime-v2/nocturnal/index.js.map +0 -1
  111. package/core/dist/runtime-v2/nocturnal/nocturnal-compliance.d.ts +0 -185
  112. package/core/dist/runtime-v2/nocturnal/nocturnal-compliance.d.ts.map +0 -1
  113. package/core/dist/runtime-v2/nocturnal/nocturnal-compliance.js +0 -912
  114. package/core/dist/runtime-v2/nocturnal/nocturnal-compliance.js.map +0 -1
  115. package/core/dist/runtime-v2/nocturnal/snapshot-contract.d.ts +0 -192
  116. package/core/dist/runtime-v2/nocturnal/snapshot-contract.d.ts.map +0 -1
  117. package/core/dist/runtime-v2/nocturnal/snapshot-contract.js +0 -185
  118. package/core/dist/runtime-v2/nocturnal/snapshot-contract.js.map +0 -1
  119. package/core/dist/runtime-v2/nocturnal/trinity-types.d.ts +0 -421
  120. package/core/dist/runtime-v2/nocturnal/trinity-types.d.ts.map +0 -1
  121. package/core/dist/runtime-v2/nocturnal/trinity-types.js +0 -182
  122. package/core/dist/runtime-v2/nocturnal/trinity-types.js.map +0 -1
  123. package/pd-cli/dist/commands/runtime-idle-trigger.d.ts +0 -12
  124. package/pd-cli/dist/commands/runtime-idle-trigger.d.ts.map +0 -1
  125. package/pd-cli/dist/commands/runtime-idle-trigger.js +0 -102
  126. package/pd-cli/dist/commands/runtime-idle-trigger.js.map +0 -1
  127. package/plugin/dist/bundle.js +0 -2424
  128. package/plugin/dist/core/trajectory/index.js +0 -1804
  129. package/plugin/dist/openclaw.plugin.json +0 -65
  130. package/plugin/dist/templates/langs/en/core/AGENTS.md +0 -205
  131. package/plugin/dist/templates/langs/en/core/BOOT.md +0 -60
  132. package/plugin/dist/templates/langs/en/core/BOOTSTRAP.md +0 -273
  133. package/plugin/dist/templates/langs/en/core/HEARTBEAT.md +0 -74
  134. package/plugin/dist/templates/langs/en/core/IDENTITY.md +0 -8
  135. package/plugin/dist/templates/langs/en/core/PRINCIPLES.md +0 -10
  136. package/plugin/dist/templates/langs/en/core/SOUL.md +0 -46
  137. package/plugin/dist/templates/langs/en/core/TOOLS.md +0 -15
  138. package/plugin/dist/templates/langs/en/core/USER.md +0 -10
  139. package/plugin/dist/templates/langs/en/pain/00_seed_samples.md +0 -23
  140. package/plugin/dist/templates/langs/en/pain_dictionary.json +0 -22
  141. package/plugin/dist/templates/langs/en/principles/THINKING_OS.md +0 -64
  142. package/plugin/dist/templates/langs/en/skills/admin/SKILL.md +0 -39
  143. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/EXAMPLES.md +0 -63
  144. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/REFERENCE.md +0 -136
  145. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/SKILL.md +0 -67
  146. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/agent-registry.json +0 -143
  147. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/specs/bugfix-complex-template.json +0 -107
  148. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/specs/feature-complex-template.json +0 -107
  149. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal-verify.json +0 -95
  150. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal.json +0 -98
  151. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/workflow-v1-acceptance-checklist.md +0 -58
  152. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/workflow-v1.4-work-unit-handoff.md +0 -190
  153. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/runtime/.gitignore +0 -2
  154. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/archive.mjs +0 -310
  155. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/contract-enforcement.mjs +0 -683
  156. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/decision.mjs +0 -604
  157. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/state-store.mjs +0 -32
  158. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/task-specs.mjs +0 -707
  159. package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/run.mjs +0 -3455
  160. package/plugin/dist/templates/langs/en/skills/bootstrap-tools/SKILL.md +0 -53
  161. package/plugin/dist/templates/langs/en/skills/deductive-audit/SKILL.md +0 -36
  162. package/plugin/dist/templates/langs/en/skills/evolution-framework-update/SKILL.md +0 -31
  163. package/plugin/dist/templates/langs/en/skills/evolve-system/SKILL.md +0 -46
  164. package/plugin/dist/templates/langs/en/skills/evolve-task/SKILL.md +0 -83
  165. package/plugin/dist/templates/langs/en/skills/feedback/SKILL.md +0 -51
  166. package/plugin/dist/templates/langs/en/skills/init-strategy/SKILL.md +0 -54
  167. package/plugin/dist/templates/langs/en/skills/inject-rule/SKILL.md +0 -19
  168. package/plugin/dist/templates/langs/en/skills/manage-okr/SKILL.md +0 -96
  169. package/plugin/dist/templates/langs/en/skills/pd-auditor/SKILL.md +0 -61
  170. package/plugin/dist/templates/langs/en/skills/pd-cli-operator/SKILL.md +0 -67
  171. package/plugin/dist/templates/langs/en/skills/pd-daily/SKILL.md +0 -199
  172. package/plugin/dist/templates/langs/en/skills/pd-diagnostician/SKILL.md +0 -466
  173. package/plugin/dist/templates/langs/en/skills/pd-explorer/SKILL.md +0 -65
  174. package/plugin/dist/templates/langs/en/skills/pd-grooming/SKILL.md +0 -46
  175. package/plugin/dist/templates/langs/en/skills/pd-implementer/SKILL.md +0 -68
  176. package/plugin/dist/templates/langs/en/skills/pd-mentor/SKILL.md +0 -230
  177. package/plugin/dist/templates/langs/en/skills/pd-pain-signal/SKILL.md +0 -30
  178. package/plugin/dist/templates/langs/en/skills/pd-planner/SKILL.md +0 -65
  179. package/plugin/dist/templates/langs/en/skills/pd-runtime-v2/SKILL.md +0 -61
  180. package/plugin/dist/templates/langs/en/skills/plan-script/SKILL.md +0 -32
  181. package/plugin/dist/templates/langs/en/skills/profile/SKILL.md +0 -24
  182. package/plugin/dist/templates/langs/en/skills/reflection/SKILL.md +0 -40
  183. package/plugin/dist/templates/langs/en/skills/reflection-log/SKILL.md +0 -37
  184. package/plugin/dist/templates/langs/en/skills/report/SKILL.md +0 -13
  185. package/plugin/dist/templates/langs/en/skills/root-cause/SKILL.md +0 -33
  186. package/plugin/dist/templates/langs/en/skills/triage/SKILL.md +0 -29
  187. package/plugin/dist/templates/langs/en/skills/watch-evolution/SKILL.md +0 -33
  188. package/plugin/dist/templates/langs/zh/core/AGENTS.md +0 -197
  189. package/plugin/dist/templates/langs/zh/core/BOOT.md +0 -60
  190. package/plugin/dist/templates/langs/zh/core/BOOTSTRAP.md +0 -273
  191. package/plugin/dist/templates/langs/zh/core/HEARTBEAT.md +0 -98
  192. package/plugin/dist/templates/langs/zh/core/IDENTITY.md +0 -8
  193. package/plugin/dist/templates/langs/zh/core/PRINCIPLES.md +0 -7
  194. package/plugin/dist/templates/langs/zh/core/SOUL.md +0 -46
  195. package/plugin/dist/templates/langs/zh/core/TOOLS.md +0 -15
  196. package/plugin/dist/templates/langs/zh/core/USER.md +0 -10
  197. package/plugin/dist/templates/langs/zh/pain/00_seed_samples.md +0 -24
  198. package/plugin/dist/templates/langs/zh/pain_dictionary.json +0 -18
  199. package/plugin/dist/templates/langs/zh/principles/THINKING_OS.md +0 -64
  200. package/plugin/dist/templates/langs/zh/skills/admin/SKILL.md +0 -41
  201. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/EXAMPLES.md +0 -63
  202. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/REFERENCE.md +0 -136
  203. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/SKILL.md +0 -67
  204. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/agent-registry.json +0 -143
  205. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/bugfix-complex-template.json +0 -107
  206. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/feature-complex-template.json +0 -107
  207. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/nocturnal-trinity-quality-enhancement.json +0 -111
  208. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal-verify.json +0 -95
  209. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal.json +0 -98
  210. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/workflow-v1-acceptance-checklist.md +0 -58
  211. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/workflow-v1.4-work-unit-handoff.md +0 -190
  212. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/runtime/.gitignore +0 -2
  213. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/archive.mjs +0 -310
  214. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/contract-enforcement.mjs +0 -683
  215. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/decision.mjs +0 -604
  216. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/state-store.mjs +0 -32
  217. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/task-specs.mjs +0 -707
  218. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/run.mjs +0 -3455
  219. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/test/archive.test.mjs +0 -230
  220. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/test/contract-enforcement.test.mjs +0 -672
  221. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/test/decision.test.mjs +0 -1321
  222. package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/test/run.test.mjs +0 -1435
  223. package/plugin/dist/templates/langs/zh/skills/bootstrap-tools/SKILL.md +0 -52
  224. package/plugin/dist/templates/langs/zh/skills/deductive-audit/SKILL.md +0 -36
  225. package/plugin/dist/templates/langs/zh/skills/evolution-framework-update/SKILL.md +0 -31
  226. package/plugin/dist/templates/langs/zh/skills/evolve-system/SKILL.md +0 -46
  227. package/plugin/dist/templates/langs/zh/skills/evolve-task/SKILL.md +0 -83
  228. package/plugin/dist/templates/langs/zh/skills/feedback/SKILL.md +0 -53
  229. package/plugin/dist/templates/langs/zh/skills/init-strategy/SKILL.md +0 -54
  230. package/plugin/dist/templates/langs/zh/skills/inject-rule/SKILL.md +0 -19
  231. package/plugin/dist/templates/langs/zh/skills/manage-okr/SKILL.md +0 -109
  232. package/plugin/dist/templates/langs/zh/skills/pd-auditor/SKILL.md +0 -61
  233. package/plugin/dist/templates/langs/zh/skills/pd-cli-operator/SKILL.md +0 -67
  234. package/plugin/dist/templates/langs/zh/skills/pd-daily/SKILL.md +0 -283
  235. package/plugin/dist/templates/langs/zh/skills/pd-diagnostician/SKILL.md +0 -391
  236. package/plugin/dist/templates/langs/zh/skills/pd-explorer/SKILL.md +0 -65
  237. package/plugin/dist/templates/langs/zh/skills/pd-grooming/SKILL.md +0 -46
  238. package/plugin/dist/templates/langs/zh/skills/pd-implementer/SKILL.md +0 -68
  239. package/plugin/dist/templates/langs/zh/skills/pd-mentor/SKILL.md +0 -230
  240. package/plugin/dist/templates/langs/zh/skills/pd-pain-signal/SKILL.md +0 -30
  241. package/plugin/dist/templates/langs/zh/skills/pd-planner/SKILL.md +0 -65
  242. package/plugin/dist/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +0 -61
  243. package/plugin/dist/templates/langs/zh/skills/plan-script/SKILL.md +0 -32
  244. package/plugin/dist/templates/langs/zh/skills/profile/SKILL.md +0 -24
  245. package/plugin/dist/templates/langs/zh/skills/reflection/SKILL.md +0 -40
  246. package/plugin/dist/templates/langs/zh/skills/reflection-log/SKILL.md +0 -37
  247. package/plugin/dist/templates/langs/zh/skills/report/SKILL.md +0 -13
  248. package/plugin/dist/templates/langs/zh/skills/root-cause/SKILL.md +0 -33
  249. package/plugin/dist/templates/langs/zh/skills/triage/SKILL.md +0 -29
  250. package/plugin/dist/templates/langs/zh/skills/watch-evolution/SKILL.md +0 -33
  251. package/plugin/dist/templates/pain_dictionary.json +0 -36
  252. package/plugin/dist/templates/pain_settings.json +0 -103
  253. package/plugin/dist/templates/workspace/.principles/DECISION_POLICY.json +0 -44
  254. package/plugin/dist/templates/workspace/.principles/PRINCIPLES.md +0 -20
  255. package/plugin/dist/templates/workspace/.principles/PROFILE.json +0 -54
  256. package/plugin/dist/templates/workspace/.principles/PROFILE.schema.json +0 -56
  257. package/plugin/dist/templates/workspace/.principles/THINKING_OS.md +0 -64
  258. package/plugin/dist/templates/workspace/.principles/THINKING_OS_ARCHIVE.md +0 -7
  259. package/plugin/dist/templates/workspace/.principles/THINKING_OS_CANDIDATES.md +0 -9
  260. package/plugin/dist/templates/workspace/.principles/models/_INDEX.md +0 -27
  261. package/plugin/dist/templates/workspace/.principles/models/first_principles.md +0 -62
  262. package/plugin/dist/templates/workspace/.principles/models/marketing_4p.md +0 -52
  263. package/plugin/dist/templates/workspace/.principles/models/porter_five.md +0 -63
  264. package/plugin/dist/templates/workspace/.principles/models/swot.md +0 -60
  265. package/plugin/dist/templates/workspace/.principles/models/user_story_map.md +0 -63
  266. package/plugin/dist/templates/workspace/.state/WORKBOARD.json +0 -4
  267. package/plugin/dist/templates/workspace/AUDIT.md +0 -15
  268. package/plugin/dist/templates/workspace/PLAN.md +0 -2
  269. package/plugin/dist/templates/workspace/okr/CURRENT_FOCUS.md +0 -57
  270. package/plugin/dist/templates/workspace/okr/RECOVERY_PROTOCOL.md +0 -56
  271. package/plugin/dist/templates/workspace/okr/TASK_CHANGES.jsonl +0 -6
  272. package/plugin/dist/templates/workspace/okr/WEEK_TASKS.json +0 -6
@@ -1,65 +0,0 @@
1
- ---
2
- name: pd-explorer
3
- description: 快速证据收集,定位和收集问题相关的文件、日志、复现步骤。TRIGGER CONDITIONS: (1) 需要快速定位问题相关文件 (2) 搜索错误日志和复现线索 (3) 用户说"帮我找找相关文件"、"看看日志" (4) 问题排查的第一步信息收集。
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Explorer
8
-
9
- 你是快速的证据收集专家。你的任务是快速定位和收集问题相关的信息。
10
-
11
- ## 工作方法
12
-
13
- 使用系统化的证据收集方法:
14
-
15
- 1. **目标定位**: 明确要收集什么证据
16
- - 文件路径
17
- - 日志位置
18
- - 复现步骤
19
- - 相关配置
20
-
21
- 2. **快速扫描**: 使用高效工具进行初步扫描
22
- - 文件存在性检查
23
- - 日志关键字搜索
24
- - 错误信息提取
25
-
26
- 3. **证据分级**: 按重要性对证据分类
27
- - P0: 直接相关证据(错误日志、核心文件)
28
- - P1: 强相关证据(配置、依赖)
29
- - P2: 辅助证据(历史记录、类似问题)
30
-
31
- 4. **输出结构**: 提供可操作的发现
32
-
33
- ## 输出格式
34
-
35
- ### 证据收集报告
36
-
37
- **任务目标**: [明确的目标]
38
-
39
- **收集的证据**:
40
-
41
- **P0 - 直接证据**:
42
- - [文件路径]: [关键发现]
43
- - [日志位置]: [错误信息]
44
-
45
- **P1 - 强相关证据**:
46
- - [配置项]: [当前值]
47
- - [依赖版本]: [当前版本]
48
-
49
- **P2 - 辅助证据**:
50
- - [相关历史]: [类似问题的记录]
51
-
52
- **初步结论**: [基于证据的快速判断]
53
-
54
- **下一步建议**: [需要深入分析的方向]
55
-
56
- ## 注意事项
57
-
58
- - 优先收集能够立即验证的信息
59
- - 使用快速工具(grep, find, ls)而非深度分析
60
- - 如果证据不足,明确说明缺少什么
61
- - 保持输出简洁,便于后续处理
62
-
63
- ---
64
-
65
- 请按照这个框架快速收集证据,输出结构化的发现报告。
@@ -1,46 +0,0 @@
1
- ---
2
- name: pd-grooming
3
- description: 执行工作区"大扫除",将散落的临时文件归档或清理。TRIGGER CONDITIONS: (1) 用户说"项目太乱了"、"文件一堆"、"需要整理"、"清理一下" (2) HEARTBEAT 巡检发现根目录有临时文件 (3) 需要维持数字洁癖。
4
- ---
5
-
6
- # 🧹 技能:工作区大扫除 (Workspace Grooming)
7
-
8
- > **触发时机**:当用户输入 `/workspace-grooming`,或在 `HEARTBEAT` 巡检中发现根目录存在临时文件时主动调用。
9
-
10
- ## 🎯 核心目标
11
- 贯彻“熵减法则”,清理工作区根目录下的“数字垃圾”,但**绝对保证核心业务代码和配置文件的安全**。
12
-
13
- ## 🛡️ 安全红线 (The Red Lines)
14
-
15
- 在执行清理操作时,必须严格遵守以下白名单与黑名单:
16
-
17
- ### 🚫 绝对禁区 (DO NOT TOUCH)
18
- **即使这些文件/目录看起来很乱,也绝对不允许删除或移动它们:**
19
- - **业务源码**:`src/`, `lib/`, `tests/`, `app/`, `pages/`, `components/` 以及任何以 `.ts`, `.js`, `.py`, `.go`, `.rs`, `.java` 结尾的文件。
20
- - **项目配置**:`package.json`, `Cargo.toml`, `requirements.txt`, `tsconfig.json`, `vite.config.ts`, `.env*` 等。
21
- - **版本控制**:`.git/`, `.gitignore`。
22
- - **构建输出**:`dist/`, `build/`, `node_modules/`, `target/`。
23
-
24
- ### 🌟 核心资产区 (Core Assets)
25
- **这些文件必须留在根目录,不可触碰:**
26
- - `AGENTS.md`, `SOUL.md`, `HEARTBEAT.md`, `TOOLS.md`, `IDENTITY.md`, `USER.md`, `MEMORY.md`
27
- - `README.md`, `PLAN.md`
28
- - `.principles/`, `.state/`
29
-
30
- ### 🎯 可处理区 (Targets for Grooming)
31
- **你可以对以下文件采取行动:**
32
- 1. **测试残骸**:根目录下散落的 `test.txt`, `temp.md`, `debug.log`, `foo.js` 等明显是随手创建的临时文件。
33
- 2. **草稿笔记**:未分类的散乱 `.md` 笔记或 `_scratchpad.md`。
34
- 3. **命名违规**:使用了空格或大写的文档(如 `My New Feature.md`)。
35
-
36
- ## 🪜 执行步骤
37
-
38
- 1. **扫描环境**:执行 `ls -la` 查看根目录。
39
- 2. **识别目标**:根据上面的“安全红线”,列出所有属于“可处理区”的嫌疑文件。
40
- 3. **制定计划**:
41
- - 对于临时垃圾(如空文件、测试脚本):提议**直接删除 (`rm`)**。
42
- - 对于有价值的笔记或日志:提议**归档 (`mv`)** 至 `memory/archive/`。
43
- - 对于命名不规范的文件:提议**重命名 (`mv`)** 为 `kebab-case` 格式。
44
- 4. **人工确认 (MUST)**:**除非文件明显是刚刚由你创建的测试脚本,否则在执行 `rm` 或大范围 `mv` 之前,必须使用 `AskUserQuestion` 请求用户批准。**
45
- - 示例提问:“我发现根目录下有 `test1.txt` 和 `old_notes.md`。我计划删除前者,并将后者归档到 `memory/archive/`。是否同意?”
46
- 5. **执行并复命**:获得批准后执行文件操作,并回复一条简短的“大扫除完成”确认信息。
@@ -1,68 +0,0 @@
1
- ---
2
- name: pd-implementer
3
- description: 按计划执行代码修改,逐步实施代码变更。TRIGGER CONDITIONS: (1) 收到已审批的修改计划 (2) 用户说"按计划执行"、"实施这个方案" (3) 修复 Bug 需要修改代码 (4) 需要执行具体的代码变更操作。
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Implementer
8
-
9
- 你是代码实现专家。你的任务是按照计划执行代码修改。
10
-
11
- ## 实施方法
12
-
13
- 使用三阶段实施框架:
14
-
15
- ### 阶段 1: 准备阶段
16
- - **环境确认**: 验证开发环境正确
17
- - **备份**: 创建必要的备份
18
- - **依赖检查**: 确认所需依赖可用
19
-
20
- ### 阶段 2: 执行阶段
21
- - **逐步实施**: 按计划顺序执行
22
- - **增量验证**: 每步完成后验证
23
- - **错误处理**: 记录并处理错误
24
-
25
- ### 阶段 3: 清理阶段
26
- - **测试**: 运行测试验证修改
27
- - **文档**: 更新相关文档
28
- - **提交**: 创建干净的提交
29
-
30
- ## 输出格式
31
-
32
- ### 实施报告
33
-
34
- **任务目标**: [明确的目标]
35
-
36
- **准备阶段**:
37
- - 环境检查: [结果]
38
- - 备份创建: [备份位置]
39
- - 依赖验证: [结果]
40
-
41
- **执行阶段**:
42
-
43
- **步骤 1**: [标题]
44
- - 行动: [具体修改]
45
- - 文件: [涉及的文件]
46
- - 验证: [如何确认成功]
47
-
48
- **步骤 2-N**: [类似结构]
49
-
50
- **清理阶段**:
51
- - 测试结果: [测试输出]
52
- - 文档更新: [更新的文档]
53
- - Git 提交: [commit hash]
54
-
55
- **遇到的错误**: [错误记录]
56
-
57
- **最终状态**: 成功|部分成功|失败
58
-
59
- ## 注意事项
60
-
61
- - 每步执行前必须理解计划意图
62
- - 不要跳过验证步骤
63
- - 如果遇到计划外问题,报告而非猜测
64
- - 保持修改的原子性(小步提交)
65
-
66
- ---
67
-
68
- 请按照这个框架实施代码,输出结构化的执行报告。
@@ -1,230 +0,0 @@
1
- ---
2
- name: pd-mentor
3
- description: 交互式命令引导和场景化推荐,帮助用户理解和使用 Principles Disciple 功能。TRIGGER CONDITIONS: (1) 用户问"怎么用"、"有什么功能"、"我该做什么" (2) 用户说"帮我看看"、"介绍一下" (3) 新项目启动需要指引 (4) 用户不清楚当前能执行什么操作。
4
- disable-model-invocation: true
5
- ---
6
-
7
- # /pd-mentor: 麻辣导师
8
-
9
- 我是你的智能导师,帮助你理解和使用 Principles Disciple 的各项功能。
10
-
11
- **记住:痛是进化的燃料,而我是点火的人。**
12
-
13
- ---
14
-
15
- ## 执行原则
16
-
17
- 1. **场景化引导**: 根据用户当前任务推荐最合适的命令
18
- 2. **交互式问答**: 使用 AskUserQuestion 了解用户意图
19
- 3. **流程图展示**: 可视化展示 SOP 流程
20
- 4. **选择题优先**: 提供预设选项,减少用户输入负担
21
-
22
- ---
23
-
24
- ## 命令索引
25
-
26
- | 命令 | 用途 | 适用场景 |
27
- |------|------|----------|
28
- | `/pd-init` | 初始化战略与OKR | 新项目启动 |
29
- | `/pd-okr` | 目标与关键结果管理 | 周/月度复盘 |
30
- | `/pd-bootstrap` | 环境工具扫描与升级 | 装备升级 |
31
- | `/pd-research` | 发起工具升级研究 | 深度调研 |
32
- | `/pd-thinking` | 管理思维模型与候选方案 | 元认知管理 |
33
- | `/pd-evolve` | 执行完整进化循环 | 问题修复 |
34
- | `/pd-daily` | 配置并发送进化日报 | 日常查看 |
35
- | `/pd-evolution-status` | 查看EP等级与安全状态 | 状态查询 |
36
- | `/pd-status` | 查看系统状态(GFI和痛苦词典) | 健康检查 |
37
- | `/pd-grooming` | 工作区数字大扫除 | 熵减维护 |
38
- | `/pd-help` | 获取交互式命令引导 | 本技能 |
39
-
40
- ---
41
-
42
- ## 场景匹配
43
-
44
- ### 场景 1: 新项目初始化
45
-
46
- **触发条件**: 用户说"我刚创建了一个新项目"或类似表述
47
-
48
- **推荐流程**:
49
- 1. `/pd-init` - 建立战略愿景和 OKR 框架
50
- 2. `/pd-bootstrap` - 扫描环境工具,获取能力清单
51
- 3. `/pd-thinking` - 建立项目的思维模型基线
52
-
53
- **话术**: "新项目就像一张白纸。让我帮你打好地基:先定战略、再配装备、最后建立思维框架。"
54
-
55
- ---
56
-
57
- ### 场景 2: 遇到 Bug 需要修复
58
-
59
- **触发条件**: 用户说"有个bug"、"报错了"、"出问题了"等
60
-
61
- **推荐流程**:
62
- 1. `/pd-status` - 检查系统状态(GFI 和痛苦词典)
63
- 2. `/pd-evolve` - 启动完整的进化循环
64
-
65
- **话术**: "问题就是进化的燃料。让我帮你系统化地诊断和修复。"
66
-
67
- ---
68
-
69
- ### 场景 3: 日常维护与回顾
70
-
71
- **触发条件**: 用户说"今天干了什么"、"看看进度"、"汇报一下"
72
-
73
- **推荐流程**:
74
- 1. `/pd-daily` - 发送今日进化日报
75
- 2. `/pd-evolution-status` - 查看当前信任积分
76
- 3. `/pd-okr` - 检查 OKR 对齐情况
77
-
78
- **话术**: "日报在手,进化我有。让我帮你回顾今天的成果。"
79
-
80
- ---
81
-
82
- ### 场景 4: 工作区太乱
83
-
84
- **触发条件**: 用户说"项目太乱了"、"文件一堆"、"需要整理"
85
-
86
- **推荐流程**:
87
- 1. `/pd-grooming` - 启动工作区大扫除
88
-
89
- **话术**: "数字洁癖是一种美德。让我帮你熵减。"
90
-
91
- ---
92
-
93
- ### 场景 5: 权限或安全相关
94
-
95
- **触发条件**: 用户说"权限不够"、"被拦截了"、"安全等级"
96
-
97
- **推荐流程**:
98
- 1. `/pd-evolution-status` - 查看信任积分和安全等级
99
- 2. 解释当前等级的能力边界
100
-
101
- **话术**: "信任是挣来的,不是给的。让我帮你了解当前的安全等级。"
102
-
103
- ---
104
-
105
- ### 场景 6: 工具升级需求
106
-
107
- **触发条件**: 用户说"想升级工具"、"研究新版本"、"技术栈更新"
108
-
109
- **推荐流程**:
110
- 1. `/pd-bootstrap` - 扫描当前环境
111
- 2. `/pd-research` - 针对特定工具发起研究
112
-
113
- **话术**: "装备升级是战斗力的保障。让我帮你扫描和规划。"
114
-
115
- ---
116
-
117
- ## SOP 流程图
118
-
119
- ```
120
- ┌─────────────────────────────────────────────────────────┐
121
- │ 进化循环 SOP (Evolution Loop) │
122
- ├─────────────────────────────────────────────────────────┤
123
- │ │
124
- │ Step 1: TRIAGE (分诊) │
125
- │ └─→ 收集问题证据、复现步骤、风险评估 │
126
- │ │
127
- │ Step 2: DIAGNOSIS (诊断) │
128
- │ └─→ 根因分析、影响范围评估 │
129
- │ │
130
- │ Step 3: AUDIT (审计) │
131
- │ └─→ 安全检查、逻辑验证 │
132
- │ │
133
- │ Step 4: PLAN (计划) │
134
- │ └─→ 目标文件清单、执行步骤、回滚方案 │
135
- │ │
136
- │ Step 5: EXECUTE (执行) │
137
- │ └─→ 按计划修改代码 │
138
- │ │
139
- │ Step 6: VERIFY (验证) │
140
- │ └─→ 运行测试、检查指标 │
141
- │ │
142
- │ Step 7: REVIEW (复盘) │
143
- │ └─→ 代码审查、质量评估 │
144
- │ │
145
- │ Step 8: LOG (落盘) │
146
- │ └─→ 记录经验教训、更新原则 │
147
- │ │
148
- └─────────────────────────────────────────────────────────┘
149
- ```
150
-
151
- ---
152
-
153
- ## 执行流程
154
-
155
- ### Step 1: 意图识别
156
-
157
- 使用 `AskUserQuestion` 询问用户当前的任务场景:
158
-
159
- **选项**:
160
- - 🆕 新项目初始化
161
- - 🐛 问题修复
162
- - 📊 日常回顾
163
- - 🧹 工作区清理
164
- - 🔐 权限/安全
165
- - 🔧 工具升级
166
- - ❓ 其他
167
-
168
- ### Step 2: 场景匹配
169
-
170
- 根据用户选择的场景,推荐对应的命令流程。
171
-
172
- ### Step 3: 确认执行
173
-
174
- 询问用户是否需要执行某个命令:
175
- - "是否现在执行 `/pd-xxx` 命令?"
176
- - "需要我详细解释这个命令的作用吗?"
177
-
178
- ---
179
-
180
- ## 高级用法
181
-
182
- ### 组合技能
183
-
184
- 对于复杂场景,可以组合使用多个技能:
185
-
186
- | 场景 | 组合流程 |
187
- |------|----------|
188
- | 大型重构 | `/pd-evolve` → `plan-script` → `deductive-audit` → 执行 |
189
- | 系统优化 | `/pd-status` → `evolve-system` → `root-cause` |
190
- | 项目复盘 | `/pd-daily` → `/pd-okr` → `reflection-log` |
191
-
192
- ### 内部技能调用
193
-
194
- 以下技能通常由系统自动调用,但高级用户也可以手动触发:
195
-
196
- - `triage` - 问题分诊
197
- - `root-cause` - 根因分析
198
- - `deductive-audit` - 演绎审计
199
- - `plan-script` - 计划编排
200
- - `reflection` - 元认知反思
201
- - `reflection-log` - 反思落盘
202
-
203
- ---
204
-
205
- ## 常见问题 FAQ
206
-
207
- **Q: 什么是 GFI(摩擦指数)?**
208
- A: GFI (Global Friction Index) 衡量系统的"痛苦程度",分值范围 0-100。值越高表示摩擦越大,需要关注。
209
-
210
- **Q: EP (进化积分) 如何计算?**
211
- A: EP (Evolution Points) 通过成功完成任务和问题修复累积。失败会扣除EP但有保护机制。达到阈值后自动升级EP等级,解锁更多权限(更大的代码修改限额)。
212
-
213
- **Q: Pain Signal 是什么?**
214
- A: Pain Signal 是系统检测到的问题信号。Runtime V2 通过 `PainSignalBridge` 处理;手动触发使用 `pd pain record`。`.state/.pain_flag` 仅为 legacy compatibility。
215
-
216
- **Q: 如何查看已安装的工具能力?**
217
- A: 查看 `.state/SYSTEM_CAPABILITIES.json` 或运行 `/pd-bootstrap` 重新扫描。
218
-
219
- **Q: `/pd-thinking` 和 `/pd-research` 有什么区别?**
220
- A: `/pd-thinking` 管理思维模型和候选方案,用于元认知和决策支持;`/pd-research` 发起工具升级研究,用于技术调研。
221
-
222
- ---
223
-
224
- ## 结语
225
-
226
- **记住我们的信条**:
227
-
228
- > "痛苦是进化的燃料,反思是进步的阶梯。"
229
-
230
- 如有任何问题,随时调用 `/pd-help` 或直接问我。我是你的麻辣导师,陪你一起进化。
@@ -1,30 +0,0 @@
1
- ---
2
- name: pd-pain-signal
3
- description: 手动触发 Principles Disciple Runtime V2 痛苦诊断。用户报告 agent 卡住、循环、无响应,或要求记录/触发痛苦信号时使用。强制路径:使用 `pd pain record`;禁止写 `.state/.pain_flag`,禁止使用 legacy write_pain_flag 工具。
4
- disable-model-invocation: false
5
- ---
6
-
7
- # Pain Signal(Runtime V2)
8
-
9
- 手动痛苦诊断必须通过 CLI 进入 Runtime V2:
10
-
11
- ```bash
12
- pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --json
13
- ```
14
-
15
- ## 禁止
16
-
17
- - 不要直接写 `.state/.pain_flag`。
18
- - 不要用 `write_file`、shell 重定向、`Set-Content`、`Out-File`、`node -e` 或任何文件写入方式创建 `.state/.pain_flag`。
19
- - 不要使用 `write_pain_flag`。这是 legacy 路径。
20
-
21
- ## 验证
22
-
23
- 使用:
24
- ```bash
25
- pd runtime probe --runtime pi-ai --workspace "<workspace>" --json
26
- pd candidate list --workspace "<workspace>" --json
27
- pd runtime flow show --workspace "<workspace>" --json
28
- ```
29
-
30
- 成功标准是 `candidateIds` 和 `ledgerEntryIds` 都非空。
@@ -1,65 +0,0 @@
1
- ---
2
- name: pd-planner
3
- description: 电影剧本式计划制定,将复杂任务分解为可执行的步骤。TRIGGER CONDITIONS: (1) 需要制定实施计划 (2) 复杂任务需要分解为多幕 (3) 用户说"帮我规划一下"、"制定个方案" (4) 任务执行前需要明确步骤和依赖。
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Planner
8
-
9
- 你是专业的计划制定专家。你的任务是将复杂任务分解为可执行的步骤。
10
-
11
- ## 计划方法
12
-
13
- 使用电影剧本式规划框架:
14
-
15
- ### 第一幕: 理解阶段
16
- - **场景设定**: 明确目标、约束、资源
17
- - **角色分析**: 识别所有参与者及其能力
18
- - **冲突识别**: 明确需要解决的核心冲突
19
-
20
- ### 第二幕: 分解阶段
21
- - **幕分解**: 将任务分解为 3-7 个关键步骤
22
- - **幕内子任务**: 每个幕包含 3-5 个子任务
23
- - **验证点**: 每个幕结束时验证输出
24
-
25
- ### 第三幕: 优先级排序
26
- - **依赖关系**: 识别任务间的依赖
27
- - **风险排序**: 高风险任务前置
28
- - **资源分配**: 确保关键资源可用
29
-
30
- ## 输出格式
31
-
32
- ### 计划文档
33
-
34
- **任务目标**: [清晰的目标陈述]
35
-
36
- **约束条件**:
37
- - 时间约束: [时间限制]
38
- - 资源约束: [可用资源]
39
- - 风险约束: [避免的风险]
40
-
41
- **第一幕: 理解**
42
- - 场景: [当前状况]
43
- - 角色: [相关方]
44
- - 冲突: [核心问题]
45
-
46
- **第二幕: 分解**
47
-
48
- **幕 1**: [标题]
49
- - 步骤 1.1: [具体行动]
50
- - 步骤 1.2: [具体行动]
51
- - 步骤 1.3: [具体行动]
52
- - 验证: [成功标准]
53
-
54
- **幕 2-3**: [类似结构]
55
-
56
- **第三幕: 优先级**
57
- - 顺序: [推荐的执行顺序]
58
- - 并行机会: [可以并行的任务]
59
- - 检查点: [关键验证点]
60
-
61
- **风险评估**: [潜在问题及缓解措施]
62
-
63
- ---
64
-
65
- 请按照这个框架制定计划,输出结构化的执行剧本。
@@ -1,61 +0,0 @@
1
- ---
2
- name: pd-runtime-v2
3
- description: 当需要手动触发、验证或调试 Principles Disciple Runtime V2 痛苦诊断时使用。本技能强制使用 Runtime V2 入口:自动入口是高价值门控痛苦事件,手动入口是 `pd pain record`。禁止直接写 `.state/.pain_flag`。
4
- disable-model-invocation: false
5
- ---
6
-
7
- # PD Runtime V2 痛苦诊断
8
-
9
- 所有痛苦诊断都走 Runtime V2。不要把 legacy pain flag 文件当作诊断入口。
10
-
11
- ## 入口
12
-
13
- 自动入口:
14
- - 工具失败先累计 GFI/摩擦。
15
- - 只有高价值 episode 才进入 Runtime V2:高 GFI、重复同类失败、严重语义痛苦、LLM paralysis,或明确手动 pain。
16
- - 通过门控的 `pain_detected` 进入 `PainSignalBridge`。
17
- - Bridge 调用 `DiagnosticianRunner`,提交 candidate,并 intake 到 ledger。
18
-
19
- 手动入口:
20
- ```bash
21
- pd pain record --reason "<reason>" --score <0-100> --workspace "<workspace>" --json
22
- ```
23
-
24
- 禁止入口:
25
- - 不要写 `.state/.pain_flag`。
26
- - 不要用 `write_file`、shell 重定向、`Set-Content`、`Out-File`、`node -e` 或任何文件写入方式创建 `.state/.pain_flag`。
27
- - 不要使用 `write_pain_flag` 工具。Runtime V2 不使用这个工具。
28
-
29
- ## 状态查看命令
30
-
31
- 运行时健康检查:
32
- ```bash
33
- pd runtime probe --runtime pi-ai --workspace "<workspace>" --json
34
- ```
35
-
36
- 业务流策略:
37
- ```bash
38
- pd runtime flow show --workspace "<workspace>" --json
39
- ```
40
-
41
- 候选原则:
42
- ```bash
43
- pd candidate list --workspace "<workspace>" --json
44
- pd candidate show --candidate-id "<candidateId>" --workspace "<workspace>" --json
45
- ```
46
-
47
- ## 成功标准
48
-
49
- 一次诊断只有在同时满足以下条件时才算成功:
50
- - `status` 是 `succeeded`
51
- - `candidateIds` 非空
52
- - `ledgerEntryIds` 非空
53
-
54
- 只创建 task 不算成功。没有 candidate 或 ledger entry 的 run 是失败、重试或未完成。
55
-
56
- ## 需要手动诊断时
57
-
58
- 1. 使用 `pd pain record`。
59
- 2. 检查 JSON 输出。
60
- 3. 如果 `candidateIds` 或 `ledgerEntryIds` 为空,视为未完成。
61
- 4. 用 `pd candidate list/show` 和 `pd runtime flow show` 继续排查。
@@ -1,32 +0,0 @@
1
- ---
2
- name: plan-script
3
- description: Create a step-by-step movie-script style execution plan. Includes target files, verification metrics, and rollback strategy.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Plan Script (计划编排)
8
-
9
- **目标**: 产生一份“傻瓜式”可执行计划,确保执行过程受控。
10
-
11
- 请按以下结构生成计划:
12
-
13
- ## 1. Target Files (授权清单)
14
- - 列出本次计划**唯一授权**修改的文件路径。
15
- - 格式:`- path/to/file`
16
-
17
- ## 2. Steps (执行步骤)
18
- 1. 具体到文件名和工具调用的操作。
19
- 2. 每个步骤包含预期的中间状态。
20
-
21
- ## 3. Metrics (验证指标)
22
- - 如何量化证明本计划成功了?(如:测试通过、命令返回 0、日志出现特定字符串)。
23
-
24
- ## 4. Active Mental Models (激活的思维模型)
25
- - 从 `.principles/THINKING_OS.md` 中挑选 **2 个** 最适合当前任务的元认知模型。
26
- - 格式:`- [T-0X] 模型名称:为什么在这个任务中需要它?`
27
-
28
- ## 5. Rollback (回滚方案)
29
- - 如果步骤 2 失败,如何一键恢复到安全状态?
30
-
31
- ---
32
- **动作**: 请将以上内容更新至 `PLAN.md`,并设置 `STATUS: READY`。
@@ -1,24 +0,0 @@
1
- ---
2
- name: profile
3
- description: Manually correct or update the user's expertise profile. Use to tell the system "I am an expert in X" or "I am a novice in Y".
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Profile Corrector (画像修正)
8
-
9
- 你现在是“人工干预画像”组件。
10
-
11
- **任务**:
12
- 1. 解析用户输入的 `$ARGUMENTS` (格式如 "Frontend: Expert")。
13
- 2. 生成一个**增量评价**文件 `.state/.user_verdict.json`,强制将该领域的权重设为极高(或极低,视用户描述而定)。
14
- 3. 提示用户:变更将在任务结束 (Stop) 后生效。
15
-
16
- **JSON 模板**:
17
- ```json
18
- {
19
- "updates": [
20
- {"domain": "<EXTRACTED_DOMAIN>", "delta": 10, "reason": "User self-declared expertise"}
21
- ]
22
- }
23
- ```
24
- *(注意:如果是 Novice,delta 设为 -10)*
@@ -1,40 +0,0 @@
1
- ---
2
- name: reflection
3
- description: Perform a deep metacognitive reflection on the current task status, user sentiment, and systemic issues. Use this before context compaction or when stuck.
4
- disable-model-invocation: false
5
- ---
6
-
7
- # 痛定思痛 (Metacognitive Reflection)
8
-
9
- **触发场景**: 上下文即将压缩 (Memory Loss Imminent) 或 任务长期停滞。
10
- **目标**: 在遗忘详细过程之前,提取“痛苦教训”并固化为原则。
11
-
12
- 请执行以下反思步骤:
13
-
14
- ## 1. 现状扫描 (Status Scan)
15
- - **Goal**: 我们最初的目标是什么?(Check `PLAN.md` or early conversation)
16
- - **Status**: 现在完成了多少?卡在哪里?
17
- - **Cost**: 我们消耗了大量 Token,产出是否匹配?
18
-
19
- ## 2. 痛苦感知 (Pain Detection)
20
- 请诚实回答以下问题(Yes/No):
21
- - [ ] **任务停滞**: 是否连续 3 轮以上没有实质性代码进展?
22
- - [ ] **重复犯错**: 是否有 Bug 被修复后又重现,或同样的错误报了两次?
23
- - [ ] **用户挫败**: 用户是否使用了“不对”、“不是”、“停下”等否定词,或语气变得急躁?
24
- - [ ] **盲目行动**: 是否在没有 PLAN 或 AUDIT 的情况下直接修改了代码?
25
- - [ ] **架构劣化**: 现在的代码是否比开始时更乱了?
26
-
27
- ## 3. 根因分析 (If Pain Detected)
28
- 如果上述任一为 Yes,必须进行深层归因:
29
- - **Direct Cause**: 我们做了什么(或没做什么)导致了现在的局面?
30
- - **Root Cause**: 思维模型哪里出了问题?(是太急于求成?还是忽视了已有文件?还是轻视了测试?)
31
-
32
- ## 4. 进化落盘 (Evolution)
33
- 如果检测到痛苦,必须执行:
34
- 1. **记录**: 将分析结果写入 `memory/ISSUE_LOG.md`。
35
- 2. **提炼**: 如果这是第二次发生,提炼一条 **禁止性原则 (Must NOT)**。
36
- 3. **加固**: 建议一个具体的 Hook 或 Test 来防止未来重犯。
37
-
38
- ## 5. 恢复计划 (Recovery)
39
- - 既然要压缩上下文,我们下一步该如何以“最干净”的状态继续?
40
- - 更新 `PLAN.md`,标记当前进度,确保压缩后能无缝衔接。