neotoma 0.3.0 → 0.3.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/README.md +9 -9
- package/dist/actions.js +2 -2
- package/dist/actions.js.map +1 -1
- package/dist/cli/bootstrap.js +0 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +158 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/crypto/auth.js +1 -1
- package/dist/crypto/auth.js.map +1 -1
- package/dist/mcp_ws_bridge.js +1 -1
- package/dist/mcp_ws_bridge.js.map +1 -1
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/services/field_converters.js +3 -3
- package/dist/services/field_converters.js.map +1 -1
- package/dist/services/field_validation.js +1 -1
- package/dist/services/field_validation.js.map +1 -1
- package/dist/services/mcp_auth.js +1 -1
- package/dist/services/mcp_auth.js.map +1 -1
- package/dist/services/mcp_oauth.js +1 -1
- package/dist/services/mcp_oauth.js.map +1 -1
- package/dist/services/parquet_reader.js +1 -1
- package/dist/services/parquet_reader.js.map +1 -1
- package/dist/services/public_key_registry.js +2 -2
- package/dist/services/public_key_registry.js.map +1 -1
- package/package.json +27 -7
- package/.claude/CLAUDE.md +0 -81
- package/.claude/rules/agent_constraints.md +0 -201
- package/.claude/rules/agent_instructions_sync_rules.md +0 -100
- package/.claude/rules/agent_test_execution.md +0 -358
- package/.claude/rules/autonomous_execution.md +0 -119
- package/.claude/rules/bug_fix_detection.md +0 -145
- package/.claude/rules/bug_learning.md +0 -154
- package/.claude/rules/checkpoint_management.md +0 -194
- package/.claude/rules/configuration_management.md +0 -159
- package/.claude/rules/content_style_enforcement.md +0 -141
- package/.claude/rules/dependency_installation.md +0 -148
- package/.claude/rules/document_loading_order.md +0 -197
- package/.claude/rules/documentation_rules.md +0 -169
- package/.claude/rules/downstream_doc_updates.md +0 -269
- package/.claude/rules/env_check.md +0 -55
- package/.claude/rules/environment_variables_1password.md +0 -315
- package/.claude/rules/environment_variables_env_file.md +0 -124
- package/.claude/rules/feature_unit_detection.md +0 -132
- package/.claude/rules/file_naming.md +0 -34
- package/.claude/rules/git_remote_sync.md +0 -242
- package/.claude/rules/instruction_documentation.md +0 -287
- package/.claude/rules/native_browser_debugging.md +0 -68
- package/.claude/rules/plan_execution_testing.md +0 -101
- package/.claude/rules/plan_format.md +0 -38
- package/.claude/rules/post_build_testing.md +0 -162
- package/.claude/rules/prefer_cli_tools.md +0 -233
- package/.claude/rules/readme_maintenance.md +0 -156
- package/.claude/rules/release_detection.md +0 -95
- package/.claude/rules/release_status_readme_update.md +0 -62
- package/.claude/rules/risk_management.md +0 -170
- package/.claude/rules/security.md +0 -168
- package/.claude/rules/social_media_conventions.md +0 -42
- package/.claude/rules/test_first_workflow.md +0 -344
- package/.claude/rules/worktree_env.md +0 -56
- package/.claude/settings.json +0 -5
- package/.claude/skills/commit.md +0 -762
- package/.claude/skills/create_feature_unit.md +0 -176
- package/.claude/skills/create_release.md +0 -428
- package/.claude/skills/fix_feature_bug.md +0 -93
- package/.claude/skills/pull.md +0 -314
- package/.claude/skills/setup_symlinks.md +0 -228
- package/.codex/config.toml +0 -92
- package/.cursor/commands/analyze.md +0 -574
- package/.cursor/commands/commit.md +0 -768
- package/.cursor/commands/create_feature_unit.md +0 -182
- package/.cursor/commands/create_prototype.md +0 -95
- package/.cursor/commands/create_release.md +0 -434
- package/.cursor/commands/create_rule.md +0 -296
- package/.cursor/commands/debug.md +0 -985
- package/.cursor/commands/final_review.md +0 -97
- package/.cursor/commands/fix_feature_bug.md +0 -99
- package/.cursor/commands/manage_error_debugging.md +0 -186
- package/.cursor/commands/migrate_plans.md +0 -499
- package/.cursor/commands/publish.md +0 -559
- package/.cursor/commands/pull.md +0 -320
- package/.cursor/commands/push.md +0 -259
- package/.cursor/commands/report.md +0 -1506
- package/.cursor/commands/report_error.md +0 -1505
- package/.cursor/commands/run_feature_workflow.md +0 -83
- package/.cursor/commands/setup_commands.md +0 -87
- package/.cursor/commands/setup_symlinks.md +0 -234
- package/.cursor/commands/sync_env_from_1password.md +0 -321
- package/.cursor/commands.json +0 -100
- package/.cursor/environment.json +0 -5
- package/.cursor/mcp.json.template +0 -16
- package/.cursor/plans/agent_skills_analysis_aac0f1b6.plan.md +0 -949
- package/.cursor/plans/agent_trust_framework_eb38ca7d.plan.md +0 -634
- package/.cursor/plans/all-storage-unstructured_provenance_df0b7a8f.plan.md +0 -112
- package/.cursor/plans/automated_error_debugging_cloud_agents.plan.md +0 -526
- package/.cursor/plans/automated_error_debugging_cursor_cli.plan.md +0 -599
- package/.cursor/plans/automated_error_debugging_localhost_clarified.plan.md +0 -510
- package/.cursor/plans/bug_report_and_contribution_client_guidance.plan.md +0 -143
- package/.cursor/plans/convert_1password_sync_to_mcp_343ca61c.plan.md +0 -282
- package/.cursor/plans/debug_pending_errors_command.plan.md +0 -531
- package/.cursor/plans/error_reporting_command_8868f27b.plan.md +0 -255
- package/.cursor/plans/mcp-cli-action-item-01-openapi-core.plan.md +0 -30
- package/.cursor/plans/mcp-cli-action-item-02-openapi-mcp-cli-mapping.plan.md +0 -18
- package/.cursor/plans/mcp-cli-action-item-03-cli-equivalent-logging.plan.md +0 -18
- package/.cursor/plans/mcp-cli-action-item-06-error-taxonomy.plan.md +0 -18
- package/.cursor/plans/mcp-cli-action-item-07-fixture-replay-graphs.plan.md +0 -18
- package/.cursor/plans/mcp-cli-action-item-08-cli-reference-executor.plan.md +0 -18
- package/.cursor/plans/mcp-cli-action-item-09-mcp-tools-atomic.plan.md +0 -18
- package/.cursor/plans/mcp-cli-action-item-10-canonical-walkthrough.plan.md +0 -18
- package/.cursor/plans/mcp-cli-action-item-11-fixtures-expected-outputs.plan.md +0 -18
- package/.cursor/plans/mcp-cli-action-item-12-failure-gallery.plan.md +0 -18
- package/.cursor/plans/mcp_source-path_documentation_5ce48609.plan.md +0 -83
- package/.cursor/plans/me_and_get_authenticated_user_response_updates.plan.md +0 -125
- package/.cursor/plans/multi-llm_provider_support_3fdeb361.plan.md +0 -120
- package/.cursor/plans/plan_migration_command_integrated.plan.md +0 -393
- package/.cursor/plans/schema_icon_enhancements_plan.md +0 -533
- package/.cursor/plans/site-react-tailwind-parity.plan.md +0 -82
- package/.cursor/plans/sources-first-ingestion-v8.plan.md +0 -0
- package/.cursor/plans/sources-first_ingestion_v10_baef2ba2.plan.md +0 -363
- package/.cursor/plans/test_coverage_gap_analysis_9cb70022.plan.md +0 -39
- package/.cursor/port_to_foundation_analysis.md +0 -217
- package/.cursor/rules/agent_constraints.mdc +0 -210
- package/.cursor/rules/autonomous_execution.mdc +0 -128
- package/.cursor/rules/configuration_management.mdc +0 -168
- package/.cursor/rules/cursor_rules_editing.mdc +0 -99
- package/.cursor/rules/cursor_rules_sync.mdc +0 -74
- package/.cursor/rules/cursor_rules_sync_requirement.mdc +0 -156
- package/.cursor/rules/developer_agent_instructions_sync_rules.mdc +0 -109
- package/.cursor/rules/document_loading_order.mdc +0 -206
- package/.cursor/rules/instruction_documentation.mdc +0 -296
- package/.cursor/rules/risk_management.mdc +0 -179
- package/.cursor/rules/security.mdc +0 -177
- package/.cursor/skipped_records/companies_skipped.json +0 -27
- package/.cursor/skipped_records/contacts_skipped.json +0 -23
- package/.cursor/skipped_records/goals_skipped.json +0 -7
- package/.cursor/skipped_records/people_skipped.json +0 -14
- package/.cursor/skipped_records/projects_skipped.json +0 -39
- package/.cursor/worktrees.json +0 -12
- package/.dockerignore +0 -9
- package/.env.example +0 -84
- package/.eslintrc.json +0 -11
- package/.github/workflows/deploy-pages-site.yml +0 -55
- package/.gitmodules +0 -12
- package/.husky/pre-commit +0 -42
- package/.mcp.json +0 -13
- package/.nvmrc +0 -1
- package/.prettierrc.json +0 -7
- package/.vscode/extensions.json +0 -5
- package/.vscode/settings.json +0 -47
- package/CONTRIBUTING.md +0 -23
- package/Dockerfile +0 -28
- package/SECURITY.md +0 -41
- package/components.json +0 -21
- package/cursor_rules_manifest.json +0 -28
- package/dist/__fixtures__/helpers.d.ts +0 -91
- package/dist/__fixtures__/helpers.d.ts.map +0 -1
- package/dist/__fixtures__/helpers.js +0 -384
- package/dist/__fixtures__/helpers.js.map +0 -1
- package/dist/__fixtures__/types.d.ts +0 -285
- package/dist/__fixtures__/types.d.ts.map +0 -1
- package/dist/__fixtures__/types.js +0 -7
- package/dist/__fixtures__/types.js.map +0 -1
- package/dist/__fixtures__/validation.d.ts +0 -45
- package/dist/__fixtures__/validation.d.ts.map +0 -1
- package/dist/__fixtures__/validation.js +0 -311
- package/dist/__fixtures__/validation.js.map +0 -1
- package/dist/config/plaid.d.ts +0 -21
- package/dist/config/plaid.d.ts.map +0 -1
- package/dist/config/plaid.js +0 -38
- package/dist/config/plaid.js.map +0 -1
- package/dist/events/event_emitter.d.ts +0 -24
- package/dist/events/event_emitter.d.ts.map +0 -1
- package/dist/events/event_emitter.js +0 -85
- package/dist/events/event_emitter.js.map +0 -1
- package/dist/events/event_log.d.ts +0 -23
- package/dist/events/event_log.d.ts.map +0 -1
- package/dist/events/event_log.js +0 -77
- package/dist/events/event_log.js.map +0 -1
- package/dist/events/event_schema.d.ts +0 -58
- package/dist/events/event_schema.d.ts.map +0 -1
- package/dist/events/event_schema.js +0 -43
- package/dist/events/event_schema.js.map +0 -1
- package/dist/events/event_validator.d.ts +0 -23
- package/dist/events/event_validator.d.ts.map +0 -1
- package/dist/events/event_validator.js +0 -90
- package/dist/events/event_validator.js.map +0 -1
- package/dist/events/index.d.ts +0 -9
- package/dist/events/index.d.ts.map +0 -1
- package/dist/events/index.js +0 -9
- package/dist/events/index.js.map +0 -1
- package/dist/events/replay.d.ts +0 -27
- package/dist/events/replay.d.ts.map +0 -1
- package/dist/events/replay.js +0 -62
- package/dist/events/replay.js.map +0 -1
- package/dist/hashing/hash_chain.d.ts +0 -31
- package/dist/hashing/hash_chain.d.ts.map +0 -1
- package/dist/hashing/hash_chain.js +0 -52
- package/dist/hashing/hash_chain.js.map +0 -1
- package/dist/integrations/plaid/client.d.ts +0 -53
- package/dist/integrations/plaid/client.d.ts.map +0 -1
- package/dist/integrations/plaid/client.js +0 -224
- package/dist/integrations/plaid/client.js.map +0 -1
- package/dist/integrations/plaid/normalizers.d.ts +0 -26
- package/dist/integrations/plaid/normalizers.d.ts.map +0 -1
- package/dist/integrations/plaid/normalizers.js +0 -166
- package/dist/integrations/plaid/normalizers.js.map +0 -1
- package/dist/integrations/providers/asana.d.ts +0 -9
- package/dist/integrations/providers/asana.d.ts.map +0 -1
- package/dist/integrations/providers/asana.js +0 -62
- package/dist/integrations/providers/asana.js.map +0 -1
- package/dist/integrations/providers/base.d.ts +0 -17
- package/dist/integrations/providers/base.d.ts.map +0 -1
- package/dist/integrations/providers/base.js +0 -64
- package/dist/integrations/providers/base.js.map +0 -1
- package/dist/integrations/providers/facebook.d.ts +0 -9
- package/dist/integrations/providers/facebook.d.ts.map +0 -1
- package/dist/integrations/providers/facebook.js +0 -58
- package/dist/integrations/providers/facebook.js.map +0 -1
- package/dist/integrations/providers/gmail.d.ts +0 -10
- package/dist/integrations/providers/gmail.d.ts.map +0 -1
- package/dist/integrations/providers/gmail.js +0 -67
- package/dist/integrations/providers/gmail.js.map +0 -1
- package/dist/integrations/providers/index.d.ts +0 -6
- package/dist/integrations/providers/index.d.ts.map +0 -1
- package/dist/integrations/providers/index.js +0 -25
- package/dist/integrations/providers/index.js.map +0 -1
- package/dist/integrations/providers/instagram.d.ts +0 -9
- package/dist/integrations/providers/instagram.d.ts.map +0 -1
- package/dist/integrations/providers/instagram.js +0 -47
- package/dist/integrations/providers/instagram.js.map +0 -1
- package/dist/integrations/providers/metadata.d.ts +0 -25
- package/dist/integrations/providers/metadata.d.ts.map +0 -1
- package/dist/integrations/providers/metadata.js +0 -407
- package/dist/integrations/providers/metadata.js.map +0 -1
- package/dist/integrations/providers/types.d.ts +0 -39
- package/dist/integrations/providers/types.d.ts.map +0 -1
- package/dist/integrations/providers/types.js +0 -2
- package/dist/integrations/providers/types.js.map +0 -1
- package/dist/integrations/providers/x.d.ts +0 -9
- package/dist/integrations/providers/x.d.ts.map +0 -1
- package/dist/integrations/providers/x.js +0 -78
- package/dist/integrations/providers/x.js.map +0 -1
- package/dist/reducers/record_reducer.d.ts +0 -25
- package/dist/reducers/record_reducer.d.ts.map +0 -1
- package/dist/reducers/record_reducer.js +0 -93
- package/dist/reducers/record_reducer.js.map +0 -1
- package/dist/reducers/reducer_registry.d.ts +0 -47
- package/dist/reducers/reducer_registry.d.ts.map +0 -1
- package/dist/reducers/reducer_registry.js +0 -82
- package/dist/reducers/reducer_registry.js.map +0 -1
- package/dist/repositories/db/event_repo.d.ts +0 -14
- package/dist/repositories/db/event_repo.d.ts.map +0 -1
- package/dist/repositories/db/event_repo.js +0 -67
- package/dist/repositories/db/event_repo.js.map +0 -1
- package/dist/repositories/db/state_repo.d.ts +0 -14
- package/dist/repositories/db/state_repo.d.ts.map +0 -1
- package/dist/repositories/db/state_repo.js +0 -61
- package/dist/repositories/db/state_repo.js.map +0 -1
- package/dist/repositories/file/event_repo.d.ts +0 -18
- package/dist/repositories/file/event_repo.d.ts.map +0 -1
- package/dist/repositories/file/event_repo.js +0 -148
- package/dist/repositories/file/event_repo.js.map +0 -1
- package/dist/repositories/file/state_repo.d.ts +0 -21
- package/dist/repositories/file/state_repo.d.ts.map +0 -1
- package/dist/repositories/file/state_repo.js +0 -89
- package/dist/repositories/file/state_repo.js.map +0 -1
- package/dist/repositories/sqlite/supabase_adapter.d.ts +0 -135
- package/dist/repositories/sqlite/supabase_adapter.d.ts.map +0 -1
- package/dist/repositories/sqlite/supabase_adapter.js +0 -810
- package/dist/repositories/sqlite/supabase_adapter.js.map +0 -1
- package/dist/services/connectors.d.ts +0 -89
- package/dist/services/connectors.d.ts.map +0 -1
- package/dist/services/connectors.js +0 -248
- package/dist/services/connectors.js.map +0 -1
- package/dist/services/event_generation.d.ts +0 -37
- package/dist/services/event_generation.d.ts.map +0 -1
- package/dist/services/event_generation.js +0 -236
- package/dist/services/event_generation.js.map +0 -1
- package/dist/services/extraction/rules.d.ts +0 -26
- package/dist/services/extraction/rules.d.ts.map +0 -1
- package/dist/services/extraction/rules.js +0 -691
- package/dist/services/extraction/rules.js.map +0 -1
- package/dist/services/file_analysis.d.ts +0 -38
- package/dist/services/file_analysis.d.ts.map +0 -1
- package/dist/services/file_analysis.js +0 -325
- package/dist/services/file_analysis.js.map +0 -1
- package/dist/services/graph_builder.d.ts +0 -51
- package/dist/services/graph_builder.d.ts.map +0 -1
- package/dist/services/graph_builder.js +0 -279
- package/dist/services/graph_builder.js.map +0 -1
- package/dist/services/importers.d.ts +0 -28
- package/dist/services/importers.d.ts.map +0 -1
- package/dist/services/importers.js +0 -174
- package/dist/services/importers.js.map +0 -1
- package/dist/services/observation_ingestion.d.ts +0 -26
- package/dist/services/observation_ingestion.d.ts.map +0 -1
- package/dist/services/observation_ingestion.js +0 -364
- package/dist/services/observation_ingestion.js.map +0 -1
- package/dist/services/payload_compiler.d.ts +0 -36
- package/dist/services/payload_compiler.d.ts.map +0 -1
- package/dist/services/payload_compiler.js +0 -121
- package/dist/services/payload_compiler.js.map +0 -1
- package/dist/services/payload_identity.d.ts +0 -35
- package/dist/services/payload_identity.d.ts.map +0 -1
- package/dist/services/payload_identity.js +0 -101
- package/dist/services/payload_identity.js.map +0 -1
- package/dist/services/payload_schema.d.ts +0 -104
- package/dist/services/payload_schema.d.ts.map +0 -1
- package/dist/services/payload_schema.js +0 -46
- package/dist/services/payload_schema.js.map +0 -1
- package/dist/services/plaid_sync.d.ts +0 -77
- package/dist/services/plaid_sync.d.ts.map +0 -1
- package/dist/services/plaid_sync.js +0 -273
- package/dist/services/plaid_sync.js.map +0 -1
- package/dist/services/record_comparison.d.ts +0 -29
- package/dist/services/record_comparison.d.ts.map +0 -1
- package/dist/services/record_comparison.js +0 -84
- package/dist/services/record_comparison.js.map +0 -1
- package/dist/services/records.d.ts +0 -31
- package/dist/services/records.d.ts.map +0 -1
- package/dist/services/records.js +0 -184
- package/dist/services/records.js.map +0 -1
- package/dist/services/search.d.ts +0 -15
- package/dist/services/search.d.ts.map +0 -1
- package/dist/services/search.js +0 -81
- package/dist/services/search.js.map +0 -1
- package/dist/services/summary.d.ts +0 -5
- package/dist/services/summary.d.ts.map +0 -1
- package/dist/services/summary.js +0 -118
- package/dist/services/summary.js.map +0 -1
- package/docs/NEOTOMA_MANIFEST.md +0 -152
- package/docs/api/rest_api.md +0 -466
- package/docs/architecture/agentic_portfolio_overview.md +0 -99
- package/docs/architecture/agentic_wallet_overview.md +0 -93
- package/docs/architecture/architectural_decisions.md +0 -462
- package/docs/architecture/architecture.md +0 -842
- package/docs/architecture/blockchain_readiness_assessment.md +0 -248
- package/docs/architecture/consistency.md +0 -539
- package/docs/architecture/conversational_ux_architecture.md +0 -240
- package/docs/architecture/determinism.md +0 -762
- package/docs/architecture/idempotence_pattern.md +0 -139
- package/docs/architecture/mcp_actions_assessment.md +0 -182
- package/docs/architecture/ner_vs_schema_first_extraction.md +0 -280
- package/docs/architecture/schema_expansion.md +0 -260
- package/docs/architecture/schema_handling.md +0 -209
- package/docs/architecture/source_material_model.md +0 -281
- package/docs/assets/neotoma_banner.png +0 -0
- package/docs/conventions/TEST_EXECUTION_IMPROVEMENTS.md +0 -205
- package/docs/conventions/always_on_rules_review.md +0 -66
- package/docs/conventions/code_conventions_implementation.md +0 -111
- package/docs/conventions/code_conventions_plan.md +0 -124
- package/docs/conventions/code_review_summary.md +0 -96
- package/docs/conventions/documentation_standards.md +0 -104
- package/docs/conventions/estimation_methodology.md +0 -146
- package/docs/conventions/file_naming_migration_status.md +0 -94
- package/docs/conventions/readme_generation_framework.md +0 -230
- package/docs/conventions/time_tracking_template.md +0 -60
- package/docs/conventions/writing_style_guide.md +0 -252
- package/docs/developer/agent_cli_configuration.md +0 -140
- package/docs/developer/agent_instructions_sync_rules.mdc +0 -97
- package/docs/developer/canonical_walkthrough.md +0 -137
- package/docs/developer/cli_agent_instructions.md +0 -141
- package/docs/developer/cli_overview.md +0 -207
- package/docs/developer/cli_reference.md +0 -518
- package/docs/developer/developer_preview_launch_checklist.md +0 -128
- package/docs/developer/developer_preview_storage.md +0 -35
- package/docs/developer/developer_release_manual_test_checklist.md +0 -209
- package/docs/developer/development_workflow.md +0 -308
- package/docs/developer/environment/CONNECTOR_SECRET_KEY_SETUP.md +0 -96
- package/docs/developer/environment/DEV_CONNECTOR_SECRET_KEY_EXPLANATION.md +0 -80
- package/docs/developer/environment/ENV_MAPPINGS_STATUS.md +0 -86
- package/docs/developer/environment/ENV_VAR_NAMING_STRATEGY.md +0 -145
- package/docs/developer/environment/MIGRATION_TO_SINGLE_VAR_NAMES.md +0 -89
- package/docs/developer/environment/QUICK_START_1PASSWORD.md +0 -126
- package/docs/developer/environment/README.md +0 -27
- package/docs/developer/environment/SETUP_ENV_MAPPINGS.md +0 -256
- package/docs/developer/environment_distinction_audit.md +0 -43
- package/docs/developer/fix_doc_inconsistencies_plan.md +0 -63
- package/docs/developer/getting_started.md +0 -100
- package/docs/developer/import_interpretation_debug.md +0 -69
- package/docs/developer/launchd_dev_servers.md +0 -51
- package/docs/developer/launchd_watch_build.md +0 -37
- package/docs/developer/mcp/instructions.md +0 -71
- package/docs/developer/mcp/invalid_connection_id_handling.md +0 -181
- package/docs/developer/mcp/tool_descriptions.yaml +0 -41
- package/docs/developer/mcp/unauthenticated.md +0 -30
- package/docs/developer/mcp_chatgpt_setup.md +0 -159
- package/docs/developer/mcp_claude_code_setup.md +0 -519
- package/docs/developer/mcp_https_testing.md +0 -178
- package/docs/developer/mcp_https_testing_status.md +0 -130
- package/docs/developer/mcp_https_tunnel_status.md +0 -147
- package/docs/developer/mcp_oauth_migration_guide.md +0 -196
- package/docs/developer/mcp_overview.md +0 -145
- package/docs/developer/mcp_server_examples_from_cursor_docs.md +0 -485
- package/docs/developer/observation_architecture_documentation_integration.md +0 -368
- package/docs/developer/release_orchestrator.md +0 -197
- package/docs/developer/repository_cleanup_plan.md +0 -87
- package/docs/developer/resolved_blockers.md +0 -49
- package/docs/developer/schema_initialization.md +0 -182
- package/docs/developer/secrets/README.md +0 -15
- package/docs/developer/secrets/secrets_architecture.md +0 -95
- package/docs/developer/secrets/secrets_manager_value.md +0 -53
- package/docs/developer/secrets/secrets_secure_approach.md +0 -103
- package/docs/developer/secrets/secrets_setup.md +0 -116
- package/docs/developer/shared_components_submodule_setup.md +0 -273
- package/docs/developer/spec_compliance_validation_system.md +0 -261
- package/docs/developer/test_coverage_gap_analysis_plan.md +0 -36
- package/docs/developer/tunnels.md +0 -327
- package/docs/developer/vite_troubleshooting.md +0 -111
- package/docs/doc_dependencies.yaml +0 -497
- package/docs/examples/schema_breaking_change_reconciliation.md +0 -515
- package/docs/feature_units/completed/FU-050/FU-050_spec.md +0 -341
- package/docs/feature_units/completed/FU-050/manifest.yaml +0 -330
- package/docs/feature_units/completed/FU-051/FU-051_spec.md +0 -173
- package/docs/feature_units/completed/FU-051/manifest.yaml +0 -229
- package/docs/feature_units/completed/FU-052/FU-052_spec.md +0 -158
- package/docs/feature_units/completed/FU-052/manifest.yaml +0 -188
- package/docs/feature_units/completed/FU-053/FU-053_spec.md +0 -144
- package/docs/feature_units/completed/FU-053/manifest.yaml +0 -145
- package/docs/feature_units/completed/FU-054/FU-054_spec.md +0 -144
- package/docs/feature_units/completed/FU-054/manifest.yaml +0 -139
- package/docs/feature_units/completed/FU-702/billing_spec.md +0 -413
- package/docs/feature_units/completed/FU-702/manifest.yaml +0 -418
- package/docs/feature_units/standards/DISCOVERY_CAGAN_ALIGNMENT.md +0 -214
- package/docs/feature_units/standards/creating_feature_units.md +0 -385
- package/docs/feature_units/standards/discovery_process.md +0 -821
- package/docs/feature_units/standards/error_protocol.md +0 -60
- package/docs/feature_units/standards/execution_instructions.md +0 -87
- package/docs/feature_units/standards/feature_unit_spec.md +0 -325
- package/docs/feature_units/standards/integration_test_execution.md +0 -127
- package/docs/feature_units/standards/manifest_template.yaml +0 -370
- package/docs/feature_units/standards/model_selection.md +0 -207
- package/docs/feature_units/standards/multi_agent_orchestration.md +0 -411
- package/docs/feature_units/standards/release_report_generation.md +0 -448
- package/docs/feature_units/standards/release_report_spec.md +0 -444
- package/docs/feature_units/standards/release_report_template.md +0 -76
- package/docs/feature_units/standards/spec_compliance_validation.md +0 -147
- package/docs/feature_units/standards/worker_agent_template.md +0 -191
- package/docs/foundation/ai_safety.md +0 -10
- package/docs/foundation/composability_analysis.md +0 -308
- package/docs/foundation/core_identity.md +0 -50
- package/docs/foundation/documentation_design_system.md +0 -505
- package/docs/foundation/entity_resolution.md +0 -34
- package/docs/foundation/layered_architecture.md +0 -99
- package/docs/foundation/mmry_comparison.md +0 -176
- package/docs/foundation/philosophy.md +0 -103
- package/docs/foundation/problem_statement.md +0 -41
- package/docs/foundation/product_positioning.md +0 -69
- package/docs/foundation/product_principles.md +0 -18
- package/docs/foundation/quality_requirements.md +0 -68
- package/docs/foundation/timeline_events.md +0 -19
- package/docs/foundation/user_workflows.md +0 -38
- package/docs/implementation/PARQUET_MCP_SERVER_FIXES.md +0 -373
- package/docs/implementation/PARQUET_SUPPORT_IMPLEMENTATION.md +0 -207
- package/docs/infrastructure/deployment.md +0 -372
- package/docs/legal/README.md +0 -51
- package/docs/legal/compliance.md +0 -854
- package/docs/legal/privacy_policy.md +0 -114
- package/docs/legal/privacy_policy_changelog.md +0 -49
- package/docs/legal/terms_of_service.md +0 -185
- package/docs/legal/terms_of_service_changelog.md +0 -62
- package/docs/migration/llm_extraction_removal.md +0 -387
- package/docs/migration/llm_interpretation_docs_update.md +0 -130
- package/docs/observability/logging.md +0 -50
- package/docs/observability/metrics_standard.md +0 -38
- package/docs/observability/tracing.md +0 -41
- package/docs/operations/debugging/README.md +0 -11
- package/docs/operations/debugging/error_debug_instructions.md +0 -55
- package/docs/operations/health_check.md +0 -73
- package/docs/operations/runbook.md +0 -88
- package/docs/prompts/llm_extraction_system_prompt.md +0 -31
- package/docs/proposals/IMPLEMENTATION_SUMMARY.md +0 -198
- package/docs/proposals/MIGRATION_REPORT.md +0 -65
- package/docs/proposals/PROPOSAL_TEMPLATE.md +0 -58
- package/docs/proposals/README.md +0 -57
- package/docs/proposals/agent-trust-framework.md +0 -621
- package/docs/proposals/conversation_turn_identity_reverts_forks.md +0 -144
- package/docs/proposals/document-v023-release.md +0 -898
- package/docs/proposals/iterative_chat_store_mcp_instructions.md +0 -155
- package/docs/proposals/llm_sampling_parameters_interpretation_config.md +0 -196
- package/docs/proposals/mcp-cli-action-items.md +0 -207
- package/docs/proposals/plan-migration-command-integrated-with-commit.md +0 -386
- package/docs/proposals/sources-first-ingestion-v10.md +0 -348
- package/docs/proposals/test-coverage-gap-analysis.md +0 -26
- package/docs/prototypes/PROTOTYPE_QUICKSTART.md +0 -56
- package/docs/prototypes/README.md +0 -74
- package/docs/reference/error_codes.md +0 -223
- package/docs/releases/archived/aspirational/README.md +0 -57
- package/docs/releases/archived/aspirational/v0.4.0/manifest.yaml +0 -94
- package/docs/releases/archived/aspirational/v0.4.0/release_plan.md +0 -51
- package/docs/releases/archived/aspirational/v0.5.0/manifest.yaml +0 -152
- package/docs/releases/archived/aspirational/v0.5.0/release_plan.md +0 -236
- package/docs/releases/archived/aspirational/v0.9.0/README.md +0 -78
- package/docs/releases/archived/aspirational/v0.9.0/manifest.yaml +0 -111
- package/docs/releases/archived/aspirational/v0.9.0/release_plan.md +0 -238
- package/docs/releases/archived/aspirational/v0.9.0/status.md +0 -89
- package/docs/releases/archived/aspirational/v1.0.0/UI_REFACTORING_PLAN.md +0 -239
- package/docs/releases/archived/aspirational/v1.0.0/acceptance_criteria.md +0 -88
- package/docs/releases/archived/aspirational/v1.0.0/approach_comparison.md +0 -558
- package/docs/releases/archived/aspirational/v1.0.0/architectural_impact_chat_ui.md +0 -195
- package/docs/releases/archived/aspirational/v1.0.0/blog_post_update_directives.md +0 -491
- package/docs/releases/archived/aspirational/v1.0.0/business_viability_discovery_plan.md +0 -135
- package/docs/releases/archived/aspirational/v1.0.0/compliance_reports/FU-100_compliance.md +0 -23
- package/docs/releases/archived/aspirational/v1.0.0/compliance_reports/FU-101_compliance.md +0 -23
- package/docs/releases/archived/aspirational/v1.0.0/compliance_reports/FU-102_compliance.md +0 -23
- package/docs/releases/archived/aspirational/v1.0.0/compliance_reports/FU-103_compliance.md +0 -23
- package/docs/releases/archived/aspirational/v1.0.0/compliance_reports/FU-105_compliance.md +0 -23
- package/docs/releases/archived/aspirational/v1.0.0/continuous_discovery_log.md +0 -77
- package/docs/releases/archived/aspirational/v1.0.0/continuous_discovery_plan.md +0 -145
- package/docs/releases/archived/aspirational/v1.0.0/cross_platform_signal_detection.md +0 -181
- package/docs/releases/archived/aspirational/v1.0.0/deployment_strategy.md +0 -115
- package/docs/releases/archived/aspirational/v1.0.0/discovery_checklist.md +0 -195
- package/docs/releases/archived/aspirational/v1.0.0/discovery_filtering_criteria.md +0 -197
- package/docs/releases/archived/aspirational/v1.0.0/discovery_filtering_keywords.md +0 -143
- package/docs/releases/archived/aspirational/v1.0.0/discovery_lead_sourcing_tools.md +0 -438
- package/docs/releases/archived/aspirational/v1.0.0/discovery_plan.md +0 -185
- package/docs/releases/archived/aspirational/v1.0.0/execution_schedule.md +0 -130
- package/docs/releases/archived/aspirational/v1.0.0/feasibility_validation_plan.md +0 -116
- package/docs/releases/archived/aspirational/v1.0.0/handle_registration.md +0 -263
- package/docs/releases/archived/aspirational/v1.0.0/implementation_logs/FU-100_implementation_log.md +0 -51
- package/docs/releases/archived/aspirational/v1.0.0/implementation_logs/FU-101_implementation_log.md +0 -51
- package/docs/releases/archived/aspirational/v1.0.0/implementation_logs/FU-102_implementation_log.md +0 -51
- package/docs/releases/archived/aspirational/v1.0.0/implementation_logs/FU-103_implementation_log.md +0 -51
- package/docs/releases/archived/aspirational/v1.0.0/implementation_logs/FU-105_implementation_log.md +0 -51
- package/docs/releases/archived/aspirational/v1.0.0/manifest.yaml +0 -160
- package/docs/releases/archived/aspirational/v1.0.0/marketing_agent_instructions.md +0 -209
- package/docs/releases/archived/aspirational/v1.0.0/marketing_automation_implementation.md +0 -996
- package/docs/releases/archived/aspirational/v1.0.0/marketing_automation_plan.md +0 -291
- package/docs/releases/archived/aspirational/v1.0.0/marketing_dogfooding_analysis.md +0 -295
- package/docs/releases/archived/aspirational/v1.0.0/marketing_metrics_plan.md +0 -120
- package/docs/releases/archived/aspirational/v1.0.0/marketing_plan.md +0 -280
- package/docs/releases/archived/aspirational/v1.0.0/marketing_segments_plan.md +0 -128
- package/docs/releases/archived/aspirational/v1.0.0/participant_recruitment_log.md +0 -392
- package/docs/releases/archived/aspirational/v1.0.0/post_launch_marketing_plan.md +0 -252
- package/docs/releases/archived/aspirational/v1.0.0/pre_launch_marketing_plan.md +0 -748
- package/docs/releases/archived/aspirational/v1.0.0/pre_mortem.md +0 -122
- package/docs/releases/archived/aspirational/v1.0.0/subscription_detection_strategy.md +0 -160
- package/docs/releases/archived/aspirational/v1.0.0/usability_discovery_plan.md +0 -115
- package/docs/releases/archived/aspirational/v1.0.0/value_discovery_plan.md +0 -279
- package/docs/releases/archived/aspirational/v1.0.0/visibility_timing_analysis.md +0 -402
- package/docs/releases/archived/aspirational/v2.0.0/status.md +0 -120
- package/docs/releases/archived/aspirational/v2.1.0/manifest.yaml +0 -469
- package/docs/releases/archived/aspirational/v2.2.0/manifest.yaml +0 -165
- package/docs/releases/archived/aspirational/v2.2.0/status.md +0 -283
- package/docs/releases/compliance_reports/all_fus_compliance_summary.md +0 -112
- package/docs/releases/in_progress/v0.2.0/agent_status.json +0 -420
- package/docs/releases/in_progress/v0.2.0/status.md +0 -90
- package/docs/releases/v0.1.0/agent_status.json +0 -242
- package/docs/releases/v0.1.0/agent_status.json.example +0 -76
- package/docs/releases/v0.1.0/compliance_reports/FU-000_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-002_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-050_compliance.md +0 -59
- package/docs/releases/v0.1.0/compliance_reports/FU-051_compliance.md +0 -39
- package/docs/releases/v0.1.0/compliance_reports/FU-052_compliance.md +0 -44
- package/docs/releases/v0.1.0/compliance_reports/FU-053_compliance.md +0 -25
- package/docs/releases/v0.1.0/compliance_reports/FU-054_compliance.md +0 -31
- package/docs/releases/v0.1.0/compliance_reports/FU-055_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-056_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-057_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-058_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-059_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-061_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-100_compliance.md +0 -97
- package/docs/releases/v0.1.0/compliance_reports/FU-104_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-200_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-201_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-202_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-203_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-204_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-205_compliance.md +0 -23
- package/docs/releases/v0.1.0/compliance_reports/FU-206_compliance.md +0 -23
- package/docs/releases/v0.1.0/execution_schedule.md +0 -174
- package/docs/releases/v0.1.0/fu_spec_status.md +0 -83
- package/docs/releases/v0.1.0/implementation_logs/FU-000_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-002_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-050_implementation_log.md +0 -111
- package/docs/releases/v0.1.0/implementation_logs/FU-051_implementation_log.md +0 -91
- package/docs/releases/v0.1.0/implementation_logs/FU-052_implementation_log.md +0 -81
- package/docs/releases/v0.1.0/implementation_logs/FU-053_implementation_log.md +0 -71
- package/docs/releases/v0.1.0/implementation_logs/FU-054_implementation_log.md +0 -71
- package/docs/releases/v0.1.0/implementation_logs/FU-055_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-056_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-057_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-058_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-059_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-061_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-100_implementation_log.md +0 -251
- package/docs/releases/v0.1.0/implementation_logs/FU-104_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-200_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-201_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-202_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-203_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-204_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-205_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/implementation_logs/FU-206_implementation_log.md +0 -51
- package/docs/releases/v0.1.0/integration_tests.md +0 -316
- package/docs/releases/v0.1.0/manifest.yaml +0 -291
- package/docs/releases/v0.1.0/mcp_actions_status.md +0 -101
- package/docs/releases/v0.1.0/release_plan.md +0 -196
- package/docs/releases/v0.1.0/status.md +0 -148
- package/docs/releases/v0.1.0/test_coverage_setup_notes.md +0 -39
- package/docs/releases/v0.1.1/manifest.yaml +0 -153
- package/docs/releases/v0.2.0/status.md +0 -167
- package/docs/releases/v0.2.1/acceptance_criteria.md +0 -200
- package/docs/releases/v0.2.1/execution_schedule.md +0 -114
- package/docs/releases/v0.2.1/feature_unit_overview.md +0 -246
- package/docs/releases/v0.2.1/integration_tests.md +0 -281
- package/docs/releases/v0.2.1/manifest.yaml +0 -141
- package/docs/releases/v0.2.1/release_plan.md +0 -211
- package/docs/releases/v0.2.1/status.md +0 -106
- package/docs/releases/v0.2.15/README.md +0 -79
- package/docs/releases/v0.2.15/migrations/01_add_source_graph_edges.sql +0 -109
- package/docs/releases/v0.2.15/migrations/02_drop_legacy_tables.sql +0 -130
- package/docs/releases/v0.2.2/execution_schedule.md +0 -123
- package/docs/releases/v0.2.2/integration_tests.md +0 -258
- package/docs/releases/v0.2.2/manifest.yaml +0 -108
- package/docs/releases/v0.2.2/release_plan.md +0 -246
- package/docs/releases/v0.2.2/status.md +0 -113
- package/docs/releases/v0.2.3/agent_skills_alignment.md +0 -738
- package/docs/releases/v0.2.3/enhancements_summary.md +0 -309
- package/docs/releases/v0.2.3/integration_guide.md +0 -3400
- package/docs/releases/v0.2.3/manifest.yaml +0 -212
- package/docs/releases/v0.2.3/mcp_actions.md +0 -491
- package/docs/releases/v0.2.3/plan_completion_review.md +0 -410
- package/docs/releases/v0.2.3/release_overview.md +0 -13
- package/docs/releases/v0.2.3/schema_extensions/agent_decision.md +0 -311
- package/docs/releases/v0.2.3/schema_extensions/agent_session.md +0 -464
- package/docs/releases/v0.2.3/schema_extensions/architectural_decision.md +0 -390
- package/docs/releases/v0.2.3/schema_extensions/codebase_entity.md +0 -404
- package/docs/releases/v0.2.3/schema_extensions/feature_unit.md +0 -307
- package/docs/releases/v0.2.3/schema_extensions/release.md +0 -338
- package/docs/releases/v0.2.3/schema_extensions/validation_result.md +0 -377
- package/docs/releases/v0.2.3/spec.md +0 -569
- package/docs/releases/v0.3.0/manifest.yaml +0 -77
- package/docs/releases/v0.3.0/migrations/01_add_source_graph_edges.sql +0 -110
- package/docs/releases/v0.3.0/migrations/02_drop_legacy_tables.sql +0 -131
- package/docs/releases/v0.3.0/status.md +0 -193
- package/docs/reports/AUTO_ENHANCEMENT_TEST_RESULTS.md +0 -51
- package/docs/reports/AUTO_ENHANCEMENT_TEST_SUMMARY.md +0 -64
- package/docs/reports/BIGINT_SERIALIZATION_DEBUG.md +0 -75
- package/docs/reports/BUG_LEARNING_PROTOCOL_ESTABLISHED.md +0 -179
- package/docs/reports/CONSOLE_LOG_MCP_PROTOCOL_FIX.md +0 -58
- package/docs/reports/CRYPTO_TRANSACTION_DISCREPANCY_RESOLUTION.md +0 -108
- package/docs/reports/CRYPTO_TRANSACTION_SIDE_BY_SIDE_COMPARISON.md +0 -165
- package/docs/reports/FAILING_TESTS_ANALYSIS.md +0 -140
- package/docs/reports/FAILING_TESTS_SUMMARY.md +0 -106
- package/docs/reports/FINAL_PARQUET_COMPARISON.md +0 -226
- package/docs/reports/FINAL_TEST_STATUS.md +0 -145
- package/docs/reports/LEGACY_REMOVAL_SUMMARY.md +0 -108
- package/docs/reports/MCP_ACTIONS_SUMMARY.md +0 -329
- package/docs/reports/MCP_ACTION_TEST_COVERAGE.md +0 -132
- package/docs/reports/MCP_SPEC_COMPARISON.md +0 -306
- package/docs/reports/MCP_SPEC_COMPARISON_UPDATED.md +0 -247
- package/docs/reports/MCP_SPEC_VOCABULARY_CONFORMANCE.md +0 -220
- package/docs/reports/MCP_TEST_SUITE_IMPLEMENTATION.md +0 -180
- package/docs/reports/MCP_TEST_SUITE_RESULTS.md +0 -182
- package/docs/reports/PARQUET_MCP_BUG_REPORT.md +0 -70
- package/docs/reports/PARQUET_MCP_STORAGE_COMPLETE.md +0 -214
- package/docs/reports/PARQUET_SAMPLE_FILES_CREATED.md +0 -49
- package/docs/reports/PARQUET_STORAGE_SUCCESS.md +0 -263
- package/docs/reports/PARQUET_VS_NEOTOMA_COMPARISON.md +0 -241
- package/docs/reports/REIMPORT_TASKS_BLOCKER.md +0 -50
- package/docs/reports/SAMPLE_FILE_STRUCTURE_UPDATE.md +0 -68
- package/docs/reports/SAMPLE_PARQUET_IMPORT_TEST_RESULTS.md +0 -91
- package/docs/reports/SCHEMA_ENHANCEMENT_STATUS.md +0 -84
- package/docs/reports/SCHEMA_ENHANCEMENT_TEST_RESULTS.md +0 -78
- package/docs/reports/TASK_RELOAD_BLOCKER.md +0 -40
- package/docs/reports/TEST_FIXES_SUMMARY.md +0 -96
- package/docs/reports/VOCABULARY_CONFORMANCE_REVIEW.md +0 -177
- package/docs/reports/WHY_TESTS_MISSED_BIGINT_ISSUE.md +0 -144
- package/docs/reports/beyond_rag_agent_memory_neotoma_architecture_report.md +0 -103
- package/docs/reports/dhh_clankers_with_claws_neotoma_report.md +0 -102
- package/docs/reports/dr_cintas_pageindex_structure_over_embeddings_report.md +0 -77
- package/docs/reports/failure_gallery.md +0 -97
- package/docs/reports/fixture_expansion_summary.md +0 -204
- package/docs/reports/mcp_action_names_review.md +0 -131
- package/docs/reports/mcp_cli_action_items_fidelity_report.md +0 -189
- package/docs/reports/neotoma_pdf_interpreted_as_note_investigation_2026_02_23.md +0 -89
- package/docs/reports/plan_execution_changes_report.md +0 -122
- package/docs/reports/schema_distinctions.md +0 -210
- package/docs/reports/schema_redundancy_analysis.md +0 -304
- package/docs/specs/FUNCTIONAL_REQUIREMENTS.md +0 -160
- package/docs/specs/GENERAL_REQUIREMENTS.md +0 -30
- package/docs/specs/ICP_PRIORITY_TIERS.md +0 -132
- package/docs/specs/ICP_PROFILES.md +0 -2345
- package/docs/specs/INTERNAL_MCP_RELEASE.md +0 -300
- package/docs/specs/MANIFEST_ALIGNMENT_SUMMARY.md +0 -162
- package/docs/specs/MCP_SPEC.md +0 -2275
- package/docs/specs/METRICS_REQUIREMENTS.md +0 -386
- package/docs/specs/MVP_EXECUTION_PLAN.md +0 -956
- package/docs/specs/MVP_FEATURE_UNITS.md +0 -1821
- package/docs/specs/MVP_OVERVIEW.md +0 -184
- package/docs/specs/NONFUNCTIONAL_REQUIREMENTS.md +0 -98
- package/docs/specs/ONBOARDING_SPEC.md +0 -591
- package/docs/specs/PARQUET_MCP_RESOURCES_SPEC.md +0 -328
- package/docs/specs/TEST_PLAN.md +0 -116
- package/docs/specs/UI_SPEC.md +0 -93
- package/docs/subsystems/accessibility.md +0 -48
- package/docs/subsystems/auth.md +0 -170
- package/docs/subsystems/deletion.md +0 -494
- package/docs/subsystems/entity_merge.md +0 -300
- package/docs/subsystems/errors.md +0 -82
- package/docs/subsystems/events.md +0 -50
- package/docs/subsystems/i18n.md +0 -42
- package/docs/subsystems/ingestion/ingestion.md +0 -772
- package/docs/subsystems/ingestion/state_machines.md +0 -49
- package/docs/subsystems/observation_architecture.md +0 -379
- package/docs/subsystems/privacy.md +0 -71
- package/docs/subsystems/record_types.md +0 -753
- package/docs/subsystems/reducer.md +0 -436
- package/docs/subsystems/relationships.md +0 -455
- package/docs/subsystems/schema.md +0 -1213
- package/docs/subsystems/schema_registry.md +0 -588
- package/docs/subsystems/schema_snapshots/.gitkeep +0 -6
- package/docs/subsystems/schema_snapshots/README.md +0 -209
- package/docs/subsystems/schema_snapshots/account/v1.0.json +0 -52
- package/docs/subsystems/schema_snapshots/address/v1.0.json +0 -79
- package/docs/subsystems/schema_snapshots/agent_message/v1.0.json +0 -96
- package/docs/subsystems/schema_snapshots/balance/v1.0.json +0 -64
- package/docs/subsystems/schema_snapshots/company/v1.0.json +0 -86
- package/docs/subsystems/schema_snapshots/contact/v1.0.json +0 -68
- package/docs/subsystems/schema_snapshots/contact/v1.1.json +0 -112
- package/docs/subsystems/schema_snapshots/contract/v1.0.json +0 -48
- package/docs/subsystems/schema_snapshots/conversation/v1.0.json +0 -102
- package/docs/subsystems/schema_snapshots/crypto_transaction/v1.0.json +0 -76
- package/docs/subsystems/schema_snapshots/email/v1.0.json +0 -87
- package/docs/subsystems/schema_snapshots/event/v1.0.json +0 -79
- package/docs/subsystems/schema_snapshots/exercise/v1.0.json +0 -72
- package/docs/subsystems/schema_snapshots/fixed_cost/v1.0.json +0 -112
- package/docs/subsystems/schema_snapshots/flow/v1.0.json +0 -84
- package/docs/subsystems/schema_snapshots/goal/v1.0.json +0 -71
- package/docs/subsystems/schema_snapshots/holding/v1.0.json +0 -75
- package/docs/subsystems/schema_snapshots/income/v1.0.json +0 -68
- package/docs/subsystems/schema_snapshots/liability/v1.0.json +0 -60
- package/docs/subsystems/schema_snapshots/location/v1.0.json +0 -79
- package/docs/subsystems/schema_snapshots/meal/v1.0.json +0 -68
- package/docs/subsystems/schema_snapshots/message/v1.0.json +0 -72
- package/docs/subsystems/schema_snapshots/note/v1.0.json +0 -64
- package/docs/subsystems/schema_snapshots/order/v1.0.json +0 -72
- package/docs/subsystems/schema_snapshots/person/v1.0.json +0 -86
- package/docs/subsystems/schema_snapshots/project/v1.0.json +0 -75
- package/docs/subsystems/schema_snapshots/property/v1.0.json +0 -64
- package/docs/subsystems/schema_snapshots/purchase/v1.0.json +0 -75
- package/docs/subsystems/schema_snapshots/relationship/v1.0.json +0 -63
- package/docs/subsystems/schema_snapshots/task/v1.0.json +0 -91
- package/docs/subsystems/schema_snapshots/tax_event/v1.0.json +0 -72
- package/docs/subsystems/schema_snapshots/tax_filing/v1.0.json +0 -83
- package/docs/subsystems/schema_snapshots/transaction/v1.0.json +0 -40
- package/docs/subsystems/schema_snapshots/transfer/v1.0.json +0 -76
- package/docs/subsystems/schema_snapshots/wallet/v1.0.json +0 -68
- package/docs/subsystems/search/search.md +0 -63
- package/docs/subsystems/sources.md +0 -493
- package/docs/subsystems/vector_ops.md +0 -72
- package/docs/templates/issue_template.md +0 -36
- package/docs/templates/pr_template.md +0 -74
- package/docs/testing/ROUTE_COVERAGE_MATRIX.md +0 -104
- package/docs/testing/WHY_PARTIAL_ROUTE_COVERAGE.md +0 -183
- package/docs/testing/automated_test_catalog.md +0 -353
- package/docs/testing/cli_command_coverage_review.md +0 -130
- package/docs/testing/fixtures_standard.md +0 -202
- package/docs/testing/test_coverage_audit_summary.md +0 -571
- package/docs/testing/testing_standard.md +0 -146
- package/docs/ui/DESIGN_SYSTEM_UPDATE_SUMMARY.md +0 -152
- package/docs/ui/SHADCN_INTEGRATION_COMPLETE.md +0 -255
- package/docs/ui/design_constraints_template.yaml +0 -228
- package/docs/ui/design_system/accessibility.md +0 -38
- package/docs/ui/design_system/authentication_components.md +0 -38
- package/docs/ui/design_system/billing_components.md +0 -36
- package/docs/ui/design_system/brand_alignment.md +0 -35
- package/docs/ui/design_system/color_palette.md +0 -95
- package/docs/ui/design_system/component_styles.md +0 -241
- package/docs/ui/design_system/dark_mode.md +0 -30
- package/docs/ui/design_system/empty_states.md +0 -47
- package/docs/ui/design_system/error_states.md +0 -35
- package/docs/ui/design_system/file_upload_components.md +0 -60
- package/docs/ui/design_system/future_considerations.md +0 -19
- package/docs/ui/design_system/iconography.md +0 -21
- package/docs/ui/design_system/icp_aesthetic_analysis.md +0 -35
- package/docs/ui/design_system/icp_preference_alignment.md +0 -33
- package/docs/ui/design_system/implementation_notes.md +0 -119
- package/docs/ui/design_system/loading_states.md +0 -40
- package/docs/ui/design_system/motion_and_animation.md +0 -45
- package/docs/ui/design_system/navigation_components.md +0 -63
- package/docs/ui/design_system/onboarding_components.md +0 -48
- package/docs/ui/design_system/responsive_design.md +0 -26
- package/docs/ui/design_system/search_components.md +0 -32
- package/docs/ui/design_system/settings_components.md +0 -29
- package/docs/ui/design_system/spacing_and_layout.md +0 -67
- package/docs/ui/design_system/style_guide.md +0 -395
- package/docs/ui/design_system/typography.md +0 -88
- package/docs/ui/design_system/visual_hierarchy.md +0 -64
- package/docs/ui/design_system.md +0 -124
- package/docs/ui/dsl_spec.md +0 -97
- package/docs/ui/patterns/dashboard.md +0 -58
- package/docs/ui/patterns/detail.md +0 -68
- package/docs/ui/patterns/list.md +0 -72
- package/docs/ui/patterns/navigation.md +0 -314
- package/docs/ui/patterns/settings.md +0 -52
- package/docs/ui/patterns/wizard.md +0 -53
- package/docs/ui/prototype_guide.md +0 -300
- package/docs/ui/shadcn_components.md +0 -189
- package/docs/ui/style_guide_updates.md +0 -74
- package/docs/vocabulary/canonical_terms.md +0 -318
- package/fly.toml +0 -29
- package/foundation/.cursor/rules/agent_constraints.mdc +0 -198
- package/foundation/.cursor/rules/agent_test_execution.mdc +0 -356
- package/foundation/.cursor/rules/autonomous_execution.mdc +0 -117
- package/foundation/.cursor/rules/behavioral_self_adaptation.mdc +0 -531
- package/foundation/.cursor/rules/bug_fix_detection.mdc +0 -142
- package/foundation/.cursor/rules/checkpoint_management.mdc +0 -191
- package/foundation/.cursor/rules/configuration_management.mdc +0 -156
- package/foundation/.cursor/rules/content_style_enforcement.mdc +0 -138
- package/foundation/.cursor/rules/dependency_installation.mdc +0 -146
- package/foundation/.cursor/rules/document_loading_order.mdc +0 -194
- package/foundation/.cursor/rules/documentation_rules.mdc +0 -166
- package/foundation/.cursor/rules/downstream_doc_updates.mdc +0 -266
- package/foundation/.cursor/rules/environment_variables_1password.mdc +0 -307
- package/foundation/.cursor/rules/environment_variables_env_file.mdc +0 -121
- package/foundation/.cursor/rules/feature_unit_detection.mdc +0 -129
- package/foundation/.cursor/rules/file_naming.mdc +0 -31
- package/foundation/.cursor/rules/git_remote_sync.mdc +0 -240
- package/foundation/.cursor/rules/instruction_documentation.mdc +0 -302
- package/foundation/.cursor/rules/native_browser_debugging.mdc +0 -65
- package/foundation/.cursor/rules/plan_execution_testing.mdc +0 -98
- package/foundation/.cursor/rules/post_build_testing.mdc +0 -159
- package/foundation/.cursor/rules/prefer_cli_tools.mdc +0 -234
- package/foundation/.cursor/rules/readme_maintenance.mdc +0 -153
- package/foundation/.cursor/rules/release_detection.mdc +0 -92
- package/foundation/.cursor/rules/release_status_readme_update.mdc +0 -64
- package/foundation/.cursor/rules/risk_management.mdc +0 -167
- package/foundation/.cursor/rules/security.mdc +0 -158
- package/foundation/.cursor/rules/test_first_workflow.mdc +0 -341
- package/foundation/.cursor/rules/worktree_env.mdc +0 -53
- package/foundation/.cursor/skills/analyze/SKILL.md +0 -566
- package/foundation/.cursor/skills/commit/SKILL.md +0 -782
- package/foundation/.cursor/skills/create-feature-unit/SKILL.md +0 -180
- package/foundation/.cursor/skills/create-prototype/SKILL.md +0 -91
- package/foundation/.cursor/skills/create-release/SKILL.md +0 -432
- package/foundation/.cursor/skills/create-rule/SKILL.md +0 -292
- package/foundation/.cursor/skills/debug/SKILL.md +0 -980
- package/foundation/.cursor/skills/final-review/SKILL.md +0 -93
- package/foundation/.cursor/skills/fix-feature-bug/SKILL.md +0 -100
- package/foundation/.cursor/skills/manage-error-debugging/SKILL.md +0 -182
- package/foundation/.cursor/skills/publish/SKILL.md +0 -554
- package/foundation/.cursor/skills/pull/SKILL.md +0 -315
- package/foundation/.cursor/skills/push/SKILL.md +0 -254
- package/foundation/.cursor/skills/report/SKILL.md +0 -1501
- package/foundation/.cursor/skills/report-error/SKILL.md +0 -1501
- package/foundation/.cursor/skills/run-feature-workflow/SKILL.md +0 -79
- package/foundation/.cursor/skills/setup-commands/SKILL.md +0 -28
- package/foundation/.cursor/skills/setup-cursor-copies/SKILL.md +0 -233
- package/foundation/.cursor/skills/sync-env-from-1password/SKILL.md +0 -302
- package/foundation/CONTRIBUTING.md +0 -202
- package/foundation/LICENSE +0 -22
- package/foundation/MIGRATION.md +0 -396
- package/foundation/README.md +0 -391
- package/foundation/agent_instructions/README.md +0 -559
- package/foundation/config/foundation-config.yaml +0 -498
- package/foundation/config/foundation_config.yaml +0 -475
- package/foundation/config/repo_adapters/personal.yaml +0 -40
- package/foundation/config/repo_adapters/template.yaml +0 -45
- package/foundation/conventions/code_conventions.md +0 -908
- package/foundation/conventions/documentation_standards.md +0 -459
- package/foundation/conventions/naming_patterns.yaml +0 -139
- package/foundation/conventions/testing_conventions.md +0 -374
- package/foundation/conventions/writing_style_guide.md +0 -221
- package/foundation/development/branch_strategy.md +0 -266
- package/foundation/development/feature_unit_workflow.md +0 -423
- package/foundation/development/pr_process.md +0 -385
- package/foundation/development/release_workflow.md +0 -2296
- package/foundation/development/templates/feature_unit_spec_template.md +0 -312
- package/foundation/development/templates/manifest_template_extended.yaml +0 -303
- package/foundation/development/templates/manifest_template_simple.yaml +0 -148
- package/foundation/development/workflow.md +0 -509
- package/foundation/development/worktree_setup.sh +0 -207
- package/foundation/scripts/README.md +0 -230
- package/foundation/scripts/__pycache__/op_sync_env_from_1password.cpython-314.pyc +0 -0
- package/foundation/scripts/install-foundation.sh +0 -232
- package/foundation/scripts/install_foundation.sh +0 -232
- package/foundation/scripts/op_sync_env_from_1password.py +0 -1007
- package/foundation/scripts/report_error_create_dirs.sh +0 -14
- package/foundation/scripts/report_error_generate_id.sh +0 -10
- package/foundation/scripts/report_error_update_queue.sh +0 -24
- package/foundation/scripts/report_error_validate_target.sh +0 -34
- package/foundation/scripts/report_error_wait_resolution.sh +0 -69
- package/foundation/scripts/validate_setup.sh +0 -147
- package/foundation/security/credential_management.md +0 -263
- package/foundation/security/pre_commit_audit.sh +0 -78
- package/foundation/security/security_rules.md +0 -163
- package/foundation/strategy/README.md +0 -279
- package/foundation/strategy/competitive_analysis_template.md +0 -271
- package/foundation/strategy/partnership_analysis_template.md +0 -423
- package/foundation/strategy/project_assessment_framework.md +0 -485
- package/foundation/strategy/relevance_analysis_template.md +0 -297
- package/foundation/tooling/README.md +0 -198
- package/foundation/validation/README.md +0 -120
- package/foundation-config.yaml +0 -543
- package/frontend/docs.html +0 -43
- package/frontend/frontend/.vite-prototype/deps/@noble_curves_ed25519__js.js +0 -2859
- package/frontend/frontend/.vite-prototype/deps/@noble_curves_ed25519__js.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/@noble_hashes_utils__js.js +0 -62
- package/frontend/frontend/.vite-prototype/deps/@noble_hashes_utils__js.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/@radix-ui_react-dialog.js +0 -464
- package/frontend/frontend/.vite-prototype/deps/@radix-ui_react-dialog.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/@radix-ui_react-dropdown-menu.js +0 -1488
- package/frontend/frontend/.vite-prototype/deps/@radix-ui_react-dropdown-menu.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/@radix-ui_react-label.js +0 -84
- package/frontend/frontend/.vite-prototype/deps/@radix-ui_react-label.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/@radix-ui_react-scroll-area.js +0 -757
- package/frontend/frontend/.vite-prototype/deps/@radix-ui_react-scroll-area.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/@radix-ui_react-select.js +0 -1351
- package/frontend/frontend/.vite-prototype/deps/@radix-ui_react-select.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/@radix-ui_react-slot.js +0 -18
- package/frontend/frontend/.vite-prototype/deps/@radix-ui_react-slot.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/@radix-ui_react-toast.js +0 -675
- package/frontend/frontend/.vite-prototype/deps/@radix-ui_react-toast.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/@tanstack_react-table.js +0 -3254
- package/frontend/frontend/.vite-prototype/deps/@tanstack_react-table.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/_metadata.json +0 -187
- package/frontend/frontend/.vite-prototype/deps/chunk-557GXNYU.js +0 -23
- package/frontend/frontend/.vite-prototype/deps/chunk-557GXNYU.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-6FYWT56J.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-C7HFWHWH.js +0 -271
- package/frontend/frontend/.vite-prototype/deps/chunk-C7HFWHWH.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-CJDTXCAB.js +0 -49
- package/frontend/frontend/.vite-prototype/deps/chunk-CJDTXCAB.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-DC5AMYBS.js +0 -39
- package/frontend/frontend/.vite-prototype/deps/chunk-DC5AMYBS.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-F4FBYZZO.js +0 -2258
- package/frontend/frontend/.vite-prototype/deps/chunk-F4FBYZZO.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-GIBJ3MQP.js +0 -129
- package/frontend/frontend/.vite-prototype/deps/chunk-GIBJ3MQP.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-IMIZXM4S.js +0 -218
- package/frontend/frontend/.vite-prototype/deps/chunk-IMIZXM4S.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-K236IVZX.js +0 -21628
- package/frontend/frontend/.vite-prototype/deps/chunk-K236IVZX.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-LPO6FEV6.js +0 -21
- package/frontend/frontend/.vite-prototype/deps/chunk-LPO6FEV6.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-PZJDTVNM.js +0 -144
- package/frontend/frontend/.vite-prototype/deps/chunk-PZJDTVNM.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-RGYP7AMI.js +0 -1116
- package/frontend/frontend/.vite-prototype/deps/chunk-RGYP7AMI.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-SMVRXQSC.js +0 -928
- package/frontend/frontend/.vite-prototype/deps/chunk-SMVRXQSC.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-SPBFJIQZ.js +0 -49
- package/frontend/frontend/.vite-prototype/deps/chunk-SPBFJIQZ.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-UQF5EARV.js +0 -9
- package/frontend/frontend/.vite-prototype/deps/chunk-UQF5EARV.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-VEFHXNY4.js +0 -186
- package/frontend/frontend/.vite-prototype/deps/chunk-VEFHXNY4.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/chunk-Z55WIHBM.js +0 -349
- package/frontend/frontend/.vite-prototype/deps/chunk-Z55WIHBM.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/class-variance-authority.js +0 -51
- package/frontend/frontend/.vite-prototype/deps/class-variance-authority.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/clsx.js +0 -10
- package/frontend/frontend/.vite-prototype/deps/clsx.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/lucide-react.js +0 -31586
- package/frontend/frontend/.vite-prototype/deps/lucide-react.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/package.json +0 -3
- package/frontend/frontend/.vite-prototype/deps/papaparse.js +0 -431
- package/frontend/frontend/.vite-prototype/deps/papaparse.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/react-dom.js +0 -7
- package/frontend/frontend/.vite-prototype/deps/react-dom.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/react-dom_client.js +0 -39
- package/frontend/frontend/.vite-prototype/deps/react-dom_client.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/react.js +0 -6
- package/frontend/frontend/.vite-prototype/deps/react.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/react_jsx-dev-runtime.js +0 -913
- package/frontend/frontend/.vite-prototype/deps/react_jsx-dev-runtime.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/react_jsx-runtime.js +0 -7
- package/frontend/frontend/.vite-prototype/deps/react_jsx-runtime.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/sonner.js +0 -1139
- package/frontend/frontend/.vite-prototype/deps/sonner.js.map +0 -7
- package/frontend/frontend/.vite-prototype/deps/tailwind-merge.js +0 -2534
- package/frontend/frontend/.vite-prototype/deps/tailwind-merge.js.map +0 -7
- package/frontend/index.html +0 -38
- package/frontend/src/App.tsx +0 -15
- package/frontend/src/bridge/discovery.ts +0 -126
- package/frontend/src/bridge/index.ts +0 -9
- package/frontend/src/bridge/mcp.ts +0 -85
- package/frontend/src/bridge/types.ts +0 -24
- package/frontend/src/bridge/websocket.ts +0 -349
- package/frontend/src/components/AIAgentBridge.tsx +0 -75
- package/frontend/src/components/AboutPage.tsx +0 -102
- package/frontend/src/components/AppNavigationSidebar.tsx +0 -181
- package/frontend/src/components/AppSidebar.tsx +0 -206
- package/frontend/src/components/AuthErrorHandler.tsx +0 -23
- package/frontend/src/components/Dashboard.tsx +0 -303
- package/frontend/src/components/DashboardPage.tsx +0 -78
- package/frontend/src/components/EmptyPlaceholder.tsx +0 -58
- package/frontend/src/components/EntityDetail.tsx +0 -801
- package/frontend/src/components/EntityList.tsx +0 -409
- package/frontend/src/components/ErrorBoundary.tsx +0 -131
- package/frontend/src/components/FileUploadView.tsx +0 -246
- package/frontend/src/components/FloatingSettingsButton.tsx +0 -46
- package/frontend/src/components/Header.tsx +0 -43
- package/frontend/src/components/IntegrationsPage.tsx +0 -46
- package/frontend/src/components/InterpretationList.tsx +0 -246
- package/frontend/src/components/KeyManagementDialog.tsx +0 -227
- package/frontend/src/components/Layout.tsx +0 -67
- package/frontend/src/components/MCPChatGPTPage.tsx +0 -128
- package/frontend/src/components/MCPClaudePage.tsx +0 -112
- package/frontend/src/components/MCPCodeiumPage.tsx +0 -100
- package/frontend/src/components/MCPConfigurationPage.tsx +0 -624
- package/frontend/src/components/MCPConnectionDialog.tsx +0 -177
- package/frontend/src/components/MCPConnectionsList.tsx +0 -197
- package/frontend/src/components/MCPContinuePage.tsx +0 -90
- package/frontend/src/components/MCPCursorPage.tsx +0 -379
- package/frontend/src/components/MCPGeminiPage.tsx +0 -102
- package/frontend/src/components/MCPGitHubCopilotPage.tsx +0 -100
- package/frontend/src/components/MCPGrokPage.tsx +0 -99
- package/frontend/src/components/MCPJetBrainsPage.tsx +0 -107
- package/frontend/src/components/MCPManusPage.tsx +0 -104
- package/frontend/src/components/MCPSetupDialog.tsx +0 -268
- package/frontend/src/components/MCPVSCodePage.tsx +0 -100
- package/frontend/src/components/MCPWindsurfPage.tsx +0 -99
- package/frontend/src/components/MainApp.tsx +0 -19
- package/frontend/src/components/NotFound.tsx +0 -46
- package/frontend/src/components/OAuthPage.tsx +0 -426
- package/frontend/src/components/ObservationList.tsx +0 -277
- package/frontend/src/components/ProtectedRoute.tsx +0 -38
- package/frontend/src/components/QuickEntryPanel.tsx +0 -99
- package/frontend/src/components/RealtimeStatusIndicator.tsx +0 -32
- package/frontend/src/components/RecentActivityFeed.tsx +0 -198
- package/frontend/src/components/RelationshipDetail.tsx +0 -232
- package/frontend/src/components/RelationshipList.tsx +0 -269
- package/frontend/src/components/SchemaDetail.test.tsx +0 -53
- package/frontend/src/components/SchemaDetail.tsx +0 -230
- package/frontend/src/components/SchemaList.tsx +0 -228
- package/frontend/src/components/SearchResults.tsx +0 -318
- package/frontend/src/components/SeoHead.tsx +0 -40
- package/frontend/src/components/SitePage.tsx +0 -654
- package/frontend/src/components/SourceDetail.tsx +0 -382
- package/frontend/src/components/SourceTable.tsx +0 -243
- package/frontend/src/components/StyleGuide.md +0 -48
- package/frontend/src/components/StyleGuide.tsx +0 -2316
- package/frontend/src/components/TimelineView.tsx +0 -321
- package/frontend/src/components/UniversalSearch.tsx +0 -518
- package/frontend/src/components/design-system/BadgesPage.tsx +0 -47
- package/frontend/src/components/design-system/ButtonsPage.tsx +0 -67
- package/frontend/src/components/design-system/CardsPage.tsx +0 -31
- package/frontend/src/components/design-system/CollapsiblePage.tsx +0 -84
- package/frontend/src/components/design-system/ColorsPage.tsx +0 -125
- package/frontend/src/components/design-system/DesignSystemIndex.tsx +0 -73
- package/frontend/src/components/design-system/DesignSystemLayout.tsx +0 -22
- package/frontend/src/components/design-system/DesignSystemRouter.tsx +0 -43
- package/frontend/src/components/design-system/InputsPage.tsx +0 -40
- package/frontend/src/components/design-system/PageFormatsPage.tsx +0 -263
- package/frontend/src/components/design-system/ProgressPage.tsx +0 -54
- package/frontend/src/components/design-system/SkeletonPage.tsx +0 -68
- package/frontend/src/components/design-system/SpacingPage.tsx +0 -45
- package/frontend/src/components/design-system/StyleGuidePage.tsx +0 -313
- package/frontend/src/components/design-system/SwitchPage.tsx +0 -60
- package/frontend/src/components/design-system/TablesPage.tsx +0 -206
- package/frontend/src/components/design-system/TabsPage.tsx +0 -88
- package/frontend/src/components/design-system/TooltipPage.tsx +0 -94
- package/frontend/src/components/design-system/TypographyPage.tsx +0 -81
- package/frontend/src/components/icons/CursorIcon.tsx +0 -26
- package/frontend/src/components/quick-entry/ContactDialog.tsx +0 -177
- package/frontend/src/components/quick-entry/EventDialog.tsx +0 -204
- package/frontend/src/components/quick-entry/TaskDialog.tsx +0 -204
- package/frontend/src/components/quick-entry/TransactionDialog.tsx +0 -188
- package/frontend/src/components/ui/alert.tsx +0 -59
- package/frontend/src/components/ui/badge.tsx +0 -36
- package/frontend/src/components/ui/breadcrumb.tsx +0 -120
- package/frontend/src/components/ui/button.tsx +0 -56
- package/frontend/src/components/ui/card.tsx +0 -68
- package/frontend/src/components/ui/collapsible.tsx +0 -9
- package/frontend/src/components/ui/dialog.tsx +0 -81
- package/frontend/src/components/ui/dropdown-menu.tsx +0 -195
- package/frontend/src/components/ui/input-group.tsx +0 -26
- package/frontend/src/components/ui/input.tsx +0 -24
- package/frontend/src/components/ui/label.tsx +0 -19
- package/frontend/src/components/ui/progress.tsx +0 -26
- package/frontend/src/components/ui/scroll-area.tsx +0 -35
- package/frontend/src/components/ui/select.tsx +0 -173
- package/frontend/src/components/ui/separator.tsx +0 -31
- package/frontend/src/components/ui/sheet.tsx +0 -139
- package/frontend/src/components/ui/sidebar.tsx +0 -851
- package/frontend/src/components/ui/skeleton.tsx +0 -15
- package/frontend/src/components/ui/switch.tsx +0 -35
- package/frontend/src/components/ui/table-scroll-wrapper.tsx +0 -96
- package/frontend/src/components/ui/table.tsx +0 -127
- package/frontend/src/components/ui/tabs.tsx +0 -53
- package/frontend/src/components/ui/textarea.tsx +0 -23
- package/frontend/src/components/ui/toast.tsx +0 -122
- package/frontend/src/components/ui/toaster.tsx +0 -32
- package/frontend/src/components/ui/tooltip.tsx +0 -28
- package/frontend/src/components/ui/use-toast.ts +0 -194
- package/frontend/src/constants/integrations.ts +0 -51
- package/frontend/src/contexts/AuthContext.tsx +0 -205
- package/frontend/src/contexts/RealtimeContext.tsx +0 -119
- package/frontend/src/docs/DocumentationApp.tsx +0 -104
- package/frontend/src/docs/DocumentationDirectory.tsx +0 -159
- package/frontend/src/docs/DocumentationLayout.tsx +0 -31
- package/frontend/src/docs/DocumentationPage.tsx +0 -38
- package/frontend/src/docs/DocumentationSidebar.tsx +0 -15
- package/frontend/src/docs/MarkdownContent.tsx +0 -212
- package/frontend/src/docs/README.md +0 -198
- package/frontend/src/docs/main.tsx +0 -12
- package/frontend/src/hooks/use-mobile.tsx +0 -19
- package/frontend/src/hooks/useKeys.ts +0 -202
- package/frontend/src/hooks/useMCPConfig.ts +0 -175
- package/frontend/src/hooks/useRealtimeEntities.ts +0 -56
- package/frontend/src/hooks/useRealtimeObservations.ts +0 -56
- package/frontend/src/hooks/useRealtimeRelationships.ts +0 -56
- package/frontend/src/hooks/useRealtimeSources.ts +0 -53
- package/frontend/src/hooks/useRealtimeTimeline.ts +0 -53
- package/frontend/src/hooks/useSettings.ts +0 -95
- package/frontend/src/hooks/useStorageQuota.ts +0 -65
- package/frontend/src/hooks/useTheme.tsx +0 -42
- package/frontend/src/index.css +0 -247
- package/frontend/src/lib/api_client.ts +0 -8
- package/frontend/src/lib/auth.ts +0 -100
- package/frontend/src/lib/idempotency.ts +0 -25
- package/frontend/src/lib/utils.ts +0 -7
- package/frontend/src/main.tsx +0 -40
- package/frontend/src/sample-data/sets-medium.csv +0 -55
- package/frontend/src/sample-data/sets-medium.ts +0 -45
- package/frontend/src/shared/.eslintrc.json +0 -35
- package/frontend/src/shared/.github/README.md +0 -55
- package/frontend/src/shared/.github/workflows/ci.yml +0 -88
- package/frontend/src/shared/.github/workflows/release.yml +0 -34
- package/frontend/src/shared/.github/workflows/setup.yml +0 -56
- package/frontend/src/shared/README.md +0 -163
- package/frontend/src/shared/SETUP.md +0 -121
- package/frontend/src/shared/components.json +0 -20
- package/frontend/src/shared/package-lock.json +0 -4508
- package/frontend/src/shared/package.json +0 -78
- package/frontend/src/shared/src/components/AppSidebar.tsx +0 -77
- package/frontend/src/shared/src/components/ErrorBoundary.tsx +0 -87
- package/frontend/src/shared/src/components/Layout.tsx +0 -262
- package/frontend/src/shared/src/components/ui/breadcrumb.tsx +0 -115
- package/frontend/src/shared/src/components/ui/button.tsx +0 -56
- package/frontend/src/shared/src/components/ui/calendar.tsx +0 -211
- package/frontend/src/shared/src/components/ui/input.tsx +0 -22
- package/frontend/src/shared/src/components/ui/popover.tsx +0 -29
- package/frontend/src/shared/src/components/ui/separator.tsx +0 -29
- package/frontend/src/shared/src/components/ui/sheet.tsx +0 -140
- package/frontend/src/shared/src/components/ui/sidebar.tsx +0 -519
- package/frontend/src/shared/src/components/ui/skeleton.tsx +0 -15
- package/frontend/src/shared/src/components/ui/tooltip.tsx +0 -28
- package/frontend/src/shared/src/hooks/use-mobile.tsx +0 -19
- package/frontend/src/shared/src/index.css +0 -75
- package/frontend/src/shared/src/index.ts +0 -34
- package/frontend/src/shared/src/lib/utils.ts +0 -6
- package/frontend/src/shared/tailwind.config.mjs +0 -67
- package/frontend/src/shared/tsconfig.json +0 -29
- package/frontend/src/site/seo_metadata.ts +0 -133
- package/frontend/src/site/site_data.test.ts +0 -36
- package/frontend/src/site/site_data.ts +0 -575
- package/frontend/src/store/README.md +0 -10
- package/frontend/src/utils/api_access.ts +0 -24
- package/frontend/src/utils/csv.test.ts +0 -42
- package/frontend/src/utils/csv.ts +0 -45
- package/frontend/src/utils/csv_summary.ts +0 -139
- package/frontend/src/utils/debounce.ts +0 -24
- package/frontend/src/utils/entity_display.test.ts +0 -334
- package/frontend/src/utils/entity_display.ts +0 -23
- package/frontend/src/utils/entity_type_formatter.ts +0 -56
- package/frontend/src/utils/error_utils.ts +0 -137
- package/frontend/src/utils/property_keys.ts +0 -36
- package/frontend/src/utils/schema_icons.test.ts +0 -59
- package/frontend/src/utils/schema_icons.ts +0 -229
- package/frontend/src/utils/time.ts +0 -37
- package/frontend/src/vite-env.d.ts +0 -14
- package/frontend/tsconfig.json +0 -27
- package/frontend/tsconfig.node.json +0 -11
- package/mcp/web-scraper/README.md +0 -475
- package/mcp/web-scraper/SETUP.md +0 -150
- package/mcp/web-scraper/__init__.py +0 -3
- package/mcp/web-scraper/chatgpt_scraper_mcp_server.py +0 -435
- package/mcp/web-scraper/create_repo.sh +0 -50
- package/mcp/web-scraper/imports/spotify/playlist_3i0FY58V7n8XIUyWDm3AYA.json +0 -1052
- package/mcp/web-scraper/nytimes_article.json +0 -7
- package/mcp/web-scraper/plugins/__init__.py +0 -3
- package/mcp/web-scraper/plugins/chatgpt_scraper.py +0 -105
- package/mcp/web-scraper/plugins/metacast_scraper.py +0 -828
- package/mcp/web-scraper/plugins/nyt_podcast_scraper.py +0 -538
- package/mcp/web-scraper/plugins/spotify_scraper.py +0 -618
- package/mcp/web-scraper/plugins/twitter_scraper.py +0 -576
- package/mcp/web-scraper/plugins/url_body_fetcher.py +0 -172
- package/mcp/web-scraper/pytest.ini +0 -11
- package/mcp/web-scraper/requirements-test.txt +0 -6
- package/mcp/web-scraper/requirements.txt +0 -6
- package/mcp/web-scraper/run-web-scraper-mcp.sh +0 -38
- package/mcp/web-scraper/scrape_spotify_playlist.py +0 -77
- package/mcp/web-scraper/scraper.py +0 -819
- package/mcp/web-scraper/scraper_base.py +0 -88
- package/mcp/web-scraper/scraper_registry.py +0 -32
- package/mcp/web-scraper/scripts/scrape_tweet_and_verify_referenced.py +0 -65
- package/mcp/web-scraper/store_songs_to_parquet.py +0 -120
- package/mcp/web-scraper/tests/__init__.py +0 -0
- package/mcp/web-scraper/tests/conftest.py +0 -40
- package/mcp/web-scraper/tests/integration/__init__.py +0 -0
- package/mcp/web-scraper/tests/unit/__init__.py +0 -0
- package/mcp/web-scraper/tests/unit/test_source_detection.py +0 -60
- package/mcp/web-scraper/web_scraper_mcp_server.py +0 -639
- package/openapi.yaml +0 -2071
- package/playwright/fixtures/servers.ts +0 -180
- package/playwright/global_setup.ts +0 -3
- package/playwright/tests/auto-enhancement.spec.ts +0 -370
- package/playwright/tests/coverage-map.json +0 -135
- package/playwright/tests/design-system.spec.ts +0 -216
- package/playwright/tests/entity-detail.spec.ts +0 -268
- package/playwright/tests/entity-list.spec.ts +0 -266
- package/playwright/tests/floating-settings-button.spec.ts +0 -95
- package/playwright/tests/graph-integrity.spec.ts +0 -344
- package/playwright/tests/helpers.ts +0 -560
- package/playwright/tests/interpretations.spec.ts +0 -285
- package/playwright/tests/mcp-configuration.spec.ts +0 -208
- package/playwright/tests/mcp-relationships.spec.ts +0 -631
- package/playwright/tests/mcp-store-retrieve.spec.ts +0 -288
- package/playwright/tests/not-found.spec.ts +0 -30
- package/playwright/tests/oauth-flow.spec.ts +0 -790
- package/playwright/tests/observations.spec.ts +0 -295
- package/playwright/tests/relationship-detail.spec.ts +0 -305
- package/playwright/tests/relationships-list.spec.ts +0 -275
- package/playwright/tests/schema-detail.spec.ts +0 -300
- package/playwright/tests/schemas-list.spec.ts +0 -262
- package/playwright/tests/search-flow.spec.ts +0 -216
- package/playwright/tests/site-page.spec.ts +0 -23
- package/playwright/tests/source-detail.spec.ts +0 -300
- package/playwright/tests/sources-list.spec.ts +0 -254
- package/playwright/tests/upload-flow.spec.ts +0 -279
- package/playwright/tsconfig.json +0 -17
- package/playwright/types.d.ts +0 -14
- package/playwright/utils/servers.ts +0 -435
- package/playwright.config.ts +0 -77
- package/postcss.config.mjs +0 -7
- package/scripts/add_ngrok_mapping.py +0 -99
- package/scripts/add_required_observation_fields.js +0 -96
- package/scripts/add_required_source_fields.js +0 -95
- package/scripts/analyze-data-dir-schemas.js +0 -256
- package/scripts/analyze_data_dir_for_schemas.ts +0 -378
- package/scripts/analyze_low_confidence_fields.ts +0 -235
- package/scripts/analyze_schema_redundancies.ts +0 -228
- package/scripts/apply_documentation_rules.sh +0 -81
- package/scripts/apply_file_naming_convention.sh +0 -75
- package/scripts/backfill_entity_embeddings.ts +0 -95
- package/scripts/branch.js +0 -47
- package/scripts/build_github_pages_site.tsx +0 -65
- package/scripts/check-playwright-coverage.ts +0 -159
- package/scripts/check_agent_conversations.js +0 -72
- package/scripts/check_agent_status.js +0 -156
- package/scripts/check_auto_enhancement_status.ts +0 -215
- package/scripts/check_auto_test_schemas.ts +0 -43
- package/scripts/check_claude_sync.sh +0 -35
- package/scripts/check_raw_fragments.ts +0 -46
- package/scripts/check_remaining_eligibility.ts +0 -46
- package/scripts/check_remaining_fields.ts +0 -58
- package/scripts/check_sendgrid_credits.sh +0 -122
- package/scripts/check_sendgrid_email_logs.sh +0 -150
- package/scripts/check_snapshot_schema.ts +0 -18
- package/scripts/check_sources.ts +0 -34
- package/scripts/check_stale_snapshots.ts +0 -80
- package/scripts/cleanup-auto-test-schemas.ts +0 -80
- package/scripts/cleanup_test_schemas.ts +0 -275
- package/scripts/com.neotoma.dev-servers.plist.template +0 -27
- package/scripts/com.neotoma.watch-build.plist.template +0 -27
- package/scripts/complete_submodule_setup.sh +0 -101
- package/scripts/configure_sendgrid_dns.sh +0 -162
- package/scripts/copy-env-to-worktree.js +0 -109
- package/scripts/copy_pdf_worker_wrapper.js +0 -19
- package/scripts/create_sample_parquet_files.py +0 -120
- package/scripts/create_sample_parquet_files.ts +0 -146
- package/scripts/create_sample_parquet_files_mcp.ts +0 -196
- package/scripts/create_sample_parquet_files_simple.sh +0 -132
- package/scripts/cursor-worktree-init.sh +0 -24
- package/scripts/debug-ssl.sh +0 -86
- package/scripts/debug_pdf_extraction.ts +0 -69
- package/scripts/debug_vec_knn.ts +0 -69
- package/scripts/dev-proxy.js +0 -406
- package/scripts/dev-serve.js +0 -349
- package/scripts/disable-dns.sh +0 -47
- package/scripts/doctor.ts +0 -97
- package/scripts/export_schema_snapshots.ts +0 -253
- package/scripts/fix-ssl-cert.sh +0 -72
- package/scripts/fix_mcp_phase1_tests.sh +0 -51
- package/scripts/fix_observation_column_names.js +0 -51
- package/scripts/fix_observation_priority_ordering.js +0 -45
- package/scripts/fix_observation_properties_to_fields.js +0 -48
- package/scripts/fix_sqlite_schema_mismatch.js +0 -75
- package/scripts/generate-dev-cert.sh +0 -69
- package/scripts/generate_pdf_fixtures.ts +0 -330
- package/scripts/generate_schema_icons.ts +0 -216
- package/scripts/get_branch_ports.js +0 -56
- package/scripts/get_mcp_token.sh +0 -47
- package/scripts/get_secrets_for_agents.js +0 -45
- package/scripts/ingest_data_dir.ts +0 -215
- package/scripts/ingest_finances_data.ts +0 -255
- package/scripts/initialize-schemas.ts +0 -350
- package/scripts/install_launchd_dev_servers.js +0 -54
- package/scripts/install_launchd_watch_build.js +0 -53
- package/scripts/instruct_agents_credential_setup.js +0 -130
- package/scripts/instruct_agents_env_check.js +0 -99
- package/scripts/instruct_agents_run_tests_until_passing.js +0 -128
- package/scripts/kill_port.js +0 -174
- package/scripts/linters/sync_agent_instructions_pre_commit.sh +0 -34
- package/scripts/manage_error_debugging.sh +0 -228
- package/scripts/manually_queue_enhancements.ts +0 -156
- package/scripts/merge-dev.js +0 -319
- package/scripts/migrate_auto_enhanced_fields.ts +0 -83
- package/scripts/migrate_env_to_secrets.js +0 -69
- package/scripts/migrate_plans.ts +0 -870
- package/scripts/monitor_and_fix_snapshots.ts +0 -165
- package/scripts/move_docs_rules_to_cursor.js +0 -54
- package/scripts/move_docs_rules_to_cursor.sh +0 -24
- package/scripts/neotoma-npm-reserve/README.md +0 -8
- package/scripts/neotoma-npm-reserve/package.json +0 -10
- package/scripts/notify_agents_env_vars.js +0 -109
- package/scripts/notify_agents_setup_script.js +0 -148
- package/scripts/notify_running_agents_credentials.js +0 -177
- package/scripts/pdf_worker_polyfill.mjs +0 -27
- package/scripts/pick-port.js +0 -108
- package/scripts/postinstall.js +0 -84
- package/scripts/process_remaining_eligible.ts +0 -70
- package/scripts/prototypes/run-prototype.sh +0 -40
- package/scripts/prune-merged-branches.js +0 -115
- package/scripts/recompute_bob.ts +0 -64
- package/scripts/recompute_snapshots.ts +0 -72
- package/scripts/release_orchestrator.js +0 -1995
- package/scripts/remove_duplicate_source_fields.js +0 -61
- package/scripts/rename-branch-from-commit.js +0 -111
- package/scripts/respawn_agents_with_credentials.js +0 -358
- package/scripts/respawn_single_agent.js +0 -324
- package/scripts/run-dev-server-with-tunnel-url.sh +0 -16
- package/scripts/run-dev-task.js +0 -160
- package/scripts/run_dev_servers_launchd.sh +0 -14
- package/scripts/run_integration_tests.js +0 -523
- package/scripts/run_migrations.js +0 -55
- package/scripts/run_neotoma_mcp_stdio.sh +0 -11
- package/scripts/run_neotoma_mcp_stdio_dev_watch.sh +0 -10
- package/scripts/run_neotoma_mcp_stdio_prod.sh +0 -11
- package/scripts/run_neotoma_mcp_stdio_prod_watch.sh +0 -12
- package/scripts/run_watch_build_launchd.sh +0 -18
- package/scripts/scrape_nytimes_article.py +0 -182
- package/scripts/scrape_nytimes_simple.py +0 -152
- package/scripts/secrets_manager.js +0 -232
- package/scripts/send_agent_followup.js +0 -136
- package/scripts/setup-data-symlink.js +0 -88
- package/scripts/setup-dns.sh +0 -54
- package/scripts/setup-env-copy-hook.sh +0 -67
- package/scripts/setup-foundation-symlink.js +0 -45
- package/scripts/setup-https-tunnel.sh +0 -409
- package/scripts/setup-test-env.sh +0 -18
- package/scripts/setup_agent_credentials.sh +0 -27
- package/scripts/setup_agent_environment.sh +0 -39
- package/scripts/setup_claude_instructions.sh +0 -437
- package/scripts/setup_cloudflare_email_routing.sh +0 -158
- package/scripts/setup_shared_submodule.sh +0 -100
- package/scripts/simulate_npm_install.js +0 -70
- package/scripts/spec_compliance_patterns.js +0 -260
- package/scripts/sync-env-from-1password.sh +0 -100
- package/scripts/sync_mcp_configs.js +0 -106
- package/scripts/test-base64-store.ts +0 -53
- package/scripts/test-error-handling.ts +0 -44
- package/scripts/test-file-path-store.ts +0 -142
- package/scripts/test-raw-fragments-idempotence.ts +0 -157
- package/scripts/test-raw-fragments-insert.ts +0 -88
- package/scripts/test-store-response-structure.ts +0 -125
- package/scripts/test-store-structured-response.ts +0 -126
- package/scripts/test_agent_env_spawn.js +0 -82
- package/scripts/test_confidence.ts +0 -36
- package/scripts/test_dsnp_parquet_reading.ts +0 -72
- package/scripts/test_mcp_semantic_search.ts +0 -36
- package/scripts/test_parquet_ingestion.ts +0 -52
- package/scripts/test_raw_fragments_in_response.ts +0 -31
- package/scripts/test_sendgrid_smtp.sh +0 -45
- package/scripts/test_store_parquet_via_mcp.ts +0 -66
- package/scripts/trigger_error_debug_cli.js +0 -271
- package/scripts/unblock_agents.js +0 -208
- package/scripts/validate-coverage-map.ts +0 -187
- package/scripts/validate-doc-dependencies.js +0 -410
- package/scripts/validate_all_fu_compliance.js +0 -752
- package/scripts/validate_schema_sync.ts +0 -135
- package/scripts/validate_spec_compliance.js +0 -669
- package/scripts/watch_site.js +0 -68
- package/scripts/wipe-local-database.js +0 -191
- package/scripts/with_branch_ports.js +0 -496
- package/site_pages/.nojekyll +0 -0
- package/site_pages/FAVICON_CANDIDATES.md +0 -22
- package/site_pages/favicon-1-diamond.svg +0 -3
- package/site_pages/favicon-2-n-box.svg +0 -10
- package/site_pages/favicon-3-waves.svg +0 -3
- package/site_pages/favicon-4-n-minimal.svg +0 -3
- package/site_pages/favicon-5-bars.svg +0 -5
- package/site_pages/favicon.svg +0 -10
- package/site_pages/index.html +0 -40
- package/site_pages/robots.txt +0 -4
- package/site_pages/sitemap.xml +0 -5
- package/src/actions.ts +0 -4468
- package/src/cli/agent_instructions_scan.ts +0 -793
- package/src/cli/bootstrap.ts +0 -35
- package/src/cli/config.ts +0 -338
- package/src/cli/format.ts +0 -337
- package/src/cli/index.ts +0 -11417
- package/src/cli/init_abort.ts +0 -7
- package/src/cli/mcp_config_scan.ts +0 -1359
- package/src/cli/pack_rat.ts +0 -134
- package/src/config/record_types.ts +0 -562
- package/src/config.ts +0 -164
- package/src/crypto/agent_identity.ts +0 -46
- package/src/crypto/auth.ts +0 -110
- package/src/crypto/column_encryption.ts +0 -109
- package/src/crypto/crypto.test.ts +0 -311
- package/src/crypto/envelope.ts +0 -240
- package/src/crypto/export.ts +0 -131
- package/src/crypto/index.ts +0 -13
- package/src/crypto/key_derivation.ts +0 -176
- package/src/crypto/keys.ts +0 -85
- package/src/crypto/mcp_auth_token.ts +0 -35
- package/src/crypto/signature.ts +0 -50
- package/src/crypto/types.ts +0 -48
- package/src/db.ts +0 -66
- package/src/embeddings.ts +0 -76
- package/src/index.ts +0 -25
- package/src/mcp_ws_bridge.ts +0 -222
- package/src/middleware/encrypt_response.ts +0 -39
- package/src/normalize.ts +0 -351
- package/src/record_types.test.ts +0 -36
- package/src/reducers/index.ts +0 -5
- package/src/reducers/observation_reducer.ts +0 -458
- package/src/reducers/relationship_reducer.ts +0 -291
- package/src/repositories/db/capability_repo.ts +0 -29
- package/src/repositories/file/capability_repo.ts +0 -29
- package/src/repositories/index.ts +0 -7
- package/src/repositories/interfaces.ts +0 -112
- package/src/repositories/sqlite/__tests__/local_db_adapter.test.ts +0 -138
- package/src/repositories/sqlite/local_db_adapter.ts +0 -961
- package/src/repositories/sqlite/sqlite_client.ts +0 -378
- package/src/server.ts +0 -6157
- package/src/services/__tests__/csv_chunking.test.ts +0 -125
- package/src/services/__tests__/deletion.test.ts +0 -358
- package/src/services/__tests__/entity_semantic_search.test.ts +0 -45
- package/src/services/__tests__/local_auth.test.ts +0 -52
- package/src/services/__tests__/local_entity_embedding.test.ts +0 -108
- package/src/services/__tests__/mcp_oauth.test.ts +0 -407
- package/src/services/__tests__/oauth_key_gate.test.ts +0 -50
- package/src/services/__tests__/oauth_state.test.ts +0 -40
- package/src/services/__tests__/schema_icon_service.test.ts +0 -151
- package/src/services/auto_enhancement_processor.ts +0 -237
- package/src/services/capability_registry.ts +0 -202
- package/src/services/correction.ts +0 -87
- package/src/services/csv_chunking.ts +0 -128
- package/src/services/csv_row_extraction.ts +0 -124
- package/src/services/dashboard_stats.ts +0 -115
- package/src/services/deletion.ts +0 -482
- package/src/services/deletion_monitor.ts +0 -314
- package/src/services/encryption_service.ts +0 -110
- package/src/services/entity_merge.ts +0 -100
- package/src/services/entity_queries.ts +0 -518
- package/src/services/entity_resolution.ts +0 -367
- package/src/services/entity_semantic_search.ts +0 -64
- package/src/services/entity_snapshot_embedding.ts +0 -115
- package/src/services/field_canonicalization.ts +0 -393
- package/src/services/field_converters.ts +0 -173
- package/src/services/field_validation.ts +0 -173
- package/src/services/file_text_extraction.ts +0 -213
- package/src/services/finances_field_mapping.ts +0 -473
- package/src/services/gdpr_deletion.ts +0 -497
- package/src/services/interpretation.ts +0 -939
- package/src/services/llm_extraction.ts +0 -548
- package/src/services/local_auth.ts +0 -154
- package/src/services/local_entity_embedding.ts +0 -196
- package/src/services/mcp_auth.ts +0 -75
- package/src/services/mcp_oauth.ts +0 -1625
- package/src/services/mcp_oauth_errors.ts +0 -139
- package/src/services/oauth_key_gate.ts +0 -116
- package/src/services/oauth_state.ts +0 -70
- package/src/services/observation_identity.ts +0 -161
- package/src/services/observation_storage.ts +0 -162
- package/src/services/parquet_reader.ts +0 -375
- package/src/services/public_key_registry.ts +0 -103
- package/src/services/raw_fragments.ts +0 -217
- package/src/services/raw_storage.ts +0 -267
- package/src/services/relationships.ts +0 -495
- package/src/services/schema_definitions.ts +0 -2041
- package/src/services/schema_icon_service.ts +0 -260
- package/src/services/schema_inference.ts +0 -401
- package/src/services/schema_recommendation.ts +0 -1475
- package/src/services/schema_registry.ts +0 -1403
- package/src/services/snapshot_computation.ts +0 -92
- package/src/services/source_identity.ts +0 -22
- package/src/services/timeline_events.ts +0 -198
- package/src/shared/action_handlers/entity_handlers.ts +0 -115
- package/src/shared/action_schemas.test.ts +0 -59
- package/src/shared/action_schemas.ts +0 -317
- package/src/shared/api_client.ts +0 -86
- package/src/shared/contract_mappings.ts +0 -646
- package/src/shared/entity_display_name.ts +0 -64
- package/src/shared/local_transport.ts +0 -126
- package/src/shared/openapi_schema.ts +0 -175
- package/src/shared/openapi_types.ts +0 -2810
- package/src/shared/record_display_summary.ts +0 -133
- package/src/utils/__tests__/csv_summary.test.ts +0 -53
- package/src/utils/__tests__/lucide_icons.test.ts +0 -133
- package/src/utils/chat.test.ts +0 -42
- package/src/utils/chat.ts +0 -35
- package/src/utils/csv.test.ts +0 -41
- package/src/utils/csv.ts +0 -77
- package/src/utils/csv_summary.ts +0 -195
- package/src/utils/log_encrypt.ts +0 -144
- package/src/utils/logger.ts +0 -94
- package/src/utils/lucide_icons.ts +0 -279
- package/src/utils/property_keys.test.ts +0 -109
- package/src/utils/property_keys.ts +0 -66
- package/src/utils/property_sanitizer.test.ts +0 -105
- package/src/utils/property_sanitizer.ts +0 -135
- package/src/version_check.test.ts +0 -107
- package/src/version_check.ts +0 -58
- package/supabase/.temp/cli-latest +0 -0
- package/tailwind.config.mjs +0 -134
- package/tests/TEST_ACTION_MATRIX.md +0 -387
- package/tests/agent/mcp_instruction_behavior.test.ts +0 -72
- package/tests/agent/runner/agent_runner.ts +0 -27
- package/tests/agent/runner/claude_code_runner.ts +0 -128
- package/tests/agent/runner/cursor_cli_runner.ts +0 -7
- package/tests/cli/api_client_offline_fallback.test.ts +0 -89
- package/tests/cli/cli_admin_commands.test.ts +0 -268
- package/tests/cli/cli_api_commands.test.ts +0 -75
- package/tests/cli/cli_auth_commands.test.ts +0 -67
- package/tests/cli/cli_command_coverage_guard.test.ts +0 -50
- package/tests/cli/cli_correction_commands.test.ts +0 -277
- package/tests/cli/cli_direct_invocation_parity.test.ts +0 -46
- package/tests/cli/cli_entity_commands.test.ts +0 -324
- package/tests/cli/cli_entity_subcommands.test.ts +0 -422
- package/tests/cli/cli_infra_commands.test.ts +0 -475
- package/tests/cli/cli_mcp_commands.test.ts +0 -51
- package/tests/cli/cli_observation_commands.test.ts +0 -232
- package/tests/cli/cli_query_commands.test.ts +0 -369
- package/tests/cli/cli_relationship_commands.test.ts +0 -410
- package/tests/cli/cli_schema_commands.test.ts +0 -296
- package/tests/cli/cli_session_startup_ux.test.ts +0 -112
- package/tests/cli/cli_smoke.test.ts +0 -456
- package/tests/cli/cli_source_commands.test.ts +0 -214
- package/tests/cli/cli_stats_commands.test.ts +0 -51
- package/tests/cli/cli_store_commands.test.ts +0 -339
- package/tests/cli/cli_timeline_commands.test.ts +0 -294
- package/tests/cli/config.test.ts +0 -36
- package/tests/cli/config_api_discovery.test.ts +0 -91
- package/tests/cli/test_command_detection.test.ts +0 -128
- package/tests/cli/test_debug_tty.test.ts +0 -32
- package/tests/contract/contract_mapping.test.ts +0 -131
- package/tests/contract/contract_mcp_cli_parity.test.ts +0 -223
- package/tests/contract/openapi_schema.test.ts +0 -15
- package/tests/fixtures/README.md +0 -22
- package/tests/fixtures/agent_mcp/insurance_policy.txt +0 -5
- package/tests/fixtures/agent_mcp_cases.json +0 -137
- package/tests/fixtures/csv/sample_balances.csv +0 -7
- package/tests/fixtures/csv/sample_contacts.csv +0 -6
- package/tests/fixtures/csv/sample_crypto_transactions.csv +0 -6
- package/tests/fixtures/csv/sample_flows.csv +0 -7
- package/tests/fixtures/csv/sample_holdings.csv +0 -7
- package/tests/fixtures/csv/sample_income.csv +0 -7
- package/tests/fixtures/csv/sample_purchases.csv +0 -7
- package/tests/fixtures/csv/sample_tax_events.csv +0 -7
- package/tests/fixtures/csv/sample_transactions.csv +0 -7
- package/tests/fixtures/csv/sample_transfers.csv +0 -6
- package/tests/fixtures/expected/contact_snapshot.json +0 -19
- package/tests/fixtures/expected/transaction_snapshot.json +0 -21
- package/tests/fixtures/helpers.ts +0 -522
- package/tests/fixtures/json/account.json +0 -63
- package/tests/fixtures/json/argument.json +0 -39
- package/tests/fixtures/json/balance.json +0 -56
- package/tests/fixtures/json/belief.json +0 -44
- package/tests/fixtures/json/contact.json +0 -83
- package/tests/fixtures/json/contract.json +0 -62
- package/tests/fixtures/json/crypto_transaction.json +0 -67
- package/tests/fixtures/json/domain.json +0 -41
- package/tests/fixtures/json/emotion.json +0 -31
- package/tests/fixtures/json/fixed_cost.json +0 -75
- package/tests/fixtures/json/flow.json +0 -71
- package/tests/fixtures/json/habit.json +0 -54
- package/tests/fixtures/json/habit_completion.json +0 -31
- package/tests/fixtures/json/habit_objective.json +0 -40
- package/tests/fixtures/json/holding.json +0 -65
- package/tests/fixtures/json/income.json +0 -59
- package/tests/fixtures/json/liability.json +0 -50
- package/tests/fixtures/json/order.json +0 -62
- package/tests/fixtures/json/outcome.json +0 -56
- package/tests/fixtures/json/process.json +0 -43
- package/tests/fixtures/json/property.json +0 -52
- package/tests/fixtures/json/purchase.json +0 -66
- package/tests/fixtures/json/research.json +0 -53
- package/tests/fixtures/json/strategy.json +0 -68
- package/tests/fixtures/json/task_attachment.json +0 -62
- package/tests/fixtures/json/task_comment.json +0 -54
- package/tests/fixtures/json/task_dependency.json +0 -51
- package/tests/fixtures/json/task_story.json +0 -53
- package/tests/fixtures/json/tax_event.json +0 -60
- package/tests/fixtures/json/tax_filing.json +0 -61
- package/tests/fixtures/json/transaction.json +0 -62
- package/tests/fixtures/json/transfer.json +0 -60
- package/tests/fixtures/json/wallet.json +0 -51
- package/tests/fixtures/json/workout.json +0 -45
- package/tests/fixtures/pdf/sample-upload.txt +0 -2
- package/tests/fixtures/pdf/sample_bank_statement.md +0 -32
- package/tests/fixtures/pdf/sample_bank_statement.pdf +0 -0
- package/tests/fixtures/pdf/sample_contract.md +0 -27
- package/tests/fixtures/pdf/sample_contract.pdf +0 -0
- package/tests/fixtures/pdf/sample_exercise.md +0 -31
- package/tests/fixtures/pdf/sample_exercise.pdf +0 -0
- package/tests/fixtures/pdf/sample_holding_statement.md +0 -29
- package/tests/fixtures/pdf/sample_holding_statement.pdf +0 -0
- package/tests/fixtures/pdf/sample_invoice.md +0 -27
- package/tests/fixtures/pdf/sample_invoice.pdf +0 -108
- package/tests/fixtures/pdf/sample_meal.md +0 -28
- package/tests/fixtures/pdf/sample_meal.pdf +0 -111
- package/tests/fixtures/pdf/sample_note.md +0 -28
- package/tests/fixtures/pdf/sample_note.pdf +0 -0
- package/tests/fixtures/pdf/sample_receipt.md +0 -28
- package/tests/fixtures/pdf/sample_receipt.pdf +0 -0
- package/tests/fixtures/pdf/sample_research.md +0 -31
- package/tests/fixtures/pdf/sample_research.pdf +0 -0
- package/tests/fixtures/pdf/sample_tax_form.md +0 -38
- package/tests/fixtures/pdf/sample_tax_form.pdf +0 -0
- package/tests/fixtures/pdf/sample_transaction_receipt.md +0 -28
- package/tests/fixtures/pdf/sample_transaction_receipt.pdf +0 -0
- package/tests/fixtures/replay_graph.test.ts +0 -125
- package/tests/fixtures/sample_invoice.pdf +0 -1
- package/tests/fixtures/types.ts +0 -321
- package/tests/fixtures/validation.ts +0 -333
- package/tests/helpers/cleanup_helpers.ts +0 -550
- package/tests/helpers/create_test_parquet.ts +0 -187
- package/tests/helpers/cross_layer_helpers.ts +0 -130
- package/tests/helpers/mcp_action_helper.ts +0 -55
- package/tests/helpers/mcp_spec_validators.ts +0 -433
- package/tests/helpers/test_data_helpers.ts +0 -226
- package/tests/helpers/test_schema_helpers.ts +0 -264
- package/tests/integration/cli_to_mcp_entities.test.ts +0 -211
- package/tests/integration/cli_to_mcp_relationships.test.ts +0 -196
- package/tests/integration/cli_to_mcp_schemas.test.ts +0 -232
- package/tests/integration/cli_to_mcp_stats_snapshots.test.ts +0 -67
- package/tests/integration/cli_to_mcp_store.test.ts +0 -249
- package/tests/integration/dashboard_stats.test.ts +0 -180
- package/tests/integration/entity_queries.test.ts +0 -666
- package/tests/integration/field_converters.test.ts +0 -266
- package/tests/integration/fixture_mcp_store_replay.test.ts +0 -255
- package/tests/integration/gdpr_deletion.test.ts +0 -433
- package/tests/integration/llm_extraction.test.ts +0 -554
- package/tests/integration/mcp_actions_matrix.test.ts +0 -969
- package/tests/integration/mcp_auto_enhancement.test.ts +0 -659
- package/tests/integration/mcp_auto_schema_creation.test.ts +0 -658
- package/tests/integration/mcp_correction_variations.test.ts +0 -641
- package/tests/integration/mcp_entity_creation.test.ts +0 -333
- package/tests/integration/mcp_entity_variations.test.ts +0 -474
- package/tests/integration/mcp_graph_variations.test.ts +0 -380
- package/tests/integration/mcp_npm_check_update.test.ts +0 -54
- package/tests/integration/mcp_query_variations.test.ts +0 -392
- package/tests/integration/mcp_relationship_variations.test.ts +0 -433
- package/tests/integration/mcp_resource_variations.test.ts +0 -423
- package/tests/integration/mcp_resources.test.ts +0 -452
- package/tests/integration/mcp_schema_actions.test.ts +0 -673
- package/tests/integration/mcp_schema_variations.test.ts +0 -428
- package/tests/integration/mcp_store_parquet.test.ts +0 -466
- package/tests/integration/mcp_store_unstructured.test.ts +0 -413
- package/tests/integration/mcp_store_variations.test.ts +0 -452
- package/tests/integration/nonjson_csv_store_behavior.test.ts +0 -348
- package/tests/integration/nonjson_fixtures_mcp_replay.test.ts +0 -253
- package/tests/integration/observation_ingestion.test.ts +0 -362
- package/tests/integration/payload/payload_submission.test.ts +0 -296
- package/tests/integration/payload_compiler.test.ts +0 -347
- package/tests/integration/public_key_registry.test.ts +0 -204
- package/tests/integration/relationship_snapshots.test.ts +0 -235
- package/tests/integration/schema_recommendation_integration.test.ts +0 -418
- package/tests/integration/setup_v0.2.0_schemas.ts +0 -61
- package/tests/integration/v0.2.0_ingestion.test.ts +0 -527
- package/tests/services/auto_enhancement_converter_detection.test.ts +0 -663
- package/tests/services/auto_enhancement_processor.test.ts +0 -445
- package/tests/services/capability_registry.test.ts +0 -254
- package/tests/services/converter_detection_unit.test.ts +0 -168
- package/tests/services/encryption_service.test.ts +0 -147
- package/tests/services/entity_resolution.test.ts +0 -285
- package/tests/services/field_canonicalization.test.ts +0 -215
- package/tests/services/field_converters.test.ts +0 -211
- package/tests/services/field_validation.test.ts +0 -318
- package/tests/services/finances_field_mapping.test.ts +0 -245
- package/tests/services/interpretation.test.ts +0 -144
- package/tests/services/mcp_auth.test.ts +0 -34
- package/tests/services/observation_identity.test.ts +0 -154
- package/tests/services/payload_identity.test.ts +0 -325
- package/tests/services/payload_schema.test.ts +0 -282
- package/tests/services/raw_storage.test.ts +0 -546
- package/tests/services/schema_definitions.test.ts +0 -119
- package/tests/services/schema_recommendation.test.ts +0 -590
- package/tests/services/schema_registry_incremental.test.ts +0 -882
- package/tests/services/summary.test.ts +0 -26
- package/tests/unit/bigint_serialization.test.ts +0 -220
- package/tests/unit/observation_reducer_converters.test.ts +0 -430
- package/tests/unit/parquet_reader.test.ts +0 -155
- package/tests/unit/relationship_reducer.test.ts +0 -208
- package/tests/unit/schema_inference.test.ts +0 -358
- package/tests/unit/seo_metadata.test.ts +0 -52
- package/tsconfig.json +0 -22
- package/vite.config.ts +0 -165
- package/vitest.config.ts +0 -111
- package/vitest.global_setup.ts +0 -42
- package/vitest.setup.ts +0 -89
|
@@ -1,1995 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Release Orchestrator
|
|
5
|
-
*
|
|
6
|
-
* Supports both single-agent sequential execution and multi-agent parallel execution.
|
|
7
|
-
* - Single-agent: Executes Feature Units sequentially with model recommendations
|
|
8
|
-
* - Multi-agent: Spawns worker agents for parallel execution via Cursor Cloud Agents API
|
|
9
|
-
*
|
|
10
|
-
* Usage:
|
|
11
|
-
* node scripts/release_orchestrator.js <release_id>
|
|
12
|
-
*
|
|
13
|
-
* Example:
|
|
14
|
-
* node scripts/release_orchestrator.js v0.1.0
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
import { promises as fs } from "fs";
|
|
18
|
-
import path from "path";
|
|
19
|
-
import { fileURLToPath } from "url";
|
|
20
|
-
import { exec } from "child_process";
|
|
21
|
-
import { promisify } from "util";
|
|
22
|
-
import { config } from "dotenv";
|
|
23
|
-
import yaml from "js-yaml";
|
|
24
|
-
import readline from "readline";
|
|
25
|
-
import { validateFUSpecCompliance } from "./validate_spec_compliance.js";
|
|
26
|
-
|
|
27
|
-
// Load environment variables from .env file (override existing env vars)
|
|
28
|
-
config({ override: true });
|
|
29
|
-
|
|
30
|
-
const execAsync = promisify(exec);
|
|
31
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
32
|
-
const __dirname = path.dirname(__filename);
|
|
33
|
-
|
|
34
|
-
const RELEASE_ID = process.argv[2];
|
|
35
|
-
if (!RELEASE_ID) {
|
|
36
|
-
console.error("Usage: node scripts/release_orchestrator.js <release_id>");
|
|
37
|
-
process.exit(1);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const MANIFEST_PATH = `docs/releases/in_progress/${RELEASE_ID}/manifest.yaml`;
|
|
41
|
-
const STATUS_FILE = `docs/releases/in_progress/${RELEASE_ID}/agent_status.json`;
|
|
42
|
-
const EXECUTION_SCHEDULE_PATH = `docs/releases/in_progress/${RELEASE_ID}/execution_schedule.md`;
|
|
43
|
-
|
|
44
|
-
// Load YAML using js-yaml library
|
|
45
|
-
async function loadYAML(filePath) {
|
|
46
|
-
const content = await fs.readFile(filePath, "utf-8");
|
|
47
|
-
try {
|
|
48
|
-
return yaml.load(content);
|
|
49
|
-
} catch (error) {
|
|
50
|
-
console.error(`[ERROR] Failed to parse YAML file ${filePath}:`, error.message);
|
|
51
|
-
throw error;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Load execution schedule from markdown
|
|
56
|
-
async function loadExecutionSchedule(filePath) {
|
|
57
|
-
const content = await fs.readFile(filePath, "utf-8");
|
|
58
|
-
const batches = [];
|
|
59
|
-
|
|
60
|
-
// Parse markdown execution schedule
|
|
61
|
-
const batchRegex = /#### Batch (\d+)[\s\S]*?Feature Units:[\s\S]*?(- `FU-\d+`[^\n]*\n)+/g;
|
|
62
|
-
let match;
|
|
63
|
-
|
|
64
|
-
while ((match = batchRegex.exec(content)) !== null) {
|
|
65
|
-
const batchId = parseInt(match[1]);
|
|
66
|
-
const fuMatches = match[0].match(/- `FU-(\d+)`/g);
|
|
67
|
-
const fus = fuMatches ? fuMatches.map((m) => m.match(/FU-(\d+)/)[1]) : [];
|
|
68
|
-
|
|
69
|
-
batches.push({
|
|
70
|
-
batch_id: batchId,
|
|
71
|
-
feature_units: fus.map((id) => `FU-${id}`),
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return batches.sort((a, b) => a.batch_id - b.batch_id);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// Initialize status file
|
|
79
|
-
async function initializeStatus(releaseId, batches) {
|
|
80
|
-
const status = {
|
|
81
|
-
release_id: releaseId,
|
|
82
|
-
orchestrator: {
|
|
83
|
-
agent_id: `orch_${Date.now()}`,
|
|
84
|
-
started_at: new Date().toISOString(),
|
|
85
|
-
current_batch: null,
|
|
86
|
-
status: "running",
|
|
87
|
-
},
|
|
88
|
-
batches: batches.map((batch) => ({
|
|
89
|
-
batch_id: batch.batch_id,
|
|
90
|
-
status: "pending",
|
|
91
|
-
feature_units: batch.feature_units.map((fuId) => ({
|
|
92
|
-
fu_id: fuId,
|
|
93
|
-
worker_agent_id: null,
|
|
94
|
-
status: "pending",
|
|
95
|
-
progress: 0,
|
|
96
|
-
started_at: null,
|
|
97
|
-
last_update: null,
|
|
98
|
-
completed_at: null,
|
|
99
|
-
error: null,
|
|
100
|
-
tests: {
|
|
101
|
-
unit: {
|
|
102
|
-
passed: null,
|
|
103
|
-
coverage: null,
|
|
104
|
-
command: null,
|
|
105
|
-
},
|
|
106
|
-
integration: {
|
|
107
|
-
passed: null,
|
|
108
|
-
command: null,
|
|
109
|
-
},
|
|
110
|
-
e2e: {
|
|
111
|
-
passed: null,
|
|
112
|
-
command: null,
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
})),
|
|
116
|
-
})),
|
|
117
|
-
errors: [],
|
|
118
|
-
completed_fus: [],
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
122
|
-
return status;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// Load status file
|
|
126
|
-
async function loadStatus() {
|
|
127
|
-
try {
|
|
128
|
-
const content = await fs.readFile(STATUS_FILE, "utf-8");
|
|
129
|
-
return JSON.parse(content);
|
|
130
|
-
} catch (error) {
|
|
131
|
-
if (error.code === "ENOENT") {
|
|
132
|
-
return null;
|
|
133
|
-
}
|
|
134
|
-
throw error;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// Update status file atomically
|
|
139
|
-
async function updateStatus(updater) {
|
|
140
|
-
const status = await loadStatus();
|
|
141
|
-
updater(status);
|
|
142
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// Spawn worker agent via Cursor Cloud Agents API
|
|
146
|
-
async function spawnWorkerAgent(fuId, batchId, releaseId, manifest) {
|
|
147
|
-
const agentInstructions = generateAgentInstructions(fuId, batchId, releaseId);
|
|
148
|
-
|
|
149
|
-
// Validate required environment variables
|
|
150
|
-
if (!process.env.CURSOR_CLOUD_API_URL || !process.env.CURSOR_CLOUD_API_KEY) {
|
|
151
|
-
throw new Error(
|
|
152
|
-
"Missing required environment variables: CURSOR_CLOUD_API_URL and/or CURSOR_CLOUD_API_KEY"
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// REPO_URL defaults to markmhendrickson/neotoma (ensure Cursor has GitHub access to this repo)
|
|
157
|
-
// If using a different repository, ensure it's accessible via Cursor Cloud Agents Settings
|
|
158
|
-
|
|
159
|
-
// Select model based on FU complexity
|
|
160
|
-
const selectedModel = selectModelForFU(fuId, manifest);
|
|
161
|
-
const metadata = getFUMetadata(fuId, manifest);
|
|
162
|
-
const duration = estimateFUDuration(fuId);
|
|
163
|
-
|
|
164
|
-
// Determine which tier was selected (for logging)
|
|
165
|
-
const modelTier =
|
|
166
|
-
selectedModel === MODEL_TIERS.low
|
|
167
|
-
? "low"
|
|
168
|
-
: selectedModel === MODEL_TIERS.medium
|
|
169
|
-
? "medium"
|
|
170
|
-
: selectedModel === MODEL_TIERS.high
|
|
171
|
-
? "high"
|
|
172
|
-
: "unknown";
|
|
173
|
-
|
|
174
|
-
console.log(`[INFO] Spawning worker agent for ${fuId} in Batch ${batchId}`);
|
|
175
|
-
console.log(
|
|
176
|
-
`[INFO] Model: ${selectedModel} (${modelTier} tier) - complexity: priority=${metadata.priority}, risk=${metadata.risk_level}, duration=${duration}min`
|
|
177
|
-
);
|
|
178
|
-
|
|
179
|
-
// Log if using default (no env var override)
|
|
180
|
-
if (!process.env[`CURSOR_MODEL_${modelTier.toUpperCase()}`]) {
|
|
181
|
-
console.log(
|
|
182
|
-
`[INFO] Using recommended default model (override via CURSOR_MODEL_${modelTier.toUpperCase()})`
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
const apiUrl = process.env.CURSOR_CLOUD_API_URL.replace(/\/$/, ""); // Remove trailing slash
|
|
187
|
-
// Allow endpoint override via env var, default to /v0/agents (correct Cursor Cloud API endpoint)
|
|
188
|
-
const endpointPath = process.env.CURSOR_CLOUD_API_ENDPOINT || "/v0/agents";
|
|
189
|
-
const endpoint = `${apiUrl}${endpointPath.startsWith("/") ? endpointPath : `/${endpointPath}`}`;
|
|
190
|
-
|
|
191
|
-
try {
|
|
192
|
-
const repoUrl = process.env.REPO_URL || "https://github.com/markmhendrickson/neotoma";
|
|
193
|
-
const branch = process.env.RELEASE_BRANCH || "dev";
|
|
194
|
-
// Remove quotes if present
|
|
195
|
-
const cleanRepoUrl = repoUrl.replace(/^["']|["']$/g, "");
|
|
196
|
-
|
|
197
|
-
// Cursor Cloud API expects:
|
|
198
|
-
// - prompt.text: The task instructions
|
|
199
|
-
// - source.repository: Full GitHub repository URL
|
|
200
|
-
// - source.ref: Branch name
|
|
201
|
-
// - environment: Optional environment variables (if API supports it)
|
|
202
|
-
const requestBody = {
|
|
203
|
-
prompt: {
|
|
204
|
-
text: agentInstructions,
|
|
205
|
-
},
|
|
206
|
-
source: {
|
|
207
|
-
repository: cleanRepoUrl,
|
|
208
|
-
ref: branch,
|
|
209
|
-
},
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
// Try to pass environment variables via API environment field
|
|
213
|
-
// If rejected, credentials are included in agent instructions below
|
|
214
|
-
// Load from environment variables (.env file loaded by dotenv)
|
|
215
|
-
const creds = loadCredentials();
|
|
216
|
-
const envVars = {};
|
|
217
|
-
|
|
218
|
-
// Parse credentials into env var object
|
|
219
|
-
creds.forEach((cred) => {
|
|
220
|
-
const [key, ...valueParts] = cred.split("=");
|
|
221
|
-
if (key && valueParts.length > 0) {
|
|
222
|
-
const value = valueParts.join("="); // Handle values with = in them
|
|
223
|
-
envVars[key.trim()] = value.trim();
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
if (Object.keys(envVars).length > 0) {
|
|
228
|
-
// Try adding environment field - API may reject it, but worth trying
|
|
229
|
-
requestBody.environment = envVars;
|
|
230
|
-
if (process.env.DEBUG) {
|
|
231
|
-
console.log(
|
|
232
|
-
`[DEBUG] Attempting to pass environment variables to agent: ${Object.keys(envVars).join(", ")}`
|
|
233
|
-
);
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
const response = await fetch(endpoint, {
|
|
238
|
-
method: "POST",
|
|
239
|
-
headers: {
|
|
240
|
-
Authorization: `Bearer ${process.env.CURSOR_CLOUD_API_KEY}`,
|
|
241
|
-
"Content-Type": "application/json",
|
|
242
|
-
},
|
|
243
|
-
body: JSON.stringify(requestBody),
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
if (!response.ok) {
|
|
247
|
-
const errorText = await response.text();
|
|
248
|
-
let errorMessage = `Failed to spawn agent: ${response.status} ${response.statusText} - ${errorText}`;
|
|
249
|
-
|
|
250
|
-
// If environment field was rejected, retry without it
|
|
251
|
-
// Credentials are included in agent instructions, so agent can still use them
|
|
252
|
-
if (response.status === 400 && requestBody.environment && errorText.includes("environment")) {
|
|
253
|
-
console.warn(
|
|
254
|
-
`[WARN] API rejected 'environment' field. Credentials included in agent instructions instead.`
|
|
255
|
-
);
|
|
256
|
-
delete requestBody.environment;
|
|
257
|
-
|
|
258
|
-
const retryResponse = await fetch(endpoint, {
|
|
259
|
-
method: "POST",
|
|
260
|
-
headers: {
|
|
261
|
-
Authorization: `Bearer ${process.env.CURSOR_CLOUD_API_KEY}`,
|
|
262
|
-
"Content-Type": "application/json",
|
|
263
|
-
},
|
|
264
|
-
body: JSON.stringify(requestBody),
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
if (retryResponse.ok) {
|
|
268
|
-
const retryData = await retryResponse.json();
|
|
269
|
-
const agentId = retryData.id || retryData.agent_id;
|
|
270
|
-
if (agentId) {
|
|
271
|
-
console.log(
|
|
272
|
-
`[INFO] Successfully spawned worker agent ${agentId} for ${fuId} (without environment field)`
|
|
273
|
-
);
|
|
274
|
-
return agentId;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
if (response.status === 404) {
|
|
280
|
-
errorMessage += `\n[ERROR] Endpoint not found. Please verify:\n`;
|
|
281
|
-
errorMessage += ` 1. CURSOR_CLOUD_API_URL is correct (currently: ${apiUrl})\n`;
|
|
282
|
-
errorMessage += ` 2. Endpoint path is correct (currently: ${endpointPath})\n`;
|
|
283
|
-
errorMessage += ` 3. API key has permission to create background agents\n`;
|
|
284
|
-
errorMessage += ` 4. Override endpoint via CURSOR_CLOUD_API_ENDPOINT env var if needed\n`;
|
|
285
|
-
}
|
|
286
|
-
throw new Error(errorMessage);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
const data = await response.json();
|
|
290
|
-
const agentId = data.id || data.agent_id;
|
|
291
|
-
|
|
292
|
-
if (!agentId) {
|
|
293
|
-
throw new Error(`API response missing agent ID: ${JSON.stringify(data)}`);
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
console.log(`[INFO] Successfully spawned worker agent ${agentId} for ${fuId}`);
|
|
297
|
-
return agentId;
|
|
298
|
-
} catch (error) {
|
|
299
|
-
console.error(`[ERROR] Failed to spawn worker agent for ${fuId}:`, error.message);
|
|
300
|
-
throw error;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Load credentials from environment variables (.env file loaded via dotenv)
|
|
306
|
-
*/
|
|
307
|
-
function loadCredentials() {
|
|
308
|
-
const creds = [];
|
|
309
|
-
|
|
310
|
-
// Load from environment variables (loaded from .env by dotenv at startup)
|
|
311
|
-
if (process.env.DEV_OPENAI_API_KEY)
|
|
312
|
-
creds.push(`DEV_OPENAI_API_KEY=${process.env.DEV_OPENAI_API_KEY}`);
|
|
313
|
-
if (process.env.PROD_OPENAI_API_KEY)
|
|
314
|
-
creds.push(`PROD_OPENAI_API_KEY=${process.env.PROD_OPENAI_API_KEY}`);
|
|
315
|
-
if (process.env.ACTIONS_BEARER_TOKEN)
|
|
316
|
-
creds.push(`ACTIONS_BEARER_TOKEN=${process.env.ACTIONS_BEARER_TOKEN}`);
|
|
317
|
-
|
|
318
|
-
if (creds.length > 0) {
|
|
319
|
-
console.log(`[INFO] Loaded ${creds.length} credential(s) from environment variables`);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
return creds;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
// Generate agent instructions template
|
|
326
|
-
function generateAgentInstructions(fuId, batchId, releaseId) {
|
|
327
|
-
let repoUrl = process.env.REPO_URL || "https://github.com/markmhendrickson/neotoma";
|
|
328
|
-
// Remove quotes if present
|
|
329
|
-
repoUrl = repoUrl.replace(/^["']|["']$/g, "");
|
|
330
|
-
const branch = process.env.RELEASE_BRANCH || "dev";
|
|
331
|
-
|
|
332
|
-
// Load credentials to include in agent instructions
|
|
333
|
-
const creds = loadCredentials();
|
|
334
|
-
|
|
335
|
-
// Build environment variable verification instructions
|
|
336
|
-
// Note: Secrets are injected automatically via Cursor Cloud Agents Secrets configuration
|
|
337
|
-
let envSetup = `\n**Environment Variables and Testing:**
|
|
338
|
-
|
|
339
|
-
**Step 1: Verify environment variables are available**
|
|
340
|
-
|
|
341
|
-
Environment variables should be automatically injected via Cursor Cloud Agents Secrets. Verify they're set:
|
|
342
|
-
\`\`\`bash
|
|
343
|
-
env | grep -E "OPENAI_API_KEY|DEV_OPENAI_API_KEY|PROD_OPENAI_API_KEY" || echo "No OpenAI API key found"
|
|
344
|
-
\`\`\`
|
|
345
|
-
|
|
346
|
-
If environment variables are missing, they need to be configured in Cursor Settings → Cloud Agents → Secrets.
|
|
347
|
-
|
|
348
|
-
**Step 2: Set up infrastructure (automated)**
|
|
349
|
-
|
|
350
|
-
Run the setup script to handle all infrastructure setup:
|
|
351
|
-
\`\`\`bash
|
|
352
|
-
chmod +x scripts/setup_agent_environment.sh
|
|
353
|
-
./scripts/setup_agent_environment.sh
|
|
354
|
-
\`\`\`
|
|
355
|
-
|
|
356
|
-
This script will:
|
|
357
|
-
- Run database migrations (npm run migrate) if needed
|
|
358
|
-
- Install Playwright browsers (if needed)
|
|
359
|
-
- Verify npm dependencies
|
|
360
|
-
|
|
361
|
-
**Step 3: Run tests (REQUIRED: All tests must pass)**
|
|
362
|
-
|
|
363
|
-
Run all test suites and ensure they pass:
|
|
364
|
-
|
|
365
|
-
\`\`\`bash
|
|
366
|
-
npm run test
|
|
367
|
-
npm run test:integration
|
|
368
|
-
npm run test:e2e
|
|
369
|
-
\`\`\`
|
|
370
|
-
|
|
371
|
-
**CRITICAL:** If tests fail:
|
|
372
|
-
1. Check if migrations were applied (setup script should have handled this)
|
|
373
|
-
2. Fix any issues preventing tests from passing
|
|
374
|
-
3. Re-run tests until ALL tests pass
|
|
375
|
-
4. Do not mark the FU as complete until all tests are passing
|
|
376
|
-
|
|
377
|
-
**Step 4: Update status file with test results**
|
|
378
|
-
|
|
379
|
-
\`\`\`json
|
|
380
|
-
{
|
|
381
|
-
"fu_id": "FU-XXX",
|
|
382
|
-
"status": "completed",
|
|
383
|
-
"progress": 1.0,
|
|
384
|
-
"tests": {
|
|
385
|
-
"unit": { "passed": true/false, "command": "npm run test" },
|
|
386
|
-
"integration": { "passed": true/false, "command": "npm run test:integration" },
|
|
387
|
-
"e2e": { "passed": true/false, "command": "npm run test:e2e" }
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
\`\`\`
|
|
391
|
-
|
|
392
|
-
**Important:**
|
|
393
|
-
- Environment variables are injected automatically via Cursor Secrets (no need to export manually)
|
|
394
|
-
- Run the setup script to configure infrastructure (Playwright, npm deps)
|
|
395
|
-
- Update status file with actual test results
|
|
396
|
-
`;
|
|
397
|
-
|
|
398
|
-
return `You are a worker agent executing Feature Unit ${fuId} in Batch ${batchId} for Release ${releaseId}.
|
|
399
|
-
|
|
400
|
-
**Repository:** ${repoUrl}
|
|
401
|
-
**Branch:** ${branch}
|
|
402
|
-
**Status File:** ${STATUS_FILE}
|
|
403
|
-
${envSetup}
|
|
404
|
-
**Your Task:**
|
|
405
|
-
1. **Verify environment variables are available** (they should be injected automatically via Cursor Secrets)
|
|
406
|
-
2. Load FU specification: \`docs/feature_units/completed/${fuId}/FU-${fuId}_spec.md\` or \`docs/specs/MVP_FEATURE_UNITS.md\`
|
|
407
|
-
3. Execute Feature Unit workflow:
|
|
408
|
-
- Check if FU spec exists (if not, create it)
|
|
409
|
-
- If UI FU and no prototype, create prototype
|
|
410
|
-
- Run implementation workflow
|
|
411
|
-
- Run setup script: \`./scripts/setup_agent_environment.sh\`
|
|
412
|
-
- Run tests (unit, integration, E2E) - **ALL TESTS MUST PASS**
|
|
413
|
-
- If tests fail, fix issues and re-run until all pass
|
|
414
|
-
- Update status file: \`${STATUS_FILE}\` with actual test results
|
|
415
|
-
4. Report completion (ONLY after all tests pass):
|
|
416
|
-
- Update status: \`{"fu_id": "${fuId}", "status": "completed", "progress": 1.0, "tests": {...}}\`
|
|
417
|
-
- Ensure all test results show \`passed: true\`
|
|
418
|
-
- Report any blockers if tests cannot be made to pass
|
|
419
|
-
|
|
420
|
-
**Constraints:**
|
|
421
|
-
- Follow all constraints from \`docs/foundation/agent_instructions.md\`
|
|
422
|
-
- Update status file atomically (use file locking)
|
|
423
|
-
- Do not modify FUs assigned to other agents
|
|
424
|
-
- Report failures immediately (don't retry indefinitely)
|
|
425
|
-
- **Integration tests use local SQLite** - no remote credentials required
|
|
426
|
-
|
|
427
|
-
**Status File Location:** \`${STATUS_FILE}\`
|
|
428
|
-
**Update Frequency:** Every 5-10 minutes
|
|
429
|
-
**Completion Signal:** Set \`status: "completed"\` and \`progress: 1.0\``;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
// Model tier configuration (cost optimization)
|
|
433
|
-
// Cheaper models for simpler work, more expensive for complex work
|
|
434
|
-
//
|
|
435
|
-
// RECOMMENDED DEFAULTS (used when env vars not configured):
|
|
436
|
-
// - Low tier: "auto" - FREE on Cursor plans (no per-token charges)
|
|
437
|
-
// - Medium tier: "claude-3-5-sonnet-20241022" - Better coding performance, balanced cost
|
|
438
|
-
// - High tier: "claude-3-5-sonnet-20241022" - Superior coding quality for complex FUs
|
|
439
|
-
//
|
|
440
|
-
// MODEL SELECTION RATIONALE:
|
|
441
|
-
// - Low tier: "auto" chosen because it's FREE on Cursor plans (no per-token charges)
|
|
442
|
-
// * Simple tasks don't need best coding quality, so free > paid
|
|
443
|
-
// * If "auto" not available, falls back to gpt-4o-mini (~$0.15/$0.60 per 1M tokens)
|
|
444
|
-
// - Medium/High tier: Claude 3.5 Sonnet chosen for superior coding performance:
|
|
445
|
-
// * Claude 3.5 Sonnet: 84.9% HumanEval vs GPT-4o: 67.0%
|
|
446
|
-
// * Claude 3.5 Sonnet: Better SWE-bench performance (72.7% vs 54.6%)
|
|
447
|
-
// * Cost: $3/$15 per 1M tokens (slightly more than GPT-4o $2.50/$10)
|
|
448
|
-
// * Worth the premium for coding tasks where quality matters
|
|
449
|
-
//
|
|
450
|
-
// Override via environment variables:
|
|
451
|
-
// CURSOR_MODEL_LOW, CURSOR_MODEL_MEDIUM, CURSOR_MODEL_HIGH
|
|
452
|
-
//
|
|
453
|
-
// Alternative models (if defaults unavailable):
|
|
454
|
-
// Low: "gpt-4o-mini" (~$0.15/$0.60 per 1M tokens), "claude-haiku", "gpt-3.5-turbo"
|
|
455
|
-
// Medium: "gpt-4o", "claude-3-opus-20240229"
|
|
456
|
-
// High: "claude-3-opus-20240229", "gpt-4-turbo"
|
|
457
|
-
//
|
|
458
|
-
// IMPORTANT: Cursor Plan Pricing
|
|
459
|
-
// - "auto" model: FREE (included in Cursor plan, no per-token charges)
|
|
460
|
-
// - Explicit model selection: Charged per-token usage
|
|
461
|
-
// - For low-tier tasks, "auto" is always cheaper (free vs paid)
|
|
462
|
-
const MODEL_TIERS = {
|
|
463
|
-
// Low complexity: Simple FUs, low risk, short duration (< 4 hours)
|
|
464
|
-
// Recommended: "auto" (FREE on Cursor plans, no per-token charges)
|
|
465
|
-
// Fallback: gpt-4o-mini (~$0.15/$0.60 per 1M tokens) if "auto" not supported
|
|
466
|
-
// For simple tasks, free > paid, and speed/cost > coding quality
|
|
467
|
-
low: process.env.CURSOR_MODEL_LOW || "auto",
|
|
468
|
-
|
|
469
|
-
// Medium complexity: Moderate FUs, medium risk, medium duration (4-8 hours)
|
|
470
|
-
// Recommended: claude-3-5-sonnet-20241022 (superior coding, ~$3/$15 per 1M tokens)
|
|
471
|
-
// Claude outperforms GPT on coding benchmarks (84.9% vs 67.0% HumanEval)
|
|
472
|
-
medium: process.env.CURSOR_MODEL_MEDIUM || "claude-3-5-sonnet-20241022",
|
|
473
|
-
|
|
474
|
-
// High complexity: Complex FUs, high risk, long duration (> 8 hours), critical path
|
|
475
|
-
// Recommended: claude-3-5-sonnet-20241022 (best coding quality, ~$3/$15 per 1M tokens)
|
|
476
|
-
// For complex coding tasks, quality > cost savings
|
|
477
|
-
high: process.env.CURSOR_MODEL_HIGH || "claude-3-5-sonnet-20241022",
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
// Estimate FU duration (placeholder - should be based on FU spec)
|
|
481
|
-
function estimateFUDuration(fuId) {
|
|
482
|
-
// Default estimates in minutes
|
|
483
|
-
const estimates = {
|
|
484
|
-
"FU-000": 60,
|
|
485
|
-
"FU-002": 30,
|
|
486
|
-
"FU-050": 480, // 8 hours
|
|
487
|
-
"FU-051": 240, // 4 hours
|
|
488
|
-
"FU-052": 120, // 2 hours
|
|
489
|
-
"FU-053": 120,
|
|
490
|
-
"FU-054": 120,
|
|
491
|
-
"FU-100": 1680, // 1-2 weeks
|
|
492
|
-
"FU-101": 1680,
|
|
493
|
-
"FU-102": 1680,
|
|
494
|
-
"FU-103": 1680,
|
|
495
|
-
"FU-200": 1680,
|
|
496
|
-
"FU-201": 480,
|
|
497
|
-
"FU-202": 240,
|
|
498
|
-
"FU-203": 480,
|
|
499
|
-
"FU-204": 480,
|
|
500
|
-
"FU-205": 480,
|
|
501
|
-
"FU-206": 240,
|
|
502
|
-
};
|
|
503
|
-
|
|
504
|
-
return estimates[fuId] || 480; // Default 8 hours
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
// Get FU metadata from manifest
|
|
508
|
-
function getFUMetadata(fuId, manifest) {
|
|
509
|
-
const fus = manifest.feature_units || [];
|
|
510
|
-
const fu = fus.find((f) => f.id === fuId);
|
|
511
|
-
|
|
512
|
-
if (!fu) {
|
|
513
|
-
return {
|
|
514
|
-
priority: "P2", // Default to medium priority
|
|
515
|
-
risk_level: "medium", // Default to medium risk
|
|
516
|
-
dependencies: [],
|
|
517
|
-
};
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
return {
|
|
521
|
-
priority: fu.priority || "P2",
|
|
522
|
-
risk_level: fu.risk_level || "medium",
|
|
523
|
-
dependencies: fu.dependencies || [],
|
|
524
|
-
notes: fu.notes || null,
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
// Determine model tier based on FU complexity
|
|
529
|
-
function selectModelForFU(fuId, manifest) {
|
|
530
|
-
const metadata = getFUMetadata(fuId, manifest);
|
|
531
|
-
const duration = estimateFUDuration(fuId);
|
|
532
|
-
|
|
533
|
-
// Complexity scoring
|
|
534
|
-
let complexityScore = 0;
|
|
535
|
-
|
|
536
|
-
// Priority weight (P0 = critical = higher complexity)
|
|
537
|
-
const priorityWeight = {
|
|
538
|
-
P0: 3,
|
|
539
|
-
P1: 2,
|
|
540
|
-
P2: 1,
|
|
541
|
-
P3: 0.5,
|
|
542
|
-
};
|
|
543
|
-
complexityScore += priorityWeight[metadata.priority] || 1;
|
|
544
|
-
|
|
545
|
-
// Risk level weight
|
|
546
|
-
const riskWeight = {
|
|
547
|
-
high: 3,
|
|
548
|
-
medium: 1.5,
|
|
549
|
-
low: 0.5,
|
|
550
|
-
};
|
|
551
|
-
complexityScore += riskWeight[metadata.risk_level] || 1.5;
|
|
552
|
-
|
|
553
|
-
// Duration weight (longer = more complex)
|
|
554
|
-
// Normalize duration: < 4 hours = 0.5, 4-8 hours = 1, > 8 hours = 2
|
|
555
|
-
let durationWeight = 0.5;
|
|
556
|
-
if (duration >= 480) {
|
|
557
|
-
// >= 8 hours
|
|
558
|
-
durationWeight = 2;
|
|
559
|
-
} else if (duration >= 240) {
|
|
560
|
-
// >= 4 hours
|
|
561
|
-
durationWeight = 1;
|
|
562
|
-
}
|
|
563
|
-
complexityScore += durationWeight;
|
|
564
|
-
|
|
565
|
-
// Dependency count weight (more dependencies = more complex)
|
|
566
|
-
const dependencyWeight = Math.min(metadata.dependencies.length * 0.5, 2);
|
|
567
|
-
complexityScore += dependencyWeight;
|
|
568
|
-
|
|
569
|
-
// Select model tier based on total complexity score
|
|
570
|
-
// Low: < 3, Medium: 3-6, High: > 6
|
|
571
|
-
if (complexityScore < 3) {
|
|
572
|
-
return MODEL_TIERS.low;
|
|
573
|
-
} else if (complexityScore < 6) {
|
|
574
|
-
return MODEL_TIERS.medium;
|
|
575
|
-
} else {
|
|
576
|
-
return MODEL_TIERS.high;
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
// Recommend model for single-agent execution based on entire release
|
|
581
|
-
function recommendModelForSingleAgent(manifest, batches) {
|
|
582
|
-
const fus = manifest.feature_units || [];
|
|
583
|
-
const totalFUs = fus.length;
|
|
584
|
-
|
|
585
|
-
// Calculate aggregate complexity
|
|
586
|
-
let totalComplexity = 0;
|
|
587
|
-
let maxComplexity = 0;
|
|
588
|
-
let highRiskCount = 0;
|
|
589
|
-
let p0Count = 0;
|
|
590
|
-
let totalDuration = 0;
|
|
591
|
-
|
|
592
|
-
for (const fu of fus) {
|
|
593
|
-
const fuId = fu.id;
|
|
594
|
-
const metadata = getFUMetadata(fuId, manifest);
|
|
595
|
-
const duration = estimateFUDuration(fuId);
|
|
596
|
-
|
|
597
|
-
// Calculate FU complexity score
|
|
598
|
-
let complexityScore = 0;
|
|
599
|
-
|
|
600
|
-
const priorityWeight = {
|
|
601
|
-
P0: 3,
|
|
602
|
-
P1: 2,
|
|
603
|
-
P2: 1,
|
|
604
|
-
P3: 0.5,
|
|
605
|
-
};
|
|
606
|
-
complexityScore += priorityWeight[metadata.priority] || 1;
|
|
607
|
-
|
|
608
|
-
const riskWeight = {
|
|
609
|
-
high: 3,
|
|
610
|
-
medium: 1.5,
|
|
611
|
-
low: 0.5,
|
|
612
|
-
};
|
|
613
|
-
complexityScore += riskWeight[metadata.risk_level] || 1.5;
|
|
614
|
-
|
|
615
|
-
let durationWeight = 0.5;
|
|
616
|
-
if (duration >= 480) {
|
|
617
|
-
durationWeight = 2;
|
|
618
|
-
} else if (duration >= 240) {
|
|
619
|
-
durationWeight = 1;
|
|
620
|
-
}
|
|
621
|
-
complexityScore += durationWeight;
|
|
622
|
-
|
|
623
|
-
const dependencyWeight = Math.min((metadata.dependencies || []).length * 0.5, 2);
|
|
624
|
-
complexityScore += dependencyWeight;
|
|
625
|
-
|
|
626
|
-
totalComplexity += complexityScore;
|
|
627
|
-
maxComplexity = Math.max(maxComplexity, complexityScore);
|
|
628
|
-
|
|
629
|
-
if (metadata.risk_level === "high") highRiskCount++;
|
|
630
|
-
if (metadata.priority === "P0") p0Count++;
|
|
631
|
-
totalDuration += duration;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
// Average complexity per FU
|
|
635
|
-
const avgComplexity = totalComplexity / totalFUs;
|
|
636
|
-
|
|
637
|
-
// Release-level complexity assessment
|
|
638
|
-
// Factors:
|
|
639
|
-
// - High number of FUs (>10) = more coordination needed
|
|
640
|
-
// - High average complexity = better model needed
|
|
641
|
-
// - Many high-risk FUs (>3) = better model needed
|
|
642
|
-
// - Many P0 FUs (>5) = critical release = better model needed
|
|
643
|
-
// - Long total duration (>40 hours) = complex release
|
|
644
|
-
|
|
645
|
-
let releaseComplexityScore = 0;
|
|
646
|
-
|
|
647
|
-
// FU count weight
|
|
648
|
-
if (totalFUs > 10) releaseComplexityScore += 2;
|
|
649
|
-
else if (totalFUs > 5) releaseComplexityScore += 1;
|
|
650
|
-
|
|
651
|
-
// Average complexity weight
|
|
652
|
-
if (avgComplexity > 6) releaseComplexityScore += 2;
|
|
653
|
-
else if (avgComplexity > 4) releaseComplexityScore += 1;
|
|
654
|
-
|
|
655
|
-
// High risk count weight
|
|
656
|
-
if (highRiskCount > 3) releaseComplexityScore += 2;
|
|
657
|
-
else if (highRiskCount > 1) releaseComplexityScore += 1;
|
|
658
|
-
|
|
659
|
-
// P0 count weight
|
|
660
|
-
if (p0Count > 5) releaseComplexityScore += 2;
|
|
661
|
-
else if (p0Count > 2) releaseComplexityScore += 1;
|
|
662
|
-
|
|
663
|
-
// Total duration weight (normalized)
|
|
664
|
-
const totalHours = totalDuration / 60;
|
|
665
|
-
if (totalHours > 40) releaseComplexityScore += 2;
|
|
666
|
-
else if (totalHours > 20) releaseComplexityScore += 1;
|
|
667
|
-
|
|
668
|
-
// Batch count (more batches = more coordination)
|
|
669
|
-
if (batches.length > 5) releaseComplexityScore += 1;
|
|
670
|
-
|
|
671
|
-
// Select model based on release complexity
|
|
672
|
-
// Low: < 4, Medium: 4-7, High: > 7
|
|
673
|
-
if (releaseComplexityScore < 4) {
|
|
674
|
-
return {
|
|
675
|
-
model: MODEL_TIERS.medium, // Even simple releases benefit from medium tier
|
|
676
|
-
tier: "medium",
|
|
677
|
-
reasoning: `Release has ${totalFUs} FUs with average complexity ${avgComplexity.toFixed(1)}, ${highRiskCount} high-risk FUs, ${p0Count} P0 FUs, ${batches.length} batches, and estimated ${(totalHours).toFixed(1)} hours total. Medium tier model recommended.`,
|
|
678
|
-
};
|
|
679
|
-
} else if (releaseComplexityScore < 7) {
|
|
680
|
-
return {
|
|
681
|
-
model: MODEL_TIERS.medium,
|
|
682
|
-
tier: "medium",
|
|
683
|
-
reasoning: `Release has ${totalFUs} FUs with average complexity ${avgComplexity.toFixed(1)}, ${highRiskCount} high-risk FUs, ${p0Count} P0 FUs, ${batches.length} batches, and estimated ${(totalHours).toFixed(1)} hours total. Medium tier model recommended for balanced performance and cost.`,
|
|
684
|
-
};
|
|
685
|
-
} else {
|
|
686
|
-
return {
|
|
687
|
-
model: MODEL_TIERS.high,
|
|
688
|
-
tier: "high",
|
|
689
|
-
reasoning: `Release has ${totalFUs} FUs with average complexity ${avgComplexity.toFixed(1)}, ${highRiskCount} high-risk FUs, ${p0Count} P0 FUs, ${batches.length} batches, and estimated ${(totalHours).toFixed(1)} hours total. High tier model recommended for complex release with critical path FUs.`,
|
|
690
|
-
};
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
// Prompt user for execution strategy
|
|
695
|
-
function promptExecutionStrategy() {
|
|
696
|
-
return new Promise((resolve) => {
|
|
697
|
-
const rl = readline.createInterface({
|
|
698
|
-
input: process.stdin,
|
|
699
|
-
output: process.stdout,
|
|
700
|
-
});
|
|
701
|
-
|
|
702
|
-
console.log("\n=== Release Execution Strategy Selection ===\n");
|
|
703
|
-
console.log("How would you like to execute this release build?");
|
|
704
|
-
console.log(" 1. Single-agent (sequential execution)");
|
|
705
|
-
console.log(" 2. Multi-agent (parallel execution)\n");
|
|
706
|
-
|
|
707
|
-
rl.question("Enter choice (1 or 2): ", (answer) => {
|
|
708
|
-
rl.close();
|
|
709
|
-
const choice = answer.trim();
|
|
710
|
-
if (choice === "1") {
|
|
711
|
-
resolve("single_agent");
|
|
712
|
-
} else if (choice === "2") {
|
|
713
|
-
resolve("multi_agent");
|
|
714
|
-
} else {
|
|
715
|
-
console.error("[ERROR] Invalid choice. Please enter 1 or 2.");
|
|
716
|
-
process.exit(1);
|
|
717
|
-
}
|
|
718
|
-
});
|
|
719
|
-
});
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
// Check if batch dependencies are complete
|
|
723
|
-
async function canStartBatch(batch, status) {
|
|
724
|
-
// Check all FUs in previous batches are complete
|
|
725
|
-
for (let i = 0; i < batch.batch_id; i++) {
|
|
726
|
-
const prevBatch = status.batches.find((b) => b.batch_id === i);
|
|
727
|
-
if (!prevBatch) continue;
|
|
728
|
-
|
|
729
|
-
const incomplete = prevBatch.feature_units.some((fu) => fu.status !== "completed");
|
|
730
|
-
if (incomplete) {
|
|
731
|
-
return false;
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
// Check execution limits
|
|
736
|
-
const activeAgents = status.batches
|
|
737
|
-
.flatMap((b) => b.feature_units)
|
|
738
|
-
.filter((fu) => fu.status === "running").length;
|
|
739
|
-
|
|
740
|
-
const manifest = await loadYAML(MANIFEST_PATH);
|
|
741
|
-
const maxParallel = parseInt(manifest.execution_strategy?.max_parallel_fus || 3);
|
|
742
|
-
|
|
743
|
-
if (activeAgents >= maxParallel) {
|
|
744
|
-
return false;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
return true;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
// Monitor worker agents
|
|
751
|
-
async function monitorWorkers(status) {
|
|
752
|
-
if (!process.env.CURSOR_CLOUD_API_URL || !process.env.CURSOR_CLOUD_API_KEY) {
|
|
753
|
-
// Fallback to file-based monitoring if API not configured
|
|
754
|
-
return monitorWorkersFileBased(status);
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
const apiUrl = process.env.CURSOR_CLOUD_API_URL.replace(/\/$/, "");
|
|
758
|
-
// Use /v0/agents endpoint for status checks (matches spawn endpoint)
|
|
759
|
-
const endpointPath = process.env.CURSOR_CLOUD_API_ENDPOINT || "/v0/agents";
|
|
760
|
-
const baseEndpoint = `${apiUrl}${endpointPath.startsWith("/") ? endpointPath : `/${endpointPath}`}`;
|
|
761
|
-
|
|
762
|
-
for (const batch of status.batches) {
|
|
763
|
-
if (batch.status !== "running") continue;
|
|
764
|
-
|
|
765
|
-
for (const fu of batch.feature_units) {
|
|
766
|
-
if (fu.status === "running" && fu.worker_agent_id) {
|
|
767
|
-
try {
|
|
768
|
-
// Poll API for agent status using /v0/agents/{id}
|
|
769
|
-
const response = await fetch(`${baseEndpoint}/${fu.worker_agent_id}`, {
|
|
770
|
-
headers: {
|
|
771
|
-
Authorization: `Bearer ${process.env.CURSOR_CLOUD_API_KEY}`,
|
|
772
|
-
"Content-Type": "application/json",
|
|
773
|
-
},
|
|
774
|
-
});
|
|
775
|
-
|
|
776
|
-
if (response.ok) {
|
|
777
|
-
const agentData = await response.json();
|
|
778
|
-
const agentStatus = agentData.status || agentData.state || agentData.status_code;
|
|
779
|
-
|
|
780
|
-
// Log agent data for debugging
|
|
781
|
-
if (process.env.DEBUG) {
|
|
782
|
-
console.log(
|
|
783
|
-
`[DEBUG] Agent ${fu.worker_agent_id} status:`,
|
|
784
|
-
JSON.stringify(agentData, null, 2)
|
|
785
|
-
);
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
// Retrieve conversation messages to see what the agent is doing
|
|
789
|
-
try {
|
|
790
|
-
const conversationResponse = await fetch(
|
|
791
|
-
`${baseEndpoint}/${fu.worker_agent_id}/conversation`,
|
|
792
|
-
{
|
|
793
|
-
headers: {
|
|
794
|
-
Authorization: `Bearer ${process.env.CURSOR_CLOUD_API_KEY}`,
|
|
795
|
-
"Content-Type": "application/json",
|
|
796
|
-
},
|
|
797
|
-
}
|
|
798
|
-
);
|
|
799
|
-
|
|
800
|
-
if (conversationResponse.ok) {
|
|
801
|
-
const conversationData = await conversationResponse.json();
|
|
802
|
-
if (conversationData.messages && conversationData.messages.length > 0) {
|
|
803
|
-
// Get the last few messages to see recent activity
|
|
804
|
-
const recentMessages = conversationData.messages.slice(-5);
|
|
805
|
-
console.log(
|
|
806
|
-
`[INFO] Agent ${fu.worker_agent_id} (${fu.fu_id}) recent messages (${conversationData.messages.length} total):`
|
|
807
|
-
);
|
|
808
|
-
recentMessages.forEach((msg, idx) => {
|
|
809
|
-
const prefix = msg.type === "user_message" ? "[USER]" : "[AGENT]";
|
|
810
|
-
const text = msg.text.substring(0, 200);
|
|
811
|
-
console.log(`[INFO] ${prefix}: ${text}${msg.text.length > 200 ? "..." : ""}`);
|
|
812
|
-
});
|
|
813
|
-
}
|
|
814
|
-
} else if (conversationResponse.status !== 404) {
|
|
815
|
-
// 404 is expected if agent hasn't started conversation yet
|
|
816
|
-
const errorText = await conversationResponse.text().catch(() => "");
|
|
817
|
-
console.warn(
|
|
818
|
-
`[WARN] Failed to retrieve conversation for agent ${fu.worker_agent_id}: ${conversationResponse.status} ${errorText}`
|
|
819
|
-
);
|
|
820
|
-
}
|
|
821
|
-
} catch (convError) {
|
|
822
|
-
// Don't fail monitoring if conversation retrieval fails
|
|
823
|
-
if (process.env.DEBUG) {
|
|
824
|
-
console.warn(
|
|
825
|
-
`[WARN] Error retrieving conversation for agent ${fu.worker_agent_id}: ${convError.message}`
|
|
826
|
-
);
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
// Update FU status based on agent status
|
|
831
|
-
if (
|
|
832
|
-
agentStatus === "completed" ||
|
|
833
|
-
agentStatus === "succeeded" ||
|
|
834
|
-
agentStatus === "success"
|
|
835
|
-
) {
|
|
836
|
-
fu.status = "completed";
|
|
837
|
-
fu.completed_at = new Date().toISOString();
|
|
838
|
-
console.log(`[INFO] Agent ${fu.worker_agent_id} (${fu.fu_id}) completed`);
|
|
839
|
-
} else if (
|
|
840
|
-
agentStatus === "failed" ||
|
|
841
|
-
agentStatus === "error" ||
|
|
842
|
-
agentStatus === "failure"
|
|
843
|
-
) {
|
|
844
|
-
fu.status = "failed";
|
|
845
|
-
fu.error = agentData.error || agentData.message || "Agent failed";
|
|
846
|
-
console.error(
|
|
847
|
-
`[ERROR] Agent ${fu.worker_agent_id} (${fu.fu_id}) failed: ${fu.error}`
|
|
848
|
-
);
|
|
849
|
-
} else if (
|
|
850
|
-
agentStatus === "running" ||
|
|
851
|
-
agentStatus === "active" ||
|
|
852
|
-
agentStatus === "pending"
|
|
853
|
-
) {
|
|
854
|
-
// Agent still running, check for stale updates
|
|
855
|
-
const lastUpdate = fu.last_update ? new Date(fu.last_update) : null;
|
|
856
|
-
if (lastUpdate) {
|
|
857
|
-
const minutesSinceUpdate = (Date.now() - lastUpdate.getTime()) / 1000 / 60;
|
|
858
|
-
if (minutesSinceUpdate > 15) {
|
|
859
|
-
console.warn(
|
|
860
|
-
`[WARN] ${fu.fu_id} has not updated status file in ${minutesSinceUpdate.toFixed(
|
|
861
|
-
1
|
|
862
|
-
)} minutes (agent status: ${agentStatus})`
|
|
863
|
-
);
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
|
|
867
|
-
// Log agent output/logs if available
|
|
868
|
-
if (agentData.output || agentData.logs) {
|
|
869
|
-
const output = agentData.output || agentData.logs;
|
|
870
|
-
if (typeof output === "string" && output.length > 0) {
|
|
871
|
-
console.log(
|
|
872
|
-
`[INFO] Agent ${fu.worker_agent_id} (${fu.fu_id}) output:\n${output.substring(0, 500)}${output.length > 500 ? "..." : ""}`
|
|
873
|
-
);
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
} else if (response.status === 404) {
|
|
878
|
-
// Agent not found - may have completed and been cleaned up, or endpoint is wrong
|
|
879
|
-
console.warn(
|
|
880
|
-
`[WARN] Agent ${fu.worker_agent_id} not found at ${baseEndpoint}/${fu.worker_agent_id} (status: ${response.status})`
|
|
881
|
-
);
|
|
882
|
-
// Try to check status file as fallback
|
|
883
|
-
await monitorWorkersFileBased(status);
|
|
884
|
-
} else {
|
|
885
|
-
const errorText = await response.text().catch(() => "");
|
|
886
|
-
console.error(
|
|
887
|
-
`[ERROR] Failed to check agent ${fu.worker_agent_id} status: ${response.status} ${response.statusText} - ${errorText}`
|
|
888
|
-
);
|
|
889
|
-
}
|
|
890
|
-
} catch (error) {
|
|
891
|
-
console.error(`[ERROR] Failed to check agent status for ${fu.fu_id}:`, error.message);
|
|
892
|
-
// Fallback to file-based monitoring
|
|
893
|
-
await monitorWorkersFileBased(status);
|
|
894
|
-
return;
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
// Verify test results meet standards
|
|
904
|
-
function verifyTestResults(tests, fuId) {
|
|
905
|
-
// Required: unit tests must pass
|
|
906
|
-
if (!tests.unit || !tests.unit.passed) {
|
|
907
|
-
console.error(`[ERROR] ${fuId}: Unit tests missing or failed`);
|
|
908
|
-
return false;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
// Required: integration tests must pass
|
|
912
|
-
if (!tests.integration || !tests.integration.passed) {
|
|
913
|
-
console.error(`[ERROR] ${fuId}: Integration tests missing or failed`);
|
|
914
|
-
return false;
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
// Coverage check (if reported)
|
|
918
|
-
if (tests.unit.coverage !== undefined) {
|
|
919
|
-
const minCoverage = 80; // Per feature_unit_spec.md: "Lines: >80%"
|
|
920
|
-
if (tests.unit.coverage < minCoverage) {
|
|
921
|
-
console.warn(
|
|
922
|
-
`[WARN] ${fuId}: Unit test coverage ${tests.unit.coverage}% below minimum ${minCoverage}%`
|
|
923
|
-
);
|
|
924
|
-
// Warn but don't fail (coverage is a guideline)
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
// E2E tests required for Medium/High risk FUs (check would require FU spec lookup)
|
|
929
|
-
// For now, just verify if present, they passed
|
|
930
|
-
if (tests.e2e && tests.e2e.passed !== null && !tests.e2e.passed) {
|
|
931
|
-
console.error(`[ERROR] ${fuId}: E2E tests failed`);
|
|
932
|
-
return false;
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
return true;
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
// Fallback file-based monitoring
|
|
939
|
-
async function monitorWorkersFileBased(status) {
|
|
940
|
-
for (const batch of status.batches) {
|
|
941
|
-
if (batch.status !== "running") continue;
|
|
942
|
-
|
|
943
|
-
for (const fu of batch.feature_units) {
|
|
944
|
-
if (fu.status === "running") {
|
|
945
|
-
const lastUpdate = fu.last_update ? new Date(fu.last_update) : null;
|
|
946
|
-
if (lastUpdate) {
|
|
947
|
-
const minutesSinceUpdate = (Date.now() - lastUpdate.getTime()) / 1000 / 60;
|
|
948
|
-
if (minutesSinceUpdate > 15) {
|
|
949
|
-
console.warn(
|
|
950
|
-
`[WARN] ${fu.fu_id} has not updated in ${minutesSinceUpdate.toFixed(1)} minutes`
|
|
951
|
-
);
|
|
952
|
-
fu.status = "stale";
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
// Run integration tests for batch
|
|
963
|
-
async function runIntegrationTests(batchId, releaseId) {
|
|
964
|
-
console.log(`[INFO] Running integration tests for Batch ${batchId}`);
|
|
965
|
-
|
|
966
|
-
const integrationTestsPath = `docs/releases/in_progress/${releaseId}/integration_tests.md`;
|
|
967
|
-
|
|
968
|
-
try {
|
|
969
|
-
// Parse integration_tests.md to find tests for this batch
|
|
970
|
-
const content = await fs.readFile(integrationTestsPath, "utf-8");
|
|
971
|
-
const tests = parseIntegrationTests(content, batchId);
|
|
972
|
-
|
|
973
|
-
if (tests.length === 0) {
|
|
974
|
-
console.log(`[INFO] No integration tests defined for Batch ${batchId}, skipping`);
|
|
975
|
-
return true;
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
console.log(
|
|
979
|
-
`[INFO] Found ${tests.length} integration test(s) for Batch ${batchId}: ${tests
|
|
980
|
-
.map((t) => t.id)
|
|
981
|
-
.join(", ")}`
|
|
982
|
-
);
|
|
983
|
-
|
|
984
|
-
// Execute each test
|
|
985
|
-
for (const test of tests) {
|
|
986
|
-
console.log(`[INFO] Running ${test.id}: ${test.name}`);
|
|
987
|
-
|
|
988
|
-
// Execute test command
|
|
989
|
-
const testResult = await executeTestCommand(test);
|
|
990
|
-
|
|
991
|
-
// null means not_run (skip), false means failed, true means passed
|
|
992
|
-
if (testResult === false) {
|
|
993
|
-
console.error(`[ERROR] Integration test ${test.id} failed`);
|
|
994
|
-
return false;
|
|
995
|
-
} else if (testResult === null) {
|
|
996
|
-
console.warn(
|
|
997
|
-
`[WARN] Integration test ${test.id} not run (no command or test file missing)`
|
|
998
|
-
);
|
|
999
|
-
// Continue - don't fail batch if test not implemented yet
|
|
1000
|
-
} else {
|
|
1001
|
-
console.log(`[INFO] Integration test ${test.id} passed`);
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
console.log(`[INFO] All integration tests passed for Batch ${batchId}`);
|
|
1006
|
-
return true;
|
|
1007
|
-
} catch (error) {
|
|
1008
|
-
console.error(`[ERROR] Integration tests failed for Batch ${batchId}:`, error.message);
|
|
1009
|
-
return false;
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
// Execute test command
|
|
1014
|
-
async function executeTestCommand(test) {
|
|
1015
|
-
console.log(`\n${"=".repeat(80)}`);
|
|
1016
|
-
console.log(`[TEST] Starting: ${test.id} - ${test.name}`);
|
|
1017
|
-
console.log(`[TEST] Goal: ${test.goal || "N/A"}`);
|
|
1018
|
-
console.log(`${"=".repeat(80)}`);
|
|
1019
|
-
|
|
1020
|
-
if (!test.command) {
|
|
1021
|
-
console.warn(`[WARN] No test command defined for ${test.id}, marking as not_run`);
|
|
1022
|
-
// Don't skip - mark as not_run so it shows up in report
|
|
1023
|
-
return null; // null means not_run, true means passed, false means failed
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
// Map test file paths to npm test commands
|
|
1027
|
-
// e.g., "tests/integration/event_sourcing.test.ts" -> "npm run test:integration -- tests/integration/event_sourcing.test.ts"
|
|
1028
|
-
const testFile = test.command;
|
|
1029
|
-
console.log(`[TEST] Test file: ${testFile}`);
|
|
1030
|
-
|
|
1031
|
-
// Check if test file exists
|
|
1032
|
-
try {
|
|
1033
|
-
await fs.access(testFile);
|
|
1034
|
-
console.log(`[TEST] ✓ Test file exists`);
|
|
1035
|
-
} catch (error) {
|
|
1036
|
-
console.warn(`[WARN] Test file ${testFile} not found for ${test.id}, marking as not_run`);
|
|
1037
|
-
return null; // Test file doesn't exist yet - mark as not_run
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
// Execute test via npm
|
|
1041
|
-
const startTime = Date.now();
|
|
1042
|
-
try {
|
|
1043
|
-
const command = `npm run test:integration -- ${testFile}`;
|
|
1044
|
-
console.log(`[TEST] Executing command: ${command}`);
|
|
1045
|
-
console.log(`[TEST] Working directory: ${process.cwd()}`);
|
|
1046
|
-
console.log(`[TEST] Timeout: 300000ms (5 minutes)`);
|
|
1047
|
-
|
|
1048
|
-
const { stdout, stderr } = await execAsync(command, {
|
|
1049
|
-
cwd: process.cwd(),
|
|
1050
|
-
timeout: 300000, // 5 minute timeout
|
|
1051
|
-
});
|
|
1052
|
-
|
|
1053
|
-
const duration = Date.now() - startTime;
|
|
1054
|
-
console.log(`[TEST] Execution completed in ${duration}ms`);
|
|
1055
|
-
|
|
1056
|
-
// Log stdout (test output)
|
|
1057
|
-
if (stdout) {
|
|
1058
|
-
console.log(`[TEST] stdout (last 500 chars):`);
|
|
1059
|
-
console.log(stdout.slice(-500));
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
// Log stderr if present
|
|
1063
|
-
if (stderr && stderr.trim().length > 0) {
|
|
1064
|
-
console.log(`[TEST] stderr:`);
|
|
1065
|
-
console.log(stderr.slice(-500));
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
// Parse test results from stdout
|
|
1069
|
-
const testFilesMatch = stdout.match(/Test Files\s+(\d+)\s+failed\s+\|\s+(\d+)\s+passed/i);
|
|
1070
|
-
const testsMatch = stdout.match(/Tests\s+(\d+)\s+failed\s+\|\s+(\d+)\s+passed/i);
|
|
1071
|
-
|
|
1072
|
-
let failedCount = 0;
|
|
1073
|
-
let passedCount = 0;
|
|
1074
|
-
|
|
1075
|
-
if (testFilesMatch) {
|
|
1076
|
-
failedCount = parseInt(testFilesMatch[1], 10);
|
|
1077
|
-
passedCount = parseInt(testFilesMatch[2], 10);
|
|
1078
|
-
console.log(
|
|
1079
|
-
`[TEST] Parsed results: ${failedCount} failed, ${passedCount} passed (from Test Files)`
|
|
1080
|
-
);
|
|
1081
|
-
} else if (testsMatch) {
|
|
1082
|
-
failedCount = parseInt(testsMatch[1], 10);
|
|
1083
|
-
passedCount = parseInt(testsMatch[2], 10);
|
|
1084
|
-
console.log(
|
|
1085
|
-
`[TEST] Parsed results: ${failedCount} failed, ${passedCount} passed (from Tests)`
|
|
1086
|
-
);
|
|
1087
|
-
} else {
|
|
1088
|
-
console.warn(`[TEST] Could not parse test results from output`);
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
// If we're running a single test file, check if it passed
|
|
1092
|
-
if (passedCount > 0 && failedCount === 0) {
|
|
1093
|
-
console.log(`[TEST] ✓ PASSED: ${test.id} (${passedCount} test(s) passed in ${duration}ms)`);
|
|
1094
|
-
console.log(`${"=".repeat(80)}\n`);
|
|
1095
|
-
return true;
|
|
1096
|
-
} else if (failedCount > 0) {
|
|
1097
|
-
console.error(
|
|
1098
|
-
`[TEST] ✗ FAILED: ${test.id} (${failedCount} test(s) failed, ${passedCount} passed in ${duration}ms)`
|
|
1099
|
-
);
|
|
1100
|
-
console.log(`[TEST] Failed test details:`);
|
|
1101
|
-
const failureMatch = stdout.match(/FAIL\s+([^\n]+)/i);
|
|
1102
|
-
if (failureMatch) {
|
|
1103
|
-
console.log(`[TEST] ${failureMatch[1]}`);
|
|
1104
|
-
}
|
|
1105
|
-
console.log(`${"=".repeat(80)}\n`);
|
|
1106
|
-
return false;
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
// Fallback: check for "passed" in output
|
|
1110
|
-
if (stdout.includes("passed") && !stdout.match(/\d+\s+failed/i)) {
|
|
1111
|
-
console.log(`[TEST] ✓ PASSED: ${test.id} (parsed from output in ${duration}ms)`);
|
|
1112
|
-
console.log(`${"=".repeat(80)}\n`);
|
|
1113
|
-
return true;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
// Default to failed if we can't determine
|
|
1117
|
-
console.error(`[TEST] ✗ FAILED: ${test.id} (could not parse results)`);
|
|
1118
|
-
console.log(`${"=".repeat(80)}\n`);
|
|
1119
|
-
return false;
|
|
1120
|
-
} catch (error) {
|
|
1121
|
-
const duration = Date.now() - startTime;
|
|
1122
|
-
console.error(`[TEST] ✗ ERROR: ${test.id} failed after ${duration}ms`);
|
|
1123
|
-
console.error(`[TEST] Error type: ${error.name || "Unknown"}`);
|
|
1124
|
-
console.error(`[TEST] Error message: ${error.message}`);
|
|
1125
|
-
|
|
1126
|
-
if (error.stdout) {
|
|
1127
|
-
console.log(`[TEST] Error stdout available (${error.stdout.length} chars)`);
|
|
1128
|
-
const testFilesMatch = error.stdout.match(
|
|
1129
|
-
/Test Files\s+(\d+)\s+failed\s+\|\s+(\d+)\s+passed/i
|
|
1130
|
-
);
|
|
1131
|
-
const testsMatch = error.stdout.match(/Tests\s+(\d+)\s+failed\s+\|\s+(\d+)\s+passed/i);
|
|
1132
|
-
|
|
1133
|
-
let failedCount = 0;
|
|
1134
|
-
let passedCount = 0;
|
|
1135
|
-
|
|
1136
|
-
if (testFilesMatch) {
|
|
1137
|
-
failedCount = parseInt(testFilesMatch[1], 10);
|
|
1138
|
-
passedCount = parseInt(testFilesMatch[2], 10);
|
|
1139
|
-
console.log(
|
|
1140
|
-
`[TEST] Parsed from error stdout: ${failedCount} failed, ${passedCount} passed`
|
|
1141
|
-
);
|
|
1142
|
-
} else if (testsMatch) {
|
|
1143
|
-
failedCount = parseInt(testsMatch[1], 10);
|
|
1144
|
-
passedCount = parseInt(testsMatch[2], 10);
|
|
1145
|
-
console.log(
|
|
1146
|
-
`[TEST] Parsed from error stdout: ${failedCount} failed, ${passedCount} passed`
|
|
1147
|
-
);
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
if (passedCount > 0 && failedCount === 0) {
|
|
1151
|
-
console.log(`[TEST] ✓ PASSED: ${test.id} (${passedCount} test(s) passed despite error)`);
|
|
1152
|
-
console.log(`${"=".repeat(80)}\n`);
|
|
1153
|
-
return true;
|
|
1154
|
-
} else if (failedCount > 0) {
|
|
1155
|
-
console.error(
|
|
1156
|
-
`[TEST] ✗ FAILED: ${test.id} (${failedCount} test(s) failed, ${passedCount} passed)`
|
|
1157
|
-
);
|
|
1158
|
-
console.log(`[TEST] Error stdout (last 500 chars):`);
|
|
1159
|
-
console.log(error.stdout.slice(-500));
|
|
1160
|
-
console.log(`${"=".repeat(80)}\n`);
|
|
1161
|
-
return false;
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
if (error.stderr) {
|
|
1166
|
-
console.error(`[TEST] Error stderr (${error.stderr.length} chars):`);
|
|
1167
|
-
console.error(error.stderr.slice(-500));
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
if (error.code) {
|
|
1171
|
-
console.error(`[TEST] Error code: ${error.code}`);
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
if (error.signal) {
|
|
1175
|
-
console.error(`[TEST] Error signal: ${error.signal}`);
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
console.log(`${"=".repeat(80)}\n`);
|
|
1179
|
-
return false;
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
// Parse integration tests from markdown
|
|
1184
|
-
function parseIntegrationTests(content, batchId) {
|
|
1185
|
-
const tests = [];
|
|
1186
|
-
|
|
1187
|
-
// Match test definitions (#### IT-XXX: Test Name)
|
|
1188
|
-
const testRegex = /#### (IT-\d+):\s*([^\n]+)\n[\s\S]*?Batches Covered:\s*([^\n]+)/g;
|
|
1189
|
-
let match;
|
|
1190
|
-
|
|
1191
|
-
while ((match = testRegex.exec(content)) !== null) {
|
|
1192
|
-
const testId = match[1];
|
|
1193
|
-
const testName = match[2].trim();
|
|
1194
|
-
const batchesStr = match[3].trim();
|
|
1195
|
-
|
|
1196
|
-
// Parse batches (e.g., "0.5, 0.6, 5" or "1, 2, 3, 4, 6")
|
|
1197
|
-
const batches = batchesStr.split(",").map((b) => parseFloat(b.trim()));
|
|
1198
|
-
|
|
1199
|
-
// Check if this batch is covered
|
|
1200
|
-
if (batches.includes(batchId) || batches.includes(parseFloat(batchId))) {
|
|
1201
|
-
// Extract test command if present (look for "test:" field)
|
|
1202
|
-
const testSection = match[0];
|
|
1203
|
-
const commandMatch = testSection.match(/test:\s*"([^"]+)"/i);
|
|
1204
|
-
const testCommand = commandMatch ? commandMatch[1] : null;
|
|
1205
|
-
|
|
1206
|
-
tests.push({
|
|
1207
|
-
id: testId,
|
|
1208
|
-
name: testName,
|
|
1209
|
-
batches: batches,
|
|
1210
|
-
command: testCommand,
|
|
1211
|
-
});
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
return tests;
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
// Main orchestrator loop
|
|
1219
|
-
// Check prerequisites before starting
|
|
1220
|
-
function checkPrerequisites(executionMode) {
|
|
1221
|
-
const warnings = [];
|
|
1222
|
-
const errors = [];
|
|
1223
|
-
|
|
1224
|
-
// API credentials only required for multi-agent mode
|
|
1225
|
-
if (executionMode === "multi_agent") {
|
|
1226
|
-
if (!process.env.CURSOR_CLOUD_API_URL) {
|
|
1227
|
-
errors.push("CURSOR_CLOUD_API_URL is required for multi-agent execution");
|
|
1228
|
-
}
|
|
1229
|
-
if (!process.env.CURSOR_CLOUD_API_KEY) {
|
|
1230
|
-
errors.push("CURSOR_CLOUD_API_KEY is required for multi-agent execution");
|
|
1231
|
-
}
|
|
1232
|
-
if (!process.env.REPO_URL) {
|
|
1233
|
-
errors.push("REPO_URL is required for multi-agent execution");
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
// Recommended for integration tests
|
|
1238
|
-
|
|
1239
|
-
if (errors.length > 0) {
|
|
1240
|
-
console.error("[ERROR] Missing required environment variables:");
|
|
1241
|
-
errors.forEach((err) => console.error(` - ${err}`));
|
|
1242
|
-
throw new Error("Prerequisites check failed");
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
if (warnings.length > 0) {
|
|
1246
|
-
console.warn("[WARN] Environment variable warnings:");
|
|
1247
|
-
warnings.forEach((warn) => console.warn(` - ${warn}`));
|
|
1248
|
-
if (executionMode === "multi_agent") {
|
|
1249
|
-
console.warn("[WARN] Agents will include these warnings in their instructions");
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
// Execute single-agent sequential execution
|
|
1255
|
-
async function executeSingleAgent(manifest, batches, status, releaseId) {
|
|
1256
|
-
console.log(`[INFO] Starting single-agent sequential execution`);
|
|
1257
|
-
|
|
1258
|
-
// Recommend model
|
|
1259
|
-
const modelRecommendation = recommendModelForSingleAgent(manifest, batches);
|
|
1260
|
-
console.log(`[INFO] Model recommendation: ${modelRecommendation.model} (${modelRecommendation.tier} tier)`);
|
|
1261
|
-
console.log(`[INFO] Reasoning: ${modelRecommendation.reasoning}`);
|
|
1262
|
-
console.log(`[INFO] Note: Use this model in your Cursor session for optimal execution\n`);
|
|
1263
|
-
|
|
1264
|
-
// Execute batches sequentially
|
|
1265
|
-
for (const batch of batches) {
|
|
1266
|
-
let batchStatus = status.batches.find((b) => b.batch_id === batch.batch_id);
|
|
1267
|
-
|
|
1268
|
-
// Skip if already completed
|
|
1269
|
-
if (batchStatus.status === "completed") {
|
|
1270
|
-
console.log(`[INFO] Batch ${batch.batch_id} already completed, skipping`);
|
|
1271
|
-
continue;
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
// Check if we can start this batch
|
|
1275
|
-
if (!(await canStartBatch(batch, status))) {
|
|
1276
|
-
console.log(`[INFO] Batch ${batch.batch_id} dependencies not complete, waiting...`);
|
|
1277
|
-
continue;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
console.log(`[INFO] Starting Batch ${batch.batch_id} with ${batch.feature_units.length} FUs`);
|
|
1281
|
-
console.log(`[INFO] FUs: ${batch.feature_units.join(", ")}`);
|
|
1282
|
-
|
|
1283
|
-
// Update batch status
|
|
1284
|
-
batchStatus.status = "running";
|
|
1285
|
-
batchStatus.started_at = new Date().toISOString();
|
|
1286
|
-
status.orchestrator.current_batch = batch.batch_id;
|
|
1287
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
1288
|
-
|
|
1289
|
-
// Execute FUs sequentially
|
|
1290
|
-
for (const fuId of batch.feature_units) {
|
|
1291
|
-
const fuStatus = batchStatus.feature_units.find((fu) => fu.fu_id === fuId);
|
|
1292
|
-
|
|
1293
|
-
// Skip if already completed
|
|
1294
|
-
if (fuStatus.status === "completed") {
|
|
1295
|
-
console.log(`[INFO] ${fuId} already completed, skipping`);
|
|
1296
|
-
continue;
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
console.log(`\n[INFO] Executing ${fuId}...`);
|
|
1300
|
-
fuStatus.status = "running";
|
|
1301
|
-
fuStatus.started_at = new Date().toISOString();
|
|
1302
|
-
fuStatus.last_update = new Date().toISOString();
|
|
1303
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
1304
|
-
|
|
1305
|
-
// In single-agent mode, the user's Cursor session executes the FU
|
|
1306
|
-
// This script just tracks progress via status file updates
|
|
1307
|
-
// The agent should update the status file as it works
|
|
1308
|
-
console.log(`[INFO] ${fuId} execution started. Update status file as work progresses.`);
|
|
1309
|
-
console.log(`[INFO] Status file: ${STATUS_FILE}`);
|
|
1310
|
-
|
|
1311
|
-
// Wait for FU completion (user will mark as complete via status file)
|
|
1312
|
-
// For now, just mark it as needing manual execution
|
|
1313
|
-
console.log(`[INFO] Execute ${fuId} in your Cursor session, then mark as complete in status file.`);
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
// Mark batch as completed (after all FUs are marked complete by user)
|
|
1317
|
-
// This will be updated when user marks all FUs complete
|
|
1318
|
-
console.log(`[INFO] Batch ${batch.batch_id} execution complete. Mark FUs as complete in status file.`);
|
|
1319
|
-
|
|
1320
|
-
// Run integration tests
|
|
1321
|
-
const testsPassed = await runIntegrationTests(batch.batch_id, releaseId);
|
|
1322
|
-
if (!testsPassed) {
|
|
1323
|
-
console.error(`[ERROR] Integration tests failed for Batch ${batch.batch_id}`);
|
|
1324
|
-
process.exit(1);
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
// Run spec compliance validation
|
|
1328
|
-
console.log(`[INFO] Running spec compliance validation for Batch ${batch.batch_id}...`);
|
|
1329
|
-
const complianceErrors = [];
|
|
1330
|
-
for (const fu of batchStatus.feature_units) {
|
|
1331
|
-
try {
|
|
1332
|
-
const complianceResult = await validateFUSpecCompliance(fu.fu_id, releaseId);
|
|
1333
|
-
if (!complianceResult.compliant) {
|
|
1334
|
-
console.error(`[ERROR] ${fu.fu_id} failed spec compliance validation:`);
|
|
1335
|
-
complianceResult.gaps.forEach((gap) => {
|
|
1336
|
-
console.error(` - ${gap.requirement}`);
|
|
1337
|
-
});
|
|
1338
|
-
complianceErrors.push({
|
|
1339
|
-
fu_id: fu.fu_id,
|
|
1340
|
-
gaps: complianceResult.gaps,
|
|
1341
|
-
});
|
|
1342
|
-
}
|
|
1343
|
-
} catch (error) {
|
|
1344
|
-
console.error(`[ERROR] Spec compliance validation failed for ${fu.fu_id}: ${error.message}`);
|
|
1345
|
-
complianceErrors.push({
|
|
1346
|
-
fu_id: fu.fu_id,
|
|
1347
|
-
error: error.message,
|
|
1348
|
-
});
|
|
1349
|
-
}
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
if (complianceErrors.length > 0) {
|
|
1353
|
-
console.error(`[ERROR] Batch ${batch.batch_id} has ${complianceErrors.length} FU(s) with spec compliance gaps`);
|
|
1354
|
-
process.exit(1);
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
// Mark batch as completed
|
|
1358
|
-
batchStatus.status = "completed";
|
|
1359
|
-
batchStatus.completed_at = new Date().toISOString();
|
|
1360
|
-
status.completed_fus.push(...batchStatus.feature_units.map((fu) => fu.fu_id));
|
|
1361
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
1362
|
-
|
|
1363
|
-
// Update checkpoints
|
|
1364
|
-
await updateCheckpoints(batch.batch_id, manifest, batchStatus);
|
|
1365
|
-
|
|
1366
|
-
console.log(`[INFO] Batch ${batch.batch_id} completed successfully`);
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
// All batches complete - ALWAYS run full integration test suite (REQUIRED)
|
|
1370
|
-
console.log(`[INFO] All batches complete. Running full integration test suite (REQUIRED)...`);
|
|
1371
|
-
|
|
1372
|
-
// CRITICAL: Integration tests MUST run after all batches complete
|
|
1373
|
-
const fullTestSuitePassed = await runFullIntegrationTestSuite(releaseId);
|
|
1374
|
-
|
|
1375
|
-
if (!fullTestSuitePassed) {
|
|
1376
|
-
const currentStatus = await loadStatus();
|
|
1377
|
-
const testResults = currentStatus.integration_tests || [];
|
|
1378
|
-
const failedCount = testResults.filter((t) => t.status === "failed").length;
|
|
1379
|
-
const notRunCount = testResults.filter((t) => t.status === "not_run").length;
|
|
1380
|
-
|
|
1381
|
-
if (failedCount > 0) {
|
|
1382
|
-
console.error(`[ERROR] Full integration test suite failed (${failedCount} test(s) failed)`);
|
|
1383
|
-
console.error(
|
|
1384
|
-
`[ERROR] Release cannot be marked as ready_for_deployment until all tests pass`
|
|
1385
|
-
);
|
|
1386
|
-
process.exit(1);
|
|
1387
|
-
} else if (notRunCount > 0) {
|
|
1388
|
-
console.warn(
|
|
1389
|
-
`[WARN] ${notRunCount} test(s) not run (no test commands defined or test files missing)`
|
|
1390
|
-
);
|
|
1391
|
-
console.warn(
|
|
1392
|
-
`[WARN] Release can proceed, but tests should be implemented for full validation`
|
|
1393
|
-
);
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
console.log(`[INFO] Full integration test suite execution completed`);
|
|
1398
|
-
}
|
|
1399
|
-
|
|
1400
|
-
async function main() {
|
|
1401
|
-
console.log(`[INFO] Starting orchestrator for Release ${RELEASE_ID}`);
|
|
1402
|
-
|
|
1403
|
-
// Load manifest
|
|
1404
|
-
const manifest = await loadYAML(MANIFEST_PATH);
|
|
1405
|
-
|
|
1406
|
-
// Debug: log parsed manifest structure
|
|
1407
|
-
if (process.env.DEBUG) {
|
|
1408
|
-
console.log("[DEBUG] Parsed manifest:", JSON.stringify(manifest, null, 2));
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
// Load execution schedule
|
|
1412
|
-
const batches = await loadExecutionSchedule(EXECUTION_SCHEDULE_PATH);
|
|
1413
|
-
console.log(`[INFO] Loaded ${batches.length} batches`);
|
|
1414
|
-
|
|
1415
|
-
// Determine execution strategy
|
|
1416
|
-
let executionStrategy = manifest.execution_strategy || {};
|
|
1417
|
-
let executionMode = executionStrategy.type;
|
|
1418
|
-
|
|
1419
|
-
// If not set in manifest, prompt user
|
|
1420
|
-
if (!executionMode) {
|
|
1421
|
-
console.log(`[INFO] Execution strategy not set in manifest.yaml`);
|
|
1422
|
-
executionMode = await promptExecutionStrategy();
|
|
1423
|
-
|
|
1424
|
-
// Update manifest with selected strategy
|
|
1425
|
-
if (!manifest.execution_strategy) {
|
|
1426
|
-
manifest.execution_strategy = {};
|
|
1427
|
-
}
|
|
1428
|
-
manifest.execution_strategy.type = executionMode;
|
|
1429
|
-
|
|
1430
|
-
// Save updated manifest
|
|
1431
|
-
const yamlContent = yaml.dump(manifest);
|
|
1432
|
-
await fs.writeFile(MANIFEST_PATH, yamlContent, "utf-8");
|
|
1433
|
-
console.log(`[INFO] Updated manifest.yaml with execution_strategy.type: ${executionMode}\n`);
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
if (process.env.DEBUG) {
|
|
1437
|
-
console.log("[DEBUG] Execution strategy:", JSON.stringify(executionStrategy, null, 2));
|
|
1438
|
-
}
|
|
1439
|
-
|
|
1440
|
-
// Check prerequisites based on execution mode
|
|
1441
|
-
checkPrerequisites(executionMode);
|
|
1442
|
-
|
|
1443
|
-
// Initialize or load status
|
|
1444
|
-
let status = await loadStatus();
|
|
1445
|
-
if (!status) {
|
|
1446
|
-
status = await initializeStatus(RELEASE_ID, batches);
|
|
1447
|
-
console.log("[INFO] Initialized status file");
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
// Update orchestrator status
|
|
1451
|
-
status.orchestrator.status = "running";
|
|
1452
|
-
status.orchestrator.execution_mode = executionMode;
|
|
1453
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
1454
|
-
|
|
1455
|
-
// Route to appropriate execution mode
|
|
1456
|
-
if (executionMode === "single_agent") {
|
|
1457
|
-
await executeSingleAgent(manifest, batches, status, RELEASE_ID);
|
|
1458
|
-
} else if (executionMode === "multi_agent") {
|
|
1459
|
-
await executeMultiAgent(manifest, batches, status, RELEASE_ID);
|
|
1460
|
-
} else {
|
|
1461
|
-
console.error(`[ERROR] Unknown execution mode: ${executionMode}`);
|
|
1462
|
-
process.exit(1);
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
// Initialize or load status
|
|
1466
|
-
let status = await loadStatus();
|
|
1467
|
-
if (!status) {
|
|
1468
|
-
status = await initializeStatus(RELEASE_ID, batches);
|
|
1469
|
-
console.log("[INFO] Initialized status file");
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
// Execute multi-agent parallel execution
|
|
1473
|
-
async function executeMultiAgent(manifest, batches, status, releaseId) {
|
|
1474
|
-
console.log(`[INFO] Starting multi-agent parallel execution`);
|
|
1475
|
-
|
|
1476
|
-
// Execute batches
|
|
1477
|
-
for (const batch of batches) {
|
|
1478
|
-
let batchStatus = status.batches.find((b) => b.batch_id === batch.batch_id);
|
|
1479
|
-
|
|
1480
|
-
// Skip if already completed
|
|
1481
|
-
if (batchStatus.status === "completed") {
|
|
1482
|
-
console.log(`[INFO] Batch ${batch.batch_id} already completed, skipping`);
|
|
1483
|
-
continue;
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
// Check if we can start this batch
|
|
1487
|
-
if (!(await canStartBatch(batch, status))) {
|
|
1488
|
-
console.log(`[INFO] Batch ${batch.batch_id} dependencies not complete, waiting...`);
|
|
1489
|
-
// In production, would wait and retry
|
|
1490
|
-
continue;
|
|
1491
|
-
}
|
|
1492
|
-
|
|
1493
|
-
console.log(`[INFO] Starting Batch ${batch.batch_id} with ${batch.feature_units.length} FUs`);
|
|
1494
|
-
|
|
1495
|
-
// Update batch status
|
|
1496
|
-
batchStatus.status = "running";
|
|
1497
|
-
batchStatus.started_at = new Date().toISOString();
|
|
1498
|
-
status.orchestrator.current_batch = batch.batch_id;
|
|
1499
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
1500
|
-
|
|
1501
|
-
// Spawn worker agents for each FU in batch
|
|
1502
|
-
const workerAgents = [];
|
|
1503
|
-
for (const fuId of batch.feature_units) {
|
|
1504
|
-
const fuStatus = batchStatus.feature_units.find((fu) => fu.fu_id === fuId);
|
|
1505
|
-
|
|
1506
|
-
// Skip if already completed
|
|
1507
|
-
if (fuStatus.status === "completed") {
|
|
1508
|
-
console.log(`[INFO] ${fuId} already completed, skipping`);
|
|
1509
|
-
continue;
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
// Spawn worker agent
|
|
1513
|
-
const agentId = await spawnWorkerAgent(fuId, batch.batch_id, releaseId, manifest);
|
|
1514
|
-
|
|
1515
|
-
// Update status
|
|
1516
|
-
fuStatus.worker_agent_id = agentId;
|
|
1517
|
-
fuStatus.status = "running";
|
|
1518
|
-
fuStatus.started_at = new Date().toISOString();
|
|
1519
|
-
fuStatus.last_update = new Date().toISOString();
|
|
1520
|
-
|
|
1521
|
-
workerAgents.push({ agentId, fuId });
|
|
1522
|
-
|
|
1523
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
1524
|
-
}
|
|
1525
|
-
|
|
1526
|
-
console.log(`[INFO] Spawned ${workerAgents.length} worker agents for Batch ${batch.batch_id}`);
|
|
1527
|
-
|
|
1528
|
-
// Monitor workers until all complete
|
|
1529
|
-
let allComplete = false;
|
|
1530
|
-
while (!allComplete) {
|
|
1531
|
-
await new Promise((resolve) => setTimeout(resolve, 60000)); // Wait 1 minute
|
|
1532
|
-
|
|
1533
|
-
// Reload status (workers update it)
|
|
1534
|
-
status = await loadStatus();
|
|
1535
|
-
batchStatus = status.batches.find((b) => b.batch_id === batch.batch_id);
|
|
1536
|
-
|
|
1537
|
-
// Check if all FUs complete
|
|
1538
|
-
allComplete = batchStatus.feature_units.every(
|
|
1539
|
-
(fu) => fu.status === "completed" || fu.status === "failed"
|
|
1540
|
-
);
|
|
1541
|
-
|
|
1542
|
-
// Monitor for failures
|
|
1543
|
-
await monitorWorkers(status);
|
|
1544
|
-
|
|
1545
|
-
// Log progress
|
|
1546
|
-
const completed = batchStatus.feature_units.filter((fu) => fu.status === "completed").length;
|
|
1547
|
-
const total = batchStatus.feature_units.length;
|
|
1548
|
-
console.log(`[INFO] Batch ${batch.batch_id} progress: ${completed}/${total} FUs complete`);
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
// Check for failures
|
|
1552
|
-
const failures = batchStatus.feature_units.filter(
|
|
1553
|
-
(fu) => fu.status === "failed" || fu.status === "stale"
|
|
1554
|
-
);
|
|
1555
|
-
if (failures.length > 0) {
|
|
1556
|
-
console.error(
|
|
1557
|
-
`[ERROR] Batch ${batch.batch_id} has ${failures.length} failed FUs:`,
|
|
1558
|
-
failures.map((f) => f.fu_id)
|
|
1559
|
-
);
|
|
1560
|
-
// TODO: Handle failures (retry, escalate, abort)
|
|
1561
|
-
status.errors.push({
|
|
1562
|
-
batch_id: batch.batch_id,
|
|
1563
|
-
failed_fus: failures.map((f) => f.fu_id),
|
|
1564
|
-
timestamp: new Date().toISOString(),
|
|
1565
|
-
});
|
|
1566
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
1567
|
-
|
|
1568
|
-
// For now, abort on failure
|
|
1569
|
-
console.error("[ERROR] Aborting release execution due to failures");
|
|
1570
|
-
process.exit(1);
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
// Run integration tests
|
|
1574
|
-
const testsPassed = await runIntegrationTests(batch.batch_id, RELEASE_ID);
|
|
1575
|
-
if (!testsPassed) {
|
|
1576
|
-
console.error(`[ERROR] Integration tests failed for Batch ${batch.batch_id}`);
|
|
1577
|
-
process.exit(1);
|
|
1578
|
-
}
|
|
1579
|
-
|
|
1580
|
-
// Run spec compliance validation for each FU in batch
|
|
1581
|
-
console.log(`[INFO] Running spec compliance validation for Batch ${batch.batch_id}...`);
|
|
1582
|
-
const complianceErrors = [];
|
|
1583
|
-
for (const fu of batchStatus.feature_units) {
|
|
1584
|
-
try {
|
|
1585
|
-
const complianceResult = await validateFUSpecCompliance(fu.fu_id, RELEASE_ID);
|
|
1586
|
-
if (!complianceResult.compliant) {
|
|
1587
|
-
console.error(`[ERROR] ${fu.fu_id} failed spec compliance validation:`);
|
|
1588
|
-
complianceResult.gaps.forEach((gap) => {
|
|
1589
|
-
console.error(` - ${gap.requirement}`);
|
|
1590
|
-
});
|
|
1591
|
-
console.error(` Report: ${complianceResult.reportPath}`);
|
|
1592
|
-
complianceErrors.push({
|
|
1593
|
-
fu_id: fu.fu_id,
|
|
1594
|
-
gaps: complianceResult.gaps,
|
|
1595
|
-
reportPath: complianceResult.reportPath,
|
|
1596
|
-
});
|
|
1597
|
-
} else {
|
|
1598
|
-
console.log(`[INFO] ${fu.fu_id} passed spec compliance validation`);
|
|
1599
|
-
}
|
|
1600
|
-
} catch (error) {
|
|
1601
|
-
console.error(
|
|
1602
|
-
`[ERROR] Spec compliance validation failed for ${fu.fu_id}: ${error.message}`
|
|
1603
|
-
);
|
|
1604
|
-
complianceErrors.push({
|
|
1605
|
-
fu_id: fu.fu_id,
|
|
1606
|
-
error: error.message,
|
|
1607
|
-
});
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
if (complianceErrors.length > 0) {
|
|
1612
|
-
console.error(
|
|
1613
|
-
`[ERROR] Batch ${batch.batch_id} has ${complianceErrors.length} FU(s) with spec compliance gaps`
|
|
1614
|
-
);
|
|
1615
|
-
console.error(
|
|
1616
|
-
"[ERROR] FUs cannot be marked complete until all spec requirements are met or explicitly deferred"
|
|
1617
|
-
);
|
|
1618
|
-
// Store compliance errors in status for review
|
|
1619
|
-
status.compliance_errors = status.compliance_errors || [];
|
|
1620
|
-
status.compliance_errors.push({
|
|
1621
|
-
batch_id: batch.batch_id,
|
|
1622
|
-
errors: complianceErrors,
|
|
1623
|
-
timestamp: new Date().toISOString(),
|
|
1624
|
-
});
|
|
1625
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
1626
|
-
process.exit(1);
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
// Mark batch as completed
|
|
1630
|
-
batchStatus.status = "completed";
|
|
1631
|
-
batchStatus.completed_at = new Date().toISOString();
|
|
1632
|
-
status.completed_fus.push(...batchStatus.feature_units.map((fu) => fu.fu_id));
|
|
1633
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
1634
|
-
|
|
1635
|
-
// Check and update checkpoints (see .cursor/rules/checkpoint_management.md)
|
|
1636
|
-
await updateCheckpoints(batch.batch_id, manifest, batchStatus);
|
|
1637
|
-
|
|
1638
|
-
console.log(`[INFO] Batch ${batch.batch_id} completed successfully`);
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
|
-
// All batches complete - ALWAYS run full integration test suite (REQUIRED)
|
|
1642
|
-
console.log(`[INFO] All batches complete. Running full integration test suite (REQUIRED)...`);
|
|
1643
|
-
|
|
1644
|
-
// CRITICAL: Integration tests MUST run after all batches complete
|
|
1645
|
-
// This is a required step in the release build process
|
|
1646
|
-
const fullTestSuitePassed = await runFullIntegrationTestSuite(releaseId);
|
|
1647
|
-
|
|
1648
|
-
// Note: Tests may show as "not_run" if test commands aren't defined yet
|
|
1649
|
-
// This is acceptable for initial releases, but should be addressed
|
|
1650
|
-
if (!fullTestSuitePassed) {
|
|
1651
|
-
const status = await loadStatus();
|
|
1652
|
-
const testResults = status.integration_tests || [];
|
|
1653
|
-
const failedCount = testResults.filter((t) => t.status === "failed").length;
|
|
1654
|
-
const notRunCount = testResults.filter((t) => t.status === "not_run").length;
|
|
1655
|
-
|
|
1656
|
-
if (failedCount > 0) {
|
|
1657
|
-
console.error(`[ERROR] Full integration test suite failed (${failedCount} test(s) failed)`);
|
|
1658
|
-
console.error(
|
|
1659
|
-
`[ERROR] Release cannot be marked as ready_for_deployment until all tests pass`
|
|
1660
|
-
);
|
|
1661
|
-
process.exit(1);
|
|
1662
|
-
} else if (notRunCount > 0) {
|
|
1663
|
-
console.warn(
|
|
1664
|
-
`[WARN] ${notRunCount} test(s) not run (no test commands defined or test files missing)`
|
|
1665
|
-
);
|
|
1666
|
-
console.warn(
|
|
1667
|
-
`[WARN] Release can proceed, but tests should be implemented for full validation`
|
|
1668
|
-
);
|
|
1669
|
-
// Don't fail - allow release to proceed if tests just aren't implemented yet
|
|
1670
|
-
}
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
console.log(`[INFO] Full integration test suite execution completed`);
|
|
1674
|
-
|
|
1675
|
-
// All batches complete
|
|
1676
|
-
status.orchestrator.status = "completed";
|
|
1677
|
-
status.orchestrator.completed_at = new Date().toISOString();
|
|
1678
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
1679
|
-
|
|
1680
|
-
// Ensure Checkpoint 2 is completed (see .cursor/rules/checkpoint_management.md)
|
|
1681
|
-
await ensureCheckpoint2Completed(manifest, status);
|
|
1682
|
-
|
|
1683
|
-
console.log(`[INFO] Release ${RELEASE_ID} execution complete!`);
|
|
1684
|
-
|
|
1685
|
-
// Generate release report (documentation-driven)
|
|
1686
|
-
// All batches complete
|
|
1687
|
-
status.orchestrator.status = "completed";
|
|
1688
|
-
status.orchestrator.completed_at = new Date().toISOString();
|
|
1689
|
-
await fs.writeFile(STATUS_FILE, JSON.stringify(status, null, 2));
|
|
1690
|
-
|
|
1691
|
-
// Ensure Checkpoint 2 is completed
|
|
1692
|
-
await ensureCheckpoint2Completed(manifest, status);
|
|
1693
|
-
|
|
1694
|
-
console.log(`[INFO] Release ${releaseId} execution complete!`);
|
|
1695
|
-
|
|
1696
|
-
// Generate release report (documentation-driven)
|
|
1697
|
-
console.log(`[INFO] Release execution complete. Report generation required.`);
|
|
1698
|
-
console.log(`[INFO] Follow instructions in: docs/feature_units/standards/release_report_spec.md`);
|
|
1699
|
-
console.log(`[INFO] Template: docs/feature_units/standards/release_report_template.md`);
|
|
1700
|
-
console.log(`[INFO] Output: docs/releases/in_progress/${releaseId}/release_report.md`);
|
|
1701
|
-
console.log(
|
|
1702
|
-
`[INFO] IMPORTANT: Release report MUST include Section 9 (Testing Guidance) with all manual test cases from integration_tests.md`
|
|
1703
|
-
);
|
|
1704
|
-
console.log(`[INFO] See .cursor/rules/post_build_testing.md for requirements`);
|
|
1705
|
-
}
|
|
1706
|
-
|
|
1707
|
-
// Run full integration test suite after all batches complete
|
|
1708
|
-
async function runFullIntegrationTestSuite(releaseId) {
|
|
1709
|
-
const suiteStartTime = Date.now();
|
|
1710
|
-
console.log(`\n${"#".repeat(80)}`);
|
|
1711
|
-
console.log(`[TEST SUITE] Starting full integration test suite for Release ${releaseId}`);
|
|
1712
|
-
console.log(`[TEST SUITE] Start time: ${new Date().toISOString()}`);
|
|
1713
|
-
console.log(`${"#".repeat(80)}\n`);
|
|
1714
|
-
|
|
1715
|
-
const integrationTestsPath = `docs/releases/in_progress/${releaseId}/integration_tests.md`;
|
|
1716
|
-
|
|
1717
|
-
try {
|
|
1718
|
-
console.log(`[TEST SUITE] Loading integration tests from: ${integrationTestsPath}`);
|
|
1719
|
-
const content = await fs.readFile(integrationTestsPath, "utf-8");
|
|
1720
|
-
console.log(`[TEST SUITE] File loaded (${content.length} chars)`);
|
|
1721
|
-
|
|
1722
|
-
// Parse all tests from integration_tests.md
|
|
1723
|
-
console.log(`[TEST SUITE] Parsing test definitions...`);
|
|
1724
|
-
const allTests = parseAllIntegrationTests(content);
|
|
1725
|
-
|
|
1726
|
-
if (allTests.length === 0) {
|
|
1727
|
-
console.log(`[TEST SUITE] No integration tests defined, skipping`);
|
|
1728
|
-
return true;
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
console.log(`[TEST SUITE] Found ${allTests.length} integration test(s):`);
|
|
1732
|
-
allTests.forEach((t, idx) => {
|
|
1733
|
-
console.log(`[TEST SUITE] ${idx + 1}. ${t.id}: ${t.name}`);
|
|
1734
|
-
console.log(`[TEST SUITE] Goal: ${t.goal || "N/A"}`);
|
|
1735
|
-
console.log(`[TEST SUITE] Command: ${t.command || "N/A"}`);
|
|
1736
|
-
});
|
|
1737
|
-
console.log(`\n[TEST SUITE] Test execution order: ${allTests.map((t) => t.id).join(" → ")}\n`);
|
|
1738
|
-
|
|
1739
|
-
// Execute each test
|
|
1740
|
-
const results = [];
|
|
1741
|
-
for (let i = 0; i < allTests.length; i++) {
|
|
1742
|
-
const test = allTests[i];
|
|
1743
|
-
console.log(`\n[TEST SUITE] Progress: ${i + 1}/${allTests.length} tests`);
|
|
1744
|
-
console.log(`[TEST SUITE] Running ${test.id}: ${test.name}`);
|
|
1745
|
-
|
|
1746
|
-
const testResult = await executeTestCommand(test);
|
|
1747
|
-
|
|
1748
|
-
// null = not_run, true = passed, false = failed
|
|
1749
|
-
const status = testResult === null ? "not_run" : testResult ? "passed" : "failed";
|
|
1750
|
-
|
|
1751
|
-
results.push({
|
|
1752
|
-
id: test.id,
|
|
1753
|
-
name: test.name,
|
|
1754
|
-
passed: testResult === true, // Only true counts as passed
|
|
1755
|
-
status: status,
|
|
1756
|
-
});
|
|
1757
|
-
|
|
1758
|
-
if (testResult === false) {
|
|
1759
|
-
console.error(`[TEST SUITE] ✗ ${test.id} FAILED`);
|
|
1760
|
-
// Continue running other tests to get full picture
|
|
1761
|
-
} else if (testResult === null) {
|
|
1762
|
-
console.warn(`[TEST SUITE] ⏳ ${test.id} NOT RUN (no command or test file missing)`);
|
|
1763
|
-
} else {
|
|
1764
|
-
console.log(`[TEST SUITE] ✓ ${test.id} PASSED`);
|
|
1765
|
-
}
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
const suiteDuration = Date.now() - suiteStartTime;
|
|
1769
|
-
console.log(`\n${"#".repeat(80)}`);
|
|
1770
|
-
console.log(`[TEST SUITE] Test suite execution completed in ${suiteDuration}ms`);
|
|
1771
|
-
console.log(`[TEST SUITE] End time: ${new Date().toISOString()}`);
|
|
1772
|
-
|
|
1773
|
-
// Update status.md with test results
|
|
1774
|
-
console.log(`[TEST SUITE] Updating status.md with test results...`);
|
|
1775
|
-
await updateIntegrationTestResults(releaseId, results);
|
|
1776
|
-
|
|
1777
|
-
// Check if all tests passed
|
|
1778
|
-
const allPassed = results.every((r) => r.passed);
|
|
1779
|
-
const passed = results.filter((r) => r.passed).length;
|
|
1780
|
-
const failed = results.filter((r) => r.status === "failed").length;
|
|
1781
|
-
const notRun = results.filter((r) => r.status === "not_run").length;
|
|
1782
|
-
|
|
1783
|
-
console.log(`\n[TEST SUITE] Summary:`);
|
|
1784
|
-
console.log(`[TEST SUITE] Total tests: ${allTests.length}`);
|
|
1785
|
-
console.log(`[TEST SUITE] ✓ Passed: ${passed}`);
|
|
1786
|
-
console.log(`[TEST SUITE] ✗ Failed: ${failed}`);
|
|
1787
|
-
console.log(`[TEST SUITE] ⏳ Not run: ${notRun}`);
|
|
1788
|
-
console.log(`[TEST SUITE] Success rate: ${((passed / allTests.length) * 100).toFixed(1)}%`);
|
|
1789
|
-
|
|
1790
|
-
if (failed > 0) {
|
|
1791
|
-
console.log(`\n[TEST SUITE] Failed tests:`);
|
|
1792
|
-
results
|
|
1793
|
-
.filter((r) => r.status === "failed")
|
|
1794
|
-
.forEach((r) => {
|
|
1795
|
-
console.log(`[TEST SUITE] - ${r.id}: ${r.name}`);
|
|
1796
|
-
});
|
|
1797
|
-
}
|
|
1798
|
-
|
|
1799
|
-
if (notRun > 0) {
|
|
1800
|
-
console.log(`\n[TEST SUITE] Not run tests:`);
|
|
1801
|
-
results
|
|
1802
|
-
.filter((r) => r.status === "not_run")
|
|
1803
|
-
.forEach((r) => {
|
|
1804
|
-
console.log(`[TEST SUITE] - ${r.id}: ${r.name}`);
|
|
1805
|
-
});
|
|
1806
|
-
}
|
|
1807
|
-
|
|
1808
|
-
console.log(`${"#".repeat(80)}\n`);
|
|
1809
|
-
|
|
1810
|
-
return allPassed;
|
|
1811
|
-
} catch (error) {
|
|
1812
|
-
console.error(`[ERROR] Full integration test suite failed:`, error.message);
|
|
1813
|
-
return false;
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
|
|
1817
|
-
// Parse all integration tests from markdown (not filtered by batch)
|
|
1818
|
-
function parseAllIntegrationTests(content) {
|
|
1819
|
-
const tests = [];
|
|
1820
|
-
|
|
1821
|
-
// Match test definitions (#### IT-XXX: Test Name)
|
|
1822
|
-
const testRegex = /#### (IT-\d+):\s*([^\n]+)\n[\s\S]*?Batches Covered:\s*([^\n]+)/g;
|
|
1823
|
-
let match;
|
|
1824
|
-
|
|
1825
|
-
while ((match = testRegex.exec(content)) !== null) {
|
|
1826
|
-
const testId = match[1];
|
|
1827
|
-
const testName = match[2].trim();
|
|
1828
|
-
|
|
1829
|
-
// Extract test command if present (look for "test:" field or machine-checkable section)
|
|
1830
|
-
const testSection = match[0];
|
|
1831
|
-
const commandMatch =
|
|
1832
|
-
testSection.match(/test:\s*"([^"]+)"/i) ||
|
|
1833
|
-
testSection.match(/Machine-Checkable:[\s\S]*?`([^`]+)`/i);
|
|
1834
|
-
const testCommand = commandMatch ? commandMatch[1] : null;
|
|
1835
|
-
|
|
1836
|
-
// Extract goal
|
|
1837
|
-
const goalMatch = testSection.match(/\*\*Goal:\*\*\s*([^\n]+)/i);
|
|
1838
|
-
const goal = goalMatch ? goalMatch[1].trim() : testName;
|
|
1839
|
-
|
|
1840
|
-
tests.push({
|
|
1841
|
-
id: testId,
|
|
1842
|
-
name: testName,
|
|
1843
|
-
goal: goal,
|
|
1844
|
-
command: testCommand,
|
|
1845
|
-
});
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
return tests.sort((a, b) => a.id.localeCompare(b.id));
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
// Update integration test results in status.md
|
|
1852
|
-
async function updateIntegrationTestResults(releaseId, results) {
|
|
1853
|
-
const STATUS_MD_PATH = `docs/releases/in_progress/${releaseId}/status.md`;
|
|
1854
|
-
|
|
1855
|
-
try {
|
|
1856
|
-
const statusContent = await fs.readFile(STATUS_MD_PATH, "utf-8");
|
|
1857
|
-
|
|
1858
|
-
// Find integration test status table
|
|
1859
|
-
const testTableRegex =
|
|
1860
|
-
/(### 5\. Integration Test Status[\s\S]*?\| Test ID \| Name[\s\S]*?\| ------- \|)[\s\S]*?(\*\*Summary:\*\*)/;
|
|
1861
|
-
const match = statusContent.match(testTableRegex);
|
|
1862
|
-
|
|
1863
|
-
if (!match) {
|
|
1864
|
-
console.warn(`[WARN] Could not find integration test status table in status.md`);
|
|
1865
|
-
return;
|
|
1866
|
-
}
|
|
1867
|
-
|
|
1868
|
-
// Generate new test rows
|
|
1869
|
-
const testRows = results
|
|
1870
|
-
.map((r) => {
|
|
1871
|
-
const icon = r.status === "passed" ? "✅" : r.status === "failed" ? "❌" : "⏳";
|
|
1872
|
-
const statusText =
|
|
1873
|
-
r.status === "passed" ? "passed" : r.status === "failed" ? "failed" : "not_run";
|
|
1874
|
-
return `| ${r.id} | ${r.name} | ${icon} ${statusText} |`;
|
|
1875
|
-
})
|
|
1876
|
-
.join("\n");
|
|
1877
|
-
|
|
1878
|
-
const passedCount = results.filter((r) => r.passed).length;
|
|
1879
|
-
const totalCount = results.length;
|
|
1880
|
-
|
|
1881
|
-
// Replace test table
|
|
1882
|
-
const newContent = statusContent.replace(
|
|
1883
|
-
testTableRegex,
|
|
1884
|
-
`$1\n${testRows}\n\n$2 ${passedCount}/${totalCount} passed`
|
|
1885
|
-
);
|
|
1886
|
-
|
|
1887
|
-
await fs.writeFile(STATUS_MD_PATH, newContent, "utf-8");
|
|
1888
|
-
console.log(`[INFO] Updated integration test results in status.md`);
|
|
1889
|
-
} catch (error) {
|
|
1890
|
-
console.warn(`[WARN] Failed to update integration test results: ${error.message}`);
|
|
1891
|
-
}
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
// Update checkpoints when batch completes
|
|
1895
|
-
async function updateCheckpoints(batchId, manifest, batchStatus) {
|
|
1896
|
-
const STATUS_MD_PATH = `docs/releases/in_progress/${RELEASE_ID}/status.md`;
|
|
1897
|
-
|
|
1898
|
-
try {
|
|
1899
|
-
const statusContent = await fs.readFile(STATUS_MD_PATH, "utf-8");
|
|
1900
|
-
const checkpoints = manifest.checkpoints || {};
|
|
1901
|
-
let updated = false;
|
|
1902
|
-
let newContent = statusContent;
|
|
1903
|
-
|
|
1904
|
-
// Check each checkpoint trigger
|
|
1905
|
-
for (const [checkpointKey, triggerBatch] of Object.entries(checkpoints)) {
|
|
1906
|
-
const triggerBatchNum = parseFloat(triggerBatch);
|
|
1907
|
-
const currentBatchNum = parseFloat(batchId);
|
|
1908
|
-
|
|
1909
|
-
if (triggerBatchNum === currentBatchNum) {
|
|
1910
|
-
// Extract checkpoint name from key (e.g., "checkpoint_0.5_after_batch" -> "0.5")
|
|
1911
|
-
const checkpointId = checkpointKey.replace("checkpoint_", "").replace("_after_batch", "");
|
|
1912
|
-
const checkpointName =
|
|
1913
|
-
checkpointId === "0.5"
|
|
1914
|
-
? "Checkpoint 0.5 — Blockchain Foundation Review"
|
|
1915
|
-
: checkpointId === "1"
|
|
1916
|
-
? "Checkpoint 1 — Mid-Release Review"
|
|
1917
|
-
: `Checkpoint ${checkpointId}`;
|
|
1918
|
-
|
|
1919
|
-
// Check if checkpoint is still pending
|
|
1920
|
-
const checkpointRegex = new RegExp(
|
|
1921
|
-
`(- \\*\\*${checkpointName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\*\\*: )\`pending\``
|
|
1922
|
-
);
|
|
1923
|
-
|
|
1924
|
-
if (checkpointRegex.test(newContent)) {
|
|
1925
|
-
// Update to completed
|
|
1926
|
-
const fuList = batchStatus.feature_units.map((fu) => fu.fu_id).join(", ");
|
|
1927
|
-
const completionNote = ` - Batch ${batchId} completed: ${fuList} all complete.`;
|
|
1928
|
-
|
|
1929
|
-
newContent = newContent.replace(checkpointRegex, `$1\`completed\``);
|
|
1930
|
-
|
|
1931
|
-
// Add completion note after checkpoint line
|
|
1932
|
-
const checkpointLineRegex = new RegExp(
|
|
1933
|
-
`(- \\*\\*${checkpointName.replace(
|
|
1934
|
-
/[.*+?^${}()|[\]\\]/g,
|
|
1935
|
-
"\\$&"
|
|
1936
|
-
)}\\*\\*: \`completed\`\\n)`
|
|
1937
|
-
);
|
|
1938
|
-
newContent = newContent.replace(checkpointLineRegex, `$1${completionNote}\n`);
|
|
1939
|
-
|
|
1940
|
-
updated = true;
|
|
1941
|
-
console.log(
|
|
1942
|
-
`[INFO] Checkpoint ${checkpointId} marked as completed (triggered by Batch ${batchId})`
|
|
1943
|
-
);
|
|
1944
|
-
}
|
|
1945
|
-
}
|
|
1946
|
-
}
|
|
1947
|
-
|
|
1948
|
-
if (updated) {
|
|
1949
|
-
await fs.writeFile(STATUS_MD_PATH, newContent, "utf-8");
|
|
1950
|
-
}
|
|
1951
|
-
} catch (error) {
|
|
1952
|
-
console.warn(`[WARN] Failed to update checkpoints: ${error.message}`);
|
|
1953
|
-
console.warn(`[WARN] Please manually update checkpoints in ${STATUS_MD_PATH}`);
|
|
1954
|
-
}
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
// Ensure Checkpoint 2 is completed after all batches
|
|
1958
|
-
async function ensureCheckpoint2Completed(manifest, status) {
|
|
1959
|
-
const STATUS_MD_PATH = `docs/releases/in_progress/${RELEASE_ID}/status.md`;
|
|
1960
|
-
|
|
1961
|
-
try {
|
|
1962
|
-
const statusContent = await fs.readFile(STATUS_MD_PATH, "utf-8");
|
|
1963
|
-
|
|
1964
|
-
// Check if Checkpoint 2 exists and is pending
|
|
1965
|
-
const checkpoint2Regex = /(- \*\*Checkpoint 2 — Pre-Release Sign-Off\*\*: )`pending`/;
|
|
1966
|
-
|
|
1967
|
-
if (checkpoint2Regex.test(statusContent)) {
|
|
1968
|
-
const completedBatches = status.batches.filter((b) => b.status === "completed").length;
|
|
1969
|
-
const totalBatches = status.batches.length;
|
|
1970
|
-
const completedFUs = status.completed_fus.length;
|
|
1971
|
-
|
|
1972
|
-
const completionNote = ` - All batches complete (${completedBatches}/${totalBatches}).
|
|
1973
|
-
- Release status: ready_for_deployment.
|
|
1974
|
-
- All P0 Feature Units complete (${completedFUs} completed).`;
|
|
1975
|
-
|
|
1976
|
-
let newContent = statusContent.replace(checkpoint2Regex, `$1\`completed\``);
|
|
1977
|
-
|
|
1978
|
-
// Add completion note
|
|
1979
|
-
const checkpoint2LineRegex = /(- \*\*Checkpoint 2 — Pre-Release Sign-Off\*\*: `completed`\n)/;
|
|
1980
|
-
newContent = newContent.replace(checkpoint2LineRegex, `$1${completionNote}\n`);
|
|
1981
|
-
|
|
1982
|
-
await fs.writeFile(STATUS_MD_PATH, newContent, "utf-8");
|
|
1983
|
-
console.log(`[INFO] Checkpoint 2 marked as completed`);
|
|
1984
|
-
}
|
|
1985
|
-
} catch (error) {
|
|
1986
|
-
console.warn(`[WARN] Failed to update Checkpoint 2: ${error.message}`);
|
|
1987
|
-
console.warn(`[WARN] Please manually update Checkpoint 2 in ${STATUS_MD_PATH}`);
|
|
1988
|
-
}
|
|
1989
|
-
}
|
|
1990
|
-
|
|
1991
|
-
// Run orchestrator
|
|
1992
|
-
main().catch((error) => {
|
|
1993
|
-
console.error("[ERROR] Orchestrator failed:", error);
|
|
1994
|
-
process.exit(1);
|
|
1995
|
-
});
|