create-principles-disciple 1.76.0 → 1.78.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 (217) hide show
  1. package/console/dist/server/config/feature-flags.d.ts +25 -0
  2. package/console/dist/server/config/feature-flags.js +101 -0
  3. package/console/dist/server/index.js +16 -0
  4. package/console/dist/server/models/FeedbackReportConsoleModel.d.ts +49 -0
  5. package/console/dist/server/models/FeedbackReportConsoleModel.js +242 -0
  6. package/console/dist/server/routes/feedback-reports.d.ts +18 -0
  7. package/console/dist/server/routes/feedback-reports.js +165 -0
  8. package/console/dist/ui/App.js +2 -1
  9. package/console/dist/ui/api.d.ts +26 -2
  10. package/console/dist/ui/api.js +18 -1
  11. package/console/dist/ui/components/app-sidebar.js +2 -1
  12. package/console/dist/ui/components/error-boundary.js +9 -2
  13. package/console/dist/ui/i18n/en.json +67 -1
  14. package/console/dist/ui/i18n/zh-CN.json +67 -1
  15. package/console/dist/ui/pages/ReportProblemPage.d.ts +1 -0
  16. package/console/dist/ui/pages/ReportProblemPage.js +186 -0
  17. package/console/dist/ui/pages/ReportProblemValidators.d.ts +51 -0
  18. package/console/dist/ui/pages/ReportProblemValidators.js +114 -0
  19. package/console/dist/web/assets/app.css +18 -0
  20. package/console/dist/web/assets/app.js +1047 -125
  21. package/console/package.json +1 -0
  22. package/core/dist/runtime-v2/__tests__/architecture-regression.test.js +24 -1
  23. package/core/dist/runtime-v2/__tests__/architecture-regression.test.js.map +1 -1
  24. package/core/dist/runtime-v2/__tests__/feedback/create-report.test.d.ts +2 -0
  25. package/core/dist/runtime-v2/__tests__/feedback/create-report.test.d.ts.map +1 -0
  26. package/core/dist/runtime-v2/__tests__/feedback/create-report.test.js +402 -0
  27. package/core/dist/runtime-v2/__tests__/feedback/create-report.test.js.map +1 -0
  28. package/core/dist/runtime-v2/__tests__/feedback/privacy-preview.test.d.ts +2 -0
  29. package/core/dist/runtime-v2/__tests__/feedback/privacy-preview.test.d.ts.map +1 -0
  30. package/core/dist/runtime-v2/__tests__/feedback/privacy-preview.test.js +128 -0
  31. package/core/dist/runtime-v2/__tests__/feedback/privacy-preview.test.js.map +1 -0
  32. package/core/dist/runtime-v2/__tests__/feedback/redact-sensitive.test.d.ts +2 -0
  33. package/core/dist/runtime-v2/__tests__/feedback/redact-sensitive.test.d.ts.map +1 -0
  34. package/core/dist/runtime-v2/__tests__/feedback/redact-sensitive.test.js +231 -0
  35. package/core/dist/runtime-v2/__tests__/feedback/redact-sensitive.test.js.map +1 -0
  36. package/core/dist/runtime-v2/__tests__/feedback/render-github-url.test.d.ts +2 -0
  37. package/core/dist/runtime-v2/__tests__/feedback/render-github-url.test.d.ts.map +1 -0
  38. package/core/dist/runtime-v2/__tests__/feedback/render-github-url.test.js +102 -0
  39. package/core/dist/runtime-v2/__tests__/feedback/render-github-url.test.js.map +1 -0
  40. package/core/dist/runtime-v2/__tests__/feedback/render-markdown.test.d.ts +2 -0
  41. package/core/dist/runtime-v2/__tests__/feedback/render-markdown.test.d.ts.map +1 -0
  42. package/core/dist/runtime-v2/__tests__/feedback/render-markdown.test.js +130 -0
  43. package/core/dist/runtime-v2/__tests__/feedback/render-markdown.test.js.map +1 -0
  44. package/core/dist/runtime-v2/__tests__/workspace-guidance-migration.test.d.ts +2 -0
  45. package/core/dist/runtime-v2/__tests__/workspace-guidance-migration.test.d.ts.map +1 -0
  46. package/core/dist/runtime-v2/__tests__/workspace-guidance-migration.test.js +328 -0
  47. package/core/dist/runtime-v2/__tests__/workspace-guidance-migration.test.js.map +1 -0
  48. package/core/dist/runtime-v2/activation/__tests__/prompt-activation-reader-contract.test.d.ts +2 -0
  49. package/core/dist/runtime-v2/activation/__tests__/prompt-activation-reader-contract.test.d.ts.map +1 -0
  50. package/core/dist/runtime-v2/activation/__tests__/prompt-activation-reader-contract.test.js +343 -0
  51. package/core/dist/runtime-v2/activation/__tests__/prompt-activation-reader-contract.test.js.map +1 -0
  52. package/core/dist/runtime-v2/activation/index.d.ts +2 -0
  53. package/core/dist/runtime-v2/activation/index.d.ts.map +1 -1
  54. package/core/dist/runtime-v2/activation/index.js +1 -0
  55. package/core/dist/runtime-v2/activation/index.js.map +1 -1
  56. package/core/dist/runtime-v2/activation/prompt-activation-reader-contract.d.ts +34 -0
  57. package/core/dist/runtime-v2/activation/prompt-activation-reader-contract.d.ts.map +1 -0
  58. package/core/dist/runtime-v2/activation/prompt-activation-reader-contract.js +109 -0
  59. package/core/dist/runtime-v2/activation/prompt-activation-reader-contract.js.map +1 -0
  60. package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js +13 -0
  61. package/core/dist/runtime-v2/feature-flags/__tests__/feature-flag-contract.test.js.map +1 -1
  62. package/core/dist/runtime-v2/feature-flags/__tests__/plugin-surface-registry.test.d.ts +2 -0
  63. package/core/dist/runtime-v2/feature-flags/__tests__/plugin-surface-registry.test.d.ts.map +1 -0
  64. package/core/dist/runtime-v2/feature-flags/__tests__/plugin-surface-registry.test.js +141 -0
  65. package/core/dist/runtime-v2/feature-flags/__tests__/plugin-surface-registry.test.js.map +1 -0
  66. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.d.ts.map +1 -1
  67. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js +4 -1
  68. package/core/dist/runtime-v2/feature-flags/feature-flag-contract.js.map +1 -1
  69. package/core/dist/runtime-v2/feature-flags/index.d.ts +2 -0
  70. package/core/dist/runtime-v2/feature-flags/index.d.ts.map +1 -1
  71. package/core/dist/runtime-v2/feature-flags/index.js +1 -0
  72. package/core/dist/runtime-v2/feature-flags/index.js.map +1 -1
  73. package/core/dist/runtime-v2/feature-flags/plugin-surface-registry.d.ts +25 -0
  74. package/core/dist/runtime-v2/feature-flags/plugin-surface-registry.d.ts.map +1 -0
  75. package/core/dist/runtime-v2/feature-flags/plugin-surface-registry.js +233 -0
  76. package/core/dist/runtime-v2/feature-flags/plugin-surface-registry.js.map +1 -0
  77. package/core/dist/runtime-v2/feedback/create-report.d.ts +14 -0
  78. package/core/dist/runtime-v2/feedback/create-report.d.ts.map +1 -0
  79. package/core/dist/runtime-v2/feedback/create-report.js +257 -0
  80. package/core/dist/runtime-v2/feedback/create-report.js.map +1 -0
  81. package/core/dist/runtime-v2/feedback/feedback-types.d.ts +120 -0
  82. package/core/dist/runtime-v2/feedback/feedback-types.d.ts.map +1 -0
  83. package/core/dist/runtime-v2/feedback/feedback-types.js +243 -0
  84. package/core/dist/runtime-v2/feedback/feedback-types.js.map +1 -0
  85. package/core/dist/runtime-v2/feedback/index.d.ts +9 -0
  86. package/core/dist/runtime-v2/feedback/index.d.ts.map +1 -0
  87. package/core/dist/runtime-v2/feedback/index.js +11 -0
  88. package/core/dist/runtime-v2/feedback/index.js.map +1 -0
  89. package/core/dist/runtime-v2/feedback/internal-guards.d.ts +2 -0
  90. package/core/dist/runtime-v2/feedback/internal-guards.d.ts.map +1 -0
  91. package/core/dist/runtime-v2/feedback/internal-guards.js +6 -0
  92. package/core/dist/runtime-v2/feedback/internal-guards.js.map +1 -0
  93. package/core/dist/runtime-v2/feedback/privacy-preview.d.ts +14 -0
  94. package/core/dist/runtime-v2/feedback/privacy-preview.d.ts.map +1 -0
  95. package/core/dist/runtime-v2/feedback/privacy-preview.js +128 -0
  96. package/core/dist/runtime-v2/feedback/privacy-preview.js.map +1 -0
  97. package/core/dist/runtime-v2/feedback/redact-sensitive.d.ts +37 -0
  98. package/core/dist/runtime-v2/feedback/redact-sensitive.d.ts.map +1 -0
  99. package/core/dist/runtime-v2/feedback/redact-sensitive.js +272 -0
  100. package/core/dist/runtime-v2/feedback/redact-sensitive.js.map +1 -0
  101. package/core/dist/runtime-v2/feedback/render-github-url.d.ts +21 -0
  102. package/core/dist/runtime-v2/feedback/render-github-url.d.ts.map +1 -0
  103. package/core/dist/runtime-v2/feedback/render-github-url.js +57 -0
  104. package/core/dist/runtime-v2/feedback/render-github-url.js.map +1 -0
  105. package/core/dist/runtime-v2/feedback/render-markdown.d.ts +12 -0
  106. package/core/dist/runtime-v2/feedback/render-markdown.d.ts.map +1 -0
  107. package/core/dist/runtime-v2/feedback/render-markdown.js +166 -0
  108. package/core/dist/runtime-v2/feedback/render-markdown.js.map +1 -0
  109. package/core/dist/runtime-v2/feedback/safe-stringify.d.ts +6 -0
  110. package/core/dist/runtime-v2/feedback/safe-stringify.d.ts.map +1 -0
  111. package/core/dist/runtime-v2/feedback/safe-stringify.js +115 -0
  112. package/core/dist/runtime-v2/feedback/safe-stringify.js.map +1 -0
  113. package/core/dist/runtime-v2/index.d.ts +8 -1
  114. package/core/dist/runtime-v2/index.d.ts.map +1 -1
  115. package/core/dist/runtime-v2/index.js +12 -1
  116. package/core/dist/runtime-v2/index.js.map +1 -1
  117. package/core/dist/runtime-v2/workspace-guidance-migration.d.ts +12 -0
  118. package/core/dist/runtime-v2/workspace-guidance-migration.d.ts.map +1 -0
  119. package/core/dist/runtime-v2/workspace-guidance-migration.js +193 -0
  120. package/core/dist/runtime-v2/workspace-guidance-migration.js.map +1 -0
  121. package/core/package.json +4 -0
  122. package/package.json +1 -1
  123. package/plugin/dist/commands/context.js +5 -5
  124. package/plugin/dist/commands/strategy.d.ts +0 -1
  125. package/plugin/dist/commands/strategy.js +0 -14
  126. package/plugin/dist/core/runtime-v2-prompt-activation-reader.d.ts +4 -13
  127. package/plugin/dist/core/runtime-v2-prompt-activation-reader.js +36 -74
  128. package/plugin/dist/core/surface-guard.d.ts +27 -0
  129. package/plugin/dist/core/surface-guard.js +82 -0
  130. package/plugin/dist/core/workspace-guidance-migrator.d.ts +12 -0
  131. package/plugin/dist/core/workspace-guidance-migrator.js +141 -0
  132. package/plugin/dist/hooks/prompt.js +20 -143
  133. package/plugin/dist/i18n/commands.js +2 -14
  134. package/plugin/dist/index.d.ts +27 -0
  135. package/plugin/dist/index.js +180 -65
  136. package/plugin/dist/service/correction-observer-service.d.ts +11 -0
  137. package/plugin/dist/service/correction-observer-service.js +172 -0
  138. package/plugin/dist/service/evolution-worker.js +1 -110
  139. package/plugin/dist/types.d.ts +2 -2
  140. package/plugin/dist/types.js +3 -3
  141. package/plugin/templates/langs/en/core/BOOTSTRAP.md +5 -19
  142. package/plugin/templates/langs/en/principles/THINKING_OS.md +1 -1
  143. package/plugin/templates/langs/en/skills/admin/SKILL.md +2 -2
  144. package/plugin/templates/langs/en/skills/bootstrap-tools/SKILL.md +1 -1
  145. package/plugin/templates/langs/en/skills/init-strategy/SKILL.md +1 -1
  146. package/plugin/templates/langs/en/skills/pd-mentor/SKILL.md +8 -23
  147. package/plugin/templates/langs/en/skills/reflection/SKILL.md +2 -2
  148. package/plugin/templates/langs/en/skills/report/SKILL.md +1 -1
  149. package/plugin/templates/langs/zh/core/BOOTSTRAP.md +3 -16
  150. package/plugin/templates/langs/zh/principles/THINKING_OS.md +1 -1
  151. package/plugin/templates/langs/zh/skills/admin/SKILL.md +2 -2
  152. package/plugin/templates/langs/zh/skills/bootstrap-tools/SKILL.md +1 -1
  153. package/plugin/templates/langs/zh/skills/init-strategy/SKILL.md +1 -1
  154. package/plugin/templates/langs/zh/skills/pd-mentor/SKILL.md +7 -22
  155. package/plugin/templates/langs/zh/skills/reflection/SKILL.md +2 -2
  156. package/plugin/templates/langs/zh/skills/report/SKILL.md +1 -1
  157. package/plugin/templates/workspace/.principles/THINKING_OS.md +1 -1
  158. package/templates/langs/en/core/BOOTSTRAP.md +1 -1
  159. package/templates/langs/en/principles/THINKING_OS.md +1 -1
  160. package/templates/langs/en/skills/admin/SKILL.md +2 -2
  161. package/templates/langs/en/skills/pd-grooming/SKILL.md +1 -1
  162. package/templates/langs/en/skills/reflection/SKILL.md +2 -2
  163. package/templates/langs/en/skills/report/SKILL.md +1 -1
  164. package/templates/langs/zh/core/BOOTSTRAP.md +1 -1
  165. package/templates/langs/zh/principles/THINKING_OS.md +1 -1
  166. package/templates/langs/zh/skills/admin/SKILL.md +2 -2
  167. package/templates/langs/zh/skills/pd-grooming/SKILL.md +1 -1
  168. package/templates/langs/zh/skills/reflection/SKILL.md +2 -2
  169. package/templates/langs/zh/skills/report/SKILL.md +1 -1
  170. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/EXAMPLES.md +0 -63
  171. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/REFERENCE.md +0 -136
  172. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/SKILL.md +0 -67
  173. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/references/agent-registry.json +0 -143
  174. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/references/specs/bugfix-complex-template.json +0 -107
  175. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/references/specs/feature-complex-template.json +0 -107
  176. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal-verify.json +0 -95
  177. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal.json +0 -98
  178. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/references/workflow-v1-acceptance-checklist.md +0 -58
  179. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/references/workflow-v1.4-work-unit-handoff.md +0 -190
  180. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/archive.mjs +0 -310
  181. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/contract-enforcement.mjs +0 -683
  182. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/decision.mjs +0 -604
  183. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/state-store.mjs +0 -32
  184. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/task-specs.mjs +0 -707
  185. package/plugin/templates/langs/en/skills/ai-sprint-orchestration/scripts/run.mjs +0 -3455
  186. package/plugin/templates/langs/en/skills/evolve-system/SKILL.md +0 -46
  187. package/plugin/templates/langs/en/skills/manage-okr/SKILL.md +0 -96
  188. package/plugin/templates/langs/en/skills/pd-daily/SKILL.md +0 -199
  189. package/plugin/templates/langs/en/skills/pd-grooming/SKILL.md +0 -46
  190. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/EXAMPLES.md +0 -63
  191. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/REFERENCE.md +0 -136
  192. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/SKILL.md +0 -67
  193. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/agent-registry.json +0 -143
  194. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/bugfix-complex-template.json +0 -107
  195. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/feature-complex-template.json +0 -107
  196. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/nocturnal-trinity-quality-enhancement.json +0 -111
  197. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal-verify.json +0 -95
  198. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal.json +0 -98
  199. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/workflow-v1-acceptance-checklist.md +0 -58
  200. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/references/workflow-v1.4-work-unit-handoff.md +0 -190
  201. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/runtime/.gitignore +0 -2
  202. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/archive.mjs +0 -310
  203. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/contract-enforcement.mjs +0 -683
  204. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/decision.mjs +0 -604
  205. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/state-store.mjs +0 -32
  206. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/task-specs.mjs +0 -707
  207. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/scripts/run.mjs +0 -3455
  208. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/test/archive.test.mjs +0 -230
  209. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/test/contract-enforcement.test.mjs +0 -672
  210. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/test/decision.test.mjs +0 -1321
  211. package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/test/run.test.mjs +0 -1435
  212. package/plugin/templates/langs/zh/skills/evolve-system/SKILL.md +0 -46
  213. package/plugin/templates/langs/zh/skills/manage-okr/SKILL.md +0 -109
  214. package/plugin/templates/langs/zh/skills/pd-daily/SKILL.md +0 -283
  215. package/plugin/templates/langs/zh/skills/pd-grooming/SKILL.md +0 -46
  216. package/plugin/templates/workspace/PLAN.md +0 -2
  217. package/templates/workspace/PLAN.md +0 -2
@@ -13,9 +13,6 @@ export { loadEvolutionQueue, saveEvolutionQueue, withQueueLock, acquireQueueLock
13
13
  export { EVOLUTION_QUEUE_LOCK_SUFFIX, LOCK_MAX_RETRIES, LOCK_RETRY_DELAY_MS, LOCK_STALE_MS } from './queue-io.js';
14
14
  import { saveEvolutionQueue, requireQueueLock } from './queue-io.js';
15
15
  import { WorkflowStore } from './subagent-workflow/workflow-store.js';
16
- import { WorkflowFunnelLoader, PiAiRuntimeAdapter, CorrectionObserver, AgentScheduler, } from '@principles/core/runtime-v2';
17
- import { KeywordOptimizationService } from './keyword-optimization-service.js';
18
- import { CorrectionCueLearner } from '../core/correction-cue-learner.js';
19
16
  import { PrincipleCompiler } from '../core/principle-compiler/index.js';
20
17
  import { loadLedger, updatePrinciple } from '../core/principle-tree-ledger.js';
21
18
  import { findRecentDuplicateTask } from './evolution-dedup.js';
@@ -482,46 +479,6 @@ async function processEvolutionQueueWithResult(wctx, logger, eventLog, api) {
482
479
  }
483
480
  return { queue: queueResult, errors };
484
481
  }
485
- function resolveCorrectionObserver(wctx, logger) {
486
- try {
487
- const loader = new WorkflowFunnelLoader(wctx.stateDir);
488
- const funnel = loader.getFunnel('pd-correction-observer');
489
- const policy = funnel?.policy;
490
- if (!policy || policy.runtimeKind !== 'pi-ai') {
491
- logger?.debug?.('[PD:Correction] workflows.yaml pd-correction-observer policy not found. Falling back to environment variables.');
492
- const provider = process.env.PD_CORRECTION_PROVIDER || 'anthropic';
493
- const model = process.env.PD_CORRECTION_MODEL || 'anthropic/claude-3-5-sonnet';
494
- const apiKeyEnv = process.env.PD_CORRECTION_API_KEY_ENV || 'ANTHROPIC_API_KEY';
495
- const baseUrl = process.env.PD_CORRECTION_BASE_URL;
496
- if (!process.env[apiKeyEnv]) {
497
- logger?.debug?.(`[PD:Correction] Correction observer API key env ${apiKeyEnv} is not set. Periodic optimization disabled.`);
498
- return null;
499
- }
500
- const adapter = new PiAiRuntimeAdapter({
501
- provider,
502
- model,
503
- apiKeyEnv,
504
- baseUrl,
505
- workspace: wctx.workspaceDir,
506
- });
507
- return new CorrectionObserver({ runtimeAdapter: adapter });
508
- }
509
- const adapter = new PiAiRuntimeAdapter({
510
- provider: String(policy.provider),
511
- model: String(policy.model),
512
- apiKeyEnv: String(policy.apiKeyEnv),
513
- maxRetries: policy.maxRetries,
514
- timeoutMs: policy.timeoutMs ?? 30_000,
515
- baseUrl: policy.baseUrl,
516
- workspace: wctx.workspaceDir,
517
- });
518
- return new CorrectionObserver({ runtimeAdapter: adapter }, { timeoutMs: policy.timeoutMs });
519
- }
520
- catch (err) {
521
- logger?.warn?.(`[PD:Correction] Failed to resolve CorrectionObserver: ${String(err)}`);
522
- return null;
523
- }
524
- }
525
482
  export const EvolutionWorkerService = {
526
483
  id: 'principles-evolution-worker',
527
484
  api: null,
@@ -587,73 +544,7 @@ export const EvolutionWorkerService = {
587
544
  await processDetectionQueue(wctx, api, eventLog);
588
545
  }
589
546
  // processPromotion removed (D-06) — promotion via PAIN_CANDIDATES no longer needed
590
- // ── Correction Observer: periodic keyword optimization (D-40-08 / H-1) ──
591
- try {
592
- const observer = resolveCorrectionObserver(wctx, logger);
593
- if (observer) {
594
- logger?.info?.('[PD:EvolutionWorker] Correction Observer resolved. Initiating periodic optimization...');
595
- const db = TrajectoryRegistry.get(wctx.workspaceDir);
596
- const recentSessions = db.listRecentSessions({ limit: 20 });
597
- const recentSessionIds = recentSessions.map(s => s.sessionId);
598
- if (recentSessionIds.length > 0) {
599
- const recentMessages = [];
600
- for (const sId of recentSessionIds.slice(0, 5)) {
601
- try {
602
- const turns = db.listUserTurnsForSession(sId);
603
- for (const t of turns) {
604
- if (t.rawExcerpt) {
605
- recentMessages.push(t.rawExcerpt);
606
- }
607
- }
608
- }
609
- catch (turnErr) {
610
- logger?.warn?.(`[PD:EvolutionWorker] Failed to load user turns for session ${sId}: ${String(turnErr)}`);
611
- }
612
- }
613
- const learner = CorrectionCueLearner.get(wctx.stateDir);
614
- const keywords = learner.getStore().keywords;
615
- const keywordStoreSummary = {
616
- totalKeywords: keywords.length,
617
- terms: keywords.map(k => ({
618
- term: k.term,
619
- weight: k.weight,
620
- hitCount: k.hitCount ?? 0,
621
- truePositiveCount: k.truePositiveCount ?? 0,
622
- falsePositiveCount: k.falsePositiveCount ?? 0,
623
- })),
624
- };
625
- const optimizationService = KeywordOptimizationService.get(wctx.stateDir, wctx.workspaceDir, logger);
626
- const trajectoryHistory = await optimizationService.buildTrajectoryHistory(recentSessionIds);
627
- const payload = {
628
- parentSessionId: 'evolution-worker',
629
- workspaceDir: wctx.workspaceDir,
630
- keywordStoreSummary,
631
- recentMessages,
632
- trajectoryHistory,
633
- };
634
- const scheduler = new AgentScheduler();
635
- scheduler.register({
636
- agentId: 'correction-observer',
637
- mode: 'realtime',
638
- runner: observer,
639
- });
640
- logger?.info?.(`[PD:EvolutionWorker] Dispatching correction-observer with ${trajectoryHistory.length} trajectory events, ${recentMessages.length} recent messages.`);
641
- const result = await scheduler.dispatch('correction-observer', payload);
642
- logger?.info?.(`[PD:EvolutionWorker] Correction-observer completed: updated=${result.updated}, summary="${result.summary}"`);
643
- if (result.updated) {
644
- optimizationService.applyResult(result);
645
- }
646
- }
647
- else {
648
- logger?.info?.('[PD:EvolutionWorker] No recent sessions found. Skipping correction optimization.');
649
- }
650
- }
651
- }
652
- catch (corrErr) {
653
- const corrErrMsg = `Correction observer execution failed: ${String(corrErr)}`;
654
- cycleResult.errors.push(corrErrMsg);
655
- logger?.warn?.(`[PD:EvolutionWorker] ${corrErrMsg}`);
656
- }
547
+ // Correction Observer extracted to independent service (PRI-293) no longer runs on EvolutionWorker heartbeat
657
548
  try {
658
549
  const subagentRuntime = api?.runtime?.subagent;
659
550
  const workflowStore = new WorkflowStore({ workspaceDir: wctx.workspaceDir });
@@ -25,9 +25,9 @@ export interface ContextInjectionConfig {
25
25
  }
26
26
  /**
27
27
  * Default context injection configuration
28
- * Based on user requirements:
28
+ * Based on MVP-first strategy (ADR-0014):
29
29
  * - principles: always on (not configurable)
30
- * - thinkingOs: true (can be turned off)
30
+ * - thinkingOs: false by default (MVP-Quiet, user can opt-in via /pd-context)
31
31
  * - projectFocus: 'off' (default closed, user can enable)
32
32
  */
33
33
  export declare const defaultContextConfig: ContextInjectionConfig;
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Default context injection configuration
3
- * Based on user requirements:
3
+ * Based on MVP-first strategy (ADR-0014):
4
4
  * - principles: always on (not configurable)
5
- * - thinkingOs: true (can be turned off)
5
+ * - thinkingOs: false by default (MVP-Quiet, user can opt-in via /pd-context)
6
6
  * - projectFocus: 'off' (default closed, user can enable)
7
7
  */
8
8
  export const defaultContextConfig = {
9
- thinkingOs: true,
9
+ thinkingOs: false,
10
10
  projectFocus: 'off',
11
11
  evolutionContext: {
12
12
  enabled: true,
@@ -145,12 +145,11 @@ If the user has clear project goals, run `/init-strategy` skill to:
145
145
 
146
146
  ## ⏰ Cron Jobs Initialization (Recommended)
147
147
 
148
- **Why you need this:** Your HEARTBEAT.md has been simplified to reduce token cost. But the tasks that were removed (grooming, health checks, strategy alignment, weekly governance) are still important — they just moved here. Without these cron jobs, your workspace will accumulate temp files, drift from strategy, and lose track of weekly progress.
148
+ **Why you need this:** Your HEARTBEAT.md has been simplified to reduce token cost. But the tasks that were removed (health checks, strategy alignment, weekly governance) are still important — they just moved here. Without these cron jobs, your workspace will drift from strategy and lose track of weekly progress.
149
149
 
150
150
  **How to install:** Ask the user for permission, then execute the CLI commands below. Each command creates a background task that runs automatically.
151
151
 
152
152
  **What you get:**
153
- - Clean workspace (no temp file buildup)
154
153
  - Early warning on tool failures
155
154
  - Automatic strategy alignment
156
155
  - Weekly governance with evidence-based task validation
@@ -158,24 +157,11 @@ If the user has clear project goals, run `/init-strategy` skill to:
158
157
 
159
158
  ### Ask the User
160
159
 
161
- > "I can set up background cron jobs for automatic maintenance: cleanup, health checks, strategy alignment, and weekly governance. Should I configure them?"
160
+ > "I can set up background cron jobs for automatic maintenance: health checks, strategy alignment, and weekly governance. Should I configure them?"
162
161
 
163
162
  If the user agrees, **execute these commands:**
164
163
 
165
- ### 1. Grooming (Daily at 2 AM)
166
-
167
- **What it does:** Cleans workspace temp files daily to prevent clutter buildup.
168
-
169
- ```bash
170
- openclaw cron add --name "pd-grooming-daily" \
171
- --cron "0 2 * * *" --tz "UTC" \
172
- --session isolated \
173
- --light-context \
174
- --no-deliver \
175
- --message 'Execute pd-grooming skill: Check workspace root, clean temp files and digital clutter. Follow safety rules strictly. Do not delete business code.'
176
- ```
177
-
178
- ### 2. Health Check (Every 4 hours)
164
+ ### 1. Health Check (Every 4 hours)
179
165
 
180
166
  **What it does:** Verifies core tools (rg, node, python) are available and alerts on failure.
181
167
 
@@ -183,7 +169,7 @@ openclaw cron add --name "pd-grooming-daily" \
183
169
  openclaw cron add --name "health-check" \
184
170
  --every 4h \
185
171
  --session main \
186
- --system-event 'Health check: Verify core tools (rg, node, python) are available. Check if PLAN.md state matches actual progress.'
172
+ --system-event 'Health check: Verify core tools (rg, node, python) are available. Check if workspace state matches actual progress.'
187
173
  ```
188
174
 
189
175
  ### 3. Strategy Alignment (Daily at 9 AM)
@@ -220,7 +206,7 @@ openclaw cron add --name "weekly-governance" \
220
206
  --cron "0 0 * * 0" --tz "UTC" \
221
207
  --session isolated \
222
208
  --timeout 300000 \
223
- --message 'Execute weekly governance: 1) Validate CURRENT_FOCUS.md claims (PR merged? docs exist? tests pass?), 2) Update WEEK_STATE.json metrics, 3) Record to WEEK_EVENTS.jsonl, 4) If task queue empty, derive tasks from OKR and notify user'
209
+ --message 'Execute weekly governance: 1) Validate CURRENT_FOCUS.md claims (PR merged? docs exist? tests pass?), 2) Update WEEK_STATE.json metrics, 3) Record to WEEK_EVENTS.jsonl, 4) If task queue empty, remind user to plan next phase tasks'
224
210
  ```
225
211
 
226
212
  **JSON config reference:**
@@ -19,7 +19,7 @@ LLMs are highly sensitive to XML tags; this structure is designed to boost instr
19
19
 
20
20
  <directive id="T-02" name="PHYSICAL_MEMORY_PERSISTENCE">
21
21
  <trigger>When reasoning across multiple files, facing complex debugging, or when the conversation context grows long (>5 turns).</trigger>
22
- <must>TRUST FILES, NOT YOUR CONTEXT WINDOW. You MUST actively write your intermediate conclusions, breakpoints, and next steps to `memory/.scratchpad.md` or `PLAN.md`.</must>
22
+ <must>TRUST FILES, NOT YOUR CONTEXT WINDOW. You MUST actively write your intermediate conclusions, breakpoints, and next steps to `memory/.scratchpad.md`.</must>
23
23
  <forbidden>Relying on your internal "brain memory" to hold complex state, which will inevitably be wiped by context compression.</forbidden>
24
24
  </directive>
25
25
 
@@ -15,7 +15,7 @@ You are now the "Evolutionary System Administrator". Your responsibility is to m
15
15
  ### 1. `diagnose` (System Diagnosis)
16
16
  **Action**: Check the integrity of the "bare-bones" architecture.
17
17
  - **Core Components**: Check if `.claude/hooks/hook_runner.py` exists and is executable.
18
- - **Documentation Integrity**: Check if `.principles/PROFILE.json`, `PLAN.md` etc. exist.
18
+ - **Documentation Integrity**: Check if `.principles/PROFILE.json` etc. exist.
19
19
  - **Tool Awareness**: Check `.state/SYSTEM_CAPABILITIES.json`. If missing, prompt user: "⚠️ Toolchain upgrade not performed. Recommend running `/bootstrap-tools` to significantly enhance system capabilities."
20
20
  - **Memory Mount**: Check if `CLAUDE.md` contains `System Integration` section.
21
21
  - **Output**: Generate a health report listing missing or abnormal items.
@@ -23,7 +23,7 @@ You are now the "Evolutionary System Administrator". Your responsibility is to m
23
23
  ### 2. `repair` (System Repair)
24
24
  **Action**:
25
25
  - **Config Recovery**: If `PROFILE.json` is missing or corrupted, attempt recovery from `.claude/templates/PROFILE.json`.
26
- - **Structure Completion**: Ensure `PLAN.md` contains `## Target Files` heading.
26
+ - **Structure Completion**: Ensure workspace structure is complete.
27
27
  - **Forced Cleanup**: Delete `.pain_flag`, `.verdict.json`, `.user_verdict.json`, `.pending_reflection` and other temporary markers.
28
28
 
29
29
  ### 3. `reset` (Force Reset)
@@ -46,7 +46,7 @@ Your goal is to equip the agent team with the most advanced weapons. By analyzin
46
46
  ## Environment Capabilities
47
47
  Check @.state/SYSTEM_CAPABILITIES.json for high-performance tools (e.g., ripgrep, ast-grep) available in this environment. Use them!
48
48
  ```
49
- - Prompt user to run `/manage-okr` or `/admin diagnose` to let Agent perceive new capabilities.
49
+ - Prompt user to run `/pd-status` or `/admin diagnose` to let Agent perceive new capabilities.
50
50
 
51
51
  ## Core Principles
52
52
  - **Prefer New Over Old**: Dare to recommend new tools to replace old ones (e.g., recommend `pnpm` over `npm`, `vitest` over `jest`), but explain the reasoning.
@@ -51,4 +51,4 @@ Based on user's responses, extract 1-3 macro **Objectives (O)**.
51
51
  ```
52
52
 
53
53
  ## Completion
54
- After writing, prompt user: "✅ Strategic anchor locked. Recommend running `/manage-okr` for quarterly/iteration-level task breakdown."
54
+ After writing, prompt user: "✅ Strategic anchor locked. Recommend running `/pd-status` to check system status, or use `/pd-bootstrap` to scan environment tools."
@@ -25,16 +25,13 @@ I'm your intelligent mentor, helping you understand and use all features of Prin
25
25
 
26
26
  | Command | Purpose | Use Case |
27
27
  |---------|---------|----------|
28
- | `/pd-init` | Initialize strategy and OKRs | New project startup |
29
- | `/pd-okr` | Objectives and Key Results management | Weekly/monthly review |
28
+ | `/pd-init` | Initialize strategy | New project startup |
30
29
  | `/pd-bootstrap` | Environment tool scan and upgrade | Tool upgrade |
31
30
  | `/pd-research` | Initiate tool upgrade research | Deep research |
32
31
  | `/pd-thinking` | Manage mental models and candidates | Metacognition |
33
32
  | `/pd-evolve` | Execute full evolution loop | Bug fix |
34
- | `/pd-daily` | Configure and send evolution daily report | Daily review |
35
33
  | `/pd-evolution-status` | View trust score and security stage | Permission check |
36
34
  | `/pd-status` | View system status (GFI and Pain Dictionary) | Health check |
37
- | `/pd-grooming` | Workspace digital cleanup | Entropy reduction |
38
35
  | `/pd-help` | Get interactive command guidance | This skill |
39
36
 
40
37
  ---
@@ -46,7 +43,7 @@ I'm your intelligent mentor, helping you understand and use all features of Prin
46
43
  **Trigger**: User says "I just created a new project" or similar
47
44
 
48
45
  **Recommended Flow**:
49
- 1. `/pd-init` - Establish strategic vision and OKR framework
46
+ 1. `/pd-init` - Establish strategic vision
50
47
  2. `/pd-bootstrap` - Scan environment tools, get capability list
51
48
  3. `/pd-thinking` - Establish project's mental model baseline
52
49
 
@@ -71,26 +68,14 @@ I'm your intelligent mentor, helping you understand and use all features of Prin
71
68
  **Trigger**: User says "what did I do today", "check progress", "give me a report"
72
69
 
73
70
  **Recommended Flow**:
74
- 1. `/pd-daily` - Send today's evolution report
75
- 2. `/pd-evolution-status` - View current trust score
76
- 3. `/pd-okr` - Check OKR alignment
71
+ 1. `/pd-evolution-status` - View current trust score
72
+ 2. `/pd-status` - Check GFI and Pain Dictionary status
77
73
 
78
- **Script**: "Daily report in hand, evolution I command. Let me help you review today's achievements."
74
+ **Script**: "Let me help you review the current system status."
79
75
 
80
76
  ---
81
77
 
82
- ### Scenario 4: Messy Workspace
83
-
84
- **Trigger**: User says "project is too messy", "too many files", "need to organize"
85
-
86
- **Recommended Flow**:
87
- 1. `/pd-grooming` - Start workspace cleanup
88
-
89
- **Script**: "Digital cleanliness is a virtue. Let me help you reduce entropy."
90
-
91
- ---
92
-
93
- ### Scenario 5: Permission or Security Related
78
+ ### Scenario 4: Permission or Security Related
94
79
 
95
80
  **Trigger**: User says "not enough permissions", "blocked", "security level"
96
81
 
@@ -186,8 +171,8 @@ For complex scenarios, combine multiple skills:
186
171
  | Scenario | Combined Flow |
187
172
  |----------|---------------|
188
173
  | Major refactor | `/pd-evolve` → `deductive-audit` → execute |
189
- | System optimization | `/pd-status` → `evolve-system` → `root-cause` |
190
- | Project review | `/pd-daily` → `/pd-okr` → `reflection-log` |
174
+ | System optimization | `/pd-status` → `root-cause` → optimize |
175
+ | Project review | `/pd-evolution-status` → `/pd-status` → `reflection-log` |
191
176
 
192
177
  ### Internal Skill Calls
193
178
 
@@ -12,7 +12,7 @@ disable-model-invocation: false
12
12
  Please execute the following reflection steps:
13
13
 
14
14
  ## 1. Status Scan
15
- - **Goal**: What was our original objective? (Check `PLAN.md` or early conversation)
15
+ - **Goal**: What was our original objective? (Check early conversation context)
16
16
  - **Status**: How much is completed now? Where are we stuck?
17
17
  - **Cost**: We've consumed significant tokens. Is the output matching the cost?
18
18
 
@@ -37,4 +37,4 @@ If pain detected, must execute:
37
37
 
38
38
  ## 5. Recovery Plan
39
39
  - Since we're about to compact context, how should we continue with the "cleanest" state?
40
- - Update `PLAN.md`, mark current progress, ensure seamless continuation after compaction.
40
+ - Update `memory/.scratchpad.md`, mark current progress, ensure seamless continuation after compaction.
@@ -10,4 +10,4 @@ User (the boss) requests an immediate work report.
10
10
 
11
11
  ## Execution Action
12
12
  1. Immediately delegate ``pd_spawn_agent(reporter)``.
13
- 2. Task description: "The boss wants to know the current situation. Please analyze current conversation context, `PLAN.md`, and recent `memory/ISSUE_LOG.md` to write an elegant report for the boss. Remember to check their profile first!"
13
+ 2. Task description: "The boss wants to know the current situation. Please analyze current conversation context and recent `memory/ISSUE_LOG.md` to write an elegant report for the boss. Remember to check their profile first!"
@@ -162,20 +162,7 @@ memory/
162
162
 
163
163
  如果用户同意,**执行以下命令:**
164
164
 
165
- ### 1. 熵减巡检(每天凌晨 2 点)
166
-
167
- **功能:** 每天清理工作区临时文件,保持项目整洁。
168
-
169
- ```bash
170
- openclaw cron add --name "pd-grooming-daily" \
171
- --cron "0 2 * * *" --tz "UTC" \
172
- --session isolated \
173
- --light-context \
174
- --no-deliver \
175
- --message '执行 pd-grooming 技能:检查工作区根目录,清理临时文件和数字垃圾。严格遵循安全红线,不要删除业务代码。'
176
- ```
177
-
178
- ### 2. 环境健康检查(每 4 小时)
165
+ ### 1. 环境健康检查(每 4 小时)
179
166
 
180
167
  **功能:** 验证核心工具(rg, node, python)是否可用,异常时告警。
181
168
 
@@ -183,7 +170,7 @@ openclaw cron add --name "pd-grooming-daily" \
183
170
  openclaw cron add --name "health-check" \
184
171
  --every 4h \
185
172
  --session main \
186
- --system-event '环境健康检查:验证核心工具(rg, node, python)是否可用,检查 PLAN.md 状态与实际进度是否一致。'
173
+ --system-event '环境健康检查:验证核心工具(rg, node, python)是否可用,检查工作区状态与实际进度是否一致。'
187
174
  ```
188
175
 
189
176
  ### 3. 战略对齐检查(每天上午 9 点)
@@ -220,7 +207,7 @@ openclaw cron add --name "weekly-governance" \
220
207
  --cron "0 0 * * 0" --tz "UTC" \
221
208
  --session isolated \
222
209
  --timeout 300000 \
223
- --message '执行周治理:1) 验证 CURRENT_FOCUS.md 声称(PR 合并?文档存在?测试通过?),2) 更新 WEEK_STATE.json 指标,3) 记录到 WEEK_EVENTS.jsonl,4) 如果任务队列为空,从 OKR 推导任务并通知用户'
210
+ --message '执行周治理:1) 验证 CURRENT_FOCUS.md 声称(PR 合并?文档存在?测试通过?),2) 更新 WEEK_STATE.json 指标,3) 记录到 WEEK_EVENTS.jsonl,4) 如果任务队列为空,提醒用户规划下一阶段任务'
224
211
  ```
225
212
 
226
213
  **JSON 配置参考:**
@@ -19,7 +19,7 @@
19
19
 
20
20
  <directive id="T-02" name="PHYSICAL_MEMORY_PERSISTENCE">
21
21
  <trigger>在跨越多个文件进行推理、面临复杂的 Debug、或当对话上下文变得很长(>5 轮)时。</trigger>
22
- <must>信任文件,而不是你的上下文窗口。你必须主动将中间结论、断点和后续步骤写入 `memory/.scratchpad.md` 或 `PLAN.md`。</must>
22
+ <must>信任文件,而不是你的上下文窗口。你必须主动将中间结论、断点和后续步骤写入 `memory/.scratchpad.md`。</must>
23
23
  <forbidden>依赖你内部的“大脑记忆”来保持复杂状态,这些状态必然会被上下文压缩机制抹除。</forbidden>
24
24
  </directive>
25
25
 
@@ -15,7 +15,7 @@ disable-model-invocation: true
15
15
  ### 1. `diagnose` (系统诊断)
16
16
  **动作**: 检查“毛坯房”架构的完整性。
17
17
  - **核心组件**: 检查 `.claude/hooks/hook_runner.py` 是否存在且可执行。
18
- - **文档完整性**: 检查 `.principles/PROFILE.json`, `PLAN.md` 等是否存在。
18
+ - **文档完整性**: 检查 `.principles/PROFILE.json` 等是否存在。
19
19
  - **工具感知**: 检查 `.state/SYSTEM_CAPABILITIES.json`。若缺失,提示用户:"⚠️ 尚未进行工具链升级。建议运行 `/bootstrap-tools` 以大幅提升系统能力。"
20
20
  - **记忆挂载**: 检查 `CLAUDE.md` 是否包含 `System Integration` 章节。
21
21
  - **输出**: 生成一份健康报告,列出缺失或异常的项目。
@@ -23,7 +23,7 @@ disable-model-invocation: true
23
23
  ### 2. `repair` (系统修复)
24
24
  **动作**:
25
25
  - **配置恢复**: 如果 `PROFILE.json` 缺失或损坏,尝试从 `.claude/templates/PROFILE.json` 恢复。
26
- - **结构补全**: 确保 `PLAN.md` 包含 `## Target Files` 标题。
26
+ - **结构补全**: 确保工作区结构完整。
27
27
  - **强制清理**: 删除 `.pain_flag`, `.verdict.json`, `.user_verdict.json`, `.pending_reflection` 等临时标记。
28
28
 
29
29
  ### 3. `reset` (强制重置)
@@ -46,7 +46,7 @@ disable-model-invocation: true
46
46
  ## Environment Capabilities
47
47
  Check @.state/SYSTEM_CAPABILITIES.json for high-performance tools (e.g., ripgrep, ast-grep) available in this environment. Use them!
48
48
  ```
49
- - 提示用户运行 `/manage-okr` 或 `/admin diagnose` 以让 Agent 感知新能力。
49
+ - 提示用户运行 `/pd-status` 或 `/admin diagnose` 以让 Agent 感知新能力。
50
50
  ## 核心原则
51
51
  - **喜新厌旧**: 敢于推荐新工具替代旧工具(如推荐 `pnpm` 替 `npm`,推荐 `vitest` 替 `jest`),但要说明理由。
52
52
  - **安全第一**: 在安装前必须获得用户明确授权。
@@ -51,4 +51,4 @@ disable-model-invocation: true
51
51
  ```
52
52
 
53
53
  ## 结项
54
- 完成写入后,提示用户:“✅ 战略锚点已锁定。建议运行 `/manage-okr` 进行季度/迭代级的任务拆解。”
54
+ 完成写入后,提示用户:”✅ 战略锚点已锁定。建议运行 `/pd-status` 查看系统状态,或使用 `/pd-bootstrap` 扫描环境工具。”
@@ -25,16 +25,13 @@ disable-model-invocation: true
25
25
 
26
26
  | 命令 | 用途 | 适用场景 |
27
27
  |------|------|----------|
28
- | `/pd-init` | 初始化战略与OKR | 新项目启动 |
29
- | `/pd-okr` | 目标与关键结果管理 | 周/月度复盘 |
28
+ | `/pd-init` | 初始化战略 | 新项目启动 |
30
29
  | `/pd-bootstrap` | 环境工具扫描与升级 | 装备升级 |
31
30
  | `/pd-research` | 发起工具升级研究 | 深度调研 |
32
31
  | `/pd-thinking` | 管理思维模型与候选方案 | 元认知管理 |
33
32
  | `/pd-evolve` | 执行完整进化循环 | 问题修复 |
34
- | `/pd-daily` | 配置并发送进化日报 | 日常查看 |
35
33
  | `/pd-evolution-status` | 查看EP等级与安全状态 | 状态查询 |
36
34
  | `/pd-status` | 查看系统状态(GFI和痛苦词典) | 健康检查 |
37
- | `/pd-grooming` | 工作区数字大扫除 | 熵减维护 |
38
35
  | `/pd-help` | 获取交互式命令引导 | 本技能 |
39
36
 
40
37
  ---
@@ -71,26 +68,14 @@ disable-model-invocation: true
71
68
  **触发条件**: 用户说"今天干了什么"、"看看进度"、"汇报一下"
72
69
 
73
70
  **推荐流程**:
74
- 1. `/pd-daily` - 发送今日进化日报
75
- 2. `/pd-evolution-status` - 查看当前信任积分
76
- 3. `/pd-okr` - 检查 OKR 对齐情况
71
+ 1. `/pd-evolution-status` - 查看当前信任积分
72
+ 2. `/pd-status` - 查看 GFI 和痛苦词典状态
77
73
 
78
- **话术**: "日报在手,进化我有。让我帮你回顾今天的成果。"
74
+ **话术**: "让我帮你回顾一下系统状态。"
79
75
 
80
76
  ---
81
77
 
82
- ### 场景 4: 工作区太乱
83
-
84
- **触发条件**: 用户说"项目太乱了"、"文件一堆"、"需要整理"
85
-
86
- **推荐流程**:
87
- 1. `/pd-grooming` - 启动工作区大扫除
88
-
89
- **话术**: "数字洁癖是一种美德。让我帮你熵减。"
90
-
91
- ---
92
-
93
- ### 场景 5: 权限或安全相关
78
+ ### 场景 4: 权限或安全相关
94
79
 
95
80
  **触发条件**: 用户说"权限不够"、"被拦截了"、"安全等级"
96
81
 
@@ -186,8 +171,8 @@ disable-model-invocation: true
186
171
  | 场景 | 组合流程 |
187
172
  |------|----------|
188
173
  | 大型重构 | `/pd-evolve` → `deductive-audit` → 执行 |
189
- | 系统优化 | `/pd-status` → `evolve-system` → `root-cause` |
190
- | 项目复盘 | `/pd-daily` → `/pd-okr` → `reflection-log` |
174
+ | 系统优化 | `/pd-status` → `root-cause` → 优化实施 |
175
+ | 项目复盘 | `/pd-evolution-status` → `/pd-status` → `reflection-log` |
191
176
 
192
177
  ### 内部技能调用
193
178
 
@@ -12,7 +12,7 @@ disable-model-invocation: false
12
12
  请执行以下反思步骤:
13
13
 
14
14
  ## 1. 现状扫描 (Status Scan)
15
- - **Goal**: 我们最初的目标是什么?(Check `PLAN.md` or early conversation)
15
+ - **Goal**: 我们最初的目标是什么?(检查早期对话上下文)
16
16
  - **Status**: 现在完成了多少?卡在哪里?
17
17
  - **Cost**: 我们消耗了大量 Token,产出是否匹配?
18
18
 
@@ -37,4 +37,4 @@ disable-model-invocation: false
37
37
 
38
38
  ## 5. 恢复计划 (Recovery)
39
39
  - 既然要压缩上下文,我们下一步该如何以“最干净”的状态继续?
40
- - 更新 `PLAN.md`,标记当前进度,确保压缩后能无缝衔接。
40
+ - 更新 `memory/.scratchpad.md`,标记当前进度,确保压缩后能无缝衔接。
@@ -10,4 +10,4 @@ disable-model-invocation: true
10
10
 
11
11
  ## 执行动作
12
12
  1. 立即委派 ``pd_spawn_agent(reporter)``。
13
- 2. 任务描述:“老板想知道当前的情况。请分析当前的对话上下文、`PLAN.md` 和最近的 `memory/ISSUE_LOG.md`,为老板写一份优雅的汇报。请记住先看他的画像!”
13
+ 2. 任务描述:“老板想知道当前的情况。请分析当前的对话上下文和最近的 `memory/ISSUE_LOG.md`,为老板写一份优雅的汇报。请记住先看他的画像!”
@@ -19,7 +19,7 @@
19
19
 
20
20
  <directive id="T-02" name="PHYSICAL_MEMORY_PERSISTENCE">
21
21
  <trigger>在跨越多个文件进行推理、面临复杂的 Debug、或当对话上下文变得很长(>5 轮)时。</trigger>
22
- <must>信任文件,而不是你的上下文窗口。你必须主动将中间结论、断点和后续步骤写入 `memory/.scratchpad.md` 或 `PLAN.md`。</must>
22
+ <must>信任文件,而不是你的上下文窗口。你必须主动将中间结论、断点和后续步骤写入 `memory/.scratchpad.md`。</must>
23
23
  <forbidden>依赖你内部的“大脑记忆”来保持复杂状态,这些状态必然会被上下文压缩机制抹除。</forbidden>
24
24
  </directive>
25
25
 
@@ -183,7 +183,7 @@ openclaw cron add --name "pd-grooming-daily" \
183
183
  openclaw cron add --name "health-check" \
184
184
  --every 4h \
185
185
  --session main \
186
- --system-event 'Health check: Verify core tools (rg, node, python) are available. Check if PLAN.md state matches actual progress.'
186
+ --system-event 'Health check: Verify core tools (rg, node, python) are available. Check if workspace state matches actual progress.'
187
187
  ```
188
188
 
189
189
  ### 3. Strategy Alignment (Daily at 9 AM)
@@ -19,7 +19,7 @@ LLMs are highly sensitive to XML tags; this structure is designed to boost instr
19
19
 
20
20
  <directive id="T-02" name="PHYSICAL_MEMORY_PERSISTENCE">
21
21
  <trigger>When reasoning across multiple files, facing complex debugging, or when the conversation context grows long (>5 turns).</trigger>
22
- <must>TRUST FILES, NOT YOUR CONTEXT WINDOW. You MUST actively write your intermediate conclusions, breakpoints, and next steps to `memory/.scratchpad.md` or `PLAN.md`.</must>
22
+ <must>TRUST FILES, NOT YOUR CONTEXT WINDOW. You MUST actively write your intermediate conclusions, breakpoints, and next steps to `memory/.scratchpad.md`.</must>
23
23
  <forbidden>Relying on your internal "brain memory" to hold complex state, which will inevitably be wiped by context compression.</forbidden>
24
24
  </directive>
25
25
 
@@ -15,7 +15,7 @@ You are now the "Evolutionary System Administrator". Your responsibility is to m
15
15
  ### 1. `diagnose` (System Diagnosis)
16
16
  **Action**: Check the integrity of the "bare-bones" architecture.
17
17
  - **Core Components**: Check if `.claude/hooks/hook_runner.py` exists and is executable.
18
- - **Documentation Integrity**: Check if `.principles/PROFILE.json`, `PLAN.md` etc. exist.
18
+ - **Documentation Integrity**: Check if `.principles/PROFILE.json` etc. exist.
19
19
  - **Tool Awareness**: Check `.state/SYSTEM_CAPABILITIES.json`. If missing, prompt user: "⚠️ Toolchain upgrade not performed. Recommend running `/bootstrap-tools` to significantly enhance system capabilities."
20
20
  - **Memory Mount**: Check if `CLAUDE.md` contains `System Integration` section.
21
21
  - **Output**: Generate a health report listing missing or abnormal items.
@@ -23,7 +23,7 @@ You are now the "Evolutionary System Administrator". Your responsibility is to m
23
23
  ### 2. `repair` (System Repair)
24
24
  **Action**:
25
25
  - **Config Recovery**: If `PROFILE.json` is missing or corrupted, attempt recovery from `.claude/templates/PROFILE.json`.
26
- - **Structure Completion**: Ensure `PLAN.md` contains `## Target Files` heading.
26
+ - **Structure Completion**: Ensure workspace structure is complete.
27
27
  - **Forced Cleanup**: Delete `.pain_flag`, `.verdict.json`, `.user_verdict.json`, `.pending_reflection` and other temporary markers.
28
28
 
29
29
  ### 3. `reset` (Force Reset)
@@ -24,7 +24,7 @@ When performing cleanup operations, you MUST strictly adhere to the following wh
24
24
  ### 🌟 Core Assets
25
25
  **These files must remain in the root directory. Do not touch:**
26
26
  - `AGENTS.md`, `SOUL.md`, `HEARTBEAT.md`, `TOOLS.md`, `IDENTITY.md`, `USER.md`, `MEMORY.md`
27
- - `README.md`, `PLAN.md`
27
+ - `README.md`
28
28
  - `.principles/`, `.state/`
29
29
 
30
30
  ### 🎯 Targets for Grooming
@@ -12,7 +12,7 @@ disable-model-invocation: false
12
12
  Please execute the following reflection steps:
13
13
 
14
14
  ## 1. Status Scan
15
- - **Goal**: What was our original objective? (Check `PLAN.md` or early conversation)
15
+ - **Goal**: What was our original objective? (Check early conversation context)
16
16
  - **Status**: How much is completed now? Where are we stuck?
17
17
  - **Cost**: We've consumed significant tokens. Is the output matching the cost?
18
18
 
@@ -37,4 +37,4 @@ If pain detected, must execute:
37
37
 
38
38
  ## 5. Recovery Plan
39
39
  - Since we're about to compact context, how should we continue with the "cleanest" state?
40
- - Update `PLAN.md`, mark current progress, ensure seamless continuation after compaction.
40
+ - Update `memory/.scratchpad.md`, mark current progress, ensure seamless continuation after compaction.
@@ -10,4 +10,4 @@ User (the boss) requests an immediate work report.
10
10
 
11
11
  ## Execution Action
12
12
  1. Immediately delegate ``pd_spawn_agent(reporter)``.
13
- 2. Task description: "The boss wants to know the current situation. Please analyze current conversation context, `PLAN.md`, and recent `memory/ISSUE_LOG.md` to write an elegant report for the boss. Remember to check their profile first!"
13
+ 2. Task description: "The boss wants to know the current situation. Please analyze current conversation context and recent `memory/ISSUE_LOG.md` to write an elegant report for the boss. Remember to check their profile first!"
@@ -183,7 +183,7 @@ openclaw cron add --name "pd-grooming-daily" \
183
183
  openclaw cron add --name "health-check" \
184
184
  --every 4h \
185
185
  --session main \
186
- --system-event '环境健康检查:验证核心工具(rg, node, python)是否可用,检查 PLAN.md 状态与实际进度是否一致。'
186
+ --system-event '环境健康检查:验证核心工具(rg, node, python)是否可用,检查工作区状态与实际进度是否一致。'
187
187
  ```
188
188
 
189
189
  ### 3. 战略对齐检查(每天上午 9 点)