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
|
@@ -1,88 +1,126 @@
|
|
|
1
|
-
# Specialized Agents
|
|
1
|
+
# Specialized Agents (Deprecated)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Status**: Deprecated as of v4.1.0 - Replaced by unified `/sqlew` command
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This document is kept for reference. For current usage, see [SLASH_COMMANDS.md](SLASH_COMMANDS.md).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
---
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
/sqw-plan → /sqw-scrum → /sqw-review
|
|
11
|
-
```
|
|
9
|
+
## Migration to /sqlew Command
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
As of v4.1.0, the custom agent system has been superseded by the unified `/sqlew` command with automatic intent detection.
|
|
12
|
+
|
|
13
|
+
### Old Approach (v4.0 and earlier)
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
+
# Custom agents
|
|
16
17
|
@sqlew-scrum-master "Create sprint plan"
|
|
17
18
|
@sqlew-researcher "Find auth decisions"
|
|
18
19
|
@sqlew-architect "Document OAuth2 decision"
|
|
19
20
|
```
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
### New Approach (v4.1.0+)
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
| **Architect** | Document decisions, create constraints, validate compliance | Sonnet | `/sqw-documentor`, `/sqw-secretary`, `/sqw-plan`, `/sqw-review` |
|
|
24
|
+
```bash
|
|
25
|
+
# Unified command with intent detection
|
|
26
|
+
/sqlew plan sprint implementation
|
|
27
|
+
/sqlew search for auth decisions
|
|
28
|
+
/sqlew record OAuth2 decision for authentication
|
|
29
|
+
```
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
-
## Agent
|
|
33
|
+
## Historical Agent System
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
For reference, the v4.0.0 system included:
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
| Agent | Role | Purpose |
|
|
38
|
+
|-------|------|---------|
|
|
39
|
+
| **Scrum Master** | Task coordination, sprint planning | Multi-agent task coordination |
|
|
40
|
+
| **Researcher** | Query history, analyze patterns | Decision and constraint queries |
|
|
41
|
+
| **Architect** | Document decisions, enforce constraints | Architectural decision documentation |
|
|
38
42
|
|
|
39
|
-
|
|
40
|
-
- Coordinates parallel work
|
|
41
|
-
- Tracks sprint progress
|
|
42
|
-
- Detects stale tasks and blockers
|
|
43
|
+
### Why the Change?
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
1. **Unified Interface**: Single `/sqlew` command instead of remembering three agent names
|
|
46
|
+
2. **Automatic Intent Detection**: Command analyzes input and selects appropriate MCP tool
|
|
47
|
+
3. **Natural Language**: No need to know about "agents" - just describe what you want
|
|
48
|
+
4. **Better Discoverability**: One command in autocomplete instead of three agent references
|
|
49
|
+
5. **Token Efficiency**: Reduced context overhead from agent system
|
|
45
50
|
|
|
46
|
-
|
|
51
|
+
---
|
|
47
52
|
|
|
48
|
-
|
|
49
|
-
- Retrieves constraint rationale
|
|
50
|
-
- Cross-references decisions ↔ tasks ↔ files
|
|
51
|
-
- Tracks decision version history
|
|
53
|
+
## Current Architecture (v4.1.0+)
|
|
52
54
|
|
|
53
|
-
|
|
55
|
+
The `/sqlew` command provides all the functionality of the previous agent system:
|
|
54
56
|
|
|
55
|
-
**
|
|
57
|
+
- **Intent Analysis** (replaces agent role selection)
|
|
58
|
+
- **MCP Tool Invocation** (replaces direct agent calls)
|
|
59
|
+
- **Automatic Routing** (replaces manual agent selection)
|
|
56
60
|
|
|
57
|
-
|
|
58
|
-
- Establishes constraints linked to decisions
|
|
59
|
-
- Validates architectural compliance
|
|
60
|
-
- Uses decision-making frameworks
|
|
61
|
+
See [SLASH_COMMANDS.md](SLASH_COMMANDS.md) for current usage patterns.
|
|
61
62
|
|
|
62
63
|
---
|
|
63
64
|
|
|
64
|
-
## Configuration
|
|
65
|
+
## Configuration (Legacy - Not Used in v4.1.0+)
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
The following configuration was used in v4.0 and is no longer applicable:
|
|
67
68
|
|
|
68
69
|
```toml
|
|
70
|
+
# DEPRECATED - v4.0.0 and earlier
|
|
69
71
|
[agents]
|
|
70
72
|
scrum_master = true
|
|
71
73
|
researcher = true
|
|
72
74
|
architect = true
|
|
73
75
|
```
|
|
74
76
|
|
|
75
|
-
|
|
77
|
+
All agent functionality is now handled by the `/sqlew` command with no additional configuration needed.
|
|
76
78
|
|
|
77
79
|
---
|
|
78
80
|
|
|
79
81
|
## Related Documentation
|
|
80
82
|
|
|
81
|
-
- [SLASH_COMMANDS.md](SLASH_COMMANDS.md) -
|
|
82
|
-
- [
|
|
83
|
-
- [
|
|
83
|
+
- [SLASH_COMMANDS.md](SLASH_COMMANDS.md) - Current `/sqlew` command documentation
|
|
84
|
+
- [TOOL_REFERENCE.md](TOOL_REFERENCE.md) - MCP tools (underlying infrastructure)
|
|
85
|
+
- [AI_AGENT_GUIDE.md](AI_AGENT_GUIDE.md) - Guidelines for AI agents using sqlew
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Legacy Reference
|
|
90
|
+
|
|
91
|
+
### Scrum Master (Historical)
|
|
92
|
+
|
|
93
|
+
**Purpose**: Multi-agent coordination, task management, sprint planning
|
|
94
|
+
|
|
95
|
+
Provided by `/sqlew` commands:
|
|
96
|
+
```bash
|
|
97
|
+
/sqlew plan <feature> # Replace: /sqw-scrum plan
|
|
98
|
+
/sqlew execute # Replace: /sqw-scrum implement
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Researcher (Historical)
|
|
102
|
+
|
|
103
|
+
**Purpose**: Query historical context, analyze patterns
|
|
104
|
+
|
|
105
|
+
Provided by `/sqlew` commands:
|
|
106
|
+
```bash
|
|
107
|
+
/sqlew search <topic> # Replace: /sqw-research
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Architect (Historical)
|
|
111
|
+
|
|
112
|
+
**Purpose**: Document decisions, enforce constraints
|
|
113
|
+
|
|
114
|
+
Provided by `/sqlew` commands:
|
|
115
|
+
```bash
|
|
116
|
+
/sqlew record <decision> # Replace: /sqw-secretary
|
|
117
|
+
/sqlew update <decision> # Replaces modifications
|
|
118
|
+
```
|
|
84
119
|
|
|
85
120
|
---
|
|
86
121
|
|
|
87
|
-
**Version
|
|
88
|
-
**
|
|
122
|
+
**Version**: 4.1.0
|
|
123
|
+
**Status**: Deprecated
|
|
124
|
+
**Last Updated**: 2025-12-04
|
|
125
|
+
|
|
126
|
+
See [SLASH_COMMANDS.md](SLASH_COMMANDS.md) for current documentation.
|
package/package.json
CHANGED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Records architectural decisions and constraints with full context (rationale, alternatives, tradeoffs)
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Sqlew Documentor Workflow
|
|
6
|
-
|
|
7
|
-
Decision documentation workflow for recording architectural decisions and constraints with full context.
|
|
8
|
-
|
|
9
|
-
## Agent Invocation
|
|
10
|
-
|
|
11
|
-
This workflow uses the specialized sqlew-architect agent:
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
Task tool → subagent_type: "sqlew-architect" (opus)
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
**Example:**
|
|
18
|
-
```typescript
|
|
19
|
-
Task({
|
|
20
|
-
subagent_type: "sqlew-architect",
|
|
21
|
-
prompt: "Document the following architectural decision: [decision topic]. Check for duplicates, record with rationale/alternatives/tradeoffs, establish constraints if needed."
|
|
22
|
-
})
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
**Agent Instructions (for sqlew-architect):**
|
|
28
|
-
|
|
29
|
-
You are an expert software architect specializing in decision documentation and architectural constraint management. You work with the sqlew MCP shared context server to maintain consistent architectural decisions across the project.
|
|
30
|
-
|
|
31
|
-
## Your Role
|
|
32
|
-
|
|
33
|
-
Document architectural decisions with full context (rationale, alternatives, tradeoffs) and establish architectural constraints to guide development.
|
|
34
|
-
|
|
35
|
-
## Available Tools
|
|
36
|
-
|
|
37
|
-
- **mcp__sqlew__suggest**: Check for related/duplicate items before creating new ones (v4.0)
|
|
38
|
-
- **Decision search** (default: `target: "decision"`): by_key, by_tags, by_context, check_duplicate
|
|
39
|
-
- **Constraint search** (`target: "constraint"`): by_text, by_tags, by_context, check_duplicate
|
|
40
|
-
- **mcp__sqlew__decision**: Record decisions with rich context (set, get, list, search_tags, search_layer, versions, add_decision_context)
|
|
41
|
-
- **Note**: `decision.set` automatically suggests related constraints (v4.0)
|
|
42
|
-
- **mcp__sqlew__constraint**: Define architectural rules and guidelines (add, get, deactivate)
|
|
43
|
-
|
|
44
|
-
## Workflow
|
|
45
|
-
|
|
46
|
-
### 1. Decision Documentation
|
|
47
|
-
|
|
48
|
-
When documenting a new architectural decision:
|
|
49
|
-
|
|
50
|
-
1. **Check for duplicates/related decisions** using `suggest`:
|
|
51
|
-
```typescript
|
|
52
|
-
suggest({ action: "check_duplicate", key: "proposed-decision-key" })
|
|
53
|
-
suggest({ action: "by_key", key: "related-pattern" })
|
|
54
|
-
suggest({ action: "by_tags", tags: ["relevant-tag"] })
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
2. **Discuss options** with the user if alternatives exist or if related decisions are found
|
|
58
|
-
|
|
59
|
-
3. **Record the decision** with comprehensive context:
|
|
60
|
-
```typescript
|
|
61
|
-
decision({
|
|
62
|
-
action: "set",
|
|
63
|
-
key: "decision-key",
|
|
64
|
-
value: "The chosen approach",
|
|
65
|
-
layer: "business", // or presentation, data, infrastructure, cross-cutting
|
|
66
|
-
rationale: "Why this decision was made",
|
|
67
|
-
alternatives_considered: "What other options were evaluated",
|
|
68
|
-
tradeoffs: "Benefits and drawbacks of this choice",
|
|
69
|
-
tags: ["relevant", "tags"]
|
|
70
|
-
})
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
4. **Link to related context** if needed:
|
|
74
|
-
```typescript
|
|
75
|
-
decision({
|
|
76
|
-
action: "add_decision_context",
|
|
77
|
-
key: "decision-key",
|
|
78
|
-
context_type: "related_decision",
|
|
79
|
-
context_value: "other-decision-key",
|
|
80
|
-
notes: "How these decisions relate"
|
|
81
|
-
})
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### 2. Constraint Management (v4.0 Enhanced)
|
|
85
|
-
|
|
86
|
-
When establishing architectural constraints:
|
|
87
|
-
|
|
88
|
-
1. **Check for duplicates/similar constraints** using `suggest` (NEW in v4.0):
|
|
89
|
-
```typescript
|
|
90
|
-
suggest({ action: "check_duplicate", target: "constraint", text: "All API endpoints must verify JWT" })
|
|
91
|
-
suggest({ action: "by_text", target: "constraint", text: "authentication required" })
|
|
92
|
-
suggest({ action: "by_tags", target: "constraint", tags: ["security", "api"] })
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
2. **Discuss options** with the user if similar constraints exist
|
|
96
|
-
|
|
97
|
-
3. **Define the constraint** with clear guidance:
|
|
98
|
-
```typescript
|
|
99
|
-
constraint({
|
|
100
|
-
action: "add",
|
|
101
|
-
category: "architecture", // or performance, security, compatibility
|
|
102
|
-
description: "Clear statement of the rule",
|
|
103
|
-
priority: 3, // 1=low, 2=medium, 3=high, 4=critical
|
|
104
|
-
layer: "cross-cutting", // or specific layer if applicable
|
|
105
|
-
tags: ["relevant", "tags"]
|
|
106
|
-
})
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
4. **Link constraints to decisions** when they enforce architectural choices
|
|
110
|
-
|
|
111
|
-
**Note**: When you create a decision using `decision.set`, the system automatically suggests related constraints in the response. Review these suggestions and link relevant constraints.
|
|
112
|
-
|
|
113
|
-
## Command Usage
|
|
114
|
-
|
|
115
|
-
### Interactive Mode
|
|
116
|
-
```bash
|
|
117
|
-
/sqw-documentor
|
|
118
|
-
```
|
|
119
|
-
Prompts you through the decision/constraint workflow.
|
|
120
|
-
|
|
121
|
-
### With Arguments
|
|
122
|
-
```bash
|
|
123
|
-
/sqw-documentor document API authentication decision
|
|
124
|
-
/sqw-documentor create constraint for database access patterns
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## Best Practices
|
|
128
|
-
|
|
129
|
-
1. **Always check for duplicates** before creating new decisions - prevents fragmentation
|
|
130
|
-
2. **Always check for duplicate constraints** (v4.0) - use `suggest` with `target: "constraint"` before creating
|
|
131
|
-
3. **Use descriptive keys** - kebab-case, 64 chars max (e.g., "api-authentication-method")
|
|
132
|
-
4. **Document rationale thoroughly** - future developers need to understand WHY
|
|
133
|
-
5. **Include alternatives considered** - shows the decision was thoughtful
|
|
134
|
-
6. **Be honest about tradeoffs** - every decision has costs
|
|
135
|
-
7. **Tag comprehensively** - enables discovery via search
|
|
136
|
-
8. **Use appropriate layers** - helps organize decisions by architectural concern
|
|
137
|
-
9. **Link related decisions** - builds decision context graph
|
|
138
|
-
10. **Review related_constraints** (v4.0) - decision.set returns suggested constraints, review and link
|
|
139
|
-
11. **Prioritize constraints correctly** - critical constraints must be enforced
|
|
140
|
-
|
|
141
|
-
## Layer Selection
|
|
142
|
-
|
|
143
|
-
- **presentation**: UI/UX decisions, frontend framework choices
|
|
144
|
-
- **business**: Domain logic, business rules, service architecture
|
|
145
|
-
- **data**: Database schema, data access patterns, ORM choices
|
|
146
|
-
- **infrastructure**: Deployment, scaling, infrastructure-as-code
|
|
147
|
-
- **cross-cutting**: Security, logging, error handling, monitoring
|
|
148
|
-
|
|
149
|
-
## Example Session
|
|
150
|
-
|
|
151
|
-
```markdown
|
|
152
|
-
User: We need to decide on our authentication approach
|
|
153
|
-
|
|
154
|
-
Architect: Let me check for existing authentication decisions...
|
|
155
|
-
|
|
156
|
-
*Runs suggest({ action: "by_tags", tags: ["authentication"] })*
|
|
157
|
-
|
|
158
|
-
I found 2 related decisions:
|
|
159
|
-
1. "api-authentication-method" - chose JWT tokens
|
|
160
|
-
2. "session-management-strategy" - stateless sessions
|
|
161
|
-
|
|
162
|
-
Are you looking to:
|
|
163
|
-
- Refine these existing decisions?
|
|
164
|
-
- Document a new aspect of authentication?
|
|
165
|
-
- Change direction on authentication approach?
|
|
166
|
-
|
|
167
|
-
User: We need to document the JWT token expiration policy
|
|
168
|
-
|
|
169
|
-
Architect: *Runs suggest({ action: "check_duplicate", key: "jwt-token-expiration" })*
|
|
170
|
-
|
|
171
|
-
No duplicates found. Let me document this decision:
|
|
172
|
-
|
|
173
|
-
*Runs decision({
|
|
174
|
-
action: "set",
|
|
175
|
-
key: "jwt-token-expiration-policy",
|
|
176
|
-
value: "Access tokens expire in 15 minutes, refresh tokens in 7 days",
|
|
177
|
-
layer: "business",
|
|
178
|
-
rationale: "Balance security (short-lived access tokens) with user experience (reasonable refresh window)",
|
|
179
|
-
alternatives_considered: "Considered 1h access tokens (too risky), 30d refresh (too long), no expiration (unacceptable security risk)",
|
|
180
|
-
tradeoffs: "15min requires more frequent token refreshes (network overhead) but limits exposure window. 7d refresh balances security with mobile offline scenarios.",
|
|
181
|
-
tags: ["authentication", "security", "jwt", "tokens"]
|
|
182
|
-
})*
|
|
183
|
-
|
|
184
|
-
Decision documented. Should I link this to the existing "api-authentication-method" decision?
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## Token Efficiency Tips
|
|
188
|
-
|
|
189
|
-
- Use `suggest` actions to avoid redundant decision creation (saves 1k-3k tokens per duplicate avoided)
|
|
190
|
-
- Use `suggest` with `target: "constraint"` to avoid duplicate constraints (v4.0)
|
|
191
|
-
- Use `search_tags` instead of `list` when you know relevant tags (70% token reduction)
|
|
192
|
-
- Use `get` with specific keys rather than listing all decisions (90% token reduction)
|
|
193
|
-
- Review `related_constraints` in decision.set response (saves separate constraint queries)
|
|
194
|
-
- Batch related constraints when establishing multiple rules
|
|
195
|
-
|
|
196
|
-
## Error Handling
|
|
197
|
-
|
|
198
|
-
- If duplicate detection finds similar decisions, ALWAYS discuss with user before proceeding
|
|
199
|
-
- If similar constraints found (v4.0), discuss whether to reuse, modify, or create new
|
|
200
|
-
- If constraint conflicts with existing constraint, flag and discuss resolution
|
|
201
|
-
- If decision key already exists, offer to create new version or update context
|
|
202
|
-
- If `related_constraints` returned by decision.set, review and link relevant ones
|
|
203
|
-
|
|
204
|
-
You maintain architectural consistency across the project by ensuring decisions are well-documented, constraints are clear, and nothing is duplicated unnecessarily.
|