|
| 1 | +--- |
| 2 | +title: Contributing |
| 3 | +description: Engineering standards and review workflow for AgentsView contributions |
| 4 | +--- |
| 5 | + |
| 6 | +# Contributing to AgentsView (for Humans) |
| 7 | + |
| 8 | +This guide is for human contributors — if you are one, please read it before |
| 9 | +opening your first pull request. If you are configuring a coding agent, point |
| 10 | +it at |
| 11 | +[AGENTS.md](https://github.com/kenn-io/agentsview/blob/main/AGENTS.md) |
| 12 | +instead. |
| 13 | + |
| 14 | +We welcome changes that leave AgentsView easier to understand, safer to change, |
| 15 | +and more useful than before. |
| 16 | + |
| 17 | +Our central quality standard is **durability**. A capable engineer should be |
| 18 | +able to understand what changed, why it changed, which invariants matter, and |
| 19 | +how the behavior is protected using only the repository's lasting artifacts. |
| 20 | +They should not need the original agent session, temporary planning documents, |
| 21 | +task identifiers, review-job identifiers, machine-specific paths, or private |
| 22 | +context. |
| 23 | + |
| 24 | +The repository's |
| 25 | +[AGENTS.md](https://github.com/kenn-io/agentsview/blob/main/AGENTS.md) is |
| 26 | +written for autonomous coding agents. Human contributors do not need to follow |
| 27 | +its agent workflow instructions verbatim. Its engineering standards—including |
| 28 | +test style, backend parity, localization, content hygiene, and SQLite archive |
| 29 | +safety—apply to every contribution regardless of who or what wrote it. |
| 30 | + |
| 31 | +## Before you start |
| 32 | + |
| 33 | +- Read the code around the behavior you want to change and understand the |
| 34 | + boundaries and invariants it already preserves. |
| 35 | +- Open an [issue](https://github.com/kenn-io/agentsview/issues) before investing |
| 36 | + heavily in a substantial architecture, storage, public API, or |
| 37 | + user-experience change. |
| 38 | +- Keep the contribution focused. Separate unrelated cleanup so reviewers can |
| 39 | + reason about each change on its own. |
| 40 | +- Do not expose private names, hostnames, identities, infrastructure details, |
| 41 | + credentials, live data, or absolute machine paths in durable artifacts. |
| 42 | + |
| 43 | +## Repository model |
| 44 | + |
| 45 | +AgentsView uses a fork-and-pull-request model. Clone your fork as `origin` and |
| 46 | +add the main repository as `upstream`: |
| 47 | + |
| 48 | +```bash |
| 49 | +git clone git@github.com:YOUR-USERNAME/agentsview.git |
| 50 | +cd agentsview |
| 51 | +git remote add upstream https://github.com/kenn-io/agentsview.git |
| 52 | +``` |
| 53 | + |
| 54 | +- Branch from `upstream/main`, and push with an explicit |
| 55 | + `git push origin <branch>`. Branches created from `upstream/main` may track |
| 56 | + it, and a bare `git push` can target the wrong remote. |
| 57 | +- Update your branch with `git rebase upstream/main`, not `git merge`. Pull |
| 58 | + request history should be linear. |
| 59 | +- Pull requests are squash-merged. After your pull request merges, git will |
| 60 | + not report your local branch as merged — check the pull request state on |
| 61 | + GitHub, then delete the branch. If you stacked further work on a merged |
| 62 | + branch, rebase with `git rebase --onto upstream/main <old-base>` so you do |
| 63 | + not replay landed commits. |
| 64 | +- A clean rebase is not a green build. Re-run the relevant tests after |
| 65 | + rebasing onto a moved `main`; GitHub's "mergeable" status is a textual |
| 66 | + check only. |
| 67 | +- Maintainers may rebase or trim your pull request branch before merging. |
| 68 | + Keep a local copy of work you care about, and read the merged commit rather |
| 69 | + than assuming the pull request landed exactly as written. |
| 70 | + |
| 71 | +## Build a durable contribution |
| 72 | + |
| 73 | +Code should communicate its responsibilities and failure modes clearly. Follow |
| 74 | +existing architecture and naming, prefer focused interfaces, and avoid unrelated |
| 75 | +refactoring. Optimize for the engineer who will debug or extend the work months |
| 76 | +from now. |
| 77 | + |
| 78 | +Tests are part of the artifact, not evidence attached after the fact. New |
| 79 | +features and bug fixes need tests that exercise observable behavior, important |
| 80 | +failure modes, and invariants. Avoid tests that merely duplicate the |
| 81 | +implementation. Use the repository's established test helpers and assertion |
| 82 | +style. |
| 83 | + |
| 84 | +Preserve the project's cross-cutting contracts: |
| 85 | + |
| 86 | +- Treat the SQLite archive as persistent user data. Schema and parser changes |
| 87 | + must preserve existing sessions through the migration and resync paths |
| 88 | + documented in `AGENTS.md`. |
| 89 | +- Keep SQLite and PostgreSQL behavior and query shape aligned unless the change |
| 90 | + is explicitly scoped to one backend. DuckDB remains a disposable read |
| 91 | + mirror. |
| 92 | +- Keep every frontend locale synchronized when user-facing messages change. |
| 93 | +- Keep background work bounded as stored session counts grow, and add |
| 94 | + cardinality-scaling coverage when changing watcher, polling, or sync paths. |
| 95 | +- Reverify provider-format evidence when changing a provider parser or its usage |
| 96 | + and cost accounting. |
| 97 | + |
| 98 | +Documentation, comments, schemas, tests, error messages, and metadata should |
| 99 | +explain the domain responsibility or invariant they preserve. Do not make |
| 100 | +durable artifacts depend on temporary task names, planning trees, agent |
| 101 | +transcripts, or review history. |
| 102 | + |
| 103 | +## Validate your work |
| 104 | + |
| 105 | +Run the checks relevant to the files and behavior you changed. Common commands |
| 106 | +include: |
| 107 | + |
| 108 | +```bash |
| 109 | +make test-short |
| 110 | +make test |
| 111 | +make vet |
| 112 | +make lint |
| 113 | +make e2e |
| 114 | +make docs-check |
| 115 | +``` |
| 116 | + |
| 117 | +For Go changes, run `go fmt ./...` and `go vet ./...`. For frontend changes, run |
| 118 | +`npm run test` and `npm run check` from `frontend/`. Localized frontend changes |
| 119 | +also require `npm run i18n:compile`. |
| 120 | + |
| 121 | +Some integration suites require external services or platform-specific |
| 122 | +environments. If you cannot run a relevant check, say so plainly when handing |
| 123 | +off the change. Never claim a check passed without its current output. |
| 124 | + |
| 125 | +## Review locally with roborev |
| 126 | + |
| 127 | +We strongly recommend using [roborev](https://www.roborev.io/) during |
| 128 | +development. Early adversarial feedback catches correctness, testing, and |
| 129 | +maintainability problems while the change is still fresh. Resolving those |
| 130 | +findings before opening a pull request reduces maintainer churn and usually |
| 131 | +shortens the path to a mergeable change. |
| 132 | + |
| 133 | +The repository ships a `.roborev.toml` with the project's review guidelines — |
| 134 | +its threat model, accepted design decisions, and backend-parity checklists — |
| 135 | +so local reviews automatically apply the same assumptions as the automated |
| 136 | +review that runs after you open a pull request. |
| 137 | + |
| 138 | +After [installing roborev](https://www.roborev.io/installation/), initialize it |
| 139 | +inside your checkout: |
| 140 | + |
| 141 | +```bash |
| 142 | +roborev init |
| 143 | +``` |
| 144 | + |
| 145 | +This installs the post-commit review hook. Inspect findings with `roborev tui` |
| 146 | +and fix them manually if you prefer. |
| 147 | + |
| 148 | +Codex users can optionally close the write-review-fix loop automatically: |
| 149 | + |
| 150 | +```bash |
| 151 | +roborev skills install |
| 152 | +roborev agent-hook install --agent codex |
| 153 | +``` |
| 154 | + |
| 155 | +The agent hook expects the installed roborev fix skill. It prompts Codex to |
| 156 | +address accumulated findings before the session context goes cold. |
| 157 | + |
| 158 | +Before opening a pull request, we recommend one review of the complete |
| 159 | +branch, configured to match the project's automated reviewer. As of July |
| 160 | +2026, that review is a panel: a correctness review plus a security review, |
| 161 | +synthesized into a single result. Add the panel to your roborev config: |
| 162 | + |
| 163 | +```toml |
| 164 | +[review.subagents.codex_default] |
| 165 | +agent = 'codex' |
| 166 | +review_type = 'default' |
| 167 | + |
| 168 | +[review.subagents.codex_security] |
| 169 | +agent = 'codex' |
| 170 | +review_type = 'security' |
| 171 | + |
| 172 | +[review.panels.default_security] |
| 173 | +members = ['codex_default', 'codex_security'] |
| 174 | +synthesis_agent = 'codex' |
| 175 | +``` |
| 176 | + |
| 177 | +Then run: |
| 178 | + |
| 179 | +```bash |
| 180 | +roborev review --branch --base upstream/main --panel default_security |
| 181 | +roborev tui |
| 182 | +``` |
| 183 | + |
| 184 | +The explicit `--base upstream/main` matches the scope of the automated |
| 185 | +review, which diffs the whole pull request against its base. Running only a |
| 186 | +single default review clears correctness findings locally but leaves security |
| 187 | +findings to surface for the first time on GitHub — an avoidable review cycle. |
| 188 | +Panel members follow your agent's current default model; check the roborev |
| 189 | +documentation if this dated example becomes stale. |
| 190 | + |
| 191 | +Codex and OpenAI access are not prerequisites for useful local review. roborev |
| 192 | +supports [multiple coding agents](https://www.roborev.io/agents/); use any |
| 193 | +supported agent available in your environment. The explicit Codex configuration |
| 194 | +is recommended because it most closely matches the review AgentsView runs after |
| 195 | +you open a pull request. |
| 196 | + |
| 197 | +Local roborev use is a strong recommendation, not a requirement for opening a |
| 198 | +pull request and not a contributor-side merge gate. Automated findings also |
| 199 | +require judgment: fix legitimate issues and do not make speculative changes |
| 200 | +solely to satisfy an inapplicable finding. |
| 201 | + |
| 202 | +## Open a reviewable pull request |
| 203 | + |
| 204 | +Keep the pull request focused enough that a reviewer can understand its purpose |
| 205 | +and risk. The title should describe the durable outcome, not the activity used |
| 206 | +to produce it. |
| 207 | + |
| 208 | +Write the description for a quality-conscious engineer who did not participate |
| 209 | +in creating the change. Explain: |
| 210 | + |
| 211 | +- why the change is needed; |
| 212 | +- what the code does now; |
| 213 | +- important design decisions and preserved invariants; |
| 214 | +- tradeoffs and known limitations; and |
| 215 | +- where reviewer attention is most valuable. |
| 216 | + |
| 217 | +Do not require reviewers to reconstruct the rationale from the diff, an agent |
| 218 | +transcript, temporary plans, or task and review identifiers. Do not add a test |
| 219 | +plan or verification checklist to the pull request description; CI reports the |
| 220 | +standard checks directly. |
| 221 | + |
| 222 | +## What happens in review |
| 223 | + |
| 224 | +Opening a pull request triggers an automatic whole-branch roborev review of its |
| 225 | +current head. `roborev-ci[bot]` posts the synthesized result as a pull request |
| 226 | +comment, usually within several minutes. Queue and reviewer availability can |
| 227 | +make it take longer. Pushing new commits triggers a fresh review of the new |
| 228 | +head, and each result identifies the commit it reviewed. |
| 229 | + |
| 230 | +Treat the comment like other review feedback. Fix valid findings in follow-up |
| 231 | +commits. When a finding is inapplicable, explain the engineering rationale in |
| 232 | +the pull request conversation so maintainers can evaluate it. |
| 233 | + |
| 234 | +Automated review complements human judgment; it does not make the merge |
| 235 | +decision. Maintainers evaluate the change, the review findings, and the |
| 236 | +contributor's responses together. |
0 commit comments