Skip to content

The initial public release - #6

Merged
tuanngo merged 159 commits into
mainfrom
sprint/202607-w1
Jun 28, 2026
Merged

tuanngo merged 159 commits into
mainfrom
sprint/202607-w1

Conversation

@tuanngo

@tuanngo tuanngo commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

The initial public release

tuanngo added 30 commits June 26, 2026 13:38
tuanngo and others added 28 commits June 28, 2026 07:35
Nothing is released yet (no tags), so the deprecated top-level
`sloop hook <state>` doesn't need a compatibility shim — remove it
outright. `sloop hooks emit <state>` is the sole status callback.

Version the first release v0.1.0, not v0.0.1: it's a conventional first
minor for a tool of this scope, and it makes the roadmap coherent
(0.1.0 shipped → 0.2.0 workflow hooks, no skipped 0.1.0).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AiQai2XYzb8DP1A5bS6ZeJ
Add docs/run.md: the design contract for upgrading the launch path. Keeps
run's two jobs separate (resolve→spec vs provision→launch; the upgrade is
only in resolve), names the three conflated concepts (CLI / model /
effort) plus vendor, and resolves the "is opus Claude or Cursor?"
ambiguity via vendor (bare model → its vendor's home CLI; naming a CLI
overrides). Specifies the resolution algorithm, the manifest `run.*`
schema + a tiny embedded model→vendor catalog (forward the model string
to the CLI rather than maintaining a full catalog), what we borrow from
aider, and a staged plan (Phase 1 explicit flags → Phase 2 smart
positional → Phase 3 profiles/session identity).

Linked from ROADMAP (new Launch pillar) and the README.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AiQai2XYzb8DP1A5bS6ZeJ
Flat docs/ mixed user guides, stable system contracts, and forward-looking
feature designs. Split them so the tree stays navigable as it grows:

- docs/guide/      — how-to (USAGE.md)
- docs/reference/  — how the system is: ARCHITECTURE, ADAPTERS, CONFIG
- docs/design/     — how a feature should be: run, hooks, skills (evolving)

Moves use git rename (history preserved); all cross-links (root files,
intra-doc relative paths, AGENTS.md) updated and verified to resolve. Add
docs/README.md as a self-documenting index, and drop the empty docs/plans.
Fold model aliases into the manifest (run.models) so the alias→CLI map is
a reverse index over manifests — one mechanism, zero new files, embedded
in the binary and overridable like any adapter. Clarify that Phase 1 adds
no new files or dependencies, that a user's default model/effort is config
(.sloop/config.yaml, Phase 3) rather than catalog, and that sloop forwards
the model string to the CLI without validating it.
Record the decision from review: sloop never validates models (selection
is the CLI's own step); it keeps a small curated alias list per manifest
(e.g. claude: opus/sonnet/haiku/fable) for completion plus Phase 2, and
forwards alias or full API id straight to the CLI. Models are reference
data (manifest, embedded), not SQLite runtime state. Dynamic per-tool
model discovery via the tool's own list command, cached, is opt-in and
parked.
Enrich the resolve step of `sloop run` (launch is unchanged). A target can
now be a tool (claude), its binary (agent -> cursor), or a model alias
(opus -> its vendor home CLI), plus explicit -p/--provider, -m/--model,
-e/--effort flags. The model string is forwarded as-is and never validated
(selection is the CLI's own step); a CLI without a model/effort knob errors
clearly. low|medium|high effort maps to each CLI's own token.

All per-CLI knowledge lives in the manifest's new run.* block (model_flag,
effort_flag/effort_values, vendor, default_for, models) — filled for
claude/codex/gemini; binary-alias resolution needs nothing. Zero new files,
zero new dependencies. planLaunch/buildRunArgs are pure and unit-tested;
-m completes the known aliases. Docs: USAGE, ADAPTERS schema, run design
(Phase 1-2 marked shipped), ROADMAP.
`ls` was a static list that only printed a `cd` line (a binary cannot change
the parent shell's directory). Turn it into a workspace board: each row shows
whether the workspace has a live agent, and Enter "jumps into work" — attach
to a running session if one exists, otherwise launch the workspace's default
tool right there (tmux owns the cwd, so no shell integration needed). Extract
attachSession from jumpToFleet so ps and ls share the attach path. Update the
CHANGELOG for v0.1.0 (run model/effort, ls, cursor hooks, skills lockfile).
Cursor's CLI takes --model (e.g. `agent --model gpt-5`), so `sloop run cursor
-m gpt-5` now forwards it. Cursor is multi-vendor, so no vendor/default_for —
it isn't a bare-model home; pick it explicitly.
Enter used to immediately launch the default tool for a workspace with no
live session — a heavy, surprising side effect from a navigation key. Switch
ls to SelectAction: Enter is safe (attach a live session, or just print the
path), and launching a tool is the explicit `r` key. The user decides when an
agent is spawned.
`sloop run claude -t "fix the auth bug"` launches an interactive session
already working on the task, so it shows up in `sloop ps` and you can
attach/watch/answer/kill it — the cross-repo fleet win. Delivery is per
manifest run.prompt: positional for claude and cursor (`claude "task"` /
`agent "task"`; their -p is the non-interactive print mode, which sloop
does not use). A CLI without prompt support errors clearly. Headless
one-shot is intentionally left out — it exits, so it gains nothing from
sloop's session management. Docs: USAGE, ADAPTERS schema, run design,
CHANGELOG.
`sloop tools` and `sloop status` still hard-coded the settings-json check
for the hooks "auto" label, so cursor (which auto-installs via cursor-json)
showed as manual / was omitted from the auto list. Route both through
hookInstaller() — the same dispatch the installer uses — so any auto-install
strategy is reported consistently.
Three dogfood fixes for the ps control center:
- It now loops: after send/answer/kill (or cancelling), it redraws the
  fleet instead of dropping back to the shell, so you never lose context.
  The send prompt says "(empty to cancel)"; q/Esc/Ctrl-C leaves; Enter
  still attaches. The fleet is re-read each pass so kills show at once.
- Rows show the provider's display name ("Google Antigravity") instead of
  the cryptic key ("agy"), via the manifest name.
- A legend explains the dots and the trailing age column.
ls now loops with arrow-key move + action keys, matching ps: Enter attaches
a live session or shows the path, r launches the default tool, s opens a
shell in the workspace dir (a real "go there" since a binary cannot cd the
parent shell), c prints the cd line. Light actions (s/c) return to the list;
q/Esc leaves.
Add an honest README note: tmux sessions don't survive a reboot (sloop is
not tmux-resurrect), but the registry does, so workspaces/sessions are still
listed and relaunchable with run -w. Add two planned items to the roadmap:
sloop restore (relaunch sessions that were running at shutdown, via the
ended_at-is-NULL seam) and an opt-in sloop tmux setup for tmux.conf bits
that need to persist — kept separate from provider hooks.
tmux sessions don't survive a reboot, but sloop's registry does. `sloop
restore` re-creates the most recent agent per workspace that isn't already
running — detached, with sloop's status bar — so the whole fleet comes back
at once. `--resume` continues each tool's prior conversation where the CLI
supports it (claude `--continue`).

- restore.go: pure restoreCandidates() (latest per workspace+tool, skip live
  and unknown-workspace sessions) + RunRestore() that syncs context, launches
  detached, and re-records each session.
- tmux.LaunchDetached(): create a detached, status-lined session (no-op if up).
- adapter RunSpec.ResumeFlag + claude.yaml resume_flag: --continue.
popup gains a `hud` alias (`sloop hud`, `sloop hud setup`) — the fleet popup
reads as a heads-up display, so both names work.

Docs: ROADMAP moves `sloop restore` from planned to shipped, and the README
command table gains a restore row and the popup/hud alias.
Three dogfood fixes for the ps control center:

- The `s` send prompt and `x` kill confirm now read in raw mode via new
  tui.ReadLine / tui.Confirm, so Esc and Ctrl-C cancel back to the fleet
  instead of killing ps and losing the view. Backspace deletes a whole rune,
  so multibyte input (Vietnamese) edits cleanly.
- Show the provider's display name (e.g. "Google Antigravity") instead of the
  bare tool key in both the plain and interactive listings, via FleetRow.Display
  set during enrichment.
- Add a WORKSPACE/TOOL/STATUS/AGE column header and clarify the legend, so it's
  obvious what "idle" and the trailing "2m" mean.

Drops the now-unused promptLine helper.
…t bridge

Make ls and ps read as sibling views with one visual language:

- ls becomes a real control center matching ps: a WORKSPACE / DEFAULT / PATH /
  AGENTS table with a header and legend. The AGENTS column shows each
  workspace's live agents colored by status (the same dots as ps) — the bridge
  between "where I work" (ls) and "what's running" (ps). Paths abbreviate $HOME
  to ~.
- Drop the leading ●/○ status glyph from both row layouts: those code points are
  ambiguous-width and pushed every following column out of line with the header.
  ps now shows status as a colored STATUS text column; ls carries liveness in the
  trailing AGENTS column, so both align cleanly on any terminal.
- Colors stay theme-adaptive (ANSI palette): yellow waiting, cyan working, blue
  attached, green idle.

Adds tests for abbrevHome and agentsInline.
Polish the ps/ls control centers from dogfooding:

- Both loops now clear the screen each pass and show action feedback in a
  colored notice line under the header (sent/answered/killed, the cd line, the
  "isn't running" hint), so the list redraws in place instead of stacking menus
  and burying messages. Adds tui.Clear (a no-op when not a tty).
- ls gets a two-line layout like ps: WORKSPACE / DEFAULT / AGENTS on top, the
  path on a `└` line — easier to scan, and the path no longer competes for width.
- Footers say "q/esc quit" so it's clear Esc also leaves the menu.
- `sloop attach` / `sloop a` with no argument opens a picker of the live fleet,
  so you can attach without typing a session name.
Add a concrete before/after to "The problem": running two AI CLIs in one repo
today means hand-rolling tmux sessions and switching between them, versus
`sloop run` + `sloop ps`. Update the attach row to note the no-arg fleet picker.
`sloop a` (no argument) now renders the chooser with the same WORKSPACE / TOOL /
STATUS columns, status colors and waiting-first ordering as `sloop ps`, so the
picker reads identically to the fleet view instead of a bare name list.
Release hygiene for the hooks surface ahead of v0.1.0 — no behavior change, the
wired callback is already the reserved `sloop hooks emit <state>`:

- Label the command as status hooks (for `sloop ps`) and note that workflow
  hooks are a v0.2.0 proposal, in `hooks` help and `hooks list` output, so the
  two kinds from docs/design/hooks.md aren't conflated.
- Fix a stale comment that referenced a deprecated top-level `hook` command
  (there is none; `sloop hook` is gone, only `sloop hooks ...` exists).
- USAGE.md: correct `sloop hook <state>` to `sloop hooks emit <state>`.
… guide

Make the everyday "jump in, detach, come back" loop obvious:

- Each sloop session's status bar now shows a persistent left-side tip
  "⚓ detach: <prefix> d" using the user's real tmux prefix (new PrefixRaw), so
  anyone inside an agent can see how to get back to the fleet without stopping it.
- Alias `hook` for the `hooks` command, so `sloop hook ...` just works.
- README gains a "Daily use — sloop ps is home base" section: ps as the one
  screen, Enter to jump in, detach to return, one-key triage, restore after a
  reboot, and ls as the workspace companion.
sloop styles a session's status bar per-session (set-option -t), which overrides
status-left/status-right for that session — invasive for users who craft their
own bar in ~/.tmux.conf. SLOOP_STATUSLINE=0 (or off/false/no) now makes
SetStatusLine a no-op so their bar is untouched. sloop still never edits the
global config and only ever touched left/right (not colors/theme). Documented in
the README daily-use note.
tmux's #() in the status bar captures stdout only, but the statusline command
used cobra's cmd.Print — which writes to stderr — so the rendered status
(⚓ repo tool ◆ waiting) never reached the bar and sloop's per-session status
appeared blank. Write it to stdout explicitly, with a regression test asserting
stdout (not stderr) carries it.
Add a grey line under the keys in the interactive fleet view — "⏎ enters an
agent — to come back, detach (keeps it running): <prefix> d" using the user's
real tmux prefix — so before jumping into an agent you already know how to
return, mirroring the per-session status-bar tip.
Cover what shipped since the first draft: one-key answers + `sloop approve`,
the cancellable control center, `sloop restore`, `popup`/`hud`, the no-arg
attach picker and `adopt`, the per-session status bar with detach tip and
SLOOP_STATUSLINE opt-out, the reserved `hooks emit` callback, and `--debug`.
@tuanngo
tuanngo merged commit b79917b into main Jun 28, 2026
3 checks passed
@tuanngo
tuanngo deleted the sprint/202607-w1 branch June 28, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant