@codeyam/codeyam-cli 0.1.0-staging.2ea44f6 → 0.1.0-staging.30dc541

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 (410) 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 +3 -3
  4. package/analyzer-template/packages/ai/package.json +1 -1
  5. package/analyzer-template/packages/aws/package.json +1 -1
  6. package/analyzer-template/packages/database/package.json +1 -1
  7. package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +99 -0
  8. package/analyzer-template/packages/database/src/lib/loadEntities.ts +0 -6
  9. package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +0 -65
  10. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +8 -0
  11. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -1
  12. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +101 -0
  13. package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -1
  14. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts.map +1 -1
  15. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js +0 -6
  16. package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js.map +1 -1
  17. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts.map +1 -1
  18. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js +0 -25
  19. package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
  20. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts +2 -0
  21. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
  22. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js +2 -0
  23. package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js.map +1 -1
  24. package/analyzer-template/packages/types/src/enums/ProjectFramework.ts +2 -0
  25. package/analyzer-template/packages/ui-components/package.json +1 -1
  26. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts +2 -0
  27. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
  28. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js +2 -0
  29. package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js.map +1 -1
  30. package/codeyam-cli/src/cli.js +24 -0
  31. package/codeyam-cli/src/cli.js.map +1 -1
  32. package/codeyam-cli/src/commands/__tests__/editor.isolateArgs.test.js +51 -0
  33. package/codeyam-cli/src/commands/__tests__/editor.isolateArgs.test.js.map +1 -0
  34. package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js +56 -0
  35. package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js.map +1 -0
  36. package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js +101 -47
  37. package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js.map +1 -1
  38. package/codeyam-cli/src/commands/editor.js +3077 -509
  39. package/codeyam-cli/src/commands/editor.js.map +1 -1
  40. package/codeyam-cli/src/commands/editorIsolateArgs.js +25 -0
  41. package/codeyam-cli/src/commands/editorIsolateArgs.js.map +1 -0
  42. package/codeyam-cli/src/commands/init.js +69 -34
  43. package/codeyam-cli/src/commands/init.js.map +1 -1
  44. package/codeyam-cli/src/commands/telemetry.js +37 -0
  45. package/codeyam-cli/src/commands/telemetry.js.map +1 -0
  46. package/codeyam-cli/src/data/techStacks.js +77 -0
  47. package/codeyam-cli/src/data/techStacks.js.map +1 -0
  48. package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js +173 -0
  49. package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js.map +1 -0
  50. package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js +46 -0
  51. package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js.map +1 -0
  52. package/codeyam-cli/src/utils/__tests__/editorApi.test.js +18 -8
  53. package/codeyam-cli/src/utils/__tests__/editorApi.test.js.map +1 -1
  54. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +2201 -1
  55. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -1
  56. package/codeyam-cli/src/utils/__tests__/editorBroadcastViewport.test.js +76 -0
  57. package/codeyam-cli/src/utils/__tests__/editorBroadcastViewport.test.js.map +1 -0
  58. package/codeyam-cli/src/utils/__tests__/editorCaptureScenarioSeeding.test.js +137 -0
  59. package/codeyam-cli/src/utils/__tests__/editorCaptureScenarioSeeding.test.js.map +1 -0
  60. package/codeyam-cli/src/utils/__tests__/editorDeleteScenario.test.js +100 -0
  61. package/codeyam-cli/src/utils/__tests__/editorDeleteScenario.test.js.map +1 -0
  62. package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js +152 -3
  63. package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js.map +1 -1
  64. package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js +76 -3
  65. package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js.map +1 -1
  66. package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js +381 -0
  67. package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js.map +1 -0
  68. package/codeyam-cli/src/utils/__tests__/editorGuardMiddleware.test.js +67 -0
  69. package/codeyam-cli/src/utils/__tests__/editorGuardMiddleware.test.js.map +1 -0
  70. package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js +140 -12
  71. package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js.map +1 -1
  72. package/codeyam-cli/src/utils/__tests__/editorJournal.test.js +238 -2
  73. package/codeyam-cli/src/utils/__tests__/editorJournal.test.js.map +1 -1
  74. package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js +202 -1
  75. package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js.map +1 -1
  76. package/codeyam-cli/src/utils/__tests__/editorMigration.test.js +435 -0
  77. package/codeyam-cli/src/utils/__tests__/editorMigration.test.js.map +1 -0
  78. package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +191 -5
  79. package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -1
  80. package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js +153 -0
  81. package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js.map +1 -0
  82. package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js +139 -0
  83. package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js.map +1 -0
  84. package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js +291 -0
  85. package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js.map +1 -0
  86. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +1437 -2
  87. package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -1
  88. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js +280 -0
  89. package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js.map +1 -0
  90. package/codeyam-cli/src/utils/__tests__/editorSeedAdapterPrismaValidation.test.js +143 -0
  91. package/codeyam-cli/src/utils/__tests__/editorSeedAdapterPrismaValidation.test.js.map +1 -0
  92. package/codeyam-cli/src/utils/__tests__/editorSessionFilter.test.js +66 -0
  93. package/codeyam-cli/src/utils/__tests__/editorSessionFilter.test.js.map +1 -0
  94. package/codeyam-cli/src/utils/__tests__/editorShouldRevalidate.test.js +53 -0
  95. package/codeyam-cli/src/utils/__tests__/editorShouldRevalidate.test.js.map +1 -0
  96. package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js +641 -45
  97. package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js.map +1 -1
  98. package/codeyam-cli/src/utils/__tests__/glossaryAdd.test.js +177 -0
  99. package/codeyam-cli/src/utils/__tests__/glossaryAdd.test.js.map +1 -0
  100. package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js +122 -0
  101. package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js.map +1 -0
  102. package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js +129 -0
  103. package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js.map +1 -0
  104. package/codeyam-cli/src/utils/__tests__/routePatternMatching.test.js +118 -0
  105. package/codeyam-cli/src/utils/__tests__/routePatternMatching.test.js.map +1 -0
  106. package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js +284 -0
  107. package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js.map +1 -0
  108. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js +649 -223
  109. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js.map +1 -1
  110. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +14 -5
  111. package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
  112. package/codeyam-cli/src/utils/__tests__/telemetry.test.js +159 -0
  113. package/codeyam-cli/src/utils/__tests__/telemetry.test.js.map +1 -0
  114. package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js +51 -0
  115. package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js.map +1 -0
  116. package/codeyam-cli/src/utils/__tests__/webappDetection.test.js +142 -0
  117. package/codeyam-cli/src/utils/__tests__/webappDetection.test.js.map +1 -0
  118. package/codeyam-cli/src/utils/analysisRunner.js +3 -1
  119. package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
  120. package/codeyam-cli/src/utils/analyzer.js +9 -0
  121. package/codeyam-cli/src/utils/analyzer.js.map +1 -1
  122. package/codeyam-cli/src/utils/analyzerFinalization.js +100 -0
  123. package/codeyam-cli/src/utils/analyzerFinalization.js.map +1 -0
  124. package/codeyam-cli/src/utils/backgroundServer.js +93 -17
  125. package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
  126. package/codeyam-cli/src/utils/database.js +37 -2
  127. package/codeyam-cli/src/utils/database.js.map +1 -1
  128. package/codeyam-cli/src/utils/editorApi.js +11 -5
  129. package/codeyam-cli/src/utils/editorApi.js.map +1 -1
  130. package/codeyam-cli/src/utils/editorAudit.js +410 -6
  131. package/codeyam-cli/src/utils/editorAudit.js.map +1 -1
  132. package/codeyam-cli/src/utils/editorBroadcastViewport.js +26 -0
  133. package/codeyam-cli/src/utils/editorBroadcastViewport.js.map +1 -0
  134. package/codeyam-cli/src/utils/editorDeleteScenario.js +67 -0
  135. package/codeyam-cli/src/utils/editorDeleteScenario.js.map +1 -0
  136. package/codeyam-cli/src/utils/editorDevServer.js +89 -1
  137. package/codeyam-cli/src/utils/editorDevServer.js.map +1 -1
  138. package/codeyam-cli/src/utils/editorEntityChangeStatus.js +13 -7
  139. package/codeyam-cli/src/utils/editorEntityChangeStatus.js.map +1 -1
  140. package/codeyam-cli/src/utils/editorEntityHelpers.js +144 -0
  141. package/codeyam-cli/src/utils/editorEntityHelpers.js.map +1 -0
  142. package/codeyam-cli/src/utils/editorGuard.js +36 -0
  143. package/codeyam-cli/src/utils/editorGuard.js.map +1 -0
  144. package/codeyam-cli/src/utils/editorImageVerifier.js +45 -10
  145. package/codeyam-cli/src/utils/editorImageVerifier.js.map +1 -1
  146. package/codeyam-cli/src/utils/editorJournal.js +78 -3
  147. package/codeyam-cli/src/utils/editorJournal.js.map +1 -1
  148. package/codeyam-cli/src/utils/editorLoaderHelpers.js +72 -1
  149. package/codeyam-cli/src/utils/editorLoaderHelpers.js.map +1 -1
  150. package/codeyam-cli/src/utils/editorMigration.js +224 -0
  151. package/codeyam-cli/src/utils/editorMigration.js.map +1 -0
  152. package/codeyam-cli/src/utils/editorPreview.js +43 -2
  153. package/codeyam-cli/src/utils/editorPreview.js.map +1 -1
  154. package/codeyam-cli/src/utils/editorRecapture.js +109 -0
  155. package/codeyam-cli/src/utils/editorRecapture.js.map +1 -0
  156. package/codeyam-cli/src/utils/editorScenarioSwitch.js +134 -0
  157. package/codeyam-cli/src/utils/editorScenarioSwitch.js.map +1 -0
  158. package/codeyam-cli/src/utils/editorScenarios.js +488 -0
  159. package/codeyam-cli/src/utils/editorScenarios.js.map +1 -1
  160. package/codeyam-cli/src/utils/editorSeedAdapter.js +422 -0
  161. package/codeyam-cli/src/utils/editorSeedAdapter.js.map +1 -0
  162. package/codeyam-cli/src/utils/editorShouldRevalidate.js +21 -0
  163. package/codeyam-cli/src/utils/editorShouldRevalidate.js.map +1 -0
  164. package/codeyam-cli/src/utils/entityChangeStatus.js +89 -21
  165. package/codeyam-cli/src/utils/entityChangeStatus.js.map +1 -1
  166. package/codeyam-cli/src/utils/entityChangeStatus.server.js +97 -8
  167. package/codeyam-cli/src/utils/entityChangeStatus.server.js.map +1 -1
  168. package/codeyam-cli/src/utils/fileWatcher.js +38 -0
  169. package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
  170. package/codeyam-cli/src/utils/glossaryAdd.js +74 -0
  171. package/codeyam-cli/src/utils/glossaryAdd.js.map +1 -0
  172. package/codeyam-cli/src/utils/install-skills.js +14 -0
  173. package/codeyam-cli/src/utils/install-skills.js.map +1 -1
  174. package/codeyam-cli/src/utils/parseRegisterArg.js +31 -0
  175. package/codeyam-cli/src/utils/parseRegisterArg.js.map +1 -0
  176. package/codeyam-cli/src/utils/progress.js +2 -2
  177. package/codeyam-cli/src/utils/progress.js.map +1 -1
  178. package/codeyam-cli/src/utils/routePatternMatching.js +129 -0
  179. package/codeyam-cli/src/utils/routePatternMatching.js.map +1 -0
  180. package/codeyam-cli/src/utils/scenarioCoverage.js +77 -0
  181. package/codeyam-cli/src/utils/scenarioCoverage.js.map +1 -0
  182. package/codeyam-cli/src/utils/scenariosManifest.js +269 -74
  183. package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -1
  184. package/codeyam-cli/src/utils/serverState.js +30 -0
  185. package/codeyam-cli/src/utils/serverState.js.map +1 -1
  186. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +14 -5
  187. package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
  188. package/codeyam-cli/src/utils/simulationGateMiddleware.js +17 -1
  189. package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -1
  190. package/codeyam-cli/src/utils/slugUtils.js +25 -0
  191. package/codeyam-cli/src/utils/slugUtils.js.map +1 -0
  192. package/codeyam-cli/src/utils/syncMocksMiddleware.js +2 -2
  193. package/codeyam-cli/src/utils/syncMocksMiddleware.js.map +1 -1
  194. package/codeyam-cli/src/utils/telemetry.js +106 -0
  195. package/codeyam-cli/src/utils/telemetry.js.map +1 -0
  196. package/codeyam-cli/src/utils/telemetryMiddleware.js +22 -0
  197. package/codeyam-cli/src/utils/telemetryMiddleware.js.map +1 -0
  198. package/codeyam-cli/src/utils/webappDetection.js +21 -0
  199. package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
  200. package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js +35 -0
  201. package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js.map +1 -0
  202. package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js +80 -0
  203. package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js.map +1 -0
  204. package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js +628 -0
  205. package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js.map +1 -0
  206. package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js +228 -0
  207. package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js.map +1 -0
  208. package/codeyam-cli/src/webserver/__tests__/stripClaudeCommand.test.js +79 -0
  209. package/codeyam-cli/src/webserver/__tests__/stripClaudeCommand.test.js.map +1 -0
  210. package/codeyam-cli/src/webserver/app/lib/clientErrors.js +71 -0
  211. package/codeyam-cli/src/webserver/app/lib/clientErrors.js.map +1 -0
  212. package/codeyam-cli/src/webserver/app/lib/git.js +3 -2
  213. package/codeyam-cli/src/webserver/app/lib/git.js.map +1 -1
  214. package/codeyam-cli/src/webserver/app/types/editor.js +8 -0
  215. package/codeyam-cli/src/webserver/app/types/editor.js.map +1 -0
  216. package/codeyam-cli/src/webserver/backgroundServer.js +60 -61
  217. package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
  218. package/codeyam-cli/src/webserver/build/client/assets/CopyButton-CLe80MMu.js +1 -0
  219. package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-C76mRRiF.js → EntityItem-Crt_KN_U.js} +5 -5
  220. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeBadge-CQgyEGV-.js +1 -0
  221. package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-CobE682z.js → EntityTypeIcon-CD7lGABo.js} +9 -9
  222. package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-CgTNOhnu.js +1 -0
  223. package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-CKeQT5Ty.js +25 -0
  224. package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-D3s1MFkb.js +3 -0
  225. package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-BU_OAEMP.js → LoadingDots-By5zI316.js} +1 -1
  226. package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-ceAyBX-H.js → LogViewer-CM5zg40N.js} +3 -3
  227. package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-djPLI-WV.js → ReportIssueModal-C2PLkej3.js} +4 -4
  228. package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-DanvyBPb.js +1 -0
  229. package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-ZlRKbhrq.js → ScenarioViewer-DUMfcNVK.js} +3 -3
  230. package/codeyam-cli/src/webserver/build/client/assets/Spinner-D0LgAaSa.js +34 -0
  231. package/codeyam-cli/src/webserver/build/client/assets/TruncatedFilePath-CK7-NaPZ.js +1 -0
  232. package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-BA_Ry-rs.js +1 -0
  233. package/codeyam-cli/src/webserver/build/client/assets/{_index-C96V0n15.js → _index-BAWd-Xjf.js} +4 -4
  234. package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-BpKzcsJz.js → activity.(_tab)-BOARiB-g.js} +8 -8
  235. package/codeyam-cli/src/webserver/build/client/assets/{addon-web-links-Duc5hnl7.js → addon-web-links-CHx25PAe.js} +1 -1
  236. package/codeyam-cli/src/webserver/build/client/assets/{agent-transcripts-D9hemwl6.js → agent-transcripts-Bg3e7q4S.js} +7 -7
  237. package/codeyam-cli/src/webserver/build/client/assets/api.editor-project-info-l0sNRNKZ.js +1 -0
  238. package/codeyam-cli/src/webserver/build/client/assets/api.editor-recapture-stale-l0sNRNKZ.js +1 -0
  239. package/codeyam-cli/src/webserver/build/client/assets/api.editor-rename-scenario-l0sNRNKZ.js +1 -0
  240. package/codeyam-cli/src/webserver/build/client/assets/api.editor-save-seed-state-l0sNRNKZ.js +1 -0
  241. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-coverage-l0sNRNKZ.js +1 -0
  242. package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-prompt-l0sNRNKZ.js +1 -0
  243. package/codeyam-cli/src/webserver/build/client/assets/api.editor-session-l0sNRNKZ.js +1 -0
  244. package/codeyam-cli/src/webserver/build/client/assets/{book-open-D_nMCFmP.js → book-open-CL-lMgHh.js} +2 -2
  245. package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-BH2h1Ea2.js → chevron-down-GmAjGS9-.js} +2 -2
  246. package/codeyam-cli/src/webserver/build/client/assets/chunk-JZWAC4HX-BAdwhyCx.js +43 -0
  247. package/codeyam-cli/src/webserver/build/client/assets/{circle-check-DyIKORY6.js → circle-check-DFcQkN5j.js} +2 -2
  248. package/codeyam-cli/src/webserver/build/client/assets/{copy-NDbZjXao.js → copy-C6iF61Xs.js} +3 -3
  249. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-4ImjHTVC.js +41 -0
  250. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-C8y4mmyv.js +1 -0
  251. package/codeyam-cli/src/webserver/build/client/assets/editor._tab-Gbk_i5Js.js +1 -0
  252. package/codeyam-cli/src/webserver/build/client/assets/editor.entity.(_sha)-CGzKlIHg.js +58 -0
  253. package/codeyam-cli/src/webserver/build/client/assets/editorPreview-oepecPae.js +41 -0
  254. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-DItJnD8s.js → entity._sha._-Blfy9UlN.js} +3 -3
  255. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-KTQuL0aj.js +6 -0
  256. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-C6eeL24i.js +6 -0
  257. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-DQM8E7L4.js +6 -0
  258. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-BMvVHNXU.js → entity._sha_.edit._scenarioId-CAoXLsQr.js} +2 -2
  259. package/codeyam-cli/src/webserver/build/client/assets/{entry.client-DTvKq3TY.js → entry.client-SuW9syRS.js} +6 -6
  260. package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-Daa96Fr1.js +1 -0
  261. package/codeyam-cli/src/webserver/build/client/assets/files-D-xGrg29.js +1 -0
  262. package/codeyam-cli/src/webserver/build/client/assets/git-Bq_fbXP5.js +1 -0
  263. package/codeyam-cli/src/webserver/build/client/assets/globals-Yn9W3zp3.css +1 -0
  264. package/codeyam-cli/src/webserver/build/client/assets/{index-BcvgDzbZ.js → index-Bp1l4hSv.js} +1 -1
  265. package/codeyam-cli/src/webserver/build/client/assets/{index-10oVnAAH.js → index-CWV9XZiG.js} +1 -1
  266. package/codeyam-cli/src/webserver/build/client/assets/{index-yHOVb4rc.js → index-DE3jI_dv.js} +1 -1
  267. package/codeyam-cli/src/webserver/build/client/assets/jsx-runtime-D_zvdyIk.js +9 -0
  268. package/codeyam-cli/src/webserver/build/client/assets/labs-B_IX45ih.js +1 -0
  269. package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-BAXYRVEO.js → loader-circle-De-7qQ2u.js} +2 -2
  270. package/codeyam-cli/src/webserver/build/client/assets/manifest-2ef99f38.js +1 -0
  271. package/codeyam-cli/src/webserver/build/client/assets/memory-Cx2xEx7s.js +101 -0
  272. package/codeyam-cli/src/webserver/build/client/assets/{pause-DTAcYxBt.js → pause-CFxEKL1u.js} +3 -3
  273. package/codeyam-cli/src/webserver/build/client/assets/root-BxUQigda.js +67 -0
  274. package/codeyam-cli/src/webserver/build/client/assets/{search-fKo7v0Zo.js → search-BdBb5aqc.js} +2 -2
  275. package/codeyam-cli/src/webserver/build/client/assets/settings-DdE-Untf.js +1 -0
  276. package/codeyam-cli/src/webserver/build/client/assets/simulations-DSCdE99u.js +1 -0
  277. package/codeyam-cli/src/webserver/build/client/assets/{terminal-BG4heKCG.js → terminal-CrplD4b1.js} +3 -3
  278. package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-DtSmdtM4.js → triangle-alert-DqJ0j69l.js} +2 -2
  279. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-DhXHbEjP.js +1 -0
  280. package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-C14nCb1q.js → useLastLogLine-BNd5hYuW.js} +1 -1
  281. package/codeyam-cli/src/webserver/build/client/assets/useReportContext-Cy5Qg_UR.js +1 -0
  282. package/codeyam-cli/src/webserver/build/client/assets/useToast-5HR2j9ZE.js +1 -0
  283. package/codeyam-cli/src/webserver/build/client/sound-test.html +98 -0
  284. package/codeyam-cli/src/webserver/build/server/assets/analysisRunner-BPmOG9bE.js +13 -0
  285. package/codeyam-cli/src/webserver/build/server/assets/index-Cd-ufawF.js +1 -0
  286. package/codeyam-cli/src/webserver/build/server/assets/init-CzeBGOto.js +10 -0
  287. package/codeyam-cli/src/webserver/build/server/assets/progress-CHTtrxFG.js +1 -0
  288. package/codeyam-cli/src/webserver/build/server/assets/server-build-Dht7CKXY.js +552 -0
  289. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  290. package/codeyam-cli/src/webserver/build-info.json +5 -5
  291. package/codeyam-cli/src/webserver/editorProxy.js +586 -17
  292. package/codeyam-cli/src/webserver/editorProxy.js.map +1 -1
  293. package/codeyam-cli/src/webserver/idleDetector.js +106 -0
  294. package/codeyam-cli/src/webserver/idleDetector.js.map +1 -0
  295. package/codeyam-cli/src/webserver/mockStateEvents.js +28 -0
  296. package/codeyam-cli/src/webserver/mockStateEvents.js.map +1 -0
  297. package/codeyam-cli/src/webserver/public/sound-test.html +98 -0
  298. package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +21 -3
  299. package/codeyam-cli/src/webserver/scripts/journalCapture.ts +130 -4
  300. package/codeyam-cli/src/webserver/server.js +100 -34
  301. package/codeyam-cli/src/webserver/server.js.map +1 -1
  302. package/codeyam-cli/src/webserver/terminalServer.js +242 -48
  303. package/codeyam-cli/src/webserver/terminalServer.js.map +1 -1
  304. package/codeyam-cli/templates/__tests__/editor-step-hook.prompt-capture.test.ts +118 -0
  305. package/codeyam-cli/templates/chrome-extension-react/EXTENSION_SETUP.md +75 -0
  306. package/codeyam-cli/templates/chrome-extension-react/README.md +46 -0
  307. package/codeyam-cli/templates/chrome-extension-react/gitignore +15 -0
  308. package/codeyam-cli/templates/chrome-extension-react/index.html +12 -0
  309. package/codeyam-cli/templates/chrome-extension-react/package.json +27 -0
  310. package/codeyam-cli/templates/chrome-extension-react/popup.html +12 -0
  311. package/codeyam-cli/templates/chrome-extension-react/public/manifest.json +15 -0
  312. package/codeyam-cli/templates/chrome-extension-react/src/background/service-worker.ts +7 -0
  313. package/codeyam-cli/templates/chrome-extension-react/src/globals.css +6 -0
  314. package/codeyam-cli/templates/chrome-extension-react/src/lib/storage.ts +37 -0
  315. package/codeyam-cli/templates/chrome-extension-react/src/popup/App.tsx +12 -0
  316. package/codeyam-cli/templates/chrome-extension-react/src/popup/main.tsx +10 -0
  317. package/codeyam-cli/templates/chrome-extension-react/tsconfig.json +24 -0
  318. package/codeyam-cli/templates/chrome-extension-react/vite.config.ts +41 -0
  319. package/codeyam-cli/templates/codeyam-editor-claude.md +86 -5
  320. package/codeyam-cli/templates/codeyam-editor-reference.md +214 -0
  321. package/codeyam-cli/templates/editor-step-hook.py +193 -54
  322. package/codeyam-cli/templates/expo-react-native/MOBILE_SETUP.md +89 -0
  323. package/codeyam-cli/templates/expo-react-native/README.md +41 -0
  324. package/codeyam-cli/templates/expo-react-native/app/(tabs)/_layout.tsx +33 -0
  325. package/codeyam-cli/templates/expo-react-native/app/(tabs)/index.tsx +12 -0
  326. package/codeyam-cli/templates/expo-react-native/app/(tabs)/settings.tsx +12 -0
  327. package/codeyam-cli/templates/expo-react-native/app/_layout.tsx +12 -0
  328. package/codeyam-cli/templates/expo-react-native/app.json +18 -0
  329. package/codeyam-cli/templates/expo-react-native/babel.config.js +9 -0
  330. package/codeyam-cli/templates/expo-react-native/gitignore +12 -0
  331. package/codeyam-cli/templates/expo-react-native/global.css +3 -0
  332. package/codeyam-cli/templates/expo-react-native/lib/storage.ts +32 -0
  333. package/codeyam-cli/templates/expo-react-native/metro.config.js +6 -0
  334. package/codeyam-cli/templates/expo-react-native/nativewind-env.d.ts +1 -0
  335. package/codeyam-cli/templates/expo-react-native/package.json +38 -0
  336. package/codeyam-cli/templates/expo-react-native/tailwind.config.js +10 -0
  337. package/codeyam-cli/templates/expo-react-native/tsconfig.json +10 -0
  338. package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_PATTERNS.md +308 -0
  339. package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_UPGRADE.md +304 -0
  340. package/codeyam-cli/templates/nextjs-prisma-sqlite/DATABASE.md +126 -0
  341. package/codeyam-cli/templates/nextjs-prisma-sqlite/FEATURE_PATTERNS.md +37 -0
  342. package/codeyam-cli/templates/nextjs-prisma-sqlite/README.md +53 -0
  343. package/codeyam-cli/templates/nextjs-prisma-sqlite/app/lib/prisma.ts +9 -4
  344. package/codeyam-cli/templates/nextjs-prisma-sqlite/env +4 -0
  345. package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +1 -0
  346. package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +2 -1
  347. package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +4 -1
  348. package/codeyam-cli/templates/nextjs-prisma-sqlite/seed-adapter.ts +127 -0
  349. package/codeyam-cli/templates/nextjs-prisma-supabase/README.md +52 -0
  350. package/codeyam-cli/templates/{nextjs-prisma-sqlite/PRISMA_SETUP.md → nextjs-prisma-supabase/SUPABASE_SETUP.md} +37 -17
  351. package/codeyam-cli/templates/nextjs-prisma-supabase/app/api/todos/route.ts +17 -0
  352. package/codeyam-cli/templates/nextjs-prisma-supabase/app/globals.css +26 -0
  353. package/codeyam-cli/templates/nextjs-prisma-supabase/app/layout.tsx +34 -0
  354. package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/prisma.ts +20 -0
  355. package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/supabase.ts +12 -0
  356. package/codeyam-cli/templates/nextjs-prisma-supabase/app/page.tsx +10 -0
  357. package/codeyam-cli/templates/nextjs-prisma-supabase/env +9 -0
  358. package/codeyam-cli/templates/nextjs-prisma-supabase/eslint.config.mjs +11 -0
  359. package/codeyam-cli/templates/nextjs-prisma-supabase/gitignore +40 -0
  360. package/codeyam-cli/templates/nextjs-prisma-supabase/next.config.ts +11 -0
  361. package/codeyam-cli/templates/nextjs-prisma-supabase/package.json +37 -0
  362. package/codeyam-cli/templates/nextjs-prisma-supabase/postcss.config.mjs +7 -0
  363. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/schema.prisma +27 -0
  364. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/seed.ts +39 -0
  365. package/codeyam-cli/templates/nextjs-prisma-supabase/prisma.config.ts +12 -0
  366. package/codeyam-cli/templates/nextjs-prisma-supabase/tsconfig.json +34 -0
  367. package/codeyam-cli/templates/seed-adapters/supabase.ts +282 -0
  368. package/codeyam-cli/templates/skills/codeyam-dev-mode/SKILL.md +1 -1
  369. package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +90 -9
  370. package/package.json +2 -1
  371. package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +101 -0
  372. package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -1
  373. package/packages/database/src/lib/loadEntities.js +0 -6
  374. package/packages/database/src/lib/loadEntities.js.map +1 -1
  375. package/packages/database/src/lib/updateCommitMetadata.js +0 -25
  376. package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
  377. package/packages/types/src/enums/ProjectFramework.js +2 -0
  378. package/packages/types/src/enums/ProjectFramework.js.map +1 -1
  379. package/codeyam-cli/src/webserver/build/client/assets/CopyButton-DmJveP3T.js +0 -1
  380. package/codeyam-cli/src/webserver/build/client/assets/EntityTypeBadge-g3saevPb.js +0 -1
  381. package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-Bu6c6aDe.js +0 -1
  382. package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-DYFW3lDD.js +0 -25
  383. package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-DLeucoVX.js +0 -3
  384. package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-BED4B6sP.js +0 -1
  385. package/codeyam-cli/src/webserver/build/client/assets/Spinner-Bb5uFQ5V.js +0 -34
  386. package/codeyam-cli/src/webserver/build/client/assets/TruncatedFilePath-C8OKAR5x.js +0 -1
  387. package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-oAf2Kqsf.js +0 -1
  388. package/codeyam-cli/src/webserver/build/client/assets/chunk-JZWAC4HX-C4pqxYJB.js +0 -51
  389. package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CMT1jU2q.js +0 -21
  390. package/codeyam-cli/src/webserver/build/client/assets/dev.empty-CltMNppm.js +0 -1
  391. package/codeyam-cli/src/webserver/build/client/assets/editor-Rfq_y0VR.js +0 -10
  392. package/codeyam-cli/src/webserver/build/client/assets/editorPreview-GNwaLSmC.js +0 -41
  393. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-CCa2trIL.js +0 -6
  394. package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-CF164ouH.js +0 -6
  395. package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-p9hhkjJM.js +0 -6
  396. package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-cPo8LiG3.js +0 -1
  397. package/codeyam-cli/src/webserver/build/client/assets/files-DO4CZ16O.js +0 -1
  398. package/codeyam-cli/src/webserver/build/client/assets/git-CdN8sCqs.js +0 -1
  399. package/codeyam-cli/src/webserver/build/client/assets/globals-Bd0cs8vw.css +0 -1
  400. package/codeyam-cli/src/webserver/build/client/assets/labs-Zk7ryIM1.js +0 -1
  401. package/codeyam-cli/src/webserver/build/client/assets/manifest-9ab0aba3.js +0 -1
  402. package/codeyam-cli/src/webserver/build/client/assets/memory-Dg0mvYrI.js +0 -96
  403. package/codeyam-cli/src/webserver/build/client/assets/root-3ciuWk-c.js +0 -67
  404. package/codeyam-cli/src/webserver/build/client/assets/settings-DfuTtcJP.js +0 -1
  405. package/codeyam-cli/src/webserver/build/client/assets/simulations-B3aOzpCZ.js +0 -1
  406. package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-CrAK28Bc.js +0 -1
  407. package/codeyam-cli/src/webserver/build/client/assets/useReportContext-O-jkvSPx.js +0 -1
  408. package/codeyam-cli/src/webserver/build/client/assets/useToast-9FIWuYfK.js +0 -1
  409. package/codeyam-cli/src/webserver/build/server/assets/index-DCxIbVvl.js +0 -1
  410. package/codeyam-cli/src/webserver/build/server/assets/server-build-E-peu3XZ.js +0 -367
@@ -0,0 +1,214 @@
1
+ # .codeyam/ Directory Reference
2
+
3
+ This file documents the `.codeyam/` internals and CLI commands. Consult this when you're stuck on scenario registration, audit failures, preview issues, or understanding what files do what.
4
+
5
+ ## Directory Structure
6
+
7
+ ### Committed Files (shared across clones)
8
+
9
+ - `config.json` — Project configuration: slug, screen sizes, default viewport, feature metadata
10
+ - `editor-scenarios/` — Scenario JSON files with seed data, localStorage, MSW handlers, and metadata
11
+ - `scenarios-manifest.json` — Index of all scenarios for database sync on fresh clones
12
+ - `design-system.md` — Design tokens and brand guidelines (if present)
13
+ - `glossary.json` — Entity glossary built during extraction steps
14
+ - `msw-handlers/` — MSW handler files for API mocking (one per scenario)
15
+ - `seed-adapters/` — Seed adapter templates for database seeding
16
+
17
+ ### Gitignored Files (machine-local)
18
+
19
+ - `db.sqlite3` / `db.sqlite3-wal` / `db.sqlite3-shm` — SQLite database (rebuilt on clone via `codeyam editor`)
20
+ - `secrets.json` — API keys (Anthropic, etc.)
21
+ - `server.json` / `server-state.json` — Background server process state
22
+ - `queue.json` — Analysis job queue state
23
+ - `active-scenario.json` — Currently active scenario for the preview
24
+ - `editor-step.json` — Current editor workflow step number
25
+ - `editor-user-prompt.txt` — The user's feature request text
26
+ - `claude-session-id.txt` — Claude Code session ID for step tracking
27
+ - `editor-mode-context.md` / `dev-mode-context.md` — Generated context for Claude
28
+ - `logs/` — Server and analysis logs
29
+ - `llm-calls/` — LLM call recordings
30
+ - `captures/` — Playwright screenshot captures
31
+ - `results/` — Analysis results
32
+ - `tmp/` — Temporary files (use for large scenario JSON)
33
+ - `rules/` — Auto-installed Claude rules
34
+ - `bin/` — Helper scripts and hooks
35
+
36
+ ## CLI Command Reference
37
+
38
+ All commands use the pattern `codeyam editor <subcommand>`.
39
+
40
+ ### Scenario Management
41
+
42
+ | Command | Description |
43
+ | --------------------------------------- | ---------------------------------------------------------- |
44
+ | `codeyam editor register '<json>'` | Register a scenario (inline JSON or `@path/to/file.json`) |
45
+ | `codeyam editor scenarios` | List all registered scenarios |
46
+ | `codeyam editor delete <scenarioId>` | Delete a scenario by ID |
47
+ | `codeyam editor scenario-coverage` | Verify all affected scenarios are fresh after code changes |
48
+ | `codeyam editor validate-seed '<json>'` | Validate seed data structure |
49
+
50
+ ### Preview & Verification
51
+
52
+ | Command | Description |
53
+ | --------------------------------- | ------------------------------------------------------------------------------------------------- |
54
+ | `codeyam editor preview '<json>'` | Navigate preview — **must include `dimension`** (e.g., `{"path":"/route","dimension":"Desktop"}`) |
55
+ | `codeyam editor client-errors` | Show client-side errors from the preview iframe |
56
+ | `codeyam editor audit` | Check that glossary entries have registered scenarios and tests |
57
+
58
+ ### Entity Analysis
59
+
60
+ | Command | Description |
61
+ | ------------------------------------------------ | --------------------------------------------------- |
62
+ | `codeyam editor analyze-imports` | Build the import dependency graph from source files |
63
+ | `codeyam editor dependents <EntityName>` | Find all entities that import a given entity |
64
+ | `codeyam editor isolate "ComponentA ComponentB"` | Create isolation route directories for components |
65
+
66
+ ### Server
67
+
68
+ | Command | Description |
69
+ | --------------------------- | ----------------------- |
70
+ | `codeyam editor dev-server` | Query dev server status |
71
+
72
+ ### Workflow
73
+
74
+ | Command | Description |
75
+ | ------------------------------------------------------- | --------------------------------------------------------------- |
76
+ | `codeyam editor <1-18>` | Jump to a specific editor workflow step |
77
+ | `codeyam editor steps` | Show setup overview or cycle progress |
78
+ | `codeyam editor change <feature>` | Start the change workflow for modifying features |
79
+ | `codeyam editor sync` | Import scenarios from manifest into database (used after clone) |
80
+ | `codeyam editor migrate [step\|next\|complete\|status]` | Run migration workflow steps |
81
+
82
+ ## Scenario Registration Patterns
83
+
84
+ ### Component-Level Scenario
85
+
86
+ ```json
87
+ {
88
+ "name": "TaskCard - Overdue",
89
+ "componentName": "TaskCard",
90
+ "url": "/isolated-components/TaskCard?s=Overdue",
91
+ "dimensions": ["Desktop"]
92
+ }
93
+ ```
94
+
95
+ ### App-Level Scenario
96
+
97
+ ```json
98
+ {
99
+ "name": "Dashboard with Tasks",
100
+ "url": "/",
101
+ "dimensions": ["Desktop"],
102
+ "seedData": {
103
+ "tasks": [{ "id": 1, "title": "Ship feature", "status": "in_progress" }]
104
+ },
105
+ "localStorage": { "user": "{\"name\":\"Alice\"}" }
106
+ }
107
+ ```
108
+
109
+ ### Large JSON — Use a Tmp File
110
+
111
+ Write JSON to `.codeyam/tmp/scenario.json` using the **Write tool**, then:
112
+
113
+ ```bash
114
+ codeyam editor register @.codeyam/tmp/scenario.json
115
+ ```
116
+
117
+ ### Re-registration
118
+
119
+ Registering a scenario with the same name replaces the existing one. No need to delete first.
120
+
121
+ ### Dimensions
122
+
123
+ Dimension names come from `screenSizes` in `.codeyam/config.json`. Common values: `"Desktop"`, `"Mobile"`, `"Tablet"`. Every scenario and preview command must specify a dimension.
124
+
125
+ ## Troubleshooting
126
+
127
+ ### Audit gate blocking step 8+
128
+
129
+ The audit checks that every glossary entity has at least one scenario and passes tests. Fix by:
130
+
131
+ 1. Run `codeyam editor audit` to see which entities are missing coverage
132
+ 2. Register scenarios for uncovered entities
133
+ 3. Fix any failing tests
134
+ 4. Re-run audit — do NOT loop `audit` and `analyze-imports` repeatedly
135
+
136
+ ### Scenarios showing empty/blank pages or error pages
137
+
138
+ The scenario renders a URL but the page has no visible content, or shows an error page. Common causes:
139
+
140
+ - **URL references IDs that don't exist in the seed data**: The URL contains a dynamic segment (e.g., `/items/abc-123`) but the seed data creates records with different IDs. Check the register output for `API response error` lines — they show the exact API call that failed and the server's response.
141
+ - **Seed data doesn't match the code**: The seeded data has fields the component doesn't read, or the component expects data the seed doesn't provide
142
+ - **Missing API route**: The component fetches from an API that doesn't exist yet
143
+ - **Component not exported or not mounted**: The isolation route doesn't render the component
144
+ - **Only create scenarios for states the current code can render** — if the component isn't built yet, the screenshot will be blank
145
+
146
+ ### Client errors in preview
147
+
148
+ Run `codeyam editor client-errors` to see errors from the preview. There are three types:
149
+
150
+ - **Console errors** (`Page console.error:`): JavaScript runtime errors — missing env vars, import errors, schema mismatches
151
+ - **HTTP errors** (`HTTP error: status=NNN`): The page URL itself returned a non-2xx status (e.g., 404 page not found)
152
+ - **API response errors** (`API response error: GET /api/... → NNN`): An API call made during page load returned a non-2xx status, with the server's response body included
153
+
154
+ API response errors are the most actionable — they show the exact endpoint that failed and what the server returned. When you see one, read the scenario's seed data and verify that the IDs in the URL match IDs created by the seed. For example, if the URL is `/page/items/abc-123` but the seed creates items with ID `item-1`, the API call to `/api/items/abc-123` will return 404.
155
+
156
+ ### Dependents returning nothing
157
+
158
+ `codeyam editor dependents <Entity>` requires the import graph to be built first. Run:
159
+
160
+ ```bash
161
+ codeyam editor analyze-imports
162
+ ```
163
+
164
+ Then retry `dependents`. The import graph persists in the database.
165
+
166
+ ### Database missing after clone
167
+
168
+ This is expected — `db.sqlite3` is gitignored. Running `codeyam editor` detects this state (config.json exists, DB doesn't) and automatically runs `init --force` to rebuild the database and sync scenarios from the manifest.
169
+
170
+ ### Dev server not starting
171
+
172
+ Check if another process holds the port:
173
+
174
+ 1. Look at `.codeyam/server-state.json` for the PID and port
175
+ 2. Kill any stale process
176
+ 3. Restart with `codeyam editor` (the editor command starts the server)
177
+
178
+ ### Step validation errors
179
+
180
+ Each step has prerequisites. If a step refuses to run:
181
+
182
+ 1. Run `codeyam editor steps` to see which steps are complete
183
+ 2. Complete the prerequisite steps first
184
+ 3. Don't skip steps — the workflow is sequential
185
+
186
+ ### Dimension mismatch
187
+
188
+ If previews look wrong or captures fail:
189
+
190
+ - Check `screenSizes` in `.codeyam/config.json` for valid dimension names
191
+ - Scenario `dimensions` must reference names defined in `screenSizes`
192
+ - Preview commands must also include `dimension` — don't omit it
193
+
194
+ ### Preview not updating
195
+
196
+ If changes aren't reflected in the preview:
197
+
198
+ - The dev server may need to rebuild — check terminal output for compilation errors
199
+ - Hard-refresh the preview: `codeyam editor preview '{"path":"<current-path>","dimension":"<dimension>","forceRefresh":true}'`
200
+ - Check `codeyam editor client-errors` for runtime errors blocking render
201
+
202
+ ## Anti-Patterns
203
+
204
+ **Don't loop audit/analyze-imports.** If audit fails, fix the underlying issues (missing scenarios, failing tests). Running audit repeatedly without fixing anything wastes time.
205
+
206
+ **Don't use `prisma db push --force-reset`.** This drops all data. Instead, add `@default()` values for new required columns, or make them optional (`Int?`). Use `npm run db:push`.
207
+
208
+ **Don't hardcode viewport dimensions.** Always reference named dimensions from `screenSizes` in config.json (e.g., `"Desktop"`). Don't use raw pixel values like `1440x900`.
209
+
210
+ **Don't use bash heredocs for JSON.** Braces and quotes in heredocs trigger Claude Code security warnings. Use the **Write tool** to create `.codeyam/tmp/scenario.json`, then `codeyam editor register @.codeyam/tmp/scenario.json`.
211
+
212
+ **Don't blanket-ignore `.codeyam` in `.gitignore`.** Only machine-local files are ignored with granular patterns. Shared files (`config.json`, `editor-scenarios/`, etc.) must be committable.
213
+
214
+ **Don't register scenarios for unbuilt features.** If the component or page doesn't exist yet, the scenario will capture a blank page. Build the component first, then create scenarios for what it actually renders.
@@ -15,34 +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",
29
- 13: "Present",
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",
30
35
  }
31
36
 
32
37
  STEP_RESTRICTIONS = {
33
38
  1: "Do NOT write any code. Plan and describe only. Wait for user confirmation.",
34
- 2: "Do NOT create scenarios or run codeyam analyze. Build fast working prototype with real data.",
35
- 3: "Present a selection menu (AskUserQuestion) for confirmation. Do NOT refactor or create scenarios until approved.",
36
- 4: "Do NOT write any code. Read every file, identify all extractable pieces, write a numbered plan. Planning only.",
37
- 5: "Execute the extraction plan from step 4. Components first (no tests), then library functions via TDD. Page files must contain ZERO direct JSX.",
38
- 6: "Do NOT write application code or scenarios. Update the glossary only.",
39
- 7: "Create isolation routes for visual components, run tests for library functions. Register component scenarios via codeyam editor register.",
40
- 8: "Do NOT modify application code. Create and register app-level scenarios only.",
41
- 9: "Do NOT modify application code. Create user-persona scenarios only (or skip if no users).",
42
- 10: "Verify component isolation screenshots AND editor scenarios. After ANY code fix, re-register affected components. Fix only — do NOT add features.",
43
- 11: "Create or update the journal entry for this feature. Do NOT create a duplicate check if one exists first.",
44
- 12: "Verify ALL screenshots exist and NO client-side errors (/api/editor-client-errors). Run codeyam editor audit. Do not proceed until all checks pass.",
45
- 13: "Show the results panel, present summary, then 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`.",
46
82
  }
47
83
 
48
84
 
@@ -81,6 +117,13 @@ def detect_event():
81
117
 
82
118
 
83
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
+
84
127
  project_dir = os.environ.get("CLAUDE_PROJECT_DIR", os.getcwd())
85
128
  state_path = os.path.join(project_dir, ".codeyam", "editor-step.json")
86
129
  prompt_path = os.path.join(project_dir, ".codeyam", "editor-user-prompt.txt")
@@ -88,17 +131,34 @@ def main():
88
131
  # Detect event early so we can capture the user prompt even before state exists
89
132
  event_type, event_data = detect_event()
90
133
 
91
- # Capture the very first user prompt (before state file may exist).
92
- # Save to a separate file so it persists across state transitions.
93
- if event_type == "user_prompt" and not os.path.exists(prompt_path):
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":
94
140
  prompt_text = event_data.get("prompt", "").strip()
95
- if prompt_text:
96
- try:
97
- os.makedirs(os.path.dirname(prompt_path), exist_ok=True)
98
- with open(prompt_path, "w") as f:
99
- f.write(prompt_text)
100
- except Exception:
101
- pass # Best-effort
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
102
162
 
103
163
  if not os.path.exists(state_path):
104
164
  return
@@ -112,24 +172,40 @@ def main():
112
172
  step = state.get("step")
113
173
  label = state.get("label", "Unknown")
114
174
  feature = state.get("feature", "")
175
+ migration = state.get("migration") # Optional migration context
115
176
 
116
177
  if not step:
117
178
  return
118
179
 
119
180
  # Log the hook firing
120
181
  log_data = {"step": step, "label": label, "feature": feature, "hook": event_type}
182
+ if migration:
183
+ log_data["migration"] = True
121
184
  if event_type == "post_tool_use":
122
185
  log_data["tool"] = event_data.get("tool_name", "")
123
186
  log_event(project_dir, "hook", log_data)
124
187
 
125
- restriction = STEP_RESTRICTIONS.get(step, "")
126
- next_cmd = f"codeyam editor {step + 1}" if step < 13 else "codeyam editor 1"
188
+ # Use migration-specific labels/restrictions when in migration mode
189
+ if migration:
190
+ restriction = MIGRATION_STEP_RESTRICTIONS.get(step, "")
191
+ next_cmd = f"codeyam editor migrate {step + 1}" if step < 10 else "codeyam editor migrate next"
192
+ else:
193
+ restriction = STEP_RESTRICTIONS.get(step, "")
194
+ next_cmd = f"codeyam editor {step + 1}" if step < 18 else "codeyam editor 1"
127
195
 
128
196
  # UserPromptSubmit: concise workflow reminder injected before Claude processes the user's message
129
197
  if event_type == "user_prompt":
198
+ mode_label = "Migration Mode" if migration else "Editor Mode"
199
+ page_info = ""
200
+ if migration:
201
+ page_name = migration.get("pageName", "")
202
+ page_idx = migration.get("pageIndex", 0)
203
+ total = migration.get("totalPages", 0)
204
+ page_info = f" — Page {page_idx + 1}/{total} ({page_name})"
205
+
130
206
  lines = [
131
207
  f'<user-prompt-submit-hook>',
132
- f'Editor Mode — Step {step} ({label}): "{feature}"',
208
+ f'{mode_label} — Step {step} ({label}): "{feature}"{page_info}',
133
209
  ]
134
210
 
135
211
  # Include the active scenario so Claude knows what the user is looking at
@@ -149,13 +225,26 @@ def main():
149
225
  except (IOError, json.JSONDecodeError):
150
226
  pass
151
227
 
152
- if step == 13:
228
+ if migration and step == 8:
153
229
  lines.append(
154
230
  "If the user is requesting changes (even indirectly), "
155
- "run `codeyam editor change` BEFORE writing any code. "
231
+ "run `codeyam editor change` BEFORE making any modifications. "
232
+ "The change workflow ensures Working Session Results are shown to the user. "
233
+ "If the user chose to commit, run `codeyam editor migrate next` to advance to the next page."
234
+ )
235
+ elif step in (15, 16, 17, 18) and not migration:
236
+ lines.append(
237
+ "If the user is requesting changes (even indirectly), "
238
+ "run `codeyam editor change` BEFORE making any modifications "
239
+ "(code, scenarios, data, styles — everything). "
156
240
  "The change command gives you the post-change checklist. "
157
- "If the user chose to commit, run `codeyam editor steps` after committing "
158
- "to start the next feature."
241
+ "The change workflow ensures Working Session Results are shown to the user. "
242
+ "If the user chose to commit, run `codeyam editor 16` to advance to the commit step."
243
+ )
244
+ elif migration:
245
+ lines.append(
246
+ f"You are on migration step {step}. Follow the `codeyam editor migrate` workflow. "
247
+ f"Do NOT skip ahead or make changes outside the current step."
159
248
  )
160
249
  else:
161
250
  lines.append(
@@ -168,8 +257,9 @@ def main():
168
257
  print("\n".join(lines))
169
258
  return
170
259
 
260
+ mode_label = "Migration Mode" if migration else "Editor Mode"
171
261
  lines = [
172
- f'Editor Mode \u2014 Step {step} ({label}): "{feature}"',
262
+ f'{mode_label} \u2014 Step {step} ({label}): "{feature}"',
173
263
  ]
174
264
  if restriction:
175
265
  lines.append(restriction)
@@ -180,18 +270,40 @@ def main():
180
270
  BOLD_CYAN = "\033[1;36m"
181
271
  DIM = "\033[2m"
182
272
  RESET = "\033[0m"
183
- 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}"]
184
- for i in range(1, 14):
185
- lbl = STEP_LABELS[i].ljust(28)
186
- num = f" {i}" if i < 10 else f"{i}"
187
- content = f"{num}. {lbl}"
188
- if i < step:
189
- tracker.append(f"{DIM} \u2502{RESET}{GREEN} \u2713 {content}{RESET}{DIM}\u2502{RESET}")
190
- elif i == step:
191
- tracker.append(f"{DIM} \u2502{RESET}{BOLD_CYAN} \u2192 {content}{RESET}{DIM}\u2502{RESET}")
192
- else:
193
- tracker.append(f"{DIM} \u2502 \u25cb {content}\u2502{RESET}")
194
- 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}")
273
+
274
+ if migration:
275
+ # Migration progress tracker (10 steps)
276
+ page_name = migration.get("pageName", "")
277
+ page_idx = migration.get("pageIndex", 0)
278
+ total = migration.get("totalPages", 0)
279
+ tracker = [f"{DIM} Migration: Page {page_idx + 1}/{total} ({page_name}){RESET}"]
280
+ 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}")
281
+ for i in range(1, 11):
282
+ lbl = MIGRATION_STEP_LABELS[i].ljust(28)
283
+ num = f" {i}" if i < 10 else f"{i}"
284
+ cntnt = f"{num}. {lbl}"
285
+ if i < step:
286
+ tracker.append(f"{DIM} \u2502{RESET}{GREEN} \u2713 {cntnt}{RESET}{DIM}\u2502{RESET}")
287
+ elif i == step:
288
+ tracker.append(f"{DIM} \u2502{RESET}{BOLD_CYAN} \u2192 {cntnt}{RESET}{DIM}\u2502{RESET}")
289
+ else:
290
+ tracker.append(f"{DIM} \u2502 \u25cb {cntnt}\u2502{RESET}")
291
+ 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}")
292
+ else:
293
+ # Standard progress tracker (18 steps)
294
+ 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}"]
295
+ for i in range(1, 19):
296
+ lbl = STEP_LABELS[i].ljust(28)
297
+ num = f" {i}" if i < 10 else f"{i}"
298
+ content = f"{num}. {lbl}"
299
+ if i < step:
300
+ tracker.append(f"{DIM} \u2502{RESET}{GREEN} \u2713 {content}{RESET}{DIM}\u2502{RESET}")
301
+ elif i == step:
302
+ tracker.append(f"{DIM} \u2502{RESET}{BOLD_CYAN} \u2192 {content}{RESET}{DIM}\u2502{RESET}")
303
+ else:
304
+ tracker.append(f"{DIM} \u2502 \u25cb {content}\u2502{RESET}")
305
+ 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}")
306
+
195
307
  lines.append("Present this progress tracker to the user (copy verbatim):")
196
308
  lines.extend(tracker)
197
309
  lines.append(
@@ -199,6 +311,33 @@ def main():
199
311
  "\u2713 (done) or \u2717 (skipped + reason)."
200
312
  )
201
313
 
314
+ if event_type == "stop" and ((step in (15, 16) and not migration) or (step == 8 and migration)):
315
+ import subprocess as _sp
316
+ try:
317
+ _result = _sp.run(
318
+ ["git", "status", "--porcelain"],
319
+ cwd=project_dir,
320
+ capture_output=True, text=True, timeout=5
321
+ )
322
+ has_uncommitted = bool(_result.stdout.strip())
323
+ except Exception:
324
+ has_uncommitted = False
325
+
326
+ if has_uncommitted:
327
+ lines.append(
328
+ "\n\033[1;31m⚠️ You have uncommitted changes but haven't shown Working Session Results.\033[0m"
329
+ )
330
+ lines.append(
331
+ f"\033[31mRun `codeyam editor change` if you haven't already, then complete the "
332
+ f"checklist and run `{'codeyam editor migrate 8' if migration else 'codeyam editor 15'}` to show results to the user.\033[0m"
333
+ )
334
+
335
+ if event_type == "stop":
336
+ lines.append(
337
+ f"\n\033[2mReminder: Only use `codeyam editor` subcommands in the Build terminal. "
338
+ f"Follow `codeyam editor steps` when changing code.\033[0m"
339
+ )
340
+
202
341
  lines.append(f"When this step is complete, run: {next_cmd}")
203
342
 
204
343
  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
+ ```