-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor legacy AI modes onto shared framework #21
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
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 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" \ |
Copilot
AI
Nov 14, 2025
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 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"
| "ai-compete-submit.sh <agent> \"<solution>\" \"<notes>\" # Submit" \ | |
| "ai-compete-submit.sh <agent> \"<solution_path>\" \"<explanation>\" # Submit" \ |
| 5. Mark concepts as mastered | ||
|
|
||
| Commands: | ||
| • Explain: ai-teach-explain.sh "<concept>" "<explanation>" |
Copilot
AI
Nov 14, 2025
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 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>"
| • Explain: ai-teach-explain.sh "<concept>" "<explanation>" | |
| • Explain: ai-teach-explain.sh "<expert>" "<concept>" "<explanation>" |
| echo " ai-teach-question.sh $LEARNER \"How does X work?\"" | ||
|
|
||
| mode_show_commands "teaching" \ | ||
| "ai-teach-explain.sh \"<concept>\" \"<explanation>\" # Expert explains" \ |
Copilot
AI
Nov 14, 2025
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 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"
|
|
||
| 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...\"" |
Copilot
AI
Nov 14, 2025
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 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...\""
| 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...\"" |
|
|
||
| mode_show_commands "debate" \ | ||
| "ai-debate-position.sh <agent> \"<position>\" # Record opening statement" \ | ||
| "ai-debate-argue.sh <agent> \"<argument>\" # Submit supporting argument" \ |
Copilot
AI
Nov 14, 2025
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 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"
| "ai-debate-argue.sh <agent> \"<argument>\" # Submit supporting argument" \ | |
| "ai-debate-argue.sh <agent> \"<argument>\" [evidence] # Submit supporting argument" \ |
| • Innovation | ||
|
|
||
| Commands: | ||
| • Submit: ai-compete-submit.sh <agent> "<solution>" "<explanation>" |
Copilot
AI
Nov 14, 2025
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 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>"
| • Submit: ai-compete-submit.sh <agent> "<solution>" "<explanation>" | |
| • Submit: ai-compete-submit.sh <agent> "<solution_path>" "<explanation>" |
Summary
Testing
Codex Task