council-refine

council-refine is a command for coding agents from intellegix/intellegix-code-agent-toolkit. It costs 0 tokens per session (1,005 once invoked), scanned A, original, MIT.

A command that sends a software plan to several AI models for repeated review and refinement, then uses another model to synthesize the feedback. It can repeat the process until the plan reaches its stopping conditions.

In plain words
What is it for?
Use it to review and improve technical plans with multiple model opinions, scoring, critical-issue checks, and iterative revisions.
Why use it?
It finds weaknesses and missing details in a plan before implementation begins.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/intellegix/intellegix-code-agent-toolkit/council-refine
Clone the repo
git clone --depth 1 https://github.com/intellegix/intellegix-code-agent-toolkit

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for council-refine

README.md
[![agentmods](https://agentmods.dev/badge/commands/intellegix/intellegix-code-agent-toolkit/council-refine.svg)](https://agentmods.dev/commands/intellegix/intellegix-code-agent-toolkit/council-refine)
Your own site
<a href="https://agentmods.dev/commands/intellegix/intellegix-code-agent-toolkit/council-refine"><img src="https://agentmods.dev/badge/commands/intellegix/intellegix-code-agent-toolkit/council-refine.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,005 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01005
Opus 5 $0.00000 $0.00502
Sonnet 5 $0.00000 $0.00201
Haiku 4.5 $0.00000 $0.00101

Measured 3d ago against content hash 499fad53da45, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

council-refine scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/council-refine.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/council-refine — Multi-Model Plan Refinement with Opus 4.6 Synthesis

Submit a plan to 3 frontier AI models (GPT-5.2, Claude Sonnet 4.5, Gemini 3 Pro) via Perplexity API for iterative refinement, with Opus 4.6 extended thinking synthesis. Loop until convergence (score >= 8, no critical issues, score gain < 1) or max 3 iterations.

Prerequisites: PERPLEXITY_API_KEY and ANTHROPIC_API_KEY environment variables set. Python packages installed (pip install perplexityai anthropic).

Input

$ARGUMENTS = The plan text to refine. Can be multi-line.

Workflow

Step 0: Initialize

  • Store the plan text from $ARGUMENTS
  • Set iteration = 1, maxIterations = 3, previousScore = 0

Step 1: Build refinement query

Compose the council query for this iteration:

You are a panel of expert reviewers evaluating a technical implementation plan. Analyze the following plan thoroughly and provide:

1. OVERALL SCORE (1-10): How production-ready is this plan?
2. STRENGTHS: What's well-designed?
3. WEAKNESSES: What needs improvement?
4. CRITICAL ISSUES: Blockers that must be fixed before implementation
5. SPECIFIC IMPROVEMENTS: Concrete, actionable changes with code/architecture suggestions
6. REVISED SECTIONS: Rewritten sections incorporating your feedback

PLAN TO REVIEW (Iteration {iteration}/{maxIterations}):
---
{planText}
---

{If iteration > 1: "PREVIOUS FEEDBACK ADDRESSED: {summary of changes made}"}

IMPORTANT: Include a numeric score (1-10) prominently in your response.

Step 2: Run council query

Call council_query MCP tool with:

  • query: The prompt from Step 1
  • mode: "browser" (Playwright browser automation — no API keys needed, uses Perplexity login)
  • includeContext: true

This runs the full pipeline: 3 parallel Perplexity queries + Opus 4.6 synthesis with extended thinking (~20s total).

Step 3: Read and evaluate

The council_query response contains the Opus synthesis. Extract:

  • Score: From recommended_actions or narrative — look for the numeric score
  • Critical issues: From risks and disagreements
  • Improvements: From recommended_actions and unique_insights

Read the full file on GitHub · 108 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 108 lines · 0 tokens per session scan A 499fad53da45

Subscribe to this mod's changes

council-refine is a command published in the GitHub repository intellegix/intellegix-code-agent-toolkit (57 stars, last pushed 10d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,005 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.