Skip to content

Commit 9da132c

Browse files
committed
Add monorepo contribution guide
1 parent e2fd551 commit 9da132c

2 files changed

Lines changed: 128 additions & 1 deletion

File tree

CONTRIBUTING.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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`

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ This is the intended product story for the monorepo:
3333
- `PackSlice` creates stable train/eval/test slices from the same pack
3434
- the root CI workflow validates that the whole chain works end to end
3535

36+
## Quick demo output
37+
38+
<p align="center">
39+
<img src="docs/assets/agentcode-demo-terminal.svg" alt="AgentCode terminal-style demo output" width="100%" />
40+
</p>
41+
42+
If you want a one-command walkthrough of the whole repo:
43+
44+
```bash
45+
./scripts/run_automation_demo.sh /tmp/agentcode-demo
46+
```
47+
48+
That gives visitors an immediate answer to the most important README question: “what does this repo actually produce when I run it?”
49+
3650
## Projects
3751

3852
### 1. AgentCI
@@ -81,7 +95,7 @@ packslice summarize projects/packslice/examples/split_demo --json
8195

8296
That makes it easier to build release checks, artifact pipelines, and automated dashboards on top of the same OSS commands shown in the READMEs.
8397

84-
For a fuller walkthrough, see `docs/automation.md` and the companion script `scripts/run_automation_demo.sh`.
98+
For a fuller walkthrough, see `docs/automation.md`, the companion script `scripts/run_automation_demo.sh`, and the monorepo contributor guide in `CONTRIBUTING.md`.
8599

86100
## What the monorepo demo produces
87101

@@ -115,6 +129,8 @@ projects/
115129
workflows/ monorepo CI
116130
```
117131

132+
If you want to contribute at the monorepo level, start with `CONTRIBUTING.md`.
133+
118134
## Quick start
119135

120136
### AgentCI

0 commit comments

Comments
 (0)