@amsterdamdatalabs/enact-extensions 0.1.35 → 0.1.37
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.
|
@@ -36,11 +36,13 @@ cmux tree # process/Surface tree (optional)
|
|
|
36
36
|
# Read a follower
|
|
37
37
|
cmux read-screen --surface surface:N [--lines 40] [--scrollback]
|
|
38
38
|
|
|
39
|
-
# Drive a follower (
|
|
39
|
+
# Drive a follower (send → 2×Enter → ctrl+b → verify EMPTY box)
|
|
40
40
|
cmux send --surface surface:N "text\n"
|
|
41
|
-
cmux send-key --surface surface:N enter #
|
|
41
|
+
cmux send-key --surface surface:N enter # Enter #1
|
|
42
|
+
cmux send-key --surface surface:N enter # Enter #2 — one Enter often does NOT land
|
|
43
|
+
cmux send-key --surface surface:N ctrl+b # flush a QUEUED msg — no-op while only thinking
|
|
44
|
+
cmux read-screen --surface surface:N --lines 6 # confirm the ❯ box is EMPTY (it landed)
|
|
42
45
|
cmux send-key --surface surface:N ctrl+c # interrupt a runaway
|
|
43
|
-
cmux send-key --surface surface:N ctrl+b # flush a QUEUED msg — only if a command is running
|
|
44
46
|
|
|
45
47
|
# Spawn a follower (root it correctly, THEN launch claude)
|
|
46
48
|
cmux new-split right --focus false # -> surface:N
|
|
@@ -56,8 +58,9 @@ cmux close-surface --surface surface:N
|
|
|
56
58
|
|
|
57
59
|
Every follower briefing must tell the follower to use the **cmux-send** skill. Each message: prefix
|
|
58
60
|
`[LEADER] to [FOLLOWER-<name>] `, end with `Respond back once you are done with using prefix
|
|
59
|
-
"[FOLLOWER-<name>] to [LEADER] "`. After every `send`, `
|
|
60
|
-
|
|
61
|
+
"[FOLLOWER-<name>] to [LEADER] "`. After every `send`, fire **two** `send-key … enter` (one Enter
|
|
62
|
+
often does not land) + one `ctrl+b`, then `read-screen` and confirm the `❯` box is **empty** — an
|
|
63
|
+
empty inbox is the only proof it submitted.
|
|
61
64
|
|
|
62
65
|
## Leader loop
|
|
63
66
|
|
|
@@ -65,6 +68,7 @@ parked in the `❯` box, `send-key … enter` (NOT `ctrl+b`).
|
|
|
65
68
|
2. **Spawn & brief** — split → `cd <repo>` (verify pwd) → `claude` → self-contained briefing (role,
|
|
66
69
|
scope, exit criteria, "use cmux-send to reply, report in one line").
|
|
67
70
|
3. **Poll on a ~15-min cadence** — never go idle while followers run. Re-discover topology, `read-screen`
|
|
68
|
-
each, classify (working / idle-done / parked / blocked / ctx≥80%), and act: parked → `send-key enter
|
|
69
|
-
ctx≥80% → tell it to `/compact`; blocked → answer;
|
|
71
|
+
each, classify (working / idle-done / parked / blocked / ctx≥80%), and act: parked → `send-key enter`
|
|
72
|
+
×2 + `ctrl+b`, then verify the `❯` box is empty; ctx≥80% → tell it to `/compact`; blocked → answer;
|
|
73
|
+
idle-done → assign next or `close-surface`.
|
|
70
74
|
4. **Verify & gate** — confirm real output before treating a slice as green; drive merges from the leader.
|
|
@@ -7,19 +7,27 @@ description: "How to correctly message a cmux surface — the send→verify→en
|
|
|
7
7
|
|
|
8
8
|
Two parts are easy to get wrong: **submitting** the message and **wrapping** it.
|
|
9
9
|
|
|
10
|
-
## 1. Submit protocol (
|
|
10
|
+
## 1. Submit protocol (send → 2×Enter → ctrl+b → verify empty box)
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
cmux send --surface surface:N "<one-line message>\n" # \n = Enter
|
|
14
|
-
cmux
|
|
15
|
-
cmux send-key --surface surface:N enter #
|
|
13
|
+
cmux send --surface surface:N "<one-line message>\n" # \n = Enter (often not enough alone)
|
|
14
|
+
cmux send-key --surface surface:N enter # Enter #1
|
|
15
|
+
cmux send-key --surface surface:N enter # Enter #2 — one Enter frequently does NOT land
|
|
16
|
+
cmux send-key --surface surface:N ctrl+b # flush if a bash command is running
|
|
17
|
+
cmux read-screen --surface surface:N --lines 6 # VERIFY: the ❯ box is EMPTY (message left)
|
|
16
18
|
```
|
|
17
19
|
|
|
18
|
-
- **
|
|
19
|
-
thinking — the text parks in the `❯` box.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
`ctrl+b`
|
|
20
|
+
- **Send TWO Enter keys, not one.** A single `send-key … enter` (or the trailing `\n`) frequently
|
|
21
|
+
fails to submit while the follower is booting or thinking — the text parks in the `❯` box. Two
|
|
22
|
+
Enters is the reliable default; a leftover empty Enter is harmless.
|
|
23
|
+
- **Then one `ctrl+b`.** It flushes a *queued* message only when the follower has a **running bash
|
|
24
|
+
command** to background; while it is purely thinking `ctrl+b` is a harmless no-op. Sending it
|
|
25
|
+
unconditionally costs nothing and frees the queue the moment a command is running.
|
|
26
|
+
- **Always confirm an EMPTY inbox.** `read-screen` after submitting and check the `❯` box is clear
|
|
27
|
+
(no parked text, no "Press up to edit queued messages"). An empty box is the only proof it landed —
|
|
28
|
+
do not assume submission, verify it.
|
|
29
|
+
- **To submit a parked message, `send-key … enter` (×2), NOT `ctrl+b` alone.** `ctrl+b` does nothing
|
|
30
|
+
while the follower is only thinking.
|
|
23
31
|
- **One line only.** Every literal `\n` submits, so a multi-line prompt fires early and fragments.
|
|
24
32
|
- `read-screen` takes `--surface`, not `--pane`.
|
|
25
33
|
|
|
@@ -35,6 +43,8 @@ with `cmux list-pane-surfaces [--pane pane:N]`.
|
|
|
35
43
|
|
|
36
44
|
```bash
|
|
37
45
|
cmux send --surface surface:3 "[LEADER] to [FOLLOWER-enact-wiki] <instruction on one line>. Respond back once you are done with using prefix \"[FOLLOWER-enact-wiki] to [LEADER] \"\n"
|
|
38
|
-
cmux
|
|
39
|
-
|
|
46
|
+
cmux send-key --surface surface:3 enter # ×2 — one Enter often does not land
|
|
47
|
+
cmux send-key --surface surface:3 enter
|
|
48
|
+
cmux send-key --surface surface:3 ctrl+b # flush if a command is running (no-op while thinking)
|
|
49
|
+
cmux read-screen --surface surface:3 --lines 6 # confirm the ❯ box is EMPTY
|
|
40
50
|
```
|