by JamesShi96
Project memory system for AI coding assistants (Claude Code, Cursor, Codex): session logs, project wiki, rules, TODOs, and handoff.
# Add to your Claude Code skills
git clone https://github.com/JamesShi96/project-butlerGuides for using ai agents skills like project-butler.
Initialize a standardized project memory stack:
上层(稳定原则)
┌─────────────────────────────────────┐
│ CLAUDE.md(项目宪法)← 人工确认 │
│ ↑ candidates(AI 自动收集候选) │
└─────────────────────────────────────┘
↑ 抽象沉淀
中层(当前快照)
┌─────────────────────────────────────┐
│ PROJECT.md(项目 Wiki)← AI 自动同步 │
│ 概览 / 结构 / 模块状态 / 文件索引 │
│ STRUCTURE.md(文件管理规则)← AI 自动│
│ 目录规则 / 匹配条件 / 整理历史 │
│ UPDATE_LOG.md(里程碑变化)← AI 自动 │
└─────────────────────────────────────┘
↑ 状态汇总
下层(事实流水)
┌────────────────────┐ ┌────────────────────┐
│ log/(会话日志) │ │ TODO.md(执行清单)│
│ raw + summaries │ │ owner/deadline/ │
│ + archive(分级) │ │ deps │
└────────────────────┘ └────────────────────┘
↓
session-handoff.md(下次接手点)
Core idea: bottom feeds top, top constrains bottom. Logs and TODOs are raw facts. Handoff marks the next resume point. Wiki is the current snapshot. Structure manages file organization. Update Log records milestone changes. Constitution is stable principles.
Supports 3 language modes: English (en), Chinese (zh), or bilingual. All content adapts to the selected language.
Determine how this skill was triggered:
A. "整理文件" / "organize files":
references/file-reorganization.mdB. "收工" / "end session" / "结束会话":
C. Initialization (/project-butler, 初始化项目, setup project, etc.): → Continue to Init Flow below
Persistent project memory for AI coding assistants.
project-butler gives Claude Code, Cursor, Codex, and similar AI coding assistants a shared project memory stack: session logs, handoff notes, project wiki, TODOs, rules, file structure, and changelog.
You keep working normally. At the end, say end session. Next time, say continue.
Install as a Claude Code skill:
git clone https://github.com/JamesShi96/project-butler.git ~/.claude/skills/project-butler
Open any project and initialize the memory stack:
/project-butler
At the end of a work session:
end session
Next time:
continue
For Cursor, Codex, and other assistants, see Tool Compatibility.
AI coding assistants are powerful in one session and forgetful across sessions. If any of these sound familiar, project-butler is for you:
No comments yet. Be the first to share your thoughts!
references/language-change.md + references/language-adaptation.mdE. "continue" / "接着上次" / "上次做到哪了":
references/continue.mdF. "continue full context" / "全面回顾" / "项目全景" / "full context":
references/continue-full-context.mdWhen triggered by "end session" / "结束会话" / "收工", execute in order:
log/session-YYYY-MM-DD-{slug}.md
session-2026-04-21-prd-draft.md)references/log-compaction.md and execute.claude/candidates.md (see rules below)references/file-reorganization.md, execute Mode B
.claude/.file-snapshot.jsonreferences/update-log.md
UPDATE_LOG.mdSession log headers adapt to the configured language (read references/language-adaptation.md for glossary).
# Session YYYY-MM-DD — {topic}
## Session Goal
## Key Actions (Chronological)
## Decisions & Rationale
## Output Files
## Unfinished Items / Next Session Pickup
## CLAUDE.md Candidates (if any)
AI automatically appends to .claude/candidates.md when:
Never modify CLAUDE.md directly. All candidates require user review via "review claude".
Each task in TODO.md must include:
- [ ] {task description}
Owner: {name} | Deadline: {date} | Dependencies: {prerequisite}
If user provides a task missing required fields, ask them to fill in. Completed tasks are checked and kept (not deleted).
Scan project root for: CLAUDE.md, PROJECT.md, session-handoff.md, TODO.md, log/, STRUCTURE.md, UPDATE_LOG.md, .claude/.file-snapshot.json, .claude/candidates.md
references/upgrade-mode.md, create only missing files, never overwrite existing contentUse AskUserQuestion to ask:
en / zh / bilingual (default bilingual)Read references/file-templates.md + references/language-adaptation.md.
Create each file using templates, replacing {{VARIABLES}} with user answers. Apply language adaptation rules and glossary from the reference.
Create log/.gitkeep (empty file) alongside log/ directory so git tracks it when empty.
项目管理系统已初始化 ✓
文件状态:
✅ CLAUDE.md — 项目宪法(已创建)
✅ PROJECT.md — 项目 Wiki(已创建)
✅ session-handoff.md — 接手指引(已创建)
✅ TODO.md — 执行清单(已创建)
✅ log/ — 会话日志目录(已创建)
✅ .claude/candidates.md — 宪法候选池(已创建)
✅ STRUCTURE.md — 文件管理规则(已创建)
✅ UPDATE_LOG.md — 更新日志(已创建)
✅ .cursor/rules/ — Cursor 规则(已创建 / 已跳过)
🌐 Language: {{LANGUAGE}}
下一步:
1. 根据项目需要,在 TODO.md 添加第一批任务
2. 正常开始工作
3. 结束时说 "end session" 即可自动记录
4. 切换语言随时说 "change language" / "切换语言"
触发词速查:
end session / 结束会话 / 收工 → 写 log + 全量同步
review claude / 更新宪法 → 展示候选池逐条确认
sync wiki / 同步项目 → 强制更新 PROJECT.md
status / 项目现状 → 朗读 Wiki + handoff 摘要
整理文件 / organize files → 扫描并整理文件结构
| Trigger | Read these files |
|---------|-----------------|
| Init (fresh) | references/file-templates.md + references/language-adaptation.md |
| Init (upgrade) | above + references/upgrade-mode.md |
| End session | references/file-reorganization.md + references/update-log.md + references/log-compaction.md (if logs ≥ threshold) |
| 整理文件 / organize files | references/file-reorganization.md |
| 切换语言 / change language | references/language-change.md + references/language-adaptation.md |
| continue / 接着上次 | references/continue.md |
| continue full context / 全面回顾 | references/continue-full-context.md |
project-butler turns a project folder into that source of truth.
Run /project-butler once. It creates a file-based project memory stack:
project-root/
├── CLAUDE.md <- Project rules / constitution
├── PROJECT.md <- Current project wiki
├── STRUCTURE.md <- File organization rules
├── UPDATE_LOG.md <- Milestone-level changelog
├── session-handoff.md <- Cross-session handoff
├── TODO.md <- Execution checklist
├── log/ <- Session logs
└── .claude/
├── candidates.md <- Candidate rules for review
└── .file-snapshot.json <- File organization snapshot
The core files are plain Markdown, so other tools can read them even when they do not run the skill natively.
All triggers are natural language. Use slash commands only for first-time setup.
| You say | What happens |
|---|---|
| /project-butler | Initialize or upgrade the project memory stack. |
| end session / we're done | Write a session log, update handoff, sync wiki, update TODOs, organize new files, and record significant changes. |
| continue / continue from last time | Recover the previous session and resume without re-explaining context. |
| continue full context | Rebuild the full project trajectory from the latest session plus historical summaries. |
| review claude / check the rules | Review candidate project rules before they are promoted into the constitution. |
| sync wiki / update overview | Force-refresh PROJECT.md. |
| status / where are we | Read the current wiki and handoff summary. |
| organize files | Run file organization based on STRUCTURE.md. |
| change language | Switch project management files between English, Chinese, and bilingual mode. |
Session recovery (continue / continue full context) is routed through project-butler internally. There is no separate /continue command to install.
| Tool | Status | How it works |
|---|---|---|
| Claude Code | Native skill | Install this repo under ~/.claude/skills/project-butler and run /project-butler. |
| Cursor | Project rules | project-butler can generate .cursor/rules/project-system.mdc, which points Cursor at the same project memory files. |
| Codex | Shared memory files | Codex can read the generated Markdown files (PROJECT.md, TODO.md, session-handoff.md, rules) as project context. |
| Other AI assistants | File-based | Any assistant that can read project files can use the memory stack as shared context. |
See docs/compatibility.md for details and caveats.
project-butler organizes project memory by stability:
Stable rules
┌─────────────────────────────────────┐
│ CLAUDE.md / project rules │ <- Human-reviewed principles
│ ↑ candidates collected by AI │
└─────────────────────────────────────┘
↑ distilled from work
Current state
┌─────────────────────────────────────┐
│ PROJECT.md │ <- What the project is now
│ STRUCTURE.md │ <- Where files belong
│ UPDATE_LOG.md │ <- Milestone-level changes
└─────────────────────────────────────┘
↑ summarized from facts
Raw facts
┌──────────────────────┐ ┌───────────────────────┐
│ log/ │ │ TODO.md │
│ What happened │ │ What needs doing │
└──────────────────────┘ └───────────────────────┘
↓
session-handoff.md <- Where the next session should resume
Bottom feeds top. Top constrains bottom.
project-butler supports three language modes:
| Mode | Content language | User file naming |
|---|---|---|
| en | English | English naming (kebab-case) |
| zh | Chinese | Chinese naming allowed |
| bilingual | Chinese with English annotations | English preferred, Chinese acceptable |
You choose the mode during setup, and can later say change language.
If a project already has some management files, project-butler creates only the missing ones. It does not overwrite existing content. It also detects legacy .claude/memory/ layouts and suggests migration.
See docs/examples.md for a complete session flow:
continue / continue full context session recoverycontinue reference workflows under references/ instead of nested SKILL.md files.UPDATE_LOG.md for milestone-level change history./resume to continue and /resume-full to continue full context.continue / continue full context).project-init to project-butler.Full update log: UPDATE_LOG.md | Releases: GitHub Releases