sqlew 3.2.5 → 3.6.0
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 +288 -1011
- package/README.md +80 -263
- package/assets/config.example.toml +97 -0
- package/assets/schema.sql +6 -1
- package/dist/adapters/index.d.ts +11 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +21 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/mysql-adapter.d.ts +31 -0
- package/dist/adapters/mysql-adapter.d.ts.map +1 -0
- package/dist/adapters/mysql-adapter.js +63 -0
- package/dist/adapters/mysql-adapter.js.map +1 -0
- package/dist/adapters/postgresql-adapter.d.ts +31 -0
- package/dist/adapters/postgresql-adapter.d.ts.map +1 -0
- package/dist/adapters/postgresql-adapter.js +63 -0
- package/dist/adapters/postgresql-adapter.js.map +1 -0
- package/dist/adapters/sqlite-adapter.d.ts +37 -0
- package/dist/adapters/sqlite-adapter.d.ts.map +1 -0
- package/dist/adapters/sqlite-adapter.js +129 -0
- package/dist/adapters/sqlite-adapter.js.map +1 -0
- package/dist/adapters/types.d.ts +33 -0
- package/dist/adapters/types.d.ts.map +1 -0
- package/dist/adapters/types.js +2 -0
- package/dist/adapters/types.js.map +1 -0
- package/dist/cli.js +55 -54
- package/dist/cli.js.map +1 -1
- package/dist/config/example-generator.d.ts +11 -0
- package/dist/config/example-generator.d.ts.map +1 -0
- package/dist/config/example-generator.js +48 -0
- package/dist/config/example-generator.js.map +1 -0
- package/dist/config/loader.d.ts +46 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +155 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/types.d.ts +86 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +28 -0
- package/dist/config/types.js.map +1 -0
- package/dist/constants.d.ts +9 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +10 -0
- package/dist/constants.js.map +1 -1
- package/dist/database.d.ts +44 -122
- package/dist/database.d.ts.map +1 -1
- package/dist/database.js +145 -349
- package/dist/database.js.map +1 -1
- package/dist/index.js +223 -175
- package/dist/index.js.map +1 -1
- package/dist/knexfile.d.ts +6 -0
- package/dist/knexfile.d.ts.map +1 -0
- package/dist/knexfile.js +85 -0
- package/dist/knexfile.js.map +1 -0
- package/dist/migrations/add-help-system-tables.d.ts +35 -0
- package/dist/migrations/add-help-system-tables.d.ts.map +1 -0
- package/dist/migrations/add-help-system-tables.js +206 -0
- package/dist/migrations/add-help-system-tables.js.map +1 -0
- package/dist/migrations/add-token-tracking.d.ts +28 -0
- package/dist/migrations/add-token-tracking.d.ts.map +1 -0
- package/dist/migrations/add-token-tracking.js +108 -0
- package/dist/migrations/add-token-tracking.js.map +1 -0
- package/dist/migrations/add-v3.5.0-pruned-files.d.ts +26 -0
- package/dist/migrations/add-v3.5.0-pruned-files.d.ts.map +1 -0
- package/dist/migrations/add-v3.5.0-pruned-files.js +107 -0
- package/dist/migrations/add-v3.5.0-pruned-files.js.map +1 -0
- package/dist/migrations/index.d.ts +26 -12
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +162 -20
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/knex/20251025020452_create_master_tables.d.ts +4 -0
- package/dist/migrations/knex/20251025020452_create_master_tables.d.ts.map +1 -0
- package/dist/migrations/knex/20251025020452_create_master_tables.js +65 -0
- package/dist/migrations/knex/20251025020452_create_master_tables.js.map +1 -0
- package/dist/migrations/knex/20251025021152_create_transaction_tables.d.ts +4 -0
- package/dist/migrations/knex/20251025021152_create_transaction_tables.d.ts.map +1 -0
- package/dist/migrations/knex/20251025021152_create_transaction_tables.js +235 -0
- package/dist/migrations/knex/20251025021152_create_transaction_tables.js.map +1 -0
- package/dist/migrations/knex/20251025021351_create_indexes.d.ts +4 -0
- package/dist/migrations/knex/20251025021351_create_indexes.d.ts.map +1 -0
- package/dist/migrations/knex/20251025021351_create_indexes.js +62 -0
- package/dist/migrations/knex/20251025021351_create_indexes.js.map +1 -0
- package/dist/migrations/knex/20251025021416_seed_master_data.d.ts +4 -0
- package/dist/migrations/knex/20251025021416_seed_master_data.d.ts.map +1 -0
- package/dist/migrations/knex/20251025021416_seed_master_data.js +58 -0
- package/dist/migrations/knex/20251025021416_seed_master_data.js.map +1 -0
- package/dist/migrations/knex/20251025070349_create_views.d.ts +4 -0
- package/dist/migrations/knex/20251025070349_create_views.d.ts.map +1 -0
- package/dist/migrations/knex/20251025070349_create_views.js +143 -0
- package/dist/migrations/knex/20251025070349_create_views.js.map +1 -0
- package/dist/migrations/knex/20251025081221_add_link_type_to_task_decision_links.d.ts +4 -0
- package/dist/migrations/knex/20251025081221_add_link_type_to_task_decision_links.d.ts.map +1 -0
- package/dist/migrations/knex/20251025081221_add_link_type_to_task_decision_links.js +15 -0
- package/dist/migrations/knex/20251025081221_add_link_type_to_task_decision_links.js.map +1 -0
- package/dist/migrations/knex/20251025082220_fix_task_dependencies_columns.d.ts +8 -0
- package/dist/migrations/knex/20251025082220_fix_task_dependencies_columns.d.ts.map +1 -0
- package/dist/migrations/knex/20251025082220_fix_task_dependencies_columns.js +12 -0
- package/dist/migrations/knex/20251025082220_fix_task_dependencies_columns.js.map +1 -0
- package/dist/migrations/knex/20251025090000_create_help_system_tables.d.ts +19 -0
- package/dist/migrations/knex/20251025090000_create_help_system_tables.d.ts.map +1 -0
- package/dist/migrations/knex/20251025090000_create_help_system_tables.js +115 -0
- package/dist/migrations/knex/20251025090000_create_help_system_tables.js.map +1 -0
- package/dist/migrations/knex/20251025090100_seed_help_categories_and_use_cases.d.ts +13 -0
- package/dist/migrations/knex/20251025090100_seed_help_categories_and_use_cases.d.ts.map +1 -0
- package/dist/migrations/knex/20251025090100_seed_help_categories_and_use_cases.js +377 -0
- package/dist/migrations/knex/20251025090100_seed_help_categories_and_use_cases.js.map +1 -0
- package/dist/migrations/knex/20251025100000_seed_help_metadata.d.ts +15 -0
- package/dist/migrations/knex/20251025100000_seed_help_metadata.d.ts.map +1 -0
- package/dist/migrations/knex/20251025100000_seed_help_metadata.js +253 -0
- package/dist/migrations/knex/20251025100000_seed_help_metadata.js.map +1 -0
- package/dist/migrations/knex/20251025100100_seed_remaining_use_cases.d.ts +16 -0
- package/dist/migrations/knex/20251025100100_seed_remaining_use_cases.d.ts.map +1 -0
- package/dist/migrations/knex/20251025100100_seed_remaining_use_cases.js +276 -0
- package/dist/migrations/knex/20251025100100_seed_remaining_use_cases.js.map +1 -0
- package/dist/migrations/knex/20251025120000_add_cascade_to_task_dependencies.d.ts +8 -0
- package/dist/migrations/knex/20251025120000_add_cascade_to_task_dependencies.d.ts.map +1 -0
- package/dist/migrations/knex/20251025120000_add_cascade_to_task_dependencies.js +64 -0
- package/dist/migrations/knex/20251025120000_add_cascade_to_task_dependencies.js.map +1 -0
- package/dist/migrations/seed-help-data.d.ts +48 -0
- package/dist/migrations/seed-help-data.d.ts.map +1 -0
- package/dist/migrations/seed-help-data.js +1466 -0
- package/dist/migrations/seed-help-data.js.map +1 -0
- package/dist/migrations/seed-tool-metadata.d.ts +24 -0
- package/dist/migrations/seed-tool-metadata.d.ts.map +1 -0
- package/dist/migrations/seed-tool-metadata.js +392 -0
- package/dist/migrations/seed-tool-metadata.js.map +1 -0
- package/dist/migrations/v3.6.0-help-system-refactor.d.ts +46 -0
- package/dist/migrations/v3.6.0-help-system-refactor.d.ts.map +1 -0
- package/dist/migrations/v3.6.0-help-system-refactor.js +223 -0
- package/dist/migrations/v3.6.0-help-system-refactor.js.map +1 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +2 -0
- package/dist/schema.js.map +1 -1
- package/dist/tests/git-aware-completion.test.d.ts +6 -0
- package/dist/tests/git-aware-completion.test.d.ts.map +1 -0
- package/dist/tests/git-aware-completion.test.js +160 -0
- package/dist/tests/git-aware-completion.test.js.map +1 -0
- package/dist/tests/help-system.test.d.ts +23 -0
- package/dist/tests/help-system.test.d.ts.map +1 -0
- package/dist/tests/help-system.test.js +374 -0
- package/dist/tests/help-system.test.js.map +1 -0
- package/dist/tests/tasks.auto-pruning-decision-link.test.d.ts +6 -0
- package/dist/tests/tasks.auto-pruning-decision-link.test.d.ts.map +1 -0
- package/dist/tests/tasks.auto-pruning-decision-link.test.js +264 -0
- package/dist/tests/tasks.auto-pruning-decision-link.test.js.map +1 -0
- package/dist/tests/tasks.auto-pruning-partial.test.d.ts +6 -0
- package/dist/tests/tasks.auto-pruning-partial.test.d.ts.map +1 -0
- package/dist/tests/tasks.auto-pruning-partial.test.js +285 -0
- package/dist/tests/tasks.auto-pruning-partial.test.js.map +1 -0
- package/dist/tests/tasks.auto-pruning-persistence.test.d.ts +6 -0
- package/dist/tests/tasks.auto-pruning-persistence.test.d.ts.map +1 -0
- package/dist/tests/tasks.auto-pruning-persistence.test.js +250 -0
- package/dist/tests/tasks.auto-pruning-persistence.test.js.map +1 -0
- package/dist/tests/tasks.auto-pruning-safety.test.d.ts +12 -0
- package/dist/tests/tasks.auto-pruning-safety.test.d.ts.map +1 -0
- package/dist/tests/tasks.auto-pruning-safety.test.js +217 -0
- package/dist/tests/tasks.auto-pruning-safety.test.js.map +1 -0
- package/dist/tests/tasks.dependencies.test.js +338 -307
- package/dist/tests/tasks.dependencies.test.js.map +1 -1
- package/dist/tests/tasks.link-file-backward-compat.test.d.ts +6 -0
- package/dist/tests/tasks.link-file-backward-compat.test.d.ts.map +1 -0
- package/dist/tests/tasks.link-file-backward-compat.test.js +247 -0
- package/dist/tests/tasks.link-file-backward-compat.test.js.map +1 -0
- package/dist/tests/tasks.watch-files-action.test.d.ts +6 -0
- package/dist/tests/tasks.watch-files-action.test.d.ts.map +1 -0
- package/dist/tests/tasks.watch-files-action.test.js +372 -0
- package/dist/tests/tasks.watch-files-action.test.js.map +1 -0
- package/dist/tests/tasks.watch-files-parameter.test.d.ts +6 -0
- package/dist/tests/tasks.watch-files-parameter.test.d.ts.map +1 -0
- package/dist/tests/tasks.watch-files-parameter.test.js +260 -0
- package/dist/tests/tasks.watch-files-parameter.test.js.map +1 -0
- package/dist/tests/two-step-git-completion.test.d.ts +6 -0
- package/dist/tests/two-step-git-completion.test.d.ts.map +1 -0
- package/dist/tests/two-step-git-completion.test.js +326 -0
- package/dist/tests/two-step-git-completion.test.js.map +1 -0
- package/dist/tests/vcs-staging.test.d.ts +6 -0
- package/dist/tests/vcs-staging.test.d.ts.map +1 -0
- package/dist/tests/vcs-staging.test.js +137 -0
- package/dist/tests/vcs-staging.test.js.map +1 -0
- package/dist/tools/config.d.ts +9 -4
- package/dist/tools/config.d.ts.map +1 -1
- package/dist/tools/config.js +16 -12
- package/dist/tools/config.js.map +1 -1
- package/dist/tools/constraints.d.ts +9 -3
- package/dist/tools/constraints.d.ts.map +1 -1
- package/dist/tools/constraints.js +66 -45
- package/dist/tools/constraints.js.map +1 -1
- package/dist/tools/context.d.ts +35 -16
- package/dist/tools/context.d.ts.map +1 -1
- package/dist/tools/context.js +374 -314
- package/dist/tools/context.js.map +1 -1
- package/dist/tools/files.d.ts +11 -4
- package/dist/tools/files.d.ts.map +1 -1
- package/dist/tools/files.js +173 -91
- package/dist/tools/files.js.map +1 -1
- package/dist/tools/help-queries.d.ts +130 -0
- package/dist/tools/help-queries.d.ts.map +1 -0
- package/dist/tools/help-queries.js +393 -0
- package/dist/tools/help-queries.js.map +1 -0
- package/dist/tools/messaging.d.ts +13 -6
- package/dist/tools/messaging.d.ts.map +1 -1
- package/dist/tools/messaging.js +217 -129
- package/dist/tools/messaging.js.map +1 -1
- package/dist/tools/tasks.d.ts +42 -12
- package/dist/tools/tasks.d.ts.map +1 -1
- package/dist/tools/tasks.js +809 -347
- package/dist/tools/tasks.js.map +1 -1
- package/dist/tools/utils.d.ts +13 -5
- package/dist/tools/utils.d.ts.map +1 -1
- package/dist/tools/utils.js +92 -115
- package/dist/tools/utils.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/activity-logging.d.ts +114 -0
- package/dist/utils/activity-logging.d.ts.map +1 -0
- package/dist/utils/activity-logging.js +162 -0
- package/dist/utils/activity-logging.js.map +1 -0
- package/dist/utils/batch.d.ts +2 -2
- package/dist/utils/batch.d.ts.map +1 -1
- package/dist/utils/batch.js +8 -8
- package/dist/utils/batch.js.map +1 -1
- package/dist/utils/cleanup.d.ts +21 -13
- package/dist/utils/cleanup.d.ts.map +1 -1
- package/dist/utils/cleanup.js +31 -24
- package/dist/utils/cleanup.js.map +1 -1
- package/dist/utils/debug-logger.d.ts +44 -0
- package/dist/utils/debug-logger.d.ts.map +1 -0
- package/dist/utils/debug-logger.js +116 -0
- package/dist/utils/debug-logger.js.map +1 -0
- package/dist/utils/file-pruning.d.ts +69 -0
- package/dist/utils/file-pruning.d.ts.map +1 -0
- package/dist/utils/file-pruning.js +185 -0
- package/dist/utils/file-pruning.js.map +1 -0
- package/dist/utils/help-tracking.d.ts +55 -0
- package/dist/utils/help-tracking.d.ts.map +1 -0
- package/dist/utils/help-tracking.js +88 -0
- package/dist/utils/help-tracking.js.map +1 -0
- package/dist/utils/quality-checks.d.ts +60 -0
- package/dist/utils/quality-checks.d.ts.map +1 -0
- package/dist/utils/quality-checks.js +228 -0
- package/dist/utils/quality-checks.js.map +1 -0
- package/dist/utils/retention.d.ts +13 -5
- package/dist/utils/retention.d.ts.map +1 -1
- package/dist/utils/retention.js +20 -8
- package/dist/utils/retention.js.map +1 -1
- package/dist/utils/task-stale-detection.d.ts +77 -7
- package/dist/utils/task-stale-detection.d.ts.map +1 -1
- package/dist/utils/task-stale-detection.js +309 -34
- package/dist/utils/task-stale-detection.js.map +1 -1
- package/dist/utils/token-estimation.d.ts +72 -0
- package/dist/utils/token-estimation.d.ts.map +1 -0
- package/dist/utils/token-estimation.js +71 -0
- package/dist/utils/token-estimation.js.map +1 -0
- package/dist/utils/token-logging.d.ts +48 -0
- package/dist/utils/token-logging.d.ts.map +1 -0
- package/dist/utils/token-logging.js +112 -0
- package/dist/utils/token-logging.js.map +1 -0
- package/dist/utils/vcs-adapter.d.ts +68 -0
- package/dist/utils/vcs-adapter.d.ts.map +1 -0
- package/dist/utils/vcs-adapter.js +187 -0
- package/dist/utils/vcs-adapter.js.map +1 -0
- package/dist/utils/view-queries.d.ts +34 -0
- package/dist/utils/view-queries.d.ts.map +1 -0
- package/dist/utils/view-queries.js +192 -0
- package/dist/utils/view-queries.js.map +1 -0
- package/dist/watcher/file-watcher.d.ts +54 -4
- package/dist/watcher/file-watcher.d.ts.map +1 -1
- package/dist/watcher/file-watcher.js +329 -33
- package/dist/watcher/file-watcher.js.map +1 -1
- package/dist/watcher/gitignore-parser.d.ts +70 -0
- package/dist/watcher/gitignore-parser.d.ts.map +1 -0
- package/dist/watcher/gitignore-parser.js +191 -0
- package/dist/watcher/gitignore-parser.js.map +1 -0
- package/dist/watcher/index.d.ts +1 -0
- package/dist/watcher/index.d.ts.map +1 -1
- package/dist/watcher/index.js +1 -0
- package/dist/watcher/index.js.map +1 -1
- package/docs/AI_AGENT_GUIDE.md +1 -1
- package/docs/ARCHITECTURE.md +12 -0
- package/docs/AUTO_FILE_TRACKING.md +486 -82
- package/docs/BEST_PRACTICES.md +56 -448
- package/docs/CONFIGURATION.md +908 -0
- package/docs/GIT_AWARE_AUTO_COMPLETE.md +645 -0
- package/docs/MIGRATION_v3.3.md +602 -0
- package/docs/MIGRATION_v3.6.0.md +170 -0
- package/docs/SHARED_CONCEPTS.md +65 -209
- package/docs/TASK_ACTIONS.md +12 -0
- package/docs/TASK_OVERVIEW.md +125 -24
- package/docs/TASK_PRUNING.md +589 -0
- package/docs/TASK_SYSTEM.md +83 -13
- package/docs/TOOL_REFERENCE.md +94 -6
- package/docs/TOOL_SELECTION.md +41 -248
- package/package.json +21 -7
package/docs/TASK_SYSTEM.md
CHANGED
|
@@ -763,10 +763,15 @@ Auto-stale detection automatically transitions idle tasks to prevent them from g
|
|
|
763
763
|
|
|
764
764
|
The logic:
|
|
765
765
|
1. Check if enabled via `task_auto_stale_enabled` config
|
|
766
|
-
2. Get threshold hours from config
|
|
766
|
+
2. Get threshold hours/days from config
|
|
767
767
|
3. Run SQL UPDATE to transition stale tasks based on `updated_ts`
|
|
768
768
|
4. Return count of transitioned tasks
|
|
769
769
|
|
|
770
|
+
**Transition Rules:**
|
|
771
|
+
1. **`in_progress` → `waiting_review`** (>2 hours idle)
|
|
772
|
+
2. **`waiting_review` → `todo`** (>24 hours idle)
|
|
773
|
+
3. **`done` → `archived`** (>48 hours idle, weekend-aware) - **Auto-Archive**
|
|
774
|
+
|
|
770
775
|
SQL Pattern:
|
|
771
776
|
```sql
|
|
772
777
|
UPDATE t_tasks
|
|
@@ -779,38 +784,67 @@ WHERE status_id = ? AND updated_ts < unixepoch() - ?
|
|
|
779
784
|
1. **Before `list` action**
|
|
780
785
|
- Ensures stale tasks show correct status
|
|
781
786
|
- Returns `stale_tasks_transitioned` count
|
|
787
|
+
- Returns `archived_tasks` count
|
|
782
788
|
|
|
783
789
|
2. **Before `move` action**
|
|
784
790
|
- Prevents moving already-stale tasks
|
|
785
791
|
- Ensures status consistency
|
|
786
792
|
|
|
793
|
+
3. **On database startup**
|
|
794
|
+
- Maintenance on initialization
|
|
795
|
+
- Cleans up stale/old tasks
|
|
796
|
+
|
|
787
797
|
### Configuration
|
|
788
798
|
|
|
789
|
-
**
|
|
799
|
+
**Via MCP Tool (config):**
|
|
800
|
+
```javascript
|
|
801
|
+
// Update auto-archive threshold
|
|
802
|
+
{
|
|
803
|
+
action: "update",
|
|
804
|
+
auto_archive_done_days: "3" // Archive after 3 days instead of 2
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
// Enable weekend-aware mode (affects auto-archive, messages, files)
|
|
808
|
+
{
|
|
809
|
+
action: "update",
|
|
810
|
+
autodelete_ignore_weekend: "1"
|
|
811
|
+
}
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
**Via .sqlew/config.toml:**
|
|
815
|
+
```toml
|
|
816
|
+
[tasks]
|
|
817
|
+
auto_archive_done_days = 3 # Archive after 3 days
|
|
818
|
+
stale_hours_in_progress = 4 # in_progress → waiting_review after 4 hours
|
|
819
|
+
stale_hours_waiting_review = 48 # waiting_review → todo after 48 hours
|
|
820
|
+
auto_stale_enabled = true
|
|
821
|
+
|
|
822
|
+
[autodelete]
|
|
823
|
+
ignore_weekend = true # Weekend-aware mode (shared setting)
|
|
824
|
+
```
|
|
825
|
+
|
|
826
|
+
**Via SQL (Advanced):**
|
|
790
827
|
```sql
|
|
828
|
+
-- Enable/Disable
|
|
791
829
|
UPDATE m_config SET value = '1' WHERE key = 'task_auto_stale_enabled'; -- Enable
|
|
792
830
|
UPDATE m_config SET value = '0' WHERE key = 'task_auto_stale_enabled'; -- Disable
|
|
793
|
-
```
|
|
794
831
|
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
-- in_progress → waiting_review after 4 hours
|
|
798
|
-
UPDATE m_config SET value = '4' WHERE key = 'task_stale_hours_in_progress';
|
|
832
|
+
-- Adjust auto-archive threshold
|
|
833
|
+
UPDATE m_config SET value = '3' WHERE key = 'auto_archive_done_days'; -- 3 days
|
|
799
834
|
|
|
800
|
-
--
|
|
835
|
+
-- Adjust stale detection thresholds
|
|
836
|
+
UPDATE m_config SET value = '4' WHERE key = 'task_stale_hours_in_progress';
|
|
801
837
|
UPDATE m_config SET value = '48' WHERE key = 'task_stale_hours_waiting_review';
|
|
802
|
-
```
|
|
803
838
|
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
SELECT key, value FROM m_config WHERE key LIKE 'task_%';
|
|
839
|
+
-- Check current config
|
|
840
|
+
SELECT key, value FROM m_config WHERE key LIKE 'task_%' OR key LIKE 'auto_%';
|
|
807
841
|
```
|
|
808
842
|
|
|
809
843
|
### Monitoring
|
|
810
844
|
|
|
811
845
|
Track transitions via `t_activity_log` table:
|
|
812
846
|
```sql
|
|
813
|
-
-- Recent transitions
|
|
847
|
+
-- Recent transitions (including auto-archive)
|
|
814
848
|
SELECT * FROM t_activity_log
|
|
815
849
|
WHERE entity_type = 'task' AND action_type = 'status_change'
|
|
816
850
|
ORDER BY ts DESC LIMIT 20;
|
|
@@ -819,8 +853,44 @@ ORDER BY ts DESC LIMIT 20;
|
|
|
819
853
|
SELECT task_id, COUNT(*) as stale_count FROM t_activity_log
|
|
820
854
|
WHERE entity_type = 'task' AND json_extract(details, '$.new_status') = 3
|
|
821
855
|
GROUP BY task_id HAVING stale_count > 2;
|
|
856
|
+
|
|
857
|
+
-- Recently auto-archived tasks
|
|
858
|
+
SELECT * FROM t_activity_log
|
|
859
|
+
WHERE entity_type = 'task'
|
|
860
|
+
AND action_type = 'status_change'
|
|
861
|
+
AND json_extract(details, '$.new_status') = 6 -- ARCHIVED status
|
|
862
|
+
ORDER BY ts DESC LIMIT 20;
|
|
863
|
+
|
|
864
|
+
-- Count of archived tasks per day
|
|
865
|
+
SELECT date(ts, 'unixepoch') as day, COUNT(*) as archived_count
|
|
866
|
+
FROM t_activity_log
|
|
867
|
+
WHERE entity_type = 'task'
|
|
868
|
+
AND action_type = 'status_change'
|
|
869
|
+
AND json_extract(details, '$.new_status') = 6
|
|
870
|
+
GROUP BY day
|
|
871
|
+
ORDER BY day DESC;
|
|
822
872
|
```
|
|
823
873
|
|
|
874
|
+
### Weekend-Aware Behavior
|
|
875
|
+
|
|
876
|
+
When `autodelete_ignore_weekend` is enabled (via config.toml or MCP tool):
|
|
877
|
+
|
|
878
|
+
**Example 1 - Task Completed on Friday:**
|
|
879
|
+
- Task marked `done`: Friday 5:00 PM
|
|
880
|
+
- Default 48 hours: Would archive Sunday 5:00 PM
|
|
881
|
+
- **Weekend-aware**: Archives Tuesday 5:00 PM (skips Sat/Sun)
|
|
882
|
+
|
|
883
|
+
**Example 2 - Task Completed on Wednesday:**
|
|
884
|
+
- Task marked `done`: Wednesday 2:00 PM
|
|
885
|
+
- Default 48 hours: Would archive Friday 2:00 PM
|
|
886
|
+
- **Weekend-aware**: Archives Friday 2:00 PM (no weekend in between)
|
|
887
|
+
|
|
888
|
+
**Why Weekend-Aware Mode?**
|
|
889
|
+
- Teams/AI agents may not work on weekends
|
|
890
|
+
- Prevents premature archiving during weekend breaks
|
|
891
|
+
- Consistent with message/file retention behavior
|
|
892
|
+
- Configurable: Disable if you work 7 days/week
|
|
893
|
+
|
|
824
894
|
## Linking System
|
|
825
895
|
|
|
826
896
|
### Overview
|
package/docs/TOOL_REFERENCE.md
CHANGED
|
@@ -149,14 +149,19 @@
|
|
|
149
149
|
|
|
150
150
|
| Action | Required | Optional |
|
|
151
151
|
|--------|----------|----------|
|
|
152
|
-
| **create** | action, title | description, acceptance_criteria, notes, priority, assigned_agent, created_by_agent, layer, tags, status |
|
|
153
|
-
| **update** | action, task_id | title, priority, assigned_agent, layer, description, acceptance_criteria, notes |
|
|
154
|
-
| **get** | action, task_id |
|
|
155
|
-
| **list** | action | status, assigned_agent, layer, tags, limit, offset |
|
|
152
|
+
| **create** | action, title | description, acceptance_criteria, notes, priority, assigned_agent, created_by_agent, layer, tags, status, **watch_files** (v3.4.1) |
|
|
153
|
+
| **update** | action, task_id | title, priority, assigned_agent, layer, description, acceptance_criteria, notes, **watch_files** (v3.4.1) |
|
|
154
|
+
| **get** | action, task_id | include_dependencies |
|
|
155
|
+
| **list** | action | status, assigned_agent, layer, tags, limit, offset, include_dependency_counts |
|
|
156
156
|
| **move** | action, task_id, new_status | - |
|
|
157
|
-
| **link** | action, task_id, link_type, target_id | link_relation |
|
|
157
|
+
| **link** | action, task_id, link_type, target_id | link_relation (⚠️ link_type="file" deprecated in v3.4.1) |
|
|
158
158
|
| **archive** | action, task_id | - |
|
|
159
159
|
| **batch_create** | action, tasks | atomic |
|
|
160
|
+
| **add_dependency** | action, blocker_task_id, blocked_task_id | - |
|
|
161
|
+
| **remove_dependency** | action, blocker_task_id, blocked_task_id | - |
|
|
162
|
+
| **get_dependencies** | action, task_id | include_details |
|
|
163
|
+
| **watch_files** (v3.4.1) | action, task_id, action (watch/unwatch/list) | file_paths |
|
|
164
|
+
| **watcher** | action | subaction (status/list_files/list_tasks/help) |
|
|
160
165
|
|
|
161
166
|
---
|
|
162
167
|
|
|
@@ -323,6 +328,89 @@
|
|
|
323
328
|
|
|
324
329
|
---
|
|
325
330
|
|
|
331
|
+
## File Watching with Tasks (v3.4.1)
|
|
332
|
+
|
|
333
|
+
### New: watch_files Parameter
|
|
334
|
+
|
|
335
|
+
**Replaces:** `task.link(link_type="file")` (deprecated in v3.4.1)
|
|
336
|
+
|
|
337
|
+
Create tasks with automatic file monitoring in one step:
|
|
338
|
+
|
|
339
|
+
```javascript
|
|
340
|
+
{
|
|
341
|
+
action: "create",
|
|
342
|
+
title: "Implement user authentication",
|
|
343
|
+
watch_files: ["src/auth.ts", "src/auth.test.ts"],
|
|
344
|
+
acceptance_criteria: [
|
|
345
|
+
{type: "tests_pass", command: "npm test auth", expected_pattern: "passing"},
|
|
346
|
+
{type: "code_contains", file: "src/auth.ts", pattern: "export class AuthService"}
|
|
347
|
+
],
|
|
348
|
+
priority: 3,
|
|
349
|
+
assigned_agent: "backend-dev"
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
**Benefits:**
|
|
354
|
+
- 75% fewer MCP calls (1 call vs 4 calls in v3.2.x)
|
|
355
|
+
- 35% token reduction
|
|
356
|
+
- Clearer intent
|
|
357
|
+
- Atomic file registration
|
|
358
|
+
|
|
359
|
+
### New: watch_files Action
|
|
360
|
+
|
|
361
|
+
Manage file watches dynamically:
|
|
362
|
+
|
|
363
|
+
```javascript
|
|
364
|
+
// Watch files
|
|
365
|
+
{
|
|
366
|
+
action: "watch_files",
|
|
367
|
+
task_id: 123,
|
|
368
|
+
action: "watch",
|
|
369
|
+
file_paths: ["src/auth.ts", "src/middleware/jwt.ts"]
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// Unwatch files
|
|
373
|
+
{
|
|
374
|
+
action: "watch_files",
|
|
375
|
+
task_id: 123,
|
|
376
|
+
action: "unwatch",
|
|
377
|
+
file_paths: ["src/middleware/jwt.ts"]
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// List watched files
|
|
381
|
+
{
|
|
382
|
+
action: "watch_files",
|
|
383
|
+
task_id: 123,
|
|
384
|
+
action: "list"
|
|
385
|
+
}
|
|
386
|
+
// Response: { files: ["src/auth.ts"], files_count: 1 }
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
### Migration from v3.2.x
|
|
390
|
+
|
|
391
|
+
**Before (deprecated):**
|
|
392
|
+
```javascript
|
|
393
|
+
// Create task
|
|
394
|
+
{action: "create", title: "Feature"}
|
|
395
|
+
// Link files (separate calls)
|
|
396
|
+
{action: "link", task_id: 123, link_type: "file", target_id: "src/file1.ts"}
|
|
397
|
+
{action: "link", task_id: 123, link_type: "file", target_id: "src/file2.ts"}
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
**After (v3.4.1):**
|
|
401
|
+
```javascript
|
|
402
|
+
// Create task with files in one call
|
|
403
|
+
{
|
|
404
|
+
action: "create",
|
|
405
|
+
title: "Feature",
|
|
406
|
+
watch_files: ["src/file1.ts", "src/file2.ts"]
|
|
407
|
+
}
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
**See Also:** [MIGRATION_v3.3.md](./MIGRATION_v3.3.md) for complete migration guide.
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
326
414
|
## Decision Context System (v3.2.2)
|
|
327
415
|
|
|
328
416
|
### What is Decision Context?
|
|
@@ -590,7 +678,7 @@ Quick reference:
|
|
|
590
678
|
- **waiting_review**: Completed, awaiting review
|
|
591
679
|
- **blocked**: Cannot proceed due to blocker
|
|
592
680
|
- **done**: Completed successfully
|
|
593
|
-
- **archived**:
|
|
681
|
+
- **archived**: Completed and archived (auto-archived after 48 hours)
|
|
594
682
|
|
|
595
683
|
### Constraint Categories
|
|
596
684
|
|
package/docs/TOOL_SELECTION.md
CHANGED
|
@@ -1,51 +1,6 @@
|
|
|
1
1
|
# Tool Selection Guide
|
|
2
2
|
|
|
3
|
-
**Quick reference for choosing the right
|
|
4
|
-
|
|
5
|
-
## Understanding Tool Purposes
|
|
6
|
-
|
|
7
|
-
Each tool serves a distinct purpose in the MCP sqlew ecosystem:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
┌──────────────────────────────────────────────────────────┐
|
|
11
|
-
│ What do you need to do? │
|
|
12
|
-
└────────────────┬─────────────────────────────────────────┘
|
|
13
|
-
│
|
|
14
|
-
├─ Record a CHOICE that was made?
|
|
15
|
-
│ └─> Use `decision` tool
|
|
16
|
-
│ • Examples: "We chose JWT auth", "Selected PostgreSQL"
|
|
17
|
-
│ • Key: Captures PAST decisions
|
|
18
|
-
│ • Supports: versioning, tags, layers, scopes
|
|
19
|
-
│
|
|
20
|
-
├─ Communicate with other agents?
|
|
21
|
-
│ └─> Use `message` tool
|
|
22
|
-
│ • Examples: Task updates, warnings, requests
|
|
23
|
-
│ • Key: Real-time communication
|
|
24
|
-
│ • Supports: priority, broadcast, read tracking
|
|
25
|
-
│
|
|
26
|
-
├─ Define a REQUIREMENT that must be followed?
|
|
27
|
-
│ └─> Use `constraint` tool
|
|
28
|
-
│ • Examples: "API must be <100ms", "Code coverage >80%"
|
|
29
|
-
│ • Key: Enforces RULES
|
|
30
|
-
│ • Supports: priority, categories, layers
|
|
31
|
-
│
|
|
32
|
-
├─ Track WORK to be done?
|
|
33
|
-
│ └─> Use `task` tool
|
|
34
|
-
│ • Examples: "Implement feature X", "Fix bug Y"
|
|
35
|
-
│ • Key: Tracks TODO items and progress
|
|
36
|
-
│ • Supports: status transitions, auto-stale, linking
|
|
37
|
-
│
|
|
38
|
-
├─ Record file modifications?
|
|
39
|
-
│ └─> Use `file` tool
|
|
40
|
-
│ • Examples: Track changes, check locks
|
|
41
|
-
│ • Key: File change history
|
|
42
|
-
│ • Supports: layers, change types, lock detection
|
|
43
|
-
│
|
|
44
|
-
└─ Get statistics or manage data?
|
|
45
|
-
└─> Use `stats` or `config` tools
|
|
46
|
-
• stats: Database metrics, cleanup, activity logs
|
|
47
|
-
• config: Retention settings, auto-deletion
|
|
48
|
-
```
|
|
3
|
+
**Quick reference for choosing the right tool**
|
|
49
4
|
|
|
50
5
|
## Tool Comparison Table
|
|
51
6
|
|
|
@@ -61,219 +16,57 @@ Each tool serves a distinct purpose in the MCP sqlew ecosystem:
|
|
|
61
16
|
|
|
62
17
|
## Decision vs Constraint vs Task
|
|
63
18
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
|
67
|
-
|
|
68
|
-
| **
|
|
69
|
-
| **Constraint** | A requirement that MUST be followed | "Response time must be <100ms" | `constraint` |
|
|
70
|
-
| **Task** | Work that NEEDS to be done | "Implement JWT authentication" | `task` |
|
|
71
|
-
|
|
72
|
-
## ⚠️ Decision vs Task: WHY vs WHAT
|
|
73
|
-
|
|
74
|
-
**Critical distinction**: `decision` stores WHY (reasoning), `task` stores WHAT (work status).
|
|
75
|
-
|
|
76
|
-
| Question | Answer | Tool |
|
|
77
|
-
|----------|--------|------|
|
|
78
|
-
| **WHY** did we choose this approach? | "Chose JWT because stateless auth scales horizontally" | **decision** |
|
|
79
|
-
| **WHAT** needs to be done? | "Implement JWT authentication (status: in_progress)" | **task** |
|
|
80
|
-
| **WHY** was this bug introduced? | "Nested transaction bug: setDecision wraps in transaction, batch also wraps" | **decision** |
|
|
81
|
-
| **WHAT** is the completion status? | "Fixed nested transaction bug (status: done)" | **task** |
|
|
82
|
-
|
|
83
|
-
### Common Mistakes
|
|
84
|
-
|
|
85
|
-
```javascript
|
|
86
|
-
// ❌ WRONG - Using decision for task completion
|
|
87
|
-
{
|
|
88
|
-
action: "set",
|
|
89
|
-
key: "jwt-implementation-complete",
|
|
90
|
-
value: "JWT authentication implemented. All tests passing."
|
|
91
|
-
}
|
|
92
|
-
// This is WHAT was done (completion status), not WHY decisions were made.
|
|
93
|
-
// FIX: Use task tool for tracking implementation progress.
|
|
94
|
-
|
|
95
|
-
// ✅ CORRECT - Using decision for architectural reasoning
|
|
96
|
-
{
|
|
97
|
-
action: "set",
|
|
98
|
-
key: "api/auth/jwt-choice",
|
|
99
|
-
value: "Chose JWT over sessions because: (1) Stateless design scales, (2) Mobile clients cache tokens, (3) Microservice auth requires distributed validation."
|
|
100
|
-
}
|
|
101
|
-
// This explains WHY JWT was chosen with architectural reasoning.
|
|
102
|
-
|
|
103
|
-
// ✅ CORRECT - Using task for work tracking
|
|
104
|
-
{
|
|
105
|
-
action: "create",
|
|
106
|
-
title: "Implement JWT authentication with refresh tokens",
|
|
107
|
-
status: "in_progress",
|
|
108
|
-
assigned_agent: "backend-agent"
|
|
109
|
-
}
|
|
110
|
-
// This tracks WHAT work is being done and its current status.
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
💡 **See [BEST_PRACTICES.md](BEST_PRACTICES.md#critical-what-to-store-in-decisions) for detailed examples of WHY vs WHAT.**
|
|
114
|
-
|
|
115
|
-
## Scenario-Based Tool Selection
|
|
116
|
-
|
|
117
|
-
### Scenario 1: Breaking API Change
|
|
118
|
-
|
|
119
|
-
```javascript
|
|
120
|
-
// 1. Record the decision (WHY the change was necessary)
|
|
121
|
-
{
|
|
122
|
-
action: "set",
|
|
123
|
-
key: "api/v2/versioning-decision",
|
|
124
|
-
value: "Moved /users to /v2/users because: (1) Enables backward compatibility via versioning, (2) Allows gradual client migration without breaking production apps, (3) Future API changes won't force all clients to update simultaneously. Trade-off: More complex routing layer, but necessary for production stability with 50+ client apps.",
|
|
125
|
-
layer: "presentation",
|
|
126
|
-
tags: ["api", "versioning", "architecture-decision"]
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// 2. Add a constraint (requirement going forward)
|
|
130
|
-
{
|
|
131
|
-
action: "add",
|
|
132
|
-
category: "architecture",
|
|
133
|
-
constraint_text: "All API endpoints must include version prefix",
|
|
134
|
-
layer: "presentation",
|
|
135
|
-
tags: ["api", "versioning"]
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// 3. Create migration task
|
|
139
|
-
{
|
|
140
|
-
action: "create",
|
|
141
|
-
title: "Migrate clients to /v2/users endpoint",
|
|
142
|
-
status: "todo",
|
|
143
|
-
layer: "presentation",
|
|
144
|
-
tags: ["migration", "v2.0.0"]
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// 4. Notify other agents
|
|
148
|
-
{
|
|
149
|
-
action: "send",
|
|
150
|
-
from_agent: "api-agent",
|
|
151
|
-
msg_type: "warning",
|
|
152
|
-
message: "Breaking change: /users moved to /v2/users",
|
|
153
|
-
priority: "critical"
|
|
154
|
-
}
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
### Scenario 2: Performance Issue
|
|
158
|
-
|
|
159
|
-
```javascript
|
|
160
|
-
// 1. Record the analysis and solution decision (WHY this approach)
|
|
161
|
-
{
|
|
162
|
-
action: "set",
|
|
163
|
-
key: "db/user_sessions/index-strategy",
|
|
164
|
-
value: "Adding composite index (user_id, created_at DESC) to user_sessions table because: (1) Query analysis shows 300% latency increase from full table scans on 10M+ rows, (2) 95% of queries filter by user_id + sort by timestamp, (3) Index reduces query time from 850ms to <50ms in staging tests. Trade-off: 15% slower inserts and 200MB additional storage, but read performance critical for user experience.",
|
|
165
|
-
layer: "data",
|
|
166
|
-
tags: ["performance", "database", "indexing-strategy"]
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// 2. Add performance constraint
|
|
170
|
-
{
|
|
171
|
-
action: "add",
|
|
172
|
-
category: "performance",
|
|
173
|
-
constraint_text: "Database queries must complete within 50ms",
|
|
174
|
-
priority: "high",
|
|
175
|
-
layer: "data"
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// 3. Create optimization task
|
|
179
|
-
{
|
|
180
|
-
action: "create",
|
|
181
|
-
title: "Add indexes to user_sessions table",
|
|
182
|
-
status: "in_progress",
|
|
183
|
-
priority: 4,
|
|
184
|
-
layer: "data",
|
|
185
|
-
tags: ["performance", "database"]
|
|
186
|
-
}
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### Scenario 3: Security Vulnerability
|
|
19
|
+
| Concept | Definition | Example |
|
|
20
|
+
|---------|------------|---------|
|
|
21
|
+
| **Decision** | A choice that WAS made | "We chose JWT authentication" |
|
|
22
|
+
| **Constraint** | A requirement that MUST be followed | "Response time must be <100ms" |
|
|
23
|
+
| **Task** | Work that NEEDS to be done | "Implement JWT authentication" |
|
|
190
24
|
|
|
191
|
-
|
|
192
|
-
// 1. Record the solution decision (WHY this mitigation approach)
|
|
193
|
-
{
|
|
194
|
-
action: "set",
|
|
195
|
-
key: "security/jwt/timing-attack-mitigation",
|
|
196
|
-
value: "Upgrading JWT library to v9.2.0+ and implementing constant-time comparison because: (1) CVE-2025-1234 timing attack allows token forgery via timing analysis, (2) Library v9.2.0+ includes constant-time string comparison preventing timing leaks, (3) Alternative approach (rewriting auth layer) would take 3 weeks vs 2-day upgrade. Trade-off: Breaking change requires updating all microservices, but security risk is critical and affects all user sessions.",
|
|
197
|
-
layer: "business",
|
|
198
|
-
tags: ["security", "authentication", "mitigation-strategy"]
|
|
199
|
-
}
|
|
25
|
+
## Decision vs Task: WHY vs WHAT
|
|
200
26
|
|
|
201
|
-
|
|
202
|
-
{
|
|
203
|
-
action: "add",
|
|
204
|
-
category: "security",
|
|
205
|
-
constraint_text: "All auth tokens must use constant-time comparison",
|
|
206
|
-
priority: "critical",
|
|
207
|
-
layer: "business"
|
|
208
|
-
}
|
|
27
|
+
**Critical**: `decision` = WHY (reasoning), `task` = WHAT (work status)
|
|
209
28
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
assigned_agent: "security-agent",
|
|
217
|
-
layer: "business"
|
|
218
|
-
}
|
|
29
|
+
| Question | Tool |
|
|
30
|
+
|----------|------|
|
|
31
|
+
| WHY did we choose this? | **decision** |
|
|
32
|
+
| WHAT needs to be done? | **task** |
|
|
33
|
+
| WHY was this bug introduced? | **decision** |
|
|
34
|
+
| WHAT is the completion status? | **task** |
|
|
219
35
|
|
|
220
|
-
|
|
221
|
-
{
|
|
222
|
-
action: "send",
|
|
223
|
-
from_agent: "security-agent",
|
|
224
|
-
to_agent: null, // Broadcast
|
|
225
|
-
msg_type: "warning",
|
|
226
|
-
message: "URGENT: Auth vulnerability found, fix in progress",
|
|
227
|
-
priority: "critical"
|
|
228
|
-
}
|
|
229
|
-
```
|
|
36
|
+
## Common Scenarios
|
|
230
37
|
|
|
231
|
-
|
|
38
|
+
**Breaking API Change:**
|
|
39
|
+
1. `decision` - Record WHY change was necessary with reasoning
|
|
40
|
+
2. `constraint` - Add requirement for version prefixes going forward
|
|
41
|
+
3. `task` - Create migration work item
|
|
42
|
+
4. `message` - Alert other agents
|
|
232
43
|
|
|
233
|
-
|
|
44
|
+
**Performance Issue:**
|
|
45
|
+
1. `decision` - Record analysis and WHY this solution
|
|
46
|
+
2. `constraint` - Add performance requirement
|
|
47
|
+
3. `task` - Create optimization work item
|
|
234
48
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
├─ Simple filters (status, layer, tags)?
|
|
241
|
-
│ └─> Use action: "list"
|
|
242
|
-
│
|
|
243
|
-
├─ Primarily by tags?
|
|
244
|
-
│ └─> Use action: "search_tags"
|
|
245
|
-
│ • match_mode: "AND" (all tags) or "OR" (any tag)
|
|
246
|
-
│
|
|
247
|
-
├─ Primarily by layer?
|
|
248
|
-
│ └─> Use action: "search_layer"
|
|
249
|
-
│
|
|
250
|
-
├─ Complex multi-filter query?
|
|
251
|
-
│ └─> Use action: "search_advanced"
|
|
252
|
-
│ • Multiple layers (OR)
|
|
253
|
-
│ • Tag combinations (AND/OR)
|
|
254
|
-
│ • Temporal filtering
|
|
255
|
-
│ • Full-text search
|
|
256
|
-
│ • Pagination
|
|
257
|
-
│
|
|
258
|
-
└─ Need version history?
|
|
259
|
-
└─> Use action: "versions"
|
|
260
|
-
```
|
|
49
|
+
**Security Vulnerability:**
|
|
50
|
+
1. `decision` - Record WHY this mitigation approach
|
|
51
|
+
2. `constraint` - Add security requirement
|
|
52
|
+
3. `task` - Create fix work item
|
|
53
|
+
4. `message` - Alert all agents
|
|
261
54
|
|
|
262
|
-
|
|
55
|
+
## Search Action Selection
|
|
263
56
|
|
|
264
|
-
| Action | Use
|
|
265
|
-
|
|
266
|
-
| **list** |
|
|
267
|
-
| **search_tags** | Tag-focused
|
|
268
|
-
| **search_layer** | Layer-focused
|
|
269
|
-
| **search_advanced** | Complex
|
|
270
|
-
| **versions** |
|
|
57
|
+
| Action | Use For |
|
|
58
|
+
|--------|---------|
|
|
59
|
+
| **list** | Simple status/layer/tag filters |
|
|
60
|
+
| **search_tags** | Tag-focused with AND/OR logic |
|
|
61
|
+
| **search_layer** | Layer-focused queries |
|
|
62
|
+
| **search_advanced** | Complex multi-filter, pagination, full-text |
|
|
63
|
+
| **versions** | Version history of specific decision |
|
|
271
64
|
|
|
272
65
|
---
|
|
273
66
|
|
|
274
67
|
## Related Documentation
|
|
275
68
|
|
|
276
|
-
-
|
|
277
|
-
-
|
|
278
|
-
-
|
|
279
|
-
-
|
|
69
|
+
- [TOOL_REFERENCE.md](TOOL_REFERENCE.md) - Parameter reference
|
|
70
|
+
- [WORKFLOWS.md](WORKFLOWS.md) - Multi-step workflows
|
|
71
|
+
- [BEST_PRACTICES.md](BEST_PRACTICES.md) - Common errors
|
|
72
|
+
- [SHARED_CONCEPTS.md](SHARED_CONCEPTS.md) - Layers, enums, concepts
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sqlew",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "MCP server for efficient context sharing between Claude Code sub-agents with Kanban Task Watcher,
|
|
3
|
+
"version": "3.6.0",
|
|
4
|
+
"description": "MCP server for efficient context sharing between Claude Code sub-agents with database-driven help system (60-70% token reduction), Kanban Task Watcher, Git-aware auto-complete, Decision Context, and streamlined documentation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -28,7 +28,15 @@
|
|
|
28
28
|
"rebuild": "npm run clean && npm run build",
|
|
29
29
|
"test": "npm run build && node --test dist/tests/tasks.dependencies.test.js",
|
|
30
30
|
"test:migrations": "npm run build && node dist/tests/migrations/test-v3.2-migration.js",
|
|
31
|
-
"prepublishOnly": "npm run rebuild"
|
|
31
|
+
"prepublishOnly": "npm run rebuild",
|
|
32
|
+
"knex": "tsx node_modules/.bin/knex --knexfile src/knexfile.ts",
|
|
33
|
+
"migrate:make": "npm run knex migrate:make",
|
|
34
|
+
"migrate:latest": "npm run knex migrate:latest",
|
|
35
|
+
"migrate:rollback": "npm run knex migrate:rollback",
|
|
36
|
+
"migrate:rollback:all": "npm run knex migrate:rollback --all",
|
|
37
|
+
"migrate:status": "npm run knex migrate:status",
|
|
38
|
+
"seed:make": "npm run knex seed:make",
|
|
39
|
+
"seed:run": "npm run knex seed:run"
|
|
32
40
|
},
|
|
33
41
|
"engines": {
|
|
34
42
|
"node": ">=18.0.0"
|
|
@@ -55,13 +63,19 @@
|
|
|
55
63
|
"author": "sin5ddd",
|
|
56
64
|
"license": "AGPL-3.0",
|
|
57
65
|
"dependencies": {
|
|
58
|
-
"better-sqlite3": "^11.0.0",
|
|
59
66
|
"@modelcontextprotocol/sdk": "latest",
|
|
60
|
-
"
|
|
67
|
+
"better-sqlite3": "^11.0.0",
|
|
68
|
+
"chokidar": "^4.0.3",
|
|
69
|
+
"ignore": "^7.0.5",
|
|
70
|
+
"knex": "^3.1.0",
|
|
71
|
+
"smol-toml": "^1.4.2",
|
|
72
|
+
"sqlite3": "^5.1.7"
|
|
61
73
|
},
|
|
62
74
|
"devDependencies": {
|
|
63
|
-
"typescript": "^5.0.0",
|
|
64
75
|
"@types/better-sqlite3": "^7.6.0",
|
|
65
|
-
"@types/
|
|
76
|
+
"@types/knex": "^0.15.2",
|
|
77
|
+
"@types/node": "^20.0.0",
|
|
78
|
+
"tsx": "^4.20.6",
|
|
79
|
+
"typescript": "^5.0.0"
|
|
66
80
|
}
|
|
67
81
|
}
|