sqlew 4.0.1 → 4.0.3

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.
Files changed (109) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/README.md +29 -113
  3. package/assets/claude-md-snippets/plan-mode-integration.md +13 -0
  4. package/assets/sample-commands/sqlew.md +144 -0
  5. package/assets/sample-skills/sqlew-plan-guidance/SKILL.md +55 -0
  6. package/dist/cli/db-dump.d.ts +4 -0
  7. package/dist/cli/db-dump.d.ts.map +1 -1
  8. package/dist/cli/db-dump.js +89 -114
  9. package/dist/cli/db-dump.js.map +1 -1
  10. package/dist/cli/db-export.d.ts +1 -0
  11. package/dist/cli/db-export.d.ts.map +1 -1
  12. package/dist/cli/db-export.js +46 -80
  13. package/dist/cli/db-export.js.map +1 -1
  14. package/dist/cli/db-import.d.ts +1 -0
  15. package/dist/cli/db-import.d.ts.map +1 -1
  16. package/dist/cli/db-import.js +52 -90
  17. package/dist/cli/db-import.js.map +1 -1
  18. package/dist/cli.d.ts +10 -1
  19. package/dist/cli.d.ts.map +1 -1
  20. package/dist/cli.js +57 -59
  21. package/dist/cli.js.map +1 -1
  22. package/dist/database/migrations/v4/20251127000002_v4_seed_help_system.d.ts.map +1 -1
  23. package/dist/database/migrations/v4/20251127000002_v4_seed_help_system.js +7 -4
  24. package/dist/database/migrations/v4/20251127000002_v4_seed_help_system.js.map +1 -1
  25. package/dist/database/operations/inserts.d.ts.map +1 -1
  26. package/dist/database/operations/inserts.js +7 -0
  27. package/dist/database/operations/inserts.js.map +1 -1
  28. package/dist/index.d.ts +4 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +70 -48
  31. package/dist/index.js.map +1 -1
  32. package/dist/init-commands.d.ts +5 -2
  33. package/dist/init-commands.d.ts.map +1 -1
  34. package/dist/init-commands.js +36 -175
  35. package/dist/init-commands.js.map +1 -1
  36. package/dist/init-skills.d.ts +19 -0
  37. package/dist/init-skills.d.ts.map +1 -0
  38. package/dist/init-skills.js +104 -0
  39. package/dist/init-skills.js.map +1 -0
  40. package/dist/server/setup.d.ts.map +1 -1
  41. package/dist/server/setup.js +9 -0
  42. package/dist/server/setup.js.map +1 -1
  43. package/dist/tests/database/testing-config.d.ts +4 -0
  44. package/dist/tests/database/testing-config.d.ts.map +1 -1
  45. package/dist/tests/database/testing-config.js +1 -1
  46. package/dist/tests/database/testing-config.js.map +1 -1
  47. package/dist/tests/docker/native/test-harness.d.ts +56 -1
  48. package/dist/tests/docker/native/test-harness.d.ts.map +1 -1
  49. package/dist/tests/docker/native/test-harness.js +221 -5
  50. package/dist/tests/docker/native/test-harness.js.map +1 -1
  51. package/dist/tests/unit/case-insensitive-validator.test.d.ts +14 -0
  52. package/dist/tests/unit/case-insensitive-validator.test.d.ts.map +1 -0
  53. package/dist/tests/unit/case-insensitive-validator.test.js +390 -0
  54. package/dist/tests/unit/case-insensitive-validator.test.js.map +1 -0
  55. package/dist/tests/unit/utils/case-insensitive-validator.test.d.ts +2 -0
  56. package/dist/tests/unit/utils/case-insensitive-validator.test.d.ts.map +1 -0
  57. package/dist/tests/unit/utils/case-insensitive-validator.test.js +97 -0
  58. package/dist/tests/unit/utils/case-insensitive-validator.test.js.map +1 -0
  59. package/dist/tools/context/actions/create-policy.d.ts.map +1 -1
  60. package/dist/tools/context/actions/create-policy.js +5 -1
  61. package/dist/tools/context/actions/create-policy.js.map +1 -1
  62. package/dist/tools/tasks/actions/get.d.ts.map +1 -1
  63. package/dist/tools/tasks/actions/get.js +1 -4
  64. package/dist/tools/tasks/actions/get.js.map +1 -1
  65. package/dist/tools/tasks/internal/task-queries.d.ts.map +1 -1
  66. package/dist/tools/tasks/internal/task-queries.js +2 -8
  67. package/dist/tools/tasks/internal/task-queries.js.map +1 -1
  68. package/dist/types.d.ts +10 -6
  69. package/dist/types.d.ts.map +1 -1
  70. package/dist/utils/case-insensitive-validator.d.ts +102 -0
  71. package/dist/utils/case-insensitive-validator.d.ts.map +1 -0
  72. package/dist/utils/case-insensitive-validator.js +144 -0
  73. package/dist/utils/case-insensitive-validator.js.map +1 -0
  74. package/dist/utils/exporter/export.d.ts +22 -7
  75. package/dist/utils/exporter/export.d.ts.map +1 -1
  76. package/dist/utils/exporter/export.js +33 -49
  77. package/dist/utils/exporter/export.js.map +1 -1
  78. package/dist/utils/importer/import.js +64 -27
  79. package/dist/utils/importer/import.js.map +1 -1
  80. package/dist/utils/importer/master-tables.d.ts +3 -1
  81. package/dist/utils/importer/master-tables.d.ts.map +1 -1
  82. package/dist/utils/importer/master-tables.js +7 -29
  83. package/dist/utils/importer/master-tables.js.map +1 -1
  84. package/dist/utils/sql-dump/core/generate-dump.d.ts.map +1 -1
  85. package/dist/utils/sql-dump/core/generate-dump.js +25 -5
  86. package/dist/utils/sql-dump/core/generate-dump.js.map +1 -1
  87. package/dist/utils/sql-dump/core/index-export.d.ts +3 -2
  88. package/dist/utils/sql-dump/core/index-export.d.ts.map +1 -1
  89. package/dist/utils/sql-dump/core/index-export.js +9 -9
  90. package/dist/utils/sql-dump/core/index-export.js.map +1 -1
  91. package/dist/utils/sql-dump/schema/indexes.d.ts +14 -0
  92. package/dist/utils/sql-dump/schema/indexes.d.ts.map +1 -1
  93. package/dist/utils/sql-dump/schema/indexes.js +81 -15
  94. package/dist/utils/sql-dump/schema/indexes.js.map +1 -1
  95. package/dist/utils/sql-dump/schema/tables.d.ts +4 -1
  96. package/dist/utils/sql-dump/schema/tables.d.ts.map +1 -1
  97. package/dist/utils/sql-dump/schema/tables.js +81 -51
  98. package/dist/utils/sql-dump/schema/tables.js.map +1 -1
  99. package/docs/SLASH_COMMANDS.md +192 -478
  100. package/docs/SPECIALIZED_AGENTS.md +81 -43
  101. package/docs/cli/DATABASE_MIGRATION.md +62 -58
  102. package/docs/cli/DATA_EXPORT_IMPORT.md +403 -103
  103. package/docs/cli/README.md +95 -45
  104. package/package.json +4 -6
  105. package/assets/sample-commands/sqw-documentor.md +0 -204
  106. package/assets/sample-commands/sqw-plan.md +0 -348
  107. package/assets/sample-commands/sqw-research.md +0 -359
  108. package/assets/sample-commands/sqw-review.md +0 -377
  109. package/assets/sample-commands/sqw-scrum.md +0 -457
@@ -1,495 +1,287 @@
1
- # Slash Commands Guide
1
+ # Unified /sqlew Command Guide
2
2
 
3
- **🎯 Recommended for Human Users**
3
+ **🎯 Recommended Interface**
4
4
 
5
- Slash commands are the PRIMARY way to interact with sqlew. They provide guided workflows that are easier than raw MCP tool calls or direct agent invocation. Commands are installed automatically to `.claude/commands/` and can be invoked with the `/` prefix in Claude Code.
5
+ The `/sqlew` command is the PRIMARY way to interact with sqlew. It provides a natural language interface with automatic intent detection that is easier than raw MCP tool calls.
6
6
 
7
- ## Why Use Slash Commands?
7
+ ## Why Use /sqlew?
8
8
 
9
- ✅ **Guided workflows** - Commands prompt you through the process
10
- ✅ **Agent coordination** - Automatically invokes the right agents
9
+ ✅ **Natural language input** - Describe what you want, it figures out the intent
10
+ ✅ **Single command** - `/sqlew` handles all operations (search, record, list, execute, plan)
11
+ ✅ **Automatic intent detection** - Recognizes search, record, update, execute, task creation
11
12
  ✅ **Error handling** - Built-in validation and helpful error messages
12
- ✅ **Mode detection** - `/sqw-scrum plan` manages tasks, `/sqw-scrum implement` builds code
13
13
  ✅ **No MCP knowledge needed** - Just describe what you want in plain English
14
14
 
15
15
  ## Quick Start
16
16
 
17
17
  ```bash
18
- # Most common commands
19
- /sqw-plan "Implement user authentication"
20
- /sqw-secretary "Use PostgreSQL 15 for production database"
21
- /sqw-scrum implement JWT authentication
22
- /sqw-research "Why did we choose Knex for migrations?"
23
-
24
- # All commands work with or without arguments (will prompt if needed)
25
- /sqw-documentor "Document API versioning strategy"
26
- /sqw-review "authentication implementation"
27
- ```
28
-
29
- ## Available Commands
30
-
31
- | Command | What It Does | Perfect For |
32
- |---------|--------------|-------------|
33
- | **`/sqw-plan`** | Complete feature planning (architecture + tasks) | Starting new features, planning sprints |
34
- | **`/sqw-secretary`** | Record decisions like meeting minutes | Documenting team decisions, capturing context |
35
- | **`/sqw-scrum`** | Create tasks AND coordinate agents to implement them | Actually building features end-to-end |
36
- | **`/sqw-documentor`** | Document architectural decisions with full context | Design reviews, architecture documentation |
37
- | **`/sqw-research`** | Search past decisions and analyze patterns | Onboarding, understanding past choices |
38
- | **`/sqw-review`** | Validate code/design against decisions & constraints | Code reviews, ensuring consistency |
39
-
40
- ---
18
+ # Show current status and suggested next actions
19
+ /sqlew
41
20
 
42
- ### /sqw-plan
43
- **Purpose**: Comprehensive planning workflow combining architectural consideration and task breakdown
21
+ # Search for decisions
22
+ /sqlew search why we chose Knex for migrations
44
23
 
45
- **Agent Flow**:
46
- 1. Invokes `@sqlew-architect` for architectural documentation
47
- 2. Invokes `@sqlew-scrum-master` for task creation and dependency management
24
+ # Record a decision
25
+ /sqlew record we use PostgreSQL 15 for production database
48
26
 
49
- **Best For**:
50
- - Planning new features
51
- - Breaking down large initiatives
52
- - Architectural decisions + task tracking
27
+ # List remaining tasks
28
+ /sqlew show remaining tasks
53
29
 
54
- **Example Usage**:
55
- ```bash
56
- /sqw-plan "Implement OAuth2 social login with Google and GitHub"
30
+ # Create tasks from a plan
31
+ /sqlew plan implementing user authentication
57
32
  ```
58
33
 
59
- **What It Does**:
60
- - Checks existing decisions for related context
61
- - Documents architectural choices
62
- - Creates actionable tasks with proper layers
63
- - Sets up task dependencies
64
- - Provides complete implementation roadmap
65
-
66
34
  ---
67
35
 
68
- ### /sqw-secretary
69
- **Purpose**: Record decisions like meeting minutes
70
-
71
- **Agent**: `@sqlew-architect` (focused mode)
72
-
73
- **Best For**:
74
- - Quick decisions without full planning
75
- - Recording choices made during development
76
- - Building institutional knowledge
77
- - Capturing team meeting decisions
78
-
79
- **Example Usage**:
80
- ```bash
81
- /sqw-secretary "Use PostgreSQL 15 for production database"
82
- ```
83
-
84
- **What It Does**:
85
- - Simplified architect workflow
86
- - Focuses on decision capture
87
- - Minimal task creation (only if needed)
88
- - Saves decision with context for future reference
89
-
90
- ---
36
+ ## Intent Detection System
91
37
 
92
- ### /sqw-scrum
93
- **Purpose**: Task management AND agent coordination for implementation
38
+ The `/sqlew` command analyzes your input and executes in this priority order:
94
39
 
95
- **Agent**: `@sqlew-scrum-master`
40
+ ### 1. List/Status Intent (Highest Priority)
96
41
 
97
- **Best For**:
98
- - Creating tasks with dependencies
99
- - Reviewing sprint progress
100
- - Managing task states (todo → in_progress → done)
101
- - **Actually implementing features** (not just planning)
42
+ **Keywords**: list, show, status, remaining, current, pending, what, overview, existing, left, 確認, 見せて, 表示, 一覧
102
43
 
103
- **Two Modes**:
44
+ **Use when you want to**:
45
+ - See all decisions
46
+ - Check remaining tasks
47
+ - Get current status
48
+ - View what exists in the database
104
49
 
105
- **Mode A: Task Planning Only**
50
+ **Examples**:
106
51
  ```bash
107
- /sqw-scrum "Create tasks for database migration feature"
52
+ /sqlew
53
+ /sqlew show remaining tasks
54
+ /sqlew what decisions do we have
55
+ /sqlew list all constraints
108
56
  ```
109
57
 
110
- **Mode B: Task Planning + Execution** (NEW)
111
- ```bash
112
- /sqw-scrum implement JWT authentication
113
- # Creates tasks, coordinates agents, writes code, updates status
114
- ```
115
-
116
- **What It Does**:
117
- - Uses `mcp__sqlew__task` (action: list) to check current work
118
- - Breaks down goals into concrete tasks
119
- - Creates tasks with proper layers and file_actions
120
- - Sets up dependencies between related tasks
121
- - **Coordinates agents to implement tasks** (Mode B)
122
- - Tracks progress and updates task status
58
+ **Actions executed**:
59
+ - Lists recent decisions
60
+ - Shows task status summary
61
+ - Provides suggestions for next steps
123
62
 
124
63
  ---
125
64
 
126
- ### /sqw-documentor
127
- **Purpose**: Document architectural decisions with rationale, alternatives, and tradeoffs
65
+ ### 2. Search Intent
128
66
 
129
- **Agent**: `@sqlew-architect`
67
+ **Keywords**: search, find, look for, about, related, explore, 検索, 探して, 調べて
130
68
 
131
- **Best For**:
132
- - Recording design decisions
133
- - Establishing constraints
134
- - Documenting rationale for future reference
135
- - Creating comprehensive architecture documentation
69
+ **Use when you want to**:
70
+ - Find related decisions
71
+ - Search for past context
72
+ - Understand why something was decided
73
+ - Explore related patterns
136
74
 
137
- **Example Usage**:
75
+ **Examples**:
138
76
  ```bash
139
- /sqw-documentor "Choose between REST and GraphQL for API design"
77
+ /sqlew search why we chose PostgreSQL
78
+ /sqlew find authentication decisions
79
+ /sqlew look for API design decisions
140
80
  ```
141
81
 
142
- **What It Does**:
143
- - Uses `mcp__sqlew__suggest` to find related decisions
144
- - Documents decision with full context (rationale, alternatives, tradeoffs)
145
- - Uses `mcp__sqlew__decision` to record permanently
146
- - Uses `mcp__sqlew__constraint` to establish rules if needed
82
+ **Actions executed**:
83
+ - Queries decision tags and keys
84
+ - Shows related context
85
+ - Displays decision rationale
147
86
 
148
87
  ---
149
88
 
150
- ### /sqw-research
151
- **Purpose**: Query historical context and analyze patterns
89
+ ### 3. Record Intent
152
90
 
153
- **Agent**: `@sqlew-researcher`
91
+ **Keywords**: record, add, save, register, decide, decided, decision, 記録, 登録, 保存
154
92
 
155
- **Best For**:
156
- - Understanding past decisions
157
- - Finding related work
158
- - Avoiding duplicate efforts
159
- - Onboarding new team members
93
+ **Use when you want to**:
94
+ - Capture a new decision
95
+ - Record meeting minutes
96
+ - Document a choice made during development
97
+ - Add a new constraint
160
98
 
161
- **Example Usage**:
99
+ **Examples**:
162
100
  ```bash
163
- /sqw-research "Why did we choose Knex for database migrations?"
101
+ /sqlew record we decided to use JWT for authentication
102
+ /sqlew add PostgreSQL 15 as our production database
103
+ /sqlew save that we use async/await pattern
164
104
  ```
165
105
 
166
- **What It Does**:
167
- - Uses `mcp__sqlew__suggest` to find related context
168
- - Uses `mcp__sqlew__decision` (search_*) to query decisions
169
- - Uses `mcp__sqlew__task` (list) to find related tasks
170
- - Analyzes patterns and presents findings
106
+ **Actions executed**:
107
+ - Checks for duplicates
108
+ - Records decision with context
109
+ - Suggests related decisions
171
110
 
172
111
  ---
173
112
 
174
- ### /sqw-review
175
- **Purpose**: Review code/design against architectural decisions and constraints
113
+ ### 4. Update Intent
176
114
 
177
- **Agent Flow**:
178
- 1. Invokes `@sqlew-researcher` to gather context
179
- 2. Invokes `@sqlew-architect` to validate against constraints
115
+ **Keywords**: update, change, modify, revise, 更新, 変更, 修正
180
116
 
181
- **Best For**:
182
- - Code review with architectural consistency
183
- - Validating implementation matches decisions
184
- - Ensuring constraints are followed
117
+ **Use when you want to**:
118
+ - Modify an existing decision
119
+ - Change a constraint
120
+ - Revise previous context
185
121
 
186
- **Example Usage**:
122
+ **Examples**:
187
123
  ```bash
188
- /sqw-review "API endpoint implementation for user service"
124
+ /sqlew update authentication to use OAuth2 instead
125
+ /sqlew modify database choice to PostgreSQL 14
126
+ /sqlew revise API response format
189
127
  ```
190
128
 
191
- **What It Does**:
192
- - Researches relevant decisions and constraints
193
- - Checks implementation consistency
194
- - Identifies deviations from architectural patterns
195
- - Suggests corrections if needed
129
+ **Actions executed**:
130
+ - Retrieves existing decision
131
+ - Updates with new information
132
+ - Shows before/after changes
196
133
 
197
134
  ---
198
135
 
199
- ## Installation
136
+ ### 5. Execute Intent
200
137
 
201
- ### Automatic Installation (Default)
138
+ **Keywords**: execute, run, do, proceed, continue, finish, 実行, 進めて, 続けて, やって
202
139
 
203
- Slash commands are **automatically installed** when the MCP server starts:
140
+ **Use when you want to**:
141
+ - Start implementing pending tasks
142
+ - Continue work from previous session
143
+ - Execute next steps
204
144
 
145
+ **Examples**:
205
146
  ```bash
206
- # Commands sync on every server startup
207
- # Based on .sqlew/config.toml [commands] section
147
+ /sqlew execute
148
+ /sqlew run pending tasks
149
+ /sqlew proceed with implementation
150
+ /sqlew continue from where we left off
208
151
  ```
209
152
 
210
- **First Startup**:
211
- ```
212
- Installed slash commands: Architect, Decide, Plan, Research, Review, Scrum
213
- Location: /path/to/project/.claude/commands
214
- Use commands with / prefix: /sqlew-plan, /sqlew-architect, /sqlew-scrum
215
- ```
216
-
217
- ### Manual Installation
218
-
219
- If you need to manually trigger installation:
220
-
221
- ```bash
222
- # Install all enabled commands
223
- npx sqlew-init-commands
224
-
225
- # Install to custom location
226
- npx sqlew-init-commands --path /custom/path
227
- ```
153
+ **Actions executed**:
154
+ - Lists pending tasks
155
+ - Coordinates implementation
156
+ - Updates task status
228
157
 
229
158
  ---
230
159
 
231
- ## Configuration
232
-
233
- Edit `.sqlew/config.toml` to customize which commands are installed:
160
+ ### 6. Task Creation Intent (Lowest Priority - Explicit Only)
234
161
 
235
- ```toml
236
- [commands]
237
- # Enable/disable individual commands (default: true)
238
-
239
- documentor = true # /sqw-documentor: Document architectural decisions
240
- secretary = true # /sqw-secretary: Record decisions (meeting minutes)
241
- plan = true # /sqw-plan: Complete planning workflow
242
- research = true # /sqw-research: Search and analyze history
243
- review = true # /sqw-review: Validate architectural consistency
244
- scrum = true # /sqw-scrum: Task management + execution
245
- ```
162
+ **Keywords**: create task, make task, breakdown, plan tasks, generate tasks, タスク作成, タスクを作って, 洗い出し
246
163
 
247
- ### Configuration Examples
164
+ **IMPORTANT**: Only triggers for EXPLICIT creation verbs. Does NOT trigger for:
165
+ - "remaining tasks" → List/Status intent instead
166
+ - "task list" → List/Status intent instead
167
+ - "show tasks" → List/Status intent instead
248
168
 
249
- **Minimal Configuration** (only essential workflows):
250
- ```toml
251
- [commands]
252
- plan = true # Keep comprehensive planning
253
- secretary = true # Keep quick decisions/meeting minutes
254
- documentor = false # Disable (can use via /sqw-plan)
255
- scrum = false # Disable (can use via /sqw-plan)
256
- research = false # Disable if not needed
257
- review = false # Disable if not needed
258
- ```
169
+ **Use when you want to**:
170
+ - Break down a feature into tasks
171
+ - Create an implementation plan
172
+ - Generate task breakdown
259
173
 
260
- **Development Team** (all workflows):
261
- ```toml
262
- [commands]
263
- documentor = true
264
- secretary = true
265
- plan = true
266
- research = true
267
- review = true
268
- scrum = true
174
+ **Examples**:
175
+ ```bash
176
+ /sqlew create tasks for user authentication feature
177
+ /sqlew breakdown OAuth2 implementation into tasks
178
+ /sqlew plan implementing password reset feature
269
179
  ```
270
180
 
271
- **Solo Developer** (focused set):
272
- ```toml
273
- [commands]
274
- plan = true # Main workflow
275
- secretary = true # Quick decisions
276
- research = true # Context lookup
277
- documentor = false # Handled by /sqw-plan
278
- scrum = false # Handled by /sqw-plan
279
- review = false # Manual reviews
280
- ```
181
+ **Actions executed**:
182
+ - Parses input into tasks
183
+ - Creates task records with dependencies
184
+ - Provides task summary
281
185
 
282
186
  ---
283
187
 
284
- ## Auto-Sync Behavior
188
+ ## Common Use Cases
285
189
 
286
- On every MCP server startup:
287
- - **Enabled commands** (true/default) → Installed if missing
288
- - **Disabled commands** (false) → Removed if present
190
+ ### Planning a Feature
289
191
 
290
- **Example Workflow**:
291
- 1. Edit `.sqlew/config.toml`: Set `research = false`
292
- 2. Restart MCP server
293
- 3. Result: `sqw-research.md` deleted from `.claude/commands/`
294
-
295
- **Reverting**:
296
- 1. Edit `.sqlew/config.toml`: Set `research = true`
297
- 2. Restart MCP server
298
- 3. Result: `sqw-research.md` restored to `.claude/commands/`
299
-
300
- ---
301
-
302
- ## Customizing Commands
303
-
304
- **Recommendation**: Use the default auto-installed commands. They are designed to work together in the standard workflow.
192
+ ```bash
193
+ # Step 1: Get current status
194
+ /sqlew
305
195
 
306
- If customization is needed:
307
- 1. Set the command to `false` in `.sqlew/config.toml` to prevent auto-sync
308
- 2. Edit `.claude/commands/sqw-*.md` directly
196
+ # Step 2: Record architectural decision
197
+ /sqlew record we will use JWT for authentication with 24h expiry
309
198
 
310
- ```toml
311
- [commands]
312
- plan = false # Now safe to edit sqw-plan.md
199
+ # Step 3: Create implementation tasks
200
+ /sqlew plan implementing JWT authentication
313
201
  ```
314
202
 
315
- ---
316
-
317
- ## Best Practices
318
-
319
- ### 1. Start with Defaults
320
-
321
- Use all commands initially to understand workflows:
322
- - `/sqw-plan` for features
323
- - `/sqw-secretary` for quick decisions
324
- - `/sqw-research` to explore history
203
+ ### Onboarding to a Project
325
204
 
326
- ### 2. Disable Unused Commands
327
-
328
- After 1-2 weeks, identify unused commands and set to `false`:
329
- - Reduces clutter in command palette
330
- - Prevents accidental invocation
331
- - Can always re-enable later
332
-
333
- ### 3. Follow the Standard Workflow
205
+ ```bash
206
+ # Get overview
207
+ /sqlew
334
208
 
335
- See [Recommended Workflow](#recommended-workflow) for the standard development cycle:
209
+ # Explore decisions
210
+ /sqlew search authentication decisions
211
+ /sqlew search database architecture
336
212
 
213
+ # Check current work
214
+ /sqlew show remaining tasks
337
215
  ```
338
- /sqw-plan → /sqw-scrum → /sqw-review
339
- ```
340
-
341
- Use `/sqw-secretary` for quick decisions during implementation.
342
216
 
343
- ### 4. Use Arguments Effectively
217
+ ### During Implementation
344
218
 
345
- **With Arguments** (faster):
346
219
  ```bash
347
- /sqw-documentor "Choose between monolith and microservices"
348
- ```
349
-
350
- **Without Arguments** (interactive):
351
- ```bash
352
- /sqw-documentor
353
- # Agent will prompt: "What architectural decision needs to be made?"
354
- ```
355
-
356
- ### 5. Version Control
220
+ # Record decisions made
221
+ /sqlew record we added Redis cache for performance
357
222
 
358
- Commands are auto-installed, so `.claude/commands/` can be added to `.gitignore`:
223
+ # Check related past decisions
224
+ /sqlew search caching decisions
359
225
 
360
- ```gitignore
361
- .claude/commands/
226
+ # Update status
227
+ /sqlew continue with next task
362
228
  ```
363
229
 
364
230
  ---
365
231
 
366
- ## Troubleshooting
367
-
368
- ### Commands not appearing in Claude Code
369
-
370
- **Symptoms**: Typing `/sqw-` shows no commands
371
-
372
- **Solutions**:
373
- 1. Restart Claude Code after installation
374
- 2. Check `.claude/commands/` directory exists:
375
- ```bash
376
- ls .claude/commands/
377
- ```
378
- 3. Verify config.toml has commands enabled:
379
- ```bash
380
- cat .sqlew/config.toml | grep -A 10 "\[commands\]"
381
- ```
382
- 4. Manually run installer:
383
- ```bash
384
- npx sqlew-init-commands
385
- ```
386
-
387
- ---
388
-
389
- ### Commands being overwritten
232
+ ## Advanced: Direct MCP Tool Access
390
233
 
391
- **Symptoms**: Customizations lost after server restart
234
+ **Note**: For most use cases, the `/sqlew` command is sufficient and preferred.
392
235
 
393
- **Cause**: Enabled commands sync from `assets/sample-commands/` on startup
236
+ Power users can still call MCP tools directly via the tool interface:
394
237
 
395
- **Solutions**:
396
-
397
- **Solution**: Disable auto-sync for that command
398
- ```toml
399
- [commands]
400
- plan = false # Prevent overwriting custom sqw-plan.md
238
+ ```
239
+ mcp__sqlew__decision action="list"
240
+ mcp__sqlew__task action="list"
241
+ mcp__sqlew__decision action="search_tags" tags=["authentication"]
401
242
  ```
402
243
 
403
- After disabling, you can freely edit `.claude/commands/sqw-plan.md` without it being overwritten.
404
-
405
- ---
406
-
407
- ### Commands not syncing
408
-
409
- **Symptoms**: Changes to config.toml don't take effect
410
-
411
- **Solutions**:
412
- 1. Check source files exist:
413
- ```bash
414
- ls node_modules/sqlew/assets/sample-commands/
415
- ```
416
- 2. Check console output for sync errors
417
- 3. Manually run installer:
418
- ```bash
419
- npx sqlew-init-commands
420
- ```
421
- 4. Check file permissions:
422
- ```bash
423
- ls -la .claude/commands/
424
- ```
244
+ See [docs/TOOL_REFERENCE.md](TOOL_REFERENCE.md) for complete MCP tool documentation.
425
245
 
426
246
  ---
427
247
 
428
- ### Wrong agent invoked
429
-
430
- **Symptoms**: `/sqw-plan` invokes wrong agent
431
-
432
- **Cause**: Command file edited with different agent reference
248
+ ## Configuration
433
249
 
434
- **Solution**: Restore default or fix agent reference:
435
- ```bash
436
- # Restore default
437
- rm .claude/commands/sqw-plan.md
438
- # Restart MCP server (auto-reinstalls)
250
+ The `/sqlew` command is configured in `.sqlew/config.toml`:
439
251
 
440
- # Or fix manually
441
- vim .claude/commands/sqw-plan.md
442
- # Ensure correct agent is referenced
252
+ ```toml
253
+ [sqlew]
254
+ # Default enabled - no configuration needed
443
255
  ```
444
256
 
445
257
  ---
446
258
 
447
- ## Comparison: Commands vs Direct Agent Invocation
259
+ ## Troubleshooting
448
260
 
449
- ### Use Slash Commands When:
450
- - You want guided workflows (commands have built-in logic)
451
- - You need multi-agent coordination (`/sqlew-plan` = architect + scrum)
452
- - You prefer quick shortcuts (less typing)
261
+ ### Command not recognized
453
262
 
454
- ### Use Direct Agent Invocation When:
455
- - You need more control over agent behavior
456
- - You want custom instructions per invocation
457
- - You're debugging agent interactions
263
+ **Symptom**: `/sqlew` appears as unrecognized command
458
264
 
459
- **Example Comparison**:
265
+ **Solution**:
266
+ 1. Restart Claude Code after installation
267
+ 2. Verify `.claude/commands/sqlew.md` exists
268
+ 3. Check MCP server is running (check console for errors)
460
269
 
461
- ```bash
462
- # Slash command (guided workflow)
463
- /sqw-plan "Implement feature X"
464
- # → Architect considers architecture
465
- # → Scrum creates tasks
466
- # → Both record in sqlew
467
-
468
- # Direct agent (custom control)
469
- @sqlew-architect "Consider feature X architecture, focus on scalability, ignore cost"
470
- # → Full control over architect instructions
471
- ```
270
+ ### Wrong intent detected
472
271
 
473
- ---
272
+ **Symptom**: Command executes wrong action
474
273
 
475
- ## Integration with Other Tools
274
+ **Solution**:
275
+ - Use more explicit keywords
276
+ - Example: Instead of `/sqlew tasks`, use `/sqlew show remaining tasks`
476
277
 
477
- ### Claude Code Features
278
+ ### Need more details
478
279
 
479
- **Slash Commands + File Context**:
480
- ```bash
481
- # Open relevant files first
482
- # Then invoke command
483
- /sqw-review "authentication implementation"
484
- # Agent sees open files in context
485
- ```
280
+ **Symptom**: Result seems incomplete
486
281
 
487
- **Slash Commands + Selection**:
488
- ```bash
489
- # Select code block
490
- # Then invoke command
491
- /sqw-documentor "Document this pattern as a constraint"
492
- ```
282
+ **Solution**:
283
+ - Try searching directly: `/sqlew search <topic>`
284
+ - Or list all: `/sqlew show what we have`
493
285
 
494
286
  ---
495
287
 
@@ -497,118 +289,45 @@ vim .claude/commands/sqw-plan.md
497
289
 
498
290
  ### Token Usage
499
291
 
500
- Each command invokes agents that consume tokens:
501
-
502
- | Command | Agent(s) | Approx Token Cost |
503
- |---------|----------|-------------------|
504
- | `/sqw-documentor` | architect | ~20KB per invocation |
505
- | `/sqw-scrum` | scrum-master | ~12KB per invocation |
506
- | `/sqw-research` | researcher | ~14KB per invocation |
507
- | `/sqw-secretary` | architect | ~20KB per invocation |
508
- | `/sqw-plan` | architect + scrum | ~32KB per invocation |
509
- | `/sqw-review` | researcher + architect | ~34KB per invocation |
510
-
511
- **Optimization**:
512
- - Use `/sqw-secretary` instead of `/sqw-plan` for simple decisions (saves ~12KB)
513
- - Use `/sqw-research` before `/sqw-documentor` to avoid duplicate context lookups
514
- - Disable unused commands to prevent accidental invocation
292
+ The `/sqlew` command is designed for token efficiency:
293
+ - **List/Status**: ~2-5KB (minimal queries)
294
+ - **Search**: ~3-8KB (depending on results)
295
+ - **Record**: ~2-6KB (single write operation)
296
+ - **Execute**: ~5-15KB (task coordination)
515
297
 
516
298
  ---
517
299
 
518
- ## Recommended Workflow
519
-
520
- ### Standard Development Cycle
521
-
522
- ```
523
- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
524
- │ /sqw-plan │ -> │ /sqw-scrum │ -> │ /sqw-review │
525
- │ (Planning) │ │(Implement) │ │(Verification)│
526
- └─────────────┘ └─────────────┘ └─────────────┘
527
- ```
528
-
529
- ### Step 1: Planning with `/sqw-plan`
300
+ ## Related Documentation
530
301
 
531
- ```bash
532
- /sqw-plan "Implement user authentication with JWT"
533
- ```
534
-
535
- **What happens:**
536
- - Architect agent analyzes requirements
537
- - Creates decisions with rationale
538
- - Scrum agent breaks down into tasks
539
- - Sets up dependencies between tasks
540
-
541
- ### Step 2: Implementation with `/sqw-scrum`
542
-
543
- ```bash
544
- /sqw-scrum implement
545
- ```
546
-
547
- **What happens:**
548
- - Lists pending tasks from planning
549
- - Coordinates implementation
550
- - Updates task status (todo → in_progress → done)
551
- - Links code changes to tasks
302
+ - [DECISION_CONTEXT.md](DECISION_CONTEXT.md) - How to structure decisions
303
+ - [TASK_OVERVIEW.md](TASK_OVERVIEW.md) - Task management overview
304
+ - [TOOL_REFERENCE.md](TOOL_REFERENCE.md) - Direct MCP tool reference
305
+ - [BEST_PRACTICES.md](BEST_PRACTICES.md) - Usage patterns and examples
552
306
 
553
- ### Step 3: Verification with `/sqw-review`
554
-
555
- ```bash
556
- /sqw-review "authentication implementation"
557
- ```
558
-
559
- **What happens:**
560
- - Researcher gathers relevant decisions/constraints
561
- - Architect validates implementation consistency
562
- - Checks against architectural patterns
563
- - Reports deviations and suggestions
307
+ ---
564
308
 
565
- ### Complete Example
309
+ ## Version History
566
310
 
567
- ```bash
568
- # 1. Plan the feature
569
- /sqw-plan "Add password reset functionality"
311
+ ### v4.1.0 (Current)
570
312
 
571
- # 2. Implement tasks created by planning
572
- /sqw-scrum implement
313
+ - **Major Change**: Unified `/sqlew` command replaces multiple slash commands
314
+ - **New**: Automatic intent detection (6 intent types)
315
+ - **New**: Natural language interface
316
+ - **Removed**: Legacy slash commands (`/sqw-plan`, `/sqw-scrum`, `/sqw-secretary`, etc.)
317
+ - **Removed**: Custom agent definitions (replaced with unified command)
573
318
 
574
- # 3. Verify implementation matches decisions
575
- /sqw-review "password reset implementation"
319
+ ### v4.0.0
576
320
 
577
- # 4. (Optional) Record any new decisions made during implementation
578
- /sqw-secretary "Use SendGrid for password reset emails"
579
- ```
321
+ - Slash commands released (`/sqw-plan`, `/sqw-secretary`, `/sqw-scrum`, etc.)
322
+ - Agent system refactored (agents completely removed from database in v4.0)
580
323
 
581
324
  ---
582
325
 
583
326
  ## See Also
584
327
 
585
- - [Specialized Agents](SPECIALIZED_AGENTS.md) - Agent-based workflows
586
- - [Task Overview](TASK_OVERVIEW.md) - Task management overview
587
- - [Decision Context](DECISION_CONTEXT.md) - Decision documentation
588
- - [Best Practices](BEST_PRACTICES.md) - General usage patterns
589
- - [Architecture](ARCHITECTURE.md) - System design overview
590
-
591
- ---
592
-
593
- ## Changelog
594
-
595
- ### v4.0.0 (Current)
596
- - Database schema refactoring: unified v4_ table prefix, agent system completely removed
597
- - Note: Agent references like `@sqlew-architect` are Claude Code agents, not database records (v4.0.0 removed v4_agents table)
598
- - All slash commands remain fully functional with simplified database structure
599
- - Improved performance with cleaner schema design
600
-
601
- ### v3.9.0
602
- - Command renaming for clarity: `/sqw-*` prefix, feature-based names
603
- - 6 commands: documentor, secretary, plan, research, review, scrum
604
- - Scrum executor feature: Mode B for task implementation
605
- - Updated documentation to position slash commands as primary interface
606
-
607
- ### v3.8.0
608
- - Initial release of slash commands system
609
- - Auto-sync on server startup
610
- - Configuration via `.sqlew/config.toml`
611
- - Manual installer: `npx sqlew-init-commands`
328
+ - [AI_AGENT_GUIDE.md](AI_AGENT_GUIDE.md) - For LLM/agent usage patterns
329
+ - [WORKFLOWS.md](WORKFLOWS.md) - Multi-step workflow examples
330
+ - [BEST_PRACTICES.md](BEST_PRACTICES.md) - General usage patterns
612
331
 
613
332
  ---
614
333
 
@@ -616,8 +335,3 @@ Each command invokes agents that consume tokens:
616
335
 
617
336
  Found a bug or have a suggestion? Please report at:
618
337
  https://github.com/sin5ddd/mcp-sqlew/issues
619
-
620
- **Common Requests**:
621
- - New command ideas
622
- - Command workflow improvements
623
- - Documentation clarifications