Skip to content

Conversation

@Camier
Copy link
Member

@Camier Camier commented Nov 14, 2025

Summary

  • migrate the debate, teaching, consensus, and competition launchers to the shared mode framework and extract their protocols into standalone files
  • update the supporting debate/teaching/consensus/competition helpers plus the agent send utilities to consume the central constants/shared-state configuration
  • document that all legacy modes now ride on the shared framework for easier maintenance

Testing

  • kitty/scripts/verify-modes.sh

Codex Task

Copilot AI review requested due to automatic review settings November 14, 2025 15:43
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 pull request refactors the legacy AI collaboration modes (debate, teaching, consensus, and competition) to use a shared framework, improving code maintainability and consistency.

Key Changes:

  • Migrated four legacy mode launchers to use the centralized mode-framework.sh
  • Extracted protocol documentation into standalone protocol text files for each mode
  • Updated all mode helper scripts to consume centralized constants from constants.sh
  • Standardized mode initialization and command display patterns across all modes

Reviewed Changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
kitty/scripts/protocols/teaching-protocol.txt New standalone protocol file documenting the teaching mode workflow and commands
kitty/scripts/protocols/debate-protocol.txt New standalone protocol file documenting the debate mode workflow and commands
kitty/scripts/protocols/consensus-protocol.txt New standalone protocol file documenting the consensus mode workflow and commands
kitty/scripts/protocols/competition-protocol.txt New standalone protocol file documenting the competition mode workflow and commands
kitty/scripts/modes/teaching.sh Refactored to use mode-framework.sh for initialization and display logic
kitty/scripts/modes/debate.sh Refactored to use mode-framework.sh for initialization and display logic
kitty/scripts/modes/consensus.sh Refactored to use mode-framework.sh for initialization and display logic
kitty/scripts/modes/competition.sh Refactored to use mode-framework.sh for initialization and display logic
kitty/scripts/ai-teach-*.sh Updated to use AI_AGENTS_STATE_TEACHING and AI_AGENTS_SHARED_FILE constants
kitty/scripts/ai-debate-*.sh Updated to use AI_AGENTS_STATE_DEBATE and AI_AGENTS_SHARED_FILE constants
kitty/scripts/ai-consensus-*.sh Updated to use AI_AGENTS_STATE_CONSENSUS and AI_AGENTS_SHARED_FILE constants
kitty/scripts/ai-compete-*.sh Updated to use AI_AGENTS_STATE_COMPETITION and AI_AGENTS_SHARED_FILE constants
kitty/scripts/ai-agent-send.sh Updated to source constants.sh and shared-state.sh, using centralized file paths
kitty/scripts/ai-agent-send-enhanced.sh Updated to source constants.sh and shared-state.sh, using AI_AGENTS_SESSION constant
kitty/scripts/ai-agent-progress.sh Updated to source constants.sh and shared-state.sh for centralized configuration
kitty/scripts/ai-agent-broadcast.sh Updated to use AI_AGENTS_SESSION and AI_AGENTS_SHARED_FILE constants
MODE-FRAMEWORK-MIGRATION.md Updated documentation to reflect that all legacy modes are now migrated

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

echo "May the best solution win! 🏆"

mode_show_commands "competition" \
"ai-compete-submit.sh <agent> \"<solution>\" \"<notes>\" # Submit" \
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter names don't match the actual script implementation. The ai-compete-submit.sh script expects <solution_path> (a file path) and <explanation> as its parameters, not <solution> and <notes>.

This should be: "ai-compete-submit.sh <agent> \"<solution_path>\" \"<explanation>\" # Submit"

Suggested change
"ai-compete-submit.sh <agent> \"<solution>\" \"<notes>\" # Submit" \
"ai-compete-submit.sh <agent> \"<solution_path>\" \"<explanation>\" # Submit" \

Copilot uses AI. Check for mistakes.
5. Mark concepts as mastered

Commands:
• Explain: ai-teach-explain.sh "<concept>" "<explanation>"
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The protocol file shows ai-teach-explain.sh "<concept>" "<explanation>" but the actual script requires three parameters: <expert>, <concept>, and <explanation>. This inconsistency could confuse users.

The protocol should match the actual command signature: ai-teach-explain.sh "<expert>" "<concept>" "<explanation>"

Suggested change
• Explain: ai-teach-explain.sh "<concept>" "<explanation>"
• Explain: ai-teach-explain.sh "<expert>" "<concept>" "<explanation>"

Copilot uses AI. Check for mistakes.
echo " ai-teach-question.sh $LEARNER \"How does X work?\""

mode_show_commands "teaching" \
"ai-teach-explain.sh \"<concept>\" \"<explanation>\" # Expert explains" \
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command shown here is missing the required <expert> parameter. According to the actual script implementation (ai-teach-explain.sh), it expects three parameters: expert, concept, and explanation.

This should be: "ai-teach-explain.sh <expert> \"<concept>\" \"<explanation>\" # Expert explains"

Copilot uses AI. Check for mistakes.

mode_blank_line
info_color "Kick off by explaining the first concept:"
info_color " ai-teach-explain.sh \"Event loop\" \"Here's how it works...\""
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example command is missing the required <expert> parameter. The ai-teach-explain.sh script expects three parameters: expert, concept, and explanation.

This should be: " ai-teach-explain.sh Agent1 \"Event loop\" \"Here's how it works...\""

Suggested change
info_color " ai-teach-explain.sh \"Event loop\" \"Here's how it works...\""
info_color " ai-teach-explain.sh Agent1 \"Event loop\" \"Here's how it works...\""

Copilot uses AI. Check for mistakes.

mode_show_commands "debate" \
"ai-debate-position.sh <agent> \"<position>\" # Record opening statement" \
"ai-debate-argue.sh <agent> \"<argument>\" # Submit supporting argument" \
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command shown is missing the optional [evidence] parameter. According to ai-debate-argue.sh, the full signature is: ai-debate-argue.sh <agent> "<argument>" [evidence]

For consistency with the protocol file and to help users understand all available options, this should be: "ai-debate-argue.sh <agent> \"<argument>\" [evidence] # Submit supporting argument"

Suggested change
"ai-debate-argue.sh <agent> \"<argument>\" # Submit supporting argument" \
"ai-debate-argue.sh <agent> \"<argument>\" [evidence] # Submit supporting argument" \

Copilot uses AI. Check for mistakes.
• Innovation

Commands:
• Submit: ai-compete-submit.sh <agent> "<solution>" "<explanation>"
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter name <solution> is ambiguous. The actual script (ai-compete-submit.sh) expects <solution_path> as its second parameter, which should be a file path to the solution code.

For clarity and consistency with the script's implementation, this should be: ai-compete-submit.sh <agent> "<solution_path>" "<explanation>"

Suggested change
• Submit: ai-compete-submit.sh <agent> "<solution>" "<explanation>"
• Submit: ai-compete-submit.sh <agent> "<solution_path>" "<explanation>"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants