llm-cli-council 1.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/.claude-plugin/marketplace.json +15 -0
- package/.claude-plugin/plugin.json +61 -0
- package/LICENSE +21 -0
- package/README.md +495 -0
- package/bin/install.js +299 -0
- package/config/providers.json +124 -0
- package/lib/platform-utils.sh +353 -0
- package/package.json +46 -0
- package/prompts/chairman-synthesis.md +153 -0
- package/prompts/code-review.md +134 -0
- package/prompts/plan-review.md +106 -0
- package/rules/council-orchestration.md +205 -0
- package/rules/synthesis-strategy.md +246 -0
- package/rules/triggers.md +182 -0
- package/skills/llm-cli-council.md +122 -0
- package/skills/review-code.md +225 -0
- package/skills/review-plan.md +191 -0
- package/skills/setup.md +164 -0
- package/skills/status.md +220 -0
- package/skills/uninstall.md +179 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# Council Triggers
|
|
2
|
+
|
|
3
|
+
These rules define when to automatically invoke the council without explicit command.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Trigger Patterns
|
|
8
|
+
|
|
9
|
+
### Explicit Triggers (Highest Priority)
|
|
10
|
+
|
|
11
|
+
User explicitly requests council:
|
|
12
|
+
|
|
13
|
+
| Pattern | Action |
|
|
14
|
+
|---------|--------|
|
|
15
|
+
| "council review" | Invoke review command |
|
|
16
|
+
| "get council feedback" | Auto-detect type, execute |
|
|
17
|
+
| "ask the council" | Auto-detect type, execute |
|
|
18
|
+
| "llm council" | Auto-detect type, execute |
|
|
19
|
+
| "/llm-cli-council:*" | Execute specified command |
|
|
20
|
+
|
|
21
|
+
### Contextual Triggers
|
|
22
|
+
|
|
23
|
+
When these contexts are detected:
|
|
24
|
+
|
|
25
|
+
| Context | Trigger | Command |
|
|
26
|
+
|---------|---------|---------|
|
|
27
|
+
| Plan exists + "review" mentioned | Auto-suggest | review-plan |
|
|
28
|
+
| Code diff + "review" mentioned | Auto-suggest | review-code |
|
|
29
|
+
| High-stakes decision keywords | Suggest council | review-plan |
|
|
30
|
+
|
|
31
|
+
### High-Stakes Keywords
|
|
32
|
+
|
|
33
|
+
When these appear, suggest council review:
|
|
34
|
+
- "production deployment"
|
|
35
|
+
- "breaking change"
|
|
36
|
+
- "major refactor"
|
|
37
|
+
- "security"
|
|
38
|
+
- "architecture decision"
|
|
39
|
+
- "before we proceed"
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Auto-Detection Logic
|
|
44
|
+
|
|
45
|
+
### Plan vs Code Detection
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
If user mentions "review":
|
|
49
|
+
If PLAN.md exists OR "plan" in request:
|
|
50
|
+
→ review-plan
|
|
51
|
+
Else if code diff exists OR file paths mentioned:
|
|
52
|
+
→ review-code
|
|
53
|
+
Else:
|
|
54
|
+
→ Ask user what to review
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Mode Detection
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
If "sensitive" or "private" or "confidential" in request:
|
|
61
|
+
→ Suggest --mode=privacy
|
|
62
|
+
|
|
63
|
+
If "thorough" or "comprehensive" or "all" in request:
|
|
64
|
+
→ Use --mode=full
|
|
65
|
+
|
|
66
|
+
Default:
|
|
67
|
+
→ Use --mode=quick
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Proactive Suggestions
|
|
73
|
+
|
|
74
|
+
### When to Suggest Council
|
|
75
|
+
|
|
76
|
+
Suggest (don't auto-invoke) when:
|
|
77
|
+
|
|
78
|
+
1. **Plan created** - "Would you like council feedback on this plan?"
|
|
79
|
+
2. **Major PR** - "This is a significant change. Council review recommended."
|
|
80
|
+
3. **Before execution** - "Plan ready. Get council review before executing?"
|
|
81
|
+
|
|
82
|
+
### Suggestion Format
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
Council Review Available
|
|
86
|
+
─────────────────────────
|
|
87
|
+
This [plan/code] could benefit from multi-perspective review.
|
|
88
|
+
|
|
89
|
+
Run: /llm-cli-council:review-[type]
|
|
90
|
+
|
|
91
|
+
Options:
|
|
92
|
+
• --mode=quick (default) - 2 providers, fast feedback
|
|
93
|
+
• --mode=full - All available providers
|
|
94
|
+
• --mode=privacy - Local only, no data sent externally
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Non-Triggers
|
|
100
|
+
|
|
101
|
+
Do NOT invoke council for:
|
|
102
|
+
|
|
103
|
+
- Simple syntax questions
|
|
104
|
+
- Single-file edits
|
|
105
|
+
- Bug fixes with obvious solutions
|
|
106
|
+
- User explicitly declines ("skip council", "no review needed")
|
|
107
|
+
- Already reviewed content
|
|
108
|
+
- Draft/WIP explicitly marked
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Mode Selection Guide
|
|
113
|
+
|
|
114
|
+
### Quick Mode (Default)
|
|
115
|
+
|
|
116
|
+
Use when:
|
|
117
|
+
- Standard reviews
|
|
118
|
+
- Time-sensitive feedback needed
|
|
119
|
+
- Plan is straightforward
|
|
120
|
+
|
|
121
|
+
### Full Mode
|
|
122
|
+
|
|
123
|
+
Suggest when:
|
|
124
|
+
- "thorough" or "comprehensive" requested
|
|
125
|
+
- High-stakes keywords detected
|
|
126
|
+
- User seems uncertain
|
|
127
|
+
- Complex architectural decisions
|
|
128
|
+
|
|
129
|
+
### Privacy Mode
|
|
130
|
+
|
|
131
|
+
Require when:
|
|
132
|
+
- "sensitive", "private", "confidential" mentioned
|
|
133
|
+
- API keys or secrets in content
|
|
134
|
+
- Proprietary business logic
|
|
135
|
+
- User preference set in config
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Integration Points
|
|
140
|
+
|
|
141
|
+
### With Planning Skills
|
|
142
|
+
|
|
143
|
+
If user is using planning skills (e.g., `/gsd:plan-phase`):
|
|
144
|
+
- Suggest council review after plan completion
|
|
145
|
+
- Don't interrupt planning flow
|
|
146
|
+
|
|
147
|
+
### With Code Review Skills
|
|
148
|
+
|
|
149
|
+
If another code review is active:
|
|
150
|
+
- Don't stack reviews
|
|
151
|
+
- Offer council as alternative or supplement
|
|
152
|
+
|
|
153
|
+
### With Execution
|
|
154
|
+
|
|
155
|
+
Before plan execution:
|
|
156
|
+
- Check if council review was done
|
|
157
|
+
- If not, offer quick review opportunity
|
|
158
|
+
- Don't block execution (user choice)
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## User Preferences
|
|
163
|
+
|
|
164
|
+
Stored in `~/.claude/council-config.json`:
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"preferences": {
|
|
169
|
+
"autoSuggest": true,
|
|
170
|
+
"defaultMode": "quick",
|
|
171
|
+
"requirePrivacyFor": ["api", "secret", "password"],
|
|
172
|
+
"skipFor": ["draft", "wip", "test"]
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Preference Overrides
|
|
178
|
+
|
|
179
|
+
- `autoSuggest: false` - Never suggest, only respond to explicit commands
|
|
180
|
+
- `defaultMode` - Change default from "quick"
|
|
181
|
+
- `requirePrivacyFor` - Patterns that force privacy mode
|
|
182
|
+
- `skipFor` - Patterns that suppress suggestions
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: llm-cli-council
|
|
3
|
+
description: Orchestrate multiple LLM CLIs (Claude, Copilot, Codex, Gemini, Ollama) as a "council" to provide diverse perspectives on plans and code
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
author: LLM CLI Council
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# LLM CLI Council
|
|
9
|
+
|
|
10
|
+
A Claude Code skill that leverages multiple LLM command-line tools to provide diverse perspectives through a "council" approach. Claude acts as Chairman, synthesizing insights from multiple AI assistants into clear, actionable guidance.
|
|
11
|
+
|
|
12
|
+
## Why Use a Council?
|
|
13
|
+
|
|
14
|
+
Single LLMs can be biased toward certain solutions. By consulting multiple AI assistants:
|
|
15
|
+
- **Diverse perspectives** catch blind spots
|
|
16
|
+
- **Consensus** builds confidence in recommendations
|
|
17
|
+
- **Dissent** highlights areas needing careful consideration
|
|
18
|
+
|
|
19
|
+
## Anti-Paralysis Principle
|
|
20
|
+
|
|
21
|
+
The council NEVER overwhelms with conflicting advice. Instead, it:
|
|
22
|
+
- Synthesizes into max 5 prioritized recommendations
|
|
23
|
+
- Resolves conflicts with clear reasoning
|
|
24
|
+
- Always provides a decisive APPROVE/REQUEST CHANGES verdict
|
|
25
|
+
|
|
26
|
+
## Available Commands
|
|
27
|
+
|
|
28
|
+
| Command | Description |
|
|
29
|
+
|---------|-------------|
|
|
30
|
+
| `/llm-cli-council:setup` | Detect and configure available LLM CLIs |
|
|
31
|
+
| `/llm-cli-council:review-plan` | Get council review of a plan |
|
|
32
|
+
| `/llm-cli-council:review-code` | Get council review of code changes |
|
|
33
|
+
| `/llm-cli-council:status` | Show council configuration and provider status |
|
|
34
|
+
| `/llm-cli-council:uninstall` | Remove council configuration |
|
|
35
|
+
|
|
36
|
+
## Council Modes
|
|
37
|
+
|
|
38
|
+
| Mode | Providers Used | Use Case |
|
|
39
|
+
|------|----------------|----------|
|
|
40
|
+
| `quick` (default) | 2 best-match providers | Most reviews, fast feedback |
|
|
41
|
+
| `full` | All available providers | High-stakes decisions |
|
|
42
|
+
| `privacy` | Ollama only | Sensitive code, no data leaves machine |
|
|
43
|
+
|
|
44
|
+
## Supported Providers
|
|
45
|
+
|
|
46
|
+
- **Claude** (`claude`) - Anthropic's CLI
|
|
47
|
+
- **Copilot** (`copilot`) - GitHub Copilot CLI
|
|
48
|
+
- **Codex** (`codex`) - OpenAI Codex CLI
|
|
49
|
+
- **Gemini** (`gemini`) - Google Gemini CLI
|
|
50
|
+
- **Ollama** (`ollama`) - Local LLM runner
|
|
51
|
+
|
|
52
|
+
## Configuration
|
|
53
|
+
|
|
54
|
+
The council uses environment variables for flexible path configuration:
|
|
55
|
+
|
|
56
|
+
| Variable | Default | Description |
|
|
57
|
+
|----------|---------|-------------|
|
|
58
|
+
| `CLAUDE_COUNCIL_CONFIG_DIR` | `~/.config/claude/council/` | Config directory location |
|
|
59
|
+
| `CLAUDE_COUNCIL_CONFIG_FILE` | `$COUNCIL_CONFIG_DIR/config.json` | Specific config file |
|
|
60
|
+
| `CLAUDE_COUNCIL_LOG_DIR` | `$COUNCIL_CONFIG_DIR/logs/` | Log directory |
|
|
61
|
+
| `CLAUDE_SKILLS_DIR` | `~/.claude/skills/` | Skills installation directory |
|
|
62
|
+
| `CLAUDE_CONFIG_DIR` | `~/.claude/` | Claude's main config directory |
|
|
63
|
+
|
|
64
|
+
**Path Resolution Priority:**
|
|
65
|
+
1. `$CLAUDE_COUNCIL_CONFIG_DIR` (explicit override)
|
|
66
|
+
2. `$CLAUDE_CONFIG_DIR/council/` (Claude config + council subdir)
|
|
67
|
+
3. `$XDG_CONFIG_HOME/claude/council/` (XDG standard on Linux)
|
|
68
|
+
4. `~/.config/claude/council/` (XDG fallback)
|
|
69
|
+
5. `~/.claude/council/` (legacy compatibility)
|
|
70
|
+
|
|
71
|
+
## Quick Start
|
|
72
|
+
|
|
73
|
+
1. Run `/llm-cli-council:setup` to detect available CLIs
|
|
74
|
+
2. Run `/llm-cli-council:review-plan` on your PLAN.md
|
|
75
|
+
3. Receive synthesized council feedback with clear recommendations
|
|
76
|
+
|
|
77
|
+
## Usage Examples
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
# Review current plan with 2 providers (quick mode)
|
|
81
|
+
/llm-cli-council:review-plan
|
|
82
|
+
|
|
83
|
+
# Full council review with all providers
|
|
84
|
+
/llm-cli-council:review-plan --mode=full
|
|
85
|
+
|
|
86
|
+
# Privacy mode - only local Ollama
|
|
87
|
+
/llm-cli-council:review-plan --mode=privacy
|
|
88
|
+
|
|
89
|
+
# Review specific file
|
|
90
|
+
/llm-cli-council:review-plan path/to/plan.md
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## How It Works
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
Stage 1: Independent Review
|
|
97
|
+
├── Execute prompts in parallel across providers
|
|
98
|
+
├── Each provider reviews independently
|
|
99
|
+
└── No cross-contamination of opinions
|
|
100
|
+
|
|
101
|
+
Stage 2: Collect & Analyze
|
|
102
|
+
├── Gather all responses
|
|
103
|
+
├── Identify: CONSENSUS | CONCERNS | DISSENT
|
|
104
|
+
└── Weight responses by domain expertise
|
|
105
|
+
|
|
106
|
+
Stage 3: Chairman Synthesis (Claude)
|
|
107
|
+
├── Resolve conflicts with reasoning
|
|
108
|
+
├── Create max 5 prioritized recommendations
|
|
109
|
+
├── Provide clear APPROVE/REQUEST CHANGES verdict
|
|
110
|
+
└── Present unified guidance
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Configuration
|
|
114
|
+
|
|
115
|
+
Council configuration is stored in `~/.claude/council-config.json` after running setup.
|
|
116
|
+
|
|
117
|
+
## Rules
|
|
118
|
+
|
|
119
|
+
The council follows strict rules defined in:
|
|
120
|
+
- `rules/council-orchestration.md` - How to coordinate multiple LLMs
|
|
121
|
+
- `rules/synthesis-strategy.md` - How to merge conflicting opinions
|
|
122
|
+
- `rules/triggers.md` - When to automatically invoke council
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: llm-cli-council:review-code
|
|
3
|
+
description: Get council review of code changes from multiple LLM providers
|
|
4
|
+
invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# LLM CLI Council - Review Code
|
|
8
|
+
|
|
9
|
+
This command orchestrates multiple LLM CLIs to review code changes and synthesizes their feedback.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/llm-cli-council:review-code [target] [--mode=quick|full|privacy]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Arguments
|
|
18
|
+
|
|
19
|
+
| Argument | Description | Default |
|
|
20
|
+
|----------|-------------|---------|
|
|
21
|
+
| `target` | File path, git ref, or "staged" | Staged changes (`git diff --cached`) |
|
|
22
|
+
| `--mode` | Council mode | `quick` (2 providers) |
|
|
23
|
+
|
|
24
|
+
### Target Options
|
|
25
|
+
|
|
26
|
+
| Target | Description |
|
|
27
|
+
|--------|-------------|
|
|
28
|
+
| `staged` | Review staged git changes |
|
|
29
|
+
| `HEAD` | Review last commit |
|
|
30
|
+
| `HEAD~3..HEAD` | Review last 3 commits |
|
|
31
|
+
| `main..HEAD` | Review all commits since main |
|
|
32
|
+
| `path/to/file.js` | Review specific file |
|
|
33
|
+
| `path/to/dir/` | Review all files in directory |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Execution Flow
|
|
38
|
+
|
|
39
|
+
### Step 1: Load Configuration
|
|
40
|
+
|
|
41
|
+
Read council configuration from `$COUNCIL_CONFIG_FILE`.
|
|
42
|
+
|
|
43
|
+
If config doesn't exist:
|
|
44
|
+
```
|
|
45
|
+
Council not configured. Run /llm-cli-council:setup first.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Step 2: Get Code Content
|
|
49
|
+
|
|
50
|
+
Based on target:
|
|
51
|
+
|
|
52
|
+
**Staged changes (default):**
|
|
53
|
+
```bash
|
|
54
|
+
git diff --cached
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Git ref:**
|
|
58
|
+
```bash
|
|
59
|
+
git diff {ref}
|
|
60
|
+
# or
|
|
61
|
+
git show {ref}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**File/directory:**
|
|
65
|
+
```bash
|
|
66
|
+
cat {file}
|
|
67
|
+
# or
|
|
68
|
+
find {dir} -type f -exec cat {} \;
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Step 3: Select Providers
|
|
72
|
+
|
|
73
|
+
Based on mode and task routing for `code-review`:
|
|
74
|
+
- **quick**: Codex, Copilot (preferred) or Claude (fallback)
|
|
75
|
+
- **full**: All available
|
|
76
|
+
- **privacy**: Ollama only
|
|
77
|
+
|
|
78
|
+
### Step 4: Build Review Prompts
|
|
79
|
+
|
|
80
|
+
For each selected provider:
|
|
81
|
+
1. Load `${CLAUDE_PLUGIN_ROOT}/prompts/code-review.md` template
|
|
82
|
+
2. Substitute `{CODE_CONTENT}` with diff/code
|
|
83
|
+
3. Substitute `{FILE_LIST}` with affected files
|
|
84
|
+
4. Apply provider-specific prefix adjustments
|
|
85
|
+
|
|
86
|
+
### Step 5: Execute Parallel Reviews
|
|
87
|
+
|
|
88
|
+
Same pattern as review-plan - parallel execution with timeout handling.
|
|
89
|
+
|
|
90
|
+
### Step 6: Collect & Parse Responses
|
|
91
|
+
|
|
92
|
+
Parse structured sections:
|
|
93
|
+
- RATING
|
|
94
|
+
- ISSUES (by severity)
|
|
95
|
+
- RECOMMENDATIONS
|
|
96
|
+
- VERDICT
|
|
97
|
+
|
|
98
|
+
### Step 7: Chairman Synthesis
|
|
99
|
+
|
|
100
|
+
Synthesize with code-review-specific weighting:
|
|
101
|
+
- Codex and Copilot weighted higher for code issues
|
|
102
|
+
- Severity aggregation across providers
|
|
103
|
+
- Deduplicate same issue found by multiple providers
|
|
104
|
+
|
|
105
|
+
### Step 8: Present Results
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
COUNCIL CODE REVIEW
|
|
109
|
+
═══════════════════════════════════════════════════════
|
|
110
|
+
|
|
111
|
+
Target: staged changes (3 files)
|
|
112
|
+
Providers: Codex, Copilot
|
|
113
|
+
Mode: quick
|
|
114
|
+
|
|
115
|
+
FILES REVIEWED:
|
|
116
|
+
• src/api/auth.ts
|
|
117
|
+
• src/utils/validation.ts
|
|
118
|
+
• tests/auth.test.ts
|
|
119
|
+
|
|
120
|
+
CRITICAL ISSUES:
|
|
121
|
+
• src/api/auth.ts:45 - SQL injection vulnerability
|
|
122
|
+
Found by: Codex, Copilot (CONSENSUS)
|
|
123
|
+
Fix: Use parameterized queries
|
|
124
|
+
|
|
125
|
+
HIGH ISSUES:
|
|
126
|
+
• src/utils/validation.ts:23 - Missing null check
|
|
127
|
+
Found by: Codex
|
|
128
|
+
Fix: Add guard clause before access
|
|
129
|
+
|
|
130
|
+
MEDIUM ISSUES:
|
|
131
|
+
• src/api/auth.ts:78 - Complex function (cyclomatic: 12)
|
|
132
|
+
Found by: Copilot
|
|
133
|
+
Assessment: Valid but not blocking
|
|
134
|
+
|
|
135
|
+
RECOMMENDATIONS (prioritized):
|
|
136
|
+
1. Fix SQL injection immediately [Quick]
|
|
137
|
+
2. Add null check in validation [Quick]
|
|
138
|
+
3. Consider splitting auth function [Short]
|
|
139
|
+
|
|
140
|
+
PROVIDER VERDICTS:
|
|
141
|
+
Codex: REQUEST CHANGES (HIGH) - Security issue
|
|
142
|
+
Copilot: REQUEST CHANGES (HIGH) - Security issue
|
|
143
|
+
|
|
144
|
+
FINAL VERDICT: REQUEST CHANGES
|
|
145
|
+
Reasoning: Critical SQL injection vulnerability must be fixed
|
|
146
|
+
before merge. Both providers flagged this with high confidence.
|
|
147
|
+
|
|
148
|
+
═══════════════════════════════════════════════════════
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Issue Aggregation
|
|
154
|
+
|
|
155
|
+
### Same Issue, Multiple Providers
|
|
156
|
+
|
|
157
|
+
When providers identify the same issue:
|
|
158
|
+
1. Mark as CONSENSUS
|
|
159
|
+
2. Use most specific file:line reference
|
|
160
|
+
3. Combine fix suggestions
|
|
161
|
+
4. Elevate severity if any provider rates higher
|
|
162
|
+
|
|
163
|
+
### Conflicting Severity
|
|
164
|
+
|
|
165
|
+
If providers disagree on severity:
|
|
166
|
+
- Security issues: Use highest severity (conservative)
|
|
167
|
+
- Style issues: Use lowest severity (pragmatic)
|
|
168
|
+
- Other: Chairman decides based on context
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Error Handling
|
|
173
|
+
|
|
174
|
+
### No Git Repository
|
|
175
|
+
```
|
|
176
|
+
Error: Not in a git repository.
|
|
177
|
+
For non-git code review, specify file path:
|
|
178
|
+
/llm-cli-council:review-code path/to/file.js
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### No Changes to Review
|
|
182
|
+
```
|
|
183
|
+
No staged changes found. Options:
|
|
184
|
+
1. Stage changes: git add <files>
|
|
185
|
+
2. Review specific commit: /llm-cli-council:review-code HEAD
|
|
186
|
+
3. Review file directly: /llm-cli-council:review-code path/to/file
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Large Diff Warning
|
|
190
|
+
```
|
|
191
|
+
Warning: Diff is large (>1000 lines).
|
|
192
|
+
This may result in incomplete reviews or timeouts.
|
|
193
|
+
|
|
194
|
+
Options:
|
|
195
|
+
1. Continue anyway
|
|
196
|
+
2. Review specific files instead
|
|
197
|
+
3. Split into smaller chunks
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Integration
|
|
203
|
+
|
|
204
|
+
### With Git Workflow
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# Review before commit
|
|
208
|
+
git add .
|
|
209
|
+
/llm-cli-council:review-code staged
|
|
210
|
+
|
|
211
|
+
# Review before push
|
|
212
|
+
/llm-cli-council:review-code main..HEAD
|
|
213
|
+
|
|
214
|
+
# Review specific PR
|
|
215
|
+
/llm-cli-council:review-code origin/main..feature-branch
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### With Other Review Tools
|
|
219
|
+
|
|
220
|
+
Council review complements (doesn't replace):
|
|
221
|
+
- Linters (ESLint, Pylint)
|
|
222
|
+
- Type checkers (TypeScript, mypy)
|
|
223
|
+
- Security scanners (Snyk, CodeQL)
|
|
224
|
+
|
|
225
|
+
Run automated tools first, then council for logic review.
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: llm-cli-council:review-plan
|
|
3
|
+
description: Get council review of an implementation plan from multiple LLM providers
|
|
4
|
+
invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# LLM CLI Council - Review Plan
|
|
8
|
+
|
|
9
|
+
This command orchestrates multiple LLM CLIs to review an implementation plan and synthesizes their feedback.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/llm-cli-council:review-plan [plan-file] [--mode=quick|full|privacy]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Arguments
|
|
18
|
+
|
|
19
|
+
| Argument | Description | Default |
|
|
20
|
+
|----------|-------------|---------|
|
|
21
|
+
| `plan-file` | Path to plan file | Auto-detect PLAN.md in current/project directory |
|
|
22
|
+
| `--mode` | Council mode | `quick` (2 providers) |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Execution Flow
|
|
27
|
+
|
|
28
|
+
### Step 1: Load Configuration
|
|
29
|
+
|
|
30
|
+
Read council configuration from `$COUNCIL_CONFIG_FILE`.
|
|
31
|
+
|
|
32
|
+
If config doesn't exist:
|
|
33
|
+
```
|
|
34
|
+
Council not configured. Run /llm-cli-council:setup first.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Step 2: Locate Plan Content
|
|
38
|
+
|
|
39
|
+
Priority order:
|
|
40
|
+
1. Explicit file path argument
|
|
41
|
+
2. `PLAN.md` in current directory
|
|
42
|
+
3. `PLAN.md` in `.planning/` directory
|
|
43
|
+
4. Ask user to provide plan content
|
|
44
|
+
|
|
45
|
+
### Step 3: Select Providers
|
|
46
|
+
|
|
47
|
+
Based on mode:
|
|
48
|
+
|
|
49
|
+
**quick (default):**
|
|
50
|
+
- Read `${CLAUDE_PLUGIN_ROOT}/config/providers.json` task routing for `plan-review`
|
|
51
|
+
- Select top 2 available providers by routing priority
|
|
52
|
+
- Preferred: Claude, Codex. Fallback: Gemini
|
|
53
|
+
|
|
54
|
+
**full:**
|
|
55
|
+
- Use all available providers from config
|
|
56
|
+
|
|
57
|
+
**privacy:**
|
|
58
|
+
- Use only Ollama (if available)
|
|
59
|
+
- Error if Ollama not configured
|
|
60
|
+
|
|
61
|
+
### Step 4: Build Review Prompts
|
|
62
|
+
|
|
63
|
+
For each selected provider:
|
|
64
|
+
1. Load `${CLAUDE_PLUGIN_ROOT}/prompts/plan-review.md` template
|
|
65
|
+
2. Substitute `{PLAN_CONTENT}` with actual plan
|
|
66
|
+
3. Apply provider-specific prefix adjustments
|
|
67
|
+
4. Prepare CLI invocation command
|
|
68
|
+
|
|
69
|
+
### Step 5: Execute Parallel Reviews
|
|
70
|
+
|
|
71
|
+
Run all provider CLIs in parallel using background execution:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Example parallel execution
|
|
75
|
+
claude -p --print "{prompt}" &
|
|
76
|
+
codex exec "{prompt}" &
|
|
77
|
+
wait
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Timeout handling:
|
|
81
|
+
- Default: 120 seconds per provider
|
|
82
|
+
- On timeout: Log warning, continue with remaining providers
|
|
83
|
+
- Minimum quorum: 2 providers must respond
|
|
84
|
+
|
|
85
|
+
### Step 6: Collect Responses
|
|
86
|
+
|
|
87
|
+
Parse each provider response:
|
|
88
|
+
1. Extract structured sections (RATING, GAPS, RISKS, RECOMMENDATIONS, VERDICT)
|
|
89
|
+
2. Handle malformed responses gracefully
|
|
90
|
+
3. Track which providers responded successfully
|
|
91
|
+
|
|
92
|
+
### Step 7: Chairman Synthesis
|
|
93
|
+
|
|
94
|
+
1. Load `${CLAUDE_PLUGIN_ROOT}/prompts/chairman-synthesis.md`
|
|
95
|
+
2. Format all provider reviews into synthesis prompt
|
|
96
|
+
3. Claude (as Chairman) synthesizes into unified guidance
|
|
97
|
+
4. Apply anti-paralysis rules (max 5 recommendations, clear verdict)
|
|
98
|
+
|
|
99
|
+
### Step 8: Present Results
|
|
100
|
+
|
|
101
|
+
Display formatted council review:
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
COUNCIL REVIEW
|
|
105
|
+
═══════════════════════════════════════════════════════
|
|
106
|
+
|
|
107
|
+
Providers consulted: Claude, Codex
|
|
108
|
+
Mode: quick
|
|
109
|
+
|
|
110
|
+
CONSENSUS (Both agree):
|
|
111
|
+
• Plan lacks error handling section
|
|
112
|
+
• Database migration strategy is solid
|
|
113
|
+
|
|
114
|
+
CONCERNS (Raised by at least one):
|
|
115
|
+
• Testing strategy unclear — Raised by: Codex
|
|
116
|
+
Assessment: Valid - add testing section
|
|
117
|
+
|
|
118
|
+
DISSENTING VIEWS:
|
|
119
|
+
• Deployment approach: Claude prefers blue-green, Codex prefers canary
|
|
120
|
+
Resolution: Blue-green is simpler for this scale - go with Claude's recommendation
|
|
121
|
+
|
|
122
|
+
RECOMMENDATIONS (prioritized):
|
|
123
|
+
1. Add error handling section [Quick]
|
|
124
|
+
2. Clarify testing strategy [Quick]
|
|
125
|
+
3. Consider adding rollback plan [Short]
|
|
126
|
+
|
|
127
|
+
PROVIDER VERDICTS:
|
|
128
|
+
Claude: APPROVE (HIGH)
|
|
129
|
+
Codex: REQUEST CHANGES (MEDIUM)
|
|
130
|
+
|
|
131
|
+
FINAL VERDICT: REQUEST CHANGES
|
|
132
|
+
Reasoning: While the plan is solid, the missing testing strategy
|
|
133
|
+
is a significant gap that should be addressed before implementation.
|
|
134
|
+
|
|
135
|
+
═══════════════════════════════════════════════════════
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Error Handling
|
|
141
|
+
|
|
142
|
+
### No Providers Available
|
|
143
|
+
```
|
|
144
|
+
Error: No council providers available.
|
|
145
|
+
Run /llm-cli-council:setup to configure providers.
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Single Provider Only
|
|
149
|
+
```
|
|
150
|
+
Warning: Only 1 provider responded. Results may lack diversity.
|
|
151
|
+
Consider running with --mode=full or checking provider status.
|
|
152
|
+
|
|
153
|
+
[Present single review with disclaimer]
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### All Providers Timeout
|
|
157
|
+
```
|
|
158
|
+
Error: All providers timed out.
|
|
159
|
+
- Check network connectivity
|
|
160
|
+
- Verify provider authentication: /llm-cli-council:status
|
|
161
|
+
- Try privacy mode with local Ollama: --mode=privacy
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Plan Not Found
|
|
165
|
+
```
|
|
166
|
+
No plan found. Please provide:
|
|
167
|
+
1. Path to plan file: /llm-cli-council:review-plan ./my-plan.md
|
|
168
|
+
2. Create PLAN.md in current directory
|
|
169
|
+
3. Paste plan content when prompted
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## CLI Invocation Reference
|
|
175
|
+
|
|
176
|
+
| Provider | Command |
|
|
177
|
+
|----------|---------|
|
|
178
|
+
| Claude | `claude -p --print "{prompt}"` |
|
|
179
|
+
| Codex | `codex exec "{prompt}"` |
|
|
180
|
+
| Copilot | `copilot --prompt "{prompt}" --allow-all-tools` |
|
|
181
|
+
| Gemini | `gemini "{prompt}"` |
|
|
182
|
+
| Ollama | `ollama run gpt-oss:20b "{prompt}"` |
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Output Options
|
|
187
|
+
|
|
188
|
+
Future enhancement ideas:
|
|
189
|
+
- `--json` - Output as JSON for programmatic use
|
|
190
|
+
- `--brief` - Only show verdict and top 3 recommendations
|
|
191
|
+
- `--save` - Save full council review to file
|