添加项目配置文件和调整 gitignore

- 新增 AGENTS.md(项目指令集)
- 新增 CLAUDE.md(代码库文档)
- 更新 .gitattributes 和 .gitignore
- 新增 .claude/ 目录
This commit is contained in:
2026-04-27 10:59:07 +08:00
parent f4b1f29d39
commit 6e577b15a2
5 changed files with 141 additions and 4 deletions

View File

@@ -0,0 +1,92 @@
---
name: oflow
description: 用 git 记录创作过程和团队协作的指令集,适用于创意团队。
---
## 工作流程
采用简化版的 Github Flow 工作流,适用于创意团队的协作和创作过程记录:
- 仅在自己的「个人分支」工作,互不干扰
- 通过「提交」,有选择地确认改动到个人分支
- 不时地更新其他人在「主分支」的改动
- 通过「合并请求」,有监督地确认改动到主分支
## 规范、术语
### 主分支
也就是`main`分支。
- 应该保持稳定和可用,不在主分支上进行创作和修改。
### 个人分支
创作者在此分支上进行创作和修改。
- 以创作者名字命名的分支,或斜杠加工作内容(例如`alice`、`alice/dev`、`alice/design`)
### 提交
也就是 Commit,用于确认改动,保存时间节点。
- 提交前询问用户哪些改动需要添加到暂存区。
- 提交说明用中文表达为主,惯例或术语可以用中英文。
- 提交说明第一行,不需要前缀类型(`feat`、`docs`),而是用动词开头的短句,例如
- `refactor: 对 refs 进行了重构` 改为 `重构 refs`
- `feat: 添加了 xx 功能` 改为 `添加 xx`
- 如果本次改动涉及多项调整,在提交说明的后几行详述。
### 合并请求
也就是 Pull Request,简称 PR。
- 在 PR 前,要求先执行 `git pull origin main`,确保和`main`分支别差太远。
## 指令集
执行规则:
- 提交、合并请求、从主分支更新等操作前,确保当前在个人分支中。
- 表中 git 相关的指令在正式执行前,汇总信息给用户,确认后再执行。
- 如果 git 遇到 Authentication failed,尝试再次执行,如果依然不行,报告用户
### 创建个人分支
触发词:`创建时间线`,`创建个人分支`
执行步骤:
1. 执行 `git fetch origin && git checkout -b [branch-name] origin/main`
2. 执行 `git push -u origin [branch-name]`
> 其中 `[branch-name]` 为 git config 中记录的 username。如果用户有说明创建的意图,可加上后缀,例如 `alice/fix-bug`
### 更新
触发词:`从主线更新`,`从主分支同步`,`从主线同步`,`同步主分支`
执行步骤:
1. 执行 `git pull origin main`
2. 如果遇到合并冲突,询问式地帮用户处理冲突
### 提交
触发词:`保存时间点`,`提交修改`,`确认改动`,`记录时间节点`,`创建时间节点`
执行步骤:
1. 询问用户哪些改动需要被提交(确认),执行 `git add [files]`
2. 执行 `git commit -m [message]`
### 合并请求
触发词:`同步到主分支`,`同步给主分支`,`合并请求`,`PR`
执行步骤:
1. 执行 `git pull origin main`
2. 如果遇到合并冲突,询问式地帮用户处理冲突
3. 执行 `git push`
4. 展示 PR 链接,并提供标题和内容建议,用户可复制内容到远程仓库页面

12
.gitattributes vendored
View File

@@ -83,6 +83,8 @@
# Executable/Installer # Executable/Installer
*.apk lfs *.apk lfs
*.exe lfs *.exe lfs
*.msi lfs
*.dmg lfs
# Documents # Documents
*.pdf lfs *.pdf lfs
@@ -99,12 +101,12 @@
*.aep lfs *.aep lfs
*.prproj lfs *.prproj lfs
*.spp lfs *.spp lfs
*.abr lfs
# Zbrush # Zbrush
*.zbr lfs *.zbr lfs
*.zpr lfs *.zpr lfs
*.ztl lfs *.ztl lfs
*.c4d lfs
# Autodesk # Autodesk
*.max lfs *.max lfs
@@ -113,9 +115,8 @@
*.3dm lfs *.3dm lfs
*.3ds lfs *.3ds lfs
# Blender # Other DCC
*.blend lfs *.blend lfs
*.blend1 lfs
*.c4d lfs *.c4d lfs
# Imaging # Imaging
@@ -124,4 +125,7 @@
*.nii lfs *.nii lfs
*.ome lfs *.ome lfs
*.map lfs *.map lfs
*.mrc lfs *.mrc lfs
# Others
*.tpl lfs

9
.gitignore vendored
View File

@@ -1,3 +1,8 @@
# thumbs.db
# Windows database files that cache folder
# thumbnails (images, videos, documents) for faster viewing in File Explorer
[Tt]humbs.db
# Tempary files # Tempary files
temp temp
sandbox.* sandbox.*
@@ -23,14 +28,18 @@ secrets.bak/
# Claude # Claude
.claudian .claudian
.obsidian/plugins/claudian/data.json
# Obsidian setting # Obsidian setting
.obsidian/* .obsidian/*
!.obsidian/snippets !.obsidian/snippets
!.obsidian/app.json !.obsidian/app.json
!.obsidian/plugins/
# Blender # Blender
*.blend1 *.blend1
blender_assets.cats.txt~
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files
__pycache__/ __pycache__/

31
AGENTS.md Normal file
View File

@@ -0,0 +1,31 @@
## 项目结构
```bash
根目录
├── contents/ # 资源型文件
├── notes/ # 笔记、白板
├── references/
│ ├── client/ # 客户给的资料
│ ├── papers/ # 文献资料
│ └── visuals/ # 视觉参考
├── subspaces/ # 工程文件、创作文件
```
## Markdown 规范
- 中文为主(专有名词、约定俗称可以用英文)
- 不使用`---`分割器
- `# Heading` 一级标题仅用于开头
## 代码规范
- 避免嵌套结构
- 特殊的、非常规的需要写注释
- 提交说明、文档用中文为主(专有名词、约定俗称可以用英文)
- 注释用中文为主(专有名词、约定俗称可以用英文)
- 变量、函数名、Docstring 用全英文
- 同一事物用统一表达
- 使用的依赖越少越好
- 选用简单直接的方式实现
- 代码、执行方式改变,调整已有的文档、计划,而非新建

1
CLAUDE.md Normal file
View File

@@ -0,0 +1 @@
@AGENTS.md