Skip to main content
Glama

Alethea of Agents (alethea)

Formerly agent-decision-memory (adm). The npm package is now @kurtfrancisco/alethea with commands alethea and alethea-mcp. The adm / adm-mcp commands, the MCP tool names, ADM_ROOT and the .decisions/ folder keep working.

CI npm License: MIT MCP Registry

Persistent decision and constraint memory for coding agents: a local stdio MCP server and CLI that store ADR-style decisions as git-friendly markdown, linked to Janus of Agents (formerly SpecGate) requirement ids, tests and commits.

Quickstart

Install (Node.js ≥ 20):

npm install -g @kurtfrancisco/alethea   # provides `alethea` and `alethea-mcp` (plus legacy `adm` / `adm-mcp`)

Claude Code

claude mcp add decision-memory -- npx -y -p @kurtfrancisco/alethea@0.2.1 alethea-mcp

Cursor — add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project). The same snippet works for Claude Desktop, VS Code and Windsurf:

{ "mcpServers": { "decision-memory": { "command": "npx", "args": ["-y", "-p", "@kurtfrancisco/alethea@0.2.1", "alethea-mcp"] } } }

Restart the client and the tools appear. Full details below.

Coding agents forget what was decided between sessions. They bring back the library you removed last month, undo a trade-off nobody wrote down, and edit generated code. adm gives them a decision memory: a local stdio MCP server and a CLI that store ADR-style decisions and machine-checkable constraints as plain markdown in your repo's .decisions/ folder. Each record can be linked to SpecGate requirement ids, test files and commits.

  • Git-friendly storage. One markdown file per record, with JSON-valued frontmatter (valid YAML). Review it in PRs and edit it by hand.

  • No native dependencies. Search uses a pure-JS BM25 index, cached in .decisions/.index.json (gitignored). The only runtime deps are @modelcontextprotocol/sdk and zod.

  • Cross-platform. Node ≥ 20 on Windows, macOS and Linux. Paths are normalized, so src\db\x.ts and src/db/x.ts match the same globs. No symlinks.

Related MCP server: Zenrei

Install (Windows PowerShell)

cd C:\path\to\agent-decision-memory
npm ci            # uses the committed package-lock.json
npm run build     # syntax check + import check
npm test
npm link          # optional: puts `adm` and `adm-mcp` on PATH

macOS/Linux: run the same commands.

Register with Claude Code

claude mcp add decision-memory -- node C:\path\to\agent-decision-memory\bin\adm-mcp.js

The server uses the current directory to find the repo: the nearest ancestor that has .decisions/ or .git/. To pin a repo, pass --root C:\repo or set $env:ALETHEA_ROOT = "C:\repo" (ADM_ROOT also works). A generic MCP client config looks like this:

{ "mcpServers": { "decision-memory": { "command": "node", "args": ["C:/path/to/agent-decision-memory/bin/adm-mcp.js", "--root", "C:/repo"] } } }

Install the skill

Copy the skill folder into your project (or into $HOME\.claude\skills to use it everywhere):

New-Item -ItemType Directory -Force .claude\skills | Out-Null
Copy-Item -Recurse C:\path\to\agent-decision-memory\skills\agent-decision-memory .claude\skills\

The skill tells the agent to call get_context_for_task before it starts, check_conflicts before it commits, and record_decision, supersede_decision or link_requirement after the work. See the Claude Code skills docs: https://code.claude.com/docs/en/skills.

MCP surface

Tool

Purpose

record_decision

Record a decision (or type: "constraint") with context, decision, alternatives, consequences, status, files, tests, commits, requirements, rules and supersedes

search_decisions

BM25 search. Returns active records only unless include_inactive or status is set

get_context_for_task

For task text and/or file paths: in-scope active constraints, the top decisions (file-scope matches boosted) and their requirement ids

supersede_decision

Write a replacement record. The old one becomes superseded and the two are cross-linked

list_constraints

Active constraints, optionally filtered to those whose scope covers a path

check_conflicts

Check a proposed change (text or diff plus files) against constraint rules. ok:false means an accepted constraint is violated. It also warns when the change picks an alternative that an active decision rejected

link_requirement

Attach SpecGate ids, test files and commit SHAs. Ids are checked against openspec/specs when present

Resources: adm://constraints/active (markdown) and adm://decisions/{id} (JSON).

Constraint rules

forbid: axios (whole word, case-insensitive), forbid: /eval\(/ (regex), require: @req (the change text must contain it), and forbid-path: src/generated/** (glob on the touched files). A constraint applies only to its files scope; with no scope it covers the whole repo. A proposed constraint produces warnings. An accepted one produces errors.

CLI

adm init
adm record --title "Use date-fns" --decision "parseISO/format, ISO strings" --alternative "Moment.js: deprecated" --file "src/todos/**" --req todos/due-date
adm record --type constraint --title "No moment.js" --decision "bundle size" --rule "forbid: moment" --file "src/**"
adm context --task "validate due date" --file src/todos/create.ts
adm check --change-file .\my.diff --file src/todos/create.ts   # exit code 1 on a violation (CI-friendly)
adm supersede D-0001 --title "Use Fastify" --decision "..."
adm link D-0002 --req todos/due-date#invalid-date-rejected --commit 1a2b3c4 --test test/todos.test.ts
adm search "http server" --all
adm import --dir docs/adr          # Nygard (adr-tools) and MADR formats; idempotent
adm export --format json --out decisions.json   # or markdown
adm serve                          # same as adm-mcp

Every command also takes --json and --root <dir>. Run npm run demo to see an end-to-end run: it records with the CLI and queries through a real MCP client over stdio.

Record format

---
id: "D-0002"
type: "decision"
title: "Use date-fns for dates"
status: "accepted"
date: "2026-10-15"
tags: ["dates"]
requirements: ["todos/due-date"]
files: ["src/todos/**"]
tests: []
commits: []
---
# D-0002: Use date-fns for dates

## Context
## Decision
## Alternatives
## Consequences

Statuses: proposed, accepted, superseded, deprecated and rejected. Only proposed and accepted count as active. Supersession adds supersedes and superseded_by links.

Requirement ids use the SpecGate 0.3 format: ### Requirement: Due date in openspec/specs/todos/spec.md becomes todos/due-date, and scenarios become todos/due-date#invalid-date-rejected. link_requirement reads openspec/specs/*/spec.md and openspec/changes/*/specs/*/spec.md. An unknown id is still linked, but you get a warning.

How it compares

Project

What it stores

Difference

codebase-memory-mcp

Knowledge graph of code structure

Indexes code, not the reasons behind it

Beads

Issue/task graph for agents

Tracks work items, not decisions or constraints

Cognee

General AI memory (graph + vectors)

General-purpose, and needs a heavier stack

Graphiti

Temporal knowledge graphs

Needs a graph DB. Raw facts, no ADR structure

MCP memory server

Entity/relation notes in a JSON file

Unstructured notes, no rules or conflict checks

Mem0

User/agent memories

Personalization memory, not repo decisions

adr-tools, MADR

ADR markdown

Human-facing. No agent API, search or rule checks. adm import reads both formats

Limitations

  • Conflict detection uses keyword, regex and glob rules. It does not understand meaning, so a rule like forbid: moment will not catch a paraphrase, and the rejected-alternative warning is a heuristic based on the alternative's name.

  • BM25 is lexical (with light stemming). There are no embeddings, so synonyms are not matched.

  • IDs are allocated per machine (max + 1). If two branches each record a decision, both can get the same number. Rename one by hand when you merge.

  • The index is rebuilt in memory whenever any file's size or mtime changes. That is fine for hundreds of records but not tuned for tens of thousands.

License

MIT © 2026 Kurt Francisco

Contributing

Issues and pull requests are welcome at https://github.com/fpavia111-creator/alethea. See CONTRIBUTING.md.

Available Tools

7 tools
check_conflictsCheck conflictsA

Check a proposed change (diff, plan or description, plus touched files) against active constraint rules. ok=false means an accepted constraint is violated.

Inputs: change (required), files.

get_context_for_taskGet context for taskA

Call BEFORE starting work. Returns active constraints in scope and the most relevant decisions for a task description and/or file paths.

Inputs: path, task, limit, paths.

list_constraintsList constraintsC

List active constraints, optionally only those whose scope covers a path.

Inputs: path, include_inactive.

record_decisionRecord decision or constraintB

Record an ADR-style decision (or a constraint with type="constraint") into .decisions/. Call after making a non-obvious choice.

Inputs: title (required), tags, type, files, +10 more.

search_decisionsSearch decisionsA

BM25 search across decisions and constraints. Active (accepted/proposed) only unless include_inactive or status is set.

Inputs: query (required), type, limit, status, +1 more.

supersede_decisionSupersede decisionB

Replace an existing decision/constraint with a new one. The old record is marked superseded and both are cross-linked.

Inputs: id (required), title (required), tags, files, +9 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 7 tools

    Disambiguation4/5

    Each tool has a distinct operation: record (write), supersede (replace), link (associate), check_conflicts (validate), plus several read paths. The read tools (search_decisions, list_constraints, get_context_for_task) overlap somewhat in retrieval purpose, but descriptions clarify their distinct scopes (BM25 search vs. constraint listing vs. task-oriented context assembly).

    Naming Consistency5/5

    Every tool follows a consistent snake_case verb_noun pattern (record_decision, search_decisions, get_context_for_task, list_constraints, check_conflicts, supersede_decision, link_requirement). No mixing of conventions or vague verbless names.

    Tool Count5/5

    Seven tools is well-scoped for an ADR/constraint management server, with each tool covering a genuine part of the decision lifecycle (capture, retrieve, validate, supersede, link). No redundant or filler tools.

    Completeness4/5

    Core lifecycle is well covered: record, search, list, supersede, conflict-check, and requirement linking. Minor gaps exist — there is no tool to change a decision's status (accept/reject/deprecate) without superseding it, and no delete/archive path — but supersede and record largely cover practical workflows.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      The decision system for agentic engineering: keeps your project's decisions, rationale, and rejected paths in plain files and surfaces them to AI coding agents before they plan or change code.
      11
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Gives AI coding agents persistent, branch-aware memory and a dependency-tracked task graph by storing decisions, lessons, and tasks as plain JSON and Markdown committed directly into the repository. Agents can record and fuzzy-search past decisions, dump instant project context, and create, claim, complete, and query tasks whose completion automatically unblocks downstream work.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI coding agents to read and manage a Git-native decision ledger, providing tools for querying decisions, evidence, cross-repository workspaces, validation, and commit tracing, all operating locally and without a cloud service.
      MIT