|
| 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`). |
0 commit comments