@codeyam/codeyam-cli 0.1.0-staging.483fdc2 → 0.1.0-staging.62d4615

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 (213) hide show
  1. package/analyzer-template/.build-info.json +7 -7
  2. package/analyzer-template/log.txt +3 -3
  3. package/analyzer-template/package.json +3 -3
  4. package/analyzer-template/packages/ai/package.json +2 -2
  5. package/analyzer-template/packages/ai/src/lib/analyzeScope.ts +9 -1
  6. package/analyzer-template/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.ts +10 -17
  7. package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +154 -1
  8. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.ts +5 -1
  9. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.ts +11 -2
  10. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.ts +2 -2
  11. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.ts +70 -0
  12. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.ts +70 -1
  13. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.ts +20 -1
  14. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.ts +84 -19
  15. package/analyzer-template/packages/ai/src/lib/generateEntityDataStructure.ts +58 -3
  16. package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +14 -0
  17. package/analyzer-template/packages/ai/src/lib/isolateScopes.ts +51 -3
  18. package/analyzer-template/packages/analyze/index.ts +2 -0
  19. package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +51 -3
  20. package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +5 -0
  21. package/analyzer-template/packages/analyze/src/lib/files/scenarios/TransformationTracer.ts +1315 -0
  22. package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.ts +4 -0
  23. package/analyzer-template/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.ts +9 -1
  24. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +194 -15
  25. package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +260 -22
  26. package/analyzer-template/packages/analyze/src/lib/index.ts +1 -0
  27. package/analyzer-template/packages/database/package.json +1 -1
  28. package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts +3 -0
  29. package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
  30. package/analyzer-template/packages/types/src/types/ProjectMetadata.ts +1 -0
  31. package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts +3 -0
  32. package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
  33. package/analyzer-template/project/constructMockCode.ts +36 -1
  34. package/analyzer-template/project/writeMockDataTsx.ts +111 -17
  35. package/analyzer-template/project/writeScenarioComponents.ts +60 -12
  36. package/analyzer-template/project/writeSimpleRoot.ts +21 -11
  37. package/background/src/lib/virtualized/project/constructMockCode.js +30 -1
  38. package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
  39. package/background/src/lib/virtualized/project/writeMockDataTsx.js +95 -13
  40. package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
  41. package/background/src/lib/virtualized/project/writeScenarioComponents.js +60 -15
  42. package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
  43. package/background/src/lib/virtualized/project/writeSimpleRoot.js +21 -11
  44. package/background/src/lib/virtualized/project/writeSimpleRoot.js.map +1 -1
  45. package/codeyam-cli/scripts/apply-setup.js +43 -9
  46. package/codeyam-cli/scripts/apply-setup.js.map +1 -1
  47. package/codeyam-cli/src/commands/memory.js +12 -21
  48. package/codeyam-cli/src/commands/memory.js.map +1 -1
  49. package/codeyam-cli/src/utils/backgroundServer.js +4 -0
  50. package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
  51. package/codeyam-cli/src/utils/install-skills.js +23 -0
  52. package/codeyam-cli/src/utils/install-skills.js.map +1 -1
  53. package/codeyam-cli/src/utils/queue/job.js +4 -0
  54. package/codeyam-cli/src/utils/queue/job.js.map +1 -1
  55. package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js +82 -0
  56. package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js.map +1 -0
  57. package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js +128 -0
  58. package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js.map +1 -0
  59. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js +67 -0
  60. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js.map +1 -0
  61. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js +105 -0
  62. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js.map +1 -0
  63. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js +34 -0
  64. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js.map +1 -0
  65. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js +162 -0
  66. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js.map +1 -0
  67. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js +75 -0
  68. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js.map +1 -0
  69. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js +285 -0
  70. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js.map +1 -0
  71. package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js +83 -0
  72. package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js.map +1 -0
  73. package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js +127 -0
  74. package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js.map +1 -0
  75. package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js +50 -0
  76. package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js.map +1 -0
  77. package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js +96 -0
  78. package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js.map +1 -0
  79. package/codeyam-cli/src/utils/ruleReflection/index.js +5 -0
  80. package/codeyam-cli/src/utils/ruleReflection/index.js.map +1 -0
  81. package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js +33 -0
  82. package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js.map +1 -0
  83. package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js +85 -0
  84. package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js.map +1 -0
  85. package/codeyam-cli/src/utils/ruleReflection/types.js +5 -0
  86. package/codeyam-cli/src/utils/ruleReflection/types.js.map +1 -0
  87. package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js +293 -0
  88. package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js.map +1 -0
  89. package/codeyam-cli/src/utils/rules/index.js +1 -0
  90. package/codeyam-cli/src/utils/rules/index.js.map +1 -1
  91. package/codeyam-cli/src/utils/rules/parser.js +0 -28
  92. package/codeyam-cli/src/utils/rules/parser.js.map +1 -1
  93. package/codeyam-cli/src/utils/rules/ruleState.js +150 -0
  94. package/codeyam-cli/src/utils/rules/ruleState.js.map +1 -0
  95. package/codeyam-cli/src/utils/rules/staleness.js +14 -9
  96. package/codeyam-cli/src/utils/rules/staleness.js.map +1 -1
  97. package/codeyam-cli/src/webserver/app/lib/database.js +1 -0
  98. package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
  99. package/codeyam-cli/src/webserver/build/client/assets/CopyButton-CA3JxPb7.js +1 -0
  100. package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-DsN1wKrm.js → EntityItem-B86KKU7e.js} +1 -1
  101. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-DLqD3qNt.js → EntityTypeBadge-B5ctlSYt.js} +1 -1
  102. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-Ba2JVPzP.js → EntityTypeIcon-BqY8gDAW.js} +1 -1
  103. package/codeyam-cli/src/webserver/build/client/assets/{InlineSpinner-C8lyxW9k.js → InlineSpinner-ClaLpuOo.js} +1 -1
  104. package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-aht4aafF.js → InteractivePreview-BDhPilK7.js} +2 -2
  105. package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-CVtiBnY5.js → LibraryFunctionPreview-VeqEBv9v.js} +1 -1
  106. package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-B0GLXMsr.js → LoadingDots-Bs7Nn1Jr.js} +1 -1
  107. package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-xgeCVgSM.js → LogViewer-Bm3PmcCz.js} +1 -1
  108. package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-OApQuNyq.js → ReportIssueModal-C6PKeMYR.js} +3 -8
  109. package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-DuDvi0jm.js → SafeScreenshot-Gq3Ocjo6.js} +1 -1
  110. package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-DzccYyI8.js → ScenarioViewer-BNLaXBHR.js} +2 -2
  111. package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-DyFZkK0l.js → TruncatedFilePath-CiwXDxLh.js} +1 -1
  112. package/codeyam-cli/src/webserver/build/client/assets/{_index-BwqWJOgH.js → _index-B3TDXxnk.js} +1 -1
  113. package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-BwavGCpm.js → activity.(_tab)-DD1r_QU0.js} +6 -11
  114. package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-DfKzxuoe.js +11 -0
  115. package/codeyam-cli/src/webserver/build/client/assets/api.agent-transcripts-l0sNRNKZ.js +1 -0
  116. package/codeyam-cli/src/webserver/build/client/assets/api.save-fixture-l0sNRNKZ.js +1 -0
  117. package/codeyam-cli/src/webserver/build/client/assets/book-open-PttOB2SF.js +6 -0
  118. package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-Cx24_aWc.js → chevron-down-TJp6ofnp.js} +1 -1
  119. package/codeyam-cli/src/webserver/build/client/assets/{chunk-EPOLDU6W-CXRTFQ3F.js → chunk-JZWAC4HX-JE9ZIoBl.js} +12 -12
  120. package/codeyam-cli/src/webserver/build/client/assets/{circle-check-BOARzkeR.js → circle-check-CXhHQYrI.js} +1 -1
  121. package/codeyam-cli/src/webserver/build/client/assets/copy-6y9ALfGT.js +11 -0
  122. package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-BdhJEx6B.js → createLucideIcon-Ca9fAY46.js} +1 -1
  123. package/codeyam-cli/src/webserver/build/client/assets/{dev.empty-BBnGWYga.js → dev.empty-C5lqplTC.js} +1 -1
  124. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-BJUiQqZF.js → entity._sha._-n38keI1k.js} +10 -10
  125. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha.scenarios._scenarioId.fullscreen-DavjRmOY.js → entity._sha.scenarios._scenarioId.fullscreen-CBoafmVs.js} +1 -1
  126. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.create-scenario-D1T4TGjf.js → entity._sha_.create-scenario-DGgZjdFg.js} +1 -1
  127. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-CTBG2mmz.js → entity._sha_.edit._scenarioId-38yPijoD.js} +1 -1
  128. package/codeyam-cli/src/webserver/build/client/assets/{entry.client-CS2cb_eZ.js → entry.client-BSHEfydn.js} +1 -1
  129. package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-DMJ7zii9.js → fileTableUtils-DCPhhSMo.js} +1 -1
  130. package/codeyam-cli/src/webserver/build/client/assets/{files-CJ6lTdTA.js → files-Dk8wkAS7.js} +1 -1
  131. package/codeyam-cli/src/webserver/build/client/assets/{git-CPTZZ-JZ.js → git-DXnyr8uP.js} +1 -1
  132. package/codeyam-cli/src/webserver/build/client/assets/globals-Bh6jH0cL.css +1 -0
  133. package/codeyam-cli/src/webserver/build/client/assets/{index-lzqtyFU8.js → index-CcsFv748.js} +1 -1
  134. package/codeyam-cli/src/webserver/build/client/assets/{index-B1h680n5.js → index-ChN9-fAY.js} +1 -1
  135. package/codeyam-cli/src/webserver/build/client/assets/labs-BUvfJMNR.js +1 -0
  136. package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-B7B9V-bu.js → loader-circle-CTqLEAGU.js} +1 -1
  137. package/codeyam-cli/src/webserver/build/client/assets/manifest-d4e77269.js +1 -0
  138. package/codeyam-cli/src/webserver/build/client/assets/memory-DCHBwHou.js +76 -0
  139. package/codeyam-cli/src/webserver/build/client/assets/pause-D6vreykR.js +11 -0
  140. package/codeyam-cli/src/webserver/build/client/assets/root-D6oziHts.js +62 -0
  141. package/codeyam-cli/src/webserver/build/client/assets/{search-CxXUmBSd.js → search-B8VUL8nl.js} +1 -1
  142. package/codeyam-cli/src/webserver/build/client/assets/{settings-CS5f3WzT.js → settings-B2X7lJgQ.js} +1 -1
  143. package/codeyam-cli/src/webserver/build/client/assets/{simulations-DwFIBT09.js → simulations-CPoAg7Zo.js} +1 -1
  144. package/codeyam-cli/src/webserver/build/client/assets/terminal-BrCP7uQo.js +11 -0
  145. package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-B6LgvRJg.js → triangle-alert-BZz2NjYa.js} +1 -1
  146. package/codeyam-cli/src/webserver/build/client/assets/{useCustomSizes-C1v1PQzo.js → useCustomSizes-DNwUduNu.js} +1 -1
  147. package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-aSv48UbS.js → useLastLogLine-COky1GVF.js} +1 -1
  148. package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-DYxHZQuP.js → useReportContext-CpZgwliL.js} +1 -1
  149. package/codeyam-cli/src/webserver/build/client/assets/{useToast-mBRpZPiu.js → useToast-Bv9JFvUO.js} +1 -1
  150. package/codeyam-cli/src/webserver/build/server/assets/{index-TD1f-DHV.js → index-C0KrUQp-.js} +1 -1
  151. package/codeyam-cli/src/webserver/build/server/assets/server-build-C2h1v1XD.js +260 -0
  152. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  153. package/codeyam-cli/src/webserver/build-info.json +5 -5
  154. package/codeyam-cli/templates/codeyam-memory-hook.sh +9 -10
  155. package/codeyam-cli/templates/codeyam:memory.md +10 -9
  156. package/codeyam-cli/templates/codeyam:new-rule.md +0 -39
  157. package/codeyam-cli/templates/rule-notification-hook.py +54 -0
  158. package/codeyam-cli/templates/rule-reflection-hook.py +356 -89
  159. package/codeyam-cli/templates/rules-instructions.md +19 -22
  160. package/package.json +2 -2
  161. package/packages/ai/src/lib/analyzeScope.js +7 -1
  162. package/packages/ai/src/lib/analyzeScope.js.map +1 -1
  163. package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js +10 -14
  164. package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js.map +1 -1
  165. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +134 -1
  166. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
  167. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js +5 -1
  168. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js.map +1 -1
  169. package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js +11 -2
  170. package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js.map +1 -1
  171. package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js +2 -2
  172. package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js.map +1 -1
  173. package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js +63 -0
  174. package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js.map +1 -0
  175. package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js +63 -1
  176. package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js.map +1 -1
  177. package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js +15 -1
  178. package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js.map +1 -1
  179. package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js +78 -17
  180. package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js.map +1 -1
  181. package/packages/ai/src/lib/generateEntityDataStructure.js +46 -2
  182. package/packages/ai/src/lib/generateEntityDataStructure.js.map +1 -1
  183. package/packages/ai/src/lib/generateEntityScenarioData.js +10 -0
  184. package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
  185. package/packages/ai/src/lib/isolateScopes.js +39 -3
  186. package/packages/ai/src/lib/isolateScopes.js.map +1 -1
  187. package/packages/analyze/index.js +1 -0
  188. package/packages/analyze/index.js.map +1 -1
  189. package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +41 -1
  190. package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
  191. package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +3 -0
  192. package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
  193. package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js +880 -0
  194. package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js.map +1 -0
  195. package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js +5 -1
  196. package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js.map +1 -1
  197. package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js +9 -1
  198. package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js.map +1 -1
  199. package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +116 -13
  200. package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
  201. package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +231 -22
  202. package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
  203. package/packages/analyze/src/lib/index.js +1 -0
  204. package/packages/analyze/src/lib/index.js.map +1 -1
  205. package/codeyam-cli/src/utils/reviewedRules.js +0 -92
  206. package/codeyam-cli/src/utils/reviewedRules.js.map +0 -1
  207. package/codeyam-cli/src/webserver/build/client/assets/copy-Bb-80kDT.js +0 -6
  208. package/codeyam-cli/src/webserver/build/client/assets/file-code-Dhef1kWN.js +0 -6
  209. package/codeyam-cli/src/webserver/build/client/assets/globals-CX9f-5xM.css +0 -1
  210. package/codeyam-cli/src/webserver/build/client/assets/manifest-bba56ec1.js +0 -1
  211. package/codeyam-cli/src/webserver/build/client/assets/memory-DuTFSyJ2.js +0 -92
  212. package/codeyam-cli/src/webserver/build/client/assets/root-DTfSQARG.js +0 -62
  213. package/codeyam-cli/src/webserver/build/server/assets/server-build-BQ-1XyEa.js +0 -258
@@ -1 +1 @@
1
- import{Y as H,Z as I,M as J,N as K,W as L,O as _,R as $,T as rr,V as tr,U as or,X as ir,Q as pr}from"./assets/server-build-BQ-1XyEa.js";import"react/jsx-runtime";import"node:stream";import"@react-router/node";import"react-router";import"isbot";import"react-dom/server";import"react";import"lucide-react";import"fetch-retry";import"better-sqlite3";import"pg";import"fs";import"path";import"kysely";import"kysely/helpers/sqlite";import"kysely/helpers/postgres";import"typescript";import"fs/promises";import"os";import"prompts";import"chalk";import"crypto";import"child_process";import"url";import"util";import"dotenv";import"events";import"uuid";import"openai";import"p-queue";import"p-retry";import"@aws-sdk/client-dynamodb";import"lru-cache";import"pluralize";import"piscina";import"json5";import"@aws-sdk/util-dynamodb";import"v8";import"react-syntax-highlighter";import"react-syntax-highlighter/dist/cjs/styles/prism/index.js";import"node:crypto";import"minimatch";import"react-markdown";import"remark-gfm";import"react-diff-viewer-continued";export{H as allowedActionOrigins,I as assets,J as assetsBuildDirectory,K as basename,L as entry,_ as future,$ as isSpaMode,rr as prerender,tr as publicPath,or as routeDiscovery,ir as routes,pr as ssr};
1
+ import{Y as H,Z as I,M as J,N as K,W as L,O as _,R as $,T as rr,V as tr,U as or,X as ir,Q as pr}from"./assets/server-build-C2h1v1XD.js";import"react/jsx-runtime";import"node:stream";import"@react-router/node";import"react-router";import"isbot";import"react-dom/server";import"react";import"lucide-react";import"fetch-retry";import"better-sqlite3";import"pg";import"fs";import"path";import"kysely";import"kysely/helpers/sqlite";import"kysely/helpers/postgres";import"typescript";import"fs/promises";import"os";import"prompts";import"chalk";import"crypto";import"child_process";import"url";import"util";import"dotenv";import"events";import"uuid";import"openai";import"p-queue";import"p-retry";import"@aws-sdk/client-dynamodb";import"lru-cache";import"pluralize";import"piscina";import"json5";import"@aws-sdk/util-dynamodb";import"v8";import"react-syntax-highlighter";import"react-syntax-highlighter/dist/cjs/styles/prism/index.js";import"node:crypto";import"minimatch";import"react-markdown";import"remark-gfm";import"react-diff-viewer-continued";export{H as allowedActionOrigins,I as assets,J as assetsBuildDirectory,K as basename,L as entry,_ as future,$ as isSpaMode,rr as prerender,tr as publicPath,or as routeDiscovery,ir as routes,pr as ssr};
@@ -1,7 +1,7 @@
1
1
  {
2
- "buildTimestamp": "2026-02-04T17:33:55.043Z",
3
- "buildTime": 1770226435043,
4
- "buildNumber": 583,
5
- "semanticVersion": "0.1.583",
6
- "version": "0.1.583 (2026-02-04T17:33)"
2
+ "buildTimestamp": "2026-02-09T18:13:22.190Z",
3
+ "buildTime": 1770660802190,
4
+ "buildNumber": 616,
5
+ "semanticVersion": "0.1.616",
6
+ "version": "0.1.616 (2026-02-09T18:13)"
7
7
  }
@@ -3,7 +3,7 @@
3
3
  # Ensures rules are reviewed when associated code changes
4
4
  #
5
5
  # This hook checks that rules with matching `paths` patterns have been reviewed
6
- # (indicated by an updated `timestamp` field) when associated code files are modified.
6
+ # (indicated by an updated timestamp in .claude/codeyam-rule-state.json) when associated code files are modified.
7
7
 
8
8
  set -e
9
9
 
@@ -84,15 +84,14 @@ matches_pattern() {
84
84
  echo "$file" | grep -qE "$regex_pattern" 2>/dev/null
85
85
  }
86
86
 
87
- # Parse timestamp from YAML frontmatter
87
+ # Read timestamp from .claude/codeyam-rule-state.json
88
+ RULE_STATE_FILE=".claude/codeyam-rule-state.json"
88
89
  get_rule_timestamp() {
89
90
  local rule_file="$1"
90
- # Extract content between first two --- lines, then find timestamp
91
- sed -n '1,/^---$/!{/^---$/q;p}' "$rule_file" 2>/dev/null | \
92
- grep -E '^timestamp:' | \
93
- sed 's/timestamp:[[:space:]]*//' | \
94
- tr -d "'" | tr -d '"' | \
95
- head -1
91
+ # Extract relative path from .claude/rules/
92
+ local rule_name="${rule_file#.claude/rules/}"
93
+ if [ ! -f "$RULE_STATE_FILE" ]; then echo ""; return; fi
94
+ node -e "try{const d=JSON.parse(require('fs').readFileSync('$RULE_STATE_FILE','utf-8'));console.log((d.rules&&d.rules['$rule_name']&&d.rules['$rule_name'].timestamp)||'')}catch{console.log('')}"
96
95
  }
97
96
 
98
97
  # Parse paths from YAML frontmatter
@@ -186,8 +185,8 @@ if [ -n "$OUTDATED_RULES" ]; then
186
185
  echo ""
187
186
  echo " To proceed:"
188
187
  echo " 1. Review each rule to ensure it's still accurate"
189
- echo " 2. Update the 'timestamp' field in the YAML frontmatter"
190
- echo " 3. Stage the updated rule file(s)"
188
+ echo " 2. Run 'codeyam memory touch' to update timestamps"
189
+ echo " 3. Stage the updated .claude/codeyam-rule-state.json"
191
190
  echo " 4. Commit again"
192
191
  echo ""
193
192
  echo " Or ask Claude to \"run \`codeyam memory status\` and follow the instructions.\""
@@ -44,19 +44,21 @@ Check if this is the first time running memory.
44
44
  If CLAUDE.md doesn't contain a "When Confused / With Mistakes" section, add close to the top:
45
45
 
46
46
  ```markdown
47
- ## When Confused / With Mistakes: Stop. Ask. Document.
47
+ ## Continuous Documentation
48
48
 
49
- - If you are not sure about something stop and ask about it.
50
- - If you attempt something and it goes wrong then you are confused. Stop and ask about it.
51
- - If the user is unable to help. Do your best to research.
52
- - Then document the findings!
49
+ As you work, think about any information that might be helpful to know in future work sessions without the user re-providing the information.
50
+
51
+ This might include
52
+
53
+ - High-level architecture for complex areas of the codebase (if not obvious)
54
+ - Specific commands that are recommended
55
+ - Debugging strategies for complex areas of the codebase (if not obvious)
56
+ - Anything confusing that is encountered in the work session
53
57
 
54
58
  ### Documenting Confusion / Mistakes
55
59
 
56
- It is very important to document any confusion or mistakes you encounter in Claude Rules (`.claude/rules`).
60
+ It is very important to document any tribal knowledge, complex architectural decisions, and any confusion or mistakes you encounter in Claude Rules (`.claude/rules`).
57
61
  Please see `.codeyam/rules/instructions.md` for guidance.
58
-
59
- After making any code changes please run `codeyam memory status` and follow the instructions.
60
62
  ```
61
63
 
62
64
  ### 1B. Verify Instructions File
@@ -335,7 +337,6 @@ Use `pnpm jest` to run tests. Configuration is in `jest.config.ts`.
335
337
  ---
336
338
  paths:
337
339
  - 'specific/path/**/*.ts'
338
- category: architecture | testing | faq
339
340
  timestamp: [CURRENT_ISO_TIMESTAMP]
340
341
  ---
341
342
 
@@ -8,45 +8,6 @@ description: |
8
8
 
9
9
  # Create New Claude Rule
10
10
 
11
- ## Before Creating: The Confusion Test
12
-
13
- Only create rules that document genuinely confusing aspects—not things Claude can figure out by reading code.
14
-
15
- **Ask yourself:**
16
-
17
- 1. **Could Claude figure this out by reading the code?**
18
- - If YES → don't create the rule
19
- - If NO → proceed
20
-
21
- 2. **Does this explain "why" not just "what"?**
22
- - Good: Historical context, gotchas, non-obvious behavior
23
- - Bad: What functions do, how files are structured
24
-
25
- 3. **Would this have prevented a past mistake?**
26
- - If you can point to a bug or confusion this would have prevented → create it
27
- - If it's just "nice to know" → skip it
28
-
29
- ## Creating the Rule
30
-
31
11
  Read `.codeyam/rules/instructions.md` for detailed guidance on structure and formatting.
32
12
 
33
13
  If the instructions file doesn't exist, copy it from `codeyam-cli/templates/rules-instructions.md`.
34
-
35
- ### Quick Template
36
-
37
- ```markdown
38
- ---
39
- paths:
40
- - 'specific/path/**/*.ts'
41
- category: architecture | testing | faq
42
- timestamp: [CURRENT_ISO_TIMESTAMP]
43
- ---
44
-
45
- ## [Clear, Descriptive Title]
46
-
47
- [What's the gotcha/insight/non-obvious thing?]
48
-
49
- ### Why This Matters
50
-
51
- [What would go wrong if someone didn't know this?]
52
- ```
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ UserPromptSubmit hook: surfaces rule-reflection notifications to the main session.
4
+
5
+ The background rule-reflection agents write summaries to notification files
6
+ in /tmp/claude-rule-markers/ when they create or update rules.
7
+ This hook checks for those files on each user message, prints them to stdout
8
+ (which Claude sees as injected context), and deletes them.
9
+
10
+ Supports three notification files (legacy combined + split agents):
11
+ - rule-notification.md (legacy/backward-compat)
12
+ - rule-notification-stale.md (stale rules agent)
13
+ - rule-notification-conversation.md (conversation review agent)
14
+ """
15
+
16
+ import os
17
+ import sys
18
+
19
+ MARKER_DIR = '/tmp/claude-rule-markers'
20
+ NOTIFICATION_FILES = [
21
+ 'rule-notification.md',
22
+ 'rule-notification-stale.md',
23
+ 'rule-notification-conversation.md',
24
+ ]
25
+
26
+
27
+ def main():
28
+ collected = []
29
+
30
+ for filename in NOTIFICATION_FILES:
31
+ filepath = os.path.join(MARKER_DIR, filename)
32
+ if not os.path.exists(filepath):
33
+ continue
34
+
35
+ try:
36
+ with open(filepath, 'r') as f:
37
+ content = f.read().strip()
38
+ except IOError:
39
+ continue
40
+
41
+ if content:
42
+ collected.append(content)
43
+
44
+ try:
45
+ os.remove(filepath)
46
+ except OSError:
47
+ pass
48
+
49
+ if collected:
50
+ print('\n\n'.join(collected))
51
+
52
+
53
+ if __name__ == '__main__':
54
+ main()