Skip to main content

Crate caliban_memory

Crate caliban_memory 

Source
Expand description

File-backed memory tiers spliced into the caliban system prompt.

See docs/superpowers/specs/2026-05-23-memory-tier-1-design.md and adrs/0018-memory-tier-model.md; auto-memory extensions live in docs/superpowers/specs/2026-05-24-auto-memory-design.md / adrs/0035-auto-memory.md; ancestor walk + @-imports in docs/superpowers/specs/2026-05-24-claudemd-ancestry-design.md / adrs/0036-claudemd-ancestry-and-imports.md.

Re-exports§

pub use ancestry_addendum::AncestryAddendum;
pub use auto::TopicDraft;
pub use auto::TopicFile;
pub use auto::TopicKind;
pub use auto::TopicLoader;
pub use auto::TopicSummary;
pub use auto::strip_html_comments;
pub use config::MemoryConfig;
pub use config::build_excludes;
pub use error::MemoryError;
pub use error::Result;
pub use init_import::INIT_FILENAMES;
pub use init_import::LegacyRulesFile;
pub use init_import::scan_init_files;
pub use loader::estimate_tokens;
pub use loader::load;
pub use prefix::MemoryPrefix;
pub use prefix::ProjectTier;
pub use prefix::TierFile;
pub use prefix::TierFileSource;
pub use prefix::TierKind;
pub use project_imports::ApprovalCallback;
pub use project_imports::ApprovalMode;
pub use project_imports::ImportAllowlist;
pub use project_imports::ImportApproval;
pub use project_imports::ImportState;
pub use project_imports::MAX_IMPORT_DEPTH;
pub use project_imports::parse_import_directive;
pub use project_imports::resolve_imports;
pub use project_walk::ANCESTRY_FILENAMES;
pub use project_walk::WalkStop;
pub use project_walk::walk_ancestors;
pub use rules::Rule;
pub use rules::RuleScope;
pub use rules::RuleSet;
pub use rules::scan_caliban_rules;
pub use sanitize::sanitize_workspace;Deprecated

Modules§

ancestry_addendum
Nested-on-demand CLAUDE.md loader.
auto
Per-project auto-memory: topic file enumerator, reader, and writer.
config
MemoryConfig — paths, dirs, and token budget for tier loading.
error
Error type for memory-tier loading.
init_import
/init companion: probe a workspace for legacy / sibling-tool guidance files (AGENTS.md, .cursorrules, .windsurfrules) and concatenate their contents into a single body the operator can paste into their CLAUDE.md.
loader
Async tier loader + budget enforcement.
prefix
MemoryPrefix — assembled tier blocks + splice rendering.
project_imports
@path/file imports inside CLAUDE.md / AGENTS.md / .caliban.md / rules files. Recursion depth ≤ 5, cycle detection by canonical path, and a first-time approval dialog for files outside the workspace root.
project_walk
Ancestor walk: discover CLAUDE.md / AGENTS.md / .caliban.md files upward from cwd to git/fs root, with inode-based dedupe and gitignore-style excludes.
rules
.caliban/rules/<topic>.md — path-scoped rule files with optional paths: glob frontmatter.
sanitize
Workspace-path sanitization for the per-workspace auto-memory directory.
walk
Ancestor-walk-up file discovery.

Functions§

walk_up_for_file
Walk up the directory tree starting at start, returning the first ancestor that contains a file named filename. The walk stops at any .git directory (treated as a git root) or at $HOME, whichever comes first.