multi-perspective-planning
Skill48 starsChanged 5 months agoMITView on GitHub
Run a multi-perspective planning process for non-trivial design decisions. Use when: the shape of a solution is uncertain, planning new language features, new passes, API changes, AST restructuring, or cross-cutting concerns. Spawns four competing sub-planners, synthesises with rebuttal resolution, and stress-tests via adversarial review. Supports checkpointing so planning can be restarted at any step.
In this repository7 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- code-reviewSkill
- finalize-prSkill
- opa-compat-checkSkill
- regocpp-builtinsSkill
- rego-fuzzerSkill
- trieste-devSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. About 0 are common, 17 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Run four sub-planners in parallel to generate competing plans, synthesise them with explicit rebuttal resolution, then stress-test the …
- Distinctive: line 13
Use the full process for design decisions where the shape of the solution is uncertain: new language features, new passes, API changes, AST …
- Distinctive: line 50
When the user says "resume planning" or "restart from step N":
- Very specific: line 52
Read the checkpoint directory .copilot/planning/<task-slug>/
- Distinctive: line 55
If the user specifies a step number, discard checkpoints for that step and later, then re-run from that step using earlier checkpoint data …
- Distinctive: line 76
Before spawning any planners, gather sufficient context about the task:
- Distinctive: line 78
Read the relevant source files, WF definitions, and existing tests.
- Very specific: line 83
Checkpoint: Write .copilot/planning/<task-slug>/step-0-context.md with the task description, files read, and context summary.
- Very specific: line 99
Checkpoint: Write .copilot/planning/<task-slug>/step-1-sub-plans.md with each lens plan under its own heading.
- Distinctive: line 103
Read all four lens outputs and identify *substantive design conflicts* — cases where two or more lenses propose incompatible approaches …
- Distinctive: line 105
If conflicts are found:
- Distinctive: line 108
If no substantive conflicts are found, skip this step entirely.
- Very specific: line 110
Checkpoint: Write .copilot/planning/<task-slug>/step-2-rebuttals.md with identified conflicts and rebuttal arguments (or note that no …
- Distinctive: line 123
All four build sub-plans (labelled by perspective).
- Distinctive: line 127
When rebuttals are present, synthesis receives structured arguments for each side rather than inferring them.
- Very specific: line 129
Checkpoint: Write .copilot/planning/<task-slug>/step-3-synthesis.md with the evaluation and synthesised plan.
- Distinctive: line 133
Run an iterative adversarial review loop on the draft plan from Step 3:
- Distinctive: line 141
ACKNOWLEDGED: no plan change required.
- Distinctive: line 143
If any MUST-ADDRESS or SHOULD-ADDRESS findings required plan changes, spawn a different adversarial subagent to review the revised plan.
- Distinctive: line 145
If the loop has run 5 times without converging, proceed to Step 5 anyway — present the remaining unresolved findings to the user for …
- Very specific: line 147
Checkpoint: Write .copilot/planning/<task-slug>/step-4-adversarial.md after each iteration (overwrite with cumulative iterations as …
- Very specific: line 160
Checkpoint: Write .copilot/planning/<task-slug>/step-5-final.md with the final plan and summary.
- Distinctive: line 170
Always write checkpoints: after completing each step, even if the step was trivial or skipped (write with empty data arrays).
- Distinctive: line 171
When resuming, announce the resume point to the user: "Resuming planning for '<task-slug>' from Step N."
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Multi-perspective Planning Process
Run four sub-planners in parallel to generate competing plans, synthesise them with explicit rebuttal resolution, then stress-test the result with an adversarial review loop before presenting for approval.
When to Use
Use the full process for design decisions where the shape of the solution is uncertain: new language features, new passes, API changes, AST restructuring, or cross-cutting concerns that touch multiple pipeline stages.
For tasks that are primarily implementation of a well-understood algorithm (e.g. a new built-in function with a clear OPA specification), a single conservative plan with emphasis on incremental testing is sufficient. Use the full process when the design is uncertain, not when the algorithm is known.
Checkpointing
Each step writes a checkpoint file to .copilot/planning/<task-slug>/ so that planning can be resumed at any point if the session is interrupted or the user wants to restart from a specific step.
Checkpoint format
Each checkpoint is a markdown file with YAML frontmatter, named step-<N>-<name>.md. The frontmatter carries metadata; the body carries the natural-language content (plans, evaluations, rebuttals) in readable markdown.
---
task_slug: <task-slug>
step: <N>
step_name: <name>
timestamp: <ISO-8601>
status: completed
---
<step content in markdown>Checkpoint files by step
| Step | File | Body contents |
| 0 | step-0-context.md | Task description, files read, context summary |
| 1 | step-1-sub-plans.md | Each lens plan under its own ## Heading |
| 2 | step-2-rebuttals.md | Identified conflicts and rebuttal arguments (or "No conflicts found") |
| 3 | step-3-synthesis.md | Evaluation and synthesised plan |
| 4 | step-4-adversarial.md | Each iteration's findings and revisions as separate sections |
| 5 | step-5-final.md | Final plan and summary |
Resuming from a checkpoint
When the user says "resume planning" or "restart from step N":
- Read the checkpoint directory
.copilot/planning/<task-slug>/ - Find the highest completed step checkpoint
- Load its data and continue from the next step
- If the user specifies a step number, discard checkpoints for that step and later, then re-run from that step using earlier checkpoint data as input
Task slug
Derive the task slug from the first invocation: lowercase the task description, replace non-alphanumeric characters with hyphens, truncate to 50 characters. Store the slug in every checkpoint for cross-reference.
Using checkpoints as subagent context
Because checkpoint files are plain markdown, subagents can read them directly using file tools. Instead of inlining all prior context into a subagent prompt, point the subagent at the checkpoint files:
- Tell the subagent the checkpoint directory path (
.copilot/planning/<task-slug>/). - Instruct it to read the specific checkpoint files it needs (e.g., "Read
step-0-context.mdfor the task description andstep-1-sub-plans.mdfor the competing plans"). - This keeps prompts short, avoids token duplication, and ensures subagents always see the full untruncated content.
For example, when spawning the synthesis-lens agent in Step 3, instead of pasting all four plans inline, prompt it with:
Read
.copilot/planning/<task-slug>/step-0-context.mdfor the task description,step-1-sub-plans.mdfor the four competing plans, andstep-2-rebuttals.mdfor any rebuttal arguments. Then produce a synthesised plan.
Procedure
Step 0 — Gather context
Before spawning any planners, gather sufficient context about the task:
- Read the relevant source files, WF definitions, and existing tests.
- Inspect OPA's reference implementation if the feature involves OPA compatibility.
- Identify affected passes, tokens, and API surfaces.
- Summarise the gathered context into a task description that all subagents will receive.
Checkpoint: Write .copilot/planning/<task-slug>/step-0-context.md with the task description, files read, and context summary.
Step 1 — Gather sub-plans
Spawn four fresh subagents in parallel using the lens agents. Each agent receives the same task description and context but plans through a different lens:
| Agent | Focus |
speed-lens | Runtime performance, low allocations, minimal passes, cache efficiency |
security-lens | Defence in depth, safe error handling, bounded resources, fuzz coverage |
usability-lens | Clarity, readability, correctness, consistent naming, one-concept-per-pass |
conservative-lens | Smallest diff, maximum reuse, no speculative generality, backwards compat |
Prompt each agent with:
Here is the task: [task description and relevant context]. Produce a numbered plan following the output format defined in your instructions.
Checkpoint: Write .copilot/planning/<task-slug>/step-1-sub-plans.md with each lens plan under its own heading.
Step 2 — Identify conflicts and run rebuttals
Read all four lens outputs and identify substantive design conflicts — cases where two or more lenses propose incompatible approaches ("use A" vs. "use B" where both cannot coexist). Different emphasis on the same approach is not a conflict.
If conflicts are found:
- For each conflict, spawn the disagreeing lens agents in parallel (fresh subagents, by name). Each receives: (a) the specific conflict description, (b) its own original recommendation, (c) the opposing recommendation(s), and (d) instructions to make its strongest case for why its approach should be chosen, directly addressing the opponent's arguments.
- One rebuttal round only — no counter-rebuttals. The adversarial review loop (Step 4) catches remaining issues.
- If no substantive conflicts are found, skip this step entirely.
Checkpoint: Write .copilot/planning/<task-slug>/step-2-rebuttals.md with identified conflicts and rebuttal arguments (or note that no conflicts were found).
Step 3 — Evaluate and synthesise
Review the four sub-plans yourself and produce a short evaluation covering:
- Convergence: where two or more planners agree on the same approach. High convergence suggests a clearly correct design.
- Unique insights: ideas that appear in only one plan and are worth incorporating.
- Conflicts: where plans disagree. For each conflict, summarise the rebuttal arguments from each side (if rebuttals were run) and state which perspective you favour and why.
- Gaps: anything none of the four plans addressed.
Then spawn a fresh synthesis-lens subagent. Provide it with:
- The original task description.
- All four build sub-plans (labelled by perspective).
- Any rebuttal arguments (labelled by conflict and perspective).
- Your evaluation.
When rebuttals are present, synthesis receives structured arguments for each side rather than inferring them. The synthesis subagent must engage with the specific rebuttal arguments made rather than ignoring them.
Checkpoint: Write .copilot/planning/<task-slug>/step-3-synthesis.md with the evaluation and synthesised plan.
Step 4 — Adversarial review loop
Run an iterative adversarial review loop on the draft plan from Step 3:
- Spawn a subagent using the
adversarial-lensagent. Provide it with the original task description, context, and the current draft plan. Prompt it with:Here is the plan: [draft plan]. Your job is to break it — find hidden assumptions, untested edge cases, semantic divergence from OPA, stale-state bugs, off-by-one errors, consensus blind spots, and failure modes. Produce an attack report following the output format defined in your instructions. Classify each finding as MUST-ADDRESS, SHOULD-ADDRESS, or ACKNOWLEDGED (risk accepted).
- Review the adversarial report yourself. For each finding:
- MUST-ADDRESS: revise the plan to include a specific mitigation step.
- SHOULD-ADDRESS: revise the plan if the fix is low-cost; otherwise note the accepted risk.
- ACKNOWLEDGED: no plan change required.
- If any MUST-ADDRESS or SHOULD-ADDRESS findings required plan changes, spawn a different adversarial subagent to review the revised plan. Repeat until the adversarial review finds no new MUST-ADDRESS issues.
- If the loop has run 5 times without converging, proceed to Step 5 anyway — present the remaining unresolved findings to the user for decision.
Checkpoint: Write .copilot/planning/<task-slug>/step-4-adversarial.md after each iteration (overwrite with cumulative iterations as separate sections).
Step 5 — Present for approval
Present the final plan to the user along with a brief summary of:
- Key points of agreement across the build sub-planners.
- Notable trade-offs made during synthesis.
- Conflicts resolved via rebuttals and which perspective prevailed.
- Any minority opinions from individual sub-planners that were overruled.
- Adversarial attacks that were addressed and how, plus any that were acknowledged but not mitigated (with rationale).
- Number of adversarial review iterations and key issues caught.
- Any unresolved adversarial findings (if the loop hit the 5-iteration cap).
Checkpoint: Write .copilot/planning/<task-slug>/step-5-final.md with the final plan and summary.
Execution Rules
- Fresh subagents for each phase (lens, rebuttal, synthesis, adversarial review) — no context contamination.
- Four constructive lens subagents run in parallel; conflict identification, rebuttals, synthesis, adversarial review, and user-facing presentation run sequentially.
- Rebuttal subagents for a single conflict run in parallel with each other (they argue independently).
- Lens phases are independent — do not allow one lens's output to shape another's. Rebuttals are a second pass; the original independent outputs are preserved and forwarded to synthesis alongside rebuttals.
- Synthesis must resolve disagreements explicitly, not average them away. When rebuttals are available, synthesis must engage with the arguments made rather than ignoring them.
- The adversarial review loop is mandatory before presenting to the user. Each iteration uses a fresh adversarial subagent.
- Always write checkpoints after completing each step, even if the step was trivial or skipped (write with empty data arrays).
- When resuming, announce the resume point to the user: "Resuming planning for '
<task-slug>' from Step N."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

