|
| 1 | +# Contributing to AgentCode |
| 2 | + |
| 3 | +Thanks for checking out `AgentCode`. |
| 4 | + |
| 5 | +This monorepo is intentionally narrow: each project should solve a concrete gap in agent reproducibility, regression testing, failure analysis, or benchmark preparation. Contributions are most useful when they strengthen that end-to-end story instead of adding unrelated demos. |
| 6 | + |
| 7 | +## What belongs here |
| 8 | + |
| 9 | +Good additions usually fit at least one of these patterns: |
| 10 | + |
| 11 | +- improve one of the four existing tools: `AgentCI`, `TracePack`, `FailMap`, or `PackSlice` |
| 12 | +- make the tools work better together through shared docs, CI, examples, or artifact handoffs |
| 13 | +- add integrations that help teams adopt the tools in real agent stacks |
| 14 | +- improve reproducibility, testing, packaging, or release readiness |
| 15 | + |
| 16 | +Less useful changes usually look like: |
| 17 | + |
| 18 | +- generic chat demos with no reusable artifact output |
| 19 | +- unrelated agent frameworks or memory layers |
| 20 | +- one-off examples that are not tested or documented |
| 21 | + |
| 22 | +## Local setup |
| 23 | + |
| 24 | +The projects are independent Python packages inside one repository. |
| 25 | + |
| 26 | +For package-level work, use an editable install from the project you are changing: |
| 27 | + |
| 28 | +```bash |
| 29 | +cd projects/agentci |
| 30 | +python -m venv .venv |
| 31 | +source .venv/bin/activate |
| 32 | +pip install -e . |
| 33 | +``` |
| 34 | + |
| 35 | +Repeat the same pattern for `projects/tracepack`, `projects/failmap`, or `projects/packslice`. |
| 36 | + |
| 37 | +For monorepo automation checks, the root demo script is often the fastest way to verify the whole artifact chain: |
| 38 | + |
| 39 | +```bash |
| 40 | +chmod +x scripts/run_automation_demo.sh |
| 41 | +./scripts/run_automation_demo.sh /tmp/agentcode-demo |
| 42 | +``` |
| 43 | + |
| 44 | +## Repo layout |
| 45 | + |
| 46 | +```text |
| 47 | +projects/agentci replay-first regression testing |
| 48 | +projects/tracepack trace-to-benchmark packaging |
| 49 | +projects/failmap failure clustering and release comparison |
| 50 | +projects/packslice balanced dataset splitting |
| 51 | +docs/ monorepo-level walkthroughs and visuals |
| 52 | +scripts/ root automation helpers |
| 53 | +.github/workflows/ CI coverage for the monorepo and each package |
| 54 | +``` |
| 55 | + |
| 56 | +## Development workflow |
| 57 | + |
| 58 | +When making a change: |
| 59 | + |
| 60 | +1. update the relevant package code, docs, and examples together |
| 61 | +2. run the package tests for the area you touched |
| 62 | +3. run the package CLI example flow if the change affects user-facing behavior |
| 63 | +4. run `./scripts/run_automation_demo.sh` if the change affects cross-tool handoffs or root docs |
| 64 | +5. keep JSON outputs stable when they are already part of CI or docs |
| 65 | + |
| 66 | +## Testing expectations |
| 67 | + |
| 68 | +Use the smallest useful validation that matches the scope of the change. |
| 69 | + |
| 70 | +Package-level tests: |
| 71 | + |
| 72 | +```bash |
| 73 | +cd projects/agentci && python -m unittest discover -s tests -v |
| 74 | +cd projects/tracepack && python -m unittest discover -s tests -v |
| 75 | +cd projects/failmap && python -m unittest discover -s tests -v |
| 76 | +cd projects/packslice && python -m unittest discover -s tests -v |
| 77 | +``` |
| 78 | + |
| 79 | +End-to-end validation: |
| 80 | + |
| 81 | +```bash |
| 82 | +./scripts/run_automation_demo.sh /tmp/agentcode-demo |
| 83 | +``` |
| 84 | + |
| 85 | +If you change CLI output that is documented in the README, examples, or CI workflow, update those references in the same pull request. |
| 86 | + |
| 87 | +## Design principles |
| 88 | + |
| 89 | +- prefer portable JSON artifacts over hard-to-parse terminal output |
| 90 | +- keep examples runnable in a few minutes on a normal developer machine |
| 91 | +- make failures easy to inspect and compare across runs |
| 92 | +- document the handoff between tools, not just each tool in isolation |
| 93 | +- favor small, composable features over broad framework abstractions |
| 94 | + |
| 95 | +## Pull request checklist |
| 96 | + |
| 97 | +Before opening a PR, check that you: |
| 98 | + |
| 99 | +- describe the user problem solved by the change |
| 100 | +- include tests or a concrete validation command |
| 101 | +- update docs when commands, files, or output shapes change |
| 102 | +- avoid breaking the monorepo automation story unless the PR intentionally revises it |
| 103 | + |
| 104 | +## Questions and proposals |
| 105 | + |
| 106 | +If you want to propose a new project for the monorepo, start by describing: |
| 107 | + |
| 108 | +- the missing workflow in today's agent tooling |
| 109 | +- why the problem is not already well served by existing OSS |
| 110 | +- the minimal artifact contract and CLI that would make it useful |
| 111 | +- how it would connect to the rest of `AgentCode` |
0 commit comments