cc-reviewer 2.0.0 → 3.0.0
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.
- package/README.md +15 -35
- package/commands/{codex-xhigh.md → codex-xhigh-review.md} +3 -3
- package/commands/{multi.md → multi-review.md} +1 -1
- package/dist/adapters/base.d.ts +3 -41
- package/dist/adapters/codex.d.ts +4 -6
- package/dist/adapters/codex.js +68 -322
- package/dist/adapters/gemini.d.ts +4 -6
- package/dist/adapters/gemini.js +46 -276
- package/dist/commands.d.ts +2 -3
- package/dist/commands.js +33 -11
- package/dist/decoders/codex.d.ts +11 -0
- package/dist/decoders/codex.js +29 -0
- package/dist/handoff.d.ts +2 -17
- package/dist/handoff.js +3 -87
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -22
- package/dist/schema.d.ts +6 -195
- package/dist/schema.js +1 -190
- package/dist/tools/feedback.d.ts +5 -6
- package/dist/tools/feedback.js +63 -338
- package/dist/types.d.ts +0 -1
- package/package.json +2 -3
- package/commands/ask-codex.md +0 -36
- package/commands/ask-gemini.md +0 -35
- package/commands/ask-multi.md +0 -39
- package/dist/setup.d.ts +0 -7
- package/dist/setup.js +0 -27
- package/dist/tools/peer.d.ts +0 -194
- package/dist/tools/peer.js +0 -347
- /package/commands/{codex.md → codex-review.md} +0 -0
- /package/commands/{gemini.md → gemini-review.md} +0 -0
package/README.md
CHANGED
|
@@ -11,11 +11,11 @@ claude mcp add -s user cc-reviewer -- npx -y cc-reviewer
|
|
|
11
11
|
|
|
12
12
|
**Step 2: Restart Claude Code**
|
|
13
13
|
|
|
14
|
-
The MCP tools and slash commands (`/codex`, `/gemini`, `/multi
|
|
14
|
+
The MCP tools and slash commands (`/codex-review`, `/gemini-review`, `/multi-review`) are automatically installed.
|
|
15
15
|
|
|
16
16
|
**Manual command install** (if needed):
|
|
17
17
|
```bash
|
|
18
|
-
npx cc-reviewer
|
|
18
|
+
npx cc-reviewer update
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Verify with:
|
|
@@ -52,14 +52,10 @@ gemini # follow auth prompts
|
|
|
52
52
|
These tools provide **external second-opinion reviews** from Codex and Gemini CLIs. They are designed to complement Claude Code's native review capabilities, not replace them.
|
|
53
53
|
|
|
54
54
|
**Review tools** (external second-opinion on your work):
|
|
55
|
-
- `/codex` or "review with codex" - Get external Codex review
|
|
56
|
-
- `/
|
|
57
|
-
- `/
|
|
58
|
-
|
|
59
|
-
**Ask tools** (get help from a peer engineer):
|
|
60
|
-
- `/ask-codex` - Ask Codex for help (planning, debugging, explaining, fixing)
|
|
61
|
-
- `/ask-gemini` - Ask Gemini for help (architecture, patterns, scalability)
|
|
62
|
-
- `/ask-multi` - Ask both models in parallel
|
|
55
|
+
- `/codex-review` or "review with codex" - Get external Codex review
|
|
56
|
+
- `/codex-xhigh-review` - Deep-thinking Codex review with xhigh reasoning
|
|
57
|
+
- `/gemini-review` or "review with gemini" - Get external Gemini review
|
|
58
|
+
- `/multi-review` - Get parallel reviews from both CLIs
|
|
63
59
|
|
|
64
60
|
**For regular reviews:** Just say "review" and Claude Code will use its native capabilities. These external tools are only invoked when explicitly requested.
|
|
65
61
|
|
|
@@ -68,24 +64,18 @@ These tools provide **external second-opinion reviews** from Codex and Gemini CL
|
|
|
68
64
|
These commands are available after restart:
|
|
69
65
|
|
|
70
66
|
```bash
|
|
71
|
-
# Review
|
|
72
|
-
/codex
|
|
73
|
-
/codex
|
|
74
|
-
/
|
|
75
|
-
/gemini
|
|
76
|
-
/
|
|
77
|
-
/multi # Both models in parallel
|
|
78
|
-
|
|
79
|
-
# Ask tools (peer engineer)
|
|
80
|
-
/ask-codex # Ask Codex for help
|
|
81
|
-
/ask-gemini # Ask Gemini for help
|
|
82
|
-
/ask-multi # Ask both in parallel
|
|
67
|
+
/codex-review # Review with Codex
|
|
68
|
+
/codex-review security # Focus on security
|
|
69
|
+
/codex-xhigh-review # Codex with xhigh reasoning effort
|
|
70
|
+
/gemini-review # Review with Gemini
|
|
71
|
+
/gemini-review architecture # Focus on architecture
|
|
72
|
+
/multi-review # Both models in parallel
|
|
83
73
|
```
|
|
84
74
|
|
|
85
75
|
## How It Works
|
|
86
76
|
|
|
87
77
|
```
|
|
88
|
-
CC does work → User: /codex → External CLI reviews → CC synthesizes → Updated output
|
|
78
|
+
CC does work → User: /codex-review → External CLI reviews → CC synthesizes → Updated output
|
|
89
79
|
```
|
|
90
80
|
|
|
91
81
|
**Key Principles:**
|
|
@@ -108,33 +98,23 @@ CC does work → User: /codex → External CLI reviews → CC synthesizes → Up
|
|
|
108
98
|
|
|
109
99
|
## MCP Tools
|
|
110
100
|
|
|
111
|
-
The plugin exposes
|
|
101
|
+
The plugin exposes three MCP tools:
|
|
112
102
|
|
|
113
103
|
| Tool | Description |
|
|
114
104
|
|------|-------------|
|
|
115
105
|
| `codex_review` | Get Codex review (correctness, edge cases, performance) |
|
|
116
106
|
| `gemini_review` | Get Gemini review (design patterns, scalability, tech debt) |
|
|
117
107
|
| `multi_review` | Parallel review from both models |
|
|
118
|
-
| `ask_codex` | Ask Codex for help (planning, debugging, explaining, fixing) |
|
|
119
|
-
| `ask_gemini` | Ask Gemini for help (architecture, patterns, scalability) |
|
|
120
|
-
| `ask_multi` | Ask both models in parallel |
|
|
121
108
|
|
|
122
109
|
## Output Format
|
|
123
110
|
|
|
124
|
-
**Review tools** return structured
|
|
111
|
+
**Review tools** return structured feedback from the external CLIs. Claude Code parses this feedback to identify:
|
|
125
112
|
- **Findings**: Issues with severity, confidence, location, and suggestions
|
|
126
113
|
- **Agreements**: Validations of CC's correct assessments
|
|
127
114
|
- **Disagreements**: Challenges to CC's claims with corrections
|
|
128
115
|
- **Alternatives**: Different approaches with tradeoffs
|
|
129
116
|
- **Risk Assessment**: Overall risk level with top concerns
|
|
130
117
|
|
|
131
|
-
**Ask tools** return structured JSON responses with:
|
|
132
|
-
- **Answer**: Main response text (markdown)
|
|
133
|
-
- **Key Points**: Bullet summary of main points
|
|
134
|
-
- **Suggested Actions**: Recommended actions with priority and rationale
|
|
135
|
-
- **File References**: Files examined with line ranges and relevance
|
|
136
|
-
- **Alternatives**: Alternative approaches considered
|
|
137
|
-
|
|
138
118
|
## Development
|
|
139
119
|
|
|
140
120
|
```bash
|
|
@@ -17,10 +17,10 @@ Use the `codex_review` MCP tool with `reasoningEffort: "xhigh"` for deeper analy
|
|
|
17
17
|
2. Call the `codex_review` tool with:
|
|
18
18
|
- `workingDir`: current working directory
|
|
19
19
|
- `ccOutput`: brief summary of recent changes or context
|
|
20
|
-
- `reasoningEffort`: "xhigh" (this is the key difference from /codex)
|
|
20
|
+
- `reasoningEffort`: "xhigh" (this is the key difference from /codex-review)
|
|
21
21
|
- `serviceTier`: if user says "fast mode"/"fast"/"priority" → "fast"; if "flex"/"cheap"/"budget" → "flex"; otherwise omit
|
|
22
|
-
- `
|
|
23
|
-
- `
|
|
22
|
+
- `focusAreas`: extracted from $ARGUMENTS if it's a known focus area
|
|
23
|
+
- `customPrompt`: $ARGUMENTS if it's custom text
|
|
24
24
|
|
|
25
25
|
3. After receiving feedback - VALIDATE before accepting:
|
|
26
26
|
|
|
@@ -7,7 +7,7 @@ Get parallel reviews from both Codex and Gemini, raw output for manual synthesis
|
|
|
7
7
|
|
|
8
8
|
## When to Use
|
|
9
9
|
|
|
10
|
-
Use `/multi` when you want parallel reviews from both Codex and Gemini.
|
|
10
|
+
Use `/multi-review` when you want parallel reviews from both Codex and Gemini.
|
|
11
11
|
|
|
12
12
|
## Before Calling - PREPARE THE HANDOFF
|
|
13
13
|
|
package/dist/adapters/base.d.ts
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* Makes it easy to add new models (Ollama, Azure, etc.) without
|
|
6
6
|
* changing the core orchestration logic.
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
import { FocusArea, OutputType, ReasoningEffort, ServiceTier, TaskType } from '../types.js';
|
|
8
|
+
import { FocusArea, OutputType, ReasoningEffort, ServiceTier } from '../types.js';
|
|
10
9
|
export interface ReviewerCapabilities {
|
|
11
10
|
/** Display name for this reviewer */
|
|
12
11
|
name: string;
|
|
@@ -55,30 +54,9 @@ export interface ExpertRole {
|
|
|
55
54
|
export declare const EXPERT_ROLES: Record<string, ExpertRole>;
|
|
56
55
|
/** @deprecated Use handoff.ts selectRole() instead */
|
|
57
56
|
export declare function selectExpertRole(focusAreas?: FocusArea[]): ExpertRole;
|
|
58
|
-
export interface PeerRequest {
|
|
59
|
-
/** Working directory containing the code */
|
|
60
|
-
workingDir: string;
|
|
61
|
-
/** The question or request from CC */
|
|
62
|
-
prompt: string;
|
|
63
|
-
/** Hint about the type of task */
|
|
64
|
-
taskType?: TaskType;
|
|
65
|
-
/** Files the peer should focus on */
|
|
66
|
-
relevantFiles?: string[];
|
|
67
|
-
/** Additional context (error messages, prior analysis) */
|
|
68
|
-
context?: string;
|
|
69
|
-
/** Areas to focus on */
|
|
70
|
-
focusAreas?: FocusArea[];
|
|
71
|
-
/** Custom instructions from the user */
|
|
72
|
-
customPrompt?: string;
|
|
73
|
-
/** Reasoning effort level (for models that support it) */
|
|
74
|
-
reasoningEffort?: ReasoningEffort;
|
|
75
|
-
/** Service tier (for models that support it: priority = fast, flex = cheap) */
|
|
76
|
-
serviceTier?: ServiceTier;
|
|
77
|
-
}
|
|
78
57
|
export interface ReviewSuccess {
|
|
79
58
|
success: true;
|
|
80
|
-
output:
|
|
81
|
-
rawOutput?: string;
|
|
59
|
+
output: string;
|
|
82
60
|
executionTimeMs: number;
|
|
83
61
|
}
|
|
84
62
|
export interface ReviewFailure {
|
|
@@ -94,20 +72,6 @@ export interface ReviewError {
|
|
|
94
72
|
message: string;
|
|
95
73
|
details?: Record<string, unknown>;
|
|
96
74
|
}
|
|
97
|
-
export interface PeerSuccess {
|
|
98
|
-
success: true;
|
|
99
|
-
output: PeerOutput;
|
|
100
|
-
rawOutput?: string;
|
|
101
|
-
executionTimeMs: number;
|
|
102
|
-
}
|
|
103
|
-
export interface PeerFailure {
|
|
104
|
-
success: false;
|
|
105
|
-
error: ReviewError;
|
|
106
|
-
suggestion?: string;
|
|
107
|
-
rawOutput?: string;
|
|
108
|
-
executionTimeMs: number;
|
|
109
|
-
}
|
|
110
|
-
export type PeerResult = PeerSuccess | PeerFailure;
|
|
111
75
|
/**
|
|
112
76
|
* Base interface that all reviewer adapters must implement.
|
|
113
77
|
* This allows easy addition of new AI CLIs without changing orchestration logic.
|
|
@@ -121,13 +85,11 @@ export interface ReviewerAdapter {
|
|
|
121
85
|
isAvailable(): Promise<boolean>;
|
|
122
86
|
/** Run a review and return structured output */
|
|
123
87
|
runReview(request: ReviewRequest): Promise<ReviewResult>;
|
|
124
|
-
/** Run a general-purpose peer request and return structured output */
|
|
125
|
-
runPeerRequest(request: PeerRequest): Promise<PeerResult>;
|
|
126
88
|
/**
|
|
127
89
|
* Optional: Run peer review of another model's output
|
|
128
90
|
* Future capability - not currently implemented by any adapter
|
|
129
91
|
*/
|
|
130
|
-
runPeerReview?(originalRequest: ReviewRequest, reviewToScore:
|
|
92
|
+
runPeerReview?(originalRequest: ReviewRequest, reviewToScore: string): Promise<ReviewResult>;
|
|
131
93
|
}
|
|
132
94
|
export declare function registerAdapter(adapter: ReviewerAdapter): void;
|
|
133
95
|
export declare function getAdapter(id: string): ReviewerAdapter | undefined;
|
package/dist/adapters/codex.d.ts
CHANGED
|
@@ -2,20 +2,18 @@
|
|
|
2
2
|
* Codex CLI Adapter
|
|
3
3
|
*
|
|
4
4
|
* Implements the ReviewerAdapter interface for OpenAI's Codex CLI.
|
|
5
|
-
*
|
|
5
|
+
* Returns raw text — no JSON parsing or schema enforcement.
|
|
6
|
+
* CC handles interpretation of the reviewer's response.
|
|
6
7
|
*/
|
|
7
|
-
import { ReviewerAdapter, ReviewerCapabilities, ReviewRequest, ReviewResult
|
|
8
|
+
import { ReviewerAdapter, ReviewerCapabilities, ReviewRequest, ReviewResult } from './base.js';
|
|
8
9
|
export declare class CodexAdapter implements ReviewerAdapter {
|
|
9
10
|
readonly id = "codex";
|
|
10
11
|
getCapabilities(): ReviewerCapabilities;
|
|
11
12
|
isAvailable(): Promise<boolean>;
|
|
12
13
|
runReview(request: ReviewRequest): Promise<ReviewResult>;
|
|
13
|
-
private runWithRetry;
|
|
14
|
-
runPeerRequest(request: PeerRequest): Promise<PeerResult>;
|
|
15
|
-
private runPeerWithRetry;
|
|
16
14
|
private runCli;
|
|
15
|
+
private handleException;
|
|
17
16
|
private categorizeError;
|
|
18
17
|
private getSuggestion;
|
|
19
|
-
private parseRetryAfter;
|
|
20
18
|
}
|
|
21
19
|
export declare const codexAdapter: CodexAdapter;
|