@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.
- package/analyzer-template/.build-info.json +8 -8
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +3 -3
- package/analyzer-template/packages/ai/package.json +1 -1
- package/analyzer-template/packages/aws/package.json +1 -1
- package/analyzer-template/packages/database/package.json +1 -1
- package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +99 -0
- package/analyzer-template/packages/database/src/lib/loadEntities.ts +0 -6
- package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +0 -65
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +8 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +101 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js +0 -6
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntities.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js +0 -25
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts +2 -0
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js +2 -0
- package/analyzer-template/packages/github/dist/types/src/enums/ProjectFramework.js.map +1 -1
- package/analyzer-template/packages/types/src/enums/ProjectFramework.ts +2 -0
- package/analyzer-template/packages/ui-components/package.json +1 -1
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js +2 -0
- package/analyzer-template/packages/utils/dist/types/src/enums/ProjectFramework.js.map +1 -1
- package/codeyam-cli/src/cli.js +24 -0
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/commands/__tests__/editor.isolateArgs.test.js +51 -0
- package/codeyam-cli/src/commands/__tests__/editor.isolateArgs.test.js.map +1 -0
- package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js +56 -0
- package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js.map +1 -0
- package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js +101 -47
- package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js.map +1 -1
- package/codeyam-cli/src/commands/editor.js +3077 -509
- package/codeyam-cli/src/commands/editor.js.map +1 -1
- package/codeyam-cli/src/commands/editorIsolateArgs.js +25 -0
- package/codeyam-cli/src/commands/editorIsolateArgs.js.map +1 -0
- package/codeyam-cli/src/commands/init.js +69 -34
- package/codeyam-cli/src/commands/init.js.map +1 -1
- package/codeyam-cli/src/commands/telemetry.js +37 -0
- package/codeyam-cli/src/commands/telemetry.js.map +1 -0
- package/codeyam-cli/src/data/techStacks.js +77 -0
- package/codeyam-cli/src/data/techStacks.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js +173 -0
- package/codeyam-cli/src/utils/__tests__/analyzerFinalization.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js +46 -0
- package/codeyam-cli/src/utils/__tests__/backgroundServer.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorApi.test.js +18 -8
- package/codeyam-cli/src/utils/__tests__/editorApi.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +2201 -1
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorBroadcastViewport.test.js +76 -0
- package/codeyam-cli/src/utils/__tests__/editorBroadcastViewport.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorCaptureScenarioSeeding.test.js +137 -0
- package/codeyam-cli/src/utils/__tests__/editorCaptureScenarioSeeding.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorDeleteScenario.test.js +100 -0
- package/codeyam-cli/src/utils/__tests__/editorDeleteScenario.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js +152 -3
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js +76 -3
- package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js +381 -0
- package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorGuardMiddleware.test.js +67 -0
- package/codeyam-cli/src/utils/__tests__/editorGuardMiddleware.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js +140 -12
- package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js +238 -2
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js +202 -1
- package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorMigration.test.js +435 -0
- package/codeyam-cli/src/utils/__tests__/editorMigration.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +191 -5
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js +153 -0
- package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js +139 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioLookup.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js +291 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +1437 -2
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js +280 -0
- package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorSeedAdapterPrismaValidation.test.js +143 -0
- package/codeyam-cli/src/utils/__tests__/editorSeedAdapterPrismaValidation.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorSessionFilter.test.js +66 -0
- package/codeyam-cli/src/utils/__tests__/editorSessionFilter.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorShouldRevalidate.test.js +53 -0
- package/codeyam-cli/src/utils/__tests__/editorShouldRevalidate.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js +641 -45
- package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/glossaryAdd.test.js +177 -0
- package/codeyam-cli/src/utils/__tests__/glossaryAdd.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js +122 -0
- package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js +129 -0
- package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/routePatternMatching.test.js +118 -0
- package/codeyam-cli/src/utils/__tests__/routePatternMatching.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js +284 -0
- package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js +649 -223
- package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +14 -5
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/telemetry.test.js +159 -0
- package/codeyam-cli/src/utils/__tests__/telemetry.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js +51 -0
- package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/webappDetection.test.js +142 -0
- package/codeyam-cli/src/utils/__tests__/webappDetection.test.js.map +1 -0
- package/codeyam-cli/src/utils/analysisRunner.js +3 -1
- package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
- package/codeyam-cli/src/utils/analyzer.js +9 -0
- package/codeyam-cli/src/utils/analyzer.js.map +1 -1
- package/codeyam-cli/src/utils/analyzerFinalization.js +100 -0
- package/codeyam-cli/src/utils/analyzerFinalization.js.map +1 -0
- package/codeyam-cli/src/utils/backgroundServer.js +93 -17
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/database.js +37 -2
- package/codeyam-cli/src/utils/database.js.map +1 -1
- package/codeyam-cli/src/utils/editorApi.js +11 -5
- package/codeyam-cli/src/utils/editorApi.js.map +1 -1
- package/codeyam-cli/src/utils/editorAudit.js +410 -6
- package/codeyam-cli/src/utils/editorAudit.js.map +1 -1
- package/codeyam-cli/src/utils/editorBroadcastViewport.js +26 -0
- package/codeyam-cli/src/utils/editorBroadcastViewport.js.map +1 -0
- package/codeyam-cli/src/utils/editorDeleteScenario.js +67 -0
- package/codeyam-cli/src/utils/editorDeleteScenario.js.map +1 -0
- package/codeyam-cli/src/utils/editorDevServer.js +89 -1
- package/codeyam-cli/src/utils/editorDevServer.js.map +1 -1
- package/codeyam-cli/src/utils/editorEntityChangeStatus.js +13 -7
- package/codeyam-cli/src/utils/editorEntityChangeStatus.js.map +1 -1
- package/codeyam-cli/src/utils/editorEntityHelpers.js +144 -0
- package/codeyam-cli/src/utils/editorEntityHelpers.js.map +1 -0
- package/codeyam-cli/src/utils/editorGuard.js +36 -0
- package/codeyam-cli/src/utils/editorGuard.js.map +1 -0
- package/codeyam-cli/src/utils/editorImageVerifier.js +45 -10
- package/codeyam-cli/src/utils/editorImageVerifier.js.map +1 -1
- package/codeyam-cli/src/utils/editorJournal.js +78 -3
- package/codeyam-cli/src/utils/editorJournal.js.map +1 -1
- package/codeyam-cli/src/utils/editorLoaderHelpers.js +72 -1
- package/codeyam-cli/src/utils/editorLoaderHelpers.js.map +1 -1
- package/codeyam-cli/src/utils/editorMigration.js +224 -0
- package/codeyam-cli/src/utils/editorMigration.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreview.js +43 -2
- package/codeyam-cli/src/utils/editorPreview.js.map +1 -1
- package/codeyam-cli/src/utils/editorRecapture.js +109 -0
- package/codeyam-cli/src/utils/editorRecapture.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarioSwitch.js +134 -0
- package/codeyam-cli/src/utils/editorScenarioSwitch.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarios.js +488 -0
- package/codeyam-cli/src/utils/editorScenarios.js.map +1 -1
- package/codeyam-cli/src/utils/editorSeedAdapter.js +422 -0
- package/codeyam-cli/src/utils/editorSeedAdapter.js.map +1 -0
- package/codeyam-cli/src/utils/editorShouldRevalidate.js +21 -0
- package/codeyam-cli/src/utils/editorShouldRevalidate.js.map +1 -0
- package/codeyam-cli/src/utils/entityChangeStatus.js +89 -21
- package/codeyam-cli/src/utils/entityChangeStatus.js.map +1 -1
- package/codeyam-cli/src/utils/entityChangeStatus.server.js +97 -8
- package/codeyam-cli/src/utils/entityChangeStatus.server.js.map +1 -1
- package/codeyam-cli/src/utils/fileWatcher.js +38 -0
- package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
- package/codeyam-cli/src/utils/glossaryAdd.js +74 -0
- package/codeyam-cli/src/utils/glossaryAdd.js.map +1 -0
- package/codeyam-cli/src/utils/install-skills.js +14 -0
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/parseRegisterArg.js +31 -0
- package/codeyam-cli/src/utils/parseRegisterArg.js.map +1 -0
- package/codeyam-cli/src/utils/progress.js +2 -2
- package/codeyam-cli/src/utils/progress.js.map +1 -1
- package/codeyam-cli/src/utils/routePatternMatching.js +129 -0
- package/codeyam-cli/src/utils/routePatternMatching.js.map +1 -0
- package/codeyam-cli/src/utils/scenarioCoverage.js +77 -0
- package/codeyam-cli/src/utils/scenarioCoverage.js.map +1 -0
- package/codeyam-cli/src/utils/scenariosManifest.js +269 -74
- package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -1
- package/codeyam-cli/src/utils/serverState.js +30 -0
- package/codeyam-cli/src/utils/serverState.js.map +1 -1
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +14 -5
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
- package/codeyam-cli/src/utils/simulationGateMiddleware.js +17 -1
- package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -1
- package/codeyam-cli/src/utils/slugUtils.js +25 -0
- package/codeyam-cli/src/utils/slugUtils.js.map +1 -0
- package/codeyam-cli/src/utils/syncMocksMiddleware.js +2 -2
- package/codeyam-cli/src/utils/syncMocksMiddleware.js.map +1 -1
- package/codeyam-cli/src/utils/telemetry.js +106 -0
- package/codeyam-cli/src/utils/telemetry.js.map +1 -0
- package/codeyam-cli/src/utils/telemetryMiddleware.js +22 -0
- package/codeyam-cli/src/utils/telemetryMiddleware.js.map +1 -0
- package/codeyam-cli/src/utils/webappDetection.js +21 -0
- package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
- package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js +35 -0
- package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js.map +1 -0
- package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js +80 -0
- package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js.map +1 -0
- package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js +628 -0
- package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js.map +1 -0
- package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js +228 -0
- package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js.map +1 -0
- package/codeyam-cli/src/webserver/__tests__/stripClaudeCommand.test.js +79 -0
- package/codeyam-cli/src/webserver/__tests__/stripClaudeCommand.test.js.map +1 -0
- package/codeyam-cli/src/webserver/app/lib/clientErrors.js +71 -0
- package/codeyam-cli/src/webserver/app/lib/clientErrors.js.map +1 -0
- package/codeyam-cli/src/webserver/app/lib/git.js +3 -2
- package/codeyam-cli/src/webserver/app/lib/git.js.map +1 -1
- package/codeyam-cli/src/webserver/app/types/editor.js +8 -0
- package/codeyam-cli/src/webserver/app/types/editor.js.map +1 -0
- package/codeyam-cli/src/webserver/backgroundServer.js +60 -61
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/CopyButton-CLe80MMu.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-C76mRRiF.js → EntityItem-Crt_KN_U.js} +5 -5
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeBadge-CQgyEGV-.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-CobE682z.js → EntityTypeIcon-CD7lGABo.js} +9 -9
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-CgTNOhnu.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-CKeQT5Ty.js +25 -0
- package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-D3s1MFkb.js +3 -0
- package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-BU_OAEMP.js → LoadingDots-By5zI316.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-ceAyBX-H.js → LogViewer-CM5zg40N.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-djPLI-WV.js → ReportIssueModal-C2PLkej3.js} +4 -4
- package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-DanvyBPb.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-ZlRKbhrq.js → ScenarioViewer-DUMfcNVK.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/Spinner-D0LgAaSa.js +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/TruncatedFilePath-CK7-NaPZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-BA_Ry-rs.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{_index-C96V0n15.js → _index-BAWd-Xjf.js} +4 -4
- package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-BpKzcsJz.js → activity.(_tab)-BOARiB-g.js} +8 -8
- package/codeyam-cli/src/webserver/build/client/assets/{addon-web-links-Duc5hnl7.js → addon-web-links-CHx25PAe.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{agent-transcripts-D9hemwl6.js → agent-transcripts-Bg3e7q4S.js} +7 -7
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-project-info-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-recapture-stale-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-rename-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-save-seed-state-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-coverage-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-prompt-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-session-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{book-open-D_nMCFmP.js → book-open-CL-lMgHh.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-BH2h1Ea2.js → chevron-down-GmAjGS9-.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/chunk-JZWAC4HX-BAdwhyCx.js +43 -0
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-DyIKORY6.js → circle-check-DFcQkN5j.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{copy-NDbZjXao.js → copy-C6iF61Xs.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-4ImjHTVC.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-C8y4mmyv.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/editor._tab-Gbk_i5Js.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/editor.entity.(_sha)-CGzKlIHg.js +58 -0
- package/codeyam-cli/src/webserver/build/client/assets/editorPreview-oepecPae.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-DItJnD8s.js → entity._sha._-Blfy9UlN.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-KTQuL0aj.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-C6eeL24i.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-DQM8E7L4.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-BMvVHNXU.js → entity._sha_.edit._scenarioId-CAoXLsQr.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-DTvKq3TY.js → entry.client-SuW9syRS.js} +6 -6
- package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-Daa96Fr1.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/files-D-xGrg29.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/git-Bq_fbXP5.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/globals-Yn9W3zp3.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{index-BcvgDzbZ.js → index-Bp1l4hSv.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-10oVnAAH.js → index-CWV9XZiG.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-yHOVb4rc.js → index-DE3jI_dv.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/jsx-runtime-D_zvdyIk.js +9 -0
- package/codeyam-cli/src/webserver/build/client/assets/labs-B_IX45ih.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-BAXYRVEO.js → loader-circle-De-7qQ2u.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/manifest-2ef99f38.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/memory-Cx2xEx7s.js +101 -0
- package/codeyam-cli/src/webserver/build/client/assets/{pause-DTAcYxBt.js → pause-CFxEKL1u.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/root-BxUQigda.js +67 -0
- package/codeyam-cli/src/webserver/build/client/assets/{search-fKo7v0Zo.js → search-BdBb5aqc.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/settings-DdE-Untf.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/simulations-DSCdE99u.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{terminal-BG4heKCG.js → terminal-CrplD4b1.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-DtSmdtM4.js → triangle-alert-DqJ0j69l.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-DhXHbEjP.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-C14nCb1q.js → useLastLogLine-BNd5hYuW.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useReportContext-Cy5Qg_UR.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/useToast-5HR2j9ZE.js +1 -0
- package/codeyam-cli/src/webserver/build/client/sound-test.html +98 -0
- package/codeyam-cli/src/webserver/build/server/assets/analysisRunner-BPmOG9bE.js +13 -0
- package/codeyam-cli/src/webserver/build/server/assets/index-Cd-ufawF.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/init-CzeBGOto.js +10 -0
- package/codeyam-cli/src/webserver/build/server/assets/progress-CHTtrxFG.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-Dht7CKXY.js +552 -0
- package/codeyam-cli/src/webserver/build/server/index.js +1 -1
- package/codeyam-cli/src/webserver/build-info.json +5 -5
- package/codeyam-cli/src/webserver/editorProxy.js +586 -17
- package/codeyam-cli/src/webserver/editorProxy.js.map +1 -1
- package/codeyam-cli/src/webserver/idleDetector.js +106 -0
- package/codeyam-cli/src/webserver/idleDetector.js.map +1 -0
- package/codeyam-cli/src/webserver/mockStateEvents.js +28 -0
- package/codeyam-cli/src/webserver/mockStateEvents.js.map +1 -0
- package/codeyam-cli/src/webserver/public/sound-test.html +98 -0
- package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +21 -3
- package/codeyam-cli/src/webserver/scripts/journalCapture.ts +130 -4
- package/codeyam-cli/src/webserver/server.js +100 -34
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/src/webserver/terminalServer.js +242 -48
- package/codeyam-cli/src/webserver/terminalServer.js.map +1 -1
- package/codeyam-cli/templates/__tests__/editor-step-hook.prompt-capture.test.ts +118 -0
- package/codeyam-cli/templates/chrome-extension-react/EXTENSION_SETUP.md +75 -0
- package/codeyam-cli/templates/chrome-extension-react/README.md +46 -0
- package/codeyam-cli/templates/chrome-extension-react/gitignore +15 -0
- package/codeyam-cli/templates/chrome-extension-react/index.html +12 -0
- package/codeyam-cli/templates/chrome-extension-react/package.json +27 -0
- package/codeyam-cli/templates/chrome-extension-react/popup.html +12 -0
- package/codeyam-cli/templates/chrome-extension-react/public/manifest.json +15 -0
- package/codeyam-cli/templates/chrome-extension-react/src/background/service-worker.ts +7 -0
- package/codeyam-cli/templates/chrome-extension-react/src/globals.css +6 -0
- package/codeyam-cli/templates/chrome-extension-react/src/lib/storage.ts +37 -0
- package/codeyam-cli/templates/chrome-extension-react/src/popup/App.tsx +12 -0
- package/codeyam-cli/templates/chrome-extension-react/src/popup/main.tsx +10 -0
- package/codeyam-cli/templates/chrome-extension-react/tsconfig.json +24 -0
- package/codeyam-cli/templates/chrome-extension-react/vite.config.ts +41 -0
- package/codeyam-cli/templates/codeyam-editor-claude.md +86 -5
- package/codeyam-cli/templates/codeyam-editor-reference.md +214 -0
- package/codeyam-cli/templates/editor-step-hook.py +193 -54
- package/codeyam-cli/templates/expo-react-native/MOBILE_SETUP.md +89 -0
- package/codeyam-cli/templates/expo-react-native/README.md +41 -0
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/_layout.tsx +33 -0
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/index.tsx +12 -0
- package/codeyam-cli/templates/expo-react-native/app/(tabs)/settings.tsx +12 -0
- package/codeyam-cli/templates/expo-react-native/app/_layout.tsx +12 -0
- package/codeyam-cli/templates/expo-react-native/app.json +18 -0
- package/codeyam-cli/templates/expo-react-native/babel.config.js +9 -0
- package/codeyam-cli/templates/expo-react-native/gitignore +12 -0
- package/codeyam-cli/templates/expo-react-native/global.css +3 -0
- package/codeyam-cli/templates/expo-react-native/lib/storage.ts +32 -0
- package/codeyam-cli/templates/expo-react-native/metro.config.js +6 -0
- package/codeyam-cli/templates/expo-react-native/nativewind-env.d.ts +1 -0
- package/codeyam-cli/templates/expo-react-native/package.json +38 -0
- package/codeyam-cli/templates/expo-react-native/tailwind.config.js +10 -0
- package/codeyam-cli/templates/expo-react-native/tsconfig.json +10 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_PATTERNS.md +308 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/AUTH_UPGRADE.md +304 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/DATABASE.md +126 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/FEATURE_PATTERNS.md +37 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/README.md +53 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/lib/prisma.ts +9 -4
- package/codeyam-cli/templates/nextjs-prisma-sqlite/env +4 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +1 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +2 -1
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +4 -1
- package/codeyam-cli/templates/nextjs-prisma-sqlite/seed-adapter.ts +127 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/README.md +52 -0
- package/codeyam-cli/templates/{nextjs-prisma-sqlite/PRISMA_SETUP.md → nextjs-prisma-supabase/SUPABASE_SETUP.md} +37 -17
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/api/todos/route.ts +17 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/globals.css +26 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/layout.tsx +34 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/prisma.ts +20 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/lib/supabase.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/app/page.tsx +10 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/env +9 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/eslint.config.mjs +11 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/gitignore +40 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/next.config.ts +11 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/package.json +37 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/postcss.config.mjs +7 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/schema.prisma +27 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/prisma/seed.ts +39 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/prisma.config.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-supabase/tsconfig.json +34 -0
- package/codeyam-cli/templates/seed-adapters/supabase.ts +282 -0
- package/codeyam-cli/templates/skills/codeyam-dev-mode/SKILL.md +1 -1
- package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +90 -9
- package/package.json +2 -1
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +101 -0
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -1
- package/packages/database/src/lib/loadEntities.js +0 -6
- package/packages/database/src/lib/loadEntities.js.map +1 -1
- package/packages/database/src/lib/updateCommitMetadata.js +0 -25
- package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/packages/types/src/enums/ProjectFramework.js +2 -0
- package/packages/types/src/enums/ProjectFramework.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/CopyButton-DmJveP3T.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/EntityTypeBadge-g3saevPb.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-Bu6c6aDe.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/InteractivePreview-DYFW3lDD.js +0 -25
- package/codeyam-cli/src/webserver/build/client/assets/LibraryFunctionPreview-DLeucoVX.js +0 -3
- package/codeyam-cli/src/webserver/build/client/assets/SafeScreenshot-BED4B6sP.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/Spinner-Bb5uFQ5V.js +0 -34
- package/codeyam-cli/src/webserver/build/client/assets/TruncatedFilePath-C8OKAR5x.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-oAf2Kqsf.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/chunk-JZWAC4HX-C4pqxYJB.js +0 -51
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CMT1jU2q.js +0 -21
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-CltMNppm.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/editor-Rfq_y0VR.js +0 -10
- package/codeyam-cli/src/webserver/build/client/assets/editorPreview-GNwaLSmC.js +0 -41
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-CCa2trIL.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-CF164ouH.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-p9hhkjJM.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/fileTableUtils-cPo8LiG3.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-DO4CZ16O.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/git-CdN8sCqs.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/globals-Bd0cs8vw.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/labs-Zk7ryIM1.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-9ab0aba3.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/memory-Dg0mvYrI.js +0 -96
- package/codeyam-cli/src/webserver/build/client/assets/root-3ciuWk-c.js +0 -67
- package/codeyam-cli/src/webserver/build/client/assets/settings-DfuTtcJP.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/simulations-B3aOzpCZ.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-CrAK28Bc.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useReportContext-O-jkvSPx.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useToast-9FIWuYfK.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/index-DCxIbVvl.js +0 -1
- 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: "
|
|
19
|
-
3: "
|
|
20
|
-
4: "
|
|
21
|
-
5: "
|
|
22
|
-
6: "
|
|
23
|
-
7: "
|
|
24
|
-
8: "
|
|
25
|
-
9: "
|
|
26
|
-
10: "
|
|
27
|
-
11: "
|
|
28
|
-
12: "
|
|
29
|
-
13: "
|
|
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
|
|
35
|
-
3: "
|
|
36
|
-
4: "
|
|
37
|
-
5: "
|
|
38
|
-
6: "Do NOT write
|
|
39
|
-
7: "
|
|
40
|
-
8: "Do NOT
|
|
41
|
-
9: "
|
|
42
|
-
10: "
|
|
43
|
-
11: "
|
|
44
|
-
12: "Verify
|
|
45
|
-
13: "
|
|
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
|
|
92
|
-
#
|
|
93
|
-
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
-
|
|
126
|
-
|
|
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'
|
|
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 ==
|
|
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
|
|
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
|
-
"
|
|
158
|
-
"to
|
|
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'
|
|
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
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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
|
+
```
|