ringside 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Install uv
15
+ uses: astral-sh/setup-uv@v5
16
+
17
+ - name: Build and publish
18
+ run: |
19
+ uv build
20
+ uv publish --token $PYPI_TOKEN
21
+ env:
22
+ PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
@@ -0,0 +1,10 @@
1
+ .ringside/
2
+ data/agency-runs/
3
+ data/agency-tasks/
4
+ __pycache__/
5
+ *.egg-info/
6
+ dist/
7
+ build/
8
+ .venv/
9
+ *.pyc
10
+ .env
@@ -0,0 +1,75 @@
1
+ # ringside — AI Agent Context
2
+
3
+ > A pip-installable package that runs multi-agent debate pipelines and visualizes them as a live boxing match in the browser.
4
+
5
+ ## What it is
6
+ - `ringside run` — runs the full flow: brief → debate → implement → verify (viewer opens automatically)
7
+ - Two drafters (claude + codex) compete in round 1, reviewers pick the winner, then iterate until consensus
8
+ - Browser at localhost:8731 shows two CSS fighters animating in real-time as the debate happens
9
+
10
+ ## Package layout
11
+ ```
12
+ src/ringside/
13
+ agency.py — the debate pipeline (drafter → reviewers → debate loop)
14
+ cli.py — `ringside run` and `ringside watch` entry points
15
+ server.py — FastAPI WebSocket server, polls run.json, streams events
16
+ static/
17
+ index.html — single-file boxing viewer (CSS fighters, HP bars, event log)
18
+ .ringside/ — created per-project at runtime (gitignore it)
19
+ tasks/ — task files (input to ringside run)
20
+ runs/ — output: timestamped dirs with run.json + final_plan.md
21
+ ```
22
+
23
+ ## run.json event types
24
+ All events agency.py emits: `phase_start`, `agent_started`, `progress`, `draft`, `draft_competition`,
25
+ `review`, `debate`, `round_end`, `build_gates`, `verification`, `implementation`, `summary`, `run_end`
26
+
27
+ ## Key design rules
28
+ - server.py polls run.json every 200ms — do not switch to file watching (complexity not worth it)
29
+ - index.html must remain a single self-contained file — no external CDN, no bundler
30
+ - HP system is cosmetic/narrative — fight ends at run_end, not at 0 HP
31
+ - Reviewer UI is slot-based per phase: plan/implementation phases can render multiple reviewers, and slots reset on phase changes
32
+ - Replay is mixed-mode: the first hydration of a finished run may be cinematic, but reconnect/re-hydration must fast-resync from authoritative state
33
+ - Dark theme: bg #0d0d0d, blue #00aaff (drafter), red #ff3333 (reviewer), gold #ffcc00 accents
34
+
35
+ ## Optional per-project config (no setup required)
36
+ Both files are looked up in the current working directory at runtime. Without them,
37
+ ringside works fine using built-in defaults.
38
+
39
+ **.agency.toml** — override agent assignments and build gates:
40
+ ```toml
41
+ [agents]
42
+ drafters = ["claude", "codex"] # competitive round 1 (default); use single for no competition
43
+ implementer = "codex"
44
+ plan_reviewers = ["claude", "codex"]
45
+ impl_reviewers = ["codex"]
46
+ verifier = "claude"
47
+
48
+ [[gates.step]]
49
+ label = "tests"
50
+ cmd = ["pytest", "-q"]
51
+ ```
52
+
53
+ **.agency-standards.md** — override the engineering standards injected into every agent
54
+ prompt. Useful when your project has domain-specific rules (e.g. "never mutate X directly",
55
+ "all DB queries must go through Y"). Without this file, ringside uses sensible defaults
56
+ (no silent fallbacks, reviewer conduct rules, etc.).
57
+
58
+ ## Debate mechanics
59
+ - **Competitive round 1**: two drafters (claude + codex) independently write plans in parallel.
60
+ Reviewers pick the stronger plan (WINNER: A/B) and review it. Losing drafter is dropped.
61
+ - **Rounds 2+**: winning drafter iterates on reviewer feedback (same session).
62
+ - **Approval with suggestions**: if all reviewers approve but include substantive feedback,
63
+ the feedback is passed back for one more drafter/implementer round before finalizing.
64
+ - **Max rounds**: 3 per phase (plan + impl). Configurable via `--max-plan-rounds`/`--max-impl-rounds`.
65
+ - Same mechanics apply to implementation phase (single implementer, N reviewers).
66
+
67
+ ## Commands
68
+ ```bash
69
+ ringside run # full flow: brief → plan → implement (viewer auto-opens)
70
+ ringside run <task.md> [--plan-only] [--port N] # run pipeline on existing task file
71
+ ringside run --continue-run <run-dir> # chain plan → implementation
72
+ ringside run <task.md> --no-watch # run without opening the viewer
73
+ ringside brief [description] [--agent claude|codex] # just write a task file (no run)
74
+ ringside watch [run.json or runs-dir] [--port N]
75
+ ```
ringside-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Teo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,125 @@
1
+ Metadata-Version: 2.4
2
+ Name: ringside
3
+ Version: 0.1.0
4
+ Summary: AI agent debate pipeline with live boxing visualization
5
+ Project-URL: Homepage, https://github.com/futbolbjk/ringside
6
+ Project-URL: Repository, https://github.com/futbolbjk/ringside
7
+ Author: Teo
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: agents,ai,debate,multi-agent,visualization
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Software Development :: Quality Assurance
19
+ Requires-Python: >=3.11
20
+ Requires-Dist: fastapi>=0.110
21
+ Requires-Dist: rich>=13
22
+ Requires-Dist: uvicorn[standard]>=0.29
23
+ Requires-Dist: websockets>=12
24
+ Description-Content-Type: text/markdown
25
+
26
+ # ringside
27
+
28
+ AI agent debate pipeline with live boxing visualization.
29
+
30
+ Ringside runs multi-agent debates where a drafter proposes a plan, reviewers critique it, and they iterate until consensus — then an implementer writes code while reviewers audit. The whole thing plays out as a live boxing match in your browser.
31
+
32
+ ## Prerequisites
33
+
34
+ Ringside dispatches to AI agent CLIs. You need at least one installed:
35
+
36
+ - **[Claude Code](https://docs.anthropic.com/en/docs/claude-code)** — `claude` CLI (used as drafter and reviewer by default)
37
+ - **[Codex](https://github.com/openai/codex)** — `codex` CLI (used as implementer and reviewer by default)
38
+
39
+ Both must be on your `PATH` and authenticated.
40
+
41
+ ## Install
42
+
43
+ ```bash
44
+ pip install ringside
45
+ ```
46
+
47
+ Or from source:
48
+
49
+ ```bash
50
+ git clone https://github.com/teo/ringside.git
51
+ cd ringside
52
+ pip install -e .
53
+ ```
54
+
55
+ ## Quick start
56
+
57
+ ```bash
58
+ # Full end-to-end flow: brief → plan → implement → verify
59
+ # (opens the boxing viewer automatically)
60
+ ringside run
61
+
62
+ # Or if you already have a task file
63
+ ringside run .ringside/tasks/add-retry-logic.md
64
+
65
+ # Plan only, then implement later
66
+ ringside run task.md --plan-only
67
+ ringside run --continue-run .ringside/runs/20260401-100033
68
+ ```
69
+
70
+ ## Commands
71
+
72
+ | Command | Description |
73
+ |---------|-------------|
74
+ | `ringside run` | Full flow: interactive brief, then run the pipeline with viewer |
75
+ | `ringside run <task.md>` | Run pipeline on an existing task file |
76
+ | `ringside run <task.md> --plan-only` | Plan only, skip implementation |
77
+ | `ringside run --continue-run <run-dir>` | Continue a plan-only run with implementation |
78
+ | `ringside brief [description]` | Just write a task file (no run) |
79
+ | `ringside watch [path]` | Reopen the boxing viewer for a run |
80
+
81
+ ## How it works
82
+
83
+ 1. **Planning phase** — A drafter (Claude) writes a plan. Reviewers (Claude + Codex) critique it. They debate until all reviewers approve or max rounds are reached.
84
+ 2. **Implementation phase** — An implementer (Codex) edits code following the approved plan. Reviewers audit the changes. Build gates (tests, linting) run between rounds.
85
+ 3. **Visualization** — A browser at `localhost:8731` shows two CSS fighters animating in real-time: punches for drafts, counter-punches for rejections, victory poses for approval.
86
+
87
+ ## Per-project configuration
88
+
89
+ Ringside works out of the box with no configuration. Optionally, add these files to your project root:
90
+
91
+ ### .agency.toml
92
+
93
+ Override agent assignments and build gates:
94
+
95
+ ```toml
96
+ [agents]
97
+ drafter = "claude"
98
+ implementer = "codex"
99
+ plan_reviewers = ["claude", "codex"]
100
+ impl_reviewers = ["codex"]
101
+
102
+ [[gates.step]]
103
+ label = "tests"
104
+ cmd = ["pytest", "-q"]
105
+ ```
106
+
107
+ ### .agency-standards.md
108
+
109
+ Override the engineering standards injected into every agent prompt. Useful for domain-specific rules.
110
+
111
+ ### CLAUDE.md
112
+
113
+ Project context (what the codebase does, key conventions) — automatically picked up and passed to all agents so they understand your project.
114
+
115
+ ## Output
116
+
117
+ Runs are saved to `.ringside/runs/<timestamp>/` in your working directory:
118
+
119
+ - `run.json` — full event log (consumed by the viewer)
120
+ - `final_plan.md` — the approved plan
121
+ - `followup_task.md` — auto-generated task for `--continue-run`
122
+
123
+ ## License
124
+
125
+ MIT
ringside-0.1.0/PLAN.md ADDED
@@ -0,0 +1,81 @@
1
+ # ringside
2
+
3
+ Watch your AI agents fight it out.
4
+
5
+ `ringside` is two things in one package:
6
+ 1. A multi-agent debate pipeline (drafter → reviewers → consensus loop)
7
+ 2. A live boxing visualization that turns that debate into a fight you can watch in a browser
8
+
9
+ The idea: you run `ringside run my-task.md --watch`, a browser tab opens, and you watch your agents punch each other in real time as they debate your code.
10
+
11
+ ---
12
+
13
+ ## Status
14
+
15
+ - [x] Package scaffold + pip installable (`ringside run`, `ringside watch`)
16
+ - [x] `agency.py` migrated in with `agent_started` events for live tracking
17
+ - [x] `server.py` — FastAPI WebSocket server, latest-run tracking, reset/replay semantics
18
+ - [x] `index.html` — boxing viewer with multi-reviewer roster, timeline, replay, and live progress
19
+
20
+ The fun part: `server.py` and `index.html` are going to be built *using* the debate pipeline. Agents will plan and implement the visualization that visualizes agents. First run will be terminal-only, after that you watch the fight live.
21
+
22
+ ---
23
+
24
+ ## How it works (rough)
25
+
26
+ ```
27
+ ringside run task.md --watch
28
+ └── starts server in background thread
29
+ └── opens browser (shows placeholder until first event)
30
+ └── runs agency debate loop
31
+ └── writes run.json after every event (atomic)
32
+ server polls run.json every 200ms
33
+ └── broadcasts new events via WebSocket
34
+ browser receives events
35
+ └── animates fighters based on event type
36
+ ```
37
+
38
+ Events already captured: `phase_start`, `agent_started`, `draft`, `review`, `debate`, `round_end`, `build_gates`, `implementation`, `verification`, `summary`, `run_end`.
39
+
40
+ ---
41
+
42
+ ## The visualization — open questions
43
+
44
+ This is deliberately underspecified. Before building, research and experiment:
45
+
46
+ - **Fighter visuals**: CSS-only shapes are the fast path, but pixel art sprites would look way better. Worth looking at what's available (OpenGameArt, itch.io free assets, Lottie animations). The right answer here isn't obvious — do a spike.
47
+ - **Animation library vs raw CSS**: Raw CSS keyframes are zero-dep and fast to ship. Something like GSAP or even a lightweight sprite engine might make the animations feel much better. TBD based on what the agents produce and what looks good.
48
+ - **Sound**: Bell dings, punch sounds, crowd noise — very doable with the Web Audio API. Probably a v2 thing but worth thinking about early so the event hooks are in place.
49
+ - **Multiple reviewers**: Implemented as a phase-scoped tag-team roster with stable reviewer slots and per-reviewer HP.
50
+ - **Mobile / responsive**: Probably not the first priority but the layout shouldn't be completely broken on a laptop screen at least.
51
+ - **Replay mode**: Mixed mode is in place now — first hydration of a finished run can be cinematic, while reconnects and live re-hydration should snap back to authoritative state.
52
+
53
+ ---
54
+
55
+ ## Distribution — also open
56
+
57
+ Currently `pip install -e .` from the repo. Eventually:
58
+ - Publish to PyPI as `ringside`
59
+ - Maybe a Homebrew formula for non-Python users
60
+ - A `ringside init` command that sets up `.agency.toml` and the data dir in a new project
61
+
62
+ The pip approach is fine for now. Don't over-engineer the distribution story until the core product works and feels good.
63
+
64
+ ---
65
+
66
+ ## Build order (next steps)
67
+
68
+ 1. Run `ringside run data/agency-tasks/boxing-viewer.md --plan-only` — get a reviewed plan for server.py + index.html
69
+ 2. Review and approve the plan, then run `--impl-only`
70
+ 3. First real fight: use ringside to build the next feature of ringside
71
+ 4. Iterate on visuals — this will probably go through several rounds before it looks right
72
+ 5. README + basic docs once it's working
73
+
74
+ ---
75
+
76
+ ## Principles
77
+
78
+ - **Gameplay comes first** — if it isn't fun to watch, nothing else matters
79
+ - **No external CDN** — the viewer should work offline
80
+ - **Keep agency.py generic** — it works on any codebase, don't couple it to ringside-specific logic
81
+ - **Ship fast** — get something working and visible, then improve the visuals incrementally
@@ -0,0 +1,100 @@
1
+ # ringside
2
+
3
+ AI agent debate pipeline with live boxing visualization.
4
+
5
+ Ringside runs multi-agent debates where a drafter proposes a plan, reviewers critique it, and they iterate until consensus — then an implementer writes code while reviewers audit. The whole thing plays out as a live boxing match in your browser.
6
+
7
+ ## Prerequisites
8
+
9
+ Ringside dispatches to AI agent CLIs. You need at least one installed:
10
+
11
+ - **[Claude Code](https://docs.anthropic.com/en/docs/claude-code)** — `claude` CLI (used as drafter and reviewer by default)
12
+ - **[Codex](https://github.com/openai/codex)** — `codex` CLI (used as implementer and reviewer by default)
13
+
14
+ Both must be on your `PATH` and authenticated.
15
+
16
+ ## Install
17
+
18
+ ```bash
19
+ pip install ringside
20
+ ```
21
+
22
+ Or from source:
23
+
24
+ ```bash
25
+ git clone https://github.com/teo/ringside.git
26
+ cd ringside
27
+ pip install -e .
28
+ ```
29
+
30
+ ## Quick start
31
+
32
+ ```bash
33
+ # Full end-to-end flow: brief → plan → implement → verify
34
+ # (opens the boxing viewer automatically)
35
+ ringside run
36
+
37
+ # Or if you already have a task file
38
+ ringside run .ringside/tasks/add-retry-logic.md
39
+
40
+ # Plan only, then implement later
41
+ ringside run task.md --plan-only
42
+ ringside run --continue-run .ringside/runs/20260401-100033
43
+ ```
44
+
45
+ ## Commands
46
+
47
+ | Command | Description |
48
+ |---------|-------------|
49
+ | `ringside run` | Full flow: interactive brief, then run the pipeline with viewer |
50
+ | `ringside run <task.md>` | Run pipeline on an existing task file |
51
+ | `ringside run <task.md> --plan-only` | Plan only, skip implementation |
52
+ | `ringside run --continue-run <run-dir>` | Continue a plan-only run with implementation |
53
+ | `ringside brief [description]` | Just write a task file (no run) |
54
+ | `ringside watch [path]` | Reopen the boxing viewer for a run |
55
+
56
+ ## How it works
57
+
58
+ 1. **Planning phase** — A drafter (Claude) writes a plan. Reviewers (Claude + Codex) critique it. They debate until all reviewers approve or max rounds are reached.
59
+ 2. **Implementation phase** — An implementer (Codex) edits code following the approved plan. Reviewers audit the changes. Build gates (tests, linting) run between rounds.
60
+ 3. **Visualization** — A browser at `localhost:8731` shows two CSS fighters animating in real-time: punches for drafts, counter-punches for rejections, victory poses for approval.
61
+
62
+ ## Per-project configuration
63
+
64
+ Ringside works out of the box with no configuration. Optionally, add these files to your project root:
65
+
66
+ ### .agency.toml
67
+
68
+ Override agent assignments and build gates:
69
+
70
+ ```toml
71
+ [agents]
72
+ drafter = "claude"
73
+ implementer = "codex"
74
+ plan_reviewers = ["claude", "codex"]
75
+ impl_reviewers = ["codex"]
76
+
77
+ [[gates.step]]
78
+ label = "tests"
79
+ cmd = ["pytest", "-q"]
80
+ ```
81
+
82
+ ### .agency-standards.md
83
+
84
+ Override the engineering standards injected into every agent prompt. Useful for domain-specific rules.
85
+
86
+ ### CLAUDE.md
87
+
88
+ Project context (what the codebase does, key conventions) — automatically picked up and passed to all agents so they understand your project.
89
+
90
+ ## Output
91
+
92
+ Runs are saved to `.ringside/runs/<timestamp>/` in your working directory:
93
+
94
+ - `run.json` — full event log (consumed by the viewer)
95
+ - `final_plan.md` — the approved plan
96
+ - `followup_task.md` — auto-generated task for `--continue-run`
97
+
98
+ ## License
99
+
100
+ MIT
@@ -0,0 +1,41 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "ringside"
7
+ version = "0.1.0"
8
+ description = "AI agent debate pipeline with live boxing visualization"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.11"
12
+ authors = [
13
+ { name = "Teo" },
14
+ ]
15
+ keywords = ["ai", "agents", "debate", "multi-agent", "visualization"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Topic :: Software Development :: Quality Assurance",
25
+ ]
26
+ dependencies = [
27
+ "rich>=13",
28
+ "fastapi>=0.110",
29
+ "uvicorn[standard]>=0.29",
30
+ "websockets>=12",
31
+ ]
32
+
33
+ [project.urls]
34
+ Homepage = "https://github.com/futbolbjk/ringside"
35
+ Repository = "https://github.com/futbolbjk/ringside"
36
+
37
+ [project.scripts]
38
+ ringside = "ringside.cli:main"
39
+
40
+ [tool.hatch.build.targets.wheel]
41
+ packages = ["src/ringside"]
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"