project-memory
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseProject memory generator
项目记忆生成工具
Create CLAUDE.md files that transfer tribal knowledge, not obvious information. Think like a senior journalist onboarding a competent colleague—you don't explain how journalism works, you explain YOUR project's quirks.
创建CLAUDE.md文件,用于传递团队专属知识而非通用信息。想象你是资深记者在指导能力出色的新同事——不用解释新闻工作的通用原理,只需说明你的项目的特有细节。
What belongs in CLAUDE.md
CLAUDE.md应包含的内容
| Include | Don't include |
|---|---|
| Project-specific quirks | How journalism works generally |
| YOUR naming conventions | Standard file organization |
| Commands with YOUR flags | Generic commands like "npm install" |
| Non-obvious architecture | Framework documentation |
| Common mistakes in THIS project | General best practices |
| External service configurations | Information already in comments |
| Source handling requirements | Basic ethics everyone knows |
| 需包含 | 无需包含 |
|---|---|
| 项目特有细节 | 新闻工作的通用原理 |
| 项目专属命名规范 | 标准文件组织结构 |
| 带项目专属参数的命令 | 通用命令如“npm install” |
| 非通用架构设计 | 框架官方文档内容 |
| 本项目常见错误 | 通用最佳实践 |
| 外部服务配置信息 | 已在代码注释中体现的内容 |
| 来源处理要求 | 所有人都知晓的基础伦理规范 |
The deletion test
删除测试法
For every line you write, ask: "Would an experienced journalist already know this?"
- If yes → Delete it
- If no → Keep it
对于你写下的每一行内容,问自己:“有经验的记者是否已经知道这些?”
- 如果是 → 删除该行
- 如果否 → 保留该行
Basic template structure
基础模板结构
markdown
undefinedmarkdown
undefinedCLAUDE.md
CLAUDE.md
Project overview
项目概述
[1-2 sentences maximum. What this does + who uses it.]
[最多1-2句话。说明项目功能+使用人群。]
Commands
命令
[Only project-specific commands. Not generic ones.]
[仅保留项目专属命令,不要通用命令。]
Architecture
架构
[Only non-obvious decisions. Where does X live? Why?]
[仅记录非通用决策。比如X组件存放在哪里?为什么?]
Patterns
模式
[Only patterns unique to this project]
[仅记录本项目特有的模式]
Things to avoid
需避免的事项
[Project-specific anti-patterns and gotchas]
[项目特有的反模式和易踩坑点]
External dependencies
外部依赖
[APIs, services, credential locations]
undefined[API、服务、凭证存放位置]
undefinedWhat to cut ruthlessly
需坚决删除的内容
Generic commands everyone knows:
markdown
<!-- DELETE THIS -->
git add . # Stage changes
npm install # Install dependenciesObvious journalism patterns:
markdown
<!-- DELETE THIS -->
We verify facts before publishing. All quotes must be
attributed. Follow AP Style...Framework explanations:
markdown
<!-- DELETE THIS -->
React components live in /components. We use hooks
for state management...所有人都知道的通用命令:
markdown
<!-- 删除这段 -->
git add . # 暂存更改
npm install # 安装依赖通用新闻行业模式:
markdown
<!-- 删除这段 -->
我们在发布前会核实事实。所有引述必须标注来源。遵循AP风格...框架说明内容:
markdown
<!-- 删除这段 -->
React组件存放在/components目录。我们使用hooks进行状态管理...What to keep
需保留的内容
Project-specific quirks:
markdown
<!-- KEEP THIS -->
Source names in the spreadsheet use LAST, FIRST format
but the CMS expects FIRST LAST. The import script handles
this, but manual entries need flipping.Non-obvious architecture:
markdown
<!-- KEEP THIS -->
Embargo dates are stored in the CMS as NYC time but
displayed in the reader's local time. Server-side renders
use UTC. Check timezone handling before changing date code.Gotchas that burned you:
markdown
<!-- KEEP THIS -->
The AP feed disconnects silently after 4 hours. Cron job
at :00 checks connection and restarts if stale.项目特有细节:
markdown
<!-- 保留这段 -->
电子表格中的来源名称采用“姓氏,名字”格式,但CMS要求“名字 姓氏”。导入脚本会自动处理此问题,但手动录入时需要调整格式。非通用架构设计:
markdown
<!-- 保留这段 -->
禁发日期在CMS中以纽约时间存储,但会以读者本地时间展示。服务端渲染使用UTC时间。修改日期相关代码前请检查时区处理逻辑。曾经踩过的坑:
markdown
<!-- 保留这段 -->
AP供稿会在4小时后静默断开连接。定时任务会在每小时00分检查连接状态,若已断开则重启连接。Voice guidelines
语气指南
- Direct and terse
- Like notes you'd leave for yourself
- No marketing language
- No "Welcome to..." introductions
- No "This project is..." padding
- 直接简洁
- 像给自己留的笔记
- 无营销话术
- 无“欢迎来到...”之类的开场白
- 无“本项目是...”之类的冗余描述
Example: Good vs bad
示例:正面vs反面
Bad (too verbose, obvious):
markdown
undefined反面示例(过于冗长、包含通用信息):
markdown
undefinedCLAUDE.md
CLAUDE.md
Overview
概述
Welcome to our newsroom's story tracking system! This is a
web application built with React and Node.js that helps
editors and reporters collaborate on stories.
欢迎使用我们编辑部的稿件追踪系统!这是一个基于React和Node.js构建的Web应用,帮助编辑和记者协作完成稿件。
Getting started
入门指南
First, make sure you have Node.js installed. Then:
npm install
npm start
**Good (tribal knowledge only):**
```markdown首先,请确保已安装Node.js。然后执行:
npm install
npm start
**正面示例(仅包含团队专属知识):**
```markdownCLAUDE.md
CLAUDE.md
Overview
概述
Story tracker for metro desk. React + Supabase.
都市新闻部稿件追踪工具。基于React + Supabase构建。
Gotchas
易踩坑点
- Story slugs must be unique across ALL desks, not just metro
- "Hold" status doesn't stop the autopublish cron—use "Kill"
- Reporter dropdown caches for 1 hour; new hires won't appear
- 稿件别名(slug)必须在所有部门保持唯一,而非仅都市部
- “暂停”状态不会阻止自动发布定时任务——请使用“取消”状态
- 记者下拉列表会缓存1小时;新入职记者不会立即显示在列表中
Commands
命令
npm run sync-ap # Pull latest from AP, runs automatically at :15
npm run sync-ap # 拉取AP最新内容,每小时15分自动执行
Credentials
凭证
Supabase key in 1Password "Metro Desk" vault, not .env
undefinedSupabase密钥存放在1Password的“都市新闻部”保管库中,不在.env文件内
undefinedLength guideline
篇幅指南
A good CLAUDE.md is 50-150 lines. If it's longer, you're explaining too much. If it's shorter, you might be missing critical quirks.
优质的CLAUDE.md文件篇幅在50-150行之间。如果过长,说明你解释了太多通用内容;如果过短,可能遗漏了关键的项目细节。
Journalism-specific templates
新闻行业专属模板
Templates are in the directory:
templates/| Template | Use for |
|---|---|
| Newsroom tools, fact-checkers, AI assistants |
| Conferences, workshops, campaign sites |
| Newsletters, podcasts, ongoing content series |
| Investigations, data journalism with defined scope |
| CMS workflows, publishing automation |
| Historical collections, document repositories |
模板存放在目录下:
templates/| 模板 | 适用场景 |
|---|---|
| 编辑部工具、事实核查工具、AI助手 |
| 会议、研讨会、活动宣传网站 |
| 新闻通讯、播客、持续更新的内容系列 |
| 调查报道、有明确范围的数据新闻项目 |
| CMS工作流、发布自动化 |
| 历史资料集、文档存储库 |
Template selection guide
模板选择指南
What are you building?
├── Tool for the newsroom → editorial-tool.md
├── Site for an event → event-website.md
├── Recurring content series → publication.md
├── One-time investigation → research-project.md
├── Publishing automation → content-pipeline.md
└── Archive/preservation → digital-archive.md你正在构建什么?
├── 编辑部工具 → editorial-tool.md
├── 活动网站 → event-website.md
├── 持续更新的内容系列 → publication.md
├── 一次性调查报道 → research-project.md
├── 发布自动化流程 → content-pipeline.md
└── 档案/资料保存 → digital-archive.mdHow to use templates
模板使用方法
- Copy the appropriate template to your project root as
CLAUDE.md - Fill in the bracketed placeholders with YOUR specifics
- Delete any sections that don't apply
- Add project-specific gotchas as you discover them
- Keep it updated—stale CLAUDE.md files cause confusion
The best CLAUDE.md files are written by people who've been burned by the quirks they're documenting.
- 将对应场景的模板复制到项目根目录,命名为
CLAUDE.md - 用项目专属信息替换括号中的占位符
- 删除不适用的章节
- 随着项目推进,添加新发现的特有坑点
- 保持内容更新——过时的CLAUDE.md文件会造成混淆
最优质的CLAUDE.md文件,由那些亲身踩过所记录的坑的人撰写。