@codeyam/codeyam-cli 0.1.0-staging.ae0de75 → 0.1.0-staging.b147f46

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 (571) hide show
  1. package/analyzer-template/.build-info.json +8 -8
  2. package/analyzer-template/log.txt +3 -3
  3. package/analyzer-template/package.json +7 -7
  4. package/analyzer-template/packages/ai/package.json +1 -1
  5. package/analyzer-template/packages/ai/src/lib/astScopes/methodSemantics.ts +135 -0
  6. package/analyzer-template/packages/ai/src/lib/astScopes/nodeToSource.ts +19 -0
  7. package/analyzer-template/packages/ai/src/lib/astScopes/paths.ts +11 -4
  8. package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +36 -9
  9. package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/ParentScopeManager.ts +10 -3
  10. package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.ts +16 -6
  11. package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +0 -33
  12. package/analyzer-template/packages/analyze/index.ts +4 -1
  13. package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +13 -7
  14. package/analyzer-template/packages/analyze/src/lib/asts/index.ts +7 -2
  15. package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +28 -2
  16. package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +5 -36
  17. package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +10 -6
  18. package/analyzer-template/packages/analyze/src/lib/files/analyze/gatherEntityMap.ts +9 -12
  19. package/analyzer-template/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.ts +21 -0
  20. package/analyzer-template/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.ts +82 -10
  21. package/analyzer-template/packages/analyze/src/lib/files/analyzeChange.ts +4 -0
  22. package/analyzer-template/packages/analyze/src/lib/files/analyzeInitial.ts +4 -0
  23. package/analyzer-template/packages/analyze/src/lib/files/analyzeNextRoute.ts +8 -3
  24. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +239 -58
  25. package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +0 -98
  26. package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +1684 -1462
  27. package/analyzer-template/packages/aws/package.json +2 -2
  28. package/analyzer-template/packages/database/package.json +2 -2
  29. package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +102 -0
  30. package/analyzer-template/packages/database/src/lib/loadAnalysis.ts +19 -15
  31. package/analyzer-template/packages/database/src/lib/loadEntities.ts +0 -6
  32. package/analyzer-template/packages/database/src/lib/loadEntity.ts +19 -8
  33. package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +0 -65
  34. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +9 -0
  35. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -1
  36. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +104 -0
  37. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -1
  38. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.d.ts.map +1 -1
  39. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js +1 -1
  40. package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js.map +1 -1
  41. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts.map +1 -1
  42. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js +0 -6
  43. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js.map +1 -1
  44. package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.d.ts +4 -1
  45. package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.d.ts.map +1 -1
  46. package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.js +5 -5
  47. package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.js.map +1 -1
  48. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts.map +1 -1
  49. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js +0 -25
  50. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
  51. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts +2 -0
  52. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
  53. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js +2 -0
  54. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js.map +1 -1
  55. package/analyzer-template/packages/types/src/enums/ProjectFramework.ts +2 -0
  56. package/analyzer-template/packages/ui-components/package.json +1 -1
  57. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts +2 -0
  58. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
  59. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js +2 -0
  60. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js.map +1 -1
  61. package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.d.ts +3 -1
  62. package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.d.ts.map +1 -1
  63. package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js +22 -1
  64. package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js.map +1 -1
  65. package/analyzer-template/packages/utils/src/lib/fs/rsyncCopy.ts +27 -0
  66. package/analyzer-template/project/analyzeFileEntities.ts +26 -0
  67. package/background/src/lib/virtualized/project/analyzeFileEntities.js +22 -0
  68. package/background/src/lib/virtualized/project/analyzeFileEntities.js.map +1 -1
  69. package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js +196 -0
  70. package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js.map +1 -0
  71. package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js +114 -0
  72. package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js.map +1 -0
  73. package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js +149 -0
  74. package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js.map +1 -0
  75. package/codeyam-cli/src/cli.js +24 -0
  76. package/codeyam-cli/src/cli.js.map +1 -1
  77. package/codeyam-cli/src/commands/__tests__/editor.analyzeImportsArgs.test.js +47 -0
  78. package/codeyam-cli/src/commands/__tests__/editor.analyzeImportsArgs.test.js.map +1 -0
  79. package/codeyam-cli/src/commands/__tests__/editor.auditNoAutoAnalysis.test.js +71 -0
  80. package/codeyam-cli/src/commands/__tests__/editor.auditNoAutoAnalysis.test.js.map +1 -0
  81. package/codeyam-cli/src/commands/__tests__/editor.isolateArgs.test.js +51 -0
  82. package/codeyam-cli/src/commands/__tests__/editor.isolateArgs.test.js.map +1 -0
  83. package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js +56 -0
  84. package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js.map +1 -0
  85. package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js +101 -47
  86. package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js.map +1 -1
  87. package/codeyam-cli/src/commands/default.js +3 -46
  88. package/codeyam-cli/src/commands/default.js.map +1 -1
  89. package/codeyam-cli/src/commands/editor.js +4654 -836
  90. package/codeyam-cli/src/commands/editor.js.map +1 -1
  91. package/codeyam-cli/src/commands/editorAnalyzeImportsArgs.js +23 -0
  92. package/codeyam-cli/src/commands/editorAnalyzeImportsArgs.js.map +1 -0
  93. package/codeyam-cli/src/commands/editorIsolateArgs.js +25 -0
  94. package/codeyam-cli/src/commands/editorIsolateArgs.js.map +1 -0
  95. package/codeyam-cli/src/commands/init.js +69 -34
  96. package/codeyam-cli/src/commands/init.js.map +1 -1
  97. package/codeyam-cli/src/commands/telemetry.js +37 -0
  98. package/codeyam-cli/src/commands/telemetry.js.map +1 -0
  99. package/codeyam-cli/src/data/techStacks.js +77 -0
  100. package/codeyam-cli/src/data/techStacks.js.map +1 -0
  101. package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js +173 -0
  102. package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js.map +1 -0
  103. package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js +46 -0
  104. package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js.map +1 -0
  105. package/codeyam-cli/src/utils/__tests__/devServerState.test.js +134 -0
  106. package/codeyam-cli/src/utils/__tests__/devServerState.test.js.map +1 -0
  107. package/codeyam-cli/src/utils/__tests__/editorApi.test.js +137 -0
  108. package/codeyam-cli/src/utils/__tests__/editorApi.test.js.map +1 -0
  109. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +3769 -1
  110. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -1
  111. package/codeyam-cli/src/utils/__tests__/editorBroadcastViewport.test.js +76 -0
  112. package/codeyam-cli/src/utils/__tests__/editorBroadcastViewport.test.js.map +1 -0
  113. package/codeyam-cli/src/utils/__tests__/editorCapture.test.js +93 -0
  114. package/codeyam-cli/src/utils/__tests__/editorCapture.test.js.map +1 -0
  115. package/codeyam-cli/src/utils/__tests__/editorCaptureScenarioSeeding.test.js +137 -0
  116. package/codeyam-cli/src/utils/__tests__/editorCaptureScenarioSeeding.test.js.map +1 -0
  117. package/codeyam-cli/src/utils/__tests__/editorDeleteScenario.test.js +100 -0
  118. package/codeyam-cli/src/utils/__tests__/editorDeleteScenario.test.js.map +1 -0
  119. package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js +181 -3
  120. package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js.map +1 -1
  121. package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js +194 -0
  122. package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js.map +1 -0
  123. package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js +381 -0
  124. package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js.map +1 -0
  125. package/codeyam-cli/src/utils/__tests__/editorGuardMiddleware.test.js +67 -0
  126. package/codeyam-cli/src/utils/__tests__/editorGuardMiddleware.test.js.map +1 -0
  127. package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js +294 -0
  128. package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js.map +1 -0
  129. package/codeyam-cli/src/utils/__tests__/editorJournal.test.js +249 -2
  130. package/codeyam-cli/src/utils/__tests__/editorJournal.test.js.map +1 -1
  131. package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js +594 -0
  132. package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js.map +1 -0
  133. package/codeyam-cli/src/utils/__tests__/editorMigration.test.js +435 -0
  134. package/codeyam-cli/src/utils/__tests__/editorMigration.test.js.map +1 -0
  135. package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js +118 -1
  136. package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js.map +1 -1
  137. package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +217 -3
  138. package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -1
  139. package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js +153 -0
  140. package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js.map +1 -0
  141. package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js +139 -0
  142. package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js.map +1 -0
  143. package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js +291 -0
  144. package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js.map +1 -0
  145. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +1694 -2
  146. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -1
  147. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js +329 -0
  148. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js.map +1 -0
  149. package/codeyam-cli/src/utils/__tests__/editorSeedAdapterPrismaValidation.test.js +143 -0
  150. package/codeyam-cli/src/utils/__tests__/editorSeedAdapterPrismaValidation.test.js.map +1 -0
  151. package/codeyam-cli/src/utils/__tests__/editorSessionFilter.test.js +66 -0
  152. package/codeyam-cli/src/utils/__tests__/editorSessionFilter.test.js.map +1 -0
  153. package/codeyam-cli/src/utils/__tests__/editorShouldRevalidate.test.js +53 -0
  154. package/codeyam-cli/src/utils/__tests__/editorShouldRevalidate.test.js.map +1 -0
  155. package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js +2121 -0
  156. package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js.map +1 -0
  157. package/codeyam-cli/src/utils/__tests__/glossaryAdd.test.js +177 -0
  158. package/codeyam-cli/src/utils/__tests__/glossaryAdd.test.js.map +1 -0
  159. package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js +122 -0
  160. package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js.map +1 -0
  161. package/codeyam-cli/src/utils/__tests__/manualEntityAnalysis.test.js +302 -0
  162. package/codeyam-cli/src/utils/__tests__/manualEntityAnalysis.test.js.map +1 -0
  163. package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js +129 -0
  164. package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js.map +1 -0
  165. package/codeyam-cli/src/utils/__tests__/registerScenarioResult.test.js +127 -0
  166. package/codeyam-cli/src/utils/__tests__/registerScenarioResult.test.js.map +1 -0
  167. package/codeyam-cli/src/utils/__tests__/routePatternMatching.test.js +118 -0
  168. package/codeyam-cli/src/utils/__tests__/routePatternMatching.test.js.map +1 -0
  169. package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js +284 -0
  170. package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js.map +1 -0
  171. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js +672 -0
  172. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js.map +1 -0
  173. package/codeyam-cli/src/utils/__tests__/screenshotHash.test.js +84 -0
  174. package/codeyam-cli/src/utils/__tests__/screenshotHash.test.js.map +1 -0
  175. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +26 -5
  176. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
  177. package/codeyam-cli/src/utils/__tests__/telemetry.test.js +159 -0
  178. package/codeyam-cli/src/utils/__tests__/telemetry.test.js.map +1 -0
  179. package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js +51 -0
  180. package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js.map +1 -0
  181. package/codeyam-cli/src/utils/__tests__/testRunner.test.js +217 -0
  182. package/codeyam-cli/src/utils/__tests__/testRunner.test.js.map +1 -0
  183. package/codeyam-cli/src/utils/__tests__/webappDetection.test.js +142 -0
  184. package/codeyam-cli/src/utils/__tests__/webappDetection.test.js.map +1 -0
  185. package/codeyam-cli/src/utils/analysisRunner.js +39 -8
  186. package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
  187. package/codeyam-cli/src/utils/analyzer.js +19 -0
  188. package/codeyam-cli/src/utils/analyzer.js.map +1 -1
  189. package/codeyam-cli/src/utils/analyzerFinalization.js +100 -0
  190. package/codeyam-cli/src/utils/analyzerFinalization.js.map +1 -0
  191. package/codeyam-cli/src/utils/backgroundServer.js +95 -19
  192. package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
  193. package/codeyam-cli/src/utils/database.js +37 -2
  194. package/codeyam-cli/src/utils/database.js.map +1 -1
  195. package/codeyam-cli/src/utils/devServerState.js +71 -0
  196. package/codeyam-cli/src/utils/devServerState.js.map +1 -0
  197. package/codeyam-cli/src/utils/editorApi.js +79 -0
  198. package/codeyam-cli/src/utils/editorApi.js.map +1 -0
  199. package/codeyam-cli/src/utils/editorAudit.js +753 -8
  200. package/codeyam-cli/src/utils/editorAudit.js.map +1 -1
  201. package/codeyam-cli/src/utils/editorBroadcastViewport.js +26 -0
  202. package/codeyam-cli/src/utils/editorBroadcastViewport.js.map +1 -0
  203. package/codeyam-cli/src/utils/editorCapture.js +102 -0
  204. package/codeyam-cli/src/utils/editorCapture.js.map +1 -0
  205. package/codeyam-cli/src/utils/editorDeleteScenario.js +67 -0
  206. package/codeyam-cli/src/utils/editorDeleteScenario.js.map +1 -0
  207. package/codeyam-cli/src/utils/editorDevServer.js +100 -1
  208. package/codeyam-cli/src/utils/editorDevServer.js.map +1 -1
  209. package/codeyam-cli/src/utils/editorEntityChangeStatus.js +50 -0
  210. package/codeyam-cli/src/utils/editorEntityChangeStatus.js.map +1 -0
  211. package/codeyam-cli/src/utils/editorEntityHelpers.js +144 -0
  212. package/codeyam-cli/src/utils/editorEntityHelpers.js.map +1 -0
  213. package/codeyam-cli/src/utils/editorGuard.js +36 -0
  214. package/codeyam-cli/src/utils/editorGuard.js.map +1 -0
  215. package/codeyam-cli/src/utils/editorImageVerifier.js +155 -0
  216. package/codeyam-cli/src/utils/editorImageVerifier.js.map +1 -0
  217. package/codeyam-cli/src/utils/editorJournal.js +92 -4
  218. package/codeyam-cli/src/utils/editorJournal.js.map +1 -1
  219. package/codeyam-cli/src/utils/editorLoaderHelpers.js +152 -0
  220. package/codeyam-cli/src/utils/editorLoaderHelpers.js.map +1 -0
  221. package/codeyam-cli/src/utils/editorMigration.js +224 -0
  222. package/codeyam-cli/src/utils/editorMigration.js.map +1 -0
  223. package/codeyam-cli/src/utils/editorMockState.js +1 -1
  224. package/codeyam-cli/src/utils/editorPreloadHelpers.js +72 -1
  225. package/codeyam-cli/src/utils/editorPreloadHelpers.js.map +1 -1
  226. package/codeyam-cli/src/utils/editorPreview.js +74 -1
  227. package/codeyam-cli/src/utils/editorPreview.js.map +1 -1
  228. package/codeyam-cli/src/utils/editorRecapture.js +109 -0
  229. package/codeyam-cli/src/utils/editorRecapture.js.map +1 -0
  230. package/codeyam-cli/src/utils/editorScenarioSwitch.js +134 -0
  231. package/codeyam-cli/src/utils/editorScenarioSwitch.js.map +1 -0
  232. package/codeyam-cli/src/utils/editorScenarios.js +620 -0
  233. package/codeyam-cli/src/utils/editorScenarios.js.map +1 -1
  234. package/codeyam-cli/src/utils/editorSeedAdapter.js +462 -0
  235. package/codeyam-cli/src/utils/editorSeedAdapter.js.map +1 -0
  236. package/codeyam-cli/src/utils/editorShouldRevalidate.js +21 -0
  237. package/codeyam-cli/src/utils/editorShouldRevalidate.js.map +1 -0
  238. package/codeyam-cli/src/utils/entityChangeStatus.js +394 -0
  239. package/codeyam-cli/src/utils/entityChangeStatus.js.map +1 -0
  240. package/codeyam-cli/src/utils/entityChangeStatus.server.js +212 -0
  241. package/codeyam-cli/src/utils/entityChangeStatus.server.js.map +1 -0
  242. package/codeyam-cli/src/utils/fileWatcher.js +38 -0
  243. package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
  244. package/codeyam-cli/src/utils/glossaryAdd.js +74 -0
  245. package/codeyam-cli/src/utils/glossaryAdd.js.map +1 -0
  246. package/codeyam-cli/src/utils/install-skills.js +15 -1
  247. package/codeyam-cli/src/utils/install-skills.js.map +1 -1
  248. package/codeyam-cli/src/utils/manualEntityAnalysis.js +196 -0
  249. package/codeyam-cli/src/utils/manualEntityAnalysis.js.map +1 -0
  250. package/codeyam-cli/src/utils/parseRegisterArg.js +31 -0
  251. package/codeyam-cli/src/utils/parseRegisterArg.js.map +1 -0
  252. package/codeyam-cli/src/utils/progress.js +2 -2
  253. package/codeyam-cli/src/utils/progress.js.map +1 -1
  254. package/codeyam-cli/src/utils/queue/job.js +26 -5
  255. package/codeyam-cli/src/utils/queue/job.js.map +1 -1
  256. package/codeyam-cli/src/utils/registerScenarioResult.js +52 -0
  257. package/codeyam-cli/src/utils/registerScenarioResult.js.map +1 -0
  258. package/codeyam-cli/src/utils/routePatternMatching.js +129 -0
  259. package/codeyam-cli/src/utils/routePatternMatching.js.map +1 -0
  260. package/codeyam-cli/src/utils/scenarioCoverage.js +77 -0
  261. package/codeyam-cli/src/utils/scenarioCoverage.js.map +1 -0
  262. package/codeyam-cli/src/utils/scenariosManifest.js +307 -0
  263. package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -0
  264. package/codeyam-cli/src/utils/screenshotHash.js +26 -0
  265. package/codeyam-cli/src/utils/screenshotHash.js.map +1 -0
  266. package/codeyam-cli/src/utils/serverState.js +30 -0
  267. package/codeyam-cli/src/utils/serverState.js.map +1 -1
  268. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +47 -16
  269. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
  270. package/codeyam-cli/src/utils/simulationGateMiddleware.js +17 -1
  271. package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -1
  272. package/codeyam-cli/src/utils/slugUtils.js +25 -0
  273. package/codeyam-cli/src/utils/slugUtils.js.map +1 -0
  274. package/codeyam-cli/src/utils/syncMocksMiddleware.js +2 -2
  275. package/codeyam-cli/src/utils/syncMocksMiddleware.js.map +1 -1
  276. package/codeyam-cli/src/utils/telemetry.js +106 -0
  277. package/codeyam-cli/src/utils/telemetry.js.map +1 -0
  278. package/codeyam-cli/src/utils/telemetryMiddleware.js +22 -0
  279. package/codeyam-cli/src/utils/telemetryMiddleware.js.map +1 -0
  280. package/codeyam-cli/src/utils/testRunner.js +199 -1
  281. package/codeyam-cli/src/utils/testRunner.js.map +1 -1
  282. package/codeyam-cli/src/utils/webappDetection.js +21 -0
  283. package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
  284. package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js +35 -0
  285. package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js.map +1 -0
  286. package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js +107 -0
  287. package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js.map +1 -0
  288. package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js +647 -0
  289. package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js.map +1 -0
  290. package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js +283 -0
  291. package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js.map +1 -0
  292. package/codeyam-cli/src/webserver/__tests__/stripClaudeCommand.test.js +135 -0
  293. package/codeyam-cli/src/webserver/__tests__/stripClaudeCommand.test.js.map +1 -0
  294. package/codeyam-cli/src/webserver/app/lib/clientErrors.js +86 -0
  295. package/codeyam-cli/src/webserver/app/lib/clientErrors.js.map +1 -0
  296. package/codeyam-cli/src/webserver/app/lib/git.js +397 -0
  297. package/codeyam-cli/src/webserver/app/lib/git.js.map +1 -0
  298. package/codeyam-cli/src/webserver/app/types/editor.js +8 -0
  299. package/codeyam-cli/src/webserver/app/types/editor.js.map +1 -0
  300. package/codeyam-cli/src/webserver/backgroundServer.js +60 -61
  301. package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
  302. package/codeyam-cli/src/webserver/build/client/assets/CopyButton-CLe80MMu.js +1 -0
  303. package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-C76mRRiF.js → EntityItem-Crt_KN_U.js} +5 -5
  304. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeBadge-CQgyEGV-.js +1 -0
  305. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-CobE682z.js → EntityTypeIcon-CD7lGABo.js} +9 -9
  306. package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-CgTNOhnu.js +1 -0
  307. package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-CKeQT5Ty.js +25 -0
  308. package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-D3s1MFkb.js +3 -0
  309. package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-BU_OAEMP.js → LoadingDots-By5zI316.js} +1 -1
  310. package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-ceAyBX-H.js → LogViewer-CM5zg40N.js} +3 -3
  311. package/codeyam-cli/src/webserver/build/client/assets/MiniClaudeChat-CQENLSrF.js +36 -0
  312. package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-djPLI-WV.js → ReportIssueModal-C2PLkej3.js} +4 -4
  313. package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-DanvyBPb.js +1 -0
  314. package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-B76aig_2.js → ScenarioViewer-DUMfcNVK.js} +3 -3
  315. package/codeyam-cli/src/webserver/build/client/assets/Spinner-D0LgAaSa.js +34 -0
  316. package/codeyam-cli/src/webserver/build/client/assets/TruncatedFilePath-CK7-NaPZ.js +1 -0
  317. package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-BA_Ry-rs.js +1 -0
  318. package/codeyam-cli/src/webserver/build/client/assets/{_index-C96V0n15.js → _index-BAWd-Xjf.js} +4 -4
  319. package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-BpKzcsJz.js → activity.(_tab)-BOARiB-g.js} +8 -8
  320. package/codeyam-cli/src/webserver/build/client/assets/addon-canvas-DpzMmAy5.js +1 -0
  321. package/codeyam-cli/src/webserver/build/client/assets/addon-fit-YJmn1quW.js +12 -0
  322. package/codeyam-cli/src/webserver/build/client/assets/{addon-web-links-Duc5hnl7.js → addon-web-links-CHx25PAe.js} +1 -1
  323. package/codeyam-cli/src/webserver/build/client/assets/addon-webgl-DI8QOUvO.js +58 -0
  324. package/codeyam-cli/src/webserver/build/client/assets/{agent-transcripts-D9hemwl6.js → agent-transcripts-Bg3e7q4S.js} +7 -7
  325. package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-diff-l0sNRNKZ.js +1 -0
  326. package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-l0sNRNKZ.js +1 -0
  327. package/codeyam-cli/src/webserver/build/client/assets/api.editor-project-info-l0sNRNKZ.js +1 -0
  328. package/codeyam-cli/src/webserver/build/client/assets/api.editor-recapture-stale-l0sNRNKZ.js +1 -0
  329. package/codeyam-cli/src/webserver/build/client/assets/api.editor-rename-scenario-l0sNRNKZ.js +1 -0
  330. package/codeyam-cli/src/webserver/build/client/assets/api.editor-save-scenario-data-l0sNRNKZ.js +1 -0
  331. package/codeyam-cli/src/webserver/build/client/assets/api.editor-save-seed-state-l0sNRNKZ.js +1 -0
  332. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-coverage-l0sNRNKZ.js +1 -0
  333. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-prompt-l0sNRNKZ.js +1 -0
  334. package/codeyam-cli/src/webserver/build/client/assets/api.editor-schema-l0sNRNKZ.js +1 -0
  335. package/codeyam-cli/src/webserver/build/client/assets/api.editor-session-l0sNRNKZ.js +1 -0
  336. package/codeyam-cli/src/webserver/build/client/assets/{book-open-D_nMCFmP.js → book-open-CL-lMgHh.js} +2 -2
  337. package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-BH2h1Ea2.js → chevron-down-GmAjGS9-.js} +2 -2
  338. package/codeyam-cli/src/webserver/build/client/assets/chunk-JZWAC4HX-BAdwhyCx.js +43 -0
  339. package/codeyam-cli/src/webserver/build/client/assets/{circle-check-DyIKORY6.js → circle-check-DFcQkN5j.js} +2 -2
  340. package/codeyam-cli/src/webserver/build/client/assets/{copy-NDbZjXao.js → copy-C6iF61Xs.js} +3 -3
  341. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-4ImjHTVC.js +41 -0
  342. package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-Coe5NhbS.js +1 -0
  343. package/codeyam-cli/src/webserver/build/client/assets/{cy-logo-cli-CCKUIm0S.svg → cy-logo-cli-DoA97ML3.svg} +2 -2
  344. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-C8y4mmyv.js +1 -0
  345. package/codeyam-cli/src/webserver/build/client/assets/editor._tab-Gbk_i5Js.js +1 -0
  346. package/codeyam-cli/src/webserver/build/client/assets/editor.entity.(_sha)-DMv5ESGo.js +96 -0
  347. package/codeyam-cli/src/webserver/build/client/assets/editorPreview-CluPkvXJ.js +41 -0
  348. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-CrjR3zZW.js → entity._sha._-ByHz6rAQ.js} +14 -13
  349. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-CmLO432x.js +6 -0
  350. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-Bz9sCUF_.js +6 -0
  351. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-DQM8E7L4.js +6 -0
  352. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-BMvVHNXU.js → entity._sha_.edit._scenarioId-CAoXLsQr.js} +2 -2
  353. package/codeyam-cli/src/webserver/build/client/assets/{entry.client-DTvKq3TY.js → entry.client-SuW9syRS.js} +6 -6
  354. package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-Daa96Fr1.js +1 -0
  355. package/codeyam-cli/src/webserver/build/client/assets/files-D-xGrg29.js +1 -0
  356. package/codeyam-cli/src/webserver/build/client/assets/git-Bq_fbXP5.js +1 -0
  357. package/codeyam-cli/src/webserver/build/client/assets/globals-oyPmV37k.css +1 -0
  358. package/codeyam-cli/src/webserver/build/client/assets/{index-BcvgDzbZ.js → index-Bp1l4hSv.js} +1 -1
  359. package/codeyam-cli/src/webserver/build/client/assets/{index-10oVnAAH.js → index-CWV9XZiG.js} +1 -1
  360. package/codeyam-cli/src/webserver/build/client/assets/index-DE3jI_dv.js +15 -0
  361. package/codeyam-cli/src/webserver/build/client/assets/jsx-runtime-D_zvdyIk.js +9 -0
  362. package/codeyam-cli/src/webserver/build/client/assets/labs-B_IX45ih.js +1 -0
  363. package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-BAXYRVEO.js → loader-circle-De-7qQ2u.js} +2 -2
  364. package/codeyam-cli/src/webserver/build/client/assets/manifest-1a45e154.js +1 -0
  365. package/codeyam-cli/src/webserver/build/client/assets/memory-Cx2xEx7s.js +101 -0
  366. package/codeyam-cli/src/webserver/build/client/assets/{pause-DTAcYxBt.js → pause-CFxEKL1u.js} +3 -3
  367. package/codeyam-cli/src/webserver/build/client/assets/root-D2_tktnk.js +80 -0
  368. package/codeyam-cli/src/webserver/build/client/assets/{search-fKo7v0Zo.js → search-BdBb5aqc.js} +2 -2
  369. package/codeyam-cli/src/webserver/build/client/assets/settings-DdE-Untf.js +1 -0
  370. package/codeyam-cli/src/webserver/build/client/assets/simulations-DSCdE99u.js +1 -0
  371. package/codeyam-cli/src/webserver/build/client/assets/{terminal-BG4heKCG.js → terminal-CrplD4b1.js} +3 -3
  372. package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-DtSmdtM4.js → triangle-alert-DqJ0j69l.js} +2 -2
  373. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-DhXHbEjP.js +1 -0
  374. package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-C14nCb1q.js → useLastLogLine-BNd5hYuW.js} +1 -1
  375. package/codeyam-cli/src/webserver/build/client/assets/useReportContext-Cy5Qg_UR.js +1 -0
  376. package/codeyam-cli/src/webserver/build/client/assets/useToast-5HR2j9ZE.js +1 -0
  377. package/codeyam-cli/src/webserver/build/client/sound-test.html +98 -0
  378. package/codeyam-cli/src/webserver/build/server/assets/analysisRunner-By5slFjw.js +16 -0
  379. package/codeyam-cli/src/webserver/build/server/assets/index-DXaOwBnm.js +1 -0
  380. package/codeyam-cli/src/webserver/build/server/assets/init-CLG1LjQM.js +10 -0
  381. package/codeyam-cli/src/webserver/build/server/assets/progress-CHTtrxFG.js +1 -0
  382. package/codeyam-cli/src/webserver/build/server/assets/server-build-NZmUqQv6.js +688 -0
  383. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  384. package/codeyam-cli/src/webserver/build-info.json +5 -5
  385. package/codeyam-cli/src/webserver/editorProxy.js +638 -50
  386. package/codeyam-cli/src/webserver/editorProxy.js.map +1 -1
  387. package/codeyam-cli/src/webserver/idleDetector.js +121 -0
  388. package/codeyam-cli/src/webserver/idleDetector.js.map +1 -0
  389. package/codeyam-cli/src/webserver/mockStateEvents.js +28 -0
  390. package/codeyam-cli/src/webserver/mockStateEvents.js.map +1 -0
  391. package/codeyam-cli/src/webserver/public/sound-test.html +98 -0
  392. package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +242 -3
  393. package/codeyam-cli/src/webserver/scripts/journalCapture.ts +147 -4
  394. package/codeyam-cli/src/webserver/server.js +169 -16
  395. package/codeyam-cli/src/webserver/server.js.map +1 -1
  396. package/codeyam-cli/src/webserver/terminalServer.js +321 -49
  397. package/codeyam-cli/src/webserver/terminalServer.js.map +1 -1
  398. package/codeyam-cli/templates/__tests__/editor-step-hook.prompt-capture.test.ts +118 -0
  399. package/codeyam-cli/templates/chrome-extension-react/EXTENSION_SETUP.md +75 -0
  400. package/codeyam-cli/templates/chrome-extension-react/README.md +46 -0
  401. package/codeyam-cli/templates/chrome-extension-react/gitignore +15 -0
  402. package/codeyam-cli/templates/chrome-extension-react/index.html +12 -0
  403. package/codeyam-cli/templates/chrome-extension-react/package.json +27 -0
  404. package/codeyam-cli/templates/chrome-extension-react/popup.html +12 -0
  405. package/codeyam-cli/templates/chrome-extension-react/public/manifest.json +15 -0
  406. package/codeyam-cli/templates/chrome-extension-react/src/background/service-worker.ts +7 -0
  407. package/codeyam-cli/templates/chrome-extension-react/src/globals.css +6 -0
  408. package/codeyam-cli/templates/chrome-extension-react/src/lib/storage.ts +37 -0
  409. package/codeyam-cli/templates/chrome-extension-react/src/popup/App.tsx +12 -0
  410. package/codeyam-cli/templates/chrome-extension-react/src/popup/main.tsx +10 -0
  411. package/codeyam-cli/templates/chrome-extension-react/tsconfig.json +24 -0
  412. package/codeyam-cli/templates/chrome-extension-react/vite.config.ts +41 -0
  413. package/codeyam-cli/templates/codeyam-editor-claude.md +86 -5
  414. package/codeyam-cli/templates/codeyam-editor-reference.md +216 -0
  415. package/codeyam-cli/templates/editor-step-hook.py +262 -41
  416. package/codeyam-cli/templates/expo-react-native/MOBILE_SETUP.md +89 -0
  417. package/codeyam-cli/templates/expo-react-native/README.md +41 -0
  418. package/codeyam-cli/templates/expo-react-native/app/(tabs)/_layout.tsx +33 -0
  419. package/codeyam-cli/templates/expo-react-native/app/(tabs)/index.tsx +12 -0
  420. package/codeyam-cli/templates/expo-react-native/app/(tabs)/settings.tsx +12 -0
  421. package/codeyam-cli/templates/expo-react-native/app/_layout.tsx +12 -0
  422. package/codeyam-cli/templates/expo-react-native/app.json +18 -0
  423. package/codeyam-cli/templates/expo-react-native/babel.config.js +9 -0
  424. package/codeyam-cli/templates/expo-react-native/gitignore +12 -0
  425. package/codeyam-cli/templates/expo-react-native/global.css +3 -0
  426. package/codeyam-cli/templates/expo-react-native/lib/storage.ts +32 -0
  427. package/codeyam-cli/templates/expo-react-native/metro.config.js +6 -0
  428. package/codeyam-cli/templates/expo-react-native/nativewind-env.d.ts +1 -0
  429. package/codeyam-cli/templates/expo-react-native/package.json +38 -0
  430. package/codeyam-cli/templates/expo-react-native/tailwind.config.js +10 -0
  431. package/codeyam-cli/templates/expo-react-native/tsconfig.json +10 -0
  432. package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_PATTERNS.md +308 -0
  433. package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_UPGRADE.md +304 -0
  434. package/codeyam-cli/templates/nextjs-prisma-sqlite/DATABASE.md +126 -0
  435. package/codeyam-cli/templates/nextjs-prisma-sqlite/FEATURE_PATTERNS.md +37 -0
  436. package/codeyam-cli/templates/nextjs-prisma-sqlite/README.md +53 -0
  437. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/codeyam-isolate/layout.tsx +12 -0
  438. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/lib/prisma.ts +9 -4
  439. package/codeyam-cli/templates/nextjs-prisma-sqlite/env +4 -0
  440. package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +21 -0
  441. package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +6 -2
  442. package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +4 -1
  443. package/codeyam-cli/templates/nextjs-prisma-sqlite/seed-adapter.ts +135 -0
  444. package/codeyam-cli/templates/nextjs-prisma-sqlite/vitest.config.ts +13 -0
  445. package/codeyam-cli/templates/nextjs-prisma-supabase/README.md +52 -0
  446. package/codeyam-cli/templates/{nextjs-prisma-sqlite/PRISMA_SETUP.md → nextjs-prisma-supabase/SUPABASE_SETUP.md} +37 -17
  447. package/codeyam-cli/templates/nextjs-prisma-supabase/app/api/todos/route.ts +17 -0
  448. package/codeyam-cli/templates/nextjs-prisma-supabase/app/globals.css +26 -0
  449. package/codeyam-cli/templates/nextjs-prisma-supabase/app/layout.tsx +34 -0
  450. package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/prisma.ts +20 -0
  451. package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/supabase.ts +12 -0
  452. package/codeyam-cli/templates/nextjs-prisma-supabase/app/page.tsx +10 -0
  453. package/codeyam-cli/templates/nextjs-prisma-supabase/env +9 -0
  454. package/codeyam-cli/templates/nextjs-prisma-supabase/eslint.config.mjs +11 -0
  455. package/codeyam-cli/templates/nextjs-prisma-supabase/gitignore +40 -0
  456. package/codeyam-cli/templates/nextjs-prisma-supabase/next.config.ts +11 -0
  457. package/codeyam-cli/templates/nextjs-prisma-supabase/package.json +37 -0
  458. package/codeyam-cli/templates/nextjs-prisma-supabase/postcss.config.mjs +7 -0
  459. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/schema.prisma +27 -0
  460. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/seed.ts +39 -0
  461. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma.config.ts +12 -0
  462. package/codeyam-cli/templates/nextjs-prisma-supabase/tsconfig.json +34 -0
  463. package/codeyam-cli/templates/seed-adapters/supabase.ts +282 -0
  464. package/codeyam-cli/templates/skills/codeyam-dev-mode/SKILL.md +2 -2
  465. package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +177 -17
  466. package/codeyam-cli/templates/skills/codeyam-memory/SKILL.md +10 -10
  467. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.mjs +139 -0
  468. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.mjs +52 -0
  469. package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/read-json-field.mjs +61 -0
  470. package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/ripgrep-fallback.mjs +155 -0
  471. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.mjs +13 -0
  472. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter-session.mjs +95 -0
  473. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.mjs +160 -0
  474. package/package.json +16 -10
  475. package/packages/ai/src/lib/astScopes/methodSemantics.js +99 -0
  476. package/packages/ai/src/lib/astScopes/methodSemantics.js.map +1 -1
  477. package/packages/ai/src/lib/astScopes/nodeToSource.js +16 -0
  478. package/packages/ai/src/lib/astScopes/nodeToSource.js.map +1 -1
  479. package/packages/ai/src/lib/astScopes/paths.js +12 -3
  480. package/packages/ai/src/lib/astScopes/paths.js.map +1 -1
  481. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +27 -10
  482. package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
  483. package/packages/ai/src/lib/dataStructure/equivalencyManagers/ParentScopeManager.js +9 -2
  484. package/packages/ai/src/lib/dataStructure/equivalencyManagers/ParentScopeManager.js.map +1 -1
  485. package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js +14 -4
  486. package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js.map +1 -1
  487. package/packages/ai/src/lib/generateExecutionFlows.js +0 -11
  488. package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -1
  489. package/packages/analyze/index.js +1 -1
  490. package/packages/analyze/index.js.map +1 -1
  491. package/packages/analyze/src/lib/ProjectAnalyzer.js +10 -4
  492. package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
  493. package/packages/analyze/src/lib/asts/index.js +4 -2
  494. package/packages/analyze/src/lib/asts/index.js.map +1 -1
  495. package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +16 -2
  496. package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
  497. package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +6 -26
  498. package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
  499. package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +3 -2
  500. package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
  501. package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js +9 -7
  502. package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js.map +1 -1
  503. package/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.js +14 -0
  504. package/packages/analyze/src/lib/files/analyze/trackEntityCircularDependencies.js.map +1 -1
  505. package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js +44 -11
  506. package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js.map +1 -1
  507. package/packages/analyze/src/lib/files/analyzeChange.js +1 -0
  508. package/packages/analyze/src/lib/files/analyzeChange.js.map +1 -1
  509. package/packages/analyze/src/lib/files/analyzeInitial.js +1 -0
  510. package/packages/analyze/src/lib/files/analyzeInitial.js.map +1 -1
  511. package/packages/analyze/src/lib/files/analyzeNextRoute.js +5 -1
  512. package/packages/analyze/src/lib/files/analyzeNextRoute.js.map +1 -1
  513. package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +120 -28
  514. package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
  515. package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +0 -40
  516. package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -1
  517. package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +1368 -1193
  518. package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
  519. package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +104 -0
  520. package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -1
  521. package/packages/database/src/lib/loadAnalysis.js +1 -1
  522. package/packages/database/src/lib/loadAnalysis.js.map +1 -1
  523. package/packages/database/src/lib/loadEntities.js +0 -6
  524. package/packages/database/src/lib/loadEntities.js.map +1 -1
  525. package/packages/database/src/lib/loadEntity.js +5 -5
  526. package/packages/database/src/lib/loadEntity.js.map +1 -1
  527. package/packages/database/src/lib/updateCommitMetadata.js +0 -25
  528. package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
  529. package/packages/types/src/enums/ProjectFramework.js +2 -0
  530. package/packages/types/src/enums/ProjectFramework.js.map +1 -1
  531. package/packages/utils/src/lib/fs/rsyncCopy.js +22 -1
  532. package/packages/utils/src/lib/fs/rsyncCopy.js.map +1 -1
  533. package/scripts/npm-post-install.cjs +22 -0
  534. package/codeyam-cli/src/webserver/build/client/assets/CopyButton-DmJveP3T.js +0 -1
  535. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeBadge-g3saevPb.js +0 -1
  536. package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-Bu6c6aDe.js +0 -1
  537. package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-DYFW3lDD.js +0 -25
  538. package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-DLeucoVX.js +0 -3
  539. package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-BED4B6sP.js +0 -1
  540. package/codeyam-cli/src/webserver/build/client/assets/Spinner-Bb5uFQ5V.js +0 -34
  541. package/codeyam-cli/src/webserver/build/client/assets/Terminal-wkqC0AQk.js +0 -41
  542. package/codeyam-cli/src/webserver/build/client/assets/TruncatedFilePath-C8OKAR5x.js +0 -1
  543. package/codeyam-cli/src/webserver/build/client/assets/addon-fit-CUXOrorO.js +0 -1
  544. package/codeyam-cli/src/webserver/build/client/assets/chunk-JZWAC4HX-C4pqxYJB.js +0 -51
  545. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CMT1jU2q.js +0 -21
  546. package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-DcX-ZS3p.js +0 -1
  547. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BiM6z3Do.js +0 -1
  548. package/codeyam-cli/src/webserver/build/client/assets/editor-CdjF_fX6.js +0 -8
  549. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-D8ILZMR0.js +0 -6
  550. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-C28BiQzt.js +0 -6
  551. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-p9hhkjJM.js +0 -6
  552. package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-cPo8LiG3.js +0 -1
  553. package/codeyam-cli/src/webserver/build/client/assets/files-DO4CZ16O.js +0 -1
  554. package/codeyam-cli/src/webserver/build/client/assets/git-CFCTYk9I.js +0 -15
  555. package/codeyam-cli/src/webserver/build/client/assets/globals-B17TBSS6.css +0 -1
  556. package/codeyam-cli/src/webserver/build/client/assets/labs-Zk7ryIM1.js +0 -1
  557. package/codeyam-cli/src/webserver/build/client/assets/manifest-b8fd6b07.js +0 -1
  558. package/codeyam-cli/src/webserver/build/client/assets/memory-FweZHj5U.js +0 -93
  559. package/codeyam-cli/src/webserver/build/client/assets/root-DUKqhFlb.js +0 -67
  560. package/codeyam-cli/src/webserver/build/client/assets/settings-DfuTtcJP.js +0 -1
  561. package/codeyam-cli/src/webserver/build/client/assets/simulations-B3aOzpCZ.js +0 -1
  562. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-ByhSyh0W.js +0 -1
  563. package/codeyam-cli/src/webserver/build/client/assets/useReportContext-O-jkvSPx.js +0 -1
  564. package/codeyam-cli/src/webserver/build/client/assets/useToast-9FIWuYfK.js +0 -1
  565. package/codeyam-cli/src/webserver/build/server/assets/index-BLhjL9Xi.js +0 -1
  566. package/codeyam-cli/src/webserver/build/server/assets/server-build-DyMuI5mU.js +0 -363
  567. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.sh +0 -108
  568. package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.sh +0 -69
  569. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.sh +0 -12
  570. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter.jq +0 -45
  571. package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.sh +0 -139
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
  """
3
- PostToolUse + Stop hook for editor mode step tracking.
3
+ PostToolUse + Stop + UserPromptSubmit hook for editor mode step tracking.
4
4
 
5
5
  Reads .codeyam/editor-step.json and prints a reminder about the current step.
6
6
  Logs each firing to .codeyam/logs/editor-log.jsonl.
@@ -15,32 +15,70 @@ from datetime import datetime, timezone
15
15
 
16
16
  STEP_LABELS = {
17
17
  1: "Plan",
18
- 2: "Prototype",
19
- 3: "Confirm",
20
- 4: "Deconstruct",
21
- 5: "Extract",
22
- 6: "Glossary",
23
- 7: "Analyze",
24
- 8: "App Scenarios",
25
- 9: "User Scenarios",
26
- 10: "Verify",
27
- 11: "Journal",
28
- 12: "Review",
18
+ 2: "Prepare",
19
+ 3: "Prototype",
20
+ 4: "Verify Prototype",
21
+ 5: "Confirm",
22
+ 6: "Deconstruct",
23
+ 7: "Extract",
24
+ 8: "Glossary",
25
+ 9: "Analyze",
26
+ 10: "App Scenarios",
27
+ 11: "User Scenarios",
28
+ 12: "Verify",
29
+ 13: "Journal",
30
+ 14: "Review",
31
+ 15: "Present",
32
+ 16: "Commit",
33
+ 17: "Finalize",
34
+ 18: "Push",
29
35
  }
30
36
 
31
37
  STEP_RESTRICTIONS = {
32
38
  1: "Do NOT write any code. Plan and describe only. Wait for user confirmation.",
33
- 2: "Do NOT create scenarios or run codeyam analyze. Build fast working prototype with real data.",
34
- 3: "Present a selection menu (AskUserQuestion) for confirmation. Do NOT refactor or create scenarios until approved.",
35
- 4: "Do NOT write any code. Read every file, identify all extractable pieces, write a numbered plan. Planning only.",
36
- 5: "Execute the extraction plan from step 4. Components first (no tests), then library functions via TDD. Page files must contain ZERO direct JSX.",
37
- 6: "Do NOT write application code or scenarios. Update the glossary only.",
38
- 7: "Create isolation routes for visual components, run tests for library functions. Register component scenarios via codeyam editor register.",
39
- 8: "Do NOT modify application code. Create and register app-level scenarios only.",
40
- 9: "Do NOT modify application code. Create user-persona scenarios only (or skip if no users).",
41
- 10: "Verify component isolation screenshots AND editor scenarios. After ANY code fix, re-register affected components. Fix only — do NOT add features.",
42
- 11: "Create or update the journal entry for this feature. Do NOT create a duplicate check if one exists first.",
43
- 12: "Verify ALL screenshots exist and NO client-side errors (/api/editor-client-errors), then present selection menu (AskUserQuestion): Save or make changes.",
39
+ 2: "Do NOT write any code or build features. Set up the project and prepare the database only.",
40
+ 3: "Do NOT create scenarios or run codeyam analyze. Build fast working prototype with real data.",
41
+ 4: "Verify the prototype works. Do NOT add features only fix broken functionality.",
42
+ 5: "Present a selection menu (AskUserQuestion) for confirmation. Do NOT refactor or create scenarios until approved.",
43
+ 6: "Do NOT write any code. Read every file, identify all extractable pieces, write a numbered plan. Planning only.",
44
+ 7: "Execute the extraction plan from step 6. Components first (no tests), then library functions via TDD. Page files must contain ZERO direct JSX.",
45
+ 8: "Do NOT write application code or scenarios. Update the glossary only.",
46
+ 9: "Create isolation routes for visual components, run tests for library functions. Register component scenarios via codeyam editor register.",
47
+ 10: "Do NOT modify application code. Create and register app-level scenarios only.",
48
+ 11: "Do NOT modify application code. Create user-persona scenarios only (or skip if no users).",
49
+ 12: "Verify component isolation screenshots AND editor scenarios. After ANY code fix, re-register affected components. Fix only do NOT add features.",
50
+ 13: "Create or update the journal entry for this feature. Do NOT create a duplicate — check if one exists first.",
51
+ 14: "Verify ALL screenshots exist and NO client-side errors (/api/editor-client-errors). Run codeyam editor audit. Do not proceed until all checks pass.",
52
+ 15: "Show the results panel, present summary, then selection menu (AskUserQuestion): Save or make changes.",
53
+ 16: "Hide the results panel and commit all changes. Do NOT push — that happens in step 18.",
54
+ 17: "Update the journal entry with the commit SHA and amend the commit to include the journal update.",
55
+ 18: "Check for a git remote and offer to push. WAIT for the user's answer before starting the next feature.",
56
+ }
57
+
58
+ MIGRATION_STEP_LABELS = {
59
+ 1: "Survey",
60
+ 2: "App Scenarios",
61
+ 3: "Component Scenarios",
62
+ 4: "Preview",
63
+ 5: "Discuss",
64
+ 6: "Decompose",
65
+ 7: "Extract",
66
+ 8: "Recapture",
67
+ 9: "Journal",
68
+ 10: "Present",
69
+ }
70
+
71
+ MIGRATION_STEP_RESTRICTIONS = {
72
+ 1: "Survey the page and start the dev server. Read all files and map data flow. Do NOT register scenarios yet.",
73
+ 2: "Set up seed adapter if needed, then register application scenarios for the ACTUAL page route with seed data.",
74
+ 3: "Create isolation routes and register component scenarios for individual visual components.",
75
+ 4: "Verify screenshots and show results to the user. Do NOT modify application code.",
76
+ 5: "Assess complexity and ask user about decomposition. Wait for user decision before proceeding.",
77
+ 6: "Plan-only. Identify all extractions, mark existing components as REUSE. Do NOT write code.",
78
+ 7: "Execute the extraction plan. Components first, then functions via TDD.",
79
+ 8: "Update glossary, re-register scenarios after code changes, verify screenshots. Fix issues only.",
80
+ 9: "Create the journal entry for this page's migration.",
81
+ 10: "Show results, present summary, commit or make changes. After commit run `codeyam editor migrate complete` then `codeyam editor migrate next`.",
44
82
  }
45
83
 
46
84
 
@@ -60,25 +98,67 @@ def log_event(project_dir, event, data=None):
60
98
 
61
99
 
62
100
  def detect_event():
63
- """Detect whether this is a PostToolUse or Stop hook from stdin."""
101
+ """Detect whether this is a PostToolUse, Stop, or UserPromptSubmit hook from stdin."""
64
102
  try:
65
103
  raw = sys.stdin.read()
66
104
  if not raw.strip():
67
105
  return "unknown", {}
68
106
  data = json.loads(raw)
69
- # PostToolUse has tool_name; Stop has stop_hook_active
107
+ # PostToolUse has tool_name; Stop has stop_hook_active; UserPromptSubmit has prompt
70
108
  if "tool_name" in data:
71
109
  return "post_tool_use", data
72
110
  elif "stop_hook_active" in data:
73
111
  return "stop", data
112
+ elif "prompt" in data:
113
+ return "user_prompt", data
74
114
  return "unknown", data
75
115
  except Exception:
76
116
  return "unknown", {}
77
117
 
78
118
 
79
119
  def main():
120
+ # Only run in editor Build sessions. The env var is set by the terminal
121
+ # server when launching Claude in editor mode. Without this guard, hooks
122
+ # fire in every Claude session in the project (scenario editing, bare
123
+ # claude, etc.) and inject unwanted step restrictions.
124
+ if not os.environ.get("CODEYAM_EDITOR_ACTIVE"):
125
+ return
126
+
80
127
  project_dir = os.environ.get("CLAUDE_PROJECT_DIR", os.getcwd())
81
128
  state_path = os.path.join(project_dir, ".codeyam", "editor-step.json")
129
+ prompt_path = os.path.join(project_dir, ".codeyam", "editor-user-prompt.txt")
130
+
131
+ # Detect event early so we can capture the user prompt even before state exists
132
+ event_type, event_data = detect_event()
133
+
134
+ # Capture the user's feature request prompt.
135
+ # Write when: (a) no prompt file yet, (b) no state file (between features),
136
+ # or (c) previous feature is done (step >= 18). This ensures the prompt
137
+ # is refreshed for each new feature instead of persisting stale text.
138
+ # Skip slash commands (e.g. /codeyam-editor) — they aren't user prompts.
139
+ if event_type == "user_prompt":
140
+ prompt_text = event_data.get("prompt", "").strip()
141
+ if prompt_text and not prompt_text.startswith("/"):
142
+ should_capture = not os.path.exists(prompt_path)
143
+ if not should_capture:
144
+ # Overwrite stale prompt when between features
145
+ if not os.path.exists(state_path):
146
+ should_capture = True
147
+ else:
148
+ try:
149
+ with open(state_path, "r") as f:
150
+ prev = json.load(f)
151
+ if prev.get("step", 0) >= 18:
152
+ should_capture = True
153
+ except Exception:
154
+ pass
155
+ if should_capture:
156
+ try:
157
+ os.makedirs(os.path.dirname(prompt_path), exist_ok=True)
158
+ with open(prompt_path, "w") as f:
159
+ f.write(prompt_text)
160
+ except Exception:
161
+ pass # Best-effort
82
162
 
83
163
  if not os.path.exists(state_path):
84
164
  return
@@ -92,23 +172,115 @@ def main():
92
172
  step = state.get("step")
93
173
  label = state.get("label", "Unknown")
94
174
  feature = state.get("feature", "")
175
+ migration = state.get("migration") # Optional migration context
95
176
 
96
177
  if not step:
97
178
  return
98
179
 
99
- event_type, event_data = detect_event()
180
+ # ── Task tracking ──────────────────────────────────────────────────
181
+ # Track whether TaskCreate was called between step transitions.
182
+ # If Claude advances to the next step without creating a task, block it.
183
+ task_tracking_path = os.path.join(project_dir, ".codeyam", "editor-task-tracking.json")
184
+
185
+ if event_type == "post_tool_use":
186
+ tool_name = event_data.get("tool_name", "")
187
+
188
+ # Record when TaskCreate is called
189
+ if tool_name == "TaskCreate":
190
+ try:
191
+ tracking = {}
192
+ if os.path.exists(task_tracking_path):
193
+ with open(task_tracking_path, "r") as f:
194
+ tracking = json.load(f)
195
+ tracking["taskCreated"] = True
196
+ with open(task_tracking_path, "w") as f:
197
+ json.dump(tracking, f)
198
+ except Exception:
199
+ pass
100
200
 
101
201
  # Log the hook firing
102
202
  log_data = {"step": step, "label": label, "feature": feature, "hook": event_type}
203
+ if migration:
204
+ log_data["migration"] = True
103
205
  if event_type == "post_tool_use":
104
206
  log_data["tool"] = event_data.get("tool_name", "")
105
207
  log_event(project_dir, "hook", log_data)
106
208
 
107
- restriction = STEP_RESTRICTIONS.get(step, "")
108
- next_cmd = f"codeyam editor {step + 1}" if step < 12 else "codeyam editor 1"
209
+ # Use migration-specific labels/restrictions when in migration mode
210
+ if migration:
211
+ restriction = MIGRATION_STEP_RESTRICTIONS.get(step, "")
212
+ next_cmd = f"codeyam editor migrate {step + 1}" if step < 10 else "codeyam editor migrate next"
213
+ else:
214
+ restriction = STEP_RESTRICTIONS.get(step, "")
215
+ next_cmd = f"codeyam editor {step + 1}" if step < 18 else "codeyam editor 1"
109
216
 
217
+ # UserPromptSubmit: concise workflow reminder injected before Claude processes the user's message
218
+ if event_type == "user_prompt":
219
+ mode_label = "Migration Mode" if migration else "Editor Mode"
220
+ page_info = ""
221
+ if migration:
222
+ page_name = migration.get("pageName", "")
223
+ page_idx = migration.get("pageIndex", 0)
224
+ total = migration.get("totalPages", 0)
225
+ page_info = f" — Page {page_idx + 1}/{total} ({page_name})"
226
+
227
+ lines = [
228
+ f'<user-prompt-submit-hook>',
229
+ f'{mode_label} — Step {step} ({label}): "{feature}"{page_info}',
230
+ ]
231
+
232
+ # Include the active scenario so Claude knows what the user is looking at
233
+ active_scenario_path = os.path.join(project_dir, ".codeyam", "active-scenario.json")
234
+ try:
235
+ with open(active_scenario_path, "r") as f:
236
+ active = json.load(f)
237
+ scenario_name = (
238
+ active.get("scenarioName")
239
+ or active.get("scenarioSlug", "").replace("_", " ")
240
+ )
241
+ if scenario_name:
242
+ lines.append(
243
+ f'The user is currently viewing scenario: "{scenario_name}". '
244
+ "Assume any feedback refers to this scenario unless they say otherwise."
245
+ )
246
+ except (IOError, json.JSONDecodeError):
247
+ pass
248
+
249
+ if migration and step == 8:
250
+ lines.append(
251
+ "If the user is requesting changes (even indirectly), "
252
+ "run `codeyam editor change` BEFORE making any modifications. "
253
+ "The change workflow ensures Working Session Results are shown to the user. "
254
+ "If the user chose to commit, run `codeyam editor migrate next` to advance to the next page."
255
+ )
256
+ elif step in (15, 16, 17, 18) and not migration:
257
+ lines.append(
258
+ "If the user is requesting changes (even indirectly), "
259
+ "run `codeyam editor change` BEFORE making any modifications "
260
+ "(code, scenarios, data, styles — everything). "
261
+ "The change command gives you the post-change checklist. "
262
+ "The change workflow ensures Working Session Results are shown to the user. "
263
+ "If the user chose to commit, run `codeyam editor 16` to advance to the commit step."
264
+ )
265
+ elif migration:
266
+ lines.append(
267
+ f"You are on migration step {step}. Follow the `codeyam editor migrate` workflow. "
268
+ f"Do NOT skip ahead or make changes outside the current step."
269
+ )
270
+ else:
271
+ lines.append(
272
+ f"You are on step {step}. Follow the `codeyam editor` workflow. "
273
+ f"Do NOT skip ahead or make changes outside the current step."
274
+ )
275
+ if restriction:
276
+ lines.append(restriction)
277
+ lines.append('</user-prompt-submit-hook>')
278
+ print("\n".join(lines))
279
+ return
280
+
281
+ mode_label = "Migration Mode" if migration else "Editor Mode"
110
282
  lines = [
111
- f'Editor Mode \u2014 Step {step} ({label}): "{feature}"',
283
+ f'{mode_label} \u2014 Step {step} ({label}): "{feature}"',
112
284
  ]
113
285
  if restriction:
114
286
  lines.append(restriction)
@@ -119,18 +291,40 @@ def main():
119
291
  BOLD_CYAN = "\033[1;36m"
120
292
  DIM = "\033[2m"
121
293
  RESET = "\033[0m"
122
- tracker = [f"{DIM} \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510{RESET}"]
123
- for i in range(1, 13):
124
- lbl = STEP_LABELS[i].ljust(28)
125
- num = f" {i}" if i < 10 else f"{i}"
126
- content = f"{num}. {lbl}"
127
- if i < step:
128
- tracker.append(f"{DIM} \u2502{RESET}{GREEN} \u2713 {content}{RESET}{DIM}\u2502{RESET}")
129
- elif i == step:
130
- tracker.append(f"{DIM} \u2502{RESET}{BOLD_CYAN} \u2192 {content}{RESET}{DIM}\u2502{RESET}")
131
- else:
132
- tracker.append(f"{DIM} \u2502 \u25cb {content}\u2502{RESET}")
133
- tracker.append(f"{DIM} \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518{RESET}")
294
+
295
+ if migration:
296
+ # Migration progress tracker (10 steps)
297
+ page_name = migration.get("pageName", "")
298
+ page_idx = migration.get("pageIndex", 0)
299
+ total = migration.get("totalPages", 0)
300
+ tracker = [f"{DIM} Migration: Page {page_idx + 1}/{total} ({page_name}){RESET}"]
301
+ tracker.append(f"{DIM} \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510{RESET}")
302
+ for i in range(1, 11):
303
+ lbl = MIGRATION_STEP_LABELS[i].ljust(28)
304
+ num = f" {i}" if i < 10 else f"{i}"
305
+ cntnt = f"{num}. {lbl}"
306
+ if i < step:
307
+ tracker.append(f"{DIM} \u2502{RESET}{GREEN} \u2713 {cntnt}{RESET}{DIM}\u2502{RESET}")
308
+ elif i == step:
309
+ tracker.append(f"{DIM} \u2502{RESET}{BOLD_CYAN} \u2192 {cntnt}{RESET}{DIM}\u2502{RESET}")
310
+ else:
311
+ tracker.append(f"{DIM} \u2502 \u25cb {cntnt}\u2502{RESET}")
312
+ tracker.append(f"{DIM} \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518{RESET}")
313
+ else:
314
+ # Standard progress tracker (18 steps)
315
+ tracker = [f"{DIM} \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510{RESET}"]
316
+ for i in range(1, 19):
317
+ lbl = STEP_LABELS[i].ljust(28)
318
+ num = f" {i}" if i < 10 else f"{i}"
319
+ content = f"{num}. {lbl}"
320
+ if i < step:
321
+ tracker.append(f"{DIM} \u2502{RESET}{GREEN} \u2713 {content}{RESET}{DIM}\u2502{RESET}")
322
+ elif i == step:
323
+ tracker.append(f"{DIM} \u2502{RESET}{BOLD_CYAN} \u2192 {content}{RESET}{DIM}\u2502{RESET}")
324
+ else:
325
+ tracker.append(f"{DIM} \u2502 \u25cb {content}\u2502{RESET}")
326
+ tracker.append(f"{DIM} \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518{RESET}")
327
+
134
328
  lines.append("Present this progress tracker to the user (copy verbatim):")
135
329
  lines.extend(tracker)
136
330
  lines.append(
@@ -138,6 +332,33 @@ def main():
138
332
  "\u2713 (done) or \u2717 (skipped + reason)."
139
333
  )
140
334
 
335
+ if event_type == "stop" and ((step in (15, 16) and not migration) or (step == 8 and migration)):
336
+ import subprocess as _sp
337
+ try:
338
+ _result = _sp.run(
339
+ ["git", "status", "--porcelain"],
340
+ cwd=project_dir,
341
+ capture_output=True, text=True, timeout=5
342
+ )
343
+ has_uncommitted = bool(_result.stdout.strip())
344
+ except Exception:
345
+ has_uncommitted = False
346
+
347
+ if has_uncommitted:
348
+ lines.append(
349
+ "\n\033[1;31m⚠️ You have uncommitted changes but haven't shown Working Session Results.\033[0m"
350
+ )
351
+ lines.append(
352
+ f"\033[31mRun `codeyam editor change` if you haven't already, then complete the "
353
+ f"checklist and run `{'codeyam editor migrate 8' if migration else 'codeyam editor 15'}` to show results to the user.\033[0m"
354
+ )
355
+
356
+ if event_type == "stop":
357
+ lines.append(
358
+ f"\n\033[2mReminder: Only use `codeyam editor` subcommands in the Build terminal. "
359
+ f"Follow `codeyam editor steps` when changing code.\033[0m"
360
+ )
361
+
141
362
  lines.append(f"When this step is complete, run: {next_cmd}")
142
363
 
143
364
  print("\n".join(lines))
@@ -0,0 +1,89 @@
1
+ # Expo + React Native Setup
2
+
3
+ ## Development
4
+
5
+ This project uses **Expo** with **Expo Router** for file-based navigation and **NativeWind** (Tailwind CSS) for styling.
6
+
7
+ ### Web Development (used by CodeYam)
8
+
9
+ ```bash
10
+ npm run dev
11
+ ```
12
+
13
+ This starts the Expo web dev server. CodeYam uses this to preview your app and take screenshots.
14
+
15
+ ### Mobile Development
16
+
17
+ ```bash
18
+ # iOS Simulator
19
+ npm run ios
20
+
21
+ # Android Emulator
22
+ npm run android
23
+
24
+ # Start Expo dev server (pick platform from menu)
25
+ npm start
26
+ ```
27
+
28
+ ## Project Structure
29
+
30
+ ```
31
+ app/ # Expo Router file-based routes
32
+ _layout.tsx # Root layout (status bar, navigation)
33
+ (tabs)/ # Tab-based navigation group
34
+ _layout.tsx # Tab bar configuration
35
+ index.tsx # Home tab
36
+ settings.tsx # Settings tab
37
+ components/ # Reusable components
38
+ lib/
39
+ storage.ts # AsyncStorage wrapper for persistent data
40
+ ```
41
+
42
+ ## Key Patterns
43
+
44
+ ### Navigation (Expo Router)
45
+
46
+ Add new screens by creating files in `app/`:
47
+
48
+ - `app/profile.tsx` — accessible at `/profile`
49
+ - `app/items/[id].tsx` — dynamic route at `/items/123`
50
+
51
+ ### Data Fetching
52
+
53
+ Use standard `fetch()` for API calls. CodeYam intercepts these to provide mock data during simulations:
54
+
55
+ ```tsx
56
+ const response = await fetch('/api/items');
57
+ const data = await response.json();
58
+ ```
59
+
60
+ ### Storage
61
+
62
+ Use the typed storage helper for persistent data:
63
+
64
+ ```tsx
65
+ import { storage } from '@/lib/storage';
66
+
67
+ const items = await storage.get('items', []);
68
+ await storage.set('items', [...items, newItem]);
69
+ ```
70
+
71
+ ### Styling (NativeWind)
72
+
73
+ Use Tailwind classes on React Native components:
74
+
75
+ ```tsx
76
+ <View className="flex-1 items-center justify-center bg-white p-4">
77
+ <Text className="text-lg font-bold text-gray-900">Hello</Text>
78
+ </View>
79
+ ```
80
+
81
+ ## Building for Production
82
+
83
+ ```bash
84
+ # Web
85
+ npm run build:web
86
+
87
+ # iOS/Android (requires EAS CLI)
88
+ npx eas build
89
+ ```
@@ -0,0 +1,41 @@
1
+ # Project Name
2
+
3
+ Brief description of what this app does.
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ npm run setup
9
+ ```
10
+
11
+ ## Development
12
+
13
+ Start the Expo dev server (web):
14
+
15
+ ```bash
16
+ npm run dev
17
+ ```
18
+
19
+ For native platforms:
20
+
21
+ ```bash
22
+ npm run ios # iOS simulator
23
+ npm run android # Android emulator
24
+ ```
25
+
26
+ ## Using CodeYam Editor
27
+
28
+ This project was built with [CodeYam](https://codeyam.com). To launch the editor:
29
+
30
+ ```bash
31
+ codeyam editor
32
+ ```
33
+
34
+ ## Scripts
35
+
36
+ | Script | Description |
37
+ | ----------------- | --------------------------- |
38
+ | `npm run setup` | Install dependencies |
39
+ | `npm run dev` | Start Expo dev server (web) |
40
+ | `npm run ios` | Run on iOS simulator |
41
+ | `npm run android` | Run on Android emulator |
@@ -0,0 +1,33 @@
1
+ import { Tabs } from 'expo-router';
2
+ import { Ionicons } from '@expo/vector-icons';
3
+
4
+ export default function TabLayout() {
5
+ return (
6
+ <Tabs
7
+ screenOptions={{
8
+ tabBarActiveTintColor: '#005C75',
9
+ headerStyle: { backgroundColor: '#f8fafc' },
10
+ headerTitleStyle: { fontWeight: '600' },
11
+ }}
12
+ >
13
+ <Tabs.Screen
14
+ name="index"
15
+ options={{
16
+ title: 'Home',
17
+ tabBarIcon: ({ color, size }) => (
18
+ <Ionicons name="home-outline" size={size} color={color} />
19
+ ),
20
+ }}
21
+ />
22
+ <Tabs.Screen
23
+ name="settings"
24
+ options={{
25
+ title: 'Settings',
26
+ tabBarIcon: ({ color, size }) => (
27
+ <Ionicons name="settings-outline" size={size} color={color} />
28
+ ),
29
+ }}
30
+ />
31
+ </Tabs>
32
+ );
33
+ }
@@ -0,0 +1,12 @@
1
+ import { View, Text } from 'react-native';
2
+
3
+ export default function HomeScreen() {
4
+ return (
5
+ <View className="flex-1 items-center justify-center bg-white p-6">
6
+ <Text className="text-2xl font-bold text-gray-900 mb-2">Welcome</Text>
7
+ <Text className="text-base text-gray-500 text-center">
8
+ Your Expo app is ready. Start building!
9
+ </Text>
10
+ </View>
11
+ );
12
+ }
@@ -0,0 +1,12 @@
1
+ import { View, Text } from 'react-native';
2
+
3
+ export default function SettingsScreen() {
4
+ return (
5
+ <View className="flex-1 items-center justify-center bg-white p-6">
6
+ <Text className="text-2xl font-bold text-gray-900 mb-2">Settings</Text>
7
+ <Text className="text-base text-gray-500 text-center">
8
+ Configure your app preferences here.
9
+ </Text>
10
+ </View>
11
+ );
12
+ }
@@ -0,0 +1,12 @@
1
+ import '../global.css';
2
+ import { Stack } from 'expo-router';
3
+ import { StatusBar } from 'expo-status-bar';
4
+
5
+ export default function RootLayout() {
6
+ return (
7
+ <>
8
+ <Stack screenOptions={{ headerShown: false }} />
9
+ <StatusBar style="auto" />
10
+ </>
11
+ );
12
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "expo": {
3
+ "name": "CodeYam Expo App",
4
+ "slug": "codeyam-expo-app",
5
+ "version": "1.0.0",
6
+ "scheme": "codeyam-expo-app",
7
+ "platforms": ["ios", "android", "web"],
8
+ "web": {
9
+ "bundler": "metro",
10
+ "output": "single",
11
+ "favicon": "./assets/favicon.png"
12
+ },
13
+ "plugins": ["expo-router"],
14
+ "experiments": {
15
+ "typedRoutes": true
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,9 @@
1
+ module.exports = function (api) {
2
+ api.cache(true);
3
+ return {
4
+ presets: [
5
+ ['babel-preset-expo', { jsxImportSource: 'nativewind' }],
6
+ 'nativewind/babel',
7
+ ],
8
+ };
9
+ };
@@ -0,0 +1,12 @@
1
+ node_modules/
2
+ .expo/
3
+ dist/
4
+ web-build/
5
+ *.jks
6
+ *.p8
7
+ *.p12
8
+ *.key
9
+ *.mobileprovision
10
+ *.orig.*
11
+ .env
12
+ .env.local
@@ -0,0 +1,3 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
@@ -0,0 +1,32 @@
1
+ import AsyncStorage from '@react-native-async-storage/async-storage';
2
+
3
+ /**
4
+ * Type-safe storage abstraction over AsyncStorage.
5
+ * Works on iOS, Android, and Web.
6
+ */
7
+ export const storage = {
8
+ async get<T>(key: string, defaultValue: T): Promise<T> {
9
+ try {
10
+ const raw = await AsyncStorage.getItem(key);
11
+ return raw !== null ? JSON.parse(raw) : defaultValue;
12
+ } catch {
13
+ return defaultValue;
14
+ }
15
+ },
16
+
17
+ async set<T>(key: string, value: T): Promise<void> {
18
+ try {
19
+ await AsyncStorage.setItem(key, JSON.stringify(value));
20
+ } catch {
21
+ // Storage write failed silently
22
+ }
23
+ },
24
+
25
+ async remove(key: string): Promise<void> {
26
+ try {
27
+ await AsyncStorage.removeItem(key);
28
+ } catch {
29
+ // Storage remove failed silently
30
+ }
31
+ },
32
+ };