AI DevKit Memory CLI
Use npx ai-devkit@latest memory ... as the durable knowledge layer.
Workflow
For implementation, debugging, review, planning, or documentation tasks, search before deep work unless the task is trivial:
npx ai-devkit@latest memory search --query "<task, subsystem, error, or convention>" --limit 5
For broad or risky tasks, search multiple angles: subsystem, error text, framework, command, and task intent.
Use results as context:
- Trust repo files, tests, fresh command output, and explicit user instructions over memory.
- If memory conflicts with verified evidence, use the evidence and update the stale memory.
- Mention memory only when it changes the plan or avoids asking the user again.
Search before storing:
npx ai-devkit@latest memory search --query "<knowledge to store>" --table
Store or update only after the quality gate passes.
Quality Gate
Before storing, all must be true:
- Future sessions are likely to reuse it.
- It is verified by code, docs, tests, command output, or explicit user instruction.
- It is not merely a restatement of obvious nearby files unless it prevents repeated agent mistakes.
- It is scoped narrowly enough.
- Existing memory does not already cover it.
- It contains no secrets, credentials, private customer data, personal data, raw logs, or temporary paths.
Store:
- Project conventions, user preferences, durable decisions.
- Reusable fixes, testing patterns, commands, setup gotchas.
- Non-obvious constraints, architecture rules, failure patterns.
Do not store:
- Task progress, transcripts, speculation, generic programming facts.
- Raw errors without diagnosis.
- Anything the user did not intend to persist.
Commands
Search
npx ai-devkit@latest memory search \
--query "<query>" \
--tags "<tags>" \
--scope "<scope>" \
--limit 5
Use --table to get IDs for updates:
npx ai-devkit@latest memory search --query "<query>" --table
Options: --query/-q required; --tags; --scope/-s; --limit/-l from 1-20; --table.
Store
npx ai-devkit@latest memory store \
--title "<actionable title, 10-100 chars>" \
--content "<context, guidance, evidence, exceptions>" \
--tags "<lowercase,tags>" \
--scope "<global|project:name|repo:org/repo>"
Use this content shape when helpful:
Context: Where this applies.
Guidance: What to do.
Evidence: File, command, test, or user instruction.
Exceptions: When not to apply it.
Update
Find the ID with search --table, then update only changed fields:
npx ai-devkit@latest memory update \
--id "<memory-id>" \
--title "<updated title>" \
--content "<updated content>" \
--tags "<replacement,tags>" \
--scope "<updated scope>"
--tags replaces all existing tags.
Scoping
Use the narrowest useful scope:
repo:<org/repo> for one repository.
project:<name> for one app, product, or workspace.
global only for knowledge that applies across unrelated projects.
If unsure, use a narrower scope.
Troubleshooting
- CLI missing: run
npx ai-devkit@latest --version.
- Duplicate title: search, then update the existing item if it is the same knowledge.
- Empty results: broaden terms, remove filters, or search symptoms and subsystem names separately.
- Validation error: check title/content lengths, query length, and
--limit range.
- DB path: default is
~/.ai-devkit/memory.db; project config can override it automatically.
1---2name: memory3description: AI DevKit · Use the memory CLI as a durable knowledge layer. Search before non-trivial work, store verified reusable knowledge, update stale entries, and avoid saving transcripts, secrets, or one-off task progress.4---56# AI DevKit Memory CLI78Use `npx ai-devkit@latest memory ...` as the durable knowledge layer.910## Workflow11121. For implementation, debugging, review, planning, or documentation tasks, search before deep work unless the task is trivial:13 ```bash14 npx ai-devkit@latest memory search --query "<task, subsystem, error, or convention>" --limit 515 ```16 For broad or risky tasks, search multiple angles: subsystem, error text, framework, command, and task intent.17182. Use results as context:19 - Trust repo files, tests, fresh command output, and explicit user instructions over memory.20 - If memory conflicts with verified evidence, use the evidence and update the stale memory.21 - Mention memory only when it changes the plan or avoids asking the user again.22233. Search before storing:24 ```bash25 npx ai-devkit@latest memory search --query "<knowledge to store>" --table26 ```27284. Store or update only after the quality gate passes.2930## Quality Gate3132Before storing, all must be true:3334- Future sessions are likely to reuse it.35- It is verified by code, docs, tests, command output, or explicit user instruction.36- It is not merely a restatement of obvious nearby files unless it prevents repeated agent mistakes.37- It is scoped narrowly enough.38- Existing memory does not already cover it.39- It contains no secrets, credentials, private customer data, personal data, raw logs, or temporary paths.4041Store:42- Project conventions, user preferences, durable decisions.43- Reusable fixes, testing patterns, commands, setup gotchas.44- Non-obvious constraints, architecture rules, failure patterns.4546Do not store:47- Task progress, transcripts, speculation, generic programming facts.48- Raw errors without diagnosis.49- Anything the user did not intend to persist.5051## Commands5253### Search5455```bash56npx ai-devkit@latest memory search \57 --query "<query>" \58 --tags "<tags>" \59 --scope "<scope>" \60 --limit 561```6263Use `--table` to get IDs for updates:6465```bash66npx ai-devkit@latest memory search --query "<query>" --table67```6869Options: `--query/-q` required; `--tags`; `--scope/-s`; `--limit/-l` from 1-20; `--table`.7071### Store7273```bash74npx ai-devkit@latest memory store \75 --title "<actionable title, 10-100 chars>" \76 --content "<context, guidance, evidence, exceptions>" \77 --tags "<lowercase,tags>" \78 --scope "<global|project:name|repo:org/repo>"79```8081Use this content shape when helpful:8283```text84Context: Where this applies.85Guidance: What to do.86Evidence: File, command, test, or user instruction.87Exceptions: When not to apply it.88```8990### Update9192Find the ID with `search --table`, then update only changed fields:9394```bash95npx ai-devkit@latest memory update \96 --id "<memory-id>" \97 --title "<updated title>" \98 --content "<updated content>" \99 --tags "<replacement,tags>" \100 --scope "<updated scope>"101```102103`--tags` replaces all existing tags.104105## Scoping106107Use the narrowest useful scope:108109- `repo:<org/repo>` for one repository.110- `project:<name>` for one app, product, or workspace.111- `global` only for knowledge that applies across unrelated projects.112113If unsure, use a narrower scope.114115## Troubleshooting116117- CLI missing: run `npx ai-devkit@latest --version`.118- Duplicate title: search, then update the existing item if it is the same knowledge.119- Empty results: broaden terms, remove filters, or search symptoms and subsystem names separately.120- Validation error: check title/content lengths, query length, and `--limit` range.121- DB path: default is `~/.ai-devkit/memory.db`; project config can override it automatically.