@codeyam/codeyam-cli 0.1.0-staging.eb21b2f → 0.1.0-staging.f777668
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 +21 -21
- package/analyzer-template/packages/ai/package.json +2 -2
- package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +34 -3
- package/analyzer-template/packages/ai/src/lib/completionCall.ts +114 -113
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +259 -5
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.ts +62 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.ts +35 -0
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +78 -2
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +0 -33
- package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +19 -7
- package/analyzer-template/packages/analyze/src/lib/asts/index.ts +7 -2
- package/analyzer-template/packages/analyze/src/lib/asts/nodes/getNodeType.ts +1 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +9 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/dependencyResolver.ts +0 -6
- package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +12 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/TransformationTracer.ts +65 -28
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +83 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +0 -98
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +23 -4
- package/analyzer-template/packages/aws/package.json +10 -10
- package/analyzer-template/packages/database/index.ts +1 -0
- package/analyzer-template/packages/database/package.json +3 -3
- package/analyzer-template/packages/database/src/lib/kysely/db.ts +8 -0
- package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +68 -0
- package/analyzer-template/packages/database/src/lib/loadCommits.ts +31 -20
- package/analyzer-template/packages/database/src/lib/loadReadyToBeCapturedAnalyses.ts +0 -5
- package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +151 -135
- package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatus.ts +58 -42
- package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.ts +81 -65
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.ts +29 -1
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.ts +33 -5
- package/analyzer-template/packages/github/dist/database/index.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/index.js +1 -0
- package/analyzer-template/packages/github/dist/database/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts +2 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js +5 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +22 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +51 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts +5 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js +23 -13
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js +1 -4
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.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 +100 -89
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js +41 -30
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts +1 -0
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts +10 -0
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/github/package.json +1 -1
- package/analyzer-template/packages/types/src/types/ProjectMetadata.ts +1 -0
- package/analyzer-template/packages/types/src/types/Scenario.ts +10 -0
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts +1 -0
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts +10 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js +6 -2
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js.map +1 -1
- package/analyzer-template/packages/utils/src/lib/fs/rsyncCopy.ts +14 -2
- package/analyzer-template/playwright/captureFromUrl.ts +89 -82
- package/analyzer-template/project/constructMockCode.ts +168 -48
- package/analyzer-template/project/orchestrateCapture.ts +4 -1
- package/analyzer-template/project/reconcileMockDataKeys.ts +19 -14
- package/analyzer-template/project/start.ts +3 -0
- package/analyzer-template/project/startScenarioCapture.ts +9 -0
- package/analyzer-template/project/writeClientLogRoute.ts +125 -0
- package/analyzer-template/project/writeMockDataTsx.ts +17 -0
- package/analyzer-template/project/writeScenarioComponents.ts +96 -17
- package/analyzer-template/tsconfig.json +13 -1
- package/background/src/lib/virtualized/project/constructMockCode.js +143 -39
- package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture.js +4 -1
- package/background/src/lib/virtualized/project/orchestrateCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +17 -11
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +2 -0
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +5 -0
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/writeClientLogRoute.js +110 -0
- package/background/src/lib/virtualized/project/writeClientLogRoute.js.map +1 -0
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +12 -0
- package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioComponents.js +73 -12
- package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
- package/codeyam-cli/scripts/apply-setup.js +208 -11
- package/codeyam-cli/scripts/apply-setup.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/cli.js +32 -25
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/commands/analyze.js +17 -7
- package/codeyam-cli/src/commands/analyze.js.map +1 -1
- package/codeyam-cli/src/commands/default.js +14 -2
- package/codeyam-cli/src/commands/default.js.map +1 -1
- package/codeyam-cli/src/commands/editor.js +2607 -0
- package/codeyam-cli/src/commands/editor.js.map +1 -0
- package/codeyam-cli/src/commands/init.js +40 -11
- package/codeyam-cli/src/commands/init.js.map +1 -1
- package/codeyam-cli/src/commands/memory.js +29 -58
- package/codeyam-cli/src/commands/memory.js.map +1 -1
- 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 +155 -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__/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 +1686 -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__/npmVersionCheck.test.js +6 -0
- package/codeyam-cli/src/utils/__tests__/npmVersionCheck.test.js.map +1 -1
- 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__/pathIgnoring.test.js +9 -0
- package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js.map +1 -1
- 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 +50 -4
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js +50 -0
- package/codeyam-cli/src/utils/__tests__/templateConsistency.test.js.map +1 -0
- package/codeyam-cli/src/utils/backgroundServer.js +21 -5
- 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/devModeEvents.js +40 -0
- package/codeyam-cli/src/utils/devModeEvents.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 +109 -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 +337 -0
- package/codeyam-cli/src/utils/entityChangeStatus.js.map +1 -0
- package/codeyam-cli/src/utils/entityChangeStatus.server.js +107 -0
- package/codeyam-cli/src/utils/entityChangeStatus.server.js.map +1 -0
- package/codeyam-cli/src/utils/fileMetadata.js +5 -0
- package/codeyam-cli/src/utils/fileMetadata.js.map +1 -1
- package/codeyam-cli/src/utils/fileWatcher.js +25 -9
- package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
- package/codeyam-cli/src/utils/git.js +103 -0
- package/codeyam-cli/src/utils/git.js.map +1 -1
- package/codeyam-cli/src/utils/install-skills.js +57 -15
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/interactiveSyncWatcher.js +126 -0
- package/codeyam-cli/src/utils/interactiveSyncWatcher.js.map +1 -0
- package/codeyam-cli/src/utils/npmVersionCheck.js +2 -2
- package/codeyam-cli/src/utils/npmVersionCheck.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/pathIgnoring.js +19 -7
- package/codeyam-cli/src/utils/pathIgnoring.js.map +1 -1
- package/codeyam-cli/src/utils/project.js +15 -5
- package/codeyam-cli/src/utils/project.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js +11 -11
- package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js +22 -0
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/heartbeat.js +13 -5
- package/codeyam-cli/src/utils/queue/heartbeat.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +70 -1
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/queue/manager.js +7 -6
- package/codeyam-cli/src/utils/queue/manager.js.map +1 -1
- package/codeyam-cli/src/utils/requireSimulations.js +1 -1
- package/codeyam-cli/src/utils/requireSimulations.js.map +1 -1
- package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js +5 -6
- package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js.map +1 -1
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js +1 -1
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js.map +1 -1
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js +0 -1
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js.map +1 -1
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js +2 -4
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js.map +1 -1
- package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js +2 -5
- package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js.map +1 -1
- package/codeyam-cli/src/utils/rules/__tests__/parser.test.js +83 -0
- package/codeyam-cli/src/utils/rules/__tests__/parser.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/__tests__/pathMatcher.test.js +118 -0
- package/codeyam-cli/src/utils/rules/__tests__/pathMatcher.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/__tests__/rulePlacement.test.js +72 -0
- package/codeyam-cli/src/utils/rules/__tests__/rulePlacement.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js +76 -0
- package/codeyam-cli/src/utils/rules/__tests__/sourceFiles.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/index.js +1 -0
- package/codeyam-cli/src/utils/rules/index.js.map +1 -1
- package/codeyam-cli/src/utils/rules/parser.js +14 -4
- package/codeyam-cli/src/utils/rules/parser.js.map +1 -1
- package/codeyam-cli/src/utils/rules/pathMatcher.js +34 -3
- package/codeyam-cli/src/utils/rules/pathMatcher.js.map +1 -1
- package/codeyam-cli/src/utils/rules/rulePlacement.js +65 -0
- package/codeyam-cli/src/utils/rules/rulePlacement.js.map +1 -0
- package/codeyam-cli/src/utils/rules/sourceFiles.js +43 -0
- package/codeyam-cli/src/utils/rules/sourceFiles.js.map +1 -0
- 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/serverState.js +27 -2
- package/codeyam-cli/src/utils/serverState.js.map +1 -1
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +82 -11
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
- package/codeyam-cli/src/utils/simulationGateMiddleware.js +159 -0
- package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -0
- package/codeyam-cli/src/utils/syncMocksMiddleware.js +5 -24
- package/codeyam-cli/src/utils/syncMocksMiddleware.js.map +1 -1
- package/codeyam-cli/src/utils/testRunner.js +158 -0
- package/codeyam-cli/src/utils/testRunner.js.map +1 -0
- package/codeyam-cli/src/utils/transcriptPruning.js +67 -0
- package/codeyam-cli/src/utils/transcriptPruning.js.map +1 -0
- package/codeyam-cli/src/utils/versionInfo.js +21 -0
- package/codeyam-cli/src/utils/versionInfo.js.map +1 -1
- package/codeyam-cli/src/utils/webappDetection.js +14 -2
- package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
- 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/dbNotifier.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/backgroundServer.js +118 -18
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{CopyButton-jNYXRRNI.js → CopyButton-DmJveP3T.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-bwuHPyTa.js → EntityItem-C76mRRiF.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-CvzqMxcu.js → EntityTypeBadge-g3saevPb.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-BH0XDim7.js → EntityTypeIcon-CobE682z.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-Bu6c6aDe.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-yjIHlOGa.js → InteractivePreview-DYFW3lDD.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-Cq5o8jL4.js → LibraryFunctionPreview-DLeucoVX.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-BvMu2i-g.js → LoadingDots-BU_OAEMP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-kgBTLoJD.js → LogViewer-ceAyBX-H.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-BzPgx-xO.js → ReportIssueModal-djPLI-WV.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-CwZrv-Ok.js → SafeScreenshot-BED4B6sP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-BX2Ny2Qj.js → ScenarioViewer-ZlRKbhrq.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/Spinner-Bb5uFQ5V.js +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-CDpEprKa.js → TruncatedFilePath-C8OKAR5x.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/ViewportInspectBar-oAf2Kqsf.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{_index-BRx8ZGZo.js → _index-C96V0n15.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-4S4yPfFw.js → activity.(_tab)-BpKzcsJz.js} +1 -1
- 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-web-links-Duc5hnl7.js +1 -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 +22 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.dev-mode-events-l0sNRNKZ.js +1 -0
- 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-capture-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-client-errors-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-commit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-dev-server-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-entity-status-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-journal-entry-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-image._-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-screenshot-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-update-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-refresh-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-register-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-data-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-image._-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/api.editor-switch-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-test-results-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.rule-path-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{book-open-D4IPYH_y.js → book-open-D_nMCFmP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-CG65viiV.js → chevron-down-BH2h1Ea2.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{chunk-JZWAC4HX-DB3aFuEO.js → chunk-JZWAC4HX-C4pqxYJB.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-igfMr5DY.js → circle-check-DyIKORY6.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{copy-Coc4o_8c.js → copy-NDbZjXao.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-D1zB-pYc.js → createLucideIcon-CMT1jU2q.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-CltMNppm.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/editor-DTEBHY7Z.js +10 -0
- package/codeyam-cli/src/webserver/build/client/assets/editorPreview-B7ztwLut.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-B0h9AqE6.js → entity._sha._-DItJnD8s.js} +10 -10
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-D5rYBT5x.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/entity._sha_.create-scenario-p9hhkjJM.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-PePWg17F.js → entity._sha_.edit._scenarioId-BMvVHNXU.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-I-Wo99C_.js → entry.client-DTvKq3TY.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-9sMMAiWJ.js → fileTableUtils-cPo8LiG3.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{files-Co65J0s3.js → files-DO4CZ16O.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/git-CdN8sCqs.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/globals-JMY99HpD.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{index-CUM5iXwc.js → index-10oVnAAH.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-_417gcQW.js → index-BcvgDzbZ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/index-yHOVb4rc.js +15 -0
- package/codeyam-cli/src/webserver/build/client/assets/labs-Zk7ryIM1.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-TzRHMVog.js → loader-circle-BAXYRVEO.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-7aab51c4.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/memory-Dg0mvYrI.js +96 -0
- package/codeyam-cli/src/webserver/build/client/assets/{pause-hjzB7t2z.js → pause-DTAcYxBt.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-FRztnN-P.js +67 -0
- package/codeyam-cli/src/webserver/build/client/assets/{search-DcAwD_Ln.js → search-fKo7v0Zo.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-DfuTtcJP.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{simulations-DVNJVQgD.js → simulations-B3aOzpCZ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{terminal-DbEAHMbA.js → terminal-BG4heKCG.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-CAD5b1o_.js → triangle-alert-DtSmdtM4.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-CrAK28Bc.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-C14nCb1q.js +2 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-DZlYx2c4.js → useReportContext-O-jkvSPx.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-ihdMtlf6.js → useToast-9FIWuYfK.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/xterm-BqvuqXEL.js +27 -0
- package/codeyam-cli/src/webserver/build/server/assets/index-Cz751Dm2.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-DSylnYVM.js +367 -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/devServer.js +39 -5
- package/codeyam-cli/src/webserver/devServer.js.map +1 -1
- package/codeyam-cli/src/webserver/editorProxy.js +431 -0
- package/codeyam-cli/src/webserver/editorProxy.js.map +1 -0
- package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +414 -0
- package/codeyam-cli/src/webserver/scripts/journalCapture.ts +230 -0
- package/codeyam-cli/src/webserver/server.js +258 -1
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/src/webserver/terminalServer.js +706 -0
- package/codeyam-cli/src/webserver/terminalServer.js.map +1 -0
- package/codeyam-cli/templates/codeyam-editor-claude.md +68 -0
- package/codeyam-cli/templates/editor-step-hook.py +208 -0
- package/codeyam-cli/templates/hooks/staleness-check.sh +43 -0
- package/codeyam-cli/templates/isolation-route/next-app.tsx.template +80 -0
- package/codeyam-cli/templates/isolation-route/next-pages.tsx.template +79 -0
- package/codeyam-cli/templates/isolation-route/vite-react.tsx.template +78 -0
- package/codeyam-cli/templates/msw/browser-setup.ts.template +47 -0
- package/codeyam-cli/templates/msw/handler-router.ts.template +47 -0
- package/codeyam-cli/templates/msw/server-setup.ts.template +52 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/PRISMA_SETUP.md +84 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/api/todos/route.ts +17 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/codeyam-isolate/layout.tsx +12 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/globals.css +26 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/layout.tsx +34 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/lib/prisma.ts +19 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/page.tsx +10 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/eslint.config.mjs +11 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +64 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/next.config.ts +14 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +38 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/postcss.config.mjs +7 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/schema.prisma +27 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +37 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma.config.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/seed-adapter.ts +89 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/tsconfig.json +34 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/vitest.config.ts +13 -0
- package/codeyam-cli/templates/prompts/conversation-guidance.txt +44 -0
- package/codeyam-cli/templates/prompts/conversation-prompt.txt +28 -0
- package/codeyam-cli/templates/prompts/interruption-prompt.txt +31 -0
- package/codeyam-cli/templates/prompts/stale-rules-prompt.txt +24 -0
- package/codeyam-cli/templates/rule-notification-hook.py +44 -17
- package/codeyam-cli/templates/rule-reflection-hook.py +24 -4
- package/codeyam-cli/templates/rules-instructions.md +34 -88
- package/codeyam-cli/templates/skills/codeyam-dev-mode/SKILL.md +237 -0
- package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +136 -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/codeyam-cli/templates/{codeyam-new-rule.md → skills/codeyam-new-rule/SKILL.md} +0 -2
- package/package.json +21 -14
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +22 -4
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
- package/packages/ai/src/lib/completionCall.js +10 -7
- package/packages/ai/src/lib/completionCall.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +234 -3
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js +54 -0
- package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js +34 -0
- package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js.map +1 -0
- package/packages/ai/src/lib/generateEntityScenarioData.js +57 -2
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- 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 +13 -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/asts/nodes/getNodeType.js +1 -0
- package/packages/analyze/src/lib/asts/nodes/getNodeType.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +8 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js +0 -5
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +9 -0
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js +54 -27
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +65 -0
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.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/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +18 -4
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/database/index.js +1 -0
- package/packages/database/index.js.map +1 -1
- package/packages/database/src/lib/kysely/db.js +5 -0
- package/packages/database/src/lib/kysely/db.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +51 -0
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
- package/packages/database/src/lib/loadCommits.js +23 -13
- package/packages/database/src/lib/loadCommits.js.map +1 -1
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js +1 -4
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/packages/database/src/lib/updateCommitMetadata.js +100 -89
- package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/packages/database/src/lib/updateFreshAnalysisStatus.js +41 -30
- package/packages/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
- package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
- package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/packages/utils/src/lib/fs/rsyncCopy.js +6 -2
- package/packages/utils/src/lib/fs/rsyncCopy.js.map +1 -1
- package/scripts/npm-post-install.cjs +34 -0
- package/codeyam-cli/src/commands/detect-universal-mocks.js +0 -120
- package/codeyam-cli/src/commands/detect-universal-mocks.js.map +0 -1
- package/codeyam-cli/src/commands/list.js +0 -31
- package/codeyam-cli/src/commands/list.js.map +0 -1
- package/codeyam-cli/src/commands/webapp-info.js +0 -146
- package/codeyam-cli/src/commands/webapp-info.js.map +0 -1
- package/codeyam-cli/src/utils/universal-mocks.js +0 -152
- package/codeyam-cli/src/utils/universal-mocks.js.map +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-EhOseatT.js +0 -34
- package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-DHKuQSmR.js +0 -17
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-JTAjQ54M.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DjLxr2JB.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-CtYowLOt.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/git-BdHOxVfg.js +0 -15
- package/codeyam-cli/src/webserver/build/client/assets/globals-CCgBKWy4.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/labs-BK0C1H1T.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-390cb8fa.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/memory-CzZySbBE.js +0 -78
- package/codeyam-cli/src/webserver/build/client/assets/root-DnbDhvTU.js +0 -62
- package/codeyam-cli/src/webserver/build/client/assets/settings-CclxrcPK.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useCustomSizes-BqgrAzs3.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-DAFqfEDH.js +0 -2
- package/codeyam-cli/src/webserver/build/server/assets/index-CXfuiwt3.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-BSvme_Ao.js +0 -259
- package/codeyam-cli/templates/codeyam-stop-hook.sh +0 -284
- 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-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,44 @@
|
|
|
1
|
+
### What to look for
|
|
2
|
+
|
|
3
|
+
Read the full transcript for these signals:
|
|
4
|
+
|
|
5
|
+
**User corrections or redirections**
|
|
6
|
+
- "no", "actually", "that's not right", "you need to also...", "you missed..."
|
|
7
|
+
- User provides information Claude didn't know or couldn't infer from code
|
|
8
|
+
- User reminds Claude of a step, pattern, or relationship
|
|
9
|
+
- A correction about something other than current task requirements is ALWAYS rule-worthy
|
|
10
|
+
|
|
11
|
+
**Investigation and debugging**
|
|
12
|
+
- Claude tried multiple approaches, read logs, or tested hypotheses
|
|
13
|
+
- Investigation revealed non-obvious behavior or root causes
|
|
14
|
+
- Debugging strategies that worked (or didn't) for specific areas
|
|
15
|
+
|
|
16
|
+
**Architecture not evident in code**
|
|
17
|
+
- Files that must change together (templates + installation, routes + registration)
|
|
18
|
+
- Complex files, data flows, pipelines, or system interactions that would benefit from an overview
|
|
19
|
+
|
|
20
|
+
**Commands and workflows**
|
|
21
|
+
- Specific commands or flags needed for this area
|
|
22
|
+
- Order of operations that matters ("must run X before Y")
|
|
23
|
+
|
|
24
|
+
**Ignore:**
|
|
25
|
+
- Corrections to requirements for the current feature or bug
|
|
26
|
+
- Confusion isolated to the current work session (won't recur)
|
|
27
|
+
|
|
28
|
+
### Before creating a rule
|
|
29
|
+
|
|
30
|
+
**Critical check:** Read the actual source files that were modified. If the code already contains comments, guard patterns, or tests that explain the insight, the code is the documentation — skip the rule unless the file is complex and you've made a mistake or the user had to interrupt and correct you.
|
|
31
|
+
|
|
32
|
+
Show your thinking before proceeding with creating or updating rules.
|
|
33
|
+
|
|
34
|
+
### How to write rules
|
|
35
|
+
|
|
36
|
+
**Rules must be forward-looking, not historical.** You are reading a session transcript where bugs were found and fixed, but the rule should describe the *current* codebase, not tell the story of what went wrong, what was fixed, etc. The code has already been updated — past bugs are no longer relevant.
|
|
37
|
+
|
|
38
|
+
- **DO**: State constraints and requirements ("this script MUST copy directories recursively, not just files")
|
|
39
|
+
- **DO**: Explain *why* something matters ("errors in prompt copying are silently caught, so missing directories won't surface as errors")
|
|
40
|
+
- **DON'T**: Describe what old code did ("the old version only copied files, causing X to be missing")
|
|
41
|
+
- **DON'T**: Narrate the debugging journey ("we discovered that the catch block was swallowing errors")
|
|
42
|
+
- **DON'T**: Note issues or known gaps if they are actively being worked on!
|
|
43
|
+
|
|
44
|
+
Think of the reader as a developer about to modify these files. They need to know what constraints to preserve and what pitfalls to watch for — not what happened in the past if it is no longer relevant.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
FIRST: Read `.codeyam/rules/instructions.md` — it contains the required format, rule placement via the rule-path API, and an example rule. You MUST follow this format exactly when creating or editing rules.
|
|
2
|
+
|
|
3
|
+
THEN: Read the file {{CONTEXT_FILE}} and follow the instructions inside.
|
|
4
|
+
|
|
5
|
+
Analyze the conversation transcript for rule-worthy learnings:
|
|
6
|
+
- User corrections, redirections, or information Claude didn't know
|
|
7
|
+
- Investigation results and debugging knowledge
|
|
8
|
+
- Architecture and relationships not obvious from code
|
|
9
|
+
- Commands, workflows, and processes
|
|
10
|
+
|
|
11
|
+
Access and read files in the repo or in the .claude folder as needed.
|
|
12
|
+
|
|
13
|
+
Create new rules only when the learnings meet the guidelines in the context file.
|
|
14
|
+
|
|
15
|
+
IMPORTANT: If you create ANY rule files, write a short summary to `{{NOTIFICATION_FILE}}`. The summary should list each rule change, e.g.:
|
|
16
|
+
```
|
|
17
|
+
The background rule-reflection agent created the following rules:
|
|
18
|
+
- Created `.claude/rules/tooling/new-pattern.md` — documents X pattern
|
|
19
|
+
```
|
|
20
|
+
Only write the notification file when rules are created.
|
|
21
|
+
|
|
22
|
+
The project root is {{PROJECT_DIR}}
|
|
23
|
+
|
|
24
|
+
CRITICAL: All rule files MUST be written to {{PROJECT_DIR}}/.claude/rules/ (the project directory). Always use the full absolute path when writing rule files.
|
|
25
|
+
|
|
26
|
+
CRITICAL: Before writing any rule file, you MUST run the rule-path command to determine the correct subdirectory:
|
|
27
|
+
codeyam memory rule-path path/one path/two
|
|
28
|
+
Pass all paths from your frontmatter. The command returns the correct .claude/rules/ subdirectory as JSON. Do NOT guess the placement from the first path — rules with paths spanning multiple directories belong at their common ancestor.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
FIRST: Read `.codeyam/rules/instructions.md` — it contains the required format, rule placement via the rule-path API, and an example rule. You MUST follow this format exactly when creating or editing rules.
|
|
2
|
+
|
|
3
|
+
THEN: Read the file {{CONTEXT_FILE}} and follow the instructions inside.
|
|
4
|
+
|
|
5
|
+
The user interrupted Claude mid-response — a strong signal of confusion or misunderstanding.
|
|
6
|
+
Analyze both Claude's interrupted output and the user's follow-up to determine what went wrong.
|
|
7
|
+
|
|
8
|
+
Look for:
|
|
9
|
+
- Claude heading in a wrong direction that the user had to correct
|
|
10
|
+
- Misunderstanding of project conventions, architecture, or dependencies
|
|
11
|
+
- Missing context that caused Claude to make incorrect assumptions
|
|
12
|
+
- Patterns that would recur in future sessions without a rule
|
|
13
|
+
|
|
14
|
+
Access and read files in the repo or in the .claude folder as needed.
|
|
15
|
+
|
|
16
|
+
Create new rules only when the learnings meet the guidelines in the context file.
|
|
17
|
+
|
|
18
|
+
IMPORTANT: If you create ANY rule files, write a short summary to `{{NOTIFICATION_FILE}}`. The summary should list each rule change, e.g.:
|
|
19
|
+
```
|
|
20
|
+
The background rule-reflection agent created the following rules:
|
|
21
|
+
- Created `.claude/rules/tooling/new-pattern.md` — documents X pattern
|
|
22
|
+
```
|
|
23
|
+
Only write the notification file when rules are created.
|
|
24
|
+
|
|
25
|
+
The project root is {{PROJECT_DIR}}
|
|
26
|
+
|
|
27
|
+
CRITICAL: All rule files MUST be written to {{PROJECT_DIR}}/.claude/rules/ (the project directory). Always use the full absolute path when writing rule files.
|
|
28
|
+
|
|
29
|
+
CRITICAL: Before writing any rule file, you MUST run the rule-path command to determine the correct subdirectory:
|
|
30
|
+
codeyam memory rule-path path/one path/two
|
|
31
|
+
Pass all paths from your frontmatter. The command returns the correct .claude/rules/ subdirectory as JSON. Do NOT guess the placement from the first path — rules with paths spanning multiple directories belong at their common ancestor.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
FIRST: Read `.codeyam/rules/instructions.md` — it contains the required format, rule placement via the rule-path API, and an example rule. You MUST follow this format exactly when creating or editing rules.
|
|
2
|
+
|
|
3
|
+
THEN: Read the file {{CONTEXT_FILE}} and follow the instructions inside.
|
|
4
|
+
|
|
5
|
+
For each stale rule:
|
|
6
|
+
1. Review the inline rule content and the diff to determine if the rule needs updating
|
|
7
|
+
2. If it needs updating, edit the rule file in .claude/rules/ — also trim prose and unnecessary headers (most rules should be a few bullets)
|
|
8
|
+
3. Run `codeyam memory touch <rule-path1> <rule-path2> ...` with the SPECIFIC rule paths you reviewed to mark them as audited in .claude/codeyam-rule-state.json
|
|
9
|
+
Example: `codeyam memory touch tooling/cli-build.md packages/ai/execution-flow-prioritization.md`
|
|
10
|
+
|
|
11
|
+
Write a summary to `{{NOTIFICATION_FILE}}` listing each action taken, even if you only ran `codeyam memory touch` without content changes. Example:
|
|
12
|
+
```
|
|
13
|
+
The background rule-reflection agent updated the following rules:
|
|
14
|
+
- Reviewed `.claude/rules/example.md` — no content changes, ran `codeyam memory touch`
|
|
15
|
+
- Created `.claude/rules/tooling/new-pattern.md` — documents X pattern
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The project root is {{PROJECT_DIR}}
|
|
19
|
+
|
|
20
|
+
CRITICAL: All rule files MUST be written to {{PROJECT_DIR}}/.claude/rules/ (the project directory), NOT ~/.claude/rules/ (the user home directory). Always use the full absolute path when writing rule files.
|
|
21
|
+
|
|
22
|
+
CRITICAL: Before writing any rule file, you MUST run the rule-path command to determine the correct subdirectory:
|
|
23
|
+
codeyam memory rule-path path/one path/two
|
|
24
|
+
Pass all paths from your frontmatter. The command returns the correct .claude/rules/ subdirectory as JSON. Do NOT guess the placement from the first path — rules with paths spanning multiple directories belong at their common ancestor.
|
|
@@ -14,6 +14,7 @@ Supports four notification files (legacy combined + split agents):
|
|
|
14
14
|
- rule-notification-interruption.md (interruption review agent)
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
|
+
import json
|
|
17
18
|
import os
|
|
18
19
|
import sys
|
|
19
20
|
|
|
@@ -26,27 +27,53 @@ NOTIFICATION_FILES = [
|
|
|
26
27
|
]
|
|
27
28
|
|
|
28
29
|
|
|
30
|
+
def get_project_slug():
|
|
31
|
+
"""
|
|
32
|
+
Derive project slug from .codeyam/config.json (matching getProjectSlug() on the TS side).
|
|
33
|
+
Falls back to os.path.basename(project_dir) if config is absent or malformed.
|
|
34
|
+
"""
|
|
35
|
+
project_dir = os.environ.get('CLAUDE_PROJECT_DIR', os.getcwd())
|
|
36
|
+
try:
|
|
37
|
+
config_path = os.path.join(project_dir, '.codeyam', 'config.json')
|
|
38
|
+
with open(config_path, 'r') as f:
|
|
39
|
+
config = json.load(f)
|
|
40
|
+
slug = config.get('projectSlug', '')
|
|
41
|
+
if slug:
|
|
42
|
+
return slug
|
|
43
|
+
except (IOError, json.JSONDecodeError, KeyError):
|
|
44
|
+
pass
|
|
45
|
+
return os.path.basename(project_dir)
|
|
46
|
+
|
|
47
|
+
|
|
29
48
|
def main():
|
|
30
49
|
collected = []
|
|
50
|
+
slug = get_project_slug()
|
|
51
|
+
|
|
52
|
+
# Check slug subdirectory first, then fall back to flat directory
|
|
53
|
+
dirs_to_check = [os.path.join(MARKER_DIR, slug), MARKER_DIR]
|
|
31
54
|
|
|
32
55
|
for filename in NOTIFICATION_FILES:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
56
|
+
for check_dir in dirs_to_check:
|
|
57
|
+
filepath = os.path.join(check_dir, filename)
|
|
58
|
+
if not os.path.exists(filepath):
|
|
59
|
+
continue
|
|
60
|
+
|
|
61
|
+
try:
|
|
62
|
+
with open(filepath, 'r') as f:
|
|
63
|
+
content = f.read().strip()
|
|
64
|
+
except IOError:
|
|
65
|
+
continue
|
|
66
|
+
|
|
67
|
+
if content:
|
|
68
|
+
collected.append(content)
|
|
69
|
+
|
|
70
|
+
try:
|
|
71
|
+
os.remove(filepath)
|
|
72
|
+
except OSError:
|
|
73
|
+
pass
|
|
74
|
+
|
|
75
|
+
# Found in this directory — don't check the fallback
|
|
76
|
+
break
|
|
50
77
|
|
|
51
78
|
if collected:
|
|
52
79
|
print('\n\n'.join(collected))
|
|
@@ -120,6 +120,24 @@ def read_rule_content(rule_name):
|
|
|
120
120
|
return text
|
|
121
121
|
|
|
122
122
|
|
|
123
|
+
def get_project_slug():
|
|
124
|
+
"""
|
|
125
|
+
Derive project slug from .codeyam/config.json (matching getProjectSlug() on the TS side).
|
|
126
|
+
Falls back to os.path.basename(project_dir) if config is absent or malformed.
|
|
127
|
+
"""
|
|
128
|
+
project_dir = os.environ.get('CLAUDE_PROJECT_DIR', os.getcwd())
|
|
129
|
+
try:
|
|
130
|
+
config_path = os.path.join(project_dir, '.codeyam', 'config.json')
|
|
131
|
+
with open(config_path, 'r') as f:
|
|
132
|
+
config = json.load(f)
|
|
133
|
+
slug = config.get('projectSlug', '')
|
|
134
|
+
if slug:
|
|
135
|
+
return slug
|
|
136
|
+
except (IOError, json.JSONDecodeError, KeyError):
|
|
137
|
+
pass
|
|
138
|
+
return os.path.basename(project_dir)
|
|
139
|
+
|
|
140
|
+
|
|
123
141
|
def load_memory_settings():
|
|
124
142
|
"""
|
|
125
143
|
Load memory settings from .codeyam/config.json.
|
|
@@ -463,8 +481,9 @@ def handle_stop(hook_input):
|
|
|
463
481
|
if not session_id or not transcript_path:
|
|
464
482
|
return
|
|
465
483
|
|
|
466
|
-
|
|
467
|
-
marker_dir
|
|
484
|
+
slug = get_project_slug()
|
|
485
|
+
marker_dir = Path('/tmp/claude-rule-markers') / slug
|
|
486
|
+
marker_dir.mkdir(parents=True, exist_ok=True)
|
|
468
487
|
marker_file = marker_dir / f'{session_id}.marker'
|
|
469
488
|
|
|
470
489
|
last_line, _ = read_marker(marker_file)
|
|
@@ -539,8 +558,9 @@ def handle_user_prompt_submit(hook_input):
|
|
|
539
558
|
if not session_id or not transcript_path:
|
|
540
559
|
return
|
|
541
560
|
|
|
542
|
-
|
|
543
|
-
marker_dir
|
|
561
|
+
slug = get_project_slug()
|
|
562
|
+
marker_dir = Path('/tmp/claude-rule-markers') / slug
|
|
563
|
+
marker_dir.mkdir(parents=True, exist_ok=True)
|
|
544
564
|
marker_file = marker_dir / f'{session_id}.marker'
|
|
545
565
|
|
|
546
566
|
last_line, was_stop = read_marker(marker_file)
|
|
@@ -4,13 +4,11 @@ Rules provide context-specific guidance when working in files matching their `pa
|
|
|
4
4
|
|
|
5
5
|
## Core Principles
|
|
6
6
|
|
|
7
|
-
1. **One concept per rule**
|
|
8
|
-
2. **Paths must match content scope**
|
|
9
|
-
3. **Keep rules SHORT**
|
|
7
|
+
1. **One concept per rule** — If you're documenting two unrelated things, create two rules.
|
|
8
|
+
2. **Paths must match content scope** — A rule about one file should have that file in `paths`, not a broad `**/*.ts` pattern.
|
|
9
|
+
3. **Keep rules SHORT** — Most rules should be **1-4 bullets**. Only complex multi-file architectures should exceed ~10 lines.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
**Good** — a typical rule (4 bullets):
|
|
11
|
+
**Example** — a typical rule:
|
|
14
12
|
|
|
15
13
|
```markdown
|
|
16
14
|
---
|
|
@@ -26,68 +24,21 @@ paths:
|
|
|
26
24
|
- Test with exact ordering from database, not just same entries
|
|
27
25
|
```
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## When to Create a New Rule
|
|
32
|
-
|
|
33
|
-
Create a new rule when:
|
|
34
|
-
|
|
35
|
-
- You learn something non-obvious about the codebase
|
|
36
|
-
- You make a mistake and want to prevent it in the future
|
|
37
|
-
- The user explains something that isn't clear from the code
|
|
38
|
-
- An existing rule is covering multiple unrelated topics (split it)
|
|
39
|
-
|
|
40
|
-
## Before Creating: What Makes a Rule Valuable?
|
|
41
|
-
|
|
42
|
-
A rule earns its place when it meets these criteria:
|
|
43
|
-
|
|
44
|
-
1. **Beyond the code** — It captures knowledge that reading the source alone wouldn't reveal (historical context, non-obvious interactions, gotchas).
|
|
45
|
-
2. **Explains "why" over "what"** — Gotchas, non-obvious behavior, architectural decisions. (Function signatures, bug fixes, and limitations are already visible in code.)
|
|
46
|
-
3. **Prevents real mistakes** — It would have saved someone from a past confusion or bug, not just a "nice to know."
|
|
27
|
+
## When to Create a Rule
|
|
47
28
|
|
|
48
|
-
|
|
29
|
+
Create a rule when you learn something that **reading the code alone wouldn't reveal**:
|
|
49
30
|
|
|
50
|
-
|
|
31
|
+
- Non-obvious gotchas or behavior that caused real confusion or bugs
|
|
32
|
+
- Architecture, file relationships, or data flows that take time to piece together
|
|
33
|
+
- Debugging strategies for a tricky area of the codebase
|
|
34
|
+
- Preferred commands or workflows when multiple options exist (e.g. "Use `pnpm test` to run tests")
|
|
35
|
+
- User corrections or explanations that aren't captured in the code itself
|
|
51
36
|
|
|
52
|
-
|
|
53
|
-
- An overview of all files, classes, functions, etc used in a particular part of the repo
|
|
54
|
-
- Debugging strategies for a particular area of the repo
|
|
55
|
-
- "Use `pnpm test` to run tests" (if there is more than one way to run tests and this way is preferred)
|
|
56
|
-
|
|
57
|
-
Skip things like "The auth module handles authentication" or "This function takes X and returns Y" unless creating an overview of a complex area of the app — For individual files Claude can read the code and infer these insights.
|
|
58
|
-
|
|
59
|
-
## Path Specificity
|
|
60
|
-
|
|
61
|
-
The `paths` field controls when the rule is shown. Match the scope of your content:
|
|
62
|
-
|
|
63
|
-
| Content Scope | Path Pattern | Example |
|
|
64
|
-
| ------------- | ----------------------- | ------------------------------------------------------ |
|
|
65
|
-
| Single file | `'path/to/file.ts'` | Rule about `processExpression.ts` specifically |
|
|
66
|
-
| Related files | `'path/to/feature*.ts'` | Rule about `generateExecutionFlows*.ts` files |
|
|
67
|
-
| Directory | `'path/to/dir/**/*.ts'` | Rule about the queue system in `utils/queue/` |
|
|
68
|
-
| Cross-cutting | Multiple specific paths | Testing rule with paths to test configs and test files |
|
|
69
|
-
|
|
70
|
-
Match path specificity to content scope — use `'path/to/feature.ts'` for a single-feature rule, not `'**/*.ts'`.
|
|
71
|
-
|
|
72
|
-
## File Placement
|
|
37
|
+
**Skip** rules that restate what the code says — function signatures, type definitions, "this module handles X." Claude can read the code.
|
|
73
38
|
|
|
74
|
-
|
|
39
|
+
## Frontmatter & Paths
|
|
75
40
|
|
|
76
|
-
|
|
77
|
-
2. Strip filenames — keep only the directory portions
|
|
78
|
-
3. Find the longest shared directory prefix
|
|
79
|
-
4. Place the rule `.md` file in `.claude/rules/<that-prefix>/`
|
|
80
|
-
|
|
81
|
-
| Paths in frontmatter | Deepest common dir | Rule location |
|
|
82
|
-
| ---------------------------------------------------------- | ---------------------- | ---------------------------------------------- |
|
|
83
|
-
| `packages/ai/src/lib/foo.ts`, `packages/ai/src/lib/bar.ts` | `packages/ai/src/lib/` | `.claude/rules/packages/ai/src/lib/foo-bar.md` |
|
|
84
|
-
| `packages/ai/src/lib/a.ts`, `packages/ai/src/utils/b.ts` | `packages/ai/src/` | `.claude/rules/packages/ai/src/a-and-b.md` |
|
|
85
|
-
| `packages/ai/**`, `packages/types/**` | `packages/` | `.claude/rules/packages/ai-types.md` |
|
|
86
|
-
| `src/api/auth.ts` (single file) | `src/api/` | `.claude/rules/src/api/auth.md` |
|
|
87
|
-
|
|
88
|
-
Reserve the top level of `.claude/rules/` for rules whose paths genuinely span the entire repo.
|
|
89
|
-
|
|
90
|
-
## Required Frontmatter
|
|
41
|
+
Every rule needs a `paths` frontmatter field. Be specific to avoid loading rules unnecessarily:
|
|
91
42
|
|
|
92
43
|
```yaml
|
|
93
44
|
---
|
|
@@ -97,36 +48,31 @@ paths:
|
|
|
97
48
|
---
|
|
98
49
|
```
|
|
99
50
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
## Content Guidelines
|
|
107
|
-
|
|
108
|
-
### Be Actionable
|
|
51
|
+
| Content Scope | Path Pattern | Example |
|
|
52
|
+
| ------------- | ----------------------- | ---------------------------------------------- |
|
|
53
|
+
| Single file | `'path/to/file.ts'` | Rule about `processExpression.ts` specifically |
|
|
54
|
+
| Related files | `'path/to/feature*.ts'` | Rule about `generateExecutionFlows*.ts` files |
|
|
55
|
+
| Directory | `'path/to/dir/**/*.ts'` | Rule about the queue system in `utils/queue/` |
|
|
56
|
+
| Cross-cutting | Multiple specific paths | Testing rule spanning test configs and tests |
|
|
109
57
|
|
|
110
|
-
-
|
|
111
|
-
- Bad: "Make sure to run the appropriate tests"
|
|
58
|
+
Audit dates live in `.claude/codeyam-rule-state.json` (managed by `codeyam memory touch`). Keep frontmatter limited to `paths`.
|
|
112
59
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
- "Auth tokens are stored in httpOnly cookies via `src/auth/cookies.ts`" tells the reader exactly where to look and what pattern to follow.
|
|
116
|
-
|
|
117
|
-
## Categories
|
|
60
|
+
## File Placement
|
|
118
61
|
|
|
119
|
-
|
|
62
|
+
Rules must be written to `.claude/rules/`, NOT `.codeyam/rules/`. The instructions file lives in `.codeyam/` but actual rule files go in `.claude/rules/`.
|
|
120
63
|
|
|
121
|
-
-
|
|
122
|
-
- "Data flows from X → Y → Z"
|
|
64
|
+
Use `codeyam memory rule-path` to compute the correct directory from your frontmatter paths:
|
|
123
65
|
|
|
124
|
-
|
|
66
|
+
```
|
|
67
|
+
$ codeyam memory rule-path packages/ai/src/lib/foo.ts packages/ai/src/utils/bar.ts
|
|
68
|
+
{"result":".claude/rules/packages/ai/src/"}
|
|
69
|
+
```
|
|
125
70
|
|
|
126
|
-
|
|
127
|
-
- "Must run `pnpm pretest` first because..."
|
|
71
|
+
The command computes the deepest common directory shared by all paths and returns the `.claude/rules/` subdirectory where the rule file should live. Reserve the top level of `.claude/rules/` for rules whose paths genuinely span the entire repo.
|
|
128
72
|
|
|
129
|
-
|
|
73
|
+
## Content Guidelines
|
|
130
74
|
|
|
131
|
-
- "
|
|
132
|
-
-
|
|
75
|
+
- **Be actionable** — "Run `pnpm test:api` for API tests" not "Make sure to run the appropriate tests"
|
|
76
|
+
- **Focus on why, not what** — Gotchas, non-obvious behavior, architectural decisions. The code already shows "what."
|
|
77
|
+
- **Point to specifics** — "Auth tokens are stored in httpOnly cookies via `src/auth/cookies.ts`" beats a vague description.
|
|
78
|
+
- **Be short!** - Context window space is precious! Do not ramble, use bullets, focus on providing clear actionable information.
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codeyam-dev-mode
|
|
3
|
+
autoApprove: true
|
|
4
|
+
description: |
|
|
5
|
+
Use this skill when working in CodeYam Dev Mode — an interactive environment for iterating on
|
|
6
|
+
components and scenarios with a live preview panel alongside a Claude Code terminal.
|
|
7
|
+
Use when: The embedded terminal in Dev Mode auto-invokes this skill to provide entity/scenario context.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# CodeYam Dev Mode
|
|
11
|
+
|
|
12
|
+
You are working inside CodeYam Dev Mode — a split-screen environment with this Claude Code terminal on the left and a live preview on the right.
|
|
13
|
+
|
|
14
|
+
## Step 1: Read Session Context
|
|
15
|
+
|
|
16
|
+
Read the dev mode context file to understand the current entity and scenario:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
cat .codeyam/dev-mode-context.md
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The context file contains all the specific paths you need — source file, mock data, dev server project, and **server log**. All paths are fully resolved; no placeholders to fill in.
|
|
23
|
+
|
|
24
|
+
## Step 2: Gather Context While Server Sets Up
|
|
25
|
+
|
|
26
|
+
The dev server needs time to set up the sandboxed project (copying files, installing deps, starting Vite). The mock data files in the tmp project **do not exist yet** when you first start. Use this time productively.
|
|
27
|
+
|
|
28
|
+
**Do these in parallel:**
|
|
29
|
+
|
|
30
|
+
1. **Read the source file** from the real repo (exists immediately).
|
|
31
|
+
|
|
32
|
+
2. **Query the database** for all scenarios belonging to this entity's analysis. Use the **Analysis ID** from the context file:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
sqlite3 .codeyam/db.sqlite3 "SELECT name, description FROM scenarios WHERE analysis_id = '<ANALYSIS_ID>'"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Each scenario's `description` explains what data shape it tests — e.g. "empty list", "many items", "error state". This tells you what data attributes matter most for the component's visual states.
|
|
39
|
+
|
|
40
|
+
3. **Monitor the server log** listed in the context file under **Server log**:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
tail -f <server log path from context file>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Wait until you see a local URL like `http://localhost:...` indicating the Vite server has started. Do NOT try to read mock data or other files from the tmp project until the logs confirm setup is complete.
|
|
47
|
+
|
|
48
|
+
## Step 3: Read Mock Data and Present Overview
|
|
49
|
+
|
|
50
|
+
Once the dev server is ready, read the **mock data file** from the tmp project path listed in the context file.
|
|
51
|
+
|
|
52
|
+
Then present a **concise** overview to the user:
|
|
53
|
+
|
|
54
|
+
1. **Component Summary** — 2-3 sentences on what the component does and the current scenario being previewed.
|
|
55
|
+
|
|
56
|
+
2. **Suggested Tests** — Compare the component's code paths (conditionals, edge cases, visual states) against the existing scenarios from the database. Recommend 2-4 specific ways to test the component that are **not yet covered** by saved scenarios. Focus on interesting visual states — e.g. "What does this look like with a very long title?", "What happens when the list is empty?", "How does the error state render?". Be specific to this component, not generic.
|
|
57
|
+
|
|
58
|
+
Keep it brief — no tables, no exhaustive attribute lists. The user can see the preview and wants actionable suggestions, not a data dump.
|
|
59
|
+
|
|
60
|
+
## How Dev Mode Works
|
|
61
|
+
|
|
62
|
+
**Layout:**
|
|
63
|
+
|
|
64
|
+
- **Left panel** — This Claude Code terminal (you)
|
|
65
|
+
- **Right panel** — Live preview iframe showing the rendered component/scenario
|
|
66
|
+
|
|
67
|
+
**Architecture:**
|
|
68
|
+
|
|
69
|
+
- The preview runs from a sandboxed project at the tmp path listed in the context file
|
|
70
|
+
- Source code edits in the real repo auto-sync to the preview via HMR (hot module replacement)
|
|
71
|
+
- Mock data files live in the tmp project under `__codeyamMocks__/`
|
|
72
|
+
|
|
73
|
+
**What you can edit:**
|
|
74
|
+
|
|
75
|
+
- **Source code** (the entity's file in the real repo) — edits sync automatically to the preview
|
|
76
|
+
- **Mock data** (the `MockData_*.tsx` file in the tmp project) — edits also sync via HMR
|
|
77
|
+
- Both types of edits show up in the preview almost instantly
|
|
78
|
+
|
|
79
|
+
**CRITICAL — What you must NEVER edit for functional changes:**
|
|
80
|
+
|
|
81
|
+
- **Shimmed component files** (`*_Scenario.tsx` in the tmp project) — these are auto-generated files that wire up the component with mocked dependencies. **NEVER modify these to change what renders.** Any functional changes you make here:
|
|
82
|
+
- Will be lost when the scenario is recaptured or regenerated
|
|
83
|
+
- Cannot be saved as a scenario (only mock data is persisted to the database)
|
|
84
|
+
- Break the ability to reproduce the scenario in the future
|
|
85
|
+
- To change what the component displays, **always edit the `MockData_*.tsx` file**. The shimmed component reads mock data via `scenarios().data()` — that's the mechanism for controlling component behavior and visual state.
|
|
86
|
+
- The ONLY acceptable edit to a shimmed component file is adding temporary `console.log` statements for debugging (see Client-Side Logging below). Never change imports, state initialization, hooks, memos, or rendering logic.
|
|
87
|
+
|
|
88
|
+
## Workflow
|
|
89
|
+
|
|
90
|
+
1. Read the context file (`.codeyam/dev-mode-context.md`)
|
|
91
|
+
2. While dev server sets up, do in parallel:
|
|
92
|
+
- Read the source file (from real repo — available immediately)
|
|
93
|
+
- Query database for scenario names/descriptions (available immediately)
|
|
94
|
+
- Monitor server log until dev server is ready
|
|
95
|
+
3. Read the mock data file (from tmp project — only after setup completes)
|
|
96
|
+
4. Present concise overview: component summary + suggested untested scenarios
|
|
97
|
+
5. Ask the user what they want to change
|
|
98
|
+
6. Make incremental edits to **source code or mock data only** — the preview updates live
|
|
99
|
+
7. After making changes, refresh the preview (curl command from context file)
|
|
100
|
+
8. Iterate based on user feedback
|
|
101
|
+
|
|
102
|
+
## Client-Side Logging (Required)
|
|
103
|
+
|
|
104
|
+
**Always add `console.log` statements to trace the execution flow when making changes.** This is critical — you cannot see the preview, so logging is your only way to verify the component renders as expected.
|
|
105
|
+
|
|
106
|
+
Client-side `console.log` and `console.error` calls are automatically captured by the `/api/client-log` endpoint and written to the server log file. This means you can add logging in component code and read it from the server log.
|
|
107
|
+
|
|
108
|
+
**When to add logging:**
|
|
109
|
+
|
|
110
|
+
- Before and after every change you make to the shimmed component or mock data
|
|
111
|
+
- At key data flow checkpoints: after state initialization, after useMemo computations, before the render return
|
|
112
|
+
- In useEffect callbacks to confirm they fire
|
|
113
|
+
- Around conditional branches you're targeting (e.g. "this condition should now be true")
|
|
114
|
+
|
|
115
|
+
**How to log:**
|
|
116
|
+
|
|
117
|
+
Add `console.log` with a `[CY-DEBUG]` prefix in the shimmed component file (the `*_Default_Scenario.tsx` file in the tmp project). **This is the ONLY acceptable edit to shimmed component files — temporary debug logging. Never change the component's logic, imports, state, or rendering in these files.**
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
// After state declarations:
|
|
121
|
+
console.log(
|
|
122
|
+
'[CY-DEBUG] render: myState:',
|
|
123
|
+
myState?.length,
|
|
124
|
+
'otherData:',
|
|
125
|
+
otherData,
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
// Inside useEffect:
|
|
129
|
+
useEffect(() => {
|
|
130
|
+
console.log('[CY-DEBUG] useEffect fired, setting data');
|
|
131
|
+
// ...
|
|
132
|
+
}, []);
|
|
133
|
+
|
|
134
|
+
// Before return:
|
|
135
|
+
console.log(
|
|
136
|
+
'[CY-DEBUG] PRE-RENDER: showThumbnails:',
|
|
137
|
+
items?.length > 0,
|
|
138
|
+
'showLoader:',
|
|
139
|
+
!items,
|
|
140
|
+
);
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**After refreshing, always check the log** for your `[CY-DEBUG]` lines:
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
tail -30 <server log path from context file>
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
If you don't see your debug logs but see `[CLIENT CONSOLE.ERROR]` or `Application Error`, the component is crashing before your code runs. Read the error stack trace to find the failing component.
|
|
150
|
+
|
|
151
|
+
**Keep logging in place** as you iterate — it costs nothing and saves significant debugging time.
|
|
152
|
+
|
|
153
|
+
## Refreshing the Preview
|
|
154
|
+
|
|
155
|
+
After making changes, refresh the live preview so it picks up your edits. The exact curl command is in the context file under **Server > Refresh preview** — copy and run it:
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
curl -s -X POST http://localhost:<port>/api/dev-mode-preview
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Always refresh after making changes.** This triggers the preview iframe to reload, **clears the server log file**, waits for the page to re-render, and then fetches the preview URL to check for SSR errors.
|
|
162
|
+
|
|
163
|
+
**The response includes preview health info.** Check the `preview` field in the JSON response:
|
|
164
|
+
|
|
165
|
+
```json
|
|
166
|
+
{
|
|
167
|
+
"success": true,
|
|
168
|
+
"sessionsNotified": 1,
|
|
169
|
+
"logCleared": true,
|
|
170
|
+
"preview": {
|
|
171
|
+
"status": 200,
|
|
172
|
+
"healthy": true
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
If the preview is unhealthy (e.g., SSR error caught by an error boundary), the response will include the error:
|
|
178
|
+
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"preview": {
|
|
182
|
+
"status": 500,
|
|
183
|
+
"healthy": false,
|
|
184
|
+
"error": "ReferenceError: myVariable is not defined\n at Component (/path/to/file.tsx:42:5)"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**After every refresh:**
|
|
190
|
+
|
|
191
|
+
1. **Check `preview.healthy`** in the JSON response. If `false`, the `error` field contains the SSR error — fix it before proceeding.
|
|
192
|
+
2. **Check the log** for your `[CY-DEBUG]` lines to confirm the execution path:
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
tail -30 <server log path from context file>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
If the preview was unhealthy, the log will also contain `[DEV-MODE-CHECK]` lines with the error details.
|
|
199
|
+
|
|
200
|
+
Look for your `[CY-DEBUG]` lines to confirm the execution path. If you see errors instead, the component is crashing. If you see nothing, the page may still be loading — wait a moment and check again.
|
|
201
|
+
|
|
202
|
+
## Debugging with Server Logs
|
|
203
|
+
|
|
204
|
+
The **Server log** path in the context file captures all output from the dev server process — Vite compilation errors, SSR errors, HMR updates, and runtime warnings. **Client-side errors** (React rendering errors, unhandled exceptions, console.error calls) are also automatically reported to this log via the `/api/client-log` endpoint. This means both server and client errors appear in the same log file.
|
|
205
|
+
|
|
206
|
+
Since the log is **cleared on every refresh**, you always see fresh output. No need to scroll past old errors.
|
|
207
|
+
|
|
208
|
+
**When to check the server log:**
|
|
209
|
+
|
|
210
|
+
- **After every refresh** — always verify your debug logs appear and no errors are present
|
|
211
|
+
- The preview shows a blank page, error boundary, or 500 error
|
|
212
|
+
- HMR updates aren't taking effect after edits
|
|
213
|
+
- The preview is stuck loading or shows unexpected content
|
|
214
|
+
|
|
215
|
+
**How to check:**
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
tail -50 <server log path from context file>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**What to look for:**
|
|
222
|
+
|
|
223
|
+
- `[CY-DEBUG]` — your trace logs confirming the execution path and data values
|
|
224
|
+
- `[CLIENT CONSOLE.ERROR]` — client-side React errors or unhandled exceptions
|
|
225
|
+
- `[vite]` error messages — TypeScript compilation failures
|
|
226
|
+
- `Application Error` — React error boundary activated (component crashed during render)
|
|
227
|
+
- No output at all — the page hasn't loaded yet, or the component never rendered
|
|
228
|
+
|
|
229
|
+
## Tips
|
|
230
|
+
|
|
231
|
+
- **NEVER modify shimmed component files** (`*_Scenario.tsx`) to change rendering behavior — only edit `MockData_*.tsx` files to change what the component displays. Shimmed components are auto-generated; functional changes to them won't persist and can't be saved as scenarios.
|
|
232
|
+
- **Refresh the preview frequently** — the user is watching the preview panel as you work. Make small changes, then refresh so they see visual progress. Don't batch multiple edits into one big refresh at the end. Aim for a refresh after every meaningful edit (new data values, layout changes, style tweaks).
|
|
233
|
+
- **Always add `[CY-DEBUG]` logging before refreshing** — never refresh without a way to verify the result
|
|
234
|
+
- Mock data files are TypeScript (`.tsx`) — they export scenario-specific props/data
|
|
235
|
+
- The database at `.codeyam/db.sqlite3` has entity and scenario metadata if you need deeper investigation
|
|
236
|
+
- If the preview breaks, check the server log (path in context file) for compilation or runtime errors
|
|
237
|
+
- You can also modify other files in the repo that the entity imports — those changes sync too
|