Contributing
Getting the Code
Section titled “Getting the Code”git clone https://github.com/xianix-team/the-agent.gitcd the-agentcp TheAgent/.env.example TheAgent/.env # fill in required valuesdotnet builddotnet test TheAgent.Tests/TheAgent.Tests.csprojBranching
Section titled “Branching”| Branch | Purpose |
|---|---|
main | Production-ready. Protected — merges via PR only. |
feature/<short-name> | New features |
fix/<short-name> | Bug fixes |
chore/<short-name> | CI, deps, non-functional changes |
git checkout main && git pullgit checkout -b feature/my-featureCode Style
Section titled “Code Style”Standard C# conventions:
- Namespaces match folder paths (
Xianix.Workflows,Xianix.Activities) - Interfaces prefixed with
I(IEventOrchestrator) - Async methods suffixed with
Async - Private fields use
_camelCase - Constants use
PascalCase - Workflow classes must be deterministic — see Extending the Agent
Before You Code
Section titled “Before You Code”Consider whether the change can be made in rules.json alone — it’s the primary extension point and requires no compilation.
If code is needed:
- Add or extend an interface before the implementation
- Register new services in
Program.cs - Add env-var accessors to
EnvConfig.cs - Write unit tests alongside the implementation
- Update docs if user-facing behavior changes
Pull Request Guidelines
Section titled “Pull Request Guidelines”- One concern per PR — don’t bundle unrelated changes
- Tests required for logic changes to orchestrator, rules, or activities
- CI must pass —
dotnet buildanddotnet testwith no warnings - Describe what, why, and how to test in the PR description
Releasing
Section titled “Releasing”Push a version tag to trigger CI:
git tag v1.2.0git push origin v1.2.0This publishes both 99xio/xianix-agent and 99xio/xianix-executor to Docker Hub. See Deployment for tag conventions.