Skip to content

fix: apply debate findings - context passthrough, canonical redaction, relaxed disagreement#227

Merged
avifenesh merged 7 commits intomainfrom
fix/enhance-debate-consult-findings
Feb 17, 2026
Merged

fix: apply debate findings - context passthrough, canonical redaction, relaxed disagreement#227
avifenesh merged 7 commits intomainfrom
fix/enhance-debate-consult-findings

Conversation

@avifenesh
Copy link
Copy Markdown
Collaborator

Summary

Comprehensive fixes from running 3 debates + /enhance + 4-pass review on debate and consult plugins.

Debate plugin fixes

  • --model=auto bug: Omit --model flag instead of passing "auto" literally (broke CLI)
  • --context=file: Added follow-up path prompt with validation
  • --context picker: Added to interactive selection
  • Template {round-1} -> {previous_round} for clarity
  • Relaxed disagreement: challenger can certify concerns resolved with evidence

Consult plugin fixes

  • Codex model rename: gpt-5-codex-mini/gpt-5.1-codex-mini -> gpt-5.3-codex-spark
  • Canonical redaction: Skill is now single source of truth (14 patterns), agent references it
  • Mutual exclusion: --continue + --count > 1 guard in agent
  • OpenCode model: claude-opus-4-5 -> claude-opus-4-6

Infrastructure

  • Adapter transform: Preserve .claude/ in platform documentation enumerations
  • 76 new debate tests: Full coverage of plugin structure, NLP, security, state, synthesis
  • Updated consult tests for new redaction ownership

Test plan

  • 98 suites, 4,019 tests pass (76 new debate tests)
  • All validators pass
  • Preflight --all passes
  • Zero gpt-5-codex-mini or gpt-5.1-codex-mini remaining
  • Redaction table only in consult SKILL.md (canonical source)

The `<!-- AUTO-GENERATED ... -->` HTML comment before frontmatter
prevented tools like agnix from parsing YAML frontmatter on line 1.
Removed the header entirely - the adapters/ directory is
self-explanatory. Drops agnix errors from 83 to 8.
… plugins

Debate skill hardened based on its own first debate's findings:
- Universal evidence standard for both proposer AND challenger
- Proposer prompts now require cited evidence (was challenger-only)
- Challenger follow-up reordered: anti-convergence guard first
- Minimum-disagreement requirement per round added
- Context summarization criteria specified (500-800 tokens)
- Rigor indicator and Debate Quality rating in synthesis output

Consult skill fixes from enhance analysis:
- Gemini section: added missing Session ID extraction line
- Codex: removed invalid -a suggest flag (codex exec doesn't support it)
- Codex: added -c model_reasoning_effort to safe command patterns
- Gemini models: replaced all -preview suffixes with stable names

Also updates README, test strategy doc, and all adapters.
…, relaxed disagreement

Three fixes from the claude-vs-codex debate findings:
1. --context passthrough from /debate command through orchestrator to
   consult skill, so both tools see the same codebase context
2. Canonical redaction: orchestrator references consult agent's full
   14-pattern table instead of maintaining a drifted 5-pattern subset
3. Relaxed forced disagreement: challenger can now certify a concern
   as genuinely resolved with evidence, not forced to always disagree
…, relaxed disagreement

Fixes from debate findings + enhance/review analysis:

Debate plugin:
- --model=auto bug: omit --model instead of passing "auto" literally
- --context=file: add follow-up path prompt with validation
- --context added to interactive picker
- Template {round-1} -> {previous_round} for clarity
- Relaxed disagreement: can certify concerns resolved with evidence

Consult plugin:
- Codex model: gpt-5-codex-mini/gpt-5.1-codex-mini -> gpt-5.3-codex-spark
- Redaction table: skill is now canonical source (14 patterns), agent references it
- --continue + --count mutual exclusion in agent
- OpenCode model: claude-opus-4-5 -> claude-opus-4-6

Infrastructure:
- Adapter transform: preserve .claude/ in platform doc enumerations
- New: __tests__/debate-command.test.js (76 tests)
- Updated consult tests for new redaction ownership
Copilot AI review requested due to automatic review settings February 17, 2026 23:19
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @avifenesh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refines the debate and consult plugins based on extensive testing and review. It introduces robust context handling and more flexible disagreement resolution in debates, centralizes redaction patterns for consistency and security, and updates model references across the system. These changes improve the plugins' functionality, maintainability, and user experience, ensuring more accurate and secure AI interactions.

Highlights

  • Debate Plugin Enhancements: Implemented context passthrough, an interactive context picker with file validation, and clarified round numbering in templates.
  • Relaxed Disagreement in Debates: Challengers can now explicitly certify resolved concerns with evidence, promoting more nuanced debate outcomes.
  • Canonical Redaction Source: The consult skill now serves as the single source of truth for 14 redaction patterns, with agents referencing it instead of maintaining their own lists.
  • Model Renaming & Updates: Renamed Codex model gpt-5-codex-mini to gpt-5.3-codex-spark and updated Gemini model names by removing the -preview suffix.
  • Mutual Exclusion Guard: Added a check in the consult agent to prevent using --continue with count > 1.
  • Infrastructure Improvements: Enhanced adapter transformation to correctly preserve .claude/ paths in platform documentation and added 76 new comprehensive tests for the debate plugin.
Changelog
  • README.md
    • Updated Gemini model name from gemini-3-pro-preview to gemini-3-pro.
  • tests/consult-command.test.js
    • Updated tests to reflect canonical redaction source in skill and removed agent-specific redaction pattern checks.
  • tests/debate-command.test.js
    • Added comprehensive tests for the debate plugin's structure, prompt templates, alignment, security, interactive selection, NLP parsing, state management, error handling, synthesis format, cross-file consistency, universal evidence standard, and anti-convergence mechanisms.
  • tests/gen-adapters.test.js
    • Modified tests to ensure generated files with frontmatter start with --- and removed the check for auto-generated header comments.
  • adapters/codex/skills/agnix/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/audit-project-agents/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/audit-project-github/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/audit-project/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/consult/SKILL.md
    • Updated Codex model reasoning flag from -a suggest to -c model_reasoning_effort.
    • Renamed gpt-5-codex-mini to gpt-5.3-codex-spark.
  • adapters/codex/skills/debate/SKILL.md
    • Added --context argument to debate skill.
    • Updated model handling to 'omit' instead of 'auto'.
    • Added context picker with file path validation.
    • Added 'Context file not found' error.
  • adapters/codex/skills/delivery-approval/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/deslop/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/drift-detect/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/enhance/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/learn/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/next-task/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/perf/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/repo-map/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/ship-ci-review-loop/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/ship-deployment/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/ship-error-handling/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/ship/SKILL.md
    • Removed auto-generated header comment.
  • adapters/codex/skills/sync-docs/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/agent-enhancer.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/agnix-agent.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/ci-fixer.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/ci-monitor.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/claudemd-enhancer.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/consult-agent.md
    • Removed auto-generated header comment.
    • Added mutual exclusion check for --continue and count > 1.
    • Updated Codex model reasoning flag.
    • Changed redaction patterns to reference the consult skill as the canonical source.
    • Updated Claude Code platform state directory from .opencode/ to .claude/.
  • adapters/opencode/agents/cross-file-enhancer.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/debate-orchestrator.md
    • Removed auto-generated header comment.
    • Added context parameter passthrough to consult skill.
    • Updated model handling to 'omit' instead of 'auto'.
    • Changed redaction patterns to reference the consult skill as the canonical source.
    • Updated Claude Code platform state directory from .opencode/ to .claude/.
  • adapters/opencode/agents/delivery-validator.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/deslop-agent.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/docs-enhancer.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/exploration-agent.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/hooks-enhancer.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/implementation-agent.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/learn-agent.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/map-validator.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/perf-analyzer.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/perf-code-paths.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/perf-investigation-logger.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/perf-orchestrator.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/perf-theory-gatherer.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/perf-theory-tester.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/plan-synthesizer.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/planning-agent.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/plugin-enhancer.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/prompt-enhancer.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/simple-fixer.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/skills-enhancer.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/sync-docs-agent.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/task-discoverer.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/test-coverage-checker.md
    • Removed auto-generated header comment.
  • adapters/opencode/agents/worktree-manager.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/agnix.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/audit-project-agents.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/audit-project-github.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/audit-project.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/consult.md
    • Removed auto-generated header comment.
    • Updated Codex model reasoning flag.
    • Renamed gpt-5-codex-mini to gpt-5.3-codex-spark.
    • Updated Claude Code platform state directory from .opencode/ to .claude/.
  • adapters/opencode/commands/debate.md
    • Removed auto-generated header comment.
    • Added --context argument to debate command.
    • Updated model handling to 'omit' instead of 'auto'.
    • Added context picker with file path validation.
    • Added 'Context file not found' error.
  • adapters/opencode/commands/delivery-approval.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/deslop.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/drift-detect.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/enhance.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/learn.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/next-task.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/perf.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/repo-map.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/ship-ci-review-loop.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/ship-deployment.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/ship-error-handling.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/ship.md
    • Removed auto-generated header comment.
  • adapters/opencode/commands/sync-docs.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/agnix/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/consult/SKILL.md
    • Removed auto-generated header comment.
    • Updated Gemini model names (-preview removed).
    • Renamed gpt-5.1-codex-mini to gpt-5.3-codex-spark.
    • Updated Codex model reasoning flag.
    • Moved the full redaction pattern table to this skill, making it the canonical source.
    • Updated Claude Code platform state directory from .opencode/ to .claude/.
  • adapters/opencode/skills/debate/SKILL.md
    • Removed auto-generated header comment.
    • Added 'Universal Rules' section requiring evidence.
    • Updated proposer and challenger prompt templates to enforce evidence.
    • Changed {round-1} to {previous_round}.
    • Updated synthesis summary requirements.
    • Added 'Debate Quality' section.
    • Updated key agreements to include evidence.
    • Updated Claude Code platform state directory from .opencode/ to .claude/.
  • adapters/opencode/skills/deslop/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/discover-tasks/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/drift-analysis/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/enhance-agent-prompts/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/enhance-claude-memory/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/enhance-cross-file/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/enhance-docs/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/enhance-hooks/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/enhance-orchestrator/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/enhance-plugins/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/enhance-prompts/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/enhance-skills/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/learn/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/orchestrate-review/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/perf-analyzer/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/perf-baseline-manager/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/perf-benchmarker/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/perf-code-paths/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/perf-investigation-logger/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/perf-profiler/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/perf-theory-gatherer/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/perf-theory-tester/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/repo-mapping/SKILL.md
    • Removed auto-generated header comment.
    • Updated Claude Code platform state directory from .opencode/ to .claude/.
  • adapters/opencode/skills/sync-docs/SKILL.md
    • Removed auto-generated header comment.
  • adapters/opencode/skills/validate-delivery/SKILL.md
    • Removed auto-generated header comment.
  • docs/consult-command-test-strategy.md
    • Updated Gemini model names (-preview removed) and Codex model name (gpt-5.1-codex-mini to gpt-5.3-codex-spark) in test strategy documentation.
  • lib/adapter-transforms.js
    • Modified the transformation logic to preserve .claude/ in platform documentation enumerations while still replacing it in other contexts.
  • plugins/audit-project/lib/adapter-transforms.js
    • Modified the transformation logic to preserve .claude/ in platform documentation enumerations while still replacing it in other contexts.
  • plugins/consult/agents/consult-agent.md
    • Added mutual exclusion check for --continue and count > 1.
    • Updated Codex model reasoning flag.
    • Changed redaction patterns to reference the consult skill as the canonical source.
  • plugins/consult/commands/consult.md
    • Updated Codex model reasoning flag.
  • plugins/consult/skills/consult/SKILL.md
    • Updated Gemini model names (-preview removed).
    • Renamed gpt-5.1-codex-mini to gpt-5.3-codex-spark.
    • Updated Codex model reasoning flag.
    • Moved the full redaction pattern table to this skill, making it the canonical source.
  • plugins/debate/agents/debate-orchestrator.md
    • Added context parameter passthrough to consult skill.
    • Updated model handling to 'omit' instead of 'auto'.
    • Changed redaction patterns to reference the consult skill as the canonical source.
  • plugins/debate/commands/debate.md
    • Added --context argument to debate command.
    • Updated model handling to 'omit' instead of 'auto'.
    • Added context picker with file path validation.
    • Added 'Context file not found' error.
  • plugins/debate/lib/adapter-transforms.js
    • Modified the transformation logic to preserve .claude/ in platform documentation enumerations while still replacing it in other contexts.
  • plugins/debate/skills/debate/SKILL.md
    • Added 'Universal Rules' section requiring evidence.
    • Updated proposer and challenger prompt templates to enforce evidence.
    • Changed {round-1} to {previous_round}.
    • Updated synthesis summary requirements.
    • Added 'Debate Quality' section.
    • Updated key agreements to include evidence.
  • plugins/deslop/lib/adapter-transforms.js
    • Modified the transformation logic to preserve .claude/ in platform documentation enumerations while still replacing it in other contexts.
  • plugins/drift-detect/lib/adapter-transforms.js
    • Modified the transformation logic to preserve .claude/ in platform documentation enumerations while still replacing it in other contexts.
  • plugins/enhance/lib/adapter-transforms.js
    • Modified the transformation logic to preserve .claude/ in platform documentation enumerations while still replacing it in other contexts.
  • plugins/learn/lib/adapter-transforms.js
    • Modified the transformation logic to preserve .claude/ in platform documentation enumerations while still replacing it in other contexts.
  • plugins/next-task/lib/adapter-transforms.js
    • Modified the transformation logic to preserve .claude/ in platform documentation enumerations while still replacing it in other contexts.
  • plugins/perf/lib/adapter-transforms.js
    • Modified the transformation logic to preserve .claude/ in platform documentation enumerations while still replacing it in other contexts.
  • plugins/repo-map/lib/adapter-transforms.js
    • Modified the transformation logic to preserve .claude/ in platform documentation enumerations while still replacing it in other contexts.
  • plugins/ship/lib/adapter-transforms.js
    • Modified the transformation logic to preserve .claude/ in platform documentation enumerations while still replacing it in other contexts.
  • plugins/sync-docs/lib/adapter-transforms.js
    • Modified the transformation logic to preserve .claude/ in platform documentation enumerations while still replacing it in other contexts.
  • scripts/gen-adapters.js
    • Removed the GENERATED_HEADER constant and its usage, meaning generated files no longer include an auto-generated comment.
Activity
  • Initial development based on findings from 3 debates and an /enhance run.
  • Underwent a 4-pass review process on both debate and consult plugins.
  • Added 76 new tests for the debate plugin, achieving full coverage of its structure, NLP, security, state, and synthesis.
  • Updated existing consult tests to reflect the new canonical redaction ownership.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a number of valuable fixes and enhancements, particularly for the debate and consult plugins. The move to a canonical source for redaction patterns is a great improvement for maintainability. The new debate logic, which enforces evidence-based arguments and encourages disagreement, is well-designed and should lead to higher quality outputs. The addition of a comprehensive test suite for the debate plugin is also a significant contribution.

My main concern is the significant code duplication of the adapter transformation logic. The changes in lib/adapter-transforms.js have been copied to 11 other plugin-specific adapter-transforms.js files. This creates a maintenance burden and should be refactored to use a single, shared module. I've left a specific comment on this issue.

Copy link
Copy Markdown
Contributor

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 applies “debate findings” across the debate/consult markdown plugins and the adapter-generation pipeline, updating context passthrough semantics, model defaults, canonical redaction ownership, and adapter transforms; it also adds extensive markdown-structure tests for the debate plugin.

Changes:

  • Update adapter generation to remove the auto-generated header so YAML frontmatter starts on line 1.
  • Update OpenCode adapter transforms to preserve .claude/ in platform enumeration docs while still rewriting .claude/ paths elsewhere.
  • Update debate/consult plugins for context passthrough, model selection changes, and canonical redaction documentation; add/adjust Jest tests accordingly.

Reviewed changes

Copilot reviewed 122 out of 122 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/gen-adapters.js Stop prepending auto-generated header to adapter outputs.
lib/adapter-transforms.js Preserve .claude/ in “Claude Code:” enumerations during OpenCode transforms.
plugins/audit-project/lib/adapter-transforms.js Sync OpenCode .claude/-preservation behavior into plugin-local lib copy.
plugins/debate/agents/debate-orchestrator.md Add context passthrough behavior; point redaction to consult skill as canonical source.
plugins/debate/commands/debate.md Add --context flag + interactive picker and file-path follow-up flow.
plugins/debate/lib/adapter-transforms.js Sync OpenCode .claude/-preservation behavior into plugin-local lib copy.
plugins/debate/skills/debate/SKILL.md Strengthen evidence rules, rename {round-1} to {previous_round}, update synthesis constraints.
plugins/consult/agents/consult-agent.md Add --continue + count>1 mutual exclusion; reference skill as canonical redaction source.
plugins/consult/commands/consult.md Update Codex safe-mode default guidance; update Codex model label.
plugins/consult/skills/consult/SKILL.md Update Gemini/Codex model mappings; move full redaction table into skill (canonical).
plugins/deslop/lib/adapter-transforms.js Sync OpenCode .claude/-preservation behavior into plugin-local lib copy.
plugins/drift-detect/lib/adapter-transforms.js Sync OpenCode .claude/-preservation behavior into plugin-local lib copy.
plugins/enhance/lib/adapter-transforms.js Sync OpenCode .claude/-preservation behavior into plugin-local lib copy.
plugins/learn/lib/adapter-transforms.js Sync OpenCode .claude/-preservation behavior into plugin-local lib copy.
plugins/next-task/lib/adapter-transforms.js Sync OpenCode .claude/-preservation behavior into plugin-local lib copy.
plugins/perf/lib/adapter-transforms.js Sync OpenCode .claude/-preservation behavior into plugin-local lib copy.
plugins/repo-map/lib/adapter-transforms.js Sync OpenCode .claude/-preservation behavior into plugin-local lib copy.
plugins/ship/lib/adapter-transforms.js Sync OpenCode .claude/-preservation behavior into plugin-local lib copy.
plugins/sync-docs/lib/adapter-transforms.js Sync OpenCode .claude/-preservation behavior into plugin-local lib copy.
docs/consult-command-test-strategy.md Update documented expectations for new model mappings.
README.md Update default Gemini model name in top-level docs table.
tests/consult-command.test.js Update tests to reflect canonical redaction ownership in consult SKILL.md.
tests/debate-command.test.js Add comprehensive tests for debate plugin markdown structure and consistency.
tests/gen-adapters.test.js Update tests to require frontmatter on line 1 (no header).
adapters/opencode/agents/agnix-agent.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/agent-enhancer.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/ci-fixer.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/ci-monitor.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/claudemd-enhancer.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/consult-agent.md Regenerated OpenCode adapter output (header removal + consult agent changes).
adapters/opencode/agents/cross-file-enhancer.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/debate-orchestrator.md Regenerated OpenCode adapter output (header removal + debate orchestrator changes).
adapters/opencode/agents/delivery-validator.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/deslop-agent.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/docs-enhancer.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/exploration-agent.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/hooks-enhancer.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/implementation-agent.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/learn-agent.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/map-validator.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/perf-analyzer.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/perf-code-paths.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/perf-investigation-logger.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/perf-orchestrator.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/perf-theory-gatherer.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/perf-theory-tester.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/plan-synthesizer.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/planning-agent.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/plugin-enhancer.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/prompt-enhancer.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/simple-fixer.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/skills-enhancer.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/sync-docs-agent.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/task-discoverer.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/test-coverage-checker.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/agents/worktree-manager.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/agnix.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/audit-project-agents.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/audit-project-github.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/audit-project.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/consult.md Regenerated OpenCode adapter output (header removal + consult command changes).
adapters/opencode/commands/debate.md Regenerated OpenCode adapter output (header removal + debate command changes).
adapters/opencode/commands/delivery-approval.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/deslop.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/drift-detect.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/enhance.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/learn.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/next-task.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/perf.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/repo-map.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/ship-ci-review-loop.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/ship-deployment.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/ship-error-handling.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/ship.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/commands/sync-docs.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/agnix/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/consult/SKILL.md Regenerated OpenCode adapter output (header removal + consult SKILL updates).
adapters/opencode/skills/debate/SKILL.md Regenerated OpenCode adapter output (header removal + debate SKILL updates).
adapters/opencode/skills/deslop/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/discover-tasks/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/drift-analysis/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/enhance-agent-prompts/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/enhance-claude-memory/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/enhance-cross-file/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/enhance-docs/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/enhance-hooks/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/enhance-orchestrator/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/enhance-plugins/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/enhance-prompts/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/enhance-skills/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/learn/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/orchestrate-review/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/perf-analyzer/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/perf-baseline-manager/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/perf-benchmarker/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/perf-code-paths/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/perf-investigation-logger/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/perf-profiler/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/perf-theory-gatherer/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/perf-theory-tester/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/repo-mapping/SKILL.md Regenerated OpenCode adapter output (header removal + .claude/ preserved in enumerations).
adapters/opencode/skills/sync-docs/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/opencode/skills/validate-delivery/SKILL.md Regenerated OpenCode adapter output (header removal).
adapters/codex/skills/agnix/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/audit-project-agents/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/audit-project-github/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/audit-project/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/consult/SKILL.md Regenerated Codex adapter output (header removal + consult command changes).
adapters/codex/skills/debate/SKILL.md Regenerated Codex adapter output (header removal + debate command changes).
adapters/codex/skills/delivery-approval/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/deslop/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/drift-detect/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/enhance/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/learn/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/next-task/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/perf/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/repo-map/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/ship-ci-review-loop/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/ship-deployment/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/ship-error-handling/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/ship/SKILL.md Regenerated Codex adapter output (header removal).
adapters/codex/skills/sync-docs/SKILL.md Regenerated Codex adapter output (header removal).

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

Comment on lines +131 to +146
If context resolved to "file":
Use a follow-up AskUserQuestion to ask for the file path:
```
AskUserQuestion:
questions:
- header: "File path"
question: "Which file should both tools see?"
multiSelect: false
options:
- label: "src/" description: "Source directory file"
- label: "README.md" description: "Project readme"
```
The user can type any path via "Other".
After getting the path, validate it exists using the Read tool.
If the file doesn't exist: `[ERROR] Context file not found: {PATH}`
If valid, set context to `file={user_provided_path}`.
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The follow-up file-path validation instructs using the Read tool on a user-provided path, but it doesn’t constrain the path to the project directory. That allows reading arbitrary absolute paths / path traversal during “validation” (before consult’s own context guards). Add an explicit safety check (reject absolute paths and any normalized path escaping cwd) before any Read, or delegate existence/validation entirely to consult’s --context=file=… handling without reading the file here.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed - added path containment checks (reject absolute paths outside cwd, reject .., reject UNC paths) before the Read validation.

Comment on lines 103 to 106
### Round 2+: Challenger Follow-up

```
You are the CHALLENGER in round {round} of a structured debate.

Topic: {topic}

{context_summary}

The PROPOSER ({proposer_tool}) responded to your challenges:

---
{proposer_previous_response}
---

Your job: Evaluate the proposer's defense. For each point they addressed:
- Did they adequately address your concern? If so, acknowledge it
- Did they dodge or superficially address it? Call it out specifically
- Are there NEW weaknesses in their revised position?

If you're genuinely convinced on a point, say so - but explain what convinced you.
If you see new problems, raise them.

Provide your follow-up:
```
*(JavaScript reference - not executable in OpenCode)*

Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The OpenCode adapter lost the entire “Round 2+: Challenger Follow-up” prompt template: it was replaced with the generic *(JavaScript reference - not executable in OpenCode)* placeholder. This removes required debate behavior/instructions for OpenCode. Adjust the OpenCode adapter transform heuristics so non-JS prompt-template code fences like this one are preserved (e.g., require an explicit JS language tag, or tighten the keyword detection), then regenerate adapters.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Pre-existing adapter transform behavior - the OpenCode transformer strips code blocks that look like executable content. This affects all skills with template code blocks, not specific to this PR. The source skill has the full templates.

Comment on lines +114 to 120
- header: "Context" # SKIP if --context resolved
question: "Include codebase context for both tools?"
options:
- label: "None (Recommended)" description: "No extra context, just the topic"
- label: "Diff" description: "Include current git diff"
- label: "File" description: "Include a specific file (will ask path)"
```
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The newly added Codex request_user_input example for the Context picker still doesn’t include the required per-question id fields (and the current in-block quoted note isn’t valid YAML for the tool call). Please update this example so each question (including the new Context question) has a unique id, and remove/replace the quoted note with valid fields.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Pre-existing Codex adapter format limitation. The id fields are injected by the adapter transform at install time, not in the source markdown.

Comment on lines +342 to +347
for (const [filePath, content] of files) {
if (content.includes('---\n')) {
// Files with frontmatter must start with --- on line 1
// (no auto-generated header before frontmatter)
expect(content.startsWith('---\n')).toBe(true);
}
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

content.includes('---\n') is not a reliable way to detect frontmatter, since many markdown bodies include --- as horizontal rules / separators. This test can produce false positives and fail on files that contain --- but don’t have YAML frontmatter. Consider detecting frontmatter with a start-of-file check (e.g., content.startsWith('---\n')) or a frontmatter-specific regex anchored to the beginning of the file.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Acknowledged. In practice all adapter files start with --- frontmatter (verified by gen-adapters output), but a more robust check using a regex anchor would be better. Low priority - the current test catches the actual regression it was written for (headers before frontmatter).

New sonnet is faster, cheaper, and close to opus capability. These
agents do pattern matching and synthesis, not deep reasoning:
- exploration-agent: reads code, maps patterns
- learn-agent: web research + guide creation

Keeps opus for: planning, implementation, perf-orchestrator,
debate-orchestrator (judgment-intensive tasks).
Copilot AI review requested due to automatic review settings February 17, 2026 23:38
@avifenesh avifenesh merged commit 49f3613 into main Feb 17, 2026
6 checks passed
@avifenesh avifenesh deleted the fix/enhance-debate-consult-findings branch February 17, 2026 23:43
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 33 out of 33 changed files in this pull request and generated no new comments.


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

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.

2 participants