Skip to content

Project Memory

KodaCode learns your project’s conventions and carries them across every session. Instead of repeating yourself — “use snake_case”, “always run tests before committing”, “the auth middleware is in src/middleware/” — you tell KodaCode once and it remembers.

Write project conventions in markdown files. KodaCode loads them in layers, with more specific files taking priority:

FileScopeVersion controlled
~/.config/kodacode/KODACODE.mdGlobal — applies to all projectsNo (personal)
KODACODE.md or .kodacode/KODACODE.mdProject — shared with your teamYes
KODACODE.local.mdPersonal project overridesNo (gitignore this)

All three files are loaded and concatenated into the system prompt. KodaCode also reads AGENTS.md, CLAUDE.md, and CONTEXT.md if present — so existing instruction files from other tools work out of the box.

# Project Conventions
- This is a Go project using the standard library. No frameworks.
- Use table-driven tests with t.Run subtests.
- Error messages start lowercase, no trailing punctuation.
- All SQL queries go through the repository layer, never in handlers.
- The deploy target is ARM64 Linux — avoid x86-specific code.
# Personal Preferences
- I prefer concise responses. Skip preamble.
- When writing commit messages, use conventional commits format.
- Never add comments that restate what the code does.
# Local Setup Notes
- My local Postgres runs on port 5433 (not default 5432).
- Use the staging API at https://staging.internal.company.com for testing.

Use /init to create a project instruction file:

/init # Creates KODACODE.md (default)
/init AGENTS.md # Creates AGENTS.md
/init CLAUDE.md # Creates CLAUDE.md

For things that come up during conversation, use /remember instead of editing files. KodaCode saves these as individual memory entries in .kodacode/memories/ and injects them into future sessions automatically.

CommandDescription
/remember <text>Save a memory for this project
/memoriesList all saved memories
/forget <id>Remove a memory by its ID
/remember the auth middleware validates JWT tokens from the Authorization header
/remember use MongoDB native driver, not Mongoose — we migrated in March 2026
/remember the CI pipeline runs on GitHub Actions, config is in .github/workflows/
/remember API responses must include X-Request-ID header for tracing

Each memory is stored as a small markdown file in .kodacode/memories/ with a timestamp-based ID. They’re project-scoped and not version-controlled — add .kodacode/memories/ to your .gitignore.

Auto-memories are injected into the system prompt with a character budget to avoid consuming too much context. When the budget is exceeded, the oldest memories are dropped first.

memory_budget: 4000 # max characters for auto-memories (default: 4000)

For temporary instructions that should only last for the current session, use /pin:

/pin Always use TypeScript strict mode for this session
/pin Don't modify any files in the legacy/ directory

Pinned instructions survive compaction but are session-scoped — they don’t persist across sessions.

CommandDescription
/pin <instruction>Pin instruction for this session
/pinsList pinned instructions
/unpin <number>Remove a pinned instruction
SituationUse
Team conventions that everyone should followKODACODE.md in project root
Personal preferences across all projects~/.config/kodacode/KODACODE.md
Local environment details (ports, URLs, paths)KODACODE.local.md
Something you learned during a session/remember
Temporary instruction for one session only/pin

KodaCode reads instruction files from other AI coding tools:

  • CLAUDE.md (Claude Code)
  • AGENTS.md (OpenCode)
  • CONTEXT.md (generic)

If you’re migrating from another tool, your existing instruction files will work without changes.