Skip to content

Commit 911d730

Browse files
committed
feat(docs): add claude reviewer workflows
1 parent 8c5d09e commit 911d730

4 files changed

Lines changed: 468 additions & 0 deletions

File tree

.claude/review.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# review-cli config for Uniswap/docs.
2+
# Schema reference: packages/review-cli/src/config.ts in Uniswap/internal-tools.
3+
4+
# Default model for all claude-runtime review agents. The bundled
5+
# agents declare `model: sonnet` in frontmatter, which resolve-model
6+
# treats as "unpinned", so this config default is what actually
7+
# selects the model.
8+
model:
9+
default: claude-opus-4-8
10+
11+
# Per-agent budget — soft cap on each agent's investigation.
12+
agent_budget_usd: 5.0
13+
14+
# Per-agent turn ceiling — set well above any reasonable investigation
15+
# depth so the budget is always the cap, never turns.
16+
agent_max_turns: 500
17+
18+
# Disable the trivial-threshold skip — every PR gets reviewed,
19+
# regardless of size. Tiny diffs are especially meaningful in a docs
20+
# repo (typos in user-facing copy, wrong addresses, broken links).
21+
trivial_threshold: 0
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: 'Install review-cli'
2+
description: 'Set up Bun and install @uniswap/review-cli from GitHub Packages into an isolated $RUNNER_TEMP directory.'
3+
4+
inputs:
5+
version:
6+
description: '@uniswap/review-cli version to install (e.g. 1.2.0). Pin via vars.REVIEW_CLI_VERSION at the call site.'
7+
required: true
8+
github-token:
9+
description: 'Token with packages:read scope. Typically secrets.GITHUB_TOKEN.'
10+
required: true
11+
bun-version:
12+
description: 'Bun runtime version. Must satisfy @uniswap/review-cli engines (>=1.3.13).'
13+
default: '1.3.13'
14+
15+
outputs:
16+
bin-path:
17+
description: 'Absolute path to the directory containing the review-cli binary. Callers should invoke "${bin-path}/review-cli" rather than relying on $PATH.'
18+
value: ${{ steps.install.outputs.bin-path }}
19+
20+
runs:
21+
using: composite
22+
steps:
23+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
24+
with:
25+
bun-version: ${{ inputs.bun-version }}
26+
27+
# @uniswap/review-cli is private on GitHub Packages, and Bun (like npm)
28+
# only supports per-SCOPE registry overrides. Installing from a scratch
29+
# dir with its own bunfig.toml routes @uniswap to GH Packages without
30+
# touching the repo's own registry config. Transitive deps (no
31+
# @uniswap/*) come from npmjs.org per bun's built-in default.
32+
#
33+
# Bin path is exposed via the `bin-path` step output rather than
34+
# written to GITHUB_PATH — the output forces callers to opt in
35+
# explicitly per-step (zizmor `github-env`).
36+
- name: Install @uniswap/review-cli (isolated registry context)
37+
id: install
38+
shell: bash
39+
env:
40+
GH_PACKAGES_TOKEN: ${{ inputs.github-token }}
41+
REVIEW_CLI_VERSION: ${{ inputs.version }}
42+
run: |
43+
set -euo pipefail
44+
install_dir="$RUNNER_TEMP/review-cli-install"
45+
mkdir -p "$install_dir"
46+
cat > "$install_dir/bunfig.toml" <<EOF
47+
[install.scopes]
48+
"@uniswap" = { url = "https://npm.pkg.github.com", token = "$GH_PACKAGES_TOKEN" }
49+
EOF
50+
cd "$install_dir"
51+
bun init -y > /dev/null
52+
bun add "@uniswap/review-cli@${REVIEW_CLI_VERSION}"
53+
echo "bin-path=$install_dir/node_modules/.bin" >> "$GITHUB_OUTPUT"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 'Security Scan'
2+
description: 'Centralized bullfrog security scanning - disable via SECURITY_SCAN_ENABLED input'
3+
4+
inputs:
5+
enabled:
6+
description: 'Set to vars.SECURITY_SCAN_ENABLED from the calling workflow (default: true)'
7+
default: 'true'
8+
allowed-ips:
9+
description: 'List of IPs to allow outbound connections to'
10+
default: ''
11+
allowed-domains:
12+
description: 'List of domains to allow outbound connections to'
13+
default: ''
14+
egress-policy:
15+
description: 'Egress policy: audit or block'
16+
default: 'audit'
17+
18+
runs:
19+
using: 'composite'
20+
steps:
21+
- name: Security Scan
22+
if: inputs.enabled == 'true'
23+
uses: bullfrogsec/bullfrog@1831f79cce8ad602eef14d2163873f27081ebfb3 # v0.8.4
24+
with:
25+
allowed-ips: ${{ inputs.allowed-ips }}
26+
allowed-domains: ${{ inputs.allowed-domains }}
27+
egress-policy: ${{ inputs.egress-policy }}

0 commit comments

Comments
 (0)