bots-garden/mini-mepublic Fork 0
main
Commits
Clone
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

💾 Saved. d722711 · on main · k33g · 3h ago
2026-09-15-new-command.md · 41 lines · 4.7 KBmarkdown
Blame HistoryOpen raw

Handoff — 2026-09-15 — /new slash command

State

/new works in both front ends and is documented in EN and FR. go build, go vet and every test pass except one pre-existing failure (below). The quality gate is configured (.qlty/qlty.toml, exclusions kits/** and tmp/**) and FAILS on pre-existing debt only. .memory/ was created by this session. Nothing is committed: all of internal/, main.go, go.mod, docs/, .qlty/, .quality/, .memory/ are untracked (only README.md, git.sh, .tickets/*.yaml, .vscode/ are tracked).

In flight

Nothing on the /new feature itself. Agent "riker" was writing docs/ at the same time; the pages this session edited in place (docs/{en,fr}/reference/slash-commands.md, acp.md, both README.md, both explanation/architecture.md) may be rewritten by riker — check that the /new rows, the "ACP mode" paragraph, the "Available commands" section and the packages.drawio link survived.

Next steps

  1. Decide the pre-existing test: internal/skills/skills_test.go TestShippedSkillsHaveDescriptions looks for ../../../demo/skills; this repo has ./skills. Changing the path to ../../skills is a one-line fix, left to the user.
  2. Decide the quality debt: bump go.mod go 1.25.01.26 (clears 47 of 55 osv findings), go get -u the indirect deps flagged (jsonparser, otel, x/sys), fix the 12 errcheck sites, and refactor agent.Run (complexity 121) — the last one needs tests around the REPL first.
  3. Verify in a real Zed that the slash menu shows /new (the notification is sent before the session/new response).
  4. Commit: propose one commit for code + tests + docs + .qlty/ + .quality/ + .memory/ (see history entry). Not done — the skill forbids committing without an explicit request.

Open questions / blockers

  • Should /compact also be exposed over ACP? Not asked; the code deliberately advertises only what session/prompt intercepts.
  • Should /new over ACP also drop "allow always" grants? This session chose to keep them (same session id, same promise to the user).

Watch out for

  • qlty init only looks at git-tracked files: it detected no Go here and enabled no Go plugin. The Go plugins were added by hand in .qlty/qlty.toml; do not re-run qlty init.
  • qlty's default exclude_patterns contains **/config/**, which would silently hide internal/config. It was removed from the list; do not paste the defaults back.
  • Inside internal/acp, mm/internal/session is imported as history because the package has its own session struct.
  • Piped stdin to the REPL loses lines after the first (the bufio.Reader is re-created per iteration). Use the scripted JSON-RPC client approach (python subprocess, one JSON object per line) to smoke-test ACP, and expect only the first line of a piped REPL session to be read.
  • Run Go through bash -l -c "..." when go is not on PATH.

Addendum (same day, orchestrator) — step 3 done, root cause found

The user tried it in Zed: "Available commands for mini-me: none". Cause: the notification went out before the session/new response, and Zed drops updates for a session id it does not know yet. Fixed by a responseWriter wrapper around the SDK's output that fires the notification after the response line is written (see internal/acp/acp.go, history entry of the same day). Verified on the wire with the real binary and with a pipe-driven test; still to be confirmed by the user inside Zed. If Zed still shows no commands, the next suspect is the initialize exchange (Zed may require protocolVersion ≥ 1 and reads agentCapabilities), not the ordering.

Addendum 2 (same day, orchestrator) — /compact and /abort over ACP

User confirmed /new appears in Zed after the ordering fix. /compact and /abort were added the same way (history entry of the same day). Left for the user to confirm in Zed: the two new menu entries, and /abort while a generation runs — Zed may not send a prompt during a running turn, in which case /abort will only ever say "No generation in progress" and the stop button remains the way to cancel. If so, the honest move is to drop /abort from availableCommands() rather than advertise a no-op.

Addendum 3 — trap: sandbox builds clobber the Mac binary

go build -o mm . in the sandbox writes a linux/arm64 ELF at the repo's ./mm, the same path the user's install.sh builds and copies from. Do not run install.sh from the sandbox, and tell the user to rebuild natively after sandbox builds. Separately, install.sh copies over the installed binary in place; on Apple Silicon that can yield Killed: 9 until the target is removed first — fix pending the user's go-ahead.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Handoff — 2026-09-15 — `/new` slash command

## State

`/new` works in both front ends and is documented in EN and FR. `go build`, `go vet` and every test pass except one pre-existing failure (below). The quality gate is configured (`.qlty/qlty.toml`, exclusions `kits/**` and `tmp/**`) and FAILS on pre-existing debt only. `.memory/` was created by this session. Nothing is committed: all of `internal/`, `main.go`, `go.mod`, `docs/`, `.qlty/`, `.quality/`, `.memory/` are untracked (only `README.md`, `git.sh`, `.tickets/*.yaml`, `.vscode/` are tracked).

## In flight

Nothing on the `/new` feature itself. Agent "riker" was writing `docs/` at the same time; the pages this session edited in place (`docs/{en,fr}/reference/slash-commands.md`, `acp.md`, both `README.md`, both `explanation/architecture.md`) may be rewritten by riker — check that the `/new` rows, the "ACP mode" paragraph, the "Available commands" section and the `packages.drawio` link survived.

## Next steps

1. Decide the pre-existing test: `internal/skills/skills_test.go` `TestShippedSkillsHaveDescriptions` looks for `../../../demo/skills`; this repo has `./skills`. Changing the path to `../../skills` is a one-line fix, left to the user.
2. Decide the quality debt: bump `go.mod` `go 1.25.0``1.26` (clears 47 of 55 osv findings), `go get -u` the indirect deps flagged (`jsonparser`, `otel`, `x/sys`), fix the 12 `errcheck` sites, and refactor `agent.Run` (complexity 121) — the last one needs tests around the REPL first.
3. Verify in a real Zed that the slash menu shows `/new` (the notification is sent before the `session/new` response).
4. Commit: propose one commit for code + tests + docs + `.qlty/` + `.quality/` + `.memory/` (see history entry). Not done — the skill forbids committing without an explicit request.

## Open questions / blockers

- Should `/compact` also be exposed over ACP? Not asked; the code deliberately advertises only what `session/prompt` intercepts.
- Should `/new` over ACP also drop "allow always" grants? This session chose to keep them (same session id, same promise to the user).

## Watch out for

- `qlty init` only looks at git-tracked files: it detected no Go here and enabled no Go plugin. The Go plugins were added by hand in `.qlty/qlty.toml`; do not re-run `qlty init`.
- qlty's default `exclude_patterns` contains `**/config/**`, which would silently hide `internal/config`. It was removed from the list; do not paste the defaults back.
- Inside `internal/acp`, `mm/internal/session` is imported as `history` because the package has its own `session` struct.
- Piped stdin to the REPL loses lines after the first (the `bufio.Reader` is re-created per iteration). Use the scripted JSON-RPC client approach (python `subprocess`, one JSON object per line) to smoke-test ACP, and expect only the first line of a piped REPL session to be read.
- Run Go through `bash -l -c "..."` when `go` is not on `PATH`.

## Addendum (same day, orchestrator) — step 3 done, root cause found

The user tried it in Zed: "Available commands for mini-me: none". Cause: the notification went out before the `session/new` response, and Zed drops updates for a session id it does not know yet. Fixed by a `responseWriter` wrapper around the SDK's output that fires the notification after the response line is written (see `internal/acp/acp.go`, history entry of the same day). Verified on the wire with the real binary and with a pipe-driven test; still to be confirmed by the user inside Zed. If Zed still shows no commands, the next suspect is the `initialize` exchange (Zed may require `protocolVersion` ≥ 1 and reads `agentCapabilities`), not the ordering.

## Addendum 2 (same day, orchestrator) — `/compact` and `/abort` over ACP

User confirmed `/new` appears in Zed after the ordering fix. `/compact` and `/abort` were added the same way (history entry of the same day). Left for the user to confirm in Zed: the two new menu entries, and `/abort` while a generation runs — Zed may not send a prompt during a running turn, in which case `/abort` will only ever say "No generation in progress" and the stop button remains the way to cancel. If so, the honest move is to drop `/abort` from `availableCommands()` rather than advertise a no-op.

## Addendum 3 — trap: sandbox builds clobber the Mac binary

`go build -o mm .` in the sandbox writes a linux/arm64 ELF at the repo's `./mm`, the same path the user's `install.sh` builds and copies from. Do not run `install.sh` from the sandbox, and tell the user to rebuild natively after sandbox builds. Separately, `install.sh` copies over the installed binary in place; on Apple Silicon that can yield `Killed: 9` until the target is removed first — fix pending the user's go-ahead.