sqlew 4.0.2 → 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.
- package/CHANGELOG.md +41 -0
- package/README.md +17 -105
- package/assets/claude-md-snippets/plan-mode-integration.md +13 -0
- package/assets/sample-commands/sqlew.md +144 -0
- package/assets/sample-skills/sqlew-plan-guidance/SKILL.md +55 -0
- package/dist/init-commands.d.ts +5 -2
- package/dist/init-commands.d.ts.map +1 -1
- package/dist/init-commands.js +36 -175
- package/dist/init-commands.js.map +1 -1
- package/dist/init-skills.d.ts +19 -0
- package/dist/init-skills.d.ts.map +1 -0
- package/dist/init-skills.js +104 -0
- package/dist/init-skills.js.map +1 -0
- package/dist/server/setup.d.ts.map +1 -1
- package/dist/server/setup.js +9 -0
- package/dist/server/setup.js.map +1 -1
- package/dist/tests/unit/case-insensitive-validator.test.d.ts +14 -0
- package/dist/tests/unit/case-insensitive-validator.test.d.ts.map +1 -0
- package/dist/tests/unit/case-insensitive-validator.test.js +390 -0
- package/dist/tests/unit/case-insensitive-validator.test.js.map +1 -0
- package/dist/tools/tasks/actions/get.d.ts.map +1 -1
- package/dist/tools/tasks/actions/get.js +1 -4
- package/dist/tools/tasks/actions/get.js.map +1 -1
- package/dist/tools/tasks/internal/task-queries.d.ts.map +1 -1
- package/dist/tools/tasks/internal/task-queries.js +2 -8
- package/dist/tools/tasks/internal/task-queries.js.map +1 -1
- package/docs/SLASH_COMMANDS.md +192 -478
- package/docs/SPECIALIZED_AGENTS.md +81 -43
- package/package.json +1 -1
- package/assets/sample-commands/sqw-documentor.md +0 -204
- package/assets/sample-commands/sqw-plan.md +0 -348
- package/assets/sample-commands/sqw-research.md +0 -359
- package/assets/sample-commands/sqw-review.md +0 -377
- package/assets/sample-commands/sqw-scrum.md +0 -457
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [4.0.3] - 2025-12-04
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
**Unified `/sqlew` Slash Command**
|
|
15
|
+
|
|
16
|
+
- Consolidated all slash commands (`/sqw-plan`, `/sqw-scrum`, `/sqw-research`, etc.) into single `/sqlew` command
|
|
17
|
+
- Natural language interface with automatic intent detection
|
|
18
|
+
- 6-level intent priority: List/Status → Search → Record → Update → Execute → Task Creation
|
|
19
|
+
- Supports both English and Japanese keywords
|
|
20
|
+
- Removed custom agent definitions (sqlew-architect, scrum-master, sqlew-researcher)
|
|
21
|
+
|
|
22
|
+
**Usage Examples:**
|
|
23
|
+
```bash
|
|
24
|
+
/sqlew # Show status and suggest next action
|
|
25
|
+
/sqlew show remaining tasks # List/Status intent
|
|
26
|
+
/sqlew search for auth decisions # Search intent
|
|
27
|
+
/sqlew record that we use JWT # Record intent
|
|
28
|
+
/sqlew execute pending tasks # Execute intent
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
**v4_task_details JOIN Bug**
|
|
34
|
+
|
|
35
|
+
- Fixed `task.get` action failing with "no such column: td.project_id" error
|
|
36
|
+
- Root cause: `v4_task_details` table has only `task_id` as PK, not `project_id`
|
|
37
|
+
- Removed invalid `.andOn('t.project_id', '=', 'td.project_id')` from JOIN conditions
|
|
38
|
+
- Affected files: `task-queries.ts`, `get.ts`
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
**Documentation Updates**
|
|
43
|
+
|
|
44
|
+
- Rewrote `CLAUDE.md` with unified `/sqlew` command section
|
|
45
|
+
- Updated `README.md` Quick Start to use `/sqlew`
|
|
46
|
+
- Rewrote `docs/SLASH_COMMANDS.md` as Unified /sqlew Command Guide
|
|
47
|
+
- Marked `docs/SPECIALIZED_AGENTS.md` as deprecated with migration guide
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
10
51
|
## [4.0.2] - 2025-11-28
|
|
11
52
|
|
|
12
53
|
### BREAKING CHANGES
|
package/README.md
CHANGED
|
@@ -119,27 +119,30 @@ The first time, sqlew initializes database, installs custom agents and slash com
|
|
|
119
119
|
|
|
120
120
|
It's Ready!
|
|
121
121
|
|
|
122
|
-
## 🚀 Quick Start:
|
|
122
|
+
## 🚀 Quick Start: /sqlew Command
|
|
123
123
|
|
|
124
|
-
**
|
|
124
|
+
**The `/sqlew` command is the easiest way to use sqlew!** Just type `/sqlew` in Claude Code with natural language input.
|
|
125
125
|
|
|
126
|
-
### Most Common
|
|
126
|
+
### Most Common Uses
|
|
127
127
|
|
|
128
128
|
```bash
|
|
129
|
-
#
|
|
130
|
-
/
|
|
129
|
+
# Show status and get suggestions
|
|
130
|
+
/sqlew
|
|
131
131
|
|
|
132
|
-
# Record a decision
|
|
133
|
-
/
|
|
134
|
-
|
|
135
|
-
# Implement a feature (creates tasks AND coordinates agents to build it!)
|
|
136
|
-
/sqw-scrum implement JWT authentication
|
|
132
|
+
# Record a decision
|
|
133
|
+
/sqlew record we use PostgreSQL 15 for production database
|
|
137
134
|
|
|
138
135
|
# Search past decisions
|
|
139
|
-
/
|
|
136
|
+
/sqlew search why we chose Knex for migrations
|
|
137
|
+
|
|
138
|
+
# List remaining tasks
|
|
139
|
+
/sqlew show remaining tasks
|
|
140
|
+
|
|
141
|
+
# Plan a new feature (breakdown into tasks)
|
|
142
|
+
/sqlew plan implementing user authentication
|
|
140
143
|
```
|
|
141
144
|
|
|
142
|
-
|
|
145
|
+
The `/sqlew` command automatically detects your intent (search, record, list, execute, task creation) and invokes the appropriate MCP tools.
|
|
143
146
|
|
|
144
147
|
---
|
|
145
148
|
|
|
@@ -262,100 +265,9 @@ or invoke Specialized Agent
|
|
|
262
265
|
|
|
263
266
|
Specialized Agents use sqlew more efficiently.
|
|
264
267
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
sqlew provides three specialized agents for efficient multi-agent coordination in Claude Code:
|
|
268
|
-
|
|
269
|
-
| Agent | Purpose | Token Cost | Use When |
|
|
270
|
-
|-------|---------|------------|----------|
|
|
271
|
-
| **Scrum Master** | Multi-agent coordination, task management, sprint planning | 12KB/conversation | Coordinating complex features, managing dependencies, tracking progress |
|
|
272
|
-
| **Researcher** | Query decisions, analyze patterns, investigate context | 14KB/conversation | Understanding past decisions, onboarding new members, sprint retrospectives |
|
|
273
|
-
| **Architect** | Document decisions, enforce constraints, maintain standards | 20KB/conversation | Making architectural choices, establishing rules, validating compliance |
|
|
274
|
-
|
|
275
|
-
### Detailed Installation
|
|
276
|
-
|
|
277
|
-
**By default, all three specialized agents are automatically installed** to your project's `.claude/agents/` directory on first run.
|
|
278
|
-
|
|
279
|
-
To disable specific agents, create `.sqlew/config.toml`:
|
|
280
|
-
|
|
281
|
-
```toml
|
|
282
|
-
[agents]
|
|
283
|
-
scrum_master = true # Coordination specialist (12KB)
|
|
284
|
-
researcher = false # Disable this agent
|
|
285
|
-
architect = true # Documentation specialist (20KB)
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
**Note**: Set an agent to `false` in the config file to prevent it from being installed.
|
|
289
|
-
|
|
290
|
-
**Usage**: Invoke agents with the `@` prefix: `@sqlew-scrum-master`, `@sqlew-researcher`, `@sqlew-architect`
|
|
291
|
-
|
|
292
|
-
**Recommendation**: Use all three agents together - they're complementary specialists (46KB total).
|
|
293
|
-
|
|
294
|
-
**Token Optimization** (if needed): Disable unused agents in config.
|
|
295
|
-
Savings: Scrum + Architect = 32KB (30%) | Scrum only = 12KB (74%)
|
|
296
|
-
|
|
297
|
-
**See [docs/SPECIALIZED_AGENTS.md](docs/SPECIALIZED_AGENTS.md) for complete installation guide, usage examples, and customization.**
|
|
298
|
-
|
|
299
|
-
## Slash Commands
|
|
300
|
-
|
|
301
|
-
**🎯 Recommended for Human Users** - Slash commands provide guided workflows that are easier than raw MCP tool calls.
|
|
302
|
-
|
|
303
|
-
Installed automatically to `.claude/commands/` on server startup. Just type `/sqw-` in Claude Code to get started!
|
|
304
|
-
|
|
305
|
-
### Available Commands
|
|
306
|
-
|
|
307
|
-
| Command | What It Does | Perfect For |
|
|
308
|
-
|---------|--------------|-------------|
|
|
309
|
-
| **`/sqw-plan`** | Complete feature planning (architecture + tasks) | Starting new features, planning sprints |
|
|
310
|
-
| **`/sqw-secretary`** | Record decisions like meeting minutes | Documenting team decisions, capturing context |
|
|
311
|
-
| **`/sqw-scrum`** | Create tasks AND coordinate agents to implement them | Actually building features end-to-end |
|
|
312
|
-
| **`/sqw-documentor`** | Document architectural decisions with full context | Design reviews, architecture documentation |
|
|
313
|
-
| **`/sqw-research`** | Search past decisions and analyze patterns | Onboarding, understanding past choices |
|
|
314
|
-
| **`/sqw-review`** | Validate code/design against decisions & constraints | Code reviews, ensuring consistency |
|
|
315
|
-
|
|
316
|
-
### Why Use Slash Commands?
|
|
317
|
-
|
|
318
|
-
✅ **Guided workflows** - Commands prompt you through the process
|
|
319
|
-
✅ **Agent coordination** - Automatically invokes the right agents
|
|
320
|
-
✅ **Error handling** - Built-in validation and helpful error messages
|
|
321
|
-
✅ **Mode detection** - `/sqw-scrum plan` manages tasks, `/sqw-scrum implement` builds code
|
|
322
|
-
✅ **No MCP knowledge needed** - Just describe what you want in plain English
|
|
323
|
-
|
|
324
|
-
### Quick Examples
|
|
325
|
-
|
|
326
|
-
```bash
|
|
327
|
-
# Starting a new feature
|
|
328
|
-
/sqw-plan Add OAuth2 social login with Google and GitHub
|
|
329
|
-
# → Architect documents decisions, Scrum creates tasks
|
|
330
|
-
|
|
331
|
-
# Recording a decision from today's meeting
|
|
332
|
-
/sqw-secretary Team decided to use PostgreSQL 15 for production
|
|
333
|
-
# → Saves with context, checks for duplicates
|
|
334
|
-
|
|
335
|
-
# Actually implementing a feature (game changer!)
|
|
336
|
-
/sqw-scrum implement JWT authentication
|
|
337
|
-
# → Creates tasks, coordinates agents, writes code, runs tests
|
|
338
|
-
|
|
339
|
-
# Finding out why something was done
|
|
340
|
-
/sqw-research Why did we choose Knex over Prisma?
|
|
341
|
-
# → Searches decisions, shows rationale and tradeoffs
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
### Configuration
|
|
345
|
-
|
|
346
|
-
All commands install by default. Customize in `.sqlew/config.toml`:
|
|
347
|
-
|
|
348
|
-
```toml
|
|
349
|
-
[commands]
|
|
350
|
-
plan = true # Feature planning
|
|
351
|
-
secretary = true # Record decisions
|
|
352
|
-
scrum = true # Task management + execution
|
|
353
|
-
documentor = true # Architecture docs
|
|
354
|
-
research = true # Search history
|
|
355
|
-
review = true # Code/design validation
|
|
356
|
-
```
|
|
268
|
+
---
|
|
357
269
|
|
|
358
|
-
|
|
270
|
+
**Note**: The `/sqlew` command supersedes the previous multi-command system (`/sqw-plan`, `/sqw-scrum`, etc.). All functionality is now available through the unified `/sqlew` interface with automatic intent detection.
|
|
359
271
|
|
|
360
272
|
### Advanced: Direct MCP Tool Access
|
|
361
273
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## Plan Mode Integration
|
|
2
|
+
|
|
3
|
+
When `<system-reminder>Plan mode is active</system-reminder>` appears:
|
|
4
|
+
|
|
5
|
+
### Phase 1 (Research) - Check existing context:
|
|
6
|
+
- `mcp__sqlew__suggest action="by_tags"` - find related decisions
|
|
7
|
+
- `mcp__sqlew__task action="list" status="in_progress"` - check active tasks
|
|
8
|
+
|
|
9
|
+
### Phase 4 (Final Plan) - Record outcomes:
|
|
10
|
+
- `mcp__sqlew__decision action="set"` - record key architectural decisions
|
|
11
|
+
- `mcp__sqlew__task action="create_batch"` - create implementation tasks
|
|
12
|
+
|
|
13
|
+
**Quick Reference**: `.claude/skills/sqw-plan-guidance/SKILL.md`
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: mcp__sqlew, Task, Read, Glob
|
|
3
|
+
description: sqlew context manager - natural language interface for decisions and tasks
|
|
4
|
+
argument-hint: <what you want to do in natural language>
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## sqlew Context Manager
|
|
8
|
+
|
|
9
|
+
You are an intelligent interface for the sqlew MCP server. Analyze user input and execute appropriate actions automatically.
|
|
10
|
+
|
|
11
|
+
**Input**: $ARGUMENTS
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## If No Arguments Provided
|
|
16
|
+
|
|
17
|
+
Execute status check and suggest next action:
|
|
18
|
+
|
|
19
|
+
### Step 1: Gather Current Status
|
|
20
|
+
|
|
21
|
+
1. **Check plan files**: Use Glob to find `.claude/plans/*.md`
|
|
22
|
+
2. **List decisions**: `mcp__sqlew__decision action="list" limit=5`
|
|
23
|
+
3. **List tasks**: `mcp__sqlew__task action="list"`
|
|
24
|
+
|
|
25
|
+
### Step 2: Analyze and Respond
|
|
26
|
+
|
|
27
|
+
Based on the gathered information:
|
|
28
|
+
|
|
29
|
+
| Situation | Action |
|
|
30
|
+
|-----------|--------|
|
|
31
|
+
| Plan exists & No tasks in sqlew | Ask: "Found plan. Create tasks from it?" |
|
|
32
|
+
| Pending/in_progress tasks exist | Ask: "N tasks remaining. Execute them?" → If yes, run parallel |
|
|
33
|
+
| No plan & Tasks exist | Show task status, suggest next action |
|
|
34
|
+
| Nothing exists | Show usage guide |
|
|
35
|
+
|
|
36
|
+
### Step 3: If User Approves Task Execution
|
|
37
|
+
|
|
38
|
+
1. Get pending tasks: `mcp__sqlew__task action="list" status="pending"`
|
|
39
|
+
2. For each task, launch a subagent using Task tool
|
|
40
|
+
3. After completion, update status: `mcp__sqlew__task action="move" task_id=X status="done"`
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## If Arguments Provided
|
|
45
|
+
|
|
46
|
+
Analyze the input and determine intent. **CHECK IN THIS ORDER** (priority matters):
|
|
47
|
+
|
|
48
|
+
### 1. List/Status Intent (CHECK FIRST - highest priority)
|
|
49
|
+
**Keywords**: list, show, status, what, overview, remaining, current, existing, left, pending tasks
|
|
50
|
+
|
|
51
|
+
**Japanese Keywords**: 残り, 残タスク, 書き出, 一覧, 確認, 見せて, 表示
|
|
52
|
+
|
|
53
|
+
**Note**: If input mentions "remaining tasks", "task list", "show tasks" → This is List/Status, NOT Task creation
|
|
54
|
+
|
|
55
|
+
**Action**:
|
|
56
|
+
1. `mcp__sqlew__decision action="list" limit=10`
|
|
57
|
+
2. `mcp__sqlew__task action="list"`
|
|
58
|
+
3. Format as overview
|
|
59
|
+
|
|
60
|
+
### 2. Search Intent
|
|
61
|
+
**Keywords**: search, find, look for, about, related, explore
|
|
62
|
+
|
|
63
|
+
**Japanese Keywords**: 検索, 探して, 調べて
|
|
64
|
+
|
|
65
|
+
**Action**:
|
|
66
|
+
1. Extract search term from input
|
|
67
|
+
2. `mcp__sqlew__suggest action="by_tags" tags=["term"]`
|
|
68
|
+
3. `mcp__sqlew__decision action="search_tags" tags=["term"]`
|
|
69
|
+
4. Format and display results
|
|
70
|
+
|
|
71
|
+
### 3. Record Intent
|
|
72
|
+
**Keywords**: record, add, save, register, decide, decided, decision
|
|
73
|
+
|
|
74
|
+
**Japanese Keywords**: 記録, 登録, 保存
|
|
75
|
+
|
|
76
|
+
**Action**:
|
|
77
|
+
1. Extract key, value, and rationale from input
|
|
78
|
+
2. Check for duplicates: `mcp__sqlew__suggest action="check_duplicate" key="key"`
|
|
79
|
+
3. If no duplicate: `mcp__sqlew__decision action="set" key="key" value="value" rationale="rationale"`
|
|
80
|
+
4. Confirm what was recorded
|
|
81
|
+
|
|
82
|
+
### 4. Update Intent
|
|
83
|
+
**Keywords**: update, change, modify, revise
|
|
84
|
+
|
|
85
|
+
**Japanese Keywords**: 更新, 変更, 修正
|
|
86
|
+
|
|
87
|
+
**Action**:
|
|
88
|
+
1. Extract key and new value from input
|
|
89
|
+
2. Get existing: `mcp__sqlew__decision action="get" key="key"`
|
|
90
|
+
3. Update: `mcp__sqlew__decision action="set" key="key" value="new_value"`
|
|
91
|
+
4. Show before/after
|
|
92
|
+
|
|
93
|
+
### 5. Execute Intent
|
|
94
|
+
**Keywords**: execute, run, do, proceed, continue, finish
|
|
95
|
+
|
|
96
|
+
**Japanese Keywords**: 実行, 進めて, 続けて, やって
|
|
97
|
+
|
|
98
|
+
**Action**:
|
|
99
|
+
1. Get pending tasks: `mcp__sqlew__task action="list" status="pending"`
|
|
100
|
+
2. Confirm with user before execution
|
|
101
|
+
3. Launch parallel subagents for each task using Task tool
|
|
102
|
+
4. Update completed tasks to "done"
|
|
103
|
+
|
|
104
|
+
### 6. Task Creation Intent (CHECK LAST - explicit creation only)
|
|
105
|
+
**Keywords**: create task, make task, breakdown, plan tasks, generate tasks
|
|
106
|
+
|
|
107
|
+
**Japanese Keywords**: タスク作成, タスクを作って, 洗い出し, タスク化
|
|
108
|
+
|
|
109
|
+
**IMPORTANT**: Only trigger this if there's an EXPLICIT creation verb. Do NOT trigger for:
|
|
110
|
+
- "remaining tasks" / "残タスク" → List/Status
|
|
111
|
+
- "task list" / "タスク一覧" → List/Status
|
|
112
|
+
- "show tasks" / "タスクを見せて" → List/Status
|
|
113
|
+
|
|
114
|
+
**Action**:
|
|
115
|
+
1. Read current plan file if exists
|
|
116
|
+
2. Parse plan into tasks
|
|
117
|
+
3. `mcp__sqlew__task action="create_batch" tasks=[...]`
|
|
118
|
+
4. Confirm what was created
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Parallel Task Execution
|
|
123
|
+
|
|
124
|
+
When executing remaining tasks:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
For each pending task:
|
|
128
|
+
1. Use Task tool with subagent_type="general-purpose"
|
|
129
|
+
2. Provide task description as prompt
|
|
130
|
+
3. Wait for completion
|
|
131
|
+
4. Update task status to "done"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Launch multiple Task tools in a single message for parallel execution.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Response Guidelines
|
|
139
|
+
|
|
140
|
+
- Be concise and actionable
|
|
141
|
+
- Always show what was done
|
|
142
|
+
- Suggest logical next step
|
|
143
|
+
- Use bullet points for clarity
|
|
144
|
+
- If uncertain about intent, ask for clarification
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sqlew-plan-guidance
|
|
3
|
+
description: |
|
|
4
|
+
Quick reference for sqlew MCP tools.
|
|
5
|
+
Provides usage patterns for Plan mode integration.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Quick Reference
|
|
9
|
+
|
|
10
|
+
### Research (Check Existing Context)
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
mcp__sqlew__suggest action="by_tags" tags=["tag"]
|
|
14
|
+
mcp__sqlew__decision action="search_tags" tags=["tag"]
|
|
15
|
+
mcp__sqlew__task action="list" status="in_progress"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Decision Recording
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
mcp__sqlew__decision action="set"
|
|
22
|
+
key="decision-key"
|
|
23
|
+
value="chosen approach"
|
|
24
|
+
rationale="why this decision was made"
|
|
25
|
+
alternatives_considered="what other options were evaluated"
|
|
26
|
+
tradeoffs="benefits and drawbacks"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Task Creation
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
mcp__sqlew__task action="create_batch" tasks=[
|
|
33
|
+
{ title: "Task title", layer: "business", priority: 3, file_actions: [...] }
|
|
34
|
+
]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Constraint Management
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
mcp__sqlew__constraint action="add"
|
|
41
|
+
category="architecture"
|
|
42
|
+
description="rule description"
|
|
43
|
+
priority=3
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Tool Selection Guide
|
|
47
|
+
|
|
48
|
+
| Purpose | Tool | Action |
|
|
49
|
+
|---------|------|--------|
|
|
50
|
+
| Find related decisions | suggest | by_tags, by_key |
|
|
51
|
+
| Check for duplicates | suggest | check_duplicate |
|
|
52
|
+
| Record decision | decision | set |
|
|
53
|
+
| Create tasks | task | create, create_batch |
|
|
54
|
+
| Add constraint | constraint | add |
|
|
55
|
+
| List tasks | task | list |
|
package/dist/init-commands.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* CLI tool
|
|
4
|
-
*
|
|
3
|
+
* CLI tool for sqlew slash commands
|
|
4
|
+
* @deprecated v4.1.0 - Slash commands replaced by Plan Mode Integration
|
|
5
|
+
*
|
|
6
|
+
* This command now only displays deprecation notice.
|
|
7
|
+
* sqlew tools are automatically recommended during Plan mode.
|
|
5
8
|
*/
|
|
6
9
|
export {};
|
|
7
10
|
//# sourceMappingURL=init-commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-commands.d.ts","sourceRoot":"","sources":["../src/init-commands.ts"],"names":[],"mappings":";AAEA
|
|
1
|
+
{"version":3,"file":"init-commands.d.ts","sourceRoot":"","sources":["../src/init-commands.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG"}
|
package/dist/init-commands.js
CHANGED
|
@@ -1,185 +1,46 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* CLI tool
|
|
4
|
-
*
|
|
3
|
+
* CLI tool for sqlew slash commands
|
|
4
|
+
* @deprecated v4.1.0 - Slash commands replaced by Plan Mode Integration
|
|
5
|
+
*
|
|
6
|
+
* This command now only displays deprecation notice.
|
|
7
|
+
* sqlew tools are automatically recommended during Plan mode.
|
|
5
8
|
*/
|
|
6
|
-
import * as fs from 'fs';
|
|
7
|
-
import * as path from 'path';
|
|
8
|
-
import { fileURLToPath } from 'url';
|
|
9
|
-
import { createMinimalConfigIfNotExists } from './config/minimal-generator.js';
|
|
10
|
-
import { loadConfigFile } from './config/loader.js';
|
|
11
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
-
const __dirname = path.dirname(__filename);
|
|
13
|
-
function parseArgs() {
|
|
14
|
-
const args = process.argv.slice(2);
|
|
15
|
-
const options = {};
|
|
16
|
-
for (let i = 0; i < args.length; i++) {
|
|
17
|
-
switch (args[i]) {
|
|
18
|
-
case '--path':
|
|
19
|
-
options.targetPath = args[++i];
|
|
20
|
-
break;
|
|
21
|
-
case '--project':
|
|
22
|
-
case '--local':
|
|
23
|
-
options.projectLocal = true;
|
|
24
|
-
break;
|
|
25
|
-
case '--help':
|
|
26
|
-
case '-h':
|
|
27
|
-
printHelp();
|
|
28
|
-
process.exit(0);
|
|
29
|
-
break;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return options;
|
|
33
|
-
}
|
|
34
9
|
function printHelp() {
|
|
35
|
-
console.log(`
|
|
36
|
-
mcp-sqlew init-commands - Initialize slash commands for mcp-sqlew
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
npx mcp-sqlew init-commands
|
|
49
|
-
|
|
50
|
-
# Install to custom location
|
|
51
|
-
npx mcp-sqlew init-commands --path /path/to/commands
|
|
52
|
-
|
|
53
|
-
SLASH COMMANDS:
|
|
54
|
-
- /sqw-documentor Document architectural decisions
|
|
55
|
-
- /sqw-secretary Record decisions (meeting minutes)
|
|
56
|
-
- /sqw-plan Planning workflow (architecture + tasks)
|
|
57
|
-
- /sqw-research Search decision/task history
|
|
58
|
-
- /sqw-review Validate architectural consistency
|
|
59
|
-
- /sqw-scrum Task management + agent coordination
|
|
10
|
+
console.log(`
|
|
11
|
+
mcp-sqlew init-commands - Initialize slash commands for mcp-sqlew
|
|
12
|
+
|
|
13
|
+
NOTE: As of v4.1.0, slash commands have been replaced by:
|
|
14
|
+
1. Plan Mode Integration (auto-added to CLAUDE.md on server startup)
|
|
15
|
+
2. Skills (.claude/skills/sqw-plan-guidance/)
|
|
16
|
+
|
|
17
|
+
The sqlew MCP tools are automatically recommended when Plan mode is active.
|
|
18
|
+
No manual command installation is required.
|
|
19
|
+
|
|
20
|
+
For more information, see:
|
|
21
|
+
- .claude/skills/sqw-plan-guidance/SKILL.md
|
|
22
|
+
- CLAUDE.md (Plan Mode Integration section)
|
|
60
23
|
`);
|
|
61
24
|
}
|
|
62
|
-
function getDefaultTargetPath() {
|
|
63
|
-
return path.join(process.cwd(), '.claude', 'commands');
|
|
64
|
-
}
|
|
65
|
-
function getSourcePath() {
|
|
66
|
-
const distDir = __dirname; // .../dist
|
|
67
|
-
const packageRoot = path.dirname(distDir); // .../mcp-sqlew
|
|
68
|
-
return path.join(packageRoot, 'assets', 'sample-commands');
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Ensure config.toml exists, create if missing
|
|
72
|
-
*/
|
|
73
|
-
function ensureConfigExists() {
|
|
74
|
-
const projectRoot = process.cwd();
|
|
75
|
-
const created = createMinimalConfigIfNotExists(projectRoot);
|
|
76
|
-
if (created) {
|
|
77
|
-
console.log('✓ Created: .sqlew/config.toml (minimal defaults)');
|
|
78
|
-
console.log(' Edit [commands] section to customize command selection\n');
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Get list of command files to install based on config
|
|
83
|
-
*/
|
|
84
|
-
function getCommandsToInstall() {
|
|
85
|
-
const config = loadConfigFile();
|
|
86
|
-
const commandConfig = config.commands || {};
|
|
87
|
-
const files = [];
|
|
88
|
-
const installed = [];
|
|
89
|
-
if (commandConfig.documentor !== false) {
|
|
90
|
-
files.push('sqw-documentor.md');
|
|
91
|
-
installed.push('Documentor');
|
|
92
|
-
}
|
|
93
|
-
if (commandConfig.secretary !== false) {
|
|
94
|
-
files.push('sqw-secretary.md');
|
|
95
|
-
installed.push('Secretary');
|
|
96
|
-
}
|
|
97
|
-
if (commandConfig.plan !== false) {
|
|
98
|
-
files.push('sqw-plan.md');
|
|
99
|
-
installed.push('Plan');
|
|
100
|
-
}
|
|
101
|
-
if (commandConfig.research !== false) {
|
|
102
|
-
files.push('sqw-research.md');
|
|
103
|
-
installed.push('Research');
|
|
104
|
-
}
|
|
105
|
-
if (commandConfig.review !== false) {
|
|
106
|
-
files.push('sqw-review.md');
|
|
107
|
-
installed.push('Review');
|
|
108
|
-
}
|
|
109
|
-
if (commandConfig.scrum !== false) {
|
|
110
|
-
files.push('sqw-scrum.md');
|
|
111
|
-
installed.push('Scrum');
|
|
112
|
-
}
|
|
113
|
-
const summary = installed.length > 0 ? installed.join(', ') : 'None';
|
|
114
|
-
return { files, summary };
|
|
115
|
-
}
|
|
116
|
-
function copyCommandFiles(sourcePath, targetPath, filesToCopy) {
|
|
117
|
-
if (!fs.existsSync(targetPath)) {
|
|
118
|
-
fs.mkdirSync(targetPath, { recursive: true });
|
|
119
|
-
console.log(`✓ Created directory: ${targetPath}`);
|
|
120
|
-
}
|
|
121
|
-
const copiedFiles = [];
|
|
122
|
-
for (const file of filesToCopy) {
|
|
123
|
-
const sourceFile = path.join(sourcePath, file);
|
|
124
|
-
const targetFile = path.join(targetPath, file);
|
|
125
|
-
if (!fs.existsSync(sourceFile)) {
|
|
126
|
-
console.warn(`⚠ Skipping missing file: ${file}`);
|
|
127
|
-
continue;
|
|
128
|
-
}
|
|
129
|
-
fs.copyFileSync(sourceFile, targetFile);
|
|
130
|
-
copiedFiles.push(file);
|
|
131
|
-
}
|
|
132
|
-
console.log(`\n✓ Copied ${copiedFiles.length} files to: ${targetPath}\n`);
|
|
133
|
-
console.log('Files installed:');
|
|
134
|
-
copiedFiles.forEach(file => {
|
|
135
|
-
console.log(` • ${file}`);
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
25
|
function main() {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
: getDefaultTargetPath();
|
|
157
|
-
const sourcePath = getSourcePath();
|
|
158
|
-
if (!fs.existsSync(sourcePath)) {
|
|
159
|
-
throw new Error(`Source directory not found: ${sourcePath}`);
|
|
160
|
-
}
|
|
161
|
-
console.log(`Source: ${sourcePath}`);
|
|
162
|
-
console.log(`Target: ${targetPath}\n`);
|
|
163
|
-
copyCommandFiles(sourcePath, targetPath, files);
|
|
164
|
-
console.log(`\n✓ Installation complete!\n`);
|
|
165
|
-
console.log('NEXT STEPS:');
|
|
166
|
-
console.log(' 1. Use slash commands with / prefix:');
|
|
167
|
-
if (files.includes('sqw-plan.md')) {
|
|
168
|
-
console.log(' /sqw-plan "Implement feature X"');
|
|
169
|
-
}
|
|
170
|
-
if (files.includes('sqw-documentor.md')) {
|
|
171
|
-
console.log(' /sqw-documentor "Document API design"');
|
|
172
|
-
}
|
|
173
|
-
if (files.includes('sqw-scrum.md')) {
|
|
174
|
-
console.log(' /sqw-scrum "Review sprint tasks"');
|
|
175
|
-
}
|
|
176
|
-
console.log('\n 2. Customize command selection:');
|
|
177
|
-
console.log(' Edit .sqlew/config.toml → [commands] section\n');
|
|
178
|
-
}
|
|
179
|
-
catch (error) {
|
|
180
|
-
console.error(`\n❌ Error: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
181
|
-
process.exit(1);
|
|
182
|
-
}
|
|
26
|
+
const args = process.argv.slice(2);
|
|
27
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
28
|
+
printHelp();
|
|
29
|
+
process.exit(0);
|
|
30
|
+
}
|
|
31
|
+
console.log('mcp-sqlew init-commands\n');
|
|
32
|
+
console.log('⚠ DEPRECATED: Slash commands have been replaced in v4.1.0\n');
|
|
33
|
+
console.log('The sqlew MCP tools are now automatically recommended when Plan mode is active.');
|
|
34
|
+
console.log('No manual command installation is required.\n');
|
|
35
|
+
console.log('NEW APPROACH:');
|
|
36
|
+
console.log(' 1. Plan Mode Integration');
|
|
37
|
+
console.log(' - Automatically added to CLAUDE.md on server startup');
|
|
38
|
+
console.log(' - sqlew tools are recommended during plan mode phases\n');
|
|
39
|
+
console.log(' 2. Skills Reference');
|
|
40
|
+
console.log(' - .claude/skills/sqw-plan-guidance/SKILL.md');
|
|
41
|
+
console.log(' - Auto-installed on first server startup\n');
|
|
42
|
+
console.log('For more information, run: npx sqlew init-commands --help\n');
|
|
183
43
|
}
|
|
184
44
|
main();
|
|
45
|
+
export {};
|
|
185
46
|
//# sourceMappingURL=init-commands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-commands.js","sourceRoot":"","sources":["../src/init-commands.ts"],"names":[],"mappings":";AAEA
|
|
1
|
+
{"version":3,"file":"init-commands.js","sourceRoot":"","sources":["../src/init-commands.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG;AAEH,SAAS,SAAS;IAChB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;CAab,CAAC,CAAC;AACH,CAAC;AAED,SAAS,IAAI;IACX,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAEnC,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACnD,SAAS,EAAE,CAAC;QACZ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;IACzC,OAAO,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAC;IAC3E,OAAO,CAAC,GAAG,CAAC,iFAAiF,CAAC,CAAC;IAC/F,OAAO,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC;IAC7D,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC7B,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAC1C,OAAO,CAAC,GAAG,CAAC,2DAA2D,CAAC,CAAC;IACzE,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC,CAAC;IAC5E,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IACrC,OAAO,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC;IAChE,OAAO,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC;IAC/D,OAAO,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAC;AAC7E,CAAC;AAED,IAAI,EAAE,CAAC"}
|