Skip to content
CAI
Software that uses CAICheck a score

NovasPlace/CSM

64.3

Adequate · 21 September 2026

56.3k

lines of production code

TypeScript

with JavaScript

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Cross-Session Memory plugin for AI coding agents that persists context, memories, and operational state across separate sessions. It provides mechanisms for automatic context capture, memory quality scoring, and archival, while maintaining an AgentBook ledger to track agent decisions and enable session resumption. The infrastructure supports multi-database backends and integrates with coding hosts via lifecycle hooks and MCP tools to ensure continuity and governance.

Features

Added TypeScript type declarations for OpenTUI modules

Added a new type definition file (src/types/opentui.d.ts) that provides TypeScript declarations for the core OpenTUI ecosystem, including Solid.js integration, the core library, keymap utilities, and keymap extras. This enables better type checking and IntelliSense support for developers using these modules.

src/types · high confidence

AgentBook version control and cross-session continuity infrastructure

The Cross-Session Memory bridge now includes AgentBook, a version-control workflow that treats Git as the file authority while preserving agent intent, evidence, decisions, and provenance in a separate layer. Users can checkpoint work, resume sessions, compare branches, and run evidence-backed game-development iterations with explicit keep/revert decisions. The plugin registers native hooks to automatically capture session, prompt, tool, compaction, subagent, and stop events, and provides MCP tool hints and documentation to guide these workflows.

plugins/cross-session-memory-bridge · high confidence

Auto-generated architecture documentation and comprehensive session lifecycle hooks

The plugin now automatically generates and maintains an \ARCHITECTURE.md\ file in the project's \docs/\ directory, mapping code dependencies, entry points, and removal blast radius based on source file imports and exports. This is supported by a new auto-documentation system that tracks file changes and updates a \SYSTEM\_MAP.md\ inventory. Additionally, the plugin introduces a full session lifecycle management system: it captures user decisions and assistant messages for memory, persists session snapshots, work journals, and experience packets on session end, and handles file edits and re-entry source-only turns to maintain context continuity.

src/hooks · high confidence

Initial SQLite persistence schema for memory, sessions, and agent state

This change introduces the foundational SQLite database schema for the application's persistent storage layer. It defines core tables for managing sessions and project scopes, alongside a comprehensive memory system that tracks memories, their quality scores, chunked content, and relationships. The schema also includes support for agent operations through an event log, experience packets, and a work journal, as well as a living state system for managing candidate beliefs, capabilities, and self-models. A dedicated migration script ensures that the compaction metrics table is correctly initialized or upgraded to track storage optimization statistics.

src/schema/sqlite · high confidence

Initial release scaffolding for Cross-Session Memory plugin

This change introduces the foundational configuration and documentation for the Cross-Session Memory (CSM) plugin. It adds a comprehensive \.env.example\ file that defines configuration for PostgreSQL and SQLite database backends, embedding providers (Ollama, OpenAI), and re-entry onboarding controls. It also includes a \.mcp.json\ manifest to register the \cross-session-memory-bridge\ server, a \.gitleaksignore\ file to manage secret-scanning false positives, and initial documentation files (\README\, \AGENTS.md\, \SECURITY.md\, \CONTRIBUTING.md\) that outline the plugin's architecture, security policies, and development workflow.

(repo-wide) · high confidence

Introduce Cross-Session Memory plugin for Claude Code and Codex

Adds the Cross-Session Memory (CSM) plugin for Claude Code and a native installer for Codex on Windows. The plugin registers lifecycle hooks (session start, prompt submit, tool use, compaction, subagent, and stop) to automatically capture context, memories, and state across sessions. It exposes slash commands (e.g., /csm-recall, /csm-brief, /csm-checkpoint, /csm-handoff, /csm-goals, /csm-beliefs, /csm-selfmodel, /csm-agentbook, /csm-governance, /csm-compaction, /csm-reentry, /csm-workledger), subagents (csm-archivist, csm-continuity-scout, csm-handoff-writer), and skills (csm-continuity, csm-governance, csm-handoff) that orchestrate MCP tools for memory search, governance, checkpointing, handoffs, beliefs, self-model, and goals. Configuration is managed via environment variables (CSM\_DATABASE\_PROVIDER, CSM\_EMBEDDING\_PROVIDER, etc.) with local SQLite and Ollama defaults, and the Codex installer verifies bundle integrity and registers the plugin in the local marketplace.

plugins/cross-session-memory, release-assets · high confidence

Multi-database support with PostgreSQL and SQLite adapters

The database layer now supports both PostgreSQL and SQLite backends through a unified pool factory. Users can select the provider via configuration, with PostgreSQL using the \pg\ library and SQLite using \better-sqlite3\ (loaded dynamically to avoid runtime resolution issues). The system includes a query dialect translator that normalizes PostgreSQL-specific syntax (such as \ILIKE\, JSONB operators, array overlaps, and \ANY\/\ALL\ clauses) into compatible SQLite equivalents, allowing existing queries to run across both databases. Additionally, PostgreSQL pool errors are suppressed at the source to prevent process crashes during teardown, and SQLite connections are initialized with WAL mode and foreign key enforcement.

src/db · high confidence

New AgentBook subsystem for operational tracking and session continuity

Introduces a new AgentBook subsystem that provides an operational ledger, a structured startup packet for agent onboarding, and a front-page state summary. The \agent-onboarding-tool.ts\ and \agent-onboarding.ts\ files implement a unified startup packet that queries existing systems to provide identity, continuity, and constraints at session start. The \agent-work-journal\ module records tool calls and decisions to a database, enabling session resumption and continuity across turns. The \agentbook-\*\ modules (event store, rules store, state projector, summary generator, and frontpage writer) manage an event-driven ledger, operational rules, and a generated \AGENTBOOK\_STATE.md\ file that summarizes current state, blockers, and next actions.

src · high confidence

New CLI entry points for diagnostics, database initialization, and host-specific lifecycle hooks

The CLI now includes dedicated scripts to bootstrap and maintain the system and integrate with external coding hosts. Users can run \csm-doctor\ to validate the CSM package, runtime, configuration, database, and schema (with optional online probing and JSON output), and use the new \init-db\ command to initialize the database schema. Additionally, new hook clients (\claude-hook-client\, \codex-hook-client\, \hermes-hook-client\) and an MCP entry point (\mcp\) have been added to facilitate lifecycle event handling and integration with Claude, Codex, and Hermes hosts, as well as MCP-compatible tools.

src/cli · high confidence

New database schema layer and migration infrastructure

The application now includes a comprehensive, versioned database schema system located in src/schema. This introduces an AgentBook operational ledger (tracking events, summaries, current state, and rules), context injection telemetry tables for monitoring reentry and onboarding, and a robust migration framework with SHA-256 artifact verification to ensure schema integrity. It also adds specific migrations for capability provenance, compaction attribution, and dynamic embedding dimension adjustments, supporting both PostgreSQL and SQLite dialects with idempotent initialization and safe rollback capabilities.

src/schema · high confidence

New utility and maintenance scripts for the Cross-Session Memory plugin

The scripts directory now includes a suite of operational tools for the Cross-Session Memory plugin. This includes \backfill-provenance.mjs\ to populate missing metadata on existing memories, and a set of archive management scripts (\archive-candidate-report.mjs\, \archive-superseded-apply.mjs\, \archive-tiny-junk-apply.mjs\) for identifying, archiving, and restoring duplicate or low-quality memories. Diagnostic and audit capabilities are provided via \csm-audit.ts\ and \csm-live.ts\ to inspect system health and recent activity. The release pipeline is supported by \build-claude-plugin.mjs\ and \build-codex-plugin.mjs\ for staging runtime packages, alongside \build-claude-plugin-release.mjs\ and \build-codex-plugin-release.mjs\ for creating sanitized, versioned Windows releases. Additionally, \backup-restore-drill.ts\ and its configuration modules allow for validating backup integrity and recovery times.

scripts · high confidence

PostgreSQL persistence layer for the coordination system

The coordination system now stores its state in a PostgreSQL database instead of relying on in-memory or external storage. This change introduces a full persistence layer in \src/coordination-persistence\ that manages workspaces, agents, assignments, resource claims, and events. It enforces strict consistency through database-level locking, optimistic version checks, and idempotency keys to prevent duplicate operations. The system also supports complex workflows including assignment dependencies, resource claiming with conflict detection, and governance features like user approvals and verification results.

src/coordination, src/coordination-persistence · high confidence

Runtime now launches the Codex MCP server

The runtime now automatically locates and imports the packaged Codex MCP server (codex-mcp-server.js) at startup. It determines the server's root directory by checking environment variables (PLUGIN\_ROOT, CSM\_BRIDGE\_SOURCE\_ROOT) or falling back to the runtime's parent directory, and configures necessary paths for plugin data and statistics before executing the server module.

runtime · high confidence

Behavioural changes

Database schema updates for work journaling, memory archiving, and quality scoring

The database schema has been extended with three new migration files to support advanced memory management features. A new \agent\_work\_journal\ table captures live agent work state (tool calls, decisions, errors) to enable session resumption. The existing \memories\ table now includes archive metadata columns (\archive\_reason\, \archive\_batch\_id\, etc.) to support reversible, metadata-only archiving of superseded duplicates. Additionally, a new \memory\_quality\_scores\ table stores deterministic 0-1 quality scores and feature breakdowns for active memories, providing a ranking signal without affecting governance or pruning logic.

migrations · high confidence

Test coverage

Added test coverage for memory recall, agent onboarding, work journal, and agentbook subsystems

This update introduces a comprehensive suite of new tests across several core subsystems. For memory recall, tests verify that archived and superseded memories are correctly excluded from search, listing, and graph operations, and that active-memory predicates are applied to hybrid vector retrieval and context recall. Agent onboarding tests validate the provider contract, ensuring the onboarding packet correctly extracts identity, continuity, phase, and constraint data from AGENTS.md and project files, while handling missing data gracefully. The agent work journal tests cover persistence across database restarts (PostgreSQL and SQLite), scoped history reading, timestamp normalization, and robust flush behavior including retry logic and circular argument handling. Finally, agentbook tests ensure the event store, rules store, and state projector function correctly, and that tool events are accurately classified based on tool type and metadata.

test · high confidence

Dependencies

Major dependency upgrade and expanded package configuration

The project has significantly expanded its dependency footprint and configuration. The core plugin dependency @opencode-ai/plugin was upgraded from 1.17.0 to 1.17.13, and a new runtime dependency, better-sqlite3 (^12.11.1), was added alongside existing PostgreSQL packages. Dev dependencies were also updated, including @types/node to ^26.0.1, @types/pg to ^8.20.0, and the addition of eslint (^9.39.4), typescript-eslint (^8.62.1), and tsx (^4.23.0). The package.json now defines new CLI binaries (csm-doctor, csm-init, csm-mcp), subpath exports for various internal modules (e.g., ./database, ./embeddings), and optional peer dependencies for @opentui/core, @opentui/solid, and solid-js.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 66 → 64 (-1.6)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 77 → 74 (-2.9)
  • Architecture 89 → 92 (+2.7)
  • Maturity 72 → 79 (+7.1)
  • Readiness 51 → 47 (-3.8)
  • Security 95 → 95 (+0.5)

Resolved (10)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • FileTooLong: src/memory-manager.ts (src/memory-manager.ts)
  • High CVE: [GHSA redacted] (package-lock.json)
  • Hotspot: src/memory-manager.ts (src/memory-manager.ts)
  • LLM evaluation failed
  • No exposed public API
  • Off-boarding risk: anonymized user #1
  • Test reliability not included
  • TooManyMethods: MemoryManager (src/memory-manager.ts)

New (335)

  • BeliefKnowledgeConsolidator.consolidate (cognitive 93) (src/belief-knowledge-store.ts)
  • BeliefKnowledgeConsolidator.consolidate (cyclomatic 35) (src/belief-knowledge-store.ts)
  • BeliefPromotionScanner.extractPattern (cognitive 22) (src/belief-promotion-scanner.ts)
  • BeliefPromotionScanner.extractPattern (cyclomatic 18) (src/belief-promotion-scanner.ts)
  • BeliefPromotionScanner.groupPatterns (cognitive 25) (src/belief-promotion-scanner.ts)
  • CausalThreadHydrator.hydrateCausalThread (cognitive 21) (src/self-continuity-causal-thread.ts)
  • CausalThreadHydrator.hydrateCausalThread (cyclomatic 19) (src/self-continuity-causal-thread.ts)
  • ClassTooLong: MemoryManager (src/memory-manager-base.ts)
  • ClassTooLong: RecallQualityAuditReportBuilder (src/recall-quality-tool.ts)
  • ContextCompactor.compact (cognitive 118) (src/context-compactor.ts)
  • ContextCompactor.compact (cyclomatic 61) (src/context-compactor.ts)
  • Documentation: no contributor guidance (docs/README.md)
  • Documentation: no installation or build instructions (README.txt)
  • Documentation: no installation or build instructions (docs/README.md)
  • Documentation: no usage examples (docs/README.md)
  • EvidenceVault.pruneOldEvidence (cognitive 23) (src/evidence-vault.ts)
  • FileTooLong: src/compaction-telemetry-audit.ts (src/compaction-telemetry-audit.ts)
  • FileTooLong: src/memory-manager-base.ts (src/memory-manager-base.ts)
  • FileTooLong: src/tools.ts (src/tools.ts)
  • FunctionTooLong: agent-onboarding.provideHandoff (src/agent-onboarding.ts)
  • …and 315 more

Changes since last survey

  • 35 commits — 15 feature/other, 20 fixes

By area

  • (root) — 8 commits
  • src/memory-manager-base.ts — 4 commits
  • plugins/cross-session-memory-bridge — 2 commits
  • src/hooks — 2 commits
  • src/subconscious.ts — 2 commits
  • (repo) — 1 commit
  • .github/workflows — 1 commit
  • plugins/cross-session-memory — 1 commit
  • scripts/archive-candidate-report.mjs — 1 commit
  • scripts/csm-audit.ts — 1 commit
  • src/agentbook-frontpage.ts — 1 commit
  • src/bridge-ops.ts — 1 commit
  • src/config-defaults-continuity.ts — 1 commit
  • src/context-recall-selector.ts — 1 commit
  • src/db — 1 commit
  • src/dedup-detector.ts — 1 commit
  • src/memory_governance.ts — 1 commit
  • src/redactor.ts — 1 commit
  • src/schema — 1 commit
  • test/capability-provenance-migration.test.ts — 1 commit

Notable commits

  • fix: Enforce project isolation and fix TOML security dependency (#109)
  • fix: fix(auto-doc): stop AGENTBOOK_STATE.md echo loop — change-guard writer + watcher skip
  • fix: fix(ci): register no-op error listeners on all test/admin pg pools
  • fix: fix(ci): revert globalLessons query in recallLessonsOp causing PG16 teardown race
  • fix: fix(ci): suppress pg_terminate_backend pool error in codex-bridge teardown
  • fix: fix(ci): suppress pg_terminate_backend pool error in hybrid-search teardown
  • fix: fix(db): suppress unhandled pg pool errors at the source
  • fix: fix(evidence): exclude inactive memories from system injection (#107)
  • fix: fix(governance): ignore inactive veto memories (#105)
  • fix: fix(provenance): complete defaults in base manager (#111)
  • fix: fix(provenance): complete partial metadata defaults (#110)
  • fix: fix(provenance): use unknown model sentinel (#114)
  • fix: fix(recall): exclude inactive memories from current-work recall (#100)
  • fix: fix(redaction): avoid treating bare 10-digit values as phones (#96)
  • fix: fix(sqlite): accept candidate_capability in living-state queue (#102)
  • fix: fix(subconscious): exclude venv/lib/target from auto-doc walker
  • fix: fix(subconscious): stop auto-doc walker from injecting READMEs into host caches
  • fix: fix(test): stop belief-promotion cleanup from wiping capability-migration fixture
  • fix: fix: cross-turn record retention, host attribution, lesson terminal status, recall scope, durable re-entry count, watcher safety
  • fix: fix: ignore superseded dedup rows and harden phone boundaries (#98)
  • …and 15 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

NovasPlace/CSM was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 9c7cfb22e525eb9210c3048cb0d44544b09b95d0 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.