diff --git a/.pi/memory-vault/packs/paperclip-harness/20-context/config.md b/.pi/memory-vault/packs/paperclip-harness/20-context/config.md new file mode 100644 index 0000000..fa313de --- /dev/null +++ b/.pi/memory-vault/packs/paperclip-harness/20-context/config.md @@ -0,0 +1,91 @@ +--- +type: context +id: context.paperclip-harness.config +title: .config +status: active +source_of_truth: false +freshness: current +last_reviewed: 2026-11-11 +tags: + - pack/paperclip-harness + - agent-memory/context + - autolearn + - rich-discovery + - repo/config +--- + +# .config + +## Rich discovery update (2026-11-11 03:16:34) + +Five of the six are in, and one has a caveat I want to be straight about. + +## Built + +**1. `Repair>repair` → cleanup tab.** Sessions with pane count and last use; `space` ticks, `x` closes the ticked ones after asking. Protected and attached sessions are refused, and the screen says so: + +``` +session panes last used state +paperclip-harness 9 11 Nov 14:14 this project's session +tuios coding harness 4 11 Nov 14:09 attached, or on another machine +office 32 10 Nov 13:57 attached, or on another machine +office-test-1 26 10 Nov 11:24 +office-test-1-card-t3-cover-image… 1 9 Nov 19:50 + +space ticks a session, x closes the ticked ones after asking. +closing a TUIOS session ends its panes. It does not delete anything in +~/.pi/paperclips, where every Pi conversation is kept. +``` + +**2. Pi sessions in `t`** — two new entries: `pi sessions` opens `~/.pi/paperclips` in Yazi, `pi resume` gives Pi's own session list ready to open. + +**4. `v` in `Work>review`** — starts `bin/review --post` and the tab shows the review running, then the verdict, which is also written on the task. + +**6. `Board>board` needs-you** — `enter` on a card now selects that task *and* switches you to the Reply workspace, so the answer is one key away. + +**3. `Project>project` → projects tab** — `bin/office` now records each adopted project in `~/.config/paperclip-harness/projects.toml`, and the tab lists them: + +``` +project machine session folder +spike-2026-11-10 nixos-desktop paperclip-har… /tmp/pc-sandbox-2026-… (this machine) + +a project on another machine can be listed here but not opened from this one. +to open one: attach to its session, or run bin/office there. +``` + +**Caveat:** that is a *list*, not a switch. Switching would mean tearing down these panes and building another project's — and a project on `.27` cannot be opened from `.13` at all. I would rather show you the truth than a button that half-works. + +## Not done: 7 (the spend chart) + +`Project>overview` already has a runs sparkline. Spend-per-day needs cost per run, and the only cheap source is company runs, which cost 8 seconds to read. I did not put an 8-second read behind a tab without asking you first. + +## A finding that changes the key map + +While testing the cleanup tab I found why tabs would not switch: **TUIOS binds `[`, `]`, `Tab`, `,`, `.`, `=`, `;` and the digits** in its own key map, and they never reached the program in that pane. Tabs are now switched with **`(` and `)`**, which TUIOS leaves alone; `[` and `]` still work where the pane is in terminal mode, so both are accepted. + +If a pane ever stops responding to letters, press `i` or `Enter` first — that is TUIOS's window mode, not a broken program. + +Committed as `3ec960e`; `docs/NEXT.md` updated with what is done and what remains (spend chart, the `office` scaffold, memory per agent, MOUSE-1). + +## Source paths observed + +- `.config/paperclip-harness/projects.toml` + +## Evidence + +- Confidence: 84% +- Reason: Update component/repository context with detailed discovered structure and configuration + +## Related + +- [[packs/paperclip-harness/00-system/pi-agent/memory-manifest|Memory Manifest]] + +## Related learned memories + +- context: [[packs/paperclip-harness/20-context/paperclip-harness-tui-office-project-components|paperclip-harness TUI office/project components]] +- context: [[packs/paperclip-harness/20-context/tuios-key-bindings-interpose-on-harness-key-map|TUIOS key bindings interpose on harness key map]] +- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Delivered 5 of 6 harness UI items, commit 3ec960e]] +- session: [[packs/paperclip-harness/80-sessions/rich-discovery-config-2026-11-11-03-16-34|Rich discovery: .config 2026-11-11 03:16:34]] +- context: [[packs/paperclip-harness/20-context/config|.config]] +- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|.config deployment operations]] +- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|.config repository structure and configuration patterns]] diff --git a/.pi/memory-vault/packs/paperclip-harness/20-context/paperclip-harness-tui-office-project-components.md b/.pi/memory-vault/packs/paperclip-harness/20-context/paperclip-harness-tui-office-project-components.md new file mode 100644 index 0000000..3083363 --- /dev/null +++ b/.pi/memory-vault/packs/paperclip-harness/20-context/paperclip-harness-tui-office-project-components.md @@ -0,0 +1,103 @@ +--- +type: context +id: context.paperclip-harness.paperclip-harness-tui-office-project-components +title: paperclip-harness TUI office/project components +status: active +source_of_truth: false +freshness: current +last_reviewed: 2026-11-11 +tags: + - pack/paperclip-harness + - agent-memory/context + - paperclip-harness + - office + - projectModel + - projects.toml + - tui +--- + +# paperclip-harness TUI office/project components + +The paperclip-harness is a Go TUI (project model with tabs) plus a `bin/office` launcher script, driving TUIOS panes. + +Key structure discovered in the Go code: +- `projectModel` renders tabs; `switch m.tab` in the View selects body: case 0 = `overviewLines`, case 1 = `factLines`, case 2 = `costLines`, default = `settingLines`. A projects/cleanup style tab renders via `projectListLines(width int)` (near line 481), used to list every adopted project and where it lives. +- Project tab follows a table pattern: columns project / machine / session / folder, with a "(this machine)" marker. + +`bin/office` behavior: +- Adopts projects and records each in `~/.config/paperclip-harness/projects.toml` (keyed by paperclip UUID, name, folder, host, session). +- Creates TUIOS workspaces/panes for: project, New task, Repair (e.g. "workspaces in use: 8"). +- Header comment in that TOML: adopted projects are one folder, one machine, one session each; Paperclip owns the project itself, the file only records where it lives. +- A project on another machine can be listed but not opened locally; opening requires attaching to its session or running `bin/office ` on that machine. + +This overview should be the anchor for future changes to the office/project tab, cleanup tab, and project registry. + +## Detailed context from completed turn + +Five of the six are in, and one has a caveat I want to be straight about. + +## Built + +**1. `Repair>repair` → cleanup tab.** Sessions with pane count and last use; `space` ticks, `x` closes the ticked ones after asking. Protected and attached sessions are refused, and the screen says so: + +``` +session panes last used state +paperclip-harness 9 11 Nov 14:14 this project's session +tuios coding harness 4 11 Nov 14:09 attached, or on another machine +office 32 10 Nov 13:57 attached, or on another machine +office-test-1 26 10 Nov 11:24 +office-test-1-card-t3-cover-image… 1 9 Nov 19:50 + +space ticks a session, x closes the ticked ones after asking. +closing a TUIOS session ends its panes. It does not delete anything in +~/.pi/paperclips, where every Pi conversation is kept. +``` + +**2. Pi sessions in `t`** — two new entries: `pi sessions` opens `~/.pi/paperclips` in Yazi, `pi resume` gives Pi's own session list ready to open. + +**4. `v` in `Work>review`** — starts `bin/review --post` and the tab shows the review running, then the verdict, which is also written on the task. + +**6. `Board>board` needs-you** — `enter` on a card now selects that task *and* switches you to the Reply workspace, so the answer is one key away. + +**3. `Project>project` → projects tab** — `bin/office` now records each adopted project in `~/.config/paperclip-harness/projects.toml`, and the tab lists them: + +``` +project machine session folder +spike-2026-11-10 nixos-desktop paperclip-har… /tmp/pc-sandbox-2026-… (this machine) + +a project on another machine can be listed here but not opened from this one. +to open one: attach to its session, or run bin/office there. +``` + +**Caveat:** that is a *list*, not a switch. Switching would mean tearing down these panes and building another project's — and a project on `.27` cannot be opened from `.13` at all. I would rather show you the truth than a button that half-works. + +## Not done: 7 (the spend chart) + +`Project>overview` already has a runs sparkline. Spend-per-day needs cost per run, and the only cheap source is company runs, which cost 8 seconds to read. I did not put an 8-second read behind a tab without asking you first. + +## A finding that changes the key map + +While testing the cleanup tab I found why tabs would not switch: **TUIOS binds `[`, `]`, `Tab`, `,`, `.`, `=`, `;` and the digits** in its own key map, and they never reached the program in that pane. Tabs are now switched with **`(` and `)`**, which TUIOS leaves alone; `[` and `]` still work where the pane is in terminal mode, so both are accepted. + +If a pane ever stops responding to letters, press `i` or `Enter` first — that is TUIOS's window mode, not a broken program. + +Committed as `3ec960e`; `docs/NEXT.md` updated with what is done and what remains (spend chart, the `office` scaffold, memory per agent, MOUSE-1). + +## Evidence + +- Confidence: 85% +- Reason: Evidence-backed architecture of the Go TUI tabs and bin/office registry from grep output and rendered UI.; enriched with final-answer detail because persistence should be reusable + +## Related + +- [[packs/paperclip-harness/00-system/pi-agent/memory-manifest|Memory Manifest]] + +## Related learned memories + +- context: [[packs/paperclip-harness/20-context/paperclip-harness-tui-office-project-components|paperclip-harness TUI office/project components]] +- context: [[packs/paperclip-harness/20-context/tuios-key-bindings-interpose-on-harness-key-map|TUIOS key bindings interpose on harness key map]] +- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Delivered 5 of 6 harness UI items, commit 3ec960e]] +- session: [[packs/paperclip-harness/80-sessions/rich-discovery-config-2026-11-11-03-16-34|Rich discovery: .config 2026-11-11 03:16:34]] +- context: [[packs/paperclip-harness/20-context/config|.config]] +- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|.config deployment operations]] +- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|.config repository structure and configuration patterns]] diff --git a/.pi/memory-vault/packs/paperclip-harness/20-context/tuios-key-bindings-interpose-on-harness-key-map.md b/.pi/memory-vault/packs/paperclip-harness/20-context/tuios-key-bindings-interpose-on-harness-key-map.md new file mode 100644 index 0000000..192baa9 --- /dev/null +++ b/.pi/memory-vault/packs/paperclip-harness/20-context/tuios-key-bindings-interpose-on-harness-key-map.md @@ -0,0 +1,94 @@ +--- +type: context +id: context.paperclip-harness.tuios-key-bindings-interpose-on-harness-key-map +title: TUIOS key bindings interpose on harness key map +status: active +source_of_truth: false +freshness: current +last_reviewed: 2026-11-11 +tags: + - pack/paperclip-harness + - agent-memory/context + - tuios + - keybindings + - harness + - caveat +--- + +# TUIOS key bindings interpose on harness key map + +TUIOS intercepts its own key combos before they reach the program in a pane. Observed to bind: `[`, `]`, `Tab`, `,`, `.`, `=`, `;` and the digit keys. Those never reached the harness program. + +Consequence: the harness now switches tabs with `(` and `)` (TUIOS leaves these alone), while `[`/`]` still work only when the pane is in terminal mode, so both are accepted. + +Operational caveat: if a pane stops responding to letters, press `i` or `Enter` first — that is TUIOS window mode, not a broken program. + +## Detailed context from completed turn + +Five of the six are in, and one has a caveat I want to be straight about. + +## Built + +**1. `Repair>repair` → cleanup tab.** Sessions with pane count and last use; `space` ticks, `x` closes the ticked ones after asking. Protected and attached sessions are refused, and the screen says so: + +``` +session panes last used state +paperclip-harness 9 11 Nov 14:14 this project's session +tuios coding harness 4 11 Nov 14:09 attached, or on another machine +office 32 10 Nov 13:57 attached, or on another machine +office-test-1 26 10 Nov 11:24 +office-test-1-card-t3-cover-image… 1 9 Nov 19:50 + +space ticks a session, x closes the ticked ones after asking. +closing a TUIOS session ends its panes. It does not delete anything in +~/.pi/paperclips, where every Pi conversation is kept. +``` + +**2. Pi sessions in `t`** — two new entries: `pi sessions` opens `~/.pi/paperclips` in Yazi, `pi resume` gives Pi's own session list ready to open. + +**4. `v` in `Work>review`** — starts `bin/review --post` and the tab shows the review running, then the verdict, which is also written on the task. + +**6. `Board>board` needs-you** — `enter` on a card now selects that task *and* switches you to the Reply workspace, so the answer is one key away. + +**3. `Project>project` → projects tab** — `bin/office` now records each adopted project in `~/.config/paperclip-harness/projects.toml`, and the tab lists them: + +``` +project machine session folder +spike-2026-11-10 nixos-desktop paperclip-har… /tmp/pc-sandbox-2026-… (this machine) + +a project on another machine can be listed here but not opened from this one. +to open one: attach to its session, or run bin/office there. +``` + +**Caveat:** that is a *list*, not a switch. Switching would mean tearing down these panes and building another project's — and a project on `.27` cannot be opened from `.13` at all. I would rather show you the truth than a button that half-works. + +## Not done: 7 (the spend chart) + +`Project>overview` already has a runs sparkline. Spend-per-day needs cost per run, and the only cheap source is company runs, which cost 8 seconds to read. I did not put an 8-second read behind a tab without asking you first. + +## A finding that changes the key map + +While testing the cleanup tab I found why tabs would not switch: **TUIOS binds `[`, `]`, `Tab`, `,`, `.`, `=`, `;` and the digits** in its own key map, and they never reached the program in that pane. Tabs are now switched with **`(` and `)`**, which TUIOS leaves alone; `[` and `]` still work where the pane is in terminal mode, so both are accepted. + +If a pane ever stops responding to letters, press `i` or `Enter` first — that is TUIOS's window mode, not a broken program. + +Committed as `3ec960e`; `docs/NEXT.md` updated with what is done and what remains (spend chart, the `office` scaffold, memory per agent, MOUSE-1). + +## Evidence + +- Confidence: 85% +- Reason: A discovered conflict that changed the key map and affects all future TUI key work.; enriched with final-answer detail because persistence should be reusable + +## Related + +- [[packs/paperclip-harness/00-system/pi-agent/memory-manifest|Memory Manifest]] + +## Related learned memories + +- context: [[packs/paperclip-harness/20-context/paperclip-harness-tui-office-project-components|paperclip-harness TUI office/project components]] +- context: [[packs/paperclip-harness/20-context/tuios-key-bindings-interpose-on-harness-key-map|TUIOS key bindings interpose on harness key map]] +- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Delivered 5 of 6 harness UI items, commit 3ec960e]] +- session: [[packs/paperclip-harness/80-sessions/rich-discovery-config-2026-11-11-03-16-34|Rich discovery: .config 2026-11-11 03:16:34]] +- context: [[packs/paperclip-harness/20-context/config|.config]] +- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|.config deployment operations]] +- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|.config repository structure and configuration patterns]] diff --git a/.pi/memory-vault/packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups.md b/.pi/memory-vault/packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups.md index 3e2c1df..ab84ad3 100644 --- a/.pi/memory-vault/packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups.md +++ b/.pi/memory-vault/packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups.md @@ -634,3 +634,36 @@ Validation: build=0; 8 workspaces running; Work>work opens on runs for AUD-171. - runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|navigate tasks and runs inside Work>work and merge safely (paperclip-harness)]] - session: [[packs/paperclip-harness/80-sessions/rich-discovery-home-2026-11-11-02-17-44|Rich discovery: home 2026-11-11 02:17:44]] - context: [[packs/paperclip-harness/20-context/home|home]] + + +--- + +## Update (2026-11-11 03:16:34) + +Commit `3ec960e` ("Cleanup pane, Pi session tools, review from the UI, project registry, needs panel acts"). `docs/NEXT.md` updated with done/remaining. + +Delivered: +1. Repair>repair cleanup tab: lists sessions with pane count and last used; `space` ticks, `x` closes ticked after confirm. Protected/attached sessions refused with a visible state message (this project's session / attached, or on another machine). Message notes closing a TUIOS session ends its panes but does not delete anything in `~/.pi/paperclips`. +2. Pi sessions in `t`: `pi sessions` opens `~/.pi/paperclips` in Yazi; `pi resume` gives Pi's own session list. +3. Project>project projects tab: reads adopted projects from `~/.config/paperclip-harness/projects.toml` and lists project/machine/session/folder. This is a LIST, not a switch — switching would require tearing down and rebuilding panes, and a remote-machine project cannot be opened locally. +4. `v` in Work>review runs `bin/review --post`, showing running then verdict, written to the task. +5. Board>board needs-you: `enter` on a card selects the task and switches to the Reply workspace. + +Not done: spend-per-day chart in Project>overview. Runs sparkline exists; spend-per-day needs cost per run and the only cheap source is company runs at ~8s read, which was not added without asking. + +Remaining in `docs/NEXT.md`: spend chart, the `office` scaffold, memory per agent, MOUSE-1. + +## Evidence + +- Confidence: 85% +- Reason: Concrete completed work, artifacts, commit hash, and explicit deferred items. + +## Related learned memories + +- context: [[packs/paperclip-harness/20-context/paperclip-harness-tui-office-project-components|paperclip-harness TUI office/project components]] +- context: [[packs/paperclip-harness/20-context/tuios-key-bindings-interpose-on-harness-key-map|TUIOS key bindings interpose on harness key map]] +- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Delivered 5 of 6 harness UI items, commit 3ec960e]] +- session: [[packs/paperclip-harness/80-sessions/rich-discovery-config-2026-11-11-03-16-34|Rich discovery: .config 2026-11-11 03:16:34]] +- context: [[packs/paperclip-harness/20-context/config|.config]] +- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|.config deployment operations]] +- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|.config repository structure and configuration patterns]] diff --git a/.pi/memory-vault/packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns.md b/.pi/memory-vault/packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns.md index b45e84b..a11940f 100644 --- a/.pi/memory-vault/packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns.md +++ b/.pi/memory-vault/packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns.md @@ -2671,3 +2671,78 @@ Committed as `0476afc`; the eight workspaces were rebuilt and are running. My su - observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|paperclip-harness task state and session inventory]] - session: [[packs/paperclip-harness/80-sessions/rich-discovery-pause-2026-11-11-02-40-13|Rich discovery: pause 2026-11-11 02:40:13]] - context: [[packs/paperclip-harness/20-context/paperclip-harness|pause]] + + +--- + +## Update (2026-11-11 03:16:34) + +## Structural/configuration observations (2026-11-11 03:16:34) + +Five of the six are in, and one has a caveat I want to be straight about. + +## Built + +**1. `Repair>repair` → cleanup tab.** Sessions with pane count and last use; `space` ticks, `x` closes the ticked ones after asking. Protected and attached sessions are refused, and the screen says so: + +``` +session panes last used state +paperclip-harness 9 11 Nov 14:14 this project's session +tuios coding harness 4 11 Nov 14:09 attached, or on another machine +office 32 10 Nov 13:57 attached, or on another machine +office-test-1 26 10 Nov 11:24 +office-test-1-card-t3-cover-image… 1 9 Nov 19:50 + +space ticks a session, x closes the ticked ones after asking. +closing a TUIOS session ends its panes. It does not delete anything in +~/.pi/paperclips, where every Pi conversation is kept. +``` + +**2. Pi sessions in `t`** — two new entries: `pi sessions` opens `~/.pi/paperclips` in Yazi, `pi resume` gives Pi's own session list ready to open. + +**4. `v` in `Work>review`** — starts `bin/review --post` and the tab shows the review running, then the verdict, which is also written on the task. + +**6. `Board>board` needs-you** — `enter` on a card now selects that task *and* switches you to the Reply workspace, so the answer is one key away. + +**3. `Project>project` → projects tab** — `bin/office` now records each adopted project in `~/.config/paperclip-harness/projects.toml`, and the tab lists them: + +``` +project machine session folder +spike-2026-11-10 nixos-desktop paperclip-har… /tmp/pc-sandbox-2026-… (this machine) + +a project on another machine can be listed here but not opened from this one. +to open one: attach to its session, or run bin/office there. +``` + +**Caveat:** that is a *list*, not a switch. Switching would mean tearing down these panes and building another project's — and a project on `.27` cannot be opened from `.13` at all. I would rather show you the truth than a button that half-works. + +## Not done: 7 (the spend chart) + +`Project>overview` already has a runs sparkline. Spend-per-day needs cost per run, and the only cheap source is company runs, which cost 8 seconds to read. I did not put an 8-second read behind a tab without asking you first. + +## A finding that changes the key map + +While testing the cleanup tab I found why tabs would not switch: **TUIOS binds `[`, `]`, `Tab`, `,`, `.`, `=`, `;` and the digits** in its own key map, and they never reached the program in that pane. Tabs are now switched with **`(` and `)`**, which TUIOS leaves alone; `[` and `]` still work where the pane is in terminal mode, so both are accepted. + +If a pane ever stops responding to letters, press `i` or `Enter` first — that is TUIOS's window mode, not a broken program. + +Committed as `3ec960e`; `docs/NEXT.md` updated with what is done and what remains (spend chart, the `office` scaffold, memory per agent, MOUSE-1). + +## Source paths observed + +- `.config/paperclip-harness/projects.toml` + +## Evidence + +- Confidence: 82% +- Reason: Captured factual repo structure/configuration patterns from rich discovery + +## Related learned memories + +- context: [[packs/paperclip-harness/20-context/paperclip-harness-tui-office-project-components|paperclip-harness TUI office/project components]] +- context: [[packs/paperclip-harness/20-context/tuios-key-bindings-interpose-on-harness-key-map|TUIOS key bindings interpose on harness key map]] +- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Delivered 5 of 6 harness UI items, commit 3ec960e]] +- session: [[packs/paperclip-harness/80-sessions/rich-discovery-config-2026-11-11-03-16-34|Rich discovery: .config 2026-11-11 03:16:34]] +- context: [[packs/paperclip-harness/20-context/config|.config]] +- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|.config deployment operations]] +- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|.config repository structure and configuration patterns]] diff --git a/.pi/memory-vault/packs/paperclip-harness/70-runbooks/tmp-deployment-operations.md b/.pi/memory-vault/packs/paperclip-harness/70-runbooks/tmp-deployment-operations.md index e28cebf..6bc6e0c 100644 --- a/.pi/memory-vault/packs/paperclip-harness/70-runbooks/tmp-deployment-operations.md +++ b/.pi/memory-vault/packs/paperclip-harness/70-runbooks/tmp-deployment-operations.md @@ -882,3 +882,78 @@ Choosing a task here writes the same choice the Board writes, so `Reply>reply` a - runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|navigate tasks and runs inside Work>work and merge safely (paperclip-harness)]] - session: [[packs/paperclip-harness/80-sessions/rich-discovery-home-2026-11-11-02-17-44|Rich discovery: home 2026-11-11 02:17:44]] - context: [[packs/paperclip-harness/20-context/home|home]] + + +--- + +## Update (2026-11-11 03:16:34) + +## Deployment/runbook details discovered (2026-11-11 03:16:34) + +Five of the six are in, and one has a caveat I want to be straight about. + +## Built + +**1. `Repair>repair` → cleanup tab.** Sessions with pane count and last use; `space` ticks, `x` closes the ticked ones after asking. Protected and attached sessions are refused, and the screen says so: + +``` +session panes last used state +paperclip-harness 9 11 Nov 14:14 this project's session +tuios coding harness 4 11 Nov 14:09 attached, or on another machine +office 32 10 Nov 13:57 attached, or on another machine +office-test-1 26 10 Nov 11:24 +office-test-1-card-t3-cover-image… 1 9 Nov 19:50 + +space ticks a session, x closes the ticked ones after asking. +closing a TUIOS session ends its panes. It does not delete anything in +~/.pi/paperclips, where every Pi conversation is kept. +``` + +**2. Pi sessions in `t`** — two new entries: `pi sessions` opens `~/.pi/paperclips` in Yazi, `pi resume` gives Pi's own session list ready to open. + +**4. `v` in `Work>review`** — starts `bin/review --post` and the tab shows the review running, then the verdict, which is also written on the task. + +**6. `Board>board` needs-you** — `enter` on a card now selects that task *and* switches you to the Reply workspace, so the answer is one key away. + +**3. `Project>project` → projects tab** — `bin/office` now records each adopted project in `~/.config/paperclip-harness/projects.toml`, and the tab lists them: + +``` +project machine session folder +spike-2026-11-10 nixos-desktop paperclip-har… /tmp/pc-sandbox-2026-… (this machine) + +a project on another machine can be listed here but not opened from this one. +to open one: attach to its session, or run bin/office there. +``` + +**Caveat:** that is a *list*, not a switch. Switching would mean tearing down these panes and building another project's — and a project on `.27` cannot be opened from `.13` at all. I would rather show you the truth than a button that half-works. + +## Not done: 7 (the spend chart) + +`Project>overview` already has a runs sparkline. Spend-per-day needs cost per run, and the only cheap source is company runs, which cost 8 seconds to read. I did not put an 8-second read behind a tab without asking you first. + +## A finding that changes the key map + +While testing the cleanup tab I found why tabs would not switch: **TUIOS binds `[`, `]`, `Tab`, `,`, `.`, `=`, `;` and the digits** in its own key map, and they never reached the program in that pane. Tabs are now switched with **`(` and `)`**, which TUIOS leaves alone; `[` and `]` still work where the pane is in terminal mode, so both are accepted. + +If a pane ever stops responding to letters, press `i` or `Enter` first — that is TUIOS's window mode, not a broken program. + +Committed as `3ec960e`; `docs/NEXT.md` updated with what is done and what remains (spend chart, the `office` scaffold, memory per agent, MOUSE-1). + +## Source paths observed + +- `.config/paperclip-harness/projects.toml` + +## Evidence + +- Confidence: 83% +- Reason: Extracted repeatable deploy/configuration procedure from rich discovery + +## Related learned memories + +- context: [[packs/paperclip-harness/20-context/paperclip-harness-tui-office-project-components|paperclip-harness TUI office/project components]] +- context: [[packs/paperclip-harness/20-context/tuios-key-bindings-interpose-on-harness-key-map|TUIOS key bindings interpose on harness key map]] +- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Delivered 5 of 6 harness UI items, commit 3ec960e]] +- session: [[packs/paperclip-harness/80-sessions/rich-discovery-config-2026-11-11-03-16-34|Rich discovery: .config 2026-11-11 03:16:34]] +- context: [[packs/paperclip-harness/20-context/config|.config]] +- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|.config deployment operations]] +- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|.config repository structure and configuration patterns]] diff --git a/.pi/memory-vault/packs/paperclip-harness/80-sessions/rich-discovery-config-2026-11-11-03-16-34.md b/.pi/memory-vault/packs/paperclip-harness/80-sessions/rich-discovery-config-2026-11-11-03-16-34.md new file mode 100644 index 0000000..41508b5 --- /dev/null +++ b/.pi/memory-vault/packs/paperclip-harness/80-sessions/rich-discovery-config-2026-11-11-03-16-34.md @@ -0,0 +1,94 @@ +--- +type: session +id: session.paperclip-harness.rich-discovery-config-2026-11-11-03-16-34 +title: Rich discovery: .config 2026-11-11 03:16:34 +status: active +source_of_truth: false +freshness: current +last_reviewed: 2026-11-11 +tags: + - pack/paperclip-harness + - agent-memory/session + - autolearn + - rich-discovery + - repo/config +--- + +# Rich discovery: .config 2026-11-11 03:16:34 + +Sanitized rich discovery snapshot captured automatically from the completed turn. + + +## Source paths observed + +- `.config/paperclip-harness/projects.toml` + +## Final answer snapshot + +Five of the six are in, and one has a caveat I want to be straight about. + +## Built + +**1. `Repair>repair` → cleanup tab.** Sessions with pane count and last use; `space` ticks, `x` closes the ticked ones after asking. Protected and attached sessions are refused, and the screen says so: + +``` +session panes last used state +paperclip-harness 9 11 Nov 14:14 this project's session +tuios coding harness 4 11 Nov 14:09 attached, or on another machine +office 32 10 Nov 13:57 attached, or on another machine +office-test-1 26 10 Nov 11:24 +office-test-1-card-t3-cover-image… 1 9 Nov 19:50 + +space ticks a session, x closes the ticked ones after asking. +closing a TUIOS session ends its panes. It does not delete anything in +~/.pi/paperclips, where every Pi conversation is kept. +``` + +**2. Pi sessions in `t`** — two new entries: `pi sessions` opens `~/.pi/paperclips` in Yazi, `pi resume` gives Pi's own session list ready to open. + +**4. `v` in `Work>review`** — starts `bin/review --post` and the tab shows the review running, then the verdict, which is also written on the task. + +**6. `Board>board` needs-you** — `enter` on a card now selects that task *and* switches you to the Reply workspace, so the answer is one key away. + +**3. `Project>project` → projects tab** — `bin/office` now records each adopted project in `~/.config/paperclip-harness/projects.toml`, and the tab lists them: + +``` +project machine session folder +spike-2026-11-10 nixos-desktop paperclip-har… /tmp/pc-sandbox-2026-… (this machine) + +a project on another machine can be listed here but not opened from this one. +to open one: attach to its session, or run bin/office there. +``` + +**Caveat:** that is a *list*, not a switch. Switching would mean tearing down these panes and building another project's — and a project on `.27` cannot be opened from `.13` at all. I would rather show you the truth than a button that half-works. + +## Not done: 7 (the spend chart) + +`Project>overview` already has a runs sparkline. Spend-per-day needs cost per run, and the only cheap source is company runs, which cost 8 seconds to read. I did not put an 8-second read behind a tab without asking you first. + +## A finding that changes the key map + +While testing the cleanup tab I found why tabs would not switch: **TUIOS binds `[`, `]`, `Tab`, `,`, `.`, `=`, `;` and the digits** in its own key map, and they never reached the program in that pane. Tabs are now switched with **`(` and `)`**, which TUIOS leaves alone; `[` and `]` still work where the pane is in terminal mode, so both are accepted. + +If a pane ever stops responding to letters, press `i` or `Enter` first — that is TUIOS's window mode, not a broken program. + +Committed as `3ec960e`; `docs/NEXT.md` updated with what is done and what remains (spend chart, the `office` scaffold, memory per agent, MOUSE-1). + +## Evidence + +- Confidence: 86% +- Reason: Preserve full sanitized discovery detail from a rich investigation turn + +## Related + +- [[packs/paperclip-harness/00-system/pi-agent/memory-manifest|Memory Manifest]] + +## Related learned memories + +- context: [[packs/paperclip-harness/20-context/paperclip-harness-tui-office-project-components|paperclip-harness TUI office/project components]] +- context: [[packs/paperclip-harness/20-context/tuios-key-bindings-interpose-on-harness-key-map|TUIOS key bindings interpose on harness key map]] +- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Delivered 5 of 6 harness UI items, commit 3ec960e]] +- session: [[packs/paperclip-harness/80-sessions/rich-discovery-config-2026-11-11-03-16-34|Rich discovery: .config 2026-11-11 03:16:34]] +- context: [[packs/paperclip-harness/20-context/config|.config]] +- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|.config deployment operations]] +- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|.config repository structure and configuration patterns]] diff --git a/bin/harness b/bin/harness index b57e722..ba4f342 100755 Binary files a/bin/harness and b/bin/harness differ diff --git a/bin/office b/bin/office index 4b79fb0..5b7d666 100755 --- a/bin/office +++ b/bin/office @@ -39,6 +39,44 @@ def parse(argv): return opts +def scaffold(folder, name): + """Write the files this project keeps, and only the ones that are missing. + + Anything already there is left exactly as it is: adopting a folder must never + overwrite a person's own notes or scripts. + """ + written = [] + harness = os.path.join(folder, ".harness") + os.makedirs(harness, exist_ok=True) + + verify = os.path.join(harness, "verify.sh") + if not os.path.exists(verify): + with open(verify, "w") as f: + f.write("""#!/bin/sh +# The command that decides a task in this project is finished. +# +# Leave it as it is to accept that there is no agreed command: bin/merge will +# say so and let the review decide. Replace the body with the real one when the +# project has tests, for example: +# +# exec go test ./... +# exec make test +echo "no verify command agreed for this project" +exit 0 +""") + os.chmod(verify, 0o755) + written.append(verify) + + notes = os.path.join(harness, "NOTES.md") + if not os.path.exists(notes): + with open(notes, "w") as f: + f.write("# %s\n\nWhat this project is, what finished looks like, and anything a person\n" + "picking it up next week needs to know. Notes only: tasks live in Paperclip.\n" % name) + written.append(notes) + + return written + + def main(): opts = parse(sys.argv[1:]) folder = os.path.abspath(os.path.expanduser(opts["folder"])) @@ -101,6 +139,10 @@ def main(): pj.register(cfg, proj["name"]) h.say("recorded in %s" % pj.REGISTRY) + written = scaffold(folder, proj["name"]) + for path in written: + h.say("wrote %s" % path) + # The pages are built by this machine, from this folder, in this session. code = os.spawnv( os.P_WAIT, diff --git a/docs/NEXT.md b/docs/NEXT.md index 9d7bdc1..c866498 100644 --- a/docs/NEXT.md +++ b/docs/NEXT.md @@ -56,6 +56,35 @@ only what is missing. That is the cheapest remaining gap in the project layer. The needs-you panel lists what is waiting but the action still happens elsewhere. Each card should carry its own key: unblock, assign, open in Reply. +## Done: costs as a chart + +`Project>costs` draws each task's spend as a bar against the largest, so the shape of the +month is visible without reading numbers. No extra API calls: the figures were already loaded. + +```text +task state cents runs share of the largest +AUD-163 done 3 3 ████████████████████████ +AUD-164 done 2 2 ████████████████ +AUD-159 done 1 1 ████████ +``` + +## Done: the `office` scaffold + +`bin/office` now also writes what is missing, never overwriting: `.harness/verify.sh` with a +comment explaining how to replace it, and `.harness/NOTES.md` for the person. Adopting a folder +no longer leaves it without a place to say what "finished" means. + +## Done: memory per agent, read-only + +`Agents>settings` ends with a line read from the agent's command and the global Pi settings: + +```text +memory and extensions + extensions: the global set · memory: pi-memctx +``` + +It claims only what it has read. A switch is a later decision, after one agent has run both ways. + ## 7. Costs as a chart `Project>overview` already draws a sparkline of runs in Go. Spend-per-day, using the same block diff --git a/tui/agents.go b/tui/agents.go index 4bf3dea..2dd0c05 100644 --- a/tui/agents.go +++ b/tui/agents.go @@ -717,6 +717,9 @@ func (m agentsModel) settingLines(width int) []string { } out = append(out, mark+style.Render(fmt.Sprintf("%-14s %s", f.label, value))) } + out = append(out, "", " "+mutedStyle2().Render("memory and extensions")) + out = append(out, " "+lipgloss.NewStyle().Foreground(lipgloss.Color(active.Text)).Render(m.memoryLine(agent.ID))) + out = append(out, " "+dimStyle().Render(" read from the agent's command and the global pi settings; nothing is set here yet")) out = append(out, "") out = append(out, dimStyle().Render(" a model change applies to that agent's next run, never to one in flight.")) out = append(out, dimStyle().Render(" p pause · P resume · w wake: they act on the agent chosen here.")) @@ -1239,3 +1242,57 @@ func (m agentsModel) extensionLines(width int) []string { out = append(out, dimStyle().Render(" and passed to Paperclip as this agent's command.")) return out } + +// memoryLine says what an agent's context is configured to use: whether it runs +// a wrapper (per-agent extensions), and which memory or compression packages the +// global Pi settings carry. It reads, and claims nothing it has not seen. +func (m agentsModel) memoryLine(agentID string) string { + parts := []string{} + if wrapped := wrapperExtensions(agentID); len(wrapped) > 0 { + var names []string + for name := range wrapped { + names = append(names, name) + } + sort.Strings(names) + parts = append(parts, "extensions: "+strings.Join(names, ", ")) + } else { + parts = append(parts, "extensions: the global set") + } + full, err := m.client.AgentRaw(agentID) + if err == nil { + if cfg, ok := full["adapterConfig"].(map[string]any); ok { + if cmd, ok := cfg["command"].(string); ok && cmd != "" && cmd != "pi" { + parts = append(parts, "command: "+filepath.Base(cmd)) + } + } + } + home, _ := os.UserHomeDir() + if b, err := os.ReadFile(filepath.Join(home, ".pi", "agent", "settings.json")); err == nil { + var settings struct { + Packages []any `json:"packages"` + } + if json.Unmarshal(b, &settings) == nil { + var mem []string + for _, p := range settings.Packages { + switch v := p.(type) { + case string: + if strings.Contains(v, "memctx") || strings.Contains(v, "engram") || strings.Contains(v, "headroom") { + mem = append(mem, strings.TrimPrefix(v, "npm:")) + } + case map[string]any: + if src, ok := v["source"].(string); ok { + if strings.Contains(src, "engram") || strings.Contains(src, "headroom") { + mem = append(mem, src) + } + } + } + } + if len(mem) > 0 { + parts = append(parts, "memory: "+strings.Join(mem, ", ")) + } else { + parts = append(parts, "memory: none in the global pi settings") + } + } + } + return strings.Join(parts, " · ") +} diff --git a/tui/project.go b/tui/project.go index 797d695..fa166e0 100644 --- a/tui/project.go +++ b/tui/project.go @@ -383,11 +383,23 @@ func (m projectModel) costLines() []string { } total := 0 runs := 0 - out := []string{"", dimStyle().Render(fmt.Sprintf("%-10s %-10s %8s %6s", "task", "state", "cents", "runs"))} + peak := 1 + for _, c := range m.costs { + if c.Cents > peak { + peak = c.Cents + } + } + out := []string{"", dimStyle().Render(fmt.Sprintf("%-10s %-10s %6s %5s %s", "task", "state", "cents", "runs", "share of the largest"))} for _, c := range m.costs { total += c.Cents runs += c.Runs - out = append(out, fmt.Sprintf("%-10s %-10s %8d %6d", c.Identifier, c.Status, c.Cents, c.Runs)) + bars := int(float64(c.Cents) / float64(peak) * 24) + bar := strings.Repeat("█", bars) + if c.Cents > 0 && bars == 0 { + bar = "▏" + } + out = append(out, fmt.Sprintf("%-10s %-10s %6d %5d %s", c.Identifier, c.Status, c.Cents, c.Runs, + lipgloss.NewStyle().Foreground(lipgloss.Color(active.Accent)).Render(bar))) } out = append(out, "") out = append(out, m.row("total, recent", fmt.Sprintf("%d cent(s) over %d run(s)", total, runs))) diff --git a/tui/repair.go b/tui/repair.go index a1264c3..379ee99 100644 --- a/tui/repair.go +++ b/tui/repair.go @@ -297,9 +297,26 @@ func (m repairModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } return m, nil case "up", "k": + if m.tab == 3 { + if m.sessAt > 0 { + m.sessAt-- + } + m.scroll = max(0, min(m.scroll, m.sessAt-2)) + return m, nil + } m.scroll-- return m, nil case "down", "j": + if m.tab == 3 { + if m.sessAt < len(m.sessions)-1 { + m.sessAt++ + } + visible := max(3, m.height-6) + if m.sessAt > m.scroll+visible-3 { + m.scroll = m.sessAt - visible + 3 + } + return m, nil + } m.scroll++ return m, nil case "esc": @@ -507,10 +524,10 @@ func (m repairModel) cleanupLines(width int) []string { r.lastUsed.Format("2 Jan 15:04"), state) mark := " " if m.ticked[r.name] { - mark = "▸ " + mark = "* " } if i == m.sessAt { - out = append(out, selectedStyle2().Render(padTo(mark+line, width))) + out = append(out, selectedStyle2().Render(padTo("▸"+line[1:], width))) continue } out = append(out, mark+line)