Skip to content

Commit 2eb315c

Browse files
authored
Make graphs demo-visible and add the harness talk kit (#11)
Stage-safe bundled demo graph, parent-only graph tool, ASCII DAGs, onStep progress, statusline c:N, dashboard last thread, plus the 3 Sep talk deck and demo script.
1 parent 5f33210 commit 2eb315c

39 files changed

Lines changed: 2117 additions & 46 deletions

‎docs/cli.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ Sessions are stored as `<cwd>/.polycode/sessions/<id>.json` and saved after each
5858
| `/worktree remove <id>` | `git worktree remove --force` that tree. |
5959
| `/workflows` | Bundled + `.polycode/workflows/*.json` + `~/.config/polycode/workflows/*.json`. |
6060
| `/workflow <name> [query]` | Run a named JSON workflow (parallel, then sequential `steps`, then synthesize). Budgeted. |
61-
| `/graphs` | Bundled + `.polycode/graphs/*.json` agent graphs. |
62-
| `/graph <name> [query]` | Run a checkpointed graph (`/graph resume <id>`, `/graph status <id>`). |
61+
| `/graphs` | Bundled + `.polycode/graphs/*.json` agent graphs (ASCII DAG). |
62+
| `/graph show <name>` | Print a graph's DAG. |
63+
| `/graph <name> [query]` | Run a checkpointed graph (`/graph resume <id>`, `/graph status <id>`). Stage-safe: `/graph demo …`. |
6364
| `/forme [name]` | Skill: FOR{Name}.md + visual HTML (SVG, no image gen). |
6465
| `/matsumura-style [args]` | Skill: Matsumura/Sturzinger memo. |
6566
| `/deep-research <q>` | Budgeted workflow: 3 researcher children, then a synthesize child writes `docs/research/<slug>.md`. |

‎docs/demo-script.md‎

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# polycode live demo — 3 Sep 2026
2+
3+
Cheat sheet for the talk. **Ask mode. Local TUI. No yolo. No `--serve`.**
4+
If the room is restless, skip to beat 5. If the model is slow, skip to backup.
5+
6+
Repo: `C:\Users\gasan\OneDrive\Dev\Projects\polycode`
7+
Launch: Windows Terminal, not cmd.
8+
9+
```
10+
cd C:\Users\gasan\OneDrive\Dev\Projects\polycode
11+
corepack pnpm dev
12+
```
13+
14+
First-run: keys already in Settings. Confirm statusline shows `ask` and a real model (`xai:…` or whatever is live). If it opens Settings, Esc.
15+
16+
Font large enough that `/graphs` DAGs are readable from the back row.
17+
18+
---
19+
20+
## What you are proving (say this once)
21+
22+
> polycode is a **terminal coding agent** we host. Same ReAct loop for Grok, Gemini, OpenAI, Muse. Children are **one layer**. Graphs are a **state machine on that loop** — not LangChain, not LangGraph, not Grok Build cloud.
23+
24+
Then stop talking and type.
25+
26+
---
27+
28+
## Beats (target ~8 minutes)
29+
30+
| # | You type | Audience should see | You say |
31+
|---|---|---|---|
32+
| 0 | *(already running)* | Banner, composer, statusline `ask` | “This is the product. Not a website.” |
33+
| 1 | `what is this repo?` | Tools: glob/grep/read (not `bash`+`wc`). Answer cites `packages/`. | “The model inventories with glob, not a shell.” |
34+
| 2 | `/hepl` | **System** line: `isn't a command — not sent to the model. Did you mean /help?` | “Typos stay in the TUI. They never become a prompt.” |
35+
| 3 | `/mode plan` then `edit README to say hello` | Plan mode; write/edit **refused**. | “Plan is read-only. Permissions are the product.” |
36+
| 4 | `/mode ask` · `/graphs` | `demo`, `explore`, `research-implement` each with `START → … → __end__` | “These are graphs. ASCII DAG, not a slide.” |
37+
| 5 | `/graph show demo` | One-node explore DAG + “Stage-safe” | “Tomorrow’s live path is this graph — no worktree.” |
38+
| 6 | `/graph demo how the agent loop works and how /graph differs from /team` | Progress: `graph demo · running · …` then a child, then checkpoint | “Node = child agent. Checkpoint after the super-step.” |
39+
| 7 | `/dashboard` (or `Ctrl+\`) | Child list + dim last-graph line. Statusline may show `c:1` while it runs. | “Dashboard is the swarm. `c:N` on the statusline.” |
40+
41+
**Do not** run `/graph research-implement` on stage (worktree + writer). **Do not** `/mode yolo`. **Do not** `--serve`.
42+
43+
---
44+
45+
## Backup (30 seconds)
46+
47+
If `/graph demo` errors or the model stalls:
48+
49+
```
50+
/explore what is this repo? Cite packages/core and packages/graph.
51+
```
52+
53+
Read-only child. Same spawn path as a graph node. Then `/dashboard`.
54+
55+
If `/hepl` ever looks red: it is still a **system** message, not a crash. Point at “not sent to the model.”
56+
57+
If permissions pop on bash: press **`a`** (allow bash this session). Lead with `a`, not `y`. That was Jared’s 2/5.
58+
59+
---
60+
61+
## If they ask
62+
63+
| Question | Honest answer |
64+
|---|---|
65+
| Is this LangGraph? | **No.** We reimplemented state, edges, super-step, file checkpointer on our loop. Zero `@langchain/*`. |
66+
| Is this Grok Build? | **Shape**, not the product. No Rhai, no Grok cloud, no tenant isolation. TypeScript workflows + graphs. |
67+
| Isolation? | BYOK, docker `--network none`, path jail, deny/protect before “safe.” Hosted HTTP is a scaffold. |
68+
| Nested agents? | Depth **1**. Children cannot spawn. Parent-only: `task`, `task_wait`, `task_kill`, `graph`. |
69+
| Persistence? | Chat = `.polycode/sessions/`. Graph = `.polycode/graph-runs/<thread>.json`. `/graph resume <id>` continues the **machine**. |
70+
| Windows? | First-class. `wc` is not a tool. Glob is. |
71+
| Tests? | Unit tests next to the bug. Cranky review until APPROVE. Not a substitute for a live TTY. |
72+
73+
---
74+
75+
## Timing if you have 12 minutes
76+
77+
After beat 7: `/graph` (list threads) → `/graph status <id>` → open `docs/FORgasan.html` if they want the narrative.
78+
79+
---
80+
81+
## Pre-flight (night before)
82+
83+
1. `corepack pnpm test` green (314 on this branch).
84+
2. `corepack pnpm dev` once; run beats 2, 4, 5, 6 on this machine.
85+
3. Font + Windows Terminal theme: dark, coral readable.
86+
4. Network for the model key. No demo of Settings paste unless you must.
87+
5. Close other `.polycode` TUI sessions so dashboard is this one.
88+
6. This file printed or on a second screen. Deck: `docs/polycode-harness.pptx`.

‎docs/graph.md‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ seam and pull a second agent stack.
2323
## Authoring
2424

2525
Project file `.polycode/graphs/<name>.json` (or `graphs/` under the user config dir).
26-
Bundled: `explore`, `research-implement`.
26+
Bundled: `demo` (stage-safe one-node explore, no worktree), `explore`, `research-implement`.
2727

2828
```json
2929
{
@@ -58,14 +58,19 @@ for `/graph resume <thread>`.
5858

5959
| Command | Effect |
6060
|---|---|
61-
| `/graphs` | Bundled + user + project graphs |
62-
| `/graph <name> [query]` | Compile, run, checkpoint each super-step |
61+
| `/graphs` | Bundled + user + project graphs, each with a one-line ASCII DAG |
62+
| `/graph show <name>` | Full DAG + description |
63+
| `/graph <name> [query]` | Compile, run, checkpoint each super-step (progress lines as it goes) |
6364
| `/graph` / `/graph list` | Saved threads under `.polycode/graph-runs/` |
6465
| `/graph status <id>` | Dump checkpoint |
6566
| `/graph resume <id>` | Continue interrupted/failed |
6667

68+
The parent also has a `graph` tool (stripped from children) so the model can invoke a named
69+
pipeline instead of chaining `task` calls. Statusline shows `c:N` while children run;
70+
`/dashboard` prints the last graph thread under the child list.
71+
6772
Each node is a depth-1 child: same tools, sandbox, permission engine as `/team`. Worktree
68-
nodes still isolate writes.
73+
nodes still isolate writes. Prefer `/graph demo <query>` on a live stage — it is explore-only.
6974

7075
## Persistence
7176

0 commit comments

Comments
 (0)