groundswell 0.0.1 → 0.0.2
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/.claude/commands/subtask-planning/prp-base-create.md +120 -0
- package/.claude/commands/subtask-planning/prp-base-execute.md +65 -0
- package/.claude/commands/task-breakdown.md +94 -0
- package/.claude/system_prompts/task-breakdown.md +1 -0
- package/CHANGELOG.md +188 -0
- package/PRD.md +543 -0
- package/README.md +99 -5
- package/examples/README.md +15 -1
- package/examples/examples/11-reparenting-workflows.ts +269 -0
- package/examples/index.ts +4 -0
- package/package-lock.json +2398 -0
- package/package.json +3 -1
- package/plan/001_d3bb02af4886/TEST_RESULTS.md +259 -0
- package/plan/001_d3bb02af4886/bug_fix_tasks.json +484 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M1T1S1/PRP.md +488 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M1T1S2/PRP.md +581 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M1T1S3/PRP.md +687 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M2T1S1/PRP.md +492 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M2T1S3/PRP.md +932 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M2T1S3/research/concurrent_error_testing_patterns.md +1109 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M2T1S3/research/vitest_concurrent_testing.md +802 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M2T1S3/research/workflow_engine_test_references.md +603 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M2T2S1/PRP.md +564 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M2T2S3/PRP.md +518 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M2T2S4/PRP.md +1252 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M2T3S1/PRP.md +364 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M2T3S1/research/CODEBASE_INVENTORY.md +114 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M2T3S1/research/DECORATOR_DOCUMENTATION_PATTERNS.md +205 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M2T3S1/research/PRD_LOCATION_ANALYSIS.md +199 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M2T3S1/research/ULTRATHINK_PRP_PLAN.md +134 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M3T1S1/PRP.md +495 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M3T1S1/research/console_error_inventory.md +435 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M3T1S2/PRP.md +506 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M3T1S3/PRP.md +612 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M3T2S2/PRP.md +558 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M3T2S2/research/external_research.md +788 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M3T3S2/PRP.md +460 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M3T3S3/PRP.md +454 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M3T4S1/PRP.md +520 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M3T4S1/RECOMMENDATION.md +417 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M3T4S1/research/external_workflow_engines_research.md +760 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M3T4S1/research/security_implications_analysis.md +245 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M3T4S2/PRP.md +792 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M4T1S1/PRP.md +535 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M4T1S1/TEST_EXECUTION_REPORT.md +190 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M4T1S2/PRP.md +654 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M4T1S2/TEST_FIX_REPORT.md +227 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M4T1S2/research/KEY_FINDINGS.md +345 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M4T1S2/research/QUICK_REFERENCE.md +193 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M4T1S2/research/test_maintenance_research.md +1323 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M4T3S1/BREAKING_CHANGES_AUDIT.md +1011 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M4T3S1/PRP.md +927 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/P1M4T3S2/PRP.md +505 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/architecture/logger_child_signature_analysis.md +401 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M1T1S3/child_implementation_research.md +142 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M1T1S3/test_patterns_research.md +112 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M1T1S3/vitest_patterns_research.md +159 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M1T1S4/PRP.md +549 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M1T1S4/VERIFICATION_REPORT.md +368 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M1T1S4/edge_case_analysis.md +172 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M1T1S4/usage_inventory.md +175 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T1S2/PRP.md +696 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T1S4/PRP.md +860 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T2S2/PRP.md +1066 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T2S2/research/01-testing-aggregated-errors.md +1103 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T2S2/research/01_typescript_error_aggregation_patterns.md +789 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T2S2/research/02-error-merge-strategy-testing-guide.md +1098 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T2S2/research/02_aggregate_error_patterns.md +1037 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T2S2/research/03-promise-allsettled-testing-patterns.md +916 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T2S2/research/03_error_merging_strategies.md +1045 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T2S2/research/04_github_stackoverflow_examples.md +890 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T2S2/research/05_comprehensive_summary.md +822 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T2S2/research/INDEX.md +668 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T2S2/research/QUICK_REFERENCE.md +706 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T2S2/research/README.md +265 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T2S2/research/RESEARCH_REPORT.md +655 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T2S4/research/vitest_testing_patterns.md +1103 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M2T3S2/PRP.md +426 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T1S2/PRP.md +506 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T1S2/research/QUICK_REFERENCE.md +114 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T1S2/research/RESEARCH_SUMMARY.md +316 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T1S2/research/vitest_observer_error_logging_best_practices.md +754 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T1S3/PRP.md +612 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T2S1/PRP.md +719 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T2S1/README.md +215 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T2S1/analysis.md +765 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T2S3/PRP.md +718 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T3S1/DECISION.md +149 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T3S1/PRP.md +470 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T3S1/research/ULTRATHINK_PLAN.md +332 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T3S1/research/codebase_workflow_name_analysis.md +167 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T3S1/research/external_best_practices.md +265 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T3S1/research/validation_patterns.md +273 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T4S1/workflow_engine_ancestry_api_research.md +760 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M3T4S3-PRP.md +434 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M4T2S1/PRP.md +717 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M4T2S2/PRP.md +472 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M4T2S2/VALIDATION_REPORT.md +125 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/P1M4T2S2/research/ULTRATHINK_PRP_PLAN.md +301 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/error-logging-best-practices.md +1170 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/research_typescript_partial_and_overloads.md +940 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/vitest-quick-reference.md +151 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/docs/vitest-research.md +650 -0
- package/plan/001_d3bb02af4886/bugfix/001_e8e04329daf3/prd_snapshot.md +259 -0
- package/plan/001_d3bb02af4886/bugfix/P1M1T1S1/PRP.md +457 -0
- package/plan/001_d3bb02af4886/bugfix/RESEARCH_SUMMARY.md +346 -0
- package/plan/001_d3bb02af4886/bugfix/architecture/codebase_structure.md +311 -0
- package/plan/001_d3bb02af4886/bugfix/architecture/concurrent_execution_best_practices.md +1565 -0
- package/plan/001_d3bb02af4886/bugfix/architecture/error_handling_patterns.md +288 -0
- package/plan/001_d3bb02af4886/bugfix/architecture/promise_all_analysis.md +741 -0
- package/plan/001_d3bb02af4886/docs/PRP/P1M1T1S4-functional-workflow-error-state-capture-test.md +652 -0
- package/plan/001_d3bb02af4886/docs/PRP/PRP.md +527 -0
- package/plan/001_d3bb02af4886/docs/PRP/bugfix/P1M1T2S1-PRP.md +415 -0
- package/plan/001_d3bb02af4886/docs/PRP/bugfix/P1M1T2S2-PRP.md +378 -0
- package/plan/001_d3bb02af4886/docs/PRP/bugfix/P1M1T2S4-PRP.md +713 -0
- package/plan/001_d3bb02af4886/docs/PRP/bugfix/P1M2T1S4-PRP.md +370 -0
- package/plan/001_d3bb02af4886/docs/PRP_P1M3T1S3.md +499 -0
- package/plan/001_d3bb02af4886/docs/TEST_RESULTS.md +230 -0
- package/plan/001_d3bb02af4886/docs/bugfix/ANALYSIS_PRD_VS_IMPLEMENTATION.md +1134 -0
- package/plan/001_d3bb02af4886/docs/bugfix/GAP_ANALYSIS_SUMMARY.md +179 -0
- package/plan/001_d3bb02af4886/docs/bugfix/P1M4T2S1/PRP.md +629 -0
- package/plan/001_d3bb02af4886/docs/bugfix/P1M4T2S1/validation-report.md +214 -0
- package/plan/001_d3bb02af4886/docs/bugfix/PRP_P1M4T2S3.md +629 -0
- package/plan/001_d3bb02af4886/docs/bugfix/bugfix_PRP.md +529 -0
- package/plan/001_d3bb02af4886/docs/bugfix/bugfix_QUICK_REFERENCE.md +142 -0
- package/plan/001_d3bb02af4886/docs/bugfix/bugfix_README.md +304 -0
- package/plan/001_d3bb02af4886/docs/bugfix/bugfix_TEST_RESULTS.md +558 -0
- package/plan/001_d3bb02af4886/docs/bugfix/bugfix_VALIDATION_SUMMARY.md +256 -0
- package/plan/001_d3bb02af4886/docs/bugfix/system_context.md +346 -0
- package/plan/001_d3bb02af4886/docs/bugfix-architecture/bug_analysis.md +415 -0
- package/plan/001_d3bb02af4886/docs/bugfix-architecture/implementation_patterns.md +489 -0
- package/plan/001_d3bb02af4886/docs/bugfix-architecture/system_context.md +218 -0
- package/plan/001_d3bb02af4886/docs/bugfix_INITIATION_SUMMARY.md +380 -0
- package/plan/001_d3bb02af4886/docs/research/CYCLE_DETECTION_PATTERNS.md +1923 -0
- package/plan/001_d3bb02af4886/docs/research/CYCLE_DETECTION_QUICK_REF.md +319 -0
- package/plan/001_d3bb02af4886/docs/research/P1M1T2S1/codebase-context.md +115 -0
- package/plan/001_d3bb02af4886/docs/research/P1M1T2S1/cycle-detection-algorithms.md +134 -0
- package/plan/001_d3bb02af4886/docs/research/P1M1T2S1/test-patterns.md +153 -0
- package/plan/001_d3bb02af4886/docs/research/P1M1T2S1/workflow-class.md +132 -0
- package/plan/001_d3bb02af4886/docs/research/P1M2T1S4/DECORATOR_DOCUMENTATION_BEST_PRACTICES.md +716 -0
- package/plan/001_d3bb02af4886/docs/research/P1M2T1S4/DECORATOR_DOCUMENTATION_QUICK_REF.md +186 -0
- package/plan/001_d3bb02af4886/docs/research/P1M2T1S4/GROUNDSWELL_DECORATOR_EXAMPLES.md +604 -0
- package/plan/001_d3bb02af4886/docs/research/P1M2T1S4/INDEX.md +213 -0
- package/plan/001_d3bb02af4886/docs/research/P1M2T1S4/codebase_structure.md +30 -0
- package/plan/001_d3bb02af4886/docs/research/P1M2T1S4/existing_test_pattern.md +56 -0
- package/plan/001_d3bb02af4886/docs/research/P1M2T1S4/getRootObservers_implementation.md +53 -0
- package/plan/001_d3bb02af4886/docs/research/P1M2T1S4/test_conventions.md +49 -0
- package/plan/001_d3bb02af4886/docs/research/P1M3T1S4/PRP.md +958 -0
- package/plan/001_d3bb02af4886/docs/research/P1M3T1S4/QUICK_REFERENCE.md +339 -0
- package/plan/001_d3bb02af4886/docs/research/P1M3T1S4/README.md +305 -0
- package/plan/001_d3bb02af4886/docs/research/P1M3T1S4/SUMMARY.md +433 -0
- package/plan/001_d3bb02af4886/docs/research/P1M3T1S4/bidirectional-tree-consistency-testing.md +1574 -0
- package/plan/001_d3bb02af4886/docs/research/P1M3T1S4/test-pattern-examples.md +1014 -0
- package/plan/001_d3bb02af4886/docs/research/PROMISE_ALLSETTLED_QUICK_REF.md +376 -0
- package/plan/001_d3bb02af4886/docs/research/PROMISE_ALLSETTLED_RESEARCH.md +1507 -0
- package/plan/001_d3bb02af4886/docs/research/bugfix_typescript_patterns.md +949 -0
- package/plan/001_d3bb02af4886/docs/research/error-testing-research.md +619 -0
- package/plan/001_d3bb02af4886/docs/research/error_handling_patterns.md +723 -0
- package/plan/{research → 001_d3bb02af4886/docs/research/general}/introspection-security-guide.md +56 -0
- package/plan/001_d3bb02af4886/docs/research/incremental-tree-map-updates/PRP_TEMPLATE.md +460 -0
- package/plan/001_d3bb02af4886/docs/research/incremental-tree-map-updates/QUICK_REFERENCE.md +324 -0
- package/plan/001_d3bb02af4886/docs/research/incremental-tree-map-updates/README.md +175 -0
- package/plan/001_d3bb02af4886/docs/research/incremental-tree-map-updates/RESEARCH_REPORT.md +499 -0
- package/plan/001_d3bb02af4886/docs/research/incremental-tree-map-updates/SUMMARY.md +163 -0
- package/plan/bugfix/BUG_FIX_SUMMARY.md +961 -0
- package/src/__tests__/adversarial/attachChild-performance.test.ts +216 -0
- package/src/__tests__/adversarial/circular-reference.test.ts +101 -0
- package/src/__tests__/adversarial/complex-circular-reference.test.ts +139 -0
- package/src/__tests__/adversarial/concurrent-task-failures.test.ts +571 -0
- package/src/__tests__/adversarial/deep-analysis.test.ts +729 -0
- package/src/__tests__/adversarial/deep-hierarchy-stress.test.ts +213 -0
- package/src/__tests__/adversarial/e2e-prd-validation.test.ts +448 -0
- package/src/__tests__/adversarial/edge-case.test.ts +703 -0
- package/src/__tests__/adversarial/error-merge-strategy.test.ts +760 -0
- package/src/__tests__/adversarial/incremental-performance.test.ts +140 -0
- package/src/__tests__/adversarial/node-map-update-benchmarks.test.ts +457 -0
- package/src/__tests__/adversarial/observer-propagation.test.ts +487 -0
- package/src/__tests__/adversarial/parent-validation.test.ts +143 -0
- package/src/__tests__/adversarial/prd-12-2-compliance.test.ts +611 -0
- package/src/__tests__/adversarial/prd-compliance.test.ts +731 -0
- package/src/__tests__/compatibility/backward-compatibility.test.ts +1572 -0
- package/src/__tests__/helpers/index.ts +18 -0
- package/src/__tests__/helpers/tree-verification.ts +257 -0
- package/src/__tests__/integration/bidirectional-consistency.test.ts +847 -0
- package/src/__tests__/integration/observer-logging.test.ts +643 -0
- package/src/__tests__/integration/tree-mirroring.test.ts +37 -0
- package/src/__tests__/integration/workflow-reparenting.test.ts +303 -0
- package/src/__tests__/unit/context.test.ts +79 -0
- package/src/__tests__/unit/logger.test.ts +293 -0
- package/src/__tests__/unit/observable.test.ts +321 -0
- package/src/__tests__/unit/tree-debugger-incremental.test.ts +170 -0
- package/src/__tests__/unit/utils/workflow-error-utils.test.ts +209 -0
- package/src/__tests__/unit/workflow-detachChild.test.ts +100 -0
- package/src/__tests__/unit/workflow-emitEvent-childDetached.test.ts +153 -0
- package/src/__tests__/unit/workflow-isDescendantOf.test.ts +180 -0
- package/src/__tests__/unit/workflow.test.ts +277 -1
- package/src/core/agent.ts +21 -1
- package/src/core/logger.ts +27 -2
- package/src/core/workflow-context.ts +6 -4
- package/src/core/workflow.ts +252 -14
- package/src/debugger/tree-debugger.ts +52 -7
- package/src/decorators/task.ts +65 -2
- package/src/index.ts +4 -2
- package/src/types/decorators.ts +8 -1
- package/src/types/events.ts +1 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/observable.ts +32 -3
- package/src/utils/workflow-error-utils.ts +56 -0
- package/tsconfig.json +1 -1
- package/llms_full.txt +0 -5890
- package/tasks.json +0 -0
- /package/plan/{backlog.json → 001_d3bb02af4886/backlog.json} +0 -0
- /package/plan/{P1P2/PRP.md → 001_d3bb02af4886/docs/PRP/P1P2-PRP.md} +0 -0
- /package/plan/{P3P4/PRP.md → 001_d3bb02af4886/docs/PRP/P3P4-PRP.md} +0 -0
- /package/plan/{P4P5/PRP.md → 001_d3bb02af4886/docs/PRP/P4P5-PRP.md} +0 -0
- /package/plan/{architecture → 001_d3bb02af4886/docs/architecture}/external_deps.md +0 -0
- /package/plan/{architecture → 001_d3bb02af4886/docs/architecture}/system_context.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/LRU_CACHE_BEST_PRACTICES.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/LRU_CACHE_CODE_PATTERNS.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/LRU_CACHE_INTEGRATION_GUIDE.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/LRU_CACHE_RESEARCH_INDEX.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/REFLECTION_INDEX.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/REFLECTION_RESEARCH_REPORT.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/RESEARCH_SUMMARY.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/anthropic-sdk.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/async-local-storage.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/reflection-code-patterns.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/reflection-decision-matrix.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/reflection-implementation-guide.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/reflection-integration-guide.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/reflection-patterns.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/reflection-quick-reference.md +0 -0
- /package/plan/{P1P2/research → 001_d3bb02af4886/docs/research/P1P2}/zod-schema.md +0 -0
- /package/plan/{P3P4/research → 001_d3bb02af4886/docs/research/P3P4}/caching-lru.md +0 -0
- /package/plan/{P3P4/research → 001_d3bb02af4886/docs/research/P3P4}/introspection-tools.md +0 -0
- /package/plan/{P3P4/research → 001_d3bb02af4886/docs/research/P3P4}/reflection-patterns.md +0 -0
- /package/plan/{P4P5/research → 001_d3bb02af4886/docs/research/P4P5}/RESEARCH_SUMMARY.md +0 -0
- /package/plan/{research → 001_d3bb02af4886/docs/research/general}/INTROSPECTION_RESEARCH_SUMMARY.md +0 -0
- /package/plan/{research → 001_d3bb02af4886/docs/research/general}/README-INTROSPECTION.md +0 -0
- /package/plan/{research → 001_d3bb02af4886/docs/research/general}/agent-introspection-patterns.md +0 -0
- /package/plan/{research → 001_d3bb02af4886/docs/research/general}/introspection-tool-examples.md +0 -0
- /package/{PRPs/PRDs/001-hierarchical-workflow-engine.md → plan/001_d3bb02af4886/prd_snapshot.md} +0 -0
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
name: "PRP: P1.M1.T1.S1 - Research PRD specification for child() signature"
|
|
2
|
+
description: |
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Goal
|
|
7
|
+
|
|
8
|
+
**Feature Goal**: Document the PRD specification for WorkflowLogger.child() signature and create a comprehensive analysis comparing it with the current implementation.
|
|
9
|
+
|
|
10
|
+
**Deliverable**: Analysis document `plan/bugfix/architecture/logger_child_signature_analysis.md` containing:
|
|
11
|
+
- PRD specification details for child(meta: Partial<LogEntry>)
|
|
12
|
+
- Current implementation analysis of child(parentLogId: string)
|
|
13
|
+
- Detailed comparison of differences
|
|
14
|
+
- Migration recommendations and approach
|
|
15
|
+
- All existing call sites cataloged for impact analysis
|
|
16
|
+
|
|
17
|
+
**Success Definition**:
|
|
18
|
+
- Analysis document exists at specified path with all required sections
|
|
19
|
+
- All existing child() call sites are documented with their usage patterns
|
|
20
|
+
- Clear migration path is defined for future implementation work
|
|
21
|
+
- Document passes "No Prior Knowledge" test - enables implementer to understand complete context
|
|
22
|
+
|
|
23
|
+
## User Persona (if applicable)
|
|
24
|
+
|
|
25
|
+
**Target User**: Developer/Implementer (Subtask P1.M1.T1.S2 executor)
|
|
26
|
+
|
|
27
|
+
**Use Case**: Research phase before implementing the signature change migration
|
|
28
|
+
|
|
29
|
+
**User Journey**:
|
|
30
|
+
1. Read this PRP to understand the research scope
|
|
31
|
+
2. Use provided context files to understand PRD vs implementation
|
|
32
|
+
3. Catalog existing call sites and usage patterns
|
|
33
|
+
4. Document findings for implementation team
|
|
34
|
+
5. Create migration recommendations
|
|
35
|
+
|
|
36
|
+
**Pain Points Addressed**:
|
|
37
|
+
- Fragmented understanding of PRD requirements across multiple documents
|
|
38
|
+
- Unclear impact of signature change on existing code
|
|
39
|
+
- Need for comprehensive context before implementing breaking changes
|
|
40
|
+
|
|
41
|
+
## Why
|
|
42
|
+
|
|
43
|
+
- **Critical Bug Fix Foundation**: This research enables the critical signature mismatch fix (P1.M1.T1) which violates the public API contract
|
|
44
|
+
- **Impact Analysis**: Understanding all call sites is essential before implementing a breaking change
|
|
45
|
+
- **Migration Safety**: Proper research prevents unintended breaking of existing functionality
|
|
46
|
+
- **Documentation Alignment**: Ensures implementation matches PRD specification for long-term maintainability
|
|
47
|
+
|
|
48
|
+
## What
|
|
49
|
+
|
|
50
|
+
Research task to analyze and document the PRD specification for WorkflowLogger.child() method signature.
|
|
51
|
+
|
|
52
|
+
### Success Criteria
|
|
53
|
+
|
|
54
|
+
- [ ] Analysis document created at `plan/bugfix/architecture/logger_child_signature_analysis.md`
|
|
55
|
+
- [ ] PRD Section 12.1 specification documented with exact signature requirements
|
|
56
|
+
- [ ] Current implementation documented from src/core/logger.ts:84-86
|
|
57
|
+
- [ ] All existing child() call sites cataloged with file paths and line numbers
|
|
58
|
+
- [ ] Migration recommendations provided for backward compatibility
|
|
59
|
+
- [ ] Document passes "No Prior Knowledge" validation
|
|
60
|
+
|
|
61
|
+
## All Needed Context
|
|
62
|
+
|
|
63
|
+
### Context Completeness Check
|
|
64
|
+
|
|
65
|
+
_Before writing this PRP, I validated: "If someone knew nothing about this codebase, would they have everything needed to implement this successfully?"_
|
|
66
|
+
|
|
67
|
+
### Documentation & References
|
|
68
|
+
|
|
69
|
+
```yaml
|
|
70
|
+
# MUST READ - PRD Specification
|
|
71
|
+
- url: file:///home/dustin/projects/groundswell/PRPs/PRDs/001-hierarchical-workflow-engine.md
|
|
72
|
+
section: "Section 12.1 (lines 286-308)"
|
|
73
|
+
why: PRD specification for child() signature - defines required API contract
|
|
74
|
+
critical: PRD specifies `child(meta: Partial<LogEntry>): WorkflowLogger` which differs from current implementation
|
|
75
|
+
|
|
76
|
+
# MUST READ - Current Implementation
|
|
77
|
+
- file: src/core/logger.ts
|
|
78
|
+
lines: "1-88 (complete file)"
|
|
79
|
+
why: Complete WorkflowLogger implementation including child() method at lines 84-86
|
|
80
|
+
pattern: Current signature is `child(parentLogId: string): WorkflowLogger`
|
|
81
|
+
gotcha: Current implementation passes parentLogId to constructor but PRD shows constructor without it
|
|
82
|
+
|
|
83
|
+
# MUST READ - Type Definitions
|
|
84
|
+
- file: src/types/logging.ts
|
|
85
|
+
lines: "1-25"
|
|
86
|
+
why: LogEntry interface definition - required to understand Partial<LogEntry> type
|
|
87
|
+
pattern: LogEntry has fields: id, workflowId, timestamp, level, message, data?, parentLogId?
|
|
88
|
+
|
|
89
|
+
# MUST READ - Architecture Documentation
|
|
90
|
+
- docfile: plan/bugfix/architecture/codebase_structure.md
|
|
91
|
+
why: Documents WorkflowLogger location and current implementation details
|
|
92
|
+
section: "WorkflowLogger class at src/core/logger.ts:84"
|
|
93
|
+
|
|
94
|
+
# MUST READ - Existing Test Patterns
|
|
95
|
+
- file: src/__tests__/adversarial/edge-case.test.ts
|
|
96
|
+
lines: "90-110"
|
|
97
|
+
why: Example of current child() usage pattern: `logger.child('parent-id-123')`
|
|
98
|
+
pattern: String argument passed to child() method
|
|
99
|
+
|
|
100
|
+
# MUST READ - Test Framework Configuration
|
|
101
|
+
- file: package.json
|
|
102
|
+
section: "scripts: test, test:watch"
|
|
103
|
+
why: Verification commands - vitest is the testing framework used
|
|
104
|
+
command: `npm test` runs `vitest run`
|
|
105
|
+
|
|
106
|
+
# MUST READ - Partial<> Usage Patterns
|
|
107
|
+
- file: src/types/reflection.ts
|
|
108
|
+
lines: "100-120"
|
|
109
|
+
why: Example of Partial<> pattern with default merging using spread operator
|
|
110
|
+
pattern: `{ ...DEFAULT_CONFIG, ...partial }` for merging Partial objects
|
|
111
|
+
|
|
112
|
+
# MUST READ - Migration Context
|
|
113
|
+
- docfile: plan/bugfix/RESEARCH_SUMMARY.md
|
|
114
|
+
why: Contains research notes about the signature mismatch issue
|
|
115
|
+
section: "Signature Mismatch: child() method"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Current Codebase Tree
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
/home/dustin/projects/groundswell
|
|
122
|
+
├── package.json # Test commands: npm test, npm run test:watch
|
|
123
|
+
├── PRPs/
|
|
124
|
+
│ └── PRDs/
|
|
125
|
+
│ └── 001-hierarchical-workflow-engine.md # PRD Section 12.1 (lines 286-308)
|
|
126
|
+
├── plan/
|
|
127
|
+
│ └── bugfix/
|
|
128
|
+
│ ├── architecture/
|
|
129
|
+
│ │ ├── codebase_structure.md # WorkflowLogger documentation
|
|
130
|
+
│ │ ├── concurrent_execution_best_practices.md
|
|
131
|
+
│ │ └── error_handling_patterns.md
|
|
132
|
+
│ ├── P1M1T1S1/ # THIS WORK ITEM
|
|
133
|
+
│ │ └── research/ # Research output directory
|
|
134
|
+
│ └── RESEARCH_SUMMARY.md # Existing research notes
|
|
135
|
+
├── src/
|
|
136
|
+
│ ├── core/
|
|
137
|
+
│ │ └── logger.ts # WorkflowLogger class (lines 84-86: child())
|
|
138
|
+
│ ├── types/
|
|
139
|
+
│ │ └── logging.ts # LogEntry interface
|
|
140
|
+
│ ├── __tests__/
|
|
141
|
+
│ │ ├── unit/ # Unit tests
|
|
142
|
+
│ │ └── adversarial/
|
|
143
|
+
│ │ ├── edge-case.test.ts # child() usage at line ~96
|
|
144
|
+
│ │ └── deep-analysis.test.ts # child() usage at line ~61
|
|
145
|
+
│ └── utils/
|
|
146
|
+
│ └── id.ts # generateId() utility
|
|
147
|
+
├── vitest.config.ts # Vitest configuration
|
|
148
|
+
└── tsconfig.json # TypeScript configuration
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Desired Codebase Tree (After This Research Task)
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
plan/bugfix/
|
|
155
|
+
├── architecture/
|
|
156
|
+
│ └── logger_child_signature_analysis.md # NEW: Main analysis output document
|
|
157
|
+
└── P1M1T1S1/
|
|
158
|
+
├── PRP.md # THIS FILE: Product Requirement Prompt
|
|
159
|
+
└── research/
|
|
160
|
+
├──prd_specification.md # NEW: Extracted PRD Section 12.1 details
|
|
161
|
+
├──current_implementation.md # NEW: Current implementation analysis
|
|
162
|
+
├──call_site_catalog.md # NEW: All existing child() call sites
|
|
163
|
+
└──migration_recommendations.md # NEW: Recommended migration approach
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Known Gotchas of our codebase & Library Quirks
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
// CRITICAL: TypeScript Partial<> type requires proper default merging
|
|
170
|
+
// Pattern from src/types/reflection.ts: { ...DEFAULT_CONFIG, ...partial }
|
|
171
|
+
// Wrong: direct assignment may leave undefined values
|
|
172
|
+
// Right: spread operator merging with defaults
|
|
173
|
+
|
|
174
|
+
// CRITICAL: PRD constructor differs from current implementation
|
|
175
|
+
// Current: new WorkflowLogger(node, observers, parentLogId?)
|
|
176
|
+
// PRD: new WorkflowLogger(node, observers) - no parentLogId parameter
|
|
177
|
+
// Migration must handle this discrepancy
|
|
178
|
+
|
|
179
|
+
// CRITICAL: Existing child() call sites use string argument
|
|
180
|
+
// Found in src/__tests__/adversarial/edge-case.test.ts:96
|
|
181
|
+
// Found in src/__tests__/adversarial/deep-analysis.test.ts:61
|
|
182
|
+
// Backward compatibility must be maintained
|
|
183
|
+
|
|
184
|
+
// CRITICAL: LogEntry.parentLogId is optional (undefined for root logs)
|
|
185
|
+
// Child logger entries MUST have parentLogId set
|
|
186
|
+
// This is how hierarchical logging is implemented
|
|
187
|
+
|
|
188
|
+
// CRITICAL: Vitest test framework uses import pattern
|
|
189
|
+
// import { describe, it, expect, beforeEach, afterEach } from 'vitest'
|
|
190
|
+
// Not jest - different mocking APIs (vi.spyOn, vi.fn, not jest.spyOn, jest.fn)
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Implementation Blueprint
|
|
194
|
+
|
|
195
|
+
### Research Output Structure
|
|
196
|
+
|
|
197
|
+
Create structured research documents under plan/bugfix/P1M1T1S1/research/:
|
|
198
|
+
|
|
199
|
+
```markdown
|
|
200
|
+
research/
|
|
201
|
+
├── prd_specification.md # PRD Section 12.1 content
|
|
202
|
+
├── current_implementation.md # src/core/logger.ts analysis
|
|
203
|
+
├── call_site_catalog.md # All child() usage sites
|
|
204
|
+
└── migration_recommendations.md # Proposed approach
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Implementation Tasks (ordered by dependencies)
|
|
208
|
+
|
|
209
|
+
```yaml
|
|
210
|
+
Task 1: CREATE plan/bugfix/P1M1T1S1/research/prd_specification.md
|
|
211
|
+
- EXTRACT: Complete PRD Section 12.1 content from PRPs/PRDs/001-hierarchical-workflow-engine.md:286-308
|
|
212
|
+
- DOCUMENT: Exact signature: child(meta: Partial<LogEntry>): WorkflowLogger
|
|
213
|
+
- DOCUMENT: Constructor signature from PRD: new WorkflowLogger(node, observers)
|
|
214
|
+
- DOCUMENT: LogEntry interface fields that can be partially specified
|
|
215
|
+
- FORMAT: Markdown with code blocks for clarity
|
|
216
|
+
- PLACEMENT: plan/bugfix/P1M1T1S1/research/
|
|
217
|
+
|
|
218
|
+
Task 2: CREATE plan/bugfix/P1M1T1S1/research/current_implementation.md
|
|
219
|
+
- EXTRACT: Complete WorkflowLogger class from src/core/logger.ts:1-88
|
|
220
|
+
- DOCUMENT: Current signature: child(parentLogId: string): WorkflowLogger
|
|
221
|
+
- DOCUMENT: Current constructor: new WorkflowLogger(node, observers, parentLogId?)
|
|
222
|
+
- DOCUMENT: How parentLogId flows through the log() method (lines 35-51)
|
|
223
|
+
- DOCUMENT: The private emit() method pattern (lines 21-30)
|
|
224
|
+
- FORMAT: Markdown with line number references
|
|
225
|
+
- PLACEMENT: plan/bugfix/P1M1T1S1/research/
|
|
226
|
+
|
|
227
|
+
Task 3: CREATE plan/bugfix/P1M1T1S1/research/call_site_catalog.md
|
|
228
|
+
- SEARCH: All occurrences of `.child(` in the codebase
|
|
229
|
+
- DOCUMENT: Each call site with file path, line number, and usage pattern
|
|
230
|
+
- CATEGORIZE: Test usage vs production usage
|
|
231
|
+
- ANALYZE: How each call site would be affected by signature change
|
|
232
|
+
- IDENTIFY: Backward compatibility requirements
|
|
233
|
+
- FORMAT: Table format for easy reference
|
|
234
|
+
- PLACEMENT: plan/bugfix/P1M1T1S1/research/
|
|
235
|
+
|
|
236
|
+
Task 4: CREATE plan/bugfix/P1M1T1S1/research/migration_recommendations.md
|
|
237
|
+
- ANALYZE: Differences between PRD and implementation
|
|
238
|
+
- PROPOSE: Backward compatibility approach (string shorthand for parentLogId)
|
|
239
|
+
- REFERENCE: Partial<> usage patterns from src/types/reflection.ts
|
|
240
|
+
- DOCUMENT: Recommended function signature using TypeScript overloads
|
|
241
|
+
- IDENTIFY: Risks and mitigation strategies
|
|
242
|
+
- PLACEMENT: plan/bugfix/P1M1T1S1/research/
|
|
243
|
+
|
|
244
|
+
Task 5: CREATE plan/bugfix/architecture/logger_child_signature_analysis.md
|
|
245
|
+
- COMPILE: Consolidated analysis from all research documents
|
|
246
|
+
- INCLUDE: Executive summary of findings
|
|
247
|
+
- INCLUDE: PRD vs Implementation comparison table
|
|
248
|
+
- INCLUDE: Complete call site catalog
|
|
249
|
+
- INCLUDE: Migration recommendations
|
|
250
|
+
- REFERENCE: All individual research documents
|
|
251
|
+
- PLACEMENT: plan/bugfix/architecture/
|
|
252
|
+
|
|
253
|
+
Task 6: VERIFY plan/bugfix/P1M1T1S1/PRP.md completeness
|
|
254
|
+
- VALIDATE: All context references are accurate and accessible
|
|
255
|
+
- VALIDATE: File paths are correct
|
|
256
|
+
- VALIDATE: "No Prior Knowledge" test would pass
|
|
257
|
+
- UPDATE: Any missing context or unclear references
|
|
258
|
+
- PLACEMENT: plan/bugfix/P1M1T1S1/
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Research Patterns & Key Details
|
|
262
|
+
|
|
263
|
+
```typescript
|
|
264
|
+
// Pattern 1: PRD Specification Extraction
|
|
265
|
+
// From PRPs/PRDs/001-hierarchical-workflow-engine.md:303-305
|
|
266
|
+
child(meta: Partial<LogEntry>): WorkflowLogger {
|
|
267
|
+
return new WorkflowLogger(this.node, this.observers);
|
|
268
|
+
}
|
|
269
|
+
// NOTE: PRD constructor does NOT include parentLogId parameter
|
|
270
|
+
|
|
271
|
+
// Pattern 2: Current Implementation
|
|
272
|
+
// From src/core/logger.ts:84-86
|
|
273
|
+
child(parentLogId: string): WorkflowLogger {
|
|
274
|
+
return new WorkflowLogger(this.node, this.observers, parentLogId);
|
|
275
|
+
}
|
|
276
|
+
// NOTE: Constructor receives parentLogId as third parameter
|
|
277
|
+
|
|
278
|
+
// Pattern 3: parentLogId Flow in LogEntry
|
|
279
|
+
// From src/core/logger.ts:45-48
|
|
280
|
+
if (this.parentLogId) {
|
|
281
|
+
entry.parentLogId = this.parentLogId;
|
|
282
|
+
}
|
|
283
|
+
// CRITICAL: This is how hierarchical logging is implemented
|
|
284
|
+
|
|
285
|
+
// Pattern 4: Partial<> Merging Pattern (from codebase)
|
|
286
|
+
// From src/types/reflection.ts - createReflectionConfig function
|
|
287
|
+
export function createReflectionConfig(
|
|
288
|
+
partial?: Partial<ReflectionConfig>
|
|
289
|
+
): ReflectionConfig {
|
|
290
|
+
return {
|
|
291
|
+
...DEFAULT_REFLECTION_CONFIG,
|
|
292
|
+
...partial,
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
// RECOMMENDED: Use this pattern for handling Partial<LogEntry>
|
|
296
|
+
|
|
297
|
+
// Pattern 5: Existing Call Site Pattern
|
|
298
|
+
// From src/__tests__/adversarial/edge-case.test.ts:96
|
|
299
|
+
const childLogger = this.logger.child('parent-id-123');
|
|
300
|
+
// BACKWARD COMPATIBILITY: Must support string argument as shorthand
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Integration Points
|
|
304
|
+
|
|
305
|
+
```yaml
|
|
306
|
+
PRD_DOCUMENT:
|
|
307
|
+
- location: PRPs/PRDs/001-hierarchical-workflow-engine.md
|
|
308
|
+
- section: "12.1 WorkflowLogger Skeleton"
|
|
309
|
+
- lines: 286-308
|
|
310
|
+
|
|
311
|
+
TYPE_DEFINITIONS:
|
|
312
|
+
- file: src/types/logging.ts
|
|
313
|
+
- interface: LogEntry (lines 9-24)
|
|
314
|
+
- fields: id, workflowId, timestamp, level, message, data?, parentLogId?
|
|
315
|
+
|
|
316
|
+
TEST_SITES:
|
|
317
|
+
- src/__tests__/adversarial/edge-case.test.ts:96
|
|
318
|
+
- src/__tests__/adversarial/deep-analysis.test.ts:61
|
|
319
|
+
- dist/__tests__/unit/logging.test.js (HierarchicalLogger tests - different class)
|
|
320
|
+
|
|
321
|
+
ARCHITECTURE_DOCS:
|
|
322
|
+
- plan/bugfix/architecture/codebase_structure.md
|
|
323
|
+
- plan/bugfix/RESEARCH_SUMMARY.md
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
## Validation Loop
|
|
327
|
+
|
|
328
|
+
### Level 1: Syntax & Style (Immediate Feedback)
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
# Not applicable - this is a research task producing documentation
|
|
332
|
+
# No code compilation needed
|
|
333
|
+
|
|
334
|
+
# Verify markdown syntax if using linting tools
|
|
335
|
+
npx markdownlint plan/bugfix/P1M1T1S1/research/*.md --fix
|
|
336
|
+
|
|
337
|
+
# Expected: Zero markdown syntax errors
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Level 2: Document Completeness (Content Validation)
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
# Verify all required documents exist
|
|
344
|
+
ls -la plan/bugfix/P1M1T1S1/research/
|
|
345
|
+
# Expected output: prd_specification.md, current_implementation.md,
|
|
346
|
+
# call_site_catalog.md, migration_recommendations.md
|
|
347
|
+
|
|
348
|
+
# Verify main analysis document exists
|
|
349
|
+
ls -la plan/bugfix/architecture/logger_child_signature_analysis.md
|
|
350
|
+
# Expected: File exists
|
|
351
|
+
|
|
352
|
+
# Count words in each document (minimum thresholds)
|
|
353
|
+
wc -w plan/bugfix/P1M1T1S1/research/*.md
|
|
354
|
+
# Expected: Each document should have substantial content (>100 words)
|
|
355
|
+
|
|
356
|
+
# Verify document contains required sections
|
|
357
|
+
grep -E "### (PRD Specification|Current Implementation|Call Sites|Migration)" plan/bugfix/architecture/logger_child_signature_analysis.md
|
|
358
|
+
# Expected: All section headers found
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
### Level 3: Research Quality Validation (Accuracy Check)
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
# Verify PRD reference is accurate
|
|
365
|
+
grep -A 5 "child(meta: Partial" PRPs/PRDs/001-hierarchical-workflow-engine.md
|
|
366
|
+
# Expected: Shows child(meta: Partial<LogEntry>): WorkflowLogger
|
|
367
|
+
|
|
368
|
+
# Verify current implementation reference is accurate
|
|
369
|
+
grep -A 2 "child(parentLogId" src/core/logger.ts
|
|
370
|
+
# Expected: Shows child(parentLogId: string): WorkflowLogger
|
|
371
|
+
|
|
372
|
+
# Verify call sites are documented correctly
|
|
373
|
+
grep -r "\.child(" src/__tests__/ --include="*.ts"
|
|
374
|
+
# Expected: Matches documented call sites
|
|
375
|
+
|
|
376
|
+
# Verify LogEntry interface reference
|
|
377
|
+
grep -A 15 "interface LogEntry" src/types/logging.ts
|
|
378
|
+
# Expected: Shows all LogEntry fields including parentLogId
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### Level 4: Context Completeness Validation ("No Prior Knowledge" Test)
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
# Test: Can someone new to the project understand the issue?
|
|
385
|
+
# Validation questions to answer:
|
|
386
|
+
|
|
387
|
+
# 1. What is the PRD specification?
|
|
388
|
+
cat plan/bugfix/P1M1T1S1/research/prd_specification.md
|
|
389
|
+
# Should clearly state: child(meta: Partial<LogEntry>): WorkflowLogger
|
|
390
|
+
|
|
391
|
+
# 2. What is the current implementation?
|
|
392
|
+
cat plan/bugfix/P1M1T1S1/research/current_implementation.md
|
|
393
|
+
# Should clearly state: child(parentLogId: string): WorkflowLogger
|
|
394
|
+
|
|
395
|
+
# 3. What code will be affected?
|
|
396
|
+
cat plan/bugfix/P1M1T1S1/research/call_site_catalog.md
|
|
397
|
+
# Should list all files and line numbers
|
|
398
|
+
|
|
399
|
+
# 4. How should migration be handled?
|
|
400
|
+
cat plan/bugfix/P1M1T1S1/research/migration_recommendations.md
|
|
401
|
+
# Should provide clear approach with backward compatibility
|
|
402
|
+
|
|
403
|
+
# 5. Is there a single comprehensive document?
|
|
404
|
+
cat plan/bugfix/architecture/logger_child_signature_analysis.md
|
|
405
|
+
# Should consolidate all findings with clear summary
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
## Final Validation Checklist
|
|
409
|
+
|
|
410
|
+
### Technical Validation
|
|
411
|
+
|
|
412
|
+
- [ ] All 4 research documents exist in plan/bugfix/P1M1T1S1/research/
|
|
413
|
+
- [ ] Main analysis document exists at plan/bugfix/architecture/logger_child_signature_analysis.md
|
|
414
|
+
- [ ] All file references in documents are accurate and accessible
|
|
415
|
+
- [ ] PRD specification is correctly extracted with line numbers
|
|
416
|
+
- [ ] Current implementation is correctly documented with line numbers
|
|
417
|
+
- [ ] All child() call sites are catalogued
|
|
418
|
+
- [ ] Migration recommendations include backward compatibility approach
|
|
419
|
+
|
|
420
|
+
### Research Quality Validation
|
|
421
|
+
|
|
422
|
+
- [ ] PRD specification section includes exact signature from Section 12.1
|
|
423
|
+
- [ ] Current implementation section includes complete child() method and constructor
|
|
424
|
+
- [ ] Call site catalog includes file paths, line numbers, and usage patterns
|
|
425
|
+
- [ ] Migration recommendations reference codebase patterns (Partial<> usage)
|
|
426
|
+
- [ ] Main analysis document consolidates all findings with executive summary
|
|
427
|
+
- [ ] Documents pass "No Prior Knowledge" test
|
|
428
|
+
|
|
429
|
+
### Documentation & Formatting
|
|
430
|
+
|
|
431
|
+
- [ ] All markdown files are properly formatted
|
|
432
|
+
- [ ] Code blocks have language identifiers (typescript, bash, etc.)
|
|
433
|
+
- [ ] File paths use absolute paths or clear relative paths from project root
|
|
434
|
+
- [ ] Line number references are accurate
|
|
435
|
+
- [ ] Tables (if any) are properly formatted
|
|
436
|
+
|
|
437
|
+
### Success Criteria Validation
|
|
438
|
+
|
|
439
|
+
- [ ] Analysis document exists at specified path
|
|
440
|
+
- [ ] PRD specification documented with exact signature requirements
|
|
441
|
+
- [ ] Current implementation documented from src/core/logger.ts
|
|
442
|
+
- [ ] All existing child() call sites cataloged
|
|
443
|
+
- [ ] Migration recommendations provided
|
|
444
|
+
- [ ] Document enables implementation without additional context
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
## Anti-Patterns to Avoid
|
|
449
|
+
|
|
450
|
+
- ❌ Don't assume prior knowledge - be explicit about all file locations and line numbers
|
|
451
|
+
- ❌ Don't skip cataloging call sites - every usage matters for migration planning
|
|
452
|
+
- ❌ Don't ignore backward compatibility - existing code must continue to work
|
|
453
|
+
- ❌ Don't omit line numbers - references must be precise
|
|
454
|
+
- ❌ Don't create research documents without cross-referencing - link related sections
|
|
455
|
+
- ❌ Don't forget the "No Prior Knowledge" test - imagine explaining to someone new
|
|
456
|
+
- ❌ Don't mix PRD content with implementation analysis - keep them separate
|
|
457
|
+
- ❌ Don't propose migration without understanding existing patterns - reference Partial<> usage from codebase
|