-
Notifications
You must be signed in to change notification settings - Fork 9
[agent.command][#558] Merge mega-planner into .claude-plugin #571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Introduces a dual-proposer architecture for implementation planning: - bold-proposer and paranoia-proposer generate opposing proposals - proposal-critique, proposal-reducer, code-reducer analyze both - partial-consensus skill synthesizes results with developer arbitration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…istory tables - Update Selection History: add Row Granularity note, Options Summary column, example row - Update Refine History: simplify to 2 columns (Timestamp, Summary), add Row Granularity note Resolves issue #1 with selections: 1B (Options Summary), 2-column Refine History, 3A+3B hybrid style. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
[#1][docs] Add explicit field format specs for Selection and Refine History tables
- Move 5 mega-planner agents from .claude/ to .claude-plugin/agents/ with mega- prefix - Move mega-planner and sibyl commands to .claude-plugin/commands/ - Update subagent_type references from mega-planner: to agentize:mega- - Remove /plan ultrathink directive from all mega-planner agents - Add agents README documenting both ultra-planner and mega-planner systems - Delete source files from .claude/ after migration Agents migrated: - mega-bold-proposer - mega-paranoia-proposer - mega-proposal-critique - mega-proposal-reducer - mega-code-reducer Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates the mega-planner multi-agent debate system from .claude/ to .claude-plugin/ with proper naming conventions and introduces the partial-consensus skill. All 5 mega-planner agents now use the mega- prefix, and command references have been updated to use agentize:mega-* subagent_type prefixes.
Changes:
- Migrated 5 mega-planner agents (bold-proposer, paranoia-proposer, proposal-critique, proposal-reducer, code-reducer) to
.claude-plugin/agents/withmega-prefix - Moved mega-planner and sibyl commands to
.claude-plugin/commands/ - Added new partial-consensus skill for synthesizing consensus from multi-agent debates
- Created comprehensive agents README documenting both ultra-planner and mega-planner systems
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.claude-plugin/skills/partial-consensus/scripts/partial-consensus.sh |
Shell script for synthesizing consensus from 5-agent debate reports |
.claude-plugin/skills/partial-consensus/partial-review-prompt.md |
Detailed prompt template for external AI reviewer to determine consensus/disagreements |
.claude-plugin/skills/partial-consensus/SKILL.md |
Skill documentation with usage instructions and workflow details |
.claude-plugin/skills/partial-consensus/README.md |
Brief overview pointing to SKILL.md |
.claude-plugin/commands/sibyl.md |
Alias command for mega-planner |
.claude-plugin/commands/mega-planner.md |
Multi-agent debate command with updated subagent_type references |
.claude-plugin/agents/mega-bold-proposer.md |
Bold proposer agent with mega- prefix and updated name field |
.claude-plugin/agents/mega-paranoia-proposer.md |
Paranoia proposer agent with mega- prefix and updated name field |
.claude-plugin/agents/mega-proposal-critique.md |
Critique agent with mega- prefix and updated name field |
.claude-plugin/agents/mega-proposal-reducer.md |
Proposal reducer agent with mega- prefix and updated name field |
.claude-plugin/agents/mega-code-reducer.md |
Code reducer agent with mega- prefix and updated name field |
.claude-plugin/agents/README.md |
Comprehensive documentation of ultra-planner and mega-planner agent systems |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| name: partial-consensus | ||
| description: Determine consensus/disagreement from 5-agent debate - exposes disagreements as developer decisions | ||
| allowed-tools: | ||
| - Bash(.claude/skills/partial-consensus/scripts/partial-consensus.sh:*) |
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The allowed-tools path references .claude/skills/partial-consensus/scripts/partial-consensus.sh, but the actual file is located at .claude-plugin/skills/partial-consensus/scripts/partial-consensus.sh. This path should be updated to match the new location.
| - Bash(.claude/skills/partial-consensus/scripts/partial-consensus.sh:*) | |
| - Bash(.claude-plugin/skills/partial-consensus/scripts/partial-consensus.sh:*) |
| .claude/skills/partial-consensus/scripts/partial-consensus.sh \ | ||
| .tmp/issue-42-bold.md \ | ||
| .tmp/issue-42-paranoia.md \ | ||
| .tmp/issue-42-critique.md \ | ||
| .tmp/issue-42-proposal-reducer.md \ | ||
| .tmp/issue-42-code-reducer.md | ||
| ``` | ||
|
|
||
| **Script automatically:** | ||
| 1. Validates all 5 report files exist | ||
| 2. Extracts issue number from first report filename | ||
| 3. Combines all 5 reports into debate report | ||
| 4. Invokes external AI (Codex or Claude Opus) | ||
| 5. Determines if consensus or multiple options | ||
| 6. Saves result to consensus file | ||
|
|
||
| **Timeout**: 30 minutes (same as external-consensus) | ||
|
|
||
| ## Error Handling | ||
|
|
||
| | Error Message | Cause | Solution | | ||
| |---------------|-------|----------| | ||
| | `Report file not found: {path}` | Missing agent report | Ensure all 5 reports were generated | | ||
| | `External review failed with exit code {N}` | API/network issue | Check credentials and retry | | ||
|
|
||
| ## Usage Examples | ||
|
|
||
| | Mode | Arguments | Example | | ||
| |------|-----------|---------| | ||
| | Standard | 5 reports | `.tmp/issue-{N}-bold.md ... .tmp/issue-{N}-code-reducer.md` | | ||
| | Resolve | 5 reports + consensus + history | Add `.tmp/issue-{N}-consensus.md .tmp/issue-{N}-history.md` | | ||
| | Refine | Same as resolve | Same `issue-{N}` prefix, history records refine operation | | ||
|
|
||
| ```bash | ||
| # Standard mode | ||
| .claude/skills/partial-consensus/scripts/partial-consensus.sh \ | ||
| .tmp/issue-42-bold.md \ | ||
| .tmp/issue-42-paranoia.md \ | ||
| .tmp/issue-42-critique.md \ | ||
| .tmp/issue-42-proposal-reducer.md \ | ||
| .tmp/issue-42-code-reducer.md |
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script path references .claude/skills/partial-consensus/scripts/partial-consensus.sh in the usage examples, but the actual file is located at .claude-plugin/skills/partial-consensus/scripts/partial-consensus.sh. All three occurrences of this path should be updated to reflect the new location.
| cat "$PROMPT_TEMPLATE_PATH" | \ | ||
| sed "s|{{FEATURE_NAME}}|$FEATURE_NAME|g" | \ | ||
| sed "s|{{FEATURE_DESCRIPTION}}|$FEATURE_DESCRIPTION|g" > "$TEMP_FILE" |
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FEATURE_NAME and FEATURE_DESCRIPTION are interpolated directly into sed commands (sed "s|{{FEATURE_NAME}}|$FEATURE_NAME|g" and the following line) using double quotes, so if an attacker can influence the feature name via the agent reports they can inject shell metacharacters like $(), backticks, or \ that will be expanded by the shell before sed runs. Since these report files are LLM-generated based on potentially untrusted issue text, this creates a realistic command injection path leading to arbitrary code execution on the host when partial-consensus is invoked. To fix this, treat all content derived from agent reports as untrusted and ensure it is safely escaped or passed to sed without allowing shell interpolation (for example, by using single-quoted sed scripts plus pre-escaped placeholders or by building the replacement text in a way that avoids command/parameter expansion).
| cat "$PROMPT_TEMPLATE_PATH" | \ | |
| sed "s|{{FEATURE_NAME}}|$FEATURE_NAME|g" | \ | |
| sed "s|{{FEATURE_DESCRIPTION}}|$FEATURE_DESCRIPTION|g" > "$TEMP_FILE" | |
| # Escape feature metadata for safe use in sed replacement. | |
| # We escape backslashes first, then '&' (sed's "whole match" marker), | |
| # and finally the '|' delimiter used in our s||| expressions. | |
| FEATURE_NAME_ESC=${FEATURE_NAME//\\/\\\\} | |
| FEATURE_NAME_ESC=${FEATURE_NAME_ESC//&/\\&} | |
| FEATURE_NAME_ESC=${FEATURE_NAME_ESC//|/\\|} | |
| FEATURE_DESCRIPTION_ESC=${FEATURE_DESCRIPTION//\\/\\\\} | |
| FEATURE_DESCRIPTION_ESC=${FEATURE_DESCRIPTION_ESC//&/\\&} | |
| FEATURE_DESCRIPTION_ESC=${FEATURE_DESCRIPTION_ESC//|/\\|} | |
| cat "$PROMPT_TEMPLATE_PATH" | \ | |
| sed 's|{{FEATURE_NAME}}|'"$FEATURE_NAME_ESC"'|g' | \ | |
| sed 's|{{FEATURE_DESCRIPTION}}|'"$FEATURE_DESCRIPTION_ESC"'|g' > "$TEMP_FILE" |
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move Overall Recommendation and Disagreement Summary after the detailed analysis sections, and place Success Criteria and Risks earlier for better document structure. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Enable mega-code-reducer and mega-proposal-reducer to use web search for discovering better code reduction methods and simpler patterns. Remove non-executable bash pseudo-code blocks and replace with actionable web search guidance. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…oser names Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Enable the mega-proposal-critique agent to verify external claims (library capabilities, API compatibility, protocol behavior) against current documentation via targeted web searches. Also removes the misleading bash code block that contradicts runtime tool-use policy. Closes Synthesys-Lab#95 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The plan-guideline skill dependency is unnecessary for these agents. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instructs all mega-planner pipeline agents to treat test code as a first-class citizen: proposers must include "Test Code Diffs" sections, critique evaluates test coverage, reducer preserves test code from simplification, and code-reducer tracks test LOC separately. The partial-review-prompt now mandates Design-first TDD ordering. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Renumber Step 3.5 → Step 4, shifting subsequent steps (4→5, 5→6) in mega-proposal-critique for standard sequential numbering - Add test layer references (#[cfg(test)], tests/integration/, tests/e2e/) to paranoia proposer's Test Code Diffs section for consistency with bold proposer Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ormat Add structured 3-condition evaluation table between Agent Perspectives Summary and Goal sections in the output template. Add resolve-mode skip rule to prevent redundant assessment when consensus is already determined. Update SKILL.md output format table accordingly. Closes Synthesys-Lab#110 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
Migrated the mega-planner multi-agent debate system from
.claude/to.claude-plugin/with proper naming conventions. All 5 mega-planner agents now use themega-prefix and the command references have been updated to useagentize:mega-*subagent_type prefixes.Changes
.claude-plugin/agents/README.mddocumenting both ultra-planner and mega-planner agent systems.claude/agents/bold-proposer.mdto.claude-plugin/agents/mega-bold-proposer.mdwith:name:field tomega-bold-proposer/plan ultrathinkdirective.claude/agents/paranoia-proposer.mdto.claude-plugin/agents/mega-paranoia-proposer.mdwith:name:field tomega-paranoia-proposer/plan ultrathinkdirective.claude/agents/proposal-critique.mdto.claude-plugin/agents/mega-proposal-critique.mdwith:name:field tomega-proposal-critique/plan ultrathinkdirective.claude/agents/proposal-reducer.mdto.claude-plugin/agents/mega-proposal-reducer.mdwith:name:field tomega-proposal-reducer/plan ultrathinkdirective.claude/agents/code-reducer.mdto.claude-plugin/agents/mega-code-reducer.mdwith:name:field tomega-code-reducer/plan ultrathinkdirective.claude/commands/mega-planner.mdto.claude-plugin/commands/mega-planner.mdwith:subagent_typereferences frommega-planner:*toagentize:mega-*.claude/commands/sibyl.mdto.claude-plugin/commands/sibyl.md(alias command, no changes).claude/agents/README.mdand.claude/commands/README.mdTesting
make test-fastmega-prefix naming for all 5 agentssubagent_typereferences correctly updated toagentize:mega-*format/plan ultrathinkdirective properly removed from all mega-planner agentsRelated Issue
Closes #558