@vpxa/aikit 0.1.125 → 0.1.127

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/TECH.md DELETED
@@ -1,1348 +0,0 @@
1
- # @vpxa/aikit
2
-
3
- Local-first AI developer toolkit and multi-agent operating system for LLM-powered software teams.
4
-
5
- ## Why AI Kit?
6
-
7
- AI Kit is built around 17 specialized agents with clear roles, not one general-purpose agent improvising across research, planning, coding, debugging, review, and architecture at the same time. The Orchestrator conducts. The Planner researches and designs. The Implementer writes code. The Debugger diagnoses failures. Security audits risk. Four Researcher variants analyze hard decisions from different model perspectives. Dual code and architecture reviewers catch what one model alone will miss.
8
-
9
- That specialization is paired with parallel dispatch. The Orchestrator decomposes complex work into independent sub-tasks, runs read-only agents concurrently without artificial limits, and can run up to four file-modifying agents in parallel when their file sets do not overlap. The result is lower wall-clock time without turning the repo into a race condition.
10
-
11
- For non-trivial technical choices, AI Kit uses multi-model decision analysis. Researcher-Alpha, Beta, Gamma, and Delta run in parallel on different LLMs, then the Orchestrator synthesizes agreement, disagreement, trade-offs, and implementation risk into one recommendation. Important decisions do not depend on a single model's blind spots.
12
-
13
- Every code change also goes through FORGE. Tasks are classified by tier, critical claims are tracked in an evidence map, and completion is gated by provenance, commitment, and coverage checks. Floor, Standard, and Critical work do not get the same ceremony, but they do get explicit, deterministic quality control.
14
-
15
- AI Kit keeps that system fast by compressing code context 5-20x with `compact`, `digest`, and `stratum_card`. Agents get fresh, scoped context for the task in front of them instead of inheriting a bloated conversation transcript. Each sub-agent receives exactly the code context it needs to do one job well.
16
-
17
- ## Features
18
-
19
- - **61 MCP tools** for AI agents to search, analyze, and manipulate codebases
20
- - **17 specialized agents** — Orchestrator, Planner, Implementer, Frontend, Refactor, Debugger, Security, Documenter, Explorer, 4 Researchers, 2 Code Reviewers, 2 Architect Reviewers — each with a focused role and optimal model
21
- - **Parallel agent dispatch** — independent sub-tasks run concurrently, up to 4 file-modifying agents in parallel on non-overlapping files
22
- - **Multi-model decisions** — 4 Researcher variants with different LLMs analyze every non-trivial technical choice in parallel, then synthesize consensus
23
- - **FORGE quality gates** — evidence-tracked code changes with tiered classification (Floor/Standard/Critical) and deterministic pass/fail gating
24
- - **49 CLI commands** for shell-based interaction
25
- - **Local-first** — ONNX embeddings, SQLite-vec vector store, no cloud dependencies
26
- - **Three interfaces**: MCP (for agent IDEs), CLI (for terminal agents), and programmatic API
27
- - **Tool profiles** — `full`, `safe`, `research`, `minimal`, `discovery` presets to control which tools are exposed
28
- - **Meta-tool discovery** — `list_tools`, `describe_tool`, `search_tools` for token-efficient tool exploration
29
- - **Pluggable flows** — `aikit:basic` and `aikit:advanced` built-in, plus custom team flows managed through unified `aikit_flow` actions
30
- - **Session digest** — auto-capture session activity for handoff between agents or sessions
31
- - **Middleware pipeline** — extensible plugin hooks for tool execution customization
32
- - **Pluggable memory** — adapter interface for curated knowledge storage backends
33
-
34
- ## Agent Architecture
35
-
36
- | Agent | Role | Category |
37
- |-------|------|----------|
38
- | Orchestrator | Master conductor — decomposes tasks, dispatches agents, gates quality | Orchestration |
39
- | Planner | Autonomous research and TDD implementation planning | Orchestration |
40
- | Implementer | Code writing following TDD practices | Implementation |
41
- | Frontend | UI/UX specialist — React, styling, responsive design | Implementation |
42
- | Refactor | Code cleanup, structure improvement, maintainability | Implementation |
43
- | Debugger | Issue diagnosis, error tracing, root cause analysis | Diagnostics |
44
- | Security | Vulnerability analysis, OWASP compliance, security review | Diagnostics |
45
- | Explorer | Rapid codebase navigation and context gathering | Exploration |
46
- | Documenter | Comprehensive project documentation generation | Documentation |
47
- | Researcher-Alpha | Deep research — primary investigator | Research |
48
- | Researcher-Beta | Pragmatic analysis — trade-offs and edge cases | Research |
49
- | Researcher-Gamma | Broad pattern matching across domains | Research |
50
- | Researcher-Delta | Implementation feasibility and performance | Research |
51
- | Code-Reviewer-Alpha | Primary code review | Review |
52
- | Code-Reviewer-Beta | Code review from different LLM perspective | Review |
53
- | Architect-Reviewer-Alpha | Primary architecture review | Review |
54
- | Architect-Reviewer-Beta | Architecture review from different LLM perspective | Review |
55
-
56
- The Orchestrator never writes code itself; it delegates, reviews, and gates. Dual-perspective reviewers catch defects and design issues a single model can miss, while multi-model research reduces single-LLM blind spots before implementation begins. All of these agents are scaffolded by `aikit init` and can be customized per project.
57
-
58
- ## What This Is
59
-
60
- This is an **MCP (Model Context Protocol) server** that gives AI agents:
61
-
62
- 1. **Hybrid search** — combines semantic vector search with full-text keyword search (BM25) using Reciprocal Rank Fusion (RRF) for best results. Supports `hybrid` (default), `semantic`, and `keyword` modes.
63
- 2. **Persistent curated memory** — agents can `remember`, `update`, `read`, `list`, and `forget` knowledge entries that survive across sessions
64
- 3. **Codebase analysis** — structural analysis, dependency graphs with confidence scoring, symbol extraction, pattern detection, and Mermaid diagram generation. Analysis results are auto-persisted into the vector store for future search.
65
- 4. **Knowledge production** — automated analysis pipelines that produce structured baselines for the agent to synthesize and store
66
- 5. **Next-step workflow hints** — every tool response includes contextual `_Next:` suggestions guiding the agent to logical follow-up actions
67
- 6. **Tree-sitter code chunking** — AST-based chunking for TS/JS/Python/Go/Rust/Java preserves function/class boundaries for higher-quality code search
68
- 7. **Knowledge graph** — auto-populated SQLite graph of modules, symbols, and import relationships with traversal, neighbor queries, and change impact tracking
69
- 8. **Graph auto-population** — during indexing, a lightweight regex extractor builds the knowledge graph automatically from TS/JS source files (functions, classes, interfaces, types, imports)
70
- 9. **Optimized reindex** — full reindex skips redundant hash checks, batches graph writes (flush every 50 files), and skips per-file graph deletes when bulk-cleared
71
- 10. **Tool profiles** — five built-in profiles (`full`, `safe`, `research`, `minimal`, `discovery`) that control which subset of 61 tools are exposed, reducing token overhead for focused tasks
72
- 11. **Meta-tools** — `list_tools`, `describe_tool`, and `search_tools` for incremental tool discovery without loading full descriptions (~200 tokens vs ~3000)
73
- 12. **Pluggable flow system** — built-in `basic` and `advanced` development flows plus custom flow support through unified `flow` actions (`list`, `start`, `step`, `status`, `read`, `runs`, `add`, `remove`, `update`, `reset`, `info`)
74
- 13. **Session digest** — auto-capture session decisions, files touched, and checkpoint state for seamless agent handoffs
75
- 14. **Middleware pipeline** — plugin hook system for extending tool execution with pre/post processing, logging, or custom validation
76
- 15. **Pluggable memory providers** — adapter interface for curated knowledge storage, supporting filesystem (default) and custom backends
77
-
78
- The AI Kit auto-indexes configured source directories on startup, stores embeddings in a local SQLite-vec vector store, and exposes everything through 61 MCP tools, 49 CLI commands, and 2 resources.
79
-
80
- ---
81
-
82
- ## Quick Start
83
-
84
- ### User-Level Install (recommended for multi-project setups)
85
-
86
- ```bash
87
- # Install once, works across all your projects
88
- npx @vpxa/aikit init --user
89
-
90
- # Then in any workspace, scaffold instructions only
91
- npx @vpxa/aikit init
92
- ```
93
-
94
- ### Workspace Install (per-project, self-contained)
95
-
96
- ```bash
97
- # Full workspace initialization
98
- npx @vpxa/aikit init --workspace
99
-
100
- # Index and search
101
- npx @vpxa/aikit reindex
102
- npx @vpxa/aikit search "authentication middleware"
103
- npx @vpxa/aikit serve
104
- ```
105
-
106
- ### After upgrading
107
-
108
- ```bash
109
- npx @vpxa/aikit init --force # Overwrite all scaffold/skill files
110
- npx @vpxa/aikit init --guide # Check which files are outdated
111
- ```
112
-
113
- > **Note:** In workspace mode, once `@vpxa/aikit` is installed locally, you can use the short `aikit` command (e.g. `aikit search`, `aikit serve`) since the local binary takes precedence.
114
-
115
- ## User-Level vs Workspace Mode
116
-
117
- AI Kit supports two installation modes:
118
-
119
- | | User-Level | Workspace |
120
- |---|---|---|
121
- | **Install** | `aikit init --user` (once) | `aikit init --workspace` (per project) |
122
- | **MCP config** | User-level (IDE-wide) | `.vscode/mcp.json` (workspace) |
123
- | **Data store** | `~/.aikit-data/<partition>/` | `.aikit-data/store/` (in project) |
124
- | **Skills** | `~/.aikit-data/skills/` | `.github/skills/` (in project) |
125
- | **Config** | Auto defaults per workspace | `aikit.config.json` (in project) |
126
-
127
- ### How it works
128
-
129
- - **`aikit init --user`** — Installs the MCP server in your user-level IDE config (VS Code, Cursor, Claude Code, Windsurf). Creates `~/.aikit-data/` for data. Skills are shared. The server auto-indexes each workspace it's opened in.
130
- - **`aikit init`** (smart default) — If user-level is installed, scaffolds workspace-only files (AGENTS.md, instructions, curated directories). If not, does a full workspace install.
131
- - **`aikit init --workspace`** — Traditional per-project install with full local config and data store.
132
-
133
- ### Checking your mode
134
-
135
- ```bash
136
- aikit status
137
- # Mode: user (workspace scaffolded)
138
- # Data: ~/.aikit-data/my-project-a1b2c3d4/
139
- # Registry: 3 workspace(s) enrolled
140
- ```
141
-
142
- ### Cross-workspace search (user-level mode only)
143
-
144
- ```
145
- search({ query: "error handling", workspaces: ["*"] }) # All workspaces
146
- search({ query: "CircuitBreaker", workspaces: ["other-project"] }) # Specific workspace
147
- symbol({ name: "MyService", workspaces: ["*"] }) # Find symbol across all
148
- find({ query: "retry logic", workspaces: ["backend", "shared"] }) # Multiple workspaces
149
- ```
150
-
151
- Tools supporting `workspaces` param: `search`, `find`, `symbol`.
152
-
153
- ## Tools by Category
154
-
155
- ### Search & Discovery
156
- | Tool | CLI | Description |
157
- |------|-----|-------------|
158
- | `aikit_search` | `aikit search` | Hybrid vector + keyword search |
159
- | `aikit_find` | `aikit find` | Federated search (vector, FTS, glob, regex). Use `mode: 'examples'` to find usage examples. |
160
- | `aikit_symbol` | `aikit symbol` | Resolve symbol definition, imports, references |
161
- | `aikit_lookup` | `aikit lookup` | Look up indexed chunks by file path |
162
- | `aikit_trace` | `aikit trace` | Forward/backward flow tracing |
163
- | `aikit_scope_map` | `aikit scope-map` | Generate task-scoped reading plan |
164
- | `aikit_dead_symbols` | `aikit dead-symbols` | Find unused exported symbols (source vs docs) |
165
- | `aikit_file_summary` | `aikit summarize` | Structural file overview |
166
-
167
- ### Code Analysis
168
- | Tool | CLI | Description |
169
- |------|-----|-------------|
170
- | `aikit_analyze` | `aikit analyze <aspect>` | Unified analysis entry point for `structure`, `dependencies`, `symbols`, `patterns`, `entry_points`, and `diagram` |
171
- | `aikit_blast_radius` | `aikit analyze blast-radius` | Change impact analysis |
172
-
173
- ### Context Management
174
- | Tool | CLI | Description |
175
- |------|-----|-------------|
176
- | `aikit_compact` | `aikit compact` | Compress text/file to relevant sections (accepts `path`) |
177
- | `aikit_workset` | `aikit workset` | Named file set management |
178
- | `aikit_stash` | `aikit stash` | Named key-value store |
179
- | `aikit_checkpoint` | `aikit checkpoint` | Session checkpoint save/restore |
180
- | `aikit_parse_output` | `aikit parse-output` | Parse build tool output (tsc, vitest, biome) |
181
- | `aikit_session_digest` | `aikit session-digest` | Auto-capture session activity, decisions, and state for handoff |
182
-
183
- ### FORGE & Context Compression
184
- | Tool | CLI | Description |
185
- |------|-----|-------------|
186
- | `aikit_forge_ground` | — | Complete FORGE Ground phase in one call (chains classify→scope→summarize→constraints→evidence) |
187
- | `aikit_forge_classify` | — | Classify FORGE tier (Floor/Standard/Critical) from files and task |
188
- | `aikit_evidence_map` | — | Track critical-path claims as V/A/U with receipts + deterministic Gate |
189
- | `aikit_digest` | — | Compress multiple text sources into token-budgeted digest |
190
- | `aikit_stratum_card` | — | Generate STRATUM T1/T2 context cards (10-100x token reduction) |
191
-
192
- ### Code Manipulation
193
- | Tool | CLI | Description |
194
- |------|-----|-------------|
195
- | `aikit_rename` | `aikit rename` | Smart symbol rename across files |
196
- | `aikit_codemod` | `aikit codemod` | Regex-based code transformations |
197
- | `aikit_diff_parse` | `aikit diff` | Parse unified diff into structured changes |
198
- | `aikit_data_transform` | `aikit transform` | JQ-like JSON transformations |
199
-
200
- ### Execution & Validation
201
- | Tool | CLI | Description |
202
- |------|-----|-------------|
203
- | `aikit_eval` | `aikit eval` | Sandboxed JavaScript/TypeScript execution |
204
- | `aikit_check` | `aikit check` | Incremental typecheck + lint (`detail`: summary/errors/full) |
205
- | `aikit_test_run` | `aikit test` | Run tests with structured results |
206
- | `aikit_audit` | `aikit audit` | Unified project audit: runs structure, deps, patterns, health, dead symbols, check, entry points in one call. Returns score, recommendations, and next steps. |
207
-
208
- ### Knowledge Management
209
- | Tool | CLI | Description |
210
- |------|-----|-------------|
211
- | `aikit_knowledge` | `aikit knowledge <action>` | Unified knowledge entry point for `remember`, `read`, `update`, `forget`, and `list` |
212
- | `aikit_produce_knowledge` | — | Auto-generate knowledge from analysis |
213
-
214
- ### Git & Environment
215
- | Tool | CLI | Description |
216
- |------|-----|-------------|
217
- | `aikit_git_context` | `aikit git` | Branch, status, recent commits |
218
- | `aikit_process` | `aikit proc` | Process supervisor |
219
- | `aikit_watch` | `aikit watch` | Filesystem watcher |
220
- | `aikit_delegate` | `aikit delegate` | Delegate subtask to local Ollama model |
221
-
222
- ### Web & Network
223
- | Tool | CLI | Description |
224
- |------|-----|-------------|
225
- | `aikit_web_fetch` | — | Fetch web page → markdown/raw/links/outline |
226
- | `aikit_web_search` | — | Search the web via DuckDuckGo (no API key) |
227
- | `aikit_http` | — | Make HTTP requests for API testing/debugging |
228
-
229
- ### Developer Utilities
230
- | Tool | CLI | Description |
231
- |------|-----|-------------|
232
- | `aikit_regex_test` | — | Test regex patterns (match/replace/split modes) |
233
- | `aikit_encode` | — | Base64, URL, SHA-256, MD5, hex, JWT decode |
234
- | `aikit_measure` | — | Code complexity and line-count metrics |
235
- | `aikit_changelog` | — | Generate changelog from git history |
236
- | `aikit_schema_validate` | — | Validate JSON data against JSON Schema |
237
- | `aikit_env` | — | System and runtime environment info |
238
- | `aikit_time` | — | Date parsing, timezone conversion, duration math |
239
-
240
- ### Verified Lanes
241
- | Tool | CLI | Description |
242
- |------|-----|-------------|
243
- | `aikit_lane` (create) | `aikit lane create` | Create isolated file copy for parallel exploration |
244
- | `aikit_lane` (list) | `aikit lane list` | List active lanes |
245
- | `aikit_lane` (status) | `aikit lane status` | Show modified/added/deleted files in a lane |
246
- | `aikit_lane` (diff) | `aikit lane diff` | Generate diff between lane and originals |
247
- | `aikit_lane` (merge) | `aikit lane merge` | Merge lane files back to originals |
248
- | `aikit_lane` (discard) | `aikit lane discard` | Discard a lane entirely |
249
-
250
- ### System
251
- | Tool | CLI | Description |
252
- |------|-----|-------------|
253
- | `aikit_status` | `aikit status` | Index statistics + tree-sitter availability |
254
- | `aikit_reindex` | `aikit reindex` | Rebuild index |
255
- | `aikit_health` | `aikit health` | Project health checks (package.json, tsconfig, lockfile, circular deps) |
256
- | `aikit_guide` | `aikit guide` | Tool discovery — given a goal, recommends tools and workflow order |
257
- | `aikit_queue` | `aikit queue` | Task queue for sequential agent operations |
258
- | `aikit_graph` | `aikit graph` | Query and manage the knowledge graph (8 actions: find_nodes, find_edges, neighbors, traverse, stats, add, delete, clear) |
259
- | `aikit_onboard` | `aikit onboard` | First-time codebase onboarding — runs all analysis tools in one command, auto-persists results |
260
- | `aikit_replay` | `aikit replay` | View or clear the audit trail of tool invocations (action: list/clear) |
261
- | `aikit_config` | `aikit config` | View and modify runtime configuration |
262
-
263
- ### Meta-Tools
264
- | Tool | CLI | Description |
265
- |------|-----|-------------|
266
- | `aikit_list_tools` | `aikit list-tools` | List all currently active tools with categories |
267
- | `aikit_describe_tool` | `aikit describe-tool` | Get detailed metadata for a specific tool |
268
- | `aikit_search_tools` | `aikit search-tools` | Search tools by keyword or capability |
269
-
270
- ### Flow Management
271
- | Tool | CLI | Description |
272
- |------|-----|-------------|
273
- | `aikit_flow` | `aikit flow` | Manage flows — list, start, navigate steps, read instructions, inspect runs, add/remove/update. Use `action` parameter. |
274
-
275
- ## MCP Integration
276
-
277
- After `aikit init`, your `.vscode/mcp.json` is configured automatically:
278
-
279
- ```json
280
- {
281
- "servers": {
282
- "aikit": {
283
- "type": "stdio",
284
- "command": "npx",
285
- "args": ["@vpxa/aikit", "serve"]
286
- }
287
- }
288
- }
289
- ```
290
-
291
- > **User-level mode:** When installed with `aikit init --user`, the MCP server is configured at the user level — no per-project `mcp.json` needed. The server auto-detects and indexes each workspace.
292
-
293
- ## CLI Usage
294
-
295
- ```bash
296
- aikit <command> [options]
297
-
298
- # Search & Discovery
299
- aikit search <query> [--limit N] [--mode hybrid|semantic|keyword]
300
- aikit find [query] [--glob pattern] [--pattern regex] [--limit N]
301
- aikit symbol <name>
302
- aikit scope-map <task> [--max-files N]
303
- aikit trace <symbol> [--direction forward|backward|both] [--depth N]
304
- aikit examples <query> [--limit N]
305
- aikit summarize <file>
306
- aikit dead-symbols [--limit N]
307
-
308
- # Analysis
309
- aikit analyze <type> <path>
310
- aikit lookup <path>
311
-
312
- # Context
313
- aikit compact <query> [--path <file>] [--max-chars N]
314
- aikit workset <action> [name] [--files f1,f2]
315
- aikit stash <action> [key] [value]
316
- aikit checkpoint <action> [label]
317
- aikit parse-output [--tool tsc|vitest|biome|git-status]
318
-
319
- # Code Manipulation
320
- aikit rename <old> <new> <path> [--dry-run]
321
- aikit codemod <path> --rules <file.json> [--dry-run]
322
- aikit diff
323
- aikit transform <expression>
324
-
325
- # Execution
326
- aikit eval <code> [--lang js|ts] [--timeout N]
327
- aikit test [files...] [--grep pattern]
328
- aikit check [--skip-types] [--skip-lint] [--detail summary|errors|full]
329
- aikit batch
330
-
331
- # Knowledge
332
- aikit remember <title> --category <cat> [--tags t1,t2]
333
- aikit forget <path> --reason <reason>
334
- aikit read <path>
335
- aikit list [--category cat] [--tag tag]
336
- aikit update <path> --reason <reason>
337
-
338
- # Git & Environment
339
- aikit git [--commits N] [--diff]
340
- aikit proc <action> [id] [--command cmd]
341
- aikit watch <action> [--path dir]
342
-
343
- # Verified Lanes
344
- aikit lane create <name> --files file1.ts,file2.ts
345
- aikit lane list
346
- aikit lane status <name>
347
- aikit lane diff <name>
348
- aikit lane merge <name>
349
- aikit lane discard <name>
350
-
351
- # Graph
352
- aikit graph stats
353
- aikit graph find-nodes [--type module|function|class] [--query pattern]
354
- aikit graph find-edges [--type imports|defines] [--source path]
355
- aikit graph neighbors <nodeId> [--direction in|out|both]
356
- aikit graph traverse <startId> [--direction forward|backward] [--depth N]
357
-
358
- # System
359
- aikit status
360
- aikit reindex [--full]
361
- aikit onboard <path> [--generate] [--out-dir <dir>]
362
- aikit serve [--transport stdio|http] [--port N]
363
- aikit init [--user|--workspace] [--force] [--guide]
364
- aikit dashboard [--port N] [--no-open]
365
- aikit settings [--port N] [--no-open]
366
- ```
367
-
368
- ## Settings UI
369
-
370
- `aikit settings` launches a local web UI for managing `aikit.config.json`
371
- and environment variables (workspace `.env` and global
372
- `~/.aikit-data/global.env`).
373
-
374
- ```bash
375
- aikit settings # opens http://localhost:3210/settings/
376
- aikit settings --port 4000 # custom port
377
- aikit settings --no-open # don't auto-open browser
378
- ```
379
-
380
- The same UI is also mounted at `/settings/` whenever the MCP server is
381
- running with `--transport http`. Both surfaces share these REST endpoints
382
- under `/settings/api`:
383
-
384
- | Method | Path | Purpose |
385
- |--------|------|---------|
386
- | GET | `/status` | Mode (workspace/user), config path, env paths, MCP info |
387
- | GET | `/schema` | Known config keys and env vars with types and descriptions |
388
- | GET | `/config` | Current `aikit.config.json` content |
389
- | PATCH | `/config` | Apply set/unset patch ops, atomic write |
390
- | GET | `/env?reveal=true` | Workspace + global env snapshots (secrets masked unless `reveal`) |
391
- | PUT | `/env/:key` | Write a value to `{ scope: 'workspace' \| 'global' }` |
392
- | DELETE | `/env/:key?scope=...` | Remove a key from the chosen scope |
393
-
394
- The HTTP server binds `127.0.0.1` only (matching the existing
395
- `/_dashboard/` convention). Restart the MCP server for environment
396
- changes to take effect.
397
-
398
- ## Configuration
399
-
400
- `aikit.config.json`:
401
-
402
- ```json
403
- {
404
- "sources": [{ "path": ".", "name": "project" }],
405
- "embedding": {
406
- "model": "Xenova/mxbai-embed-large-v1",
407
- "dimensions": 1024
408
- },
409
- "store": {
410
- "backend": "sqlite-vec",
411
- "path": ".aikit-data/store"
412
- },
413
- "curated": {
414
- "path": "curated"
415
- }
416
- }
417
- ```
418
-
419
- ### Server Configuration
420
-
421
- The aikit MCP server also supports these SDK v2 configuration options in `aikit.config.json`:
422
-
423
- #### Feature Groups (`features`)
424
-
425
- Restrict the server to specific tool categories:
426
-
427
- ```json
428
- {
429
- "features": ["search", "knowledge", "execution"]
430
- }
431
- ```
432
-
433
- When set, only tools belonging to the specified categories are registered, plus the base tools: `status`, `config`, `guide`, and `health`. Valid category names match the tool metadata categories exposed by the server.
434
-
435
- #### Read-Only Mode (`readOnly`)
436
-
437
- Prevent the server from modifying the codebase:
438
-
439
- ```json
440
- {
441
- "readOnly": true
442
- }
443
- ```
444
-
445
- When enabled, tools annotated with `readOnlyHint: false` are excluded. This filters out mutating tools such as `remember`, `update`, `forget`, `codemod`, and `rename`. The `config` tool is also limited to its `view` action.
446
-
447
- #### Server Instructions (`serverInstructions`)
448
-
449
- Override the auto-generated MCP server instructions:
450
-
451
- ```json
452
- {
453
- "serverInstructions": "Custom instructions for the LLM about this server"
454
- }
455
- ```
456
-
457
- If not set, the server auto-generates instructions that list the available tool categories and note any active restrictions.
458
-
459
- #### Tool Profiles (`toolProfile`)
460
-
461
- Select a predefined tool profile:
462
-
463
- ```json
464
- {
465
- "toolProfile": "safe"
466
- }
467
- ```
468
-
469
- Available profiles: `full` (default), `safe`, `research`, `minimal`, `discovery`.
470
-
471
- ## Architecture
472
-
473
- ```text
474
- @vpxa/aikit
475
- ├── packages/
476
- │ ├── core/ — types, config, logger, constants, global registry
477
- │ ├── store/ — SQLite-vec vector store
478
- │ ├── embeddings/ — ONNX local embeddings
479
- │ ├── chunker/ — tree-sitter + regex code chunking
480
- │ ├── indexer/ — incremental file indexer
481
- │ ├── analyzers/ — blast-radius, deps, symbols, patterns, diagrams
482
- │ ├── tools/ — consolidated tool modules (61 MCP tools)
483
- │ ├── server/ — MCP protocol server
484
- │ └── cli/ — command-line interface
485
- ├── bin/aikit.mjs — CLI entry point
486
- └── skills/ — LLM skill files
487
- ```
488
-
489
- ## License
490
-
491
- MIT
492
-
493
- ### Development
494
-
495
- ```bash
496
- pnpm install # Install dependencies
497
- pnpm build # Build all packages
498
- pnpm test # Run tests (Vitest)
499
- pnpm lint # Lint (Biome)
500
- ```
501
-
502
- ---
503
-
504
- ## Detailed MCP Tools Reference
505
-
506
- ### Search & Retrieval
507
-
508
- #### `aikit_search` — Hybrid search across the AI Kit index
509
-
510
- Find relevant code, docs, patterns, and curated knowledge using hybrid (vector + keyword), semantic, or keyword-only search.
511
-
512
- | Parameter | Type | Required | Default | Description |
513
- |-----------|------|----------|---------|-------------|
514
- | `query` | string | **yes** | — | Natural language search query |
515
- | `limit` | number (1–20) | no | 5 | Maximum results to return |
516
- | `search_mode` | enum | no | `hybrid` | Search strategy: `hybrid` (vector + FTS + RRF fusion), `semantic` (vector only), `keyword` (FTS only) |
517
- | `content_type` | enum | no | — | Filter: `markdown`, `code-typescript`, `code-javascript`, `code-python`, `config-json`, `config-yaml`, `config-toml`, `config-dotenv`, `infrastructure`, `documentation`, `test`, `script`, `curated-knowledge`, `produced-knowledge`, `other` |
518
- | `origin` | enum | no | — | Filter: `indexed` (from files), `curated` (agent memory), `produced` (auto-generated) |
519
- | `category` | string | no | — | Filter by curated category (e.g., `decisions`, `patterns`) |
520
- | `tags` | string[] | no | — | Filter by tags (OR matching) |
521
- | `workspaces` | string[] | no | — | Cross-workspace search: partition names, folder basenames, or `["*"]` for all. User-level mode only. |
522
- | `min_score` | number (0–1) | no | 0.25 | Minimum similarity score threshold |
523
-
524
- **Returns**: Ranked results with score, source path, content type, line range, heading path, origin, tags, and full content text. Each response includes a `_Next:` hint suggesting logical follow-up tools.
525
-
526
- **Search modes**:
527
- - **`hybrid`** (default) — Runs vector similarity and full-text keyword search in parallel, then merges rankings using Reciprocal Rank Fusion (k=60). Best for most queries.
528
- - **`semantic`** — Pure vector cosine similarity. Best when searching by meaning/concept rather than exact terms.
529
- - **`keyword`** — Full-text search using SQLite FTS5 index. Best when searching for exact identifiers, function names, or specific strings.
530
-
531
- **Best practices for query**:
532
- - Use natural language describing what you're looking for: `"how does the notification dispatcher route messages"`
533
- - Include domain terms that would appear in the code: `"DynamoDB single-table GSI pattern for notifications"`
534
- - Use `search_mode: "keyword"` for exact function/class names: `"reciprocalRankFusion"`
535
- - Use `search_mode: "semantic"` for conceptual queries: `"retry strategy with exponential backoff"`
536
- - For curated knowledge, combine with `origin: "curated"`: `query: "architecture decision", origin: "curated"`
537
-
538
- #### `aikit_lookup` — Get all chunks for a specific file
539
-
540
- | Parameter | Type | Required | Description |
541
- |-----------|------|----------|-------------|
542
- | `path` | string | **yes** | Relative file path (e.g., `src/index.ts`) |
543
-
544
- **Returns**: All chunks for that file, sorted by position, with line ranges and content.
545
-
546
- #### `aikit_status` — View index statistics
547
-
548
- No parameters. Returns total records, total files, content type breakdown, last indexed timestamp, and list of indexed files.
549
-
550
- ### Curated Knowledge (Persistent Memory)
551
-
552
- These tools give the agent **persistent, version-tracked memory** that survives across sessions. Knowledge is stored as markdown files with YAML frontmatter in the `curated/` directory and simultaneously indexed into the vector store for semantic search.
553
-
554
- #### `aikit_knowledge` — Unified curated knowledge tool
555
-
556
- Use the `action` parameter to choose the operation: `remember`, `read`, `update`, `forget`, or `list`.
557
-
558
- | Parameter | Type | Required | Description |
559
- |-----------|------|----------|-------------|
560
- | `title` | string (3–120 chars) | **yes** | Short descriptive title |
561
- | `content` | string (≥10 chars) | **yes** | Markdown content to store |
562
- | `category` | string (kebab-case) | **yes** | Category slug: `decisions`, `patterns`, `conventions`, `troubleshooting`, or any custom kebab-case name |
563
- | `tags` | string[] | no | Tags for filtering |
564
-
565
- **What to remember**: Architecture decisions, coding conventions, recurring patterns, API contracts, deployment procedures, debugging solutions, team agreements, review findings.
566
-
567
- #### `aikit_knowledge` with `action: "update"` — Update existing knowledge
568
-
569
- | Parameter | Type | Required | Description |
570
- |-----------|------|----------|-------------|
571
- | `path` | string | **yes** | Path from `aikit_list` (e.g., `decisions/use-sqlite-vec.md`) |
572
- | `content` | string (≥10 chars) | **yes** | New markdown content (replaces existing) |
573
- | `reason` | string (≥3 chars) | **yes** | Why this update is being made (recorded in changelog) |
574
-
575
- Increments version number and appends to the entry's changelog.
576
-
577
- #### `aikit_knowledge` with `action: "read"` — Read a curated entry
578
-
579
- | Parameter | Type | Required | Description |
580
- |-----------|------|----------|-------------|
581
- | `path` | string | **yes** | Path from `aikit_list` |
582
-
583
- **Returns**: Full metadata (title, version, tags, created, updated) and content.
584
-
585
- #### `aikit_knowledge` with `action: "list"` — List curated entries
586
-
587
- | Parameter | Type | Required | Description |
588
- |-----------|------|----------|-------------|
589
- | `category` | string | no | Filter by category |
590
- | `tag` | string | no | Filter by tag |
591
-
592
- **Returns**: All entries with title, version, tags, path, and 80-char content preview.
593
-
594
- #### `aikit_knowledge` with `action: "forget"` — Remove a curated entry
595
-
596
- | Parameter | Type | Required | Description |
597
- |-----------|------|----------|-------------|
598
- | `path` | string | **yes** | Path from `aikit_list` |
599
- | `reason` | string (≥3 chars) | **yes** | Why this entry is being removed |
600
-
601
- Deletes from disk and vector store.
602
-
603
- ### Indexing
604
-
605
- #### `aikit_reindex` — Trigger re-indexing
606
-
607
- | Parameter | Type | Required | Default | Description |
608
- |-----------|------|----------|---------|-------------|
609
- | `full` | boolean | no | false | If true, force full re-index ignoring file hashes |
610
-
611
- Incremental mode (default) only re-indexes files whose content hash has changed. Full mode drops the table and rebuilds from scratch.
612
-
613
- ### Codebase Analysis
614
-
615
- #### `aikit_produce_knowledge` — Automated analysis + synthesis instructions
616
-
617
- | Parameter | Type | Required | Default | Description |
618
- |-----------|------|----------|---------|-------------|
619
- | `scope` | string | no | `.` (root) | Root path to analyze |
620
- | `aspects` | enum[] | no | `["all"]` | `all`, `structure`, `dependencies`, `symbols`, `patterns`, `entry-points`, `diagrams` |
621
-
622
- Runs deterministic analyzers, then returns structured instructions for the agent to synthesize and store findings using `aikit_knowledge` with `action: "remember"`.
623
-
624
- #### `aikit_analyze` with `aspect: "structure"` — File/directory tree with language stats
625
-
626
- | Parameter | Type | Required | Default | Description |
627
- |-----------|------|----------|---------|-------------|
628
- | `path` | string | **yes** | — | Root path to analyze |
629
- | `max_depth` | number (1–10) | no | 6 | Maximum directory depth |
630
- | `format` | enum | no | `markdown` | `json` or `markdown` |
631
-
632
- #### `aikit_analyze` with `aspect: "dependencies"` — Import/require dependency graph (with confidence)
633
-
634
- | Parameter | Type | Required | Default | Description |
635
- |-----------|------|----------|---------|-------------|
636
- | `path` | string | **yes** | — | Root path |
637
- | `format` | enum | no | `markdown` | `json`, `markdown`, or `mermaid` |
638
-
639
- Dependency results include a **confidence** level per import: `high` (ES static imports), `medium` (dynamic imports, require()), `low` (inferred). The markdown format shows a Confidence column in dependency tables.
640
-
641
- #### `aikit_analyze` with `aspect: "symbols"` — Exported & local symbols
642
-
643
- | Parameter | Type | Required | Default | Description |
644
- |-----------|------|----------|---------|-------------|
645
- | `path` | string | **yes** | — | Root path |
646
- | `filter` | string | no | — | Filter symbols by name substring |
647
- | `format` | enum | no | `markdown` | `json` or `markdown` |
648
-
649
- #### `aikit_analyze` with `aspect: "patterns"` — Detect architectural patterns & frameworks
650
-
651
- | Parameter | Type | Required | Description |
652
- |-----------|------|----------|-------------|
653
- | `path` | string | **yes** | Root path |
654
-
655
- #### `aikit_analyze` with `aspect: "entry_points"` — Find Lambda handlers, CDK constructs, test suites, package exports
656
-
657
- Walks monorepo workspace packages (pnpm-workspace.yaml / package.json#workspaces), parses `exports` fields, detects CDK constructs and test suites.
658
-
659
- | Parameter | Type | Required | Description |
660
- |-----------|------|----------|-------------|
661
- | `path` | string | **yes** | Root path |
662
-
663
- #### `aikit_analyze` with `aspect: "diagram"` — Generate Mermaid architecture/dependency diagrams
664
-
665
- | Parameter | Type | Required | Default | Description |
666
- |-----------|------|----------|---------|-------------|
667
- | `path` | string | **yes** | — | Root path |
668
- | `diagram_type` | enum | no | `architecture` | `architecture` or `dependencies` |
669
-
670
- ### Context Management
671
-
672
- #### `aikit_compact` — Compress text to query-relevant sections
673
-
674
- | Parameter | Type | Required | Default | Description |
675
- |-----------|------|----------|---------|-------------|
676
- | `text` | string | no* | — | The text to compress (provide `text` or `path`) |
677
- | `path` | string | no* | — | File path to read server-side (avoids read_file round-trip) |
678
- | `query` | string | **yes** | — | Focus query — what are you trying to understand? |
679
- | `max_chars` | number (100–50000) | no | `3000` | Target output size in characters |
680
- | `segmentation` | enum | no | `paragraph` | How to split: `paragraph`, `sentence`, `line` |
681
-
682
- \* At least one of `text` or `path` must be provided. Using `path` is preferred — it eliminates the `read_file` → `compact` two-call chain and prevents token doubling.
683
-
684
- #### `aikit_workset` — Manage named file sets
685
-
686
- | Parameter | Type | Required | Default | Description |
687
- |-----------|------|----------|---------|-------------|
688
- | `action` | enum | **yes** | — | `save`, `get`, `list`, `delete`, `add`, `remove` |
689
- | `name` | string | varies | — | Workset name (required for all except `list`) |
690
- | `files` | string[] | varies | — | File paths (required for `save`, `add`, `remove`) |
691
- | `description` | string | no | — | Description (for `save`) |
692
-
693
- Worksets persist across sessions in `.aikit-state/worksets.json`.
694
-
695
- #### `aikit_stash` — Persist named key-value pairs
696
-
697
- | Parameter | Type | Required | Default | Description |
698
- |-----------|------|----------|---------|-------------|
699
- | `action` | enum | **yes** | — | `set`, `get`, `list`, `delete`, `clear` |
700
- | `key` | string | varies | — | Entry key (for `set`, `get`, `delete`) |
701
- | `value` | string | varies | — | String or JSON value (for `set`) |
702
-
703
- Stores intermediate results between tool calls in `.aikit-state/stash.json`.
704
-
705
- #### `aikit_checkpoint` — Save/restore session checkpoints
706
-
707
- | Parameter | Type | Required | Default | Description |
708
- |-----------|------|----------|---------|-------------|
709
- | `action` | enum | **yes** | — | `save`, `load`, `list`, `latest` |
710
- | `label` | string | varies | — | Checkpoint label (for `save`), or checkpoint ID (for `load`) |
711
- | `data` | string | varies | — | JSON object string (for `save`) |
712
- | `notes` | string | no | — | Optional notes (for `save`) |
713
-
714
- Lightweight checkpoints stored in `.aikit-state/checkpoints/` for cross-session continuity.
715
-
716
- #### `aikit_parse_output` — Parse build tool output
717
-
718
- | Parameter | Type | Required | Default | Description |
719
- |-----------|------|----------|---------|-------------|
720
- | `output` | string | **yes** | — | Raw output text from a build tool |
721
- | `tool` | enum | no | auto-detect | `tsc`, `vitest`, `biome`, `git-status` |
722
-
723
- Returns JSON structured parse result with errors, warnings, and file references. Auto-detects the tool format when not specified.
724
-
725
- ### FORGE & Context Compression
726
-
727
- #### `aikit_forge_ground` — Complete FORGE Ground phase
728
-
729
- | Parameter | Type | Required | Default | Description |
730
- |-----------|------|----------|---------|-------------|
731
- | `task` | string | **yes** | — | Task description |
732
- | `files` | string[] | **yes** | — | Target files being modified (absolute paths) |
733
- | `root_path` | string | **yes** | — | Root path of the codebase |
734
- | `max_constraints` | number (0–10) | no | `3` | Max constraint entries to load from AI Kit |
735
- | `force_tier` | enum | no | auto | Force tier: `floor`, `standard`, `critical` (skips auto-classification) |
736
- | `task_id` | string | no | auto-generated | Custom task ID for evidence map |
737
-
738
- Chains: tier classification → scope map → file summaries → constraint loading → typed unknown seeds → evidence map creation. Replaces 5-15 manual tool calls. Floor tasks get a minimal shortcut (no scope map / constraints / evidence map).
739
-
740
- #### `aikit_forge_classify` — Classify FORGE tier
741
-
742
- | Parameter | Type | Required | Description |
743
- |-----------|------|----------|-------------|
744
- | `files` | string[] | **yes** | Files being modified (paths) |
745
- | `task` | string | **yes** | Task description |
746
- | `root_path` | string | **yes** | Root path of the codebase |
747
-
748
- Checks blast radius, cross-package boundaries, schema/contract patterns, and security signals. Returns tier, triggers, typed unknown seeds, packages crossed, and ceremony guidance.
749
-
750
- #### `aikit_evidence_map` — FORGE Evidence Map CRUD + Gate
751
-
752
- | Parameter | Type | Required | Default | Description |
753
- |-----------|------|----------|---------|-------------|
754
- | `action` | enum | **yes** | — | `create`, `add`, `update`, `get`, `gate`, `list`, `delete` |
755
- | `task_id` | string | varies | — | Task identifier (all except `list`) |
756
- | `tier` | enum | varies | — | FORGE tier (for `create`): `floor`, `standard`, `critical` |
757
- | `claim` | string | varies | — | Critical-path claim text (for `add`) |
758
- | `status` | enum | varies | — | `V` (Verified), `A` (Assumed), `U` (Unresolved) |
759
- | `receipt` | string | no | — | Evidence: tool→ref for V, reasoning for A, attempts for U |
760
- | `id` | number | varies | — | Entry ID (for `update`) |
761
- | `critical_path` | boolean | no | `true` | Whether claim is on the critical path |
762
- | `unknown_type` | enum | no | — | `contract`, `convention`, `freshness`, `runtime`, `data-flow`, `impact` |
763
- | `retry_count` | number | no | `0` | Retry count for gate evaluation |
764
-
765
- Gate decision logic: HARD_BLOCK (contract U on critical path) → HOLD (non-contract U, retry 0) → FORCED_DELIVERY (non-contract U, retry ≥ 1) → YIELD. Persists in `.aikit-state/evidence-maps.json`.
766
-
767
- #### `aikit_digest` — Token-budgeted multi-source compression
768
-
769
- | Parameter | Type | Required | Default | Description |
770
- |-----------|------|----------|---------|-------------|
771
- | `sources` | object[] | **yes** | — | Sources: `{ id, text, weight }` (weight = priority, higher = more budget) |
772
- | `query` | string | **yes** | — | Focus query — what matters for the next step? |
773
- | `max_chars` | number (100–50000) | no | `4000` | Target budget in characters |
774
- | `pin_fields` | string[] | no | status, files, decisions, blockers, next | Key fields to always extract |
775
- | `segmentation` | enum | no | `paragraph` | `paragraph`, `sentence`, `line` |
776
-
777
- Jointly ranks across all sources using embedding similarity. Pins structured fields (key:value patterns) and allocates remaining budget proportionally by weight. Returns compressed text + extracted fields + per-source stats.
778
-
779
- #### `aikit_stratum_card` — STRATUM context cards
780
-
781
- | Parameter | Type | Required | Default | Description |
782
- |-----------|------|----------|---------|-------------|
783
- | `files` | string[] | **yes** | — | Absolute file paths to generate cards for |
784
- | `query` | string | **yes** | — | Current task query — guides relevance scoring |
785
- | `tier` | enum | no | `T1` | `T1` = structural only (~100 tok/file), `T2` = T1 + compressed content (~300 tok/file) |
786
- | `max_content_chars` | number (100–5000) | no | `800` | For T2: max chars for compressed content section |
787
-
788
- T1 cards contain: ROLE, DEPS, EXPORTS, UNKNOWNS, RISK. T2 adds a CONTEXT section with query-compressed content. Uses `aikit_file_summary` + embedder similarity. No generative LLM needed.
789
-
790
- ### Search & Discovery
791
-
792
- #### `aikit_find` — Federated multi-strategy search
793
-
794
- | Parameter | Type | Required | Default | Description |
795
- |-----------|------|----------|---------|-------------|
796
- | `query` | string | no | — | Semantic/keyword search query |
797
- | `glob` | string | no | — | File glob pattern |
798
- | `pattern` | string | no | — | Regex pattern to match in content |
799
- | `limit` | number (1–50) | no | `10` | Max results |
800
- | `content_type` | string | no | — | Filter by content type |
801
-
802
- Combines vector similarity, keyword (FTS), file glob, and regex strategies. Deduplicates and returns unified results with source, path, line range, score %, and preview.
803
-
804
- #### `aikit_symbol` — Resolve a symbol across the codebase
805
-
806
- | Parameter | Type | Required | Default | Description |
807
- |-----------|------|----------|---------|-------------|
808
- | `name` | string | **yes** | — | Symbol name (function, class, type, etc.) |
809
- | `limit` | number (1–50) | no | `20` | Max results per category |
810
-
811
- Finds where a symbol is defined, who imports it, and where it is referenced. Works on TypeScript and JavaScript.
812
-
813
- #### `aikit_scope_map` — Generate a task-scoped reading plan
814
-
815
- | Parameter | Type | Required | Default | Description |
816
- |-----------|------|----------|---------|-------------|
817
- | `task` | string | **yes** | — | Description of the task to scope |
818
- | `max_files` | number (1–50) | no | `15` | Maximum files to include |
819
- | `content_type` | string | no | — | Filter by content type |
820
-
821
- Returns a ranked file list with estimated token counts, relevance %, focus line ranges, and a suggested reading order.
822
-
823
- #### `aikit_trace` — Trace data flow through imports/references
824
-
825
- | Parameter | Type | Required | Default | Description |
826
- |-----------|------|----------|---------|-------------|
827
- | `start` | string | **yes** | — | Starting point — symbol name or `file:line` reference |
828
- | `direction` | enum | **yes** | — | `forward`, `backward`, `both` |
829
- | `max_depth` | number (1–10) | no | `3` | Maximum trace depth |
830
-
831
- Follows imports, call sites, and references to build a relationship graph from a starting symbol or file location.
832
-
833
- #### `aikit_dead_symbols` — Find unused exported symbols
834
-
835
- | Parameter | Type | Required | Default | Description |
836
- |-----------|------|----------|---------|-------------|
837
- | `limit` | number (1–500) | no | `100` | Maximum exported symbols to scan |
838
-
839
- Finds exported symbols that are never imported or re-exported anywhere in the project.
840
-
841
- #### `aikit_file_summary` — Structural summary of a source file
842
-
843
- | Parameter | Type | Required | Description |
844
- |-----------|------|----------|-------------|
845
- | `path` | string | **yes** | Absolute path to the file |
846
-
847
- Returns imports, exports, functions, classes, interfaces, and types found in the file.
848
-
849
- ### Code Manipulation
850
-
851
- #### `aikit_rename` — Rename a symbol across files
852
-
853
- | Parameter | Type | Required | Default | Description |
854
- |-----------|------|----------|---------|-------------|
855
- | `old_name` | string | **yes** | — | Existing symbol name |
856
- | `new_name` | string | **yes** | — | New symbol name |
857
- | `root_path` | string | **yes** | — | Root directory to search within |
858
- | `extensions` | string[] | no | — | File extensions to include (e.g., `.ts`, `.tsx`) |
859
- | `dry_run` | boolean | no | `true` | Preview changes without writing files |
860
-
861
- Uses whole-word regex matching for exports, imports, and general usage references. Defaults to dry run.
862
-
863
- #### `aikit_codemod` — Apply regex-based codemod rules
864
-
865
- | Parameter | Type | Required | Default | Description |
866
- |-----------|------|----------|---------|-------------|
867
- | `root_path` | string | **yes** | — | Root directory to transform within |
868
- | `rules` | object[] (min 1) | **yes** | — | Codemod rules: `description`, `pattern` (regex), `replacement` (with capture groups) |
869
- | `dry_run` | boolean | no | `true` | Preview changes without writing files |
870
-
871
- Returns structured before/after changes for each affected line. Defaults to dry run.
872
-
873
- #### `aikit_diff_parse` — Parse unified diff text
874
-
875
- | Parameter | Type | Required | Description |
876
- |-----------|------|----------|-------------|
877
- | `diff` | string | **yes** | Raw unified diff text |
878
-
879
- Parses into file-level and hunk-level structural changes.
880
-
881
- #### `aikit_data_transform` — jq-like JSON transforms
882
-
883
- | Parameter | Type | Required | Description |
884
- |-----------|------|----------|-------------|
885
- | `input` | string | **yes** | Input JSON string |
886
- | `expression` | string | **yes** | Transform expression (filtering, projection, grouping, path extraction) |
887
-
888
- ### Execution & Validation
889
-
890
- #### `aikit_eval` — Execute code in a sandboxed VM
891
-
892
- | Parameter | Type | Required | Default | Description |
893
- |-----------|------|----------|---------|-------------|
894
- | `code` | string | **yes** | — | Code snippet to execute |
895
- | `lang` | enum | no | `js` | `js` (direct) or `ts` (strips type syntax first) |
896
- | `timeout` | number (1–60000) | no | `5000` | Execution timeout in milliseconds |
897
-
898
- Captures console output and return values. Constrained VM with timeout.
899
-
900
- #### `aikit_check` — Run typecheck and lint
901
-
902
- | Parameter | Type | Required | Default | Description |
903
- |-----------|------|----------|---------|-------------|
904
- | `files` | string[] | no | — | Specific files (omit to check all) |
905
- | `cwd` | string | no | — | Working directory |
906
- | `skip_types` | boolean | no | `false` | Skip TypeScript typecheck |
907
- | `skip_lint` | boolean | no | `false` | Skip Biome lint |
908
-
909
- Runs incremental `tsc` and `biome` and returns structured error/warning lists.
910
-
911
- #### `aikit_test_run` — Run Vitest tests
912
-
913
- | Parameter | Type | Required | Default | Description |
914
- |-----------|------|----------|---------|-------------|
915
- | `files` | string[] | no | — | Specific test files or patterns |
916
- | `grep` | string | no | — | Only run tests matching this pattern |
917
- | `cwd` | string | no | — | Working directory |
918
-
919
- Returns structured pass/fail summary. `isError` set if any tests failed.
920
-
921
- #### `aikit_audit` — Unified project audit
922
-
923
- Runs multiple analysis checks in a single call and returns a synthesized report with a composite score (0–100), per-check summaries, and prioritized recommendations.
924
-
925
- | Parameter | Type | Required | Default | Description |
926
- |-----------|------|----------|---------|-------------|
927
- | `path` | string | no | `.` | Root path to audit |
928
- | `checks` | string[] | no | all | Subset of checks: `structure`, `dependencies`, `patterns`, `health`, `dead_symbols`, `check`, `entry_points` |
929
- | `detail` | enum | no | `summary` | `summary` (markdown overview) or `full` (structured JSON data) |
930
-
931
- Returns `KBResponse<AuditData>` with `next[]` hints for follow-up actions.
932
-
933
- ### Git & Environment
934
-
935
- #### `aikit_git_context` — Summarize Git repository state
936
-
937
- | Parameter | Type | Required | Default | Description |
938
- |-----------|------|----------|---------|-------------|
939
- | `cwd` | string | no | — | Repository root |
940
- | `commit_count` | number (1–50) | no | `5` | Recent commits to include |
941
- | `include_diff` | boolean | no | `false` | Include diff stat for working tree |
942
-
943
- Returns branch, working tree status, recent commits, and optionally diff stats.
944
-
945
- #### `aikit_process` — Manage child processes
946
-
947
- | Parameter | Type | Required | Default | Description |
948
- |-----------|------|----------|---------|-------------|
949
- | `action` | enum | **yes** | — | `start`, `stop`, `status`, `list`, `logs` |
950
- | `id` | string | varies | — | Managed process ID |
951
- | `command` | string | varies | — | Executable (for `start`) |
952
- | `args` | string[] | no | — | Arguments (for `start`) |
953
- | `tail` | number (1–500) | no | — | Log lines (for `logs`) |
954
-
955
- #### `aikit_watch` — Filesystem watchers
956
-
957
- | Parameter | Type | Required | Default | Description |
958
- |-----------|------|----------|---------|-------------|
959
- | `action` | enum | **yes** | — | `start`, `stop`, `list` |
960
- | `path` | string | varies | — | Directory path (for `start`) |
961
- | `id` | string | varies | — | Watcher ID (for `stop`) |
962
-
963
- #### `aikit_delegate` — Delegate subtask to local Ollama model
964
-
965
- | Parameter | Type | Required | Default | Description |
966
- |-----------|------|----------|---------|-------------|
967
- | `prompt` | string | **yes** | — | Task or question to send |
968
- | `model` | string | no | first available | Ollama model name |
969
- | `system` | string | no | — | System prompt |
970
- | `context` | string | no | — | Context text (e.g., file contents) |
971
- | `temperature` | number (0–2) | no | `0.3` | Sampling temperature |
972
- | `timeout` | number (1000–600000) | no | `120000` | Timeout in ms |
973
- | `action` | enum | no | `generate` | `generate` or `list_models` |
974
-
975
- Fails fast if Ollama is not running. Returns model name, response text, duration, and token count.
976
-
977
- ### Web & Network
978
-
979
- #### `aikit_web_fetch` — Fetch web page for LLM consumption
980
-
981
- | Parameter | Type | Required | Default | Description |
982
- |-----------|------|----------|---------|-------------|
983
- | `url` | string | **yes** | — | URL to fetch (http/https only) |
984
- | `mode` | enum | no | `markdown` | `markdown`, `raw`, `links`, `outline` |
985
- | `selector` | string | no | — | CSS selector to extract a specific element |
986
- | `max_length` | number (500–100000) | no | `15000` | Max output characters |
987
- | `include_metadata` | boolean | no | `true` | Include page title/description header |
988
- | `include_links` | boolean | no | `false` | Append extracted links |
989
- | `include_images` | boolean | no | `false` | Include image alt texts |
990
- | `timeout` | number (1000–60000) | no | `15000` | Request timeout in ms |
991
-
992
- Strips scripts, styles, and boilerplate. Smart truncation at paragraph boundaries.
993
-
994
- #### `aikit_web_search` — Search the web
995
-
996
- | Parameter | Type | Required | Default | Description |
997
- |-----------|------|----------|---------|-------------|
998
- | `query` | string | **yes** | — | Search query |
999
- | `limit` | number (1–20) | no | `5` | Max results |
1000
- | `site` | string | no | — | Restrict to domain (e.g., `docs.aws.amazon.com`) |
1001
-
1002
- Uses DuckDuckGo HTML search — no API key required. Returns title, URL, and snippet for each result.
1003
-
1004
- #### `aikit_http` — Make HTTP requests
1005
-
1006
- | Parameter | Type | Required | Default | Description |
1007
- |-----------|------|----------|---------|-------------|
1008
- | `url` | string | **yes** | — | Request URL (http/https only) |
1009
- | `method` | enum | no | `GET` | `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD` |
1010
- | `headers` | record | no | — | Request headers |
1011
- | `body` | string | no | — | Request body |
1012
- | `timeout` | number (1000–60000) | no | `15000` | Timeout in ms |
1013
-
1014
- Returns status, headers, formatted body (auto-pretty-prints JSON), timing, and size. Truncates responses over 50K chars.
1015
-
1016
- ### Developer Utilities
1017
-
1018
- #### `aikit_regex_test` — Test regex patterns
1019
-
1020
- | Parameter | Type | Required | Default | Description |
1021
- |-----------|------|----------|---------|-------------|
1022
- | `pattern` | string | **yes** | — | Regex pattern (without delimiters) |
1023
- | `flags` | string | no | `""` | Regex flags (g, i, m, s, etc.) |
1024
- | `test_strings` | string[] | **yes** | — | Strings to test against |
1025
- | `mode` | enum | no | `match` | `match`, `replace`, `split` |
1026
- | `replacement` | string | no | — | Replacement string (for replace mode) |
1027
-
1028
- Returns match details with groups and indices for each test string.
1029
-
1030
- #### `aikit_encode` — Encoding, decoding, and hashing
1031
-
1032
- | Parameter | Type | Required | Description |
1033
- |-----------|------|----------|-------------|
1034
- | `operation` | enum | **yes** | `base64_encode`, `base64_decode`, `url_encode`, `url_decode`, `sha256`, `md5`, `jwt_decode`, `hex_encode`, `hex_decode` |
1035
- | `input` | string | **yes** | Input text |
1036
-
1037
- JWT decode shows header and payload without signature verification.
1038
-
1039
- #### `aikit_measure` — Code complexity metrics
1040
-
1041
- | Parameter | Type | Required | Default | Description |
1042
- |-----------|------|----------|---------|-------------|
1043
- | `path` | string | **yes** | — | File or directory to measure |
1044
- | `extensions` | string[] | no | `.ts,.tsx,.js,.jsx` | File extensions to include |
1045
-
1046
- Returns per-file metrics (cyclomatic complexity, line counts, function counts, imports/exports) sorted by complexity, plus aggregate summary.
1047
-
1048
- #### `aikit_changelog` — Generate changelog from git history
1049
-
1050
- | Parameter | Type | Required | Default | Description |
1051
- |-----------|------|----------|---------|-------------|
1052
- | `from` | string | **yes** | — | Start ref (tag, SHA, HEAD~N) |
1053
- | `to` | string | no | `HEAD` | End ref |
1054
- | `format` | enum | no | `grouped` | `grouped`, `chronological`, `per-scope` |
1055
- | `include_breaking` | boolean | no | `true` | Highlight breaking changes |
1056
-
1057
- Parses conventional commit format (type(scope): subject). Groups by feat/fix/refactor/etc.
1058
-
1059
- #### `aikit_schema_validate` — JSON Schema validation
1060
-
1061
- | Parameter | Type | Required | Description |
1062
- |-----------|------|----------|-------------|
1063
- | `data` | string | **yes** | JSON data to validate (as string) |
1064
- | `schema` | string | **yes** | JSON Schema to validate against (as string) |
1065
-
1066
- Supports: type, required, properties, additionalProperties, items, enum, const, pattern, minimum/maximum, minLength/maxLength, minItems/maxItems.
1067
-
1068
- #### `aikit_env` — System environment info
1069
-
1070
- | Parameter | Type | Required | Default | Description |
1071
- |-----------|------|----------|---------|-------------|
1072
- | `include_env` | boolean | no | `false` | Include environment variables |
1073
- | `filter_env` | string | no | — | Filter env vars by name substring |
1074
- | `show_sensitive` | boolean | no | `false` | Show sensitive values (redacted by default) |
1075
-
1076
- Returns platform, arch, OS, CPU count, memory, Node version, CWD. Sensitive env var values (keys matching key/secret/token/password) are redacted unless explicitly requested.
1077
-
1078
- #### `aikit_time` — Date/time utilities
1079
-
1080
- | Parameter | Type | Required | Description |
1081
- |-----------|------|----------|-------------|
1082
- | `operation` | enum | **yes** | `now`, `parse`, `convert`, `diff`, `add` |
1083
- | `input` | string | varies | Date input (ISO, unix timestamp, parseable string). For diff: two comma-separated dates |
1084
- | `timezone` | string | no | Target timezone (e.g., `America/New_York`) |
1085
- | `duration` | string | no | Duration to add (e.g., `2h30m`, `1d`) — for add operation |
1086
-
1087
- Auto-detects unix seconds vs milliseconds. Supports human-readable duration format (2h30m, 1d12h).
1088
-
1089
- ### Verified Lanes
1090
-
1091
- #### `aikit_lane` — Manage verified lanes
1092
-
1093
- | Parameter | Type | Required | Default | Description |
1094
- |-----------|------|----------|---------|-------------|
1095
- | `action` | enum | **yes** | — | `create`, `list`, `status`, `diff`, `merge`, `discard` |
1096
- | `name` | string | varies | — | Lane name |
1097
- | `files` | string[] | varies | — | File paths to copy into lane (for `create`) |
1098
-
1099
- Isolated file copies for parallel exploration. Create a lane, make changes, diff against originals, merge back, or discard.
1100
-
1101
- ### System
1102
-
1103
- #### `aikit_guide` — Tool discovery
1104
-
1105
- | Parameter | Type | Required | Default | Description |
1106
- |-----------|------|----------|---------|-------------|
1107
- | `goal` | string | **yes** | — | What you want to accomplish |
1108
- | `max_recommendations` | number | no | 5 | Max tools to recommend (1-10) |
1109
-
1110
- Given a goal description, recommends which AI Kit tools to use and in what order. Matches against 10 predefined workflows: onboard, audit, bugfix, implement, refactor, search, context, memory, validate, analyze.
1111
-
1112
- #### `aikit_health` — Run project health checks
1113
-
1114
- | Parameter | Type | Required | Default | Description |
1115
- |-----------|------|----------|---------|-------------|
1116
- | `path` | string | no | cwd | Root directory to check |
1117
-
1118
- Verifies package.json, tsconfig, scripts, lockfile, README, LICENSE, .gitignore, circular dependencies.
1119
-
1120
- #### `aikit_queue` — Manage task queues
1121
-
1122
- | Parameter | Type | Required | Default | Description |
1123
- |-----------|------|----------|---------|-------------|
1124
- | `action` | enum | **yes** | — | `create`, `push`, `next`, `done`, `fail`, `get`, `list`, `clear`, `delete` |
1125
- | `name` | string | varies | — | Queue name |
1126
- | `title` | string | varies | — | Item title (for `push`) |
1127
- | `id` | string | varies | — | Item ID (for `done`/`fail`) |
1128
- | `data` | any | no | — | Arbitrary data to attach |
1129
- | `error` | string | varies | — | Error message (for `fail`) |
1130
-
1131
- Sequential task queues for agent operations.
1132
-
1133
- #### `aikit_replay` — View or clear audit trail
1134
-
1135
- | Parameter | Type | Required | Default | Description |
1136
- |-----------|------|----------|---------|-------------|
1137
- | `action` | enum | no | `list` | `list` to view entries, `clear` to wipe the log |
1138
- | `last` | number | no | 20 | Number of entries to return (list only) |
1139
- | `tool` | string | no | — | Filter by tool name (list only) |
1140
- | `source` | enum | no | — | Filter by source: `mcp` or `cli` (list only) |
1141
- | `since` | string | no | — | ISO timestamp — only show entries after this time (list only) |
1142
-
1143
- Shows the audit trail of recent tool invocations. Each entry includes tool name, duration, input/output summaries, and status. Useful for debugging agent behavior.
1144
-
1145
- ### Flow Management
1146
-
1147
- #### `aikit_flow` — Manage development flows
1148
-
1149
- | Parameter | Type | Required | Default | Description |
1150
- |-----------|------|----------|---------|-------------|
1151
- | `action` | string | **yes** | — | Operation: `list`, `info`, `start`, `step`, `status`, `read`, `reset`, `runs`, `add`, `remove`, `update` |
1152
- | `name` | string | varies | — | Flow name (for `info`, `start`, `remove`, `update`) |
1153
- | `topic` | string | no | — | Human-readable topic for the run (for `start`) |
1154
- | `advance` | string | varies | — | Step action: `next`, `skip`, `redo` (for `step`) |
1155
- | `step` | string | no | — | Step id to read (for `read`; defaults to current step) |
1156
- | `source` | string | varies | — | Git URL, local path, or shorthand (for `add`) |
1157
- | `roots` | string[] | no | — | Workspace roots for multi-root flows (for `start`) |
1158
-
1159
- **Actions:**
1160
- - `list` — List installed flows (builtin + custom)
1161
- - `info` — Get detailed flow info including all steps
1162
- - `start` — Start a named flow with a topic
1163
- - `step` — Advance current step (next/skip/redo)
1164
- - `status` — Check active flow state, current step, phase
1165
- - `read` — Read instruction content for current or named step
1166
- - `reset` — Clear flow state to start over
1167
- - `runs` — List historical flow runs
1168
- - `add` — Install a custom flow from source
1169
- - `remove` — Remove an installed custom flow
1170
- - `update` — Update flow definition
1171
-
1172
- ---
1173
-
1174
- ## MCP Resources
1175
-
1176
- | URI | Name | Description |
1177
- |-----|------|-------------|
1178
- | `aikit://status` | `aikit-status` | Quick status: record count, file count, last indexed time |
1179
- | `aikit://file-tree` | `aikit-file-tree` | Sorted list of all indexed source file paths |
1180
-
1181
- ---
1182
-
1183
- ## Curated Knowledge System
1184
-
1185
- The curated system is the agent's **persistent memory layer**. Files are stored as markdown with YAML frontmatter in `curated/`:
1186
-
1187
- ```
1188
- curated/
1189
- ├── conventions/ # 214 entries — coding conventions, style rules, naming patterns
1190
- ├── decisions/ # 295 entries — architecture decisions, ADRs, design rationale
1191
- ├── patterns/ # 165 entries — recurring patterns, templates, code idioms
1192
- └── troubleshooting/ # 62 entries — known issues, fixes, debugging guides
1193
- ```
1194
-
1195
- ### Frontmatter Format
1196
-
1197
- ```yaml
1198
- ---
1199
- title: "Use SQLite-vec for local vector storage"
1200
- category: decisions
1201
- tags: ["vector-store", "architecture", "sqlite-vec"]
1202
- created: 2026-01-15T10:30:00.000Z
1203
- updated: 2026-02-20T14:22:00.000Z
1204
- version: 3
1205
- origin: curated
1206
- changelog:
1207
- - version: 1
1208
- date: 2026-01-15T10:30:00.000Z
1209
- reason: "Initial creation"
1210
- - version: 2
1211
- date: 2026-02-01T09:00:00.000Z
1212
- reason: "Added performance benchmarks"
1213
- - version: 3
1214
- date: 2026-02-20T14:22:00.000Z
1215
- reason: "Updated with hybrid search findings"
1216
- ---
1217
-
1218
- Markdown content here...
1219
- ```
1220
-
1221
- ### Category Guidelines
1222
-
1223
- | Category | Use For | Examples |
1224
- |----------|---------|---------|
1225
- | `conventions` | Rules the team follows | Naming patterns, import ordering, error handling style, test structure |
1226
- | `decisions` | Why something was chosen | ADRs, technology choices, pattern selections with trade-offs |
1227
- | `patterns` | How to do recurring things | CDK stack templates, API endpoint patterns, state machine shapes |
1228
- | `troubleshooting` | Known problems and fixes | Build failures, deployment gotchas, dependency conflicts |
1229
- | Custom (`api-contracts`, `runbooks`, etc.) | Any kebab-case slug | Domain-specific categories as needed |
1230
-
1231
- ---
1232
-
1233
- ## How to Write Agent Instructions for Using This KB
1234
-
1235
- When writing instructions for an AI agent (e.g., in `.copilot-instructions.md`, `AGENTS.md`, `CLAUDE.md`, or system prompts), include the following guidance:
1236
-
1237
- ### Recommended Agent Instruction Template
1238
-
1239
- ```markdown
1240
- ## AI Kit Knowledge Usage
1241
-
1242
- You have access to persistent AI Kit knowledge via MCP tools. Use it proactively.
1243
-
1244
- ### Before Starting Any Task
1245
- 1. **Search first**: Use `aikit_search` with a natural language query describing your task to find relevant context, prior decisions, conventions, and patterns before writing code.
1246
- 2. **Check conventions**: `aikit_search` with `origin: "curated"` and `category: "conventions"` for coding standards that apply to your work.
1247
- 3. **Check decisions**: `aikit_search` with `category: "decisions"` to understand why things were built a certain way.
1248
-
1249
- ### Search Strategies
1250
- - **Broad hybrid** (default, best for most queries): `aikit_search({ query: "notification routing architecture" })`
1251
- - **Exact identifier lookup**: `aikit_search({ query: "handleNotification", search_mode: "keyword" })`
1252
- - **Conceptual similarity**: `aikit_search({ query: "event-driven message fanout design", search_mode: "semantic" })`
1253
- - **Specific convention**: `aikit_search({ query: "error handling", origin: "curated", category: "conventions" })`
1254
- - **Code patterns**: `aikit_search({ query: "DynamoDB batch write pattern", content_type: "code-typescript" })`
1255
- - **Troubleshooting**: `aikit_search({ query: "deployment failure CDK", category: "troubleshooting" })`
1256
- - **View a full file**: `aikit_lookup({ path: "src/services/dispatcher.ts" })`
1257
-
1258
- ### Follow the Hints
1259
- Every tool response includes a `_Next:` suggestion at the bottom. Follow these hints for efficient workflows — they guide you to logical next actions (e.g., after `aikit_search`, the hint suggests `aikit_lookup` or `aikit_analyze`).
1260
-
1261
- ### After Completing a Task
1262
- 1. **Remember decisions**: If you made an architecture or design decision, store it:
1263
- ```
1264
- aikit_knowledge({
1265
- action: "remember",
1266
- title: "Use event-driven pattern for notification fanout",
1267
- content: "## Decision\n\n...\n\n## Rationale\n\n...\n\n## Alternatives Considered\n\n...",
1268
- category: "decisions",
1269
- tags: ["notifications", "architecture", "event-driven"]
1270
- })
1271
- ```
1272
- 2. **Remember patterns**: If you established a reusable code pattern:
1273
- ```
1274
- aikit_knowledge({
1275
- action: "remember",
1276
- title: "CDK construct pattern for SQS-Lambda integration",
1277
- content: "## Pattern\n\n```typescript\n...\n```\n\n## When to Use\n\n...",
1278
- category: "patterns",
1279
- tags: ["cdk", "sqs", "lambda"]
1280
- })
1281
- ```
1282
- 3. **Remember troubleshooting**: If you solved a tricky bug:
1283
- ```
1284
- aikit_knowledge({
1285
- action: "remember",
1286
- title: "Dimension mismatch after model change",
1287
- content: "## Problem\n\n...\n\n## Solution\n\nRun `aikit_reindex({ full: true })`...",
1288
- category: "troubleshooting",
1289
- tags: ["sqlite-vec", "embeddings"]
1290
- })
1291
- ```
1292
- 4. **Update existing knowledge**: If you're revising a prior decision:
1293
- ```
1294
- aikit_update({
1295
- path: "decisions/use-event-driven-fanout.md",
1296
- content: "updated markdown...",
1297
- reason: "Added retry strategy after production incident"
1298
- })
1299
- ```
1300
-
1301
- ### Knowledge Quality Standards
1302
- - **Decisions** should include: Context, Decision, Rationale, Alternatives Considered, Consequences
1303
- - **Patterns** should include: Pattern description, Code example, When to Use, When Not to Use
1304
- - **Conventions** should include: The Rule, Why, Examples (good vs bad)
1305
- - **Troubleshooting** should include: Problem, Symptoms, Root Cause, Solution, Prevention
1306
-
1307
- ### Codebase Analysis (for onboarding or deep understanding)
1308
- - Run `aikit_produce_knowledge({ aspects: ["all"] })` to get analysis baselines and follow the synthesis instructions to populate the KB
1309
- - Use `aikit_analyze({ aspect: "structure", path: "." })` for project layout overview
1310
- - Use `aikit_analyze({ aspect: "dependencies", path: ".", format: "mermaid" })` for dependency visualization
1311
- - Use `aikit_analyze({ aspect: "patterns", path: "." })` to detect frameworks and conventions
1312
-
1313
- ### Index Maintenance
1314
- - Run `aikit_reindex()` after significant code changes (incremental, fast)
1315
- - Run `aikit_reindex({ full: true })` after model changes or corruption
1316
- - Check `aikit_status()` to verify index health
1317
- ```
1318
-
1319
- ---
1320
-
1321
- ## Environment Variables
1322
-
1323
- | Variable | Default | Description |
1324
- |----------|---------|-------------|
1325
- | `AIKIT_TRANSPORT` | `stdio` | Transport mode: `stdio` or `http` |
1326
- | `AIKIT_PORT` | `3210` | HTTP server port (when `--transport http`) |
1327
- | `AIKIT_AUTO_INDEX` | `true` | Set to `false` to skip initial auto-indexing |
1328
- | `AIKIT_CORS_ORIGIN` | `*` | CORS allowed origin for HTTP mode |
1329
- | `AIKIT_WORKSPACE_DIR` | — | Override workspace root path |
1330
- | `AIKIT_DATA_DIR` | — | Override data directory |
1331
- | `AIKIT_MODEL_DIR` | — | Override ONNX model cache directory |
1332
-
1333
- ---
1334
-
1335
- ## Tech Stack
1336
-
1337
- - **Embeddings**: `@huggingface/transformers` with `mixedbread-ai/mxbai-embed-large-v1` (1024 dimensions, ONNX, query-prefixed with `"Represent this sentence for searching relevant passages: "`)
1338
- - **Vector Store**: SQLite-vec (local disk, cosine similarity, SQLite FTS5 for keyword search)
1339
- - **Search**: Hybrid (vector + FTS + RRF fusion), semantic-only, or keyword-only modes
1340
- - **Chunking**: Markdown-aware (heading hierarchy), **tree-sitter AST-based** (TS/JS/Python/Go/Rust/Java — preserves function/class boundaries), with overlap. Falls back to regex-based generic chunking when tree-sitter grammars are unavailable.
1341
- - **Dependency Analysis**: Confidence-scored imports (high/medium/low per import pattern)
1342
- - **Auto-Persist**: Analysis tool results are automatically indexed as `origin: 'produced'` entries for future search
1343
- - **Workflow Hints**: Every tool response includes `_Next:` suggestions for logical follow-up actions
1344
- - **MCP SDK**: `@modelcontextprotocol/sdk` (stdio + StreamableHTTP transports)
1345
- - **Runtime**: Node.js ≥ 24, TypeScript, ESM, pnpm workspaces
1346
- - **Build**: tsdown with integrated dts generation
1347
- - **Lint**: Biome
1348
- - **Test**: Vitest