feat(orch): add multi-model consensus skill
Enables agents to query multiple AI models for: - Second opinions on reasoning - Architectural decisions - Devil's advocate analysis - Brainstorming and critique 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
35a357eb9d
commit
0f010d3924
|
|
@ -1,3 +1,4 @@
|
||||||
|
{"id":"skills-25l","title":"Create orch skill for multi-model consensus","description":"Build a skill that exposes orch CLI capabilities to agents for querying multiple AI models","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-11-30T15:43:49.209528963-08:00","updated_at":"2025-11-30T15:47:36.608887453-08:00","closed_at":"2025-11-30T15:47:36.608887453-08:00"}
|
||||||
{"id":"skills-2xo","title":"Add README.md for web-search skill","description":"web-search skill has SKILL.md and scripts but no README.md. AGENTS.md says README.md is for humans, contains installation instructions, usage examples, prerequisites.","status":"open","priority":2,"issue_type":"task","created_at":"2025-11-30T11:58:14.26066025-08:00","updated_at":"2025-11-30T12:00:25.561281052-08:00","dependencies":[{"issue_id":"skills-2xo","depends_on_id":"skills-vb5","type":"blocks","created_at":"2025-11-30T12:01:30.240439018-08:00","created_by":"daemon"}]}
|
{"id":"skills-2xo","title":"Add README.md for web-search skill","description":"web-search skill has SKILL.md and scripts but no README.md. AGENTS.md says README.md is for humans, contains installation instructions, usage examples, prerequisites.","status":"open","priority":2,"issue_type":"task","created_at":"2025-11-30T11:58:14.26066025-08:00","updated_at":"2025-11-30T12:00:25.561281052-08:00","dependencies":[{"issue_id":"skills-2xo","depends_on_id":"skills-vb5","type":"blocks","created_at":"2025-11-30T12:01:30.240439018-08:00","created_by":"daemon"}]}
|
||||||
{"id":"skills-39g","title":"RFC: .skills manifest pattern for per-repo skill deployment","description":"Document the .skills file pattern where projects declare skills in a manifest, .envrc reads it, and agents can query/edit it.","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-11-30T12:37:50.106992381-08:00","updated_at":"2025-11-30T12:43:04.155161727-08:00","closed_at":"2025-11-30T12:43:04.155161727-08:00"}
|
{"id":"skills-39g","title":"RFC: .skills manifest pattern for per-repo skill deployment","description":"Document the .skills file pattern where projects declare skills in a manifest, .envrc reads it, and agents can query/edit it.","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-11-30T12:37:50.106992381-08:00","updated_at":"2025-11-30T12:43:04.155161727-08:00","closed_at":"2025-11-30T12:43:04.155161727-08:00"}
|
||||||
{"id":"skills-3o7","title":"Fix ai-skills.nix missing sha256 hash","description":"modules/ai-skills.nix:16 has empty sha256 placeholder for opencode-skills npm package. Either get actual hash or remove/comment out the incomplete fetchFromNpm approach.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-11-30T11:58:24.404929863-08:00","updated_at":"2025-11-30T12:12:39.372107348-08:00","closed_at":"2025-11-30T12:12:39.372107348-08:00"}
|
{"id":"skills-3o7","title":"Fix ai-skills.nix missing sha256 hash","description":"modules/ai-skills.nix:16 has empty sha256 placeholder for opencode-skills npm package. Either get actual hash or remove/comment out the incomplete fetchFromNpm approach.","status":"closed","priority":2,"issue_type":"bug","created_at":"2025-11-30T11:58:24.404929863-08:00","updated_at":"2025-11-30T12:12:39.372107348-08:00","closed_at":"2025-11-30T12:12:39.372107348-08:00"}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
# List of available skills
|
# List of available skills
|
||||||
availableSkills = [
|
availableSkills = [
|
||||||
"niri-window-capture"
|
"niri-window-capture"
|
||||||
|
"orch"
|
||||||
"screenshot-latest"
|
"screenshot-latest"
|
||||||
"tufte-press"
|
"tufte-press"
|
||||||
"worklog"
|
"worklog"
|
||||||
|
|
|
||||||
45
skills/orch/README.md
Normal file
45
skills/orch/README.md
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
# Orch Skill
|
||||||
|
|
||||||
|
Multi-model AI consensus skill for Claude Code and OpenCode agents.
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
Enables agents to query multiple AI models simultaneously and aggregate their perspectives for:
|
||||||
|
- Second opinions on reasoning
|
||||||
|
- Architectural/design decisions
|
||||||
|
- Devil's advocate analysis
|
||||||
|
- Brainstorming from diverse viewpoints
|
||||||
|
- Code review with multiple perspectives
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Get consensus on a decision
|
||||||
|
orch consensus "Should we use SQLite or PostgreSQL for this use case?" flash gemini claude
|
||||||
|
|
||||||
|
# Devil's advocate
|
||||||
|
orch consensus "Should we adopt microservices?" gpt5:for claude:against flash:neutral
|
||||||
|
|
||||||
|
# Code review with file context
|
||||||
|
orch consensus "Is this approach correct?" flash gemini --file src/handler.py --mode critique
|
||||||
|
```
|
||||||
|
|
||||||
|
## Files
|
||||||
|
|
||||||
|
- `SKILL.md` - Agent instructions and usage patterns (loaded by Claude Code)
|
||||||
|
- `README.md` - Human documentation (this file)
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- `orch` CLI from ~/proj/orch
|
||||||
|
- API keys for llm library providers
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Add `orch` to your project's `.skills` file:
|
||||||
|
|
||||||
|
```
|
||||||
|
orch
|
||||||
|
```
|
||||||
|
|
||||||
|
Then run `direnv reload`.
|
||||||
137
skills/orch/SKILL.md
Normal file
137
skills/orch/SKILL.md
Normal file
|
|
@ -0,0 +1,137 @@
|
||||||
|
---
|
||||||
|
name: orch
|
||||||
|
description: Query multiple AI models for consensus decisions, second opinions, and devil's advocate analysis using the orch CLI.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Orch - Multi-Model Consensus Skill
|
||||||
|
|
||||||
|
Query multiple AI models simultaneously and aggregate their perspectives. Use this when you need:
|
||||||
|
- A second opinion on your reasoning
|
||||||
|
- Multiple perspectives on a decision
|
||||||
|
- Devil's advocate analysis
|
||||||
|
- Brainstorming from diverse viewpoints
|
||||||
|
|
||||||
|
## When to Use
|
||||||
|
|
||||||
|
Invoke this skill when:
|
||||||
|
- Making architectural or design decisions ("Should we use X or Y?")
|
||||||
|
- Reviewing your own proposed solution before presenting to user
|
||||||
|
- The user asks for multiple AI perspectives
|
||||||
|
- You want to stress-test an approach with opposing viewpoints
|
||||||
|
- Complex tradeoffs where different perspectives would help
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
### orch consensus
|
||||||
|
|
||||||
|
Query multiple models for their verdict on a question.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
orch consensus "PROMPT" MODEL1 MODEL2 [MODEL3...]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Model Aliases** (use these):
|
||||||
|
- `flash` → gemini-2.5-flash (fast, cheap)
|
||||||
|
- `gemini` → gemini-3-pro-preview (strong reasoning)
|
||||||
|
- `claude` → claude-sonnet-4.5 (balanced)
|
||||||
|
- `haiku` → claude-haiku-4.5 (fast, cheap)
|
||||||
|
- `opus` → claude-opus-4.1 (strongest)
|
||||||
|
- `gpt` / `gpt5` → gpt-5 (strong reasoning)
|
||||||
|
- `gpt4` → gpt-4o (legacy)
|
||||||
|
|
||||||
|
**Options**:
|
||||||
|
- `--mode vote` (default) - Models give Support/Oppose/Neutral verdict
|
||||||
|
- `--mode brainstorm` - Generate ideas without judgment
|
||||||
|
- `--mode critique` - Find flaws and weaknesses
|
||||||
|
- `--mode open` - Freeform responses, no structured output
|
||||||
|
- `--temperature 0.1` - Lower = more focused (default 0.1)
|
||||||
|
- `--file PATH` - Include file as context
|
||||||
|
- `--enhance` - Use AI to improve prompt before querying
|
||||||
|
|
||||||
|
**Stances** (devil's advocate):
|
||||||
|
Append `:for`, `:against`, or `:neutral` to bias a model's perspective:
|
||||||
|
```bash
|
||||||
|
orch consensus "Should we rewrite in Rust?" gpt5:for claude:against gemini:neutral
|
||||||
|
```
|
||||||
|
|
||||||
|
### orch chat
|
||||||
|
|
||||||
|
Single-model conversation (when you don't need consensus):
|
||||||
|
```bash
|
||||||
|
orch chat "MESSAGE" --model gemini
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage Patterns
|
||||||
|
|
||||||
|
### Quick Second Opinion
|
||||||
|
When you've reasoned through something and want validation:
|
||||||
|
```bash
|
||||||
|
orch consensus "I think we should use SQLite for this because [reasons]. Is this sound?" flash gemini
|
||||||
|
```
|
||||||
|
|
||||||
|
### Architecture Decision
|
||||||
|
When facing a tradeoff:
|
||||||
|
```bash
|
||||||
|
orch consensus "Microservices vs monolith for a 3-person team building an e-commerce site?" flash gemini claude --mode vote
|
||||||
|
```
|
||||||
|
|
||||||
|
### Code Review
|
||||||
|
Include the code as context:
|
||||||
|
```bash
|
||||||
|
orch consensus "Is this error handling approach correct and complete?" flash gemini --file src/handler.py
|
||||||
|
```
|
||||||
|
|
||||||
|
### Devil's Advocate
|
||||||
|
Get opposing viewpoints deliberately:
|
||||||
|
```bash
|
||||||
|
orch consensus "Should we adopt Kubernetes?" gpt5:for claude:against flash:neutral
|
||||||
|
```
|
||||||
|
|
||||||
|
### Brainstorm
|
||||||
|
Generate diverse ideas:
|
||||||
|
```bash
|
||||||
|
orch consensus "How could we improve the CI/CD pipeline?" flash gemini claude --mode brainstorm
|
||||||
|
```
|
||||||
|
|
||||||
|
### Critique Your Work
|
||||||
|
Find weaknesses before presenting:
|
||||||
|
```bash
|
||||||
|
orch consensus "What are the flaws in this API design?" flash gemini --file api-spec.yaml --mode critique
|
||||||
|
```
|
||||||
|
|
||||||
|
## Output Format
|
||||||
|
|
||||||
|
Vote mode returns structured verdicts:
|
||||||
|
```
|
||||||
|
┌─────────────────────────────────────────────────────────────┐
|
||||||
|
│ CONSENSUS: MIXED │
|
||||||
|
│ SUPPORT: 2 OPPOSE: 1 NEUTRAL: 0 │
|
||||||
|
└─────────────────────────────────────────────────────────────┘
|
||||||
|
|
||||||
|
[flash] gemini-2.5-flash - SUPPORT
|
||||||
|
Reasoning: ...
|
||||||
|
|
||||||
|
[gemini] gemini-3-pro-preview - SUPPORT
|
||||||
|
Reasoning: ...
|
||||||
|
|
||||||
|
[claude] claude-sonnet-4.5 - OPPOSE
|
||||||
|
Reasoning: ...
|
||||||
|
```
|
||||||
|
|
||||||
|
## Guidelines
|
||||||
|
|
||||||
|
1. **Use for genuine uncertainty** - Don't use orch for trivial decisions or to avoid thinking
|
||||||
|
2. **Provide context** - Better prompts get better consensus; use `--file` when relevant
|
||||||
|
3. **Choose models wisely** - flash/haiku for quick checks, opus/gpt5 for complex reasoning
|
||||||
|
4. **Consider stances** - Devil's advocate is powerful for stress-testing ideas
|
||||||
|
5. **Parse the reasoning** - The verdict matters less than understanding the reasoning
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- `orch` CLI installed and in PATH (from ~/proj/orch)
|
||||||
|
- API keys configured for llm library (ANTHROPIC_API_KEY, GOOGLE_API_KEY, OPENAI_API_KEY)
|
||||||
|
- Run via: `cd ~/proj/orch && uv run orch ...` if not globally installed
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
See `examples/` directory for sample outputs from different consensus modes.
|
||||||
Loading…
Reference in a new issue