@liangjie559567/ultrapower 5.6.8 → 5.6.9

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 (1309) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/LICENSE +21 -21
  4. package/README.es.md +298 -298
  5. package/README.ja.md +298 -298
  6. package/README.ko.md +298 -298
  7. package/README.md +486 -486
  8. package/README.pt.md +289 -289
  9. package/README.vi.md +289 -289
  10. package/README.zh.md +300 -300
  11. package/agents/AGENTS.md +72 -72
  12. package/agents/analyst.md +162 -162
  13. package/agents/architect.md +170 -170
  14. package/agents/axiom-context-manager.md +91 -91
  15. package/agents/axiom-critic.md +62 -62
  16. package/agents/axiom-domain-expert.md +60 -60
  17. package/agents/axiom-evolution-engine.md +121 -121
  18. package/agents/axiom-product-director.md +66 -66
  19. package/agents/axiom-sub-prd-writer.md +87 -87
  20. package/agents/axiom-tech-lead.md +70 -70
  21. package/agents/axiom-ux-director.md +62 -62
  22. package/agents/code-reviewer.md +48 -48
  23. package/agents/critic.md +117 -117
  24. package/agents/dependency-expert.md +101 -101
  25. package/agents/document-specialist.md +98 -98
  26. package/agents/information-architect.md +338 -338
  27. package/agents/planner.md +117 -117
  28. package/agents/product-analyst.md +372 -372
  29. package/agents/product-manager.md +371 -371
  30. package/agents/quality-strategist.md +274 -274
  31. package/agents/ux-researcher.md +388 -388
  32. package/agents/writer.md +133 -133
  33. package/bridge/AGENTS.md +64 -64
  34. package/bridge/codex-server.cjs +2 -2
  35. package/bridge/gemini-server.cjs +1 -1
  36. package/bridge/gyoshu_bridge.py +846 -846
  37. package/commands/AGENTS.md +55 -55
  38. package/commands/ccg-workflow.md +40 -40
  39. package/dist/mcp/adapters/memory-adapter.d.ts +1 -1
  40. package/dist/mcp/adapters/state-adapter.d.ts +6 -6
  41. package/dist/mcp/adapters/trace-adapter.d.ts +2 -2
  42. package/dist/mcp/config/schema.d.ts +3 -3
  43. package/dist/mcp/config-schema.d.ts +3 -3
  44. package/docs/AGENTS.md +101 -101
  45. package/docs/ANALYTICS-SYSTEM.md +181 -181
  46. package/docs/ARCHITECTURE.md +624 -624
  47. package/docs/AXIOM.md +401 -401
  48. package/docs/CJK-IME-KNOWN-ISSUES.md +214 -214
  49. package/docs/CLAUDE.md +503 -503
  50. package/docs/COMPATIBILITY.md +1140 -1140
  51. package/docs/DELEGATION-ENFORCER.md +288 -288
  52. package/docs/DOCUMENTATION_UPDATE_SUMMARY.md +106 -106
  53. package/docs/EVOLUTION.md +675 -675
  54. package/docs/FAQ.md +365 -365
  55. package/docs/FEATURES.md +1289 -1289
  56. package/docs/INSTALL.md +631 -631
  57. package/docs/INSTALL_FIX_SUMMARY.md +119 -119
  58. package/docs/INSTALL_FIX_VERIFICATION.md +67 -67
  59. package/docs/INSTALL_VERIFICATION_REPORT.md +83 -83
  60. package/docs/KNOWN_ISSUES.md +121 -121
  61. package/docs/LOCAL_INSTALL_VERIFICATION.md +188 -188
  62. package/docs/LOCAL_PLUGIN_INSTALL.md +115 -115
  63. package/docs/LOCAL_TEST_INSTALL_REPORT.md +102 -102
  64. package/docs/MAIN_DOCS_UPDATE_REPORT.md +54 -54
  65. package/docs/MIGRATION.md +1330 -1330
  66. package/docs/MIGRATION_GUIDE_v5.5.18.md +193 -193
  67. package/docs/NEXUS.md +598 -598
  68. package/docs/OMC-CLAUDE.md +487 -487
  69. package/docs/PERFORMANCE-MONITORING.md +568 -568
  70. package/docs/PLUGIN_MARKETPLACE_VERIFICATION.md +202 -202
  71. package/docs/QUICKSTART.md +116 -116
  72. package/docs/README.codex.md +131 -131
  73. package/docs/README.md +144 -144
  74. package/docs/README.opencode.md +372 -372
  75. package/docs/REFERENCE.md +1300 -1300
  76. package/docs/RELEASE.md +59 -59
  77. package/docs/RELEASE_GUIDE.md +266 -266
  78. package/docs/RELEASE_NOTES_v5.5.14.md +120 -120
  79. package/docs/RELEASE_RECOVERY.md +100 -100
  80. package/docs/RELEASE_SUMMARY_v5.5.18.md +80 -80
  81. package/docs/SYNC-SYSTEM.md +565 -565
  82. package/docs/TIERED_AGENTS_V2.md +504 -504
  83. package/docs/TUTORIAL.md +254 -254
  84. package/docs/UPGRADE_VERIFICATION.md +556 -556
  85. package/docs/UPGRADE_VERIFICATION_REPORT.md +112 -112
  86. package/docs/USER_GUIDE.md +2274 -2274
  87. package/docs/VALIDATION_REPORT.md +235 -235
  88. package/docs/VERIFICATION_SUMMARY.md +137 -137
  89. package/docs/adr/001-worker-state-adapter.md +214 -214
  90. package/docs/adr/002-caching-strategy.md +133 -133
  91. package/docs/adr/003-gradual-migration.md +250 -250
  92. package/docs/adr/template.md +121 -121
  93. package/docs/agent-templates/AGENTS.md +34 -34
  94. package/docs/agent-templates/README.md +135 -135
  95. package/docs/agent-templates/base-agent.md +89 -89
  96. package/docs/agent-templates/tier-instructions.md +120 -120
  97. package/docs/api/assets/highlight.css +85 -85
  98. package/docs/api/assets/style.css +1633 -1633
  99. package/docs/api/classes/ContextCollector.html +21 -21
  100. package/docs/api/functions/activateUltrawork.html +2 -2
  101. package/docs/api/functions/addCustomNote.html +5 -5
  102. package/docs/api/functions/addDirective.html +2 -2
  103. package/docs/api/functions/addManualEntry.html +2 -2
  104. package/docs/api/functions/addPattern.html +3 -3
  105. package/docs/api/functions/addWorker.html +2 -2
  106. package/docs/api/functions/addWorkingMemoryEntry.html +2 -2
  107. package/docs/api/functions/analyzeContextUsage.html +2 -2
  108. package/docs/api/functions/appendProgress.html +2 -2
  109. package/docs/api/functions/appendSessionId.html +2 -2
  110. package/docs/api/functions/applyCommentFilters.html +3 -3
  111. package/docs/api/functions/assignFileToWorker.html +2 -2
  112. package/docs/api/functions/backgroundUpdateCheck.html +2 -2
  113. package/docs/api/functions/buildAxiomBootContext.html +1 -1
  114. package/docs/api/functions/buildBoulderContinuation.html +2 -2
  115. package/docs/api/functions/buildDelegationTable.html +2 -2
  116. package/docs/api/functions/buildKeyTriggersSection.html +2 -2
  117. package/docs/api/functions/buildOrchestratorReminder.html +2 -2
  118. package/docs/api/functions/buildUseAvoidSection.html +2 -2
  119. package/docs/api/functions/buildVerificationReminder.html +2 -2
  120. package/docs/api/functions/canResumeAutopilot.html +10 -10
  121. package/docs/api/functions/canStartMode.html +5 -5
  122. package/docs/api/functions/cancelAutopilot.html +3 -3
  123. package/docs/api/functions/cancelUltraQA.html +2 -2
  124. package/docs/api/functions/checkBackgroundNotifications.html +2 -2
  125. package/docs/api/functions/checkBoulderContinuation.html +2 -2
  126. package/docs/api/functions/checkDuplicateTriggers.html +2 -2
  127. package/docs/api/functions/checkExpertGate.html +1 -1
  128. package/docs/api/functions/checkForComments.html +2 -2
  129. package/docs/api/functions/checkForUpdates.html +2 -2
  130. package/docs/api/functions/checkIncompleteTodos.html +13 -13
  131. package/docs/api/functions/checkPersistentModes.html +3 -3
  132. package/docs/api/functions/cleanupOrphanedState.html +2 -2
  133. package/docs/api/functions/cleanupStaleAgents.html +2 -2
  134. package/docs/api/functions/cleanupTransientState.html +2 -2
  135. package/docs/api/functions/clearAgentUsageState.html +1 -1
  136. package/docs/api/functions/clearAllModeStates.html +2 -2
  137. package/docs/api/functions/clearAutopilot.html +2 -2
  138. package/docs/api/functions/clearAutopilotState.html +2 -2
  139. package/docs/api/functions/clearBeadsContext.html +2 -2
  140. package/docs/api/functions/clearBoulderState.html +2 -2
  141. package/docs/api/functions/clearDetectionState.html +2 -2
  142. package/docs/api/functions/clearInjectedPaths.html +2 -2
  143. package/docs/api/functions/clearInjectedRules.html +2 -2
  144. package/docs/api/functions/clearLinkedUltraworkState.html +2 -2
  145. package/docs/api/functions/clearModeState.html +10 -10
  146. package/docs/api/functions/clearProjectMemorySession.html +4 -4
  147. package/docs/api/functions/clearRalphState.html +2 -2
  148. package/docs/api/functions/clearRapidFireDebounce.html +2 -2
  149. package/docs/api/functions/clearSkillSession.html +2 -2
  150. package/docs/api/functions/clearThinkModeState.html +2 -2
  151. package/docs/api/functions/clearTrackingState.html +2 -2
  152. package/docs/api/functions/clearUltraQAState.html +2 -2
  153. package/docs/api/functions/clearVerificationState.html +3 -3
  154. package/docs/api/functions/commandExists.html +2 -2
  155. package/docs/api/functions/compareVersions.html +3 -3
  156. package/docs/api/functions/completeUltraQA.html +2 -2
  157. package/docs/api/functions/completeUltrapilot.html +2 -2
  158. package/docs/api/functions/completeWorker.html +2 -2
  159. package/docs/api/functions/containsTokenLimitError.html +2 -2
  160. package/docs/api/functions/createAgentToolRestrictions.html +3 -3
  161. package/docs/api/functions/createAgentUsageReminderHook.html +1 -1
  162. package/docs/api/functions/createAutoSlashCommandHook.html +7 -7
  163. package/docs/api/functions/createBackgroundNotificationHook.html +7 -7
  164. package/docs/api/functions/createBackgroundTaskManager.html +2 -2
  165. package/docs/api/functions/createBoulderState.html +2 -2
  166. package/docs/api/functions/createCommentCheckerHook.html +6 -6
  167. package/docs/api/functions/createCompactCheckpoint.html +2 -2
  168. package/docs/api/functions/createContentHash.html +2 -2
  169. package/docs/api/functions/createContextInjectorHook.html +7 -7
  170. package/docs/api/functions/createDirectoryReadmeInjectorHook.html +9 -9
  171. package/docs/api/functions/createEmptyMessageSanitizerHook.html +6 -6
  172. package/docs/api/functions/createEnvContext.html +2 -2
  173. package/docs/api/functions/createHookOutput.html +4 -4
  174. package/docs/api/functions/createLearnedSkillsHook.html +6 -6
  175. package/docs/api/functions/createMagicKeywordProcessor.html +2 -2
  176. package/docs/api/functions/createModeMarker.html +6 -6
  177. package/docs/api/functions/createPrd.html +2 -2
  178. package/docs/api/functions/createPreemptiveCompactionHook.html +6 -6
  179. package/docs/api/functions/createRalphLoopHook.html +2 -2
  180. package/docs/api/functions/createRecoveryHook.html +7 -7
  181. package/docs/api/functions/createRulesInjectorHook.html +8 -8
  182. package/docs/api/functions/createSimplePrd.html +2 -2
  183. package/docs/api/functions/createSisyphusOrchestratorHook.html +7 -7
  184. package/docs/api/functions/createSisyphusSession.html +7 -7
  185. package/docs/api/functions/createThinkModeHook.html +7 -7
  186. package/docs/api/functions/createThinkingBlockValidatorHook.html +1 -1
  187. package/docs/api/functions/createTodoContinuationHook.html +2 -2
  188. package/docs/api/functions/createUltraworkStateHook.html +2 -2
  189. package/docs/api/functions/deactivateUltrawork.html +8 -8
  190. package/docs/api/functions/decayHotPaths.html +2 -2
  191. package/docs/api/functions/decomposeTask.html +11 -11
  192. package/docs/api/functions/deepMerge.html +2 -2
  193. package/docs/api/functions/detectArchitectApproval.html +2 -2
  194. package/docs/api/functions/detectArchitectRejection.html +2 -2
  195. package/docs/api/functions/detectContextLimitError.html +2 -2
  196. package/docs/api/functions/detectContextLimitErrorInText.html +2 -2
  197. package/docs/api/functions/detectDirectivesFromMessage.html +2 -2
  198. package/docs/api/functions/detectEditError.html +2 -2
  199. package/docs/api/functions/detectEditErrorInOutput.html +2 -2
  200. package/docs/api/functions/detectEditErrorInText.html +2 -2
  201. package/docs/api/functions/detectExtractableMoment.html +2 -2
  202. package/docs/api/functions/detectKeywordsWithType.html +11 -11
  203. package/docs/api/functions/detectMagicKeywords.html +2 -2
  204. package/docs/api/functions/detectProjectEnvironment.html +2 -2
  205. package/docs/api/functions/detectRecoverableError.html +3 -3
  206. package/docs/api/functions/detectSessionErrorType.html +2 -2
  207. package/docs/api/functions/detectSlashCommand.html +3 -3
  208. package/docs/api/functions/detectThinkKeyword.html +2 -2
  209. package/docs/api/functions/detectUltrathinkKeyword.html +2 -2
  210. package/docs/api/functions/discoverAllCommands.html +2 -2
  211. package/docs/api/functions/enablePrdMode.html +2 -2
  212. package/docs/api/functions/enhancePrompt.html +2 -2
  213. package/docs/api/functions/ensureAutopilotDir.html +2 -2
  214. package/docs/api/functions/ensureDirectoryStructure.html +2 -2
  215. package/docs/api/functions/ensureModeStateDir.html +2 -2
  216. package/docs/api/functions/ensureSkillsDir.html +2 -2
  217. package/docs/api/functions/estimateTokens.html +2 -2
  218. package/docs/api/functions/executeSlashCommand.html +2 -2
  219. package/docs/api/functions/expandCommand.html +8 -8
  220. package/docs/api/functions/expandCommandPrompt.html +6 -6
  221. package/docs/api/functions/expandCommands.html +2 -2
  222. package/docs/api/functions/exportSessionSummary.html +2 -2
  223. package/docs/api/functions/exportWisdomToNotepad.html +2 -2
  224. package/docs/api/functions/extractPromptText.html +11 -11
  225. package/docs/api/functions/extractSlashPromptText.html +2 -2
  226. package/docs/api/functions/extractThinkPromptText.html +2 -2
  227. package/docs/api/functions/failWorker.html +2 -2
  228. package/docs/api/functions/findCommand.html +2 -2
  229. package/docs/api/functions/findMatchingSkills.html +2 -2
  230. package/docs/api/functions/findPlannerPlans.html +3 -3
  231. package/docs/api/functions/findPrdPath.html +2 -2
  232. package/docs/api/functions/findPreviousThinkingContent.html +1 -1
  233. package/docs/api/functions/findProgressPath.html +2 -2
  234. package/docs/api/functions/findProjectRoot.html +3 -3
  235. package/docs/api/functions/findRecoveryEmptyMessages.html +2 -2
  236. package/docs/api/functions/findRecoveryOrphanThinking.html +2 -2
  237. package/docs/api/functions/findRecoveryThinkingBlocks.html +2 -2
  238. package/docs/api/functions/findRuleFiles.html +4 -4
  239. package/docs/api/functions/findSkillFiles.html +3 -3
  240. package/docs/api/functions/formatCancelMessage.html +2 -2
  241. package/docs/api/functions/formatCompactSummary.html +2 -2
  242. package/docs/api/functions/formatContextSummary.html +3 -3
  243. package/docs/api/functions/formatDirectivesForContext.html +2 -2
  244. package/docs/api/functions/formatFailureSummary.html +2 -2
  245. package/docs/api/functions/formatFile.html +2 -2
  246. package/docs/api/functions/formatFileChanges.html +2 -2
  247. package/docs/api/functions/formatFileList.html +2 -2
  248. package/docs/api/functions/formatFullContext.html +2 -2
  249. package/docs/api/functions/formatFullNotepad.html +2 -2
  250. package/docs/api/functions/formatLearningsForContext.html +2 -2
  251. package/docs/api/functions/formatNextStoryPrompt.html +2 -2
  252. package/docs/api/functions/formatNotepadContext.html +2 -2
  253. package/docs/api/functions/formatPatternsForContext.html +2 -2
  254. package/docs/api/functions/formatPrd.html +2 -2
  255. package/docs/api/functions/formatPrdStatus.html +2 -2
  256. package/docs/api/functions/formatPreCompactSummary.html +2 -2
  257. package/docs/api/functions/formatProgressForContext.html +2 -2
  258. package/docs/api/functions/formatProgressMessage.html +2 -2
  259. package/docs/api/functions/formatStory.html +2 -2
  260. package/docs/api/functions/formatSummary.html +2 -2
  261. package/docs/api/functions/formatUpdateNotification.html +2 -2
  262. package/docs/api/functions/formatValidationResults.html +2 -2
  263. package/docs/api/functions/generateExtractionPrompt.html +2 -2
  264. package/docs/api/functions/generateSkillFrontmatter.html +2 -2
  265. package/docs/api/functions/generateSummary.html +2 -2
  266. package/docs/api/functions/getActiveAgentCount.html +2 -2
  267. package/docs/api/functions/getActiveExclusiveMode.html +4 -4
  268. package/docs/api/functions/getActiveModes.html +2 -2
  269. package/docs/api/functions/getActivePlanPath.html +2 -2
  270. package/docs/api/functions/getAgentDefinitions.html +2 -2
  271. package/docs/api/functions/getAgentsByType.html +2 -2
  272. package/docs/api/functions/getAllCommands.html +2 -2
  273. package/docs/api/functions/getAllModeStatuses.html +5 -5
  274. package/docs/api/functions/getAllSkills.html +2 -2
  275. package/docs/api/functions/getArchitectRejectionContinuationPrompt.html +2 -2
  276. package/docs/api/functions/getArchitectVerificationPrompt.html +2 -2
  277. package/docs/api/functions/getAutoFormatMessage.html +2 -2
  278. package/docs/api/functions/getAutopilotStateAge.html +3 -3
  279. package/docs/api/functions/getAvailableAgents.html +2 -2
  280. package/docs/api/functions/getAxiomDir.html +1 -1
  281. package/docs/api/functions/getBackgroundTaskGuidance.html +4 -4
  282. package/docs/api/functions/getBeadsContextConfig.html +2 -2
  283. package/docs/api/functions/getBeadsInstructions.html +2 -2
  284. package/docs/api/functions/getBoulderFilePath.html +2 -2
  285. package/docs/api/functions/getCheckpointPath.html +2 -2
  286. package/docs/api/functions/getClaudeThinkingConfig.html +3 -3
  287. package/docs/api/functions/getCommand.html +2 -2
  288. package/docs/api/functions/getCommandsDir.html +2 -2
  289. package/docs/api/functions/getCompactionQueueDepth.html +3 -3
  290. package/docs/api/functions/getCompletedWorkers.html +2 -2
  291. package/docs/api/functions/getDefaultMcpServers.html +1 -1
  292. package/docs/api/functions/getDefaultModelForCategory.html +2 -2
  293. package/docs/api/functions/getDetectionStats.html +2 -2
  294. package/docs/api/functions/getDirectPlanningPrompt.html +3 -3
  295. package/docs/api/functions/getExecutionPrompt.html +2 -2
  296. package/docs/api/functions/getExpansionPrompt.html +3 -3
  297. package/docs/api/functions/getExpertGateMessage.html +1 -1
  298. package/docs/api/functions/getFailedWorkers.html +2 -2
  299. package/docs/api/functions/getFormatter.html +2 -2
  300. package/docs/api/functions/getGitDiffStats.html +2 -2
  301. package/docs/api/functions/getGlobalStateFilePath.html +4 -4
  302. package/docs/api/functions/getGoalCommand.html +2 -2
  303. package/docs/api/functions/getHighVariant.html +3 -3
  304. package/docs/api/functions/getInstallInfo.html +2 -2
  305. package/docs/api/functions/getInstalledVersion.html +2 -2
  306. package/docs/api/functions/getIssuesToFix.html +2 -2
  307. package/docs/api/functions/getLastDetection.html +2 -2
  308. package/docs/api/functions/getLearnerConfigValue.html +2 -2
  309. package/docs/api/functions/getLinter.html +2 -2
  310. package/docs/api/functions/getManualSection.html +2 -2
  311. package/docs/api/functions/getMemoryFilePaths.html +1 -1
  312. package/docs/api/functions/getModeMarkerFilePath.html +2 -2
  313. package/docs/api/functions/getModeStateFilePath.html +2 -2
  314. package/docs/api/functions/getNextStory.html +2 -2
  315. package/docs/api/functions/getNotepadPath.html +2 -2
  316. package/docs/api/functions/getNotepadStats.html +2 -2
  317. package/docs/api/functions/getOmcPrdPath.html +2 -2
  318. package/docs/api/functions/getOmcProgressPath.html +2 -2
  319. package/docs/api/functions/getOmcSystemPrompt.html +2 -2
  320. package/docs/api/functions/getOmcToolNames.html +3 -3
  321. package/docs/api/functions/getPatterns.html +2 -2
  322. package/docs/api/functions/getPhasePrompt.html +2 -2
  323. package/docs/api/functions/getPlanName.html +2 -2
  324. package/docs/api/functions/getPlanPath.html +2 -2
  325. package/docs/api/functions/getPlanProgress.html +2 -2
  326. package/docs/api/functions/getPlanSummaries.html +2 -2
  327. package/docs/api/functions/getPrdCompletionStatus.html +2 -2
  328. package/docs/api/functions/getPrdPath.html +2 -2
  329. package/docs/api/functions/getPrdStatus.html +2 -2
  330. package/docs/api/functions/getPreCommitReminderMessage.html +2 -2
  331. package/docs/api/functions/getPriorityContext.html +2 -2
  332. package/docs/api/functions/getProgressContext.html +2 -2
  333. package/docs/api/functions/getProgressPath.html +2 -2
  334. package/docs/api/functions/getPromotionCandidates.html +2 -2
  335. package/docs/api/functions/getQAPrompt.html +2 -2
  336. package/docs/api/functions/getRalphContext.html +3 -3
  337. package/docs/api/functions/getReadmesForPath.html +2 -2
  338. package/docs/api/functions/getRecentLearnings.html +2 -2
  339. package/docs/api/functions/getRulesForPath.html +2 -2
  340. package/docs/api/functions/getRunningAgents.html +2 -2
  341. package/docs/api/functions/getRunningWorkers.html +2 -2
  342. package/docs/api/functions/getSessionTokenEstimate.html +2 -2
  343. package/docs/api/functions/getSkillsDir.html +2 -2
  344. package/docs/api/functions/getSpecPath.html +2 -2
  345. package/docs/api/functions/getStaleAgents.html +2 -2
  346. package/docs/api/functions/getStateDir.html +2 -2
  347. package/docs/api/functions/getStory.html +2 -2
  348. package/docs/api/functions/getSubagentStateFilePath.html +2 -2
  349. package/docs/api/functions/getThinkModeState.html +2 -2
  350. package/docs/api/functions/getThinkingConfig.html +3 -3
  351. package/docs/api/functions/getTopHotPaths.html +2 -2
  352. package/docs/api/functions/getTrackingStats.html +2 -2
  353. package/docs/api/functions/getTransitionPrompt.html +2 -2
  354. package/docs/api/functions/getUltraworkPersistenceMessage.html +2 -2
  355. package/docs/api/functions/getValidationPrompt.html +2 -2
  356. package/docs/api/functions/getValidationSpawnPrompt.html +2 -2
  357. package/docs/api/functions/getValidationStats.html +1 -1
  358. package/docs/api/functions/getValidationStatus.html +2 -2
  359. package/docs/api/functions/getWorkingMemory.html +2 -2
  360. package/docs/api/functions/handleBackgroundEvent.html +3 -3
  361. package/docs/api/functions/handleContextWindowRecovery.html +2 -2
  362. package/docs/api/functions/handleEditErrorRecovery.html +2 -2
  363. package/docs/api/functions/handlePermissionRequest.html +2 -2
  364. package/docs/api/functions/handleRecovery.html +10 -10
  365. package/docs/api/functions/handleSessionEnd.html +2 -2
  366. package/docs/api/functions/handleSessionRecovery.html +2 -2
  367. package/docs/api/functions/handleSharedFiles.html +7 -7
  368. package/docs/api/functions/handleSubagentStart.html +2 -2
  369. package/docs/api/functions/handleSubagentStop.html +2 -2
  370. package/docs/api/functions/hasBoulder.html +2 -2
  371. package/docs/api/functions/hasContentParts.html +1 -1
  372. package/docs/api/functions/hasModeState.html +3 -3
  373. package/docs/api/functions/hasPrd.html +2 -2
  374. package/docs/api/functions/hasTextContent.html +2 -2
  375. package/docs/api/functions/hasValidContent.html +3 -3
  376. package/docs/api/functions/incrementAgentCount.html +2 -2
  377. package/docs/api/functions/incrementRalphIteration.html +2 -2
  378. package/docs/api/functions/incrementReinforcement.html +2 -2
  379. package/docs/api/functions/initAutopilot.html +2 -2
  380. package/docs/api/functions/initNotepad.html +2 -2
  381. package/docs/api/functions/initPrd.html +2 -2
  382. package/docs/api/functions/initProgress.html +2 -2
  383. package/docs/api/functions/initUltrapilot.html +2 -2
  384. package/docs/api/functions/injectContextIntoText.html +2 -2
  385. package/docs/api/functions/injectPendingContext.html +3 -3
  386. package/docs/api/functions/injectRecoveryTextPart.html +2 -2
  387. package/docs/api/functions/install.html +2 -2
  388. package/docs/api/functions/integrateResults.html +5 -5
  389. package/docs/api/functions/isActiveModeRunning.html +2 -2
  390. package/docs/api/functions/isAllowedPath.html +2 -2
  391. package/docs/api/functions/isAlreadyHighVariant.html +2 -2
  392. package/docs/api/functions/isAutopilotActive.html +2 -2
  393. package/docs/api/functions/isAxiomEnabled.html +1 -1
  394. package/docs/api/functions/isClaudeInstalled.html +3 -3
  395. package/docs/api/functions/isClaudeModel.html +2 -2
  396. package/docs/api/functions/isCompactionInProgress.html +3 -3
  397. package/docs/api/functions/isDuplicateByContentHash.html +2 -2
  398. package/docs/api/functions/isDuplicateByRealPath.html +2 -2
  399. package/docs/api/functions/isExcludedCommand.html +2 -2
  400. package/docs/api/functions/isExtendedThinkingModel.html +1 -1
  401. package/docs/api/functions/isFileOwnedByWorker.html +2 -2
  402. package/docs/api/functions/isFormatterAvailable.html +2 -2
  403. package/docs/api/functions/isGptModel.html +2 -2
  404. package/docs/api/functions/isInstalled.html +2 -2
  405. package/docs/api/functions/isLearnerEnabled.html +2 -2
  406. package/docs/api/functions/isModeActive.html +6 -6
  407. package/docs/api/functions/isNonInteractive.html +1 -1
  408. package/docs/api/functions/isRecoverableError.html +2 -2
  409. package/docs/api/functions/isSafeCommand.html +2 -2
  410. package/docs/api/functions/isSessionRecoverable.html +2 -2
  411. package/docs/api/functions/isSharedFile.html +2 -2
  412. package/docs/api/functions/isThinkModeActive.html +2 -2
  413. package/docs/api/functions/isToolPart.html +2 -2
  414. package/docs/api/functions/isUltraQAActive.html +1 -1
  415. package/docs/api/functions/isWriteEditTool.html +2 -2
  416. package/docs/api/functions/learnFromToolOutput.html +7 -7
  417. package/docs/api/functions/lintFile.html +2 -2
  418. package/docs/api/functions/listAvailableCommands.html +2 -2
  419. package/docs/api/functions/listCommands.html +2 -2
  420. package/docs/api/functions/listPromotableLearnings.html +2 -2
  421. package/docs/api/functions/loadAgentPrompt.html +7 -7
  422. package/docs/api/functions/loadAgentUsageState.html +1 -1
  423. package/docs/api/functions/loadAllSkills.html +3 -3
  424. package/docs/api/functions/loadConfig.html +2 -2
  425. package/docs/api/functions/loadInjectedPaths.html +2 -2
  426. package/docs/api/functions/loadInjectedRules.html +2 -2
  427. package/docs/api/functions/loadLearnerConfig.html +2 -2
  428. package/docs/api/functions/loadProjectMemory.html +3 -3
  429. package/docs/api/functions/loadSkillById.html +2 -2
  430. package/docs/api/functions/mapDirectoryStructure.html +2 -2
  431. package/docs/api/functions/markStoryComplete.html +2 -2
  432. package/docs/api/functions/markStoryIncomplete.html +2 -2
  433. package/docs/api/functions/mergeAgentConfig.html +2 -2
  434. package/docs/api/functions/parseAxiomState.html +1 -1
  435. package/docs/api/functions/parseContextLimitError.html +2 -2
  436. package/docs/api/functions/parseProgress.html +2 -2
  437. package/docs/api/functions/parseRuleFrontmatter.html +10 -10
  438. package/docs/api/functions/parseSkillFile.html +2 -2
  439. package/docs/api/functions/parseSlashCommand.html +2 -2
  440. package/docs/api/functions/parseTokenLimitError.html +2 -2
  441. package/docs/api/functions/performUpdate.html +2 -2
  442. package/docs/api/functions/prependRecoveryThinkingPart.html +2 -2
  443. package/docs/api/functions/prependThinkingBlock.html +1 -1
  444. package/docs/api/functions/processAxiomBoot.html +1 -1
  445. package/docs/api/functions/processAxiomGuards.html +1 -1
  446. package/docs/api/functions/processBackgroundNotification.html +2 -2
  447. package/docs/api/functions/processBackgroundNotificationHook.html +2 -2
  448. package/docs/api/functions/processEditOutput.html +2 -2
  449. package/docs/api/functions/processHook.html +3 -3
  450. package/docs/api/functions/processMessageForSkills.html +2 -2
  451. package/docs/api/functions/processOrchestratorPostTool.html +3 -3
  452. package/docs/api/functions/processOrchestratorPreTool.html +3 -3
  453. package/docs/api/functions/processPermissionRequest.html +2 -2
  454. package/docs/api/functions/processPreCompact.html +6 -6
  455. package/docs/api/functions/processProjectMemoryPreCompact.html +3 -3
  456. package/docs/api/functions/processResponseForDetection.html +3 -3
  457. package/docs/api/functions/processSessionEnd.html +2 -2
  458. package/docs/api/functions/processSetup.html +2 -2
  459. package/docs/api/functions/processSetupInit.html +2 -2
  460. package/docs/api/functions/processSetupMaintenance.html +2 -2
  461. package/docs/api/functions/processSlashCommand.html +2 -2
  462. package/docs/api/functions/processSubagentStart.html +2 -2
  463. package/docs/api/functions/processSubagentStop.html +2 -2
  464. package/docs/api/functions/processThinkMode.html +3 -3
  465. package/docs/api/functions/promoteLearning.html +2 -2
  466. package/docs/api/functions/pruneOldEntries.html +2 -2
  467. package/docs/api/functions/pruneOldStateFiles.html +2 -2
  468. package/docs/api/functions/readActiveContext.html +1 -1
  469. package/docs/api/functions/readAutopilotState.html +2 -2
  470. package/docs/api/functions/readBoulderState.html +2 -2
  471. package/docs/api/functions/readModeMarker.html +4 -4
  472. package/docs/api/functions/readNotepad.html +2 -2
  473. package/docs/api/functions/readPrd.html +2 -2
  474. package/docs/api/functions/readProgress.html +2 -2
  475. package/docs/api/functions/readProgressRaw.html +2 -2
  476. package/docs/api/functions/readProjectDecisions.html +1 -1
  477. package/docs/api/functions/readRalphState.html +2 -2
  478. package/docs/api/functions/readRecoveryMessages.html +2 -2
  479. package/docs/api/functions/readRecoveryParts.html +2 -2
  480. package/docs/api/functions/readTrackingState.html +3 -3
  481. package/docs/api/functions/readUltraQAState.html +2 -2
  482. package/docs/api/functions/readUltrapilotState.html +2 -2
  483. package/docs/api/functions/readUltraworkState.html +4 -4
  484. package/docs/api/functions/readUserPreferences.html +1 -1
  485. package/docs/api/functions/readVerificationState.html +3 -3
  486. package/docs/api/functions/recordArchitectFeedback.html +2 -2
  487. package/docs/api/functions/recordConflict.html +2 -2
  488. package/docs/api/functions/recordFailure.html +2 -2
  489. package/docs/api/functions/recordHookFire.html +2 -2
  490. package/docs/api/functions/recordHookResult.html +2 -2
  491. package/docs/api/functions/recordKeywordDetected.html +2 -2
  492. package/docs/api/functions/recordModeChange.html +2 -2
  493. package/docs/api/functions/recordPattern.html +2 -2
  494. package/docs/api/functions/recordSessionMetrics.html +2 -2
  495. package/docs/api/functions/recordSkillActivated.html +2 -2
  496. package/docs/api/functions/recordSkillInvoked.html +2 -2
  497. package/docs/api/functions/recordStoryProgress.html +2 -2
  498. package/docs/api/functions/recordValidationVerdict.html +2 -2
  499. package/docs/api/functions/registerBeadsContext.html +3 -3
  500. package/docs/api/functions/registerProjectMemoryContext.html +6 -6
  501. package/docs/api/functions/removeCodeBlocks.html +12 -12
  502. package/docs/api/functions/removeModeMarker.html +5 -5
  503. package/docs/api/functions/removeSlashCodeBlocks.html +2 -2
  504. package/docs/api/functions/removeThinkCodeBlocks.html +2 -2
  505. package/docs/api/functions/replaceRecoveryEmptyTextParts.html +2 -2
  506. package/docs/api/functions/rescanProjectEnvironment.html +4 -4
  507. package/docs/api/functions/resetSessionTokenEstimate.html +2 -2
  508. package/docs/api/functions/resumeAutopilot.html +2 -2
  509. package/docs/api/functions/runPreCommitChecks.html +2 -2
  510. package/docs/api/functions/runTests.html +2 -2
  511. package/docs/api/functions/runTypeCheck.html +2 -2
  512. package/docs/api/functions/sanitizeMessage.html +2 -2
  513. package/docs/api/functions/sanitizeMessages.html +2 -2
  514. package/docs/api/functions/saveAgentUsageState.html +1 -1
  515. package/docs/api/functions/saveInjectedPaths.html +2 -2
  516. package/docs/api/functions/saveInjectedRules.html +2 -2
  517. package/docs/api/functions/saveLearnerConfig.html +2 -2
  518. package/docs/api/functions/saveModeSummary.html +2 -2
  519. package/docs/api/functions/saveProjectMemory.html +3 -3
  520. package/docs/api/functions/saveVersionMetadata.html +2 -2
  521. package/docs/api/functions/setCurrentStory.html +2 -2
  522. package/docs/api/functions/setEnvironmentVariables.html +2 -2
  523. package/docs/api/functions/setLearnerConfigValue.html +2 -2
  524. package/docs/api/functions/setPriorityContext.html +2 -2
  525. package/docs/api/functions/shouldActivateThinkMode.html +3 -3
  526. package/docs/api/functions/shouldActivateUltrathink.html +2 -2
  527. package/docs/api/functions/shouldApplyRule.html +2 -2
  528. package/docs/api/functions/shouldCheckForUpdates.html +2 -2
  529. package/docs/api/functions/shouldCompleteByPrd.html +2 -2
  530. package/docs/api/functions/shouldPromptExtraction.html +2 -2
  531. package/docs/api/functions/shouldReinforceUltrawork.html +2 -2
  532. package/docs/api/functions/shouldRetryValidation.html +2 -2
  533. package/docs/api/functions/shouldRunInBackground.html +8 -8
  534. package/docs/api/functions/spawnWorkers.html +7 -7
  535. package/docs/api/functions/startUltraQA.html +3 -3
  536. package/docs/api/functions/startUltrapilot.html +7 -7
  537. package/docs/api/functions/startValidationRound.html +2 -2
  538. package/docs/api/functions/startVerification.html +2 -2
  539. package/docs/api/functions/startsWithThinkingBlock.html +1 -1
  540. package/docs/api/functions/stopUltraQA.html +2 -2
  541. package/docs/api/functions/stripRecoveryThinkingParts.html +2 -2
  542. package/docs/api/functions/toSdkMcpFormat.html +2 -2
  543. package/docs/api/functions/trackAccess.html +2 -2
  544. package/docs/api/functions/trackProgress.html +5 -5
  545. package/docs/api/functions/transitionPhase.html +2 -2
  546. package/docs/api/functions/transitionRalphToUltraQA.html +9 -9
  547. package/docs/api/functions/transitionToComplete.html +2 -2
  548. package/docs/api/functions/transitionToFailed.html +2 -2
  549. package/docs/api/functions/transitionUltraQAToValidation.html +2 -2
  550. package/docs/api/functions/updateDirectoryAccess.html +2 -2
  551. package/docs/api/functions/updateExecution.html +2 -2
  552. package/docs/api/functions/updateExpansion.html +2 -2
  553. package/docs/api/functions/updatePlanning.html +2 -2
  554. package/docs/api/functions/updateQA.html +2 -2
  555. package/docs/api/functions/updateValidation.html +2 -2
  556. package/docs/api/functions/updateWorkerState.html +2 -2
  557. package/docs/api/functions/validateAgentConfig.html +2 -2
  558. package/docs/api/functions/validateCommitMessage.html +2 -2
  559. package/docs/api/functions/validateConfigFiles.html +2 -2
  560. package/docs/api/functions/validateExtractionRequest.html +2 -2
  561. package/docs/api/functions/validateMessage.html +1 -1
  562. package/docs/api/functions/validateMessages.html +1 -1
  563. package/docs/api/functions/validateSkillMetadata.html +2 -2
  564. package/docs/api/functions/writeAutopilotState.html +2 -2
  565. package/docs/api/functions/writeBoulderState.html +2 -2
  566. package/docs/api/functions/writePrd.html +2 -2
  567. package/docs/api/functions/writeRalphState.html +2 -2
  568. package/docs/api/functions/writeSkill.html +2 -2
  569. package/docs/api/functions/writeTrackingState.html +5 -5
  570. package/docs/api/functions/writeUltraQAState.html +2 -2
  571. package/docs/api/functions/writeUltrapilotState.html +2 -2
  572. package/docs/api/functions/writeUltraworkState.html +2 -2
  573. package/docs/api/functions/writeVerificationState.html +2 -2
  574. package/docs/api/hierarchy.html +1 -1
  575. package/docs/api/index.html +843 -843
  576. package/docs/api/interfaces/AgentConfig.html +18 -18
  577. package/docs/api/interfaces/AgentOverrideConfig.html +10 -10
  578. package/docs/api/interfaces/AgentPromptMetadata.html +19 -19
  579. package/docs/api/interfaces/AgentState.html +5 -5
  580. package/docs/api/interfaces/AgentUsageState.html +8 -8
  581. package/docs/api/interfaces/AutoSlashCommandHookInput.html +5 -5
  582. package/docs/api/interfaces/AutoSlashCommandHookOutput.html +3 -3
  583. package/docs/api/interfaces/AutoSlashCommandResult.html +5 -5
  584. package/docs/api/interfaces/AutopilotConfig.html +26 -26
  585. package/docs/api/interfaces/AutopilotExecution.html +16 -16
  586. package/docs/api/interfaces/AutopilotExpansion.html +12 -12
  587. package/docs/api/interfaces/AutopilotPlanning.html +8 -8
  588. package/docs/api/interfaces/AutopilotQA.html +12 -12
  589. package/docs/api/interfaces/AutopilotResult.html +10 -10
  590. package/docs/api/interfaces/AutopilotState.html +36 -36
  591. package/docs/api/interfaces/AutopilotSummary.html +16 -16
  592. package/docs/api/interfaces/AutopilotValidation.html +10 -10
  593. package/docs/api/interfaces/AutopilotValidationResult.html +8 -8
  594. package/docs/api/interfaces/AvailableAgent.html +5 -5
  595. package/docs/api/interfaces/AxiomBootInput.html +3 -3
  596. package/docs/api/interfaces/AxiomBootOutput.html +4 -4
  597. package/docs/api/interfaces/AxiomGuardsInput.html +4 -4
  598. package/docs/api/interfaces/AxiomGuardsOutput.html +4 -4
  599. package/docs/api/interfaces/AxiomMemoryFiles.html +5 -5
  600. package/docs/api/interfaces/AxiomState.html +8 -8
  601. package/docs/api/interfaces/BackgroundNotificationHookConfig.html +11 -11
  602. package/docs/api/interfaces/BackgroundNotificationHookInput.html +8 -8
  603. package/docs/api/interfaces/BackgroundNotificationHookOutput.html +8 -8
  604. package/docs/api/interfaces/BackgroundTask.html +7 -7
  605. package/docs/api/interfaces/BackgroundTaskManager.html +26 -26
  606. package/docs/api/interfaces/BeadsContextConfig.html +4 -4
  607. package/docs/api/interfaces/BoulderState.html +12 -12
  608. package/docs/api/interfaces/BuildInfo.html +6 -6
  609. package/docs/api/interfaces/CanStartResult.html +4 -4
  610. package/docs/api/interfaces/CancelResult.html +4 -4
  611. package/docs/api/interfaces/ClaudeThinkingConfig.html +4 -4
  612. package/docs/api/interfaces/CodeConventions.html +5 -5
  613. package/docs/api/interfaces/CodebasePattern.html +5 -5
  614. package/docs/api/interfaces/CommandInfo.html +5 -5
  615. package/docs/api/interfaces/CommandMetadata.html +7 -7
  616. package/docs/api/interfaces/CommentCheckResult.html +10 -10
  617. package/docs/api/interfaces/CommentCheckerConfig.html +6 -6
  618. package/docs/api/interfaces/CommentInfo.html +14 -14
  619. package/docs/api/interfaces/CommentPendingCall.html +18 -18
  620. package/docs/api/interfaces/CommitConfig.html +9 -9
  621. package/docs/api/interfaces/CompactCheckpoint.html +7 -7
  622. package/docs/api/interfaces/ContextEntry.html +14 -14
  623. package/docs/api/interfaces/ContextUsageResult.html +12 -12
  624. package/docs/api/interfaces/CustomNote.html +5 -5
  625. package/docs/api/interfaces/DelegationDecision.html +7 -7
  626. package/docs/api/interfaces/DelegationRoute.html +7 -7
  627. package/docs/api/interfaces/DelegationRoutingConfig.html +5 -5
  628. package/docs/api/interfaces/DelegationTrigger.html +6 -6
  629. package/docs/api/interfaces/DetectedKeyword.html +13 -13
  630. package/docs/api/interfaces/DetectionConfig.html +8 -8
  631. package/docs/api/interfaces/DetectionResult.html +13 -13
  632. package/docs/api/interfaces/DirectoryInfo.html +7 -7
  633. package/docs/api/interfaces/EmptyMessageSanitizerConfig.html +6 -6
  634. package/docs/api/interfaces/EmptyMessageSanitizerInput.html +6 -6
  635. package/docs/api/interfaces/EmptyMessageSanitizerOutput.html +8 -8
  636. package/docs/api/interfaces/ExecuteResult.html +5 -5
  637. package/docs/api/interfaces/ExpandedCommand.html +4 -4
  638. package/docs/api/interfaces/ExternalModelPreference.html +4 -4
  639. package/docs/api/interfaces/ExternalModelsConfig.html +6 -6
  640. package/docs/api/interfaces/ExternalModelsDefaults.html +5 -5
  641. package/docs/api/interfaces/ExternalModelsFallbackPolicy.html +5 -5
  642. package/docs/api/interfaces/FileOwnership.html +8 -8
  643. package/docs/api/interfaces/FormatConfig.html +7 -7
  644. package/docs/api/interfaces/FrameworkDetection.html +4 -4
  645. package/docs/api/interfaces/FullAgentConfig.html +26 -26
  646. package/docs/api/interfaces/GateCheckResult.html +5 -5
  647. package/docs/api/interfaces/GitBranchPattern.html +3 -3
  648. package/docs/api/interfaces/HookContext.html +5 -5
  649. package/docs/api/interfaces/HookDefinition.html +5 -5
  650. package/docs/api/interfaces/HookInput.html +18 -18
  651. package/docs/api/interfaces/HookOutput.html +10 -10
  652. package/docs/api/interfaces/HookResult.html +4 -4
  653. package/docs/api/interfaces/HotPath.html +6 -6
  654. package/docs/api/interfaces/InjectedPathsData.html +9 -9
  655. package/docs/api/interfaces/InjectedRulesData.html +10 -10
  656. package/docs/api/interfaces/InjectedSkillsData.html +8 -8
  657. package/docs/api/interfaces/InjectionResult.html +8 -8
  658. package/docs/api/interfaces/InstallOptions.html +9 -9
  659. package/docs/api/interfaces/InstallResult.html +10 -10
  660. package/docs/api/interfaces/IntegrationResult.html +14 -14
  661. package/docs/api/interfaces/LanguageDetection.html +5 -5
  662. package/docs/api/interfaces/LearnedSkill.html +16 -16
  663. package/docs/api/interfaces/LearnerConfig.html +18 -18
  664. package/docs/api/interfaces/LintConfig.html +7 -7
  665. package/docs/api/interfaces/MagicKeyword.html +4 -4
  666. package/docs/api/interfaces/MatchResult.html +6 -6
  667. package/docs/api/interfaces/MessageContext.html +8 -8
  668. package/docs/api/interfaces/MessageInfo.html +9 -9
  669. package/docs/api/interfaces/MessagePart.html +15 -15
  670. package/docs/api/interfaces/MessageWithModel.html +3 -3
  671. package/docs/api/interfaces/MessageWithParts.html +6 -6
  672. package/docs/api/interfaces/MessagesTransformHook.html +3 -3
  673. package/docs/api/interfaces/MessagesTransformInput.html +3 -3
  674. package/docs/api/interfaces/MessagesTransformOutput.html +3 -3
  675. package/docs/api/interfaces/ModeConfig.html +13 -13
  676. package/docs/api/interfaces/ModeStatus.html +4 -4
  677. package/docs/api/interfaces/ModelRef.html +4 -4
  678. package/docs/api/interfaces/NonInteractiveEnvConfig.html +2 -2
  679. package/docs/api/interfaces/NotepadConfig.html +7 -7
  680. package/docs/api/interfaces/NotepadStats.html +11 -11
  681. package/docs/api/interfaces/NotificationCheckResult.html +8 -8
  682. package/docs/api/interfaces/OrchestratorToolInput.html +6 -6
  683. package/docs/api/interfaces/OrchestratorToolOutput.html +6 -6
  684. package/docs/api/interfaces/OutputPart.html +4 -4
  685. package/docs/api/interfaces/PRD.html +9 -9
  686. package/docs/api/interfaces/PRDStatus.html +13 -13
  687. package/docs/api/interfaces/ParsedSlashCommand.html +8 -8
  688. package/docs/api/interfaces/ParsedTokenLimitError.html +16 -16
  689. package/docs/api/interfaces/PendingContext.html +8 -8
  690. package/docs/api/interfaces/PermissionHookOutput.html +4 -4
  691. package/docs/api/interfaces/PermissionRequestInput.html +9 -9
  692. package/docs/api/interfaces/PersistentModeResult.html +9 -9
  693. package/docs/api/interfaces/PlanProgress.html +8 -8
  694. package/docs/api/interfaces/PlanSummary.html +10 -10
  695. package/docs/api/interfaces/PluginConfig.html +17 -17
  696. package/docs/api/interfaces/PreCommitResult.html +3 -3
  697. package/docs/api/interfaces/PreCompactHookOutput.html +4 -4
  698. package/docs/api/interfaces/PreCompactInput.html +8 -8
  699. package/docs/api/interfaces/PreemptiveCompactionConfig.html +14 -14
  700. package/docs/api/interfaces/PriorityContextResult.html +5 -5
  701. package/docs/api/interfaces/ProgressEntry.html +11 -11
  702. package/docs/api/interfaces/ProgressLog.html +7 -7
  703. package/docs/api/interfaces/ProjectMemory.html +14 -14
  704. package/docs/api/interfaces/ProjectStructure.html +5 -5
  705. package/docs/api/interfaces/PromotionCandidate.html +9 -9
  706. package/docs/api/interfaces/PruneResult.html +5 -5
  707. package/docs/api/interfaces/QualityValidation.html +10 -10
  708. package/docs/api/interfaces/RalphLoopHook.html +4 -4
  709. package/docs/api/interfaces/RalphLoopOptions.html +5 -5
  710. package/docs/api/interfaces/RalphLoopState.html +21 -21
  711. package/docs/api/interfaces/RecoveryConfig.html +16 -16
  712. package/docs/api/interfaces/RecoveryMessageData.html +4 -4
  713. package/docs/api/interfaces/RecoveryResult.html +10 -10
  714. package/docs/api/interfaces/RecoveryStoredMessageMeta.html +8 -8
  715. package/docs/api/interfaces/RecoveryStoredReasoningPart.html +7 -7
  716. package/docs/api/interfaces/RecoveryStoredTextPart.html +9 -9
  717. package/docs/api/interfaces/RecoveryStoredToolPart.html +9 -9
  718. package/docs/api/interfaces/RegisterContextOptions.html +12 -12
  719. package/docs/api/interfaces/ReleaseInfo.html +9 -9
  720. package/docs/api/interfaces/ResolveDelegationOptions.html +7 -7
  721. package/docs/api/interfaces/ResolveOptions.html +6 -6
  722. package/docs/api/interfaces/ResolvedModel.html +5 -5
  723. package/docs/api/interfaces/RetryState.html +6 -6
  724. package/docs/api/interfaces/RuleFileCandidate.html +12 -12
  725. package/docs/api/interfaces/RuleFrontmatterResult.html +6 -6
  726. package/docs/api/interfaces/RuleInfo.html +18 -18
  727. package/docs/api/interfaces/RuleMetadata.html +9 -9
  728. package/docs/api/interfaces/RuleToInject.html +10 -10
  729. package/docs/api/interfaces/SessionEndHookOutput.html +2 -2
  730. package/docs/api/interfaces/SessionEndInput.html +9 -9
  731. package/docs/api/interfaces/SessionMetrics.html +9 -9
  732. package/docs/api/interfaces/SessionState.html +5 -5
  733. package/docs/api/interfaces/SetupHookOutput.html +3 -3
  734. package/docs/api/interfaces/SetupInput.html +7 -7
  735. package/docs/api/interfaces/SetupResult.html +5 -5
  736. package/docs/api/interfaces/ShellHook.html +4 -4
  737. package/docs/api/interfaces/SisyphusOptions.html +14 -14
  738. package/docs/api/interfaces/SisyphusSession.html +16 -16
  739. package/docs/api/interfaces/SkillExtractionRequest.html +12 -12
  740. package/docs/api/interfaces/SkillFileCandidate.html +10 -10
  741. package/docs/api/interfaces/SkillHookContext.html +5 -5
  742. package/docs/api/interfaces/SkillMetadata.html +22 -22
  743. package/docs/api/interfaces/SkillParseResult.html +5 -5
  744. package/docs/api/interfaces/SubagentHookOutput.html +3 -3
  745. package/docs/api/interfaces/SubagentInfo.html +14 -14
  746. package/docs/api/interfaces/SubagentStartInput.html +10 -10
  747. package/docs/api/interfaces/SubagentStopInput.html +11 -11
  748. package/docs/api/interfaces/SubagentTrackingState.html +6 -6
  749. package/docs/api/interfaces/TaskExecutionDecision.html +10 -10
  750. package/docs/api/interfaces/TechStack.html +5 -5
  751. package/docs/api/interfaces/ThinkModeInput.html +4 -4
  752. package/docs/api/interfaces/ThinkModeState.html +12 -12
  753. package/docs/api/interfaces/ThinkingValidatorMessageInfo.html +6 -6
  754. package/docs/api/interfaces/ThinkingValidatorMessagePart.html +9 -9
  755. package/docs/api/interfaces/ThinkingValidatorMessageWithParts.html +4 -4
  756. package/docs/api/interfaces/TodoContinuationHook.html +2 -2
  757. package/docs/api/interfaces/TransitionResult.html +4 -4
  758. package/docs/api/interfaces/TruncateState.html +6 -6
  759. package/docs/api/interfaces/UltraQAOptions.html +5 -5
  760. package/docs/api/interfaces/UltraQAResult.html +9 -9
  761. package/docs/api/interfaces/UltraQAState.html +19 -19
  762. package/docs/api/interfaces/UltrapilotConfig.html +14 -14
  763. package/docs/api/interfaces/UltrapilotState.html +26 -26
  764. package/docs/api/interfaces/UltraworkState.html +17 -17
  765. package/docs/api/interfaces/UpdateCheckResult.html +7 -7
  766. package/docs/api/interfaces/UpdateResult.html +7 -7
  767. package/docs/api/interfaces/UserDirective.html +7 -7
  768. package/docs/api/interfaces/UserStory.html +15 -15
  769. package/docs/api/interfaces/ValidationCoordinatorResult.html +6 -6
  770. package/docs/api/interfaces/ValidationResult.html +10 -10
  771. package/docs/api/interfaces/VerificationState.html +17 -17
  772. package/docs/api/interfaces/VersionMetadata.html +12 -12
  773. package/docs/api/interfaces/WorkerState.html +24 -24
  774. package/docs/api/interfaces/WriteSkillResult.html +6 -6
  775. package/docs/api/media/EVOLUTION.md +675 -675
  776. package/docs/api/media/INSTALL.md +612 -612
  777. package/docs/api/media/MIGRATION.md +1330 -1330
  778. package/docs/api/media/NEXUS.md +598 -598
  779. package/docs/api/media/REFERENCE.md +1300 -1300
  780. package/docs/api/media/mcp-server-usage.md +253 -253
  781. package/docs/api/modules.html +1 -1
  782. package/docs/api/types/AgentCategory.html +2 -2
  783. package/docs/api/types/AgentCost.html +3 -3
  784. package/docs/api/types/AgentFactory.html +2 -2
  785. package/docs/api/types/AgentOverrides.html +2 -2
  786. package/docs/api/types/AutopilotPhase.html +2 -2
  787. package/docs/api/types/AutopilotSignal.html +2 -2
  788. package/docs/api/types/CommandScope.html +2 -2
  789. package/docs/api/types/ContextPriority.html +3 -3
  790. package/docs/api/types/ContextSourceType.html +3 -3
  791. package/docs/api/types/DelegationProvider.html +2 -2
  792. package/docs/api/types/DelegationTool.html +2 -2
  793. package/docs/api/types/ExecutionMode.html +3 -3
  794. package/docs/api/types/ExternalModelProvider.html +2 -2
  795. package/docs/api/types/GateType.html +3 -3
  796. package/docs/api/types/InjectionStrategy.html +2 -2
  797. package/docs/api/types/KeywordType.html +10 -10
  798. package/docs/api/types/ModelType.html +2 -2
  799. package/docs/api/types/QAStatus.html +2 -2
  800. package/docs/api/types/RecoveryErrorType.html +2 -2
  801. package/docs/api/types/RecoveryStoredPart.html +2 -2
  802. package/docs/api/types/TaskTool.html +1 -1
  803. package/docs/api/types/ThinkingConfig.html +2 -2
  804. package/docs/api/types/UltraQAGoalType.html +1 -1
  805. package/docs/api/types/UserStoryInput.html +2 -2
  806. package/docs/api/types/ValidationVerdict.html +2 -2
  807. package/docs/api/types/ValidationVerdictType.html +2 -2
  808. package/docs/api/variables/AGENTS_DIR.html +1 -1
  809. package/docs/api/variables/AGENTS_FILENAME.html +2 -2
  810. package/docs/api/variables/AGENT_TOOLS.html +2 -2
  811. package/docs/api/variables/ALLOWED_PATH_PREFIX.html +2 -2
  812. package/docs/api/variables/ANALYST_PROMPT_METADATA.html +1 -1
  813. package/docs/api/variables/ARCHITECT_PROMPT_METADATA.html +1 -1
  814. package/docs/api/variables/AUTO_SLASH_COMMAND_HOOK_NAME.html +4 -4
  815. package/docs/api/variables/AUTO_SLASH_COMMAND_TAG_CLOSE.html +1 -1
  816. package/docs/api/variables/AUTO_SLASH_COMMAND_TAG_OPEN.html +2 -2
  817. package/docs/api/variables/BACKGROUND_NOTIFICATION_HOOK_NAME.html +2 -2
  818. package/docs/api/variables/BDD_KEYWORDS.html +2 -2
  819. package/docs/api/variables/BEADS_INSTRUCTIONS.html +1 -1
  820. package/docs/api/variables/BEADS_RUST_INSTRUCTIONS.html +1 -1
  821. package/docs/api/variables/BLOCKING_PATTERNS.html +3 -3
  822. package/docs/api/variables/BOULDER_CONTINUATION_PROMPT.html +2 -2
  823. package/docs/api/variables/BOULDER_DIR.html +2 -2
  824. package/docs/api/variables/BOULDER_FILE.html +2 -2
  825. package/docs/api/variables/BOULDER_STATE_PATH.html +2 -2
  826. package/docs/api/variables/CHARS_PER_TOKEN.html +2 -2
  827. package/docs/api/variables/CI_COMMANDS.html +2 -2
  828. package/docs/api/variables/CI_GATE_MESSAGE.html +1 -1
  829. package/docs/api/variables/CLAUDE_CONFIG_DIR.html +2 -2
  830. package/docs/api/variables/CLAUDE_DEFAULT_CONTEXT_LIMIT.html +2 -2
  831. package/docs/api/variables/COMMANDS_DIR.html +1 -1
  832. package/docs/api/variables/COMMENT_CHECKER_MESSAGE_HEADER.html +2 -2
  833. package/docs/api/variables/COMPACTION_COOLDOWN_MS.html +2 -2
  834. package/docs/api/variables/CONTENT_PART_TYPES.html +2 -2
  835. package/docs/api/variables/CONTEXT_CRITICAL_MESSAGE.html +2 -2
  836. package/docs/api/variables/CONTEXT_FILENAMES.html +2 -2
  837. package/docs/api/variables/CONTEXT_LIMIT_RECOVERY_MESSAGE.html +2 -2
  838. package/docs/api/variables/CONTEXT_LIMIT_SHORT_MESSAGE.html +2 -2
  839. package/docs/api/variables/CONTEXT_WARNING_MESSAGE.html +2 -2
  840. package/docs/api/variables/CRITICAL_THRESHOLD.html +2 -2
  841. package/docs/api/variables/CRITIC_PROMPT_METADATA.html +1 -1
  842. package/docs/api/variables/DEFAULT_CONFIG.html +2 -2
  843. package/docs/api/variables/DEFAULT_MAX_BACKGROUND_TASKS.html +2 -2
  844. package/docs/api/variables/DEFAULT_THINKING_CONTENT.html +2 -2
  845. package/docs/api/variables/DIRECT_WORK_REMINDER.html +2 -2
  846. package/docs/api/variables/DOCUMENT_SPECIALIST_PROMPT_METADATA.html +1 -1
  847. package/docs/api/variables/DOCUMENT_WRITER_PROMPT_METADATA.html +1 -1
  848. package/docs/api/variables/EDIT_ERROR_PATTERNS.html +2 -2
  849. package/docs/api/variables/EDIT_ERROR_REMINDER.html +3 -3
  850. package/docs/api/variables/EMPTY_MESSAGE_SANITIZER_DEBUG_PREFIX.html +2 -2
  851. package/docs/api/variables/EMPTY_MESSAGE_SANITIZER_ERROR_PATTERNS.html +2 -2
  852. package/docs/api/variables/EMPTY_MESSAGE_SANITIZER_HOOK_NAME.html +2 -2
  853. package/docs/api/variables/ENTRY_SEPARATOR.html +1 -1
  854. package/docs/api/variables/EXCLUDED_COMMANDS.html +3 -3
  855. package/docs/api/variables/EXPERT_GATE_MESSAGE.html +1 -1
  856. package/docs/api/variables/EXPLORE_PROMPT_METADATA.html +1 -1
  857. package/docs/api/variables/EXTENSION_TO_LANGUAGE.html +2 -2
  858. package/docs/api/variables/FEATURE_FLAG_KEY.html +2 -2
  859. package/docs/api/variables/FRONTEND_ENGINEER_PROMPT_METADATA.html +1 -1
  860. package/docs/api/variables/GITHUB_API_URL.html +1 -1
  861. package/docs/api/variables/INSTALLER_CLAUDE_CONFIG_DIR.html +2 -2
  862. package/docs/api/variables/INSTALLER_VERSION.html +2 -2
  863. package/docs/api/variables/LINE_COMMENT_PATTERNS.html +2 -2
  864. package/docs/api/variables/LONG_RUNNING_PATTERNS.html +3 -3
  865. package/docs/api/variables/MANUAL_HEADER.html +1 -1
  866. package/docs/api/variables/MAX_SKILLS_PER_SESSION.html +2 -2
  867. package/docs/api/variables/MAX_SKILL_CONTENT_LENGTH.html +2 -2
  868. package/docs/api/variables/MAX_WARNINGS.html +2 -2
  869. package/docs/api/variables/MIN_QUALITY_SCORE.html +2 -2
  870. package/docs/api/variables/MODE_CONFIGS.html +4 -4
  871. package/docs/api/variables/MULTIMODAL_LOOKER_PROMPT_METADATA.html +1 -1
  872. package/docs/api/variables/NON_EMPTY_CONTENT_RECOVERY_MESSAGE.html +2 -2
  873. package/docs/api/variables/NON_INTERACTIVE_ENV.html +1 -1
  874. package/docs/api/variables/NON_INTERACTIVE_ENV_HOOK_NAME.html +1 -1
  875. package/docs/api/variables/NOTEPAD_BASE_PATH.html +2 -2
  876. package/docs/api/variables/NOTEPAD_DEFAULT_CONFIG.html +1 -1
  877. package/docs/api/variables/NOTEPAD_DIR.html +2 -2
  878. package/docs/api/variables/NOTEPAD_FILENAME.html +1 -1
  879. package/docs/api/variables/OMC_ORCHESTRATOR_HOOK_NAME.html +4 -4
  880. package/docs/api/variables/ORCHESTRATOR_DELEGATION_REQUIRED.html +2 -2
  881. package/docs/api/variables/PATTERNS_HEADER.html +1 -1
  882. package/docs/api/variables/PLACEHOLDER_TEXT.html +3 -3
  883. package/docs/api/variables/PLANNER_PLANS_DIR.html +2 -2
  884. package/docs/api/variables/PLANNER_PROMPT_METADATA.html +1 -1
  885. package/docs/api/variables/PLAN_EXTENSION.html +2 -2
  886. package/docs/api/variables/PRD_EXAMPLE_FILENAME.html +1 -1
  887. package/docs/api/variables/PRD_FILENAME.html +1 -1
  888. package/docs/api/variables/PREEMPTIVE_DEFAULT_THRESHOLD.html +2 -2
  889. package/docs/api/variables/PREVENTED_ERROR.html +2 -2
  890. package/docs/api/variables/PRIORITY_HEADER.html +1 -1
  891. package/docs/api/variables/PROGRESS_FILENAME.html +1 -1
  892. package/docs/api/variables/PROJECT_MARKERS.html +2 -2
  893. package/docs/api/variables/PROJECT_RULE_FILES.html +2 -2
  894. package/docs/api/variables/PROJECT_RULE_SUBDIRS.html +2 -2
  895. package/docs/api/variables/PROJECT_SKILLS_SUBDIR.html +2 -2
  896. package/docs/api/variables/RAPID_FIRE_DEBOUNCE_MS.html +7 -7
  897. package/docs/api/variables/README_FILENAME.html +2 -2
  898. package/docs/api/variables/README_INJECTOR_STORAGE.html +1 -1
  899. package/docs/api/variables/README_TRACKED_TOOLS.html +2 -2
  900. package/docs/api/variables/RECOVERY_FAILED_MESSAGE.html +2 -2
  901. package/docs/api/variables/RECOVERY_MESSAGES.html +2 -2
  902. package/docs/api/variables/RECOVERY_PLACEHOLDER_TEXT.html +2 -2
  903. package/docs/api/variables/REMINDER_MESSAGE.html +2 -2
  904. package/docs/api/variables/REPO_NAME.html +1 -1
  905. package/docs/api/variables/REPO_OWNER.html +2 -2
  906. package/docs/api/variables/RETRY_CONFIG.html +6 -6
  907. package/docs/api/variables/RULES_INJECTOR_STORAGE.html +1 -1
  908. package/docs/api/variables/RULE_EXTENSIONS.html +2 -2
  909. package/docs/api/variables/SHELL_COMMAND_PATTERNS.html +3 -3
  910. package/docs/api/variables/SINGLE_TASK_DIRECTIVE.html +2 -2
  911. package/docs/api/variables/SISYPHUS_JUNIOR_PROMPT_METADATA.html +1 -1
  912. package/docs/api/variables/SKILL_EXTENSION.html +2 -2
  913. package/docs/api/variables/SLASH_COMMAND_PATTERN.html +2 -2
  914. package/docs/api/variables/STALE_STATE_MAX_AGE_MS.html +2 -2
  915. package/docs/api/variables/SYNTHETIC_THINKING_ID_PREFIX.html +2 -2
  916. package/docs/api/variables/TARGET_TOOLS.html +2 -2
  917. package/docs/api/variables/THINKING_BLOCK_VALIDATOR_HOOK_NAME.html +2 -2
  918. package/docs/api/variables/THINKING_CONFIGS.html +2 -2
  919. package/docs/api/variables/THINKING_MODEL_PATTERNS.html +3 -3
  920. package/docs/api/variables/THINKING_PART_TYPES.html +2 -2
  921. package/docs/api/variables/TOKEN_LIMIT_KEYWORDS.html +2 -2
  922. package/docs/api/variables/TOKEN_LIMIT_PATTERNS.html +2 -2
  923. package/docs/api/variables/TOOL_PART_TYPES.html +2 -2
  924. package/docs/api/variables/TRACKED_TOOLS.html +2 -2
  925. package/docs/api/variables/TRUNCATE_CONFIG.html +6 -6
  926. package/docs/api/variables/TRUNCATION_APPLIED_MESSAGE.html +2 -2
  927. package/docs/api/variables/TYPE_CHECKER_PREFIXES.html +2 -2
  928. package/docs/api/variables/ULTRAPILOT_DEFAULT_CONFIG.html +2 -2
  929. package/docs/api/variables/USER_GATE_MESSAGE.html +1 -1
  930. package/docs/api/variables/USER_RULE_DIR.html +2 -2
  931. package/docs/api/variables/USER_SKILLS_DIR.html +2 -2
  932. package/docs/api/variables/VERIFICATION_REMINDER.html +2 -2
  933. package/docs/api/variables/VERSION_FILE.html +1 -1
  934. package/docs/api/variables/WORKING_MEMORY_HEADER.html +1 -1
  935. package/docs/api/variables/WRITE_EDIT_TOOLS.html +2 -2
  936. package/docs/api/variables/allCustomTools.html +3 -3
  937. package/docs/api/variables/analystAgent.html +1 -1
  938. package/docs/api/variables/architectAgent.html +1 -1
  939. package/docs/api/variables/astTools.html +2 -2
  940. package/docs/api/variables/contextCollector.html +2 -2
  941. package/docs/api/variables/criticAgent.html +1 -1
  942. package/docs/api/variables/designerAgent.html +1 -1
  943. package/docs/api/variables/executorAgent.html +1 -1
  944. package/docs/api/variables/exploreAgent.html +1 -1
  945. package/docs/api/variables/lspTools.html +2 -2
  946. package/docs/api/variables/nonInteractiveEnvHook.html +8 -8
  947. package/docs/api/variables/omcSystemPrompt.html +2 -2
  948. package/docs/api/variables/omcToolNames.html +3 -3
  949. package/docs/api/variables/omcToolsServer.html +4 -4
  950. package/docs/api/variables/plannerAgent.html +1 -1
  951. package/docs/api/variables/researcherAgent.html +1 -1
  952. package/docs/api/variables/visionAgent.html +1 -1
  953. package/docs/api/variables/writerAgent.html +1 -1
  954. package/docs/ccg-workflow/API.md +643 -643
  955. package/docs/ccg-workflow/BEST_PRACTICES.md +630 -630
  956. package/docs/ccg-workflow/README.md +188 -188
  957. package/docs/ccg-workflow/TROUBLESHOOTING.md +454 -454
  958. package/docs/ccg-workflow/VALIDATION_GUIDE.md +258 -258
  959. package/docs/design/AGENTS.md +30 -30
  960. package/docs/design/delegation-enforcer-integration.md +185 -185
  961. package/docs/design/project-session-manager.md +1086 -1086
  962. package/docs/dev-standards/context-collection.md +50 -50
  963. package/docs/dev-standards/context-summary-template.md +73 -73
  964. package/docs/dev-standards/dev-standards.md +37 -37
  965. package/docs/dev-standards/quality-review.md +45 -45
  966. package/docs/dev-standards/sufficiency-checklist.md +61 -61
  967. package/docs/dev-standards/tools-integration.md +77 -77
  968. package/docs/dev-standards/workflow.md +32 -32
  969. package/docs/getting-started/concepts.md +116 -116
  970. package/docs/getting-started/installation.md +117 -117
  971. package/docs/getting-started/quickstart.md +105 -105
  972. package/docs/guides/mcp-server-usage.md +253 -253
  973. package/docs/guides/task-templates-guide.md +178 -178
  974. package/docs/guides/tool-name-migration.md +130 -130
  975. package/docs/guides/troubleshooting-guide.md +144 -144
  976. package/docs/guides/v5.5.13-new-features.md +269 -269
  977. package/docs/guides/wizard-user-guide.md +97 -97
  978. package/docs/guides/workflow-recommendation-guide.md +108 -108
  979. package/docs/issues/AGENTS.md +22 -22
  980. package/docs/mcp/README.md +95 -95
  981. package/docs/mcp/client-guide.md +355 -355
  982. package/docs/mcp/configuration.md +308 -308
  983. package/docs/mcp/overview.md +238 -238
  984. package/docs/mcp/performance.md +309 -309
  985. package/docs/mcp/server-guide.md +305 -305
  986. package/docs/mcp-compatibility-matrix.md +70 -70
  987. package/docs/partials/AGENTS.md +26 -26
  988. package/docs/partials/agent-tiers.md +183 -183
  989. package/docs/partials/features.md +169 -169
  990. package/docs/partials/mode-hierarchy.md +129 -129
  991. package/docs/partials/mode-selection-guide.md +92 -92
  992. package/docs/partials/verification-tiers.md +123 -123
  993. package/docs/plans/2025-11-22-opencode-support-design.md +306 -306
  994. package/docs/plans/2025-11-22-opencode-support-implementation.md +965 -965
  995. package/docs/plans/2025-11-28-skills-improvements-from-user-feedback.md +766 -766
  996. package/docs/plans/2026-01-17-visual-brainstorming.md +587 -587
  997. package/docs/plans/2026-02-24-axiom-integration-design.md +451 -451
  998. package/docs/plans/2026-02-24-axiom-integration-plan.md +1088 -1088
  999. package/docs/plans/2026-02-24-superpowers-ultrapower-integration-design.md +795 -795
  1000. package/docs/plans/2026-02-24-superpowers-ultrapower-integration-plan.md +768 -768
  1001. package/docs/plans/2026-02-24-ultrapower-integration-design.md +54 -54
  1002. package/docs/plans/2026-02-26-nexus-design.md +380 -380
  1003. package/docs/plans/2026-02-26-nexus-implementation-plan.md +2611 -2611
  1004. package/docs/plans/2026-02-26-phase2-active-learning-design.md +416 -416
  1005. package/docs/plans/2026-02-27-release-cicd-pipeline-design.md +276 -276
  1006. package/docs/plans/2026-02-27-release-cicd-pipeline-impl.md +530 -530
  1007. package/docs/plans/2026-02-28-nexus-self-evolution.md +161 -161
  1008. package/docs/plans/2026-03-02-docs-comprehensive-update-design.md +259 -259
  1009. package/docs/plans/2026-03-02-docs-comprehensive-update.md +1527 -1527
  1010. package/docs/plans/2026-03-05-mcp-adoption-atomic-tasks.md +1665 -1665
  1011. package/docs/plans/2026-03-05-mcp-adoption-plan.md +679 -679
  1012. package/docs/plans/AGENTS.md +36 -36
  1013. package/docs/plans/axiom-migration-plan.md +384 -384
  1014. package/docs/prd/AGENTS.md +25 -25
  1015. package/docs/prd/documentation-system-draft.md +297 -297
  1016. package/docs/prd/documentation-system-rough.md +674 -674
  1017. package/docs/prd/memory-evolution-optimize-rough.md +583 -583
  1018. package/docs/prd/user_guide-rough.md +839 -839
  1019. package/docs/reviews/AGENTS.md +22 -22
  1020. package/docs/reviews/documentation-system/review_critic.md +383 -383
  1021. package/docs/reviews/documentation-system/review_domain.md +508 -508
  1022. package/docs/reviews/documentation-system/review_product.md +185 -185
  1023. package/docs/reviews/documentation-system/review_tech.md +284 -284
  1024. package/docs/reviews/documentation-system/review_ux.md +248 -248
  1025. package/docs/reviews/documentation-system/summary.md +196 -196
  1026. package/docs/reviews/draft-prd-agent-observability/review_critic.md +75 -75
  1027. package/docs/reviews/draft-prd-agent-observability/review_domain.md +128 -128
  1028. package/docs/reviews/draft-prd-agent-observability/review_product.md +85 -85
  1029. package/docs/reviews/draft-prd-agent-observability/review_tech.md +77 -77
  1030. package/docs/reviews/draft-prd-agent-observability/review_ux.md +74 -74
  1031. package/docs/reviews/draft-prd-agent-observability/rough_prd.md +165 -165
  1032. package/docs/reviews/draft-prd-memory-evolution-optimize/review_critic.md +331 -331
  1033. package/docs/reviews/draft-prd-memory-evolution-optimize/review_domain.md +257 -257
  1034. package/docs/reviews/draft-prd-memory-evolution-optimize/review_product.md +142 -142
  1035. package/docs/reviews/draft-prd-memory-evolution-optimize/review_tech.md +291 -291
  1036. package/docs/reviews/draft-prd-memory-evolution-optimize/review_ux.md +121 -121
  1037. package/docs/reviews/draft-prd-three-directions/review_product.md +126 -126
  1038. package/docs/reviews/draft-prd-three-directions/review_tech.md +159 -159
  1039. package/docs/reviews/draft-prd-three-directions/review_ux.md +129 -129
  1040. package/docs/reviews/memory-evolution-optimize/summary.md +109 -109
  1041. package/docs/reviews/ultrapower-pain-points/review_critic.md +228 -228
  1042. package/docs/reviews/ultrapower-pain-points/review_ux.md +168 -168
  1043. package/docs/reviews/ultrapower-security/review_critic.md +546 -546
  1044. package/docs/reviews/ultrapower-standards/AGENTS.md +34 -34
  1045. package/docs/reviews/ultrapower-standards/review_critic.md +253 -253
  1046. package/docs/reviews/ultrapower-standards/review_domain.md +252 -252
  1047. package/docs/reviews/ultrapower-standards/review_product.md +109 -109
  1048. package/docs/reviews/ultrapower-standards/review_tech.md +162 -162
  1049. package/docs/reviews/ultrapower-standards/review_ux.md +129 -129
  1050. package/docs/reviews/ultrapower-standards/summary.md +109 -109
  1051. package/docs/reviews/ultrapower-tech-review/review_tech.md +207 -207
  1052. package/docs/reviews/user_guide/summary.md +149 -149
  1053. package/docs/shared/AGENTS.md +26 -26
  1054. package/docs/shared/agent-tiers.md +183 -183
  1055. package/docs/shared/features.md +169 -169
  1056. package/docs/shared/mode-hierarchy.md +129 -129
  1057. package/docs/shared/mode-selection-guide.md +92 -92
  1058. package/docs/shared/verification-tiers.md +123 -123
  1059. package/docs/standards/AGENTS.md +44 -44
  1060. package/docs/standards/README.md +89 -89
  1061. package/docs/standards/agent-lifecycle.md +538 -538
  1062. package/docs/standards/anti-patterns.md +365 -365
  1063. package/docs/standards/audit-report.md +421 -421
  1064. package/docs/standards/contribution-guide.md +342 -342
  1065. package/docs/standards/hook-execution-order.md +330 -330
  1066. package/docs/standards/release-process.md +89 -89
  1067. package/docs/standards/runtime-protection.md +398 -398
  1068. package/docs/standards/state-machine.md +316 -316
  1069. package/docs/standards/templates/AGENTS.md +32 -32
  1070. package/docs/standards/templates/agent-template.md +65 -65
  1071. package/docs/standards/templates/hook-template.md +76 -76
  1072. package/docs/standards/templates/skill-template.md +48 -48
  1073. package/docs/standards/testing-guide.md +96 -96
  1074. package/docs/standards/user-guide.md +351 -351
  1075. package/docs/superpowers/AGENTS.md +29 -29
  1076. package/docs/superpowers/plans/2026-01-22-document-review-system.md +313 -313
  1077. package/docs/superpowers/plans/2026-02-19-visual-brainstorming-refactor.md +535 -535
  1078. package/docs/superpowers/plans/AGENTS.md +30 -30
  1079. package/docs/superpowers/specs/2026-01-22-document-review-system-design.md +153 -153
  1080. package/docs/superpowers/specs/2026-02-19-visual-brainstorming-refactor-design.md +208 -208
  1081. package/docs/superpowers/specs/AGENTS.md +30 -30
  1082. package/docs/tasks/AGENTS.md +22 -22
  1083. package/docs/tasks/documentation-system/implementation-plan.md +340 -340
  1084. package/docs/tasks/documentation-system/manifest.md +581 -581
  1085. package/docs/tasks/memory-evolution-optimize/manifest.md +539 -539
  1086. package/docs/tasks/ultrapower-standards/AGENTS.md +32 -32
  1087. package/docs/tasks/ultrapower-standards/manifest.md +507 -507
  1088. package/docs/tasks/user_guide/manifest.md +424 -424
  1089. package/docs/testing.md +321 -321
  1090. package/docs/troubleshooting/agent-timeouts.md +45 -45
  1091. package/docs/troubleshooting/common-errors.md +41 -41
  1092. package/docs/troubleshooting/hook-failures.md +35 -35
  1093. package/docs/troubleshooting/performance-issues.md +53 -53
  1094. package/docs/troubleshooting/tool-name-length-error.md +57 -57
  1095. package/docs/troubleshooting.md +789 -789
  1096. package/docs/windows/AGENTS.md +28 -28
  1097. package/docs/windows/polyglot-hooks.md +236 -236
  1098. package/hooks/AGENTS.md +37 -37
  1099. package/hooks/run-hook.cmd +0 -0
  1100. package/hooks/session-start +0 -0
  1101. package/package.json +1 -1
  1102. package/scripts/AGENTS.md +80 -80
  1103. package/scripts/hooks/AGENTS.md +32 -32
  1104. package/scripts/lib/AGENTS.md +28 -28
  1105. package/scripts/persistent-mode.cjs +605 -605
  1106. package/scripts/sync-version.mjs +6 -1
  1107. package/skills/AGENTS.md +113 -113
  1108. package/skills/analyze/AGENTS.md +34 -34
  1109. package/skills/analyze/SKILL.md +119 -119
  1110. package/skills/autopilot/AGENTS.md +34 -34
  1111. package/skills/autopilot/SKILL.md +187 -187
  1112. package/skills/ax-analyze-error/AGENTS.md +34 -34
  1113. package/skills/ax-analyze-error/SKILL.md +76 -76
  1114. package/skills/ax-context/AGENTS.md +34 -34
  1115. package/skills/ax-context/SKILL.md +79 -79
  1116. package/skills/ax-decompose/AGENTS.md +34 -34
  1117. package/skills/ax-decompose/SKILL.md +57 -57
  1118. package/skills/ax-draft/AGENTS.md +34 -34
  1119. package/skills/ax-draft/SKILL.md +55 -55
  1120. package/skills/ax-evolution/AGENTS.md +34 -34
  1121. package/skills/ax-evolution/SKILL.md +71 -71
  1122. package/skills/ax-evolve/AGENTS.md +34 -34
  1123. package/skills/ax-evolve/SKILL.md +82 -82
  1124. package/skills/ax-export/AGENTS.md +34 -34
  1125. package/skills/ax-export/SKILL.md +178 -178
  1126. package/skills/ax-implement/AGENTS.md +34 -34
  1127. package/skills/ax-implement/SKILL.md +78 -78
  1128. package/skills/ax-knowledge/AGENTS.md +60 -60
  1129. package/skills/ax-knowledge/SKILL.md +162 -162
  1130. package/skills/ax-reflect/AGENTS.md +34 -34
  1131. package/skills/ax-reflect/SKILL.md +83 -83
  1132. package/skills/ax-review/AGENTS.md +34 -34
  1133. package/skills/ax-review/SKILL.md +60 -60
  1134. package/skills/ax-rollback/AGENTS.md +34 -34
  1135. package/skills/ax-rollback/SKILL.md +69 -69
  1136. package/skills/ax-status/AGENTS.md +34 -34
  1137. package/skills/ax-status/SKILL.md +124 -124
  1138. package/skills/ax-suspend/AGENTS.md +34 -34
  1139. package/skills/ax-suspend/SKILL.md +64 -64
  1140. package/skills/brainstorming/AGENTS.md +34 -34
  1141. package/skills/brainstorming/SKILL.md +176 -176
  1142. package/skills/brainstorming/spec-document-reviewer-prompt.md +50 -50
  1143. package/skills/brainstorming/visual-companion.md +274 -274
  1144. package/skills/build-fix/AGENTS.md +34 -34
  1145. package/skills/build-fix/SKILL.md +141 -141
  1146. package/skills/cancel/AGENTS.md +34 -34
  1147. package/skills/cancel/SKILL.md +432 -432
  1148. package/skills/ccg/AGENTS.md +34 -34
  1149. package/skills/ccg/SKILL.md +188 -188
  1150. package/skills/ccg-workflow/SKILL.md +30 -30
  1151. package/skills/code-review/AGENTS.md +34 -34
  1152. package/skills/code-review/SKILL.md +256 -256
  1153. package/skills/configure-discord/AGENTS.md +34 -34
  1154. package/skills/configure-discord/SKILL.md +250 -250
  1155. package/skills/configure-telegram/AGENTS.md +34 -34
  1156. package/skills/configure-telegram/SKILL.md +244 -244
  1157. package/skills/deepinit/AGENTS.md +34 -34
  1158. package/skills/deepinit/SKILL.md +426 -426
  1159. package/skills/deepsearch/AGENTS.md +34 -34
  1160. package/skills/deepsearch/SKILL.md +41 -41
  1161. package/skills/dispatching-parallel-agents/AGENTS.md +34 -34
  1162. package/skills/dispatching-parallel-agents/SKILL.md +219 -219
  1163. package/skills/executing-plans/AGENTS.md +34 -34
  1164. package/skills/executing-plans/SKILL.md +176 -176
  1165. package/skills/external-context/AGENTS.md +34 -34
  1166. package/skills/external-context/SKILL.md +111 -111
  1167. package/skills/finishing-a-development-branch/AGENTS.md +34 -34
  1168. package/skills/finishing-a-development-branch/SKILL.md +248 -248
  1169. package/skills/frontend-ui-ux/AGENTS.md +34 -34
  1170. package/skills/frontend-ui-ux/SKILL.md +50 -50
  1171. package/skills/git-master/AGENTS.md +34 -34
  1172. package/skills/git-master/SKILL.md +34 -34
  1173. package/skills/hud/AGENTS.md +34 -34
  1174. package/skills/hud/SKILL.md +294 -294
  1175. package/skills/learn-about-omc/AGENTS.md +34 -34
  1176. package/skills/learn-about-omc/SKILL.md +37 -37
  1177. package/skills/learner/AGENTS.md +34 -34
  1178. package/skills/learner/SKILL.md +227 -227
  1179. package/skills/mcp-setup/AGENTS.md +34 -34
  1180. package/skills/mcp-setup/SKILL.md +426 -426
  1181. package/skills/next-step-router/AGENTS.md +34 -34
  1182. package/skills/next-step-router/SKILL.md +204 -204
  1183. package/skills/nexus/AGENTS.md +40 -40
  1184. package/skills/nexus/SKILL.md +38 -38
  1185. package/skills/nexus/nexus-evolve/AGENTS.md +34 -34
  1186. package/skills/nexus/nexus-review/AGENTS.md +34 -34
  1187. package/skills/nexus/nexus-review/SKILL.md +39 -39
  1188. package/skills/nexus/nexus-status/AGENTS.md +34 -34
  1189. package/skills/note/AGENTS.md +34 -34
  1190. package/skills/note/SKILL.md +73 -73
  1191. package/skills/omc-doctor/AGENTS.md +34 -34
  1192. package/skills/omc-doctor/SKILL.md +351 -351
  1193. package/skills/omc-help/AGENTS.md +34 -34
  1194. package/skills/omc-help/SKILL.md +211 -211
  1195. package/skills/omc-setup/AGENTS.md +34 -34
  1196. package/skills/omc-setup/SKILL.md +1396 -1396
  1197. package/skills/pipeline/AGENTS.md +34 -34
  1198. package/skills/pipeline/SKILL.md +452 -452
  1199. package/skills/plan/AGENTS.md +34 -34
  1200. package/skills/plan/SKILL.md +274 -274
  1201. package/skills/project-session-manager/AGENTS.md +34 -34
  1202. package/skills/project-session-manager/SKILL.md +586 -586
  1203. package/skills/project-session-manager/lib/AGENTS.md +42 -42
  1204. package/skills/project-session-manager/lib/providers/AGENTS.md +36 -36
  1205. package/skills/project-session-manager/templates/AGENTS.md +33 -33
  1206. package/skills/project-session-manager/templates/feature.md +66 -66
  1207. package/skills/project-session-manager/templates/issue-fix.md +68 -68
  1208. package/skills/project-session-manager/templates/pr-review.md +75 -75
  1209. package/skills/psm/AGENTS.md +34 -34
  1210. package/skills/ralph/AGENTS.md +34 -34
  1211. package/skills/ralph/SKILL.md +223 -223
  1212. package/skills/ralph-init/AGENTS.md +34 -34
  1213. package/skills/ralph-init/SKILL.md +38 -38
  1214. package/skills/ralplan/AGENTS.md +34 -34
  1215. package/skills/receiving-code-review/AGENTS.md +34 -34
  1216. package/skills/receiving-code-review/SKILL.md +245 -245
  1217. package/skills/release/AGENTS.md +34 -34
  1218. package/skills/release/SKILL.md +396 -396
  1219. package/skills/requesting-code-review/AGENTS.md +34 -34
  1220. package/skills/requesting-code-review/SKILL.md +167 -167
  1221. package/skills/requesting-code-review/code-reviewer.md +194 -194
  1222. package/skills/review/AGENTS.md +34 -34
  1223. package/skills/sciomc/AGENTS.md +34 -34
  1224. package/skills/sciomc/SKILL.md +557 -557
  1225. package/skills/security-review/AGENTS.md +34 -34
  1226. package/skills/security-review/SKILL.md +338 -338
  1227. package/skills/skill/AGENTS.md +34 -34
  1228. package/skills/skill/SKILL.md +619 -619
  1229. package/skills/subagent-driven-development/AGENTS.md +34 -34
  1230. package/skills/subagent-driven-development/SKILL.md +334 -334
  1231. package/skills/swarm/AGENTS.md +34 -34
  1232. package/skills/systematic-debugging/AGENTS.md +34 -34
  1233. package/skills/systematic-debugging/CREATION-LOG.md +161 -161
  1234. package/skills/systematic-debugging/SKILL.md +386 -386
  1235. package/skills/systematic-debugging/condition-based-waiting.md +125 -125
  1236. package/skills/systematic-debugging/defense-in-depth.md +138 -138
  1237. package/skills/systematic-debugging/find-polluter.sh +0 -0
  1238. package/skills/systematic-debugging/root-cause-tracing.md +192 -192
  1239. package/skills/systematic-debugging/test-pressure-1.md +77 -77
  1240. package/skills/systematic-debugging/test-pressure-2.md +93 -93
  1241. package/skills/systematic-debugging/test-pressure-3.md +95 -95
  1242. package/skills/team/AGENTS.md +34 -34
  1243. package/skills/team/SKILL.md +898 -898
  1244. package/skills/test-driven-development/AGENTS.md +34 -34
  1245. package/skills/test-driven-development/SKILL.md +440 -440
  1246. package/skills/test-driven-development/testing-anti-patterns.md +325 -325
  1247. package/skills/trace/AGENTS.md +34 -34
  1248. package/skills/trace/SKILL.md +81 -81
  1249. package/skills/ultrapilot/AGENTS.md +34 -34
  1250. package/skills/ultrapilot/SKILL.md +553 -553
  1251. package/skills/ultraqa/AGENTS.md +34 -34
  1252. package/skills/ultraqa/SKILL.md +137 -137
  1253. package/skills/ultrawork/AGENTS.md +34 -34
  1254. package/skills/ultrawork/SKILL.md +154 -154
  1255. package/skills/using-git-worktrees/AGENTS.md +34 -34
  1256. package/skills/using-git-worktrees/SKILL.md +260 -260
  1257. package/skills/using-superpowers/AGENTS.md +34 -34
  1258. package/skills/using-superpowers/SKILL.md +119 -119
  1259. package/skills/using-superpowers/references/AGENTS.md +30 -30
  1260. package/skills/using-superpowers/references/codex-tools.md +25 -25
  1261. package/skills/verification-before-completion/AGENTS.md +34 -34
  1262. package/skills/verification-before-completion/SKILL.md +171 -171
  1263. package/skills/wizard/AGENTS.md +34 -34
  1264. package/skills/wizard/SKILL.md +171 -171
  1265. package/skills/writer-memory/AGENTS.md +34 -34
  1266. package/skills/writer-memory/SKILL.md +304 -304
  1267. package/skills/writer-memory/lib/AGENTS.md +34 -34
  1268. package/skills/writer-memory/templates/AGENTS.md +32 -32
  1269. package/skills/writing-plans/AGENTS.md +34 -34
  1270. package/skills/writing-plans/SKILL.md +189 -189
  1271. package/skills/writing-plans/plan-document-reviewer-prompt.md +52 -52
  1272. package/skills/writing-skills/AGENTS.md +34 -34
  1273. package/skills/writing-skills/SKILL.md +825 -825
  1274. package/skills/writing-skills/anthropic-best-practices.md +1057 -1057
  1275. package/skills/writing-skills/examples/AGENTS.md +30 -30
  1276. package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +211 -211
  1277. package/skills/writing-skills/graphviz-conventions.dot +171 -171
  1278. package/skills/writing-skills/persuasion-principles.md +252 -252
  1279. package/skills/writing-skills/render-graphs.js +0 -0
  1280. package/skills/writing-skills/testing-skills-with-subagents.md +441 -441
  1281. package/templates/AGENTS.md +32 -32
  1282. package/templates/axiom/AGENTS.md +35 -35
  1283. package/templates/axiom/dag-analysis.md +40 -40
  1284. package/templates/axiom/scripts/AGENTS.md +29 -29
  1285. package/templates/axiom/scripts/Check-Memory.ps1 +68 -68
  1286. package/templates/axiom/scripts/Poll-Memory.ps1 +36 -36
  1287. package/templates/axiom/scripts/README.md +25 -25
  1288. package/templates/axiom/scripts/Watch-Memory.ps1 +149 -149
  1289. package/templates/axiom/scripts/agent-runner.ps1 +101 -101
  1290. package/templates/axiom/scripts/start-reviews.ps1 +19 -19
  1291. package/templates/axiom/task-execution.md +56 -56
  1292. package/templates/hooks/AGENTS.md +42 -42
  1293. package/templates/hooks/lib/AGENTS.md +23 -23
  1294. package/templates/rules/AGENTS.md +39 -39
  1295. package/templates/rules/README.md +44 -44
  1296. package/templates/rules/axiom-gatekeepers.md +50 -50
  1297. package/templates/rules/axiom-provider-router.md +45 -45
  1298. package/templates/rules/axiom-router.md +57 -57
  1299. package/templates/rules/coding-style.md +89 -89
  1300. package/templates/rules/git-workflow.md +47 -47
  1301. package/templates/rules/performance.md +59 -59
  1302. package/templates/rules/security.md +53 -53
  1303. package/templates/rules/testing.md +54 -54
  1304. package/templates/tasks/README.md +56 -56
  1305. package/templates/tasks/bug-fix.md +61 -61
  1306. package/templates/tasks/code-review.md +59 -59
  1307. package/templates/tasks/feature-development.md +71 -71
  1308. package/templates/tasks/refactoring.md +61 -61
  1309. package/templates/tasks/security-audit.md +61 -61
@@ -1,583 +1,583 @@
1
- # Rough PRD: Axiom 记忆与进化系统 Token 使用效率优化
2
-
3
- > **状态**: ROUGH PRD v1.0(专家评审聚合版)
4
- > **来源**: Draft PRD v0.2 + 5 专家评审(UX Director / Product Director / Domain Expert / Tech Lead / Critic)
5
- > **聚合时间**: 2026-03-02
6
- > **仲裁结论**: 有条件通过(已修正全部 9 个阻断级问题,T3-v2 和 T4 调整范围)
7
-
8
- ---
9
-
10
- ## 1. 评审结论摘要
11
-
12
- ### 综合评分
13
-
14
- | 评审者 | 评分 | 关键结论 |
15
- | -------- | ------ | --------- |
16
- | Critic(安全/逻辑) | 5/10 | 4 个阻断级问题:字段名自相矛盾、守卫无效、正则注入、数据一致性 |
17
- | Tech Lead(技术可行性) | 6.5/10 | 4 个阻断级问题:格式不兼容、行数矛盾、content 字段未定义、30 秒未实测 |
18
- | Product Director(战略) | 8/10 | T3 双方案需拆分、T4 降为 P1、归档增长需监控 |
19
- | Domain Expert(领域逻辑) | 7.5/10 | 字段名不一致、T1 触发耦合过强、MiniSearch 规模过度设计 |
20
- | UX Director(用户体验) | 5.5/10 | 归档静默无反馈、降级无通知、超时状态未定义 |
21
-
22
- ### 阻断级问题(已在本 Rough PRD 中全部修正)
23
-
24
- | # | 来源 | 问题描述 | 修正方案 |
25
- | --- | ------ | --------- | --------- |
26
- | 1 | Critic D-C01 | T4 字段名:写 `auto_evolve: true`,读 `auto_evolve_done: true` | 统一为 `auto_evolve_done: true` |
27
- | 2 | Critic D-C02 | `stop_hook_active` 守卫在 SessionEnd hook 语境中无意义 | 删除该守卫,改为校验 `hook_event_name === 'SessionEnd'` |
28
- | 3 | Critic D-C04 | T4 中途崩溃导致 LQ 条目重复处理,知识库产生重复条目 | 增加 `processing` 中间状态,崩溃恢复时跳过 done/去重检查 processing |
29
- | 4 | Critic D-C05 | MiniSearch `--filter` 参数正则注入,降级路径无法捕获 RegExp 异常 | 引用 k-034 模式:正则转义 + 256 字符上限 |
30
- | 5 | Tech Lead D-01 | `learning_queue.md` 块格式与 `learning-queue.ts` 表格解析器完全不兼容 | 选择路径 A:重写解析器支持多行块格式(`### LQ-XXX:` 结构) |
31
- | 6 | Tech Lead D-02 | 保留 20 条反思(~800 行)与"优化后 ~400 行"目标自相矛盾 | 窗口降为 10 条(~350 行),与当前 681 行相比降幅 ~49% |
32
- | 7 | Tech Lead D-03 | MiniSearch `content` 字段来源未定义,knowledge_base.md 无实体内容 | content = `Title + " " + Category`(索引组合),明确标注检索价值有限 |
33
- | 8 | Domain Expert D-02 | T1 归档与 ax-evolve 强耦合,全 done 状态下归档永远不执行 | 新增独立触发入口 `--archive-queue`,解除强耦合 |
34
- | 9 | Product Director D-01 + D-03 | T3 v1/v2 在同一任务并存无选择机制;归档文件无增长监控 | T3-v1 和 T3-v2 拆为独立任务;归档文件 > 5000 行时输出 warning |
35
-
36
- ### 核心共识
37
-
38
- 所有专家一致认可的内容(直接沿用):
39
-
40
- * T3 v1(TypeScript 层 grep 过滤)可直接实现,无争议
41
-
42
- * T2(反思滚动窗口)风险最低,修正行数目标后可先实现
43
-
44
- * SessionEnd hook 选择正确,Stop hook 风险已正确识别
45
-
46
- * T1 归档机制方向正确(解决格式兼容后可实现)
47
-
48
- * T3 v2(MiniSearch)延期,当前 62 条规模不需要 BM25(触发条件:知识库 > 200 条)
49
-
50
- * T4 降为 P1-Should Have(Product Director HIGH,Tech Lead 建议 POC 验证后)
51
-
52
- ---
53
-
54
- ## 2. 背景与目标(沿用草稿,补充修正)
55
-
56
- ### 背景
57
-
58
- Axiom 进化引擎通过三个核心 Markdown 文件维持跨会话记忆:`learning_queue.md`(学习队列)、`reflection_log.md`(反思日志)、`knowledge_base.md`(知识图谱索引)。随着系统持续运行,这三个文件因"只增不减"设计持续膨胀:
59
-
60
- * `learning_queue.md`:327 行,LQ-001~LQ-030 全部 `done`,零 `pending`,仍全量载入
61
-
62
- * `reflection_log.md`:681 行 / 46KB,含大量历史遗留空条目噪音(当前约 18 条有效反思,平均每条约 35-40 行)
63
-
64
- * `knowledge_base.md`:177 行 / 8KB,62 条,每次 ax-evolve / ax-knowledge 全量读取
65
-
66
- ### 产品目标
67
-
68
- 通过自动归档、滚动窗口和按需读取机制,将 Axiom 进化系统的三个核心记忆文件的活跃内容体积控制在合理阈值内,在不损失知识完整性的前提下降低每会话 token 消耗。
69
-
70
- **补充(基于 Product Director D-04 建议)**:让 Axiom 系统在项目持续演进 6 个月后,仍能保持与第 1 天相同的响应质量和上下文利用效率。
71
-
72
- ---
73
-
74
- ## 3. 用户故事(修订版)
75
-
76
- | # | 角色 | 目标 | 收益 |
77
- | --- | ------ | ------ | ------ |
78
- | U1 | Axiom 系统(自动化) | 当 learning_queue.md 中 done 条目数 > 10 时,自动将超出条目归档;并支持手动触发归档 | 主文件始终只保留需要关注的 pending/in-progress 条目,token 消耗与待处理量成正比 |
79
- | U2 | Axiom 系统(自动化) | 清理 reflection_log.md 中的历史遗留空条目,并建立滚动窗口机制(10 条) | 反思日志保持可读性,旧噪音不再占据上下文 token |
80
- | U3 | 开发者(调用 ax-knowledge) | 按关键词或类别查询知识库,只获取相关条目;降级时得到明确提示 | 不再加载全部 62 条,响应更快;降级时知情 |
81
- | U4 | Axiom 系统(会话结束时) | 会话结束时自动触发小批量 ax-evolve 处理(P1,待 POC 验证后实现) | 避免队列积压导致的集中大量 token 消耗 |
82
-
83
- ---
84
-
85
- ## 4. 修订后的功能需求(MVP v1.0)
86
-
87
- ### T1: learning_queue.md done 条目自动归档(已修订)
88
-
89
- **优先级**: P0-Must Have
90
-
91
- **格式选择决定(Tech Lead D-01,路径 A)**:
92
- `learning_queue.md` 使用多行块格式(`### LQ-XXX:` + 字段行),`learning-queue.ts` 现有解析器期望表格格式。**选择路径 A:重写解析器以支持多行块格式**。原因:路径 B 会破坏文件可读性,且已积累的 30 条历史数据需要重新迁移,代价更高。
93
-
94
- **实现规格**:
95
- 1. 归档阈值:主文件中 `done` 状态条目数 `count > 10`(严格大于,done = 11 时触发,确保边界清晰;实现注释须标注 `count > 10`,验收测试使用 done = 11 作为边界用例)
96
- 2. 归档目标路径:`.omc/axiom/evolution/learning_queue_archive.md`(追加写入,带归档时间戳)
97
- 3. 归档动作:超出阈值的 `done` 条目从主文件移除,写入归档文件
98
- 4. 主文件只保留:文件头部(格式说明 + 优先级说明)、所有 `pending` 条目、所有 `in-progress` 条目、按**处理时间倒序**排列的最近 10 条 `done` 条目(缺失处理时间时使用添加时间作兜底)
99
- 5. 触发时机:
100
- - **自动触发**:ax-evolve 处理完一批条目后(状态变为 done 时)自动检查并执行
101
- - **手动触发(新增,解除强耦合)**:支持 `--archive-queue` 参数独立触发,无需 ax-evolve 执行;全 done 零 pending 状态下亦可通过手动触发执行归档
102
- 1. 归档前确保目录存在:`mkdirSync({ recursive: true })` 创建 `.omc/axiom/evolution/`
103
- 2. **原子写入**(Tech Lead D-06):
104
- - 归档文件使用追加写(append)
105
- - 主文件更新使用 write-to-tmp-then-rename 模式(`fs.renameSync` 在同文件系统下原子)
106
- - 崩溃安全:若归档写入成功但主文件更新失败,通过条目 ID 去重检测(扫描归档文件的 `### LQ-XXX:` 标题)防止重复归档
107
- 1. **并发锁(Critic D-C07)**:归档操作入口使用进程级文件锁 `.omc/axiom/evolution/.archive.lock`,检测到 lock 文件则跳过(lock 文件含写入时间戳,超 30 秒自动视为陈旧锁)
108
- 2. **归档文件增长监控(Product Director D-03)**:归档操作完成后检查归档文件行数,超过 5000 行时输出一行 warning:`[警告] learning_queue_archive.md 已超过 5000 行,建议人工检视`
109
- 3. **用户反馈输出(UX Director D-01)**:每次归档触发时在命令行输出摘要:`[归档] learning_queue: 已移动 N 条 done 条目至 learning_queue_archive.md`
110
-
111
- **不包含**:`--dry-run` 参数(延期至 v1.1);跨归档文件联合查询(延期至 v2)
112
-
113
- ---
114
-
115
- ### T2: reflection_log.md 历史噪音清理 + 滚动窗口(已修订)
116
-
117
- **优先级**: P0-Must Have(建议最先实现)
118
-
119
- **行数目标修正(Tech Lead D-02)**:
120
-
121
- * 草稿声称保留 20 条、主文件 ~400 行——矛盾(20 条 × 38 行均值 = ~760 行,反而比当前 681 行更大)
122
-
123
- * **修正为保留 10 条**:10 条 × 38 行均值 = ~380 行,相比当前 681 行降幅约 44%,与目标区间一致
124
-
125
- * 业务依据(补充,Product Director D-06):10 条约覆盖最近 1-2 个迭代周期的反思记录,是 LLM Agent 上下文有效利用的合理窗口
126
-
127
- **实现规格**:
128
- 1. **空条目判断精确规则(Domain Expert D-06)**:一个由 `## 反思` 开始的块,若以下三个核心小节(`### ✅ 做得好的` / `### ⚠️ 待改进` / `### 💡 学到了什么`)均无有效文字内容(内容为空行、`-` 占位符、HTML 注释),则判定为空条目
129
- 2. **一次性清理(人工触发单次操作)**:清理前备份整个文件至 `reflection_log_backup_YYYYMMDD.md`,输出将清理的空条目数量供人工确认
130
- 3. 滚动窗口:主文件保留最近 **10 条**完整反思记录(按 `## 反思 - 日期` 标题排序倒序)
131
- 4. 历史归档路径:`.omc/axiom/evolution/reflection_log_archive.md`(追加写入)
132
- 5. 触发时机:ax-reflect 写入新反思条目时,写入后检查条目数 `count > 10`,超出时将最旧的条目移至归档
133
- 6. **块边界处理**:`## 反思 - ...` 块的末尾以 `---` 分隔符结束;块切割时 `---` 分隔符归属当前块,保持归档文件格式一致性
134
- 7. **原子写入**:与 T1 相同,使用 write-to-tmp-then-rename 模式
135
- 8. **并发锁**:归档操作使用与 T1 共享的 `.archive.lock` 文件
136
- 9. **归档文件增长监控**:归档文件超过 5000 行时输出 warning
137
- 10. **用户反馈输出**:每次归档触发时输出:`[归档] reflection_log: 已移动 N 条反思至 reflection_log_archive.md`
138
-
139
- **验收数字修正**:
140
-
141
- * 优化后主文件上限:~380 行(10 条 × 38 行均值)
142
-
143
- * 预期 token 降幅(典型场景):~44%(相比当前 681 行)
144
-
145
- ---
146
-
147
- ### T3-v1: ax-knowledge 关键词过滤(基础方案,TypeScript 层实现)
148
-
149
- **优先级**: P0-Must Have(与 T2 同期实现)
150
-
151
- **实现层明确(Tech Lead D-08)**:
152
- 直接在 **TypeScript 层**实现关键词过滤(字符串 `includes` / `indexOf`),不依赖 LLM 执行 grep;SKILL.md 层只声明参数语法。
153
-
154
- **实现规格**:
155
- 1. 支持关键词过滤:`ax-knowledge --filter <keyword>`,只返回 Title 或 Category 包含关键词的条目(字段精确包含,大小写不敏感)
156
- 2. 支持分类过滤:`ax-knowledge --category <category>`,按 Category 列精确过滤
157
- 3. 无参数时默认行为:返回全量索引(向后兼容)
158
- 4. **查询结果统计(UX Director D-08)**:过滤结果末尾附加 `显示 X/Y 条,使用无参数调用查看全部`
159
- 5. **参数校验**:`--filter` 参数长度上限 256 字符(防止超长输入)
160
-
161
- **验收标准**:
162
-
163
- * `ax-knowledge --filter typescript` 只返回 Title 或 Category 包含 "typescript" 的条目(字段精确包含,大小写不敏感)
164
-
165
- * `ax-knowledge --category architecture` 只返回 Category = "architecture" 的条目
166
-
167
- * `ax-knowledge`(无参数)返回全量 62 条,与优化前一致
168
-
169
- * 查询结果末尾显示 `显示 X/Y 条` 统计
170
-
171
- ---
172
-
173
- ### T3-v2: ax-knowledge MiniSearch 全文搜索(延期至 v1.1,触发条件:知识库 > 200 条)
174
-
175
- **优先级**: P1-Should Have(延期,**不纳入当前 MVP**)
176
-
177
- **延期依据**:
178
-
179
- * 当前知识库 62 条,Domain Expert、Product Director 均认为不需要 BM25,TypeScript Array.filter 在此规模下无感知差异
180
-
181
- * Tech Lead 评估 T3-v2 工程难度 8/10、预估 3-5 天,成本/收益比偏低
182
-
183
- * **触发条件**:知识库条目数 > 200 时重新评估
184
-
185
- **当 v1.1 实现 T3-v2 时必须满足的约束(预留)**:
186
-
187
- 1. **正则转义(Critic D-C05,引用 k-034 模式,不可省略)**:在 TypeScript 层对 `--filter` / `--search` 参数做正则特殊字符转义:
188
- ```typescript
189
- keyword.replace(/[.*+?^${}() | [\]\\]/g, '\\$&')
190
- ```
191
- 并设置 256 字符长度上限
192
-
193
- 1. **content 字段策略(Tech Lead D-03)**:
194
- - `content` = `Title + " " + Category`(索引字段组合)
195
- - 明确标注:当前阶段 content 为元信息组合,全文检索价值有限;实体内容填充留至 v3
196
-
197
- 1. **MiniSearch 降级通知(UX Director D-03)**:降级时输出警告:`[警告] MiniSearch 不可用,已切换至 grep 模式,结果精度可能降低`
198
-
199
- 1. **YAML 部分解析失败处理(Critic D-C09)**:宽松模式,跳过错误条目 + 记录警告日志;超过 10% 条目解析失败时触发全局降级
200
-
201
- 1. **v1/v2 验收标准分离(Critic D-C06)**:
202
- - v1(字段精确包含):`--filter typescript` 只返回 Title 或 Category 含 "typescript" 的条目
203
- - v2(全文模糊匹配):`--filter typescript` 返回 title/tags/content 中含 "typescript" 的条目(含模糊匹配)
204
- - 降级时允许结果集缩小(v2 降级至 v1 为 subset 行为,用户文档需声明)
205
-
206
- 1. **知识库迁移(Confidence vs Priority 映射)**:Confidence 保留为独立字段,priority 需人工或脚本补充;迁移前备份原文件
207
-
208
- 1. **MiniSearch 索引不持久化**:每次冷启动重建(62 条 < 5ms,500 条 < 50ms,持久化成本/收益不合理)
209
-
210
- ---
211
-
212
- ### T4: ax-evolve SessionEnd 自动小批量触发(降为 P1-Should Have,需 POC 验证)
213
-
214
- **优先级**: P1-Should Have(**不纳入当前 MVP**,移至 v1.1 POC 验证后决定)
215
-
216
- **降级依据**:
217
-
218
- * Product Director D-02(HIGH):T4 工程复杂度与 MVP 必要性不匹配,T1 实现后积压问题已大幅缓解
219
-
220
- * Tech Lead D-04(HIGH):30 秒时间预算基于估算,现有 session-end 链路 7+ 个异步操作,实测数据缺失
221
-
222
- **当 v1.1 实现 T4 时必须满足的约束(预留)**:
223
-
224
- 1. **触发点**:仅使用 `SessionEnd` hook(不使用 Stop hook)
225
- - SessionEnd hook 脚本入口校验 `hook_event_name === 'SessionEnd'`(不是检查 `stop_hook_active` 环境变量)
226
- - **删除 `stop_hook_active` 守卫描述(Critic D-C02)**:SessionEnd hook 天然不会收到该字段,守卫在此语境无意义
227
-
228
- 1. **统一字段名(Critic D-C01,阻断级)**:
229
- - 跳过条件检查字段:`auto_evolve_done: true`
230
- - 完成后写入字段:`auto_evolve_done: true`
231
- - **两处必须使用同一字段名**,否则跳过逻辑永久失效
232
-
233
- 1. **processing 中间状态(Critic D-C04,阻断级)**:
234
- 对每条 LQ 条目的处理顺序必须为:
235
- ```
236
- Step 1: 将 LQ 状态设为 processing(先写 learning_queue.md)
237
- Step 2: 写入 knowledge_base.md(知识条目)
238
- Step 3: 将 LQ 状态设为 done(更新 learning_queue.md)
239
- ```
240
- 崩溃恢复:下次触发时跳过 `done` 条目;对 `processing` 状态条目先做知识库去重检查(通过 LQ-ID 比对),再决定是重新处理还是跳过
241
-
242
- 1. **文件锁互斥(Critic D-C03)**:SessionEnd ax-evolve 逻辑入口写 `.omc/axiom/evolution/.evolve.lock` 文件,完成后删除;检测到 lock 文件则跳过(TOCTOU 竞争条件防护)
243
-
244
- 1. **超时后条目状态(UX Director D-04)**:30 秒超时后,将 `processing` 状态的条目**回滚至 pending**(不保留半处理状态),下次会话重新处理;已完成的条目保持 `done`
245
-
246
- 1. **用户通知(UX Director 1.3)**:会话结束时输出轻量通知:`[Axiom] 会话结束,后台处理了 N 条学习队列条目`;skip 时输出调试日志:`[Axiom/SessionEnd] 跳过自动处理:本会话已执行手动 ax-evolve`
247
-
248
- 1. **POC 要求(Tech Lead D-04)**:实现前必须在真实环境中计时 3 条 LQ 条目端到端处理耗时,验证 30 秒预算充裕性
249
-
250
- 1. 批量限制:每次自动触发最多处理 **3 条** pending 条目("最多"语义,允许少于 3 条)
251
- 2. 触发条件:learning_queue.md 中存在至少 1 条 `pending` 条目时才触发
252
- 3. 超时控制:在 ax-evolve 逻辑外单独套 30 秒 `Promise.race`(Tech Lead D-07),与现有超时机制隔离
253
-
254
- ---
255
-
256
- ## 5. 非功能需求(修订版)
257
-
258
- ### 5.1 Token 效率指标(修订后的量化目标)
259
-
260
- | 文件 | 当前行数 | 优化后主文件上限 | 典型场景 token 降幅 |
261
- | ------ | --------- | ----------------- | ------------------- |
262
- | learning_queue.md | ~327 行 | ~120 行(头部20行 + 最多10条done×10行 + pending区) | ~63%(有 pending 时的典型场景) |
263
- | reflection_log.md | ~681 行 | ~380 行(最近10条完整反思) | ~44%(滚动窗口) |
264
- | knowledge_base.md(T3-v1) | ~177 行 | 按需:平均返回 ~10 条 | ~85%(有效过滤场景;全量调用场景为 0%) |
265
-
266
- **注意(Domain Expert D-03)**:以上为"典型场景"降幅估算。全量调用 `ax-knowledge`(无参数)或 pending 为 0 时,knowledge_base 降幅为 0%。三文件综合降幅取决于实际使用模式,不适合以单一百分比呈现。
267
-
268
- ### 5.2 安全性要求(新增)
269
-
270
- * **正则注入防护**:T3-v1 `--filter` 参数长度上限 256 字符;T3-v2 实现时必须引用 k-034 模式进行正则特殊字符转义(`str.replace(/[.*+?^${}() | [\]\\]/g, '\\$&')`)
271
-
272
- * **路径安全**:归档路径硬编码,不允许从文件内容动态构建路径;代码注释须标注"归档路径不可来自文件内容"
273
-
274
- * **并发安全**:T1/T2 归档操作及 T4 触发均使用文件锁防止并发写入
275
-
276
- * **目录初始化**:归档文件写入前必须调用 `mkdirSync({ recursive: true })` 确保目录存在
277
-
278
- ### 5.3 可靠性要求(修订版)
279
-
280
- * 归档操作使用 write-to-tmp-then-rename 原子模式,防止主文件在操作中途损坏
281
-
282
- * 归档文件使用追加写(append),崩溃时通过 ID 去重防止重复写入
283
-
284
- * T4(当 v1.1 实现时)的 processing 中间状态确保 LQ 条目不重复处理
285
-
286
- * 自动 ax-evolve 触发失败时,不阻断会话结束流程
287
-
288
- * 归档文件 > 5000 行时输出 warning(非阻断)
289
-
290
- * 滚动窗口阈值通过配置项控制,不硬编码(T1 阈值 10 条 done,T2 窗口 10 条反思,均在 SKILL.md 中声明默认值)
291
-
292
- ### 5.4 向后兼容性要求(沿用)
293
-
294
- * 现有 ax-evolve、ax-knowledge、ax-reflect skill 调用语法不变
295
-
296
- * ax-knowledge 无参数时行为与优化前完全一致
297
-
298
- * 归档操作幂等(单进程语义,并发场景通过文件锁保障)
299
-
300
- * 不修改已处理的 done 条目内容(仅移动位置)
301
-
302
- ---
303
-
304
- ## 6. 业务流程(修订版)
305
-
306
- ### 6.1 整体优化流程(修订后主视图)
307
-
308
- ```mermaid
309
- graph TD
310
- A[会话开始] --> B{读取记忆文件}
311
- B --> B1[learning_queue.md\n仅加载 pending/in-progress\n+ 按处理时间倒序最近10条 done]
312
- B --> B2[reflection_log.md\n仅加载最近10条反思]
313
- B --> B3[knowledge_base.md\n按需按关键词/分类过滤\n无参数时全量返回]
314
-
315
- C[开发工作进行中] --> D[ax-reflect 写入新反思]
316
- D --> D1{反思条目数 count > 10?}
317
- D1 --> | 是 | D2[最旧条目移至\nreflection_log_archive.md\n输出归档摘要]
318
- D1 --> | 否 | D3[直接写入主文件]
319
-
320
- E[ax-evolve 执行] --> F[处理 pending 条目\n状态变为 done]
321
- F --> G{done 条目数 count > 10?}
322
- G --> | 是 | H[超出 done 条目\n归档至 learning_queue_archive.md\n检查归档文件行数监控\n输出归档摘要]
323
- G --> | 否 | I[保留在主文件]
324
-
325
- J{SessionEnd hook 触发\nPOC 验证后实现} --> K{learning_queue\n有 pending 条目?}
326
- K --> | 是 | L{本会话已设置\nauto_evolve_done: true?}
327
- L --> | 否 | M[获取 .evolve.lock\n自动触发 ax-evolve\n最多3条 processing状态中间保护]
328
- L --> | 是 | N[跳过 输出调试日志]
329
- K --> | 否 | N
330
- ```
331
-
332
- ### 6.2 T1 学习队列归档流程(修订版)
333
-
334
- ```mermaid
335
- sequenceDiagram
336
- participant AE as ax-evolve / 手动触发
337
- participant LK as .archive.lock
338
- participant LQ as learning_queue.md
339
- participant AR as learning_queue_archive.md
340
-
341
- AE->>LK: 尝试获取文件锁
342
- alt 锁已存在(并发保护)
343
- AE->>AE: 跳过归档
344
- else 获取锁成功
345
- AE->>LQ: 处理 pending 条目或检查 done 数量
346
- AE->>LQ: 统计 done 条目数量(count > 10?)
347
- alt done 数量 count > 10
348
- AE->>AR: 追加超出条目(带归档时间戳,去重检查)
349
- AE->>LQ: write-to-tmp-then-rename 更新主文件
350
- AE->>AE: 检查 AR 行数(> 5000 则输出 warning)
351
- AE->>AE: 输出归档摘要
352
- end
353
- AE->>LK: 释放文件锁
354
- end
355
- ```
356
-
357
- ### 6.3 T3-v1 知识库按需读取流程
358
-
359
- ```mermaid
360
- graph LR
361
- A[ax-knowledge 调用] --> B{携带参数?}
362
- B --> | --filter keyword | C[TypeScript层字符串匹配\nTitle/Category includes\n大小写不敏感\n长度校验≤256字符]
363
- B --> | --category cat | D[TypeScript层精确匹配\nCategory字段]
364
- B --> | 无参数 | E[全量读取\n向后兼容]
365
- C --> F[返回匹配条目\n末尾附加 显示X/Y条]
366
- D --> F
367
- E --> G[返回全部条目]
368
- ```
369
-
370
- ---
371
-
372
- ## 7. 验收标准(修订版)
373
-
374
- ### T1 验收标准
375
-
376
- * [ ] 解析器重写:能正确解析 `### LQ-XXX:` 多行块格式,返回包含状态、优先级、添加时间等字段的对象数组
377
-
378
- * [ ] `learning_queue.md` 主文件 done 条目数 `<= 10`(触发阈值为 count > 10,验收边界测试:done = 11 触发,done = 10 不触发)
379
-
380
- * [ ] `learning_queue_archive.md` 存在且包含所有历史 done 条目(ID 无重复,无内容丢失)
381
-
382
- * [ ] 归档操作有输出摘要:`[归档] learning_queue: 已移动 N 条 done 条目至 learning_queue_archive.md`
383
-
384
- * [ ] 归档后条目仍按处理时间倒序排列(缺失处理时间时使用添加时间兜底)
385
-
386
- * [ ] 手动触发 `--archive-queue` 在全 done / 零 pending 状态下正确执行归档
387
-
388
- * [ ] 并发保护:两个进程并发执行时,第二个进程检测到 .archive.lock 直接跳过
389
-
390
- * [ ] 归档文件超 5000 行时输出 warning
391
-
392
- ### T2 验收标准
393
-
394
- * [ ] 空条目清理:执行一次性清理后,基于三核心小节均无有效内容的判断标准,无误清理有效反思(特别是格式异常的 2026-02-11 Codex Workflow 条目)
395
-
396
- * [ ] 新写入反思后,主文件反思条目数恒保持 `<= 10`(以写入第 11 条后触发验证)
397
-
398
- * [ ] `reflection_log_archive.md` 包含被滚出窗口的历史反思(无内容丢失)
399
-
400
- * [ ] 主文件行数目标:`<= 400 行`(基于 10 条窗口的合理上限)
401
-
402
- * [ ] ax-reflect 正常写入新反思,调用语法与优化前一致
403
-
404
- * [ ] 归档有输出摘要:`[归档] reflection_log: 已移动 N 条反思至 reflection_log_archive.md`
405
-
406
- ### T3-v1 验收标准
407
-
408
- * [ ] `ax-knowledge --filter typescript` 只返回 Title 或 Category 包含 "typescript" 的条目(大小写不敏感,字段精确包含)
409
-
410
- * [ ] `ax-knowledge --category architecture` 只返回 Category 字段精确匹配 "architecture" 的条目
411
-
412
- * [ ] `ax-knowledge`(无参数)返回全量 62 条,与优化前一致
413
-
414
- * [ ] 查询结果末尾显示 `显示 X/Y 条,使用无参数调用查看全部` 统计
415
-
416
- * [ ] `--filter` 参数超过 256 字符时返回错误提示而非崩溃
417
-
418
- * [ ] 过滤逻辑在 TypeScript 层实现,不依赖 LLM 执行(可通过单元测试验证确定性)
419
-
420
- ### T4 验收标准(v1.1 实现时,在此预留)
421
-
422
- * [ ] POC 验证:3 条 LQ 条目端到端处理实测耗时 < 25 秒(留 5 秒余量)
423
-
424
- * [ ] 触发的是 SessionEnd hook(hook_event_name === 'SessionEnd' 校验通过)
425
-
426
- * [ ] 若有 pending 条目且本会话未设置 `auto_evolve_done: true`,自动执行 ax-evolve(最多 3 条)
427
-
428
- * [ ] LQ 条目处理遵循 pending → processing → done 三段状态机;中途崩溃后重启时 processing 状态条目触发去重检查
429
-
430
- * [ ] 30 秒超时后,processing 状态条目回滚至 pending,下次会话可重新处理
431
-
432
- * [ ] 两个会话并发时,第二个会话检测到 .evolve.lock 直接跳过
433
-
434
- * [ ] 已设置 `auto_evolve_done: true` 的会话,结束时不重复触发(同一字段名读写,Critic D-C01 修正验证)
435
-
436
- * [ ] 完成后在 active_context.md 写入 `auto_evolve_done: true`
437
-
438
- * [ ] 会话结束时输出通知:`[Axiom] 会话结束,后台处理了 N 条学习队列条目`
439
-
440
- * [ ] Skip 时输出:`[Axiom/SessionEnd] 跳过自动处理:本会话已执行手动 ax-evolve`
441
-
442
- * [ ] 无 pending 条目时,会话结束不触发自动 ax-evolve
443
-
444
- ---
445
-
446
- ## 8. 实现顺序建议
447
-
448
- 基于 Tech Lead 建议并综合所有专家意见:
449
-
450
- ```
451
- T2(反思滚动窗口)
452
- - 风险最低,主要是正则解析工作
453
- - 但行数估算已修正为 10 条窗口
454
- - 预估工时:1-2 天
455
-
456
-
457
-
458
- T3-v1(TypeScript 层关键词过滤)
459
- - 低风险,立即降低 knowledge_base token 消耗
460
- - 预估工时:1 天
461
-
462
-
463
-
464
- T1(learning_queue 归档)
465
- - 需先完成解析器重写(路径 A)
466
- - 预估工时:2-3 天(含格式决策实现)
467
-
468
-
469
-
470
- T4(SessionEnd 自动触发)[v1.1,需 POC 验证]
471
- - 先做 POC 验证 30 秒预算
472
- - 预估工时:1-2 天(POC 通过后)
473
-
474
-
475
-
476
- T3-v2(MiniSearch 全文搜索)[v1.1,触发条件:知识库 > 200 条]
477
- - 最高工程复杂度
478
- - 预估工时:3-5 天(含迁移脚本)
479
- ```
480
-
481
- **MVP v1.0 交付范围**:T2 + T3-v1 + T1(按上述顺序)
482
- **合计预估工时(MVP v1.0)**:4-6 个工作天
483
-
484
- ---
485
-
486
- ## 9. 解决的差异点清单
487
-
488
- | 差异点ID | 来源专家 | 原始问题 | 仲裁层级 | 仲裁决定 | 修订内容摘要 |
489
- | --------- | --------- | --------- | --------- | --------- | ------------ |
490
- | D-C01 | Critic | T4 字段名:write `auto_evolve: true`,read `auto_evolve_done: true` | 1-安全/逻辑 | 采纳 | 统一为 `auto_evolve_done: true`,T4 约束中明确两处字段名一致 |
491
- | D-C02 | Critic | `stop_hook_active` 守卫在 SessionEnd hook 中无意义,且描述与实现不符 | 1-安全/逻辑 | 采纳 | 删除守卫描述,改为校验 `hook_event_name === 'SessionEnd'` |
492
- | D-C03 | Critic | TOCTOU 竞争:多窗口并发导致同一 LQ 条目被处理两次 | 1-安全/逻辑 | 采纳 | T4 约束中增加 `.evolve.lock` 文件锁互斥机制 |
493
- | D-C04 | Critic | T4 中途崩溃后 LQ 条目重复处理导致知识库重复条目 | 1-安全/逻辑 | 采纳 | T4 约束中增加 `processing` 中间状态,崩溃恢复时去重检查 |
494
- | D-C05 | Critic | MiniSearch `--filter` 正则注入,现有降级路径无法捕获 RegExp 异常 | 1-安全/逻辑 | 采纳 | T3-v2 约束中强制引用 k-034 模式;T3-v1 增加 256 字符上限 |
495
- | D-C06 | Critic | T3 v1/v2 `--filter` 语义不同,验收标准混用两套语义 | 1-安全/逻辑 | 采纳 | T3-v1 和 T3-v2 分拆为独立任务,各有独立验收标准 |
496
- | D-C07 | Critic | T1/T2 归档操作无并发保护,多进程重复归档 | 1-安全/逻辑 | 采纳 | 归档操作使用 `.archive.lock` 文件锁 |
497
- | D-C08 | Critic | `.omc/axiom/evolution/` 目录首次安装可能不存在 | 1-安全/逻辑 | 采纳 | T1/T2 归档前调用 `mkdirSync({ recursive: true })` |
498
- | D-01(Tech) | Tech Lead | `learning_queue.md` 多行块格式与现有解析器表格格式完全不兼容 | 2-技术可行性 | 选择路径 A | 重写解析器支持多行块格式,不迁移文件格式 |
499
- | D-02(Tech) | Tech Lead | 保留 20 条反思(~800 行)与"~400 行"目标矛盾 | 2-技术可行性 | 采纳修正 | 窗口降为 10 条(~380 行),修正降幅目标 |
500
- | D-03(Tech) | Tech Lead | T3-v2 MiniSearch `content` 字段来源未定义 | 2-技术可行性 | 采纳 | content = `Title + " " + Category`,标注检索价值有限 |
501
- | D-04(Tech) | Tech Lead | T4 30 秒预算无实测数据 | 2-技术可行性 | 采纳 | T4 降为 P1,v1.1 实现前必须做 POC 验证 |
502
- | D-01(Product) | Product Director | T3 v1/v2 双方案并存无选择机制 | 3-战略对齐 | 采纳 | T3-v1 和 T3-v2 拆为独立任务,v2 延期至知识库 > 200 条 |
503
- | D-02(Product) | Product Director | T4 进 MVP 必要性与工程复杂度不匹配 | 3-战略对齐 | 采纳 | T4 降为 P1-Should Have,移至 v1.1 |
504
- | D-03(Product) | Product Director | 归档文件无增长策略 | 3-战略对齐 | 采纳(轻量版) | 归档文件 > 5000 行时输出 warning,不自动清理 |
505
- | D-01(Domain) | Domain Expert | T4 字段名不一致(与 D-C01 同一问题) | 已由 Critic 覆盖 | Critic 优先 | 统一为 `auto_evolve_done: true` |
506
- | D-02(Domain) | Domain Expert | T1 归档与 ax-evolve 强耦合,全 done 状态下永远不执行 | 4-业务逻辑 | 采纳 | 新增 `--archive-queue` 手动触发入口 |
507
- | D-01(UX) | UX Director | 归档操作静默无任何用户输出 | 5-用户体验 | 采纳(轻量版) | 每次归档输出一行摘要 |
508
- | D-02(UX) | UX Director | 归档操作原子性(与 Tech D-06 同一问题) | 已由 Tech 覆盖 | Tech 优先 | write-to-tmp-then-rename |
509
- | D-03(UX) | UX Director | MiniSearch 降级时不通知用户 | 5-用户体验 | 采纳 | T3-v2 约束中增加降级通知输出 |
510
- | D-04(UX) | UX Director | T4 超时后条目状态未定义 | 5-用户体验 | 采纳 | T4 约束中明确:超时后 processing 回滚至 pending |
511
-
512
- ---
513
-
514
- ## 10. 延期至 v1.1 的内容
515
-
516
- | 内容 | 延期原因 | 触发条件 |
517
- | ------ | --------- | --------- |
518
- | T3-v2(MiniSearch 全文搜索) | 62 条规模过度设计;工程成本高(3-5天);v1 grep 过滤已足够 | 知识库条目 > 200 条 |
519
- | T4(SessionEnd 自动触发) | 工程复杂度与 MVP 必要性不匹配;30 秒预算未实测 | POC 验证通过(实测 < 25 秒) |
520
- | --dry-run 模式 | MVP 阶段非必需,可接受一次性清理需人工确认 | v1.1 用户反馈后评估 |
521
- | 跨主文件+归档的联合查询(--include-archive) | 复杂度超出 MVP 范围 | v2 |
522
- | 文件头部状态元数据注释 | 轻量但非阻断需求 | v1.1 用户反馈后评估 |
523
-
524
- ## 11. 延期至 v2 的内容(沿用草稿)
525
-
526
- * `workflow_metrics.md` 的类似优化(用户已明确排除)
527
-
528
- * Python nexus daemon 的 token 追踪
529
-
530
- * `knowledge_base.md` 内容重构(语义去重、质量评分等)
531
-
532
- * 跨会话 token 预算追踪与报警
533
-
534
- * 知识库条目的向量化检索(语义搜索)
535
-
536
- * 归档文件的自动压缩或清理策略(归档 > 5000 行时 warning 已在 MVP 中占位)
537
-
538
- * 知识类型区分(evergreen vs temporal 的时间衰减差异化)
539
-
540
- ---
541
-
542
- ## 12. 风险与约束(修订版)
543
-
544
- | 风险 | 严重程度 | 缓解措施(已在需求中体现) |
545
- | ------ | --------- | --------- |
546
- | 解析器重写(路径A)的边界情况 | 高 | 必须覆盖:多行内容字段、缺失字段、特殊字符;单元测试覆盖边界 |
547
- | T2 一次性清理误删有效反思 | 高 | 精确空条目判断规则;清理前备份;人工确认 |
548
- | 并发归档写入 | 中 | 文件锁(.archive.lock);已在 T1/T2 需求中强制要求 |
549
- | T4 30 秒超时(v1.1) | 中 | POC 必须实测;超时后状态回滚 |
550
- | 归档文件无限增长 | 中 | > 5000 行 warning 占位;自动清理推至 v2 |
551
- | MiniSearch YAML 迁移(v1.1 T3-v2) | 中 | 迁移前备份;宽松解析模式;Confidence 字段保留 |
552
-
553
- ### 实现约束
554
-
555
- * 所有操作在 TypeScript 层实现(hooks / skills),符合项目技术栈
556
-
557
- * CI 门禁必须通过:`tsc --noEmit && npm run build && npm test`
558
-
559
- * T1/T2 解析逻辑必须有单元测试(含边界情况)
560
-
561
- * T3-v1 过滤逻辑必须有单元测试(确定性验证)
562
-
563
- * T3-v2(v1.1)降级路径必须有单元测试
564
-
565
- * 不引入新运行时依赖(T3-v2 引入 minisearch 延至 v1.1)
566
-
567
- * 归档文件路径固定为 `.omc/axiom/evolution/` 目录下
568
-
569
- ---
570
-
571
- ## 13. 下一步
572
-
573
- 专家评审已完成。这是最终的粗设 PRD:`C:/Users/ljyih/Desktop/ultrapower/docs/prd/memory-evolution-optimize-rough.md`
574
-
575
- **是否进入任务拆解阶段?**
576
-
577
- 若确认,下一步调用 `ax-decompose`,将 MVP v1.0(T2 + T3-v1 + T1)拆解为可执行子任务:
578
-
579
- * T2 的一次性清理实现 + 滚动窗口实现
580
-
581
- * T3-v1 的 TypeScript 关键词过滤实现
582
-
583
- * T1 的解析器重写(路径 A)+ 归档逻辑实现
1
+ # Rough PRD: Axiom 记忆与进化系统 Token 使用效率优化
2
+
3
+ > **状态**: ROUGH PRD v1.0(专家评审聚合版)
4
+ > **来源**: Draft PRD v0.2 + 5 专家评审(UX Director / Product Director / Domain Expert / Tech Lead / Critic)
5
+ > **聚合时间**: 2026-03-02
6
+ > **仲裁结论**: 有条件通过(已修正全部 9 个阻断级问题,T3-v2 和 T4 调整范围)
7
+
8
+ ---
9
+
10
+ ## 1. 评审结论摘要
11
+
12
+ ### 综合评分
13
+
14
+ | 评审者 | 评分 | 关键结论 |
15
+ | -------- | ------ | --------- |
16
+ | Critic(安全/逻辑) | 5/10 | 4 个阻断级问题:字段名自相矛盾、守卫无效、正则注入、数据一致性 |
17
+ | Tech Lead(技术可行性) | 6.5/10 | 4 个阻断级问题:格式不兼容、行数矛盾、content 字段未定义、30 秒未实测 |
18
+ | Product Director(战略) | 8/10 | T3 双方案需拆分、T4 降为 P1、归档增长需监控 |
19
+ | Domain Expert(领域逻辑) | 7.5/10 | 字段名不一致、T1 触发耦合过强、MiniSearch 规模过度设计 |
20
+ | UX Director(用户体验) | 5.5/10 | 归档静默无反馈、降级无通知、超时状态未定义 |
21
+
22
+ ### 阻断级问题(已在本 Rough PRD 中全部修正)
23
+
24
+ | # | 来源 | 问题描述 | 修正方案 |
25
+ | --- | ------ | --------- | --------- |
26
+ | 1 | Critic D-C01 | T4 字段名:写 `auto_evolve: true`,读 `auto_evolve_done: true` | 统一为 `auto_evolve_done: true` |
27
+ | 2 | Critic D-C02 | `stop_hook_active` 守卫在 SessionEnd hook 语境中无意义 | 删除该守卫,改为校验 `hook_event_name === 'SessionEnd'` |
28
+ | 3 | Critic D-C04 | T4 中途崩溃导致 LQ 条目重复处理,知识库产生重复条目 | 增加 `processing` 中间状态,崩溃恢复时跳过 done/去重检查 processing |
29
+ | 4 | Critic D-C05 | MiniSearch `--filter` 参数正则注入,降级路径无法捕获 RegExp 异常 | 引用 k-034 模式:正则转义 + 256 字符上限 |
30
+ | 5 | Tech Lead D-01 | `learning_queue.md` 块格式与 `learning-queue.ts` 表格解析器完全不兼容 | 选择路径 A:重写解析器支持多行块格式(`### LQ-XXX:` 结构) |
31
+ | 6 | Tech Lead D-02 | 保留 20 条反思(~800 行)与"优化后 ~400 行"目标自相矛盾 | 窗口降为 10 条(~350 行),与当前 681 行相比降幅 ~49% |
32
+ | 7 | Tech Lead D-03 | MiniSearch `content` 字段来源未定义,knowledge_base.md 无实体内容 | content = `Title + " " + Category`(索引组合),明确标注检索价值有限 |
33
+ | 8 | Domain Expert D-02 | T1 归档与 ax-evolve 强耦合,全 done 状态下归档永远不执行 | 新增独立触发入口 `--archive-queue`,解除强耦合 |
34
+ | 9 | Product Director D-01 + D-03 | T3 v1/v2 在同一任务并存无选择机制;归档文件无增长监控 | T3-v1 和 T3-v2 拆为独立任务;归档文件 > 5000 行时输出 warning |
35
+
36
+ ### 核心共识
37
+
38
+ 所有专家一致认可的内容(直接沿用):
39
+
40
+ * T3 v1(TypeScript 层 grep 过滤)可直接实现,无争议
41
+
42
+ * T2(反思滚动窗口)风险最低,修正行数目标后可先实现
43
+
44
+ * SessionEnd hook 选择正确,Stop hook 风险已正确识别
45
+
46
+ * T1 归档机制方向正确(解决格式兼容后可实现)
47
+
48
+ * T3 v2(MiniSearch)延期,当前 62 条规模不需要 BM25(触发条件:知识库 > 200 条)
49
+
50
+ * T4 降为 P1-Should Have(Product Director HIGH,Tech Lead 建议 POC 验证后)
51
+
52
+ ---
53
+
54
+ ## 2. 背景与目标(沿用草稿,补充修正)
55
+
56
+ ### 背景
57
+
58
+ Axiom 进化引擎通过三个核心 Markdown 文件维持跨会话记忆:`learning_queue.md`(学习队列)、`reflection_log.md`(反思日志)、`knowledge_base.md`(知识图谱索引)。随着系统持续运行,这三个文件因"只增不减"设计持续膨胀:
59
+
60
+ * `learning_queue.md`:327 行,LQ-001~LQ-030 全部 `done`,零 `pending`,仍全量载入
61
+
62
+ * `reflection_log.md`:681 行 / 46KB,含大量历史遗留空条目噪音(当前约 18 条有效反思,平均每条约 35-40 行)
63
+
64
+ * `knowledge_base.md`:177 行 / 8KB,62 条,每次 ax-evolve / ax-knowledge 全量读取
65
+
66
+ ### 产品目标
67
+
68
+ 通过自动归档、滚动窗口和按需读取机制,将 Axiom 进化系统的三个核心记忆文件的活跃内容体积控制在合理阈值内,在不损失知识完整性的前提下降低每会话 token 消耗。
69
+
70
+ **补充(基于 Product Director D-04 建议)**:让 Axiom 系统在项目持续演进 6 个月后,仍能保持与第 1 天相同的响应质量和上下文利用效率。
71
+
72
+ ---
73
+
74
+ ## 3. 用户故事(修订版)
75
+
76
+ | # | 角色 | 目标 | 收益 |
77
+ | --- | ------ | ------ | ------ |
78
+ | U1 | Axiom 系统(自动化) | 当 learning_queue.md 中 done 条目数 > 10 时,自动将超出条目归档;并支持手动触发归档 | 主文件始终只保留需要关注的 pending/in-progress 条目,token 消耗与待处理量成正比 |
79
+ | U2 | Axiom 系统(自动化) | 清理 reflection_log.md 中的历史遗留空条目,并建立滚动窗口机制(10 条) | 反思日志保持可读性,旧噪音不再占据上下文 token |
80
+ | U3 | 开发者(调用 ax-knowledge) | 按关键词或类别查询知识库,只获取相关条目;降级时得到明确提示 | 不再加载全部 62 条,响应更快;降级时知情 |
81
+ | U4 | Axiom 系统(会话结束时) | 会话结束时自动触发小批量 ax-evolve 处理(P1,待 POC 验证后实现) | 避免队列积压导致的集中大量 token 消耗 |
82
+
83
+ ---
84
+
85
+ ## 4. 修订后的功能需求(MVP v1.0)
86
+
87
+ ### T1: learning_queue.md done 条目自动归档(已修订)
88
+
89
+ **优先级**: P0-Must Have
90
+
91
+ **格式选择决定(Tech Lead D-01,路径 A)**:
92
+ `learning_queue.md` 使用多行块格式(`### LQ-XXX:` + 字段行),`learning-queue.ts` 现有解析器期望表格格式。**选择路径 A:重写解析器以支持多行块格式**。原因:路径 B 会破坏文件可读性,且已积累的 30 条历史数据需要重新迁移,代价更高。
93
+
94
+ **实现规格**:
95
+ 1. 归档阈值:主文件中 `done` 状态条目数 `count > 10`(严格大于,done = 11 时触发,确保边界清晰;实现注释须标注 `count > 10`,验收测试使用 done = 11 作为边界用例)
96
+ 2. 归档目标路径:`.omc/axiom/evolution/learning_queue_archive.md`(追加写入,带归档时间戳)
97
+ 3. 归档动作:超出阈值的 `done` 条目从主文件移除,写入归档文件
98
+ 4. 主文件只保留:文件头部(格式说明 + 优先级说明)、所有 `pending` 条目、所有 `in-progress` 条目、按**处理时间倒序**排列的最近 10 条 `done` 条目(缺失处理时间时使用添加时间作兜底)
99
+ 5. 触发时机:
100
+ - **自动触发**:ax-evolve 处理完一批条目后(状态变为 done 时)自动检查并执行
101
+ - **手动触发(新增,解除强耦合)**:支持 `--archive-queue` 参数独立触发,无需 ax-evolve 执行;全 done 零 pending 状态下亦可通过手动触发执行归档
102
+ 1. 归档前确保目录存在:`mkdirSync({ recursive: true })` 创建 `.omc/axiom/evolution/`
103
+ 2. **原子写入**(Tech Lead D-06):
104
+ - 归档文件使用追加写(append)
105
+ - 主文件更新使用 write-to-tmp-then-rename 模式(`fs.renameSync` 在同文件系统下原子)
106
+ - 崩溃安全:若归档写入成功但主文件更新失败,通过条目 ID 去重检测(扫描归档文件的 `### LQ-XXX:` 标题)防止重复归档
107
+ 1. **并发锁(Critic D-C07)**:归档操作入口使用进程级文件锁 `.omc/axiom/evolution/.archive.lock`,检测到 lock 文件则跳过(lock 文件含写入时间戳,超 30 秒自动视为陈旧锁)
108
+ 2. **归档文件增长监控(Product Director D-03)**:归档操作完成后检查归档文件行数,超过 5000 行时输出一行 warning:`[警告] learning_queue_archive.md 已超过 5000 行,建议人工检视`
109
+ 3. **用户反馈输出(UX Director D-01)**:每次归档触发时在命令行输出摘要:`[归档] learning_queue: 已移动 N 条 done 条目至 learning_queue_archive.md`
110
+
111
+ **不包含**:`--dry-run` 参数(延期至 v1.1);跨归档文件联合查询(延期至 v2)
112
+
113
+ ---
114
+
115
+ ### T2: reflection_log.md 历史噪音清理 + 滚动窗口(已修订)
116
+
117
+ **优先级**: P0-Must Have(建议最先实现)
118
+
119
+ **行数目标修正(Tech Lead D-02)**:
120
+
121
+ * 草稿声称保留 20 条、主文件 ~400 行——矛盾(20 条 × 38 行均值 = ~760 行,反而比当前 681 行更大)
122
+
123
+ * **修正为保留 10 条**:10 条 × 38 行均值 = ~380 行,相比当前 681 行降幅约 44%,与目标区间一致
124
+
125
+ * 业务依据(补充,Product Director D-06):10 条约覆盖最近 1-2 个迭代周期的反思记录,是 LLM Agent 上下文有效利用的合理窗口
126
+
127
+ **实现规格**:
128
+ 1. **空条目判断精确规则(Domain Expert D-06)**:一个由 `## 反思` 开始的块,若以下三个核心小节(`### ✅ 做得好的` / `### ⚠️ 待改进` / `### 💡 学到了什么`)均无有效文字内容(内容为空行、`-` 占位符、HTML 注释),则判定为空条目
129
+ 2. **一次性清理(人工触发单次操作)**:清理前备份整个文件至 `reflection_log_backup_YYYYMMDD.md`,输出将清理的空条目数量供人工确认
130
+ 3. 滚动窗口:主文件保留最近 **10 条**完整反思记录(按 `## 反思 - 日期` 标题排序倒序)
131
+ 4. 历史归档路径:`.omc/axiom/evolution/reflection_log_archive.md`(追加写入)
132
+ 5. 触发时机:ax-reflect 写入新反思条目时,写入后检查条目数 `count > 10`,超出时将最旧的条目移至归档
133
+ 6. **块边界处理**:`## 反思 - ...` 块的末尾以 `---` 分隔符结束;块切割时 `---` 分隔符归属当前块,保持归档文件格式一致性
134
+ 7. **原子写入**:与 T1 相同,使用 write-to-tmp-then-rename 模式
135
+ 8. **并发锁**:归档操作使用与 T1 共享的 `.archive.lock` 文件
136
+ 9. **归档文件增长监控**:归档文件超过 5000 行时输出 warning
137
+ 10. **用户反馈输出**:每次归档触发时输出:`[归档] reflection_log: 已移动 N 条反思至 reflection_log_archive.md`
138
+
139
+ **验收数字修正**:
140
+
141
+ * 优化后主文件上限:~380 行(10 条 × 38 行均值)
142
+
143
+ * 预期 token 降幅(典型场景):~44%(相比当前 681 行)
144
+
145
+ ---
146
+
147
+ ### T3-v1: ax-knowledge 关键词过滤(基础方案,TypeScript 层实现)
148
+
149
+ **优先级**: P0-Must Have(与 T2 同期实现)
150
+
151
+ **实现层明确(Tech Lead D-08)**:
152
+ 直接在 **TypeScript 层**实现关键词过滤(字符串 `includes` / `indexOf`),不依赖 LLM 执行 grep;SKILL.md 层只声明参数语法。
153
+
154
+ **实现规格**:
155
+ 1. 支持关键词过滤:`ax-knowledge --filter <keyword>`,只返回 Title 或 Category 包含关键词的条目(字段精确包含,大小写不敏感)
156
+ 2. 支持分类过滤:`ax-knowledge --category <category>`,按 Category 列精确过滤
157
+ 3. 无参数时默认行为:返回全量索引(向后兼容)
158
+ 4. **查询结果统计(UX Director D-08)**:过滤结果末尾附加 `显示 X/Y 条,使用无参数调用查看全部`
159
+ 5. **参数校验**:`--filter` 参数长度上限 256 字符(防止超长输入)
160
+
161
+ **验收标准**:
162
+
163
+ * `ax-knowledge --filter typescript` 只返回 Title 或 Category 包含 "typescript" 的条目(字段精确包含,大小写不敏感)
164
+
165
+ * `ax-knowledge --category architecture` 只返回 Category = "architecture" 的条目
166
+
167
+ * `ax-knowledge`(无参数)返回全量 62 条,与优化前一致
168
+
169
+ * 查询结果末尾显示 `显示 X/Y 条` 统计
170
+
171
+ ---
172
+
173
+ ### T3-v2: ax-knowledge MiniSearch 全文搜索(延期至 v1.1,触发条件:知识库 > 200 条)
174
+
175
+ **优先级**: P1-Should Have(延期,**不纳入当前 MVP**)
176
+
177
+ **延期依据**:
178
+
179
+ * 当前知识库 62 条,Domain Expert、Product Director 均认为不需要 BM25,TypeScript Array.filter 在此规模下无感知差异
180
+
181
+ * Tech Lead 评估 T3-v2 工程难度 8/10、预估 3-5 天,成本/收益比偏低
182
+
183
+ * **触发条件**:知识库条目数 > 200 时重新评估
184
+
185
+ **当 v1.1 实现 T3-v2 时必须满足的约束(预留)**:
186
+
187
+ 1. **正则转义(Critic D-C05,引用 k-034 模式,不可省略)**:在 TypeScript 层对 `--filter` / `--search` 参数做正则特殊字符转义:
188
+ ```typescript
189
+ keyword.replace(/[.*+?^${}() | [\]\\]/g, '\\$&')
190
+ ```
191
+ 并设置 256 字符长度上限
192
+
193
+ 1. **content 字段策略(Tech Lead D-03)**:
194
+ - `content` = `Title + " " + Category`(索引字段组合)
195
+ - 明确标注:当前阶段 content 为元信息组合,全文检索价值有限;实体内容填充留至 v3
196
+
197
+ 1. **MiniSearch 降级通知(UX Director D-03)**:降级时输出警告:`[警告] MiniSearch 不可用,已切换至 grep 模式,结果精度可能降低`
198
+
199
+ 1. **YAML 部分解析失败处理(Critic D-C09)**:宽松模式,跳过错误条目 + 记录警告日志;超过 10% 条目解析失败时触发全局降级
200
+
201
+ 1. **v1/v2 验收标准分离(Critic D-C06)**:
202
+ - v1(字段精确包含):`--filter typescript` 只返回 Title 或 Category 含 "typescript" 的条目
203
+ - v2(全文模糊匹配):`--filter typescript` 返回 title/tags/content 中含 "typescript" 的条目(含模糊匹配)
204
+ - 降级时允许结果集缩小(v2 降级至 v1 为 subset 行为,用户文档需声明)
205
+
206
+ 1. **知识库迁移(Confidence vs Priority 映射)**:Confidence 保留为独立字段,priority 需人工或脚本补充;迁移前备份原文件
207
+
208
+ 1. **MiniSearch 索引不持久化**:每次冷启动重建(62 条 < 5ms,500 条 < 50ms,持久化成本/收益不合理)
209
+
210
+ ---
211
+
212
+ ### T4: ax-evolve SessionEnd 自动小批量触发(降为 P1-Should Have,需 POC 验证)
213
+
214
+ **优先级**: P1-Should Have(**不纳入当前 MVP**,移至 v1.1 POC 验证后决定)
215
+
216
+ **降级依据**:
217
+
218
+ * Product Director D-02(HIGH):T4 工程复杂度与 MVP 必要性不匹配,T1 实现后积压问题已大幅缓解
219
+
220
+ * Tech Lead D-04(HIGH):30 秒时间预算基于估算,现有 session-end 链路 7+ 个异步操作,实测数据缺失
221
+
222
+ **当 v1.1 实现 T4 时必须满足的约束(预留)**:
223
+
224
+ 1. **触发点**:仅使用 `SessionEnd` hook(不使用 Stop hook)
225
+ - SessionEnd hook 脚本入口校验 `hook_event_name === 'SessionEnd'`(不是检查 `stop_hook_active` 环境变量)
226
+ - **删除 `stop_hook_active` 守卫描述(Critic D-C02)**:SessionEnd hook 天然不会收到该字段,守卫在此语境无意义
227
+
228
+ 1. **统一字段名(Critic D-C01,阻断级)**:
229
+ - 跳过条件检查字段:`auto_evolve_done: true`
230
+ - 完成后写入字段:`auto_evolve_done: true`
231
+ - **两处必须使用同一字段名**,否则跳过逻辑永久失效
232
+
233
+ 1. **processing 中间状态(Critic D-C04,阻断级)**:
234
+ 对每条 LQ 条目的处理顺序必须为:
235
+ ```
236
+ Step 1: 将 LQ 状态设为 processing(先写 learning_queue.md)
237
+ Step 2: 写入 knowledge_base.md(知识条目)
238
+ Step 3: 将 LQ 状态设为 done(更新 learning_queue.md)
239
+ ```
240
+ 崩溃恢复:下次触发时跳过 `done` 条目;对 `processing` 状态条目先做知识库去重检查(通过 LQ-ID 比对),再决定是重新处理还是跳过
241
+
242
+ 1. **文件锁互斥(Critic D-C03)**:SessionEnd ax-evolve 逻辑入口写 `.omc/axiom/evolution/.evolve.lock` 文件,完成后删除;检测到 lock 文件则跳过(TOCTOU 竞争条件防护)
243
+
244
+ 1. **超时后条目状态(UX Director D-04)**:30 秒超时后,将 `processing` 状态的条目**回滚至 pending**(不保留半处理状态),下次会话重新处理;已完成的条目保持 `done`
245
+
246
+ 1. **用户通知(UX Director 1.3)**:会话结束时输出轻量通知:`[Axiom] 会话结束,后台处理了 N 条学习队列条目`;skip 时输出调试日志:`[Axiom/SessionEnd] 跳过自动处理:本会话已执行手动 ax-evolve`
247
+
248
+ 1. **POC 要求(Tech Lead D-04)**:实现前必须在真实环境中计时 3 条 LQ 条目端到端处理耗时,验证 30 秒预算充裕性
249
+
250
+ 1. 批量限制:每次自动触发最多处理 **3 条** pending 条目("最多"语义,允许少于 3 条)
251
+ 2. 触发条件:learning_queue.md 中存在至少 1 条 `pending` 条目时才触发
252
+ 3. 超时控制:在 ax-evolve 逻辑外单独套 30 秒 `Promise.race`(Tech Lead D-07),与现有超时机制隔离
253
+
254
+ ---
255
+
256
+ ## 5. 非功能需求(修订版)
257
+
258
+ ### 5.1 Token 效率指标(修订后的量化目标)
259
+
260
+ | 文件 | 当前行数 | 优化后主文件上限 | 典型场景 token 降幅 |
261
+ | ------ | --------- | ----------------- | ------------------- |
262
+ | learning_queue.md | ~327 行 | ~120 行(头部20行 + 最多10条done×10行 + pending区) | ~63%(有 pending 时的典型场景) |
263
+ | reflection_log.md | ~681 行 | ~380 行(最近10条完整反思) | ~44%(滚动窗口) |
264
+ | knowledge_base.md(T3-v1) | ~177 行 | 按需:平均返回 ~10 条 | ~85%(有效过滤场景;全量调用场景为 0%) |
265
+
266
+ **注意(Domain Expert D-03)**:以上为"典型场景"降幅估算。全量调用 `ax-knowledge`(无参数)或 pending 为 0 时,knowledge_base 降幅为 0%。三文件综合降幅取决于实际使用模式,不适合以单一百分比呈现。
267
+
268
+ ### 5.2 安全性要求(新增)
269
+
270
+ * **正则注入防护**:T3-v1 `--filter` 参数长度上限 256 字符;T3-v2 实现时必须引用 k-034 模式进行正则特殊字符转义(`str.replace(/[.*+?^${}() | [\]\\]/g, '\\$&')`)
271
+
272
+ * **路径安全**:归档路径硬编码,不允许从文件内容动态构建路径;代码注释须标注"归档路径不可来自文件内容"
273
+
274
+ * **并发安全**:T1/T2 归档操作及 T4 触发均使用文件锁防止并发写入
275
+
276
+ * **目录初始化**:归档文件写入前必须调用 `mkdirSync({ recursive: true })` 确保目录存在
277
+
278
+ ### 5.3 可靠性要求(修订版)
279
+
280
+ * 归档操作使用 write-to-tmp-then-rename 原子模式,防止主文件在操作中途损坏
281
+
282
+ * 归档文件使用追加写(append),崩溃时通过 ID 去重防止重复写入
283
+
284
+ * T4(当 v1.1 实现时)的 processing 中间状态确保 LQ 条目不重复处理
285
+
286
+ * 自动 ax-evolve 触发失败时,不阻断会话结束流程
287
+
288
+ * 归档文件 > 5000 行时输出 warning(非阻断)
289
+
290
+ * 滚动窗口阈值通过配置项控制,不硬编码(T1 阈值 10 条 done,T2 窗口 10 条反思,均在 SKILL.md 中声明默认值)
291
+
292
+ ### 5.4 向后兼容性要求(沿用)
293
+
294
+ * 现有 ax-evolve、ax-knowledge、ax-reflect skill 调用语法不变
295
+
296
+ * ax-knowledge 无参数时行为与优化前完全一致
297
+
298
+ * 归档操作幂等(单进程语义,并发场景通过文件锁保障)
299
+
300
+ * 不修改已处理的 done 条目内容(仅移动位置)
301
+
302
+ ---
303
+
304
+ ## 6. 业务流程(修订版)
305
+
306
+ ### 6.1 整体优化流程(修订后主视图)
307
+
308
+ ```mermaid
309
+ graph TD
310
+ A[会话开始] --> B{读取记忆文件}
311
+ B --> B1[learning_queue.md\n仅加载 pending/in-progress\n+ 按处理时间倒序最近10条 done]
312
+ B --> B2[reflection_log.md\n仅加载最近10条反思]
313
+ B --> B3[knowledge_base.md\n按需按关键词/分类过滤\n无参数时全量返回]
314
+
315
+ C[开发工作进行中] --> D[ax-reflect 写入新反思]
316
+ D --> D1{反思条目数 count > 10?}
317
+ D1 --> | 是 | D2[最旧条目移至\nreflection_log_archive.md\n输出归档摘要]
318
+ D1 --> | 否 | D3[直接写入主文件]
319
+
320
+ E[ax-evolve 执行] --> F[处理 pending 条目\n状态变为 done]
321
+ F --> G{done 条目数 count > 10?}
322
+ G --> | 是 | H[超出 done 条目\n归档至 learning_queue_archive.md\n检查归档文件行数监控\n输出归档摘要]
323
+ G --> | 否 | I[保留在主文件]
324
+
325
+ J{SessionEnd hook 触发\nPOC 验证后实现} --> K{learning_queue\n有 pending 条目?}
326
+ K --> | 是 | L{本会话已设置\nauto_evolve_done: true?}
327
+ L --> | 否 | M[获取 .evolve.lock\n自动触发 ax-evolve\n最多3条 processing状态中间保护]
328
+ L --> | 是 | N[跳过 输出调试日志]
329
+ K --> | 否 | N
330
+ ```
331
+
332
+ ### 6.2 T1 学习队列归档流程(修订版)
333
+
334
+ ```mermaid
335
+ sequenceDiagram
336
+ participant AE as ax-evolve / 手动触发
337
+ participant LK as .archive.lock
338
+ participant LQ as learning_queue.md
339
+ participant AR as learning_queue_archive.md
340
+
341
+ AE->>LK: 尝试获取文件锁
342
+ alt 锁已存在(并发保护)
343
+ AE->>AE: 跳过归档
344
+ else 获取锁成功
345
+ AE->>LQ: 处理 pending 条目或检查 done 数量
346
+ AE->>LQ: 统计 done 条目数量(count > 10?)
347
+ alt done 数量 count > 10
348
+ AE->>AR: 追加超出条目(带归档时间戳,去重检查)
349
+ AE->>LQ: write-to-tmp-then-rename 更新主文件
350
+ AE->>AE: 检查 AR 行数(> 5000 则输出 warning)
351
+ AE->>AE: 输出归档摘要
352
+ end
353
+ AE->>LK: 释放文件锁
354
+ end
355
+ ```
356
+
357
+ ### 6.3 T3-v1 知识库按需读取流程
358
+
359
+ ```mermaid
360
+ graph LR
361
+ A[ax-knowledge 调用] --> B{携带参数?}
362
+ B --> | --filter keyword | C[TypeScript层字符串匹配\nTitle/Category includes\n大小写不敏感\n长度校验≤256字符]
363
+ B --> | --category cat | D[TypeScript层精确匹配\nCategory字段]
364
+ B --> | 无参数 | E[全量读取\n向后兼容]
365
+ C --> F[返回匹配条目\n末尾附加 显示X/Y条]
366
+ D --> F
367
+ E --> G[返回全部条目]
368
+ ```
369
+
370
+ ---
371
+
372
+ ## 7. 验收标准(修订版)
373
+
374
+ ### T1 验收标准
375
+
376
+ * [ ] 解析器重写:能正确解析 `### LQ-XXX:` 多行块格式,返回包含状态、优先级、添加时间等字段的对象数组
377
+
378
+ * [ ] `learning_queue.md` 主文件 done 条目数 `<= 10`(触发阈值为 count > 10,验收边界测试:done = 11 触发,done = 10 不触发)
379
+
380
+ * [ ] `learning_queue_archive.md` 存在且包含所有历史 done 条目(ID 无重复,无内容丢失)
381
+
382
+ * [ ] 归档操作有输出摘要:`[归档] learning_queue: 已移动 N 条 done 条目至 learning_queue_archive.md`
383
+
384
+ * [ ] 归档后条目仍按处理时间倒序排列(缺失处理时间时使用添加时间兜底)
385
+
386
+ * [ ] 手动触发 `--archive-queue` 在全 done / 零 pending 状态下正确执行归档
387
+
388
+ * [ ] 并发保护:两个进程并发执行时,第二个进程检测到 .archive.lock 直接跳过
389
+
390
+ * [ ] 归档文件超 5000 行时输出 warning
391
+
392
+ ### T2 验收标准
393
+
394
+ * [ ] 空条目清理:执行一次性清理后,基于三核心小节均无有效内容的判断标准,无误清理有效反思(特别是格式异常的 2026-02-11 Codex Workflow 条目)
395
+
396
+ * [ ] 新写入反思后,主文件反思条目数恒保持 `<= 10`(以写入第 11 条后触发验证)
397
+
398
+ * [ ] `reflection_log_archive.md` 包含被滚出窗口的历史反思(无内容丢失)
399
+
400
+ * [ ] 主文件行数目标:`<= 400 行`(基于 10 条窗口的合理上限)
401
+
402
+ * [ ] ax-reflect 正常写入新反思,调用语法与优化前一致
403
+
404
+ * [ ] 归档有输出摘要:`[归档] reflection_log: 已移动 N 条反思至 reflection_log_archive.md`
405
+
406
+ ### T3-v1 验收标准
407
+
408
+ * [ ] `ax-knowledge --filter typescript` 只返回 Title 或 Category 包含 "typescript" 的条目(大小写不敏感,字段精确包含)
409
+
410
+ * [ ] `ax-knowledge --category architecture` 只返回 Category 字段精确匹配 "architecture" 的条目
411
+
412
+ * [ ] `ax-knowledge`(无参数)返回全量 62 条,与优化前一致
413
+
414
+ * [ ] 查询结果末尾显示 `显示 X/Y 条,使用无参数调用查看全部` 统计
415
+
416
+ * [ ] `--filter` 参数超过 256 字符时返回错误提示而非崩溃
417
+
418
+ * [ ] 过滤逻辑在 TypeScript 层实现,不依赖 LLM 执行(可通过单元测试验证确定性)
419
+
420
+ ### T4 验收标准(v1.1 实现时,在此预留)
421
+
422
+ * [ ] POC 验证:3 条 LQ 条目端到端处理实测耗时 < 25 秒(留 5 秒余量)
423
+
424
+ * [ ] 触发的是 SessionEnd hook(hook_event_name === 'SessionEnd' 校验通过)
425
+
426
+ * [ ] 若有 pending 条目且本会话未设置 `auto_evolve_done: true`,自动执行 ax-evolve(最多 3 条)
427
+
428
+ * [ ] LQ 条目处理遵循 pending → processing → done 三段状态机;中途崩溃后重启时 processing 状态条目触发去重检查
429
+
430
+ * [ ] 30 秒超时后,processing 状态条目回滚至 pending,下次会话可重新处理
431
+
432
+ * [ ] 两个会话并发时,第二个会话检测到 .evolve.lock 直接跳过
433
+
434
+ * [ ] 已设置 `auto_evolve_done: true` 的会话,结束时不重复触发(同一字段名读写,Critic D-C01 修正验证)
435
+
436
+ * [ ] 完成后在 active_context.md 写入 `auto_evolve_done: true`
437
+
438
+ * [ ] 会话结束时输出通知:`[Axiom] 会话结束,后台处理了 N 条学习队列条目`
439
+
440
+ * [ ] Skip 时输出:`[Axiom/SessionEnd] 跳过自动处理:本会话已执行手动 ax-evolve`
441
+
442
+ * [ ] 无 pending 条目时,会话结束不触发自动 ax-evolve
443
+
444
+ ---
445
+
446
+ ## 8. 实现顺序建议
447
+
448
+ 基于 Tech Lead 建议并综合所有专家意见:
449
+
450
+ ```
451
+ T2(反思滚动窗口)
452
+ - 风险最低,主要是正则解析工作
453
+ - 但行数估算已修正为 10 条窗口
454
+ - 预估工时:1-2 天
455
+
456
+
457
+
458
+ T3-v1(TypeScript 层关键词过滤)
459
+ - 低风险,立即降低 knowledge_base token 消耗
460
+ - 预估工时:1 天
461
+
462
+
463
+
464
+ T1(learning_queue 归档)
465
+ - 需先完成解析器重写(路径 A)
466
+ - 预估工时:2-3 天(含格式决策实现)
467
+
468
+
469
+
470
+ T4(SessionEnd 自动触发)[v1.1,需 POC 验证]
471
+ - 先做 POC 验证 30 秒预算
472
+ - 预估工时:1-2 天(POC 通过后)
473
+
474
+
475
+
476
+ T3-v2(MiniSearch 全文搜索)[v1.1,触发条件:知识库 > 200 条]
477
+ - 最高工程复杂度
478
+ - 预估工时:3-5 天(含迁移脚本)
479
+ ```
480
+
481
+ **MVP v1.0 交付范围**:T2 + T3-v1 + T1(按上述顺序)
482
+ **合计预估工时(MVP v1.0)**:4-6 个工作天
483
+
484
+ ---
485
+
486
+ ## 9. 解决的差异点清单
487
+
488
+ | 差异点ID | 来源专家 | 原始问题 | 仲裁层级 | 仲裁决定 | 修订内容摘要 |
489
+ | --------- | --------- | --------- | --------- | --------- | ------------ |
490
+ | D-C01 | Critic | T4 字段名:write `auto_evolve: true`,read `auto_evolve_done: true` | 1-安全/逻辑 | 采纳 | 统一为 `auto_evolve_done: true`,T4 约束中明确两处字段名一致 |
491
+ | D-C02 | Critic | `stop_hook_active` 守卫在 SessionEnd hook 中无意义,且描述与实现不符 | 1-安全/逻辑 | 采纳 | 删除守卫描述,改为校验 `hook_event_name === 'SessionEnd'` |
492
+ | D-C03 | Critic | TOCTOU 竞争:多窗口并发导致同一 LQ 条目被处理两次 | 1-安全/逻辑 | 采纳 | T4 约束中增加 `.evolve.lock` 文件锁互斥机制 |
493
+ | D-C04 | Critic | T4 中途崩溃后 LQ 条目重复处理导致知识库重复条目 | 1-安全/逻辑 | 采纳 | T4 约束中增加 `processing` 中间状态,崩溃恢复时去重检查 |
494
+ | D-C05 | Critic | MiniSearch `--filter` 正则注入,现有降级路径无法捕获 RegExp 异常 | 1-安全/逻辑 | 采纳 | T3-v2 约束中强制引用 k-034 模式;T3-v1 增加 256 字符上限 |
495
+ | D-C06 | Critic | T3 v1/v2 `--filter` 语义不同,验收标准混用两套语义 | 1-安全/逻辑 | 采纳 | T3-v1 和 T3-v2 分拆为独立任务,各有独立验收标准 |
496
+ | D-C07 | Critic | T1/T2 归档操作无并发保护,多进程重复归档 | 1-安全/逻辑 | 采纳 | 归档操作使用 `.archive.lock` 文件锁 |
497
+ | D-C08 | Critic | `.omc/axiom/evolution/` 目录首次安装可能不存在 | 1-安全/逻辑 | 采纳 | T1/T2 归档前调用 `mkdirSync({ recursive: true })` |
498
+ | D-01(Tech) | Tech Lead | `learning_queue.md` 多行块格式与现有解析器表格格式完全不兼容 | 2-技术可行性 | 选择路径 A | 重写解析器支持多行块格式,不迁移文件格式 |
499
+ | D-02(Tech) | Tech Lead | 保留 20 条反思(~800 行)与"~400 行"目标矛盾 | 2-技术可行性 | 采纳修正 | 窗口降为 10 条(~380 行),修正降幅目标 |
500
+ | D-03(Tech) | Tech Lead | T3-v2 MiniSearch `content` 字段来源未定义 | 2-技术可行性 | 采纳 | content = `Title + " " + Category`,标注检索价值有限 |
501
+ | D-04(Tech) | Tech Lead | T4 30 秒预算无实测数据 | 2-技术可行性 | 采纳 | T4 降为 P1,v1.1 实现前必须做 POC 验证 |
502
+ | D-01(Product) | Product Director | T3 v1/v2 双方案并存无选择机制 | 3-战略对齐 | 采纳 | T3-v1 和 T3-v2 拆为独立任务,v2 延期至知识库 > 200 条 |
503
+ | D-02(Product) | Product Director | T4 进 MVP 必要性与工程复杂度不匹配 | 3-战略对齐 | 采纳 | T4 降为 P1-Should Have,移至 v1.1 |
504
+ | D-03(Product) | Product Director | 归档文件无增长策略 | 3-战略对齐 | 采纳(轻量版) | 归档文件 > 5000 行时输出 warning,不自动清理 |
505
+ | D-01(Domain) | Domain Expert | T4 字段名不一致(与 D-C01 同一问题) | 已由 Critic 覆盖 | Critic 优先 | 统一为 `auto_evolve_done: true` |
506
+ | D-02(Domain) | Domain Expert | T1 归档与 ax-evolve 强耦合,全 done 状态下永远不执行 | 4-业务逻辑 | 采纳 | 新增 `--archive-queue` 手动触发入口 |
507
+ | D-01(UX) | UX Director | 归档操作静默无任何用户输出 | 5-用户体验 | 采纳(轻量版) | 每次归档输出一行摘要 |
508
+ | D-02(UX) | UX Director | 归档操作原子性(与 Tech D-06 同一问题) | 已由 Tech 覆盖 | Tech 优先 | write-to-tmp-then-rename |
509
+ | D-03(UX) | UX Director | MiniSearch 降级时不通知用户 | 5-用户体验 | 采纳 | T3-v2 约束中增加降级通知输出 |
510
+ | D-04(UX) | UX Director | T4 超时后条目状态未定义 | 5-用户体验 | 采纳 | T4 约束中明确:超时后 processing 回滚至 pending |
511
+
512
+ ---
513
+
514
+ ## 10. 延期至 v1.1 的内容
515
+
516
+ | 内容 | 延期原因 | 触发条件 |
517
+ | ------ | --------- | --------- |
518
+ | T3-v2(MiniSearch 全文搜索) | 62 条规模过度设计;工程成本高(3-5天);v1 grep 过滤已足够 | 知识库条目 > 200 条 |
519
+ | T4(SessionEnd 自动触发) | 工程复杂度与 MVP 必要性不匹配;30 秒预算未实测 | POC 验证通过(实测 < 25 秒) |
520
+ | --dry-run 模式 | MVP 阶段非必需,可接受一次性清理需人工确认 | v1.1 用户反馈后评估 |
521
+ | 跨主文件+归档的联合查询(--include-archive) | 复杂度超出 MVP 范围 | v2 |
522
+ | 文件头部状态元数据注释 | 轻量但非阻断需求 | v1.1 用户反馈后评估 |
523
+
524
+ ## 11. 延期至 v2 的内容(沿用草稿)
525
+
526
+ * `workflow_metrics.md` 的类似优化(用户已明确排除)
527
+
528
+ * Python nexus daemon 的 token 追踪
529
+
530
+ * `knowledge_base.md` 内容重构(语义去重、质量评分等)
531
+
532
+ * 跨会话 token 预算追踪与报警
533
+
534
+ * 知识库条目的向量化检索(语义搜索)
535
+
536
+ * 归档文件的自动压缩或清理策略(归档 > 5000 行时 warning 已在 MVP 中占位)
537
+
538
+ * 知识类型区分(evergreen vs temporal 的时间衰减差异化)
539
+
540
+ ---
541
+
542
+ ## 12. 风险与约束(修订版)
543
+
544
+ | 风险 | 严重程度 | 缓解措施(已在需求中体现) |
545
+ | ------ | --------- | --------- |
546
+ | 解析器重写(路径A)的边界情况 | 高 | 必须覆盖:多行内容字段、缺失字段、特殊字符;单元测试覆盖边界 |
547
+ | T2 一次性清理误删有效反思 | 高 | 精确空条目判断规则;清理前备份;人工确认 |
548
+ | 并发归档写入 | 中 | 文件锁(.archive.lock);已在 T1/T2 需求中强制要求 |
549
+ | T4 30 秒超时(v1.1) | 中 | POC 必须实测;超时后状态回滚 |
550
+ | 归档文件无限增长 | 中 | > 5000 行 warning 占位;自动清理推至 v2 |
551
+ | MiniSearch YAML 迁移(v1.1 T3-v2) | 中 | 迁移前备份;宽松解析模式;Confidence 字段保留 |
552
+
553
+ ### 实现约束
554
+
555
+ * 所有操作在 TypeScript 层实现(hooks / skills),符合项目技术栈
556
+
557
+ * CI 门禁必须通过:`tsc --noEmit && npm run build && npm test`
558
+
559
+ * T1/T2 解析逻辑必须有单元测试(含边界情况)
560
+
561
+ * T3-v1 过滤逻辑必须有单元测试(确定性验证)
562
+
563
+ * T3-v2(v1.1)降级路径必须有单元测试
564
+
565
+ * 不引入新运行时依赖(T3-v2 引入 minisearch 延至 v1.1)
566
+
567
+ * 归档文件路径固定为 `.omc/axiom/evolution/` 目录下
568
+
569
+ ---
570
+
571
+ ## 13. 下一步
572
+
573
+ 专家评审已完成。这是最终的粗设 PRD:`C:/Users/ljyih/Desktop/ultrapower/docs/prd/memory-evolution-optimize-rough.md`
574
+
575
+ **是否进入任务拆解阶段?**
576
+
577
+ 若确认,下一步调用 `ax-decompose`,将 MVP v1.0(T2 + T3-v1 + T1)拆解为可执行子任务:
578
+
579
+ * T2 的一次性清理实现 + 滚动窗口实现
580
+
581
+ * T3-v1 的 TypeScript 关键词过滤实现
582
+
583
+ * T1 的解析器重写(路径 A)+ 归档逻辑实现