Skip to content
This repository was archived by the owner on Oct 17, 2026. It is now read-only.

Document the prompt format and add AGENTS.md - #43

Merged
cgraf78 merged 2 commits into
mainfrom
docs/front-door-agents
Oct 17, 2026
Merged

cgraf78 merged 2 commits into
mainfrom
docs/front-door-agents

Conversation

@cgraf78

@cgraf78 cgraf78 commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

The README opened with internal ownership language and a shdeps paragraph, and never said that tmux-copy-last-output only works with one specific two-line prompt, so anyone with a different prompt saw "No command output found" with no hint why. This rewrites the front door around what the three commands do, documents the prompt requirement with tested sample prompts, and adds an AGENTS.md for contributors. Docs only; no code, test, workflow, or installer changes.

  • README: new pitch; a "Prompt format" section with the exact shape the parser accepts plus matching bash PS1 and zsh PROMPT samples; a tmux setup section (copy bindings, pane-border rendering of @term_notify_pending/@term_busy, and hooks, at index [100] so they keep any existing hooks on those events, that clear the pending mark); and a short per-command reference.
  • README: term-notify-sound is described as ringing when invoked, not as detecting long jobs.
  • README: the shdeps loader snippet and the no-op shell.sh move to an "Integrators" note near the bottom; the term-pane-mark ownership detail now lives only in its man page, which already covers it.
  • tmux-copy-last-output.1: replace "the two-line prompt shape used by the surrounding terminal setup" with the actual shape and the sample prompts.
  • AGENTS.md: layout, invariants (pane option names, prompt coupling, man page per command), local versus CI test commands, test isolation, and the CI-only gates (ShellCheck inventory, generated install.sh, actions lock, ci-contract-test workflow pinning).

Testing

  • test/cmdblocks-test: all suites pass, including manpage-test (rerun after the review follow-up).
  • Shared shellcheck-inventory/run.sh at the locked actions SHA: ok=4 failed=0.
  • The sample PS1 and PROMPT were run in real bash and zsh inside a private tmux -S server: tmux-copy-last-output --print returned the last block and --print 3 the last three; a non-matching prompt exited 3.
  • The pane-border format and the after-select-pane and after-select-window clear hooks were checked on a private tmux server, as was term-pane-mark set|clear busy.
  • groff -man renders the edited man page cleanly.
  • On a private tmux -L server, an unindexed set-hook -g after-select-pane replaced an existing index-0 hook, while [100] left it in place.

Review

Group review on three axes: accuracy against the code, public boundary, and newcomer appeal plus AGENTS.md usefulness. No blockers or majors. Tightened in a follow-up commit:

  • README: the second prompt line's command is optional, matching the parser and man page.
  • README: the sample clear hooks use index [100] so they don't replace a user's own hooks.
  • AGENTS.md: shellcheck-test does not source test/helpers.sh.
  • AGENTS.md: install.sh only references support/install-checkout.sh; edit that file directly, and rerun consumer-ci/sync.sh after changing scripts/checkout-installer.conf. <actions@lock> now reads as a cgraf78/actions checkout at the locked SHA.

Summary

The README opened with internal ownership language and a shdeps
paragraph, and never said that `tmux-copy-last-output` only works with
one specific two-line prompt. Anyone with a different prompt saw "No
command output found" with no hint why. This rewrites the front door
around what the three commands do, documents the prompt requirement
with tested sample prompts, and adds an `AGENTS.md` for contributors.

- README: new pitch, a "Prompt format" section with the exact shape the
  parser accepts plus matching bash `PS1` and zsh `PROMPT` samples, a
  tmux setup section (copy bindings, pane-border rendering of
  `@term_notify_pending`/`@term_busy`, and hooks that clear the pending
  mark), and a short per-command reference
- README: `term-notify-sound` is described as ringing when invoked, not
  as detecting long jobs
- README: the shdeps loader snippet and the no-op `shell.sh` move to an
  "Integrators" note near the bottom; the `term-pane-mark` ownership
  detail now lives only in its man page, which already covers it
- `tmux-copy-last-output.1`: replace "the two-line prompt shape used by
  the surrounding terminal setup" with the actual shape and the sample
  prompts
- `AGENTS.md`: layout, invariants (pane option names, prompt coupling,
  man page per command), local versus CI test commands, test isolation,
  and the CI-only gates (ShellCheck inventory, generated `install.sh`,
  actions lock, `ci-contract-test` workflow pinning)

Testing

- `test/cmdblocks-test`: all suites pass, including `manpage-test`
- shared `shellcheck-inventory/run.sh` at the locked actions SHA:
  ok=4 failed=0
- the sample `PS1` and `PROMPT` were run in real bash and zsh inside a
  private `tmux -S` server; `tmux-copy-last-output --print` returned
  the last block and `--print 3` the last three; a non-matching prompt
  exited 3
- the pane-border format and the `after-select-pane` and
  `after-select-window` clear hooks were checked on a private tmux
  server, as was `term-pane-mark set|clear busy`
- `groff -man` renders the edited man page cleanly
Summary

Review follow-ups for the docs rewrite: make the README match the parser
exactly, keep the sample tmux hooks from replacing a user's own hooks,
and correct two `AGENTS.md` details.

- README: the second prompt line is `$` or `%` optionally followed by a
  space and the command, as the parser and man page say
- README: the sample `after-select-pane`/`after-select-window` hooks use
  index `[100]`; an unindexed `set-hook` replaces the user's index-0
  hook on that event
- `AGENTS.md`: `shellcheck-test` does not source `test/helpers.sh`
- `AGENTS.md`: `install.sh` only references `support/install-checkout.sh`
  by path, so the install-logic bullet now says to edit that file
  directly and to rerun `consumer-ci/sync.sh` only after changing
  `scripts/checkout-installer.conf`; `<actions@lock>` is spelled out as a
  cgraf78/actions checkout at the locked SHA

Testing

- `test/cmdblocks-test`: all suites pass
- on a private `tmux -L` server, an unindexed `set-hook -g
  after-select-pane` replaced an existing index-0 hook, while `[100]`
  left it in place
@cgraf78
cgraf78 merged commit 52aae58 into main Oct 17, 2026
15 checks passed
@cgraf78
cgraf78 deleted the docs/front-door-agents branch October 17, 2026 00:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant