summaryrefslogtreecommitdiff
path: root/.agents
diff options
context:
space:
mode:
Diffstat (limited to '.agents')
-rw-r--r--.agents/skills/pardes-9p/SKILL.md38
1 files changed, 25 insertions, 13 deletions
diff --git a/.agents/skills/pardes-9p/SKILL.md b/.agents/skills/pardes-9p/SKILL.md
index 2cea4d4a..91a8e864 100644
--- a/.agents/skills/pardes-9p/SKILL.md
+++ b/.agents/skills/pardes-9p/SKILL.md
@@ -49,7 +49,7 @@ $m/exec write a line = a middle click: an editor command word, or a shell
$m/log one record per read: new|del|rename|save <serial> <name>; reads park
$m/screen the rendered screen as JSON, frozen per open
$m/listeners this session's dial addresses
-$m/pane/ mkdir opens a pane; rmdir <serial> closes it
+$m/pane/new open it to make a pane, read names it; rmdir $m/pane/<n> closes it
$m/os/ the host filesystem
```
@@ -60,7 +60,7 @@ reuse or close a pane.
```sh
cat "$m/index" # which panes exist
-mkdir "$m/pane/x"; n=$(awk 'END{print $1}' "$m/index") # open one, take its serial
+n=$(cat "$m/pane/new") # make one, take its serial
printf 'text\n' > "$m/pane/$n/body" # append
cat "$m/pane/$n/tag" # what its tagline offers
echo notes.txt > "$m/pane/$n/name" # rename the buffer
@@ -69,10 +69,20 @@ echo "/etc/hosts:3" > "$m/look"; cat "$m/look" # open a file, see where it land
rmdir "$m/pane/$n" # close it, dirty or not
```
-The name `mkdir` asks for is ignored: a pane is named by the serial the editor
-gives it, and because `/index` is ordered by serial its last row is the pane
-just made. Nothing else in the tree can be created or removed, and no read
-creates anything, so `ls`, `stat` and `find` over the whole tree are inert.
+**Opening** `$m/pane/new` is what makes a pane, and reading the open file
+answers its serial — `/net/tcp/clone`'s mechanism. Each open makes another one,
+two reads of the same open file answer the same serial, and closing it leaves
+the pane. A pane is named by the serial the editor gives it, never by a name
+you choose.
+
+A *stat* makes nothing, which is the whole reason the allocation sits on open:
+`new` is listed in `$m/pane`, so `ls` shows it, and `ls -l`, `find` and
+anything else that stats every name a listing handed it stay inert. acme
+allocates on the walk instead and lets it land inside the new window, so
+`/dev/new/body` works in one step — it can afford that because a Plan 9
+directory read carries every entry's stat and nothing walks. Under a kernel or
+FUSE mount that would be a pane per `ls -l`. Nothing else in the tree can be
+created or removed, and no read creates anything.
`look` and `exec` are the editor's two clicks, one per line of a write, at the
active pane from the root and at that pane from `$m/pane/<n>/look` and
@@ -107,11 +117,12 @@ search and reads empty until set; truncate it to lift it.
buffer differs from its file, whether a write pushes an undo point, and whether
a write scrolls. Truncating `tag` clears the part of the tag you may edit.
-Address state belongs to the pane, not to a client: opening `addr` resets it,
-so two clients addressing the same pane will interfere. `$pane/ctl` reads
-acme's window status line — serial, tag length, body length, a reserved zero,
-the dirty flag, the width in cells, the font and the tab width — and takes the
-one verb `get`.
+Address state belongs to the pane, not to a client: it keeps the last range
+written until someone writes or truncates it, so writing an address and reading
+it back evaluates it, and two clients addressing the same pane will interfere.
+`$pane/ctl` reads acme's window status line — serial, tag length, body length,
+a reserved zero, the dirty flag, the width in cells, the font and the tab
+width — and takes the one verb `get`.
Terminal panes have no file: writing their `body` sends child input, and
truncation does not erase terminal history.
@@ -209,8 +220,9 @@ with tempfile.TemporaryDirectory(prefix='pardes-9p-skill-') as directory:
PY
```
-`new_pane` is `mkdir` plus a read of the index; `execute` writes one line to a
-pane's `exec`. Both are in `test/fs.py`. For terminal tests, use
+`new_pane` walks to `/pane/new` and reads the serial off the directory it
+lands on; `execute` writes one line to a pane's `exec`. Both are in
+`test/fs.py`. For terminal tests, use
`session(..., tty=True)` and read
[test/agent_session.py](../../../test/agent_session.py) for bounded interactive
driving; its readiness text and history threshold are application-specific, and