k0ntext 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -2
- package/dist/cli/commands/batch-index.d.ts +16 -0
- package/dist/cli/commands/batch-index.d.ts.map +1 -0
- package/dist/cli/commands/batch-index.js +387 -0
- package/dist/cli/commands/batch-index.js.map +1 -0
- package/dist/cli/index.js +65 -0
- package/dist/cli/index.js.map +1 -1
- package/package.json +2 -2
- package/src/cli/commands/batch-index.ts +492 -0
- package/src/cli/index.ts +81 -3
- package/templates/base/CLI_COMMANDS.md +589 -0
- package/templates/base/agents/api-developer.md +37 -0
- package/templates/base/agents/context-engineer.md +41 -0
- package/templates/base/agents/core-architect.md +41 -0
- package/templates/base/agents/database-ops.md +38 -0
- package/templates/base/agents/deployment-ops.md +41 -0
- package/templates/base/agents/integration-hub.md +37 -0
- package/templates/base/commands/analytics.md +33 -0
- package/templates/base/commands/auto-sync.md +33 -0
- package/templates/base/commands/collab.md +37 -0
- package/templates/base/commands/context-optimize.md +36 -0
- package/templates/base/commands/help.md +55 -0
- package/templates/base/commands/rpi-implement.md +36 -0
- package/templates/base/commands/rpi-plan.md +32 -0
- package/templates/base/commands/rpi-research.md +34 -0
- package/templates/base/commands/session-resume.md +32 -0
- package/templates/base/commands/session-save.md +29 -0
- package/templates/base/commands/validate-all.md +36 -0
- package/templates/base/commands/verify-docs-current.md +33 -0
- package/templates/base/settings.json +10 -1
|
@@ -74,3 +74,40 @@ This agent integrates with:
|
|
|
74
74
|
- API contract consistency
|
|
75
75
|
- Endpoint security checks
|
|
76
76
|
- Response schema validation
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## k0ntext CLI Commands
|
|
81
|
+
|
|
82
|
+
This agent integrates with the following k0ntext CLI commands:
|
|
83
|
+
|
|
84
|
+
| Command | When to Use |
|
|
85
|
+
|---------|-------------|
|
|
86
|
+
| `k0ntext generate` | After API changes - regenerates API documentation for all AI tools |
|
|
87
|
+
| `k0ntext drift-detect` | When API may have diverged from docs - AI-powered drift detection |
|
|
88
|
+
| `k0ntext fact-check` | Validate API documentation accuracy - quality assurance for API specs |
|
|
89
|
+
|
|
90
|
+
### Command Examples
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Generate contexts after API changes
|
|
94
|
+
k0ntext generate --tools claude,cursor
|
|
95
|
+
|
|
96
|
+
# Detect API documentation drift
|
|
97
|
+
k0ntext drift-detect
|
|
98
|
+
|
|
99
|
+
# Fact-check API endpoint documentation
|
|
100
|
+
k0ntext fact-check
|
|
101
|
+
|
|
102
|
+
# Search for existing API patterns
|
|
103
|
+
k0ntext search "API endpoint"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Workflow Integration
|
|
107
|
+
|
|
108
|
+
When developing APIs:
|
|
109
|
+
1. **Before changes:** Run `k0ntext search <resource>` to find existing endpoint patterns
|
|
110
|
+
2. **During development:** Reference indexed API contracts and examples
|
|
111
|
+
3. **After changes:** Use `k0ntext generate` to update all AI tool contexts
|
|
112
|
+
4. **Before commit:** Run `k0ntext drift-detect` to identify documentation gaps
|
|
113
|
+
5. **For QA:** Use `k0ntext fact-check` to validate documentation accuracy
|
|
@@ -511,6 +511,47 @@ After initialization, use the RPI workflow for all development:
|
|
|
511
511
|
|
|
512
512
|
---
|
|
513
513
|
|
|
514
|
+
## k0ntext CLI Commands
|
|
515
|
+
|
|
516
|
+
This agent integrates with the following k0ntext CLI commands:
|
|
517
|
+
|
|
518
|
+
| Command | When to Use |
|
|
519
|
+
|---------|-------------|
|
|
520
|
+
| `k0ntext init` | First-time project setup - initializes AI context with intelligent analysis |
|
|
521
|
+
| `k0ntext generate` | After making architectural changes - regenerates context files for all AI tools |
|
|
522
|
+
| `k0ntext validate` | Before committing changes - validates context file structure and completeness |
|
|
523
|
+
| `k0ntext index` | After adding new files - indexes codebase content into the database for search |
|
|
524
|
+
| `k0ntext stats` | Check database and indexing status - shows context items, embeddings, and database path |
|
|
525
|
+
|
|
526
|
+
### Command Examples
|
|
527
|
+
|
|
528
|
+
```bash
|
|
529
|
+
# Initialize a new project with intelligent analysis
|
|
530
|
+
k0ntext init
|
|
531
|
+
|
|
532
|
+
# Generate contexts for specific AI tools
|
|
533
|
+
k0ntext generate --tools claude,cursor
|
|
534
|
+
|
|
535
|
+
# Validate context files
|
|
536
|
+
k0ntext validate
|
|
537
|
+
|
|
538
|
+
# Index new documentation files
|
|
539
|
+
k0ntext index --docs
|
|
540
|
+
|
|
541
|
+
# View database statistics
|
|
542
|
+
k0ntext stats
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
### Workflow Integration
|
|
546
|
+
|
|
547
|
+
When using this agent:
|
|
548
|
+
1. **Before initialization:** Run `k0ntext init` to establish baseline context
|
|
549
|
+
2. **During template population:** Use `k0ntext index` to discover all project files
|
|
550
|
+
3. **After modifications:** Run `k0ntext generate` to propagate changes to all AI tools
|
|
551
|
+
4. **Before commit:** Use `k0ntext validate` to ensure context integrity
|
|
552
|
+
|
|
553
|
+
---
|
|
554
|
+
|
|
514
555
|
## Version History
|
|
515
556
|
|
|
516
557
|
| Version | Date | Changes |
|
|
@@ -74,3 +74,44 @@ This agent integrates with:
|
|
|
74
74
|
- Architecture consistency checks
|
|
75
75
|
- State machine validation
|
|
76
76
|
- Dependency consistency verification
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## k0ntext CLI Commands
|
|
81
|
+
|
|
82
|
+
This agent integrates with the following k0ntext CLI commands:
|
|
83
|
+
|
|
84
|
+
| Command | When to Use |
|
|
85
|
+
|---------|-------------|
|
|
86
|
+
| `k0ntext init` | First-time project setup - analyzes architecture during initialization |
|
|
87
|
+
| `k0ntext generate` | After architectural changes - regenerates context for all AI tools |
|
|
88
|
+
| `k0ntext drift-detect` | When code may have diverged from architecture docs - AI-powered drift detection |
|
|
89
|
+
| `k0ntext cross-sync` | After drift detected - intelligent cross-tool synchronization |
|
|
90
|
+
| `k0ntext search <query>` | Finding related architecture decisions - search indexed content |
|
|
91
|
+
|
|
92
|
+
### Command Examples
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Initialize with architecture analysis
|
|
96
|
+
k0ntext init
|
|
97
|
+
|
|
98
|
+
# Detect documentation drift
|
|
99
|
+
k0ntext drift-detect
|
|
100
|
+
|
|
101
|
+
# Cross-sync after detecting drift
|
|
102
|
+
k0ntext cross-sync
|
|
103
|
+
|
|
104
|
+
# Search for architecture patterns
|
|
105
|
+
k0ntext search "authentication flow"
|
|
106
|
+
|
|
107
|
+
# Generate contexts after architecture changes
|
|
108
|
+
k0ntext generate --tools claude,cursor
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Workflow Integration
|
|
112
|
+
|
|
113
|
+
When designing architecture:
|
|
114
|
+
1. **Before design:** Run `k0ntext search <pattern>` to find existing architecture patterns
|
|
115
|
+
2. **During design:** Reference discovered workflows and patterns
|
|
116
|
+
3. **After changes:** Use `k0ntext drift-detect` to identify documentation that needs updating
|
|
117
|
+
4. **Before commit:** Run `k0ntext cross-sync` to propagate changes across all AI tools
|
|
@@ -74,3 +74,41 @@ This agent integrates with:
|
|
|
74
74
|
- Schema consistency checks
|
|
75
75
|
- Migration validation
|
|
76
76
|
- Query performance benchmarks
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## k0ntext CLI Commands
|
|
81
|
+
|
|
82
|
+
This agent integrates with the following k0ntext CLI commands:
|
|
83
|
+
|
|
84
|
+
| Command | When to Use |
|
|
85
|
+
|---------|-------------|
|
|
86
|
+
| `k0ntext index` | After adding new tables/migrations - indexes database files for search |
|
|
87
|
+
| `k0ntext search <query>` | Finding database-related code - search across indexed schema and migrations |
|
|
88
|
+
| `k0ntext stats` | Check indexing status - view database items, embeddings, and file counts |
|
|
89
|
+
| `k0ntext validate` | Before committing migrations - validates context file integrity |
|
|
90
|
+
|
|
91
|
+
### Command Examples
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Index database-related files
|
|
95
|
+
k0ntext index --code
|
|
96
|
+
|
|
97
|
+
# Search for database patterns
|
|
98
|
+
k0ntext search "user table schema"
|
|
99
|
+
k0ntext search "migration"
|
|
100
|
+
|
|
101
|
+
# View indexing statistics
|
|
102
|
+
k0ntext stats
|
|
103
|
+
|
|
104
|
+
# Validate context files
|
|
105
|
+
k0ntext validate
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Workflow Integration
|
|
109
|
+
|
|
110
|
+
When working with database operations:
|
|
111
|
+
1. **Before changes:** Run `k0ntext search <table>` to find existing schema references
|
|
112
|
+
2. **During design:** Reference indexed migrations and models
|
|
113
|
+
3. **After migrations:** Use `k0ntext index` to update the search index
|
|
114
|
+
4. **Before commit:** Run `k0ntext validate` to ensure documentation consistency
|
|
@@ -74,3 +74,44 @@ This agent integrates with:
|
|
|
74
74
|
- Pipeline reliability checks
|
|
75
75
|
- Infrastructure consistency validation
|
|
76
76
|
- Deployment strategy verification
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## k0ntext CLI Commands
|
|
81
|
+
|
|
82
|
+
This agent integrates with the following k0ntext CLI commands:
|
|
83
|
+
|
|
84
|
+
| Command | When to Use |
|
|
85
|
+
|---------|-------------|
|
|
86
|
+
| `k0ntext hooks` | Git hooks management - for automation during deployment workflows |
|
|
87
|
+
| `k0ntext validate` | Before committing deployments - validates context file integrity |
|
|
88
|
+
| `k0ntext export` | Export database - backup context before major deployments |
|
|
89
|
+
| `k0ntext import` | Import context - restore context after rollback |
|
|
90
|
+
|
|
91
|
+
### Command Examples
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Install git hooks for automated validation
|
|
95
|
+
k0ntext hooks install
|
|
96
|
+
|
|
97
|
+
# Validate deployment configuration
|
|
98
|
+
k0ntext validate
|
|
99
|
+
|
|
100
|
+
# Export context before deployment
|
|
101
|
+
k0ntext export --file backup-before-deploy.json
|
|
102
|
+
|
|
103
|
+
# Import context after rollback
|
|
104
|
+
k0ntext import --file backup-before-deploy.json
|
|
105
|
+
|
|
106
|
+
# Search for deployment patterns
|
|
107
|
+
k0ntext search "deployment pipeline"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Workflow Integration
|
|
111
|
+
|
|
112
|
+
When managing deployments:
|
|
113
|
+
1. **Before deployment:** Run `k0ntext export` to backup current context
|
|
114
|
+
2. **During setup:** Use `k0ntext hooks install` for automated validation
|
|
115
|
+
3. **After changes:** Run `k0ntext validate` to ensure configuration integrity
|
|
116
|
+
4. **On rollback:** Use `k0ntext import` to restore previous context state
|
|
117
|
+
5. **For patterns:** Search `k0ntext search <pattern>` to find deployment configurations
|
|
@@ -74,3 +74,40 @@ This agent integrates with:
|
|
|
74
74
|
- Integration security checks
|
|
75
75
|
- Authentication mechanism validation
|
|
76
76
|
- Rate limiting configuration
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## k0ntext CLI Commands
|
|
81
|
+
|
|
82
|
+
This agent integrates with the following k0ntext CLI commands:
|
|
83
|
+
|
|
84
|
+
| Command | When to Use |
|
|
85
|
+
|---------|-------------|
|
|
86
|
+
| `k0ntext sync` | After manual context changes - synchronize context across AI tools |
|
|
87
|
+
| `k0ntext cross-sync` | After drift detected - intelligent cross-tool synchronization |
|
|
88
|
+
| `k0ntext validate` | Before committing integrations - validates context file integrity |
|
|
89
|
+
|
|
90
|
+
### Command Examples
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Sync context across all AI tools
|
|
94
|
+
k0ntext sync
|
|
95
|
+
|
|
96
|
+
# Intelligent cross-tool sync
|
|
97
|
+
k0ntext cross-sync
|
|
98
|
+
|
|
99
|
+
# Validate integration documentation
|
|
100
|
+
k0ntext validate
|
|
101
|
+
|
|
102
|
+
# Search for existing integrations
|
|
103
|
+
k0ntext search "webhook"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Workflow Integration
|
|
107
|
+
|
|
108
|
+
When working with integrations:
|
|
109
|
+
1. **Before adding:** Run `k0ntext search <service>` to find existing integration patterns
|
|
110
|
+
2. **During setup:** Reference indexed webhook handlers and auth flows
|
|
111
|
+
3. **After changes:** Use `k0ntext sync` to propagate changes to all AI tools
|
|
112
|
+
4. **Before commit:** Run `k0ntext cross-sync` to ensure consistency across tools
|
|
113
|
+
5. **For verification:** Use `k0ntext validate` to check documentation integrity
|
|
@@ -236,3 +236,36 @@ Configure analytics behavior in `.ai-context/settings.json`:
|
|
|
236
236
|
|
|
237
237
|
- [Settings Configuration](./../settings.json)
|
|
238
238
|
- [Context Budget Guidelines](./../README.md#context-budget)
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## k0ntext CLI Commands
|
|
243
|
+
|
|
244
|
+
This command integrates with the following k0ntext CLI commands:
|
|
245
|
+
|
|
246
|
+
| Command | When to Use |
|
|
247
|
+
|---------|-------------|
|
|
248
|
+
| `k0ntext stats` | View database and indexing statistics |
|
|
249
|
+
| `k0ntext performance` | Show system performance metrics |
|
|
250
|
+
| `k0ntext export` | Export analytics data to JSON file |
|
|
251
|
+
|
|
252
|
+
### Command Examples
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
# View database statistics
|
|
256
|
+
k0ntext stats
|
|
257
|
+
|
|
258
|
+
# Show performance metrics
|
|
259
|
+
k0ntext performance
|
|
260
|
+
|
|
261
|
+
# Export analytics data
|
|
262
|
+
k0ntext export --file analytics-data.json
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Workflow Integration
|
|
266
|
+
|
|
267
|
+
When analyzing metrics:
|
|
268
|
+
1. **Before analysis:** Run `k0ntext stats` to gather baseline data
|
|
269
|
+
2. **During analysis:** Use `k0ntext performance` for detailed metrics
|
|
270
|
+
3. **For reporting:** Use `k0ntext export` to export data for analysis
|
|
271
|
+
4. **For trends:** Track stats over time to identify patterns
|
|
@@ -170,3 +170,36 @@ npx claude-context sync --check
|
|
|
170
170
|
npx claude-context sync --fix
|
|
171
171
|
npx claude-context generate --code-map
|
|
172
172
|
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## k0ntext CLI Commands
|
|
177
|
+
|
|
178
|
+
This command integrates with the following k0ntext CLI commands:
|
|
179
|
+
|
|
180
|
+
| Command | When to Use |
|
|
181
|
+
|---------|-------------|
|
|
182
|
+
| `k0ntext sync` | Sync context across AI tools |
|
|
183
|
+
| `k0ntext cross-sync` | Intelligent cross-tool synchronization |
|
|
184
|
+
| `k0ntext hooks` | Git hooks management for automatic sync |
|
|
185
|
+
|
|
186
|
+
### Command Examples
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# Sync across all AI tools
|
|
190
|
+
k0ntext sync
|
|
191
|
+
|
|
192
|
+
# Intelligent cross-tool sync
|
|
193
|
+
k0ntext cross-sync
|
|
194
|
+
|
|
195
|
+
# Install git hooks for auto-sync
|
|
196
|
+
k0ntext hooks install
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Workflow Integration
|
|
200
|
+
|
|
201
|
+
When synchronizing documentation:
|
|
202
|
+
1. **Before sync:** Use `k0ntext drift-detect` to identify what needs syncing
|
|
203
|
+
2. **During sync:** Use `k0ntext sync` to propagate changes
|
|
204
|
+
3. **For automation:** Install git hooks with `k0ntext hooks install`
|
|
205
|
+
4. **For cross-tool:** Use `k0ntext cross-sync` for intelligent synchronization
|
|
@@ -192,3 +192,40 @@ Requires `.ai-context/team/config.json` to be configured. See `.ai-context/team/
|
|
|
192
192
|
- [Team Configuration](./../team/README.md)
|
|
193
193
|
- [Knowledge Base](./../knowledge/README.md)
|
|
194
194
|
- [Session Handoff Template](./../knowledge/sessions/TEMPLATE.md)
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## k0ntext CLI Commands
|
|
199
|
+
|
|
200
|
+
This command integrates with the following k0ntext CLI commands:
|
|
201
|
+
|
|
202
|
+
| Command | When to Use |
|
|
203
|
+
|---------|-------------|
|
|
204
|
+
| `k0ntext sync` | Sync shared knowledge across AI tools |
|
|
205
|
+
| `k0ntext cross-sync` | Intelligent cross-tool synchronization for teams |
|
|
206
|
+
| `k0ntext export` | Export context for team handoff |
|
|
207
|
+
| `k0ntext import` | Import context from team members |
|
|
208
|
+
|
|
209
|
+
### Command Examples
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# Sync across all AI tools
|
|
213
|
+
k0ntext sync
|
|
214
|
+
|
|
215
|
+
# Cross-tool sync for team consistency
|
|
216
|
+
k0ntext cross-sync
|
|
217
|
+
|
|
218
|
+
# Export for handoff
|
|
219
|
+
k0ntext export --file handoff-data.json
|
|
220
|
+
|
|
221
|
+
# Import from team member
|
|
222
|
+
k0ntext import --file handoff-data.json
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Workflow Integration
|
|
226
|
+
|
|
227
|
+
When collaborating with team:
|
|
228
|
+
1. **Before handoff:** Run `k0ntext export` to package current context
|
|
229
|
+
2. **During collaboration:** Use `k0ntext sync` to keep everyone aligned
|
|
230
|
+
3. **For consistency:** Use `k0ntext cross-sync` for intelligent synchronization
|
|
231
|
+
4. **After receiving:** Use `k0ntext import` to load handoff context
|
|
@@ -224,3 +224,39 @@ After completion, execute the generated TODO list:
|
|
|
224
224
|
2. `/rpi-plan [first-plan-task]`
|
|
225
225
|
3. `/rpi-implement [first-impl-task]`
|
|
226
226
|
4. `/validate-all`
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## k0ntext CLI Commands
|
|
231
|
+
|
|
232
|
+
This command integrates with the following k0ntext CLI commands:
|
|
233
|
+
|
|
234
|
+
| Command | When to Use |
|
|
235
|
+
|---------|-------------|
|
|
236
|
+
| `k0ntext stats` | View context metrics and database statistics |
|
|
237
|
+
| `k0ntext performance` | Show system performance metrics for optimization |
|
|
238
|
+
| `k0ntext validate` | Validate context file structure after optimization |
|
|
239
|
+
|
|
240
|
+
### Command Examples
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# Check current database statistics
|
|
244
|
+
k0ntext stats
|
|
245
|
+
|
|
246
|
+
# View performance metrics
|
|
247
|
+
k0ntext performance
|
|
248
|
+
|
|
249
|
+
# Validate context structure
|
|
250
|
+
k0ntext validate
|
|
251
|
+
|
|
252
|
+
# Search for optimization patterns
|
|
253
|
+
k0ntext search "performance"
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Workflow Integration
|
|
257
|
+
|
|
258
|
+
When optimizing context:
|
|
259
|
+
1. **Before optimization:** Run `k0ntext stats` to establish baseline metrics
|
|
260
|
+
2. **During optimization:** Reference indexed patterns and configurations
|
|
261
|
+
3. **After changes:** Use `k0ntext validate` to ensure context integrity
|
|
262
|
+
4. **For metrics:** Use `k0ntext performance` to measure improvements
|
|
@@ -467,6 +467,61 @@ npx claude-context config
|
|
|
467
467
|
|
|
468
468
|
---
|
|
469
469
|
|
|
470
|
+
## k0ntext CLI Commands
|
|
471
|
+
|
|
472
|
+
The k0ntext CLI provides comprehensive context engineering commands. Here's a quick reference:
|
|
473
|
+
|
|
474
|
+
| Command | Purpose |
|
|
475
|
+
|---------|---------|
|
|
476
|
+
| `k0ntext init` | Initialize project with intelligent analysis |
|
|
477
|
+
| `k0ntext generate` | Generate context files for AI tools |
|
|
478
|
+
| `k0ntext mcp` | Start MCP server for AI tools |
|
|
479
|
+
| `k0ntext sync` | Sync context across AI tools |
|
|
480
|
+
| `k0ntext cleanup` | Remove unused AI tool folders |
|
|
481
|
+
| `k0ntext validate` | Validate context files |
|
|
482
|
+
| `k0ntext export` | Export database to file |
|
|
483
|
+
| `k0ntext import` | Import context from file |
|
|
484
|
+
| `k0ntext performance` | Show performance metrics |
|
|
485
|
+
| `k0ntext watch` | Auto-index on file changes |
|
|
486
|
+
| `k0ntext drift-detect` | AI-powered drift detection |
|
|
487
|
+
| `k0ntext cross-sync` | Intelligent cross-tool sync |
|
|
488
|
+
| `k0ntext hooks` | Git hooks management |
|
|
489
|
+
| `k0ntext fact-check` | Validate documentation accuracy |
|
|
490
|
+
| `k0ntext index` | Index codebase into database |
|
|
491
|
+
| `k0ntext search <query>` | Search indexed content |
|
|
492
|
+
| `k0ntext stats` | View database statistics |
|
|
493
|
+
|
|
494
|
+
### Command Details
|
|
495
|
+
|
|
496
|
+
**Initialization Commands:**
|
|
497
|
+
- `k0ntext init` - First-time setup with intelligent codebase analysis
|
|
498
|
+
- `k0ntext generate` - Generate contexts for specific AI tools
|
|
499
|
+
- `k0ntext mcp` - Start the MCP server for tool integration
|
|
500
|
+
|
|
501
|
+
**Sync & Validation Commands:**
|
|
502
|
+
- `k0ntext sync` - Propagate context changes across AI tools
|
|
503
|
+
- `k0ntext validate` - Check context file structure and validity
|
|
504
|
+
- `k0ntext drift-detect` - Detect documentation drift using AI
|
|
505
|
+
- `k0ntext cross-sync` - Intelligent synchronization after drift
|
|
506
|
+
- `k0ntext fact-check` - Validate documentation against code
|
|
507
|
+
|
|
508
|
+
**Database Commands:**
|
|
509
|
+
- `k0ntext index` - Index codebase files for semantic search
|
|
510
|
+
- `k0ntext search <query>` - Search indexed content (text/semantic/hybrid)
|
|
511
|
+
- `k0ntext stats` - View database statistics and indexing status
|
|
512
|
+
|
|
513
|
+
**Utility Commands:**
|
|
514
|
+
- `k0ntext export` - Export database to JSON file
|
|
515
|
+
- `k0ntext import` - Import database from JSON file
|
|
516
|
+
- `k0ntext cleanup` - Remove unused AI tool folders
|
|
517
|
+
- `k0ntext performance` - Show system performance metrics
|
|
518
|
+
- `k0ntext watch` - Auto-index on file changes
|
|
519
|
+
- `k0ntext hooks` - Git hooks management
|
|
520
|
+
|
|
521
|
+
For detailed documentation, see [CLI_COMMANDS.md](../CLI_COMMANDS.md)
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
470
525
|
## Quick Tips
|
|
471
526
|
|
|
472
527
|
1. **Start with indexes:** Load CATEGORY_INDEX.md before detail files
|
|
@@ -162,3 +162,39 @@ Documentation updates
|
|
|
162
162
|
- All chunks marked IMPLEMENTED (plan + research)
|
|
163
163
|
- Updated documentation per chunk
|
|
164
164
|
- Documents archived to completed/
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## k0ntext CLI Commands
|
|
169
|
+
|
|
170
|
+
This command integrates with the following k0ntext CLI commands:
|
|
171
|
+
|
|
172
|
+
| Command | When to Use |
|
|
173
|
+
|---------|-------------|
|
|
174
|
+
| `k0ntext watch` | Auto-index on file changes during implementation |
|
|
175
|
+
| `k0ntext validate` | Validate context files after changes |
|
|
176
|
+
| `k0ntext fact-check` | Validate documentation accuracy before finalizing |
|
|
177
|
+
|
|
178
|
+
### Command Examples
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# Start watch mode for auto-indexing
|
|
182
|
+
k0ntext watch
|
|
183
|
+
|
|
184
|
+
# Validate context after changes
|
|
185
|
+
k0ntext validate
|
|
186
|
+
|
|
187
|
+
# Fact-check documentation updates
|
|
188
|
+
k0ntext fact-check
|
|
189
|
+
|
|
190
|
+
# Search for related tests
|
|
191
|
+
k0ntext search "test"
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Workflow Integration
|
|
195
|
+
|
|
196
|
+
When implementing changes:
|
|
197
|
+
1. **Before implementing:** Start `k0ntext watch` for automatic indexing
|
|
198
|
+
2. **During implementation:** Use search to find related tests and patterns
|
|
199
|
+
3. **After each change:** Use `k0ntext validate` to ensure integrity
|
|
200
|
+
4. **Before finalizing:** Run `k0ntext fact-check` to validate documentation
|
|
@@ -145,3 +145,35 @@ Plan document in `.ai-context/plans/active/[feature]_plan.md` with:
|
|
|
145
145
|
After human approval: `/rpi-implement [feature-name]`
|
|
146
146
|
|
|
147
147
|
RPI-Implement will process chunks in dependency order, executing todos atomically
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## k0ntext CLI Commands
|
|
152
|
+
|
|
153
|
+
This command integrates with the following k0ntext CLI commands:
|
|
154
|
+
|
|
155
|
+
| Command | When to Use |
|
|
156
|
+
|---------|-------------|
|
|
157
|
+
| `k0ntext search <query>` | Search for related code patterns during planning |
|
|
158
|
+
| `k0ntext drift-detect` | Check for documentation drift before planning changes |
|
|
159
|
+
|
|
160
|
+
### Command Examples
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# Search for similar implementations
|
|
164
|
+
k0ntext search "authentication flow"
|
|
165
|
+
|
|
166
|
+
# Detect documentation drift
|
|
167
|
+
k0ntext drift-detect
|
|
168
|
+
|
|
169
|
+
# Search for API patterns
|
|
170
|
+
k0ntext search "endpoint"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Workflow Integration
|
|
174
|
+
|
|
175
|
+
When creating implementation plans:
|
|
176
|
+
1. **Before planning:** Use `k0ntext drift-detect` to identify documentation issues
|
|
177
|
+
2. **During planning:** Search for related patterns and implementations
|
|
178
|
+
3. **For reference:** Use semantic search to find similar code structures
|
|
179
|
+
4. **After planning:** Document search results for implementation phase
|
|
@@ -143,3 +143,37 @@ REQUIRED_OUTPUT: CHUNK-Pn per CHUNK-Rn
|
|
|
143
143
|
After completion: `/rpi-plan [feature-name]`
|
|
144
144
|
|
|
145
145
|
RPI-Plan will read chunk manifest and create CHUNK-Pn todolist per CHUNK-Rn
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## k0ntext CLI Commands
|
|
150
|
+
|
|
151
|
+
This command integrates with the following k0ntext CLI commands:
|
|
152
|
+
|
|
153
|
+
| Command | When to Use |
|
|
154
|
+
|---------|-------------|
|
|
155
|
+
| `k0ntext index` | Index codebase before research for complete file discovery |
|
|
156
|
+
| `k0ntext search <query>` | Search indexed content during research phase |
|
|
157
|
+
| `k0ntext stats` | Check indexing status before starting research |
|
|
158
|
+
|
|
159
|
+
### Command Examples
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Index codebase before research
|
|
163
|
+
k0ntext index --all
|
|
164
|
+
|
|
165
|
+
# Search for related code patterns
|
|
166
|
+
k0ntext search "authentication"
|
|
167
|
+
k0ntext search "API endpoint"
|
|
168
|
+
|
|
169
|
+
# View indexing statistics
|
|
170
|
+
k0ntext stats
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Workflow Integration
|
|
174
|
+
|
|
175
|
+
When conducting RPI research:
|
|
176
|
+
1. **Before research:** Run `k0ntext index` to ensure all files are indexed
|
|
177
|
+
2. **During research:** Use `k0ntext search <query>` to find related code and patterns
|
|
178
|
+
3. **For coverage:** Check `k0ntext stats` to verify indexing completeness
|
|
179
|
+
4. **After research:** Indexed data aids the planning phase
|
|
@@ -142,3 +142,35 @@ In `.ai-context/settings.json`:
|
|
|
142
142
|
- `/rpi-research` - Start research phase
|
|
143
143
|
- `/rpi-plan` - Start plan phase
|
|
144
144
|
- `/rpi-implement` - Start implement phase
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## k0ntext CLI Commands
|
|
149
|
+
|
|
150
|
+
This command integrates with the following k0ntext CLI commands:
|
|
151
|
+
|
|
152
|
+
| Command | When to Use |
|
|
153
|
+
|---------|-------------|
|
|
154
|
+
| `k0ntext import` | Import context database for session restoration |
|
|
155
|
+
| `k0ntext search <query>` | Search for context from previous session |
|
|
156
|
+
|
|
157
|
+
### Command Examples
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Import session database
|
|
161
|
+
k0ntext import --file session-backup.json
|
|
162
|
+
|
|
163
|
+
# Search for previous work
|
|
164
|
+
k0ntext search "authentication"
|
|
165
|
+
|
|
166
|
+
# Check database status
|
|
167
|
+
k0ntext stats
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Workflow Integration
|
|
171
|
+
|
|
172
|
+
When resuming a session:
|
|
173
|
+
1. **Before resume:** Use `k0ntext import` to restore database if needed
|
|
174
|
+
2. **During resume:** Use `k0ntext search` to find previous context
|
|
175
|
+
3. **For verification:** Check `k0ntext stats` to confirm data restoration
|
|
176
|
+
4. **For continuity:** Exported data provides session continuity
|
|
@@ -110,3 +110,32 @@ Use '/session-resume' to restore this session.
|
|
|
110
110
|
- `/session-resume` - Resume a saved session
|
|
111
111
|
- `/collab handoff` - Create team handoff document
|
|
112
112
|
- `/auto-sync` - Process pending documentation updates
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## k0ntext CLI Commands
|
|
117
|
+
|
|
118
|
+
This command integrates with the following k0ntext CLI commands:
|
|
119
|
+
|
|
120
|
+
| Command | When to Use |
|
|
121
|
+
|---------|-------------|
|
|
122
|
+
| `k0ntext export` | Export database for session backup |
|
|
123
|
+
| `k0ntext stats` | View database statistics for session summary |
|
|
124
|
+
|
|
125
|
+
### Command Examples
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Export database before session end
|
|
129
|
+
k0ntext export --file session-backup.json
|
|
130
|
+
|
|
131
|
+
# View statistics for session summary
|
|
132
|
+
k0ntext stats
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Workflow Integration
|
|
136
|
+
|
|
137
|
+
When saving session state:
|
|
138
|
+
1. **Before save:** Run `k0ntext export` to backup current database
|
|
139
|
+
2. **During save:** Include statistics from `k0ntext stats`
|
|
140
|
+
3. **For handoff:** Export data can be shared with team members
|
|
141
|
+
4. **For resume:** Use `k0ntext import` to restore session state
|