sqlew 3.6.3 → 3.6.6

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 (101) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/LICENSE +52 -52
  3. package/README.md +45 -3
  4. package/assets/config.example.toml +41 -0
  5. package/assets/sample-agents/README.md +38 -0
  6. package/assets/sample-agents/sqlew-architect.md +247 -0
  7. package/assets/sample-agents/sqlew-researcher.md +189 -0
  8. package/assets/sample-agents/sqlew-scrum-master.md +236 -0
  9. package/dist/config/loader.d.ts.map +1 -1
  10. package/dist/config/loader.js +13 -0
  11. package/dist/config/loader.js.map +1 -1
  12. package/dist/config/minimal-generator.d.ts +25 -0
  13. package/dist/config/minimal-generator.d.ts.map +1 -0
  14. package/dist/config/minimal-generator.js +103 -0
  15. package/dist/config/minimal-generator.js.map +1 -0
  16. package/dist/config/types.d.ts +13 -0
  17. package/dist/config/types.d.ts.map +1 -1
  18. package/dist/config/types.js +5 -0
  19. package/dist/config/types.js.map +1 -1
  20. package/dist/database.d.ts +6 -9
  21. package/dist/database.d.ts.map +1 -1
  22. package/dist/database.js +30 -106
  23. package/dist/database.js.map +1 -1
  24. package/dist/index.js +36 -72
  25. package/dist/index.js.map +1 -1
  26. package/dist/init-agents.d.ts +7 -0
  27. package/dist/init-agents.d.ts.map +1 -0
  28. package/dist/init-agents.js +207 -0
  29. package/dist/init-agents.js.map +1 -0
  30. package/dist/migrations/knex/bootstrap/20251025020452_create_master_tables.d.ts.map +1 -1
  31. package/dist/migrations/knex/bootstrap/20251025020452_create_master_tables.js +49 -34
  32. package/dist/migrations/knex/bootstrap/20251025020452_create_master_tables.js.map +1 -1
  33. package/dist/migrations/knex/bootstrap/20251025021152_create_transaction_tables.d.ts.map +1 -1
  34. package/dist/migrations/knex/bootstrap/20251025021152_create_transaction_tables.js +211 -175
  35. package/dist/migrations/knex/bootstrap/20251025021152_create_transaction_tables.js.map +1 -1
  36. package/dist/migrations/knex/enhancements/20251028000000_simplify_agent_system.d.ts +23 -0
  37. package/dist/migrations/knex/enhancements/20251028000000_simplify_agent_system.d.ts.map +1 -0
  38. package/dist/migrations/knex/enhancements/20251028000000_simplify_agent_system.js +44 -0
  39. package/dist/migrations/knex/enhancements/20251028000000_simplify_agent_system.js.map +1 -0
  40. package/dist/sync-agents.d.ts +13 -0
  41. package/dist/sync-agents.d.ts.map +1 -0
  42. package/dist/sync-agents.js +112 -0
  43. package/dist/sync-agents.js.map +1 -0
  44. package/dist/tests/all-features.test.js +0 -71
  45. package/dist/tests/all-features.test.js.map +1 -1
  46. package/dist/tests/parameter-validation.test.d.ts +8 -0
  47. package/dist/tests/parameter-validation.test.d.ts.map +1 -0
  48. package/dist/tests/parameter-validation.test.js +461 -0
  49. package/dist/tests/parameter-validation.test.js.map +1 -0
  50. package/dist/tools/constraints.d.ts.map +1 -1
  51. package/dist/tools/constraints.js +7 -8
  52. package/dist/tools/constraints.js.map +1 -1
  53. package/dist/tools/context.d.ts.map +1 -1
  54. package/dist/tools/context.js +68 -39
  55. package/dist/tools/context.js.map +1 -1
  56. package/dist/tools/files.d.ts.map +1 -1
  57. package/dist/tools/files.js +9 -7
  58. package/dist/tools/files.js.map +1 -1
  59. package/dist/tools/help-queries.d.ts.map +1 -1
  60. package/dist/tools/help-queries.js +20 -14
  61. package/dist/tools/help-queries.js.map +1 -1
  62. package/dist/tools/messaging.d.ts +4 -0
  63. package/dist/tools/messaging.d.ts.map +1 -1
  64. package/dist/tools/messaging.js +38 -0
  65. package/dist/tools/messaging.js.map +1 -1
  66. package/dist/tools/tasks.d.ts.map +1 -1
  67. package/dist/tools/tasks.js +13 -0
  68. package/dist/tools/tasks.js.map +1 -1
  69. package/dist/tools/utils.d.ts.map +1 -1
  70. package/dist/tools/utils.js +15 -12
  71. package/dist/tools/utils.js.map +1 -1
  72. package/dist/types.d.ts +93 -1
  73. package/dist/types.d.ts.map +1 -1
  74. package/dist/utils/action-specs.d.ts +46 -0
  75. package/dist/utils/action-specs.d.ts.map +1 -0
  76. package/dist/utils/action-specs.js +527 -0
  77. package/dist/utils/action-specs.js.map +1 -0
  78. package/dist/utils/error-handler.d.ts.map +1 -1
  79. package/dist/utils/error-handler.js +41 -24
  80. package/dist/utils/error-handler.js.map +1 -1
  81. package/dist/utils/parameter-validator.d.ts +53 -0
  82. package/dist/utils/parameter-validator.d.ts.map +1 -0
  83. package/dist/utils/parameter-validator.js +286 -0
  84. package/dist/utils/parameter-validator.js.map +1 -0
  85. package/dist/watcher/file-watcher.d.ts +11 -5
  86. package/dist/watcher/file-watcher.d.ts.map +1 -1
  87. package/dist/watcher/file-watcher.js +43 -10
  88. package/dist/watcher/file-watcher.js.map +1 -1
  89. package/docs/BEST_PRACTICES.md +69 -0
  90. package/docs/CONFIGURATION.md +35 -19
  91. package/docs/SPECIALIZED_AGENTS.md +576 -0
  92. package/docs/TOOL_REFERENCE.md +178 -0
  93. package/package.json +86 -85
  94. package/dist/tests/agent-reuse.test.d.ts +0 -6
  95. package/dist/tests/agent-reuse.test.d.ts.map +0 -1
  96. package/dist/tests/agent-reuse.test.js +0 -242
  97. package/dist/tests/agent-reuse.test.js.map +0 -1
  98. package/dist/tools/config.d.ts +0 -50
  99. package/dist/tools/config.d.ts.map +0 -1
  100. package/dist/tools/config.js +0 -170
  101. package/dist/tools/config.js.map +0 -1
@@ -0,0 +1,576 @@
1
+ # Specialized Agents for sqlew
2
+
3
+ Production-ready agent templates for efficient multi-agent coordination using the mcp-sqlew MCP server.
4
+
5
+ ## Table of Contents
6
+ - [Overview](#overview)
7
+ - [Available Agents](#available-agents)
8
+ - [Installation](#installation)
9
+ - [Configuration](#configuration)
10
+ - [Usage Examples](#usage-examples)
11
+ - [Token Optimization](#token-optimization)
12
+ - [Agent Comparison](#agent-comparison)
13
+ - [Customization](#customization)
14
+ - [Integration](#integration)
15
+ - [Troubleshooting](#troubleshooting)
16
+
17
+ ## Overview
18
+
19
+ These specialized agents leverage sqlew's token-efficient context management to coordinate complex development workflows, document architectural decisions, and maintain project knowledge.
20
+
21
+ ### Why Use All Three Agents?
22
+
23
+ **These agents are complementary specialists, not redundant features.**
24
+
25
+ Each agent has **unique capabilities** the others lack:
26
+
27
+ - **Scrum Master** = Coordination specialist (creates tasks, manages dependencies, coordinates agents)
28
+ - **Researcher** = Analysis specialist (queries history, identifies patterns, cross-references decisions)
29
+ - **Architect** = Documentation specialist (rich decision records, constraint engineering, architectural frameworks)
30
+
31
+ **Example**: Implementing OAuth2 authentication
32
+
33
+ **❌ Using only Scrum Master**:
34
+ - Creates tasks ✅
35
+ - Tracks progress ✅
36
+ - Documents decision? "We chose OAuth2" (shallow, no rationale)
37
+ - Analyzes past decisions? (Limited capability)
38
+
39
+ **✅ Using all three together**:
40
+ 1. **Architect**: Documents decision with full rationale, alternatives (OAuth2 vs JWT vs sessions), tradeoffs, creates constraints
41
+ 2. **Scrum Master**: Creates sprint plan, establishes task dependencies, coordinates agents
42
+ 3. **Researcher**: Finds related past auth decisions, prevents duplicating solved problems
43
+
44
+ **Recommendation**: Use all three agents for complete development coordination. The 46KB token cost is justified by the comprehensive capabilities you gain.
45
+
46
+ ### Token Optimization (If Needed)
47
+
48
+ If you must reduce token consumption, understand what you're giving up:
49
+
50
+ - **Remove Researcher** (saves 14KB): Lose historical analysis, pattern detection, decision evolution tracking
51
+ - **Remove Architect** (saves 20KB): Lose rich decision documentation, constraint enforcement, architectural frameworks
52
+ - **Remove Scrum Master** (saves 12KB): Lose task coordination, dependency management, agent orchestration
53
+
54
+ Only optimize if you have specific workflow constraints (e.g., solo developer doing simple tasks).
55
+
56
+ ## Available Agents
57
+
58
+ **Note**: Invoke agents using the `@` prefix: `@sqlew-scrum-master`, `@sqlew-researcher`, `@sqlew-architect`
59
+
60
+ ### 🟣 Scrum Master (`sqlew-scrum-master.md`)
61
+
62
+ **Purpose**: Multi-agent coordination, task management, sprint planning
63
+
64
+ **Use when**:
65
+ - Starting a new feature sprint
66
+ - Breaking down complex work into manageable tasks
67
+ - Managing task dependencies and blockers
68
+ - Coordinating parallel work across multiple agents
69
+ - Tracking sprint progress
70
+
71
+ **Key Capabilities**:
72
+ - Create tasks with dependencies using `batch_create`
73
+ - Assign specialized agents to tasks
74
+ - Monitor progress via `stats.layer_summary`
75
+ - Detect stale tasks and blockers
76
+ - Facilitate inter-agent messaging
77
+
78
+ **Token Budget**: ~12KB per conversation | 5-15k tokens per sprint planning session
79
+
80
+ ---
81
+
82
+ ### 🔵 Researcher (`sqlew-researcher.md`)
83
+
84
+ **Purpose**: Query historical context, analyze patterns, extract insights
85
+
86
+ **Use when**:
87
+ - Understanding past architectural decisions
88
+ - Investigating "why was this decided?"
89
+ - Onboarding new team members
90
+ - Sprint retrospective analysis
91
+ - Finding related decisions/constraints
92
+
93
+ **Key Capabilities**:
94
+ - Search decisions by tags, layers, context keys
95
+ - Retrieve constraint rationale
96
+ - Analyze task completion patterns
97
+ - Track decision version history
98
+ - Cross-reference decisions ↔ tasks ↔ files
99
+
100
+ **Token Budget**: ~14KB per conversation | 2-8k tokens per research session
101
+
102
+ ---
103
+
104
+ ### 🟢 Architect (`sqlew-architect.md`)
105
+
106
+ **Purpose**: Document decisions, enforce constraints, maintain standards
107
+
108
+ **Use when**:
109
+ - Making architectural choices (technology, patterns, designs)
110
+ - Establishing enforceable coding standards
111
+ - Validating compliance with constraints
112
+ - Recording design rationale for future reference
113
+ - Analyzing tradeoffs between alternatives
114
+
115
+ **Key Capabilities**:
116
+ - Create rich decision records (rationale, alternatives, tradeoffs)
117
+ - Establish constraints linked to decisions
118
+ - Use decision-making frameworks (SWOT, cost-benefit)
119
+ - Validate architectural compliance
120
+ - Document decision evolution via `add_decision_context`
121
+
122
+ **Token Budget**: ~20KB per conversation | 3-10k tokens per decision documentation session
123
+
124
+ ## Installation
125
+
126
+ ### Step 1: Configure Which Agents to Install
127
+
128
+ Agents are configured via `.sqlew/config.toml` in your project root.
129
+
130
+ **Recommended: Install all three agents** (they are complementary specialists):
131
+
132
+ ```toml
133
+ # Edit .sqlew/config.toml
134
+ [agents]
135
+ scrum_master = true # Coordination specialist (12KB)
136
+ researcher = true # Analysis specialist (14KB)
137
+ architect = true # Documentation specialist (20KB)
138
+ ```
139
+
140
+ If the config file doesn't exist, create it:
141
+
142
+ ```bash
143
+ # Create .sqlew directory
144
+ mkdir -p .sqlew
145
+
146
+ # Create config.toml with agent configuration
147
+ cat > .sqlew/config.toml << 'EOF'
148
+ [agents]
149
+ scrum_master = true
150
+ researcher = true
151
+ architect = true
152
+ EOF
153
+ ```
154
+
155
+ **Full example with all options**: See `.sqlew/config.example.toml` in the mcp-sqlew repository.
156
+
157
+ **Note**: Agents configured as `true` are automatically copied to your project's `.claude/agents/` directory.
158
+
159
+ ### Step 2: Verify Installation
160
+
161
+ ```bash
162
+ ls .claude/agents/sqlew-*.md
163
+ # Should show: sqlew-scrum-master.md, sqlew-researcher.md, sqlew-architect.md
164
+ ```
165
+
166
+ ### Step 3: Use Agents
167
+
168
+ Invoke agents in Claude Code using the `@` prefix:
169
+
170
+ ```
171
+ @sqlew-scrum-master "Plan the sprint for OAuth2 implementation"
172
+ @sqlew-researcher "What past auth decisions have we made?"
173
+ @sqlew-architect "Document the OAuth2 vs JWT decision"
174
+ ```
175
+
176
+ ## Configuration
177
+
178
+ ### Agent Selection Configuration
179
+
180
+ **Default (Recommended): All agents enabled**
181
+
182
+ ```toml
183
+ # .sqlew/config.toml
184
+ [agents]
185
+ scrum_master = true # Coordination specialist (12KB)
186
+ researcher = true # Analysis specialist (14KB)
187
+ architect = true # Documentation specialist (20KB)
188
+ # Total: 46KB tokens - comprehensive development coordination
189
+ ```
190
+
191
+ **Only if you have specific constraints**, you can disable agents:
192
+
193
+ ```toml
194
+ [agents]
195
+ scrum_master = true # Keep coordination
196
+ researcher = false # Skip (lose historical analysis)
197
+ architect = false # Skip (lose rich decision docs)
198
+ # Total: 12KB tokens - minimal task tracking only
199
+ ```
200
+
201
+ **Note**: Agent files are automatically managed based on your config settings.
202
+
203
+ ### Configuration File Location
204
+
205
+ - **Project-specific**: `.sqlew/config.toml` in project root
206
+ - **Created automatically**: On first MCP server run if not exists
207
+ - **Full example**: `.sqlew/config.example.toml`
208
+
209
+ ### Config Options
210
+
211
+ ```toml
212
+ [agents]
213
+ # Scrum Master: Multi-agent coordination, task management, sprint planning
214
+ # Token cost: ~12KB per conversation when loaded in Claude Code
215
+ # Use when: Coordinating complex features, managing dependencies
216
+ scrum_master = true
217
+
218
+ # Researcher: Query decisions, analyze patterns, investigate context
219
+ # Token cost: ~14KB per conversation when loaded in Claude Code
220
+ # Use when: Understanding past decisions, onboarding, retrospectives
221
+ researcher = true
222
+
223
+ # Architect: Document decisions, enforce constraints, maintain standards
224
+ # Token cost: ~20KB per conversation when loaded in Claude Code
225
+ # Use when: Making architectural choices, establishing rules
226
+ architect = true
227
+ ```
228
+
229
+ ## Usage Examples
230
+
231
+ **Note**: Invoke agents in Claude Code using the `@` prefix (e.g., `@sqlew-scrum-master`).
232
+
233
+ ### Example 1: New Feature Sprint
234
+
235
+ ```
236
+ User: "We need to implement a notification system with email, push, and in-app."
237
+
238
+ @sqlew-scrum-master "Create sprint plan for notification feature"
239
+ ```
240
+
241
+ **Agent creates**:
242
+ - Task #1: Design notification schema (ARCHITECTURE, HIGH)
243
+ - Task #2: Implement message queue (IMPLEMENTATION, CRITICAL)
244
+ - Task #3-5: Email/Push/In-app handlers (IMPLEMENTATION)
245
+ - Task #6: Integration tests (TESTING)
246
+
247
+ **Agent establishes dependencies**:
248
+ - T2 depends on T1 (need schema first)
249
+ - T3-5 depend on T2 (need queue infrastructure)
250
+ - T6 depends on T3-5 (test complete system)
251
+
252
+ ### Example 2: Document Architectural Decision
253
+
254
+ ```
255
+ User: "We decided to use Redis instead of RabbitMQ for notifications."
256
+
257
+ @sqlew-architect "Document this decision with full rationale"
258
+ ```
259
+
260
+ **Agent creates**:
261
+ ```
262
+ Decision: notification-queue-redis
263
+ Rationale: Team familiarity, simpler ops, built-in persistence
264
+ Alternatives: RabbitMQ (more features), SQS (vendor lock-in), Kafka (overkill)
265
+ Tradeoffs: Less routing, manual retries, but operational simplicity
266
+
267
+ Constraints:
268
+ - All notifications MUST use Redis Streams
269
+ - Consumer groups MUST ack within 30s
270
+ ```
271
+
272
+ ### Example 3: Investigate Past Decision
273
+
274
+ ```
275
+ User: "Why did we choose JWT over sessions?"
276
+
277
+ @sqlew-researcher "Find authentication decisions"
278
+ ```
279
+
280
+ **Agent retrieves**:
281
+ ```
282
+ Decision: auth-jwt-strategy (2024-09-15)
283
+ Rationale: Stateless for horizontal scaling, mobile-ready, industry standard
284
+ Alternatives: Session cookies (simpler revocation but sticky sessions needed)
285
+ Tradeoffs: Token revocation complexity vs. scalability
286
+
287
+ Related Constraints:
288
+ - JWT tokens MUST expire within 15 minutes
289
+ - Refresh tokens in httpOnly cookies only
290
+ ```
291
+
292
+ ### Example 4: Sprint Progress Check
293
+
294
+ ```
295
+ User: "Show me current sprint status"
296
+
297
+ @sqlew-scrum-master "Generate sprint report"
298
+ ```
299
+
300
+ **Agent shows**:
301
+ ```
302
+ 📊 Sprint Summary (Week of 2024-10-20)
303
+
304
+ ARCHITECTURE: TODO: 0 | IN_PROGRESS: 1 | DONE: 2
305
+ IMPLEMENTATION: TODO: 3 | IN_PROGRESS: 2 | DONE: 1
306
+ TESTING: TODO: 1 | IN_PROGRESS: 0 | DONE: 0
307
+
308
+ 🚨 Blockers:
309
+ - Task #1 IN_PROGRESS for 2 days (may be stale)
310
+
311
+ 📈 Next Actions:
312
+ 1. Check Task #1 status
313
+ 2. Complete Task #2 to unblock T3-5
314
+ ```
315
+
316
+ ## Token Optimization
317
+
318
+ ### Token Impact by Configuration
319
+
320
+ | Configuration | Tokens Loaded | Use Case |
321
+ |--------------|---------------|----------|
322
+ | All 3 agents | 46KB | Full-featured coordination |
323
+ | Scrum + Architect | 32KB | Common setup (tasks + decisions) |
324
+ | Scrum + Researcher | 26KB | Task management + history |
325
+ | Scrum only | 12KB | Minimal (task tracking only) |
326
+ | Architect only | 20KB | Decision documentation only |
327
+
328
+ ### Recommended Configurations
329
+
330
+ **Full Team (All Features)**:
331
+ ```toml
332
+ scrum_master = true # 12KB
333
+ researcher = true # 14KB
334
+ architect = true # 20KB
335
+ # Total: 46KB
336
+ ```
337
+
338
+ **Solo Developer (Task Focus)**:
339
+ ```toml
340
+ scrum_master = true # 12KB
341
+ researcher = false
342
+ architect = false
343
+ # Total: 12KB (74% savings)
344
+ ```
345
+
346
+ **Architecture-Focused**:
347
+ ```toml
348
+ scrum_master = false
349
+ researcher = true # 14KB
350
+ architect = true # 20KB
351
+ # Total: 34KB (26% savings)
352
+ ```
353
+
354
+ ## Agent Comparison
355
+
356
+ | Feature | Scrum Master | Researcher | Architect |
357
+ |---------|--------------|------------|-----------|
358
+ | **Creates Tasks** | ✅ Primary | ❌ | ❌ |
359
+ | **Creates Decisions** | ⚠️ Basic | ❌ | ✅ Primary |
360
+ | **Creates Constraints** | ❌ | ❌ | ✅ Primary |
361
+ | **Queries History** | ⚠️ Task-focused | ✅ Primary | ⚠️ Validation |
362
+ | **Coordinates Agents** | ✅ Primary | ❌ | ❌ |
363
+ | **Documents Rationale** | ❌ | ❌ | ✅ Primary |
364
+ | **Analyzes Patterns** | ⚠️ Task patterns | ✅ Primary | ⚠️ Decision patterns |
365
+
366
+ **Legend**: ✅ Primary use case | ⚠️ Secondary capability | ❌ Not designed for
367
+
368
+ ## Customization
369
+
370
+ ### Adapt to Your Project
371
+
372
+ Edit agent files in `~/.claude/agents/` to customize:
373
+
374
+ **1. Layer Taxonomy**:
375
+ ```markdown
376
+ ## Your Project's Layers
377
+ - **STRATEGY**: Business-level decisions
378
+ - **ARCHITECTURE**: System design
379
+ - **PLATFORM**: Infrastructure
380
+ - **APPLICATION**: Feature implementation
381
+ ```
382
+
383
+ **2. Tag Conventions**:
384
+ ```markdown
385
+ ## Your Project's Tags
386
+ - Technology: rust, typescript, react, postgresql
387
+ - Domain: auth, payments, notifications
388
+ - Cross-cutting: security, performance
389
+ ```
390
+
391
+ **3. Priority Rules**:
392
+ ```markdown
393
+ ## Your Priority Criteria
394
+ - CRITICAL: System breaks, security issues
395
+ - HIGH: Major features, blocking issues
396
+ - MEDIUM: Enhancements, non-blocking
397
+ - LOW: Nice-to-have, cosmetic
398
+ ```
399
+
400
+ ## Integration
401
+
402
+ ### Git Commit Hooks
403
+
404
+ Link tasks to commits:
405
+
406
+ ```bash
407
+ # .git/hooks/prepare-commit-msg
408
+ #!/bin/bash
409
+ BRANCH=$(git symbolic-ref --short HEAD)
410
+ if [[ $BRANCH =~ ^task/([0-9]+) ]]; then
411
+ TASK_ID="${BASH_REMATCH[1]}"
412
+ echo "Task #$TASK_ID: $(cat $1)" > $1
413
+ fi
414
+ ```
415
+
416
+ ### CI/CD Integration
417
+
418
+ Validate constraints in CI:
419
+
420
+ ```yaml
421
+ # .github/workflows/constraint-check.yml
422
+ name: Constraint Validation
423
+ on: [pull_request]
424
+ jobs:
425
+ check-constraints:
426
+ runs-on: ubuntu-latest
427
+ steps:
428
+ - uses: actions/checkout@v3
429
+ - name: Check architectural constraints
430
+ run: |
431
+ # Query active constraints
432
+ # Run validators based on constraint rules
433
+ ```
434
+
435
+ ### PR Templates
436
+
437
+ ```markdown
438
+ ## Pull Request - Task #X
439
+
440
+ **Related Decision**: [context_key if applicable]
441
+
442
+ **Constraints Checked**:
443
+ - [ ] Constraint #Y: [description]
444
+ - [ ] Constraint #Z: [description]
445
+
446
+ **Architectural Impact**: None | Minor | Major
447
+ [If Major: @sqlew-architect document new decision]
448
+ ```
449
+
450
+ ## Troubleshooting
451
+
452
+ ### Agent Not Responding
453
+
454
+ **Problem**: Agent doesn't activate when called
455
+
456
+ **Solution**:
457
+ ```bash
458
+ # Check agent file location
459
+ ls ~/.claude/agents/sqlew-*.md
460
+
461
+ # Verify frontmatter is valid YAML
462
+ head -n 10 ~/.claude/agents/sqlew-scrum-master.md
463
+
464
+ # Restart Claude Code
465
+ ```
466
+
467
+ ### Config Not Found
468
+
469
+ **Problem**: Config file missing
470
+
471
+ **Solution**:
472
+ ```bash
473
+ # Verify config exists
474
+ cat .sqlew/config.toml
475
+
476
+ # If missing, create it manually
477
+ mkdir -p .sqlew
478
+ cat > .sqlew/config.toml << 'EOF'
479
+ [agents]
480
+ scrum_master = true
481
+ researcher = true
482
+ architect = true
483
+ EOF
484
+
485
+ # Or copy from example
486
+ cp node_modules/sqlew/assets/config.example.toml .sqlew/config.toml
487
+ ```
488
+
489
+ ### Too Many Tokens
490
+
491
+ **Problem**: Conversations consume too many tokens
492
+
493
+ **Solution**:
494
+ 1. Edit `.sqlew/config.toml` and disable unused agents (set to `false`)
495
+ 2. Restart Claude Code
496
+
497
+ Agent files are automatically managed based on your config.
498
+
499
+ **Example**:
500
+ ```toml
501
+ [agents]
502
+ scrum_master = true # Keep
503
+ researcher = false # Disable (saves 14KB)
504
+ architect = false # Disable (saves 20KB)
505
+ ```
506
+
507
+ ### Wrong Agents Installed
508
+
509
+ **Problem**: You have agents you don't want, or missing agents you need
510
+
511
+ **Solution**:
512
+ 1. Edit `.sqlew/config.toml` to set desired agents to `true` and unwanted agents to `false`
513
+ 2. Restart Claude Code
514
+
515
+ Agent files are automatically synchronized with your config settings.
516
+
517
+ **Example**:
518
+ ```toml
519
+ [agents]
520
+ scrum_master = true # This will be installed
521
+ researcher = false # This will not be installed
522
+ architect = true # This will be installed
523
+ ```
524
+
525
+ ## Best Practices
526
+
527
+ ### DO ✅
528
+
529
+ - Use scrum-master for coordination, specialized agents for implementation
530
+ - Create rich decision records (rationale + alternatives + tradeoffs)
531
+ - Establish enforceable constraints linked to decisions
532
+ - Query researcher before creating duplicate decisions
533
+ - Use batch operations for token efficiency
534
+ - Assign specialized agents explicitly (avoid generic pool bloat)
535
+
536
+ ### DON'T ❌
537
+
538
+ - Don't use scrum-master for actual coding (delegate)
539
+ - Don't create decisions without rationale/alternatives
540
+ - Don't query `m_agents` for "what did agent X do" (use task metadata)
541
+ - Don't leave tasks IN_PROGRESS indefinitely
542
+ - Don't re-query identical data (agents remember conversation context)
543
+
544
+ ## File Manifest
545
+
546
+ Agent files in `assets/sample-agents/`:
547
+
548
+ ```
549
+ assets/sample-agents/
550
+ ├── sqlew-scrum-master.md # Task coordination agent
551
+ ├── sqlew-researcher.md # Context query agent
552
+ └── sqlew-architect.md # Decision documentation agent
553
+ ```
554
+
555
+ ## Version
556
+
557
+ **v1.0.0** - Initial release (2024-10-28)
558
+ - Enhanced scrum-master with token optimization and error recovery
559
+ - Researcher with query patterns and cross-reference capabilities
560
+ - Architect with decision frameworks and constraint engineering
561
+
562
+ ## Resources
563
+
564
+ - **Sqlew Documentation**: [/docs](/docs) in mcp-sqlew repository
565
+ - **MCP Protocol**: https://modelcontextprotocol.io/
566
+ - **Claude Code**: https://docs.claude.com/claude-code
567
+ - **Tool Reference**: [/docs/TOOL_REFERENCE.md](/docs/TOOL_REFERENCE.md)
568
+
569
+ ## Support
570
+
571
+ - **Issues**: https://github.com/sin5ddd/mcp-sqlew/issues
572
+ - **Discussions**: https://github.com/sin5ddd/mcp-sqlew/discussions
573
+
574
+ ---
575
+
576
+ **Built for token-efficient multi-agent coordination** 🚀