Skip to content

Commit 53288f2

Browse files
bcurtsclaude
andcommitted
feat: sessions -- structured multi-agent workflows with phases and roles
Session engine with sequential phases, role casting, turn-taking, and draft proposals with revision lineage. Built-in templates: code review, debate, design critique, planning. Custom session design via UI button. Compact/expanded draft cards, cross-channel session awareness indicator, inline request-changes feedback, and is_custom fix for draft-run templates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 95bb3f3 commit 53288f2

File tree

15 files changed

+2764
-14
lines changed

15 files changed

+2764
-14
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Force LF line endings for shell scripts (they break with CRLF on Mac/Linux)
2+
*.sh text eol=lf
3+
4+
# Force LF for Unix-specific Python wrapper
5+
wrapper_unix.py text eol=lf

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ build/
1717
.gemini/
1818
.claude/
1919
tests/
20+
agents_lineup.svg
21+
docs/
22+
goals.py
23+
pr-reviews/

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,21 @@ The Rules panel opens from the header. Rules are grouped into **Active**, **Draf
113113

114114
**Remind agents** re-sends the current rules on the next trigger. The badge on the Rules button shows unseen proposals only. Max 160 chars per rule.
115115

116+
### Sessions
117+
Structured multi-agent workflows with sequential phases, role casting, and turn-taking. Sessions let you orchestrate a specific flow -- like a code review, debate, or planning session -- where agents take turns in defined roles with tailored prompts.
118+
119+
**Built-in templates:** Code Review, Debate, Design Critique, and Planning. Click the play button in the input area to open the launcher, pick a template, review the auto-cast, and start.
120+
121+
**Custom sessions:** Click "Design a session" in the launcher, pick an agent, and describe what you want. The agent proposes a session draft as a card in the timeline. From there:
122+
- **Run** -- opens a cast preview where you assign agents to roles, then starts the session
123+
- **Save Template** -- saves the draft as a reusable template in the launcher
124+
- **Request Changes** -- inline feedback form; the agent revises and the old draft is superseded
125+
- **Dismiss** -- grey out the card
126+
127+
During a session, phase banners mark transitions in the timeline, a sticky session bar shows progress, and agents are triggered sequentially with phase-specific prompts. The output phase is highlighted when the session completes.
128+
129+
Sessions are channel-scoped (one active per channel) and survive page refreshes. Custom templates persist across restarts.
130+
116131
### Activity indicators
117132
Status pills show a spinning border in each agent's color when that agent is actively working — so you can minimize the terminals and still know at a glance who's busy. Detection works by hashing the agent's terminal screen buffer every second: if anything changes (spinner, streaming text, tool output), the pill lights up. When the screen stops changing, it stops instantly. Cross-platform — Windows uses `ReadConsoleOutputW`, Mac/Linux uses `tmux capture-pane`.
118133

@@ -385,6 +400,9 @@ The wrapper registers with the server, watches for @mentions, reads recent chat
385400
| `jobs.py` | Job store — JSON persistence, status tracking, threaded conversations |
386401
| `rules.py` | Rule store — JSON persistence, propose/activate/draft/archive/delete with epoch tracking |
387402
| `summaries.py` | Per-channel summary store — JSON persistence, read/write with 1000-char cap |
403+
| `session_engine.py` | Session orchestration — phase advancement, turn triggering, prompt assembly |
404+
| `session_store.py` | Session persistence — run state, template loading/validation, custom template storage |
405+
| `session_templates/` | Built-in session templates (JSON) — code review, debate, design critique, planning |
388406
| `router.py` | @mention parsing, agent routing, loop guard (human mentions always pass through) |
389407
| `agents.py` | Writes trigger queue files for wrapper to pick up |
390408
| `mcp_bridge.py` | MCP tool definitions (`chat_send`, `chat_read`, `chat_claim`, etc.) |

0 commit comments

Comments
 (0)