sqlew 4.0.5 → 4.1.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 +1805 -1782
- package/README.md +409 -468
- package/assets/claude-md-snippets/plan-mode-integration.md +17 -6
- package/assets/config.example.toml +282 -284
- package/assets/sample-agents/README.md +36 -40
- package/assets/sample-agents/sqlew-architect.md +321 -322
- package/assets/sample-agents/sqlew-researcher.md +292 -293
- package/assets/sample-agents/sqlew-scrum-master.md +286 -287
- package/assets/sample-commands/README.md +56 -57
- package/assets/sample-skills/sqlew-plan-guidance/SKILL.md +33 -26
- package/dist/cli/hooks/check-completion.d.ts +19 -0
- package/dist/cli/hooks/check-completion.d.ts.map +1 -0
- package/dist/cli/hooks/check-completion.js +104 -0
- package/dist/cli/hooks/check-completion.js.map +1 -0
- package/dist/cli/hooks/init-hooks.d.ts +35 -0
- package/dist/cli/hooks/init-hooks.d.ts.map +1 -0
- package/dist/cli/hooks/init-hooks.js +425 -0
- package/dist/cli/hooks/init-hooks.js.map +1 -0
- package/dist/cli/hooks/mark-done.d.ts +25 -0
- package/dist/cli/hooks/mark-done.d.ts.map +1 -0
- package/dist/cli/hooks/mark-done.js +128 -0
- package/dist/cli/hooks/mark-done.js.map +1 -0
- package/dist/cli/hooks/plan-id-utils.d.ts +83 -0
- package/dist/cli/hooks/plan-id-utils.d.ts.map +1 -0
- package/dist/cli/hooks/plan-id-utils.js +183 -0
- package/dist/cli/hooks/plan-id-utils.js.map +1 -0
- package/dist/cli/hooks/save.d.ts +23 -0
- package/dist/cli/hooks/save.d.ts.map +1 -0
- package/dist/cli/hooks/save.js +90 -0
- package/dist/cli/hooks/save.js.map +1 -0
- package/dist/cli/hooks/stdin-parser.d.ts +139 -0
- package/dist/cli/hooks/stdin-parser.d.ts.map +1 -0
- package/dist/cli/hooks/stdin-parser.js +127 -0
- package/dist/cli/hooks/stdin-parser.js.map +1 -0
- package/dist/cli/hooks/suggest.d.ts +19 -0
- package/dist/cli/hooks/suggest.d.ts.map +1 -0
- package/dist/cli/hooks/suggest.js +157 -0
- package/dist/cli/hooks/suggest.js.map +1 -0
- package/dist/cli/hooks/track-plan.d.ts +36 -0
- package/dist/cli/hooks/track-plan.d.ts.map +1 -0
- package/dist/cli/hooks/track-plan.js +152 -0
- package/dist/cli/hooks/track-plan.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +56 -16
- package/dist/cli.js.map +1 -1
- package/dist/config/global-config.d.ts +187 -0
- package/dist/config/global-config.d.ts.map +1 -0
- package/dist/config/global-config.js +206 -0
- package/dist/config/global-config.js.map +1 -0
- package/dist/config/loader.d.ts +42 -0
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +96 -0
- package/dist/config/loader.js.map +1 -1
- package/dist/constants.d.ts +4 -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/operations/queries.d.ts.map +1 -1
- package/dist/database/operations/queries.js +11 -2
- package/dist/database/operations/queries.js.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/init-agents.js +0 -1
- package/dist/init-agents.js.map +1 -1
- package/dist/init-skills.d.ts +4 -3
- package/dist/init-skills.d.ts.map +1 -1
- package/dist/init-skills.js +10 -3
- package/dist/init-skills.js.map +1 -1
- package/dist/server/setup.d.ts +8 -0
- package/dist/server/setup.d.ts.map +1 -1
- package/dist/server/setup.js +141 -21
- package/dist/server/setup.js.map +1 -1
- package/dist/sync-agents.d.ts.map +1 -1
- package/dist/sync-agents.js +48 -3
- package/dist/sync-agents.js.map +1 -1
- package/dist/sync-commands.d.ts.map +1 -1
- package/dist/sync-commands.js +43 -3
- package/dist/sync-commands.js.map +1 -1
- package/dist/tools/constraints/actions/get.d.ts.map +1 -1
- package/dist/tools/constraints/actions/get.js +5 -8
- package/dist/tools/constraints/actions/get.js.map +1 -1
- package/dist/tools/constraints/help/help.d.ts.map +1 -1
- package/dist/tools/constraints/help/help.js +1 -6
- package/dist/tools/constraints/help/help.js.map +1 -1
- package/dist/tools/context/actions/get.d.ts.map +1 -1
- package/dist/tools/context/actions/get.js.map +1 -1
- package/dist/tools/context/actions/search-layer.d.ts.map +1 -1
- package/dist/tools/context/actions/search-layer.js +5 -3
- package/dist/tools/context/actions/search-layer.js.map +1 -1
- package/dist/tools/context/actions/set-from-policy.d.ts +2 -1
- package/dist/tools/context/actions/set-from-policy.d.ts.map +1 -1
- package/dist/tools/context/actions/set-from-policy.js.map +1 -1
- package/dist/tools/context/help/help.d.ts.map +1 -1
- package/dist/tools/context/help/help.js +1 -7
- package/dist/tools/context/help/help.js.map +1 -1
- package/dist/tools/context/internal/queries.d.ts.map +1 -1
- package/dist/tools/context/internal/queries.js +5 -2
- package/dist/tools/context/internal/queries.js.map +1 -1
- package/dist/tools/context/types.d.ts +1 -1
- package/dist/tools/context/types.d.ts.map +1 -1
- package/dist/tools/files/actions/get.d.ts.map +1 -1
- package/dist/tools/files/actions/get.js +4 -6
- package/dist/tools/files/actions/get.js.map +1 -1
- package/dist/tools/files/help/help.d.ts.map +1 -1
- package/dist/tools/files/help/help.js +1 -6
- package/dist/tools/files/help/help.js.map +1 -1
- package/dist/tools/suggest/help/constraint-help.d.ts.map +1 -1
- package/dist/tools/suggest/help/constraint-help.js +0 -2
- package/dist/tools/suggest/help/constraint-help.js.map +1 -1
- package/dist/tools/suggest/internal/constraint-queries.d.ts.map +1 -1
- package/dist/tools/suggest/internal/constraint-queries.js +12 -5
- package/dist/tools/suggest/internal/constraint-queries.js.map +1 -1
- package/dist/tools/suggest/internal/queries.js +2 -2
- package/dist/tools/suggest/internal/queries.js.map +1 -1
- package/dist/tools/tasks/help/help.d.ts.map +1 -1
- package/dist/tools/tasks/help/help.js +0 -6
- package/dist/tools/tasks/help/help.js.map +1 -1
- package/dist/tools/tasks/help/use-case.d.ts.map +1 -1
- package/dist/tools/tasks/help/use-case.js +0 -1
- package/dist/tools/tasks/help/use-case.js.map +1 -1
- package/dist/tools/tasks/watcher/status.d.ts.map +1 -1
- package/dist/tools/tasks/watcher/status.js +5 -1
- package/dist/tools/tasks/watcher/status.js.map +1 -1
- package/dist/types/decision/params.d.ts +7 -6
- package/dist/types/decision/params.d.ts.map +1 -1
- package/dist/types/decision/templates.d.ts +3 -2
- package/dist/types/decision/templates.d.ts.map +1 -1
- package/dist/types/view-entities.d.ts +2 -1
- package/dist/types/view-entities.d.ts.map +1 -1
- package/dist/types.d.ts +19 -11
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/enum-converter.d.ts +72 -0
- package/dist/utils/enum-converter.d.ts.map +1 -0
- package/dist/utils/enum-converter.js +76 -0
- package/dist/utils/enum-converter.js.map +1 -0
- package/dist/utils/hook-queue.d.ts +81 -0
- package/dist/utils/hook-queue.d.ts.map +1 -0
- package/dist/utils/hook-queue.js +156 -0
- package/dist/utils/hook-queue.js.map +1 -0
- package/dist/utils/project-root.d.ts +9 -2
- package/dist/utils/project-root.d.ts.map +1 -1
- package/dist/utils/project-root.js +16 -2
- package/dist/utils/project-root.js.map +1 -1
- package/dist/utils/tag-parser.d.ts.map +1 -1
- package/dist/utils/tag-parser.js +6 -0
- package/dist/utils/tag-parser.js.map +1 -1
- package/dist/utils/validators.d.ts +1 -1
- package/dist/utils/validators.d.ts.map +1 -1
- package/dist/utils/validators.js +1 -1
- package/dist/utils/validators.js.map +1 -1
- package/dist/utils/vcs-adapter.d.ts +44 -0
- package/dist/utils/vcs-adapter.d.ts.map +1 -1
- package/dist/utils/vcs-adapter.js +88 -0
- package/dist/utils/vcs-adapter.js.map +1 -1
- package/dist/utils/view-queries.d.ts.map +1 -1
- package/dist/utils/view-queries.js +9 -19
- package/dist/utils/view-queries.js.map +1 -1
- package/dist/watcher/base-watcher.d.ts +69 -0
- package/dist/watcher/base-watcher.d.ts.map +1 -0
- package/dist/watcher/base-watcher.js +130 -0
- package/dist/watcher/base-watcher.js.map +1 -0
- package/dist/watcher/index.d.ts +3 -0
- package/dist/watcher/index.d.ts.map +1 -1
- package/dist/watcher/index.js +2 -0
- package/dist/watcher/index.js.map +1 -1
- package/dist/watcher/queue-watcher.d.ts +64 -0
- package/dist/watcher/queue-watcher.d.ts.map +1 -0
- package/dist/watcher/queue-watcher.js +187 -0
- package/dist/watcher/queue-watcher.js.map +1 -0
- package/docs/ADR_CONCEPTS.md +140 -0
- package/docs/CONFIGURATION.md +922 -925
- package/docs/CROSS_DATABASE.md +153 -0
- package/docs/DATABASE_AUTH.md +70 -356
- package/docs/HOOKS_GUIDE.md +159 -0
- package/docs/SLASH_COMMANDS.md +329 -337
- package/docs/TASK_SYSTEM_DEPRECATED.md +88 -0
- package/docs/changelogs/CHANGELOG_ARCHIVE_v3.4_and_older.md +293 -296
- package/docs/cli/DATA_EXPORT_IMPORT.md +699 -700
- package/docs/cli/README.md +276 -277
- package/package.json +123 -124
- package/docs/ACCEPTANCE_CRITERIA.md +0 -625
- package/docs/AI_AGENT_GUIDE.md +0 -299
- package/docs/ARCHITECTURE.md +0 -167
- package/docs/AUTO_FILE_TRACKING.md +0 -841
- package/docs/BATCH_VALIDATION.md +0 -617
- package/docs/BEST_PRACTICES.md +0 -168
- package/docs/CONSTRAINT_INTELLIGENCE.md +0 -339
- package/docs/DECISION_CONTEXT.md +0 -697
- package/docs/DECISION_INTELLIGENCE.md +0 -605
- package/docs/GIT_AWARE_AUTO_COMPLETE.md +0 -646
- package/docs/MIGRATION_GUIDE_V3.9.0.md +0 -371
- package/docs/SHARED_CONCEPTS.md +0 -225
- package/docs/SPECIALIZED_AGENTS.md +0 -126
- package/docs/TASK_ACTIONS.md +0 -1177
- package/docs/TASK_OVERVIEW.md +0 -452
- package/docs/TASK_PRUNING.md +0 -594
- package/docs/TOOL_REFERENCE.md +0 -1077
- package/docs/TOOL_SELECTION.md +0 -83
- package/docs/WORKFLOWS.md +0 -941
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
## Plan Mode Integration
|
|
2
2
|
|
|
3
|
+
### With Claude Code Hooks (Recommended)
|
|
4
|
+
|
|
5
|
+
If you've run `sqlew init --hooks`, sqlew integration is **fully automatic**:
|
|
6
|
+
- Related decisions are auto-suggested before Task execution
|
|
7
|
+
- Plan files are auto-tracked with unique IDs
|
|
8
|
+
- Decisions are auto-saved when code is edited
|
|
9
|
+
- Status updates to `in_review` when all tasks complete
|
|
10
|
+
- Status updates to `implemented` after git merge/rebase
|
|
11
|
+
|
|
12
|
+
### Manual Usage (Without Hooks)
|
|
13
|
+
|
|
3
14
|
When `<system-reminder>Plan mode is active</system-reminder>` appears:
|
|
4
15
|
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
16
|
+
**Research Phase:**
|
|
17
|
+
- `/sqlew search for <topic>` - find related decisions
|
|
18
|
+
- `/sqlew show remaining tasks` - check active tasks
|
|
8
19
|
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
20
|
+
**Final Plan Phase:**
|
|
21
|
+
- `/sqlew record <decision>` - record key architectural decisions
|
|
22
|
+
- `/sqlew create task <description>` - create implementation tasks
|
|
12
23
|
|
|
13
24
|
**Quick Reference**: `.claude/skills/sqw-plan-guidance/SKILL.md`
|
|
@@ -1,284 +1,282 @@
|
|
|
1
|
-
# sqlew Configuration File
|
|
2
|
-
# Copy this file to .sqlew/config.toml and customize as needed
|
|
3
|
-
#
|
|
4
|
-
# Priority: CLI arguments > config.toml > database m_config > defaults
|
|
5
|
-
# Documentation: docs/CONFIGURATION.md
|
|
6
|
-
|
|
7
|
-
# ============================================================================
|
|
8
|
-
# Database Settings
|
|
9
|
-
# ============================================================================
|
|
10
|
-
[database]
|
|
11
|
-
# SQLite Configuration (default, local development)
|
|
12
|
-
# Database file path (relative to project root or absolute)
|
|
13
|
-
# Default: ".sqlew/sqlew.db"
|
|
14
|
-
# path = ".sqlew/custom.db"
|
|
15
|
-
# path = "/absolute/path/to/database.db"
|
|
16
|
-
|
|
17
|
-
# PostgreSQL/MySQL/MariaDB Configuration (multi-agent production)
|
|
18
|
-
# Uncomment and configure for remote database access
|
|
19
|
-
# type = "postgres" # or "mysql" (also works with MariaDB 10.5+)
|
|
20
|
-
|
|
21
|
-
# Connection settings (required for postgres/mysql/mariadb)
|
|
22
|
-
# IMPORTANT: Database must already exist! User does NOT need CREATE DATABASE privilege.
|
|
23
|
-
# [database.connection]
|
|
24
|
-
# host = "localhost"
|
|
25
|
-
# port = 5432 # PostgreSQL: 5432, MySQL/MariaDB: 3306
|
|
26
|
-
# database = "sqlew" # Must be created beforehand!
|
|
27
|
-
|
|
28
|
-
# Authentication settings (required for postgres/mysql/mariadb)
|
|
29
|
-
# Required user privileges: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, INDEX, DROP, REFERENCES
|
|
30
|
-
# [database.auth]
|
|
31
|
-
# type = "direct" # Options: "direct", "ssh", "aws-iam", "gcp-iam"
|
|
32
|
-
# user = "postgres" # or mysql_user, etc.
|
|
33
|
-
# password = "your-password"
|
|
34
|
-
|
|
35
|
-
# SSL/TLS Configuration (optional, for encrypted connections)
|
|
36
|
-
# [database.auth.ssl]
|
|
37
|
-
# ca = "/path/to/ca-cert.pem" # or inline certificate content
|
|
38
|
-
# cert = "/path/to/client-cert.pem" # for mutual TLS
|
|
39
|
-
# key = "/path/to/client-key.pem" # for mutual TLS
|
|
40
|
-
# rejectUnauthorized = true # set to false for self-signed certs (not recommended for production)
|
|
41
|
-
|
|
42
|
-
# SSH Tunnel Configuration (when type = "ssh")
|
|
43
|
-
# Used for bastion host / jump server access
|
|
44
|
-
# [database.auth.ssh]
|
|
45
|
-
# host = "bastion.example.com"
|
|
46
|
-
# port = 22
|
|
47
|
-
# username = "deploy"
|
|
48
|
-
# privateKeyPath = "/home/user/.ssh/id_rsa" # or use password
|
|
49
|
-
# password = "ssh-password" # alternative to privateKeyPath
|
|
50
|
-
# passphrase = "key-passphrase" # if private key is encrypted
|
|
51
|
-
# timeout = 30000 # SSH connection timeout in ms
|
|
52
|
-
# keepalive = true
|
|
53
|
-
# keepaliveInterval = 10000
|
|
54
|
-
# localPort = 50000 # auto-allocated from 50000-60000 if not specified
|
|
55
|
-
|
|
56
|
-
# ============================================================================
|
|
57
|
-
# Auto-Deletion Settings
|
|
58
|
-
# ============================================================================
|
|
59
|
-
[autodelete]
|
|
60
|
-
# Skip weekends when calculating retention periods
|
|
61
|
-
# When true: 24 hours on Monday = previous Friday (skips Sat/Sun)
|
|
62
|
-
# When false: 24 hours = exactly 24 hours ago
|
|
63
|
-
# Default: false
|
|
64
|
-
ignore_weekend = false
|
|
65
|
-
|
|
66
|
-
# Message retention period in hours (1-720)
|
|
67
|
-
# Messages older than this are automatically deleted
|
|
68
|
-
# Default: 24 (1 day)
|
|
69
|
-
message_hours = 24
|
|
70
|
-
|
|
71
|
-
# File change history retention in days (1-365)
|
|
72
|
-
# File changes older than this are automatically deleted
|
|
73
|
-
# Default: 7 (1 week)
|
|
74
|
-
file_history_days = 7
|
|
75
|
-
|
|
76
|
-
# ============================================================================
|
|
77
|
-
# Debug Logging Settings (v3.5.4)
|
|
78
|
-
# ============================================================================
|
|
79
|
-
[debug]
|
|
80
|
-
# Debug log file path (optional)
|
|
81
|
-
# When set, enables detailed debug logging for troubleshooting
|
|
82
|
-
# Environment variable SQLEW_DEBUG takes precedence over this setting
|
|
83
|
-
# Default: not set (logging disabled)
|
|
84
|
-
# log_path = "/home/user/.sqlew/debug.log"
|
|
85
|
-
# log_path = ".sqlew/debug.log"
|
|
86
|
-
|
|
87
|
-
# Log level for debug output (case-insensitive)
|
|
88
|
-
# Levels: "error", "warn", "info", "debug"
|
|
89
|
-
# error: Only errors
|
|
90
|
-
# warn: Errors and warnings
|
|
91
|
-
# info: Errors, warnings, and informational messages
|
|
92
|
-
# debug: All messages including debug details
|
|
93
|
-
# Default: "info"
|
|
94
|
-
# log_level = "info"
|
|
95
|
-
|
|
96
|
-
# ============================================================================
|
|
97
|
-
# Task Management Settings
|
|
98
|
-
# ============================================================================
|
|
99
|
-
[tasks]
|
|
100
|
-
# Auto-archive done tasks after N days (1-365)
|
|
101
|
-
# Tasks in 'done' status older than this are moved to 'archived'
|
|
102
|
-
# Keeps task list clean while preserving history
|
|
103
|
-
# Default: 2 (48 hours)
|
|
104
|
-
auto_archive_done_days = 2
|
|
105
|
-
|
|
106
|
-
# Stale detection threshold for 'in_progress' tasks (hours, 1-168)
|
|
107
|
-
# Tasks stuck in 'in_progress' longer than this → move to 'waiting_review'
|
|
108
|
-
# Helps recover from interrupted AI sessions
|
|
109
|
-
# Default: 2 (2 hours)
|
|
110
|
-
stale_hours_in_progress = 2
|
|
111
|
-
|
|
112
|
-
# Stale detection threshold for 'waiting_review' tasks (hours, 1-720)
|
|
113
|
-
# Tasks stuck in 'waiting_review' longer than this → move back to 'todo'
|
|
114
|
-
# Prevents abandoned reviews from blocking workflow
|
|
115
|
-
# Default: 24 (1 day)
|
|
116
|
-
stale_hours_waiting_review = 24
|
|
117
|
-
|
|
118
|
-
# Enable automatic stale detection
|
|
119
|
-
# When true: Runs stale detection on startup and before task operations
|
|
120
|
-
# When false: Stale detection disabled (manual only)
|
|
121
|
-
# Default: true
|
|
122
|
-
auto_stale_enabled = true
|
|
123
|
-
|
|
124
|
-
# ============================================================================
|
|
125
|
-
# VCS-Aware Auto-Complete Settings (v3.5.2)
|
|
126
|
-
# ============================================================================
|
|
127
|
-
[vcs]
|
|
128
|
-
# Auto-complete tasks when files are staged (git add)
|
|
129
|
-
# When true: waiting_review → done when files are staged
|
|
130
|
-
# When false: Manual task completion required
|
|
131
|
-
# Default: true
|
|
132
|
-
git_auto_complete_on_stage = true
|
|
133
|
-
|
|
134
|
-
# Auto-archive tasks when files are committed (git commit)
|
|
135
|
-
# When true: done → archived when files are committed
|
|
136
|
-
# When false: Manual task archiving required
|
|
137
|
-
# Default: true
|
|
138
|
-
git_auto_archive_on_commit = true
|
|
139
|
-
|
|
140
|
-
# Require ALL watched files to be staged for auto-completion
|
|
141
|
-
# When true: All files must be staged to trigger waiting_review → done
|
|
142
|
-
# When false: At least one file staged is sufficient
|
|
143
|
-
# Default: true
|
|
144
|
-
require_all_files_staged = true
|
|
145
|
-
|
|
146
|
-
# Require ALL watched files to be committed for auto-archiving
|
|
147
|
-
# When true: All files must be committed to trigger done → archived
|
|
148
|
-
# When false: At least one file committed is sufficient
|
|
149
|
-
# Default: true
|
|
150
|
-
require_all_files_committed_for_archive = true
|
|
151
|
-
|
|
152
|
-
# ============================================================================
|
|
153
|
-
# Specialized Agents Settings
|
|
154
|
-
# ============================================================================
|
|
155
|
-
[agents]
|
|
156
|
-
# Which specialized agents to enable for your project
|
|
157
|
-
# Set to false to skip agents you don't need (reduces token consumption)
|
|
158
|
-
# Install by manually copying files from assets/sample-agents/ to ~/.claude/agents/
|
|
159
|
-
# Note: Agents are only loaded into Claude Code conversations, not the MCP server
|
|
160
|
-
|
|
161
|
-
# Scrum Master: Multi-agent coordination, task management, sprint planning
|
|
162
|
-
# Token cost: ~12KB per conversation when loaded in Claude Code
|
|
163
|
-
# Use when: Coordinating complex features, managing dependencies, tracking progress
|
|
164
|
-
# Default: true
|
|
165
|
-
scrum_master = true
|
|
166
|
-
|
|
167
|
-
# Researcher: Query decisions, analyze patterns, investigate context
|
|
168
|
-
# Token cost: ~14KB per conversation when loaded in Claude Code
|
|
169
|
-
# Use when: Understanding past decisions, onboarding new members, sprint retrospectives
|
|
170
|
-
# Default: true
|
|
171
|
-
researcher = true
|
|
172
|
-
|
|
173
|
-
# Architect: Document decisions, enforce constraints, maintain standards
|
|
174
|
-
# Token cost: ~20KB per conversation when loaded in Claude Code
|
|
175
|
-
# Use when: Making architectural choices, establishing rules, validating compliance
|
|
176
|
-
# Default: true
|
|
177
|
-
architect = true
|
|
178
|
-
|
|
179
|
-
# Example: Minimal installation (only Scrum Master for task management)
|
|
180
|
-
# [agents]
|
|
181
|
-
# scrum_master = true
|
|
182
|
-
# researcher = false
|
|
183
|
-
# architect = false
|
|
184
|
-
|
|
185
|
-
# Token Impact Examples:
|
|
186
|
-
# - All 3 agents: ~46KB loaded per conversation (scrum 12KB + researcher 14KB + architect 20KB)
|
|
187
|
-
# - Scrum + Architect: ~32KB (30% reduction)
|
|
188
|
-
# - Scrum only: ~12KB (74% reduction)
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
#
|
|
192
|
-
|
|
193
|
-
# ============================================================================
|
|
194
|
-
|
|
195
|
-
#
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
#
|
|
199
|
-
|
|
200
|
-
#
|
|
201
|
-
#
|
|
202
|
-
#
|
|
203
|
-
# /sqlew
|
|
204
|
-
#
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
# ============================================================================
|
|
210
|
-
|
|
211
|
-
#
|
|
212
|
-
|
|
213
|
-
#
|
|
214
|
-
# [database]
|
|
215
|
-
#
|
|
216
|
-
#
|
|
217
|
-
#
|
|
218
|
-
#
|
|
219
|
-
#
|
|
220
|
-
#
|
|
221
|
-
#
|
|
222
|
-
#
|
|
223
|
-
#
|
|
224
|
-
#
|
|
225
|
-
|
|
226
|
-
#
|
|
227
|
-
|
|
228
|
-
#
|
|
229
|
-
# [database]
|
|
230
|
-
#
|
|
231
|
-
#
|
|
232
|
-
#
|
|
233
|
-
#
|
|
234
|
-
#
|
|
235
|
-
#
|
|
236
|
-
#
|
|
237
|
-
#
|
|
238
|
-
#
|
|
239
|
-
#
|
|
240
|
-
#
|
|
241
|
-
|
|
242
|
-
#
|
|
243
|
-
|
|
244
|
-
#
|
|
245
|
-
# [database]
|
|
246
|
-
#
|
|
247
|
-
#
|
|
248
|
-
#
|
|
249
|
-
#
|
|
250
|
-
#
|
|
251
|
-
#
|
|
252
|
-
#
|
|
253
|
-
#
|
|
254
|
-
#
|
|
255
|
-
#
|
|
256
|
-
#
|
|
257
|
-
#
|
|
258
|
-
#
|
|
259
|
-
#
|
|
260
|
-
#
|
|
261
|
-
#
|
|
262
|
-
#
|
|
263
|
-
|
|
264
|
-
#
|
|
265
|
-
|
|
266
|
-
#
|
|
267
|
-
#
|
|
268
|
-
#
|
|
269
|
-
#
|
|
270
|
-
|
|
271
|
-
#
|
|
272
|
-
|
|
273
|
-
#
|
|
274
|
-
#
|
|
275
|
-
#
|
|
276
|
-
#
|
|
277
|
-
|
|
278
|
-
#
|
|
279
|
-
|
|
280
|
-
#
|
|
281
|
-
#
|
|
282
|
-
#
|
|
283
|
-
# message_hours = 48
|
|
284
|
-
# file_history_days = 14
|
|
1
|
+
# sqlew Configuration File
|
|
2
|
+
# Copy this file to .sqlew/config.toml and customize as needed
|
|
3
|
+
#
|
|
4
|
+
# Priority: CLI arguments > config.toml > database m_config > defaults
|
|
5
|
+
# Documentation: docs/CONFIGURATION.md
|
|
6
|
+
|
|
7
|
+
# ============================================================================
|
|
8
|
+
# Database Settings
|
|
9
|
+
# ============================================================================
|
|
10
|
+
[database]
|
|
11
|
+
# SQLite Configuration (default, local development)
|
|
12
|
+
# Database file path (relative to project root or absolute)
|
|
13
|
+
# Default: ".sqlew/sqlew.db"
|
|
14
|
+
# path = ".sqlew/custom.db"
|
|
15
|
+
# path = "/absolute/path/to/database.db"
|
|
16
|
+
|
|
17
|
+
# PostgreSQL/MySQL/MariaDB Configuration (multi-agent production)
|
|
18
|
+
# Uncomment and configure for remote database access
|
|
19
|
+
# type = "postgres" # or "mysql" (also works with MariaDB 10.5+)
|
|
20
|
+
|
|
21
|
+
# Connection settings (required for postgres/mysql/mariadb)
|
|
22
|
+
# IMPORTANT: Database must already exist! User does NOT need CREATE DATABASE privilege.
|
|
23
|
+
# [database.connection]
|
|
24
|
+
# host = "localhost"
|
|
25
|
+
# port = 5432 # PostgreSQL: 5432, MySQL/MariaDB: 3306
|
|
26
|
+
# database = "sqlew" # Must be created beforehand!
|
|
27
|
+
|
|
28
|
+
# Authentication settings (required for postgres/mysql/mariadb)
|
|
29
|
+
# Required user privileges: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, INDEX, DROP, REFERENCES
|
|
30
|
+
# [database.auth]
|
|
31
|
+
# type = "direct" # Options: "direct", "ssh", "aws-iam", "gcp-iam"
|
|
32
|
+
# user = "postgres" # or mysql_user, etc.
|
|
33
|
+
# password = "your-password"
|
|
34
|
+
|
|
35
|
+
# SSL/TLS Configuration (optional, for encrypted connections)
|
|
36
|
+
# [database.auth.ssl]
|
|
37
|
+
# ca = "/path/to/ca-cert.pem" # or inline certificate content
|
|
38
|
+
# cert = "/path/to/client-cert.pem" # for mutual TLS
|
|
39
|
+
# key = "/path/to/client-key.pem" # for mutual TLS
|
|
40
|
+
# rejectUnauthorized = true # set to false for self-signed certs (not recommended for production)
|
|
41
|
+
|
|
42
|
+
# SSH Tunnel Configuration (when type = "ssh")
|
|
43
|
+
# Used for bastion host / jump server access
|
|
44
|
+
# [database.auth.ssh]
|
|
45
|
+
# host = "bastion.example.com"
|
|
46
|
+
# port = 22
|
|
47
|
+
# username = "deploy"
|
|
48
|
+
# privateKeyPath = "/home/user/.ssh/id_rsa" # or use password
|
|
49
|
+
# password = "ssh-password" # alternative to privateKeyPath
|
|
50
|
+
# passphrase = "key-passphrase" # if private key is encrypted
|
|
51
|
+
# timeout = 30000 # SSH connection timeout in ms
|
|
52
|
+
# keepalive = true
|
|
53
|
+
# keepaliveInterval = 10000
|
|
54
|
+
# localPort = 50000 # auto-allocated from 50000-60000 if not specified
|
|
55
|
+
|
|
56
|
+
# ============================================================================
|
|
57
|
+
# Auto-Deletion Settings
|
|
58
|
+
# ============================================================================
|
|
59
|
+
[autodelete]
|
|
60
|
+
# Skip weekends when calculating retention periods
|
|
61
|
+
# When true: 24 hours on Monday = previous Friday (skips Sat/Sun)
|
|
62
|
+
# When false: 24 hours = exactly 24 hours ago
|
|
63
|
+
# Default: false
|
|
64
|
+
ignore_weekend = false
|
|
65
|
+
|
|
66
|
+
# Message retention period in hours (1-720)
|
|
67
|
+
# Messages older than this are automatically deleted
|
|
68
|
+
# Default: 24 (1 day)
|
|
69
|
+
message_hours = 24
|
|
70
|
+
|
|
71
|
+
# File change history retention in days (1-365)
|
|
72
|
+
# File changes older than this are automatically deleted
|
|
73
|
+
# Default: 7 (1 week)
|
|
74
|
+
file_history_days = 7
|
|
75
|
+
|
|
76
|
+
# ============================================================================
|
|
77
|
+
# Debug Logging Settings (v3.5.4)
|
|
78
|
+
# ============================================================================
|
|
79
|
+
[debug]
|
|
80
|
+
# Debug log file path (optional)
|
|
81
|
+
# When set, enables detailed debug logging for troubleshooting
|
|
82
|
+
# Environment variable SQLEW_DEBUG takes precedence over this setting
|
|
83
|
+
# Default: not set (logging disabled)
|
|
84
|
+
# log_path = "/home/user/.sqlew/debug.log"
|
|
85
|
+
# log_path = ".sqlew/debug.log"
|
|
86
|
+
|
|
87
|
+
# Log level for debug output (case-insensitive)
|
|
88
|
+
# Levels: "error", "warn", "info", "debug"
|
|
89
|
+
# error: Only errors
|
|
90
|
+
# warn: Errors and warnings
|
|
91
|
+
# info: Errors, warnings, and informational messages
|
|
92
|
+
# debug: All messages including debug details
|
|
93
|
+
# Default: "info"
|
|
94
|
+
# log_level = "info"
|
|
95
|
+
|
|
96
|
+
# ============================================================================
|
|
97
|
+
# Task Management Settings
|
|
98
|
+
# ============================================================================
|
|
99
|
+
[tasks]
|
|
100
|
+
# Auto-archive done tasks after N days (1-365)
|
|
101
|
+
# Tasks in 'done' status older than this are moved to 'archived'
|
|
102
|
+
# Keeps task list clean while preserving history
|
|
103
|
+
# Default: 2 (48 hours)
|
|
104
|
+
auto_archive_done_days = 2
|
|
105
|
+
|
|
106
|
+
# Stale detection threshold for 'in_progress' tasks (hours, 1-168)
|
|
107
|
+
# Tasks stuck in 'in_progress' longer than this → move to 'waiting_review'
|
|
108
|
+
# Helps recover from interrupted AI sessions
|
|
109
|
+
# Default: 2 (2 hours)
|
|
110
|
+
stale_hours_in_progress = 2
|
|
111
|
+
|
|
112
|
+
# Stale detection threshold for 'waiting_review' tasks (hours, 1-720)
|
|
113
|
+
# Tasks stuck in 'waiting_review' longer than this → move back to 'todo'
|
|
114
|
+
# Prevents abandoned reviews from blocking workflow
|
|
115
|
+
# Default: 24 (1 day)
|
|
116
|
+
stale_hours_waiting_review = 24
|
|
117
|
+
|
|
118
|
+
# Enable automatic stale detection
|
|
119
|
+
# When true: Runs stale detection on startup and before task operations
|
|
120
|
+
# When false: Stale detection disabled (manual only)
|
|
121
|
+
# Default: true
|
|
122
|
+
auto_stale_enabled = true
|
|
123
|
+
|
|
124
|
+
# ============================================================================
|
|
125
|
+
# VCS-Aware Auto-Complete Settings (v3.5.2)
|
|
126
|
+
# ============================================================================
|
|
127
|
+
[vcs]
|
|
128
|
+
# Auto-complete tasks when files are staged (git add)
|
|
129
|
+
# When true: waiting_review → done when files are staged
|
|
130
|
+
# When false: Manual task completion required
|
|
131
|
+
# Default: true
|
|
132
|
+
git_auto_complete_on_stage = true
|
|
133
|
+
|
|
134
|
+
# Auto-archive tasks when files are committed (git commit)
|
|
135
|
+
# When true: done → archived when files are committed
|
|
136
|
+
# When false: Manual task archiving required
|
|
137
|
+
# Default: true
|
|
138
|
+
git_auto_archive_on_commit = true
|
|
139
|
+
|
|
140
|
+
# Require ALL watched files to be staged for auto-completion
|
|
141
|
+
# When true: All files must be staged to trigger waiting_review → done
|
|
142
|
+
# When false: At least one file staged is sufficient
|
|
143
|
+
# Default: true
|
|
144
|
+
require_all_files_staged = true
|
|
145
|
+
|
|
146
|
+
# Require ALL watched files to be committed for auto-archiving
|
|
147
|
+
# When true: All files must be committed to trigger done → archived
|
|
148
|
+
# When false: At least one file committed is sufficient
|
|
149
|
+
# Default: true
|
|
150
|
+
require_all_files_committed_for_archive = true
|
|
151
|
+
|
|
152
|
+
# ============================================================================
|
|
153
|
+
# Specialized Agents Settings
|
|
154
|
+
# ============================================================================
|
|
155
|
+
[agents]
|
|
156
|
+
# Which specialized agents to enable for your project
|
|
157
|
+
# Set to false to skip agents you don't need (reduces token consumption)
|
|
158
|
+
# Install by manually copying files from assets/sample-agents/ to ~/.claude/agents/
|
|
159
|
+
# Note: Agents are only loaded into Claude Code conversations, not the MCP server
|
|
160
|
+
|
|
161
|
+
# Scrum Master: Multi-agent coordination, task management, sprint planning
|
|
162
|
+
# Token cost: ~12KB per conversation when loaded in Claude Code
|
|
163
|
+
# Use when: Coordinating complex features, managing dependencies, tracking progress
|
|
164
|
+
# Default: true
|
|
165
|
+
scrum_master = true
|
|
166
|
+
|
|
167
|
+
# Researcher: Query decisions, analyze patterns, investigate context
|
|
168
|
+
# Token cost: ~14KB per conversation when loaded in Claude Code
|
|
169
|
+
# Use when: Understanding past decisions, onboarding new members, sprint retrospectives
|
|
170
|
+
# Default: true
|
|
171
|
+
researcher = true
|
|
172
|
+
|
|
173
|
+
# Architect: Document decisions, enforce constraints, maintain standards
|
|
174
|
+
# Token cost: ~20KB per conversation when loaded in Claude Code
|
|
175
|
+
# Use when: Making architectural choices, establishing rules, validating compliance
|
|
176
|
+
# Default: true
|
|
177
|
+
architect = true
|
|
178
|
+
|
|
179
|
+
# Example: Minimal installation (only Scrum Master for task management)
|
|
180
|
+
# [agents]
|
|
181
|
+
# scrum_master = true
|
|
182
|
+
# researcher = false
|
|
183
|
+
# architect = false
|
|
184
|
+
|
|
185
|
+
# Token Impact Examples:
|
|
186
|
+
# - All 3 agents: ~46KB loaded per conversation (scrum 12KB + researcher 14KB + architect 20KB)
|
|
187
|
+
# - Scrum + Architect: ~32KB (30% reduction)
|
|
188
|
+
# - Scrum only: ~12KB (74% reduction)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
# ============================================================================
|
|
192
|
+
# Slash Commands Settings
|
|
193
|
+
# ============================================================================
|
|
194
|
+
[commands]
|
|
195
|
+
# Which slash commands to install on server startup
|
|
196
|
+
# Set to false to skip commands you don't need
|
|
197
|
+
|
|
198
|
+
# /sqlew: Unified natural language interface for decisions and tasks
|
|
199
|
+
# Usage: /sqlew <what you want to do>
|
|
200
|
+
# Examples:
|
|
201
|
+
# /sqlew show remaining tasks
|
|
202
|
+
# /sqlew search for auth decisions
|
|
203
|
+
# /sqlew record that we use PostgreSQL 15
|
|
204
|
+
# Default: true
|
|
205
|
+
sqlew = true
|
|
206
|
+
|
|
207
|
+
# ============================================================================
|
|
208
|
+
# Example Configurations
|
|
209
|
+
# ============================================================================
|
|
210
|
+
|
|
211
|
+
# Example 1: PostgreSQL with Direct Authentication + SSL
|
|
212
|
+
# [database]
|
|
213
|
+
# type = "postgres"
|
|
214
|
+
# [database.connection]
|
|
215
|
+
# host = "db.example.com"
|
|
216
|
+
# port = 5432
|
|
217
|
+
# database = "sqlew_production"
|
|
218
|
+
# [database.auth]
|
|
219
|
+
# type = "direct"
|
|
220
|
+
# user = "postgres"
|
|
221
|
+
# password = "secure-password"
|
|
222
|
+
# [database.auth.ssl]
|
|
223
|
+
# ca = "/path/to/ca-cert.pem"
|
|
224
|
+
# rejectUnauthorized = true
|
|
225
|
+
|
|
226
|
+
# Example 2: PostgreSQL through SSH Tunnel
|
|
227
|
+
# [database]
|
|
228
|
+
# type = "postgres"
|
|
229
|
+
# [database.connection]
|
|
230
|
+
# host = "db.internal.example.com"
|
|
231
|
+
# port = 5432
|
|
232
|
+
# database = "sqlew_production"
|
|
233
|
+
# [database.auth]
|
|
234
|
+
# type = "ssh"
|
|
235
|
+
# user = "postgres"
|
|
236
|
+
# password = "db-password"
|
|
237
|
+
# [database.auth.ssh]
|
|
238
|
+
# host = "bastion.example.com"
|
|
239
|
+
# username = "deploy"
|
|
240
|
+
# privateKeyPath = "/home/user/.ssh/id_rsa"
|
|
241
|
+
|
|
242
|
+
# Example 3: MySQL with SSL and SSH
|
|
243
|
+
# [database]
|
|
244
|
+
# type = "mysql"
|
|
245
|
+
# [database.connection]
|
|
246
|
+
# host = "mysql.internal.example.com"
|
|
247
|
+
# port = 3306
|
|
248
|
+
# database = "sqlew_db"
|
|
249
|
+
# [database.auth]
|
|
250
|
+
# type = "ssh"
|
|
251
|
+
# user = "mysql_user"
|
|
252
|
+
# password = "db-password"
|
|
253
|
+
# [database.auth.ssl]
|
|
254
|
+
# ca = "-----BEGIN CERTIFICATE-----\nMIIE...\n-----END CERTIFICATE-----"
|
|
255
|
+
# rejectUnauthorized = true
|
|
256
|
+
# [database.auth.ssh]
|
|
257
|
+
# host = "jump.example.com"
|
|
258
|
+
# port = 22
|
|
259
|
+
# username = "deploy"
|
|
260
|
+
# privateKeyPath = "/home/user/.ssh/deploy_key"
|
|
261
|
+
# passphrase = "key-passphrase"
|
|
262
|
+
# localPort = 53306
|
|
263
|
+
|
|
264
|
+
# Aggressive cleanup (development)
|
|
265
|
+
# [autodelete]
|
|
266
|
+
# message_hours = 1
|
|
267
|
+
# file_history_days = 1
|
|
268
|
+
# [tasks]
|
|
269
|
+
# auto_archive_done_days = 1
|
|
270
|
+
|
|
271
|
+
# Conservative cleanup (production)
|
|
272
|
+
# [autodelete]
|
|
273
|
+
# message_hours = 168 # 7 days
|
|
274
|
+
# file_history_days = 30
|
|
275
|
+
# [tasks]
|
|
276
|
+
# auto_archive_done_days = 7
|
|
277
|
+
|
|
278
|
+
# Weekend-aware workflow (for developers)
|
|
279
|
+
# [autodelete]
|
|
280
|
+
# ignore_weekend = true
|
|
281
|
+
# message_hours = 48
|
|
282
|
+
# file_history_days = 14
|