Skill and extension picker for Paperclip agents; session notes and cleanup plan

This commit is contained in:
Sam
2026-11-11 09:15:38 +11:00
parent e44b0dff51
commit 1f8731fd49
13 changed files with 1091 additions and 5 deletions

View File

@@ -1890,3 +1890,84 @@ If you want, the next build can be small and specific: an `Agents>skills` tab th
- context: [[packs/paperclip-harness/20-context/paperclipai|paperclipai]]
- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|paperclipai deployment operations]]
- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|paperclipai repository structure and configuration patterns]]
---
## Update (2026-11-10 21:58:38)
## Structural/configuration observations (2026-11-10 21:58:38)
Yes — I now have your question right, and I confirmed it by doing it rather than reading about it.
## What you are asking for
A picker like `pi-config`'s, but aimed at Paperclip agents: read your global skill and extension set, show what each agent has, and apply changes **before** the run — because Paperclip builds the Pi session folder at run time, so the TypeScript picker cannot reach in beforehand.
That is exactly right, and it is feasible. Here is the measured path.
## The gap, measured
| Set | Where | Count |
|---|---|---|
| what the `pi-config` picker lists | `~/.agents/skills` | **21** |
| what Paperclip can assign | `GET /api/companies/{id}/skills` | **9** |
Eleven skills you can see in the picker — `nixos-workflow`, `caveman`, `tuios`, `archify`, `ste-writing` and the rest — could not be given to a Paperclip agent, because Paperclip had never heard of them. That is the whole problem.
## What works, proven in this session
1. **Local import has one door.** `POST /api/companies/{id}/skills/import` with a path under `~/.agents` returns **403 `skill_workspace_boundary_denied`** — "Import from a configured Paperclip workspace or the company managed-skill directory". Copying the skill into `~/.paperclip/instances/default/skills/<companyId>/nixos-workflow` and importing that path returned **201**, with key `local/9a9eba3826/nixos-workflow`.
2. **Assignment is per agent, and it worked.** On `Documenter`:
```
POST /api/agents/{id}/skills/sync
{"mode":"add","desiredSkills":["local/9a9eba3826/nixos-workflow"]} → 200
desiredSkills: 3 → 4 … then remove → back to 3
```
So the per-agent list is real and I have driven it. My earlier claim that there was one set for everyone was wrong, and this is the proof.
3. **Extensions are the one genuine gap.** `~/.agents/extensions` has no Paperclip counterpart. The per-agent lever is `adapterConfig.command` — it defaults to `pi` and the adapter appends its own arguments — so a wrapper per agent that passes `--extension …` then `exec pi "$@"` is the equivalent of `pi-config` for Paperclip runs.
## The picker, precisely
Read `~/.agents/skills` and `~/.agents/extensions`, plus the company list and the agent's `desiredSkills`. Mark each: *available but not in Paperclip · in Paperclip · on this agent*. Choosing an unavailable skill copies it into the managed directory, imports it, then syncs it onto the agent. Removing is a `sync` with `remove`. For an extension, add it to that agent's wrapper and point `adapterConfig.command` at it.
Every step of that is verified above. It is one command or one panel, not a new subsystem.
**Change I made while checking:** `nixos-workflow` is now imported into the company (copied into the managed directory), so it can be assigned to any agent. It is assigned to nobody, and `Documenter`'s skills are back exactly as they were.
## History — your instinct is right
`~/.pi/paperclips/<timestamp>-<agentId>.jsonl` — 178 files, one per run, and `task-sessions` maps task → file. So the cheap version is enough: a tool-pane entry that opens that folder in Yazi, or a pane running `pi --resume`. Minutes of work, nothing invented. A transcript tab inside `Agents>agents` is the integrated option, worth doing only if browsing files becomes a detour in practice.
Committed as `e44b0df`, documentation only — the running layout is untouched.
## Source paths observed
- `paperclipai/paperclip/agentmail`
- `company/d4921013-e5da-4d88-8016-57d5746e2d03/obsidian-cli`
- `paperclipai/paperclip/paperclip`
- `paperclipai/paperclip/paperclip-board`
- `paperclipai/paperclip/paperclip-converting-plans-to-tasks`
- `paperclipai/paperclip/paperclip-create-agent`
- `paperclipai/paperclip/para-memory-files`
- `company/d4921013-e5da-4d88-8016-57d5746e2d03/project-docs`
- `company/d4921013-e5da-4d88-8016-57d5746e2d03/system-architect`
- `local/9a9eba3826/nixos-workflow`
- `.paperclip/instances/default/skills`
## Evidence
- Confidence: 82%
- Reason: Captured factual repo structure/configuration patterns from rich discovery
## Related learned memories <!-- same-turn-2026-11-10 21:58:38 -->
- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|Add an existing ~/.agents skill to a Paperclip company and assign it to an agent]]
- session: [[packs/paperclip-harness/80-sessions/paperclip-agent-skill-extension-picker-feasibility-measured-|Paperclip agent skill/extension picker feasibility: measured API path and boundaries]]
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-paperclip-2026-11-10-21-58-38|Rich discovery: .paperclip 2026-11-10 21:58:38]]
- context: [[packs/paperclip-harness/20-context/paperclipai|.paperclip]]
- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|.paperclip repository structure and configuration patterns]]