feat: 重构项目为模块化结构,拆分 CLAUDE.md 文档
All checks were successful
Deploy Frontend / deploy (push) Successful in 2m38s
All checks were successful
Deploy Frontend / deploy (push) Successful in 2m38s
## 📁 模块化重构 ### 新增模块 CLAUDE.md - `frontend/CLAUDE.md` - 前端开发指导 (Next.js, React, TypeScript) - `docs/deployment/CLAUDE.md` - 部署配置指导 (Caddy, 服务器配置) - `.gitea/workflows/CLAUDE.md` - CI/CD 流程指导 (Gitea Actions) ### 根目录 CLAUDE.md 优化 - 重构为项目概览和模块导航 - 提供模块选择指导 - 减少单个文件的上下文长度 ### 自动化机制 - 创建 `scripts/update-claude-docs.sh` 自动更新脚本 - 集成到 pre-commit hooks 中 - 文件变更时自动更新对应模块的 CLAUDE.md ## 🎯 优化效果 ### 上下文优化 - 每个模块独立的 CLAUDE.md 文件 - 大幅减少单次处理的上下文长度 - 提高 Claude 处理效率和准确性 ### 开发体验 - 根据工作内容选择对应模块 - 模块化的文档更聚焦和专业 - 自动维护文档时间戳 ### 项目结构 ``` photography/ ├── CLAUDE.md # 项目概览和模块导航 ├── frontend/CLAUDE.md # 前端开发指导 ├── docs/deployment/CLAUDE.md # 部署配置指导 ├── .gitea/workflows/CLAUDE.md # CI/CD 流程指导 └── scripts/update-claude-docs.sh # 自动更新脚本 ``` 现在 Claude 工作时只需关注单个模块的文档,大幅提升处理效率!
This commit is contained in:
@ -11,4 +11,9 @@ module.exports = {
|
||||
'frontend/**/*.{ts,tsx,js,jsx,json,css,md}': [
|
||||
'cd frontend && export PATH="$HOME/.bun/bin:$PATH" && bun run format',
|
||||
],
|
||||
|
||||
// 当项目结构发生变化时,自动更新 CLAUDE.md 文档
|
||||
'{frontend/**,docs/deployment/**,.gitea/workflows/**,CLAUDE.md}': [
|
||||
'./scripts/update-claude-docs.sh',
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user