argus-code-review 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- argus_code_review-0.1.0/.gitignore +14 -0
- argus_code_review-0.1.0/CHANGELOG.md +26 -0
- argus_code_review-0.1.0/LICENSE +193 -0
- argus_code_review-0.1.0/PKG-INFO +405 -0
- argus_code_review-0.1.0/README.md +364 -0
- argus_code_review-0.1.0/argus/__init__.py +1 -0
- argus_code_review-0.1.0/argus/cli.py +673 -0
- argus_code_review-0.1.0/argus/config.py +102 -0
- argus_code_review-0.1.0/argus/coverage.py +11 -0
- argus_code_review-0.1.0/argus/dotenv_utils.py +88 -0
- argus_code_review-0.1.0/argus/github_client.py +1006 -0
- argus_code_review-0.1.0/argus/graph.py +2788 -0
- argus_code_review-0.1.0/argus/helpers.py +143 -0
- argus_code_review-0.1.0/argus/llm/models.py +126 -0
- argus_code_review-0.1.0/argus/llm/output_models.py +492 -0
- argus_code_review-0.1.0/argus/models.py +197 -0
- argus_code_review-0.1.0/argus/openai_client.py +286 -0
- argus_code_review-0.1.0/argus/pipeline_models.py +291 -0
- argus_code_review-0.1.0/argus/prompts/__init__.py +8 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-blocking-validator.md +53 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-coverage-check.md +15 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-cross-cutting.md +78 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-feedback-verifier.md +31 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-lite.md +50 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-planner.md +193 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-preflight-router.md +24 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-prior-art.md +25 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-specialist-deployment.md +52 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-specialist-frontend.md +90 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-specialist-infra.md +33 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-specialist-llm-patterns.md +53 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-specialist-observability.md +47 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-specialist-orchestration.md +62 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-specialist-security.md +41 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-specialist-slackbot.md +47 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-specialist-sql.md +34 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-subagent.md +120 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-tests-and-docs.md +34 -0
- argus_code_review-0.1.0/argus/prompts/pr-review-writer.md +268 -0
- argus_code_review-0.1.0/argus/prompts_runtime.py +237 -0
- argus_code_review-0.1.0/argus/repo_provision.py +445 -0
- argus_code_review-0.1.0/argus/runners.py +1136 -0
- argus_code_review-0.1.0/argus/storage/__init__.py +51 -0
- argus_code_review-0.1.0/argus/storage/http.py +243 -0
- argus_code_review-0.1.0/argus/storage/models.py +115 -0
- argus_code_review-0.1.0/argus/storage/resolver.py +379 -0
- argus_code_review-0.1.0/argus/storage/session.py +73 -0
- argus_code_review-0.1.0/argus/storage/sql.py +488 -0
- argus_code_review-0.1.0/argus/storage/sqlite.py +588 -0
- argus_code_review-0.1.0/pyproject.toml +163 -0
- argus_code_review-0.1.0/schema/008_add_code_reviews.sql +41 -0
- argus_code_review-0.1.0/schema/009_add_reviewer_version.sql +4 -0
- argus_code_review-0.1.0/schema/010_add_review_patterns.sql +34 -0
- argus_code_review-0.1.0/schema/011_add_review_progress_columns.sql +51 -0
- argus_code_review-0.1.0/schema/015_create_agent_runs.sql +61 -0
- argus_code_review-0.1.0/tests/__init__.py +0 -0
- argus_code_review-0.1.0/tests/conftest.py +86 -0
- argus_code_review-0.1.0/tests/golden/review_response.schema.json +323 -0
- argus_code_review-0.1.0/tests/storage/__init__.py +0 -0
- argus_code_review-0.1.0/tests/storage/test_backend_contract.py +567 -0
- argus_code_review-0.1.0/tests/storage/test_http.py +251 -0
- argus_code_review-0.1.0/tests/storage/test_models.py +87 -0
- argus_code_review-0.1.0/tests/storage/test_resolver.py +239 -0
- argus_code_review-0.1.0/tests/storage/test_session.py +70 -0
- argus_code_review-0.1.0/tests/storage/test_sql.py +410 -0
- argus_code_review-0.1.0/tests/storage/test_sqlite_backend.py +332 -0
- argus_code_review-0.1.0/tests/test_argus_review_local.py +185 -0
- argus_code_review-0.1.0/tests/test_catchup_gate.py +340 -0
- argus_code_review-0.1.0/tests/test_cli_args.py +176 -0
- argus_code_review-0.1.0/tests/test_cli_output_contract.py +199 -0
- argus_code_review-0.1.0/tests/test_cli_post_review.py +111 -0
- argus_code_review-0.1.0/tests/test_cli_preflight.py +140 -0
- argus_code_review-0.1.0/tests/test_cli_prompts.py +176 -0
- argus_code_review-0.1.0/tests/test_config.py +140 -0
- argus_code_review-0.1.0/tests/test_github_client_write.py +232 -0
- argus_code_review-0.1.0/tests/test_graph_fetch_diff.py +228 -0
- argus_code_review-0.1.0/tests/test_graph_http_guards.py +52 -0
- argus_code_review-0.1.0/tests/test_graph_preflight_image_bump.py +272 -0
- argus_code_review-0.1.0/tests/test_graph_progress.py +829 -0
- argus_code_review-0.1.0/tests/test_graph_storage_resolution.py +231 -0
- argus_code_review-0.1.0/tests/test_graph_timeout_surfacing.py +124 -0
- argus_code_review-0.1.0/tests/test_models.py +82 -0
- argus_code_review-0.1.0/tests/test_multi_round.py +1315 -0
- argus_code_review-0.1.0/tests/test_packaging.py +163 -0
- argus_code_review-0.1.0/tests/test_plan_review.py +362 -0
- argus_code_review-0.1.0/tests/test_prompts.py +339 -0
- argus_code_review-0.1.0/tests/test_repo_provision.py +830 -0
- argus_code_review-0.1.0/tests/test_review_patterns_integration.py +185 -0
- argus_code_review-0.1.0/tests/test_runners_context7.py +99 -0
- argus_code_review-0.1.0/tests/test_runners_helpers.py +279 -0
- argus_code_review-0.1.0/tests/test_runners_new.py +771 -0
- argus_code_review-0.1.0/tests/test_specialist_validation.py +135 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2026-07-24
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Initial public release of Argus: a self-orchestrated PR review agent
|
|
15
|
+
using LangGraph + the Claude Agent SDK.
|
|
16
|
+
- Three storage backends for round history and pipeline checkpoints:
|
|
17
|
+
local SQLite (zero-config default), Postgres, and an HTTP shim for
|
|
18
|
+
sandboxed environments.
|
|
19
|
+
- A prompt override search chain (`ARGUS_PROMPTS_DIR` →
|
|
20
|
+
`./.argus/prompts/` → `~/.config/argus/prompts/` → packaged prompts),
|
|
21
|
+
plus `ARGUS_NO_PROMPT_OVERRIDES`/`--no-prompt-overrides` to force the
|
|
22
|
+
packaged set.
|
|
23
|
+
- `argus --version`, `argus prompts list`, and `argus prompts export`.
|
|
24
|
+
|
|
25
|
+
[Unreleased]: https://github.com/redesignhealth/argus-review/compare/v0.1.0...HEAD
|
|
26
|
+
[0.1.0]: https://github.com/redesignhealth/argus-review/commits/v0.1.0
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the
|
|
44
|
+
purposes of this License, Derivative Works shall not include works
|
|
45
|
+
that remain separable from, or merely link (or bind by name) to the
|
|
46
|
+
interfaces of, the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including the
|
|
49
|
+
original version of the Work and any modifications or additions to
|
|
50
|
+
that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright
|
|
52
|
+
owner or by an individual or Legal Entity authorized to submit on
|
|
53
|
+
behalf of the copyright owner. For the purposes of this definition,
|
|
54
|
+
"submitted" means any form of electronic, verbal, or written
|
|
55
|
+
communication sent to the Licensor or its representatives, including
|
|
56
|
+
but not limited to communication on electronic mailing lists, source
|
|
57
|
+
code control systems, and issue tracking systems that are managed by,
|
|
58
|
+
or on behalf of, the Licensor for the purpose of discussing and
|
|
59
|
+
improving the Work, but excluding communication that is conspicuously
|
|
60
|
+
marked or otherwise designated in writing by the copyright owner as
|
|
61
|
+
"Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have
|
|
78
|
+
made, use, offer to sell, sell, import, and otherwise transfer the
|
|
79
|
+
Work, where such license applies only to those patent claims
|
|
80
|
+
licensable by such Contributor that are necessarily infringed by
|
|
81
|
+
their Contribution(s) alone or by combination of their
|
|
82
|
+
Contribution(s) with the Work to which such Contribution(s) was
|
|
83
|
+
submitted. If You institute patent litigation against any entity
|
|
84
|
+
(including a cross-claim or counterclaim in a lawsuit) alleging
|
|
85
|
+
that the Work or a Contribution incorporated within the Work
|
|
86
|
+
constitutes direct or contributory patent infringement, then any
|
|
87
|
+
patent licenses granted to You under this License for that Work
|
|
88
|
+
shall terminate as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the Work
|
|
91
|
+
or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
96
|
+
Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and do
|
|
118
|
+
not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing
|
|
142
|
+
the origin of the Work and reproducing the content of the NOTICE
|
|
143
|
+
file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed
|
|
146
|
+
to in writing, Licensor provides the Work (and each Contributor
|
|
147
|
+
provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES
|
|
148
|
+
OR CONDITIONS OF ANY KIND, either express or implied, including,
|
|
149
|
+
without limitation, any warranties or conditions of TITLE,
|
|
150
|
+
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
|
|
151
|
+
PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this
|
|
154
|
+
License.
|
|
155
|
+
|
|
156
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
157
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
158
|
+
unless required by applicable law (such as deliberate and grossly
|
|
159
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
160
|
+
liable to You for damages, including any direct, indirect, special,
|
|
161
|
+
incidental, or consequential damages of any character arising as a
|
|
162
|
+
result of this License or out of the use or inability to use the
|
|
163
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
164
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
165
|
+
other commercial damages or losses), even if such Contributor has
|
|
166
|
+
been advised of the possibility of such damages.
|
|
167
|
+
|
|
168
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
169
|
+
the Work or Derivative Works thereof, You may choose to offer, and
|
|
170
|
+
charge a fee for, acceptance of support, warranty, indemnity, or
|
|
171
|
+
other liability obligations and/or rights consistent with this
|
|
172
|
+
License. However, in accepting such obligations, You may act only
|
|
173
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
174
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
175
|
+
defend, and hold each Contributor harmless for any liability
|
|
176
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
177
|
+
of your accepting any such warranty or additional liability.
|
|
178
|
+
|
|
179
|
+
END OF TERMS AND CONDITIONS
|
|
180
|
+
|
|
181
|
+
Copyright 2026 Redesign Health
|
|
182
|
+
|
|
183
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
184
|
+
you may not use this file except in compliance with the License.
|
|
185
|
+
You may obtain a copy of the License at
|
|
186
|
+
|
|
187
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
188
|
+
|
|
189
|
+
Unless required by applicable law or agreed to in writing, software
|
|
190
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
191
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
192
|
+
implied. See the License for the specific language governing
|
|
193
|
+
permissions and limitations under the License.
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: argus-code-review
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Self-orchestrated PR review agent using LangGraph + Claude Agent SDK
|
|
5
|
+
Project-URL: Repository, https://github.com/redesignhealth/argus-review
|
|
6
|
+
Project-URL: Issues, https://github.com/redesignhealth/argus-review/issues
|
|
7
|
+
Project-URL: Changelog, https://github.com/redesignhealth/argus-review/blob/main/CHANGELOG.md
|
|
8
|
+
Author: Redesign Health
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
17
|
+
Requires-Python: <3.14,>=3.12
|
|
18
|
+
Requires-Dist: asyncpg>=0.29.0
|
|
19
|
+
Requires-Dist: claude-agent-sdk==0.1.81
|
|
20
|
+
Requires-Dist: httpx>=0.27.0
|
|
21
|
+
Requires-Dist: langchain-anthropic>=1.2.0
|
|
22
|
+
Requires-Dist: langchain<2,>=1.2.10
|
|
23
|
+
Requires-Dist: langgraph-checkpoint-postgres>=2.0.0
|
|
24
|
+
Requires-Dist: langgraph-checkpoint-sqlite>=2.0.0
|
|
25
|
+
Requires-Dist: langgraph<2,>=1.0.10
|
|
26
|
+
Requires-Dist: langsmith<1,>=0.2.0
|
|
27
|
+
Requires-Dist: openai>=1.50.0
|
|
28
|
+
Requires-Dist: psycopg-pool>=3.2.0
|
|
29
|
+
Requires-Dist: psycopg[binary]>=3.2.0
|
|
30
|
+
Requires-Dist: pydantic-settings>=2.0.0
|
|
31
|
+
Requires-Dist: pydantic>=2.0.0
|
|
32
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
33
|
+
Requires-Dist: sqlalchemy[asyncio]>=2.0.0
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: mypy>=1.10.0; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest-asyncio<=0.21.2; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest-httpx>=0.30.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
39
|
+
Requires-Dist: ruff>=0.8.0; extra == 'dev'
|
|
40
|
+
Description-Content-Type: text/markdown
|
|
41
|
+
|
|
42
|
+
# Argus Review
|
|
43
|
+
|
|
44
|
+
**Argus is an open-source code review tool built by
|
|
45
|
+
[Redesign Health](https://www.redesignhealth.com).**
|
|
46
|
+
|
|
47
|
+
It reviews pull requests by decomposing each change into the flows it
|
|
48
|
+
participates in, dispatching repository-aware specialist agents in parallel
|
|
49
|
+
against those flows, validating findings before surfacing them, and
|
|
50
|
+
persisting every round so later rounds can check what was resolved,
|
|
51
|
+
regressed, or still open instead of re-reviewing from scratch. The
|
|
52
|
+
architecture borrows from the same ideas now showing up in the broader
|
|
53
|
+
agentic-harness conversation: stochastic and deterministic hooks composed
|
|
54
|
+
deliberately, just-in-time context retrieval, structured outputs, and
|
|
55
|
+
explicit coverage accounting.
|
|
56
|
+
|
|
57
|
+
For the design principles and production results behind Argus, see the
|
|
58
|
+
[agentic code review harness write-up](https://www.redesignhealth.com/content/agentic-code-review-harness)
|
|
59
|
+
on our site.
|
|
60
|
+
|
|
61
|
+
The prompts Argus ships with are opinionated — they encode one team's
|
|
62
|
+
production coding standards, not a neutral default. Expect to adapt them
|
|
63
|
+
to your own codebase and conventions (see
|
|
64
|
+
[Adapting Argus to your team](#adapting-argus-to-your-team)) rather than
|
|
65
|
+
running them unmodified.
|
|
66
|
+
|
|
67
|
+
> ### Cost Responsibility
|
|
68
|
+
>
|
|
69
|
+
> Argus makes API calls to third-party services (Anthropic, OpenAI, and
|
|
70
|
+
> optionally GitHub) using your API keys. You are solely responsible for
|
|
71
|
+
> all token consumption and associated costs incurred by running Argus.
|
|
72
|
+
> Costs vary significantly depending on PR size, repository complexity,
|
|
73
|
+
> and configuration — in production use, a single review may cost anywhere
|
|
74
|
+
> from approximately $2 to $42 or more in API fees. Redesign Health does
|
|
75
|
+
> not monitor, limit, or reimburse these costs. By using Argus, you
|
|
76
|
+
> acknowledge that you bear full financial responsibility for any and all
|
|
77
|
+
> API charges incurred through your credentials.
|
|
78
|
+
>
|
|
79
|
+
> ### No Warranty; Limitation of Liability
|
|
80
|
+
>
|
|
81
|
+
> Argus is provided "AS IS" and "AS AVAILABLE," without warranty of any
|
|
82
|
+
> kind, express or implied, including but not limited to the warranties of
|
|
83
|
+
> merchantability, fitness for a particular purpose, accuracy, or
|
|
84
|
+
> non-infringement. Redesign Health Inc. makes no representation or
|
|
85
|
+
> warranty that Argus will be error-free, uninterrupted, secure, or free of
|
|
86
|
+
> bugs or defects.
|
|
87
|
+
>
|
|
88
|
+
> To the fullest extent permitted by applicable law, in no event shall
|
|
89
|
+
> Redesign Health Inc., its affiliates, officers, directors, employees, or
|
|
90
|
+
> agents be liable for any indirect, incidental, special, consequential, or
|
|
91
|
+
> punitive damages, or any loss of profits, data, use, or goodwill, arising
|
|
92
|
+
> out of or in connection with your use of or inability to use Argus,
|
|
93
|
+
> regardless of the theory of liability (contract, tort, strict liability,
|
|
94
|
+
> or otherwise), even if advised of the possibility of such damages.
|
|
95
|
+
>
|
|
96
|
+
> Your use of Argus is at your sole risk. This tool performs automated code
|
|
97
|
+
> review and may produce inaccurate, incomplete, or misleading findings. It
|
|
98
|
+
> is not a substitute for human code review, security auditing, or
|
|
99
|
+
> professional judgment. You are solely responsible for any decisions made
|
|
100
|
+
> or actions taken based on Argus's output.
|
|
101
|
+
>
|
|
102
|
+
> For the full license terms, see the [Apache License 2.0](LICENSE)
|
|
103
|
+
> included in the repository.
|
|
104
|
+
|
|
105
|
+
- [Cost Responsibility](#cost-responsibility)
|
|
106
|
+
- [No Warranty; Limitation of Liability](#no-warranty-limitation-of-liability)
|
|
107
|
+
- [How it works](#how-it-works)
|
|
108
|
+
- [Getting started](#getting-started)
|
|
109
|
+
- [Using Argus](#using-argus)
|
|
110
|
+
- [Managing secrets](#managing-secrets)
|
|
111
|
+
- [Connecting a database](#connecting-a-database)
|
|
112
|
+
- [Adapting Argus to your team](#adapting-argus-to-your-team)
|
|
113
|
+
- [Measured results](#measured-results)
|
|
114
|
+
- [Docs](#docs)
|
|
115
|
+
|
|
116
|
+
## How it works
|
|
117
|
+
|
|
118
|
+
A pull request goes in. Argus's planner groups the changed files into
|
|
119
|
+
"system groups" (roughly: one per feature area touched), assigns specialist
|
|
120
|
+
co-reviewers where the file patterns warrant it (security, SQL, infra, ...),
|
|
121
|
+
and flags anything that needs a cross-file pass. Each group and specialist
|
|
122
|
+
then runs as its own Claude Agent SDK session — with `Read`/`Glob`/`Grep`
|
|
123
|
+
tools against a SHA-pinned local git worktree, not a shared context window
|
|
124
|
+
— in parallel. A coverage check verifies every changed file got reviewed by
|
|
125
|
+
someone (gaps get a targeted follow-up pass), and a final writer step
|
|
126
|
+
consolidates every finding into one review with a verdict and severity
|
|
127
|
+
tags.
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
fetch_diff → plan → [system reviewers ‖ specialists ‖ cross-cutting] (parallel)
|
|
131
|
+
→ check_coverage → (fill_gaps if needed) → write_review → persist
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Full design rationale is in [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md).
|
|
135
|
+
|
|
136
|
+
## Getting started
|
|
137
|
+
|
|
138
|
+
**Prerequisites:**
|
|
139
|
+
|
|
140
|
+
- `git`
|
|
141
|
+
- Python 3.12+
|
|
142
|
+
- The [`claude` CLI](https://docs.claude.com/en/docs/claude-code) (Node.js) —
|
|
143
|
+
the Claude Agent SDK spawns it as a subprocess for every reviewer session
|
|
144
|
+
- Three API keys — see [Managing secrets](#managing-secrets)
|
|
145
|
+
|
|
146
|
+
**Run:**
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
export ANTHROPIC_API_KEY=...
|
|
150
|
+
export GITHUB_TOKEN_RO=...
|
|
151
|
+
export OPENAI_API_KEY=...
|
|
152
|
+
|
|
153
|
+
uvx argus-code-review review owner/repo --pr 123
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Prefer a `.env` file over exporting in your shell? Copy
|
|
157
|
+
[`.env.example`](.env.example) to `.env`, fill in the three keys above, and
|
|
158
|
+
Argus picks it up automatically (see [Managing secrets](#managing-secrets)).
|
|
159
|
+
|
|
160
|
+
That's it for a first run. With no other configuration, Argus stores round
|
|
161
|
+
history and pipeline checkpoints in a local SQLite database at
|
|
162
|
+
`~/.local/share/argus/history.db` — nothing else to set up.
|
|
163
|
+
|
|
164
|
+
`uvx argus-code-review ...` downloads the `argus-code-review` package into a
|
|
165
|
+
throwaway environment and runs its `argus` console script for you — that's
|
|
166
|
+
why the command above starts with `review`, not `argus review`. If you'll
|
|
167
|
+
be running Argus repeatedly, install it once instead of re-resolving it
|
|
168
|
+
every invocation:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
uv tool install argus-code-review
|
|
172
|
+
argus review owner/repo --pr 123
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Using Argus
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# Review an open PR
|
|
179
|
+
argus review owner/repo --pr 123
|
|
180
|
+
|
|
181
|
+
# Review a specific commit against a base ref (no open PR required)
|
|
182
|
+
argus review owner/repo --sha abc123 --base-ref main
|
|
183
|
+
|
|
184
|
+
# Write markdown + JSON output
|
|
185
|
+
argus review owner/repo --pr 123 -o review.md
|
|
186
|
+
|
|
187
|
+
# Publish the review as a PR comment (upserts on re-run) and set a commit status
|
|
188
|
+
argus review owner/repo --pr 123 --post --commit-status
|
|
189
|
+
|
|
190
|
+
# Dismiss a finding before the next round
|
|
191
|
+
argus review owner/repo --pr 123 --dismiss "B2 -- pre-existing, not from this PR"
|
|
192
|
+
|
|
193
|
+
# Inspect and export the packaged prompts
|
|
194
|
+
argus prompts list
|
|
195
|
+
argus prompts export ./my-prompts
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**What you get back:**
|
|
199
|
+
|
|
200
|
+
- A formatted review comment (Markdown) with a verdict (`APPROVE` /
|
|
201
|
+
`BLOCKING`), a risk level, and findings tagged `B1`, `B2`, ... (blocking)
|
|
202
|
+
or `S1`, `S2`, ... (suggestion).
|
|
203
|
+
- `-o review.md` writes that Markdown to a file, plus a sibling `review.json`
|
|
204
|
+
with the full structured response.
|
|
205
|
+
- Re-running against the same PR (same `owner/repo` + `--pr`) picks up the
|
|
206
|
+
prior round from storage automatically: round 2+ verifies whether
|
|
207
|
+
previously reported findings were resolved, regressed, or are still open,
|
|
208
|
+
scoped to just the commits since the last review — not a full re-review.
|
|
209
|
+
|
|
210
|
+
## Managing secrets
|
|
211
|
+
|
|
212
|
+
Argus reads configuration from environment variables, or from a `.env` file
|
|
213
|
+
in the working directory (add it to `.gitignore` — never commit it).
|
|
214
|
+
[`.env.example`](.env.example) lists every variable Argus reads, required
|
|
215
|
+
and optional, with comments — copy it to `.env` and fill in what you need.
|
|
216
|
+
|
|
217
|
+
Three keys are required for a first run:
|
|
218
|
+
|
|
219
|
+
| Env var | Used for |
|
|
220
|
+
|---|---|
|
|
221
|
+
| `ANTHROPIC_API_KEY` | The Claude Agent SDK reviewer sessions and the planner/coverage/writer calls |
|
|
222
|
+
| `GITHUB_TOKEN_RO` | Fetching the PR diff and cloning the repo into the review worktree |
|
|
223
|
+
| `OPENAI_API_KEY` | Structured extraction of the final review (see the note in [Getting started](#getting-started)) |
|
|
224
|
+
|
|
225
|
+
`GITHUB_TOKEN_RO` needs read-only access: *Contents: read* + *Pull
|
|
226
|
+
requests: read* on a fine-grained PAT, or `repo` read on a classic one.
|
|
227
|
+
|
|
228
|
+
How you *get* these values into the environment is up to your setup —
|
|
229
|
+
export them in your shell, load them from a secrets manager in CI, or use
|
|
230
|
+
a `.env` file locally. Argus itself has no opinion and no cloud dependency
|
|
231
|
+
for secrets; it just reads `os.environ`.
|
|
232
|
+
|
|
233
|
+
The full configuration surface (storage URLs, prompt overrides, tracing,
|
|
234
|
+
etc.) is documented where each feature is introduced below, and summarized
|
|
235
|
+
in [`docs/STORAGE.md`](docs/STORAGE.md) for storage-specific variables.
|
|
236
|
+
|
|
237
|
+
## Connecting a database
|
|
238
|
+
|
|
239
|
+
Argus needs somewhere to keep **round history** (so re-reviewing a PR knows
|
|
240
|
+
what was already found) and **pipeline checkpoints** (so a crash mid-run
|
|
241
|
+
can resume). Three modes are supported, resolved automatically from which
|
|
242
|
+
environment variables are set — there's no `--backend` flag.
|
|
243
|
+
|
|
244
|
+
### Recipe: local, zero-config (default)
|
|
245
|
+
|
|
246
|
+
Set nothing. Both round history and checkpoints land in a local SQLite file
|
|
247
|
+
at `~/.local/share/argus/history.db` (created automatically on first run).
|
|
248
|
+
Good for solo use and for trying Argus out — this is what the quickstart
|
|
249
|
+
above uses.
|
|
250
|
+
|
|
251
|
+
### Recipe: shared Postgres, e.g. Supabase
|
|
252
|
+
|
|
253
|
+
Use this to share round history across a team or CI. Any Postgres works;
|
|
254
|
+
Supabase is a common zero-ops choice.
|
|
255
|
+
|
|
256
|
+
1. Create a Supabase project (or use an existing one), then grab its
|
|
257
|
+
**pooler** connection string (Project Settings → Database → Connection
|
|
258
|
+
string → "Transaction" pooling mode, port `6543`) — the pooler is what
|
|
259
|
+
you want for a short-lived CLI process like Argus, not the direct
|
|
260
|
+
connection on port `5432`.
|
|
261
|
+
2. Apply the schema, in order:
|
|
262
|
+
```bash
|
|
263
|
+
psql "$SUPABASE_DB_URL" -f schema/008_add_code_reviews.sql
|
|
264
|
+
psql "$SUPABASE_DB_URL" -f schema/009_add_reviewer_version.sql
|
|
265
|
+
psql "$SUPABASE_DB_URL" -f schema/010_add_review_patterns.sql
|
|
266
|
+
psql "$SUPABASE_DB_URL" -f schema/011_add_review_progress_columns.sql
|
|
267
|
+
psql "$SUPABASE_DB_URL" -f schema/015_create_agent_runs.sql
|
|
268
|
+
```
|
|
269
|
+
The gaps in that numbering (no `001`-`007` or `012`-`014`) aren't missing
|
|
270
|
+
files — these five are self-contained extracts from a longer internal
|
|
271
|
+
migration series, and `008` creates the schema from scratch, so nothing
|
|
272
|
+
earlier is required. Apply exactly the five files above, in order, and
|
|
273
|
+
you have the complete schema.
|
|
274
|
+
3. Set the connection string and run Argus as usual — that one variable
|
|
275
|
+
switches both round history and checkpointing to Postgres:
|
|
276
|
+
```bash
|
|
277
|
+
export SUPABASE_DB_URL="postgresql://postgres.xxxx:pass@aws-0-region.pooler.supabase.com:6543/postgres"
|
|
278
|
+
argus review owner/repo --pr 123
|
|
279
|
+
```
|
|
280
|
+
(`SUPABASE_DB_URL` is accepted as an alias for `ARGUS_DB_URL` — if you're
|
|
281
|
+
pointing at a non-Supabase Postgres instance, use `ARGUS_DB_URL` instead;
|
|
282
|
+
they're equivalent, and if both are set `ARGUS_DB_URL` wins.)
|
|
283
|
+
|
|
284
|
+
### Recipe: HTTP storage backend
|
|
285
|
+
|
|
286
|
+
For environments that can reach HTTPS but not a raw Postgres port (e.g. a
|
|
287
|
+
sandboxed agent runtime with egress restricted to port 443), or for teams
|
|
288
|
+
that don't want to expose their database directly to wherever Argus runs:
|
|
289
|
+
route storage through your own HTTP API with `ARGUS_STORAGE_READ_URL` /
|
|
290
|
+
`ARGUS_STORAGE_WRITE_URL` (optionally `ARGUS_STORAGE_AUTH` for a bearer
|
|
291
|
+
token your service checks). The full two-endpoint contract — everything
|
|
292
|
+
you need to implement a compatible backend service — and mode-resolution
|
|
293
|
+
details are in [`docs/STORAGE.md`](docs/STORAGE.md).
|
|
294
|
+
|
|
295
|
+
## Adapting Argus to your team
|
|
296
|
+
|
|
297
|
+
Argus ships with a full set of production review prompts — 20 files, one
|
|
298
|
+
per reviewer role — rather than a thin default. Adapting them to your team
|
|
299
|
+
is the main lever for making Argus *yours*.
|
|
300
|
+
|
|
301
|
+
### Editing what Argus looks for
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
argus prompts export ~/.config/argus/prompts # copy the packaged prompts out
|
|
305
|
+
$EDITOR ~/.config/argus/prompts/pr-review-subagent.md
|
|
306
|
+
argus review owner/repo --pr 123 # no env var needed — it's already found
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
That's the standing-customization path: an explicit `ARGUS_PROMPTS_DIR` (if
|
|
310
|
+
you need one), then a repo-local `./.argus/prompts/`, then
|
|
311
|
+
`~/.config/argus/prompts/`, are all checked automatically, highest priority
|
|
312
|
+
first — see
|
|
313
|
+
[`docs/CUSTOMIZING_PROMPTS.md`](docs/CUSTOMIZING_PROMPTS.md#recipe-exporting-editing-and-using-your-own-prompts)
|
|
314
|
+
for the full resolution chain and a `--no-prompt-overrides` escape hatch.
|
|
315
|
+
|
|
316
|
+
Any file you don't touch keeps loading from the package, so adapt
|
|
317
|
+
incrementally. Each prompt mixes two kinds of content — pull them apart as
|
|
318
|
+
you edit:
|
|
319
|
+
|
|
320
|
+
- **Transferable methodology** — silent-fallback detection, stub
|
|
321
|
+
completeness, loud-failure-over-silent-failure philosophy, coverage
|
|
322
|
+
mechanics, the severity rubric. This is *why* the reviewer is effective;
|
|
323
|
+
keep it unless you have a specific reason not to.
|
|
324
|
+
- **House conventions from wherever the prompts were tuned** — references to
|
|
325
|
+
specific shared libraries, a particular lint-config or `.cursorrules`-like
|
|
326
|
+
compliance check, a specific secrets-manager's path conventions, a
|
|
327
|
+
specific orchestration/LLM framework stack. This is the part that should
|
|
328
|
+
become *your* team's equivalent — your shared libraries, your lint rules,
|
|
329
|
+
your infra stack, the failure modes your codebase actually has.
|
|
330
|
+
|
|
331
|
+
Start with `pr-review-subagent.md` (the core reviewer prompt) since it has
|
|
332
|
+
the most coding-standards content per line. Leave the pipeline-mechanics
|
|
333
|
+
prompts (planner, coverage-check, writer) alone until you have evidence
|
|
334
|
+
they need to change — they shape *how* the pipeline runs, not *what* it
|
|
335
|
+
looks for. To evaluate any change, re-run the same PR before and after and
|
|
336
|
+
diff the findings. Full prompt-by-prompt anatomy:
|
|
337
|
+
[`docs/CUSTOMIZING_PROMPTS.md`](docs/CUSTOMIZING_PROMPTS.md).
|
|
338
|
+
|
|
339
|
+
### Adding a new specialist reviewer
|
|
340
|
+
|
|
341
|
+
Nine specialists ship today (security, SQL, infra, orchestration, frontend,
|
|
342
|
+
Slackbot integrations, deployment, LLM patterns, observability), assigned
|
|
343
|
+
by the planner based on which files a group touches. Editing an *existing*
|
|
344
|
+
specialist's prompt is just editing a file, as above.
|
|
345
|
+
|
|
346
|
+
Adding an **entirely new** specialist currently requires a small code
|
|
347
|
+
change, not just a new prompt file: the specialist name has to be added to
|
|
348
|
+
the `SpecialistName` type and the prompt-name mapping in `argus/runners.py`
|
|
349
|
+
(a couple of lines each), so the planner's structured output can validate
|
|
350
|
+
against it. This is a known rough edge — making the specialist roster
|
|
351
|
+
fully prompt-file-driven (drop a file in a `specialists/` folder, get a new
|
|
352
|
+
specialist, no code change) is tracked as a planned improvement. Check the
|
|
353
|
+
repo's issue tracker for its status before assuming you need to fork.
|
|
354
|
+
|
|
355
|
+
## Measured results
|
|
356
|
+
|
|
357
|
+
Argus's pipeline has gone through three iterations (v1/v2/v3 in its
|
|
358
|
+
internal history; v3 is what ships here). Measured across 22 real PRs:
|
|
359
|
+
|
|
360
|
+
| Metric | v1 (round 1) | v1 (all rounds) | v2 | **v3 (this engine)** |
|
|
361
|
+
|---|---|---|---|---|
|
|
362
|
+
| Avg blocking findings / PR | 1.6 | 4.1 | 2.7 | **5.0** |
|
|
363
|
+
| Single pass? | Yes | No (2-4 rounds) | Yes | **Yes** |
|
|
364
|
+
| Tracked cost / review | ~$0.75 | ~$2.25 | $2.93 | **$0.30*** |
|
|
365
|
+
| Time / review | ~5 min | ~20 min | 8.5 min | **9.6 min** |
|
|
366
|
+
| APPROVE rate | N/A | N/A | 0% | **4.5% (1/22)** |
|
|
367
|
+
|
|
368
|
+
\* This early tracked-cost figure covered only the planner + writer LLM
|
|
369
|
+
calls, not the Agent SDK subagent sessions that do most of the work — true
|
|
370
|
+
cost per review in that same 22-PR set is closer to $2-4, and larger
|
|
371
|
+
production samples put it at $6-42 depending on PR size. Full methodology:
|
|
372
|
+
see the [write-up](https://www.redesignhealth.com/content/agentic-code-review-harness).
|
|
373
|
+
|
|
374
|
+
## Docs
|
|
375
|
+
|
|
376
|
+
- [`docs/CUSTOMIZING_PROMPTS.md`](docs/CUSTOMIZING_PROMPTS.md) — full
|
|
377
|
+
prompt-by-prompt anatomy for adapting Argus to your team.
|
|
378
|
+
- [`docs/STORAGE.md`](docs/STORAGE.md) — storage modes, schema, and the HTTP
|
|
379
|
+
contract for self-hosters.
|
|
380
|
+
- [`docs/BUILDING_A_REVIEW_LOOP.md`](docs/BUILDING_A_REVIEW_LOOP.md) — how to
|
|
381
|
+
wrap Argus in a review → fix → re-review automation loop gated on CI.
|
|
382
|
+
- [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) — the pipeline design and
|
|
383
|
+
why it looks the way it does.
|
|
384
|
+
- [`docs/RELEASING.md`](docs/RELEASING.md) — how releases are cut, for
|
|
385
|
+
contributors.
|
|
386
|
+
- [Agentic code review harness write-up](https://www.redesignhealth.com/content/agentic-code-review-harness) —
|
|
387
|
+
design principles, production results, and a worked example of a full
|
|
388
|
+
review round.
|
|
389
|
+
|
|
390
|
+
## Contributing
|
|
391
|
+
|
|
392
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for dev setup and PR expectations,
|
|
393
|
+
[SECURITY.md](SECURITY.md) to report a vulnerability,
|
|
394
|
+
[CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) for community standards, and
|
|
395
|
+
[CHANGELOG.md](CHANGELOG.md) for a history of notable changes.
|
|
396
|
+
|
|
397
|
+
## License
|
|
398
|
+
|
|
399
|
+
[Apache License 2.0](LICENSE).
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
Built by [Redesign Health](https://www.redesignhealth.com). Named by Nathan
|
|
404
|
+
Marinoff, after [Argus](https://en.wikipedia.org/wiki/Argus_Panoptes), the
|
|
405
|
+
many-eyed giant of Greek mythology.
|