diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 01:15:28 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | 2e6777e06e3f3e9d59ec847b98e0cb676d04296a (patch) | |
| tree | de4f2cecfe92706ca7033527d326042f6e90e8a5 /src/skill.txt | |
| parent | 91360c20923c8ce30829f19bcd192bb78a4c3918 (diff) | |
| download | pardes-2e6777e06e3f3e9d59ec847b98e0cb676d04296a.tar.gz pardes-2e6777e06e3f3e9d59ec847b98e0cb676d04296a.zip | |
main: the command line is commands that describe themselves, over the tree that does
The user: "the cli should be like a living documentation, similar to 9p
and maybe even share the source code but with different sinks", rex's
CLI the model. pardes [flags] [FILE] opens, starts or pages as it did; a
first word naming a command is that command (a file named so is ./ps, or
after --): ps, attach [NAME], kill NAME|--all, new [flags] [FILE] for
sessions; do WORD [ARG] and words [GROUP] for the builtins; fs VERB [PATH]
for the tree; help [CMD|WORD|PATH], completion SHELL, skill, version.
One definition, several sinks. main.zig's `cmds` (an EnumArray over the
Cmd enum: group, args, first-screen line, doc, examples, see-also) is
both what args[1] is matched against and every command's help; `flags`
(over the Flag enum: what it takes, its doc, session/open/old) is both
the flag loop's parser and `help new`. The 70-line help_text and the flag
enum kept apart from it are gone; every flag behaves as before, and
--ps, --attach[=NAME], --kill=NAME, --kill-all, -h/--help and --version
are the commands' old spellings for a release (EDITOR='pardes --wait'
unchanged). What a word or a file does is the tree's to say: words,
help WORD, help PATH, fs and the completions read /commands and /README
over cloud9's Fsys, from the session (-s NAME, else $PARDES_9P, else the
only one whose socket answers) or, with none, from a core this process
makes (Pardes.create, never stepped: no shell, file or socket) and serves
on one end of a socket pair to an Fsys on the other (`Here`: cloud9's
engine, one thread), so both are the same client over the same tree.
With no session, fs ls/stat/help/complete and a read of README, commands
or ctl answer; a read of anything else, or a write, says it is a running
session's and how to start one. do picks the ctl by /commands' scope (a
pane's word needs $PARDES_PANE or -p N) and prints a refusal in the
session's words. completion prints a bash, fish or zsh script that asks
`pardes completion -- WORDS` back. skill prints src/skill.txt, the
recipes and traps, which leaves the inventory to pardes help. version
adds the 9P the tree speaks.
The reference's "The pardes command" includes docs/typ/command-line.txt,
`pardes help --all` (never a session's), which the builtins-json step
(-Dplatform=tui) now writes too; a main.zig test fails when it is stale.
test/process/cli.zig: five cases through the binary, with and without a
session; flags' eight pass unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'src/skill.txt')
| -rw-r--r-- | src/skill.txt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/skill.txt b/src/skill.txt new file mode 100644 index 00000000..8ae6a15a --- /dev/null +++ b/src/skill.txt @@ -0,0 +1,47 @@ +pardes, for an agent +==================== + +pardes is an editor (acme's mouse, helix's keys) and a terminal multiplexer, +and every session is a file tree served over 9P: panes, columns, tags and +the session are files. This guide is the judgement; the inventory is the +binary's own and the session's, and it is always the one to trust: + + pardes help the commands + pardes help PATH what the tree's README says of a file (pane, log...) + pardes words every builtin; pardes help WORD for one + pardes fs ls PATH what a session serves now + +Find the session + In a pane's shell, $PARDES_9P is its socket and $PARDES_PANE the pane: + every command below acts there. From outside, `pardes ps` lists the + sessions and -s NAME picks one. Never act on a session you did not start + or were not asked to touch: start your own, detached, and end it by name. + + pardes new --detach=work & a session with no terminal, named work + pardes fs read index -s work a line per pane + pardes kill work done with it + +Recipes + n=$(pardes fs read pane/new -s work) make a pane, take its serial + pardes fs write pane/$n/name /tmp/x.txt -s work name it + printf 'text\n' | pardes fs write pane/$n/body -s work replace its text + pardes do Save -p $n -s work a pane's builtin + pardes do Newcol -s work a session's builtin + pardes fs write pane/$n/ctl 'Edit ,x/foo/c/bar/' -s work sam's Edit, one undo step + pardes fs ask pane/$n/look /etc/hosts:3 -s work open a file there; answers the pane it went to + pardes fs ask pane/$n/pty/run make -s work on a terminal pane: exit N, then the output + pardes fs follow log follow -s work events as they come (Ctrl-C ends it) + pardes fs read screen -s work what is drawn, as JSON + +Traps + A refusal is printed in the session's words and the exit is 1; through a + mount the same refusal is only EINVAL or EIO (grep '^err' log says why). + Pane words (Save Undo Del) go to a pane's ctl, settings and session words + to the root's: pardes do picks the ctl, pardes help WORD says which. + The root's look and exec act at the pane with the keyboard, which a person + may be using: write a pane's own look and exec instead. + addr is the pane's and moves on: each /re/ searches from the last. + Exit, Restore, Del and get refuse once over unsaved text; the same word + again discards it. + A read the session holds (log follow, an event file) waits for ever only + under fs follow; other calls give up after 30 s, saying so. |
