main, and provide enough evidence for maintainers to review behavior, compatibility, and user impact.
Before Writing Code
- Search existing issues and pull requests for overlapping work.
- Read the architecture overview and locate the owning component.
- Inspect the current implementation, config schema, adjacent components, and public documentation.
- Establish an upstream contract from official repositories, APIs, papers, or provider documentation when applicable.
- Open an issue or design discussion before a broad contract change or integration with significant maintenance cost.
Fork and Clone
Follow GitHub’s contributing to a project workflow:origin should point to your fork. upstream should point to open-compass/AgentCompass.
Create a Focused Branch
Start from the latest upstream branch:Develop Against the Owning Contract
During implementation:- Keep behavior in the component that owns it.
- Preserve explicit user settings before applying inferred defaults.
- Add public parameters through the component config contract.
- Keep provider and model calls out of deterministic planning code.
- Preserve error categories and clean up resources on every exit path.
- Update user-facing documentation with the source change.
- Never commit credentials, private endpoints, datasets, container layers, or complete result directories.
Write Atomic Commits
Use the same change-type prefix for commit subjects and pull request titles:
Write concise imperative subjects. Avoid messages such as
update code, fix issue, or a summary of several unrelated
changes. Prefer an atomic history such as:
Validate the Change
Start with the smallest check that exercises the modified contract, then expand to representative end-to-end behavior. Record exact commands and important outcomes for the pull request. For Python formatting and linting, use the repository’s current pre-commit configuration:mint dev when changing navigation, MDX components, tables, tabs, or command examples.
Keep Documentation With the Implementation
Update documentation in the same pull request when a change affects public flags, SDK interfaces, component ids, parameters, defaults, compatibility, installation, dependencies, result formats, or recommended commands.- Put installation and first-run behavior in Get Started.
- Put configuration, operation, and troubleshooting in the User Guide.
- Put architecture, implementation contracts, extension rules, and validation standards in the Developer Guide.
- Keep English and Chinese pages at matching relative paths unless maintainers explicitly approve staged localization.
- Add or remove pages in
docs/docs.json, use root-relative locale links, and validate generated commands.
Rebase and Push
Before opening or updating the pull request:Open a Reviewable Pull Request
The pull request should explain:- The problem and why it belongs in AgentCompass.
- The owning component and material design decisions.
- User-visible behavior and compatibility before and after the change.
- Exact redacted smoke or reproduction commands.
- Validation results and relevant score or artifact evidence.
- Documentation updated with the implementation.
- Work intentionally left outside the current scope.
Stack Foundational and Integration Changes
When one contribution depends on reusable infrastructure:- Create a foundational branch from
upstream/main. - Create the integration branch on top of the foundational branch for local combined testing.
- Submit the foundational pull request first.
- After it merges, rebase the integration branch onto the updated
upstream/main. - Inspect the range and rerun affected validation before pushing with
--force-with-lease.
