sqlew 4.0.5 → 4.1.1

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 (217) hide show
  1. package/CHANGELOG.md +1817 -1782
  2. package/README.md +409 -468
  3. package/assets/claude-md-snippets/plan-mode-integration.md +17 -6
  4. package/assets/config.example.toml +282 -284
  5. package/assets/sample-agents/README.md +36 -40
  6. package/assets/sample-agents/sqlew-architect.md +321 -322
  7. package/assets/sample-agents/sqlew-researcher.md +292 -293
  8. package/assets/sample-agents/sqlew-scrum-master.md +286 -287
  9. package/assets/sample-commands/README.md +56 -57
  10. package/assets/sample-skills/sqlew-plan-guidance/SKILL.md +33 -26
  11. package/dist/cli/hooks/check-completion.d.ts +19 -0
  12. package/dist/cli/hooks/check-completion.d.ts.map +1 -0
  13. package/dist/cli/hooks/check-completion.js +104 -0
  14. package/dist/cli/hooks/check-completion.js.map +1 -0
  15. package/dist/cli/hooks/init-hooks.d.ts +35 -0
  16. package/dist/cli/hooks/init-hooks.d.ts.map +1 -0
  17. package/dist/cli/hooks/init-hooks.js +425 -0
  18. package/dist/cli/hooks/init-hooks.js.map +1 -0
  19. package/dist/cli/hooks/mark-done.d.ts +25 -0
  20. package/dist/cli/hooks/mark-done.d.ts.map +1 -0
  21. package/dist/cli/hooks/mark-done.js +128 -0
  22. package/dist/cli/hooks/mark-done.js.map +1 -0
  23. package/dist/cli/hooks/plan-id-utils.d.ts +83 -0
  24. package/dist/cli/hooks/plan-id-utils.d.ts.map +1 -0
  25. package/dist/cli/hooks/plan-id-utils.js +183 -0
  26. package/dist/cli/hooks/plan-id-utils.js.map +1 -0
  27. package/dist/cli/hooks/save.d.ts +23 -0
  28. package/dist/cli/hooks/save.d.ts.map +1 -0
  29. package/dist/cli/hooks/save.js +90 -0
  30. package/dist/cli/hooks/save.js.map +1 -0
  31. package/dist/cli/hooks/stdin-parser.d.ts +139 -0
  32. package/dist/cli/hooks/stdin-parser.d.ts.map +1 -0
  33. package/dist/cli/hooks/stdin-parser.js +127 -0
  34. package/dist/cli/hooks/stdin-parser.js.map +1 -0
  35. package/dist/cli/hooks/suggest.d.ts +19 -0
  36. package/dist/cli/hooks/suggest.d.ts.map +1 -0
  37. package/dist/cli/hooks/suggest.js +157 -0
  38. package/dist/cli/hooks/suggest.js.map +1 -0
  39. package/dist/cli/hooks/track-plan.d.ts +36 -0
  40. package/dist/cli/hooks/track-plan.d.ts.map +1 -0
  41. package/dist/cli/hooks/track-plan.js +152 -0
  42. package/dist/cli/hooks/track-plan.js.map +1 -0
  43. package/dist/cli.d.ts.map +1 -1
  44. package/dist/cli.js +56 -16
  45. package/dist/cli.js.map +1 -1
  46. package/dist/config/global-config.d.ts +187 -0
  47. package/dist/config/global-config.d.ts.map +1 -0
  48. package/dist/config/global-config.js +206 -0
  49. package/dist/config/global-config.js.map +1 -0
  50. package/dist/config/loader.d.ts +42 -0
  51. package/dist/config/loader.d.ts.map +1 -1
  52. package/dist/config/loader.js +96 -0
  53. package/dist/config/loader.js.map +1 -1
  54. package/dist/constants.d.ts +4 -0
  55. package/dist/constants.d.ts.map +1 -1
  56. package/dist/constants.js +10 -0
  57. package/dist/constants.js.map +1 -1
  58. package/dist/database/migrations/v4/20251126000000_v4_bootstrap.js +59 -59
  59. package/dist/database/migrations/v4/20251126000000_v4_bootstrap.js.map +1 -1
  60. package/dist/database/migrations/v4/20251126000001_v4_migrate_data.js +33 -33
  61. package/dist/database/migrations/v4/20251126000001_v4_migrate_data.js.map +1 -1
  62. package/dist/database/migrations/v4/20251127000000_add_rejected_status.js +7 -7
  63. package/dist/database/migrations/v4/20251127000000_add_rejected_status.js.map +1 -1
  64. package/dist/database/migrations/v4/20251127000001_update_task_move_help.js +11 -11
  65. package/dist/database/migrations/v4/20251127000001_update_task_move_help.js.map +1 -1
  66. package/dist/database/migrations/v4/20251127000002_v4_seed_help_system.js +10 -10
  67. package/dist/database/migrations/v4/20251127000002_v4_seed_help_system.js.map +1 -1
  68. package/dist/database/migrations/v4/20251127000003_add_task_notes_column.js +7 -7
  69. package/dist/database/migrations/v4/20251127000003_add_task_notes_column.js.map +1 -1
  70. package/dist/database/migrations/v4/20251128000000_drop_all_views.js +8 -8
  71. package/dist/database/migrations/v4/20251128000000_drop_all_views.js.map +1 -1
  72. package/dist/database/operations/queries.d.ts.map +1 -1
  73. package/dist/database/operations/queries.js +11 -2
  74. package/dist/database/operations/queries.js.map +1 -1
  75. package/dist/index.js +4 -1
  76. package/dist/index.js.map +1 -1
  77. package/dist/init-agents.js +0 -1
  78. package/dist/init-agents.js.map +1 -1
  79. package/dist/init-skills.d.ts +4 -3
  80. package/dist/init-skills.d.ts.map +1 -1
  81. package/dist/init-skills.js +10 -3
  82. package/dist/init-skills.js.map +1 -1
  83. package/dist/server/setup.d.ts +8 -0
  84. package/dist/server/setup.d.ts.map +1 -1
  85. package/dist/server/setup.js +141 -21
  86. package/dist/server/setup.js.map +1 -1
  87. package/dist/sync-agents.d.ts.map +1 -1
  88. package/dist/sync-agents.js +48 -3
  89. package/dist/sync-agents.js.map +1 -1
  90. package/dist/sync-commands.d.ts.map +1 -1
  91. package/dist/sync-commands.js +43 -3
  92. package/dist/sync-commands.js.map +1 -1
  93. package/dist/tools/constraints/actions/get.d.ts.map +1 -1
  94. package/dist/tools/constraints/actions/get.js +5 -8
  95. package/dist/tools/constraints/actions/get.js.map +1 -1
  96. package/dist/tools/constraints/help/help.d.ts.map +1 -1
  97. package/dist/tools/constraints/help/help.js +1 -6
  98. package/dist/tools/constraints/help/help.js.map +1 -1
  99. package/dist/tools/context/actions/get.d.ts.map +1 -1
  100. package/dist/tools/context/actions/get.js.map +1 -1
  101. package/dist/tools/context/actions/search-layer.d.ts.map +1 -1
  102. package/dist/tools/context/actions/search-layer.js +5 -3
  103. package/dist/tools/context/actions/search-layer.js.map +1 -1
  104. package/dist/tools/context/actions/set-from-policy.d.ts +2 -1
  105. package/dist/tools/context/actions/set-from-policy.d.ts.map +1 -1
  106. package/dist/tools/context/actions/set-from-policy.js.map +1 -1
  107. package/dist/tools/context/help/help.d.ts.map +1 -1
  108. package/dist/tools/context/help/help.js +1 -7
  109. package/dist/tools/context/help/help.js.map +1 -1
  110. package/dist/tools/context/internal/queries.d.ts.map +1 -1
  111. package/dist/tools/context/internal/queries.js +5 -2
  112. package/dist/tools/context/internal/queries.js.map +1 -1
  113. package/dist/tools/context/types.d.ts +1 -1
  114. package/dist/tools/context/types.d.ts.map +1 -1
  115. package/dist/tools/files/actions/get.d.ts.map +1 -1
  116. package/dist/tools/files/actions/get.js +4 -6
  117. package/dist/tools/files/actions/get.js.map +1 -1
  118. package/dist/tools/files/help/help.d.ts.map +1 -1
  119. package/dist/tools/files/help/help.js +1 -6
  120. package/dist/tools/files/help/help.js.map +1 -1
  121. package/dist/tools/suggest/help/constraint-help.d.ts.map +1 -1
  122. package/dist/tools/suggest/help/constraint-help.js +0 -2
  123. package/dist/tools/suggest/help/constraint-help.js.map +1 -1
  124. package/dist/tools/suggest/internal/constraint-queries.d.ts.map +1 -1
  125. package/dist/tools/suggest/internal/constraint-queries.js +12 -5
  126. package/dist/tools/suggest/internal/constraint-queries.js.map +1 -1
  127. package/dist/tools/suggest/internal/queries.js +2 -2
  128. package/dist/tools/suggest/internal/queries.js.map +1 -1
  129. package/dist/tools/tasks/help/help.d.ts.map +1 -1
  130. package/dist/tools/tasks/help/help.js +0 -6
  131. package/dist/tools/tasks/help/help.js.map +1 -1
  132. package/dist/tools/tasks/help/use-case.d.ts.map +1 -1
  133. package/dist/tools/tasks/help/use-case.js +0 -1
  134. package/dist/tools/tasks/help/use-case.js.map +1 -1
  135. package/dist/tools/tasks/watcher/status.d.ts.map +1 -1
  136. package/dist/tools/tasks/watcher/status.js +5 -1
  137. package/dist/tools/tasks/watcher/status.js.map +1 -1
  138. package/dist/types/decision/params.d.ts +7 -6
  139. package/dist/types/decision/params.d.ts.map +1 -1
  140. package/dist/types/decision/templates.d.ts +3 -2
  141. package/dist/types/decision/templates.d.ts.map +1 -1
  142. package/dist/types/view-entities.d.ts +2 -1
  143. package/dist/types/view-entities.d.ts.map +1 -1
  144. package/dist/types.d.ts +19 -11
  145. package/dist/types.d.ts.map +1 -1
  146. package/dist/types.js +4 -1
  147. package/dist/types.js.map +1 -1
  148. package/dist/utils/enum-converter.d.ts +72 -0
  149. package/dist/utils/enum-converter.d.ts.map +1 -0
  150. package/dist/utils/enum-converter.js +76 -0
  151. package/dist/utils/enum-converter.js.map +1 -0
  152. package/dist/utils/hook-queue.d.ts +81 -0
  153. package/dist/utils/hook-queue.d.ts.map +1 -0
  154. package/dist/utils/hook-queue.js +156 -0
  155. package/dist/utils/hook-queue.js.map +1 -0
  156. package/dist/utils/project-root.d.ts +9 -2
  157. package/dist/utils/project-root.d.ts.map +1 -1
  158. package/dist/utils/project-root.js +16 -2
  159. package/dist/utils/project-root.js.map +1 -1
  160. package/dist/utils/tag-parser.d.ts.map +1 -1
  161. package/dist/utils/tag-parser.js +6 -0
  162. package/dist/utils/tag-parser.js.map +1 -1
  163. package/dist/utils/universal-knex.js +3 -3
  164. package/dist/utils/universal-knex.js.map +1 -1
  165. package/dist/utils/validators.d.ts +1 -1
  166. package/dist/utils/validators.d.ts.map +1 -1
  167. package/dist/utils/validators.js +1 -1
  168. package/dist/utils/validators.js.map +1 -1
  169. package/dist/utils/vcs-adapter.d.ts +44 -0
  170. package/dist/utils/vcs-adapter.d.ts.map +1 -1
  171. package/dist/utils/vcs-adapter.js +88 -0
  172. package/dist/utils/vcs-adapter.js.map +1 -1
  173. package/dist/utils/view-queries.d.ts.map +1 -1
  174. package/dist/utils/view-queries.js +9 -19
  175. package/dist/utils/view-queries.js.map +1 -1
  176. package/dist/watcher/base-watcher.d.ts +69 -0
  177. package/dist/watcher/base-watcher.d.ts.map +1 -0
  178. package/dist/watcher/base-watcher.js +130 -0
  179. package/dist/watcher/base-watcher.js.map +1 -0
  180. package/dist/watcher/index.d.ts +3 -0
  181. package/dist/watcher/index.d.ts.map +1 -1
  182. package/dist/watcher/index.js +2 -0
  183. package/dist/watcher/index.js.map +1 -1
  184. package/dist/watcher/queue-watcher.d.ts +64 -0
  185. package/dist/watcher/queue-watcher.d.ts.map +1 -0
  186. package/dist/watcher/queue-watcher.js +187 -0
  187. package/dist/watcher/queue-watcher.js.map +1 -0
  188. package/docs/ADR_CONCEPTS.md +140 -0
  189. package/docs/CONFIGURATION.md +922 -925
  190. package/docs/CROSS_DATABASE.md +153 -0
  191. package/docs/DATABASE_AUTH.md +70 -356
  192. package/docs/HOOKS_GUIDE.md +159 -0
  193. package/docs/SLASH_COMMANDS.md +329 -337
  194. package/docs/TASK_SYSTEM_DEPRECATED.md +88 -0
  195. package/docs/changelogs/CHANGELOG_ARCHIVE_v3.4_and_older.md +293 -296
  196. package/docs/cli/DATA_EXPORT_IMPORT.md +699 -700
  197. package/docs/cli/README.md +276 -277
  198. package/package.json +123 -124
  199. package/docs/ACCEPTANCE_CRITERIA.md +0 -625
  200. package/docs/AI_AGENT_GUIDE.md +0 -299
  201. package/docs/ARCHITECTURE.md +0 -167
  202. package/docs/AUTO_FILE_TRACKING.md +0 -841
  203. package/docs/BATCH_VALIDATION.md +0 -617
  204. package/docs/BEST_PRACTICES.md +0 -168
  205. package/docs/CONSTRAINT_INTELLIGENCE.md +0 -339
  206. package/docs/DECISION_CONTEXT.md +0 -697
  207. package/docs/DECISION_INTELLIGENCE.md +0 -605
  208. package/docs/GIT_AWARE_AUTO_COMPLETE.md +0 -646
  209. package/docs/MIGRATION_GUIDE_V3.9.0.md +0 -371
  210. package/docs/SHARED_CONCEPTS.md +0 -225
  211. package/docs/SPECIALIZED_AGENTS.md +0 -126
  212. package/docs/TASK_ACTIONS.md +0 -1177
  213. package/docs/TASK_OVERVIEW.md +0 -452
  214. package/docs/TASK_PRUNING.md +0 -594
  215. package/docs/TOOL_REFERENCE.md +0 -1077
  216. package/docs/TOOL_SELECTION.md +0 -83
  217. package/docs/WORKFLOWS.md +0 -941
@@ -1,337 +1,329 @@
1
- # Unified /sqlew Command Guide
2
-
3
- **🎯 Recommended Interface**
4
-
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
-
7
- ## Why Use /sqlew?
8
-
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
12
- ✅ **Error handling** - Built-in validation and helpful error messages
13
- ✅ **No MCP knowledge needed** - Just describe what you want in plain English
14
-
15
- ## Quick Start
16
-
17
- ```bash
18
- # Show current status and suggested next actions
19
- /sqlew
20
-
21
- # Search for decisions
22
- /sqlew search why we chose Knex for migrations
23
-
24
- # Record a decision
25
- /sqlew record we use PostgreSQL 15 for production database
26
-
27
- # List remaining tasks
28
- /sqlew show remaining tasks
29
-
30
- # Create tasks from a plan
31
- /sqlew plan implementing user authentication
32
- ```
33
-
34
- ---
35
-
36
- ## Intent Detection System
37
-
38
- The `/sqlew` command analyzes your input and executes in this priority order:
39
-
40
- ### 1. List/Status Intent (Highest Priority)
41
-
42
- **Keywords**: list, show, status, remaining, current, pending, what, overview, existing, left, 確認, 見せて, 表示, 一覧
43
-
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
49
-
50
- **Examples**:
51
- ```bash
52
- /sqlew
53
- /sqlew show remaining tasks
54
- /sqlew what decisions do we have
55
- /sqlew list all constraints
56
- ```
57
-
58
- **Actions executed**:
59
- - Lists recent decisions
60
- - Shows task status summary
61
- - Provides suggestions for next steps
62
-
63
- ---
64
-
65
- ### 2. Search Intent
66
-
67
- **Keywords**: search, find, look for, about, related, explore, 検索, 探して, 調べて
68
-
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
74
-
75
- **Examples**:
76
- ```bash
77
- /sqlew search why we chose PostgreSQL
78
- /sqlew find authentication decisions
79
- /sqlew look for API design decisions
80
- ```
81
-
82
- **Actions executed**:
83
- - Queries decision tags and keys
84
- - Shows related context
85
- - Displays decision rationale
86
-
87
- ---
88
-
89
- ### 3. Record Intent
90
-
91
- **Keywords**: record, add, save, register, decide, decided, decision, 記録, 登録, 保存
92
-
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
98
-
99
- **Examples**:
100
- ```bash
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
104
- ```
105
-
106
- **Actions executed**:
107
- - Checks for duplicates
108
- - Records decision with context
109
- - Suggests related decisions
110
-
111
- ---
112
-
113
- ### 4. Update Intent
114
-
115
- **Keywords**: update, change, modify, revise, 更新, 変更, 修正
116
-
117
- **Use when you want to**:
118
- - Modify an existing decision
119
- - Change a constraint
120
- - Revise previous context
121
-
122
- **Examples**:
123
- ```bash
124
- /sqlew update authentication to use OAuth2 instead
125
- /sqlew modify database choice to PostgreSQL 14
126
- /sqlew revise API response format
127
- ```
128
-
129
- **Actions executed**:
130
- - Retrieves existing decision
131
- - Updates with new information
132
- - Shows before/after changes
133
-
134
- ---
135
-
136
- ### 5. Execute Intent
137
-
138
- **Keywords**: execute, run, do, proceed, continue, finish, 実行, 進めて, 続けて, やって
139
-
140
- **Use when you want to**:
141
- - Start implementing pending tasks
142
- - Continue work from previous session
143
- - Execute next steps
144
-
145
- **Examples**:
146
- ```bash
147
- /sqlew execute
148
- /sqlew run pending tasks
149
- /sqlew proceed with implementation
150
- /sqlew continue from where we left off
151
- ```
152
-
153
- **Actions executed**:
154
- - Lists pending tasks
155
- - Coordinates implementation
156
- - Updates task status
157
-
158
- ---
159
-
160
- ### 6. Task Creation Intent (Lowest Priority - Explicit Only)
161
-
162
- **Keywords**: create task, make task, breakdown, plan tasks, generate tasks, タスク作成, タスクを作って, 洗い出し
163
-
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
168
-
169
- **Use when you want to**:
170
- - Break down a feature into tasks
171
- - Create an implementation plan
172
- - Generate task breakdown
173
-
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
179
- ```
180
-
181
- **Actions executed**:
182
- - Parses input into tasks
183
- - Creates task records with dependencies
184
- - Provides task summary
185
-
186
- ---
187
-
188
- ## Common Use Cases
189
-
190
- ### Planning a Feature
191
-
192
- ```bash
193
- # Step 1: Get current status
194
- /sqlew
195
-
196
- # Step 2: Record architectural decision
197
- /sqlew record we will use JWT for authentication with 24h expiry
198
-
199
- # Step 3: Create implementation tasks
200
- /sqlew plan implementing JWT authentication
201
- ```
202
-
203
- ### Onboarding to a Project
204
-
205
- ```bash
206
- # Get overview
207
- /sqlew
208
-
209
- # Explore decisions
210
- /sqlew search authentication decisions
211
- /sqlew search database architecture
212
-
213
- # Check current work
214
- /sqlew show remaining tasks
215
- ```
216
-
217
- ### During Implementation
218
-
219
- ```bash
220
- # Record decisions made
221
- /sqlew record we added Redis cache for performance
222
-
223
- # Check related past decisions
224
- /sqlew search caching decisions
225
-
226
- # Update status
227
- /sqlew continue with next task
228
- ```
229
-
230
- ---
231
-
232
- ## Advanced: Direct MCP Tool Access
233
-
234
- **Note**: For most use cases, the `/sqlew` command is sufficient and preferred.
235
-
236
- Power users can still call MCP tools directly via the tool interface:
237
-
238
- ```
239
- mcp__sqlew__decision action="list"
240
- mcp__sqlew__task action="list"
241
- mcp__sqlew__decision action="search_tags" tags=["authentication"]
242
- ```
243
-
244
- See [docs/TOOL_REFERENCE.md](TOOL_REFERENCE.md) for complete MCP tool documentation.
245
-
246
- ---
247
-
248
- ## Configuration
249
-
250
- The `/sqlew` command is configured in `.sqlew/config.toml`:
251
-
252
- ```toml
253
- [sqlew]
254
- # Default enabled - no configuration needed
255
- ```
256
-
257
- ---
258
-
259
- ## Troubleshooting
260
-
261
- ### Command not recognized
262
-
263
- **Symptom**: `/sqlew` appears as unrecognized command
264
-
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)
269
-
270
- ### Wrong intent detected
271
-
272
- **Symptom**: Command executes wrong action
273
-
274
- **Solution**:
275
- - Use more explicit keywords
276
- - Example: Instead of `/sqlew tasks`, use `/sqlew show remaining tasks`
277
-
278
- ### Need more details
279
-
280
- **Symptom**: Result seems incomplete
281
-
282
- **Solution**:
283
- - Try searching directly: `/sqlew search <topic>`
284
- - Or list all: `/sqlew show what we have`
285
-
286
- ---
287
-
288
- ## Performance Considerations
289
-
290
- ### Token Usage
291
-
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)
297
-
298
- ---
299
-
300
- ## Related Documentation
301
-
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
306
-
307
- ---
308
-
309
- ## Version History
310
-
311
- ### v4.1.0 (Current)
312
-
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)
318
-
319
- ### v4.0.0
320
-
321
- - Slash commands released (`/sqw-plan`, `/sqw-secretary`, `/sqw-scrum`, etc.)
322
- - Agent system refactored (agents completely removed from database in v4.0)
323
-
324
- ---
325
-
326
- ## See Also
327
-
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
331
-
332
- ---
333
-
334
- ## Contributing
335
-
336
- Found a bug or have a suggestion? Please report at:
337
- https://github.com/sin5ddd/mcp-sqlew/issues
1
+ # Unified /sqlew Command Guide
2
+
3
+ **🎯 Recommended Interface**
4
+
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
+
7
+ ## Why Use /sqlew?
8
+
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
12
+ ✅ **Error handling** - Built-in validation and helpful error messages
13
+ ✅ **No MCP knowledge needed** - Just describe what you want in plain English
14
+
15
+ ## Quick Start
16
+
17
+ ```bash
18
+ # Show current status and suggested next actions
19
+ /sqlew
20
+
21
+ # Search for decisions
22
+ /sqlew search why we chose Knex for migrations
23
+
24
+ # Record a decision
25
+ /sqlew record we use PostgreSQL 15 for production database
26
+
27
+ # List remaining tasks
28
+ /sqlew show remaining tasks
29
+
30
+ # Create tasks from a plan
31
+ /sqlew plan implementing user authentication
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Intent Detection System
37
+
38
+ The `/sqlew` command analyzes your input and executes in this priority order:
39
+
40
+ ### 1. List/Status Intent (Highest Priority)
41
+
42
+ **Keywords**: list, show, status, remaining, current, pending, what, overview, existing, left, 確認, 見せて, 表示, 一覧
43
+
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
49
+
50
+ **Examples**:
51
+ ```bash
52
+ /sqlew
53
+ /sqlew show remaining tasks
54
+ /sqlew what decisions do we have
55
+ /sqlew list all constraints
56
+ ```
57
+
58
+ **Actions executed**:
59
+ - Lists recent decisions
60
+ - Shows task status summary
61
+ - Provides suggestions for next steps
62
+
63
+ ---
64
+
65
+ ### 2. Search Intent
66
+
67
+ **Keywords**: search, find, look for, about, related, explore, 検索, 探して, 調べて
68
+
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
74
+
75
+ **Examples**:
76
+ ```bash
77
+ /sqlew search why we chose PostgreSQL
78
+ /sqlew find authentication decisions
79
+ /sqlew look for API design decisions
80
+ ```
81
+
82
+ **Actions executed**:
83
+ - Queries decision tags and keys
84
+ - Shows related context
85
+ - Displays decision rationale
86
+
87
+ ---
88
+
89
+ ### 3. Record Intent
90
+
91
+ **Keywords**: record, add, save, register, decide, decided, decision, 記録, 登録, 保存
92
+
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
98
+
99
+ **Examples**:
100
+ ```bash
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
104
+ ```
105
+
106
+ **Actions executed**:
107
+ - Checks for duplicates
108
+ - Records decision with context
109
+ - Suggests related decisions
110
+
111
+ ---
112
+
113
+ ### 4. Update Intent
114
+
115
+ **Keywords**: update, change, modify, revise, 更新, 変更, 修正
116
+
117
+ **Use when you want to**:
118
+ - Modify an existing decision
119
+ - Change a constraint
120
+ - Revise previous context
121
+
122
+ **Examples**:
123
+ ```bash
124
+ /sqlew update authentication to use OAuth2 instead
125
+ /sqlew modify database choice to PostgreSQL 14
126
+ /sqlew revise API response format
127
+ ```
128
+
129
+ **Actions executed**:
130
+ - Retrieves existing decision
131
+ - Updates with new information
132
+ - Shows before/after changes
133
+
134
+ ---
135
+
136
+ ### 5. Execute Intent
137
+
138
+ **Keywords**: execute, run, do, proceed, continue, finish, 実行, 進めて, 続けて, やって
139
+
140
+ **Use when you want to**:
141
+ - Start implementing pending tasks
142
+ - Continue work from previous session
143
+ - Execute next steps
144
+
145
+ **Examples**:
146
+ ```bash
147
+ /sqlew execute
148
+ /sqlew run pending tasks
149
+ /sqlew proceed with implementation
150
+ /sqlew continue from where we left off
151
+ ```
152
+
153
+ **Actions executed**:
154
+ - Lists pending tasks
155
+ - Coordinates implementation
156
+ - Updates task status
157
+
158
+ ---
159
+
160
+ ### 6. Task Creation Intent (Lowest Priority - Explicit Only)
161
+
162
+ **Keywords**: create task, make task, breakdown, plan tasks, generate tasks, タスク作成, タスクを作って, 洗い出し
163
+
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
168
+
169
+ **Use when you want to**:
170
+ - Break down a feature into tasks
171
+ - Create an implementation plan
172
+ - Generate task breakdown
173
+
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
179
+ ```
180
+
181
+ **Actions executed**:
182
+ - Parses input into tasks
183
+ - Creates task records with dependencies
184
+ - Provides task summary
185
+
186
+ ---
187
+
188
+ ## Common Use Cases
189
+
190
+ ### Planning a Feature
191
+
192
+ ```bash
193
+ # Step 1: Get current status
194
+ /sqlew
195
+
196
+ # Step 2: Record architectural decision
197
+ /sqlew record we will use JWT for authentication with 24h expiry
198
+
199
+ # Step 3: Create implementation tasks
200
+ /sqlew plan implementing JWT authentication
201
+ ```
202
+
203
+ ### Onboarding to a Project
204
+
205
+ ```bash
206
+ # Get overview
207
+ /sqlew
208
+
209
+ # Explore decisions
210
+ /sqlew search authentication decisions
211
+ /sqlew search database architecture
212
+
213
+ # Check current work
214
+ /sqlew show remaining tasks
215
+ ```
216
+
217
+ ### During Implementation
218
+
219
+ ```bash
220
+ # Record decisions made
221
+ /sqlew record we added Redis cache for performance
222
+
223
+ # Check related past decisions
224
+ /sqlew search caching decisions
225
+
226
+ # Update status
227
+ /sqlew continue with next task
228
+ ```
229
+
230
+ ---
231
+
232
+ ## Advanced: Direct MCP Tool Access
233
+
234
+ **Note**: For most use cases, the `/sqlew` command is sufficient and preferred.
235
+
236
+ Power users can still call MCP tools directly via the tool interface:
237
+
238
+ ```
239
+ mcp__sqlew__decision action="list"
240
+ mcp__sqlew__task action="list"
241
+ mcp__sqlew__decision action="search_tags" tags=["authentication"]
242
+ ```
243
+
244
+
245
+ ---
246
+
247
+ ## Configuration
248
+
249
+ The `/sqlew` command is configured in `.sqlew/config.toml`:
250
+
251
+ ```toml
252
+ [sqlew]
253
+ # Default enabled - no configuration needed
254
+ ```
255
+
256
+ ---
257
+
258
+ ## Troubleshooting
259
+
260
+ ### Command not recognized
261
+
262
+ **Symptom**: `/sqlew` appears as unrecognized command
263
+
264
+ **Solution**:
265
+ 1. Restart Claude Code after installation
266
+ 2. Verify `.claude/commands/sqlew.md` exists
267
+ 3. Check MCP server is running (check console for errors)
268
+
269
+ ### Wrong intent detected
270
+
271
+ **Symptom**: Command executes wrong action
272
+
273
+ **Solution**:
274
+ - Use more explicit keywords
275
+ - Example: Instead of `/sqlew tasks`, use `/sqlew show remaining tasks`
276
+
277
+ ### Need more details
278
+
279
+ **Symptom**: Result seems incomplete
280
+
281
+ **Solution**:
282
+ - Try searching directly: `/sqlew search <topic>`
283
+ - Or list all: `/sqlew show what we have`
284
+
285
+ ---
286
+
287
+ ## Performance Considerations
288
+
289
+ ### Token Usage
290
+
291
+ The `/sqlew` command is designed for token efficiency:
292
+ - **List/Status**: ~2-5KB (minimal queries)
293
+ - **Search**: ~3-8KB (depending on results)
294
+ - **Record**: ~2-6KB (single write operation)
295
+ - **Execute**: ~5-15KB (task coordination)
296
+
297
+ ---
298
+
299
+ ## Related Documentation
300
+
301
+
302
+ ---
303
+
304
+ ## Version History
305
+
306
+ ### v4.1.0 (Current)
307
+
308
+ - **Major Change**: Unified `/sqlew` command replaces multiple slash commands
309
+ - **New**: Automatic intent detection (6 intent types)
310
+ - **New**: Natural language interface
311
+ - **Removed**: Legacy slash commands (`/sqw-plan`, `/sqw-scrum`, `/sqw-secretary`, etc.)
312
+ - **Removed**: Custom agent definitions (replaced with unified command)
313
+
314
+ ### v4.0.0
315
+
316
+ - Slash commands released (`/sqw-plan`, `/sqw-secretary`, `/sqw-scrum`, etc.)
317
+ - Agent system refactored (agents completely removed from database in v4.0)
318
+
319
+ ---
320
+
321
+ ## See Also
322
+
323
+
324
+ ---
325
+
326
+ ## Contributing
327
+
328
+ Found a bug or have a suggestion? Please report at:
329
+ https://github.com/sin5ddd/mcp-sqlew/issues