beu

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

beu - Session Memory for AI Agents

beu - 面向AI Agent的会话内存

SQLite-backed CLI that persists agent workflow state. Six modules cover the full lifecycle: plan, track, record, investigate, and resume.
基于SQLite的CLI工具,可持久化存储Agent工作流状态。六大模块覆盖完整生命周期:规划、追踪、记录、排查、恢复。

beu vs TodoWrite

beu vs TodoWrite

beu (persistent)TodoWrite (ephemeral)
Multi-session workSingle-session tasks
Structured modulesLinear checklist
Survives compactionConversation-scoped
SQLite-backedIn-memory only
Decision test: "Will I need this context after this session?" -> YES = beu
beu (持久化)TodoWrite (临时性)
多会话工作单会话任务
结构化模块线性检查清单
可在会话压缩后保留数据会话级作用域
基于SQLite存储仅内存存储
决策判断标准:「本次会话结束后我还需要用到这些上下文吗?」-> 是 = 使用beu

Prerequisites

前置要求

bash
beu --version  # Requires v0.1.0+
  • beu CLI installed and in PATH
  • Initialization:
    beu init
    run once in project root
bash
beu --version  # Requires v0.1.0+
  • 已安装beu CLI且已加入系统PATH
  • 初始化:在项目根目录执行一次
    beu init

What
beu init
Creates

beu init
生成的文件

Running
beu init
in a project root scaffolds:
.beu/
  data/beu.db      SQLite database (all modules)
  config.yml       Module and compliance configuration
.claude/rules/beu.md   Agent rules for Claude Code
.gemini/rules/beu.md   Agent rules for Gemini
.agent/rules/beu.md    Agent rules for Antigravity
The agent rule files teach each AI agent the session protocol, available commands, and workflow patterns. They are skipped if already present.
在项目根目录运行
beu init
会生成以下结构:
.beu/
  data/beu.db      SQLite database (all modules)
  config.yml       Module and compliance configuration
.claude/rules/beu.md   Agent rules for Claude Code
.gemini/rules/beu.md   Agent rules for Gemini
.agent/rules/beu.md    Agent rules for Antigravity
这些Agent规则文件会向各AI Agent说明会话协议、可用命令和工作流模式。如果对应文件已存在则会跳过生成。

Module Quick Reference

模块速查表

ModulePurposeKey Commands
journalAgent interaction ledger
open
,
log
,
note
,
summary
,
close
artifactDeliverable tracking
add
,
status
,
list
,
show
,
changelog
taskWork items with sprint view
add
,
list
,
update
,
done
,
sprint
statePersistent memory (decisions, blockers)
set
,
get
,
list
,
remove
ideaLightweight idea capture
add
,
list
,
done
,
archive
debugInvestigation tracking
open
,
log
,
symptom
,
cause
,
resolve
模块用途核心命令
journalAgent交互台账
open
,
log
,
note
,
summary
,
close
artifact交付物追踪
add
,
status
,
list
,
show
,
changelog
task带迭代视图的工作项
add
,
list
,
update
,
done
,
sprint
state持久化内存(决策、阻塞问题)
set
,
get
,
list
,
remove
idea轻量级创意采集
add
,
list
,
done
,
archive
debug排查过程追踪
open
,
log
,
symptom
,
cause
,
resolve

Configuration

配置

.beu/config.yml
controls modules, compliance, and project scoping:
yaml
modules:
  journal: true
  artifact: true
  task: true
  state: true
  idea: true
  debug: true
.beu/config.yml
用于控制模块开关、合规规则和项目范围设置:
yaml
modules:
  journal: true
  artifact: true
  task: true
  state: true
  idea: true
  debug: true

Required docs for compliance checking (beu check)

Required docs for compliance checking (beu check)

required_docs:
  • name: design type: doc
  • name: changelog type: changelog
required_docs:
  • name: design type: doc
  • name: changelog type: changelog

Staleness: fail check if N+ mutation events since last doc update

Staleness: fail check if N+ mutation events since last doc update

staleness_threshold: 10
staleness_threshold: 10

Project scoping

Project scoping

require_project: false default_project: default

Set a module to `false` to disable its CLI commands.
require_project: false default_project: default

将某个模块设为`false`即可禁用其对应的CLI命令。

Session Protocol

会话协议

  1. beu resume
    -- Check for checkpoint, blockers, focus items
  2. Work on tasks using module commands
  3. beu check
    -- Verify docs are up to date after major changes
  4. beu pause "description of current state"
    -- Save checkpoint before stopping
  5. beu progress
    -- Cross-module summary (auto-loaded by hooks)
  1. beu resume
    -- 检查检查点、阻塞问题、核心待办项
  2. 使用各模块命令处理任务
  3. beu check
    -- 重大变更后验证文档是否为最新状态
  4. beu pause "当前状态描述"
    -- 停止工作前保存检查点
  5. beu progress
    -- 跨模块汇总信息(由钩子自动加载)

Compliance Pipeline

合规流水线

Call
beu check
periodically (after completing tasks, before pausing) to enforce documentation hygiene:
  • Missing docs:
    beu check
    fails if a required artifact isn't registered
  • Pending docs: Fails if a required artifact is still "pending"
  • Stale docs: Fails if
    staleness_threshold
    is set and enough mutation events (task adds, state changes, etc.) occurred since the doc was last updated
Fix staleness by updating the doc and recording it:
bash
beu artifact changelog <name> "updated for <summary>"
定期调用
beu check
(完成任务后、暂停工作前)来保障文档规范:
  • 缺失文档:如果必填产物未登记,
    beu check
    会执行失败
  • 待完善文档:如果必填产物状态仍为「pending」则执行失败
  • 过时文档:如果设置了
    staleness_threshold
    ,且自文档上次更新后发生了足够多的变更事件(新增任务、状态变更等)则执行失败
更新文档并记录即可解决过时问题:
bash
beu artifact changelog <name> "updated for <summary>"

Project Scoping

项目范围设置

Use
--project <id>
(or
-p <id>
) to scope commands to a specific project within a shared
.beu
database. Without the flag, the
default_project
is used. Set
require_project: true
to force explicit project selection.
使用
--project <id>
(或
-p <id>
)可将命令的作用范围限定在共享
.beu
数据库内的指定项目。不带该参数时会使用
default_project
。设置
require_project: true
可强制要求显式选择项目。

Resources

资源

ResourceContent
CLI_REFERENCE.mdComplete command syntax
WORKFLOWS.mdStep-by-step workflow patterns
MODULES.mdModule deep dives and usage patterns
资源内容
CLI_REFERENCE.md完整命令语法
WORKFLOWS.md分步工作流模式说明
MODULES.md模块深度解析和使用模式