Core Concepts

Memory Types

Contxt organizes your project's context into five structured memory types. Each serves a specific purpose and gets its own relevance scoring in Smart Suggest.

Decisions

Architectural and technical choices with rationale. Decisions are the most valuable memory type — they prevent AI from suggesting approaches you've already evaluated and rejected.

contxt decision add

What to store:

  • Technology choices (why Prisma over Drizzle, why Stripe over Paddle)
  • Architecture decisions (JWT auth strategy, API design patterns)
  • Convention choices (file naming, error handling approach)
  • Trade-off resolutions (performance vs simplicity, build vs buy)
Example
Decision: Use Prisma over Drizzle
Category: infrastructure
Rationale: Better TypeScript support, more mature migration system, larger community.
Alternatives: Drizzle (faster, less mature), Knex (no TS), raw SQL (too much boilerplate)
Status: active

Patterns

Reusable code patterns and conventions. Patterns teach your AI how your codebase works so it generates code that matches your existing style.

contxt pattern add

What to store:

  • API route structure (how every endpoint should be organized)
  • Error handling patterns (centralized handler, retry logic)
  • Component patterns (how React components are structured)
  • Service patterns (event-driven architecture, repository pattern)
  • Testing patterns (how tests are organized and written)

Context

Active working context — what you're building right now. Context entries tell your AI about current state so it can give relevant suggestions without you re-explaining each session.

contxt context set

What to store:

  • Current feature being built
  • Active blockers and dependencies
  • Work-in-progress status
  • Files currently being modified
  • Session notes and next steps

Documents

Long-form reference material. Documents are less frequently changed but provide essential background that AI needs for complex tasks.

contxt doc add

What to store:

  • API specifications and endpoint docs
  • Deployment runbooks and procedures
  • Database schema documentation
  • Third-party integration guides
  • Architecture overview documents

Sessions

Automatic snapshots of coding sessions. Sessions capture what was worked on and what was accomplished, creating a timeline of project progress.

Automatic capture
Sessions are typically auto-captured when using the MCP server integration. They can also be logged manually with contxt session log.

Memory Type Summary

TypePurposeUpdate FrequencyToken Priority
DecisionWhy choices were madeLowHigh
PatternHow code should be writtenMediumHigh
ContextWhat you're working on nowHighMedium
DocumentReference materialLowLow (on demand)
SessionWork timelineAutomaticLow (historical)