- Read
docs/AGENT.mdfirst. - For implementation work, read
docs/00-governance/ARCHITECTURE.md. - Do not treat root
README.mdas implementation authority.
- Load the minimum docs needed for the task.
- Prefer the simplest workable solution.
- Do not add abstraction, config, directories, or helper layers without a concrete need.
- Keep the existing Maven multi-module structure and existing domain layering.
- Root project: Maven multi-module, Java 17, root
pom.xml - Business code:
bacon-biz/ - Shared code:
bacon-common/ - App assembly and startup:
bacon-app/ - AI routing docs:
docs/
Business domains keep this layer split:
*-api*-interfaces*-application*-domain*-infra
- Java/XML/YAML use 4-space indentation.
- Base package:
com.github.thundax.bacon - Class:
PascalCase - Method/field:
camelCase - Constant:
UPPER_SNAKE_CASE
Layer responsibilities:
interfaces.controller: external HTTP entryinterfaces.provider: internal HTTP entryinterfaces.facade: local facade adapterapplication: use-case orchestrationdomain: business rules and repository contractsinfra: persistence and external integration
- Tests live in
src/test/java. - Shared test support belongs in
bacon-common/bacon-common-test. - Behavior changes require test updates.
- Every file modification must be committed before ending the task.
- Commit format:
Type(domain): 中文说明 - Split unrelated changes into separate commits.
- Commit message must state the concrete capability changed.
Examples:
Feat(boot): 初始化工程Test(order): 补充订单创建测试