Prepare the Change
Before writing code, confirm the scope and governing contract:- Search existing issues and pull requests for overlapping work.
- Read the architecture overview and locate the component that owns the behavior.
- Inspect the current implementation, config schema, adjacent components, and public documentation.
- When the change depends on an external project, establish the upstream contract from its official repository, API, paper, or provider documentation.
- Open an issue or design discussion before a broad contract change or an integration with significant maintenance cost.
origin should point to your fork, and upstream should point to open-compass/AgentCompass. Name the branch after the change it contains, for example:
Implement and Validate
During implementation:- Keep behavior in the component that owns it.
- Preserve explicit user settings before applying inferred defaults.
- Add public parameters through the corresponding 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 documentation in the same pull request when public behavior changes; follow the documentation contribution guide for the detailed rules.
- Never commit credentials, private endpoints, datasets, container layers, complete result directories, or large generated artifacts.
Write concise, imperative subjects. Avoid vague messages such as
update code or fix issue. If the implementation, Recipe, and documentation can be reviewed independently, commit them separately:
Submit the Pull Request
Before opening or updating the pull request, rebase the branch onto the latestupstream/main:
- The problem, the scope of this change, and work intentionally left out.
- The owning component, important design decisions, and user-visible behavior and compatibility before and after the change.
- Exact redacted reproduction or validation commands, important results, and any necessary artifact evidence.
- Documentation updated with the implementation.
Handle Dependent Changes
When an integration depends on reusable infrastructure, submit the infrastructure and integration as separate pull requests so the infrastructure remains independently reviewable and reusable:- Create a foundational branch from
upstream/mainand submit the foundational pull request. - Create the integration branch on top of the foundational branch only for local combined testing and the later integration pull request.
- After the foundational pull request merges, rebase the integration branch onto the updated
upstream/main. - Inspect the commit range, rerun affected validation, and then update the personal integration branch with
--force-with-lease.
