beu
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesebeu - 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 work | Single-session tasks |
| Structured modules | Linear checklist |
| Survives compaction | Conversation-scoped |
| SQLite-backed | In-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: run once in project root
beu init
bash
beu --version # Requires v0.1.0+- 已安装beu CLI且已加入系统PATH
- 初始化:在项目根目录执行一次
beu init
What beu init
Creates
beu initbeu init
生成的文件
beu initRunning in a project root scaffolds:
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 AntigravityThe 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
模块速查表
| Module | Purpose | Key Commands |
|---|---|---|
| journal | Agent interaction ledger | |
| artifact | Deliverable tracking | |
| task | Work items with sprint view | |
| state | Persistent memory (decisions, blockers) | |
| idea | Lightweight idea capture | |
| debug | Investigation tracking | |
| 模块 | 用途 | 核心命令 |
|---|---|---|
| journal | Agent交互台账 | |
| artifact | 交付物追踪 | |
| task | 带迭代视图的工作项 | |
| state | 持久化内存(决策、阻塞问题) | |
| idea | 轻量级创意采集 | |
| debug | 排查过程追踪 | |
Configuration
配置
.beu/config.ymlyaml
modules:
journal: true
artifact: true
task: true
state: true
idea: true
debug: true.beu/config.ymlyaml
modules:
journal: true
artifact: true
task: true
state: true
idea: true
debug: trueRequired 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
会话协议
- -- Check for checkpoint, blockers, focus items
beu resume - Work on tasks using module commands
- -- Verify docs are up to date after major changes
beu check - -- Save checkpoint before stopping
beu pause "description of current state" - -- Cross-module summary (auto-loaded by hooks)
beu progress
- -- 检查检查点、阻塞问题、核心待办项
beu resume - 使用各模块命令处理任务
- -- 重大变更后验证文档是否为最新状态
beu check - -- 停止工作前保存检查点
beu pause "当前状态描述" - -- 跨模块汇总信息(由钩子自动加载)
beu progress
Compliance Pipeline
合规流水线
Call periodically (after completing tasks, before pausing) to enforce documentation hygiene:
beu check- Missing docs: fails if a required artifact isn't registered
beu check - Pending docs: Fails if a required artifact is still "pending"
- Stale docs: Fails if is set and enough mutation events (task adds, state changes, etc.) occurred since the doc was last updated
staleness_threshold
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 (or ) to scope commands to a specific project within a shared database. Without the flag, the is used. Set to force explicit project selection.
--project <id>-p <id>.beudefault_projectrequire_project: true使用(或)可将命令的作用范围限定在共享数据库内的指定项目。不带该参数时会使用。设置可强制要求显式选择项目。
--project <id>-p <id>.beudefault_projectrequire_project: trueResources
资源
| Resource | Content |
|---|---|
| CLI_REFERENCE.md | Complete command syntax |
| WORKFLOWS.md | Step-by-step workflow patterns |
| MODULES.md | Module deep dives and usage patterns |
| 资源 | 内容 |
|---|---|
| CLI_REFERENCE.md | 完整命令语法 |
| WORKFLOWS.md | 分步工作流模式说明 |
| MODULES.md | 模块深度解析和使用模式 |