Skip to content

Commit db9d256

Browse files
author
张彧
committed
Rename project to Codebase Argus
1 parent 0a437b3 commit db9d256

25 files changed

Lines changed: 307 additions & 238 deletions

README.md

Lines changed: 65 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Fork Drift Sentinel
1+
# Codebase Argus
22

33
<p align="center">
4-
<strong>Evidence-first PR review and fork maintenance for maintainers.</strong>
4+
<strong>Multi-agent codebase review for PRs, CI, and downstream fork syncs.</strong>
55
</p>
66

77
<p align="center">
@@ -21,12 +21,13 @@
2121
<img alt="GitHub App" src="https://img.shields.io/badge/GitHub%20App-webhook-24292f?style=flat-square">
2222
</p>
2323

24-
Fork Drift Sentinel is a maintainer firewall. It reviews pull requests, explains
25-
CI failures, plans narrow autofixes, and measures downstream fork drift before a
26-
long-lived fork turns into merge debt.
24+
Codebase Argus coordinates multiple reviewers around the same codebase evidence.
25+
Upstream maintainers use it for pull requests, CI failures, and narrow autofix
26+
plans. Downstream maintainers use it to compare long-lived forks against
27+
upstream before a merge or rebase turns into hidden debt.
2728

28-
It keeps model output tied to evidence: patches, checks, files, branch state,
29-
policy gates, provider consensus, and local git simulations.
29+
It keeps model output tied to patches, checks, files, branch state, policy
30+
gates, provider consensus, and local git simulations.
3031

3132
## At a glance
3233

@@ -35,7 +36,7 @@ policy gates, provider consensus, and local git simulations.
3536
| PR review | `owner/repo#123` or a GitHub PR URL | risk summary, findings, inline-ready comments |
3637
| CI review | local log file or failing GitHub Actions jobs | likely root cause, affected command, fix path |
3738
| Autofix plan | PR review findings | gated branch plan for mechanical fixes |
38-
| Fork drift | upstream repo + fork repo | ahead/behind, conflict notes, rebase/merge risk |
39+
| Downstream fork sync | upstream repo + fork repo | ahead/behind, conflict notes, rebase/merge risk |
3940
| Agent handoff | dashboard or CLI report | task package with commands and acceptance gates |
4041

4142
## Quick start
@@ -50,9 +51,9 @@ Open <http://localhost:3000>.
5051
For command-line review:
5152

5253
```bash
53-
npm run fds -- review owner/repo#123
54-
npm run fds -- ci-github owner/repo#123
55-
npm run fds -- drift owner/upstream me/fork
54+
npm run argus -- review owner/repo#123
55+
npm run argus -- ci-github owner/repo#123
56+
npm run argus -- downstream owner/upstream me/fork
5657
```
5758

5859
Public GitHub repositories work from the hosted demo. Private repositories,
@@ -63,22 +64,23 @@ review belong in a local or deployed server environment.
6364

6465
### Pull request review
6566

66-
Fork Drift Sentinel fetches the PR shape that maintainers usually need before
67+
Codebase Argus fetches the PR shape that maintainers usually need before
6768
trusting a review:
6869

6970
- metadata, labels, author, branch refs, and mergeability;
7071
- changed files, patch excerpts, commits, and prior reviews;
7172
- check status and GitHub Actions run metadata;
72-
- policy rules from `.fork-drift-sentinel.yml`;
73+
- policy rules from `.codebase-argus.yml`;
7374
- stacked PR signals and merge-queue states.
7475

7576
The deterministic reviewer looks for failing checks, source changes without
7677
tests, workflow edits, dependency changes, sensitive paths, policy violations,
7778
large diffs, stacked PR bases, and blocked/dirty/behind/unstable merge states.
7879

79-
### AI review and tribunal
80+
### Multi-agent review and tribunal
8081

81-
The same evidence package can go to one provider or several providers:
82+
The same upstream or downstream evidence package can go to one provider or
83+
several providers:
8284

8385
| Provider | Mode |
8486
| --- | --- |
@@ -89,9 +91,9 @@ The same evidence package can go to one provider or several providers:
8991
| `claude-cli` | local CLI |
9092
| `gemini-cli` | local CLI |
9193

92-
Tribunal mode runs multiple reviewers against the same PR, groups matching
93-
findings, raises confidence when providers agree, and keeps provider failures in
94-
the report.
94+
Tribunal mode runs multiple reviewers against the same PR, CI log, or fork sync
95+
context. It groups matching findings, raises confidence when providers agree,
96+
and keeps provider failures in the report.
9597

9698
### CI failures
9799

@@ -105,7 +107,7 @@ covers narrow lanes such as npm lockfile refreshes, snapshot updates, and
105107
formatter or linter fixes. The output includes commands, verification gates, and
106108
push instructions for the maintainer or agent working in a real checkout.
107109

108-
### Downstream fork drift
110+
### Downstream fork sync
109111

110112
The fork workflow compares an upstream repository and a long-lived fork. Local
111113
analysis runs git in `.cache/repos` and temporary worktrees, then reports:
@@ -122,45 +124,45 @@ analysis runs git in `.cache/repos` and temporary worktrees, then reports:
122124
The CLI is the best entry point for scripts and coding agents.
123125

124126
```bash
125-
npm run fds -- --help
127+
npm run argus -- --help
126128
```
127129

128130
### PR review
129131

130132
```bash
131-
npm run fds -- review owner/repo#123
132-
npm run fds -- review owner/repo#123 --policy .fork-drift-sentinel.yml
133-
npm run fds -- review owner/repo#123 --provider openai-api --model gpt-4.1-mini
134-
npm run fds -- review owner/repo#123 --tribunal openai-api,claude-cli,codex-cli
133+
npm run argus -- review owner/repo#123
134+
npm run argus -- review owner/repo#123 --policy .codebase-argus.yml
135+
npm run argus -- review owner/repo#123 --provider openai-api --model gpt-4.1-mini
136+
npm run argus -- review owner/repo#123 --tribunal openai-api,claude-cli,codex-cli
135137
```
136138

137139
### CI review
138140

139141
```bash
140-
npm run fds -- ci-log logs/failure.txt
141-
npm run fds -- ci-log logs/failure.txt --provider codex-cli
142-
GITHUB_TOKEN=... npm run fds -- ci-github owner/repo#123
142+
npm run argus -- ci-log logs/failure.txt
143+
npm run argus -- ci-log logs/failure.txt --provider codex-cli
144+
GITHUB_TOKEN=... npm run argus -- ci-github owner/repo#123
143145
```
144146

145147
### Autofix plan
146148

147149
```bash
148-
npm run fds -- autofix-plan owner/repo#123
150+
npm run argus -- autofix-plan owner/repo#123
149151
```
150152

151-
### Fork drift
153+
### Downstream fork sync
152154

153155
```bash
154-
npm run fds -- drift owner/upstream me/fork
155-
npm run fds -- drift owner/upstream me/fork --upstream-branch main --fork-branch feature/demo
156-
npm run fds -- drift owner/upstream me/fork --fork-branch feature/demo --provider codex-cli
156+
npm run argus -- downstream owner/upstream me/fork
157+
npm run argus -- downstream owner/upstream me/fork --upstream-branch main --fork-branch feature/demo
158+
npm run argus -- downstream owner/upstream me/fork --fork-branch feature/demo --provider codex-cli
157159
```
158160

159161
### Sync planning
160162

161163
```bash
162-
npm run fds -- sync owner/upstream me/fork --mode merge --fork-branch feature/demo --test "npm test"
163-
npm run fds -- sync owner/upstream me/fork --mode rebase --fork-branch feature/demo --execute --push --create-pr
164+
npm run argus -- sync owner/upstream me/fork --mode merge --fork-branch feature/demo --test "npm test"
165+
npm run argus -- sync owner/upstream me/fork --mode rebase --fork-branch feature/demo --execute --push --create-pr
164166
```
165167

166168
Output defaults to markdown. Use `--format json` for tool integration.
@@ -169,13 +171,16 @@ Install the binary locally:
169171

170172
```bash
171173
npm link
172-
fork-drift-sentinel review owner/repo#123
173-
fork-drift-sentinel autofix-plan owner/repo#123
174+
codebase-argus review owner/repo#123
175+
codebase-argus autofix-plan owner/repo#123
174176
```
175177

178+
`npm run fds`, the `drift` command, and the `fork-drift-sentinel` binary remain
179+
as compatibility aliases.
180+
176181
## Policy file
177182

178-
Add `.fork-drift-sentinel.yml` when the repository has local review rules:
183+
Add `.codebase-argus.yml` when the repository has local review rules:
179184

180185
```yaml
181186
requiredChecks: passing
@@ -240,20 +245,20 @@ GITHUB_APP_PRIVATE_KEY_BASE64=...
240245
Review controls:
241246

242247
```bash
243-
FDS_WEBHOOK_PROVIDER=rule-based
244-
FDS_WEBHOOK_PROVIDER=openai-api
245-
FDS_WEBHOOK_MODEL=gpt-4.1-mini
246-
FDS_WEBHOOK_TRIBUNAL=openai-api,claude-cli,codex-cli
247-
FDS_WEBHOOK_INLINE_COMMENTS=true
248-
FDS_WEBHOOK_INCLUDE_CI_LOGS=true
249-
FDS_WEBHOOK_DRY_RUN=true
248+
ARGUS_WEBHOOK_PROVIDER=rule-based
249+
ARGUS_WEBHOOK_PROVIDER=openai-api
250+
ARGUS_WEBHOOK_MODEL=gpt-4.1-mini
251+
ARGUS_WEBHOOK_TRIBUNAL=openai-api,claude-cli,codex-cli
252+
ARGUS_WEBHOOK_INLINE_COMMENTS=true
253+
ARGUS_WEBHOOK_INCLUDE_CI_LOGS=true
254+
ARGUS_WEBHOOK_DRY_RUN=true
250255
```
251256

252257
Webhook behavior:
253258

254259
- verifies `X-Hub-Signature-256` before payload handling;
255260
- reviews `opened`, `reopened`, `ready_for_review`, and `synchronize` events;
256-
- skips draft PRs and PRs labeled `fds:paused`;
261+
- skips draft PRs and PRs labeled `argus:paused`;
257262
- uses GitHub App installation tokens when app credentials are present;
258263
- posts GitHub PR reviews with event `COMMENT`;
259264
- anchors high-signal findings to changed patch lines when inline comments are enabled;
@@ -262,16 +267,17 @@ Webhook behavior:
262267
### PR comment commands
263268

264269
```text
265-
/fds help
266-
/fds review
267-
/fds ci
268-
/fds autofix
269-
/fds pause
270-
/fds resume
270+
/argus help
271+
/argus review
272+
/argus ci
273+
/argus autofix
274+
/argus pause
275+
/argus resume
271276
```
272277

273-
`/fds pause` applies the `fds:paused` label. `/fds resume` removes it.
274-
`/fds autofix` posts the same gated plan as the CLI.
278+
`/argus pause` applies the `argus:paused` label. `/argus resume` removes it.
279+
`/argus autofix` posts the same gated plan as the CLI. Legacy `/fds` commands
280+
still work.
275281

276282
## AI provider setup
277283

@@ -286,9 +292,9 @@ GEMINI_API_KEY=...
286292
Optional model overrides:
287293

288294
```bash
289-
FDS_OPENAI_API_MODEL=gpt-4.1-mini
290-
FDS_ANTHROPIC_API_MODEL=claude-3-5-sonnet-20241022
291-
FDS_GEMINI_API_MODEL=gemini-2.0-flash
295+
ARGUS_OPENAI_API_MODEL=gpt-4.1-mini
296+
ARGUS_ANTHROPIC_API_MODEL=claude-3-5-sonnet-20241022
297+
ARGUS_GEMINI_API_MODEL=gemini-2.0-flash
292298
```
293299

294300
Local CLI providers expect authenticated commands:
@@ -304,14 +310,14 @@ gemini --help
304310
The repository includes a skill package:
305311

306312
```text
307-
skills/fork-drift-sentinel/
313+
skills/codebase-argus/
308314
```
309315

310316
Install it into a Codex skill directory:
311317

312318
```bash
313319
mkdir -p ~/.codex/skills
314-
cp -R skills/fork-drift-sentinel ~/.codex/skills/
320+
cp -R skills/codebase-argus ~/.codex/skills/
315321
```
316322

317323
The skill directs agents to use the CLI first, keep tokens out of logs, run
@@ -321,7 +327,7 @@ comments.
321327

322328
## Write model
323329

324-
Fork Drift Sentinel keeps write operations narrow:
330+
Codebase Argus keeps write operations narrow:
325331

326332
| Surface | Write behavior |
327333
| --- | --- |

bin/codebase-argus

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env sh
2+
set -eu
3+
4+
ROOT="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
5+
TSX="$ROOT/node_modules/.bin/tsx"
6+
7+
if [ ! -x "$TSX" ]; then
8+
echo "tsx is not installed. Run npm install in $ROOT first." >&2
9+
exit 1
10+
fi
11+
12+
exec "$TSX" "$ROOT/src/cli.ts" "$@"

docs/superpowers/plans/2026-05-06-maintainer-firewall-mvp.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
**Goal:** Add evidence-first review, policy-as-code, multi-agent tribunal, PR review Actions, and worktree rebase simulation as a coherent MVP.
66

7-
**Architecture:** `pr-review.ts` stays responsible for normalized review results. New focused helpers own policy parsing, evidence extraction, tribunal aggregation, and workflow generation. `local-analyzer.ts` adds a temporary worktree simulation result to the existing local drift report. The UI exposes these features through compact controls in the existing panels.
7+
**Architecture:** `pr-review.ts` stays responsible for normalized review results. New focused helpers own policy parsing, evidence extraction, tribunal aggregation, and workflow generation. `local-analyzer.ts` adds a temporary worktree simulation result to the existing local downstream report. The UI exposes these features through compact controls in the existing panels.
88

99
**Tech Stack:** Next.js App Router, React client component, TypeScript, Vitest, GitHub REST API, local `git`, Node `child_process`, no new npm dependencies.
1010

@@ -43,7 +43,7 @@
4343
- [ ] Add tests for a generated PR review workflow.
4444
- [ ] Generate a workflow that posts PR context to a server endpoint, or runs baseline policy checks when no endpoint is configured.
4545

46-
### Task 4: Fork Drift Pro
46+
### Task 4: Downstream Fork Sync
4747

4848
**Files:**
4949
- Modify: `src/lib/local-analyzer.test.ts`
@@ -62,5 +62,5 @@
6262
- Modify: `README.md`
6363

6464
- [ ] Add policy text input, tribunal controls, PR review workflow export, and evidence display.
65-
- [ ] Keep current project name and existing fork drift panels.
65+
- [ ] Rename the project surface while keeping existing downstream fork sync panels.
6666
- [ ] Run `npm test`, `npm run lint`, and `npm run build`.

docs/superpowers/plans/2026-05-06-pr-agent-review.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
44
5-
**Goal:** Add read-only PR review and direct AI provider review to Fork Drift Sentinel without renaming the project.
5+
**Goal:** Add read-only PR review and direct AI provider review to Codebase Argus.
66

77
**Architecture:** GitHub PR data is fetched into a normalized `PullRequestReviewReport`. Deterministic local review helpers create a baseline. A server-only provider layer calls OpenAI, Anthropic, Gemini, Codex CLI, Claude CLI, or Gemini CLI and normalizes JSON findings for the UI.
88

@@ -43,7 +43,7 @@
4343
- [ ] Add client state for PR input, PR report, provider selection, model override, AI loading, AI result, and errors.
4444
- [ ] Add `PullRequestReviewPanel` with fetch, baseline findings, AI provider controls, result markdown, and file risk table.
4545
- [ ] Reuse existing panel, compact field, status pill, table, textarea, and button styles.
46-
- [ ] Keep the existing Fork Drift Sentinel branding.
46+
- [ ] Keep the Codebase Argus branding.
4747

4848
### Task 4: Documentation And Verification
4949

docs/superpowers/specs/2026-05-06-pr-agent-review-design.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Goal
44

5-
Fork Drift Sentinel keeps its current name and gains a normal pull-request review path plus direct AI review adapters. The tool should serve both upstream maintainers reviewing incoming PRs and downstream maintainers reviewing long-lived fork drift.
5+
Codebase Argus is the current product name. It serves both upstream maintainers reviewing incoming PRs and downstream maintainers reviewing long-lived fork syncs, with the same evidence package available to one provider or a multi-agent tribunal.
66

77
## Scope
88

@@ -20,7 +20,7 @@ This version does not automatically comment on PRs, approve changes, request cha
2020

2121
`src/lib/github.ts` remains the browser-facing GitHub REST helper and adds PR review data fetching. `src/lib/pr-review.ts` owns context normalization, deterministic findings, prompt construction, provider output validation, and markdown formatting. `src/lib/agent-providers.ts` owns API and CLI provider execution from server-only routes. `src/app/api/pr-agent-review/route.ts` accepts a review context plus provider settings and returns a normalized review result.
2222

23-
The page adds a PR Review panel above the existing fork drift panels. Users can fetch a PR report with the browser token, inspect the rule-based baseline, then optionally run an AI review through a server route when running locally or in an environment configured with provider keys.
23+
The page adds a PR Review panel above the existing downstream fork sync panels. Users can fetch a PR report with the browser token, inspect the rule-based baseline, then optionally run an AI review through a server route when running locally or in an environment configured with provider keys.
2424

2525
## Safety
2626

package-lock.json

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
2-
"name": "fork-drift-sentinel",
2+
"name": "codebase-argus",
33
"version": "0.1.0",
44
"private": true,
55
"bin": {
6+
"codebase-argus": "./bin/codebase-argus",
67
"fork-drift-sentinel": "./bin/fork-drift-sentinel"
78
},
89
"scripts": {
910
"dev": "next dev",
11+
"argus": "tsx src/cli.ts",
1012
"fds": "tsx src/cli.ts",
1113
"build": "next build",
1214
"start": "next start",

0 commit comments

Comments
 (0)