sqlew 3.6.0 → 3.6.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/CHANGELOG.md +403 -376
- package/assets/config.example.toml +9 -0
- package/dist/config/types.d.ts +2 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js.map +1 -1
- package/dist/database.d.ts +14 -1
- package/dist/database.d.ts.map +1 -1
- package/dist/database.js +128 -5
- package/dist/database.js.map +1 -1
- package/dist/index.js +136 -82
- package/dist/index.js.map +1 -1
- package/dist/knexfile.d.ts.map +1 -1
- package/dist/knexfile.js +15 -3
- package/dist/knexfile.js.map +1 -1
- package/dist/migrations/knex/bootstrap/20251025020452_create_master_tables.d.ts.map +1 -0
- package/dist/migrations/knex/{20251025020452_create_master_tables.js → bootstrap/20251025020452_create_master_tables.js} +15 -12
- package/dist/migrations/knex/bootstrap/20251025020452_create_master_tables.js.map +1 -0
- package/dist/migrations/knex/bootstrap/20251025021152_create_transaction_tables.d.ts.map +1 -0
- package/dist/migrations/knex/{20251025021152_create_transaction_tables.js → bootstrap/20251025021152_create_transaction_tables.js} +19 -19
- package/dist/migrations/knex/bootstrap/20251025021152_create_transaction_tables.js.map +1 -0
- package/dist/migrations/knex/bootstrap/20251025021351_create_indexes.d.ts.map +1 -0
- package/dist/migrations/knex/bootstrap/20251025021351_create_indexes.js +93 -0
- package/dist/migrations/knex/bootstrap/20251025021351_create_indexes.js.map +1 -0
- package/dist/migrations/knex/bootstrap/20251025021416_seed_master_data.d.ts.map +1 -0
- package/dist/migrations/knex/bootstrap/20251025021416_seed_master_data.js +64 -0
- package/dist/migrations/knex/bootstrap/20251025021416_seed_master_data.js.map +1 -0
- package/dist/migrations/knex/bootstrap/20251025070349_create_views.d.ts.map +1 -0
- package/dist/migrations/knex/bootstrap/20251025070349_create_views.js.map +1 -0
- package/dist/migrations/knex/enhancements/20251025081221_add_link_type_to_task_decision_links.d.ts.map +1 -0
- package/dist/migrations/knex/enhancements/20251025081221_add_link_type_to_task_decision_links.js.map +1 -0
- package/dist/migrations/knex/enhancements/20251025082220_fix_task_dependencies_columns.d.ts.map +1 -0
- package/dist/migrations/knex/enhancements/20251025082220_fix_task_dependencies_columns.js.map +1 -0
- package/dist/migrations/knex/enhancements/20251025090000_create_help_system_tables.d.ts.map +1 -0
- package/dist/migrations/knex/enhancements/20251025090000_create_help_system_tables.js.map +1 -0
- package/dist/migrations/knex/enhancements/20251025090100_seed_help_categories_and_use_cases.d.ts.map +1 -0
- package/dist/migrations/knex/enhancements/20251025090100_seed_help_categories_and_use_cases.js.map +1 -0
- package/dist/migrations/knex/enhancements/20251025100000_seed_help_metadata.d.ts.map +1 -0
- package/dist/migrations/knex/enhancements/20251025100000_seed_help_metadata.js.map +1 -0
- package/dist/migrations/knex/enhancements/20251025100100_seed_remaining_use_cases.d.ts.map +1 -0
- package/dist/migrations/knex/enhancements/20251025100100_seed_remaining_use_cases.js.map +1 -0
- package/dist/migrations/knex/enhancements/20251025120000_add_cascade_to_task_dependencies.d.ts.map +1 -0
- package/dist/migrations/knex/enhancements/20251025120000_add_cascade_to_task_dependencies.js.map +1 -0
- package/dist/migrations/knex/enhancements/20251027000000_add_agent_reuse_system.d.ts +14 -0
- package/dist/migrations/knex/enhancements/20251027000000_add_agent_reuse_system.d.ts.map +1 -0
- package/dist/migrations/knex/enhancements/20251027000000_add_agent_reuse_system.js +34 -0
- package/dist/migrations/knex/enhancements/20251027000000_add_agent_reuse_system.js.map +1 -0
- package/dist/migrations/knex/enhancements/20251027010000_add_task_constraint_to_decision_context.d.ts +4 -0
- package/dist/migrations/knex/enhancements/20251027010000_add_task_constraint_to_decision_context.d.ts.map +1 -0
- package/dist/migrations/knex/enhancements/20251027010000_add_task_constraint_to_decision_context.js +24 -0
- package/dist/migrations/knex/enhancements/20251027010000_add_task_constraint_to_decision_context.js.map +1 -0
- package/dist/migrations/knex/enhancements/20251027020000_update_agent_reusability.d.ts +16 -0
- package/dist/migrations/knex/enhancements/20251027020000_update_agent_reusability.d.ts.map +1 -0
- package/dist/migrations/knex/enhancements/20251027020000_update_agent_reusability.js +27 -0
- package/dist/migrations/knex/enhancements/20251027020000_update_agent_reusability.js.map +1 -0
- package/dist/migrations/knex/upgrades/20251024010000_upgrade_v1_0_to_v1_1.d.ts +13 -0
- package/dist/migrations/knex/upgrades/20251024010000_upgrade_v1_0_to_v1_1.d.ts.map +1 -0
- package/dist/migrations/knex/upgrades/20251024010000_upgrade_v1_0_to_v1_1.js +70 -0
- package/dist/migrations/knex/upgrades/20251024010000_upgrade_v1_0_to_v1_1.js.map +1 -0
- package/dist/migrations/knex/upgrades/20251024020000_upgrade_v2_0_to_v2_1.d.ts +11 -0
- package/dist/migrations/knex/upgrades/20251024020000_upgrade_v2_0_to_v2_1.d.ts.map +1 -0
- package/dist/migrations/knex/upgrades/20251024020000_upgrade_v2_0_to_v2_1.js +36 -0
- package/dist/migrations/knex/upgrades/20251024020000_upgrade_v2_0_to_v2_1.js.map +1 -0
- package/dist/migrations/knex/upgrades/20251024030000_upgrade_v2_1_to_v3_0.d.ts +14 -0
- package/dist/migrations/knex/upgrades/20251024030000_upgrade_v2_1_to_v3_0.d.ts.map +1 -0
- package/dist/migrations/knex/upgrades/20251024030000_upgrade_v2_1_to_v3_0.js +84 -0
- package/dist/migrations/knex/upgrades/20251024030000_upgrade_v2_1_to_v3_0.js.map +1 -0
- package/dist/migrations/knex/upgrades/20251024040000_upgrade_v3_0_to_v3_2.d.ts +9 -0
- package/dist/migrations/knex/upgrades/20251024040000_upgrade_v3_0_to_v3_2.d.ts.map +1 -0
- package/dist/migrations/knex/upgrades/20251024040000_upgrade_v3_0_to_v3_2.js +37 -0
- package/dist/migrations/knex/upgrades/20251024040000_upgrade_v3_0_to_v3_2.js.map +1 -0
- package/dist/migrations/knex/upgrades/20251024050000_upgrade_v3_2_0_to_v3_2_2.d.ts +9 -0
- package/dist/migrations/knex/upgrades/20251024050000_upgrade_v3_2_0_to_v3_2_2.d.ts.map +1 -0
- package/dist/migrations/knex/upgrades/20251024050000_upgrade_v3_2_0_to_v3_2_2.js +41 -0
- package/dist/migrations/knex/upgrades/20251024050000_upgrade_v3_2_0_to_v3_2_2.js.map +1 -0
- package/dist/migrations/knex/upgrades/20251024060000_upgrade_v3_4_to_v3_5.d.ts +9 -0
- package/dist/migrations/knex/upgrades/20251024060000_upgrade_v3_4_to_v3_5.d.ts.map +1 -0
- package/dist/migrations/knex/upgrades/20251024060000_upgrade_v3_4_to_v3_5.js +36 -0
- package/dist/migrations/knex/upgrades/20251024060000_upgrade_v3_4_to_v3_5.js.map +1 -0
- package/dist/migrations/knex/upgrades/20251024070000_upgrade_v3_5_to_v3_6.d.ts +10 -0
- package/dist/migrations/knex/upgrades/20251024070000_upgrade_v3_5_to_v3_6.d.ts.map +1 -0
- package/dist/migrations/knex/upgrades/20251024070000_upgrade_v3_5_to_v3_6.js +28 -0
- package/dist/migrations/knex/upgrades/20251024070000_upgrade_v3_5_to_v3_6.js.map +1 -0
- package/dist/tests/agent-reuse.test.d.ts +6 -0
- package/dist/tests/agent-reuse.test.d.ts.map +1 -0
- package/dist/tests/agent-reuse.test.js +242 -0
- package/dist/tests/agent-reuse.test.js.map +1 -0
- package/dist/tests/all-features.test.d.ts +7 -0
- package/dist/tests/all-features.test.d.ts.map +1 -0
- package/dist/tests/all-features.test.js +514 -0
- package/dist/tests/all-features.test.js.map +1 -0
- package/dist/tests/migrations/test-all-versions-real.d.ts +8 -0
- package/dist/tests/migrations/test-all-versions-real.d.ts.map +1 -0
- package/dist/tests/migrations/test-all-versions-real.js +234 -0
- package/dist/tests/migrations/test-all-versions-real.js.map +1 -0
- package/dist/tests/migrations/test-all-versions.d.ts +14 -0
- package/dist/tests/migrations/test-all-versions.d.ts.map +1 -0
- package/dist/tests/migrations/test-all-versions.js +521 -0
- package/dist/tests/migrations/test-all-versions.js.map +1 -0
- package/dist/tools/constraints.d.ts.map +1 -1
- package/dist/tools/constraints.js +11 -7
- package/dist/tools/constraints.js.map +1 -1
- package/dist/tools/context.d.ts.map +1 -1
- package/dist/tools/context.js +73 -16
- package/dist/tools/context.js.map +1 -1
- package/dist/tools/messaging.d.ts.map +1 -1
- package/dist/tools/messaging.js +23 -1
- package/dist/tools/messaging.js.map +1 -1
- package/dist/tools/tasks.d.ts.map +1 -1
- package/dist/tools/tasks.js +8 -5
- package/dist/tools/tasks.js.map +1 -1
- package/dist/tools/utils.d.ts.map +1 -1
- package/dist/tools/utils.js +4 -1
- package/dist/tools/utils.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/cleanup.d.ts +3 -1
- package/dist/utils/cleanup.d.ts.map +1 -1
- package/dist/utils/cleanup.js +6 -3
- package/dist/utils/cleanup.js.map +1 -1
- package/dist/utils/debug-logger.d.ts +57 -2
- package/dist/utils/debug-logger.d.ts.map +1 -1
- package/dist/utils/debug-logger.js +155 -4
- package/dist/utils/debug-logger.js.map +1 -1
- package/dist/utils/error-handler.d.ts +28 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +121 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/help-tracking.d.ts +3 -3
- package/dist/utils/help-tracking.d.ts.map +1 -1
- package/dist/utils/help-tracking.js.map +1 -1
- package/dist/utils/param-parser.d.ts +23 -0
- package/dist/utils/param-parser.d.ts.map +1 -0
- package/dist/utils/param-parser.js +52 -0
- package/dist/utils/param-parser.js.map +1 -0
- package/dist/utils/retention.d.ts +10 -0
- package/dist/utils/retention.d.ts.map +1 -1
- package/dist/utils/retention.js +19 -0
- package/dist/utils/retention.js.map +1 -1
- package/docs/MIGRATION_CHAIN.md +293 -280
- package/package.json +85 -81
- package/dist/migrations/add-decision-context.d.ts +0 -28
- package/dist/migrations/add-decision-context.d.ts.map +0 -1
- package/dist/migrations/add-decision-context.js +0 -125
- package/dist/migrations/add-decision-context.js.map +0 -1
- package/dist/migrations/add-help-system-tables.d.ts +0 -35
- package/dist/migrations/add-help-system-tables.d.ts.map +0 -1
- package/dist/migrations/add-help-system-tables.js +0 -206
- package/dist/migrations/add-help-system-tables.js.map +0 -1
- package/dist/migrations/add-table-prefixes.d.ts +0 -29
- package/dist/migrations/add-table-prefixes.d.ts.map +0 -1
- package/dist/migrations/add-table-prefixes.js +0 -150
- package/dist/migrations/add-table-prefixes.js.map +0 -1
- package/dist/migrations/add-task-dependencies.d.ts +0 -26
- package/dist/migrations/add-task-dependencies.d.ts.map +0 -1
- package/dist/migrations/add-task-dependencies.js +0 -94
- package/dist/migrations/add-task-dependencies.js.map +0 -1
- package/dist/migrations/add-task-tables.d.ts +0 -47
- package/dist/migrations/add-task-tables.d.ts.map +0 -1
- package/dist/migrations/add-task-tables.js +0 -285
- package/dist/migrations/add-task-tables.js.map +0 -1
- package/dist/migrations/add-token-tracking.d.ts +0 -28
- package/dist/migrations/add-token-tracking.d.ts.map +0 -1
- package/dist/migrations/add-token-tracking.js +0 -108
- package/dist/migrations/add-token-tracking.js.map +0 -1
- package/dist/migrations/add-v2.1.0-features.d.ts +0 -29
- package/dist/migrations/add-v2.1.0-features.d.ts.map +0 -1
- package/dist/migrations/add-v2.1.0-features.js +0 -198
- package/dist/migrations/add-v2.1.0-features.js.map +0 -1
- package/dist/migrations/add-v3.5.0-pruned-files.d.ts +0 -26
- package/dist/migrations/add-v3.5.0-pruned-files.d.ts.map +0 -1
- package/dist/migrations/add-v3.5.0-pruned-files.js +0 -107
- package/dist/migrations/add-v3.5.0-pruned-files.js.map +0 -1
- package/dist/migrations/index.d.ts +0 -112
- package/dist/migrations/index.d.ts.map +0 -1
- package/dist/migrations/index.js +0 -411
- package/dist/migrations/index.js.map +0 -1
- package/dist/migrations/knex/20251025020452_create_master_tables.d.ts.map +0 -1
- package/dist/migrations/knex/20251025020452_create_master_tables.js.map +0 -1
- package/dist/migrations/knex/20251025021152_create_transaction_tables.d.ts.map +0 -1
- package/dist/migrations/knex/20251025021152_create_transaction_tables.js.map +0 -1
- package/dist/migrations/knex/20251025021351_create_indexes.d.ts.map +0 -1
- package/dist/migrations/knex/20251025021351_create_indexes.js +0 -62
- package/dist/migrations/knex/20251025021351_create_indexes.js.map +0 -1
- package/dist/migrations/knex/20251025021416_seed_master_data.d.ts.map +0 -1
- package/dist/migrations/knex/20251025021416_seed_master_data.js +0 -58
- package/dist/migrations/knex/20251025021416_seed_master_data.js.map +0 -1
- package/dist/migrations/knex/20251025070349_create_views.d.ts.map +0 -1
- package/dist/migrations/knex/20251025070349_create_views.js.map +0 -1
- package/dist/migrations/knex/20251025081221_add_link_type_to_task_decision_links.d.ts.map +0 -1
- package/dist/migrations/knex/20251025081221_add_link_type_to_task_decision_links.js.map +0 -1
- package/dist/migrations/knex/20251025082220_fix_task_dependencies_columns.d.ts.map +0 -1
- package/dist/migrations/knex/20251025082220_fix_task_dependencies_columns.js.map +0 -1
- package/dist/migrations/knex/20251025090000_create_help_system_tables.d.ts.map +0 -1
- package/dist/migrations/knex/20251025090000_create_help_system_tables.js.map +0 -1
- package/dist/migrations/knex/20251025090100_seed_help_categories_and_use_cases.d.ts.map +0 -1
- package/dist/migrations/knex/20251025090100_seed_help_categories_and_use_cases.js.map +0 -1
- package/dist/migrations/knex/20251025100000_seed_help_metadata.d.ts.map +0 -1
- package/dist/migrations/knex/20251025100000_seed_help_metadata.js.map +0 -1
- package/dist/migrations/knex/20251025100100_seed_remaining_use_cases.d.ts.map +0 -1
- package/dist/migrations/knex/20251025100100_seed_remaining_use_cases.js.map +0 -1
- package/dist/migrations/knex/20251025120000_add_cascade_to_task_dependencies.d.ts.map +0 -1
- package/dist/migrations/knex/20251025120000_add_cascade_to_task_dependencies.js.map +0 -1
- package/dist/migrations/migrate-decisions-to-tasks.d.ts +0 -61
- package/dist/migrations/migrate-decisions-to-tasks.d.ts.map +0 -1
- package/dist/migrations/migrate-decisions-to-tasks.js +0 -442
- package/dist/migrations/migrate-decisions-to-tasks.js.map +0 -1
- package/dist/migrations/seed-help-data.d.ts +0 -48
- package/dist/migrations/seed-help-data.d.ts.map +0 -1
- package/dist/migrations/seed-help-data.js +0 -1466
- package/dist/migrations/seed-help-data.js.map +0 -1
- package/dist/migrations/seed-tool-metadata.d.ts +0 -24
- package/dist/migrations/seed-tool-metadata.d.ts.map +0 -1
- package/dist/migrations/seed-tool-metadata.js +0 -392
- package/dist/migrations/seed-tool-metadata.js.map +0 -1
- package/dist/migrations/v3.6.0-help-system-refactor.d.ts +0 -46
- package/dist/migrations/v3.6.0-help-system-refactor.d.ts.map +0 -1
- package/dist/migrations/v3.6.0-help-system-refactor.js +0 -223
- package/dist/migrations/v3.6.0-help-system-refactor.js.map +0 -1
- package/dist/tests/migrations/test-v3.2-migration.d.ts +0 -6
- package/dist/tests/migrations/test-v3.2-migration.d.ts.map +0 -1
- package/dist/tests/migrations/test-v3.2-migration.js +0 -191
- package/dist/tests/migrations/test-v3.2-migration.js.map +0 -1
- /package/dist/migrations/knex/{20251025020452_create_master_tables.d.ts → bootstrap/20251025020452_create_master_tables.d.ts} +0 -0
- /package/dist/migrations/knex/{20251025021152_create_transaction_tables.d.ts → bootstrap/20251025021152_create_transaction_tables.d.ts} +0 -0
- /package/dist/migrations/knex/{20251025021351_create_indexes.d.ts → bootstrap/20251025021351_create_indexes.d.ts} +0 -0
- /package/dist/migrations/knex/{20251025021416_seed_master_data.d.ts → bootstrap/20251025021416_seed_master_data.d.ts} +0 -0
- /package/dist/migrations/knex/{20251025070349_create_views.d.ts → bootstrap/20251025070349_create_views.d.ts} +0 -0
- /package/dist/migrations/knex/{20251025070349_create_views.js → bootstrap/20251025070349_create_views.js} +0 -0
- /package/dist/migrations/knex/{20251025081221_add_link_type_to_task_decision_links.d.ts → enhancements/20251025081221_add_link_type_to_task_decision_links.d.ts} +0 -0
- /package/dist/migrations/knex/{20251025081221_add_link_type_to_task_decision_links.js → enhancements/20251025081221_add_link_type_to_task_decision_links.js} +0 -0
- /package/dist/migrations/knex/{20251025082220_fix_task_dependencies_columns.d.ts → enhancements/20251025082220_fix_task_dependencies_columns.d.ts} +0 -0
- /package/dist/migrations/knex/{20251025082220_fix_task_dependencies_columns.js → enhancements/20251025082220_fix_task_dependencies_columns.js} +0 -0
- /package/dist/migrations/knex/{20251025090000_create_help_system_tables.d.ts → enhancements/20251025090000_create_help_system_tables.d.ts} +0 -0
- /package/dist/migrations/knex/{20251025090000_create_help_system_tables.js → enhancements/20251025090000_create_help_system_tables.js} +0 -0
- /package/dist/migrations/knex/{20251025090100_seed_help_categories_and_use_cases.d.ts → enhancements/20251025090100_seed_help_categories_and_use_cases.d.ts} +0 -0
- /package/dist/migrations/knex/{20251025090100_seed_help_categories_and_use_cases.js → enhancements/20251025090100_seed_help_categories_and_use_cases.js} +0 -0
- /package/dist/migrations/knex/{20251025100000_seed_help_metadata.d.ts → enhancements/20251025100000_seed_help_metadata.d.ts} +0 -0
- /package/dist/migrations/knex/{20251025100000_seed_help_metadata.js → enhancements/20251025100000_seed_help_metadata.js} +0 -0
- /package/dist/migrations/knex/{20251025100100_seed_remaining_use_cases.d.ts → enhancements/20251025100100_seed_remaining_use_cases.d.ts} +0 -0
- /package/dist/migrations/knex/{20251025100100_seed_remaining_use_cases.js → enhancements/20251025100100_seed_remaining_use_cases.js} +0 -0
- /package/dist/migrations/knex/{20251025120000_add_cascade_to_task_dependencies.d.ts → enhancements/20251025120000_add_cascade_to_task_dependencies.d.ts} +0 -0
- /package/dist/migrations/knex/{20251025120000_add_cascade_to_task_dependencies.js → enhancements/20251025120000_add_cascade_to_task_dependencies.js} +0 -0
|
@@ -1,1466 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Migration: Seed Help System Data - All Complexity Levels (v3.6.0)
|
|
3
|
-
*
|
|
4
|
-
* Seeds the help system database with 41 use-cases covering all 6 use-case
|
|
5
|
-
* categories from the taxonomy:
|
|
6
|
-
* - 18 basic complexity use-cases (single action)
|
|
7
|
-
* - 15 intermediate complexity use-cases (2-3 actions)
|
|
8
|
-
* - 8 advanced complexity use-cases (4-6+ actions, multi-tool orchestration)
|
|
9
|
-
*
|
|
10
|
-
* Distribution by Category:
|
|
11
|
-
* - task_management: 9 use-cases (4 basic, 3 intermediate, 2 advanced)
|
|
12
|
-
* - decision_tracking: 8 use-cases (4 basic, 3 intermediate, 1 advanced)
|
|
13
|
-
* - file_tracking: 6 use-cases (3 basic, 2 intermediate, 1 advanced)
|
|
14
|
-
* - constraint_management: 4 use-cases (2 basic, 2 intermediate, 0 advanced)
|
|
15
|
-
* - cross_tool_workflow: 8 use-cases (2 basic, 3 intermediate, 3 advanced)
|
|
16
|
-
* - configuration: 6 use-cases (3 basic, 2 intermediate, 1 advanced)
|
|
17
|
-
*
|
|
18
|
-
* Each use-case includes:
|
|
19
|
-
* - Title: Clear, actionable description
|
|
20
|
-
* - Complexity: 'basic' (single action), 'intermediate' (2-3 actions), or 'advanced' (4-6+ actions)
|
|
21
|
-
* - Description: Detailed explanation
|
|
22
|
-
* - Full Example: JSON with action and params (or complex multi-step scenario for advanced)
|
|
23
|
-
* - Action Sequence: JSON array of action names
|
|
24
|
-
* - Expected Outcome (intermediate/advanced): What success looks like
|
|
25
|
-
* - Common Pitfalls (intermediate): Typical mistakes to avoid
|
|
26
|
-
* - Related Tools (intermediate): Cross-tool dependencies
|
|
27
|
-
* - Real-world scenarios (advanced): Production use-case context
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* Check if seed data is needed
|
|
31
|
-
*/
|
|
32
|
-
export function needsHelpDataSeeding(db) {
|
|
33
|
-
// Check if use case categories are already seeded
|
|
34
|
-
const categoryCount = db.prepare('SELECT COUNT(*) as count FROM m_help_use_case_categories').get();
|
|
35
|
-
return categoryCount.count === 0;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Seed use case categories
|
|
39
|
-
*/
|
|
40
|
-
function seedCategories(db) {
|
|
41
|
-
const categories = [
|
|
42
|
-
{
|
|
43
|
-
name: 'task_management',
|
|
44
|
-
description: 'Use cases focused on creating, organizing, tracking, and coordinating development tasks through the Kanban-style task system.'
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: 'decision_tracking',
|
|
48
|
-
description: 'Use cases for recording, retrieving, and versioning architectural decisions, design choices, and shared context across agents.'
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: 'file_tracking',
|
|
52
|
-
description: 'Use cases for tracking file modifications, detecting edit conflicts, and maintaining change history with layer associations.'
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: 'constraint_management',
|
|
56
|
-
description: 'Use cases for defining, enforcing, and tracking architectural constraints, requirements, and limitations.'
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: 'cross_tool_workflow',
|
|
60
|
-
description: 'Use cases that demonstrate multi-step workflows spanning multiple tools, showing how tools integrate for complex scenarios.'
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
name: 'configuration',
|
|
64
|
-
description: 'Use cases for managing system configuration, viewing statistics, and performing maintenance operations.'
|
|
65
|
-
}
|
|
66
|
-
];
|
|
67
|
-
const stmt = db.prepare(`
|
|
68
|
-
INSERT INTO m_help_use_case_categories (category_name, description)
|
|
69
|
-
VALUES (?, ?)
|
|
70
|
-
`);
|
|
71
|
-
for (const category of categories) {
|
|
72
|
-
stmt.run(category.name, category.description);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Seed basic complexity use cases
|
|
77
|
-
*/
|
|
78
|
-
function seedBasicUseCases(db) {
|
|
79
|
-
const useCases = [
|
|
80
|
-
// =========================================================================
|
|
81
|
-
// TASK MANAGEMENT (3 use-cases)
|
|
82
|
-
// =========================================================================
|
|
83
|
-
// Basic: Create a simple task
|
|
84
|
-
{
|
|
85
|
-
category: 'task_management',
|
|
86
|
-
title: 'Create a simple task',
|
|
87
|
-
complexity: 'basic',
|
|
88
|
-
description: 'Create a new task with a title, priority level, and layer assignment. This is the most fundamental task operation for tracking development work.',
|
|
89
|
-
full_example: JSON.stringify({
|
|
90
|
-
action: 'task',
|
|
91
|
-
params: {
|
|
92
|
-
action: 'create',
|
|
93
|
-
title: 'Implement user authentication',
|
|
94
|
-
priority: 3,
|
|
95
|
-
layer: 'business'
|
|
96
|
-
}
|
|
97
|
-
}),
|
|
98
|
-
action_sequence: JSON.stringify(['create'])
|
|
99
|
-
},
|
|
100
|
-
// Basic: Update task status
|
|
101
|
-
{
|
|
102
|
-
category: 'task_management',
|
|
103
|
-
title: 'Update task status',
|
|
104
|
-
complexity: 'basic',
|
|
105
|
-
description: 'Move a task to a new status (e.g., from "todo" to "in_progress"). The system validates status transitions according to the state machine.',
|
|
106
|
-
full_example: JSON.stringify({
|
|
107
|
-
action: 'task',
|
|
108
|
-
params: {
|
|
109
|
-
action: 'move',
|
|
110
|
-
task_id: 1,
|
|
111
|
-
new_status: 'in_progress'
|
|
112
|
-
}
|
|
113
|
-
}),
|
|
114
|
-
action_sequence: JSON.stringify(['move'])
|
|
115
|
-
},
|
|
116
|
-
// Basic: Query tasks by status
|
|
117
|
-
{
|
|
118
|
-
category: 'task_management',
|
|
119
|
-
title: 'List tasks by status',
|
|
120
|
-
complexity: 'basic',
|
|
121
|
-
description: 'Retrieve all tasks with a specific status (e.g., all "in_progress" tasks). Returns metadata-only for token efficiency.',
|
|
122
|
-
full_example: JSON.stringify({
|
|
123
|
-
action: 'task',
|
|
124
|
-
params: {
|
|
125
|
-
action: 'list',
|
|
126
|
-
status: 'in_progress'
|
|
127
|
-
}
|
|
128
|
-
}),
|
|
129
|
-
action_sequence: JSON.stringify(['list'])
|
|
130
|
-
},
|
|
131
|
-
// =========================================================================
|
|
132
|
-
// DECISION TRACKING (3 use-cases)
|
|
133
|
-
// =========================================================================
|
|
134
|
-
// Basic: Set a simple decision
|
|
135
|
-
{
|
|
136
|
-
category: 'decision_tracking',
|
|
137
|
-
title: 'Record a simple decision',
|
|
138
|
-
complexity: 'basic',
|
|
139
|
-
description: 'Store a key-value decision with metadata (tags, layer, scope). This is the fundamental operation for tracking architectural choices.',
|
|
140
|
-
full_example: JSON.stringify({
|
|
141
|
-
action: 'decision',
|
|
142
|
-
params: {
|
|
143
|
-
action: 'set',
|
|
144
|
-
decision_key: 'auth_method',
|
|
145
|
-
value: 'JWT',
|
|
146
|
-
tags: ['authentication', 'security'],
|
|
147
|
-
layer: 'business',
|
|
148
|
-
scope: 'auth-module'
|
|
149
|
-
}
|
|
150
|
-
}),
|
|
151
|
-
action_sequence: JSON.stringify(['set'])
|
|
152
|
-
},
|
|
153
|
-
// Basic: Retrieve a decision by key
|
|
154
|
-
{
|
|
155
|
-
category: 'decision_tracking',
|
|
156
|
-
title: 'Get a decision by key',
|
|
157
|
-
complexity: 'basic',
|
|
158
|
-
description: 'Retrieve a specific decision by its key. Returns the current value along with all metadata (tags, layer, version, timestamp).',
|
|
159
|
-
full_example: JSON.stringify({
|
|
160
|
-
action: 'decision',
|
|
161
|
-
params: {
|
|
162
|
-
action: 'get',
|
|
163
|
-
decision_key: 'auth_method'
|
|
164
|
-
}
|
|
165
|
-
}),
|
|
166
|
-
action_sequence: JSON.stringify(['get'])
|
|
167
|
-
},
|
|
168
|
-
// Basic: Search decisions by tag
|
|
169
|
-
{
|
|
170
|
-
category: 'decision_tracking',
|
|
171
|
-
title: 'Search decisions by single tag',
|
|
172
|
-
complexity: 'basic',
|
|
173
|
-
description: 'Find all decisions tagged with a specific tag (e.g., "authentication"). Useful for finding related decisions by topic.',
|
|
174
|
-
full_example: JSON.stringify({
|
|
175
|
-
action: 'decision',
|
|
176
|
-
params: {
|
|
177
|
-
action: 'search_tags',
|
|
178
|
-
tags: ['authentication']
|
|
179
|
-
}
|
|
180
|
-
}),
|
|
181
|
-
action_sequence: JSON.stringify(['search_tags'])
|
|
182
|
-
},
|
|
183
|
-
// =========================================================================
|
|
184
|
-
// FILE TRACKING (2 use-cases)
|
|
185
|
-
// =========================================================================
|
|
186
|
-
// Basic: Record a file change
|
|
187
|
-
{
|
|
188
|
-
category: 'file_tracking',
|
|
189
|
-
title: 'Record a file modification',
|
|
190
|
-
complexity: 'basic',
|
|
191
|
-
description: 'Track a file change (created, modified, or deleted) with layer assignment. Essential for change history and conflict detection.',
|
|
192
|
-
full_example: JSON.stringify({
|
|
193
|
-
action: 'file',
|
|
194
|
-
params: {
|
|
195
|
-
action: 'record',
|
|
196
|
-
file_path: 'src/auth/login.ts',
|
|
197
|
-
change_type: 'modified',
|
|
198
|
-
layer: 'business',
|
|
199
|
-
description: 'Added JWT token validation'
|
|
200
|
-
}
|
|
201
|
-
}),
|
|
202
|
-
action_sequence: JSON.stringify(['record'])
|
|
203
|
-
},
|
|
204
|
-
// Basic: Check file lock status
|
|
205
|
-
{
|
|
206
|
-
category: 'file_tracking',
|
|
207
|
-
title: 'Check if file is locked',
|
|
208
|
-
complexity: 'basic',
|
|
209
|
-
description: 'Check if a file is currently locked by another agent to prevent concurrent edit conflicts. Returns lock status and lock holder info.',
|
|
210
|
-
full_example: JSON.stringify({
|
|
211
|
-
action: 'file',
|
|
212
|
-
params: {
|
|
213
|
-
action: 'check_lock',
|
|
214
|
-
file_path: 'src/auth/login.ts'
|
|
215
|
-
}
|
|
216
|
-
}),
|
|
217
|
-
action_sequence: JSON.stringify(['check_lock'])
|
|
218
|
-
},
|
|
219
|
-
// =========================================================================
|
|
220
|
-
// CONSTRAINT MANAGEMENT (2 use-cases)
|
|
221
|
-
// =========================================================================
|
|
222
|
-
// Basic: Add a constraint
|
|
223
|
-
{
|
|
224
|
-
category: 'constraint_management',
|
|
225
|
-
title: 'Add a performance constraint',
|
|
226
|
-
complexity: 'basic',
|
|
227
|
-
description: 'Define a new constraint with priority, category, and layer. Constraints guide implementation decisions and enforce architectural rules.',
|
|
228
|
-
full_example: JSON.stringify({
|
|
229
|
-
action: 'constraint',
|
|
230
|
-
params: {
|
|
231
|
-
action: 'add',
|
|
232
|
-
constraint_text: 'All API endpoints must respond within 200ms',
|
|
233
|
-
category: 'performance',
|
|
234
|
-
priority: 'high',
|
|
235
|
-
layer: 'business',
|
|
236
|
-
tags: ['api', 'performance']
|
|
237
|
-
}
|
|
238
|
-
}),
|
|
239
|
-
action_sequence: JSON.stringify(['add'])
|
|
240
|
-
},
|
|
241
|
-
// Basic: Get active constraints
|
|
242
|
-
{
|
|
243
|
-
category: 'constraint_management',
|
|
244
|
-
title: 'List all active constraints',
|
|
245
|
-
complexity: 'basic',
|
|
246
|
-
description: 'Retrieve all currently active constraints. Returns constraints with their priority, category, tags, and layer metadata.',
|
|
247
|
-
full_example: JSON.stringify({
|
|
248
|
-
action: 'constraint',
|
|
249
|
-
params: {
|
|
250
|
-
action: 'get',
|
|
251
|
-
active_only: true
|
|
252
|
-
}
|
|
253
|
-
}),
|
|
254
|
-
action_sequence: JSON.stringify(['get'])
|
|
255
|
-
},
|
|
256
|
-
// =========================================================================
|
|
257
|
-
// CROSS-TOOL WORKFLOW (2 use-cases)
|
|
258
|
-
// =========================================================================
|
|
259
|
-
// Basic: Link task to decision
|
|
260
|
-
{
|
|
261
|
-
category: 'cross_tool_workflow',
|
|
262
|
-
title: 'Link a task to a decision',
|
|
263
|
-
complexity: 'basic',
|
|
264
|
-
description: 'Create a reference between a task and a decision to provide context. This helps track which tasks implement which architectural choices.',
|
|
265
|
-
full_example: JSON.stringify({
|
|
266
|
-
action: 'task',
|
|
267
|
-
params: {
|
|
268
|
-
action: 'link',
|
|
269
|
-
task_id: 1,
|
|
270
|
-
link_type: 'decision',
|
|
271
|
-
target_id: 'auth_method',
|
|
272
|
-
link_relation: 'implements'
|
|
273
|
-
}
|
|
274
|
-
}),
|
|
275
|
-
action_sequence: JSON.stringify(['link'])
|
|
276
|
-
},
|
|
277
|
-
// Basic: Send inter-agent message
|
|
278
|
-
{
|
|
279
|
-
category: 'cross_tool_workflow',
|
|
280
|
-
title: 'Send a message to another agent',
|
|
281
|
-
complexity: 'basic',
|
|
282
|
-
description: 'Send a priority-based message to another agent for coordination. Supports agent-to-agent communication in multi-agent workflows.',
|
|
283
|
-
full_example: JSON.stringify({
|
|
284
|
-
action: 'message',
|
|
285
|
-
params: {
|
|
286
|
-
action: 'send',
|
|
287
|
-
to_agent: 'dev-agent',
|
|
288
|
-
message: 'Please review authentication implementation',
|
|
289
|
-
msg_type: 'request',
|
|
290
|
-
priority: 'high'
|
|
291
|
-
}
|
|
292
|
-
}),
|
|
293
|
-
action_sequence: JSON.stringify(['send'])
|
|
294
|
-
},
|
|
295
|
-
// =========================================================================
|
|
296
|
-
// CONFIGURATION (2 use-cases)
|
|
297
|
-
// =========================================================================
|
|
298
|
-
// Basic: Update retention settings
|
|
299
|
-
{
|
|
300
|
-
category: 'configuration',
|
|
301
|
-
title: 'Update message retention period',
|
|
302
|
-
complexity: 'basic',
|
|
303
|
-
description: 'Change the auto-deletion retention period for messages (in hours). Weekend-aware mode can be enabled to skip weekends in retention calculations.',
|
|
304
|
-
full_example: JSON.stringify({
|
|
305
|
-
action: 'config',
|
|
306
|
-
params: {
|
|
307
|
-
action: 'update',
|
|
308
|
-
messageRetentionHours: 48
|
|
309
|
-
}
|
|
310
|
-
}),
|
|
311
|
-
action_sequence: JSON.stringify(['update'])
|
|
312
|
-
},
|
|
313
|
-
// Basic: View layer summary statistics
|
|
314
|
-
{
|
|
315
|
-
category: 'configuration',
|
|
316
|
-
title: 'Get architecture layer summary',
|
|
317
|
-
complexity: 'basic',
|
|
318
|
-
description: 'View aggregated statistics per architecture layer (presentation, business, data, infrastructure, cross-cutting). Shows decision counts, file changes, and task distribution.',
|
|
319
|
-
full_example: JSON.stringify({
|
|
320
|
-
action: 'stats',
|
|
321
|
-
params: {
|
|
322
|
-
action: 'layer_summary'
|
|
323
|
-
}
|
|
324
|
-
}),
|
|
325
|
-
action_sequence: JSON.stringify(['layer_summary'])
|
|
326
|
-
},
|
|
327
|
-
// =========================================================================
|
|
328
|
-
// ADDITIONAL BASIC USE-CASES (4 more for better coverage)
|
|
329
|
-
// =========================================================================
|
|
330
|
-
// Basic: Add task tags
|
|
331
|
-
{
|
|
332
|
-
category: 'task_management',
|
|
333
|
-
title: 'Add tags to a task',
|
|
334
|
-
complexity: 'basic',
|
|
335
|
-
description: 'Update a task to add metadata tags for better categorization and searchability. Tags help organize tasks by topic or feature.',
|
|
336
|
-
full_example: JSON.stringify({
|
|
337
|
-
action: 'task',
|
|
338
|
-
params: {
|
|
339
|
-
action: 'update',
|
|
340
|
-
task_id: 1,
|
|
341
|
-
tags: ['authentication', 'security', 'backend']
|
|
342
|
-
}
|
|
343
|
-
}),
|
|
344
|
-
action_sequence: JSON.stringify(['update'])
|
|
345
|
-
},
|
|
346
|
-
// Basic: Set numeric decision
|
|
347
|
-
{
|
|
348
|
-
category: 'decision_tracking',
|
|
349
|
-
title: 'Record a numeric decision value',
|
|
350
|
-
complexity: 'basic',
|
|
351
|
-
description: 'Store a decision with a numeric value (e.g., max connection pool size). Numeric values are stored efficiently in a separate table.',
|
|
352
|
-
full_example: JSON.stringify({
|
|
353
|
-
action: 'decision',
|
|
354
|
-
params: {
|
|
355
|
-
action: 'set',
|
|
356
|
-
decision_key: 'max_db_connections',
|
|
357
|
-
value: 50,
|
|
358
|
-
tags: ['database', 'performance'],
|
|
359
|
-
layer: 'data'
|
|
360
|
-
}
|
|
361
|
-
}),
|
|
362
|
-
action_sequence: JSON.stringify(['set'])
|
|
363
|
-
},
|
|
364
|
-
// Basic: Get file change history
|
|
365
|
-
{
|
|
366
|
-
category: 'file_tracking',
|
|
367
|
-
title: 'View recent file changes',
|
|
368
|
-
complexity: 'basic',
|
|
369
|
-
description: 'Retrieve recent file change history with filtering options. Shows who modified what files, when, and in which layer.',
|
|
370
|
-
full_example: JSON.stringify({
|
|
371
|
-
action: 'file',
|
|
372
|
-
params: {
|
|
373
|
-
action: 'get',
|
|
374
|
-
limit: 10
|
|
375
|
-
}
|
|
376
|
-
}),
|
|
377
|
-
action_sequence: JSON.stringify(['get'])
|
|
378
|
-
},
|
|
379
|
-
// Basic: Get database statistics
|
|
380
|
-
{
|
|
381
|
-
category: 'configuration',
|
|
382
|
-
title: 'View database statistics',
|
|
383
|
-
complexity: 'basic',
|
|
384
|
-
description: 'Get comprehensive database statistics including table row counts, storage usage, and activity metrics. Useful for monitoring system health.',
|
|
385
|
-
full_example: JSON.stringify({
|
|
386
|
-
action: 'stats',
|
|
387
|
-
params: {
|
|
388
|
-
action: 'db_stats'
|
|
389
|
-
}
|
|
390
|
-
}),
|
|
391
|
-
action_sequence: JSON.stringify(['db_stats'])
|
|
392
|
-
}
|
|
393
|
-
];
|
|
394
|
-
const stmt = db.prepare(`
|
|
395
|
-
INSERT INTO t_help_use_cases (category_id, title, complexity, description, full_example, action_sequence)
|
|
396
|
-
VALUES (
|
|
397
|
-
(SELECT category_id FROM m_help_use_case_categories WHERE category_name = ?),
|
|
398
|
-
?, ?, ?, ?, ?
|
|
399
|
-
)
|
|
400
|
-
`);
|
|
401
|
-
for (const useCase of useCases) {
|
|
402
|
-
stmt.run(useCase.category, useCase.title, useCase.complexity, useCase.description, useCase.full_example, useCase.action_sequence);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
/**
|
|
406
|
-
* Seed intermediate complexity use cases
|
|
407
|
-
*/
|
|
408
|
-
function seedIntermediateUseCases(db) {
|
|
409
|
-
const useCases = [
|
|
410
|
-
// =========================================================================
|
|
411
|
-
// TASK MANAGEMENT (3 use-cases)
|
|
412
|
-
// =========================================================================
|
|
413
|
-
// Intermediate: Create task and link to decision
|
|
414
|
-
{
|
|
415
|
-
category: 'task_management',
|
|
416
|
-
title: 'Create task and link to architectural decision',
|
|
417
|
-
complexity: 'intermediate',
|
|
418
|
-
description: 'Create a development task and associate it with an existing architectural decision for context tracking',
|
|
419
|
-
full_example: JSON.stringify({
|
|
420
|
-
steps: [
|
|
421
|
-
{
|
|
422
|
-
step: 1,
|
|
423
|
-
action: 'task',
|
|
424
|
-
params: {
|
|
425
|
-
action: 'create',
|
|
426
|
-
title: 'Implement OAuth authentication',
|
|
427
|
-
description: 'Add OAuth flow per architecture decision',
|
|
428
|
-
priority: 3,
|
|
429
|
-
tags: ['authentication', 'security']
|
|
430
|
-
}
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
step: 2,
|
|
434
|
-
action: 'task',
|
|
435
|
-
params: {
|
|
436
|
-
action: 'link',
|
|
437
|
-
task_id: 42,
|
|
438
|
-
link_type: 'decision',
|
|
439
|
-
target_id: 'auth-method',
|
|
440
|
-
link_relation: 'implements'
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
]
|
|
444
|
-
}),
|
|
445
|
-
action_sequence: JSON.stringify(['create', 'link']),
|
|
446
|
-
expected_outcome: 'Task created and linked to decision, enabling context retrieval during development',
|
|
447
|
-
common_pitfalls: JSON.stringify([
|
|
448
|
-
'Linking before task creation (must create first)',
|
|
449
|
-
'Using wrong link_type value',
|
|
450
|
-
'Forgetting to specify link_relation'
|
|
451
|
-
]),
|
|
452
|
-
related_tools: JSON.stringify(['decision'])
|
|
453
|
-
},
|
|
454
|
-
// Intermediate: Move task through status transitions
|
|
455
|
-
{
|
|
456
|
-
category: 'task_management',
|
|
457
|
-
title: 'Move task through validated status transitions',
|
|
458
|
-
complexity: 'intermediate',
|
|
459
|
-
description: 'Update task status from todo → in_progress → waiting_review with validation at each step',
|
|
460
|
-
full_example: JSON.stringify({
|
|
461
|
-
steps: [
|
|
462
|
-
{
|
|
463
|
-
step: 1,
|
|
464
|
-
action: 'task',
|
|
465
|
-
params: {
|
|
466
|
-
action: 'move',
|
|
467
|
-
task_id: 42,
|
|
468
|
-
new_status: 'in_progress',
|
|
469
|
-
notes: 'Started OAuth implementation'
|
|
470
|
-
}
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
step: 2,
|
|
474
|
-
action: 'task',
|
|
475
|
-
params: {
|
|
476
|
-
action: 'update',
|
|
477
|
-
task_id: 42,
|
|
478
|
-
description: 'OAuth flow completed, needs code review'
|
|
479
|
-
}
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
step: 3,
|
|
483
|
-
action: 'task',
|
|
484
|
-
params: {
|
|
485
|
-
action: 'move',
|
|
486
|
-
task_id: 42,
|
|
487
|
-
new_status: 'waiting_review',
|
|
488
|
-
notes: 'Ready for review'
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
]
|
|
492
|
-
}),
|
|
493
|
-
action_sequence: JSON.stringify(['move', 'update', 'move']),
|
|
494
|
-
expected_outcome: 'Task progressed through workflow with validated state transitions and audit trail',
|
|
495
|
-
common_pitfalls: JSON.stringify([
|
|
496
|
-
'Invalid state transitions (e.g., todo → done directly)',
|
|
497
|
-
'Missing notes for context',
|
|
498
|
-
'Not updating task details before status change'
|
|
499
|
-
]),
|
|
500
|
-
related_tools: JSON.stringify([])
|
|
501
|
-
},
|
|
502
|
-
// Intermediate: Create task with file tracking
|
|
503
|
-
{
|
|
504
|
-
category: 'task_management',
|
|
505
|
-
title: 'Create task with automatic file tracking',
|
|
506
|
-
complexity: 'intermediate',
|
|
507
|
-
description: 'Create a task and set up automatic tracking of files being modified during implementation',
|
|
508
|
-
full_example: JSON.stringify({
|
|
509
|
-
steps: [
|
|
510
|
-
{
|
|
511
|
-
step: 1,
|
|
512
|
-
action: 'task',
|
|
513
|
-
params: {
|
|
514
|
-
action: 'create',
|
|
515
|
-
title: 'Refactor authentication module',
|
|
516
|
-
priority: 2,
|
|
517
|
-
layer: 'business',
|
|
518
|
-
tags: ['refactoring']
|
|
519
|
-
}
|
|
520
|
-
},
|
|
521
|
-
{
|
|
522
|
-
step: 2,
|
|
523
|
-
action: 'task',
|
|
524
|
-
params: {
|
|
525
|
-
action: 'watch_files',
|
|
526
|
-
task_id: 55,
|
|
527
|
-
file_paths: [
|
|
528
|
-
'src/auth/provider.ts',
|
|
529
|
-
'src/auth/validator.ts',
|
|
530
|
-
'src/tests/auth.test.ts'
|
|
531
|
-
]
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
]
|
|
535
|
-
}),
|
|
536
|
-
action_sequence: JSON.stringify(['create', 'watch_files']),
|
|
537
|
-
expected_outcome: 'Task created with automatic file change tracking enabled',
|
|
538
|
-
common_pitfalls: JSON.stringify([
|
|
539
|
-
'File paths must be relative from project root',
|
|
540
|
-
'Watching files before task creation',
|
|
541
|
-
'Not including test files in tracking'
|
|
542
|
-
]),
|
|
543
|
-
related_tools: JSON.stringify(['file'])
|
|
544
|
-
},
|
|
545
|
-
// =========================================================================
|
|
546
|
-
// DECISION TRACKING (3 use-cases)
|
|
547
|
-
// =========================================================================
|
|
548
|
-
// Intermediate: Create decision with context
|
|
549
|
-
{
|
|
550
|
-
category: 'decision_tracking',
|
|
551
|
-
title: 'Record decision with rich context and metadata',
|
|
552
|
-
complexity: 'intermediate',
|
|
553
|
-
description: 'Set an architectural decision with tags, layer, scope, and detailed context including rationale and alternatives',
|
|
554
|
-
full_example: JSON.stringify({
|
|
555
|
-
steps: [
|
|
556
|
-
{
|
|
557
|
-
step: 1,
|
|
558
|
-
action: 'decision',
|
|
559
|
-
params: {
|
|
560
|
-
action: 'set',
|
|
561
|
-
decision_key: 'database-choice',
|
|
562
|
-
value: 'PostgreSQL',
|
|
563
|
-
tags: ['architecture', 'data-layer'],
|
|
564
|
-
layer: 'data',
|
|
565
|
-
scope: 'backend',
|
|
566
|
-
status: 'active'
|
|
567
|
-
}
|
|
568
|
-
},
|
|
569
|
-
{
|
|
570
|
-
step: 2,
|
|
571
|
-
action: 'decision',
|
|
572
|
-
params: {
|
|
573
|
-
action: 'add_decision_context',
|
|
574
|
-
decision_key: 'database-choice',
|
|
575
|
-
rationale: 'Need ACID compliance and complex queries',
|
|
576
|
-
alternatives_considered: [
|
|
577
|
-
'MongoDB (rejected: no transactions)',
|
|
578
|
-
'MySQL (rejected: limited JSON support)'
|
|
579
|
-
],
|
|
580
|
-
tradeoffs: {
|
|
581
|
-
pros: ['ACID compliance', 'Rich query support', 'JSON columns'],
|
|
582
|
-
cons: ['Higher resource usage', 'Complex setup']
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
]
|
|
587
|
-
}),
|
|
588
|
-
action_sequence: JSON.stringify(['set', 'add_decision_context']),
|
|
589
|
-
expected_outcome: 'Decision recorded with comprehensive context for future reference and team handoffs',
|
|
590
|
-
common_pitfalls: JSON.stringify([
|
|
591
|
-
'Adding context before setting decision',
|
|
592
|
-
'Not documenting alternatives considered',
|
|
593
|
-
'Missing tradeoffs analysis'
|
|
594
|
-
]),
|
|
595
|
-
related_tools: JSON.stringify([])
|
|
596
|
-
},
|
|
597
|
-
// Intermediate: Search decisions with filters
|
|
598
|
-
{
|
|
599
|
-
category: 'decision_tracking',
|
|
600
|
-
title: 'Search decisions using multiple criteria',
|
|
601
|
-
complexity: 'intermediate',
|
|
602
|
-
description: 'Find decisions by combining tag filters, layer filtering, and time-based queries',
|
|
603
|
-
full_example: JSON.stringify({
|
|
604
|
-
steps: [
|
|
605
|
-
{
|
|
606
|
-
step: 1,
|
|
607
|
-
action: 'decision',
|
|
608
|
-
params: {
|
|
609
|
-
action: 'search_tags',
|
|
610
|
-
tags: ['security', 'authentication'],
|
|
611
|
-
tag_match: 'AND'
|
|
612
|
-
}
|
|
613
|
-
},
|
|
614
|
-
{
|
|
615
|
-
step: 2,
|
|
616
|
-
action: 'decision',
|
|
617
|
-
params: {
|
|
618
|
-
action: 'search_layer',
|
|
619
|
-
layer: 'business',
|
|
620
|
-
statuses: ['active'],
|
|
621
|
-
include_context: true
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
]
|
|
625
|
-
}),
|
|
626
|
-
action_sequence: JSON.stringify(['search_tags', 'search_layer']),
|
|
627
|
-
expected_outcome: 'Refined decision set matching multiple criteria with full context',
|
|
628
|
-
common_pitfalls: JSON.stringify([
|
|
629
|
-
'Using OR when AND is needed for tag matching',
|
|
630
|
-
'Not filtering by status (includes deprecated)',
|
|
631
|
-
'Forgetting to include_context for full information'
|
|
632
|
-
]),
|
|
633
|
-
related_tools: JSON.stringify([])
|
|
634
|
-
},
|
|
635
|
-
// Intermediate: Update decision with version history
|
|
636
|
-
{
|
|
637
|
-
category: 'decision_tracking',
|
|
638
|
-
title: 'Update decision and track version history',
|
|
639
|
-
complexity: 'intermediate',
|
|
640
|
-
description: 'Modify an existing decision and retrieve its version history to understand evolution',
|
|
641
|
-
full_example: JSON.stringify({
|
|
642
|
-
steps: [
|
|
643
|
-
{
|
|
644
|
-
step: 1,
|
|
645
|
-
action: 'decision',
|
|
646
|
-
params: {
|
|
647
|
-
action: 'get',
|
|
648
|
-
decision_key: 'max-file-size'
|
|
649
|
-
}
|
|
650
|
-
},
|
|
651
|
-
{
|
|
652
|
-
step: 2,
|
|
653
|
-
action: 'decision',
|
|
654
|
-
params: {
|
|
655
|
-
action: 'set',
|
|
656
|
-
decision_key: 'max-file-size',
|
|
657
|
-
value: '25MB',
|
|
658
|
-
rationale: 'Increased based on user feedback'
|
|
659
|
-
}
|
|
660
|
-
},
|
|
661
|
-
{
|
|
662
|
-
step: 3,
|
|
663
|
-
action: 'decision',
|
|
664
|
-
params: {
|
|
665
|
-
action: 'versions',
|
|
666
|
-
decision_key: 'max-file-size'
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
]
|
|
670
|
-
}),
|
|
671
|
-
action_sequence: JSON.stringify(['get', 'set', 'versions']),
|
|
672
|
-
expected_outcome: 'Decision updated with version history preserved for audit trail',
|
|
673
|
-
common_pitfalls: JSON.stringify([
|
|
674
|
-
'Not checking current value before updating',
|
|
675
|
-
'Missing rationale for updates',
|
|
676
|
-
'Overwriting without considering version history'
|
|
677
|
-
]),
|
|
678
|
-
related_tools: JSON.stringify([])
|
|
679
|
-
},
|
|
680
|
-
// =========================================================================
|
|
681
|
-
// FILE TRACKING (2 use-cases)
|
|
682
|
-
// =========================================================================
|
|
683
|
-
// Intermediate: Check lock before editing
|
|
684
|
-
{
|
|
685
|
-
category: 'file_tracking',
|
|
686
|
-
title: 'Check file lock status before editing',
|
|
687
|
-
complexity: 'intermediate',
|
|
688
|
-
description: 'Verify file is not locked by another agent before making modifications to prevent conflicts',
|
|
689
|
-
full_example: JSON.stringify({
|
|
690
|
-
steps: [
|
|
691
|
-
{
|
|
692
|
-
step: 1,
|
|
693
|
-
action: 'file',
|
|
694
|
-
params: {
|
|
695
|
-
action: 'check_lock',
|
|
696
|
-
file_path: 'src/models/user.ts'
|
|
697
|
-
}
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
step: 2,
|
|
701
|
-
action: 'message',
|
|
702
|
-
params: {
|
|
703
|
-
action: 'send',
|
|
704
|
-
to_agent: 'dev-agent-2',
|
|
705
|
-
message: 'Need to edit user.ts, can you commit?',
|
|
706
|
-
priority: 'high',
|
|
707
|
-
msg_type: 'request'
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
]
|
|
711
|
-
}),
|
|
712
|
-
action_sequence: JSON.stringify(['check_lock', 'send']),
|
|
713
|
-
expected_outcome: 'Conflict avoided by checking lock status and coordinating with other agent',
|
|
714
|
-
common_pitfalls: JSON.stringify([
|
|
715
|
-
'Not checking lock before editing (causes merge conflicts)',
|
|
716
|
-
'Ignoring lock status warnings',
|
|
717
|
-
'Not communicating with locking agent'
|
|
718
|
-
]),
|
|
719
|
-
related_tools: JSON.stringify(['message'])
|
|
720
|
-
},
|
|
721
|
-
// Intermediate: Track file changes with layers
|
|
722
|
-
{
|
|
723
|
-
category: 'file_tracking',
|
|
724
|
-
title: 'Track file modifications with architectural layers',
|
|
725
|
-
complexity: 'intermediate',
|
|
726
|
-
description: 'Record multiple file changes with proper layer assignment for architecture tracking',
|
|
727
|
-
full_example: JSON.stringify({
|
|
728
|
-
steps: [
|
|
729
|
-
{
|
|
730
|
-
step: 1,
|
|
731
|
-
action: 'file',
|
|
732
|
-
params: {
|
|
733
|
-
action: 'record',
|
|
734
|
-
file_path: 'src/api/routes/auth.ts',
|
|
735
|
-
change_type: 'modified',
|
|
736
|
-
layer: 'presentation',
|
|
737
|
-
description: 'Added OAuth endpoints'
|
|
738
|
-
}
|
|
739
|
-
},
|
|
740
|
-
{
|
|
741
|
-
step: 2,
|
|
742
|
-
action: 'file',
|
|
743
|
-
params: {
|
|
744
|
-
action: 'record',
|
|
745
|
-
file_path: 'src/services/auth-service.ts',
|
|
746
|
-
change_type: 'modified',
|
|
747
|
-
layer: 'business',
|
|
748
|
-
description: 'Implemented OAuth logic'
|
|
749
|
-
}
|
|
750
|
-
},
|
|
751
|
-
{
|
|
752
|
-
step: 3,
|
|
753
|
-
action: 'file',
|
|
754
|
-
params: {
|
|
755
|
-
action: 'get',
|
|
756
|
-
since: '1h'
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
]
|
|
760
|
-
}),
|
|
761
|
-
action_sequence: JSON.stringify(['record', 'record', 'get']),
|
|
762
|
-
expected_outcome: 'File changes tracked with architectural context for impact analysis',
|
|
763
|
-
common_pitfalls: JSON.stringify([
|
|
764
|
-
'Incorrect layer assignment',
|
|
765
|
-
'Missing description for context',
|
|
766
|
-
'Not retrieving changes to verify recording'
|
|
767
|
-
]),
|
|
768
|
-
related_tools: JSON.stringify([])
|
|
769
|
-
},
|
|
770
|
-
// =========================================================================
|
|
771
|
-
// CONSTRAINT MANAGEMENT (2 use-cases)
|
|
772
|
-
// =========================================================================
|
|
773
|
-
// Intermediate: Add constraint and filter by layer
|
|
774
|
-
{
|
|
775
|
-
category: 'constraint_management',
|
|
776
|
-
title: 'Add constraint and filter by architectural layer',
|
|
777
|
-
complexity: 'intermediate',
|
|
778
|
-
description: 'Create a performance constraint and retrieve all constraints for the data layer',
|
|
779
|
-
full_example: JSON.stringify({
|
|
780
|
-
steps: [
|
|
781
|
-
{
|
|
782
|
-
step: 1,
|
|
783
|
-
action: 'constraint',
|
|
784
|
-
params: {
|
|
785
|
-
action: 'add',
|
|
786
|
-
constraint_text: 'All database queries must complete within 100ms',
|
|
787
|
-
category: 'performance',
|
|
788
|
-
priority: 'high',
|
|
789
|
-
layer: 'data',
|
|
790
|
-
tags: ['database', 'latency']
|
|
791
|
-
}
|
|
792
|
-
},
|
|
793
|
-
{
|
|
794
|
-
step: 2,
|
|
795
|
-
action: 'constraint',
|
|
796
|
-
params: {
|
|
797
|
-
action: 'get',
|
|
798
|
-
layer: 'data',
|
|
799
|
-
active_only: true
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
]
|
|
803
|
-
}),
|
|
804
|
-
action_sequence: JSON.stringify(['add', 'get']),
|
|
805
|
-
expected_outcome: 'Performance constraint added and verified against other data layer constraints',
|
|
806
|
-
common_pitfalls: JSON.stringify([
|
|
807
|
-
'Wrong category selection',
|
|
808
|
-
'Not specifying layer for architecture alignment',
|
|
809
|
-
'Missing tags for searchability'
|
|
810
|
-
]),
|
|
811
|
-
related_tools: JSON.stringify([])
|
|
812
|
-
},
|
|
813
|
-
// Intermediate: Link constraint to task
|
|
814
|
-
{
|
|
815
|
-
category: 'constraint_management',
|
|
816
|
-
title: 'Associate constraint with implementation task',
|
|
817
|
-
complexity: 'intermediate',
|
|
818
|
-
description: 'Link an existing security constraint to a task to ensure compliance during development',
|
|
819
|
-
full_example: JSON.stringify({
|
|
820
|
-
steps: [
|
|
821
|
-
{
|
|
822
|
-
step: 1,
|
|
823
|
-
action: 'constraint',
|
|
824
|
-
params: {
|
|
825
|
-
action: 'get',
|
|
826
|
-
category: 'security',
|
|
827
|
-
priority: 'critical'
|
|
828
|
-
}
|
|
829
|
-
},
|
|
830
|
-
{
|
|
831
|
-
step: 2,
|
|
832
|
-
action: 'task',
|
|
833
|
-
params: {
|
|
834
|
-
action: 'link',
|
|
835
|
-
task_id: 88,
|
|
836
|
-
link_type: 'constraint',
|
|
837
|
-
target_id: 12,
|
|
838
|
-
link_relation: 'must_comply_with'
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
]
|
|
842
|
-
}),
|
|
843
|
-
action_sequence: JSON.stringify(['get', 'link']),
|
|
844
|
-
expected_outcome: 'Task linked to security constraint for compliance verification during code review',
|
|
845
|
-
common_pitfalls: JSON.stringify([
|
|
846
|
-
'Using decision link instead of constraint link',
|
|
847
|
-
'Not verifying constraint exists before linking',
|
|
848
|
-
'Missing link_relation specification'
|
|
849
|
-
]),
|
|
850
|
-
related_tools: JSON.stringify(['task'])
|
|
851
|
-
},
|
|
852
|
-
// =========================================================================
|
|
853
|
-
// CROSS-TOOL WORKFLOW (3 use-cases)
|
|
854
|
-
// =========================================================================
|
|
855
|
-
// Intermediate: Full feature workflow
|
|
856
|
-
{
|
|
857
|
-
category: 'cross_tool_workflow',
|
|
858
|
-
title: 'Full feature workflow: task + decision + file tracking',
|
|
859
|
-
complexity: 'intermediate',
|
|
860
|
-
description: 'Set up complete feature context by creating task, linking architectural decision, and enabling file tracking',
|
|
861
|
-
full_example: JSON.stringify({
|
|
862
|
-
steps: [
|
|
863
|
-
{
|
|
864
|
-
step: 1,
|
|
865
|
-
action: 'task',
|
|
866
|
-
params: {
|
|
867
|
-
action: 'create',
|
|
868
|
-
title: 'Implement caching layer',
|
|
869
|
-
priority: 3,
|
|
870
|
-
layer: 'infrastructure',
|
|
871
|
-
tags: ['performance', 'caching']
|
|
872
|
-
}
|
|
873
|
-
},
|
|
874
|
-
{
|
|
875
|
-
step: 2,
|
|
876
|
-
action: 'task',
|
|
877
|
-
params: {
|
|
878
|
-
action: 'link',
|
|
879
|
-
task_id: 99,
|
|
880
|
-
link_type: 'decision',
|
|
881
|
-
target_id: 'cache-strategy',
|
|
882
|
-
link_relation: 'implements'
|
|
883
|
-
}
|
|
884
|
-
},
|
|
885
|
-
{
|
|
886
|
-
step: 3,
|
|
887
|
-
action: 'task',
|
|
888
|
-
params: {
|
|
889
|
-
action: 'watch_files',
|
|
890
|
-
task_id: 99,
|
|
891
|
-
file_paths: ['src/cache/redis-client.ts', 'src/middleware/cache.ts']
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
]
|
|
895
|
-
}),
|
|
896
|
-
action_sequence: JSON.stringify(['create', 'link', 'watch_files']),
|
|
897
|
-
expected_outcome: 'Complete feature context established with task, decision, and automatic file tracking',
|
|
898
|
-
common_pitfalls: JSON.stringify([
|
|
899
|
-
'Wrong action sequence (must create before linking)',
|
|
900
|
-
'Not tracking test files',
|
|
901
|
-
'Missing layer assignment for architecture clarity'
|
|
902
|
-
]),
|
|
903
|
-
related_tools: JSON.stringify(['task', 'decision', 'file'])
|
|
904
|
-
},
|
|
905
|
-
// Intermediate: Decision + constraint + task coordination
|
|
906
|
-
{
|
|
907
|
-
category: 'cross_tool_workflow',
|
|
908
|
-
title: 'Coordinate decision, constraint, and task implementation',
|
|
909
|
-
complexity: 'intermediate',
|
|
910
|
-
description: 'Record architectural decision, add compliance constraint, then create task linking both',
|
|
911
|
-
full_example: JSON.stringify({
|
|
912
|
-
steps: [
|
|
913
|
-
{
|
|
914
|
-
step: 1,
|
|
915
|
-
action: 'decision',
|
|
916
|
-
params: {
|
|
917
|
-
action: 'set',
|
|
918
|
-
decision_key: 'api-rate-limit',
|
|
919
|
-
value: '1000 req/min',
|
|
920
|
-
tags: ['performance', 'api'],
|
|
921
|
-
layer: 'presentation'
|
|
922
|
-
}
|
|
923
|
-
},
|
|
924
|
-
{
|
|
925
|
-
step: 2,
|
|
926
|
-
action: 'constraint',
|
|
927
|
-
params: {
|
|
928
|
-
action: 'add',
|
|
929
|
-
constraint_text: 'Rate limiting must use Redis for distributed systems',
|
|
930
|
-
category: 'architecture',
|
|
931
|
-
priority: 'high',
|
|
932
|
-
layer: 'infrastructure',
|
|
933
|
-
tags: ['rate-limiting', 'redis']
|
|
934
|
-
}
|
|
935
|
-
},
|
|
936
|
-
{
|
|
937
|
-
step: 3,
|
|
938
|
-
action: 'task',
|
|
939
|
-
params: {
|
|
940
|
-
action: 'create',
|
|
941
|
-
title: 'Implement rate limiting',
|
|
942
|
-
priority: 3,
|
|
943
|
-
tags: ['rate-limiting']
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
]
|
|
947
|
-
}),
|
|
948
|
-
action_sequence: JSON.stringify(['set', 'add', 'create']),
|
|
949
|
-
expected_outcome: 'Complete implementation context with decision and compliance constraint',
|
|
950
|
-
common_pitfalls: JSON.stringify([
|
|
951
|
-
'Not linking both decision and constraint',
|
|
952
|
-
'Mismatched tags across tools',
|
|
953
|
-
'Wrong layer assignments'
|
|
954
|
-
]),
|
|
955
|
-
related_tools: JSON.stringify(['decision', 'constraint', 'task'])
|
|
956
|
-
},
|
|
957
|
-
// Intermediate: Message-driven task coordination
|
|
958
|
-
{
|
|
959
|
-
category: 'cross_tool_workflow',
|
|
960
|
-
title: 'Multi-agent task handoff with messaging',
|
|
961
|
-
complexity: 'intermediate',
|
|
962
|
-
description: 'Coordinate task handoff between agents using priority messages and status updates',
|
|
963
|
-
full_example: JSON.stringify({
|
|
964
|
-
steps: [
|
|
965
|
-
{
|
|
966
|
-
step: 1,
|
|
967
|
-
action: 'task',
|
|
968
|
-
params: {
|
|
969
|
-
action: 'move',
|
|
970
|
-
task_id: 50,
|
|
971
|
-
new_status: 'waiting_review',
|
|
972
|
-
notes: 'Backend implementation complete'
|
|
973
|
-
}
|
|
974
|
-
},
|
|
975
|
-
{
|
|
976
|
-
step: 2,
|
|
977
|
-
action: 'message',
|
|
978
|
-
params: {
|
|
979
|
-
action: 'send',
|
|
980
|
-
to_agent: 'qa-agent',
|
|
981
|
-
message: 'Task 50 ready for review',
|
|
982
|
-
priority: 'high',
|
|
983
|
-
msg_type: 'request',
|
|
984
|
-
payload: { task_id: 50, type: 'code_review' }
|
|
985
|
-
}
|
|
986
|
-
},
|
|
987
|
-
{
|
|
988
|
-
step: 3,
|
|
989
|
-
action: 'message',
|
|
990
|
-
params: {
|
|
991
|
-
action: 'get',
|
|
992
|
-
unread_only: true,
|
|
993
|
-
priority_filter: 'high'
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
]
|
|
997
|
-
}),
|
|
998
|
-
action_sequence: JSON.stringify(['move', 'send', 'get']),
|
|
999
|
-
expected_outcome: 'Task handoff completed with clear communication and priority signaling',
|
|
1000
|
-
common_pitfalls: JSON.stringify([
|
|
1001
|
-
'Wrong message priority for urgency',
|
|
1002
|
-
'Not including task_id in payload',
|
|
1003
|
-
'Missing msg_type specification'
|
|
1004
|
-
]),
|
|
1005
|
-
related_tools: JSON.stringify(['task', 'message'])
|
|
1006
|
-
},
|
|
1007
|
-
// =========================================================================
|
|
1008
|
-
// CONFIGURATION (2 use-cases)
|
|
1009
|
-
// =========================================================================
|
|
1010
|
-
// Intermediate: Update and verify config
|
|
1011
|
-
{
|
|
1012
|
-
category: 'configuration',
|
|
1013
|
-
title: 'Modify retention settings and verify configuration',
|
|
1014
|
-
complexity: 'intermediate',
|
|
1015
|
-
description: 'Update message and file retention settings, then retrieve config to verify changes',
|
|
1016
|
-
full_example: JSON.stringify({
|
|
1017
|
-
steps: [
|
|
1018
|
-
{
|
|
1019
|
-
step: 1,
|
|
1020
|
-
action: 'config',
|
|
1021
|
-
params: {
|
|
1022
|
-
action: 'update',
|
|
1023
|
-
messageRetentionHours: 48,
|
|
1024
|
-
fileHistoryRetentionDays: 14,
|
|
1025
|
-
ignoreWeekend: true
|
|
1026
|
-
}
|
|
1027
|
-
},
|
|
1028
|
-
{
|
|
1029
|
-
step: 2,
|
|
1030
|
-
action: 'config',
|
|
1031
|
-
params: {
|
|
1032
|
-
action: 'get'
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
]
|
|
1036
|
-
}),
|
|
1037
|
-
action_sequence: JSON.stringify(['update', 'get']),
|
|
1038
|
-
expected_outcome: 'Retention settings updated and verified for weekend-aware cleanup',
|
|
1039
|
-
common_pitfalls: JSON.stringify([
|
|
1040
|
-
'Setting values outside allowed ranges',
|
|
1041
|
-
'Not enabling weekend mode for production',
|
|
1042
|
-
'Not verifying changes after update'
|
|
1043
|
-
]),
|
|
1044
|
-
related_tools: JSON.stringify([])
|
|
1045
|
-
},
|
|
1046
|
-
// Intermediate: Analyze layer distribution
|
|
1047
|
-
{
|
|
1048
|
-
category: 'configuration',
|
|
1049
|
-
title: 'Review layer statistics to identify architecture bottlenecks',
|
|
1050
|
-
complexity: 'intermediate',
|
|
1051
|
-
description: 'Get layer summary statistics and database stats to analyze system usage patterns',
|
|
1052
|
-
full_example: JSON.stringify({
|
|
1053
|
-
steps: [
|
|
1054
|
-
{
|
|
1055
|
-
step: 1,
|
|
1056
|
-
action: 'stats',
|
|
1057
|
-
params: {
|
|
1058
|
-
action: 'layer_summary'
|
|
1059
|
-
}
|
|
1060
|
-
},
|
|
1061
|
-
{
|
|
1062
|
-
step: 2,
|
|
1063
|
-
action: 'stats',
|
|
1064
|
-
params: {
|
|
1065
|
-
action: 'db_stats'
|
|
1066
|
-
}
|
|
1067
|
-
},
|
|
1068
|
-
{
|
|
1069
|
-
step: 3,
|
|
1070
|
-
action: 'stats',
|
|
1071
|
-
params: {
|
|
1072
|
-
action: 'activity_log',
|
|
1073
|
-
since: '24h',
|
|
1074
|
-
limit: 20
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
]
|
|
1078
|
-
}),
|
|
1079
|
-
action_sequence: JSON.stringify(['layer_summary', 'db_stats', 'activity_log']),
|
|
1080
|
-
expected_outcome: 'Identified data layer as bottleneck for refactoring focus',
|
|
1081
|
-
common_pitfalls: JSON.stringify([
|
|
1082
|
-
'Not analyzing layer distribution regularly',
|
|
1083
|
-
'Ignoring activity patterns',
|
|
1084
|
-
'Not using insights for architecture decisions'
|
|
1085
|
-
]),
|
|
1086
|
-
related_tools: JSON.stringify([])
|
|
1087
|
-
}
|
|
1088
|
-
];
|
|
1089
|
-
const stmt = db.prepare(`
|
|
1090
|
-
INSERT INTO t_help_use_cases (
|
|
1091
|
-
category_id, title, complexity, description, full_example, action_sequence
|
|
1092
|
-
)
|
|
1093
|
-
VALUES (
|
|
1094
|
-
(SELECT category_id FROM m_help_use_case_categories WHERE category_name = ?),
|
|
1095
|
-
?, ?, ?, ?, ?
|
|
1096
|
-
)
|
|
1097
|
-
`);
|
|
1098
|
-
for (const useCase of useCases) {
|
|
1099
|
-
// Embed metadata (expected_outcome, common_pitfalls, related_tools) into description
|
|
1100
|
-
let fullDescription = useCase.description;
|
|
1101
|
-
if (useCase.expected_outcome) {
|
|
1102
|
-
fullDescription += `\n\nExpected Outcome: ${useCase.expected_outcome}`;
|
|
1103
|
-
}
|
|
1104
|
-
if (useCase.common_pitfalls) {
|
|
1105
|
-
fullDescription += `\n\nCommon Pitfalls: ${useCase.common_pitfalls}`;
|
|
1106
|
-
}
|
|
1107
|
-
if (useCase.related_tools) {
|
|
1108
|
-
fullDescription += `\n\nRelated Tools: ${useCase.related_tools}`;
|
|
1109
|
-
}
|
|
1110
|
-
stmt.run(useCase.category, useCase.title, useCase.complexity, fullDescription, useCase.full_example, useCase.action_sequence);
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
|
-
/**
|
|
1114
|
-
* Seed advanced complexity use cases (Task 212)
|
|
1115
|
-
*/
|
|
1116
|
-
function seedAdvancedUseCases(db) {
|
|
1117
|
-
const useCases = [
|
|
1118
|
-
// =========================================================================
|
|
1119
|
-
// CROSS-TOOL WORKFLOW (3 advanced use-cases) - Priority Category
|
|
1120
|
-
// =========================================================================
|
|
1121
|
-
// Advanced #1: Complete Feature Development Lifecycle
|
|
1122
|
-
{
|
|
1123
|
-
category: 'cross_tool_workflow',
|
|
1124
|
-
title: 'Complete feature development lifecycle with multi-agent coordination',
|
|
1125
|
-
complexity: 'advanced',
|
|
1126
|
-
description: 'End-to-end workflow tracking a feature from initial task creation through architectural decision, implementation with file tracking, constraint enforcement, and final completion. Demonstrates coordination between architect, developer, and reviewer agents.',
|
|
1127
|
-
full_example: JSON.stringify({
|
|
1128
|
-
scenario: 'Building authentication feature for API',
|
|
1129
|
-
agents: ['architect', 'developer', 'reviewer'],
|
|
1130
|
-
total_steps: 12,
|
|
1131
|
-
outcome: 'Feature successfully implemented with full context preservation: architectural decision documented with rationale, security constraints enforced, file changes tracked across layers, multi-agent coordination logged.',
|
|
1132
|
-
token_savings: 'All context preserved in ~2k tokens vs ~15k tokens if documented in messages'
|
|
1133
|
-
}),
|
|
1134
|
-
action_sequence: JSON.stringify(['task.create', 'decision.set', 'decision.add_decision_context', 'constraint.add', 'task.link', 'task.move', 'file.record', 'message.send', 'constraint.get']),
|
|
1135
|
-
expected_outcome: 'Feature complete with full audit trail, decision rationale documented, constraints enforced, and multi-agent handoffs coordinated',
|
|
1136
|
-
related_tools: JSON.stringify(['task', 'decision', 'file', 'constraint', 'message'])
|
|
1137
|
-
},
|
|
1138
|
-
// Advanced #2: Multi-Agent Collaboration Pattern
|
|
1139
|
-
{
|
|
1140
|
-
category: 'cross_tool_workflow',
|
|
1141
|
-
title: 'Multi-agent collaboration with priority escalation and context sharing',
|
|
1142
|
-
complexity: 'advanced',
|
|
1143
|
-
description: 'Complex coordination pattern where multiple agents collaborate on a high-priority incident. Demonstrates message prioritization, context sharing through decisions, constraint validation, and parallel file modifications with lock detection.',
|
|
1144
|
-
full_example: JSON.stringify({
|
|
1145
|
-
scenario: 'Critical security vulnerability discovered in production',
|
|
1146
|
-
agents: ['security-analyst', 'developer', 'devops', 'tech-lead'],
|
|
1147
|
-
urgency: 'critical',
|
|
1148
|
-
total_steps: 14,
|
|
1149
|
-
outcome: 'Critical security incident resolved in coordinated manner. Full audit trail preserved: messages show communication flow, file changes tracked, constraint added to prevent recurrence, decision documents fix approach.',
|
|
1150
|
-
coordination_pattern: 'critical-alert → parallel-notification → lock-check → fix → deploy → validate'
|
|
1151
|
-
}),
|
|
1152
|
-
action_sequence: JSON.stringify(['task.create', 'message.send', 'constraint.add', 'message.get', 'file.check_lock', 'task.move', 'file.record', 'decision.set', 'file.get', 'stats.layer_summary']),
|
|
1153
|
-
expected_outcome: 'Security incident resolved with coordinated response, full audit trail, and preventive constraint added',
|
|
1154
|
-
related_tools: JSON.stringify(['task', 'message', 'constraint', 'file', 'decision', 'stats'])
|
|
1155
|
-
},
|
|
1156
|
-
// Advanced #3: Git-Aware Feature Branch Workflow
|
|
1157
|
-
{
|
|
1158
|
-
category: 'cross_tool_workflow',
|
|
1159
|
-
title: 'Git-aware development workflow with VCS auto-complete and conflict resolution',
|
|
1160
|
-
complexity: 'advanced',
|
|
1161
|
-
description: 'Complete feature branch workflow integrated with version control. Demonstrates VCS-aware task tracking, automatic task completion on commit/merge, whitelist exemptions for work-in-progress, and handling merge conflicts with context preservation.',
|
|
1162
|
-
full_example: JSON.stringify({
|
|
1163
|
-
scenario: 'Feature development with Git integration and VCS auto-complete',
|
|
1164
|
-
vcs_system: 'Git',
|
|
1165
|
-
branch_strategy: 'feature branches with PR workflow',
|
|
1166
|
-
total_steps: 20,
|
|
1167
|
-
outcome: 'Complete feature development lifecycle with Git integration. VCS watcher automatically completed task on merge to main. Work-in-progress commits on feature branch correctly did NOT trigger premature completion.',
|
|
1168
|
-
vcs_integration_features: {
|
|
1169
|
-
auto_complete: 'Task automatically completed when watched files merged to main branch',
|
|
1170
|
-
whitelist_exemption: 'Work-in-progress commits on feature branch did NOT trigger auto-complete',
|
|
1171
|
-
conflict_detection: 'File lock system prevented concurrent edits during PR review',
|
|
1172
|
-
audit_trail: 'All commits linked to file change records for full traceability'
|
|
1173
|
-
},
|
|
1174
|
-
token_efficiency: 'VCS integration eliminates manual status updates, reducing coordination messages by ~60%'
|
|
1175
|
-
}),
|
|
1176
|
-
action_sequence: JSON.stringify(['task.create', 'decision.set', 'task.move', 'file.record_batch', 'constraint.add', 'file.record', 'task.get', 'file.get', 'constraint.get', 'message.send', 'task.watcher', 'task.list', 'stats.activity_log']),
|
|
1177
|
-
expected_outcome: 'Feature merged with automatic task completion, full Git integration, and comprehensive audit trail',
|
|
1178
|
-
related_tools: JSON.stringify(['task', 'decision', 'file', 'constraint', 'message', 'stats'])
|
|
1179
|
-
},
|
|
1180
|
-
// =========================================================================
|
|
1181
|
-
// TASK MANAGEMENT (2 advanced use-cases)
|
|
1182
|
-
// =========================================================================
|
|
1183
|
-
// Advanced #4: Task Dependency Chain
|
|
1184
|
-
{
|
|
1185
|
-
category: 'task_management',
|
|
1186
|
-
title: 'Complex task dependency chain with blocking relationships and validation',
|
|
1187
|
-
complexity: 'advanced',
|
|
1188
|
-
description: 'Create interdependent task chain for database migration project. Demonstrates dependency management, circular detection, blocking status handling, and automatic dependency resolution when blockers complete.',
|
|
1189
|
-
full_example: JSON.stringify({
|
|
1190
|
-
scenario: 'Database schema migration across multiple services',
|
|
1191
|
-
complexity_factors: ['Multiple dependencies', 'Circular detection', 'Blocking status handling'],
|
|
1192
|
-
total_steps: 15,
|
|
1193
|
-
dependency_graph: {
|
|
1194
|
-
'Task 1 (schema design)': 'ROOT - no blockers',
|
|
1195
|
-
'Task 2 (migration scripts)': 'blocked by Task 1',
|
|
1196
|
-
'Task 3 (API models)': 'blocked by Task 1',
|
|
1197
|
-
'Task 4 (staging deployment)': 'blocked by Task 2 AND Task 3'
|
|
1198
|
-
},
|
|
1199
|
-
outcome: 'Complex dependency chain established with validation. Circular dependency attempt correctly rejected. Task completion automatically unblocks dependent tasks.',
|
|
1200
|
-
validation_features: ['Circular detection', 'Multiple blocker support', 'Automatic unblocking', 'Dependency graph queries']
|
|
1201
|
-
}),
|
|
1202
|
-
action_sequence: JSON.stringify(['task.create', 'task.add_dependency', 'task.get_dependencies', 'task.list', 'task.move', 'task.remove_dependency']),
|
|
1203
|
-
expected_outcome: 'Dependency chain validated with circular detection, multiple blockers supported, automatic unblocking on completion',
|
|
1204
|
-
related_tools: JSON.stringify([])
|
|
1205
|
-
},
|
|
1206
|
-
// Advanced #5: Feature Development with Auto-Stale Detection Recovery
|
|
1207
|
-
{
|
|
1208
|
-
category: 'task_management',
|
|
1209
|
-
title: 'Long-running feature with interruptions and auto-stale detection',
|
|
1210
|
-
complexity: 'advanced',
|
|
1211
|
-
description: 'Feature development interrupted by urgent bugs and context switches. Demonstrates auto-stale detection (in_progress >2h → waiting_review, waiting_review >24h → todo), task recovery, acceptance criteria validation, and linking across decisions, files, and constraints.',
|
|
1212
|
-
full_example: JSON.stringify({
|
|
1213
|
-
scenario: 'Implementing real-time notifications feature with interruptions',
|
|
1214
|
-
duration: '3 days with interruptions',
|
|
1215
|
-
auto_stale_triggers: 2,
|
|
1216
|
-
total_steps: 21,
|
|
1217
|
-
timeline: {
|
|
1218
|
-
'Day 1 10:00': 'Started implementation',
|
|
1219
|
-
'Day 1 11:30': 'Interrupted by critical bug',
|
|
1220
|
-
'Day 1 13:30': 'AUTO-STALE: in_progress → waiting_review (>2h inactive)',
|
|
1221
|
-
'Day 1 15:30': 'Resumed after bug fix',
|
|
1222
|
-
'Day 1 18:00': 'Submitted for review',
|
|
1223
|
-
'Day 2 18:00': 'AUTO-STALE: waiting_review → todo (>24h no response)',
|
|
1224
|
-
'Day 3 10:00': 'Reassigned to available reviewer',
|
|
1225
|
-
'Day 3 11:00': 'Completed'
|
|
1226
|
-
},
|
|
1227
|
-
auto_stale_benefits: [
|
|
1228
|
-
'Prevented forgotten in_progress task from blocking developer',
|
|
1229
|
-
'Surfaced abandoned waiting_review task after 24h',
|
|
1230
|
-
'Automatic cleanup without manual intervention',
|
|
1231
|
-
'Clear audit trail of interruptions and recovery'
|
|
1232
|
-
],
|
|
1233
|
-
outcome: 'Feature successfully completed despite 2 interruptions. Auto-stale detection prevented tasks from being forgotten. Full context preserved across context switches.'
|
|
1234
|
-
}),
|
|
1235
|
-
action_sequence: JSON.stringify(['task.create', 'task.move', 'decision.set', 'file.record', 'task.watcher', 'task.list', 'decision.get', 'file.record_batch', 'task.update', 'file.get', 'constraint.get']),
|
|
1236
|
-
expected_outcome: 'Feature complete with auto-recovery from interruptions, acceptance criteria validated, full context preserved',
|
|
1237
|
-
related_tools: JSON.stringify(['decision', 'file', 'constraint'])
|
|
1238
|
-
},
|
|
1239
|
-
// =========================================================================
|
|
1240
|
-
// DECISION TRACKING (1 advanced use-case)
|
|
1241
|
-
// =========================================================================
|
|
1242
|
-
// Advanced #6: Architecture Decision with Rich Context and Version Migration
|
|
1243
|
-
{
|
|
1244
|
-
category: 'decision_tracking',
|
|
1245
|
-
title: 'Document architectural decision with full context and track evolution across versions',
|
|
1246
|
-
complexity: 'advanced',
|
|
1247
|
-
description: 'Complete architecture decision workflow: initial decision with alternatives analysis, context documentation with tradeoffs, version updates as requirements change, and linking to implementation tasks and constraints.',
|
|
1248
|
-
full_example: JSON.stringify({
|
|
1249
|
-
scenario: 'Choosing data storage solution for high-throughput analytics',
|
|
1250
|
-
decision_lifecycle: 'proposal → evaluation → decision → implementation → evolution',
|
|
1251
|
-
total_steps: 12,
|
|
1252
|
-
outcome: 'Complete architecture decision lifecycle documented: initial evaluation with alternatives analysis, tradeoffs documented with mitigation strategies, constraints linked, implementation tasks tracked, evolution to v2.0 with lessons learned.',
|
|
1253
|
-
context_preservation: '6 months of architectural evolution captured in ~3k tokens vs ~20k tokens in scattered documentation',
|
|
1254
|
-
version_history: ['v1.0.0: Single-node TimescaleDB', 'v2.0.0: Multi-node TimescaleDB with lessons learned']
|
|
1255
|
-
}),
|
|
1256
|
-
action_sequence: JSON.stringify(['decision.set', 'decision.add_decision_context', 'constraint.add', 'task.create', 'task.link', 'decision.get', 'decision.list_decision_contexts', 'decision.versions', 'decision.search_tags']),
|
|
1257
|
-
expected_outcome: 'Architecture decision fully documented with alternatives analysis, tradeoffs, constraints, version evolution, and lessons learned',
|
|
1258
|
-
related_tools: JSON.stringify(['constraint', 'task'])
|
|
1259
|
-
},
|
|
1260
|
-
// =========================================================================
|
|
1261
|
-
// FILE TRACKING (1 advanced use-case)
|
|
1262
|
-
// =========================================================================
|
|
1263
|
-
// Advanced #7: Coordinated Multi-File Refactoring
|
|
1264
|
-
{
|
|
1265
|
-
category: 'file_tracking',
|
|
1266
|
-
title: 'Multi-agent refactoring with file lock coordination and batch tracking',
|
|
1267
|
-
complexity: 'advanced',
|
|
1268
|
-
description: 'Large refactoring across multiple files and layers. Demonstrates lock checking to prevent conflicts, batch file recording for atomic commits, layer-based tracking, and coordination between multiple agents working on related files.',
|
|
1269
|
-
full_example: JSON.stringify({
|
|
1270
|
-
scenario: 'Extract authentication logic into separate service layer',
|
|
1271
|
-
agents: ['refactor-lead', 'developer-1', 'developer-2'],
|
|
1272
|
-
affected_files: 8,
|
|
1273
|
-
total_steps: 15,
|
|
1274
|
-
file_changes_summary: {
|
|
1275
|
-
presentation_layer: ['src/controllers/auth-controller.ts (2 modifications)'],
|
|
1276
|
-
business_layer: ['src/services/auth-service.ts (created)'],
|
|
1277
|
-
infrastructure_layer: ['src/middleware/auth-middleware.ts (modified)'],
|
|
1278
|
-
data_layer: ['src/models/user.ts (modified)']
|
|
1279
|
-
},
|
|
1280
|
-
outcome: 'Multi-file refactoring coordinated successfully. File locks prevented merge conflicts. Batch recording ensured atomic commits. Layer tracking shows proper separation of concerns.',
|
|
1281
|
-
coordination_mechanisms: ['Lock detection', 'Message coordination', 'Batch atomic recording', 'Layer-based review', 'Auto-tracking via watch_files']
|
|
1282
|
-
}),
|
|
1283
|
-
action_sequence: JSON.stringify(['task.create', 'decision.set', 'file.check_lock', 'file.record', 'message.send', 'file.record_batch', 'file.get', 'stats.layer_summary', 'task.move']),
|
|
1284
|
-
expected_outcome: 'Multi-file refactoring completed with lock coordination, atomic commits, layer-based validation, and no merge conflicts',
|
|
1285
|
-
related_tools: JSON.stringify(['task', 'decision', 'message', 'stats'])
|
|
1286
|
-
},
|
|
1287
|
-
// =========================================================================
|
|
1288
|
-
// CONFIGURATION (1 advanced use-case)
|
|
1289
|
-
// =========================================================================
|
|
1290
|
-
// Advanced #8: System Monitoring and Performance Optimization
|
|
1291
|
-
{
|
|
1292
|
-
category: 'configuration',
|
|
1293
|
-
title: 'Performance monitoring, bottleneck identification, and retention optimization',
|
|
1294
|
-
complexity: 'advanced',
|
|
1295
|
-
description: 'Complete system health workflow: analyze activity patterns, identify bottlenecks, optimize retention settings, perform targeted cleanup, and monitor impact. Demonstrates stats analysis, config tuning, and activity log usage.',
|
|
1296
|
-
full_example: JSON.stringify({
|
|
1297
|
-
scenario: 'System performance degradation investigation',
|
|
1298
|
-
problem: 'Database growing too large, queries slowing down',
|
|
1299
|
-
total_steps: 18,
|
|
1300
|
-
metrics: {
|
|
1301
|
-
before: {
|
|
1302
|
-
database_size: '2.3GB',
|
|
1303
|
-
file_changes_rows: '450k',
|
|
1304
|
-
query_time_p95: '450ms',
|
|
1305
|
-
retention_file_days: 30
|
|
1306
|
-
},
|
|
1307
|
-
after: {
|
|
1308
|
-
database_size: '0.7GB',
|
|
1309
|
-
file_changes_rows: '113k',
|
|
1310
|
-
query_time_p95: '95ms',
|
|
1311
|
-
retention_file_days: 7
|
|
1312
|
-
},
|
|
1313
|
-
improvement: {
|
|
1314
|
-
size_reduction: '70%',
|
|
1315
|
-
performance_gain: '4.7x faster',
|
|
1316
|
-
storage_savings: '1.6GB'
|
|
1317
|
-
}
|
|
1318
|
-
},
|
|
1319
|
-
outcome: 'Performance bottleneck identified through systematic analysis. Retention configuration optimized based on actual access patterns. Manual cleanup reclaimed 70% of database space. Query performance improved 4.7x.',
|
|
1320
|
-
coordination_features: ['Stats analysis workflow', 'Config optimization', 'Manual cleanup', 'Impact measurement', 'Documentation with context']
|
|
1321
|
-
}),
|
|
1322
|
-
action_sequence: JSON.stringify(['stats.db_stats', 'stats.layer_summary', 'stats.activity_log', 'decision.set', 'decision.add_decision_context', 'config.get', 'task.create', 'task.link', 'config.update', 'stats.clear', 'decision.search_tags']),
|
|
1323
|
-
expected_outcome: 'System performance restored with 70% storage reduction, 4.7x faster queries, and optimized retention settings',
|
|
1324
|
-
related_tools: JSON.stringify(['decision', 'task', 'config'])
|
|
1325
|
-
}
|
|
1326
|
-
];
|
|
1327
|
-
const stmt = db.prepare(`
|
|
1328
|
-
INSERT INTO t_help_use_cases (
|
|
1329
|
-
category_id, title, complexity, description, full_example, action_sequence
|
|
1330
|
-
)
|
|
1331
|
-
VALUES (
|
|
1332
|
-
(SELECT category_id FROM m_help_use_case_categories WHERE category_name = ?),
|
|
1333
|
-
?, ?, ?, ?, ?
|
|
1334
|
-
)
|
|
1335
|
-
`);
|
|
1336
|
-
for (const useCase of useCases) {
|
|
1337
|
-
// Embed metadata (expected_outcome, related_tools) into description
|
|
1338
|
-
let fullDescription = useCase.description;
|
|
1339
|
-
if (useCase.expected_outcome) {
|
|
1340
|
-
fullDescription += `\n\nExpected Outcome: ${useCase.expected_outcome}`;
|
|
1341
|
-
}
|
|
1342
|
-
if (useCase.related_tools) {
|
|
1343
|
-
fullDescription += `\n\nRelated Tools: ${useCase.related_tools}`;
|
|
1344
|
-
}
|
|
1345
|
-
stmt.run(useCase.category, useCase.title, useCase.complexity, fullDescription, useCase.full_example, useCase.action_sequence);
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
/**
|
|
1349
|
-
* Run the seed data migration
|
|
1350
|
-
*/
|
|
1351
|
-
export function seedHelpData(db) {
|
|
1352
|
-
const details = [];
|
|
1353
|
-
try {
|
|
1354
|
-
// Start transaction
|
|
1355
|
-
db.exec('BEGIN TRANSACTION');
|
|
1356
|
-
// Seed categories
|
|
1357
|
-
seedCategories(db);
|
|
1358
|
-
details.push('Seeded 6 use-case categories');
|
|
1359
|
-
// Seed basic use cases
|
|
1360
|
-
seedBasicUseCases(db);
|
|
1361
|
-
details.push('Seeded 18 basic complexity use-cases');
|
|
1362
|
-
// Seed intermediate use cases
|
|
1363
|
-
seedIntermediateUseCases(db);
|
|
1364
|
-
details.push('Seeded 15 intermediate complexity use-cases');
|
|
1365
|
-
// Seed advanced use cases
|
|
1366
|
-
seedAdvancedUseCases(db);
|
|
1367
|
-
details.push('Seeded 8 advanced complexity use-cases');
|
|
1368
|
-
// Verify seeding
|
|
1369
|
-
const categoryCount = db.prepare('SELECT COUNT(*) as count FROM m_help_use_case_categories').get().count;
|
|
1370
|
-
const useCaseCount = db.prepare('SELECT COUNT(*) as count FROM t_help_use_cases').get().count;
|
|
1371
|
-
const basicCount = db.prepare('SELECT COUNT(*) as count FROM t_help_use_cases WHERE complexity = ?').get('basic').count;
|
|
1372
|
-
const intermediateCount = db.prepare('SELECT COUNT(*) as count FROM t_help_use_cases WHERE complexity = ?').get('intermediate').count;
|
|
1373
|
-
const advancedCount = db.prepare('SELECT COUNT(*) as count FROM t_help_use_cases WHERE complexity = ?').get('advanced').count;
|
|
1374
|
-
details.push(`Verified: ${categoryCount} categories, ${useCaseCount} total use-cases (${basicCount} basic, ${intermediateCount} intermediate, ${advancedCount} advanced)`);
|
|
1375
|
-
// Commit transaction
|
|
1376
|
-
db.exec('COMMIT');
|
|
1377
|
-
return {
|
|
1378
|
-
success: true,
|
|
1379
|
-
message: 'Help system seed data migration completed successfully',
|
|
1380
|
-
details
|
|
1381
|
-
};
|
|
1382
|
-
}
|
|
1383
|
-
catch (error) {
|
|
1384
|
-
// Rollback on error
|
|
1385
|
-
db.exec('ROLLBACK');
|
|
1386
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
1387
|
-
return {
|
|
1388
|
-
success: false,
|
|
1389
|
-
message: `Help data seeding failed: ${message}`,
|
|
1390
|
-
details
|
|
1391
|
-
};
|
|
1392
|
-
}
|
|
1393
|
-
}
|
|
1394
|
-
/**
|
|
1395
|
-
* Get migration info
|
|
1396
|
-
*/
|
|
1397
|
-
export function getHelpDataSeedingInfo() {
|
|
1398
|
-
return `
|
|
1399
|
-
Migration: Seed Help System Data - All Complexity Levels (v3.6.0)
|
|
1400
|
-
|
|
1401
|
-
This migration seeds the help system with 41 use-cases covering progressive learning:
|
|
1402
|
-
|
|
1403
|
-
Categories (6):
|
|
1404
|
-
1. task_management - Task creation, updates, queries, dependencies, auto-stale
|
|
1405
|
-
2. decision_tracking - Decision recording, versioning, search, context, evolution
|
|
1406
|
-
3. file_tracking - File change tracking, lock detection, batch operations, coordination
|
|
1407
|
-
4. constraint_management - Constraint definition, queries, compliance, linking
|
|
1408
|
-
5. cross_tool_workflow - Multi-tool integration patterns, multi-agent coordination
|
|
1409
|
-
6. configuration - System config, statistics, performance analysis, optimization
|
|
1410
|
-
|
|
1411
|
-
Basic Use Cases (18 - single action):
|
|
1412
|
-
- task_management: 4 use-cases (create, update, list, tag)
|
|
1413
|
-
- decision_tracking: 4 use-cases (set string, set numeric, get, search)
|
|
1414
|
-
- file_tracking: 3 use-cases (record, check lock, get history)
|
|
1415
|
-
- constraint_management: 2 use-cases (add, get)
|
|
1416
|
-
- cross_tool_workflow: 2 use-cases (link, message)
|
|
1417
|
-
- configuration: 3 use-cases (update retention, layer summary, db stats)
|
|
1418
|
-
|
|
1419
|
-
Intermediate Use Cases (15 - 2-3 actions):
|
|
1420
|
-
- task_management: 3 use-cases (link to decision, status transitions, file tracking)
|
|
1421
|
-
- decision_tracking: 3 use-cases (rich context, multi-criteria search, version history)
|
|
1422
|
-
- file_tracking: 2 use-cases (lock coordination, layer classification)
|
|
1423
|
-
- constraint_management: 2 use-cases (layer filtering, task compliance)
|
|
1424
|
-
- cross_tool_workflow: 3 use-cases (full feature setup, decision+constraint, messaging)
|
|
1425
|
-
- configuration: 2 use-cases (config verification, layer analysis)
|
|
1426
|
-
|
|
1427
|
-
Advanced Use Cases (8 - 4-6+ actions, multi-tool orchestration):
|
|
1428
|
-
- cross_tool_workflow: 3 use-cases
|
|
1429
|
-
* Complete feature development lifecycle (12 steps, multi-agent)
|
|
1430
|
-
* Multi-agent collaboration with priority escalation (14 steps, incident response)
|
|
1431
|
-
* Git-aware workflow with VCS auto-complete (20 steps, branch integration)
|
|
1432
|
-
- task_management: 2 use-cases
|
|
1433
|
-
* Complex dependency chain with circular detection (15 steps)
|
|
1434
|
-
* Long-running feature with auto-stale recovery (21 steps)
|
|
1435
|
-
- decision_tracking: 1 use-case
|
|
1436
|
-
* Architecture decision with version evolution (12 steps)
|
|
1437
|
-
- file_tracking: 1 use-case
|
|
1438
|
-
* Multi-agent refactoring with lock coordination (15 steps)
|
|
1439
|
-
- configuration: 1 use-case
|
|
1440
|
-
* Performance optimization workflow (18 steps, 70% improvement)
|
|
1441
|
-
|
|
1442
|
-
Each use-case includes:
|
|
1443
|
-
- Clear, actionable title
|
|
1444
|
-
- Detailed description with real-world context
|
|
1445
|
-
- Full JSON example with action and params
|
|
1446
|
-
- Action sequence array
|
|
1447
|
-
- Complexity level: 'basic', 'intermediate', or 'advanced'
|
|
1448
|
-
- Expected outcome
|
|
1449
|
-
- Related tools (cross-references)
|
|
1450
|
-
- For advanced: Multi-agent scenarios, token efficiency metrics, coordination patterns
|
|
1451
|
-
|
|
1452
|
-
AI Time Estimates:
|
|
1453
|
-
- Basic: 2-5 minutes per use-case
|
|
1454
|
-
- Intermediate: 5-12 minutes per use-case
|
|
1455
|
-
- Advanced: 12-25 minutes per use-case
|
|
1456
|
-
|
|
1457
|
-
Token Budget Estimates:
|
|
1458
|
-
- Basic: 1k-3k tokens per use-case
|
|
1459
|
-
- Intermediate: 3k-8k tokens per use-case
|
|
1460
|
-
- Advanced: 8k-20k tokens per use-case
|
|
1461
|
-
|
|
1462
|
-
This seed data enables progressive learning from simple operations through multi-tool
|
|
1463
|
-
workflows to production-ready multi-agent coordination patterns.
|
|
1464
|
-
`.trim();
|
|
1465
|
-
}
|
|
1466
|
-
//# sourceMappingURL=seed-help-data.js.map
|