k0ntext 3.7.0 → 3.8.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 (39) hide show
  1. package/README.md +287 -383
  2. package/dist/agent-system/timestamp-tracker.d.ts +159 -0
  3. package/dist/agent-system/timestamp-tracker.d.ts.map +1 -0
  4. package/dist/agent-system/timestamp-tracker.js +405 -0
  5. package/dist/agent-system/timestamp-tracker.js.map +1 -0
  6. package/dist/agent-system/todolist-manager.d.ts +244 -0
  7. package/dist/agent-system/todolist-manager.d.ts.map +1 -0
  8. package/dist/agent-system/todolist-manager.js +580 -0
  9. package/dist/agent-system/todolist-manager.js.map +1 -0
  10. package/dist/cli/commands/snapshot.d.ts +28 -0
  11. package/dist/cli/commands/snapshot.d.ts.map +1 -0
  12. package/dist/cli/commands/snapshot.js +408 -0
  13. package/dist/cli/commands/snapshot.js.map +1 -0
  14. package/dist/cli/version/comparator.d.ts +1 -0
  15. package/dist/cli/version/comparator.d.ts.map +1 -1
  16. package/dist/cli/version/comparator.js +1 -0
  17. package/dist/cli/version/comparator.js.map +1 -1
  18. package/dist/db/client.d.ts +5 -0
  19. package/dist/db/client.d.ts.map +1 -1
  20. package/dist/db/client.js +7 -0
  21. package/dist/db/client.js.map +1 -1
  22. package/dist/db/schema.d.ts +1 -1
  23. package/dist/db/schema.js +1 -1
  24. package/dist/services/snapshot-manager.d.ts +251 -0
  25. package/dist/services/snapshot-manager.d.ts.map +1 -0
  26. package/dist/services/snapshot-manager.js +541 -0
  27. package/dist/services/snapshot-manager.js.map +1 -0
  28. package/docs/QUICKSTART.md +1 -1
  29. package/docs/TROUBLESHOOTING.md +51 -76
  30. package/docs/plans/2026-02-11-context-engineering-enhancement.md +1402 -0
  31. package/package.json +9 -2
  32. package/src/agent-system/timestamp-tracker.ts +520 -0
  33. package/src/agent-system/todolist-manager.ts +753 -0
  34. package/src/cli/commands/snapshot.ts +471 -0
  35. package/src/cli/version/comparator.ts +1 -0
  36. package/src/db/client.ts +8 -0
  37. package/src/db/migrations/0016_add_context_system_tables.sql +38 -0
  38. package/src/db/schema.ts +1 -1
  39. package/src/services/snapshot-manager.ts +719 -0
package/README.md CHANGED
@@ -1,4 +1,8 @@
1
- # K0ntext
1
+ <div align="center">
2
+
3
+ ![K0ntext Banner](./assets/banner.png)
4
+
5
+ **Universal AI context engineering for Claude, GitHub Copilot, Cline, Cursor, Windsurf, Aider, Continue, Antigravity, and Gemini with OpenRouter-powered intelligent analysis.**
2
6
 
3
7
  [![npm version](https://img.shields.io/npm/v/k0ntext.svg)](https://www.npmjs.com/package/k0ntext)
4
8
  [![npm downloads](https://img.shields.io/npm/dt/k0ntext.svg)](https://www.npmjs.com/package/k0ntext)
@@ -7,43 +11,31 @@
7
11
  [![Node Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org)
8
12
  [![MCP Protocol](https://img.shields.io/badge/MCP-Protocol-blue)](https://modelcontextprotocol.io)
9
13
 
10
- Universal AI context engineering for Claude, GitHub Copilot, Cline, Cursor, Windsurf, Aider, Continue, Antigravity, and Gemini with OpenRouter-powered intelligent analysis.
14
+ </div>
15
+
16
+ ---
11
17
 
12
18
  ## Table of Contents
13
19
 
14
- - [Quick Start](#-quick-start-30-seconds)
15
- - [Zero-to-Hero Workflow](#-zero-to-hero-workflow)
16
- - [Windows Support](#-windows-support)
17
- - [Features Overview](#-features-overview)
18
- - [Interactive REPL Shell](#-interactive-repl-shell-v330)
19
- - [Enhanced TUI Panels](#-enhanced-tui-panels-v331)
20
- - [Intelligent Analysis](#-intelligent-analysis)
21
- - [Semantic Search](#-semantic-search)
22
- - [Cross-Tool Sync](#-cross-tool-sync)
23
- - [Git Hooks Automation](#-git-hooks-automation-v310)
24
- - [Drift Detection](#-drift-detection-v310)
25
- - [Fact-Checking](#-fact-checking-v310)
26
- - [Map-Based Context](#-map-based-context-v310)
27
- - [MCP Server](#-mcp-server)
28
- - [Complete CLI](#-complete-cli-18-commands)
29
- - [Smart Agents](#-smart-agents)
30
- - [SQLite Storage](#-sqlite-storage)
31
- - [Complete CLI Reference](#-complete-cli-reference)
32
- - [Core Commands](#core-commands)
33
- - [v3.1.0 New Commands](#v310-new-commands)
34
- - [Git Hooks Workflow](#-git-hooks-workflow-v310)
35
- - [MCP Server Usage](#-mcp-server-usage)
36
- - [Supported AI Tools](#-supported-ai-tools)
37
- - [Configuration](#-configuration)
38
- - [Architecture](#-architecture)
39
- - [Development](#-development)
40
- - [Performance Monitoring](#-performance-monitoring)
41
- - [Troubleshooting](#-troubleshooting)
42
- - [Community](#-community)
20
+ - [Quick Start](#quick-start)
21
+ - [Zero-to-Hero Workflow](#zero-to-hero-workflow)
22
+ - [Windows Support](#windows-support)
23
+ - [Features Overview](#features-overview)
24
+ - [Latest Release](#latest-release-v380)
25
+ - [v3.8.0 Release](#latest-release-v380) - Context System, Snapshots, & Bug Fixes
26
+ - [Complete CLI Reference](#complete-cli-reference)
27
+ - [MCP Server Usage](#mcp-server-usage)
28
+ - [Supported AI Tools](#supported-ai-tools)
29
+ - [Configuration](#configuration)
30
+ - [Architecture](#architecture)
31
+ - [Development](#development)
32
+ - [Performance Monitoring](#performance-monitoring)
33
+ - [Troubleshooting](#troubleshooting)
34
+ - [Community](#community)
43
35
 
44
36
  ---
45
37
 
46
- ## 🚀 Quick Start (30 Seconds)
38
+ ## Quick Start
47
39
 
48
40
  ```bash
49
41
  # Install globally
@@ -59,7 +51,7 @@ k0ntext generate
59
51
  k0ntext mcp
60
52
  ```
61
53
 
62
- ## 🎯 Zero-to-Hero Workflow
54
+ ## Zero-to-Hero Workflow
63
55
 
64
56
  ### New Project Setup
65
57
  ```bash
@@ -91,7 +83,7 @@ k0ntext generate --force
91
83
  k0ntext validate --strict
92
84
  ```
93
85
 
94
- ## 🖥️ Windows Support
86
+ ## Windows Support
95
87
 
96
88
  K0ntext uses native SQLite extensions for high-performance vector search.
97
89
 
@@ -100,224 +92,153 @@ K0ntext uses native SQLite extensions for high-performance vector search.
100
92
  - **Instant install:** These versions install without extra tools
101
93
  - **Non-LTS versions (v23/v24):** May require [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/) to compile the database driver
102
94
 
103
- ## Features Overview
95
+ ## Features Overview
104
96
 
105
- ### 🖥️ Interactive REPL Shell (v3.3.0)
97
+ ### Interactive REPL Shell
106
98
  - **Auto-start**: Running `k0ntext` with no arguments launches the interactive shell
107
99
  - **Session persistence**: Command history and statistics saved across sessions
108
100
  - **Built-in commands**: help, stats, index, search, config, drift, init, update, exit
109
101
  - **Orange gradient theme** with Unicode/ASCII fallback and terminal capability detection
110
102
  - **Update checker** with automatic version notifications on startup
111
103
 
112
- ### 🎨 Enhanced TUI Panels (v3.3.1)
113
- - **Advanced Search Panel** - Filtered, sortable search with `--type`, `--sort`, `--limit` flags and content previews
114
- - **Configuration UI** - Interactive editor with 4 categories (Project, AI Tools, Features, Display)
115
- - **Indexing Progress** - Real-time multi-stage progress visualization with ora spinner
116
- - **Drift Detection** - Three-axis analysis (file dates, structure, git diff) with severity-coded reporting
104
+ ### Enhanced TUI Panels
105
+ - **Advanced Search Panel** -- Filtered, sortable search with `--type`, `--sort`, `--limit` flags and content previews
106
+ - **Configuration UI** -- Interactive editor with 4 categories (Project, AI Tools, Features, Display)
107
+ - **Indexing Progress** -- Real-time multi-stage progress visualization with ora spinner
108
+ - **Drift Detection** -- Three-axis analysis (file dates, structure, git diff) with severity-coded reporting
117
109
 
118
- ### 🧠 Intelligent Analysis
110
+ ### Intelligent Analysis
119
111
  - OpenRouter-powered codebase analysis with embeddings
120
112
  - Tech stack detection and documentation
121
113
  - Workflow discovery and categorization
122
114
  - Automatic context generation
123
- - **Centralized model configuration** (v3.1.0) - Single source of truth for all AI operations
115
+ - Centralized model configuration -- single source of truth for all AI operations
124
116
 
125
- ### 🔍 Semantic Search
117
+ ### Semantic Search
126
118
  - Vector database (sqlite-vec) for intelligent code retrieval
127
119
  - Hybrid search (text + semantic)
128
120
  - Content type filtering (workflow, agent, command, code, doc, etc.)
129
121
  - Real-time indexing with watch mode
130
122
 
131
- ### 🔄 Cross-Tool Sync
123
+ ### Cross-Tool Sync
132
124
  - **9 AI Tools Supported:** Claude, Copilot, Cline, Antigravity, Windsurf, Aider, Continue, Cursor, Gemini
133
125
  - Automatic synchronization between tool configurations
134
126
  - Change detection with SHA256 hashing
135
127
  - Sync status monitoring
136
- - **Intelligent cross-sync** (v3.1.0) - AI-powered propagation of changes across tools
128
+ - Intelligent cross-sync -- AI-powered propagation of changes across tools
137
129
 
138
- ### 🤖 Git Hooks Automation (v3.1.0)
139
- - **Pre-commit workflow** - Automatic context maintenance
130
+ ### Git Hooks Automation
131
+ - **Pre-commit workflow** -- Automatic context maintenance
140
132
  - Drift detection on every commit
141
133
  - Automatic cross-sync when drift detected
142
134
  - Updated context files auto-added to commits
143
135
 
144
- ### 🎯 Drift Detection (v3.1.0)
145
- - **AI-powered semantic analysis** - Detect when documentation diverges from code
136
+ ### Drift Detection
137
+ - **AI-powered semantic analysis** -- Detect when documentation diverges from code
146
138
  - Replaces hash-based checks with intelligent understanding
147
139
  - Severity-based reporting (high/medium/low)
148
140
  - Automatic fix suggestions
149
141
 
150
- ### 📋 Fact-Checking (v3.1.0)
142
+ ### Fact-Checking
151
143
  - Validate documentation accuracy against codebase
152
144
  - Identify outdated APIs, wrong file paths, missing dependencies
153
145
  - Confidence scoring for each claim
154
146
 
155
- ### 🗺️ Map-Based Context (v3.1.0)
147
+ ### Map-Based Context
156
148
  - Concise, structured context files
157
149
  - Reduce hallucination through precise references
158
150
  - Alternative to verbose documentation format
159
151
 
160
- ### 🔢 Version Detection (v3.4.0)
161
- - **Automatic version checking** - Detects outdated context files
162
- - **Semantic version parsing** - Supports 5 version marker formats
163
- - **Update type indicators** - Major/minor/patch with emoji (🚨/✨/🔧)
164
- - **Database tracking** - Stores version history and check timestamps
165
- - **Integrated into init** - `k0ntext check` command and `--no-version-check` option
166
-
167
- ### 📝 User Modification Handling (v3.4.0)
168
- - **SHA-256 hash detection** - Detects when users edit generated files
169
- - **Automatic backup creation** - Creates backups before overwriting modified files
170
- - **Dual backup strategy** - File-copy with git-stash fallback
171
- - **Interactive prompts** - Asks user before overwriting custom changes
172
- - **Restore system** - `k0ntext restore` command for backup recovery
173
-
174
- ### 🎨 Template Engine Enhancement (v3.4.0)
175
- - **Handlebars integration** - Rich template-based content generation
176
- - **15 custom helpers** - join, first, truncate, slugify, formatDate, eq, ne, and, or, defaults, json, keys, values, length
177
- - **Rich project data** - Generated files include actual project metadata
178
- - **Graceful fallback** - Inline functions when templates unavailable
179
-
180
- ### 🔄 Template Sync System (v3.5.0)
181
- - **Automatic `.claude/` sync** - Syncs commands/, agents/, schemas/, standards/, tools/, automation/ from package
182
- - **Hash-based change detection** - SHA-256 (16 char) for consistency with DatabaseClient
183
- - **File state classification** - identical, safe-update, conflict, new, deleted, user-only
184
- - **Auto-merge strategies** - Safe updates automatically applied, conflicts prompt user
185
- - **Interactive conflict resolution** - Show diff, keep-local, overwrite, or skip options
186
- - **Batch resolution** - Keep-all, overwrite-all, or individual for multiple conflicts
187
- - **Backup before overwrite** - Automatic backups to `.k0ntext/backups/`
188
- - **Archive removed files** - Moved to `.k0ntext/archive/` with timestamp
189
- - **Dual manifest tracking** - Database + file (`.claude/.k0ntext-manifest.json`)
190
- - **Init integration** - Runs automatically during `k0ntext init` (skip with `--no-template-sync`)
191
-
192
- ### 🤖 MCP Server
193
- - **Auto-Configuration** (v3.1.1) - MCP server automatically configured in `.claude/settings.json` on init
152
+ ### Version Detection
153
+ - **Automatic version checking** -- Detects outdated context files
154
+ - **Semantic version parsing** -- Supports 5 version marker formats
155
+ - **Update type indicators** -- Major/minor/patch with emoji
156
+ - **Database tracking** -- Stores version history and check timestamps
157
+
158
+ ### User Modification Handling
159
+ - **SHA-256 hash detection** -- Detects when users edit generated files
160
+ - **Automatic backup creation** -- Creates backups before overwriting modified files
161
+ - **Dual backup strategy** -- File-copy with git-stash fallback
162
+ - **Interactive prompts** -- Asks user before overwriting custom changes
163
+
164
+ ### Template Engine
165
+ - **Handlebars integration** -- Rich template-based content generation
166
+ - **15 custom helpers** -- join, first, truncate, slugify, formatDate, eq, ne, and, or, defaults, json, keys, values, length
167
+ - **Rich project data** -- Generated files include actual project metadata
168
+
169
+ ### Template Sync System
170
+ - **Automatic `.claude/` sync** -- Syncs commands/, agents/, schemas/, standards/, tools/, automation/ from package
171
+ - **Hash-based change detection** -- SHA-256 for consistency with DatabaseClient
172
+ - **File state classification** -- identical, safe-update, conflict, new, deleted, user-only
173
+ - **Interactive conflict resolution** -- Show diff, keep-local, overwrite, or skip options
174
+ - **Backup before overwrite** -- Automatic backups to `.k0ntext/backups/`
175
+
176
+ ### Database Snapshots
177
+ - **Create/restore/diff snapshots** -- Full database save/restore with gzip compression
178
+ - **Snapshot comparison** -- Diff two snapshots to see what changed
179
+ - **Persistent todo lists** -- Survive context compactions via markdown files
180
+
181
+ ### MCP Server
182
+ - **Auto-Configuration** -- MCP server automatically configured in `.claude/settings.json` on init
194
183
  - **10 Tools:** search_context, get_item, add_knowledge, analyze, get_tool_configs, query_graph, get_stats
195
184
  - **6 Prompts:** context-engineer, core-architect, api-developer, database-ops, integration-hub, deployment-ops
196
185
  - Real-time context access for AI assistants
197
186
  - Knowledge graph traversal
198
187
 
199
- ### 🛠️ Complete CLI (22 Commands)
200
- - `init` - Initialize with intelligent analysis **(auto-configures MCP in v3.1.1)**
201
- - `generate` - Generate context files for all tools
202
- - `mcp` - Start MCP server
203
- - `sync` - Sync across AI tools
204
- - `cleanup` - Clean up conflicting tool folders
205
- - `validate` - Validate context files
206
- - `export` - Export database
207
- - `import` - Import from exports
208
- - `performance` - Show performance metrics
209
- - `watch` - Auto-index file changes
210
- - `index` - Index codebase
211
- - `search` - Search indexed content
212
- - `stats` - View database statistics
213
- - **`check`** - Check if context files are outdated (v3.4.0)
214
- - **`restore`** - Restore AI tool config files from backups (v3.4.0)
215
- - **`sync-templates`** - Sync `.claude/` templates from package (v3.5.0)
216
- - **`template-status`** - Show template sync status (v3.5.0)
217
- - **`drift-detect`** - AI-powered documentation drift detection (v3.1.0)
218
- - **`cross-sync`** - Intelligent sync across all AI tools (v3.1.0)
219
- - **`hooks`** - Git hooks management (install/uninstall/status) (v3.1.0)
220
- - **`fact-check`** - Validate documentation accuracy (v3.1.0)
221
- - `generate --map` - Generate concise map-based context files (v3.1.0)
222
-
223
- ### 📊 Smart Agents
224
- - **CleanupAgent** - Remove conflicting AI tool folders (.cursor, .windsurf, .cline, etc.)
225
- - **PerformanceMonitorAgent** - Track database performance and suggest optimizations
226
- - **DriftAgent** (v3.1.0) - AI-powered documentation drift detection
227
- - **FactCheckAgent** (v3.1.0) - Validate documentation accuracy against codebase
228
-
229
- ### 🗃️ SQLite Storage
188
+ ### Complete CLI
189
+ - `init` -- Initialize with intelligent analysis (auto-configures MCP)
190
+ - `generate` -- Generate context files for all tools
191
+ - `mcp` -- Start MCP server
192
+ - `sync` -- Sync across AI tools
193
+ - `cleanup` -- Clean up conflicting tool folders
194
+ - `validate` -- Validate context files
195
+ - `export` -- Export database
196
+ - `import` -- Import from exports
197
+ - `performance` -- Show performance metrics
198
+ - `watch` -- Auto-index file changes
199
+ - `index` -- Index codebase
200
+ - `search` -- Search indexed content
201
+ - `stats` -- View database statistics
202
+ - `check` -- Check if context files are outdated
203
+ - `restore` -- Restore AI tool config files from backups
204
+ - `sync-templates` -- Sync `.claude/` templates from package
205
+ - `template-status` -- Show template sync status
206
+ - `drift-detect` -- AI-powered documentation drift detection
207
+ - `cross-sync` -- Intelligent sync across all AI tools
208
+ - `hooks` -- Git hooks management (install/uninstall/status)
209
+ - `fact-check` -- Validate documentation accuracy
210
+ - `generate --map` -- Generate concise map-based context files
211
+ - `snapshot` -- Create/restore/list/diff/delete database snapshots
212
+ - `migrate` -- Manage database migrations
213
+ - `shell` -- Launch interactive REPL shell
214
+
215
+ ### Smart Agents
216
+ - **CleanupAgent** -- Remove conflicting AI tool folders (.cursor, .windsurf, .cline, etc.)
217
+ - **PerformanceMonitorAgent** -- Track database performance and suggest optimizations
218
+ - **DriftAgent** -- AI-powered documentation drift detection
219
+ - **FactCheckAgent** -- Validate documentation accuracy against codebase
220
+
221
+ ### SQLite Storage
230
222
  - Persistent database with SHA256 change detection
231
223
  - Embeddings support for semantic search
232
224
  - Knowledge graph relationships
233
225
  - Automatic schema migrations
234
226
 
235
- ## 🆕 v3.5.0 - Template Sync System
236
-
237
- ### Smart Template Management
238
-
239
- K0ntext v3.5.0 introduces a comprehensive template sync system that automatically keeps your `.claude/` directory up-to-date with the latest package templates while preserving your customizations.
240
-
241
- **Key Features:**
242
- - ✅ **Automatic sync on init** - Templates are synced during `k0ntext init`
243
- - ✅ **User modification detection** - Detects files you've customized
244
- - ✅ **Interactive conflict resolution** - Choose to keep your changes or use templates
245
- - ✅ **Hash-based comparison** - Efficient SHA-256 change detection
246
- - ✅ **Backup before overwrites** - Automatic backups to `.k0ntext/backups/`
247
- - ✅ **Dry-run mode** - Preview changes before applying them
248
- - ✅ **Selective sync** - Sync specific directories (commands, agents, etc.)
249
-
250
- ### How It Works
251
-
252
- 1. **First init** - Creates all 55 template files (agents, commands, schemas, standards, tools)
253
- 2. **You modify files** - Your customizations are tracked
254
- 3. **Re-run init** - Detects your modifications and prompts for resolution
255
- 4. **Force sync** - Use `--force` to auto-overwrite with templates
256
-
257
- ### User Modification Detection
258
-
259
- The system intelligently detects when you've modified template files:
260
-
261
- ```bash
262
- # You customize a file
263
- echo "# My custom notes" >> .claude/commands/analytics.md
264
-
265
- # Re-run init - detects modification
266
- k0ntext init
267
-
268
- # Output:
269
- # ⚠ 1 conflict(s) detected:
270
- # ⚠ commands/analytics.md [modified]
271
- #
272
- # File: commands/analytics.md
273
- # State: Modified in both template and locally
274
- # ⚠ You have modified this file
275
- # Template hash: 375ec9c90c168811
276
- # Local hash: ee727b7a1a20a0c2
277
- # ? How would you like to resolve this?
278
- # Show diff
279
- # ❯ Keep local version
280
- # Overwrite with template
281
- # Skip for now
282
- ```
283
-
284
- ### New Commands
285
-
286
- ```bash
287
- # Sync templates and handle conflicts
288
- k0ntext sync-templates # Interactive mode
289
- k0ntext sync-templates --dry-run # Preview changes
290
- k0ntext sync-templates --force # Auto-overwrite conflicts
291
- k0ntext sync-templates --verbose # Show detailed diffs
292
-
293
- # Check sync status
294
- k0ntext template-status # Quick status check
295
- k0ntext template-status --verbose # Detailed file listings
296
-
297
- # Skip template sync during init
298
- k0ntext init --no-template-sync
299
- ```
227
+ ---
300
228
 
301
- ### Bug Fixes in v3.5.0
229
+ ## Latest Release (v3.8.0)
302
230
 
303
- - **Fixed user modification detection** - Now detects changes made after initial sync
304
- - **Fixed force sync** - `--force` now actually overwrites conflict files
305
- - **Fixed path resolution** - Templates are correctly found from compiled JavaScript
306
- - **Fixed conflict tracking** - Resolved conflicts are properly excluded from counts
231
+ - **Database Snapshots** -- Create, restore, diff, and delete database snapshots with gzip compression
232
+ - **Persistent Todo Lists** -- TodoListManager service with markdown files that survive context compactions
233
+ - **AI-Powered Cleanup** -- CleanupAgent with OpenRouter-powered analysis for intelligent folder cleanup
234
+ - **Timestamp Tracking** -- TimestampTracker service for precise sync tracking
235
+ - **Database Schema v1.6.0** -- New tables for todo sessions, tasks, file timestamps, and generated files
307
236
 
308
- ### Template Files Synced
237
+ See [CHANGELOG.md](CHANGELOG.md) for full release history.
309
238
 
310
- | Directory | Files | Description |
311
- |-----------|-------|-------------|
312
- | `commands/` | 12 | Slash command definitions |
313
- | `agents/` | 6 | AI agent configurations |
314
- | `schemas/` | 14 | JSON schemas for validation |
315
- | `standards/` | 4 | Coding standards |
316
- | `tools/` | 3 | Tool-specific configurations |
317
- | `automation/` | 1 | Automation settings |
318
- | **Total** | **40** | **Excluded:** `context/`, `indexes/` (user-specific) |
239
+ ---
319
240
 
320
- ## 📖 Complete CLI Reference
241
+ ## Complete CLI Reference
321
242
 
322
243
  ### Core Commands
323
244
 
@@ -336,10 +257,10 @@ k0ntext init --no-intelligent
336
257
  ```
337
258
 
338
259
  **Options:**
339
- - `--no-intelligent` - Skip OpenRouter-powered analysis
340
- - `--no-version-check` - Skip version checking for outdated context files (v3.4.0)
341
- - `--no-template-sync` - Skip template synchronization (v3.5.0)
342
- - `-v, --verbose` - Show detailed output
260
+ - `--no-intelligent` -- Skip OpenRouter-powered analysis
261
+ - `--no-version-check` -- Skip version checking for outdated context files
262
+ - `--no-template-sync` -- Skip template synchronization
263
+ - `-v, --verbose` -- Show detailed output
343
264
 
344
265
  #### `k0ntext generate`
345
266
  Generate context files for all AI tools.
@@ -359,10 +280,10 @@ k0ntext generate -v
359
280
  ```
360
281
 
361
282
  **Options:**
362
- - `-ai, --ai <tools>` - Specific tools (comma-separated)
363
- - `--force` - Force regenerate all files
364
- - `--map` - Use concise map-based format (new in v3.1.0)
365
- - `-v, --verbose` - Show detailed output
283
+ - `-ai, --ai <tools>` -- Specific tools (comma-separated)
284
+ - `--force` -- Force regenerate all files
285
+ - `--map` -- Use concise map-based format
286
+ - `-v, --verbose` -- Show detailed output
366
287
 
367
288
  #### `k0ntext mcp`
368
289
  Start the Model Context Protocol server.
@@ -376,7 +297,7 @@ k0ntext mcp --db .my-context.db
376
297
  ```
377
298
 
378
299
  **Options:**
379
- - `--db <path>` - Database file path
300
+ - `--db <path>` -- Database file path
380
301
 
381
302
  #### `k0ntext sync`
382
303
  Synchronize context across AI tools.
@@ -399,10 +320,10 @@ k0ntext sync --force
399
320
  ```
400
321
 
401
322
  **Options:**
402
- - `--check` - Only check synchronization status
403
- - `--from <tool>` - Sync from specific tool
404
- - `--to <tool>` - Sync to specific tool
405
- - `--force` - Force sync even if up-to-date
323
+ - `--check` -- Only check synchronization status
324
+ - `--from <tool>` -- Sync from specific tool
325
+ - `--to <tool>` -- Sync to specific tool
326
+ - `--force` -- Force sync even if up-to-date
406
327
 
407
328
  #### `k0ntext cleanup`
408
329
  Clean up context folders from other AI tools.
@@ -419,10 +340,10 @@ k0ntext cleanup -v
419
340
  ```
420
341
 
421
342
  **Options:**
422
- - `--dry-run` - Show what would be removed
423
- - `--keep <folders>` - Folders to keep (comma-separated)
424
- - `--ai` - Use AI to intelligently analyze which folders can be safely removed (new in v3.1.0)
425
- - `-v, --verbose` - Show detailed output
343
+ - `--dry-run` -- Show what would be removed
344
+ - `--keep <folders>` -- Folders to keep (comma-separated)
345
+ - `--ai` -- Use AI to intelligently analyze which folders can be safely removed
346
+ - `-v, --verbose` -- Show detailed output
426
347
 
427
348
  #### `k0ntext validate`
428
349
  Validate context files and AI tool configurations.
@@ -439,8 +360,8 @@ k0ntext validate --strict
439
360
  ```
440
361
 
441
362
  **Options:**
442
- - `--fix` - Automatically fix validation errors
443
- - `--strict` - Treat warnings as errors
363
+ - `--fix` -- Automatically fix validation errors
364
+ - `--strict` -- Treat warnings as errors
444
365
 
445
366
  #### `k0ntext export <output>`
446
367
  Export context database to file.
@@ -457,8 +378,8 @@ k0ntext export workflows.json --type workflow
457
378
  ```
458
379
 
459
380
  **Options:**
460
- - `--format <format>` - Export format (json, markdown)
461
- - `--type <type>` - Filter by context type
381
+ - `--format <format>` -- Export format (json, markdown)
382
+ - `--type <type>` -- Filter by context type
462
383
 
463
384
  #### `k0ntext import <input>`
464
385
  Import context data from exported files.
@@ -472,8 +393,8 @@ k0ntext import context.json --merge
472
393
  ```
473
394
 
474
395
  **Options:**
475
- - `--format <format>` - Import format (json, markdown)
476
- - `--merge` - Merge with existing data (default: replace)
396
+ - `--format <format>` -- Import format (json, markdown)
397
+ - `--merge` -- Merge with existing data (default: replace)
477
398
 
478
399
  #### `k0ntext performance`
479
400
  Show performance metrics and optimization suggestions.
@@ -487,7 +408,7 @@ k0ntext performance --json
487
408
  ```
488
409
 
489
410
  **Options:**
490
- - `--json` - Output as JSON
411
+ - `--json` -- Output as JSON
491
412
 
492
413
  #### `k0ntext watch`
493
414
  Watch for file changes and auto-update index.
@@ -501,7 +422,7 @@ k0ntext watch -d 2000
501
422
  ```
502
423
 
503
424
  **Options:**
504
- - `-d, --delay <ms>` - Debounce delay in milliseconds
425
+ - `-d, --delay <ms>` -- Debounce delay in milliseconds
505
426
 
506
427
  #### `k0ntext index`
507
428
  Index codebase content into the database.
@@ -524,11 +445,11 @@ k0ntext index -v
524
445
  ```
525
446
 
526
447
  **Options:**
527
- - `--docs` - Index documentation files only
528
- - `--code` - Index source code only
529
- - `--tools` - Index AI tool configurations only
530
- - `--all` - Index everything (default)
531
- - `-v, --verbose` - Show detailed output
448
+ - `--docs` -- Index documentation files only
449
+ - `--code` -- Index source code only
450
+ - `--tools` -- Index AI tool configurations only
451
+ - `--all` -- Index everything (default)
452
+ - `-v, --verbose` -- Show detailed output
532
453
 
533
454
  #### `k0ntext search <query>`
534
455
  Search across indexed content.
@@ -551,9 +472,9 @@ k0ntext search "database" -l 5
551
472
  ```
552
473
 
553
474
  **Options:**
554
- - `-t, --type <type>` - Filter by type
555
- - `-l, --limit <n>` - Maximum results (default: 10)
556
- - `-m, --mode <mode>` - Search mode: text, semantic, hybrid
475
+ - `-t, --type <type>` -- Filter by type
476
+ - `-l, --limit <n>` -- Maximum results (default: 10)
477
+ - `-m, --mode <mode>` -- Search mode: text, semantic, hybrid
557
478
 
558
479
  #### `k0ntext stats`
559
480
  Show database and indexing statistics.
@@ -561,14 +482,11 @@ Show database and indexing statistics.
561
482
  ```bash
562
483
  # View all statistics
563
484
  k0ntext stats
564
-
565
- # Show specific stats (filtered by index)
566
- k0ntext stats | grep "Context Items"
567
485
  ```
568
486
 
569
- ### v3.1.0 New Commands
487
+ ### Context Management Commands
570
488
 
571
- #### `k0ntext check` (v3.4.0)
489
+ #### `k0ntext check`
572
490
  Check if context files are outdated.
573
491
 
574
492
  ```bash
@@ -586,11 +504,11 @@ k0ntext check --update --force
586
504
  ```
587
505
 
588
506
  **Options:**
589
- - `--update` - Prompt to update outdated files
590
- - `--force` - Update without prompting
591
- - `-v, --verbose` - Show detailed output
507
+ - `--update` -- Prompt to update outdated files
508
+ - `--force` -- Update without prompting
509
+ - `-v, --verbose` -- Show detailed output
592
510
 
593
- #### `k0ntext restore` (v3.4.0)
511
+ #### `k0ntext restore`
594
512
  Restore AI tool config files from backups.
595
513
 
596
514
  ```bash
@@ -605,18 +523,15 @@ k0ntext restore --backup "AI_CONTEXT.md.2026-02-09T14.30.45.123Z.bak"
605
523
 
606
524
  # Restore for specific tool
607
525
  k0ntext restore --tool claude --list
608
-
609
- # Force restore without confirmation
610
- k0ntext restore --backup <path> --force
611
526
  ```
612
527
 
613
528
  **Options:**
614
- - `--list` - List available backups
615
- - `--backup <path>` - Restore from specific backup path
616
- - `--tool <name>` - Filter by tool name
617
- - `--force` - Restore without confirmation
529
+ - `--list` -- List available backups
530
+ - `--backup <path>` -- Restore from specific backup path
531
+ - `--tool <name>` -- Filter by tool name
532
+ - `--force` -- Restore without confirmation
618
533
 
619
- #### `k0ntext sync-templates` (v3.5.0)
534
+ #### `k0ntext sync-templates`
620
535
  Sync `.claude/` templates from package `templates/base/`.
621
536
 
622
537
  ```bash
@@ -631,22 +546,16 @@ k0ntext sync-templates --subdirs commands,agents
631
546
 
632
547
  # Force overwrite all conflicts
633
548
  k0ntext sync-templates --force
634
-
635
- # Verbose output with diffs
636
- k0ntext sync-templates --verbose
637
-
638
- # Skip archiving removed files
639
- k0ntext sync-templates --no-archive
640
549
  ```
641
550
 
642
551
  **Options:**
643
- - `--dry-run` - Show changes without applying
644
- - `--force` - Auto-overwrite conflicts without prompting
645
- - `--subdirs <dirs>` - Comma-separated subdirectories to sync (commands,agents,schemas,standards,tools,automation)
646
- - `-v, --verbose` - Show detailed output including diffs
647
- - `--no-archive` - Skip archiving removed files
552
+ - `--dry-run` -- Show changes without applying
553
+ - `--force` -- Auto-overwrite conflicts without prompting
554
+ - `--subdirs <dirs>` -- Comma-separated subdirectories to sync
555
+ - `-v, --verbose` -- Show detailed output including diffs
556
+ - `--no-archive` -- Skip archiving removed files
648
557
 
649
- #### `k0ntext template-status` (v3.5.0)
558
+ #### `k0ntext template-status`
650
559
  Show template sync status.
651
560
 
652
561
  ```bash
@@ -657,10 +566,24 @@ k0ntext template-status
657
566
  k0ntext template-status --verbose
658
567
  ```
659
568
 
660
- **Options:**
661
- - `-v, --verbose` - Show detailed status with file listings
569
+ #### `k0ntext snapshot`
570
+ Manage database snapshots.
571
+
572
+ ```bash
573
+ # Create a snapshot
574
+ k0ntext snapshot
575
+
576
+ # Restore from snapshot
577
+ k0ntext snapshot restore
578
+
579
+ # List all snapshots
580
+ k0ntext snapshots
662
581
 
663
- ### v3.1.0 New Commands (Legacy)
582
+ # Diff two snapshots
583
+ k0ntext snap-diff
584
+ ```
585
+
586
+ ### AI Analysis Commands
664
587
 
665
588
  #### `k0ntext drift-detect`
666
589
  AI-powered documentation drift detection using semantic analysis.
@@ -672,23 +595,16 @@ k0ntext drift-detect
672
595
  # Detect drift in specific paths
673
596
  k0ntext drift-detect -p CLAUDE.md,.cursorrules
674
597
 
675
- # Check up to 20 files
676
- k0ntext drift-detect --max-files 20
677
-
678
598
  # Strict mode (fails on any drift)
679
599
  k0ntext drift-detect --strict
680
-
681
- # Verbose output
682
- k0ntext drift-detect -v
683
600
  ```
684
601
 
685
602
  **Options:**
686
- - `--fix` - Automatically fix detected drift (experimental)
687
- - `--strict` - Fail on any drift detected
688
- - `-p, --paths <paths>` - Comma-separated paths to check
689
- - `--max-files <number>` - Maximum files to check (default: 50)
690
- - `--model <model>` - Override model (not recommended)
691
- - `-v, --verbose` - Show detailed output
603
+ - `--fix` -- Automatically fix detected drift (experimental)
604
+ - `--strict` -- Fail on any drift detected
605
+ - `-p, --paths <paths>` -- Comma-separated paths to check
606
+ - `--max-files <number>` -- Maximum files to check (default: 50)
607
+ - `-v, --verbose` -- Show detailed output
692
608
 
693
609
  #### `k0ntext cross-sync`
694
610
  Intelligently synchronize context across all AI tools after drift detection.
@@ -702,20 +618,14 @@ k0ntext cross-sync --dry-run
702
618
 
703
619
  # Sync to specific tools only
704
620
  k0ntext cross-sync --to claude,cursor
705
-
706
- # Sync from specific files
707
- k0ntext cross-sync --affected CLAUDE.md,.cursorrules
708
-
709
- # Verbose output with details
710
- k0ntext cross-sync -v
711
621
  ```
712
622
 
713
623
  **Options:**
714
- - `--dry-run` - Show what would be synced without making changes
715
- - `--from <tool>` - Sync only from specific tool
716
- - `--to <tools>` - Sync only to specific tools (comma-separated)
717
- - `--affected <files>` - Comma-separated list of affected files
718
- - `-v, --verbose` - Show detailed sync output
624
+ - `--dry-run` -- Show what would be synced without making changes
625
+ - `--from <tool>` -- Sync only from specific tool
626
+ - `--to <tools>` -- Sync only to specific tools (comma-separated)
627
+ - `--affected <files>` -- Comma-separated list of affected files
628
+ - `-v, --verbose` -- Show detailed sync output
719
629
 
720
630
  #### `k0ntext hooks`
721
631
  Manage git hooks for automatic context synchronization.
@@ -724,9 +634,6 @@ Manage git hooks for automatic context synchronization.
724
634
  # Install git hooks
725
635
  k0ntext hooks install
726
636
 
727
- # Install with force (overwrite existing)
728
- k0ntext hooks install -f
729
-
730
637
  # Uninstall git hooks
731
638
  k0ntext hooks uninstall
732
639
 
@@ -735,13 +642,9 @@ k0ntext hooks status
735
642
  ```
736
643
 
737
644
  **Subcommands:**
738
- - `install` - Install pre-commit hook for automatic workflow
739
- - `uninstall` - Remove installed hooks
740
- - `status` - Show hook installation status
741
-
742
- **Install Options:**
743
- - `-f, --force` - Overwrite existing hooks
744
- - `--skip-backup` - Skip backing up existing hooks
645
+ - `install` -- Install pre-commit hook for automatic workflow
646
+ - `uninstall` -- Remove installed hooks
647
+ - `status` -- Show hook installation status
745
648
 
746
649
  #### `k0ntext fact-check [files...]`
747
650
  Validate documentation accuracy using AI analysis.
@@ -752,28 +655,22 @@ k0ntext fact-check
752
655
 
753
656
  # Check specific files
754
657
  k0ntext fact-check CLAUDE.md .cursorrules
755
-
756
- # Set minimum confidence threshold
757
- k0ntext fact-check --min-confidence 0.7
758
-
759
- # Verbose output
760
- k0ntext fact-check -v
761
658
  ```
762
659
 
763
660
  **Options:**
764
- - `--fix` - Automatically fix detected issues (experimental)
765
- - `-v, --verbose` - Show detailed output
766
- - `--min-confidence <number>` - Minimum confidence to report (0-1, default: 0.5)
661
+ - `--fix` -- Automatically fix detected issues (experimental)
662
+ - `-v, --verbose` -- Show detailed output
663
+ - `--min-confidence <number>` -- Minimum confidence to report (0-1, default: 0.5)
767
664
 
768
- ### Git Hooks Workflow (v3.1.0)
665
+ ### Git Hooks Workflow
769
666
 
770
667
  When you install hooks with `k0ntext hooks install`, the pre-commit hook automatically:
771
668
 
772
- 1. **Autosync** - Sync context from source of truth
773
- 2. **Validate** - Check for context errors
774
- 3. **Drift Detect** - AI-powered drift detection
775
- 4. **Cross-Sync** - Update all AI tool contexts if drift found
776
- 5. **Auto-Add** - Include updated context files in commit
669
+ 1. **Autosync** -- Sync context from source of truth
670
+ 2. **Validate** -- Check for context errors
671
+ 3. **Drift Detect** -- AI-powered drift detection
672
+ 4. **Cross-Sync** -- Update all AI tool contexts if drift found
673
+ 5. **Auto-Add** -- Include updated context files in commit
777
674
 
778
675
  **Skip hooks temporarily:**
779
676
  ```bash
@@ -782,9 +679,9 @@ K0NTEXT_SKIP_HOOKS=1 git commit -m "message"
782
679
  git commit --no-verify -m "message"
783
680
  ```
784
681
 
785
- ## 🤖 MCP Server Usage
682
+ ## MCP Server Usage
786
683
 
787
- ### Auto-Configuration (v3.1.1)
684
+ ### Auto-Configuration
788
685
 
789
686
  When you run `k0ntext init`, the MCP server is **automatically configured** in `.claude/settings.json`:
790
687
 
@@ -812,22 +709,22 @@ k0ntext mcp
812
709
 
813
710
  ### Available MCP Tools
814
711
 
815
- 1. **search_context** - Semantic search across all indexed content
816
- 2. **get_item** - Get a specific context item by ID or path
817
- 3. **add_knowledge** - Store new insights or facts
818
- 4. **analyze** - Run intelligent analysis on codebase
819
- 5. **get_tool_configs** - Get AI tool configurations
820
- 6. **query_graph** - Traverse knowledge graph
821
- 7. **get_stats** - Get database statistics
712
+ 1. **search_context** -- Semantic search across all indexed content
713
+ 2. **get_item** -- Get a specific context item by ID or path
714
+ 3. **add_knowledge** -- Store new insights or facts
715
+ 4. **analyze** -- Run intelligent analysis on codebase
716
+ 5. **get_tool_configs** -- Get AI tool configurations
717
+ 6. **query_graph** -- Traverse knowledge graph
718
+ 7. **get_stats** -- Get database statistics
822
719
 
823
720
  ### Available Prompts
824
721
 
825
- 1. **context-engineer** - Initialize and configure AI context system
826
- 2. **core-architect** - Design system architecture
827
- 3. **api-developer** - Develop API endpoints
828
- 4. **database-ops** - Database operations
829
- 5. **integration-hub** - External integrations
830
- 6. **deployment-ops** - CI/CD and deployment
722
+ 1. **context-engineer** -- Initialize and configure AI context system
723
+ 2. **core-architect** -- Design system architecture
724
+ 3. **api-developer** -- Develop API endpoints
725
+ 4. **database-ops** -- Database operations
726
+ 5. **integration-hub** -- External integrations
727
+ 6. **deployment-ops** -- CI/CD and deployment
831
728
 
832
729
  ### Example MCP Tool Usage
833
730
 
@@ -852,28 +749,28 @@ await add_knowledge({
852
749
  });
853
750
  ```
854
751
 
855
- ## 🎨 Supported AI Tools
752
+ ## Supported AI Tools
856
753
 
857
754
  ### Fully Supported
858
- - **Claude** - AI_CONTEXT.md
859
- - **GitHub Copilot** - .github/copilot-instructions.md
860
- - **Cursor** - .cursorrules
861
- - **Windsurf** - .windsurf/rules.md
862
- - **Cline** - .clinerules
863
- - **Aider** - .aider.conf.yml
864
- - **Continue** - .continue/config.json
865
- - **Antigravity** - .agent/README.md
866
- - **Gemini** - .gemini/config.md
755
+ - **Claude** -- AI_CONTEXT.md
756
+ - **GitHub Copilot** -- .github/copilot-instructions.md
757
+ - **Cursor** -- .cursorrules
758
+ - **Windsurf** -- .windsurf/rules.md
759
+ - **Cline** -- .clinerules
760
+ - **Aider** -- .aider.conf.yml
761
+ - **Continue** -- .continue/config.json
762
+ - **Antigravity** -- .agent/README.md
763
+ - **Gemini** -- .gemini/config.md
867
764
 
868
765
  ### RPI Workflow Skills
869
- - **@context-engineer** - Setup and configuration
870
- - **@core-architect** - System design
871
- - **@api-developer** - API development
872
- - **@database-ops** - Database operations
873
- - **@integration-hub** - External integrations
874
- - **@deployment-ops** - CI/CD and deployment
766
+ - **@context-engineer** -- Setup and configuration
767
+ - **@core-architect** -- System design
768
+ - **@api-developer** -- API development
769
+ - **@database-ops** -- Database operations
770
+ - **@integration-hub** -- External integrations
771
+ - **@deployment-ops** -- CI/CD and deployment
875
772
 
876
- ## 🔧 Configuration
773
+ ## Configuration
877
774
 
878
775
  ### Environment Variables
879
776
 
@@ -900,49 +797,58 @@ Each AI tool has its own configuration file path:
900
797
  - Antigravity: `.agent/README.md`
901
798
  - Gemini: `.gemini/config.md`
902
799
 
903
- ## 🏗️ Architecture
800
+ ## Architecture
904
801
 
905
802
  ### System Components
906
803
 
907
804
  ```
908
805
  k0ntext/
909
806
  ├── src/ # TypeScript source
910
- │ ├── cli/ # CLI commands (20 commands)
911
- ├── version/ # Version detection system (v3.4.0)
912
- │ │ ├── commands/ # Command implementations
913
- │ │ └── utils/ # File detector, backup manager (v3.4.0)
914
- │ ├── config/ # Centralized configuration (v3.1.0)
915
- │ ├── db/ # SQLite database client
807
+ │ ├── agent-system/ # TodoListManager, TimestampTracker
808
+ │ ├── agents/ # Smart agents (Cleanup, Performance, Drift, FactCheck)
916
809
  │ ├── analyzer/ # Intelligent codebase analysis
810
+ │ ├── cli/ # CLI commands, REPL shell, utilities
811
+ │ │ ├── version/ # Version detection system
812
+ │ │ ├── commands/ # Command implementations
813
+ │ │ └── utils/ # File detector, backup manager
814
+ │ ├── config/ # Centralized model configuration
815
+ │ ├── db/ # SQLite database client + migrations
917
816
  │ ├── embeddings/ # OpenRouter integration
918
- │ ├── agents/ # Smart agents (Cleanup, Performance, Drift, FactCheck)
919
- │ ├── template-engine/ # Handlebars template system (v3.4.0)
817
+ │ ├── services/ # SnapshotManager and services
818
+ │ ├── template-engine/ # Handlebars template system
819
+ │ ├── template-sync/ # Template synchronization
820
+ │ ├── utils/ # Utilities (chunking, encoding)
920
821
  │ └── mcp.ts # MCP server implementation
921
822
  ├── agents/ # Agent definitions
922
823
  ├── skills/ # RPI workflow skills
923
824
  ├── templates/ # Output templates
825
+ │ ├── base/ # Templates synced to user .claude/ directories
826
+ │ └── map/ # Map-based context templates
924
827
  └── .k0ntext.db # SQLite database (auto-created)
925
828
  ```
926
829
 
927
830
  ### Data Flow
928
831
 
929
- 1. **Initialization** - `k0ntext init` discovers and analyzes codebase
930
- 2. **Indexing** - `k0ntext index` stores content in SQLite with embeddings
931
- 3. **Generation** - `k0ntext generate` creates tool-specific context files
932
- 4. **Sync** - `k0ntext sync` keeps all AI tools synchronized
933
- 5. **MCP Server** - `k0ntext mcp` provides real-time context to AI assistants
832
+ 1. **Initialization** -- `k0ntext init` discovers and analyzes codebase
833
+ 2. **Indexing** -- `k0ntext index` stores content in SQLite with embeddings
834
+ 3. **Generation** -- `k0ntext generate` creates tool-specific context files
835
+ 4. **Sync** -- `k0ntext sync` keeps all AI tools synchronized
836
+ 5. **MCP Server** -- `k0ntext mcp` provides real-time context to AI assistants
934
837
 
935
838
  ### Database Schema
936
839
 
937
840
  The SQLite database contains:
938
- - **Context Items** - Workflows, agents, commands, code, docs
939
- - **Embeddings** - Vector embeddings for semantic search
940
- - **Relations** - Knowledge graph connections
941
- - **Sync State** - Change tracking for synchronization (with version tracking in v3.4.0)
942
- - **Tool Configs** - AI tool configurations
943
- - **Generated Files** - File tracking with hashes and backups (v3.4.0)
944
-
945
- ## 🚀 Development
841
+ - **Context Items** -- Workflows, agents, commands, code, docs
842
+ - **Embeddings** -- Vector embeddings for semantic search
843
+ - **Relations** -- Knowledge graph connections
844
+ - **Sync State** -- Change tracking for synchronization (with version tracking)
845
+ - **Tool Configs** -- AI tool configurations
846
+ - **Generated Files** -- File tracking with hashes and backups
847
+ - **Todo Sessions/Tasks** -- Persistent task management
848
+ - **File Timestamps** -- Sync tracking timestamps
849
+ - **Snapshots** -- Database snapshot metadata
850
+
851
+ ## Development
946
852
 
947
853
  ### Build and Test
948
854
 
@@ -981,16 +887,18 @@ npm run publish:public
981
887
  4. Run tests and linting
982
888
  5. Submit a pull request
983
889
 
890
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
891
+
984
892
  ### Project Structure
985
893
 
986
- - `src/cli/` - Command implementations
987
- - `src/db/` - Database operations
988
- - `src/analyzer/` - Code analysis logic
989
- - `src/agents/` - Smart agents
990
- - `templates/` - Context templates
991
- - `.claude/` - Claude Code development context
894
+ - `src/cli/` -- Command implementations
895
+ - `src/db/` -- Database operations
896
+ - `src/analyzer/` -- Code analysis logic
897
+ - `src/agents/` -- Smart agents
898
+ - `templates/` -- Context templates
899
+ - `.claude/` -- Claude Code development context
992
900
 
993
- ## 📊 Performance Monitoring
901
+ ## Performance Monitoring
994
902
 
995
903
  The PerformanceMonitorAgent provides insights into:
996
904
  - Query execution times
@@ -1006,13 +914,7 @@ k0ntext performance
1006
914
  k0ntext performance --json
1007
915
  ```
1008
916
 
1009
- Common optimization suggestions:
1010
- - Add indexes for frequently queried columns
1011
- - Run VACUUM for large databases
1012
- - Review and optimize slow queries
1013
- - Monitor cache hit rates
1014
-
1015
- ## 🔍 Troubleshooting
917
+ ## Troubleshooting
1016
918
 
1017
919
  ### Common Issues
1018
920
 
@@ -1049,13 +951,15 @@ k0ntext index -v
1049
951
  k0ntext generate -v
1050
952
  ```
1051
953
 
1052
- ## 🤝 Community
954
+ See [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) for the full troubleshooting guide.
955
+
956
+ ## Community
1053
957
 
1054
958
  - **GitHub Issues:** [Report bugs and request features](https://github.com/SireJeff/k0ntext/issues)
1055
959
  - **Discussions:** [Join community discussions](https://github.com/SireJeff/k0ntext/discussions)
1056
- - **Documentation:** [Full API documentation](./docs/)
960
+ - **Documentation:** [Full docs](./docs/)
1057
961
 
1058
- ## 📄 License
962
+ ## License
1059
963
 
1060
964
  MIT License - see [LICENSE](LICENSE) file for details.
1061
965
 
@@ -1066,4 +970,4 @@ MIT License - see [LICENSE](LICENSE) file for details.
1066
970
  **Issues:** https://github.com/SireJeff/k0ntext/issues
1067
971
  **MCP Protocol:** https://modelcontextprotocol.io
1068
972
 
1069
- Made with ❤️ by [SireJeff](https://github.com/SireJeff)
973
+ Made with care by [SireJeff](https://github.com/SireJeff)