sqlew 4.3.0 → 4.3.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 (47) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +268 -269
  3. package/assets/claude-md-snippets/plan-mode-integration.md +50 -48
  4. package/assets/config.example.toml +120 -282
  5. package/dist/cli.js +54 -54
  6. package/dist/cli.js.map +1 -1
  7. package/dist/init-skills.d.ts +8 -4
  8. package/dist/init-skills.d.ts.map +1 -1
  9. package/dist/init-skills.js +50 -27
  10. package/dist/init-skills.js.map +1 -1
  11. package/dist/tools/context/actions/has-updates.d.ts.map +1 -1
  12. package/dist/tools/context/actions/has-updates.js +0 -4
  13. package/dist/tools/context/actions/has-updates.js.map +1 -1
  14. package/dist/tools/files/help/example.d.ts.map +1 -1
  15. package/dist/tools/files/help/example.js +11 -0
  16. package/dist/tools/files/help/example.js.map +1 -1
  17. package/dist/tools/files/help/help.d.ts.map +1 -1
  18. package/dist/tools/files/help/help.js +11 -0
  19. package/dist/tools/files/help/help.js.map +1 -1
  20. package/dist/tools/suggest/actions/by-context.d.ts.map +1 -1
  21. package/dist/tools/suggest/actions/by-context.js +5 -15
  22. package/dist/tools/suggest/actions/by-context.js.map +1 -1
  23. package/dist/tools/suggest/actions/by-key.d.ts.map +1 -1
  24. package/dist/tools/suggest/actions/by-key.js +5 -15
  25. package/dist/tools/suggest/actions/by-key.js.map +1 -1
  26. package/dist/tools/suggest/actions/by-tags.d.ts.map +1 -1
  27. package/dist/tools/suggest/actions/by-tags.js +5 -15
  28. package/dist/tools/suggest/actions/by-tags.js.map +1 -1
  29. package/dist/tools/suggest/actions/constraint-by-context.d.ts +1 -1
  30. package/dist/tools/suggest/actions/constraint-by-context.d.ts.map +1 -1
  31. package/dist/tools/suggest/actions/constraint-by-context.js +9 -16
  32. package/dist/tools/suggest/actions/constraint-by-context.js.map +1 -1
  33. package/dist/tools/suggest/actions/constraint-by-tags.d.ts +1 -1
  34. package/dist/tools/suggest/actions/constraint-by-tags.d.ts.map +1 -1
  35. package/dist/tools/suggest/actions/constraint-by-tags.js +11 -17
  36. package/dist/tools/suggest/actions/constraint-by-tags.js.map +1 -1
  37. package/dist/tools/suggest/actions/constraint-by-text.d.ts +1 -1
  38. package/dist/tools/suggest/actions/constraint-by-text.d.ts.map +1 -1
  39. package/dist/tools/suggest/actions/constraint-by-text.js +6 -15
  40. package/dist/tools/suggest/actions/constraint-by-text.js.map +1 -1
  41. package/dist/types.d.ts +0 -228
  42. package/dist/types.d.ts.map +1 -1
  43. package/dist/utils/suggest-helpers.d.ts +82 -0
  44. package/dist/utils/suggest-helpers.d.ts.map +1 -0
  45. package/dist/utils/suggest-helpers.js +93 -0
  46. package/dist/utils/suggest-helpers.js.map +1 -0
  47. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [4.3.1] - 2026-01-06
11
+
12
+ ### Added
13
+
14
+ - **`.claude/rules/` integration**: Plan mode templates now installed to `.claude/rules/plan-mode-integration.md` instead of modifying CLAUDE.md directly
15
+ - Incremental `.gitignore` updates: Missing sqlew entries are now added even if sqlew section already exists
16
+ - Deprecation notices added to `file` tool help (matching `task` tool)
17
+
18
+ ### Changed
19
+
20
+ - **BREAKING**: `sqlew --init` no longer edits CLAUDE.md - uses `.claude/rules/` directory instead
21
+ - Plan mode template enhanced with stronger MUST/REQUIRED language for constraints
22
+ - DRY improvements: Common suggest tool logic extracted to `suggest-helpers.ts`
23
+
24
+ ### Deprecated
25
+
26
+ - **Specialized agents** (`scrum_master`, `researcher`, `architect`): No longer needed with Claude Opus 4.5's improved capabilities. Disabled by default, will be removed in v5.0
27
+
28
+ ### Removed
29
+
30
+ - Obsolete types from `types.ts` (duplicate JSON Import types, deprecated message system types)
31
+ - Unused `messagesCount` from `has-updates` action response
32
+ - `[tasks]` and `[vcs]` sections from config.example.toml (task system deprecated in v4.3.0)
33
+ - SSH tunnel configuration from config.example.toml (unsupported)
34
+
35
+ ---
36
+
10
37
  ## [4.3.0] - 2026-01-04
11
38
 
12
39
  ### Added
package/README.md CHANGED
@@ -1,269 +1,268 @@
1
- # sqlew
2
- ![sqlew_logo](assets/sqlew-logo.png)
3
-
4
- [![npm version](https://img.shields.io/npm/v/sqlew.svg)](https://www.npmjs.com/package/sqlew)
5
- [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
6
-
7
- > **ADR (Architecture Decision Record) for AI Agents** – An MCP server that enables AI agents to create, query, and maintain architecture decision records in a structured SQL database
8
-
9
- ## 🚀 Quick Start
10
-
11
- ### 1. Install globally (Recommended)
12
-
13
- ```bash
14
- npm install -g sqlew
15
- ```
16
-
17
- ### 2. Add to your MCP config
18
-
19
- Add to `.mcp.json` in your project root:
20
-
21
- ```json
22
- {
23
- "mcpServers": {
24
- "sqlew": {
25
- "command": "sqlew"
26
- }
27
- }
28
- }
29
- ```
30
-
31
- ### 3. Initialize project
32
-
33
- ```bash
34
- sqlew --init
35
- ```
36
-
37
- This one-shot command sets up:
38
- - Claude Code Skills
39
- - CLAUDE.md integration hints
40
- - Plan-to-ADR hooks
41
- - .gitignore entries
42
-
43
- ### 4. Just use Plan Mode!
44
-
45
- **That's it!** Now every time you:
46
- 1. Create a plan in Claude Code
47
- 2. Get user approval (ExitPlanMode)
48
-
49
- → Your architectural decisions are **automatically recorded** as ADR knowledge.
50
-
51
- No special commands needed. Just plan your work normally, and sqlew captures the decisions in the background.
52
-
53
- ### Optional: /sqlew command
54
-
55
- For manual queries and explicit decision recording:
56
-
57
- ```bash
58
- /sqlew # Show status
59
- /sqlew search auth # Search past decisions
60
- /sqlew record use Redis # Record a decision manually
61
- ```
62
-
63
- ---
64
-
65
- ## What is sqlew?
66
-
67
- **sqlew** is a Model Context Protocol (MCP) server that brings ADR (Architecture Decision Record) capabilities to AI agents through a shared SQL-backed repository.
68
-
69
- ### The Problem: AI Agents Lack Decision Memory
70
- Every AI session starts with zero context. Agents must re-learn architectural decisions, can reintroduce previously rejected patterns, and have no systematic way to understand WHY past choices were made.
71
-
72
- Traditional ADR approaches use Markdown files scattered across repositories. While human-readable, this format creates challenges for AI agents:
73
- - **No structured querying** – AI must read entire files to find relevant decisions
74
- - **Context explosion** – Token costs grow linearly with decision history
75
- - **No duplicate detection** – AI cannot easily identify similar or conflicting decisions
76
- - **Poor discoverability** – Finding related decisions requires full-text search across many files
77
-
78
- ### *sqlew* brings structured ADR to AI agents
79
- sqlew transforms ADR from static documentation into a **queryable, AI-native decision database**:
80
-
81
- - **Structured records** – Decisions stored as relational data with metadata, tags, and relationships
82
- - **Efficient querying** – AI agents retrieve only relevant decisions via SQL queries
83
- - **Smart suggestions** – Three-tier similarity system detects duplicate or related decisions
84
- - **Constraint tracking** – Architectural rules and principles as first-class entities
85
- - **Auto-capture** – Claude Code Hooks automatically record decisions from Plan Mode
86
-
87
- > *This software does not send any data to external networks. We NEVER collect any data or usage statistics. Please use it with complete security.*
88
-
89
- ## Why sqlew?
90
-
91
- AI agents automatically accumulate project knowledge through Plan Mode. Decisions are stored in SQL for efficient querying.
92
-
93
- **Perfect for:**
94
- - 🏢 Large-scale projects with many architectural decisions
95
- - 🔧 Long-term maintenance where context must persist across sessions
96
- - 👥 Team environments where multiple AI agents share knowledge
97
-
98
- **Key benefits:**
99
- - ⚡ **60-75% token reduction** vs reading Markdown ADRs
100
- - 🔍 **Millisecond queries** (2-50ms) even with thousands of decisions
101
- - 🛡️ **Duplicate prevention** via similarity detection
102
- - 📚 **Persistent memory** across all AI sessions
103
-
104
- → See [ADR Concepts](docs/ADR_CONCEPTS.md) for detailed architecture.
105
-
106
- ---
107
-
108
- **Technical Features**: 6 MCP tools (3 core: decision, constraint, suggest + 3 utility: help, example, use_case), three-tier similarity detection (0-100 point scoring), ACID transaction support, multi-database backend (SQLite/PostgreSQL/MySQL), metadata-driven organization with layers and tags
109
-
110
-
111
- ## Installation
112
-
113
- ### Requirements
114
- - Node.js 20.0.0 or higher
115
- - npm or npx
116
-
117
- ### Recommended: Global Install
118
-
119
- ```bash
120
- npm install -g sqlew
121
- ```
122
-
123
- > **Why global install?** Claude Code Hooks call `sqlew` directly from shell. Global install ensures hooks work correctly without npx overhead.
124
-
125
- Then add to `.mcp.json` in your project root:
126
-
127
- ```json
128
- {
129
- "mcpServers": {
130
- "sqlew": {
131
- "command": "sqlew"
132
- }
133
- }
134
- }
135
- ```
136
-
137
- ### Alternative: npx (Not Recommended)
138
-
139
- **⚠️ Not recommended**: npx usage prevents Claude Code Hooks from working, disabling Plan-to-ADR automatic decision capture. Use global install instead.
140
-
141
- **Note**: First run initializes the database. Restart Claude Code to load the MCP server.
142
-
143
- Each project maintains its own context database in `.sqlew/sqlew.db`.
144
-
145
- **Custom database path:** Add path as argument: `"args": ["sqlew", "/path/to/db.db"]`
146
- **Default location:** `.sqlew/sqlew.db`
147
-
148
- ## Configuration
149
-
150
- sqlew supports multiple database backends:
151
-
152
- | Database | Use Case | Status |
153
- |----------|----------|--------|
154
- | **SQLite** | Personal/small projects | ✅ Default |
155
- | **MySQL 8.0+ / MariaDB 10+** | Production, team sharing | ✅ Supported |
156
- | **PostgreSQL 12+** | Production, team sharing | ✅ Supported |
157
-
158
- Configuration is managed via `.sqlew/config.toml` file and CLI arguments.
159
-
160
- → **[Full Configuration Guide](docs/CONFIGURATION.md)** - All options, database setup, validation rules
161
-
162
- ## Documentation
163
-
164
- Each tool supports `action: "help"` for full documentation and `action: "example"` for comprehensive usage examples.
165
-
166
- And `action: "use_case"` shows how to use the tool in a real-world scenario.
167
-
168
- ### On-Demand Documentation
169
-
170
- All tools support:
171
- - `action: "help"` - Parameter reference and descriptions
172
- - `action: "example"` - Usage scenarios and examples
173
- - `action: "use_case"` - Real-world usage examples
174
-
175
- ### For AI Agents
176
-
177
- **Essential Guides:**
178
-
179
- **Advanced Features:**
180
- - [Hooks Guide](docs/HOOKS_GUIDE.md) - Claude Code Hooks integration
181
- - [Cross Database](docs/CROSS_DATABASE.md) - Multi-database support
182
-
183
- **Reference:**
184
- - [Configuration](docs/CONFIGURATION.md) - Config file setup, all options
185
-
186
- ### Advanced Usage
187
-
188
- - [Configuration Guide](docs/CONFIGURATION.md) - TOML config file setup
189
- - [CLI Mode Overview](docs/cli/README.md) - Database migration, export/import commands
190
- - [Migration Guides](docs/MIGRATION_v2.md) - Version upgrade guides
191
-
192
- ## Use Cases
193
-
194
- ### ADR-Driven Development with AI
195
- - **Architecture Evolution** – Document major architectural decisions with full context and alternatives
196
- - **Pattern Standardization** – Establish coding patterns as constraints, enforce via AI code generation
197
- - **Technical Debt Tracking** – Record temporary decisions with deprecation paths and future plans
198
- - **Onboarding Acceleration** – New AI sessions instantly understand architectural history
199
-
200
- ### Cross-Session AI Workflows
201
- - **Multi-Session Projects** – AI maintains context across days/weeks without re-reading documentation
202
- - **Multi-Agent Coordination** – Multiple AI agents share architectural understanding through ADR database
203
- - **Breaking Change Management** – Document API changes, deprecations, and migration paths systematically
204
- - **Refactoring Guidance** – AI references past decisions to maintain architectural consistency during refactors
205
-
206
- ### Real-World Examples
207
- ```bash
208
- # Document an architectural decision with alternatives
209
- /sqlew record we use PostgreSQL over MongoDB. MongoDB was rejected due to lack of ACID transactions for our financial data requirements.
210
-
211
- # Search for past decisions before making new ones
212
- /sqlew search why did we choose JWT authentication
213
-
214
- # Create constraint to guide AI code generation
215
- /sqlew add constraint all API endpoints must use /v2/ prefix for versioning
216
-
217
- # Plan implementation of a decision
218
- /sqlew plan implementing the PostgreSQL connection pool with pgBouncer
219
- ```
220
-
221
-
222
- ## Performance
223
-
224
- - **Query speed**: 2-50ms
225
- - **Concurrent agents**: 5+ simultaneous
226
- - **Storage efficiency**: ~140 bytes per decision
227
- - **Token savings**: 60-75% in typical projects
228
-
229
- ## Support
230
-
231
- Support development via [GitHub Sponsors](https://github.com/sponsors/sin5ddd) - One-time or monthly options available.
232
-
233
- ## Version
234
-
235
- Current version: **4.3.0**
236
- See [CHANGELOG.md](CHANGELOG.md) for release history.
237
-
238
- **What's New in v4.3.0:**
239
- - **Plan-to-ADR** - Automatic Architecture Decision Records from Claude Code Plan Mode
240
- - **Markdown Pattern Extraction** - 📌 Decision / 🚫 Constraint markers auto-detected
241
- - **One-shot Setup** - `sqlew --init` initializes everything (Skills, Hooks, gitignore)
242
- - **Parameter Aliases** - Simplified tool usage with intuitive parameter names
243
-
244
- See [docs/HOOKS_GUIDE.md](docs/HOOKS_GUIDE.md) for Claude Code Hooks details.
245
-
246
- ## License
247
-
248
- Apache License 2.0 - Free for commercial and personal use. See [LICENSE](LICENSE) for details.
249
-
250
- ## Links
251
-
252
- - [npm package](https://www.npmjs.com/package/sqlew)
253
- - [GitHub repository](https://github.com/sin5ddd/mcp-sqlew)
254
- - [Model Context Protocol](https://modelcontextprotocol.io/)
255
-
256
- ## Support & Documentation
257
-
258
- - Issues: [GitHub Issues](https://github.com/sin5ddd/mcp-sqlew/issues)
259
- - Docs: [docs/](docs/) directory
260
-
261
- ## Acknowledgments
262
-
263
- Built with [Model Context Protocol SDK](https://github.com/modelcontextprotocol/sdk), [better-sqlite3](https://github.com/WiseLibs/better-sqlite3), and TypeScript.
264
-
265
- **Author**: sin5ddd
266
-
267
- ---
268
-
269
- <!-- Git Hooks Integration Test: 2025-12-22 - This line tests post-merge hook triggering mark-done --auto -->
1
+ # sqlew
2
+ ![sqlew_logo](assets/sqlew-logo.png)
3
+
4
+ [![npm version](https://img.shields.io/npm/v/sqlew.svg)](https://www.npmjs.com/package/sqlew)
5
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
6
+
7
+ > **ADR (Architecture Decision Record) for AI Agents** – An MCP server that enables AI agents to create, query, and maintain architecture decision records in a structured SQL database
8
+
9
+ ## 🚀 Quick Start
10
+
11
+ ### 1. Install globally (Recommended)
12
+
13
+ ```bash
14
+ npm install -g sqlew
15
+ ```
16
+
17
+ ### 2. Add to your MCP config
18
+
19
+ Add to `.mcp.json` in your project root:
20
+
21
+ ```json
22
+ {
23
+ "mcpServers": {
24
+ "sqlew": {
25
+ "command": "sqlew"
26
+ }
27
+ }
28
+ }
29
+ ```
30
+
31
+ ### 3. Initialize project
32
+
33
+ ```bash
34
+ sqlew --init
35
+ ```
36
+
37
+ This one-shot command sets up:
38
+ - Claude Code Skills
39
+ - CLAUDE.md integration hints
40
+ - Plan-to-ADR hooks
41
+ - .gitignore entries
42
+
43
+ ### 4. Just use Plan Mode!
44
+
45
+ **That's it!** Now every time you:
46
+ 1. Create a plan in Claude Code
47
+ 2. Get user approval (ExitPlanMode)
48
+
49
+ → Your architectural decisions are **automatically recorded** as ADR knowledge.
50
+
51
+ No special commands needed. Just plan your work normally, and sqlew captures the decisions in the background.
52
+
53
+ ### Optional: /sqlew command
54
+
55
+ For manual queries and explicit decision recording:
56
+
57
+ ```bash
58
+ /sqlew # Show status
59
+ /sqlew search auth # Search past decisions
60
+ /sqlew record use Redis # Record a decision manually
61
+ ```
62
+
63
+ ---
64
+
65
+ ## What is sqlew?
66
+
67
+ **sqlew** is a Model Context Protocol (MCP) server that brings ADR (Architecture Decision Record) capabilities to AI agents through a shared SQL-backed repository.
68
+
69
+ ### The Problem: AI Agents Lack Decision Memory
70
+ Every AI session starts with zero context. Agents must re-learn architectural decisions, can reintroduce previously rejected patterns, and have no systematic way to understand WHY past choices were made.
71
+
72
+ Traditional ADR approaches use Markdown files scattered across repositories. While human-readable, this format creates challenges for AI agents:
73
+ - **No structured querying** – AI must read entire files to find relevant decisions
74
+ - **Context explosion** – Token costs grow linearly with decision history
75
+ - **No duplicate detection** – AI cannot easily identify similar or conflicting decisions
76
+ - **Poor discoverability** – Finding related decisions requires full-text search across many files
77
+
78
+ ### *sqlew* brings structured ADR to AI agents
79
+ sqlew transforms ADR from static documentation into a **queryable, AI-native decision database**:
80
+
81
+ - **Structured records** – Decisions stored as relational data with metadata, tags, and relationships
82
+ - **Efficient querying** – AI agents retrieve only relevant decisions via SQL queries
83
+ - **Smart suggestions** – Three-tier similarity system detects duplicate or related decisions
84
+ - **Constraint tracking** – Architectural rules and principles as first-class entities
85
+ - **Auto-capture** – Claude Code Hooks automatically record decisions from Plan Mode
86
+
87
+ > *This software does not send any data to external networks. We NEVER collect any data or usage statistics. Please use it with complete security.*
88
+
89
+ ## Why sqlew?
90
+
91
+ AI agents automatically accumulate project knowledge through Plan Mode. Decisions are stored in SQL for efficient querying.
92
+
93
+ **Perfect for:**
94
+ - 🏢 Large-scale projects with many architectural decisions
95
+ - 🔧 Long-term maintenance where context must persist across sessions
96
+ - 👥 Team environments where multiple AI agents share knowledge
97
+
98
+ **Key benefits:**
99
+ - ⚡ **60-75% token reduction** vs reading Markdown ADRs
100
+ - 🔍 **Millisecond queries** (2-50ms) even with thousands of decisions
101
+ - 🛡️ **Duplicate prevention** via similarity detection
102
+ - 📚 **Persistent memory** across all AI sessions
103
+
104
+ → See [ADR Concepts](docs/ADR_CONCEPTS.md) for detailed architecture.
105
+
106
+ ---
107
+
108
+ **Technical Features**: 6 MCP tools (3 core: decision, constraint, suggest + 3 utility: help, example, use_case), three-tier similarity detection (0-100 point scoring), ACID transaction support, multi-database backend (SQLite/PostgreSQL/MySQL), metadata-driven organization with layers and tags
109
+
110
+
111
+ ## Installation
112
+
113
+ ### Requirements
114
+ - Node.js 20.0.0 or higher
115
+ - npm or npx
116
+
117
+ ### Recommended: Global Install
118
+
119
+ ```bash
120
+ npm install -g sqlew
121
+ ```
122
+
123
+ > **Why global install?** Claude Code Hooks call `sqlew` directly from shell. Global install ensures hooks work correctly without npx overhead.
124
+
125
+ Then add to `.mcp.json` in your project root:
126
+
127
+ ```json
128
+ {
129
+ "mcpServers": {
130
+ "sqlew": {
131
+ "command": "sqlew"
132
+ }
133
+ }
134
+ }
135
+ ```
136
+
137
+ ### Alternative: npx (Not Recommended)
138
+
139
+ **⚠️ Not recommended**: npx usage prevents Claude Code Hooks from working, disabling Plan-to-ADR automatic decision capture. Use global install instead.
140
+
141
+ **Note**: First run initializes the database. Restart Claude Code to load the MCP server.
142
+
143
+ Each project maintains its own context database in `.sqlew/sqlew.db`.
144
+
145
+ **Custom database path:** Add path as argument: `"args": ["sqlew", "/path/to/db.db"]`
146
+ **Default location:** `.sqlew/sqlew.db`
147
+
148
+ ## Configuration
149
+
150
+ sqlew supports multiple database backends:
151
+
152
+ | Database | Use Case | Status |
153
+ |----------|----------|--------|
154
+ | **SQLite** | Personal/small projects | ✅ Default |
155
+ | **MySQL 8.0+ / MariaDB 10+** | Production, team sharing | ✅ Supported |
156
+ | **PostgreSQL 12+** | Production, team sharing | ✅ Supported |
157
+
158
+ Configuration is managed via `.sqlew/config.toml` file and CLI arguments.
159
+
160
+ → **[Full Configuration Guide](docs/CONFIGURATION.md)** - All options, database setup, validation rules
161
+
162
+ ## Documentation
163
+
164
+ Each tool supports `action: "help"` for full documentation and `action: "example"` for comprehensive usage examples.
165
+
166
+ And `action: "use_case"` shows how to use the tool in a real-world scenario.
167
+
168
+ ### On-Demand Documentation
169
+
170
+ All tools support:
171
+ - `action: "help"` - Parameter reference and descriptions
172
+ - `action: "example"` - Usage scenarios and examples
173
+ - `action: "use_case"` - Real-world usage examples
174
+
175
+ ### For AI Agents
176
+
177
+ **Essential Guides:**
178
+
179
+ **Advanced Features:**
180
+ - [Hooks Guide](docs/HOOKS_GUIDE.md) - Claude Code Hooks integration
181
+ - [Cross Database](docs/CROSS_DATABASE.md) - Multi-database support
182
+
183
+ **Reference:**
184
+ - [Configuration](docs/CONFIGURATION.md) - Config file setup, all options
185
+
186
+ ### Advanced Usage
187
+
188
+ - [Configuration Guide](docs/CONFIGURATION.md) - TOML config file setup
189
+ - [CLI Mode Overview](docs/cli/README.md) - Database migration, export/import commands
190
+ - [Migration Guides](docs/MIGRATION_v2.md) - Version upgrade guides
191
+
192
+ ## Use Cases
193
+
194
+ ### ADR-Driven Development with AI
195
+ - **Architecture Evolution** – Document major architectural decisions with full context and alternatives
196
+ - **Pattern Standardization** – Establish coding patterns as constraints, enforce via AI code generation
197
+ - **Technical Debt Tracking** – Record temporary decisions with deprecation paths and future plans
198
+ - **Onboarding Acceleration** – New AI sessions instantly understand architectural history
199
+
200
+ ### Cross-Session AI Workflows
201
+ - **Multi-Session Projects** – AI maintains context across days/weeks without re-reading documentation
202
+ - **Multi-Agent Coordination** – Multiple AI agents share architectural understanding through ADR database
203
+ - **Breaking Change Management** – Document API changes, deprecations, and migration paths systematically
204
+ - **Refactoring Guidance** – AI references past decisions to maintain architectural consistency during refactors
205
+
206
+ ### Real-World Examples
207
+ ```bash
208
+ # Document an architectural decision with alternatives
209
+ /sqlew record we use PostgreSQL over MongoDB. MongoDB was rejected due to lack of ACID transactions for our financial data requirements.
210
+
211
+ # Search for past decisions before making new ones
212
+ /sqlew search why did we choose JWT authentication
213
+
214
+ # Create constraint to guide AI code generation
215
+ /sqlew add constraint all API endpoints must use /v2/ prefix for versioning
216
+
217
+ # Plan implementation of a decision
218
+ /sqlew plan implementing the PostgreSQL connection pool with pgBouncer
219
+ ```
220
+
221
+
222
+ ## Performance
223
+
224
+ - **Query speed**: 2-50ms
225
+ - **Concurrent agents**: 5+ simultaneous
226
+ - **Storage efficiency**: ~140 bytes per decision
227
+ - **Token savings**: 60-75% in typical projects
228
+
229
+ ## Support
230
+
231
+ Support development via [GitHub Sponsors](https://github.com/sponsors/sin5ddd) - One-time or monthly options available.
232
+
233
+ ## Version
234
+
235
+ Current version: **4.3.1**
236
+ See [CHANGELOG.md](CHANGELOG.md) for release history.
237
+
238
+ **What's New in v4.3.1:**
239
+ - **`.claude/rules/` Integration** - Safer installation without modifying CLAUDE.md
240
+ - **Incremental gitignore** - Missing entries added even if sqlew section exists
241
+ - **Code Quality** - DRY improvements, obsolete code cleanup
242
+
243
+ See [docs/HOOKS_GUIDE.md](docs/HOOKS_GUIDE.md) for Claude Code Hooks details.
244
+
245
+ ## License
246
+
247
+ Apache License 2.0 - Free for commercial and personal use. See [LICENSE](LICENSE) for details.
248
+
249
+ ## Links
250
+
251
+ - [npm package](https://www.npmjs.com/package/sqlew)
252
+ - [GitHub repository](https://github.com/sin5ddd/mcp-sqlew)
253
+ - [Model Context Protocol](https://modelcontextprotocol.io/)
254
+
255
+ ## Support & Documentation
256
+
257
+ - Issues: [GitHub Issues](https://github.com/sin5ddd/mcp-sqlew/issues)
258
+ - Docs: [docs/](docs/) directory
259
+
260
+ ## Acknowledgments
261
+
262
+ Built with [Model Context Protocol SDK](https://github.com/modelcontextprotocol/sdk), [better-sqlite3](https://github.com/WiseLibs/better-sqlite3), and TypeScript.
263
+
264
+ **Author**: sin5ddd
265
+
266
+ ---
267
+
268
+ <!-- Git Hooks Integration Test: 2025-12-22 - This line tests post-merge hook triggering mark-done --auto -->