项目规则与记忆文件模板

从 30 个 agentic engineering 概念中摘出的两份模板:项目规则文件与持久记忆文件。

作者
@sairahul1
标签
CLAUDE.md智能体
NO.011收录 2026-06-24

一个有用的 config file 包括:

# Project Rules
 
Package manager: pnpm (never npm or yarn)
Test command: pnpm test
Lint command: pnpm lint
 
Rules:
- Always read a file before editing it
- Never commit secrets or .env values 
- Functions max 40 lines
- Never use console.log in production code
- Always write tests for new functions

11. Persistent Memory

# Project Memory
 
## Architecture Decisions
- Using PostgreSQL not MySQL (decided 2025-03-10, reason: team familiarity)
- API versioning with /v1/ prefix on all routes
- Auth uses JWT with 24hr expiry
 
## Conventions
- Error messages always in snake_case
- IDs are UUIDs everywhere
- All dates stored as UTC
 
## Known Issues
- Redis connection sometimes drops on staging — restart fixes it
- Unit tests slow on Windows due to file watchers