Skip to content

Commit 2ec1609

Browse files
committed
chore: add reviewfixer configs
Change-Id: I4caa6d010f8f824aff1c38a7a73d08d47b400cce Signed-off-by: Thomas Kosiewski <tk@coder.com>
1 parent 432121f commit 2ec1609

2 files changed

Lines changed: 331 additions & 0 deletions

File tree

reviewfixer.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# yaml-language-server: $schema=./scripts/reviewfixer.schema.json
2+
# Config for running reviewfixer against the Claude ACP adapter.
3+
#
4+
# Prerequisites:
5+
# - `node` and `npm`/`npx` available on PATH
6+
# - `ANTHROPIC_API_KEY` exported in the shell that launches reviewfixer
7+
#
8+
# Usage:
9+
# reviewfixer validate --config ./reviewfixer.yaml
10+
# reviewfixer --config ./reviewfixer.yaml
11+
# reviewfixer run --config ./reviewfixer.yaml
12+
#
13+
# If you install the adapter globally instead of using `npx`, you can replace:
14+
# command: npx
15+
# args: ["-y", "@agentclientprotocol/claude-agent-acp"]
16+
# with:
17+
# command: claude-agent-acp
18+
19+
runtime:
20+
kind: acp
21+
compact_on_resume: true
22+
acp:
23+
command: npx
24+
args:
25+
- -y
26+
- "@agentclientprotocol/claude-agent-acp"
27+
28+
review:
29+
request:
30+
- mode: comment
31+
comment: "/coder-agents-review"

scripts/reviewfixer.schema.json

Lines changed: 300 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,300 @@
1+
{
2+
"$id": "https://raw.githubusercontent.com/thomask33/reviewfixer/main/reviewfixer.schema.json",
3+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4+
"title": "reviewfixer config",
5+
"default": {
6+
"review": {
7+
"request": []
8+
},
9+
"runtime": {
10+
"acp": {
11+
"env": {}
12+
},
13+
"compact_on_resume": false,
14+
"kind": "mock"
15+
}
16+
},
17+
"additionalProperties": false,
18+
"properties": {
19+
"review": {
20+
"description": "Post-fix review request automation.",
21+
"default": {
22+
"request": []
23+
},
24+
"additionalProperties": false,
25+
"properties": {
26+
"request": {
27+
"description": "Ordered review request actions executed after a successful fixing turn that applied changes.",
28+
"items": {
29+
"required": [
30+
"mode"
31+
],
32+
"additionalProperties": false,
33+
"properties": {
34+
"body": {
35+
"description": "Optional raw HTTP request body to send when mode=http after placeholder substitution.",
36+
"type": "string"
37+
},
38+
"comment": {
39+
"description": "Comment body to post when mode=comment.",
40+
"minLength": 1,
41+
"type": "string"
42+
},
43+
"headers": {
44+
"description": "Optional HTTP headers to send when mode=http. Placeholder substitution applies to values only.",
45+
"additionalProperties": {
46+
"type": "string"
47+
},
48+
"type": "object"
49+
},
50+
"method": {
51+
"description": "HTTP method to use when mode=http. Defaults to GET.",
52+
"default": "GET",
53+
"type": "string"
54+
},
55+
"mode": {
56+
"description": "Which review request action to perform.",
57+
"enum": [
58+
"comment",
59+
"reviewer",
60+
"http"
61+
],
62+
"type": "string"
63+
},
64+
"reviewers": {
65+
"description": "Reviewers to request when mode=reviewer.",
66+
"items": {
67+
"minLength": 1,
68+
"type": "string"
69+
},
70+
"minItems": 1,
71+
"type": "array"
72+
},
73+
"url": {
74+
"description": "HTTP endpoint URL to call when mode=http.",
75+
"minLength": 1,
76+
"type": "string"
77+
}
78+
},
79+
"type": "object",
80+
"allOf": [
81+
{
82+
"if": {
83+
"required": [
84+
"mode"
85+
],
86+
"properties": {
87+
"mode": {
88+
"const": "comment"
89+
}
90+
}
91+
},
92+
"then": {
93+
"required": [
94+
"comment"
95+
],
96+
"not": {
97+
"anyOf": [
98+
{
99+
"required": [
100+
"reviewers"
101+
]
102+
},
103+
{
104+
"required": [
105+
"method"
106+
]
107+
},
108+
{
109+
"required": [
110+
"url"
111+
]
112+
},
113+
{
114+
"required": [
115+
"headers"
116+
]
117+
},
118+
{
119+
"required": [
120+
"body"
121+
]
122+
}
123+
]
124+
}
125+
}
126+
},
127+
{
128+
"if": {
129+
"required": [
130+
"mode"
131+
],
132+
"properties": {
133+
"mode": {
134+
"const": "reviewer"
135+
}
136+
}
137+
},
138+
"then": {
139+
"required": [
140+
"reviewers"
141+
],
142+
"not": {
143+
"anyOf": [
144+
{
145+
"required": [
146+
"comment"
147+
]
148+
},
149+
{
150+
"required": [
151+
"method"
152+
]
153+
},
154+
{
155+
"required": [
156+
"url"
157+
]
158+
},
159+
{
160+
"required": [
161+
"headers"
162+
]
163+
},
164+
{
165+
"required": [
166+
"body"
167+
]
168+
}
169+
]
170+
}
171+
}
172+
},
173+
{
174+
"if": {
175+
"required": [
176+
"mode"
177+
],
178+
"properties": {
179+
"mode": {
180+
"const": "http"
181+
}
182+
}
183+
},
184+
"then": {
185+
"required": [
186+
"url"
187+
],
188+
"not": {
189+
"anyOf": [
190+
{
191+
"required": [
192+
"comment"
193+
]
194+
},
195+
{
196+
"required": [
197+
"reviewers"
198+
]
199+
}
200+
]
201+
}
202+
}
203+
}
204+
]
205+
},
206+
"type": "array"
207+
}
208+
},
209+
"type": "object"
210+
},
211+
"runtime": {
212+
"description": "Runtime adapter configuration.",
213+
"default": {
214+
"acp": {
215+
"env": {}
216+
},
217+
"compact_on_resume": false,
218+
"kind": "mock"
219+
},
220+
"additionalProperties": false,
221+
"properties": {
222+
"acp": {
223+
"description": "ACP adapter process configuration.",
224+
"default": {
225+
"env": {}
226+
},
227+
"additionalProperties": false,
228+
"properties": {
229+
"args": {
230+
"description": "Arguments passed to the ACP adapter command.",
231+
"items": {
232+
"type": "string"
233+
},
234+
"type": "array"
235+
},
236+
"command": {
237+
"description": "Executable to launch for the ACP adapter.",
238+
"minLength": 1,
239+
"type": "string"
240+
},
241+
"env": {
242+
"description": "Extra environment variables to inject into the ACP adapter process.",
243+
"additionalProperties": {
244+
"type": "string"
245+
},
246+
"type": "object"
247+
},
248+
"prompt_inactivity_timeout": {
249+
"description": "Optional duration after which a completely silent ACP turn is cancelled and retried once. Leave empty to disable hard inactivity timeouts.",
250+
"type": "string"
251+
}
252+
},
253+
"type": "object"
254+
},
255+
"compact_on_resume": {
256+
"description": "When resuming an ACP session, request a best-effort conversation compaction step before the main fixing turn.",
257+
"default": false,
258+
"type": "boolean"
259+
},
260+
"kind": {
261+
"description": "Which runtime backend to use.",
262+
"default": "mock",
263+
"enum": [
264+
"mock",
265+
"acp"
266+
],
267+
"type": "string"
268+
}
269+
},
270+
"type": "object",
271+
"allOf": [
272+
{
273+
"if": {
274+
"required": [
275+
"kind"
276+
],
277+
"properties": {
278+
"kind": {
279+
"const": "acp"
280+
}
281+
}
282+
},
283+
"then": {
284+
"required": [
285+
"acp"
286+
],
287+
"properties": {
288+
"acp": {
289+
"required": [
290+
"command"
291+
]
292+
}
293+
}
294+
}
295+
}
296+
]
297+
}
298+
},
299+
"type": "object"
300+
}

0 commit comments

Comments
 (0)