Skip to content

Commit eb42a8d

Browse files
CodeCasterXclaude
andcommitted
更新贡献指南与代理文档
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 6006cd5 commit eb42a8d

File tree

4 files changed

+84
-5
lines changed

4 files changed

+84
-5
lines changed

AGENTS.en.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
5+
This repo hosts the FIT framework and related engines.
6+
- `framework/` contains the core implementations (`framework/fit/java`, `framework/fit/python`, `framework/waterflow`, `framework/fel`).
7+
- `docs/` holds user guides, quick starts, and white papers.
8+
- `examples/` contains runnable samples for FIT and FEL.
9+
- `docker/` provides container build assets.
10+
- `build/` is the Maven build output (generated).
11+
12+
## Build, Test, and Development Commands
13+
14+
- `mvn clean install` (repo root): builds all modules and runs tests; outputs to `build/`.
15+
- `cd framework/fit/java && mvn clean install`: builds the Java FIT framework only.
16+
- `./build/bin/fit start`: starts the Java runtime (uses Node.js); default port `8080`.
17+
- `./.claude/run-test.sh`: full CI-like flow (build, start, health checks).
18+
19+
## Coding Style & Naming Conventions
20+
21+
- Java formatting uses the IntelliJ profile `CodeFormatterFromIdea.xml`.
22+
- Public/protected Java APIs require Javadoc with `@param`/`@return` tags.
23+
- Class headers must include `@author` and `@since yyyy-MM-dd`.
24+
- Branch naming follows module prefixes and intent, e.g. `fit-feature-xxx`, `waterflow-bugfix-yyy`.
25+
26+
## Testing Guidelines
27+
28+
- Java tests run via Maven (Surefire); `mvn clean install` is the baseline.
29+
- Run targeted module tests from their module directory when iterating.
30+
- Keep tests close to source modules; name tests with `*Test` where applicable.
31+
32+
## Commit & Pull Request Guidelines
33+
34+
- Commit messages use a module tag in brackets and a short Chinese summary, e.g. `[fit] 修复某问题`.
35+
- Keep commit subjects concise (around 20 characters); add details in the body if needed.
36+
- PRs should be based on the correct module/version branch and normally include a single commit.
37+
38+
## Security & Configuration Tips
39+
40+
- Do not report vulnerabilities via public issues; follow `SECURITY.md`.
41+
- Ensure git hooks are enabled for encoding checks (`git-hooks/check-utf8-encoding.sh`).

AGENTS.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# 仓库指南
2+
3+
## 项目结构与模块划分
4+
5+
本仓库包含 FIT 框架及相关引擎。
6+
- `framework/` 为核心实现目录(`framework/fit/java``framework/fit/python``framework/waterflow``framework/fel`)。
7+
- `docs/` 存放用户指南、快速入门与白皮书。
8+
- `examples/` 包含 FIT/FEL 可运行示例。
9+
- `docker/` 提供容器构建资源。
10+
- `build/` 为 Maven 构建产物输出目录(自动生成)。
11+
12+
## 构建、测试与开发命令
13+
14+
- `mvn clean install`(仓库根目录):构建全部模块并运行测试,产物输出到 `build/`
15+
- `cd framework/fit/java && mvn clean install`:仅构建 Java FIT 框架。
16+
- `./build/bin/fit start`:启动 Java 运行时(依赖 Node.js);默认端口 `8080`
17+
- `./.claude/run-test.sh`:完整验证流程(构建、启动、健康检查)。
18+
19+
## 编码风格与命名规范
20+
21+
- Java 格式化使用 IntelliJ 配置 `CodeFormatterFromIdea.xml`
22+
- 公共/受保护的 Java API 需要 Javadoc,并包含 `@param`/`@return`
23+
- 类头需包含 `@author``@since yyyy-MM-dd`
24+
- 分支命名使用模块前缀与意图,例如 `fit-feature-xxx``waterflow-bugfix-yyy`
25+
26+
## 测试规范
27+
28+
- Java 测试通过 Maven(Surefire)执行,`mvn clean install` 为基线命令。
29+
- 迭代时可在模块目录运行定向测试。
30+
- 测试与源码同模块放置,命名优先使用 `*Test`
31+
32+
## 提交与 PR 规范
33+
34+
- 提交信息以模块标签开头,中文简述,例如 `[fit] 修复某问题`
35+
- 标题建议 20 字左右,必要时在正文补充细节。
36+
- PR 基于正确的模块/版本分支,通常仅包含一次提交。
37+
38+
## 安全与配置提示
39+
40+
- 安全问题请勿在公共 Issue 报告,按 `SECURITY.md` 指引私下提交。
41+
- 请启用 git hooks 进行编码检查(`git-hooks/check-utf8-encoding.sh`)。

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,10 @@ exec git-hooks/check-utf8-encoding.sh
8686
8787
### 提交信息格式
8888

89-
- 以中括号开头,然后加上模块名,例如 `[fit]`
9089
- 用简短的语句描述提交的主要内容,不要太长,建议 20 个字以内,需要使用中文,结尾不需要句号。
9190
- 如有必要,在简短的描述后添加一个空行,然后补充详细说明,可以使用多行来描述。
9291
- 说明中可以包括问题的原因、解决方法和影响范围等。
93-
- 样例:`[fit] 修复某问题`
92+
- 样例:`修复某问题`
9493

9594
## 代码审查
9695

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ build/
101101
**启动命令**
102102

103103
```
104-
mkdir dynamic-plugins
105-
cd dynamic-plugins
106-
../build/bin/fit start
104+
./build/bin/fit start
107105
```
108106

109107
> 以上编译构建出的 `fit` 命令可以通过系统操作(别名或添加系统路径)来简化输入。

0 commit comments

Comments
 (0)