@codeyam/codeyam-cli 0.1.0-staging.c90f8c9 → 0.1.0-staging.c9dc00c
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 +7 -7
- package/analyzer-template/packages/ai/index.ts +10 -2
- package/analyzer-template/packages/ai/package.json +2 -2
- package/analyzer-template/packages/ai/src/lib/analyzeScope.ts +86 -18
- package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +67 -9
- package/analyzer-template/packages/ai/src/lib/astScopes/methodSemantics.ts +41 -17
- package/analyzer-template/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.ts +10 -17
- package/analyzer-template/packages/ai/src/lib/astScopes/processExpression.ts +308 -50
- package/analyzer-template/packages/ai/src/lib/astScopes/types.ts +15 -6
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +837 -243
- package/analyzer-template/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.ts +5 -1
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.ts +16 -3
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.ts +6 -4
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.ts +54 -3
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.ts +60 -15
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.ts +70 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.ts +80 -5
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.ts +179 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.ts +40 -30
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.ts +393 -97
- package/analyzer-template/packages/ai/src/lib/generateEntityDataStructure.ts +58 -3
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +283 -1
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarios.ts +9 -5
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlows.ts +11 -3
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionalEffects.ts +1 -1
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromConditionals.ts +297 -7
- package/analyzer-template/packages/ai/src/lib/generateExecutionFlowsFromJsxUsages.ts +1 -1
- package/analyzer-template/packages/ai/src/lib/isolateScopes.ts +51 -3
- package/analyzer-template/packages/ai/src/lib/mergeStatements.ts +90 -96
- package/analyzer-template/packages/ai/src/lib/promptGenerators/gatherAttributesMap.ts +10 -7
- package/analyzer-template/packages/ai/src/lib/resolvePathToControllable.ts +25 -13
- package/analyzer-template/packages/ai/src/lib/worker/SerializableDataStructure.ts +4 -3
- package/analyzer-template/packages/ai/src/lib/worker/analyzeScopeWorker.ts +114 -2
- package/analyzer-template/packages/analyze/index.ts +2 -0
- package/analyzer-template/packages/analyze/src/lib/FileAnalyzer.ts +65 -59
- package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +113 -26
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.ts +19 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.ts +19 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getAllExports.ts +11 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.ts +8 -0
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.ts +49 -1
- package/analyzer-template/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.ts +2 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.ts +71 -9
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +19 -4
- package/analyzer-template/packages/analyze/src/lib/files/analyze/dependencyResolver.ts +6 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/gatherEntityMap.ts +4 -2
- package/analyzer-template/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.ts +0 -3
- package/analyzer-template/packages/analyze/src/lib/files/analyzeRemixRoute.ts +4 -5
- package/analyzer-template/packages/analyze/src/lib/files/getImportedExports.ts +14 -12
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/TransformationTracer.ts +1315 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.ts +61 -13
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.ts +37 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +229 -19
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.ts +117 -9
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +459 -39
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/propagateArrayItemSchemas.ts +474 -0
- package/analyzer-template/packages/analyze/src/lib/files/setImportedExports.ts +2 -1
- package/analyzer-template/packages/analyze/src/lib/index.ts +1 -0
- package/analyzer-template/packages/analyze/src/lib/utils/getFileByPath.ts +19 -0
- package/analyzer-template/packages/aws/package.json +1 -1
- package/analyzer-template/packages/database/package.json +1 -1
- package/analyzer-template/packages/database/src/lib/analysisBranchToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/analysisToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/branchToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/commitBranchToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/commitToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/fileToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/kysely/db.ts +14 -1
- package/analyzer-template/packages/database/src/lib/kysely/tables/commitsTable.ts +6 -0
- package/analyzer-template/packages/database/src/lib/kysely/tables/labsRequestsTable.ts +52 -0
- package/analyzer-template/packages/database/src/lib/loadAnalysis.ts +13 -0
- package/analyzer-template/packages/database/src/lib/loadBranch.ts +16 -1
- package/analyzer-template/packages/database/src/lib/loadCommit.ts +11 -0
- package/analyzer-template/packages/database/src/lib/loadCommits.ts +12 -0
- package/analyzer-template/packages/database/src/lib/loadEntityBranches.ts +12 -0
- package/analyzer-template/packages/database/src/lib/projectToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/saveFiles.ts +1 -1
- package/analyzer-template/packages/database/src/lib/scenarioToDb.ts +1 -1
- package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +7 -14
- package/analyzer-template/packages/database/src/lib/userScenarioToDb.ts +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/analysisBranchToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/analysisBranchToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/analysisToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/analysisToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/branchToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/branchToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/commitBranchToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/commitBranchToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/commitToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/commitToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/fileToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/fileToDb.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 +11 -1
- 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/commitsTable.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.js +3 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/commitsTable.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.d.ts +23 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.js +35 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/labsRequestsTable.js.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js +8 -0
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadBranch.js +11 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadBranch.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.js +7 -0
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommit.js.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 +9 -0
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.js +9 -0
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntityBranches.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/projectToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/projectToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/saveFiles.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/saveFiles.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/scenarioToDb.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/scenarioToDb.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts +2 -2
- 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 +5 -4
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Commit.d.ts +2 -0
- package/analyzer-template/packages/github/dist/types/src/types/Commit.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts +7 -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/ScenariosDataStructure.d.ts +5 -5
- package/analyzer-template/packages/github/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ScopeAnalysis.d.ts +6 -1
- package/analyzer-template/packages/github/dist/types/src/types/ScopeAnalysis.d.ts.map +1 -1
- package/analyzer-template/packages/github/package.json +1 -1
- package/analyzer-template/packages/types/src/types/Commit.ts +2 -0
- package/analyzer-template/packages/types/src/types/ProjectMetadata.ts +7 -0
- package/analyzer-template/packages/types/src/types/ScenariosDataStructure.ts +6 -5
- package/analyzer-template/packages/types/src/types/ScopeAnalysis.ts +6 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Commit.d.ts +2 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Commit.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts +7 -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/ScenariosDataStructure.d.ts +5 -5
- package/analyzer-template/packages/utils/dist/types/src/types/ScenariosDataStructure.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ScopeAnalysis.d.ts +6 -1
- package/analyzer-template/packages/utils/dist/types/src/types/ScopeAnalysis.d.ts.map +1 -1
- package/analyzer-template/playwright/capture.ts +20 -8
- package/analyzer-template/playwright/captureStatic.ts +1 -1
- package/analyzer-template/project/analyzeBaselineCommit.ts +5 -0
- package/analyzer-template/project/analyzeRegularCommit.ts +5 -0
- package/analyzer-template/project/captureLibraryFunctionDirect.ts +29 -26
- package/analyzer-template/project/constructMockCode.ts +90 -10
- package/analyzer-template/project/createEntitiesAndSortFiles.ts +83 -0
- package/analyzer-template/project/loadReadyToBeCaptured.ts +65 -41
- package/analyzer-template/project/orchestrateCapture/AwsCaptureTaskRunner.ts +12 -4
- package/analyzer-template/project/orchestrateCapture/SequentialCaptureTaskRunner.ts +11 -6
- package/analyzer-template/project/orchestrateCapture/taskRunner.ts +4 -2
- package/analyzer-template/project/orchestrateCapture.ts +45 -6
- package/analyzer-template/project/start.ts +35 -11
- package/analyzer-template/project/writeMockDataTsx.ts +181 -8
- package/analyzer-template/project/writeScenarioComponents.ts +60 -12
- package/analyzer-template/project/writeSimpleRoot.ts +21 -11
- package/analyzer-template/scripts/comboWorkerLoop.cjs +98 -50
- package/background/src/lib/local/createLocalAnalyzer.js +1 -1
- package/background/src/lib/local/createLocalAnalyzer.js.map +1 -1
- package/background/src/lib/virtualized/project/analyzeBaselineCommit.js +5 -0
- package/background/src/lib/virtualized/project/analyzeBaselineCommit.js.map +1 -1
- package/background/src/lib/virtualized/project/analyzeRegularCommit.js +5 -0
- package/background/src/lib/virtualized/project/analyzeRegularCommit.js.map +1 -1
- package/background/src/lib/virtualized/project/captureLibraryFunctionDirect.js +3 -3
- package/background/src/lib/virtualized/project/captureLibraryFunctionDirect.js.map +1 -1
- package/background/src/lib/virtualized/project/constructMockCode.js +75 -4
- package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
- package/background/src/lib/virtualized/project/createEntitiesAndSortFiles.js +73 -1
- package/background/src/lib/virtualized/project/createEntitiesAndSortFiles.js.map +1 -1
- package/background/src/lib/virtualized/project/loadReadyToBeCaptured.js +19 -8
- package/background/src/lib/virtualized/project/loadReadyToBeCaptured.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture/AwsCaptureTaskRunner.js +2 -2
- package/background/src/lib/virtualized/project/orchestrateCapture/AwsCaptureTaskRunner.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js +4 -4
- package/background/src/lib/virtualized/project/orchestrateCapture/SequentialCaptureTaskRunner.js.map +1 -1
- package/background/src/lib/virtualized/project/orchestrateCapture.js +38 -6
- package/background/src/lib/virtualized/project/orchestrateCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +32 -11
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +162 -4
- package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioComponents.js +60 -15
- package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
- package/background/src/lib/virtualized/project/writeSimpleRoot.js +21 -11
- package/background/src/lib/virtualized/project/writeSimpleRoot.js.map +1 -1
- package/codeyam-cli/scripts/apply-setup.js +180 -0
- package/codeyam-cli/scripts/apply-setup.js.map +1 -1
- package/codeyam-cli/src/cli.js +4 -0
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/commands/analyze.js +2 -0
- package/codeyam-cli/src/commands/analyze.js.map +1 -1
- package/codeyam-cli/src/commands/baseline.js +2 -0
- package/codeyam-cli/src/commands/baseline.js.map +1 -1
- package/codeyam-cli/src/commands/debug.js +9 -5
- package/codeyam-cli/src/commands/debug.js.map +1 -1
- package/codeyam-cli/src/commands/default.js +14 -4
- package/codeyam-cli/src/commands/default.js.map +1 -1
- package/codeyam-cli/src/commands/detect-universal-mocks.js +2 -0
- package/codeyam-cli/src/commands/detect-universal-mocks.js.map +1 -1
- package/codeyam-cli/src/commands/init.js +42 -184
- package/codeyam-cli/src/commands/init.js.map +1 -1
- package/codeyam-cli/src/commands/memory.js +264 -0
- package/codeyam-cli/src/commands/memory.js.map +1 -0
- package/codeyam-cli/src/commands/recapture.js +2 -0
- package/codeyam-cli/src/commands/recapture.js.map +1 -1
- package/codeyam-cli/src/commands/setup-sandbox.js +2 -0
- package/codeyam-cli/src/commands/setup-sandbox.js.map +1 -1
- package/codeyam-cli/src/commands/setup-simulations.js +284 -0
- package/codeyam-cli/src/commands/setup-simulations.js.map +1 -0
- package/codeyam-cli/src/commands/test-startup.js +2 -0
- package/codeyam-cli/src/commands/test-startup.js.map +1 -1
- package/codeyam-cli/src/commands/verify.js +2 -0
- package/codeyam-cli/src/commands/verify.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +128 -86
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
- package/codeyam-cli/src/utils/analysisRunner.js +1 -1
- package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
- package/codeyam-cli/src/utils/analyzer.js +7 -0
- package/codeyam-cli/src/utils/analyzer.js.map +1 -1
- package/codeyam-cli/src/utils/backgroundServer.js +4 -0
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/install-skills.js +71 -46
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/labsAutoCheck.js +48 -0
- package/codeyam-cli/src/utils/labsAutoCheck.js.map +1 -0
- package/codeyam-cli/src/utils/progress.js +7 -0
- package/codeyam-cli/src/utils/progress.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +4 -0
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/requireSimulations.js +10 -0
- package/codeyam-cli/src/utils/requireSimulations.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js +82 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/confusionDetector.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js +230 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/contextBuilder.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js +67 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/assertRules.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js +105 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/captureFixture.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js +34 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/loadCapturedFixture.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js +162 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/runClaude.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js +75 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/helpers/setupTempProject.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js +378 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/integration/ruleReflectionE2E.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js +115 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/promptBuilder.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js +127 -0
- package/codeyam-cli/src/utils/ruleReflection/__tests__/transcriptParser.test.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js +50 -0
- package/codeyam-cli/src/utils/ruleReflection/confusionDetector.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js +116 -0
- package/codeyam-cli/src/utils/ruleReflection/contextBuilder.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/index.js +5 -0
- package/codeyam-cli/src/utils/ruleReflection/index.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js +44 -0
- package/codeyam-cli/src/utils/ruleReflection/promptBuilder.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js +85 -0
- package/codeyam-cli/src/utils/ruleReflection/transcriptParser.js.map +1 -0
- package/codeyam-cli/src/utils/ruleReflection/types.js +5 -0
- package/codeyam-cli/src/utils/ruleReflection/types.js.map +1 -0
- package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js +293 -0
- package/codeyam-cli/src/utils/rules/__tests__/ruleState.test.js.map +1 -0
- package/codeyam-cli/src/utils/rules/index.js +6 -0
- package/codeyam-cli/src/utils/rules/index.js.map +1 -0
- package/codeyam-cli/src/utils/rules/parser.js +83 -0
- package/codeyam-cli/src/utils/rules/parser.js.map +1 -0
- package/codeyam-cli/src/utils/rules/pathMatcher.js +18 -0
- package/codeyam-cli/src/utils/rules/pathMatcher.js.map +1 -0
- package/codeyam-cli/src/utils/rules/ruleState.js +150 -0
- package/codeyam-cli/src/utils/rules/ruleState.js.map +1 -0
- package/codeyam-cli/src/utils/rules/staleness.js +137 -0
- package/codeyam-cli/src/utils/rules/staleness.js.map +1 -0
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +20 -43
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/database.js +15 -3
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/backgroundServer.js +31 -0
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/CopyButton-CA3JxPb7.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/EntityItem-B86KKU7e.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-DLqD3qNt.js → EntityTypeBadge-B5ctlSYt.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-Ba2JVPzP.js → EntityTypeIcon-BqY8gDAW.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{InlineSpinner-C8lyxW9k.js → InlineSpinner-ClaLpuOo.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-aht4aafF.js → InteractivePreview-BDhPilK7.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-CVtiBnY5.js → LibraryFunctionPreview-VeqEBv9v.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-B0GLXMsr.js → LoadingDots-Bs7Nn1Jr.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-xgeCVgSM.js → LogViewer-Bm3PmcCz.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-D4TZhLuw.js → ReportIssueModal-C6PKeMYR.js} +3 -13
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-DuDvi0jm.js → SafeScreenshot-Gq3Ocjo6.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-DEx02QDa.js → ScenarioViewer-BNLaXBHR.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-DyFZkK0l.js → TruncatedFilePath-CiwXDxLh.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{_index-BwqWJOgH.js → _index-B3TDXxnk.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-DoLIqZX2.js → activity.(_tab)-BtBFH820.js} +6 -16
- package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-CN61MOMa.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.labs-survey-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.labs-unlock-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.memory-profile-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.save-fixture-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/book-open-PttOB2SF.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-Cx24_aWc.js → chevron-down-TJp6ofnp.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{chunk-EPOLDU6W-CXRTFQ3F.js → chunk-JZWAC4HX-JE9ZIoBl.js} +12 -12
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-BOARzkeR.js → circle-check-CXhHQYrI.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/copy-6y9ALfGT.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-BdhJEx6B.js → createLucideIcon-Ca9fAY46.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-C5lqplTC.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-C2N4Op8e.js → entity._sha._-n38keI1k.js} +10 -10
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha.scenarios._scenarioId.fullscreen-DavjRmOY.js → entity._sha.scenarios._scenarioId.fullscreen-CBoafmVs.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.create-scenario-D1T4TGjf.js → entity._sha_.create-scenario-DGgZjdFg.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-CTBG2mmz.js → entity._sha_.edit._scenarioId-38yPijoD.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-CS2cb_eZ.js → entry.client-BSHEfydn.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-DMJ7zii9.js → fileTableUtils-DCPhhSMo.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-0N0YJQv7.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{git-B4RJRvYB.js → git-DXnyr8uP.js} +8 -8
- package/codeyam-cli/src/webserver/build/client/assets/globals-EVn6Z9pz.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{index-lzqtyFU8.js → index-CcsFv748.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-B1h680n5.js → index-ChN9-fAY.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/labs-CmBYA0PH.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-B7B9V-bu.js → loader-circle-CTqLEAGU.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-aa4ff97b.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/memory-BSlqS1QA.js +81 -0
- package/codeyam-cli/src/webserver/build/client/assets/pause-D6vreykR.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/root-DVAbJY8B.js +62 -0
- package/codeyam-cli/src/webserver/build/client/assets/{search-CxXUmBSd.js → search-B8VUL8nl.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-BK-cnzp-.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{simulations-DwFIBT09.js → simulations-CPoAg7Zo.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/terminal-BrCP7uQo.js +11 -0
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-B6LgvRJg.js → triangle-alert-BZz2NjYa.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useCustomSizes-C1v1PQzo.js → useCustomSizes-DNwUduNu.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useLastLogLine-aSv48UbS.js → useLastLogLine-COky1GVF.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-DYxHZQuP.js → useReportContext-CpZgwliL.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-mBRpZPiu.js → useToast-Bv9JFvUO.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/index-Cz2RkDCa.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-CUVsWicu.js +260 -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/templates/{codeyam-power-rules-hook.sh → codeyam-memory-hook.sh} +12 -13
- package/codeyam-cli/templates/codeyam:diagnose.md +195 -496
- package/codeyam-cli/templates/codeyam:memory.md +403 -0
- package/codeyam-cli/templates/codeyam:new-rule.md +2 -2
- package/codeyam-cli/templates/codeyam:setup.md +12 -0
- package/codeyam-cli/templates/rule-notification-hook.py +56 -0
- package/codeyam-cli/templates/rule-reflection-hook.py +627 -0
- package/codeyam-cli/templates/rules-instructions.md +136 -0
- package/package.json +8 -6
- package/packages/ai/index.js +3 -2
- package/packages/ai/index.js.map +1 -1
- package/packages/ai/src/lib/analyzeScope.js +68 -13
- package/packages/ai/src/lib/analyzeScope.js.map +1 -1
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +54 -8
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
- package/packages/ai/src/lib/astScopes/methodSemantics.js +41 -17
- package/packages/ai/src/lib/astScopes/methodSemantics.js.map +1 -1
- package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js +10 -14
- package/packages/ai/src/lib/astScopes/patterns/forInStatementHandler.js.map +1 -1
- package/packages/ai/src/lib/astScopes/processExpression.js +239 -43
- package/packages/ai/src/lib/astScopes/processExpression.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +654 -166
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js +5 -1
- package/packages/ai/src/lib/dataStructure/equivalencyManagers/frameworks/JavascriptFrameworkManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js +13 -3
- package/packages/ai/src/lib/dataStructure/helpers/BatchSchemaProcessor.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js +6 -4
- package/packages/ai/src/lib/dataStructure/helpers/ScopeTreeManager.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js +52 -3
- package/packages/ai/src/lib/dataStructure/helpers/cleanKnownObjectFunctions.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js +55 -11
- package/packages/ai/src/lib/dataStructure/helpers/cleanNonObjectFunctions.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js +63 -0
- package/packages/ai/src/lib/dataStructure/helpers/coerceObjectsToPrimitivesBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js +73 -5
- package/packages/ai/src/lib/dataStructure/helpers/convertDotNotation.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js +173 -0
- package/packages/ai/src/lib/dataStructure/helpers/convertTypeAnnotationsToValues.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.js +37 -20
- package/packages/ai/src/lib/dataStructure/helpers/deduplicateFunctionSchemas.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js +333 -86
- package/packages/ai/src/lib/dataStructure/helpers/fillInSchemaGapsAndUnknowns.js.map +1 -1
- package/packages/ai/src/lib/generateEntityDataStructure.js +46 -2
- package/packages/ai/src/lib/generateEntityDataStructure.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarioData.js +205 -1
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/ai/src/lib/generateEntityScenarios.js +7 -1
- package/packages/ai/src/lib/generateEntityScenarios.js.map +1 -1
- package/packages/ai/src/lib/generateExecutionFlows.js +10 -2
- package/packages/ai/src/lib/generateExecutionFlows.js.map +1 -1
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js +209 -3
- package/packages/ai/src/lib/generateExecutionFlowsFromConditionals.js.map +1 -1
- package/packages/ai/src/lib/isolateScopes.js +39 -3
- package/packages/ai/src/lib/isolateScopes.js.map +1 -1
- package/packages/ai/src/lib/mergeStatements.js +70 -51
- package/packages/ai/src/lib/mergeStatements.js.map +1 -1
- package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js +10 -4
- package/packages/ai/src/lib/promptGenerators/gatherAttributesMap.js.map +1 -1
- package/packages/ai/src/lib/resolvePathToControllable.js +24 -14
- package/packages/ai/src/lib/resolvePathToControllable.js.map +1 -1
- package/packages/ai/src/lib/worker/SerializableDataStructure.js.map +1 -1
- package/packages/ai/src/lib/worker/analyzeScopeWorker.js +94 -1
- package/packages/ai/src/lib/worker/analyzeScopeWorker.js.map +1 -1
- package/packages/analyze/index.js +1 -0
- package/packages/analyze/index.js.map +1 -1
- package/packages/analyze/src/lib/FileAnalyzer.js +60 -36
- package/packages/analyze/src/lib/FileAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/ProjectAnalyzer.js +96 -26
- package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js +14 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getAllDeclaredEntityNodes.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.js +14 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getAllEntityNodes.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getAllExports.js +6 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getAllExports.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.js +6 -0
- package/packages/analyze/src/lib/asts/sourceFiles/getImportsAnalysis.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.js +39 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getResolvedModule.js.map +1 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.js +2 -1
- package/packages/analyze/src/lib/asts/sourceFiles/getSourceFilesForAllImports.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js +54 -6
- package/packages/analyze/src/lib/files/analyze/analyzeEntities/prepareDataStructures.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +17 -4
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js +5 -0
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js +2 -1
- package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js +0 -3
- package/packages/analyze/src/lib/files/analyze/validateDependencyAnalyses.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeRemixRoute.js +3 -2
- package/packages/analyze/src/lib/files/analyzeRemixRoute.js.map +1 -1
- package/packages/analyze/src/lib/files/getImportedExports.js +11 -7
- package/packages/analyze/src/lib/files/getImportedExports.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js +880 -0
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js.map +1 -0
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js +56 -10
- package/packages/analyze/src/lib/files/scenarios/enrichArrayTypesFromChildSignatures.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js +33 -8
- package/packages/analyze/src/lib/files/scenarios/gatherDataForMocks.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +150 -17
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js +56 -8
- package/packages/analyze/src/lib/files/scenarios/generateExecutionFlows.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +399 -31
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/setImportedExports.js +2 -1
- package/packages/analyze/src/lib/files/setImportedExports.js.map +1 -1
- package/packages/analyze/src/lib/index.js +1 -0
- package/packages/analyze/src/lib/index.js.map +1 -1
- package/packages/analyze/src/lib/utils/getFileByPath.js +12 -0
- package/packages/analyze/src/lib/utils/getFileByPath.js.map +1 -0
- package/packages/database/src/lib/analysisBranchToDb.js +1 -1
- package/packages/database/src/lib/analysisBranchToDb.js.map +1 -1
- package/packages/database/src/lib/analysisToDb.js +1 -1
- package/packages/database/src/lib/analysisToDb.js.map +1 -1
- package/packages/database/src/lib/branchToDb.js +1 -1
- package/packages/database/src/lib/branchToDb.js.map +1 -1
- package/packages/database/src/lib/commitBranchToDb.js +1 -1
- package/packages/database/src/lib/commitBranchToDb.js.map +1 -1
- package/packages/database/src/lib/commitToDb.js +1 -1
- package/packages/database/src/lib/commitToDb.js.map +1 -1
- package/packages/database/src/lib/fileToDb.js +1 -1
- package/packages/database/src/lib/fileToDb.js.map +1 -1
- package/packages/database/src/lib/kysely/db.js +11 -1
- package/packages/database/src/lib/kysely/db.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/commitsTable.js +3 -0
- package/packages/database/src/lib/kysely/tables/commitsTable.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/labsRequestsTable.js +35 -0
- package/packages/database/src/lib/kysely/tables/labsRequestsTable.js.map +1 -0
- package/packages/database/src/lib/loadAnalysis.js +8 -0
- package/packages/database/src/lib/loadAnalysis.js.map +1 -1
- package/packages/database/src/lib/loadBranch.js +11 -1
- package/packages/database/src/lib/loadBranch.js.map +1 -1
- package/packages/database/src/lib/loadCommit.js +7 -0
- package/packages/database/src/lib/loadCommit.js.map +1 -1
- package/packages/database/src/lib/loadCommits.js +9 -0
- package/packages/database/src/lib/loadCommits.js.map +1 -1
- package/packages/database/src/lib/loadEntityBranches.js +9 -0
- package/packages/database/src/lib/loadEntityBranches.js.map +1 -1
- package/packages/database/src/lib/projectToDb.js +1 -1
- package/packages/database/src/lib/projectToDb.js.map +1 -1
- package/packages/database/src/lib/saveFiles.js +1 -1
- package/packages/database/src/lib/saveFiles.js.map +1 -1
- package/packages/database/src/lib/scenarioToDb.js +1 -1
- package/packages/database/src/lib/scenarioToDb.js.map +1 -1
- package/packages/database/src/lib/updateCommitMetadata.js +5 -4
- package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/scripts/finalize-analyzer.cjs +8 -76
- package/codeyam-cli/src/webserver/build/client/assets/EntityItem-BXhEawa3.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BRb-0kQl.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/files-Cs4MdYtv.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/git-commit-horizontal-CysbcZxi.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/globals-DMUaGAqV.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-f874c610.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-Bz5TunQg.js +0 -57
- package/codeyam-cli/src/webserver/build/client/assets/rules-hEkvVw2-.js +0 -97
- package/codeyam-cli/src/webserver/build/client/assets/settings-CS5f3WzT.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/index-uNNbimct.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-B08qC4Y7.js +0 -257
- package/codeyam-cli/templates/codeyam:power-rules.md +0 -449
- /package/codeyam-cli/src/webserver/build/client/assets/{api.rules-l0sNRNKZ.js → api.agent-transcripts-l0sNRNKZ.js} +0 -0
|
@@ -2,100 +2,60 @@
|
|
|
2
2
|
|
|
3
3
|
When a user asks to debug a scenario or analysis (e.g., `/codeyam:diagnose [ID]`), use this systematic process.
|
|
4
4
|
|
|
5
|
-
## Goal
|
|
5
|
+
## Goal & Rules
|
|
6
6
|
|
|
7
|
-
**Capture quality screenshots
|
|
7
|
+
**Goal:** Capture quality screenshots by fixing all errors, then document what was wrong.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Definition of Done** — debugging is NOT complete until one of:
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
| Outcome | What's Required |
|
|
12
|
+
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
+
| **SUCCESS (DB Fix)** | Issue fixed via database/config changes, screenshots recaptured, all files verified on disk AND visually inspected |
|
|
14
|
+
| **SUCCESS (File Fix)** | Issue fixed via tmp folder edits, screenshots recaptured with `--capture-only`, all files verified AND visually inspected, changes documented |
|
|
15
|
+
| **UNFIXABLE** | Issue cannot be fixed locally (rare), documented in final report with full details |
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
2. **SUCCESS (File Fix)**: Issue fixed via tmp folder edits, screenshots recaptured with `--capture-only`, ALL screenshot files verified AND visually inspected, changes documented for CodeYam team
|
|
15
|
-
3. **UNFIXABLE**: Issue cannot be fixed locally (rare), documented in final report with full details
|
|
17
|
+
### KEY RULE 1: Never stop before capturing screenshots
|
|
16
18
|
|
|
17
|
-
**
|
|
19
|
+
Category 4 ("engine bug") is a **diagnosis category, not a blocker**. You have full access to edit any file in `/tmp/codeyam/local-dev/{slug}/project/` — the "engine" just wrote those files as plain TypeScript/JavaScript. Every issue can be fixed locally.
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
2. Run `codeyam recapture --capture-only` to capture screenshots with your fixes in place
|
|
21
|
-
3. Verify the screenshots show the component rendering correctly
|
|
22
|
-
4. ONLY THEN document the engine bug for the CodeYam team
|
|
21
|
+
If you find yourself thinking "this requires an engine-level fix" or "this is blocked by a code generation bug" — **STOP**.
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
- Fix the files in the tmp folder, then capture screenshots, THEN document the bug
|
|
24
|
+
- Try at least 3 different approaches before asking the user whether to continue
|
|
25
|
+
- Only stop when the user agrees or you've captured quality screenshots
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
### KEY RULE 2: Original Repo vs Tmp Folder
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
| Location | What's There | Use For |
|
|
30
|
+
| --------------------------------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------- |
|
|
31
|
+
| **Original Repo** (your working directory) | Database (`.codeyam/db.sqlite3`), config, universal mocks, captures | **Run all `codeyam` commands here** |
|
|
32
|
+
| **Tmp Folder** (`/tmp/codeyam/local-dev/{slug}/project/`) | Copy of project with mock injections, generated scenario files | **Only edit files here — never run codeyam commands** |
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
- "This is blocked by a code generation bug"
|
|
32
|
-
- "The engine doesn't properly handle X"
|
|
34
|
+
Running `codeyam recapture` from the tmp folder fails with "Not in a CodeYam project" because the database isn't there.
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
### KEY RULE 3: Never modify client code
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
Fix the **mock data or mock code** — never the client's components or application code. The client's code is sacred. Our job is to make the simulation environment correct. You CAN modify:
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
3. **Only stop when the user agrees** or when you've successfully captured quality screenshots
|
|
40
|
+
- Database data (`.codeyam/db.sqlite3`) — in Original Repo
|
|
41
|
+
- Universal mocks (`.codeyam/universal-mocks`) — in Original Repo
|
|
42
|
+
- Generated files in tmp folder (`__codeyamMocks__/`, layouts, routes)
|
|
42
43
|
|
|
43
|
-
###
|
|
44
|
+
### KEY RULE 4: `--capture-only` preserves tmp folder edits
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
- `codeyam recapture ID` — regenerates files from database, then captures (overwrites tmp edits)
|
|
47
|
+
- `codeyam recapture ID --capture-only` — captures without regenerating (preserves your edits)
|
|
48
|
+
- `codeyam debug ID` — regenerates files only (also overwrites tmp edits)
|
|
46
49
|
|
|
47
|
-
|
|
48
|
-
- You MUST still fix it manually by editing files in the tmp folder
|
|
49
|
-
- You MUST still capture quality screenshots
|
|
50
|
-
- You document what you fixed so the CodeYam team can improve the engine
|
|
51
|
-
|
|
52
|
-
**"Engine bug" is a diagnosis category, not an excuse to stop.**
|
|
50
|
+
If you edited files in the tmp folder, you **MUST** use `--capture-only` when recapturing.
|
|
53
51
|
|
|
54
52
|
---
|
|
55
53
|
|
|
56
|
-
##
|
|
54
|
+
## Setup
|
|
57
55
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
│ Check ALL scenarios in the analysis for failures │
|
|
62
|
-
│ Retrieve the analysis id to use in the debug command │
|
|
63
|
-
│ │ │
|
|
64
|
-
│ ▼ │
|
|
65
|
-
│ Step 1: Copy the logs to a temporary location (see below). |
|
|
66
|
-
| Step 2: codeyam debug [ANALYSIS ID] (generates files to inspect) │
|
|
67
|
-
│ Step 3: Identify error type from logs/output │
|
|
68
|
-
│ Step 4: Diagnose root cause category (1-4) │
|
|
69
|
-
│ Step 5: Attempt fix (database edit or universal mock) │
|
|
70
|
-
│ Step 6: Verify locally (curl returns 200) │
|
|
71
|
-
│ │ │
|
|
72
|
-
│ ┌─────────┴─────────┐ │
|
|
73
|
-
│ ▼ ▼ │
|
|
74
|
-
│ Fix worked Fix didn't work │
|
|
75
|
-
│ (DB changes) │ │
|
|
76
|
-
│ │ ▼ │
|
|
77
|
-
│ │ Step 5a: Fix code in tmp folder │
|
|
78
|
-
│ │ (edit files directly, track changes) │
|
|
79
|
-
│ │ │ │
|
|
80
|
-
│ │ ▼ │
|
|
81
|
-
│ │ Verify without regenerating │
|
|
82
|
-
│ │ │ │
|
|
83
|
-
│ ▼ ▼ │
|
|
84
|
-
│ Step 7: Recapture Step 7: Recapture --capture-only │
|
|
85
|
-
│ (normal) (preserves file fixes) │
|
|
86
|
-
│ │ │ │
|
|
87
|
-
│ └─────────┬─────────┘ │
|
|
88
|
-
│ ▼ │
|
|
89
|
-
│ Step 8: Verify screenshots (check for client-side errors) │
|
|
90
|
-
│ │ │
|
|
91
|
-
│ ▼ │
|
|
92
|
-
│ Verify ALL files exist on disk │
|
|
93
|
-
│ │ │
|
|
94
|
-
│ ▼ │
|
|
95
|
-
│ ✅ DONE - Produce Final Debug Report │
|
|
96
|
-
│ (document ALL changes for CodeYam team) │
|
|
97
|
-
└─────────────────────────────────────────────────────────────────────┘
|
|
98
|
-
```
|
|
56
|
+
### Note Key Locations
|
|
57
|
+
|
|
58
|
+
**Database:** The codeyam database relevant for this command should always be found in the repo where this command is called in the `.codeyam/db.sqlite3` file.
|
|
99
59
|
|
|
100
60
|
**Logs:** Before debugging copy the original logs to a temorary location as the debugging will overwrite these logs and they are valuable for debugging issues.
|
|
101
61
|
|
|
@@ -117,15 +77,12 @@ At the **very start** of debugging, create `.codeyam/debug-session.md` in the **
|
|
|
117
77
|
```markdown
|
|
118
78
|
# Debug Session Context
|
|
119
79
|
|
|
120
|
-
**IMPORTANT**: Keep a todo item "📍 Re-read debug session context" that is NEVER marked complete.
|
|
121
|
-
If the todo disappears, add it back immediately.
|
|
122
|
-
|
|
123
80
|
## Key Locations
|
|
124
81
|
|
|
125
|
-
- **Original
|
|
126
|
-
- **Tmp
|
|
127
|
-
- **Database**: [
|
|
128
|
-
- **Logs**: /tmp/codeyam/local-dev/[SLUG]/codeyam/log.txt
|
|
82
|
+
- **Original Repo**: [FULL PATH]
|
|
83
|
+
- **Tmp Folder**: /tmp/codeyam/local-dev/[PROJECT SLUG]/project
|
|
84
|
+
- **Database**: [Original Repo]/.codeyam/db.sqlite3
|
|
85
|
+
- **Logs**: /tmp/codeyam/local-dev/[PROJECT SLUG]/codeyam/log.txt
|
|
129
86
|
|
|
130
87
|
## IDs
|
|
131
88
|
|
|
@@ -133,198 +90,109 @@ If the todo disappears, add it back immediately.
|
|
|
133
90
|
- **Scenario ID**: [ID]
|
|
134
91
|
- **Entity**: [NAME] at [FILE PATH]
|
|
135
92
|
|
|
136
|
-
## URLs (fill in after
|
|
93
|
+
## URLs (fill in after codeyam debug)
|
|
137
94
|
|
|
138
95
|
- **Scenario URL**: http://localhost:[PORT]/static/codeyam-sample
|
|
139
|
-
- **Dev server port**: [PORT from codeyam debug output]
|
|
140
|
-
|
|
141
|
-
## Commands Reference
|
|
142
|
-
|
|
143
|
-
All commands run from: [ORIGINAL PROJECT PATH]
|
|
144
|
-
|
|
145
|
-
- `codeyam debug [ANALYSIS_ID]` - regenerate files (overwrites tmp folder!)
|
|
146
|
-
- `codeyam recapture [ID]` - regenerate AND capture (overwrites tmp folder!)
|
|
147
|
-
- `codeyam recapture [ID] --capture-only` - capture WITHOUT regenerating (preserves your edits)
|
|
148
|
-
- `codeyam test-startup` - test startup (overwrites tmp folder!)
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### Step 2: Create Persistent Todo
|
|
152
|
-
|
|
153
|
-
Use TodoWrite to create this todo list with the first item being a persistent reminder:
|
|
154
|
-
|
|
155
|
-
```
|
|
156
|
-
📍 Re-read .codeyam/debug-session.md before any codeyam command (NEVER complete this)
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
**CRITICAL**: The first todo item must NEVER be marked as completed. It serves as a constant reminder to check your session context before running commands. If you accidentally complete it or it disappears, add it back immediately.
|
|
160
|
-
|
|
161
|
-
### Step 3: Read Context Before Actions
|
|
162
|
-
|
|
163
|
-
**Before running ANY of these commands**, re-read `.codeyam/debug-session.md`:
|
|
164
|
-
|
|
165
|
-
- `codeyam debug`
|
|
166
|
-
- `codeyam recapture`
|
|
167
|
-
- `codeyam test-startup`
|
|
168
|
-
- Any database queries
|
|
169
|
-
|
|
170
|
-
This prevents running commands from the wrong directory or forgetting key IDs.
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
## Critical: Where to Run Commands
|
|
175
|
-
|
|
176
|
-
**All `codeyam` commands MUST be run from the ORIGINAL PROJECT DIRECTORY**, not from the tmp folder.
|
|
177
|
-
|
|
178
|
-
| Location | What's There | Run Commands Here? |
|
|
179
|
-
| ---------------------------------------------------------------------- | -------------------------------------------------------------- | ------------------------------------------------- |
|
|
180
|
-
| **Original project** (e.g., `/Users/.../clients-codeyam/boltwise/app`) | Database (`.codeyam/db.sqlite3`), config, universal mocks | **YES - run all codeyam commands here** |
|
|
181
|
-
| **Tmp folder** (`/tmp/codeyam/local-dev/{slug}/project/`) | Copy of project with mock injections, generated scenario files | **NO - only edit files here, don't run commands** |
|
|
182
|
-
|
|
183
|
-
**Common mistake:** Running `codeyam recapture` from the tmp folder. This will fail with "Not in a CodeYam project" because the database doesn't exist there.
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
# WRONG - running from tmp folder
|
|
187
|
-
cd /tmp/codeyam/local-dev/boltwise-app/project
|
|
188
|
-
codeyam recapture abc123 # ❌ Fails: "Not in a CodeYam project"
|
|
189
|
-
|
|
190
|
-
# CORRECT - running from original project directory
|
|
191
|
-
cd /Users/jaredcosulich/workspace/codeyam/clients-codeyam/boltwise/app
|
|
192
|
-
codeyam recapture abc123 # ✅ Works
|
|
193
96
|
```
|
|
194
97
|
|
|
195
|
-
|
|
98
|
+
Re-read this file before running any `codeyam` command to avoid running commands from the wrong directory.
|
|
196
99
|
|
|
197
|
-
|
|
198
|
-
2. Test by curling the dev server running from the tmp folder
|
|
199
|
-
3. **Switch back to the original project directory** to run `codeyam recapture`
|
|
100
|
+
### Copy Original Logs
|
|
200
101
|
|
|
201
|
-
|
|
102
|
+
Copy logs before debugging overwrites them:
|
|
202
103
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
**NEVER modify the client's original source code in the workspace.** Only modify files in the tmp folder.
|
|
206
|
-
|
|
207
|
-
**You CAN modify:**
|
|
208
|
-
|
|
209
|
-
- Data in the local SQLite database (`.codeyam/db.sqlite3`) - in the **original project directory**
|
|
210
|
-
- Universal mocks in `.codeyam/universal-mocks` - in the **original project directory**
|
|
211
|
-
- **Files in `/tmp/codeyam/local-dev/{slug}/project/`** - These are temporary copies used for simulation
|
|
212
|
-
- Generated mock files in `__codeyamMocks__/` directories
|
|
213
|
-
- Layout/route files that wrap scenarios
|
|
214
|
-
- Any generated code that has errors
|
|
215
|
-
- Mock data files for testing
|
|
216
|
-
|
|
217
|
-
**IMPORTANT**: When you edit files in the tmp folder, you MUST use `codeyam recapture --capture-only` when recapturing, otherwise your changes will be overwritten! Be sure to address all issues so that the simulation runs correctly. Then, if one of the issues required editing code in the tmp directory you MUST use `codeyam recapture --capture-only`, but if only data was changed then as long as that data is updated in the local database as well you can run `codeyam recapture` and have the system overwrite the tmp project code and use the valid data from the database.
|
|
104
|
+
- **From:** `/tmp/codeyam/local-dev/{slug}/codeyam/logs.txt`
|
|
105
|
+
- **To:** `/tmp/codeyam/local-dev/{slug}/debug/original-logs.txt`
|
|
218
106
|
|
|
219
107
|
---
|
|
220
108
|
|
|
221
|
-
## Step
|
|
109
|
+
## Step 1: Check Database (MANDATORY FIRST STEP)
|
|
222
110
|
|
|
223
|
-
**DO NOT run `codeyam debug` yet!** First
|
|
111
|
+
**DO NOT run `codeyam debug` yet!** First check if other scenarios in the same analysis are also failing.
|
|
224
112
|
|
|
225
113
|
```bash
|
|
226
|
-
#
|
|
114
|
+
# Get analysis ID (if you have a scenario ID)
|
|
227
115
|
sqlite3 .codeyam/db.sqlite3 "SELECT analysis_id FROM scenarios WHERE id = 'SCENARIO_ID'"
|
|
228
116
|
|
|
229
|
-
#
|
|
117
|
+
# Check ALL scenarios for that analysis
|
|
230
118
|
sqlite3 .codeyam/db.sqlite3 "
|
|
231
|
-
SELECT
|
|
232
|
-
|
|
233
|
-
s.name,
|
|
234
|
-
json_extract(s.metadata, '$.screenshotPaths') as screenshots
|
|
235
|
-
FROM scenarios s
|
|
236
|
-
WHERE s.analysis_id = 'ANALYSIS_ID'
|
|
237
|
-
"
|
|
119
|
+
SELECT s.id, s.name, json_extract(s.metadata, '$.screenshotPaths') as screenshots
|
|
120
|
+
FROM scenarios s WHERE s.analysis_id = 'ANALYSIS_ID'"
|
|
238
121
|
|
|
239
122
|
# Check for errors in scenario status
|
|
240
123
|
sqlite3 .codeyam/db.sqlite3 "
|
|
241
|
-
SELECT json_extract(status, '$.scenarios') FROM analyses WHERE id = 'ANALYSIS_ID'
|
|
242
|
-
"
|
|
124
|
+
SELECT json_extract(status, '$.scenarios') FROM analyses WHERE id = 'ANALYSIS_ID'"
|
|
243
125
|
```
|
|
244
126
|
|
|
245
|
-
**If multiple scenarios
|
|
127
|
+
**If multiple scenarios failing, ASK THE USER** whether to fix just the requested one or all.
|
|
246
128
|
|
|
247
|
-
### Check for Client-Side Errors
|
|
129
|
+
### Check Existing Screenshots for Client-Side Errors
|
|
248
130
|
|
|
249
|
-
|
|
131
|
+
Even if screenshots exist, view them with the Read tool and check for:
|
|
250
132
|
|
|
251
|
-
- Red error boundaries or error
|
|
133
|
+
- Red error boundaries or React error overlays
|
|
252
134
|
- "Something went wrong" or similar error text
|
|
253
135
|
- Blank/white screens that should have content
|
|
254
|
-
- React error overlays
|
|
255
136
|
|
|
256
|
-
|
|
257
|
-
# View the screenshot to check for client-side errors
|
|
258
|
-
# Use the Read tool on the screenshot path from the database
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
If the screenshot shows a client-side error, proceed to Step 1 to debug it.
|
|
137
|
+
If the screenshot shows errors, proceed to Step 2.
|
|
262
138
|
|
|
263
139
|
---
|
|
264
140
|
|
|
265
|
-
## Step
|
|
141
|
+
## Step 2: Run Debug Command
|
|
266
142
|
|
|
267
143
|
```bash
|
|
268
144
|
codeyam debug ANALYSIS_ID
|
|
269
145
|
```
|
|
270
146
|
|
|
271
|
-
Output includes:
|
|
272
|
-
|
|
273
|
-
- **Project path**: `/tmp/codeyam/local-dev/{slug}/project`
|
|
274
|
-
- **Start command**: How to run the dev server
|
|
275
|
-
- **URL**: Where to access the scenario
|
|
276
|
-
- **Log path**: Where to watch for errors
|
|
147
|
+
Output includes: **project path**, **start command**, **URL**, **log path**. Update your session context file with these.
|
|
277
148
|
|
|
278
149
|
---
|
|
279
150
|
|
|
280
|
-
## Step
|
|
151
|
+
## Step 3: Identify Error Type
|
|
281
152
|
|
|
282
|
-
Read the log file or error output to categorize
|
|
153
|
+
Read the log file or error output to categorize:
|
|
283
154
|
|
|
284
|
-
| Error Type | Symptoms | Likely Category
|
|
285
|
-
| ---------------------------------- | ----------------------------------- |
|
|
286
|
-
| **Syntax error in generated file** | `Unexpected token`, `Parse error` | Category 4
|
|
287
|
-
| **Runtime error** | `TypeError`, `ReferenceError` | Category 1-3
|
|
288
|
-
| **Missing mock** | `Cannot read property of undefined` | Category 1-2
|
|
289
|
-
| **Wrong mock type** | `X is not a function` | Category 3-4
|
|
155
|
+
| Error Type | Symptoms | Likely Category |
|
|
156
|
+
| ---------------------------------- | ----------------------------------- | ----------------- |
|
|
157
|
+
| **Syntax error in generated file** | `Unexpected token`, `Parse error` | Category 4 |
|
|
158
|
+
| **Runtime error** | `TypeError`, `ReferenceError` | Category 1-3 or 4 |
|
|
159
|
+
| **Missing mock** | `Cannot read property of undefined` | Category 1-2 |
|
|
160
|
+
| **Wrong mock type** | `X is not a function` | Category 3-4 |
|
|
290
161
|
|
|
291
162
|
---
|
|
292
163
|
|
|
293
|
-
## Step
|
|
164
|
+
## Step 4: Diagnose Root Cause Category
|
|
294
165
|
|
|
295
|
-
|
|
166
|
+
Determine WHERE in the pipeline the bug originated.
|
|
296
167
|
|
|
297
168
|
### The 4 Error Categories
|
|
298
169
|
|
|
299
|
-
| Category | What's Wrong
|
|
300
|
-
| -------- |
|
|
301
|
-
| **1** | Missing attribute in `isolatedDataStructure`
|
|
302
|
-
| **2** | Attribute not merged into `mergedDataStructure`
|
|
303
|
-
| **3** | Data structure complete, but scenario data wrong
|
|
304
|
-
| **4** | Data complete, but
|
|
170
|
+
| Category | What's Wrong | Where to Check | Fix |
|
|
171
|
+
| -------- | ------------------------------------------------ | -------------------- | ------------------- |
|
|
172
|
+
| **1** | Missing attribute in `isolatedDataStructure` | `entities.metadata` | Re-analyze |
|
|
173
|
+
| **2** | Attribute not merged into `mergedDataStructure` | `analyses.metadata` | Re-analyze |
|
|
174
|
+
| **3** | Data structure complete, but scenario data wrong | `scenarios.metadata` | Edit mockData in DB |
|
|
175
|
+
| **4** | Data complete, but generated code wrong | Files in `/tmp` | Edit files directly |
|
|
305
176
|
|
|
306
177
|
### Diagnostic Queries
|
|
307
178
|
|
|
308
179
|
```bash
|
|
309
180
|
# Category 1: Check isolatedDataStructure
|
|
310
|
-
# Is the attribute traced at all in the entity?
|
|
311
181
|
sqlite3 .codeyam/db.sqlite3 \
|
|
312
182
|
"SELECT json_extract(metadata, '$.isolatedDataStructure') FROM entities WHERE sha = 'ENTITY_SHA'" \
|
|
313
183
|
| python3 -m json.tool
|
|
314
184
|
|
|
315
185
|
# Category 2: Check mergedDataStructure
|
|
316
|
-
# Was the attribute properly merged from dependencies?
|
|
317
186
|
sqlite3 .codeyam/db.sqlite3 \
|
|
318
187
|
"SELECT json_extract(metadata, '$.mergedDataStructure') FROM analyses WHERE id = 'ANALYSIS_ID'" \
|
|
319
188
|
| python3 -m json.tool
|
|
320
189
|
|
|
321
|
-
# Category 2 (also
|
|
190
|
+
# Category 2 (also): scenariosDataStructure
|
|
322
191
|
sqlite3 .codeyam/db.sqlite3 \
|
|
323
192
|
"SELECT json_extract(metadata, '$.scenariosDataStructure') FROM analyses WHERE id = 'ANALYSIS_ID'" \
|
|
324
193
|
| python3 -m json.tool
|
|
325
194
|
|
|
326
195
|
# Category 3: Check scenario mockData
|
|
327
|
-
# Did the LLM generate correct mock data?
|
|
328
196
|
sqlite3 .codeyam/db.sqlite3 \
|
|
329
197
|
"SELECT json_extract(metadata, '$.data.mockData') FROM scenarios WHERE id = 'SCENARIO_ID'" \
|
|
330
198
|
| python3 -m json.tool
|
|
@@ -332,49 +200,41 @@ sqlite3 .codeyam/db.sqlite3 \
|
|
|
332
200
|
|
|
333
201
|
### Diagnosis Flow
|
|
334
202
|
|
|
335
|
-
|
|
336
|
-
2. **Check `isolatedDataStructure`** - Is the attribute traced in the entity? If missing → Category 1
|
|
337
|
-
3. **Check `mergedDataStructure`** - Is the attribute present after merging? If missing → Category 2
|
|
338
|
-
4. **Check `scenariosDataStructure`** - Is the data structure for mocks correct? If wrong → Category 2
|
|
339
|
-
5. **Check scenario `mockData`** - Does the scenario have correct mock values? If wrong → Category 3
|
|
340
|
-
6. **Check generated mock code** - Is the mock code syntactically/semantically correct? If wrong → **Category 4 (engine bug)**
|
|
341
|
-
7. **Check generated imports** - Are the imports correct? Are entities containing environment variables mocked out? If wrong → **Category 4 (engine bug)**
|
|
342
|
-
|
|
343
|
-
### Category 4 Indicators (Code Generation Issue)
|
|
203
|
+
Work through these checks in order — stop at the first failure:
|
|
344
204
|
|
|
345
|
-
|
|
205
|
+
| Step | Check | If wrong → |
|
|
206
|
+
| ---- | ------------------------------------------------------------------------------- | ---------- |
|
|
207
|
+
| 1 | **Start with the error** — what attribute/value is missing or wrong at runtime? | — |
|
|
208
|
+
| 2 | Is the attribute in `isolatedDataStructure`? | Category 1 |
|
|
209
|
+
| 3 | Is the attribute in `mergedDataStructure`? | Category 2 |
|
|
210
|
+
| 4 | Is `scenariosDataStructure` correct? | Category 2 |
|
|
211
|
+
| 5 | Does scenario `mockData` have correct values? | Category 3 |
|
|
212
|
+
| 6 | Is the generated mock code syntactically/semantically correct? | Category 4 |
|
|
213
|
+
| 7 | Are imports correct? Environment variable entities mocked out? | Category 4 |
|
|
346
214
|
|
|
347
|
-
|
|
348
|
-
- The scenario's mockData has the right keys and values
|
|
349
|
-
- BUT the generated mock code has syntax errors, wrong structure, or doesn't match the data
|
|
350
|
-
- Database edits don't fix the generated code (it regenerates wrong)
|
|
215
|
+
If all database data looks correct but the generated code has syntax errors, wrong structure, or doesn't match the data → **Category 4**.
|
|
351
216
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
1. **Edit the files directly** in `/tmp/codeyam/local-dev/{slug}/project/`
|
|
355
|
-
2. **Fix any syntax errors, wrong imports, missing mocks** - these are just TypeScript files
|
|
356
|
-
3. **Restart the dev server** and verify the fix works
|
|
357
|
-
4. **Capture quality screenshots** with `codeyam recapture --capture-only`
|
|
358
|
-
5. **Document what you fixed** for the CodeYam team to improve the engine
|
|
217
|
+
---
|
|
359
218
|
|
|
360
|
-
|
|
219
|
+
## Step 5: Fix the Issue
|
|
361
220
|
|
|
362
|
-
|
|
221
|
+
Jump to the subsection matching your category:
|
|
363
222
|
|
|
364
|
-
|
|
223
|
+
- **Categories 1-2** → Re-analyze
|
|
224
|
+
- **Category 3** → Edit mockData in database
|
|
225
|
+
- **Category 4** → Edit generated files in tmp folder
|
|
365
226
|
|
|
366
|
-
###
|
|
227
|
+
### Categories 1-2 (Data Structure Issues)
|
|
367
228
|
|
|
368
|
-
|
|
229
|
+
Re-run analysis:
|
|
369
230
|
|
|
370
231
|
```bash
|
|
371
|
-
# Delete the analysis and re-analyze
|
|
372
232
|
codeyam analyze --entity EntityName path/to/file.tsx
|
|
373
233
|
```
|
|
374
234
|
|
|
375
|
-
###
|
|
235
|
+
### Category 3 (Scenario Data Issues)
|
|
376
236
|
|
|
377
|
-
Fix
|
|
237
|
+
Fix mockData directly in the database:
|
|
378
238
|
|
|
379
239
|
```bash
|
|
380
240
|
# Export metadata
|
|
@@ -393,14 +253,11 @@ with open('/tmp/metadata_fixed.json', 'w') as f:
|
|
|
393
253
|
f.write(json.dumps(data))
|
|
394
254
|
EOF
|
|
395
255
|
|
|
396
|
-
# Update database
|
|
256
|
+
# Update database
|
|
397
257
|
python3 << 'EOF'
|
|
398
|
-
import sqlite3
|
|
399
|
-
import json
|
|
400
|
-
|
|
258
|
+
import sqlite3, json
|
|
401
259
|
with open('/tmp/metadata_fixed.json') as f:
|
|
402
260
|
metadata = f.read()
|
|
403
|
-
|
|
404
261
|
conn = sqlite3.connect('.codeyam/db.sqlite3')
|
|
405
262
|
conn.execute("UPDATE scenarios SET metadata = ? WHERE id = 'SCENARIO_ID'", (metadata,))
|
|
406
263
|
conn.commit()
|
|
@@ -408,242 +265,141 @@ conn.close()
|
|
|
408
265
|
EOF
|
|
409
266
|
```
|
|
410
267
|
|
|
411
|
-
###
|
|
412
|
-
|
|
413
|
-
**MUST be fixed locally by editing files in the tmp folder.** This is a REQUIRED step, not optional.
|
|
414
|
-
|
|
415
|
-
1. Go to Step 5a and fix all code issues in the tmp folder
|
|
416
|
-
2. Verify the scenario loads correctly (curl returns 200)
|
|
417
|
-
3. Run `codeyam recapture --capture-only` to capture screenshots (this preserves your fixes)
|
|
418
|
-
4. Verify the screenshots look correct
|
|
419
|
-
5. THEN document the engine bug in your final report
|
|
420
|
-
|
|
421
|
-
**DO NOT stop after identifying a Category 4 issue.** The goal is to capture quality screenshots, then document what you fixed.
|
|
422
|
-
|
|
423
|
-
### Universal Mocks (for infrastructure dependencies)
|
|
424
|
-
|
|
425
|
-
You can use universal mocks to mock out functions that are not detected by the analysis (are not part of the dependency tree). This often includes things like middleware or functions that run on startup and require environment variables.
|
|
426
|
-
|
|
427
|
-
## Quick Reference: Mock Path Decision Tree
|
|
428
|
-
|
|
429
|
-
```
|
|
430
|
-
Where is the error coming from?
|
|
431
|
-
│
|
|
432
|
-
├── node_modules package (e.g., @prisma/client, @supabase/supabase-js)
|
|
433
|
-
│ └── Mock path: .codeyam/universal-mocks/node_modules/{package}.ts
|
|
434
|
-
│ Example: .codeyam/universal-mocks/node_modules/@prisma/client.ts
|
|
435
|
-
│
|
|
436
|
-
└── Project file (e.g., lib/db.ts, packages/prisma/index.ts)
|
|
437
|
-
└── Mock path: .codeyam/universal-mocks/{same-path-as-original}
|
|
438
|
-
Example: .codeyam/universal-mocks/lib/db.ts
|
|
439
|
-
Example: .codeyam/universal-mocks/packages/prisma/index.ts
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
## Quick Reference: Mock Writing Rules
|
|
443
|
-
|
|
444
|
-
**BEFORE writing any mock:**
|
|
445
|
-
|
|
446
|
-
1. Read the original file first
|
|
447
|
-
2. Note all its export names exactly
|
|
448
|
-
|
|
449
|
-
**WHEN writing the mock:**
|
|
450
|
-
|
|
451
|
-
1. Export names MUST match exactly (case-sensitive)
|
|
452
|
-
2. ALL code MUST be inside exports (no helper variables outside)
|
|
453
|
-
3. Keep it minimal - empty methods are fine
|
|
454
|
-
|
|
455
|
-
**AFTER writing the mock:**
|
|
456
|
-
|
|
457
|
-
```bash
|
|
458
|
-
codeyam validate-mock .codeyam/universal-mocks/{path-to-your-mock}
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
---
|
|
462
|
-
|
|
463
|
-
## Step 5: Verify Database Fixes Locally
|
|
464
|
-
|
|
465
|
-
After making **database changes** (Categories 1-3):
|
|
466
|
-
|
|
467
|
-
1. **Re-run `codeyam debug ID`** to regenerate scenario files with updated data
|
|
468
|
-
2. **Start the dev server** and curl the URL to check for errors:
|
|
469
|
-
```bash
|
|
470
|
-
curl -s http://localhost:3112/static/... | head -50
|
|
471
|
-
```
|
|
472
|
-
3. **Check for 200 response** (no `statusCode:500`)
|
|
473
|
-
|
|
474
|
-
**If verification fails and you've already tried database fixes:** Proceed to Step 5a to fix code directly.
|
|
475
|
-
|
|
476
|
-
---
|
|
477
|
-
|
|
478
|
-
## Step 5a: Fix Code Issues in Tmp Folder (Category 4)
|
|
479
|
-
|
|
480
|
-
If the error is in bad imports, generated code or mock files, you can fix them directly in the tmp folder:
|
|
481
|
-
|
|
482
|
-
### Locate the Problematic File
|
|
268
|
+
### Category 4 (Code Generation Issues) — Edit Files Directly
|
|
483
269
|
|
|
484
|
-
|
|
270
|
+
Fix generated files in `/tmp/codeyam/local-dev/{slug}/project/`. Common locations:
|
|
485
271
|
|
|
486
272
|
- **Generated mocks**: `__codeyamMocks__/MockData_*.tsx` or `__codeyamMocks__/MockCode_*.tsx`
|
|
487
273
|
- **Scenario layouts**: `app/static/{projectSlug}/{analysisId}/{entitySlug}/{scenarioSlug}/`
|
|
488
274
|
- **Route files**: `app/routes/` or `pages/` depending on framework
|
|
489
275
|
|
|
490
|
-
|
|
276
|
+
Common fixes:
|
|
491
277
|
|
|
492
|
-
|
|
278
|
+
- Syntax errors (missing brackets, commas, quotes)
|
|
279
|
+
- Wrong import paths
|
|
280
|
+
- Missing named or default exports
|
|
281
|
+
- TypeScript type issues
|
|
282
|
+
- Wrong mock data shape
|
|
493
283
|
|
|
494
|
-
|
|
495
|
-
- **Wrong import paths**: Correct import statements
|
|
496
|
-
- **Missing exports**: Add missing named or default exports
|
|
497
|
-
- **Type errors**: Fix TypeScript type issues
|
|
498
|
-
- **Wrong mock structure**: Adjust the shape of generated mock data
|
|
284
|
+
**Only fix GENERATED files** (mocks, layouts, routes) — never the client's application code. If a client component crashes, the fix is in the mock data or mock code.
|
|
499
285
|
|
|
500
|
-
###
|
|
501
|
-
|
|
502
|
-
For every file you edit, record:
|
|
503
|
-
|
|
504
|
-
- The full file path
|
|
505
|
-
- What you changed (brief description)
|
|
506
|
-
- The before/after code (for the final report)
|
|
507
|
-
|
|
508
|
-
### Verify Without Regenerating
|
|
286
|
+
### Universal Mocks (for infrastructure dependencies)
|
|
509
287
|
|
|
510
|
-
|
|
288
|
+
Use universal mocks to mock functions not in the dependency tree (middleware, startup functions needing env vars).
|
|
511
289
|
|
|
512
|
-
|
|
290
|
+
**Mock path decision tree:**
|
|
513
291
|
|
|
514
|
-
```bash
|
|
515
|
-
cd /tmp/codeyam/local-dev/{slug}/project
|
|
516
|
-
npm run dev # or pnpm dev / yarn dev
|
|
517
292
|
```
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
293
|
+
Error source?
|
|
294
|
+
├── node_modules package → .codeyam/universal-mocks/node_modules/{package}.ts
|
|
295
|
+
│ Example: .codeyam/universal-mocks/node_modules/@prisma/client.ts
|
|
296
|
+
└── Project file → .codeyam/universal-mocks/{same-path-as-original}
|
|
297
|
+
Example: .codeyam/universal-mocks/lib/db.ts
|
|
523
298
|
```
|
|
524
299
|
|
|
525
|
-
|
|
300
|
+
**Mock writing rules:**
|
|
526
301
|
|
|
527
|
-
|
|
302
|
+
1. Read the original file first, note all export names exactly
|
|
303
|
+
2. Export names MUST match exactly (case-sensitive)
|
|
304
|
+
3. ALL code MUST be inside exports (no helper variables outside)
|
|
305
|
+
4. Keep it minimal — empty methods are fine
|
|
306
|
+
5. Validate: `codeyam validate-mock .codeyam/universal-mocks/{path}`
|
|
528
307
|
|
|
529
|
-
|
|
308
|
+
### Track All Changes (MANDATORY)
|
|
530
309
|
|
|
531
|
-
|
|
310
|
+
For every change, record for the final report:
|
|
532
311
|
|
|
533
|
-
|
|
312
|
+
**Database changes:**
|
|
534
313
|
|
|
535
314
|
| Table | Record ID | Field Path | Before | After |
|
|
536
315
|
| ----------- | --------- | ---------------------------- | --------- | ----------- |
|
|
537
316
|
| `scenarios` | `abc123` | `metadata.data.mockData.key` | `"wrong"` | `"correct"` |
|
|
538
317
|
|
|
539
|
-
|
|
318
|
+
**File changes:**
|
|
540
319
|
|
|
541
|
-
|
|
320
|
+
| File Path | Change Description |
|
|
321
|
+
| ---------------------------------------------------- | ------------------- |
|
|
322
|
+
| `/tmp/.../project/__codeyamMocks__/MockData_xyz.tsx` | Fixed missing comma |
|
|
542
323
|
|
|
543
|
-
|
|
544
|
-
| ---------------------------------------------------- | ------------------------------------- |
|
|
545
|
-
| `/tmp/.../project/__codeyamMocks__/MockData_xyz.tsx` | Fixed missing comma in object literal |
|
|
324
|
+
Include actual diffs for file changes.
|
|
546
325
|
|
|
547
|
-
|
|
326
|
+
---
|
|
548
327
|
|
|
549
|
-
|
|
550
|
-
--- before
|
|
551
|
-
+++ after
|
|
552
|
-
@@ -10,3 +10,3 @@
|
|
553
|
-
- key: "value"
|
|
554
|
-
+ key: "value",
|
|
555
|
-
anotherKey: "value2"
|
|
556
|
-
```
|
|
328
|
+
## Step 6: Verify Fix
|
|
557
329
|
|
|
558
|
-
|
|
330
|
+
### After Database Changes (Categories 1-3)
|
|
331
|
+
|
|
332
|
+
1. Re-run `codeyam debug ANALYSIS_ID` to regenerate files with updated data
|
|
333
|
+
2. Curl the URL to check for errors:
|
|
334
|
+
```bash
|
|
335
|
+
curl -s http://localhost:PORT/static/codeyam-sample | head -50
|
|
336
|
+
```
|
|
337
|
+
3. Check for 200 response (no `statusCode:500`)
|
|
338
|
+
|
|
339
|
+
If verification fails after database fixes, proceed to fix files directly (Category 4 approach).
|
|
340
|
+
|
|
341
|
+
### After File Changes (Category 4)
|
|
342
|
+
|
|
343
|
+
**Do NOT run `codeyam debug` again** — it overwrites your changes.
|
|
344
|
+
|
|
345
|
+
1. Start the dev server manually from the tmp folder
|
|
346
|
+
2. Curl the URL to check for errors
|
|
347
|
+
3. For visual/rendering issues, ask the user to verify: _"Can you visit http://localhost:PORT/static/codeyam-sample and confirm the component renders correctly?"_
|
|
559
348
|
|
|
560
|
-
|
|
349
|
+
---
|
|
561
350
|
|
|
562
|
-
|
|
351
|
+
## Step 7: Recapture & Verify Screenshots
|
|
563
352
|
|
|
564
|
-
### Choose
|
|
353
|
+
### Choose Recapture Mode
|
|
565
354
|
|
|
566
|
-
**
|
|
355
|
+
**Database-only changes:**
|
|
567
356
|
|
|
568
357
|
```bash
|
|
569
358
|
codeyam recapture SCENARIO_ID
|
|
570
359
|
```
|
|
571
360
|
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
**If you made FILE changes in the tmp folder (Category 4):**
|
|
361
|
+
**File changes (or mixed):**
|
|
575
362
|
|
|
576
363
|
```bash
|
|
577
364
|
codeyam recapture SCENARIO_ID --capture-only
|
|
578
365
|
```
|
|
579
366
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
### Verify Files After Capture
|
|
367
|
+
### Verify Files Exist
|
|
583
368
|
|
|
584
369
|
```bash
|
|
585
|
-
# Check database for screenshot paths
|
|
586
370
|
sqlite3 .codeyam/db.sqlite3 "SELECT name, json_extract(metadata, '$.screenshotPaths') FROM scenarios WHERE analysis_id = 'ANALYSIS_ID'"
|
|
587
|
-
|
|
588
|
-
# Verify files actually exist
|
|
589
371
|
find .codeyam/captures -name "*.png" -path "*ANALYSIS_ID*" -mmin -5
|
|
590
372
|
```
|
|
591
373
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
## Step 7: Verify Screenshots for Client-Side Errors
|
|
595
|
-
|
|
596
|
-
**IMPORTANT**: Even if capture completes successfully, the screenshots may show client-side errors!
|
|
597
|
-
|
|
598
|
-
### View the Screenshots
|
|
374
|
+
### Visually Inspect Screenshots
|
|
599
375
|
|
|
600
|
-
Use the Read tool to view each
|
|
376
|
+
Use the Read tool to view each screenshot. Check for:
|
|
601
377
|
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
Then read the screenshot file to visually inspect it.
|
|
608
|
-
|
|
609
|
-
### Check for These Issues
|
|
610
|
-
|
|
611
|
-
- **Red error boundaries** or React error overlays
|
|
612
|
-
- **"Something went wrong"** or similar error text
|
|
613
|
-
- **Blank/white screens** that should have content
|
|
614
|
-
- **Missing components** or broken layouts
|
|
615
|
-
- **Console errors** shown in error overlays
|
|
616
|
-
|
|
617
|
-
If the screenshot shows a dedicated 500 page with no clear error then you may want to find and comment out any error boundary logic that is catching errors and preventing you from easily reading them.
|
|
378
|
+
- Red error boundaries or React error overlays
|
|
379
|
+
- "Something went wrong" or similar error text
|
|
380
|
+
- Blank/white screens that should have content
|
|
381
|
+
- Missing components or broken layouts
|
|
618
382
|
|
|
619
|
-
|
|
383
|
+
If the screenshot shows a dedicated 500 page with no clear error, consider commenting out error boundary logic to expose the real error.
|
|
620
384
|
|
|
621
|
-
|
|
622
|
-
2. Check the log file for additional error details:
|
|
623
|
-
```bash
|
|
624
|
-
tail -100 /tmp/codeyam/local-dev/{slug}/codeyam/log.txt
|
|
625
|
-
```
|
|
626
|
-
3. Fix the remaining issues
|
|
627
|
-
4. Run recapture again (with `--capture-only` if you edited files)
|
|
385
|
+
**If screenshots show errors:** Go back to Step 5, check the log file (`tail -100 /tmp/codeyam/local-dev/{slug}/codeyam/log.txt`), fix remaining issues, and recapture again.
|
|
628
386
|
|
|
629
387
|
---
|
|
630
388
|
|
|
631
|
-
##
|
|
389
|
+
## Reference
|
|
632
390
|
|
|
633
|
-
|
|
391
|
+
### Debug Report Template
|
|
634
392
|
|
|
635
|
-
|
|
393
|
+
**Always produce this report** after debugging. Save to `.codeyam/debug-report.md`.
|
|
636
394
|
|
|
395
|
+
```markdown
|
|
637
396
|
## Debug Session Report
|
|
638
397
|
|
|
639
398
|
### Issue Summary
|
|
640
399
|
|
|
641
|
-
**Error:** `[Exact error message
|
|
642
|
-
|
|
400
|
+
**Error:** `[Exact error message]`
|
|
643
401
|
**Entity:** `[Entity name]` in `[file/path.tsx]`
|
|
644
|
-
|
|
645
402
|
**Root Cause Category:** [1, 2, 3, or 4]
|
|
646
|
-
|
|
647
403
|
**Outcome:** [Fixed via database changes / Fixed via file edits (engine bug) / Unfixable]
|
|
648
404
|
|
|
649
405
|
### Affected Scenarios
|
|
@@ -655,115 +411,58 @@ If the screenshot shows a dedicated 500 page with no clear error then you may wa
|
|
|
655
411
|
### Root Cause Category Determination
|
|
656
412
|
|
|
657
413
|
**Category identified:** [1 / 2 / 3 / 4]
|
|
658
|
-
|
|
659
414
|
**Evidence:**
|
|
660
415
|
|
|
661
|
-
- [ ] **Category 1** (isolatedDataStructure): [What was missing/wrong
|
|
662
|
-
- [ ] **Category 2** (mergedDataStructure): [What was missing/wrong
|
|
663
|
-
- [ ] **Category 3** (scenario mockData): [What was wrong in
|
|
664
|
-
- [ ] **Category 4** (mock code writing): [What was wrong in
|
|
416
|
+
- [ ] **Category 1** (isolatedDataStructure): [What was missing/wrong?]
|
|
417
|
+
- [ ] **Category 2** (mergedDataStructure): [What was missing/wrong?]
|
|
418
|
+
- [ ] **Category 3** (scenario mockData): [What was wrong in LLM-generated data?]
|
|
419
|
+
- [ ] **Category 4** (mock code writing): [What was wrong in generated code?]
|
|
665
420
|
|
|
666
|
-
**How determined:**
|
|
667
|
-
[Explain what you checked and what you found. Include relevant JSON snippets.]
|
|
421
|
+
**How determined:** [Explain what you checked. Include relevant JSON snippets.]
|
|
668
422
|
|
|
669
423
|
### Database Changes Made (if any)
|
|
670
424
|
|
|
671
|
-
| Table | Record ID | Field Path | Before
|
|
672
|
-
| --------- | --------- | ---------- |
|
|
673
|
-
| `[table]` | `[id]` | `[path]` | `[old
|
|
425
|
+
| Table | Record ID | Field Path | Before | After |
|
|
426
|
+
| --------- | --------- | ---------- | ------- | ------- |
|
|
427
|
+
| `[table]` | `[id]` | `[path]` | `[old]` | `[new]` |
|
|
674
428
|
|
|
675
429
|
**SQL/Python commands used:**
|
|
676
|
-
|
|
677
|
-
```sql
|
|
678
|
-
[Include the exact commands]
|
|
679
|
-
```
|
|
430
|
+
[Include exact commands]
|
|
680
431
|
|
|
681
432
|
### File Changes Made (if any)
|
|
682
433
|
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
|
686
|
-
| -------------------------------------------------------- | -------------------------- |
|
|
687
|
-
| `/tmp/codeyam/local-dev/{slug}/project/path/to/file.tsx` | [Brief description of fix] |
|
|
434
|
+
| File Path | Change Description |
|
|
435
|
+
| -------------------------------------------------------- | ------------------- |
|
|
436
|
+
| `/tmp/codeyam/local-dev/{slug}/project/path/to/file.tsx` | [Brief description] |
|
|
688
437
|
|
|
689
438
|
**Diffs:**
|
|
690
|
-
|
|
691
|
-
```diff
|
|
692
|
-
--- before
|
|
693
|
-
+++ after
|
|
694
|
-
@@ -line,count +line,count @@
|
|
695
|
-
-[old code]
|
|
696
|
-
+[new code]
|
|
697
|
-
```
|
|
439
|
+
[Include actual diffs]
|
|
698
440
|
|
|
699
441
|
**Recapture command used:**
|
|
442
|
+
`codeyam recapture SCENARIO_ID [--capture-only]`
|
|
700
443
|
|
|
701
|
-
|
|
702
|
-
codeyam recapture SCENARIO_ID --capture-only
|
|
703
|
-
```
|
|
704
|
-
|
|
705
|
-
### For Category 4 (Code Generation Bug) - Required Details
|
|
706
|
-
|
|
707
|
-
If this is an engine bug, include:
|
|
708
|
-
|
|
709
|
-
**What the data looks like (correct):**
|
|
710
|
-
|
|
711
|
-
```json
|
|
712
|
-
[Show the relevant data structure from the database that looks correct]
|
|
713
|
-
```
|
|
714
|
-
|
|
715
|
-
**What the generated code looks like (wrong):**
|
|
444
|
+
### For Category 4 — Required Details
|
|
716
445
|
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
**What the generated code should look like:**
|
|
722
|
-
|
|
723
|
-
```javascript
|
|
724
|
-
[Show what correct code would look like]
|
|
725
|
-
```
|
|
726
|
-
|
|
727
|
-
**Pattern/Edge case:**
|
|
728
|
-
[Describe the pattern that causes this bug, e.g., "Function call signatures like '()' in array item schemas get converted to empty computed property keys"]
|
|
446
|
+
**What the data looks like (correct):** [database data structure]
|
|
447
|
+
**What the generated code looks like (wrong):** [problematic code]
|
|
448
|
+
**What the generated code should look like:** [correct code]
|
|
449
|
+
**Pattern/Edge case:** [Describe the pattern that causes this bug]
|
|
729
450
|
|
|
730
451
|
### Verification
|
|
731
452
|
|
|
732
|
-
**All of these must be checked before the debug session is complete:**
|
|
733
|
-
|
|
734
453
|
- [ ] Scenario loads without errors (curl returns 200)
|
|
735
|
-
- [ ] Screenshots recaptured successfully
|
|
454
|
+
- [ ] Screenshots recaptured successfully
|
|
736
455
|
- [ ] Used `--capture-only` flag (if file changes were made)
|
|
737
456
|
- [ ] Screenshot files verified to exist on disk
|
|
738
|
-
- [ ] Screenshots visually inspected
|
|
739
|
-
- [ ] All changes documented
|
|
740
|
-
|
|
741
|
-
---
|
|
742
|
-
|
|
743
|
-
## Saving and Uploading the Report (MANDATORY)
|
|
744
|
-
|
|
745
|
-
After completing the debug session, **you MUST save the report**:
|
|
746
|
-
|
|
747
|
-
1. **Write the report to file:**
|
|
748
|
-
|
|
749
|
-
```bash
|
|
750
|
-
# Write the full "Debug Session Report" section above to this file
|
|
751
|
-
# Use the Write tool to save to:
|
|
752
|
-
.codeyam/debug-report.md
|
|
753
|
-
```
|
|
754
|
-
|
|
755
|
-
2. **Ask user if they want to upload:**
|
|
756
|
-
After saving, ask the user: "Would you like me to upload this debug report to CodeYam for the team to review?"
|
|
757
|
-
|
|
758
|
-
- If the user response affirmatively then run `codeyam report --upload` to upload the report.
|
|
759
|
-
|
|
760
|
-
The report will be:
|
|
457
|
+
- [ ] Screenshots visually inspected — no client-side errors visible
|
|
458
|
+
- [ ] All changes documented for CodeYam team
|
|
459
|
+
```
|
|
761
460
|
|
|
762
|
-
|
|
763
|
-
- Stored in the database metadata for searchability
|
|
764
|
-
- Available to CodeYam engineers when they download the report
|
|
461
|
+
### Saving & Uploading Report
|
|
765
462
|
|
|
766
|
-
|
|
463
|
+
1. Save report to `.codeyam/debug-report.md`
|
|
464
|
+
2. Ask user: "Would you like me to upload this debug report to CodeYam for the team to review?"
|
|
465
|
+
3. If yes: `codeyam report --upload`
|
|
767
466
|
|
|
768
467
|
### Helper Queries
|
|
769
468
|
|