@codeyam/codeyam-cli 0.1.0-staging.415103 → 0.1.0-staging.44b55c1
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 +7 -7
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +9 -9
- package/analyzer-template/packages/ai/package.json +1 -1
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +0 -33
- package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +13 -7
- package/analyzer-template/packages/analyze/src/lib/asts/index.ts +7 -2
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +0 -98
- package/analyzer-template/packages/aws/package.json +2 -2
- package/analyzer-template/packages/database/package.json +3 -3
- package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +20 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +4 -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 +20 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.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/github/package.json +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/__tests__/memory-scripts/filter-session.test.js +196 -0
- package/codeyam-cli/src/__tests__/memory-scripts/filter-session.test.js.map +1 -0
- package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js +114 -0
- package/codeyam-cli/src/__tests__/memory-scripts/read-json-field.test.js.map +1 -0
- package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js +149 -0
- package/codeyam-cli/src/__tests__/memory-scripts/ripgrep-fallback.test.js.map +1 -0
- package/codeyam-cli/src/commands/default.js +3 -46
- package/codeyam-cli/src/commands/default.js.map +1 -1
- package/codeyam-cli/src/commands/editor.js +2354 -284
- package/codeyam-cli/src/commands/editor.js.map +1 -1
- package/codeyam-cli/src/commands/init.js +6 -1
- package/codeyam-cli/src/commands/init.js.map +1 -1
- 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__/devServerState.test.js +134 -0
- package/codeyam-cli/src/utils/__tests__/devServerState.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorApi.test.js +127 -0
- package/codeyam-cli/src/utils/__tests__/editorApi.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +635 -0
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorCapture.test.js +93 -0
- package/codeyam-cli/src/utils/__tests__/editorCapture.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js +304 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js +121 -0
- package/codeyam-cli/src/utils/__tests__/editorEntityChangeStatus.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js +294 -0
- package/codeyam-cli/src/utils/__tests__/editorImageVerifier.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js +542 -0
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js +393 -0
- package/codeyam-cli/src/utils/__tests__/editorLoaderHelpers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorMockState.test.js +270 -0
- package/codeyam-cli/src/utils/__tests__/editorMockState.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js +217 -0
- package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +266 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js +107 -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 +221 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +221 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js +213 -0
- package/codeyam-cli/src/utils/__tests__/editorSeedAdapter.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js +1737 -0
- package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/git.editor.test.js +134 -0
- package/codeyam-cli/src/utils/__tests__/git.editor.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js +107 -0
- package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js +101 -0
- package/codeyam-cli/src/utils/__tests__/parseRegisterArg.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/project.test.js +65 -0
- package/codeyam-cli/src/utils/__tests__/project.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js +121 -0
- package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js +246 -0
- package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +25 -5
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
- 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/backgroundServer.js +2 -2
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/buildFlags.js +4 -0
- package/codeyam-cli/src/utils/buildFlags.js.map +1 -0
- package/codeyam-cli/src/utils/devServerState.js +71 -0
- package/codeyam-cli/src/utils/devServerState.js.map +1 -0
- package/codeyam-cli/src/utils/editorApi.js +73 -0
- package/codeyam-cli/src/utils/editorApi.js.map +1 -0
- package/codeyam-cli/src/utils/editorAudit.js +159 -0
- package/codeyam-cli/src/utils/editorAudit.js.map +1 -0
- package/codeyam-cli/src/utils/editorCapture.js +102 -0
- package/codeyam-cli/src/utils/editorCapture.js.map +1 -0
- package/codeyam-cli/src/utils/editorDevServer.js +197 -0
- package/codeyam-cli/src/utils/editorDevServer.js.map +1 -0
- package/codeyam-cli/src/utils/editorEntityChangeStatus.js +44 -0
- package/codeyam-cli/src/utils/editorEntityChangeStatus.js.map +1 -0
- package/codeyam-cli/src/utils/editorImageVerifier.js +155 -0
- package/codeyam-cli/src/utils/editorImageVerifier.js.map +1 -0
- package/codeyam-cli/src/utils/editorJournal.js +225 -0
- package/codeyam-cli/src/utils/editorJournal.js.map +1 -0
- package/codeyam-cli/src/utils/editorLoaderHelpers.js +81 -0
- package/codeyam-cli/src/utils/editorLoaderHelpers.js.map +1 -0
- package/codeyam-cli/src/utils/editorMockState.js +248 -0
- package/codeyam-cli/src/utils/editorMockState.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreloadHelpers.js +135 -0
- package/codeyam-cli/src/utils/editorPreloadHelpers.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreview.js +106 -0
- package/codeyam-cli/src/utils/editorPreview.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarioSwitch.js +112 -0
- package/codeyam-cli/src/utils/editorScenarioSwitch.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarios.js +96 -0
- package/codeyam-cli/src/utils/editorScenarios.js.map +1 -0
- package/codeyam-cli/src/utils/editorSeedAdapter.js +173 -0
- package/codeyam-cli/src/utils/editorSeedAdapter.js.map +1 -0
- package/codeyam-cli/src/utils/entityChangeStatus.js +347 -0
- package/codeyam-cli/src/utils/entityChangeStatus.js.map +1 -0
- package/codeyam-cli/src/utils/entityChangeStatus.server.js +158 -0
- package/codeyam-cli/src/utils/entityChangeStatus.server.js.map +1 -0
- package/codeyam-cli/src/utils/git.js +51 -0
- package/codeyam-cli/src/utils/git.js.map +1 -1
- package/codeyam-cli/src/utils/install-skills.js +28 -17
- 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/project.js +15 -5
- package/codeyam-cli/src/utils/project.js.map +1 -1
- package/codeyam-cli/src/utils/scenarioMarkers.js +134 -0
- package/codeyam-cli/src/utils/scenarioMarkers.js.map +1 -0
- package/codeyam-cli/src/utils/scenariosManifest.js +112 -0
- package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -0
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +46 -16
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
- package/codeyam-cli/src/utils/testRunner.js +1 -1
- package/codeyam-cli/src/utils/testRunner.js.map +1 -1
- 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__/editorProxy.test.js +410 -0
- package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js.map +1 -0
- package/codeyam-cli/src/webserver/app/lib/database.js +41 -27
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/git.js +396 -0
- package/codeyam-cli/src/webserver/app/lib/git.js.map +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{CopyButton-DmJveP3T.js → CopyButton-BPXZwM4t.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-C76mRRiF.js → EntityItem-BcgbViKV.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-CobE682z.js → EntityTypeIcon-CQIG2qda.js} +9 -9
- package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-djPLI-WV.js → ReportIssueModal-BzHcG7SE.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-B76aig_2.js → ScenarioViewer-0DY_NKil.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-oAf2Kqsf.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{_index-C96V0n15.js → _index-DLxKhri3.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-BpKzcsJz.js → activity.(_tab)-BcY3q6nt.js} +6 -6
- package/codeyam-cli/src/webserver/build/client/assets/addon-canvas-DpzMmAy5.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/addon-fit-YJmn1quW.js +12 -0
- package/codeyam-cli/src/webserver/build/client/assets/addon-webgl-DI8QOUvO.js +58 -0
- package/codeyam-cli/src/webserver/build/client/assets/{agent-transcripts-D9hemwl6.js → agent-transcripts-Bni3iiUj.js} +5 -5
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-audit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-diff-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-file-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-load-commit-l0sNRNKZ.js +1 -0
- 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-scenarios-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{book-open-D_nMCFmP.js → book-open-BYOypzCa.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-BH2h1Ea2.js → chevron-down-C_Pmso5S.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-DyIKORY6.js → circle-check-BVMi9VA5.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{copy-NDbZjXao.js → copy-n2FB0_Sw.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CC6AbExI.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-Csi0_PMl.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/editor-pyT-NAuu.js +10 -0
- package/codeyam-cli/src/webserver/build/client/assets/editorPreview-BLQMSKZa.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-CrjR3zZW.js → entity._sha._-BF4oLwaE.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-C7YX6r3H.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-CF164ouH.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/{files-DO4CZ16O.js → files-BZrlFE1F.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/git-DdZcvjGh.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/globals-BkWJ_UNc.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/index-yHOVb4rc.js +15 -0
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-BAXYRVEO.js → loader-circle-DaAZ_H2w.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/manifest-753dd058.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{memory-FweZHj5U.js → memory-Bl2rpw8u.js} +13 -10
- package/codeyam-cli/src/webserver/build/client/assets/{pause-DTAcYxBt.js → pause-f5-1lKBt.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{root-Dzn8nIkU.js → root-B_X8HS1x.js} +15 -15
- package/codeyam-cli/src/webserver/build/client/assets/{search-fKo7v0Zo.js → search-Di64LWVb.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{settings-DfuTtcJP.js → settings-0OrEMU6J.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{simulations-B3aOzpCZ.js → simulations-DWT-CvLy.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{terminal-BG4heKCG.js → terminal-Br7MOqts.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-DtSmdtM4.js → triangle-alert-BLdiCuG-.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-CrAK28Bc.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/xterm-BqvuqXEL.js +27 -0
- package/codeyam-cli/src/webserver/build/server/assets/{index-DeSuKbSF.js → index-Dp5Hp9wV.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-DpDPLKrh.js +416 -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 +557 -50
- package/codeyam-cli/src/webserver/editorProxy.js.map +1 -1
- package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +414 -0
- package/codeyam-cli/src/webserver/scripts/journalCapture.ts +118 -9
- package/codeyam-cli/src/webserver/server.js +93 -12
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/src/webserver/terminalServer.js +131 -11
- package/codeyam-cli/src/webserver/terminalServer.js.map +1 -1
- package/codeyam-cli/templates/chrome-extension-react/EXTENSION_SETUP.md +75 -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 +26 -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/editor-step-hook.py +108 -20
- package/codeyam-cli/templates/expo-react-native/MOBILE_SETUP.md +89 -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 +37 -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 +112 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/FEATURE_PATTERNS.md +37 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/codeyam-isolate/layout.tsx +12 -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 +64 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +4 -1
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +4 -1
- package/codeyam-cli/templates/nextjs-prisma-sqlite/seed-adapter.ts +92 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/vitest.config.ts +13 -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 +36 -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/{codeyam-dev-mode.md → skills/codeyam-dev-mode/SKILL.md} +2 -2
- package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +145 -0
- package/codeyam-cli/templates/{codeyam-memory.md → skills/codeyam-memory/SKILL.md} +215 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/deprecated-prompt.md +100 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.mjs +139 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.mjs +52 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/misleading-api-prompt.md +117 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/read-json-field.mjs +61 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/lib/ripgrep-fallback.mjs +155 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/analyze-prompt.md +46 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.mjs +13 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter-session.mjs +95 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.mjs +160 -0
- package/package.json +15 -10
- package/packages/ai/src/lib/generateExecutionFlows.js +0 -11
- package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -1
- package/packages/analyze/src/lib/ProjectAnalyzer.js +10 -4
- package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/asts/index.js +4 -2
- package/packages/analyze/src/lib/asts/index.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +0 -40
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +20 -0
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -1
- package/packages/types/src/enums/ProjectFramework.js +2 -0
- package/packages/types/src/enums/ProjectFramework.js.map +1 -1
- package/scripts/npm-post-install.cjs +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/Terminal-BaIiqg_w.js +0 -41
- package/codeyam-cli/src/webserver/build/client/assets/addon-fit-CUXOrorO.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/createLucideIcon-CMT1jU2q.js +0 -21
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BiM6z3Do.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/editor-BaC8lHDG.js +0 -7
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-DloHYjtt.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-C28BiQzt.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/git-CFCTYk9I.js +0 -15
- package/codeyam-cli/src/webserver/build/client/assets/globals-BH6uYxPM.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-fb3128c3.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-ByhSyh0W.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/xterm-DMSzMhqy.js +0 -9
- package/codeyam-cli/src/webserver/build/server/assets/server-build-BbQ8YBP-.js +0 -362
- package/codeyam-cli/templates/codeyam-editor.md +0 -67
- package/scripts/finalize-analyzer.cjs +0 -13
- /package/codeyam-cli/templates/{codeyam-diagnose.md → commands/codeyam-diagnose.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-debug.md → skills/codeyam-debug/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-new-rule.md → skills/codeyam-new-rule/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-setup.md → skills/codeyam-setup/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-sim.md → skills/codeyam-sim/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-test.md → skills/codeyam-test/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-verify.md → skills/codeyam-verify/SKILL.md} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>CodeYam App</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/src/popup/main.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 3,
|
|
3
|
+
"name": "CodeYam App",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "Built with CodeYam Editor",
|
|
6
|
+
"action": {
|
|
7
|
+
"default_popup": "popup.html",
|
|
8
|
+
"default_title": "CodeYam App"
|
|
9
|
+
},
|
|
10
|
+
"permissions": ["storage"],
|
|
11
|
+
"background": {
|
|
12
|
+
"service_worker": "background.js",
|
|
13
|
+
"type": "module"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Background service worker for the Chrome extension.
|
|
2
|
+
// This runs in the background and can handle events like
|
|
3
|
+
// extension install, alarms, messages from popup/content scripts, etc.
|
|
4
|
+
|
|
5
|
+
chrome.runtime.onInstalled.addListener(() => {
|
|
6
|
+
console.log('Extension installed');
|
|
7
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Wrapper around chrome.storage.local for type-safe data persistence.
|
|
2
|
+
// Falls back to localStorage when running in a regular browser (during development).
|
|
3
|
+
//
|
|
4
|
+
// Usage:
|
|
5
|
+
// import { storage } from "@/lib/storage";
|
|
6
|
+
// await storage.get<Todo[]>("todos", []);
|
|
7
|
+
// await storage.set("todos", updatedTodos);
|
|
8
|
+
|
|
9
|
+
const isChromeExtension =
|
|
10
|
+
typeof chrome !== 'undefined' && chrome.storage?.local;
|
|
11
|
+
|
|
12
|
+
export const storage = {
|
|
13
|
+
async get<T>(key: string, defaultValue: T): Promise<T> {
|
|
14
|
+
if (isChromeExtension) {
|
|
15
|
+
const result = await chrome.storage.local.get(key);
|
|
16
|
+
return (result[key] as T) ?? defaultValue;
|
|
17
|
+
}
|
|
18
|
+
const item = localStorage.getItem(key);
|
|
19
|
+
return item ? (JSON.parse(item) as T) : defaultValue;
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
async set<T>(key: string, value: T): Promise<void> {
|
|
23
|
+
if (isChromeExtension) {
|
|
24
|
+
await chrome.storage.local.set({ [key]: value });
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
localStorage.setItem(key, JSON.stringify(value));
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
async remove(key: string): Promise<void> {
|
|
31
|
+
if (isChromeExtension) {
|
|
32
|
+
await chrome.storage.local.remove(key);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
localStorage.removeItem(key);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default function App() {
|
|
2
|
+
return (
|
|
3
|
+
<main className="w-80 min-h-48 p-4 flex items-center justify-center">
|
|
4
|
+
<div className="text-center">
|
|
5
|
+
<h1 className="text-xl font-bold mb-2">Welcome</h1>
|
|
6
|
+
<p className="text-gray-600 text-sm">
|
|
7
|
+
Your extension is ready. Start building!
|
|
8
|
+
</p>
|
|
9
|
+
</div>
|
|
10
|
+
</main>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"allowImportingTsExtensions": true,
|
|
10
|
+
"isolatedModules": true,
|
|
11
|
+
"moduleDetection": "force",
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"jsx": "react-jsx",
|
|
14
|
+
"strict": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"noFallthroughCasesInSwitch": true,
|
|
18
|
+
"noUncheckedSideEffectImports": true,
|
|
19
|
+
"paths": {
|
|
20
|
+
"@/*": ["./src/*"]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"include": ["src"]
|
|
24
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
4
|
+
import { resolve } from 'path';
|
|
5
|
+
|
|
6
|
+
// In "extension" mode, build produces a Chrome extension in dist/.
|
|
7
|
+
// In default mode, `vite dev` serves the popup as a regular web page
|
|
8
|
+
// so you can develop and test it in a normal browser tab.
|
|
9
|
+
|
|
10
|
+
export default defineConfig(({ mode }) => ({
|
|
11
|
+
plugins: [react(), tailwindcss()],
|
|
12
|
+
server: {
|
|
13
|
+
// Bind to the port provided by CodeYam editor (via PORT env var) or default 5173.
|
|
14
|
+
// Use 0.0.0.0 so the dev server is reachable on both IPv4 and IPv6 loopback.
|
|
15
|
+
port: process.env.PORT ? parseInt(process.env.PORT, 10) : 5173,
|
|
16
|
+
host: '0.0.0.0',
|
|
17
|
+
},
|
|
18
|
+
resolve: {
|
|
19
|
+
alias: {
|
|
20
|
+
'@': resolve(__dirname, 'src'),
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
build:
|
|
24
|
+
mode === 'extension'
|
|
25
|
+
? {
|
|
26
|
+
rollupOptions: {
|
|
27
|
+
input: {
|
|
28
|
+
popup: resolve(__dirname, 'popup.html'),
|
|
29
|
+
},
|
|
30
|
+
output: {
|
|
31
|
+
entryFileNames: '[name].js',
|
|
32
|
+
chunkFileNames: '[name].js',
|
|
33
|
+
assetFileNames: '[name].[ext]',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
outDir: 'dist',
|
|
37
|
+
emptyOutDir: true,
|
|
38
|
+
copyPublicDir: true,
|
|
39
|
+
}
|
|
40
|
+
: undefined,
|
|
41
|
+
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
|
-
PostToolUse + Stop hook for editor mode step tracking.
|
|
3
|
+
PostToolUse + Stop + UserPromptSubmit hook for editor mode step tracking.
|
|
4
4
|
|
|
5
5
|
Reads .codeyam/editor-step.json and prints a reminder about the current step.
|
|
6
6
|
Logs each firing to .codeyam/logs/editor-log.jsonl.
|
|
@@ -18,25 +18,31 @@ STEP_LABELS = {
|
|
|
18
18
|
2: "Prototype",
|
|
19
19
|
3: "Confirm",
|
|
20
20
|
4: "Deconstruct",
|
|
21
|
-
5: "
|
|
22
|
-
6: "
|
|
23
|
-
7: "
|
|
24
|
-
8: "
|
|
25
|
-
9: "
|
|
26
|
-
10: "
|
|
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",
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
STEP_RESTRICTIONS = {
|
|
30
33
|
1: "Do NOT write any code. Plan and describe only. Wait for user confirmation.",
|
|
31
34
|
2: "Do NOT create scenarios or run codeyam analyze. Build fast — working prototype with real data.",
|
|
32
35
|
3: "Present a selection menu (AskUserQuestion) for confirmation. Do NOT refactor or create scenarios until approved.",
|
|
33
|
-
4: "Do NOT
|
|
34
|
-
5: "
|
|
35
|
-
6: "
|
|
36
|
-
7: "
|
|
37
|
-
8: "Do NOT modify application code. Create
|
|
38
|
-
9: "
|
|
39
|
-
10: "Verify
|
|
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.",
|
|
40
46
|
}
|
|
41
47
|
|
|
42
48
|
|
|
@@ -56,17 +62,19 @@ def log_event(project_dir, event, data=None):
|
|
|
56
62
|
|
|
57
63
|
|
|
58
64
|
def detect_event():
|
|
59
|
-
"""Detect whether this is a PostToolUse or
|
|
65
|
+
"""Detect whether this is a PostToolUse, Stop, or UserPromptSubmit hook from stdin."""
|
|
60
66
|
try:
|
|
61
67
|
raw = sys.stdin.read()
|
|
62
68
|
if not raw.strip():
|
|
63
69
|
return "unknown", {}
|
|
64
70
|
data = json.loads(raw)
|
|
65
|
-
# PostToolUse has tool_name; Stop has stop_hook_active
|
|
71
|
+
# PostToolUse has tool_name; Stop has stop_hook_active; UserPromptSubmit has prompt
|
|
66
72
|
if "tool_name" in data:
|
|
67
73
|
return "post_tool_use", data
|
|
68
74
|
elif "stop_hook_active" in data:
|
|
69
75
|
return "stop", data
|
|
76
|
+
elif "prompt" in data:
|
|
77
|
+
return "user_prompt", data
|
|
70
78
|
return "unknown", data
|
|
71
79
|
except Exception:
|
|
72
80
|
return "unknown", {}
|
|
@@ -75,6 +83,22 @@ def detect_event():
|
|
|
75
83
|
def main():
|
|
76
84
|
project_dir = os.environ.get("CLAUDE_PROJECT_DIR", os.getcwd())
|
|
77
85
|
state_path = os.path.join(project_dir, ".codeyam", "editor-step.json")
|
|
86
|
+
prompt_path = os.path.join(project_dir, ".codeyam", "editor-user-prompt.txt")
|
|
87
|
+
|
|
88
|
+
# Detect event early so we can capture the user prompt even before state exists
|
|
89
|
+
event_type, event_data = detect_event()
|
|
90
|
+
|
|
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):
|
|
94
|
+
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
|
|
78
102
|
|
|
79
103
|
if not os.path.exists(state_path):
|
|
80
104
|
return
|
|
@@ -92,8 +116,6 @@ def main():
|
|
|
92
116
|
if not step:
|
|
93
117
|
return
|
|
94
118
|
|
|
95
|
-
event_type, event_data = detect_event()
|
|
96
|
-
|
|
97
119
|
# Log the hook firing
|
|
98
120
|
log_data = {"step": step, "label": label, "feature": feature, "hook": event_type}
|
|
99
121
|
if event_type == "post_tool_use":
|
|
@@ -101,7 +123,52 @@ def main():
|
|
|
101
123
|
log_event(project_dir, "hook", log_data)
|
|
102
124
|
|
|
103
125
|
restriction = STEP_RESTRICTIONS.get(step, "")
|
|
104
|
-
next_cmd = f"codeyam editor {step + 1}" if step <
|
|
126
|
+
next_cmd = f"codeyam editor {step + 1}" if step < 13 else "codeyam editor 1"
|
|
127
|
+
|
|
128
|
+
# UserPromptSubmit: concise workflow reminder injected before Claude processes the user's message
|
|
129
|
+
if event_type == "user_prompt":
|
|
130
|
+
lines = [
|
|
131
|
+
f'<user-prompt-submit-hook>',
|
|
132
|
+
f'Editor Mode — Step {step} ({label}): "{feature}"',
|
|
133
|
+
]
|
|
134
|
+
|
|
135
|
+
# Include the active scenario so Claude knows what the user is looking at
|
|
136
|
+
active_scenario_path = os.path.join(project_dir, ".codeyam", "active-scenario.json")
|
|
137
|
+
try:
|
|
138
|
+
with open(active_scenario_path, "r") as f:
|
|
139
|
+
active = json.load(f)
|
|
140
|
+
scenario_name = (
|
|
141
|
+
active.get("scenarioName")
|
|
142
|
+
or active.get("scenarioSlug", "").replace("_", " ")
|
|
143
|
+
)
|
|
144
|
+
if scenario_name:
|
|
145
|
+
lines.append(
|
|
146
|
+
f'The user is currently viewing scenario: "{scenario_name}". '
|
|
147
|
+
"Assume any feedback refers to this scenario unless they say otherwise."
|
|
148
|
+
)
|
|
149
|
+
except (IOError, json.JSONDecodeError):
|
|
150
|
+
pass
|
|
151
|
+
|
|
152
|
+
if step == 13:
|
|
153
|
+
lines.append(
|
|
154
|
+
"If the user is requesting changes (even indirectly), "
|
|
155
|
+
"run `codeyam editor change` BEFORE making any modifications "
|
|
156
|
+
"(code, scenarios, data, styles — everything). "
|
|
157
|
+
"The change command gives you the post-change checklist. "
|
|
158
|
+
"The change workflow ensures Working Session Results are shown to the user. "
|
|
159
|
+
"If the user chose to commit, run `codeyam editor steps` after committing "
|
|
160
|
+
"to start the next feature."
|
|
161
|
+
)
|
|
162
|
+
else:
|
|
163
|
+
lines.append(
|
|
164
|
+
f"You are on step {step}. Follow the `codeyam editor` workflow. "
|
|
165
|
+
f"Do NOT skip ahead or make changes outside the current step."
|
|
166
|
+
)
|
|
167
|
+
if restriction:
|
|
168
|
+
lines.append(restriction)
|
|
169
|
+
lines.append('</user-prompt-submit-hook>')
|
|
170
|
+
print("\n".join(lines))
|
|
171
|
+
return
|
|
105
172
|
|
|
106
173
|
lines = [
|
|
107
174
|
f'Editor Mode \u2014 Step {step} ({label}): "{feature}"',
|
|
@@ -116,7 +183,7 @@ def main():
|
|
|
116
183
|
DIM = "\033[2m"
|
|
117
184
|
RESET = "\033[0m"
|
|
118
185
|
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}"]
|
|
119
|
-
for i in range(1,
|
|
186
|
+
for i in range(1, 14):
|
|
120
187
|
lbl = STEP_LABELS[i].ljust(28)
|
|
121
188
|
num = f" {i}" if i < 10 else f"{i}"
|
|
122
189
|
content = f"{num}. {lbl}"
|
|
@@ -134,6 +201,27 @@ def main():
|
|
|
134
201
|
"\u2713 (done) or \u2717 (skipped + reason)."
|
|
135
202
|
)
|
|
136
203
|
|
|
204
|
+
if event_type == "stop" and step == 13:
|
|
205
|
+
import subprocess as _sp
|
|
206
|
+
try:
|
|
207
|
+
_result = _sp.run(
|
|
208
|
+
["git", "status", "--porcelain"],
|
|
209
|
+
cwd=project_dir,
|
|
210
|
+
capture_output=True, text=True, timeout=5
|
|
211
|
+
)
|
|
212
|
+
has_uncommitted = bool(_result.stdout.strip())
|
|
213
|
+
except Exception:
|
|
214
|
+
has_uncommitted = False
|
|
215
|
+
|
|
216
|
+
if has_uncommitted:
|
|
217
|
+
lines.append(
|
|
218
|
+
"\n\033[1;31m⚠️ You have uncommitted changes but haven't shown Working Session Results.\033[0m"
|
|
219
|
+
)
|
|
220
|
+
lines.append(
|
|
221
|
+
"\033[31mRun `codeyam editor change` if you haven't already, then complete the "
|
|
222
|
+
"checklist and run `codeyam editor 13` to show results to the user.\033[0m"
|
|
223
|
+
)
|
|
224
|
+
|
|
137
225
|
lines.append(f"When this step is complete, run: {next_cmd}")
|
|
138
226
|
|
|
139
227
|
print("\n".join(lines))
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Expo + React Native Setup
|
|
2
|
+
|
|
3
|
+
## Development
|
|
4
|
+
|
|
5
|
+
This project uses **Expo** with **Expo Router** for file-based navigation and **NativeWind** (Tailwind CSS) for styling.
|
|
6
|
+
|
|
7
|
+
### Web Development (used by CodeYam)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm run dev
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This starts the Expo web dev server. CodeYam uses this to preview your app and take screenshots.
|
|
14
|
+
|
|
15
|
+
### Mobile Development
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# iOS Simulator
|
|
19
|
+
npm run ios
|
|
20
|
+
|
|
21
|
+
# Android Emulator
|
|
22
|
+
npm run android
|
|
23
|
+
|
|
24
|
+
# Start Expo dev server (pick platform from menu)
|
|
25
|
+
npm start
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Project Structure
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
app/ # Expo Router file-based routes
|
|
32
|
+
_layout.tsx # Root layout (status bar, navigation)
|
|
33
|
+
(tabs)/ # Tab-based navigation group
|
|
34
|
+
_layout.tsx # Tab bar configuration
|
|
35
|
+
index.tsx # Home tab
|
|
36
|
+
settings.tsx # Settings tab
|
|
37
|
+
components/ # Reusable components
|
|
38
|
+
lib/
|
|
39
|
+
storage.ts # AsyncStorage wrapper for persistent data
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Key Patterns
|
|
43
|
+
|
|
44
|
+
### Navigation (Expo Router)
|
|
45
|
+
|
|
46
|
+
Add new screens by creating files in `app/`:
|
|
47
|
+
|
|
48
|
+
- `app/profile.tsx` — accessible at `/profile`
|
|
49
|
+
- `app/items/[id].tsx` — dynamic route at `/items/123`
|
|
50
|
+
|
|
51
|
+
### Data Fetching
|
|
52
|
+
|
|
53
|
+
Use standard `fetch()` for API calls. CodeYam intercepts these to provide mock data during simulations:
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
const response = await fetch('/api/items');
|
|
57
|
+
const data = await response.json();
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Storage
|
|
61
|
+
|
|
62
|
+
Use the typed storage helper for persistent data:
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import { storage } from '@/lib/storage';
|
|
66
|
+
|
|
67
|
+
const items = await storage.get('items', []);
|
|
68
|
+
await storage.set('items', [...items, newItem]);
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Styling (NativeWind)
|
|
72
|
+
|
|
73
|
+
Use Tailwind classes on React Native components:
|
|
74
|
+
|
|
75
|
+
```tsx
|
|
76
|
+
<View className="flex-1 items-center justify-center bg-white p-4">
|
|
77
|
+
<Text className="text-lg font-bold text-gray-900">Hello</Text>
|
|
78
|
+
</View>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Building for Production
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Web
|
|
85
|
+
npm run build:web
|
|
86
|
+
|
|
87
|
+
# iOS/Android (requires EAS CLI)
|
|
88
|
+
npx eas build
|
|
89
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Tabs } from 'expo-router';
|
|
2
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
3
|
+
|
|
4
|
+
export default function TabLayout() {
|
|
5
|
+
return (
|
|
6
|
+
<Tabs
|
|
7
|
+
screenOptions={{
|
|
8
|
+
tabBarActiveTintColor: '#005C75',
|
|
9
|
+
headerStyle: { backgroundColor: '#f8fafc' },
|
|
10
|
+
headerTitleStyle: { fontWeight: '600' },
|
|
11
|
+
}}
|
|
12
|
+
>
|
|
13
|
+
<Tabs.Screen
|
|
14
|
+
name="index"
|
|
15
|
+
options={{
|
|
16
|
+
title: 'Home',
|
|
17
|
+
tabBarIcon: ({ color, size }) => (
|
|
18
|
+
<Ionicons name="home-outline" size={size} color={color} />
|
|
19
|
+
),
|
|
20
|
+
}}
|
|
21
|
+
/>
|
|
22
|
+
<Tabs.Screen
|
|
23
|
+
name="settings"
|
|
24
|
+
options={{
|
|
25
|
+
title: 'Settings',
|
|
26
|
+
tabBarIcon: ({ color, size }) => (
|
|
27
|
+
<Ionicons name="settings-outline" size={size} color={color} />
|
|
28
|
+
),
|
|
29
|
+
}}
|
|
30
|
+
/>
|
|
31
|
+
</Tabs>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { View, Text } from 'react-native';
|
|
2
|
+
|
|
3
|
+
export default function HomeScreen() {
|
|
4
|
+
return (
|
|
5
|
+
<View className="flex-1 items-center justify-center bg-white p-6">
|
|
6
|
+
<Text className="text-2xl font-bold text-gray-900 mb-2">Welcome</Text>
|
|
7
|
+
<Text className="text-base text-gray-500 text-center">
|
|
8
|
+
Your Expo app is ready. Start building!
|
|
9
|
+
</Text>
|
|
10
|
+
</View>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { View, Text } from 'react-native';
|
|
2
|
+
|
|
3
|
+
export default function SettingsScreen() {
|
|
4
|
+
return (
|
|
5
|
+
<View className="flex-1 items-center justify-center bg-white p-6">
|
|
6
|
+
<Text className="text-2xl font-bold text-gray-900 mb-2">Settings</Text>
|
|
7
|
+
<Text className="text-base text-gray-500 text-center">
|
|
8
|
+
Configure your app preferences here.
|
|
9
|
+
</Text>
|
|
10
|
+
</View>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import '../global.css';
|
|
2
|
+
import { Stack } from 'expo-router';
|
|
3
|
+
import { StatusBar } from 'expo-status-bar';
|
|
4
|
+
|
|
5
|
+
export default function RootLayout() {
|
|
6
|
+
return (
|
|
7
|
+
<>
|
|
8
|
+
<Stack screenOptions={{ headerShown: false }} />
|
|
9
|
+
<StatusBar style="auto" />
|
|
10
|
+
</>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"expo": {
|
|
3
|
+
"name": "CodeYam Expo App",
|
|
4
|
+
"slug": "codeyam-expo-app",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"scheme": "codeyam-expo-app",
|
|
7
|
+
"platforms": ["ios", "android", "web"],
|
|
8
|
+
"web": {
|
|
9
|
+
"bundler": "metro",
|
|
10
|
+
"output": "single",
|
|
11
|
+
"favicon": "./assets/favicon.png"
|
|
12
|
+
},
|
|
13
|
+
"plugins": ["expo-router"],
|
|
14
|
+
"experiments": {
|
|
15
|
+
"typedRoutes": true
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Type-safe storage abstraction over AsyncStorage.
|
|
5
|
+
* Works on iOS, Android, and Web.
|
|
6
|
+
*/
|
|
7
|
+
export const storage = {
|
|
8
|
+
async get<T>(key: string, defaultValue: T): Promise<T> {
|
|
9
|
+
try {
|
|
10
|
+
const raw = await AsyncStorage.getItem(key);
|
|
11
|
+
return raw !== null ? JSON.parse(raw) : defaultValue;
|
|
12
|
+
} catch {
|
|
13
|
+
return defaultValue;
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
async set<T>(key: string, value: T): Promise<void> {
|
|
18
|
+
try {
|
|
19
|
+
await AsyncStorage.setItem(key, JSON.stringify(value));
|
|
20
|
+
} catch {
|
|
21
|
+
// Storage write failed silently
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
async remove(key: string): Promise<void> {
|
|
26
|
+
try {
|
|
27
|
+
await AsyncStorage.removeItem(key);
|
|
28
|
+
} catch {
|
|
29
|
+
// Storage remove failed silently
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="nativewind/types" />
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "codeyam-expo-app",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "expo-router/entry",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "expo start --web",
|
|
8
|
+
"start": "expo start",
|
|
9
|
+
"android": "expo start --android",
|
|
10
|
+
"ios": "expo start --ios",
|
|
11
|
+
"build:web": "expo export --platform web"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"expo": "~55.0.5",
|
|
15
|
+
"expo-router": "~55.0.4",
|
|
16
|
+
"expo-status-bar": "~55.0.4",
|
|
17
|
+
"expo-linking": "~55.0.7",
|
|
18
|
+
"expo-constants": "~55.0.7",
|
|
19
|
+
"react": "19.2.0",
|
|
20
|
+
"react-dom": "19.2.0",
|
|
21
|
+
"react-native": "0.83.2",
|
|
22
|
+
"react-native-web": "^0.21.0",
|
|
23
|
+
"react-native-safe-area-context": "~5.6.2",
|
|
24
|
+
"react-native-screens": "~4.23.0",
|
|
25
|
+
"@react-navigation/native": "^7.1.33",
|
|
26
|
+
"@expo/vector-icons": "^15.0.2",
|
|
27
|
+
"@react-native-async-storage/async-storage": "2.2.0",
|
|
28
|
+
"nativewind": "^4.2.2",
|
|
29
|
+
"tailwindcss": "^3.4.19",
|
|
30
|
+
"react-native-reanimated": "4.2.1"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/react": "~19.2.2",
|
|
34
|
+
"babel-preset-expo": "^55.0.10",
|
|
35
|
+
"typescript": "~5.9.2"
|
|
36
|
+
}
|
|
37
|
+
}
|