{"id":49532516,"url":"https://github.com/aydenstechdungeon/poldebatecli","last_synced_at":"2026-05-02T08:34:58.893Z","repository":{"id":353279941,"uuid":"1218727764","full_name":"aydenstechdungeon/poldebatecli","owner":"aydenstechdungeon","description":"Multi AI Debate Agent written in Go.","archived":false,"fork":false,"pushed_at":"2026-04-23T07:00:06.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"first","last_synced_at":"2026-04-23T09:04:14.187Z","etag":null,"topics":["agent","ai","ai-agent","debate","debates","openrouter"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aydenstechdungeon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-23T06:48:30.000Z","updated_at":"2026-04-23T07:05:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aydenstechdungeon/poldebatecli","commit_stats":null,"previous_names":["aydenstechdungeon/poldebatecli"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/aydenstechdungeon/poldebatecli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenstechdungeon%2Fpoldebatecli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenstechdungeon%2Fpoldebatecli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenstechdungeon%2Fpoldebatecli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenstechdungeon%2Fpoldebatecli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aydenstechdungeon","download_url":"https://codeload.github.com/aydenstechdungeon/poldebatecli/tar.gz/refs/heads/first","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aydenstechdungeon%2Fpoldebatecli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32528413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai","ai-agent","debate","debates","openrouter"],"created_at":"2026-05-02T08:34:58.197Z","updated_at":"2026-05-02T08:34:58.887Z","avatar_url":"https://github.com/aydenstechdungeon.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# /Pol/DebateCLI\n\nMulti-agent AI debate orchestrator. Runs structured debates between AI agent teams through configurable round types with judge evaluation and comprehensive output.\n\n## Install\n\n```bash\ngo build -o debate .\n```\n\n## Quick Start\n\n```bash\n# Set API key\nexport OPENROUTER_API_KEY=your_key_here\n\n# Run with required topic\ndebate run --topic \"AI regulation is necessary\"\n\n# Custom topic\ndebate run --topic \"AI regulation is necessary\"\n\n# Simulate without API calls\ndebate simulate\n\n# Validate config\ndebate validate-config\n```\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `debate run` | Execute a debate between AI agent teams |\n| `debate resume` | Resume a saved debate session |\n| `debate validate-config` | Validate a configuration file |\n| `debate simulate` | Run with mock responses (no API calls) |\n| `debate inspect` | Inspect past results or configuration |\n| `debate docs` | Print documentation |\n\n## Session Saving and Resumption\n\nLong debates can be saved and resumed later. Use `--save-session` to enable auto-saving:\n\n```bash\n# Save session every 30 seconds to a file\ndebate run --save-session ./session.json\n\n# Custom save interval\ndebate run --save-session ./session.json --save-interval 1m\n```\n\nWhen session saving is enabled, the engine also writes debounced checkpoint saves at lifecycle boundaries (team completion, judge completion, context update) in addition to interval and end-of-round saves.\n\nIf the process is interrupted (Ctrl+C, crash, timeout), resume from where it left off:\n\n```bash\n# Resume a saved session\ndebate resume ./session.json\n\n# With custom timeout\ndebate resume ./session.json --timeout 30m\n```\n\nSession files capture:\n- Full debate progress (completed rounds, cycle, round index)\n- All messages and judge evaluations\n- Configuration used\n- Metadata (start time, models used, token counts)\n- Checkpoint metadata (last checkpoint time and reason)\n- Failed rounds for retry\n\nCompleted sessions cannot be resumed.\n\n## Configuration\n\nConfig loaded from YAML with override precedence: **CLI flags \u003e env vars \u003e config file \u003e defaults**\n\n```yaml\ntopic: \"Universal basic income should be adopted globally\"\n\nmodels:\n  defaults:\n    economist: \"x-ai/grok-4.20\"\n    historian: \"x-ai/grok-4.1-fast\"\n    strategist: \"openai/gpt-5-mini\"\n\nteams:\n  team_a:\n    name: \"Proponents\"\n    side: \"for\"\n    agents:\n      - id: \"economist_a\"\n        role: \"economist\"\n  team_b:\n    name: \"Opponents\"\n    side: \"against\"\n    agents:\n      - id: \"economist_b\"\n        role: \"economist\"\n\nrounds:\n  count: 1\n  sequence: [opening, steelman, rebuttal, cross_examination, fact_check, position_swap, closing]\n\njudges:\n  types: [logic, evidence, clarity, adversarial]\n\napi_client:\n  base_url: \"https://openrouter.ai/api/v1\"\n  api_key_env_var: \"OPENROUTER_API_KEY\"\n```\n\nSee `configs/default.yaml` for a full example with all options.\n\n## Architecture\n\n```\nCLI (Cobra) → Engine → Rounds → Agents → OpenRouter API\n                      → Judges → Scoring\n                      → Context Manager → Summarization\n                      → Output (JSON + Terminal + Transcript)\n```\n\nFour layers: CLI, Orchestration, Domain, Infrastructure. Agents within a team execute in parallel. Teams run sequentially per round. Judges evaluate after each round.\n\n## Round Types\n\n| Round | Description |\n|-------|-------------|\n| Opening | Present core thesis and key arguments |\n| Steelman | Reconstruct strongest version of opponent's position |\n| Rebuttal | Counter opposing arguments |\n| Cross-Examination | Pose sharp questions exposing weaknesses |\n| Fact-Check | Address injected factual claims |\n| Position Swap | Argue opposing side (tests intellectual honesty) |\n| Closing | Synthesize arguments, decisive conclusion |\n\n## Judge Types\n\n| Judge | Evaluates |\n|-------|-----------|\n| Logic | Logical consistency, fallacies, contradictions |\n| Evidence | Evidence quality, unsupported claims, fabrication |\n| Clarity | Communication clarity, evasion, obfuscation |\n| Adversarial | Position drift, contradictions between rounds (harsher by design) |\n\n## Environment Variables\n\n| Variable | Effect |\n|----------|--------|\n| `OPENROUTER_API_KEY` | API key (required for `run`) |\n| `DEBATE_TOPIC` | Override topic |\n| `DEBATE_API_BASE_URL` | Override API base URL (must be HTTPS OpenRouter host unless unsafe override is enabled) |\n| `DEBATE_ALLOW_UNSAFE_BASE_URL` | Allow non-HTTPS or non-OpenRouter base URL (`true`/`false`) |\n| `DEBATE_LOG_LEVEL` | Override log level |\n| `DEBATE_OUTPUT_PATH` | Override output directory |\n\n## Output\n\nResults written to `./debate_output/` by default:\n- `result.json` - Full structured result with scores, messages, judge evaluations\n- `transcript.txt` - Human-readable debate transcript\n\nTerminal display shows formatted scores and round breakdown.\n\n## Failure Handling\n\nAutomatic recovery for API errors:\n- Rate limits (429): Exponential backoff with `Retry-After` respect\n- Server errors (5xx): Retry with backoff and jitter\n- Timeouts: Simplified prompt retry, then model substitution\n- Model failures: Automatic fallback to configured backup model\n- Degraded responses tracked in output with original/fallback model details\n\n## Documentation\n\n```bash\ndebate docs architecture\ndebate docs configuration\ndebate docs cli\ndebate docs prompts\ndebate docs failure-modes\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faydenstechdungeon%2Fpoldebatecli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faydenstechdungeon%2Fpoldebatecli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faydenstechdungeon%2Fpoldebatecli/lists"}