Skip to content

Conversation

@Tonny-Gu
Copy link

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 the mega- prefix and the command references have been updated to use agentize:mega-* subagent_type prefixes.

Changes

  • Created .claude-plugin/agents/README.md documenting both ultra-planner and mega-planner agent systems
  • Renamed .claude/agents/bold-proposer.md to .claude-plugin/agents/mega-bold-proposer.md with:
    • Updated name: field to mega-bold-proposer
    • Removed /plan ultrathink directive
  • Renamed .claude/agents/paranoia-proposer.md to .claude-plugin/agents/mega-paranoia-proposer.md with:
    • Updated name: field to mega-paranoia-proposer
    • Removed /plan ultrathink directive
  • Renamed .claude/agents/proposal-critique.md to .claude-plugin/agents/mega-proposal-critique.md with:
    • Updated name: field to mega-proposal-critique
    • Removed /plan ultrathink directive
  • Renamed .claude/agents/proposal-reducer.md to .claude-plugin/agents/mega-proposal-reducer.md with:
    • Updated name: field to mega-proposal-reducer
    • Removed /plan ultrathink directive
  • Renamed .claude/agents/code-reducer.md to .claude-plugin/agents/mega-code-reducer.md with:
    • Updated name: field to mega-code-reducer
    • Removed /plan ultrathink directive
  • Moved .claude/commands/mega-planner.md to .claude-plugin/commands/mega-planner.md with:
    • Updated all subagent_type references from mega-planner:* to agentize:mega-*
  • Moved .claude/commands/sibyl.md to .claude-plugin/commands/sibyl.md (alias command, no changes)
  • Deleted .claude/agents/README.md and .claude/commands/README.md

Testing

  • All 43 shell tests passed via make test-fast
  • Code quality review verified:
    • Consistent mega- prefix naming for all 5 agents
    • All 5 subagent_type references correctly updated to agentize:mega-* format
    • /plan ultrathink directive properly removed from all mega-planner agents
    • Documentation completeness in agents README

Related Issue

Closes #558

Tonny-Gu and others added 6 commits January 22, 2026 20:46
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>
Copilot AI review requested due to automatic review settings January 22, 2026 18:32
Copy link

Copilot AI left a 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/ with mega- 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:*)
Copy link

Copilot AI Jan 22, 2026

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.

Suggested change
- Bash(.claude/skills/partial-consensus/scripts/partial-consensus.sh:*)
- Bash(.claude-plugin/skills/partial-consensus/scripts/partial-consensus.sh:*)

Copilot uses AI. Check for mistakes.
Comment on lines 79 to 119
.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
Copy link

Copilot AI Jan 22, 2026

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.

Copilot uses AI. Check for mistakes.
Comment on lines +223 to +225
cat "$PROMPT_TEMPLATE_PATH" | \
sed "s|{{FEATURE_NAME}}|$FEATURE_NAME|g" | \
sed "s|{{FEATURE_DESCRIPTION}}|$FEATURE_DESCRIPTION|g" > "$TEMP_FILE"
Copy link

Copilot AI Jan 22, 2026

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).

Suggested change
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"

Copilot uses AI. Check for mistakes.
Tonny-Gu and others added 9 commits January 22, 2026 22:16
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan] Merge mega-planner and partial-consensus into .claude-plugin

1 participant