Correct the Pi advice: per-agent skills are the design; per-agent extensions via adapterConfig.command
This commit is contained in:
@@ -439,3 +439,115 @@ I am ready for the task you are about to deliver; nothing in the tree is half-ch
|
||||
- context: [[packs/paperclip-harness/20-context/paperclip-tuios-harness-sam-s-coding-harness-office-board-wo|Paperclip-TUIOS harness (sam's coding harness: office/board/work screens)]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-paperclipai-2026-11-10-10-01-16|Rich discovery: paperclipai 2026-11-10 10:01:16]]
|
||||
- context: [[packs/paperclip-harness/20-context/home|paperclipai]]
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Update (2026-11-10 21:03:21)
|
||||
|
||||
## Rich discovery update (2026-11-10 21:03:21)
|
||||
|
||||
Advice only — nothing built. Written into `docs/PLAN-INTERFACE.md` as well.
|
||||
|
||||
## Your picker, and what it actually writes
|
||||
|
||||
`pi-config` registers five commands — `/config-add`, `/config-remove`, `/config-list`, `/config-show`, `/config-setup` — and `picker.ts` is the overlay: a filtered list of `~/.agents/skills` and `~/.agents/extensions` showing which are active in the project and which are active globally.
|
||||
|
||||
What the commands change is plain JSON:
|
||||
|
||||
```
|
||||
<project>/.pi/settings.json project settings ("-l" mode)
|
||||
~/.pi/agent/settings.json global settings
|
||||
```
|
||||
|
||||
in the shape:
|
||||
|
||||
```json
|
||||
{"packages": [
|
||||
"npm:pi-memctx",
|
||||
{"source": "git:https://gitea…/pi-config", "extensions": ["extensions/pi-config/index.ts", "extensions/tavily-search/index.ts"]},
|
||||
{"source": "/home/sam/.agents", "skills": ["nixos-workflow"], "extensions": []}
|
||||
]}
|
||||
```
|
||||
|
||||
So yes: **that JSON is the interface**, and anything that can write a file can compose an agent's context exactly as the picker does. The real question is which of those files Pi actually reads on a Paperclip run.
|
||||
|
||||
## What Paperclip actually runs
|
||||
|
||||
From the installed `@paperclipai/adapter-pi-local`:
|
||||
|
||||
```
|
||||
pi --mode json --append-system-prompt <rendered>
|
||||
--provider <p> --model <m> --thinking <t>
|
||||
--tools read,bash,edit,write,grep,find,ls
|
||||
--session ~/.pi/paperclips/<timestamp>-<agentId>.jsonl
|
||||
--skill <a directory built from that agent's desired skills>
|
||||
```
|
||||
|
||||
Four consequences:
|
||||
|
||||
1. **Skills are already per agent** — `desiredSkills` and `POST /api/agents/{id}/skills/sync`. That is the supported lever, and the `--skill` directory is built from it.
|
||||
2. **The isolation leaks.** Injected skills are symlinked into the *shared* `~/.pi/agent/skills` and are not removed when another agent runs, and `--no-skills` is not passed. A skill one agent had can remain visible to another.
|
||||
3. **The tool list is fixed** at `read,bash,edit,write,grep,find,ls`. An agent cannot gain a tool by being handed an extension.
|
||||
4. **Project-local `.pi/settings.json` is unlikely to be honoured for Paperclip runs.** Pi loads project settings only from a trusted path, and `~/.pi/agent/trust.json` has 14 entries — none is a Paperclip worktree or `~/paperclip-agents`. And a worktree path changes every task (`…/worktrees/AUD-165-…`), so there is nothing stable to trust.
|
||||
|
||||
That is the direct answer to your "if it uses /.pi in each folder it might be possible" — it *is* possible for you at a terminal, and *not reliable* for a Paperclip-spawned Pi, for two independent reasons.
|
||||
|
||||
## So, honestly
|
||||
|
||||
- **Identity, instructions, model, budget, skills: Paperclip.** They are already per agent, and the instructions bundle at `~/.paperclip/instances/default/companies/<co>/agents/<id>/instructions/AGENTS.md` is your real per-agent context control.
|
||||
- **Extensions: one global set.** There is no per-agent extension mechanism in this adapter. Pretending otherwise gives you agents whose behaviour depends on which one ran last.
|
||||
- **Folder-level `.pi/settings.json`: useful for you, not for the factory.** Keep it for when you open Pi in a folder by hand.
|
||||
- **If per-agent extensions are genuinely wanted**, the change belongs in the adapter — a per-agent config directory, plus `--no-skills` with an explicit set and stale links removed. That is a Paperclip feature request, not something a terminal can arrange from outside.
|
||||
|
||||
## Seeing the agents does give you their history
|
||||
|
||||
- `~/.pi/paperclips/*.jsonl` — **178 session files** here, one per run, named `<timestamp>-<agentId>.jsonl`, each the full conversation.
|
||||
- `GET /api/agents/{id}/task-sessions` maps a task to its session file and working directory.
|
||||
- The run log is already visible in `Agents>agents`; `runtime-state` gives current state.
|
||||
|
||||
So an `Agents>history` panel is feasible with no new plumbing: list an agent's sessions, open one, render the transcript, link back to the task. Read-only, and the natural next panel after your tests.
|
||||
|
||||
Committed as `77014d0` — documentation only, nothing in the running layout changed.
|
||||
|
||||
## Source paths observed
|
||||
|
||||
- `etc/profiles/per-user/sam/bin/pi`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/bin/pi`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/lib/node_modules/pi-monorepo/docs/compaction.md`
|
||||
- `.pi/agent/settings.json`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/lib/node_modules/pi-monorepo/docs/packages.md`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/lib/node_modules/pi-monorepo/docs/sdk.md`
|
||||
- `github.com/user/repo`
|
||||
- `.pi/agent/skills`
|
||||
- `home/sam/.local/share/tuios/worktrees/office-test-1/card-t1-build-skeleton-and-13ob`
|
||||
- `home/sam/.local/share/tuios/worktrees/office-test-1/card-t2-recipe-content-3yto`
|
||||
- `home/sam/ai_chat/general_chat/chat_chat`
|
||||
- `home/sam/ai_chat/sys_config/devops`
|
||||
- `home/sam/ai_chat/sys_config/neovim_config`
|
||||
- `home/sam/ai_chat/sys_config/nixos_config`
|
||||
- `home/sam/paseo/projects/central_ai_llm_master`
|
||||
- `home/sam/paseo/projects/drone_fire_fighting`
|
||||
- `home/sam/.pi/paperclips/2026-10-16T01-58-49-725Z-403de1f7-645c-4d35-bc7e-19b01d77bacc.jsonl`
|
||||
- `home/sam/paseo/projects/artemis_control`
|
||||
- `tmp/pc-sandbox-2026-11-10/.paperclip/worktrees/AUD-166-add-a-changelog-entry-for-the-harness`
|
||||
- `home/sam/.pi/paperclips/2026-11-10T04-55-52`
|
||||
- `extensions/pi-config/index.ts`
|
||||
- `extensions/tavily-search/index.ts`
|
||||
- `home/sam/.agents`
|
||||
- `.pi/agent/trust.json`
|
||||
- `.paperclip/instances/default/companies`
|
||||
|
||||
## Evidence
|
||||
|
||||
- Confidence: 84%
|
||||
- Reason: Update component/repository context with detailed discovered structure and configuration
|
||||
|
||||
## Related learned memories <!-- same-turn-2026-11-10 21:03:21 -->
|
||||
|
||||
- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|Pi-local adapter constraints: fixed tool list and leaking skill symlinks]]
|
||||
- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Committed docs/PLAN-INTERFACE.md advise on Paperclip vs Pi config ownership]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/paperclip-pi-local-adapter-config-resolution-limits-and-agen|Paperclip Pi-local adapter: config resolution limits and agent history sources]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-pi-2026-11-10-21-03-21|Rich discovery: .pi 2026-11-10 21:03:21]]
|
||||
- context: [[packs/paperclip-harness/20-context/home|.pi]]
|
||||
- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|.pi deployment operations]]
|
||||
|
||||
@@ -460,3 +460,95 @@ I am ready for the task you are about to deliver; nothing in the tree is half-ch
|
||||
- context: [[packs/paperclip-harness/20-context/paperclip-tuios-harness-sam-s-coding-harness-office-board-wo|Paperclip-TUIOS harness (sam's coding harness: office/board/work screens)]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-paperclipai-2026-11-10-10-01-16|Rich discovery: paperclipai 2026-11-10 10:01:16]]
|
||||
- context: [[packs/paperclip-harness/20-context/home|paperclipai]]
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Update (2026-11-10 21:03:21)
|
||||
|
||||
Advice-only turn: no code built, no running layout changed.
|
||||
|
||||
Deliverable: documentation added to `docs/PLAN-INTERFACE.md` explaining how Pi agent configuration resolves under Paperclip.
|
||||
|
||||
Key content: picker.ts / pi-config command interface writes plain JSON to `<project>/.pi/settings.json` or `~/.pi/agent/settings.json`; the Paperclip adapter-pi-local command line; four consequences (per-agent skills via desiredSkills, skill symlink leak into shared ~/.pi/agent/skills, fixed tool list, project settings not honoured due to trust); recommendations (Paperclip owns identity/instructions/model/budget/skills; extensions global only; folder settings manual-only; per-agent extensions = adapter feature request); agent history sources (~/.pi/paperclips/*.jsonl, 178 files; GET /api/agents/{id}/task-sessions; runtime-state).
|
||||
|
||||
Commit: `77014d0` — documentation only.
|
||||
|
||||
## Detailed deliverable from completed turn
|
||||
|
||||
Advice only — nothing built. Written into `docs/PLAN-INTERFACE.md` as well.
|
||||
|
||||
## Your picker, and what it actually writes
|
||||
|
||||
`pi-config` registers five commands — `/config-add`, `/config-remove`, `/config-list`, `/config-show`, `/config-setup` — and `picker.ts` is the overlay: a filtered list of `~/.agents/skills` and `~/.agents/extensions` showing which are active in the project and which are active globally.
|
||||
|
||||
What the commands change is plain JSON:
|
||||
|
||||
```
|
||||
<project>/.pi/settings.json project settings ("-l" mode)
|
||||
~/.pi/agent/settings.json global settings
|
||||
```
|
||||
|
||||
in the shape:
|
||||
|
||||
```json
|
||||
{"packages": [
|
||||
"npm:pi-memctx",
|
||||
{"source": "git:https://gitea…/pi-config", "extensions": ["extensions/pi-config/index.ts", "extensions/tavily-search/index.ts"]},
|
||||
{"source": "/home/sam/.agents", "skills": ["nixos-workflow"], "extensions": []}
|
||||
]}
|
||||
```
|
||||
|
||||
So yes: **that JSON is the interface**, and anything that can write a file can compose an agent's context exactly as the picker does. The real question is which of those files Pi actually reads on a Paperclip run.
|
||||
|
||||
## What Paperclip actually runs
|
||||
|
||||
From the installed `@paperclipai/adapter-pi-local`:
|
||||
|
||||
```
|
||||
pi --mode json --append-system-prompt <rendered>
|
||||
--provider <p> --model <m> --thinking <t>
|
||||
--tools read,bash,edit,write,grep,find,ls
|
||||
--session ~/.pi/paperclips/<timestamp>-<agentId>.jsonl
|
||||
--skill <a directory built from that agent's desired skills>
|
||||
```
|
||||
|
||||
Four consequences:
|
||||
|
||||
1. **Skills are already per agent** — `desiredSkills` and `POST /api/agents/{id}/skills/sync`. That is the supported lever, and the `--skill` directory is built from it.
|
||||
2. **The isolation leaks.** Injected skills are symlinked into the *shared* `~/.pi/agent/skills` and are not removed when another agent runs, and `--no-skills` is not passed. A skill one agent had can remain visible to another.
|
||||
3. **The tool list is fixed** at `read,bash,edit,write,grep,find,ls`. An agent cannot gain a tool by being handed an extension.
|
||||
4. **Project-local `.pi/settings.json` is unlikely to be honoured for Paperclip runs.** Pi loads project settings only from a trusted path, and `~/.pi/agent/trust.json` has 14 entries — none is a Paperclip worktree or `~/paperclip-agents`. And a worktree path changes every task (`…/worktrees/AUD-165-…`), so there is nothing stable to trust.
|
||||
|
||||
That is the direct answer to your "if it uses /.pi in each folder it might be possible" — it *is* possible for you at a terminal, and *not reliable* for a Paperclip-spawned Pi, for two independent reasons.
|
||||
|
||||
## So, honestly
|
||||
|
||||
- **Identity, instructions, model, budget, skills: Paperclip.** They are already per agent, and the instructions bundle at `~/.paperclip/instances/default/companies/<co>/agents/<id>/instructions/AGENTS.md` is your real per-agent context control.
|
||||
- **Extensions: one global set.** There is no per-agent extension mechanism in this adapter. Pretending otherwise gives you agents whose behaviour depends on which one ran last.
|
||||
- **Folder-level `.pi/settings.json`: useful for you, not for the factory.** Keep it for when you open Pi in a folder by hand.
|
||||
- **If per-agent extensions are genuinely wanted**, the change belongs in the adapter — a per-agent config directory, plus `--no-skills` with an explicit set and stale links removed. That is a Paperclip feature request, not something a terminal can arrange from outside.
|
||||
|
||||
## Seeing the agents does give you their history
|
||||
|
||||
- `~/.pi/paperclips/*.jsonl` — **178 session files** here, one per run, named `<timestamp>-<agentId>.jsonl`, each the full conversation.
|
||||
- `GET /api/agents/{id}/task-sessions` maps a task to its session file and working directory.
|
||||
- The run log is already visible in `Agents>agents`; `runtime-state` gives current state.
|
||||
|
||||
So an `Agents>history` panel is feasible with no new plumbing: list an agent's sessions, open one, render the transcript, link back to the task. Read-only, and the natural next panel after your tests.
|
||||
|
||||
Committed as `77014d0` — documentation only, nothing in the running layout changed.
|
||||
|
||||
## Evidence
|
||||
|
||||
- Confidence: 90%
|
||||
- Reason: Records what was delivered and where, plus commit id.; enriched with final-answer detail because persistence should be reusable
|
||||
|
||||
## Related learned memories <!-- same-turn-2026-11-10 21:03:21 -->
|
||||
|
||||
- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|Pi-local adapter constraints: fixed tool list and leaking skill symlinks]]
|
||||
- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Committed docs/PLAN-INTERFACE.md advise on Paperclip vs Pi config ownership]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/paperclip-pi-local-adapter-config-resolution-limits-and-agen|Paperclip Pi-local adapter: config resolution limits and agent history sources]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-pi-2026-11-10-21-03-21|Rich discovery: .pi 2026-11-10 21:03:21]]
|
||||
- context: [[packs/paperclip-harness/20-context/home|.pi]]
|
||||
- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|.pi deployment operations]]
|
||||
|
||||
@@ -1576,3 +1576,232 @@ The functional test list I proposed is in the previous message — create, assig
|
||||
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-ready-for-tomorrow-s-tests-everything-is-runn|Rich discovery: ready-for-tomorrow-s-tests-everything-is-running-and-rebuilt 2026-11-10 10:48:39]]
|
||||
- context: [[packs/paperclip-harness/20-context/ready-for-tomorrow-s-tests-everything-is-running-and-rebuilt|ready-for-tomorrow-s-tests-everything-is-running-and-rebuilt]]
|
||||
- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|ready-for-tomorrow-s-tests-everything-is-running-and-rebuilt repository structure and configuration patterns]]
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Update (2026-11-10 21:03:21)
|
||||
|
||||
From installed @paperclipai/adapter-pi-local invocation observed in this workspace:
|
||||
|
||||
- Tool set is hard-coded: `--tools read,bash,edit,write,grep,find,ls`. An agent cannot gain extra tools by installing an extension.
|
||||
- Injected skills are symlinked into the shared `~/.pi/agent/skills` directory and are not cleaned up when a different agent runs; `--no-skills` is not passed. A skill installed for one agent can remain visible to others.
|
||||
- Per-agent skills ARE supported via `desiredSkills` + `POST /api/agents/{id}/skills/sync`, which builds the agent-specific `--skill` directory.
|
||||
- Project-local `.pi/settings.json` is unlikely to be honoured for Paperclip runs: Pi only loads it from trusted paths, `~/.pi/agent/trust.json` had 14 entries, none matching a Paperclip worktree or `~/paperclip-agents`, and worktree paths vary per task.
|
||||
- Per-agent extensions would need an adapter change: per-agent config directory, `--no-skills` with an explicit skill set, and stale symlink removal.
|
||||
|
||||
Source docs read from `/nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/lib/node_modules/pi-monorepo/docs/` (packages.md, sdk.md, skills docs) and `@paperclipai/adapter-pi-local` source.
|
||||
|
||||
## Evidence
|
||||
|
||||
- Confidence: 85%
|
||||
- Reason: Concrete adapter behaviour and isolation caveats useful for future work.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Update (2026-11-10 21:03:21)
|
||||
|
||||
- Installed Pi CLI: `/nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/bin/pi`, also on PATH at `/etc/profiles/per-user/sam/bin/pi` (Nix profile).
|
||||
- Monorepo layout at `<store>/lib/node_modules/pi-monorepo/` with CHANGELOG.md, dist, docs, examples, node_modules, npm-shrinkwrap.json, package.json, README.md.
|
||||
- Pi settings precedence: user global `~/.pi/agent/settings.json`; project `<cwd>/.pi/settings.json` (project settings shared with team; Pi auto-installs missing packages after project is trusted). `pi install -l` / `pi remove -l` write project settings; default writes global. `pi config -l` starts in project-overrides mode with inherited global resources dimmed.
|
||||
- Skills discovery order/locations (documented): `~/.pi/agent/skills/`, `~/.agents/skills/`, project `.pi/skills/`, `.agents/skills/` in cwd and ancestors (up to git root), packages (`skills/` dirs or `pi.skills` in package.json), settings `skills` array, CLI `--skill <path>` (repeatable, additive even with --no-skills). Root `.md` files discovered as individual skills in `~/.pi/agent/skills/` and `.pi/skills/`; ignored at root of `~/.agents/skills/` and project `.agents/skills/`; dirs containing SKILL.md discovered recursively. `--no-skills` disables discovery.
|
||||
- Temporary trial installs: `pi -e npm:@foo/bar`, `pi -e git:github.com/user/repo`.
|
||||
- Compaction defaults (docs/compaction.md): reserveTokens 16384, keepRecentTokens 20k, configurable in `~/.pi/agent/settings.json` or `<project>/.pi/settings.json`.
|
||||
|
||||
## Evidence
|
||||
|
||||
- Confidence: 85%
|
||||
- Reason: Durable environment and configuration facts about installed Pi on this machine.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Update (2026-11-10 21:03:21)
|
||||
|
||||
- Session transcripts: `~/.pi/paperclips/*.jsonl`, count 178 at time of check. Filename pattern `<ISO-timestamp>-<agentId>.jsonl`. Each file is JSONL v3; first record `{"type":"session","version":3,"id":...,"timestamp":...,"cwd":...}` followed by records like `{"type":"model_change","provider":"omni","modelId":"deepseek/deeps..."}`.
|
||||
- `GET /api/agents/{id}/task-sessions` returns task-to-session mapping with fields: id, companyId, agentId, adapterType (e.g. `pi_local`), taskKey, sessionParamsJson ({cwd: `/tmp/pc-sandbox-<date>/.paperclip/worktrees/<task-slug>`, sessionId: path to jsonl}).
|
||||
- `runtime-state` gives current agent state; run log visible in Agents>agents UI.
|
||||
- A read-only `Agents>history` panel is feasible: list sessions per agent, open transcript, link back to task. No new plumbing required.
|
||||
|
||||
## Detailed observations from completed turn
|
||||
|
||||
Advice only — nothing built. Written into `docs/PLAN-INTERFACE.md` as well.
|
||||
|
||||
## Your picker, and what it actually writes
|
||||
|
||||
`pi-config` registers five commands — `/config-add`, `/config-remove`, `/config-list`, `/config-show`, `/config-setup` — and `picker.ts` is the overlay: a filtered list of `~/.agents/skills` and `~/.agents/extensions` showing which are active in the project and which are active globally.
|
||||
|
||||
What the commands change is plain JSON:
|
||||
|
||||
```
|
||||
<project>/.pi/settings.json project settings ("-l" mode)
|
||||
~/.pi/agent/settings.json global settings
|
||||
```
|
||||
|
||||
in the shape:
|
||||
|
||||
```json
|
||||
{"packages": [
|
||||
"npm:pi-memctx",
|
||||
{"source": "git:https://gitea…/pi-config", "extensions": ["extensions/pi-config/index.ts", "extensions/tavily-search/index.ts"]},
|
||||
{"source": "/home/sam/.agents", "skills": ["nixos-workflow"], "extensions": []}
|
||||
]}
|
||||
```
|
||||
|
||||
So yes: **that JSON is the interface**, and anything that can write a file can compose an agent's context exactly as the picker does. The real question is which of those files Pi actually reads on a Paperclip run.
|
||||
|
||||
## What Paperclip actually runs
|
||||
|
||||
From the installed `@paperclipai/adapter-pi-local`:
|
||||
|
||||
```
|
||||
pi --mode json --append-system-prompt <rendered>
|
||||
--provider <p> --model <m> --thinking <t>
|
||||
--tools read,bash,edit,write,grep,find,ls
|
||||
--session ~/.pi/paperclips/<timestamp>-<agentId>.jsonl
|
||||
--skill <a directory built from that agent's desired skills>
|
||||
```
|
||||
|
||||
Four consequences:
|
||||
|
||||
1. **Skills are already per agent** — `desiredSkills` and `POST /api/agents/{id}/skills/sync`. That is the supported lever, and the `--skill` directory is built from it.
|
||||
2. **The isolation leaks.** Injected skills are symlinked into the *shared* `~/.pi/agent/skills` and are not removed when another agent runs, and `--no-skills` is not passed. A skill one agent had can remain visible to another.
|
||||
3. **The tool list is fixed** at `read,bash,edit,write,grep,find,ls`. An agent cannot gain a tool by being handed an extension.
|
||||
4. **Project-local `.pi/settings.json` is unlikely to be honoured for Paperclip runs.** Pi loads project settings only from a trusted path, and `~/.pi/agent/trust.json` has 14 entries — none is a Paperclip worktree or `~/paperclip-agents`. And a worktree path changes every task (`…/worktrees/AUD-165-…`), so there is nothing stable to trust.
|
||||
|
||||
That is the direct answer to your "if it uses /.pi in each folder it might be possible" — it *is* possible for you at a terminal, and *not reliable* for a Paperclip-spawned Pi, for two independent reasons.
|
||||
|
||||
## So, honestly
|
||||
|
||||
- **Identity, instructions, model, budget, skills: Paperclip.** They are already per agent, and the instructions bundle at `~/.paperclip/instances/default/companies/<co>/agents/<id>/instructions/AGENTS.md` is your real per-agent context control.
|
||||
- **Extensions: one global set.** There is no per-agent extension mechanism in this adapter. Pretending otherwise gives you agents whose behaviour depends on which one ran last.
|
||||
- **Folder-level `.pi/settings.json`: useful for you, not for the factory.** Keep it for when you open Pi in a folder by hand.
|
||||
- **If per-agent extensions are genuinely wanted**, the change belongs in the adapter — a per-agent config directory, plus `--no-skills` with an explicit set and stale links removed. That is a Paperclip feature request, not something a terminal can arrange from outside.
|
||||
|
||||
## Seeing the agents does give you their history
|
||||
|
||||
- `~/.pi/paperclips/*.jsonl` — **178 session files** here, one per run, named `<timestamp>-<agentId>.jsonl`, each the full conversation.
|
||||
- `GET /api/agents/{id}/task-sessions` maps a task to its session file and working directory.
|
||||
- The run log is already visible in `Agents>agents`; `runtime-state` gives current state.
|
||||
|
||||
So an `Agents>history` panel is feasible with no new plumbing: list an agent's sessions, open one, render the transcript, link back to the task. Read-only, and the natural next panel after your tests.
|
||||
|
||||
Committed as `77014d0` — documentation only, nothing in the running layout changed.
|
||||
|
||||
## Evidence
|
||||
|
||||
- Confidence: 85%
|
||||
- Reason: Concrete paths, counts, and API shape for building history features.; enriched with final-answer detail because persistence should be reusable
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Update (2026-11-10 21:03:21)
|
||||
|
||||
## Structural/configuration observations (2026-11-10 21:03:21)
|
||||
|
||||
Advice only — nothing built. Written into `docs/PLAN-INTERFACE.md` as well.
|
||||
|
||||
## Your picker, and what it actually writes
|
||||
|
||||
`pi-config` registers five commands — `/config-add`, `/config-remove`, `/config-list`, `/config-show`, `/config-setup` — and `picker.ts` is the overlay: a filtered list of `~/.agents/skills` and `~/.agents/extensions` showing which are active in the project and which are active globally.
|
||||
|
||||
What the commands change is plain JSON:
|
||||
|
||||
```
|
||||
<project>/.pi/settings.json project settings ("-l" mode)
|
||||
~/.pi/agent/settings.json global settings
|
||||
```
|
||||
|
||||
in the shape:
|
||||
|
||||
```json
|
||||
{"packages": [
|
||||
"npm:pi-memctx",
|
||||
{"source": "git:https://gitea…/pi-config", "extensions": ["extensions/pi-config/index.ts", "extensions/tavily-search/index.ts"]},
|
||||
{"source": "/home/sam/.agents", "skills": ["nixos-workflow"], "extensions": []}
|
||||
]}
|
||||
```
|
||||
|
||||
So yes: **that JSON is the interface**, and anything that can write a file can compose an agent's context exactly as the picker does. The real question is which of those files Pi actually reads on a Paperclip run.
|
||||
|
||||
## What Paperclip actually runs
|
||||
|
||||
From the installed `@paperclipai/adapter-pi-local`:
|
||||
|
||||
```
|
||||
pi --mode json --append-system-prompt <rendered>
|
||||
--provider <p> --model <m> --thinking <t>
|
||||
--tools read,bash,edit,write,grep,find,ls
|
||||
--session ~/.pi/paperclips/<timestamp>-<agentId>.jsonl
|
||||
--skill <a directory built from that agent's desired skills>
|
||||
```
|
||||
|
||||
Four consequences:
|
||||
|
||||
1. **Skills are already per agent** — `desiredSkills` and `POST /api/agents/{id}/skills/sync`. That is the supported lever, and the `--skill` directory is built from it.
|
||||
2. **The isolation leaks.** Injected skills are symlinked into the *shared* `~/.pi/agent/skills` and are not removed when another agent runs, and `--no-skills` is not passed. A skill one agent had can remain visible to another.
|
||||
3. **The tool list is fixed** at `read,bash,edit,write,grep,find,ls`. An agent cannot gain a tool by being handed an extension.
|
||||
4. **Project-local `.pi/settings.json` is unlikely to be honoured for Paperclip runs.** Pi loads project settings only from a trusted path, and `~/.pi/agent/trust.json` has 14 entries — none is a Paperclip worktree or `~/paperclip-agents`. And a worktree path changes every task (`…/worktrees/AUD-165-…`), so there is nothing stable to trust.
|
||||
|
||||
That is the direct answer to your "if it uses /.pi in each folder it might be possible" — it *is* possible for you at a terminal, and *not reliable* for a Paperclip-spawned Pi, for two independent reasons.
|
||||
|
||||
## So, honestly
|
||||
|
||||
- **Identity, instructions, model, budget, skills: Paperclip.** They are already per agent, and the instructions bundle at `~/.paperclip/instances/default/companies/<co>/agents/<id>/instructions/AGENTS.md` is your real per-agent context control.
|
||||
- **Extensions: one global set.** There is no per-agent extension mechanism in this adapter. Pretending otherwise gives you agents whose behaviour depends on which one ran last.
|
||||
- **Folder-level `.pi/settings.json`: useful for you, not for the factory.** Keep it for when you open Pi in a folder by hand.
|
||||
- **If per-agent extensions are genuinely wanted**, the change belongs in the adapter — a per-agent config directory, plus `--no-skills` with an explicit set and stale links removed. That is a Paperclip feature request, not something a terminal can arrange from outside.
|
||||
|
||||
## Seeing the agents does give you their history
|
||||
|
||||
- `~/.pi/paperclips/*.jsonl` — **178 session files** here, one per run, named `<timestamp>-<agentId>.jsonl`, each the full conversation.
|
||||
- `GET /api/agents/{id}/task-sessions` maps a task to its session file and working directory.
|
||||
- The run log is already visible in `Agents>agents`; `runtime-state` gives current state.
|
||||
|
||||
So an `Agents>history` panel is feasible with no new plumbing: list an agent's sessions, open one, render the transcript, link back to the task. Read-only, and the natural next panel after your tests.
|
||||
|
||||
Committed as `77014d0` — documentation only, nothing in the running layout changed.
|
||||
|
||||
## Source paths observed
|
||||
|
||||
- `etc/profiles/per-user/sam/bin/pi`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/bin/pi`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/lib/node_modules/pi-monorepo/docs/compaction.md`
|
||||
- `.pi/agent/settings.json`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/lib/node_modules/pi-monorepo/docs/packages.md`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/lib/node_modules/pi-monorepo/docs/sdk.md`
|
||||
- `github.com/user/repo`
|
||||
- `.pi/agent/skills`
|
||||
- `home/sam/.local/share/tuios/worktrees/office-test-1/card-t1-build-skeleton-and-13ob`
|
||||
- `home/sam/.local/share/tuios/worktrees/office-test-1/card-t2-recipe-content-3yto`
|
||||
- `home/sam/ai_chat/general_chat/chat_chat`
|
||||
- `home/sam/ai_chat/sys_config/devops`
|
||||
- `home/sam/ai_chat/sys_config/neovim_config`
|
||||
- `home/sam/ai_chat/sys_config/nixos_config`
|
||||
- `home/sam/paseo/projects/central_ai_llm_master`
|
||||
- `home/sam/paseo/projects/drone_fire_fighting`
|
||||
- `home/sam/.pi/paperclips/2026-10-16T01-58-49-725Z-403de1f7-645c-4d35-bc7e-19b01d77bacc.jsonl`
|
||||
- `home/sam/paseo/projects/artemis_control`
|
||||
- `tmp/pc-sandbox-2026-11-10/.paperclip/worktrees/AUD-166-add-a-changelog-entry-for-the-harness`
|
||||
- `home/sam/.pi/paperclips/2026-11-10T04-55-52`
|
||||
- `extensions/pi-config/index.ts`
|
||||
- `extensions/tavily-search/index.ts`
|
||||
- `home/sam/.agents`
|
||||
- `.pi/agent/trust.json`
|
||||
- `.paperclip/instances/default/companies`
|
||||
|
||||
## Evidence
|
||||
|
||||
- Confidence: 82%
|
||||
- Reason: Captured factual repo structure/configuration patterns from rich discovery
|
||||
|
||||
## Related learned memories <!-- same-turn-2026-11-10 21:03:21 -->
|
||||
|
||||
- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|Pi-local adapter constraints: fixed tool list and leaking skill symlinks]]
|
||||
- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Committed docs/PLAN-INTERFACE.md advise on Paperclip vs Pi config ownership]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/paperclip-pi-local-adapter-config-resolution-limits-and-agen|Paperclip Pi-local adapter: config resolution limits and agent history sources]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-pi-2026-11-10-21-03-21|Rich discovery: .pi 2026-11-10 21:03:21]]
|
||||
- context: [[packs/paperclip-harness/20-context/home|.pi]]
|
||||
- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|.pi deployment operations]]
|
||||
|
||||
@@ -403,3 +403,115 @@ I am ready for the task you are about to deliver; nothing in the tree is half-ch
|
||||
- context: [[packs/paperclip-harness/20-context/paperclip-tuios-harness-sam-s-coding-harness-office-board-wo|Paperclip-TUIOS harness (sam's coding harness: office/board/work screens)]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-paperclipai-2026-11-10-10-01-16|Rich discovery: paperclipai 2026-11-10 10:01:16]]
|
||||
- context: [[packs/paperclip-harness/20-context/home|paperclipai]]
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Update (2026-11-10 21:03:21)
|
||||
|
||||
## Deployment/runbook details discovered (2026-11-10 21:03:21)
|
||||
|
||||
Advice only — nothing built. Written into `docs/PLAN-INTERFACE.md` as well.
|
||||
|
||||
## Your picker, and what it actually writes
|
||||
|
||||
`pi-config` registers five commands — `/config-add`, `/config-remove`, `/config-list`, `/config-show`, `/config-setup` — and `picker.ts` is the overlay: a filtered list of `~/.agents/skills` and `~/.agents/extensions` showing which are active in the project and which are active globally.
|
||||
|
||||
What the commands change is plain JSON:
|
||||
|
||||
```
|
||||
<project>/.pi/settings.json project settings ("-l" mode)
|
||||
~/.pi/agent/settings.json global settings
|
||||
```
|
||||
|
||||
in the shape:
|
||||
|
||||
```json
|
||||
{"packages": [
|
||||
"npm:pi-memctx",
|
||||
{"source": "git:https://gitea…/pi-config", "extensions": ["extensions/pi-config/index.ts", "extensions/tavily-search/index.ts"]},
|
||||
{"source": "/home/sam/.agents", "skills": ["nixos-workflow"], "extensions": []}
|
||||
]}
|
||||
```
|
||||
|
||||
So yes: **that JSON is the interface**, and anything that can write a file can compose an agent's context exactly as the picker does. The real question is which of those files Pi actually reads on a Paperclip run.
|
||||
|
||||
## What Paperclip actually runs
|
||||
|
||||
From the installed `@paperclipai/adapter-pi-local`:
|
||||
|
||||
```
|
||||
pi --mode json --append-system-prompt <rendered>
|
||||
--provider <p> --model <m> --thinking <t>
|
||||
--tools read,bash,edit,write,grep,find,ls
|
||||
--session ~/.pi/paperclips/<timestamp>-<agentId>.jsonl
|
||||
--skill <a directory built from that agent's desired skills>
|
||||
```
|
||||
|
||||
Four consequences:
|
||||
|
||||
1. **Skills are already per agent** — `desiredSkills` and `POST /api/agents/{id}/skills/sync`. That is the supported lever, and the `--skill` directory is built from it.
|
||||
2. **The isolation leaks.** Injected skills are symlinked into the *shared* `~/.pi/agent/skills` and are not removed when another agent runs, and `--no-skills` is not passed. A skill one agent had can remain visible to another.
|
||||
3. **The tool list is fixed** at `read,bash,edit,write,grep,find,ls`. An agent cannot gain a tool by being handed an extension.
|
||||
4. **Project-local `.pi/settings.json` is unlikely to be honoured for Paperclip runs.** Pi loads project settings only from a trusted path, and `~/.pi/agent/trust.json` has 14 entries — none is a Paperclip worktree or `~/paperclip-agents`. And a worktree path changes every task (`…/worktrees/AUD-165-…`), so there is nothing stable to trust.
|
||||
|
||||
That is the direct answer to your "if it uses /.pi in each folder it might be possible" — it *is* possible for you at a terminal, and *not reliable* for a Paperclip-spawned Pi, for two independent reasons.
|
||||
|
||||
## So, honestly
|
||||
|
||||
- **Identity, instructions, model, budget, skills: Paperclip.** They are already per agent, and the instructions bundle at `~/.paperclip/instances/default/companies/<co>/agents/<id>/instructions/AGENTS.md` is your real per-agent context control.
|
||||
- **Extensions: one global set.** There is no per-agent extension mechanism in this adapter. Pretending otherwise gives you agents whose behaviour depends on which one ran last.
|
||||
- **Folder-level `.pi/settings.json`: useful for you, not for the factory.** Keep it for when you open Pi in a folder by hand.
|
||||
- **If per-agent extensions are genuinely wanted**, the change belongs in the adapter — a per-agent config directory, plus `--no-skills` with an explicit set and stale links removed. That is a Paperclip feature request, not something a terminal can arrange from outside.
|
||||
|
||||
## Seeing the agents does give you their history
|
||||
|
||||
- `~/.pi/paperclips/*.jsonl` — **178 session files** here, one per run, named `<timestamp>-<agentId>.jsonl`, each the full conversation.
|
||||
- `GET /api/agents/{id}/task-sessions` maps a task to its session file and working directory.
|
||||
- The run log is already visible in `Agents>agents`; `runtime-state` gives current state.
|
||||
|
||||
So an `Agents>history` panel is feasible with no new plumbing: list an agent's sessions, open one, render the transcript, link back to the task. Read-only, and the natural next panel after your tests.
|
||||
|
||||
Committed as `77014d0` — documentation only, nothing in the running layout changed.
|
||||
|
||||
## Source paths observed
|
||||
|
||||
- `etc/profiles/per-user/sam/bin/pi`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/bin/pi`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/lib/node_modules/pi-monorepo/docs/compaction.md`
|
||||
- `.pi/agent/settings.json`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/lib/node_modules/pi-monorepo/docs/packages.md`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/lib/node_modules/pi-monorepo/docs/sdk.md`
|
||||
- `github.com/user/repo`
|
||||
- `.pi/agent/skills`
|
||||
- `home/sam/.local/share/tuios/worktrees/office-test-1/card-t1-build-skeleton-and-13ob`
|
||||
- `home/sam/.local/share/tuios/worktrees/office-test-1/card-t2-recipe-content-3yto`
|
||||
- `home/sam/ai_chat/general_chat/chat_chat`
|
||||
- `home/sam/ai_chat/sys_config/devops`
|
||||
- `home/sam/ai_chat/sys_config/neovim_config`
|
||||
- `home/sam/ai_chat/sys_config/nixos_config`
|
||||
- `home/sam/paseo/projects/central_ai_llm_master`
|
||||
- `home/sam/paseo/projects/drone_fire_fighting`
|
||||
- `home/sam/.pi/paperclips/2026-10-16T01-58-49-725Z-403de1f7-645c-4d35-bc7e-19b01d77bacc.jsonl`
|
||||
- `home/sam/paseo/projects/artemis_control`
|
||||
- `tmp/pc-sandbox-2026-11-10/.paperclip/worktrees/AUD-166-add-a-changelog-entry-for-the-harness`
|
||||
- `home/sam/.pi/paperclips/2026-11-10T04-55-52`
|
||||
- `extensions/pi-config/index.ts`
|
||||
- `extensions/tavily-search/index.ts`
|
||||
- `home/sam/.agents`
|
||||
- `.pi/agent/trust.json`
|
||||
- `.paperclip/instances/default/companies`
|
||||
|
||||
## Evidence
|
||||
|
||||
- Confidence: 83%
|
||||
- Reason: Extracted repeatable deploy/configuration procedure from rich discovery
|
||||
|
||||
## Related learned memories <!-- same-turn-2026-11-10 21:03:21 -->
|
||||
|
||||
- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|Pi-local adapter constraints: fixed tool list and leaking skill symlinks]]
|
||||
- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Committed docs/PLAN-INTERFACE.md advise on Paperclip vs Pi config ownership]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/paperclip-pi-local-adapter-config-resolution-limits-and-agen|Paperclip Pi-local adapter: config resolution limits and agent history sources]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-pi-2026-11-10-21-03-21|Rich discovery: .pi 2026-11-10 21:03:21]]
|
||||
- context: [[packs/paperclip-harness/20-context/home|.pi]]
|
||||
- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|.pi deployment operations]]
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
type: session
|
||||
id: session.paperclip-harness.paperclip-pi-local-adapter-config-resolution-limits-and-agen
|
||||
title: Paperclip Pi-local adapter: config resolution limits and agent history sources
|
||||
status: active
|
||||
source_of_truth: false
|
||||
freshness: current
|
||||
last_reviewed: 2026-11-10
|
||||
tags:
|
||||
- pack/paperclip-harness
|
||||
- agent-memory/session
|
||||
- paperclip
|
||||
- pi-local-adapter
|
||||
- agent-config
|
||||
- skills
|
||||
- extensions
|
||||
- session-history
|
||||
- pi-settings
|
||||
---
|
||||
|
||||
# Paperclip Pi-local adapter: config resolution limits and agent history sources
|
||||
|
||||
Discovery turn in the Paperclip harness workspace (papertrail/artemis_control etc.). Advisor question: can an external picker write per-agent config (skills/extensions) for Paperclip-spawned Pi agents?
|
||||
|
||||
Key findings (evidence-backed):
|
||||
- pi-config extension registers 5 commands: /config-add, /config-remove, /config-list, /config-show, /config-setup. picker.ts is an overlay listing ~/.agents/skills and ~/.agents/extensions, marking active in project vs globally.
|
||||
- Those commands write plain JSON: `<project>/.pi/settings.json` (-l mode) or `~/.pi/agent/settings.json` (default global). Shape: {"packages":[ "npm:pi-memctx", {"source":"git:https://gitea…/pi-config","extensions":[...]}, {"source":"/home/sam/.agents","skills":["nixos-workflow"],"extensions":[]} ]}.
|
||||
- Installed @paperclipai/adapter-pi-local runs: `pi --mode json --append-system-prompt <rendered> --provider <p> --model <m> --thinking <t> --tools read,bash,edit,write,grep,find,ls --session ~/.pi/paperclips/<timestamp>-<agentId>.jsonl --skill <dir built from agent desiredSkills>`.
|
||||
- Consequences: (1) skills are per-agent via desiredSkills + POST /api/agents/{id}/skills/sync (supported lever); (2) isolation leaks — injected skills symlinked into shared ~/.pi/agent/skills and not removed per run, --no-skills not passed; (3) tool list fixed at read,bash,edit,write,grep,find,ls — extensions cannot add tools; (4) project-local .pi/settings.json unlikely honoured for Paperclip runs: Pi loads project settings only from trusted path, ~/.pi/agent/trust.json has 14 entries none matching Paperclip worktrees or ~/paperclip-agents, and worktree paths change per task (…/worktrees/AUD-165-…).
|
||||
- Recommendations: identity/instructions/model/budget/skills controlled by Paperclip per agent (instructions bundle at ~/.paperclip/instances/default/companies/<co>/agents/<id>/instructions/AGENTS.md); extensions only one global set; folder-level .pi/settings.json only for manual terminal use; per-agent extensions would require adapter change (per-agent config dir, --no-skills + explicit set, stale link cleanup) — a Paperclip feature request.
|
||||
- Agent history available with no new plumbing: ~/.pi/paperclips/*.jsonl (178 session files; name `<timestamp>-<agentId>.jsonl`, full conversation JSONL v3 with type=session header containing id/timestamp/cwd and model_change records); GET /api/agents/{id}/task-sessions maps task to session file + cwd (task-sessions JSON shows adapterType pi_local, taskKey, sessionParamsJson.cwd under /tmp/pc-sandbox-*/.paperclip/worktrees/<task>, sessionId path). runtime-state gives current state; run log in Agents>agents.
|
||||
- Written into docs/PLAN-INTERFACE.md and committed as 77014d0 (documentation only; no running layout changed).
|
||||
|
||||
## Evidence
|
||||
|
||||
- Confidence: 90%
|
||||
- Reason: Rich discovery about adapter behavior, config file locations, and history sources; durable and reusable.
|
||||
|
||||
## Related
|
||||
|
||||
- [[packs/paperclip-harness/00-system/pi-agent/memory-manifest|Memory Manifest]]
|
||||
|
||||
## Related learned memories <!-- same-turn-2026-11-10 21:03:21 -->
|
||||
|
||||
- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|Pi-local adapter constraints: fixed tool list and leaking skill symlinks]]
|
||||
- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Committed docs/PLAN-INTERFACE.md advise on Paperclip vs Pi config ownership]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/paperclip-pi-local-adapter-config-resolution-limits-and-agen|Paperclip Pi-local adapter: config resolution limits and agent history sources]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-pi-2026-11-10-21-03-21|Rich discovery: .pi 2026-11-10 21:03:21]]
|
||||
- context: [[packs/paperclip-harness/20-context/home|.pi]]
|
||||
- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|.pi deployment operations]]
|
||||
@@ -0,0 +1,131 @@
|
||||
---
|
||||
type: session
|
||||
id: session.paperclip-harness.rich-discovery-pi-2026-11-10-21-03-21
|
||||
title: Rich discovery: .pi 2026-11-10 21:03:21
|
||||
status: active
|
||||
source_of_truth: false
|
||||
freshness: current
|
||||
last_reviewed: 2026-11-10
|
||||
tags:
|
||||
- pack/paperclip-harness
|
||||
- agent-memory/session
|
||||
- autolearn
|
||||
- rich-discovery
|
||||
- repo/pi
|
||||
---
|
||||
|
||||
# Rich discovery: .pi 2026-11-10 21:03:21
|
||||
|
||||
Sanitized rich discovery snapshot captured automatically from the completed turn.
|
||||
|
||||
|
||||
## Source paths observed
|
||||
|
||||
- `etc/profiles/per-user/sam/bin/pi`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/bin/pi`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/lib/node_modules/pi-monorepo/docs/compaction.md`
|
||||
- `.pi/agent/settings.json`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/lib/node_modules/pi-monorepo/docs/packages.md`
|
||||
- `nix/store/rg248h9sz8dylm8p6a9w9fj4zrv4sgm5-pi-coding-agent-0.82.1/lib/node_modules/pi-monorepo/docs/sdk.md`
|
||||
- `github.com/user/repo`
|
||||
- `.pi/agent/skills`
|
||||
- `home/sam/.local/share/tuios/worktrees/office-test-1/card-t1-build-skeleton-and-13ob`
|
||||
- `home/sam/.local/share/tuios/worktrees/office-test-1/card-t2-recipe-content-3yto`
|
||||
- `home/sam/ai_chat/general_chat/chat_chat`
|
||||
- `home/sam/ai_chat/sys_config/devops`
|
||||
- `home/sam/ai_chat/sys_config/neovim_config`
|
||||
- `home/sam/ai_chat/sys_config/nixos_config`
|
||||
- `home/sam/paseo/projects/central_ai_llm_master`
|
||||
- `home/sam/paseo/projects/drone_fire_fighting`
|
||||
- `home/sam/.pi/paperclips/2026-10-16T01-58-49-725Z-403de1f7-645c-4d35-bc7e-19b01d77bacc.jsonl`
|
||||
- `home/sam/paseo/projects/artemis_control`
|
||||
- `tmp/pc-sandbox-2026-11-10/.paperclip/worktrees/AUD-166-add-a-changelog-entry-for-the-harness`
|
||||
- `home/sam/.pi/paperclips/2026-11-10T04-55-52`
|
||||
- `extensions/pi-config/index.ts`
|
||||
- `extensions/tavily-search/index.ts`
|
||||
- `home/sam/.agents`
|
||||
- `.pi/agent/trust.json`
|
||||
- `.paperclip/instances/default/companies`
|
||||
|
||||
## Final answer snapshot
|
||||
|
||||
Advice only — nothing built. Written into `docs/PLAN-INTERFACE.md` as well.
|
||||
|
||||
## Your picker, and what it actually writes
|
||||
|
||||
`pi-config` registers five commands — `/config-add`, `/config-remove`, `/config-list`, `/config-show`, `/config-setup` — and `picker.ts` is the overlay: a filtered list of `~/.agents/skills` and `~/.agents/extensions` showing which are active in the project and which are active globally.
|
||||
|
||||
What the commands change is plain JSON:
|
||||
|
||||
```
|
||||
<project>/.pi/settings.json project settings ("-l" mode)
|
||||
~/.pi/agent/settings.json global settings
|
||||
```
|
||||
|
||||
in the shape:
|
||||
|
||||
```json
|
||||
{"packages": [
|
||||
"npm:pi-memctx",
|
||||
{"source": "git:https://gitea…/pi-config", "extensions": ["extensions/pi-config/index.ts", "extensions/tavily-search/index.ts"]},
|
||||
{"source": "/home/sam/.agents", "skills": ["nixos-workflow"], "extensions": []}
|
||||
]}
|
||||
```
|
||||
|
||||
So yes: **that JSON is the interface**, and anything that can write a file can compose an agent's context exactly as the picker does. The real question is which of those files Pi actually reads on a Paperclip run.
|
||||
|
||||
## What Paperclip actually runs
|
||||
|
||||
From the installed `@paperclipai/adapter-pi-local`:
|
||||
|
||||
```
|
||||
pi --mode json --append-system-prompt <rendered>
|
||||
--provider <p> --model <m> --thinking <t>
|
||||
--tools read,bash,edit,write,grep,find,ls
|
||||
--session ~/.pi/paperclips/<timestamp>-<agentId>.jsonl
|
||||
--skill <a directory built from that agent's desired skills>
|
||||
```
|
||||
|
||||
Four consequences:
|
||||
|
||||
1. **Skills are already per agent** — `desiredSkills` and `POST /api/agents/{id}/skills/sync`. That is the supported lever, and the `--skill` directory is built from it.
|
||||
2. **The isolation leaks.** Injected skills are symlinked into the *shared* `~/.pi/agent/skills` and are not removed when another agent runs, and `--no-skills` is not passed. A skill one agent had can remain visible to another.
|
||||
3. **The tool list is fixed** at `read,bash,edit,write,grep,find,ls`. An agent cannot gain a tool by being handed an extension.
|
||||
4. **Project-local `.pi/settings.json` is unlikely to be honoured for Paperclip runs.** Pi loads project settings only from a trusted path, and `~/.pi/agent/trust.json` has 14 entries — none is a Paperclip worktree or `~/paperclip-agents`. And a worktree path changes every task (`…/worktrees/AUD-165-…`), so there is nothing stable to trust.
|
||||
|
||||
That is the direct answer to your "if it uses /.pi in each folder it might be possible" — it *is* possible for you at a terminal, and *not reliable* for a Paperclip-spawned Pi, for two independent reasons.
|
||||
|
||||
## So, honestly
|
||||
|
||||
- **Identity, instructions, model, budget, skills: Paperclip.** They are already per agent, and the instructions bundle at `~/.paperclip/instances/default/companies/<co>/agents/<id>/instructions/AGENTS.md` is your real per-agent context control.
|
||||
- **Extensions: one global set.** There is no per-agent extension mechanism in this adapter. Pretending otherwise gives you agents whose behaviour depends on which one ran last.
|
||||
- **Folder-level `.pi/settings.json`: useful for you, not for the factory.** Keep it for when you open Pi in a folder by hand.
|
||||
- **If per-agent extensions are genuinely wanted**, the change belongs in the adapter — a per-agent config directory, plus `--no-skills` with an explicit set and stale links removed. That is a Paperclip feature request, not something a terminal can arrange from outside.
|
||||
|
||||
## Seeing the agents does give you their history
|
||||
|
||||
- `~/.pi/paperclips/*.jsonl` — **178 session files** here, one per run, named `<timestamp>-<agentId>.jsonl`, each the full conversation.
|
||||
- `GET /api/agents/{id}/task-sessions` maps a task to its session file and working directory.
|
||||
- The run log is already visible in `Agents>agents`; `runtime-state` gives current state.
|
||||
|
||||
So an `Agents>history` panel is feasible with no new plumbing: list an agent's sessions, open one, render the transcript, link back to the task. Read-only, and the natural next panel after your tests.
|
||||
|
||||
Committed as `77014d0` — documentation only, nothing in the running layout changed.
|
||||
|
||||
## 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 <!-- same-turn-2026-11-10 21:03:21 -->
|
||||
|
||||
- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|Pi-local adapter constraints: fixed tool list and leaking skill symlinks]]
|
||||
- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|Committed docs/PLAN-INTERFACE.md advise on Paperclip vs Pi config ownership]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/paperclip-pi-local-adapter-config-resolution-limits-and-agen|Paperclip Pi-local adapter: config resolution limits and agent history sources]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-pi-2026-11-10-21-03-21|Rich discovery: .pi 2026-11-10 21:03:21]]
|
||||
- context: [[packs/paperclip-harness/20-context/home|.pi]]
|
||||
- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|.pi deployment operations]]
|
||||
@@ -414,3 +414,79 @@ Four consequences, and they matter:
|
||||
A history panel is therefore feasible without new plumbing: list an agent's sessions from
|
||||
`task-sessions`, open one, and render the JSONL transcript. That is the natural next panel
|
||||
after the functional tests, and it is read-only.
|
||||
|
||||
---
|
||||
|
||||
# Correction: per-agent skills are the design, not an accident
|
||||
|
||||
The section above gives the wrong impression. Here is the accurate version.
|
||||
|
||||
## Each agent has its own skill set, and that is stored in Paperclip
|
||||
|
||||
`GET /api/agents/{id}/skills` returns, per agent, `desiredSkills` and the entries actually
|
||||
managed for it. `Builder` had its own list; `Documenter` has another. Setting it is one call:
|
||||
|
||||
```
|
||||
POST /api/agents/{id}/skills/sync
|
||||
{ "mode": "replace" | "add" | "remove",
|
||||
"desiredSkills": ["company/<id>/nixos-workflow", "paperclipai/paperclip/paperclip"] }
|
||||
```
|
||||
|
||||
`replace` means "this agent gets exactly these". At run time the adapter builds a directory
|
||||
from **that agent's** desired set and passes it as `--skill`, and symlinks those skills into
|
||||
`~/.pi/agent/skills/<runtimeName>` so the run can find them. So: different agents, different
|
||||
skills, no problem — this is already the supported path and it needs no picker.
|
||||
|
||||
The caveat I over-stated is narrow: the symlinks stay in the shared global directory after a
|
||||
run, and Paperclip does not pass `--no-skills`, so a skill an agent used once can remain
|
||||
discoverable by another agent afterwards. That is a leak to know about (and a good argument
|
||||
for `replace` plus a periodic clean), not "one set for everybody".
|
||||
|
||||
Where skills come from: `GET /api/skills/available`, the company list at
|
||||
`GET /api/companies/{id}/skills`, and the catalog at `GET /api/skills/catalog`. A skill there
|
||||
can be assigned to any agent with the call above.
|
||||
|
||||
## Extensions per agent: yes, through the command
|
||||
|
||||
The adapter's configuration document says the agent's command defaults to `pi` and can be set
|
||||
per agent:
|
||||
|
||||
```
|
||||
adapterConfig.command defaults to "pi"
|
||||
adapterConfig.env KEY=VALUE pairs
|
||||
```
|
||||
|
||||
So an agent can be given its own wrapper:
|
||||
|
||||
```
|
||||
~/paperclip-agents/builder/pi-wrapper.sh:
|
||||
|
||||
#!/bin/sh
|
||||
exec pi --extension npm:pi-memctx --extension git:https://gitea…/pi-config/extensions/tavily-search/index.ts "$@"
|
||||
```
|
||||
|
||||
and `PATCH /api/agents/{id}` with `{"adapterConfig": {…, "command": "…/pi-wrapper.sh"}}`. The
|
||||
adapter appends its own arguments (`--mode json`, `--session`, `--skill`, `--tools`,
|
||||
`--model`) to whatever the command is, so the wrapper is additive and cannot break the run.
|
||||
`env` is the same lever for environment variables.
|
||||
|
||||
That is how per-agent extensions become real today: one wrapper per agent role (`builder`,
|
||||
`documenter`, `reviewer`), each listing the extensions that role may use. It also gives a
|
||||
place to set `--no-skills` if strict isolation is wanted, and a place to keep the tool list
|
||||
deliberately small.
|
||||
|
||||
## History: three options, in order of fidelity
|
||||
|
||||
1. **Open the real Pi session in a pane.** Paperclip writes every run to
|
||||
`~/.pi/paperclips/<timestamp>-<agentId>.jsonl` and starts Pi with `--session <file>`. A
|
||||
pane running `pi --session <that file>` gives the actual conversation, with Pi's own
|
||||
interface, and can be continued. Highest fidelity, zero new code — a tool-pane entry that
|
||||
takes a file path. Two writers on one session file is the risk, so this is for sessions
|
||||
that are finished, or for a deliberate hand-over.
|
||||
2. **A read-only transcript panel.** Parse the JSONL and draw the messages in `Agents>agents`
|
||||
as a fourth tab. Integrated, safe, no second process; less faithful than the real thing.
|
||||
3. **`pi --resume`** in a tool pane, and pick the session from Pi's own list. Simplest of all,
|
||||
but it makes you find the session by eye.
|
||||
|
||||
`GET /api/agents/{id}/task-sessions` maps task → session file and working directory, so option
|
||||
1 and 2 both have a reliable index and neither needs guessing.
|
||||
|
||||
Reference in New Issue
Block a user