@codeyam/codeyam-cli 0.1.0-staging.6e699e5 → 0.1.0-staging.79ef713

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 (437) 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 +7 -7
  4. package/analyzer-template/packages/ai/index.ts +10 -2
  5. package/analyzer-template/packages/ai/package.json +2 -2
  6. package/analyzer-template/packages/ai/src/lib/analyzeScope.ts +86 -18
  7. package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +67 -9
  8. package/analyzer-template/packages/ai/src/lib/astScopes/methodSemantics.ts +41 -17
  9. package/analyzer-template/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.ts +10 -17
  10. package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +308 -50
  11. package/analyzer-template/packages/ai/src/lib/astScopes/types.ts +15 -6
  12. package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +833 -243
  13. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.ts +5 -1
  14. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.ts +16 -3
  15. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.ts +6 -4
  16. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.ts +54 -3
  17. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.ts +60 -15
  18. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.ts +70 -0
  19. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.ts +80 -5
  20. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.ts +179 -0
  21. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.ts +40 -30
  22. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.ts +393 -97
  23. package/analyzer-template/packages/ai/src/lib/generateEntityDataStructure.ts +58 -3
  24. package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +283 -1
  25. package/analyzer-template/packages/ai/src/lib/generateEntityScenarios.ts +9 -5
  26. package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +11 -3
  27. package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.ts +1 -1
  28. package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionals.ts +297 -7
  29. package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.ts +1 -1
  30. package/analyzer-template/packages/ai/src/lib/isolateScopes.ts +51 -3
  31. package/analyzer-template/packages/ai/src/lib/mergeStatements.ts +90 -96
  32. package/analyzer-template/packages/ai/src/lib/promptGenerators/gatherAttributesMap.ts +10 -7
  33. package/analyzer-template/packages/ai/src/lib/resolvePathToControllable.ts +25 -13
  34. package/analyzer-template/packages/ai/src/lib/worker/SerializableDataStructure.ts +4 -3
  35. package/analyzer-template/packages/ai/src/lib/worker/analyzeScopeWorker.ts +114 -2
  36. package/analyzer-template/packages/analyze/index.ts +2 -0
  37. package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +65 -59
  38. package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +113 -26
  39. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.ts +19 -0
  40. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.ts +19 -0
  41. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllExports.ts +11 -0
  42. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.ts +8 -0
  43. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.ts +49 -1
  44. package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.ts +2 -1
  45. package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +71 -9
  46. package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +19 -4
  47. package/analyzer-template/packages/analyze/src/lib/files/analyze/dependencyResolver.ts +6 -0
  48. package/analyzer-template/packages/analyze/src/lib/files/analyze/gatherEntityMap.ts +4 -2
  49. package/analyzer-template/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.ts +0 -3
  50. package/analyzer-template/packages/analyze/src/lib/files/analyzeRemixRoute.ts +4 -5
  51. package/analyzer-template/packages/analyze/src/lib/files/getImportedExports.ts +14 -12
  52. package/analyzer-template/packages/analyze/src/lib/files/scenarios/TransformationTracer.ts +1315 -0
  53. package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.ts +61 -13
  54. package/analyzer-template/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.ts +37 -0
  55. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +229 -19
  56. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +117 -9
  57. package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +459 -39
  58. package/analyzer-template/packages/analyze/src/lib/files/scenarios/propagateArrayItemSchemas.ts +474 -0
  59. package/analyzer-template/packages/analyze/src/lib/files/setImportedExports.ts +2 -1
  60. package/analyzer-template/packages/analyze/src/lib/index.ts +1 -0
  61. package/analyzer-template/packages/analyze/src/lib/utils/getFileByPath.ts +19 -0
  62. package/analyzer-template/packages/aws/package.json +1 -1
  63. package/analyzer-template/packages/database/package.json +1 -1
  64. package/analyzer-template/packages/database/src/lib/kysely/db.ts +8 -1
  65. package/analyzer-template/packages/database/src/lib/kysely/tables/commitsTable.ts +6 -0
  66. package/analyzer-template/packages/database/src/lib/loadAnalyses.ts +58 -1
  67. package/analyzer-template/packages/database/src/lib/loadAnalysis.ts +13 -0
  68. package/analyzer-template/packages/database/src/lib/loadBranch.ts +16 -1
  69. package/analyzer-template/packages/database/src/lib/loadCommit.ts +11 -0
  70. package/analyzer-template/packages/database/src/lib/loadCommits.ts +28 -0
  71. package/analyzer-template/packages/database/src/lib/loadEntities.ts +26 -3
  72. package/analyzer-template/packages/database/src/lib/loadEntityBranches.ts +12 -0
  73. package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +7 -14
  74. package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts.map +1 -1
  75. package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js +8 -1
  76. package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js.map +1 -1
  77. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.d.ts +1 -0
  78. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.d.ts.map +1 -1
  79. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.js +3 -0
  80. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.js.map +1 -1
  81. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.d.ts +2 -0
  82. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.d.ts.map +1 -1
  83. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.js +45 -2
  84. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalyses.js.map +1 -1
  85. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.d.ts.map +1 -1
  86. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js +8 -0
  87. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js.map +1 -1
  88. package/analyzer-template/packages/github/dist/database/src/lib/loadBranch.js +11 -1
  89. package/analyzer-template/packages/github/dist/database/src/lib/loadBranch.js.map +1 -1
  90. package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.d.ts.map +1 -1
  91. package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.js +7 -0
  92. package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.js.map +1 -1
  93. package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts +3 -1
  94. package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts.map +1 -1
  95. package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js +22 -1
  96. package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js.map +1 -1
  97. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts +3 -1
  98. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts.map +1 -1
  99. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js +23 -4
  100. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js.map +1 -1
  101. package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.d.ts.map +1 -1
  102. package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.js +9 -0
  103. package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.js.map +1 -1
  104. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts +2 -2
  105. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts.map +1 -1
  106. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js +5 -4
  107. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
  108. package/analyzer-template/packages/github/dist/types/src/types/Commit.d.ts +2 -0
  109. package/analyzer-template/packages/github/dist/types/src/types/Commit.d.ts.map +1 -1
  110. package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts +3 -0
  111. package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
  112. package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts +5 -5
  113. package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
  114. package/analyzer-template/packages/github/dist/types/src/types/ScopeAnalysis.d.ts +6 -1
  115. package/analyzer-template/packages/github/dist/types/src/types/ScopeAnalysis.d.ts.map +1 -1
  116. package/analyzer-template/packages/github/package.json +1 -1
  117. package/analyzer-template/packages/types/src/types/Commit.ts +2 -0
  118. package/analyzer-template/packages/types/src/types/ProjectMetadata.ts +1 -0
  119. package/analyzer-template/packages/types/src/types/ScenariosDataStructure.ts +6 -5
  120. package/analyzer-template/packages/types/src/types/ScopeAnalysis.ts +6 -1
  121. package/analyzer-template/packages/utils/dist/types/src/types/Commit.d.ts +2 -0
  122. package/analyzer-template/packages/utils/dist/types/src/types/Commit.d.ts.map +1 -1
  123. package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts +3 -0
  124. package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
  125. package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts +5 -5
  126. package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
  127. package/analyzer-template/packages/utils/dist/types/src/types/ScopeAnalysis.d.ts +6 -1
  128. package/analyzer-template/packages/utils/dist/types/src/types/ScopeAnalysis.d.ts.map +1 -1
  129. package/analyzer-template/playwright/capture.ts +20 -8
  130. package/analyzer-template/playwright/captureStatic.ts +1 -1
  131. package/analyzer-template/project/analyzeBaselineCommit.ts +5 -0
  132. package/analyzer-template/project/analyzeRegularCommit.ts +5 -0
  133. package/analyzer-template/project/captureLibraryFunctionDirect.ts +29 -26
  134. package/analyzer-template/project/constructMockCode.ts +90 -10
  135. package/analyzer-template/project/createEntitiesAndSortFiles.ts +83 -0
  136. package/analyzer-template/project/loadReadyToBeCaptured.ts +65 -41
  137. package/analyzer-template/project/orchestrateCapture/AwsCaptureTaskRunner.ts +12 -4
  138. package/analyzer-template/project/orchestrateCapture/SequentialCaptureTaskRunner.ts +11 -6
  139. package/analyzer-template/project/orchestrateCapture/taskRunner.ts +4 -2
  140. package/analyzer-template/project/orchestrateCapture.ts +45 -6
  141. package/analyzer-template/project/start.ts +35 -11
  142. package/analyzer-template/project/writeMockDataTsx.ts +181 -8
  143. package/analyzer-template/project/writeScenarioComponents.ts +103 -12
  144. package/analyzer-template/project/writeSimpleRoot.ts +21 -11
  145. package/analyzer-template/scripts/comboWorkerLoop.cjs +98 -50
  146. package/background/src/lib/virtualized/project/analyzeBaselineCommit.js +5 -0
  147. package/background/src/lib/virtualized/project/analyzeBaselineCommit.js.map +1 -1
  148. package/background/src/lib/virtualized/project/analyzeRegularCommit.js +5 -0
  149. package/background/src/lib/virtualized/project/analyzeRegularCommit.js.map +1 -1
  150. package/background/src/lib/virtualized/project/captureLibraryFunctionDirect.js +3 -3
  151. package/background/src/lib/virtualized/project/captureLibraryFunctionDirect.js.map +1 -1
  152. package/background/src/lib/virtualized/project/constructMockCode.js +75 -4
  153. package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
  154. package/background/src/lib/virtualized/project/createEntitiesAndSortFiles.js +73 -1
  155. package/background/src/lib/virtualized/project/createEntitiesAndSortFiles.js.map +1 -1
  156. package/background/src/lib/virtualized/project/loadReadyToBeCaptured.js +19 -8
  157. package/background/src/lib/virtualized/project/loadReadyToBeCaptured.js.map +1 -1
  158. package/background/src/lib/virtualized/project/orchestrateCapture/AwsCaptureTaskRunner.js +2 -2
  159. package/background/src/lib/virtualized/project/orchestrateCapture/AwsCaptureTaskRunner.js.map +1 -1
  160. package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js +4 -4
  161. package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js.map +1 -1
  162. package/background/src/lib/virtualized/project/orchestrateCapture.js +38 -6
  163. package/background/src/lib/virtualized/project/orchestrateCapture.js.map +1 -1
  164. package/background/src/lib/virtualized/project/start.js +32 -11
  165. package/background/src/lib/virtualized/project/start.js.map +1 -1
  166. package/background/src/lib/virtualized/project/writeMockDataTsx.js +162 -4
  167. package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
  168. package/background/src/lib/virtualized/project/writeScenarioComponents.js +85 -15
  169. package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
  170. package/background/src/lib/virtualized/project/writeSimpleRoot.js +21 -11
  171. package/background/src/lib/virtualized/project/writeSimpleRoot.js.map +1 -1
  172. package/codeyam-cli/scripts/apply-setup.js +180 -0
  173. package/codeyam-cli/scripts/apply-setup.js.map +1 -1
  174. package/codeyam-cli/src/cli.js +2 -0
  175. package/codeyam-cli/src/cli.js.map +1 -1
  176. package/codeyam-cli/src/commands/debug.js +7 -5
  177. package/codeyam-cli/src/commands/debug.js.map +1 -1
  178. package/codeyam-cli/src/commands/memory.js +264 -0
  179. package/codeyam-cli/src/commands/memory.js.map +1 -0
  180. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +2 -2
  181. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
  182. package/codeyam-cli/src/utils/analysisRunner.js +21 -2
  183. package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
  184. package/codeyam-cli/src/utils/backgroundServer.js +4 -0
  185. package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
  186. package/codeyam-cli/src/utils/install-skills.js +55 -10
  187. package/codeyam-cli/src/utils/install-skills.js.map +1 -1
  188. package/codeyam-cli/src/utils/queue/job.js +4 -0
  189. package/codeyam-cli/src/utils/queue/job.js.map +1 -1
  190. package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js +82 -0
  191. package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js.map +1 -0
  192. package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js +230 -0
  193. package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js.map +1 -0
  194. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js +67 -0
  195. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js.map +1 -0
  196. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js +105 -0
  197. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js.map +1 -0
  198. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js +34 -0
  199. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js.map +1 -0
  200. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js +162 -0
  201. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js.map +1 -0
  202. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js +75 -0
  203. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js.map +1 -0
  204. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js +285 -0
  205. package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js.map +1 -0
  206. package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js +115 -0
  207. package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js.map +1 -0
  208. package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js +127 -0
  209. package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js.map +1 -0
  210. package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js +50 -0
  211. package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js.map +1 -0
  212. package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js +116 -0
  213. package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js.map +1 -0
  214. package/codeyam-cli/src/utils/ruleReflection/index.js +5 -0
  215. package/codeyam-cli/src/utils/ruleReflection/index.js.map +1 -0
  216. package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js +44 -0
  217. package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js.map +1 -0
  218. package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js +85 -0
  219. package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js.map +1 -0
  220. package/codeyam-cli/src/utils/ruleReflection/types.js +5 -0
  221. package/codeyam-cli/src/utils/ruleReflection/types.js.map +1 -0
  222. package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js +293 -0
  223. package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js.map +1 -0
  224. package/codeyam-cli/src/utils/rules/index.js +6 -0
  225. package/codeyam-cli/src/utils/rules/index.js.map +1 -0
  226. package/codeyam-cli/src/utils/rules/parser.js +78 -0
  227. package/codeyam-cli/src/utils/rules/parser.js.map +1 -0
  228. package/codeyam-cli/src/utils/rules/pathMatcher.js +18 -0
  229. package/codeyam-cli/src/utils/rules/pathMatcher.js.map +1 -0
  230. package/codeyam-cli/src/utils/rules/ruleState.js +150 -0
  231. package/codeyam-cli/src/utils/rules/ruleState.js.map +1 -0
  232. package/codeyam-cli/src/utils/rules/staleness.js +137 -0
  233. package/codeyam-cli/src/utils/rules/staleness.js.map +1 -0
  234. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +1 -1
  235. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
  236. package/codeyam-cli/src/webserver/app/lib/database.js +7 -3
  237. package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
  238. package/codeyam-cli/src/webserver/build/client/assets/CopyButton-CA3JxPb7.js +1 -0
  239. package/codeyam-cli/src/webserver/build/client/assets/EntityItem-B86KKU7e.js +11 -0
  240. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-DLqD3qNt.js → EntityTypeBadge-B5ctlSYt.js} +1 -1
  241. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-Ba2JVPzP.js → EntityTypeIcon-BqY8gDAW.js} +1 -1
  242. package/codeyam-cli/src/webserver/build/client/assets/{InlineSpinner-C8lyxW9k.js → InlineSpinner-ClaLpuOo.js} +1 -1
  243. package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-aht4aafF.js → InteractivePreview-BDhPilK7.js} +2 -2
  244. package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-CVtiBnY5.js → LibraryFunctionPreview-VeqEBv9v.js} +1 -1
  245. package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-B0GLXMsr.js → LoadingDots-Bs7Nn1Jr.js} +1 -1
  246. package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-xgeCVgSM.js → LogViewer-Bm3PmcCz.js} +1 -1
  247. package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-D4TZhLuw.js → ReportIssueModal-C6PKeMYR.js} +3 -13
  248. package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-DuDvi0jm.js → SafeScreenshot-Gq3Ocjo6.js} +1 -1
  249. package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-DEx02QDa.js → ScenarioViewer-BNLaXBHR.js} +3 -3
  250. package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-DyFZkK0l.js → TruncatedFilePath-CiwXDxLh.js} +1 -1
  251. package/codeyam-cli/src/webserver/build/client/assets/{_index-BwqWJOgH.js → _index-B3TDXxnk.js} +1 -1
  252. package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-DoLIqZX2.js → activity.(_tab)-BtBFH820.js} +6 -16
  253. package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-DfKzxuoe.js +11 -0
  254. package/codeyam-cli/src/webserver/build/client/assets/api.memory-profile-l0sNRNKZ.js +1 -0
  255. package/codeyam-cli/src/webserver/build/client/assets/api.save-fixture-l0sNRNKZ.js +1 -0
  256. package/codeyam-cli/src/webserver/build/client/assets/book-open-PttOB2SF.js +6 -0
  257. package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-Cx24_aWc.js → chevron-down-TJp6ofnp.js} +1 -1
  258. package/codeyam-cli/src/webserver/build/client/assets/{chunk-EPOLDU6W-CXRTFQ3F.js → chunk-JZWAC4HX-JE9ZIoBl.js} +12 -12
  259. package/codeyam-cli/src/webserver/build/client/assets/{circle-check-BOARzkeR.js → circle-check-CXhHQYrI.js} +1 -1
  260. package/codeyam-cli/src/webserver/build/client/assets/copy-6y9ALfGT.js +11 -0
  261. package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-BdhJEx6B.js → createLucideIcon-Ca9fAY46.js} +1 -1
  262. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-C5lqplTC.js +1 -0
  263. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-C2N4Op8e.js → entity._sha._-n38keI1k.js} +10 -10
  264. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha.scenarios._scenarioId.fullscreen-DavjRmOY.js → entity._sha.scenarios._scenarioId.fullscreen-CBoafmVs.js} +1 -1
  265. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.create-scenario-D1T4TGjf.js → entity._sha_.create-scenario-DGgZjdFg.js} +1 -1
  266. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-CTBG2mmz.js → entity._sha_.edit._scenarioId-38yPijoD.js} +1 -1
  267. package/codeyam-cli/src/webserver/build/client/assets/{entry.client-CS2cb_eZ.js → entry.client-BSHEfydn.js} +1 -1
  268. package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-DMJ7zii9.js → fileTableUtils-DCPhhSMo.js} +1 -1
  269. package/codeyam-cli/src/webserver/build/client/assets/files-0N0YJQv7.js +1 -0
  270. package/codeyam-cli/src/webserver/build/client/assets/{git-B4RJRvYB.js → git-DXnyr8uP.js} +8 -8
  271. package/codeyam-cli/src/webserver/build/client/assets/globals-Bh6jH0cL.css +1 -0
  272. package/codeyam-cli/src/webserver/build/client/assets/{index-lzqtyFU8.js → index-CcsFv748.js} +1 -1
  273. package/codeyam-cli/src/webserver/build/client/assets/{index-B1h680n5.js → index-ChN9-fAY.js} +1 -1
  274. package/codeyam-cli/src/webserver/build/client/assets/labs-CdVUfvji.js +1 -0
  275. package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-B7B9V-bu.js → loader-circle-CTqLEAGU.js} +1 -1
  276. package/codeyam-cli/src/webserver/build/client/assets/manifest-87319d0f.js +1 -0
  277. package/codeyam-cli/src/webserver/build/client/assets/memory-CPIDnDEj.js +76 -0
  278. package/codeyam-cli/src/webserver/build/client/assets/pause-D6vreykR.js +11 -0
  279. package/codeyam-cli/src/webserver/build/client/assets/root-D6oziHts.js +62 -0
  280. package/codeyam-cli/src/webserver/build/client/assets/{search-CxXUmBSd.js → search-B8VUL8nl.js} +1 -1
  281. package/codeyam-cli/src/webserver/build/client/assets/{settings-CS5f3WzT.js → settings-eBI36Yv5.js} +1 -1
  282. package/codeyam-cli/src/webserver/build/client/assets/{simulations-DwFIBT09.js → simulations-CPoAg7Zo.js} +1 -1
  283. package/codeyam-cli/src/webserver/build/client/assets/terminal-BrCP7uQo.js +11 -0
  284. package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-B6LgvRJg.js → triangle-alert-BZz2NjYa.js} +1 -1
  285. package/codeyam-cli/src/webserver/build/client/assets/{useCustomSizes-C1v1PQzo.js → useCustomSizes-DNwUduNu.js} +1 -1
  286. package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-aSv48UbS.js → useLastLogLine-COky1GVF.js} +1 -1
  287. package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-DYxHZQuP.js → useReportContext-CpZgwliL.js} +1 -1
  288. package/codeyam-cli/src/webserver/build/client/assets/{useToast-mBRpZPiu.js → useToast-Bv9JFvUO.js} +1 -1
  289. package/codeyam-cli/src/webserver/build/server/assets/index-9ox9LcrG.js +1 -0
  290. package/codeyam-cli/src/webserver/build/server/assets/server-build-Cq5Vqcob.js +260 -0
  291. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  292. package/codeyam-cli/src/webserver/build-info.json +5 -5
  293. package/codeyam-cli/templates/{codeyam-power-rules-hook.sh → codeyam-memory-hook.sh} +12 -13
  294. package/codeyam-cli/templates/codeyam:diagnose.md +178 -25
  295. package/codeyam-cli/templates/codeyam:memory.md +404 -0
  296. package/codeyam-cli/templates/codeyam:new-rule.md +2 -2
  297. package/codeyam-cli/templates/rule-notification-hook.py +56 -0
  298. package/codeyam-cli/templates/rule-reflection-hook.py +590 -0
  299. package/codeyam-cli/templates/rules-instructions.md +123 -0
  300. package/package.json +8 -6
  301. package/packages/ai/index.js +3 -2
  302. package/packages/ai/index.js.map +1 -1
  303. package/packages/ai/src/lib/analyzeScope.js +68 -13
  304. package/packages/ai/src/lib/analyzeScope.js.map +1 -1
  305. package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +54 -8
  306. package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
  307. package/packages/ai/src/lib/astScopes/methodSemantics.js +41 -17
  308. package/packages/ai/src/lib/astScopes/methodSemantics.js.map +1 -1
  309. package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js +10 -14
  310. package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js.map +1 -1
  311. package/packages/ai/src/lib/astScopes/processExpression.js +239 -43
  312. package/packages/ai/src/lib/astScopes/processExpression.js.map +1 -1
  313. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +650 -166
  314. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
  315. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js +5 -1
  316. package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js.map +1 -1
  317. package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js +13 -3
  318. package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js.map +1 -1
  319. package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js +6 -4
  320. package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js.map +1 -1
  321. package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js +52 -3
  322. package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js.map +1 -1
  323. package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js +55 -11
  324. package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js.map +1 -1
  325. package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js +63 -0
  326. package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js.map +1 -0
  327. package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js +73 -5
  328. package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js.map +1 -1
  329. package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js +173 -0
  330. package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js.map +1 -0
  331. package/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.js +37 -20
  332. package/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.js.map +1 -1
  333. package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js +333 -86
  334. package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js.map +1 -1
  335. package/packages/ai/src/lib/generateEntityDataStructure.js +46 -2
  336. package/packages/ai/src/lib/generateEntityDataStructure.js.map +1 -1
  337. package/packages/ai/src/lib/generateEntityScenarioData.js +205 -1
  338. package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
  339. package/packages/ai/src/lib/generateEntityScenarios.js +7 -1
  340. package/packages/ai/src/lib/generateEntityScenarios.js.map +1 -1
  341. package/packages/ai/src/lib/generateExecutionFlows.js +10 -2
  342. package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -1
  343. package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js +209 -3
  344. package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js.map +1 -1
  345. package/packages/ai/src/lib/isolateScopes.js +39 -3
  346. package/packages/ai/src/lib/isolateScopes.js.map +1 -1
  347. package/packages/ai/src/lib/mergeStatements.js +70 -51
  348. package/packages/ai/src/lib/mergeStatements.js.map +1 -1
  349. package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js +10 -4
  350. package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js.map +1 -1
  351. package/packages/ai/src/lib/resolvePathToControllable.js +24 -14
  352. package/packages/ai/src/lib/resolvePathToControllable.js.map +1 -1
  353. package/packages/ai/src/lib/worker/SerializableDataStructure.js.map +1 -1
  354. package/packages/ai/src/lib/worker/analyzeScopeWorker.js +94 -1
  355. package/packages/ai/src/lib/worker/analyzeScopeWorker.js.map +1 -1
  356. package/packages/analyze/index.js +1 -0
  357. package/packages/analyze/index.js.map +1 -1
  358. package/packages/analyze/src/lib/FileAnalyzer.js +60 -36
  359. package/packages/analyze/src/lib/FileAnalyzer.js.map +1 -1
  360. package/packages/analyze/src/lib/ProjectAnalyzer.js +96 -26
  361. package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
  362. package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js +14 -0
  363. package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js.map +1 -1
  364. package/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.js +14 -0
  365. package/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.js.map +1 -1
  366. package/packages/analyze/src/lib/asts/sourceFiles/getAllExports.js +6 -0
  367. package/packages/analyze/src/lib/asts/sourceFiles/getAllExports.js.map +1 -1
  368. package/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.js +6 -0
  369. package/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.js.map +1 -1
  370. package/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.js +39 -1
  371. package/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.js.map +1 -1
  372. package/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.js +2 -1
  373. package/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.js.map +1 -1
  374. package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +54 -6
  375. package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
  376. package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +17 -4
  377. package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
  378. package/packages/analyze/src/lib/files/analyze/dependencyResolver.js +5 -0
  379. package/packages/analyze/src/lib/files/analyze/dependencyResolver.js.map +1 -1
  380. package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js +2 -1
  381. package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js.map +1 -1
  382. package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js +0 -3
  383. package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js.map +1 -1
  384. package/packages/analyze/src/lib/files/analyzeRemixRoute.js +3 -2
  385. package/packages/analyze/src/lib/files/analyzeRemixRoute.js.map +1 -1
  386. package/packages/analyze/src/lib/files/getImportedExports.js +11 -7
  387. package/packages/analyze/src/lib/files/getImportedExports.js.map +1 -1
  388. package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js +880 -0
  389. package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js.map +1 -0
  390. package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js +56 -10
  391. package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js.map +1 -1
  392. package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js +33 -8
  393. package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js.map +1 -1
  394. package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +150 -17
  395. package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
  396. package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +56 -8
  397. package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -1
  398. package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +399 -31
  399. package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
  400. package/packages/analyze/src/lib/files/setImportedExports.js +2 -1
  401. package/packages/analyze/src/lib/files/setImportedExports.js.map +1 -1
  402. package/packages/analyze/src/lib/index.js +1 -0
  403. package/packages/analyze/src/lib/index.js.map +1 -1
  404. package/packages/analyze/src/lib/utils/getFileByPath.js +12 -0
  405. package/packages/analyze/src/lib/utils/getFileByPath.js.map +1 -0
  406. package/packages/database/src/lib/kysely/db.js +8 -1
  407. package/packages/database/src/lib/kysely/db.js.map +1 -1
  408. package/packages/database/src/lib/kysely/tables/commitsTable.js +3 -0
  409. package/packages/database/src/lib/kysely/tables/commitsTable.js.map +1 -1
  410. package/packages/database/src/lib/loadAnalyses.js +45 -2
  411. package/packages/database/src/lib/loadAnalyses.js.map +1 -1
  412. package/packages/database/src/lib/loadAnalysis.js +8 -0
  413. package/packages/database/src/lib/loadAnalysis.js.map +1 -1
  414. package/packages/database/src/lib/loadBranch.js +11 -1
  415. package/packages/database/src/lib/loadBranch.js.map +1 -1
  416. package/packages/database/src/lib/loadCommit.js +7 -0
  417. package/packages/database/src/lib/loadCommit.js.map +1 -1
  418. package/packages/database/src/lib/loadCommits.js +22 -1
  419. package/packages/database/src/lib/loadCommits.js.map +1 -1
  420. package/packages/database/src/lib/loadEntities.js +23 -4
  421. package/packages/database/src/lib/loadEntities.js.map +1 -1
  422. package/packages/database/src/lib/loadEntityBranches.js +9 -0
  423. package/packages/database/src/lib/loadEntityBranches.js.map +1 -1
  424. package/packages/database/src/lib/updateCommitMetadata.js +5 -4
  425. package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
  426. package/codeyam-cli/src/webserver/build/client/assets/EntityItem-BXhEawa3.js +0 -1
  427. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BRb-0kQl.js +0 -1
  428. package/codeyam-cli/src/webserver/build/client/assets/files-Cs4MdYtv.js +0 -1
  429. package/codeyam-cli/src/webserver/build/client/assets/git-commit-horizontal-CysbcZxi.js +0 -6
  430. package/codeyam-cli/src/webserver/build/client/assets/globals-DMUaGAqV.css +0 -1
  431. package/codeyam-cli/src/webserver/build/client/assets/manifest-f874c610.js +0 -1
  432. package/codeyam-cli/src/webserver/build/client/assets/root-Bz5TunQg.js +0 -57
  433. package/codeyam-cli/src/webserver/build/client/assets/rules-hEkvVw2-.js +0 -97
  434. package/codeyam-cli/src/webserver/build/server/assets/index-967OuJoF.js +0 -1
  435. package/codeyam-cli/src/webserver/build/server/assets/server-build-DRTmerg9.js +0 -257
  436. package/codeyam-cli/templates/codeyam:power-rules.md +0 -447
  437. /package/codeyam-cli/src/webserver/build/client/assets/{api.rules-l0sNRNKZ.js → api.agent-transcripts-l0sNRNKZ.js} +0 -0
@@ -1 +1 @@
1
- import{Y as G,M as H,N as I,W as J,O as K,R as L,T as Z,V as _,U as $,X as rr,Q as tr}from"./assets/server-build-DRTmerg9.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"react-syntax-highlighter";import"react-syntax-highlighter/dist/cjs/styles/prism/index.js";import"node:crypto";import"v8";import"react-markdown";import"react-diff-viewer-continued";export{G as assets,H as assetsBuildDirectory,I as basename,J as entry,K as future,L as isSpaMode,Z as prerender,_ as publicPath,$ as routeDiscovery,rr as routes,tr 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-Cq5Vqcob.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-01-27T18:34:59.371Z",
3
- "buildTime": 1769538899371,
4
- "buildNumber": 542,
5
- "semanticVersion": "0.1.542",
6
- "version": "0.1.542 (2026-01-27T18:34)"
2
+ "buildTimestamp": "2026-02-09T23:40:30.053Z",
3
+ "buildTime": 1770680430053,
4
+ "buildNumber": 618,
5
+ "semanticVersion": "0.1.618",
6
+ "version": "0.1.618 (2026-02-09T23:40)"
7
7
  }
@@ -1,9 +1,9 @@
1
1
  #!/bin/bash
2
- # CodeYam Power Rules - Pre-commit Hook (BLOCKING)
2
+ # CodeYam Memory - Pre-commit Hook (BLOCKING)
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
@@ -177,7 +176,7 @@ done < <(find "$RULES_DIR" -name "*.md" -type f 2>/dev/null)
177
176
  if [ -n "$OUTDATED_RULES" ]; then
178
177
  echo ""
179
178
  echo "================================================================"
180
- echo " Power Rules: Outdated Documentation Detected"
179
+ echo " Claude Rules (Codeyam Memory): Outdated Documentation Detected"
181
180
  echo "================================================================"
182
181
  echo ""
183
182
  echo " The following rules have timestamps older than the code"
@@ -186,11 +185,11 @@ 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
- echo " Or run: /codeyam:power-rules to review all rules"
192
+ echo " Or ask Claude to \"run \`codeyam memory status\` and follow the instructions.\""
194
193
  echo ""
195
194
  echo "================================================================"
196
195
  echo ""
@@ -23,6 +23,34 @@ When a user asks to debug a scenario or analysis (e.g., `/codeyam:diagnose [ID]`
23
23
 
24
24
  Stopping after identifying a bug category without capturing screenshots defeats the purpose of debugging.
25
25
 
26
+ ## Critical: Persistence and User Communication
27
+
28
+ **DO NOT give up prematurely.** Every issue can be fixed by editing files in the tmp folder. If you find yourself thinking:
29
+
30
+ - "This requires an engine-level fix"
31
+ - "This is blocked by a code generation bug"
32
+ - "The engine doesn't properly handle X"
33
+
34
+ **STOP.** These statements are incorrect. You have full access to edit any file in `/tmp/codeyam/local-dev/{slug}/project/`. The "engine" just wrote those files—they're plain TypeScript/JavaScript that you can edit directly.
35
+
36
+ ### Before Stopping or Concluding
37
+
38
+ 1. **Try at least 3 different approaches** to fix the issue
39
+ 2. **Never unilaterally decide to stop.** If you've been debugging and aren't making progress, ASK THE USER:
40
+ > "I've tried X, Y, and Z but haven't resolved the issue yet. Would you like me to continue investigating other approaches, or should I document what I've found so far?"
41
+ 3. **Only stop when the user agrees** or when you've successfully captured quality screenshots
42
+
43
+ ### The "Engine Bug" Misconception
44
+
45
+ When you identify a Category 4 issue (code generation bug), this does NOT mean you're blocked. It means:
46
+
47
+ - The bug is in how CodeYam generates code (useful info for the CodeYam team)
48
+ - You MUST still fix it manually by editing files in the tmp folder
49
+ - You MUST still capture quality screenshots
50
+ - You document what you fixed so the CodeYam team can improve the engine
51
+
52
+ **"Engine bug" is a diagnosis category, not an excuse to stop.**
53
+
26
54
  ---
27
55
 
28
56
  ## Debug Flow Summary
@@ -34,11 +62,12 @@ Stopping after identifying a bug category without capturing screenshots defeats
34
62
  │ Retrieve the analysis id to use in the debug command │
35
63
  │ │ │
36
64
  │ ▼ │
37
- │ Step 1: codeyam debug [ANALYSIS ID] (generates files to inspect)
38
- Step 2: Identify error type from logs/output
39
- │ Step 3: Diagnose root cause category (1-4)
40
- │ Step 4: Attempt fix (database edit or universal mock)
41
- │ Step 5: Verify locally (curl returns 200)
65
+ │ Step 1: Copy the logs to a temporary location (see below). |
66
+ | Step 2: codeyam debug [ANALYSIS ID] (generates files to inspect)
67
+ │ Step 3: Identify error type from logs/output
68
+ │ Step 4: Diagnose root cause category (1-4)
69
+ │ Step 5: Attempt fix (database edit or universal mock)
70
+ │ Step 6: Verify locally (curl returns 200) │
42
71
  │ │ │
43
72
  │ ┌─────────┴─────────┐ │
44
73
  │ ▼ ▼ │
@@ -52,12 +81,12 @@ Stopping after identifying a bug category without capturing screenshots defeats
52
81
  │ │ Verify without regenerating │
53
82
  │ │ │ │
54
83
  │ ▼ ▼ │
55
- │ Step 6: Recapture Step 6: Recapture --capture-only │
84
+ │ Step 7: Recapture Step 7: Recapture --capture-only │
56
85
  │ (normal) (preserves file fixes) │
57
86
  │ │ │ │
58
87
  │ └─────────┬─────────┘ │
59
88
  │ ▼ │
60
- │ Step 7: Verify screenshots (check for client-side errors) │
89
+ │ Step 8: Verify screenshots (check for client-side errors) │
61
90
  │ │ │
62
91
  │ ▼ │
63
92
  │ Verify ALL files exist on disk │
@@ -68,18 +97,128 @@ Stopping after identifying a bug category without capturing screenshots defeats
68
97
  └─────────────────────────────────────────────────────────────────────┘
69
98
  ```
70
99
 
100
+ **Logs:** Before debugging copy the original logs to a temorary location as the debugging will overwrite these logs and they are valuable for debugging issues.
101
+
102
+ Original Logs Locaion: `/tmp/codeyam/local-dev/{slug}/codeyam/logs.txt`
103
+ Temporary location: `/tmp/codeyam/local-dev/{slug}/debug/original-logs.txt`
104
+
71
105
  **Notice:** Both paths lead to "Recapture" and "Verify screenshots". There is no path that ends after just identifying a bug category. You must always capture quality screenshots before completing.
72
106
 
73
107
  ---
74
108
 
109
+ ## MANDATORY: Session Context (Do This First!)
110
+
111
+ Long debugging sessions cause context loss. To prevent forgetting critical information:
112
+
113
+ ### Step 1: Create Session Context File
114
+
115
+ At the **very start** of debugging, create `.codeyam/debug-session.md` in the **original project directory**:
116
+
117
+ ```markdown
118
+ # Debug Session Context
119
+
120
+ **IMPORTANT**: Keep a todo item "📍 Re-read debug session context" that is NEVER marked complete.
121
+ If the todo disappears, add it back immediately.
122
+
123
+ ## Key Locations
124
+
125
+ - **Original project**: [FULL PATH - run all codeyam commands here]
126
+ - **Tmp folder**: /tmp/codeyam/local-dev/[SLUG]/project (edit files here, do NOT run codeyam commands)
127
+ - **Database**: [ORIGINAL PROJECT]/.codeyam/db.sqlite3
128
+ - **Logs**: /tmp/codeyam/local-dev/[SLUG]/codeyam/log.txt
129
+
130
+ ## IDs
131
+
132
+ - **Analysis ID**: [ID]
133
+ - **Scenario ID**: [ID]
134
+ - **Entity**: [NAME] at [FILE PATH]
135
+
136
+ ## URLs (fill in after running codeyam debug)
137
+
138
+ - **Scenario URL**: http://localhost:[PORT]/static/codeyam-sample
139
+ - **Dev server port**: [PORT from codeyam debug output]
140
+
141
+ ## Commands Reference
142
+
143
+ All commands run from: [ORIGINAL PROJECT PATH]
144
+
145
+ - `codeyam debug [ANALYSIS_ID]` - regenerate files (overwrites tmp folder!)
146
+ - `codeyam recapture [ID]` - regenerate AND capture (overwrites tmp folder!)
147
+ - `codeyam recapture [ID] --capture-only` - capture WITHOUT regenerating (preserves your edits)
148
+ - `codeyam test-startup` - test startup (overwrites tmp folder!)
149
+ ```
150
+
151
+ ### Step 2: Create Persistent Todo
152
+
153
+ Use TodoWrite to create this todo list with the first item being a persistent reminder:
154
+
155
+ ```
156
+ 📍 Re-read .codeyam/debug-session.md before any codeyam command (NEVER complete this)
157
+ ```
158
+
159
+ **CRITICAL**: The first todo item must NEVER be marked as completed. It serves as a constant reminder to check your session context before running commands. If you accidentally complete it or it disappears, add it back immediately.
160
+
161
+ ### Step 3: Read Context Before Actions
162
+
163
+ **Before running ANY of these commands**, re-read `.codeyam/debug-session.md`:
164
+
165
+ - `codeyam debug`
166
+ - `codeyam recapture`
167
+ - `codeyam test-startup`
168
+ - Any database queries
169
+
170
+ This prevents running commands from the wrong directory or forgetting key IDs.
171
+
172
+ ---
173
+
174
+ ## Critical: Where to Run Commands
175
+
176
+ **All `codeyam` commands MUST be run from the ORIGINAL PROJECT DIRECTORY**, not from the tmp folder.
177
+
178
+ | Location | What's There | Run Commands Here? |
179
+ | ---------------------------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------- |
180
+ | **Original project** (e.g., `/Users/.../clients-codeyam/boltwise/app`) | Database (`.codeyam/db.sqlite3`), config, universal mocks | **YES - run all codeyam commands here** |
181
+ | **Tmp folder** (`/tmp/codeyam/local-dev/{slug}/project/`) | Copy of project with mock injections, generated scenario files | **NO - only edit files here, don't run commands** |
182
+
183
+ **Common mistake:** Running `codeyam recapture` from the tmp folder. This will fail with "Not in a CodeYam project" because the database doesn't exist there.
184
+
185
+ ```bash
186
+ # WRONG - running from tmp folder
187
+ cd /tmp/codeyam/local-dev/boltwise-app/project
188
+ codeyam recapture abc123 # ❌ Fails: "Not in a CodeYam project"
189
+
190
+ # CORRECT - running from original project directory
191
+ cd /Users/jaredcosulich/workspace/codeyam/clients-codeyam/boltwise/app
192
+ codeyam recapture abc123 # ✅ Works
193
+ ```
194
+
195
+ **Workflow:**
196
+
197
+ 1. Edit files in `/tmp/codeyam/local-dev/{slug}/project/` to fix issues
198
+ 2. Test by curling the dev server running from the tmp folder
199
+ 3. **Switch back to the original project directory** to run `codeyam recapture`
200
+
201
+ ---
202
+
75
203
  ## What You Can and Cannot Modify
76
204
 
77
205
  **NEVER modify the client's original source code in the workspace.** Only modify files in the tmp folder.
78
206
 
207
+ ### CRITICAL: Fix the Mocks, Never the Client Code
208
+
209
+ When debugging errors, the fix is ALWAYS in the mock data or mock code—never in the client's components or application code.
210
+
211
+ **If a component crashes due to unexpected data:**
212
+
213
+ - Fix the mock data to provide what the component expects
214
+ - Do NOT modify the component to handle the bad data
215
+
216
+ **The client's code is sacred.** Our job is to make the simulation environment correct, not to "improve" or "harden" the client's code. Even if a component could be more defensive, that's not our fix to make.
217
+
79
218
  **You CAN modify:**
80
219
 
81
- - Data in the local SQLite database (`.codeyam/db.sqlite3`)
82
- - Universal mocks in `.codeyam/universal-mocks`
220
+ - Data in the local SQLite database (`.codeyam/db.sqlite3`) - in the **original project directory**
221
+ - Universal mocks in `.codeyam/universal-mocks` - in the **original project directory**
83
222
  - **Files in `/tmp/codeyam/local-dev/{slug}/project/`** - These are temporary copies used for simulation
84
223
  - Generated mock files in `__codeyamMocks__/` directories
85
224
  - Layout/route files that wrap scenarios
@@ -168,12 +307,12 @@ This is the most important step. Determine WHERE in the pipeline the bug origina
168
307
 
169
308
  ### The 4 Error Categories
170
309
 
171
- | Category | What's Wrong | Where to Check | Fixable Locally? |
172
- | -------- | ---------------------------------------------------- | ------------------------- | ---------------------- |
173
- | **1** | Missing attribute in `isolatedDataStructure` | `entities.metadata` | Sometimes (re-analyze) |
174
- | **2** | Attribute not merged into `mergedDataStructure` | `analyses.metadata` | Sometimes (re-analyze) |
175
- | **3** | Data structure complete, but scenario data wrong | `scenarios.metadata` | Yes (edit mockData) |
176
- | **4** | Data complete, but mock code/mock data written wrong | Generated files in `/tmp` | **No (engine bug)** |
310
+ | Category | What's Wrong | Where to Check | Fixable Locally? |
311
+ | -------- | ---------------------------------------------------- | ------------------------- | ----------------------------- |
312
+ | **1** | Missing attribute in `isolatedDataStructure` | `entities.metadata` | Sometimes (re-analyze) |
313
+ | **2** | Attribute not merged into `mergedDataStructure` | `analyses.metadata` | Sometimes (re-analyze) |
314
+ | **3** | Data structure complete, but scenario data wrong | `scenarios.metadata` | Yes (edit mockData) |
315
+ | **4** | Data complete, but mock code/mock data written wrong | Generated files in `/tmp` | **Yes (edit files directly)** |
177
316
 
178
317
  ### Diagnostic Queries
179
318
 
@@ -212,7 +351,7 @@ sqlite3 .codeyam/db.sqlite3 \
212
351
  6. **Check generated mock code** - Is the mock code syntactically/semantically correct? If wrong → **Category 4 (engine bug)**
213
352
  7. **Check generated imports** - Are the imports correct? Are entities containing environment variables mocked out? If wrong → **Category 4 (engine bug)**
214
353
 
215
- ### Category 4 Indicators (Engine Bug)
354
+ ### Category 4 Indicators (Code Generation Issue)
216
355
 
217
356
  The issue is Category 4 if:
218
357
 
@@ -221,11 +360,15 @@ The issue is Category 4 if:
221
360
  - BUT the generated mock code has syntax errors, wrong structure, or doesn't match the data
222
361
  - Database edits don't fix the generated code (it regenerates wrong)
223
362
 
224
- **IMPORTANT: Identifying Category 4 is NOT the end of debugging.** You must still:
363
+ **Category 4 does NOT mean you are blocked.** You have full access to fix these issues:
225
364
 
226
- 1. Fix the code manually in the tmp folder
227
- 2. Capture quality screenshots with `--capture-only`
228
- 3. Document what you fixed for the CodeYam team
365
+ 1. **Edit the files directly** in `/tmp/codeyam/local-dev/{slug}/project/`
366
+ 2. **Fix any syntax errors, wrong imports, missing mocks** - these are just TypeScript files
367
+ 3. **Restart the dev server** and verify the fix works
368
+ 4. **Capture quality screenshots** with `codeyam recapture --capture-only`
369
+ 5. **Document what you fixed** for the CodeYam team to improve the engine
370
+
371
+ The term "engine bug" means the CodeYam code generation has a bug—it does NOT mean you cannot fix the issue locally. You always can.
229
372
 
230
373
  ---
231
374
 
@@ -345,7 +488,9 @@ After making **database changes** (Categories 1-3):
345
488
 
346
489
  ## Step 5a: Fix Code Issues in Tmp Folder (Category 4)
347
490
 
348
- If the error is in bad imports, generated code or mock files, you can fix them directly in the tmp folder:
491
+ If the error is in bad imports, generated code or mock files, you can fix them directly in the tmp folder.
492
+
493
+ **REMINDER: Only fix GENERATED files (mocks, layouts, routes)—never the client's application code.** If a client component crashes, the fix is in the mock data or mock code, not in the component itself.
349
494
 
350
495
  ### Locate the Problematic File
351
496
 
@@ -384,11 +529,19 @@ cd /tmp/codeyam/local-dev/{slug}/project
384
529
  npm run dev # or pnpm dev / yarn dev
385
530
  ```
386
531
 
387
- Then curl the scenario URL to verify the fix works:
532
+ Then verify the fix works. You can either:
388
533
 
389
- ```bash
390
- curl -s http://localhost:3112/static/codeyam-sample | head -50
391
- ```
534
+ 1. **Curl the URL** to check for errors:
535
+
536
+ ```bash
537
+ curl -s http://localhost:3112/static/codeyam-sample | head -50
538
+ ```
539
+
540
+ 2. **Ask the user to verify visually**: If the fix involves visual output or you're unsure if it worked, ask the user to visit the URL and confirm:
541
+
542
+ > "I've fixed the mock data. Can you visit http://localhost:3112/static/codeyam-sample and let me know if the component renders correctly now?"
543
+
544
+ This is especially useful for client-side rendering issues that curl won't catch.
392
545
 
393
546
  ---
394
547