bots-garden/sidekickspublic Fork
⑂ 64f5f9b
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/sidekicks.git
git clone ssh://git@rickub.com/bots-garden/sidekicks.git

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

Download ZIP

#119 #122 Supprimer une skill et le fichier d'instructions ; tickets #120, #121

Onglet Skills : « Supprimer la skill » (son dossier, ou le <nom>.md de
mini-me) ; onglet Instructions : « Supprimer les instructions ». Avec
confirmation, à la corbeille sur cet ordinateur, rien d'autre. Tickets #120
(skill par glisser-déposer) et #121 (instructions par glisser-déposer).
#119 et #122 fermés (testés sur le Mac).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agent committed 2026-11-16T06:42:52+01:00 Browse files
64f5f9b parent: 88fd9e6
modified .memory/history.md +8 -0
@@ -396,3 +396,11 @@
396396 - **#112 fix** (owner: "sandbox mini-coder-sbx: mkdir: Read-only file system"): mini-me's sbxenv mounts .mm read-only and skillsDir is .mm/skills; instructions and skills are now read/written in the agent's host folder when it exists (Core.settingsWorkspaceOf), not via sbx/docker exec; mini-me <name>.md skills listed/read/saved (ReadSkill, inSkills). Test reproduces mini-coder. make verify green.
397397 - **2026-11-15 — #112 closed** (owner); feature/112-agent-skills merged into main (not pushed).
398398 - **2026-11-15 — milestone v1.8.0** created; #114 and #115 (spikes) moved there from v1.7.0 (owner). No open ticket left in v1.7.0.
399+
400+## 2026-11-16 — #119 delete a skill; tickets #120, #121 (branch feature/119-delete-skill)
401+
402+- Asked: "ticket for v1.7.0 to delete a skill, implement it; ticket: add a skill by drag & drop; ticket: add AGENTS.md by drag & drop".
403+- Created #119 (implemented), #120 (skill by drag & drop on the Skills list), #121 (instructions by drag & drop on the Instructions tab) — all v1.7.0; #120/#121 note files:dropped / data-file-drop-target and ImportSkill / ImportInstructions.
404+- #119: DeleteSkill (folder or <name>.md, to the trash locally, nothing else), Delete button + confirmation in SkillsTab. Amends the "never removes" rule (summary updated). Tests Go; Xvfb. make verify green. Not committed; #119 open for the owner's test.
405+- **2026-11-16 — #122** (owner: ticket + implement deleting the instructions file): DeleteInstructions (existing file only, trash locally), Delete button + confirmation in InstructionsTab; same branch feature/119-delete-skill. Tests Go; Xvfb. make verify green. Summary decision amended. Not committed; #119 and #122 open for the owner's test.
406+- **2026-11-16 — #119 and #122 closed** (owner); feature/119-delete-skill merged into main with tickets #120, #121 (not pushed).
@@ -396,3 +396,11 @@
396 - **#112 fix** (owner: "sandbox mini-coder-sbx: mkdir: Read-only file system"): mini-me's sbxenv mounts .mm read-only and skillsDir is .mm/skills; instructions and skills are now read/written in the agent's host folder when it exists (Core.settingsWorkspaceOf), not via sbx/docker exec; mini-me <name>.md skills listed/read/saved (ReadSkill, inSkills). Test reproduces mini-coder. make verify green.396 - **#112 fix** (owner: "sandbox mini-coder-sbx: mkdir: Read-only file system"): mini-me's sbxenv mounts .mm read-only and skillsDir is .mm/skills; instructions and skills are now read/written in the agent's host folder when it exists (Core.settingsWorkspaceOf), not via sbx/docker exec; mini-me <name>.md skills listed/read/saved (ReadSkill, inSkills). Test reproduces mini-coder. make verify green.
397 - **2026-11-15 — #112 closed** (owner); feature/112-agent-skills merged into main (not pushed).397 - **2026-11-15 — #112 closed** (owner); feature/112-agent-skills merged into main (not pushed).
398 - **2026-11-15 — milestone v1.8.0** created; #114 and #115 (spikes) moved there from v1.7.0 (owner). No open ticket left in v1.7.0.398 - **2026-11-15 — milestone v1.8.0** created; #114 and #115 (spikes) moved there from v1.7.0 (owner). No open ticket left in v1.7.0.
399+
400+## 2026-11-16 — #119 delete a skill; tickets #120, #121 (branch feature/119-delete-skill)
401+
402+- Asked: "ticket for v1.7.0 to delete a skill, implement it; ticket: add a skill by drag & drop; ticket: add AGENTS.md by drag & drop".
403+- Created #119 (implemented), #120 (skill by drag & drop on the Skills list), #121 (instructions by drag & drop on the Instructions tab) — all v1.7.0; #120/#121 note files:dropped / data-file-drop-target and ImportSkill / ImportInstructions.
404+- #119: DeleteSkill (folder or <name>.md, to the trash locally, nothing else), Delete button + confirmation in SkillsTab. Amends the "never removes" rule (summary updated). Tests Go; Xvfb. make verify green. Not committed; #119 open for the owner's test.
405+- **2026-11-16 — #122** (owner: ticket + implement deleting the instructions file): DeleteInstructions (existing file only, trash locally), Delete button + confirmation in InstructionsTab; same branch feature/119-delete-skill. Tests Go; Xvfb. make verify green. Summary decision amended. Not committed; #119 and #122 open for the owner's test.
406+- **2026-11-16 — #119 and #122 closed** (owner); feature/119-delete-skill merged into main with tickets #120, #121 (not pushed).
modified .memory/summary.md +1 -1
@@ -28,7 +28,7 @@ What exists:
2828 - Agent forms (#95): every conversation agent is started with `acp.Spec.Forms` (advertises `elicitation.form`); a form goes to the session named in `_meta["mm.elicitationScope"]`, else to the only session with a prompt in flight, and is shown as a `FormCard` under the answer (`form:requested`/`form:resolved`, `ChannelService.AnswerForm`); Stop cancels it. Fields rendered by `chat/FormFields.svelte`, shared with the creator.
2929 - Sandbox creation assistant (#96, `SbxCreatorService`, page `CreateSbxAgent.svelte`, package `internal/sbxcreate`): catalogue of kinds (Claude `claude-agent-acp`, Antigravity (kind id `antigravity` since #108, was `gemini`) `agy acp` with kit `docker.io/sbx/antigravity`, Codex `codex-acp`, Vibe `vibe-acp` with kit `docker.io/sbx/vibe-kit`, service `mistral` — #86; Copilot `copilot --acp --stdio` with kit `docker.io/sbx/copilot-kit`, service `copilot` = a GitHub token, `Kind.Token` switches the key step to "token" texts — #103); writes `<agentsFolder>/<name>/sbxenv.yaml` (English comments) + `workspace/`; name = agent = folder = sandbox (`^[a-z][a-z0-9-]{0,31}$`); API key checked with `sbx secret ls --service`, set with `sbx secret set <service>` on stdin (never in args, files or logs). `appState.creator` is `'' | 'mini-me' | 'sbx'`.
3030 - Agent icons (#100): `icon` may be `logo:<name>` (`config.LogoNames` = claude, gemini, antigravity, openai, mistral, copilot — copilot is GitHub Octicons, MIT, antigravity LobeHub Icons, MIT; drawn by `frontend/src/lib/logos.ts` from Simple Icons, CC0 — OpenAI from 13.21.0; a Go test checks both lists; unknown name = warning, shows a letter). Start progress (#98): `agent:progress` {agent, step checking|preparing|connecting, line, since} from `agents.Manager`, card `chat/StartProgress.svelte` (no log link since 2026-11-15, owner's request; `showLog` in state.svelte.ts is now unused). Assistants' @ name follows the name shown until edited, free variant from Go's `taken` list (#99).
31-- Agent instructions (#113): an agent's instruction file is chosen from its program (`agents.InstructionsFiles`: Claude → `CLAUDE.md` then `AGENTS.md`; Antigravity → `AGENTS.md` then `GEMINI.md`; else `AGENTS.md`). `config.AlwaysProtected` = `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `skills/**`: the Files tab may neither change nor delete them; **only the agent's Instructions tab writes an instruction file** (create from template / save with version / import), never deletes it — owner's decision amending #54. Same rule for skills (#112): `agents.SkillsDir` (mm `skills` or its agent.yaml `skillsDir`, Claude `.claude/skills`, Vibe `.vibe/skills`, else `.agents/skills`); `.claude/skills/**`, `.agents/skills/**`, `.vibe/skills/**` are in AlwaysProtected too; only the Skills tab writes there, nothing is ever removed.
31+- Agent instructions (#113): an agent's instruction file is chosen from its program (`agents.InstructionsFiles`: Claude → `CLAUDE.md` then `AGENTS.md`; Antigravity → `AGENTS.md` then `GEMINI.md`; else `AGENTS.md`). `config.AlwaysProtected` = `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `skills/**`: the Files tab may neither change nor delete them; **only the agent's Instructions tab writes an instruction file** (create from template / save with version / import) and, since #122, deletes it after a confirmation (to the trash on this computer) — owner's decision amending #54. Same rule for skills (#112): `agents.SkillsDir` (mm `skills` or its agent.yaml `skillsDir`, Claude `.claude/skills`, Vibe `.vibe/skills`, else `.agents/skills`); `.claude/skills/**`, `.agents/skills/**`, `.vibe/skills/**` are in AlwaysProtected too; only the Skills tab writes there, and since #119 it can delete a skill (its folder or mini-me `<name>.md`, to the trash on this computer) after a confirmation — nothing else is ever removed. Instructions and skills of a container/sbx agent are read/written in its host folder when it exists (`Core.settingsWorkspaceOf`).
3232 - Interface language: ADR 0005 — `ui.language` defaults to `en`; every UI text is a key of `frontend/src/lib/i18n/messages.ts` (`fr` typed `Record<MessageKey,string>`, test checks keys and variables); config errors use the Go catalogue in the same language; agent titles and channel names are user data, never translated. Default config file and `examples/test-agents.yaml` are in English.
3333 - Packages and data model: ADR 0003 + Amendments 1 and 2 (main at the root, only main.go imports Wails, `internal/events` with an `Emitter` interface, LRU eviction of idle agents at the limit).
3434 - Frontend dependencies with **pnpm 12.11.2** and `frontend/pnpm-workspace.yaml` `supportedArchitectures` (darwin+linux): the repository folder is shared between the Mac and the Linux sandbox. Never use npm in `frontend/`.
@@ -28,7 +28,7 @@ What exists:
28 - Agent forms (#95): every conversation agent is started with `acp.Spec.Forms` (advertises `elicitation.form`); a form goes to the session named in `_meta["mm.elicitationScope"]`, else to the only session with a prompt in flight, and is shown as a `FormCard` under the answer (`form:requested`/`form:resolved`, `ChannelService.AnswerForm`); Stop cancels it. Fields rendered by `chat/FormFields.svelte`, shared with the creator.28 - Agent forms (#95): every conversation agent is started with `acp.Spec.Forms` (advertises `elicitation.form`); a form goes to the session named in `_meta["mm.elicitationScope"]`, else to the only session with a prompt in flight, and is shown as a `FormCard` under the answer (`form:requested`/`form:resolved`, `ChannelService.AnswerForm`); Stop cancels it. Fields rendered by `chat/FormFields.svelte`, shared with the creator.
29 - Sandbox creation assistant (#96, `SbxCreatorService`, page `CreateSbxAgent.svelte`, package `internal/sbxcreate`): catalogue of kinds (Claude `claude-agent-acp`, Antigravity (kind id `antigravity` since #108, was `gemini`) `agy acp` with kit `docker.io/sbx/antigravity`, Codex `codex-acp`, Vibe `vibe-acp` with kit `docker.io/sbx/vibe-kit`, service `mistral` — #86; Copilot `copilot --acp --stdio` with kit `docker.io/sbx/copilot-kit`, service `copilot` = a GitHub token, `Kind.Token` switches the key step to "token" texts — #103); writes `<agentsFolder>/<name>/sbxenv.yaml` (English comments) + `workspace/`; name = agent = folder = sandbox (`^[a-z][a-z0-9-]{0,31}$`); API key checked with `sbx secret ls --service`, set with `sbx secret set <service>` on stdin (never in args, files or logs). `appState.creator` is `'' | 'mini-me' | 'sbx'`.29 - Sandbox creation assistant (#96, `SbxCreatorService`, page `CreateSbxAgent.svelte`, package `internal/sbxcreate`): catalogue of kinds (Claude `claude-agent-acp`, Antigravity (kind id `antigravity` since #108, was `gemini`) `agy acp` with kit `docker.io/sbx/antigravity`, Codex `codex-acp`, Vibe `vibe-acp` with kit `docker.io/sbx/vibe-kit`, service `mistral` — #86; Copilot `copilot --acp --stdio` with kit `docker.io/sbx/copilot-kit`, service `copilot` = a GitHub token, `Kind.Token` switches the key step to "token" texts — #103); writes `<agentsFolder>/<name>/sbxenv.yaml` (English comments) + `workspace/`; name = agent = folder = sandbox (`^[a-z][a-z0-9-]{0,31}$`); API key checked with `sbx secret ls --service`, set with `sbx secret set <service>` on stdin (never in args, files or logs). `appState.creator` is `'' | 'mini-me' | 'sbx'`.
30 - Agent icons (#100): `icon` may be `logo:<name>` (`config.LogoNames` = claude, gemini, antigravity, openai, mistral, copilot — copilot is GitHub Octicons, MIT, antigravity LobeHub Icons, MIT; drawn by `frontend/src/lib/logos.ts` from Simple Icons, CC0 — OpenAI from 13.21.0; a Go test checks both lists; unknown name = warning, shows a letter). Start progress (#98): `agent:progress` {agent, step checking|preparing|connecting, line, since} from `agents.Manager`, card `chat/StartProgress.svelte` (no log link since 2026-11-15, owner's request; `showLog` in state.svelte.ts is now unused). Assistants' @ name follows the name shown until edited, free variant from Go's `taken` list (#99).30 - Agent icons (#100): `icon` may be `logo:<name>` (`config.LogoNames` = claude, gemini, antigravity, openai, mistral, copilot — copilot is GitHub Octicons, MIT, antigravity LobeHub Icons, MIT; drawn by `frontend/src/lib/logos.ts` from Simple Icons, CC0 — OpenAI from 13.21.0; a Go test checks both lists; unknown name = warning, shows a letter). Start progress (#98): `agent:progress` {agent, step checking|preparing|connecting, line, since} from `agents.Manager`, card `chat/StartProgress.svelte` (no log link since 2026-11-15, owner's request; `showLog` in state.svelte.ts is now unused). Assistants' @ name follows the name shown until edited, free variant from Go's `taken` list (#99).
31-- Agent instructions (#113): an agent's instruction file is chosen from its program (`agents.InstructionsFiles`: Claude → `CLAUDE.md` then `AGENTS.md`; Antigravity → `AGENTS.md` then `GEMINI.md`; else `AGENTS.md`). `config.AlwaysProtected` = `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `skills/**`: the Files tab may neither change nor delete them; **only the agent's Instructions tab writes an instruction file** (create from template / save with version / import), never deletes it — owner's decision amending #54. Same rule for skills (#112): `agents.SkillsDir` (mm `skills` or its agent.yaml `skillsDir`, Claude `.claude/skills`, Vibe `.vibe/skills`, else `.agents/skills`); `.claude/skills/**`, `.agents/skills/**`, `.vibe/skills/**` are in AlwaysProtected too; only the Skills tab writes there, nothing is ever removed.31+- Agent instructions (#113): an agent's instruction file is chosen from its program (`agents.InstructionsFiles`: Claude → `CLAUDE.md` then `AGENTS.md`; Antigravity → `AGENTS.md` then `GEMINI.md`; else `AGENTS.md`). `config.AlwaysProtected` = `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `skills/**`: the Files tab may neither change nor delete them; **only the agent's Instructions tab writes an instruction file** (create from template / save with version / import) and, since #122, deletes it after a confirmation (to the trash on this computer) — owner's decision amending #54. Same rule for skills (#112): `agents.SkillsDir` (mm `skills` or its agent.yaml `skillsDir`, Claude `.claude/skills`, Vibe `.vibe/skills`, else `.agents/skills`); `.claude/skills/**`, `.agents/skills/**`, `.vibe/skills/**` are in AlwaysProtected too; only the Skills tab writes there, and since #119 it can delete a skill (its folder or mini-me `<name>.md`, to the trash on this computer) after a confirmation — nothing else is ever removed. Instructions and skills of a container/sbx agent are read/written in its host folder when it exists (`Core.settingsWorkspaceOf`).
32 - Interface language: ADR 0005 — `ui.language` defaults to `en`; every UI text is a key of `frontend/src/lib/i18n/messages.ts` (`fr` typed `Record<MessageKey,string>`, test checks keys and variables); config errors use the Go catalogue in the same language; agent titles and channel names are user data, never translated. Default config file and `examples/test-agents.yaml` are in English.32 - Interface language: ADR 0005 — `ui.language` defaults to `en`; every UI text is a key of `frontend/src/lib/i18n/messages.ts` (`fr` typed `Record<MessageKey,string>`, test checks keys and variables); config errors use the Go catalogue in the same language; agent titles and channel names are user data, never translated. Default config file and `examples/test-agents.yaml` are in English.
33 - Packages and data model: ADR 0003 + Amendments 1 and 2 (main at the root, only main.go imports Wails, `internal/events` with an `Emitter` interface, LRU eviction of idle agents at the limit).33 - Packages and data model: ADR 0003 + Amendments 1 and 2 (main at the root, only main.go imports Wails, `internal/events` with an `Emitter` interface, LRU eviction of idle agents at the limit).
34 - Frontend dependencies with **pnpm 12.11.2** and `frontend/pnpm-workspace.yaml` `supportedArchitectures` (darwin+linux): the repository folder is shared between the Mac and the Linux sandbox. Never use npm in `frontend/`.34 - Frontend dependencies with **pnpm 12.11.2** and `frontend/pnpm-workspace.yaml` `supportedArchitectures` (darwin+linux): the repository folder is shared between the Mac and the Linux sandbox. Never use npm in `frontend/`.
added .tickets/issues/0119-onglet-skills-bouton-pour-supprimer-une-skill.yaml +80 -0
new file mode 100644
@@ -0,0 +1,80 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 119
3+title: "Onglet Skills : bouton pour supprimer une skill"
4+state: closed
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-16T05:34:18.000Z
9+updatedAt: 2026-11-16T05:42:52.000Z
10+labels:
11+ - kind::feature
12+ - area::workspace
13+ - citizen-ux
14+milestone: "v1.7.0 · Release"
15+epic: Workspace des agents
16+related:
17+ - 112
18+body: |
19+ Dans l'onglet **Skills** ([#112](.tickets/issues/0112-skills-des-agents-creer-modifier-et-importer-des.yaml)), pouvoir
20+ **supprimer** une skill : un bouton sur la skill choisie, avec confirmation.
21+
22+ Change la règle de #112/#113 (« l'onglet n'écrit que, ne supprime jamais ») : demande de l'owner. La protection de
23+ l'onglet Fichiers ne change pas — on ne supprime une skill que depuis l'onglet Skills, de façon délibérée.
24+
25+ ## Critères d'acceptation
26+ - Un bouton **Supprimer la skill** sur la skill choisie ; une confirmation qui nomme la skill.
27+ - Supprime le dossier de la skill (`<dossier>/SKILL.md` et ses autres fichiers) ou le fichier `<nom>.md` (mini-me) ;
28+ sur cet ordinateur, à la corbeille (récupérable) ; jamais autre chose que la skill.
29+ - Rappel de redémarrer l'agent s'il tourne. Tests Go ; doc EN + FR ; notes v1.7.0.
30+tasks:
31+ - id: 1
32+ title: "DeleteSkill (Go) : dossier ou <nom>.md de la skill, à la corbeille sur cet ordinateur ; tests"
33+ state: closed
34+ priority: high
35+ author:
36+ name: k33g
37+ email: ph.charriere@gmail.com
38+ createdAt: 2026-11-16T05:34:18.000Z
39+ updatedAt: 2026-11-16T05:36:17.000Z
40+ closedAt: 2026-11-16T05:36:17.000Z
41+ - id: 2
42+ title: "Bouton Supprimer avec confirmation dans l'onglet Skills (EN + FR)"
43+ state: closed
44+ priority: high
45+ author:
46+ name: k33g
47+ email: ph.charriere@gmail.com
48+ createdAt: 2026-11-16T05:34:18.000Z
49+ updatedAt: 2026-11-16T05:36:17.000Z
50+ closedAt: 2026-11-16T05:36:17.000Z
51+ - id: 3
52+ title: "Doc EN + FR, notes de release v1.7.0"
53+ state: closed
54+ priority: medium
55+ author:
56+ name: k33g
57+ email: ph.charriere@gmail.com
58+ createdAt: 2026-11-16T05:34:18.000Z
59+ updatedAt: 2026-11-16T05:36:17.000Z
60+ closedAt: 2026-11-16T05:36:17.000Z
61+comments:
62+ - id: 1
63+ author:
64+ name: k33g
65+ email: ph.charriere@gmail.com
66+ createdAt: 2026-11-16T05:36:17.000Z
67+ body: |
68+ Fait sur `feature/119-delete-skill`. `WorkspaceService.DeleteSkill(agent, path)` : le dossier de la skill pour un
69+ `<dossier>/SKILL.md`, le fichier pour un `<nom>.md` de mini-me, rien d'autre (`inSkills`) ; dans le dossier de
70+ l'agent sur le Mac → corbeille. Onglet Skills : « Supprimer la skill » avec une confirmation qui nomme la skill,
71+ rappel de redémarrage. Tests Go (dossier avec un autre fichier, `<nom>.md`, refus de `.mm/agent.yaml`, du dossier
72+ des skills, d'un `..`) ; Xvfb (confirmation, liste mise à jour, dossier dans la corbeille). `make verify` vert.
73+ Doc EN + FR, notes v1.7.0 ; décision « rien n'est supprimé » amendée dans `.memory/summary.md`.
74+ - id: 2
75+ author:
76+ name: k33g
77+ email: ph.charriere@gmail.com
78+ createdAt: 2026-11-16T05:42:52.000Z
79+ body: |
80+ Testé sur le Mac par l'owner : ça fonctionne. Mergé dans main. Ticket fermé.
new file mode 100644
@@ -0,0 +1,80 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 119
3+title: "Onglet Skills : bouton pour supprimer une skill"
4+state: closed
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-16T05:34:18.000Z
9+updatedAt: 2026-11-16T05:42:52.000Z
10+labels:
11+ - kind::feature
12+ - area::workspace
13+ - citizen-ux
14+milestone: "v1.7.0 · Release"
15+epic: Workspace des agents
16+related:
17+ - 112
18+body: |
19+ Dans l'onglet **Skills** ([#112](.tickets/issues/0112-skills-des-agents-creer-modifier-et-importer-des.yaml)), pouvoir
20+ **supprimer** une skill : un bouton sur la skill choisie, avec confirmation.
21+
22+ Change la règle de #112/#113 (« l'onglet n'écrit que, ne supprime jamais ») : demande de l'owner. La protection de
23+ l'onglet Fichiers ne change pas — on ne supprime une skill que depuis l'onglet Skills, de façon délibérée.
24+
25+ ## Critères d'acceptation
26+ - Un bouton **Supprimer la skill** sur la skill choisie ; une confirmation qui nomme la skill.
27+ - Supprime le dossier de la skill (`<dossier>/SKILL.md` et ses autres fichiers) ou le fichier `<nom>.md` (mini-me) ;
28+ sur cet ordinateur, à la corbeille (récupérable) ; jamais autre chose que la skill.
29+ - Rappel de redémarrer l'agent s'il tourne. Tests Go ; doc EN + FR ; notes v1.7.0.
30+tasks:
31+ - id: 1
32+ title: "DeleteSkill (Go) : dossier ou <nom>.md de la skill, à la corbeille sur cet ordinateur ; tests"
33+ state: closed
34+ priority: high
35+ author:
36+ name: k33g
37+ email: ph.charriere@gmail.com
38+ createdAt: 2026-11-16T05:34:18.000Z
39+ updatedAt: 2026-11-16T05:36:17.000Z
40+ closedAt: 2026-11-16T05:36:17.000Z
41+ - id: 2
42+ title: "Bouton Supprimer avec confirmation dans l'onglet Skills (EN + FR)"
43+ state: closed
44+ priority: high
45+ author:
46+ name: k33g
47+ email: ph.charriere@gmail.com
48+ createdAt: 2026-11-16T05:34:18.000Z
49+ updatedAt: 2026-11-16T05:36:17.000Z
50+ closedAt: 2026-11-16T05:36:17.000Z
51+ - id: 3
52+ title: "Doc EN + FR, notes de release v1.7.0"
53+ state: closed
54+ priority: medium
55+ author:
56+ name: k33g
57+ email: ph.charriere@gmail.com
58+ createdAt: 2026-11-16T05:34:18.000Z
59+ updatedAt: 2026-11-16T05:36:17.000Z
60+ closedAt: 2026-11-16T05:36:17.000Z
61+comments:
62+ - id: 1
63+ author:
64+ name: k33g
65+ email: ph.charriere@gmail.com
66+ createdAt: 2026-11-16T05:36:17.000Z
67+ body: |
68+ Fait sur `feature/119-delete-skill`. `WorkspaceService.DeleteSkill(agent, path)` : le dossier de la skill pour un
69+ `<dossier>/SKILL.md`, le fichier pour un `<nom>.md` de mini-me, rien d'autre (`inSkills`) ; dans le dossier de
70+ l'agent sur le Mac → corbeille. Onglet Skills : « Supprimer la skill » avec une confirmation qui nomme la skill,
71+ rappel de redémarrage. Tests Go (dossier avec un autre fichier, `<nom>.md`, refus de `.mm/agent.yaml`, du dossier
72+ des skills, d'un `..`) ; Xvfb (confirmation, liste mise à jour, dossier dans la corbeille). `make verify` vert.
73+ Doc EN + FR, notes v1.7.0 ; décision « rien n'est supprimé » amendée dans `.memory/summary.md`.
74+ - id: 2
75+ author:
76+ name: k33g
77+ email: ph.charriere@gmail.com
78+ createdAt: 2026-11-16T05:42:52.000Z
79+ body: |
80+ Testé sur le Mac par l'owner : ça fonctionne. Mergé dans main. Ticket fermé.
added .tickets/issues/0120-onglet-skills-ajouter-une-skill-par-glisser-depo.yaml +58 -0
new file mode 100644
@@ -0,0 +1,58 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 120
3+title: "Onglet Skills : ajouter une skill par glisser-déposer d'un fichier ou d'un dossier"
4+state: open
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-16T05:34:18.000Z
9+updatedAt: 2026-11-16T05:34:18.000Z
10+labels:
11+ - kind::feature
12+ - area::workspace
13+ - citizen-ux
14+milestone: "v1.7.0 · Release"
15+epic: Workspace des agents
16+related:
17+ - 112
18+ - 121
19+body: |
20+ Dans l'onglet **Skills** ([#112](.tickets/issues/0112-skills-des-agents-creer-modifier-et-importer-des.yaml)), pouvoir
21+ **ajouter une skill en glissant** un fichier Markdown (ou le dossier d'une skill) depuis le Finder sur la liste.
22+
23+ ## Ce qui existe
24+ - Le glisser-déposer depuis le système : `main.go` émet `files:dropped` (`FilesDroppedPayload` : cible + chemins
25+ absolus) pour un élément marqué `data-file-drop-target` (utilisé par la zone de saisie et l'onglet Fichiers).
26+ - L'import : `WorkspaceService.ImportSkill(agent, hostPath)` accepte un dossier avec `SKILL.md` ou un fichier `.md`.
27+
28+ ## Critères d'acceptation
29+ - Déposer un `.md` ou le dossier d'une skill sur la liste des skills l'importe (même règles que « Importer… » :
30+ jamais d'écrasement d'une skill du même nom) ; plusieurs éléments déposés → une skill chacun, erreurs listées.
31+ - Un retour visuel pendant le survol ; un élément refusé (pas un `.md`, dossier sans `SKILL.md`) dit pourquoi.
32+ - Tests (vitest pour le choix de la cible) ; doc EN + FR ; notes de release.
33+tasks:
34+ - id: 1
35+ title: "Liste des skills comme cible de dépôt (data-file-drop-target, files:dropped) et retour visuel"
36+ state: open
37+ priority: high
38+ author:
39+ name: k33g
40+ email: ph.charriere@gmail.com
41+ createdAt: 2026-11-16T05:34:18.000Z
42+ - id: 2
43+ title: "Importer chaque élément déposé avec ImportSkill ; erreurs lisibles"
44+ state: open
45+ priority: high
46+ author:
47+ name: k33g
48+ email: ph.charriere@gmail.com
49+ createdAt: 2026-11-16T05:34:18.000Z
50+ - id: 3
51+ title: "Tests, doc EN + FR, notes de release"
52+ state: open
53+ priority: medium
54+ author:
55+ name: k33g
56+ email: ph.charriere@gmail.com
57+ createdAt: 2026-11-16T05:34:18.000Z
58+comments: []
new file mode 100644
@@ -0,0 +1,58 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 120
3+title: "Onglet Skills : ajouter une skill par glisser-déposer d'un fichier ou d'un dossier"
4+state: open
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-16T05:34:18.000Z
9+updatedAt: 2026-11-16T05:34:18.000Z
10+labels:
11+ - kind::feature
12+ - area::workspace
13+ - citizen-ux
14+milestone: "v1.7.0 · Release"
15+epic: Workspace des agents
16+related:
17+ - 112
18+ - 121
19+body: |
20+ Dans l'onglet **Skills** ([#112](.tickets/issues/0112-skills-des-agents-creer-modifier-et-importer-des.yaml)), pouvoir
21+ **ajouter une skill en glissant** un fichier Markdown (ou le dossier d'une skill) depuis le Finder sur la liste.
22+
23+ ## Ce qui existe
24+ - Le glisser-déposer depuis le système : `main.go` émet `files:dropped` (`FilesDroppedPayload` : cible + chemins
25+ absolus) pour un élément marqué `data-file-drop-target` (utilisé par la zone de saisie et l'onglet Fichiers).
26+ - L'import : `WorkspaceService.ImportSkill(agent, hostPath)` accepte un dossier avec `SKILL.md` ou un fichier `.md`.
27+
28+ ## Critères d'acceptation
29+ - Déposer un `.md` ou le dossier d'une skill sur la liste des skills l'importe (même règles que « Importer… » :
30+ jamais d'écrasement d'une skill du même nom) ; plusieurs éléments déposés → une skill chacun, erreurs listées.
31+ - Un retour visuel pendant le survol ; un élément refusé (pas un `.md`, dossier sans `SKILL.md`) dit pourquoi.
32+ - Tests (vitest pour le choix de la cible) ; doc EN + FR ; notes de release.
33+tasks:
34+ - id: 1
35+ title: "Liste des skills comme cible de dépôt (data-file-drop-target, files:dropped) et retour visuel"
36+ state: open
37+ priority: high
38+ author:
39+ name: k33g
40+ email: ph.charriere@gmail.com
41+ createdAt: 2026-11-16T05:34:18.000Z
42+ - id: 2
43+ title: "Importer chaque élément déposé avec ImportSkill ; erreurs lisibles"
44+ state: open
45+ priority: high
46+ author:
47+ name: k33g
48+ email: ph.charriere@gmail.com
49+ createdAt: 2026-11-16T05:34:18.000Z
50+ - id: 3
51+ title: "Tests, doc EN + FR, notes de release"
52+ state: open
53+ priority: medium
54+ author:
55+ name: k33g
56+ email: ph.charriere@gmail.com
57+ createdAt: 2026-11-16T05:34:18.000Z
58+comments: []
added .tickets/issues/0121-onglet-instructions-ajouter-agents-md-par-glisse.yaml +58 -0
new file mode 100644
@@ -0,0 +1,58 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 121
3+title: "Onglet Instructions : ajouter AGENTS.md par glisser-déposer d'un fichier"
4+state: open
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-16T05:34:18.000Z
9+updatedAt: 2026-11-16T05:34:18.000Z
10+labels:
11+ - kind::feature
12+ - area::workspace
13+ - citizen-ux
14+milestone: "v1.7.0 · Release"
15+epic: Workspace des agents
16+related:
17+ - 113
18+ - 120
19+body: |
20+ Dans l'onglet **Instructions** ([#113](.tickets/issues/0113-agents-md-des-agents-creer-modifier-et-importer.yaml)),
21+ pouvoir **déposer un fichier** Markdown depuis le Finder pour en faire les instructions de l'agent (`AGENTS.md`, ou
22+ `CLAUDE.md` pour Claude) — comme « Importer un fichier… ».
23+
24+ ## Ce qui existe
25+ - `files:dropped` / `data-file-drop-target` (voir [#120](.tickets/issues/0120-onglet-skills-ajouter-une-skill-par-glisser-depo.yaml)).
26+ - `WorkspaceService.ImportInstructions(agent, hostPath)` (texte UTF-8, 1 Mio au plus).
27+
28+ ## Critères d'acceptation
29+ - Déposer un fichier texte sur l'onglet Instructions l'importe ; s'il y a déjà des instructions, une confirmation
30+ (le fichier les remplace), comme pour l'import.
31+ - Un seul fichier ; un dossier ou un fichier non texte est refusé avec un message clair ; retour visuel au survol.
32+ - Tests ; doc EN + FR ; notes de release.
33+tasks:
34+ - id: 1
35+ title: "Onglet Instructions comme cible de dépôt, retour visuel, confirmation si des instructions existent"
36+ state: open
37+ priority: high
38+ author:
39+ name: k33g
40+ email: ph.charriere@gmail.com
41+ createdAt: 2026-11-16T05:34:18.000Z
42+ - id: 2
43+ title: "Importer le fichier déposé avec ImportInstructions ; refus lisibles (dossier, binaire, plusieurs fichiers)"
44+ state: open
45+ priority: high
46+ author:
47+ name: k33g
48+ email: ph.charriere@gmail.com
49+ createdAt: 2026-11-16T05:34:18.000Z
50+ - id: 3
51+ title: "Tests, doc EN + FR, notes de release"
52+ state: open
53+ priority: medium
54+ author:
55+ name: k33g
56+ email: ph.charriere@gmail.com
57+ createdAt: 2026-11-16T05:34:18.000Z
58+comments: []
new file mode 100644
@@ -0,0 +1,58 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 121
3+title: "Onglet Instructions : ajouter AGENTS.md par glisser-déposer d'un fichier"
4+state: open
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-16T05:34:18.000Z
9+updatedAt: 2026-11-16T05:34:18.000Z
10+labels:
11+ - kind::feature
12+ - area::workspace
13+ - citizen-ux
14+milestone: "v1.7.0 · Release"
15+epic: Workspace des agents
16+related:
17+ - 113
18+ - 120
19+body: |
20+ Dans l'onglet **Instructions** ([#113](.tickets/issues/0113-agents-md-des-agents-creer-modifier-et-importer.yaml)),
21+ pouvoir **déposer un fichier** Markdown depuis le Finder pour en faire les instructions de l'agent (`AGENTS.md`, ou
22+ `CLAUDE.md` pour Claude) — comme « Importer un fichier… ».
23+
24+ ## Ce qui existe
25+ - `files:dropped` / `data-file-drop-target` (voir [#120](.tickets/issues/0120-onglet-skills-ajouter-une-skill-par-glisser-depo.yaml)).
26+ - `WorkspaceService.ImportInstructions(agent, hostPath)` (texte UTF-8, 1 Mio au plus).
27+
28+ ## Critères d'acceptation
29+ - Déposer un fichier texte sur l'onglet Instructions l'importe ; s'il y a déjà des instructions, une confirmation
30+ (le fichier les remplace), comme pour l'import.
31+ - Un seul fichier ; un dossier ou un fichier non texte est refusé avec un message clair ; retour visuel au survol.
32+ - Tests ; doc EN + FR ; notes de release.
33+tasks:
34+ - id: 1
35+ title: "Onglet Instructions comme cible de dépôt, retour visuel, confirmation si des instructions existent"
36+ state: open
37+ priority: high
38+ author:
39+ name: k33g
40+ email: ph.charriere@gmail.com
41+ createdAt: 2026-11-16T05:34:18.000Z
42+ - id: 2
43+ title: "Importer le fichier déposé avec ImportInstructions ; refus lisibles (dossier, binaire, plusieurs fichiers)"
44+ state: open
45+ priority: high
46+ author:
47+ name: k33g
48+ email: ph.charriere@gmail.com
49+ createdAt: 2026-11-16T05:34:18.000Z
50+ - id: 3
51+ title: "Tests, doc EN + FR, notes de release"
52+ state: open
53+ priority: medium
54+ author:
55+ name: k33g
56+ email: ph.charriere@gmail.com
57+ createdAt: 2026-11-16T05:34:18.000Z
58+comments: []
added .tickets/issues/0122-onglet-instructions-bouton-pour-supprimer-le-fic.yaml +78 -0
new file mode 100644
@@ -0,0 +1,78 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 122
3+title: "Onglet Instructions : bouton pour supprimer le fichier d'instructions"
4+state: closed
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-16T05:37:39.000Z
9+updatedAt: 2026-11-16T05:42:52.000Z
10+labels:
11+ - kind::feature
12+ - area::workspace
13+ - citizen-ux
14+milestone: "v1.7.0 · Release"
15+epic: Workspace des agents
16+related:
17+ - 113
18+ - 119
19+body: |
20+ Dans l'onglet **Instructions** ([#113](.tickets/issues/0113-agents-md-des-agents-creer-modifier-et-importer.yaml)),
21+ pouvoir **supprimer** le fichier d'instructions de l'agent (`AGENTS.md`, `CLAUDE.md`…), avec confirmation — comme
22+ la suppression d'une skill ([#119](.tickets/issues/0119-onglet-skills-bouton-pour-supprimer-une-skill.yaml)).
23+
24+ ## Critères d'acceptation
25+ - Un bouton **Supprimer les instructions** quand le fichier existe ; une confirmation qui nomme le fichier.
26+ - Supprime ce fichier seulement ; sur cet ordinateur, à la corbeille ; l'onglet revient à « pas encore de … »
27+ (créer depuis un modèle, importer).
28+ - Rappel de redémarrer l'agent s'il tourne. Tests Go ; doc EN + FR ; notes v1.7.0.
29+tasks:
30+ - id: 1
31+ title: "DeleteInstructions (Go) : le fichier d'instructions seulement, à la corbeille sur cet ordinateur ; tests"
32+ state: closed
33+ priority: high
34+ author:
35+ name: k33g
36+ email: ph.charriere@gmail.com
37+ createdAt: 2026-11-16T05:37:39.000Z
38+ updatedAt: 2026-11-16T05:39:16.000Z
39+ closedAt: 2026-11-16T05:39:16.000Z
40+ - id: 2
41+ title: "Bouton Supprimer avec confirmation dans l'onglet Instructions (EN + FR)"
42+ state: closed
43+ priority: high
44+ author:
45+ name: k33g
46+ email: ph.charriere@gmail.com
47+ createdAt: 2026-11-16T05:37:39.000Z
48+ updatedAt: 2026-11-16T05:39:16.000Z
49+ closedAt: 2026-11-16T05:39:16.000Z
50+ - id: 3
51+ title: "Doc EN + FR, notes de release v1.7.0"
52+ state: closed
53+ priority: medium
54+ author:
55+ name: k33g
56+ email: ph.charriere@gmail.com
57+ createdAt: 2026-11-16T05:37:39.000Z
58+ updatedAt: 2026-11-16T05:39:16.000Z
59+ closedAt: 2026-11-16T05:39:16.000Z
60+comments:
61+ - id: 1
62+ author:
63+ name: k33g
64+ email: ph.charriere@gmail.com
65+ createdAt: 2026-11-16T05:39:16.000Z
66+ body: |
67+ Fait sur `feature/119-delete-skill` (avec #119). `WorkspaceService.DeleteInstructions(agent)` : le fichier
68+ d'instructions existant seulement (erreur s'il n'y en a pas), dans le dossier de l'agent sur le Mac → corbeille.
69+ Onglet Instructions : « Supprimer les instructions » avec une confirmation qui nomme le fichier ; l'onglet revient à
70+ « pas encore de … » (modèle, import). Tests Go ; Xvfb (confirmation, fichier dans la corbeille, onglet vide).
71+ `make verify` vert. Doc EN + FR, notes v1.7.0, décision amendée dans `.memory/summary.md`.
72+ - id: 2
73+ author:
74+ name: k33g
75+ email: ph.charriere@gmail.com
76+ createdAt: 2026-11-16T05:42:52.000Z
77+ body: |
78+ Testé sur le Mac par l'owner : ça fonctionne. Mergé dans main. Ticket fermé.
new file mode 100644
@@ -0,0 +1,78 @@
1+# Managed by IssueSpec. Hand edits are welcome; keep the schema valid.
2+id: 122
3+title: "Onglet Instructions : bouton pour supprimer le fichier d'instructions"
4+state: closed
5+author:
6+ name: k33g
7+ email: ph.charriere@gmail.com
8+createdAt: 2026-11-16T05:37:39.000Z
9+updatedAt: 2026-11-16T05:42:52.000Z
10+labels:
11+ - kind::feature
12+ - area::workspace
13+ - citizen-ux
14+milestone: "v1.7.0 · Release"
15+epic: Workspace des agents
16+related:
17+ - 113
18+ - 119
19+body: |
20+ Dans l'onglet **Instructions** ([#113](.tickets/issues/0113-agents-md-des-agents-creer-modifier-et-importer.yaml)),
21+ pouvoir **supprimer** le fichier d'instructions de l'agent (`AGENTS.md`, `CLAUDE.md`…), avec confirmation — comme
22+ la suppression d'une skill ([#119](.tickets/issues/0119-onglet-skills-bouton-pour-supprimer-une-skill.yaml)).
23+
24+ ## Critères d'acceptation
25+ - Un bouton **Supprimer les instructions** quand le fichier existe ; une confirmation qui nomme le fichier.
26+ - Supprime ce fichier seulement ; sur cet ordinateur, à la corbeille ; l'onglet revient à « pas encore de … »
27+ (créer depuis un modèle, importer).
28+ - Rappel de redémarrer l'agent s'il tourne. Tests Go ; doc EN + FR ; notes v1.7.0.
29+tasks:
30+ - id: 1
31+ title: "DeleteInstructions (Go) : le fichier d'instructions seulement, à la corbeille sur cet ordinateur ; tests"
32+ state: closed
33+ priority: high
34+ author:
35+ name: k33g
36+ email: ph.charriere@gmail.com
37+ createdAt: 2026-11-16T05:37:39.000Z
38+ updatedAt: 2026-11-16T05:39:16.000Z
39+ closedAt: 2026-11-16T05:39:16.000Z
40+ - id: 2
41+ title: "Bouton Supprimer avec confirmation dans l'onglet Instructions (EN + FR)"
42+ state: closed
43+ priority: high
44+ author:
45+ name: k33g
46+ email: ph.charriere@gmail.com
47+ createdAt: 2026-11-16T05:37:39.000Z
48+ updatedAt: 2026-11-16T05:39:16.000Z
49+ closedAt: 2026-11-16T05:39:16.000Z
50+ - id: 3
51+ title: "Doc EN + FR, notes de release v1.7.0"
52+ state: closed
53+ priority: medium
54+ author:
55+ name: k33g
56+ email: ph.charriere@gmail.com
57+ createdAt: 2026-11-16T05:37:39.000Z
58+ updatedAt: 2026-11-16T05:39:16.000Z
59+ closedAt: 2026-11-16T05:39:16.000Z
60+comments:
61+ - id: 1
62+ author:
63+ name: k33g
64+ email: ph.charriere@gmail.com
65+ createdAt: 2026-11-16T05:39:16.000Z
66+ body: |
67+ Fait sur `feature/119-delete-skill` (avec #119). `WorkspaceService.DeleteInstructions(agent)` : le fichier
68+ d'instructions existant seulement (erreur s'il n'y en a pas), dans le dossier de l'agent sur le Mac → corbeille.
69+ Onglet Instructions : « Supprimer les instructions » avec une confirmation qui nomme le fichier ; l'onglet revient à
70+ « pas encore de … » (modèle, import). Tests Go ; Xvfb (confirmation, fichier dans la corbeille, onglet vide).
71+ `make verify` vert. Doc EN + FR, notes v1.7.0, décision amendée dans `.memory/summary.md`.
72+ - id: 2
73+ author:
74+ name: k33g
75+ email: ph.charriere@gmail.com
76+ createdAt: 2026-11-16T05:42:52.000Z
77+ body: |
78+ Testé sur le Mac par l'owner : ça fonctionne. Mergé dans main. Ticket fermé.
modified docs/en/how-to/work-with-an-agents-files.md +4 -2
@@ -57,9 +57,10 @@ An agent reads its **instructions** when its session starts: its role, its tone,
5757 - **Create from a template**: when the agent has none yet, Sidekicks writes a short template named after the agent (its role, how it answers, its rules). Fill it in with plain words.
5858 - Change the text in the editor of the tab, then **Save** (⌘S, Ctrl+S on Linux and Windows); **Revert** drops your changes. If the file changed meanwhile — the agent may write it too — Sidekicks says so and writes nothing: **Reload**, then make your changes again.
5959 - **Import a file…** copies a text file of this computer as the agent's instructions (it replaces them, after you confirm).
60+- **Delete the instructions** removes the instruction file, after you confirm (issue #122): it goes to the trash of this computer, and the tab offers the template and the import again.
6061 - The agent reads its instructions when its session starts: when it is running, **Restart the agent** so that it uses the new ones.
6162
62-The instruction file stays protected in the **Files** tab (below): only the **Instructions** tab writes it, and nothing deletes it. It works the same for an agent on this computer, in a Docker container or in an sbx sandbox.
63+The instruction file stays protected in the **Files** tab (below): only the **Instructions** tab writes it, and deletes it. It works the same for an agent on this computer, in a Docker container or in an sbx sandbox.
6364
6465 ## Give the agent skills
6566
@@ -68,9 +69,10 @@ A **skill** teaches the agent how to do one kind of task: a folder holding a `SK
6869 - **New skill**: say what it does (its folder's name follows, in lowercase letters, digits and `-`) and when to use it, then **Create the skill**. Sidekicks writes a `SKILL.md` to fill in: when to use it, how to do it, an example.
6970 - Pick a skill to read or change its `SKILL.md`, then **Save** (⌘S); a change made meanwhile is reported, as for the instructions.
7071 - **Import a skill folder…** copies a folder holding a `SKILL.md`, with its other files (scripts, examples) and without hidden ones; **Import a Markdown file…** turns one file into the `SKILL.md` of a new skill, named after the name of its front matter, else after the file. A skill that has the same name is never replaced.
72+- **Delete the skill** removes the skill you picked, after you confirm (issue #119): its whole folder — or its single file for a mini-me `<name>.md` — goes to the trash of this computer.
7173 - The agent finds its skills when its session starts: when it is running, **Restart the agent**.
7274
73-The skills folders stay protected in the **Files** tab: only the **Skills** tab writes there, and nothing deletes a skill from Sidekicks. For an agent in a container or a sandbox, Sidekicks writes its instructions and its skills in its folder on this computer: it works even when the agent sees that folder read-only (mini-me's `.mm`), and without the sandbox running. mini-me's one-file skills (`<name>.md`) are listed too.
75+The skills folders stay protected in the **Files** tab: only the **Skills** tab writes there, and deletes a skill. For an agent in a container or a sandbox, Sidekicks writes its instructions and its skills in its folder on this computer: it works even when the agent sees that folder read-only (mini-me's `.mm`), and without the sandbox running. mini-me's one-file skills (`<name>.md`) are listed too.
7476
7577 ## Protect files
7678
@@ -57,9 +57,10 @@ An agent reads its **instructions** when its session starts: its role, its tone,
57 - **Create from a template**: when the agent has none yet, Sidekicks writes a short template named after the agent (its role, how it answers, its rules). Fill it in with plain words.57 - **Create from a template**: when the agent has none yet, Sidekicks writes a short template named after the agent (its role, how it answers, its rules). Fill it in with plain words.
58 - Change the text in the editor of the tab, then **Save** (⌘S, Ctrl+S on Linux and Windows); **Revert** drops your changes. If the file changed meanwhile — the agent may write it too — Sidekicks says so and writes nothing: **Reload**, then make your changes again.58 - Change the text in the editor of the tab, then **Save** (⌘S, Ctrl+S on Linux and Windows); **Revert** drops your changes. If the file changed meanwhile — the agent may write it too — Sidekicks says so and writes nothing: **Reload**, then make your changes again.
59 - **Import a file…** copies a text file of this computer as the agent's instructions (it replaces them, after you confirm).59 - **Import a file…** copies a text file of this computer as the agent's instructions (it replaces them, after you confirm).
60+- **Delete the instructions** removes the instruction file, after you confirm (issue #122): it goes to the trash of this computer, and the tab offers the template and the import again.
60 - The agent reads its instructions when its session starts: when it is running, **Restart the agent** so that it uses the new ones.61 - The agent reads its instructions when its session starts: when it is running, **Restart the agent** so that it uses the new ones.
61 62
62-The instruction file stays protected in the **Files** tab (below): only the **Instructions** tab writes it, and nothing deletes it. It works the same for an agent on this computer, in a Docker container or in an sbx sandbox.63+The instruction file stays protected in the **Files** tab (below): only the **Instructions** tab writes it, and deletes it. It works the same for an agent on this computer, in a Docker container or in an sbx sandbox.
63 64
64 ## Give the agent skills65 ## Give the agent skills
65 66
@@ -68,9 +69,10 @@ A **skill** teaches the agent how to do one kind of task: a folder holding a `SK
68 - **New skill**: say what it does (its folder's name follows, in lowercase letters, digits and `-`) and when to use it, then **Create the skill**. Sidekicks writes a `SKILL.md` to fill in: when to use it, how to do it, an example.69 - **New skill**: say what it does (its folder's name follows, in lowercase letters, digits and `-`) and when to use it, then **Create the skill**. Sidekicks writes a `SKILL.md` to fill in: when to use it, how to do it, an example.
69 - Pick a skill to read or change its `SKILL.md`, then **Save** (⌘S); a change made meanwhile is reported, as for the instructions.70 - Pick a skill to read or change its `SKILL.md`, then **Save** (⌘S); a change made meanwhile is reported, as for the instructions.
70 - **Import a skill folder…** copies a folder holding a `SKILL.md`, with its other files (scripts, examples) and without hidden ones; **Import a Markdown file…** turns one file into the `SKILL.md` of a new skill, named after the name of its front matter, else after the file. A skill that has the same name is never replaced.71 - **Import a skill folder…** copies a folder holding a `SKILL.md`, with its other files (scripts, examples) and without hidden ones; **Import a Markdown file…** turns one file into the `SKILL.md` of a new skill, named after the name of its front matter, else after the file. A skill that has the same name is never replaced.
72+- **Delete the skill** removes the skill you picked, after you confirm (issue #119): its whole folder — or its single file for a mini-me `<name>.md` — goes to the trash of this computer.
71 - The agent finds its skills when its session starts: when it is running, **Restart the agent**.73 - The agent finds its skills when its session starts: when it is running, **Restart the agent**.
72 74
73-The skills folders stay protected in the **Files** tab: only the **Skills** tab writes there, and nothing deletes a skill from Sidekicks. For an agent in a container or a sandbox, Sidekicks writes its instructions and its skills in its folder on this computer: it works even when the agent sees that folder read-only (mini-me's `.mm`), and without the sandbox running. mini-me's one-file skills (`<name>.md`) are listed too.75+The skills folders stay protected in the **Files** tab: only the **Skills** tab writes there, and deletes a skill. For an agent in a container or a sandbox, Sidekicks writes its instructions and its skills in its folder on this computer: it works even when the agent sees that folder read-only (mini-me's `.mm`), and without the sandbox running. mini-me's one-file skills (`<name>.md`) are listed too.
74 76
75 ## Protect files77 ## Protect files
76 78
modified docs/en/reference/agents-and-events.md +2 -2
@@ -191,8 +191,8 @@ A file opened for editing has `path, content, version`; `version` identifies the
191191 | `List(agent, dir)` | The entries of `dir` (`""` is the folder), folders first, then by name. |
192192 | `Read(agent, path)` | A text file of at most 1 MB; a binary or larger file is an error. |
193193 | `Instructions(agent)` | The agent's instructions (issue #113): `{file, exists, content, version, files}` — the first of `files` (from its program: `CLAUDE.md` then `AGENTS.md` for Claude, `AGENTS.md` then `GEMINI.md` for Antigravity, else `AGENTS.md`) that exists at the root of its folder, else the first one, to create. |
194-| `CreateInstructions(agent, content)`, `SaveInstructions(agent, content, version)`, `ImportInstructions(agent, hostPath)`, `ChooseInstructions()` | Write the instruction file — the only way to, as it is protected (`protect`): from a template (refused when it exists), edited over `version` (`{instructions, conflict}`; `conflict` and nothing written when it changed), or copied from a UTF-8 text file of this computer (1 MiB at most; replaces it). Never removed. |
195-| `Skills(agent)`, `CreateSkill(agent, name, content)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `ChooseSkillFolder()` | The agent's skills (issue #112): `{dir, skills: [{folder, name, description, path}]}` — the folders of its skills folder (from its program: `.claude/skills` for Claude, `.vibe/skills` for Vibe, `skills` or the `skillsDir` of its `agent.yaml` for mini-me, else `.agents/skills`) that hold a `SKILL.md`, with the `name` and `description` of its front matter. Create (`name`: lowercase letters, digits and `-`; refused when taken), save a `SKILL.md` over `version` (`{file, conflict}`), import a folder holding a `SKILL.md` (its files, hidden ones aside; 200 files and 20 MiB at most) or one Markdown file (becomes `<name>/SKILL.md`). Never removes anything. |
194+| `CreateInstructions(agent, content)`, `SaveInstructions(agent, content, version)`, `ImportInstructions(agent, hostPath)`, `DeleteInstructions(agent)`, `ChooseInstructions()` | Write the instruction file — the only way to, as it is protected (`protect`): from a template (refused when it exists), edited over `version` (`{instructions, conflict}`; `conflict` and nothing written when it changed), or copied from a UTF-8 text file of this computer (1 MiB at most; replaces it). `DeleteInstructions` removes that file only, to the trash on this computer (issue #122). For an agent in a container or a sandbox, its folder on this computer is used when it exists. |
195+| `Skills(agent)`, `CreateSkill(agent, name, content)`, `ReadSkill(agent, path)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `DeleteSkill(agent, path)`, `ChooseSkillFolder()` | The agent's skills (issue #112): `{dir, skills: [{folder, name, description, path}]}` — the folders of its skills folder (from its program: `.claude/skills` for Claude, `.vibe/skills` for Vibe, `skills` or the `skillsDir` of its `agent.yaml` for mini-me, else `.agents/skills`) that hold a `SKILL.md`, with the `name` and `description` of its front matter. Create (`name`: lowercase letters, digits and `-`; refused when taken), save a `SKILL.md` over `version` (`{file, conflict}`), import a folder holding a `SKILL.md` (its files, hidden ones aside; 200 files and 20 MiB at most) or one Markdown file (becomes `<name>/SKILL.md`); mini-me's `<name>.md` skills are listed too. `DeleteSkill` removes a skill's folder (or its `<name>.md`), to the trash on this computer, nothing else (issue #119). For an agent in a container or a sandbox, its folder on this computer is read and written when it exists. |
196196 | `Save(agent, path, content, version)` | Writes the file if it still has `version`; otherwise `{conflict: true}` and nothing is written. An empty `version` overwrites. The file is written next to its place and moved over it. |
197197 | `Create(agent, dir, name)` | Creates an empty file; refused if the name exists or contains `/`. |
198198 | `Remove(agent, path)` | Deletes a file or a folder with its content (see the table above). |
@@ -191,8 +191,8 @@ A file opened for editing has `path, content, version`; `version` identifies the
191 | `List(agent, dir)` | The entries of `dir` (`""` is the folder), folders first, then by name. |191 | `List(agent, dir)` | The entries of `dir` (`""` is the folder), folders first, then by name. |
192 | `Read(agent, path)` | A text file of at most 1 MB; a binary or larger file is an error. |192 | `Read(agent, path)` | A text file of at most 1 MB; a binary or larger file is an error. |
193 | `Instructions(agent)` | The agent's instructions (issue #113): `{file, exists, content, version, files}` — the first of `files` (from its program: `CLAUDE.md` then `AGENTS.md` for Claude, `AGENTS.md` then `GEMINI.md` for Antigravity, else `AGENTS.md`) that exists at the root of its folder, else the first one, to create. |193 | `Instructions(agent)` | The agent's instructions (issue #113): `{file, exists, content, version, files}` — the first of `files` (from its program: `CLAUDE.md` then `AGENTS.md` for Claude, `AGENTS.md` then `GEMINI.md` for Antigravity, else `AGENTS.md`) that exists at the root of its folder, else the first one, to create. |
194-| `CreateInstructions(agent, content)`, `SaveInstructions(agent, content, version)`, `ImportInstructions(agent, hostPath)`, `ChooseInstructions()` | Write the instruction file — the only way to, as it is protected (`protect`): from a template (refused when it exists), edited over `version` (`{instructions, conflict}`; `conflict` and nothing written when it changed), or copied from a UTF-8 text file of this computer (1 MiB at most; replaces it). Never removed. |194+| `CreateInstructions(agent, content)`, `SaveInstructions(agent, content, version)`, `ImportInstructions(agent, hostPath)`, `DeleteInstructions(agent)`, `ChooseInstructions()` | Write the instruction file — the only way to, as it is protected (`protect`): from a template (refused when it exists), edited over `version` (`{instructions, conflict}`; `conflict` and nothing written when it changed), or copied from a UTF-8 text file of this computer (1 MiB at most; replaces it). `DeleteInstructions` removes that file only, to the trash on this computer (issue #122). For an agent in a container or a sandbox, its folder on this computer is used when it exists. |
195-| `Skills(agent)`, `CreateSkill(agent, name, content)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `ChooseSkillFolder()` | The agent's skills (issue #112): `{dir, skills: [{folder, name, description, path}]}` — the folders of its skills folder (from its program: `.claude/skills` for Claude, `.vibe/skills` for Vibe, `skills` or the `skillsDir` of its `agent.yaml` for mini-me, else `.agents/skills`) that hold a `SKILL.md`, with the `name` and `description` of its front matter. Create (`name`: lowercase letters, digits and `-`; refused when taken), save a `SKILL.md` over `version` (`{file, conflict}`), import a folder holding a `SKILL.md` (its files, hidden ones aside; 200 files and 20 MiB at most) or one Markdown file (becomes `<name>/SKILL.md`). Never removes anything. |195+| `Skills(agent)`, `CreateSkill(agent, name, content)`, `ReadSkill(agent, path)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `DeleteSkill(agent, path)`, `ChooseSkillFolder()` | The agent's skills (issue #112): `{dir, skills: [{folder, name, description, path}]}` — the folders of its skills folder (from its program: `.claude/skills` for Claude, `.vibe/skills` for Vibe, `skills` or the `skillsDir` of its `agent.yaml` for mini-me, else `.agents/skills`) that hold a `SKILL.md`, with the `name` and `description` of its front matter. Create (`name`: lowercase letters, digits and `-`; refused when taken), save a `SKILL.md` over `version` (`{file, conflict}`), import a folder holding a `SKILL.md` (its files, hidden ones aside; 200 files and 20 MiB at most) or one Markdown file (becomes `<name>/SKILL.md`); mini-me's `<name>.md` skills are listed too. `DeleteSkill` removes a skill's folder (or its `<name>.md`), to the trash on this computer, nothing else (issue #119). For an agent in a container or a sandbox, its folder on this computer is read and written when it exists. |
196 | `Save(agent, path, content, version)` | Writes the file if it still has `version`; otherwise `{conflict: true}` and nothing is written. An empty `version` overwrites. The file is written next to its place and moved over it. |196 | `Save(agent, path, content, version)` | Writes the file if it still has `version`; otherwise `{conflict: true}` and nothing is written. An empty `version` overwrites. The file is written next to its place and moved over it. |
197 | `Create(agent, dir, name)` | Creates an empty file; refused if the name exists or contains `/`. |197 | `Create(agent, dir, name)` | Creates an empty file; refused if the name exists or contains `/`. |
198 | `Remove(agent, path)` | Deletes a file or a folder with its content (see the table above). |198 | `Remove(agent, path)` | Deletes a file or a folder with its content (see the table above). |
modified docs/fr/how-to/fichiers-et-terminal-d-un-agent.md +4 -2
@@ -57,9 +57,10 @@ Un agent lit ses **instructions** au début de sa session : son rôle, son ton,
5757 - **Créer depuis un modèle** : quand l'agent n'en a pas encore, Sidekicks écrit un court modèle à son nom (son rôle, comment il répond, ses règles). Complétez-le avec des mots simples.
5858 - Modifiez le texte dans l'éditeur de l'onglet, puis **Enregistrer** (⌘S, Ctrl+S sous Linux et Windows) ; **Annuler les changements** abandonne vos modifications. Si le fichier a changé entre-temps — l'agent peut l'écrire aussi —, Sidekicks le dit et n'écrit rien : **Recharger**, puis refaites vos changements.
5959 - **Importer un fichier…** copie un fichier texte de cet ordinateur comme instructions de l'agent (il les remplace, après confirmation).
60+- **Supprimer les instructions** retire le fichier d'instructions, après confirmation (issue #122) : il part à la corbeille de cet ordinateur, et l'onglet propose de nouveau le modèle et l'import.
6061 - L'agent lit ses instructions au début de sa session : s'il tourne, **Redémarrer l'agent** pour qu'il utilise les nouvelles.
6162
62-Le fichier d'instructions reste protégé dans l'onglet **Fichiers** (ci-dessous) : seul l'onglet **Instructions** l'écrit, et rien ne le supprime. C'est pareil pour un agent sur cet ordinateur, dans un conteneur Docker ou dans une sandbox sbx.
63+Le fichier d'instructions reste protégé dans l'onglet **Fichiers** (ci-dessous) : seul l'onglet **Instructions** l'écrit, et le supprime. C'est pareil pour un agent sur cet ordinateur, dans un conteneur Docker ou dans une sandbox sbx.
6364
6465 ## Donner des skills à l'agent
6566
@@ -68,9 +69,10 @@ Une **skill** apprend à l'agent à faire un type de tâche : un dossier qui con
6869 - **Nouvelle skill** : dites ce qu'elle fait (le nom de son dossier suit, en minuscules, chiffres et `-`) et quand l'utiliser, puis **Créer la skill**. Sidekicks écrit un `SKILL.md` à compléter : quand l'utiliser, comment faire, un exemple.
6970 - Choisissez une skill pour lire ou modifier son `SKILL.md`, puis **Enregistrer** (⌘S) ; un changement fait entre-temps est signalé, comme pour les instructions.
7071 - **Importer le dossier d'une skill…** copie un dossier qui contient un `SKILL.md`, avec ses autres fichiers (scripts, exemples) et sans les fichiers cachés ; **Importer un fichier Markdown…** fait d'un fichier le `SKILL.md` d'une nouvelle skill, nommée d'après le nom de son en-tête, sinon d'après le fichier. Une skill qui porte déjà ce nom n'est jamais remplacée.
72+- **Supprimer la skill** retire la skill choisie, après confirmation (issue #119) : tout son dossier — ou son seul fichier pour un `<nom>.md` de mini-me — part à la corbeille de cet ordinateur.
7173 - L'agent découvre ses skills au début de sa session : s'il tourne, **Redémarrer l'agent**.
7274
73-Les dossiers de skills restent protégés dans l'onglet **Fichiers** : seul l'onglet **Skills** y écrit, et rien ne supprime une skill depuis Sidekicks. Pour un agent dans un conteneur ou une sandbox, Sidekicks écrit ses instructions et ses skills dans son dossier sur cet ordinateur : ça marche même quand l'agent voit ce dossier en lecture seule (le `.mm` de mini-me), et sans que la sandbox tourne. Les skills d'un seul fichier de mini-me (`<nom>.md`) sont listées aussi.
75+Les dossiers de skills restent protégés dans l'onglet **Fichiers** : seul l'onglet **Skills** y écrit, et supprime une skill. Pour un agent dans un conteneur ou une sandbox, Sidekicks écrit ses instructions et ses skills dans son dossier sur cet ordinateur : ça marche même quand l'agent voit ce dossier en lecture seule (le `.mm` de mini-me), et sans que la sandbox tourne. Les skills d'un seul fichier de mini-me (`<nom>.md`) sont listées aussi.
7476
7577 ## Protéger des fichiers
7678
@@ -57,9 +57,10 @@ Un agent lit ses **instructions** au début de sa session : son rôle, son ton,
57 - **Créer depuis un modèle** : quand l'agent n'en a pas encore, Sidekicks écrit un court modèle à son nom (son rôle, comment il répond, ses règles). Complétez-le avec des mots simples.57 - **Créer depuis un modèle** : quand l'agent n'en a pas encore, Sidekicks écrit un court modèle à son nom (son rôle, comment il répond, ses règles). Complétez-le avec des mots simples.
58 - Modifiez le texte dans l'éditeur de l'onglet, puis **Enregistrer** (⌘S, Ctrl+S sous Linux et Windows) ; **Annuler les changements** abandonne vos modifications. Si le fichier a changé entre-temps — l'agent peut l'écrire aussi —, Sidekicks le dit et n'écrit rien : **Recharger**, puis refaites vos changements.58 - Modifiez le texte dans l'éditeur de l'onglet, puis **Enregistrer** (⌘S, Ctrl+S sous Linux et Windows) ; **Annuler les changements** abandonne vos modifications. Si le fichier a changé entre-temps — l'agent peut l'écrire aussi —, Sidekicks le dit et n'écrit rien : **Recharger**, puis refaites vos changements.
59 - **Importer un fichier…** copie un fichier texte de cet ordinateur comme instructions de l'agent (il les remplace, après confirmation).59 - **Importer un fichier…** copie un fichier texte de cet ordinateur comme instructions de l'agent (il les remplace, après confirmation).
60+- **Supprimer les instructions** retire le fichier d'instructions, après confirmation (issue #122) : il part à la corbeille de cet ordinateur, et l'onglet propose de nouveau le modèle et l'import.
60 - L'agent lit ses instructions au début de sa session : s'il tourne, **Redémarrer l'agent** pour qu'il utilise les nouvelles.61 - L'agent lit ses instructions au début de sa session : s'il tourne, **Redémarrer l'agent** pour qu'il utilise les nouvelles.
61 62
62-Le fichier d'instructions reste protégé dans l'onglet **Fichiers** (ci-dessous) : seul l'onglet **Instructions** l'écrit, et rien ne le supprime. C'est pareil pour un agent sur cet ordinateur, dans un conteneur Docker ou dans une sandbox sbx.63+Le fichier d'instructions reste protégé dans l'onglet **Fichiers** (ci-dessous) : seul l'onglet **Instructions** l'écrit, et le supprime. C'est pareil pour un agent sur cet ordinateur, dans un conteneur Docker ou dans une sandbox sbx.
63 64
64 ## Donner des skills à l'agent65 ## Donner des skills à l'agent
65 66
@@ -68,9 +69,10 @@ Une **skill** apprend à l'agent à faire un type de tâche : un dossier qui con
68 - **Nouvelle skill** : dites ce qu'elle fait (le nom de son dossier suit, en minuscules, chiffres et `-`) et quand l'utiliser, puis **Créer la skill**. Sidekicks écrit un `SKILL.md` à compléter : quand l'utiliser, comment faire, un exemple.69 - **Nouvelle skill** : dites ce qu'elle fait (le nom de son dossier suit, en minuscules, chiffres et `-`) et quand l'utiliser, puis **Créer la skill**. Sidekicks écrit un `SKILL.md` à compléter : quand l'utiliser, comment faire, un exemple.
69 - Choisissez une skill pour lire ou modifier son `SKILL.md`, puis **Enregistrer** (⌘S) ; un changement fait entre-temps est signalé, comme pour les instructions.70 - Choisissez une skill pour lire ou modifier son `SKILL.md`, puis **Enregistrer** (⌘S) ; un changement fait entre-temps est signalé, comme pour les instructions.
70 - **Importer le dossier d'une skill…** copie un dossier qui contient un `SKILL.md`, avec ses autres fichiers (scripts, exemples) et sans les fichiers cachés ; **Importer un fichier Markdown…** fait d'un fichier le `SKILL.md` d'une nouvelle skill, nommée d'après le nom de son en-tête, sinon d'après le fichier. Une skill qui porte déjà ce nom n'est jamais remplacée.71 - **Importer le dossier d'une skill…** copie un dossier qui contient un `SKILL.md`, avec ses autres fichiers (scripts, exemples) et sans les fichiers cachés ; **Importer un fichier Markdown…** fait d'un fichier le `SKILL.md` d'une nouvelle skill, nommée d'après le nom de son en-tête, sinon d'après le fichier. Une skill qui porte déjà ce nom n'est jamais remplacée.
72+- **Supprimer la skill** retire la skill choisie, après confirmation (issue #119) : tout son dossier — ou son seul fichier pour un `<nom>.md` de mini-me — part à la corbeille de cet ordinateur.
71 - L'agent découvre ses skills au début de sa session : s'il tourne, **Redémarrer l'agent**.73 - L'agent découvre ses skills au début de sa session : s'il tourne, **Redémarrer l'agent**.
72 74
73-Les dossiers de skills restent protégés dans l'onglet **Fichiers** : seul l'onglet **Skills** y écrit, et rien ne supprime une skill depuis Sidekicks. Pour un agent dans un conteneur ou une sandbox, Sidekicks écrit ses instructions et ses skills dans son dossier sur cet ordinateur : ça marche même quand l'agent voit ce dossier en lecture seule (le `.mm` de mini-me), et sans que la sandbox tourne. Les skills d'un seul fichier de mini-me (`<nom>.md`) sont listées aussi.75+Les dossiers de skills restent protégés dans l'onglet **Fichiers** : seul l'onglet **Skills** y écrit, et supprime une skill. Pour un agent dans un conteneur ou une sandbox, Sidekicks écrit ses instructions et ses skills dans son dossier sur cet ordinateur : ça marche même quand l'agent voit ce dossier en lecture seule (le `.mm` de mini-me), et sans que la sandbox tourne. Les skills d'un seul fichier de mini-me (`<nom>.md`) sont listées aussi.
74 76
75 ## Protéger des fichiers77 ## Protéger des fichiers
76 78
modified docs/fr/reference/agents-et-evenements.md +2 -2
@@ -191,8 +191,8 @@ Un fichier ouvert pour modification a `path, content, version` ; `version` ident
191191 | `List(agent, dir)` | Les entrées de `dir` (`""` est le dossier), dossiers d'abord, puis par nom. |
192192 | `Read(agent, path)` | Un fichier texte de 1 Mo au plus ; un fichier binaire ou plus gros est une erreur. |
193193 | `Instructions(agent)` | Les instructions de l'agent (issue #113) : `{file, exists, content, version, files}` — le premier de `files` (d'après son programme : `CLAUDE.md` puis `AGENTS.md` pour Claude, `AGENTS.md` puis `GEMINI.md` pour Antigravity, sinon `AGENTS.md`) qui existe à la racine de son dossier, sinon le premier, à créer. |
194-| `CreateInstructions(agent, content)`, `SaveInstructions(agent, content, version)`, `ImportInstructions(agent, hostPath)`, `ChooseInstructions()` | Écrivent le fichier d'instructions — seul moyen de le faire, puisqu'il est protégé (`protect`) : depuis un modèle (refusé s'il existe), modifié par-dessus `version` (`{instructions, conflict}` ; `conflict` et rien d'écrit s'il a changé), ou copié depuis un fichier texte UTF-8 de cet ordinateur (1 Mio au plus ; il le remplace). Jamais supprimé. |
195-| `Skills(agent)`, `CreateSkill(agent, name, content)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `ChooseSkillFolder()` | Les skills de l'agent (issue #112) : `{dir, skills: [{folder, name, description, path}]}` — les dossiers de son dossier de skills (d'après son programme : `.claude/skills` pour Claude, `.vibe/skills` pour Vibe, `skills` ou le `skillsDir` de son `agent.yaml` pour mini-me, sinon `.agents/skills`) qui contiennent un `SKILL.md`, avec le `name` et la `description` de son en-tête. Créer (`name` : minuscules, chiffres et `-` ; refusé s'il est pris), enregistrer un `SKILL.md` par-dessus `version` (`{file, conflict}`), importer un dossier qui contient un `SKILL.md` (ses fichiers, sauf les cachés ; 200 fichiers et 20 Mio au plus) ou un fichier Markdown (devient `<nom>/SKILL.md`). Ne supprime jamais rien. |
194+| `CreateInstructions(agent, content)`, `SaveInstructions(agent, content, version)`, `ImportInstructions(agent, hostPath)`, `DeleteInstructions(agent)`, `ChooseInstructions()` | Écrivent le fichier d'instructions — seul moyen de le faire, puisqu'il est protégé (`protect`) : depuis un modèle (refusé s'il existe), modifié par-dessus `version` (`{instructions, conflict}` ; `conflict` et rien d'écrit s'il a changé), ou copié depuis un fichier texte UTF-8 de cet ordinateur (1 Mio au plus ; il le remplace). `DeleteInstructions` retire ce fichier seulement, à la corbeille sur cet ordinateur (issue #122). Pour un agent dans un conteneur ou une sandbox, son dossier sur cet ordinateur est utilisé s'il existe. |
195+| `Skills(agent)`, `CreateSkill(agent, name, content)`, `ReadSkill(agent, path)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `DeleteSkill(agent, path)`, `ChooseSkillFolder()` | Les skills de l'agent (issue #112) : `{dir, skills: [{folder, name, description, path}]}` — les dossiers de son dossier de skills (d'après son programme : `.claude/skills` pour Claude, `.vibe/skills` pour Vibe, `skills` ou le `skillsDir` de son `agent.yaml` pour mini-me, sinon `.agents/skills`) qui contiennent un `SKILL.md`, avec le `name` et la `description` de son en-tête. Créer (`name` : minuscules, chiffres et `-` ; refusé s'il est pris), enregistrer un `SKILL.md` par-dessus `version` (`{file, conflict}`), importer un dossier qui contient un `SKILL.md` (ses fichiers, sauf les cachés ; 200 fichiers et 20 Mio au plus) ou un fichier Markdown (devient `<nom>/SKILL.md`) ; les skills `<nom>.md` de mini-me sont listées aussi. `DeleteSkill` retire le dossier d'une skill (ou son `<nom>.md`), à la corbeille sur cet ordinateur, rien d'autre (issue #119). Pour un agent dans un conteneur ou une sandbox, son dossier sur cet ordinateur est lu et écrit s'il existe. |
196196 | `Save(agent, path, content, version)` | Écrit le fichier s'il a toujours `version` ; sinon `{conflict: true}` et rien n'est écrit. Une `version` vide écrase. Le fichier est écrit à côté puis déplacé à sa place. |
197197 | `Create(agent, dir, name)` | Crée un fichier vide ; refusé si le nom existe ou contient `/`. |
198198 | `Remove(agent, path)` | Supprime un fichier ou un dossier avec son contenu (voir le tableau ci-dessus). |
@@ -191,8 +191,8 @@ Un fichier ouvert pour modification a `path, content, version` ; `version` ident
191 | `List(agent, dir)` | Les entrées de `dir` (`""` est le dossier), dossiers d'abord, puis par nom. |191 | `List(agent, dir)` | Les entrées de `dir` (`""` est le dossier), dossiers d'abord, puis par nom. |
192 | `Read(agent, path)` | Un fichier texte de 1 Mo au plus ; un fichier binaire ou plus gros est une erreur. |192 | `Read(agent, path)` | Un fichier texte de 1 Mo au plus ; un fichier binaire ou plus gros est une erreur. |
193 | `Instructions(agent)` | Les instructions de l'agent (issue #113) : `{file, exists, content, version, files}` — le premier de `files` (d'après son programme : `CLAUDE.md` puis `AGENTS.md` pour Claude, `AGENTS.md` puis `GEMINI.md` pour Antigravity, sinon `AGENTS.md`) qui existe à la racine de son dossier, sinon le premier, à créer. |193 | `Instructions(agent)` | Les instructions de l'agent (issue #113) : `{file, exists, content, version, files}` — le premier de `files` (d'après son programme : `CLAUDE.md` puis `AGENTS.md` pour Claude, `AGENTS.md` puis `GEMINI.md` pour Antigravity, sinon `AGENTS.md`) qui existe à la racine de son dossier, sinon le premier, à créer. |
194-| `CreateInstructions(agent, content)`, `SaveInstructions(agent, content, version)`, `ImportInstructions(agent, hostPath)`, `ChooseInstructions()` | Écrivent le fichier d'instructions — seul moyen de le faire, puisqu'il est protégé (`protect`) : depuis un modèle (refusé s'il existe), modifié par-dessus `version` (`{instructions, conflict}` ; `conflict` et rien d'écrit s'il a changé), ou copié depuis un fichier texte UTF-8 de cet ordinateur (1 Mio au plus ; il le remplace). Jamais supprimé. |194+| `CreateInstructions(agent, content)`, `SaveInstructions(agent, content, version)`, `ImportInstructions(agent, hostPath)`, `DeleteInstructions(agent)`, `ChooseInstructions()` | Écrivent le fichier d'instructions — seul moyen de le faire, puisqu'il est protégé (`protect`) : depuis un modèle (refusé s'il existe), modifié par-dessus `version` (`{instructions, conflict}` ; `conflict` et rien d'écrit s'il a changé), ou copié depuis un fichier texte UTF-8 de cet ordinateur (1 Mio au plus ; il le remplace). `DeleteInstructions` retire ce fichier seulement, à la corbeille sur cet ordinateur (issue #122). Pour un agent dans un conteneur ou une sandbox, son dossier sur cet ordinateur est utilisé s'il existe. |
195-| `Skills(agent)`, `CreateSkill(agent, name, content)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `ChooseSkillFolder()` | Les skills de l'agent (issue #112) : `{dir, skills: [{folder, name, description, path}]}` — les dossiers de son dossier de skills (d'après son programme : `.claude/skills` pour Claude, `.vibe/skills` pour Vibe, `skills` ou le `skillsDir` de son `agent.yaml` pour mini-me, sinon `.agents/skills`) qui contiennent un `SKILL.md`, avec le `name` et la `description` de son en-tête. Créer (`name` : minuscules, chiffres et `-` ; refusé s'il est pris), enregistrer un `SKILL.md` par-dessus `version` (`{file, conflict}`), importer un dossier qui contient un `SKILL.md` (ses fichiers, sauf les cachés ; 200 fichiers et 20 Mio au plus) ou un fichier Markdown (devient `<nom>/SKILL.md`). Ne supprime jamais rien. |195+| `Skills(agent)`, `CreateSkill(agent, name, content)`, `ReadSkill(agent, path)`, `SaveSkill(agent, path, content, version)`, `ImportSkill(agent, hostPath)`, `DeleteSkill(agent, path)`, `ChooseSkillFolder()` | Les skills de l'agent (issue #112) : `{dir, skills: [{folder, name, description, path}]}` — les dossiers de son dossier de skills (d'après son programme : `.claude/skills` pour Claude, `.vibe/skills` pour Vibe, `skills` ou le `skillsDir` de son `agent.yaml` pour mini-me, sinon `.agents/skills`) qui contiennent un `SKILL.md`, avec le `name` et la `description` de son en-tête. Créer (`name` : minuscules, chiffres et `-` ; refusé s'il est pris), enregistrer un `SKILL.md` par-dessus `version` (`{file, conflict}`), importer un dossier qui contient un `SKILL.md` (ses fichiers, sauf les cachés ; 200 fichiers et 20 Mio au plus) ou un fichier Markdown (devient `<nom>/SKILL.md`) ; les skills `<nom>.md` de mini-me sont listées aussi. `DeleteSkill` retire le dossier d'une skill (ou son `<nom>.md`), à la corbeille sur cet ordinateur, rien d'autre (issue #119). Pour un agent dans un conteneur ou une sandbox, son dossier sur cet ordinateur est lu et écrit s'il existe. |
196 | `Save(agent, path, content, version)` | Écrit le fichier s'il a toujours `version` ; sinon `{conflict: true}` et rien n'est écrit. Une `version` vide écrase. Le fichier est écrit à côté puis déplacé à sa place. |196 | `Save(agent, path, content, version)` | Écrit le fichier s'il a toujours `version` ; sinon `{conflict: true}` et rien n'est écrit. Une `version` vide écrase. Le fichier est écrit à côté puis déplacé à sa place. |
197 | `Create(agent, dir, name)` | Crée un fichier vide ; refusé si le nom existe ou contient `/`. |197 | `Create(agent, dir, name)` | Crée un fichier vide ; refusé si le nom existe ou contient `/`. |
198 | `Remove(agent, path)` | Supprime un fichier ou un dossier avec son contenu (voir le tableau ci-dessus). |198 | `Remove(agent, path)` | Supprime un fichier ou un dossier avec son contenu (voir le tableau ci-dessus). |
modified docs/release-notes/v1.7.0.fr.md +3 -1
@@ -16,13 +16,15 @@ Brouillon — complété au fil des tickets de la 1.7.0.
1616 ### Donner ses instructions à un agent (#113)
1717
1818 - Un nouvel onglet **Instructions** dans le workspace d'un agent montre le fichier où il lit ses instructions — `AGENTS.md`, ou `CLAUDE.md` pour Claude : créez-le depuis un modèle, modifiez-le et enregistrez-le, ou importez un fichier de cet ordinateur. Quand l'agent tourne, **Redémarrer l'agent** lui fait lire les nouvelles instructions.
19-- Les fichiers d'instructions — `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — restent protégés dans l'onglet Fichiers : seul l'onglet Instructions les écrit, et rien ne les supprime.
19+- **Supprimer les instructions** retire le fichier, après confirmation : à la corbeille de cet ordinateur (#122).
20+- Les fichiers d'instructions — `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — restent protégés dans l'onglet Fichiers : seul l'onglet Instructions les écrit ou les supprime.
2021
2122 → [Les fichiers et le terminal d'un agent](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/fr/how-to/fichiers-et-terminal-d-un-agent.md)
2223
2324 ### Donner des skills à un agent (#112)
2425
2526 - Un nouvel onglet **Skills** dans le workspace d'un agent liste ses skills — le format Agent Skills que lisent tous les agents, dans le dossier de son type (`.claude/skills`, `.agents/skills`, `.vibe/skills`, `skills` de mini-me) : créez-en une depuis un modèle, modifiez son `SKILL.md`, ou importez le dossier d'une skill ou un fichier Markdown de cet ordinateur. **Redémarrer l'agent** lui fait découvrir les nouvelles.
27+- **Supprimer la skill** retire une skill, après confirmation : à la corbeille de cet ordinateur (#119).
2628 - Les dossiers de skills restent protégés dans l'onglet Fichiers : seul l'onglet Skills y écrit.
2729
2830 → [Les fichiers et le terminal d'un agent](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/fr/how-to/fichiers-et-terminal-d-un-agent.md)
@@ -16,13 +16,15 @@ Brouillon — complété au fil des tickets de la 1.7.0.
16 ### Donner ses instructions à un agent (#113)16 ### Donner ses instructions à un agent (#113)
17 17
18 - Un nouvel onglet **Instructions** dans le workspace d'un agent montre le fichier où il lit ses instructions — `AGENTS.md`, ou `CLAUDE.md` pour Claude : créez-le depuis un modèle, modifiez-le et enregistrez-le, ou importez un fichier de cet ordinateur. Quand l'agent tourne, **Redémarrer l'agent** lui fait lire les nouvelles instructions.18 - Un nouvel onglet **Instructions** dans le workspace d'un agent montre le fichier où il lit ses instructions — `AGENTS.md`, ou `CLAUDE.md` pour Claude : créez-le depuis un modèle, modifiez-le et enregistrez-le, ou importez un fichier de cet ordinateur. Quand l'agent tourne, **Redémarrer l'agent** lui fait lire les nouvelles instructions.
19-- Les fichiers d'instructions — `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — restent protégés dans l'onglet Fichiers : seul l'onglet Instructions les écrit, et rien ne les supprime.19+- **Supprimer les instructions** retire le fichier, après confirmation : à la corbeille de cet ordinateur (#122).
20+- Les fichiers d'instructions — `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — restent protégés dans l'onglet Fichiers : seul l'onglet Instructions les écrit ou les supprime.
20 21
21 → [Les fichiers et le terminal d'un agent](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/fr/how-to/fichiers-et-terminal-d-un-agent.md)22 → [Les fichiers et le terminal d'un agent](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/fr/how-to/fichiers-et-terminal-d-un-agent.md)
22 23
23 ### Donner des skills à un agent (#112)24 ### Donner des skills à un agent (#112)
24 25
25 - Un nouvel onglet **Skills** dans le workspace d'un agent liste ses skills — le format Agent Skills que lisent tous les agents, dans le dossier de son type (`.claude/skills`, `.agents/skills`, `.vibe/skills`, `skills` de mini-me) : créez-en une depuis un modèle, modifiez son `SKILL.md`, ou importez le dossier d'une skill ou un fichier Markdown de cet ordinateur. **Redémarrer l'agent** lui fait découvrir les nouvelles.26 - Un nouvel onglet **Skills** dans le workspace d'un agent liste ses skills — le format Agent Skills que lisent tous les agents, dans le dossier de son type (`.claude/skills`, `.agents/skills`, `.vibe/skills`, `skills` de mini-me) : créez-en une depuis un modèle, modifiez son `SKILL.md`, ou importez le dossier d'une skill ou un fichier Markdown de cet ordinateur. **Redémarrer l'agent** lui fait découvrir les nouvelles.
27+- **Supprimer la skill** retire une skill, après confirmation : à la corbeille de cet ordinateur (#119).
26 - Les dossiers de skills restent protégés dans l'onglet Fichiers : seul l'onglet Skills y écrit.28 - Les dossiers de skills restent protégés dans l'onglet Fichiers : seul l'onglet Skills y écrit.
27 29
28 → [Les fichiers et le terminal d'un agent](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/fr/how-to/fichiers-et-terminal-d-un-agent.md)30 → [Les fichiers et le terminal d'un agent](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/fr/how-to/fichiers-et-terminal-d-un-agent.md)
modified docs/release-notes/v1.7.0.md +3 -1
@@ -16,13 +16,15 @@ Draft — completed as the 1.7.0 tickets are done.
1616 ### Give an agent its instructions (#113)
1717
1818 - A new **Instructions** tab in an agent's workspace shows the file it reads its instructions in — `AGENTS.md`, or `CLAUDE.md` for Claude: create it from a template, edit and save it, or import a file of this computer. When the agent is running, **Restart the agent** makes it read the new instructions.
19-- The instruction files — `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — stay protected in the Files tab: only the Instructions tab writes them, and nothing deletes them.
19+- **Delete the instructions** removes the file, after you confirm: to the trash of this computer (#122).
20+- The instruction files — `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — stay protected in the Files tab: only the Instructions tab writes or deletes them.
2021
2122 → [Work with an agent's files and terminal](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/en/how-to/work-with-an-agents-files.md#give-the-agent-its-instructions)
2223
2324 ### Give an agent skills (#112)
2425
2526 - A new **Skills** tab in an agent's workspace lists its skills — the Agent Skills format every agent reads, in the folder its kind uses (`.claude/skills`, `.agents/skills`, `.vibe/skills`, mini-me's `skills`): create one from a template, edit its `SKILL.md`, or import a skill folder or a Markdown file of this computer. **Restart the agent** makes it find the new ones.
27+- **Delete the skill** removes a skill, after you confirm: to the trash of this computer (#119).
2628 - The skills folders stay protected in the Files tab: only the Skills tab writes there.
2729
2830 → [Work with an agent's files and terminal](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/en/how-to/work-with-an-agents-files.md#give-the-agent-skills)
@@ -16,13 +16,15 @@ Draft — completed as the 1.7.0 tickets are done.
16 ### Give an agent its instructions (#113)16 ### Give an agent its instructions (#113)
17 17
18 - A new **Instructions** tab in an agent's workspace shows the file it reads its instructions in — `AGENTS.md`, or `CLAUDE.md` for Claude: create it from a template, edit and save it, or import a file of this computer. When the agent is running, **Restart the agent** makes it read the new instructions.18 - A new **Instructions** tab in an agent's workspace shows the file it reads its instructions in — `AGENTS.md`, or `CLAUDE.md` for Claude: create it from a template, edit and save it, or import a file of this computer. When the agent is running, **Restart the agent** makes it read the new instructions.
19-- The instruction files — `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — stay protected in the Files tab: only the Instructions tab writes them, and nothing deletes them.19+- **Delete the instructions** removes the file, after you confirm: to the trash of this computer (#122).
20+- The instruction files — `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` — stay protected in the Files tab: only the Instructions tab writes or deletes them.
20 21
21 → [Work with an agent's files and terminal](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/en/how-to/work-with-an-agents-files.md#give-the-agent-its-instructions)22 → [Work with an agent's files and terminal](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/en/how-to/work-with-an-agents-files.md#give-the-agent-its-instructions)
22 23
23 ### Give an agent skills (#112)24 ### Give an agent skills (#112)
24 25
25 - A new **Skills** tab in an agent's workspace lists its skills — the Agent Skills format every agent reads, in the folder its kind uses (`.claude/skills`, `.agents/skills`, `.vibe/skills`, mini-me's `skills`): create one from a template, edit its `SKILL.md`, or import a skill folder or a Markdown file of this computer. **Restart the agent** makes it find the new ones.26 - A new **Skills** tab in an agent's workspace lists its skills — the Agent Skills format every agent reads, in the folder its kind uses (`.claude/skills`, `.agents/skills`, `.vibe/skills`, mini-me's `skills`): create one from a template, edit its `SKILL.md`, or import a skill folder or a Markdown file of this computer. **Restart the agent** makes it find the new ones.
27+- **Delete the skill** removes a skill, after you confirm: to the trash of this computer (#119).
26 - The skills folders stay protected in the Files tab: only the Skills tab writes there.28 - The skills folders stay protected in the Files tab: only the Skills tab writes there.
27 29
28 → [Work with an agent's files and terminal](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/en/how-to/work-with-an-agents-files.md#give-the-agent-skills)30 → [Work with an agent's files and terminal](https://rickub.com/bots-garden/sidekicks/blob/v1.7.0/docs/en/how-to/work-with-an-agents-files.md#give-the-agent-skills)
modified frontend/bindings/git.rickub.com/bots-garden/sidekicks/internal/app/workspaceservice.ts +17 -0
@@ -89,6 +89,23 @@ export function CreateSkill(agent: string, name: string, content: string): $Canc
8989 return $Call.ByID(993126163, agent, name, content);
9090 }
9191
92+/**
93+ * DeleteInstructions removes the agent's instruction file (issue #122) —
94+ * that file only; on this computer it goes to the trash.
95+ */
96+export function DeleteInstructions(agent: string): $CancellablePromise<void> {
97+ return $Call.ByID(805394496, agent);
98+}
99+
100+/**
101+ * DeleteSkill removes the skill whose file is file (issue #119): its whole
102+ * folder for a <folder>/SKILL.md, the file itself for a mini-me <name>.md —
103+ * never anything else. On this computer it goes to the trash.
104+ */
105+export function DeleteSkill(agent: string, file: string): $CancellablePromise<void> {
106+ return $Call.ByID(1068357194, agent, file);
107+}
108+
92109 /**
93110 * Duplicate copies files and folders next to themselves, under a free name
94111 * with "-copy" before the extension (plan.md → plan-copy.md, then
@@ -89,6 +89,23 @@ export function CreateSkill(agent: string, name: string, content: string): $Canc
89 return $Call.ByID(993126163, agent, name, content);89 return $Call.ByID(993126163, agent, name, content);
90 }90 }
91 91
92+/**
93+ * DeleteInstructions removes the agent's instruction file (issue #122) —
94+ * that file only; on this computer it goes to the trash.
95+ */
96+export function DeleteInstructions(agent: string): $CancellablePromise<void> {
97+ return $Call.ByID(805394496, agent);
98+}
99+
100+/**
101+ * DeleteSkill removes the skill whose file is file (issue #119): its whole
102+ * folder for a <folder>/SKILL.md, the file itself for a mini-me <name>.md —
103+ * never anything else. On this computer it goes to the trash.
104+ */
105+export function DeleteSkill(agent: string, file: string): $CancellablePromise<void> {
106+ return $Call.ByID(1068357194, agent, file);
107+}
108+
92 /**109 /**
93 * Duplicate copies files and folders next to themselves, under a free name110 * Duplicate copies files and folders next to themselves, under a free name
94 * with "-copy" before the extension (plan.md → plan-copy.md, then111 * with "-copy" before the extension (plan.md → plan-copy.md, then
modified frontend/src/lib/agent/InstructionsTab.svelte +24 -1
@@ -4,7 +4,7 @@
44 // Claude — of its folder, which it reads when its session starts. Created
55 // from a template, edited here, or imported from a file of this computer.
66 // The file is protected in the Files tab; this tab is the one place that
7- // writes it (the owner's choice), and never removes it.
7+ // writes it (the owner's choice), and removes it after asking (issue #122).
88 import { onMount } from 'svelte'
99 import { AgentService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'
1010 import type { Instructions } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'
@@ -26,6 +26,7 @@
2626 // Written since the agent started: it reads them at its next session.
2727 let written = $state(false)
2828 let confirmingImport = $state(false)
29+ let confirmingDelete = $state(false)
2930 const dirty = $derived(info !== null && info.exists && text !== info.content)
3031
3132 function errorOf(error: unknown): string {
@@ -88,6 +89,21 @@
8889 if (path) await run(() => WorkspaceService.ImportInstructions(agent, path))
8990 }
9091
92+ async function remove() {
93+ confirmingDelete = false
94+ busy = true
95+ problem = ''
96+ try {
97+ await WorkspaceService.DeleteInstructions(agent)
98+ written = true
99+ await load()
100+ } catch (error) {
101+ problem = errorOf(error)
102+ } finally {
103+ busy = false
104+ }
105+ }
106+
91107 function restart() {
92108 written = false
93109 void act(() => AgentService.Restart(agent))
@@ -121,8 +137,13 @@
121137 <span class="warning">{t('instructions.importReplaces', { file: info.file })}</span>
122138 <button type="button" class="primary" onclick={importFile}>{t('instructions.importYes')}</button>
123139 <button type="button" onclick={() => (confirmingImport = false)}>{t('creator.cancel')}</button>
140+ {:else if confirmingDelete}
141+ <span class="warning">{t('instructions.deleteConfirm', { file: info.file })}</span>
142+ <button type="button" class="danger" onclick={remove} disabled={busy}>{t('skills.deleteYes')}</button>
143+ <button type="button" onclick={() => (confirmingDelete = false)}>{t('creator.cancel')}</button>
124144 {:else}
125145 <button type="button" onclick={() => (confirmingImport = true)} disabled={busy}>{t('instructions.import')}</button>
146+ <button type="button" class="delete" onclick={() => (confirmingDelete = true)} disabled={busy}>{t('instructions.delete')}</button>
126147 <span class="grow"></span>
127148 <button type="button" onclick={() => show(info)} disabled={busy || !dirty}>{t('instructions.revert')}</button>
128149 <button type="button" class="primary" onclick={save} disabled={busy || !dirty}>{t('instructions.save')}</button>
@@ -153,5 +174,7 @@
153174 .note span { flex: 1; min-width: 200px; }
154175 .problem { border: 1px solid var(--danger); border-radius: var(--radius); color: var(--danger); padding: 8px 12px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
155176 .warning { color: var(--warn); font-size: 13px; }
177+ .delete { color: var(--danger); border-color: var(--danger); }
178+ .danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
156179 .primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
157180 </style>
@@ -4,7 +4,7 @@
4 // Claude — of its folder, which it reads when its session starts. Created4 // Claude — of its folder, which it reads when its session starts. Created
5 // from a template, edited here, or imported from a file of this computer.5 // from a template, edited here, or imported from a file of this computer.
6 // The file is protected in the Files tab; this tab is the one place that6 // The file is protected in the Files tab; this tab is the one place that
7- // writes it (the owner's choice), and never removes it.7+ // writes it (the owner's choice), and removes it after asking (issue #122).
8 import { onMount } from 'svelte'8 import { onMount } from 'svelte'
9 import { AgentService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'9 import { AgentService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'
10 import type { Instructions } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'10 import type { Instructions } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'
@@ -26,6 +26,7 @@
26 // Written since the agent started: it reads them at its next session.26 // Written since the agent started: it reads them at its next session.
27 let written = $state(false)27 let written = $state(false)
28 let confirmingImport = $state(false)28 let confirmingImport = $state(false)
29+ let confirmingDelete = $state(false)
29 const dirty = $derived(info !== null && info.exists && text !== info.content)30 const dirty = $derived(info !== null && info.exists && text !== info.content)
30 31
31 function errorOf(error: unknown): string {32 function errorOf(error: unknown): string {
@@ -88,6 +89,21 @@
88 if (path) await run(() => WorkspaceService.ImportInstructions(agent, path))89 if (path) await run(() => WorkspaceService.ImportInstructions(agent, path))
89 }90 }
90 91
92+ async function remove() {
93+ confirmingDelete = false
94+ busy = true
95+ problem = ''
96+ try {
97+ await WorkspaceService.DeleteInstructions(agent)
98+ written = true
99+ await load()
100+ } catch (error) {
101+ problem = errorOf(error)
102+ } finally {
103+ busy = false
104+ }
105+ }
106+
91 function restart() {107 function restart() {
92 written = false108 written = false
93 void act(() => AgentService.Restart(agent))109 void act(() => AgentService.Restart(agent))
@@ -121,8 +137,13 @@
121 <span class="warning">{t('instructions.importReplaces', { file: info.file })}</span>137 <span class="warning">{t('instructions.importReplaces', { file: info.file })}</span>
122 <button type="button" class="primary" onclick={importFile}>{t('instructions.importYes')}</button>138 <button type="button" class="primary" onclick={importFile}>{t('instructions.importYes')}</button>
123 <button type="button" onclick={() => (confirmingImport = false)}>{t('creator.cancel')}</button>139 <button type="button" onclick={() => (confirmingImport = false)}>{t('creator.cancel')}</button>
140+ {:else if confirmingDelete}
141+ <span class="warning">{t('instructions.deleteConfirm', { file: info.file })}</span>
142+ <button type="button" class="danger" onclick={remove} disabled={busy}>{t('skills.deleteYes')}</button>
143+ <button type="button" onclick={() => (confirmingDelete = false)}>{t('creator.cancel')}</button>
124 {:else}144 {:else}
125 <button type="button" onclick={() => (confirmingImport = true)} disabled={busy}>{t('instructions.import')}</button>145 <button type="button" onclick={() => (confirmingImport = true)} disabled={busy}>{t('instructions.import')}</button>
146+ <button type="button" class="delete" onclick={() => (confirmingDelete = true)} disabled={busy}>{t('instructions.delete')}</button>
126 <span class="grow"></span>147 <span class="grow"></span>
127 <button type="button" onclick={() => show(info)} disabled={busy || !dirty}>{t('instructions.revert')}</button>148 <button type="button" onclick={() => show(info)} disabled={busy || !dirty}>{t('instructions.revert')}</button>
128 <button type="button" class="primary" onclick={save} disabled={busy || !dirty}>{t('instructions.save')}</button>149 <button type="button" class="primary" onclick={save} disabled={busy || !dirty}>{t('instructions.save')}</button>
@@ -153,5 +174,7 @@
153 .note span { flex: 1; min-width: 200px; }174 .note span { flex: 1; min-width: 200px; }
154 .problem { border: 1px solid var(--danger); border-radius: var(--radius); color: var(--danger); padding: 8px 12px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }175 .problem { border: 1px solid var(--danger); border-radius: var(--radius); color: var(--danger); padding: 8px 12px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
155 .warning { color: var(--warn); font-size: 13px; }176 .warning { color: var(--warn); font-size: 13px; }
177+ .delete { color: var(--danger); border-color: var(--danger); }
178+ .danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
156 .primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }179 .primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
157 </style>180 </style>
modified frontend/src/lib/agent/SkillsTab.svelte +34 -2
@@ -5,8 +5,9 @@
55 // Copilot, .vibe/skills for Vibe, skills — or its agent.yaml's skillsDir —
66 // for mini-me), one folder per skill with its SKILL.md. Listed, created
77 // from a template, edited, imported from a folder or a file of this
8- // computer. Like the instructions, the folder is protected in the Files
9- // tab: this tab writes there, and never removes anything.
8+ // computer, or deleted after a confirmation (issue #119). Like the
9+ // instructions, the folder is protected in the Files tab: only this tab
10+ // writes there.
1011 import { onMount } from 'svelte'
1112 import { AgentService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'
1213 import type { Skill, Skills } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'
@@ -34,6 +35,8 @@
3435 let newTitle = $state('')
3536 let newName = $state('')
3637 let nameTouched = $state(false)
38+ // Asking before deleting the selected skill (issue #119).
39+ let confirmingDelete = $state(false)
3740 let newDescription = $state('')
3841 const dirty = $derived(file !== null && text !== file.content)
3942
@@ -55,6 +58,7 @@
5558
5659 async function select(skill: Skill) {
5760 creating = false
61+ confirmingDelete = false
5862 selected = skill
5963 conflict = false
6064 try {
@@ -126,6 +130,24 @@
126130 }
127131 }
128132
133+ async function remove() {
134+ if (!selected) return
135+ confirmingDelete = false
136+ busy = true
137+ problem = ''
138+ try {
139+ await WorkspaceService.DeleteSkill(agent, selected.path)
140+ selected = null
141+ file = null
142+ written = true
143+ await load('')
144+ } catch (error) {
145+ problem = errorOf(error)
146+ } finally {
147+ busy = false
148+ }
149+ }
150+
129151 function restart() {
130152 written = false
131153 void act(() => AgentService.Restart(agent))
@@ -196,6 +218,13 @@
196218 {/key}
197219 </div>
198220 <div class="actions">
221+ {#if confirmingDelete}
222+ <span class="warning">{t('skills.deleteConfirm', { name: selected.name })}</span>
223+ <button type="button" class="danger" onclick={remove} disabled={busy}>{t('skills.deleteYes')}</button>
224+ <button type="button" onclick={() => (confirmingDelete = false)}>{t('creator.cancel')}</button>
225+ {:else}
226+ <button type="button" class="delete" onclick={() => (confirmingDelete = true)} disabled={busy}>{t('skills.delete')}</button>
227+ {/if}
199228 <span class="grow"></span>
200229 <button type="button" onclick={() => selected && select(selected)} disabled={busy || !dirty}>{t('instructions.revert')}</button>
201230 <button type="button" class="primary" onclick={save} disabled={busy || !dirty}>{t('instructions.save')}</button>
@@ -234,5 +263,8 @@
234263 .note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--accent); border-radius: var(--radius); padding: 8px 12px; font-size: 13px; }
235264 .note span { flex: 1; min-width: 200px; }
236265 .problem { border: 1px solid var(--danger); border-radius: var(--radius); color: var(--danger); padding: 8px 12px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
266+ .warning { color: var(--warn); font-size: 13px; }
267+ .delete { color: var(--danger); border-color: var(--danger); }
268+ .danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
237269 .primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
238270 </style>
@@ -5,8 +5,9 @@
5 // Copilot, .vibe/skills for Vibe, skills — or its agent.yaml's skillsDir —5 // Copilot, .vibe/skills for Vibe, skills — or its agent.yaml's skillsDir —
6 // for mini-me), one folder per skill with its SKILL.md. Listed, created6 // for mini-me), one folder per skill with its SKILL.md. Listed, created
7 // from a template, edited, imported from a folder or a file of this7 // from a template, edited, imported from a folder or a file of this
8- // computer. Like the instructions, the folder is protected in the Files8+ // computer, or deleted after a confirmation (issue #119). Like the
9- // tab: this tab writes there, and never removes anything.9+ // instructions, the folder is protected in the Files tab: only this tab
10+ // writes there.
10 import { onMount } from 'svelte'11 import { onMount } from 'svelte'
11 import { AgentService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'12 import { AgentService, WorkspaceService } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'
12 import type { Skill, Skills } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'13 import type { Skill, Skills } from '../../../bindings/git.rickub.com/bots-garden/sidekicks/internal/app'
@@ -34,6 +35,8 @@
34 let newTitle = $state('')35 let newTitle = $state('')
35 let newName = $state('')36 let newName = $state('')
36 let nameTouched = $state(false)37 let nameTouched = $state(false)
38+ // Asking before deleting the selected skill (issue #119).
39+ let confirmingDelete = $state(false)
37 let newDescription = $state('')40 let newDescription = $state('')
38 const dirty = $derived(file !== null && text !== file.content)41 const dirty = $derived(file !== null && text !== file.content)
39 42
@@ -55,6 +58,7 @@
55 58
56 async function select(skill: Skill) {59 async function select(skill: Skill) {
57 creating = false60 creating = false
61+ confirmingDelete = false
58 selected = skill62 selected = skill
59 conflict = false63 conflict = false
60 try {64 try {
@@ -126,6 +130,24 @@
126 }130 }
127 }131 }
128 132
133+ async function remove() {
134+ if (!selected) return
135+ confirmingDelete = false
136+ busy = true
137+ problem = ''
138+ try {
139+ await WorkspaceService.DeleteSkill(agent, selected.path)
140+ selected = null
141+ file = null
142+ written = true
143+ await load('')
144+ } catch (error) {
145+ problem = errorOf(error)
146+ } finally {
147+ busy = false
148+ }
149+ }
150+
129 function restart() {151 function restart() {
130 written = false152 written = false
131 void act(() => AgentService.Restart(agent))153 void act(() => AgentService.Restart(agent))
@@ -196,6 +218,13 @@
196 {/key}218 {/key}
197 </div>219 </div>
198 <div class="actions">220 <div class="actions">
221+ {#if confirmingDelete}
222+ <span class="warning">{t('skills.deleteConfirm', { name: selected.name })}</span>
223+ <button type="button" class="danger" onclick={remove} disabled={busy}>{t('skills.deleteYes')}</button>
224+ <button type="button" onclick={() => (confirmingDelete = false)}>{t('creator.cancel')}</button>
225+ {:else}
226+ <button type="button" class="delete" onclick={() => (confirmingDelete = true)} disabled={busy}>{t('skills.delete')}</button>
227+ {/if}
199 <span class="grow"></span>228 <span class="grow"></span>
200 <button type="button" onclick={() => selected && select(selected)} disabled={busy || !dirty}>{t('instructions.revert')}</button>229 <button type="button" onclick={() => selected && select(selected)} disabled={busy || !dirty}>{t('instructions.revert')}</button>
201 <button type="button" class="primary" onclick={save} disabled={busy || !dirty}>{t('instructions.save')}</button>230 <button type="button" class="primary" onclick={save} disabled={busy || !dirty}>{t('instructions.save')}</button>
@@ -234,5 +263,8 @@
234 .note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--accent); border-radius: var(--radius); padding: 8px 12px; font-size: 13px; }263 .note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--accent); border-radius: var(--radius); padding: 8px 12px; font-size: 13px; }
235 .note span { flex: 1; min-width: 200px; }264 .note span { flex: 1; min-width: 200px; }
236 .problem { border: 1px solid var(--danger); border-radius: var(--radius); color: var(--danger); padding: 8px 12px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }265 .problem { border: 1px solid var(--danger); border-radius: var(--radius); color: var(--danger); padding: 8px 12px; font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
266+ .warning { color: var(--warn); font-size: 13px; }
267+ .delete { color: var(--danger); border-color: var(--danger); }
268+ .danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
237 .primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }269 .primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
238 </style>270 </style>
modified frontend/src/lib/i18n/messages.ts +10 -0
@@ -285,6 +285,9 @@ export const en = {
285285 'skills.description': 'When to use it',
286286 'skills.descriptionHint': 'One or two sentences: the agent reads them to choose the skill.',
287287 'skills.create': 'Create the skill',
288+ 'skills.delete': 'Delete the skill',
289+ 'skills.deleteConfirm': 'Delete the skill {name}? Its folder goes to the trash of this computer (or is gone for good in a container or a sandbox without a folder here).',
290+ 'skills.deleteYes': 'Delete',
288291 'skills.restart': '{agent} finds its skills when its session starts: restart it so that it sees the new ones.',
289292 'skills.template': '# {name}\n\n## When to use this skill\n\n(What should make the agent use it.)\n\n## How to do it\n\n1. …\n2. …\n\n## Example\n\n(A short example of what the user asks, and of the answer.)\n',
290293 'instructions.intro': '{agent} reads its instructions in {file}, in its folder, when its session starts: its role, its tone, its rules. Write them in plain words.',
@@ -299,6 +302,8 @@ export const en = {
299302 'instructions.reload': 'Reload',
300303 'instructions.restart': '{agent} reads its instructions when its session starts: restart it so that it uses the new ones.',
301304 'instructions.restartButton': 'Restart the agent',
305+ 'instructions.delete': 'Delete the instructions',
306+ 'instructions.deleteConfirm': 'Delete {file}? It goes to the trash of this computer (or is gone for good in a container or a sandbox without a folder here).',
302307 'instructions.template': '# {agent}\n\n## Your role\n\nYou help me with … (say what the agent is for).\n\n## How you answer\n\n- In English, clearly and briefly.\n- Ask a question when something is not clear.\n\n## Rules\n\n- Ask before deleting or replacing a file.\n- Say when you are not sure.\n',
303308 'workspace.conversation': '💬 Conversation',
304309 'workspace.start': '▶ Start',
@@ -843,6 +848,9 @@ export const fr: Record<MessageKey, string> = {
843848 'skills.description': "Quand l'utiliser",
844849 'skills.descriptionHint': "Une ou deux phrases : l'agent les lit pour choisir la skill.",
845850 'skills.create': 'Créer la skill',
851+ 'skills.delete': 'Supprimer la skill',
852+ 'skills.deleteConfirm': "Supprimer la skill {name} ? Son dossier part à la corbeille de cet ordinateur (ou disparaît pour de bon dans un conteneur ou une sandbox sans dossier ici).",
853+ 'skills.deleteYes': 'Supprimer',
846854 'skills.restart': "{agent} découvre ses skills au début de sa session : redémarrez-le pour qu'il voie les nouvelles.",
847855 'skills.template': "# {name}\n\n## Quand utiliser cette skill\n\n(Ce qui doit amener l'agent à l'utiliser.)\n\n## Comment faire\n\n1. …\n2. …\n\n## Exemple\n\n(Un court exemple de demande, et de la réponse.)\n",
848856 'instructions.intro': "{agent} lit ses instructions dans {file}, dans son dossier, au début de sa session : son rôle, son ton, ses règles. Écrivez-les avec des mots simples.",
@@ -857,6 +865,8 @@ export const fr: Record<MessageKey, string> = {
857865 'instructions.reload': 'Recharger',
858866 'instructions.restart': "{agent} lit ses instructions au début de sa session : redémarrez-le pour qu'il utilise les nouvelles.",
859867 'instructions.restartButton': "Redémarrer l'agent",
868+ 'instructions.delete': 'Supprimer les instructions',
869+ 'instructions.deleteConfirm': "Supprimer {file} ? Il part à la corbeille de cet ordinateur (ou disparaît pour de bon dans un conteneur ou une sandbox sans dossier ici).",
860870 'instructions.template': "# {agent}\n\n## Ton rôle\n\nTu m'aides à … (dites à quoi sert l'agent).\n\n## Comment tu réponds\n\n- En français, clairement et brièvement.\n- Pose une question quand quelque chose n'est pas clair.\n\n## Règles\n\n- Demande avant de supprimer ou de remplacer un fichier.\n- Dis-le quand tu n'es pas sûr.\n",
861871 'workspace.conversation': '💬 Conversation',
862872 'workspace.start': '▶ Démarrer',
@@ -285,6 +285,9 @@ export const en = {
285 'skills.description': 'When to use it',285 'skills.description': 'When to use it',
286 'skills.descriptionHint': 'One or two sentences: the agent reads them to choose the skill.',286 'skills.descriptionHint': 'One or two sentences: the agent reads them to choose the skill.',
287 'skills.create': 'Create the skill',287 'skills.create': 'Create the skill',
288+ 'skills.delete': 'Delete the skill',
289+ 'skills.deleteConfirm': 'Delete the skill {name}? Its folder goes to the trash of this computer (or is gone for good in a container or a sandbox without a folder here).',
290+ 'skills.deleteYes': 'Delete',
288 'skills.restart': '{agent} finds its skills when its session starts: restart it so that it sees the new ones.',291 'skills.restart': '{agent} finds its skills when its session starts: restart it so that it sees the new ones.',
289 'skills.template': '# {name}\n\n## When to use this skill\n\n(What should make the agent use it.)\n\n## How to do it\n\n1. …\n2. …\n\n## Example\n\n(A short example of what the user asks, and of the answer.)\n',292 'skills.template': '# {name}\n\n## When to use this skill\n\n(What should make the agent use it.)\n\n## How to do it\n\n1. …\n2. …\n\n## Example\n\n(A short example of what the user asks, and of the answer.)\n',
290 'instructions.intro': '{agent} reads its instructions in {file}, in its folder, when its session starts: its role, its tone, its rules. Write them in plain words.',293 'instructions.intro': '{agent} reads its instructions in {file}, in its folder, when its session starts: its role, its tone, its rules. Write them in plain words.',
@@ -299,6 +302,8 @@ export const en = {
299 'instructions.reload': 'Reload',302 'instructions.reload': 'Reload',
300 'instructions.restart': '{agent} reads its instructions when its session starts: restart it so that it uses the new ones.',303 'instructions.restart': '{agent} reads its instructions when its session starts: restart it so that it uses the new ones.',
301 'instructions.restartButton': 'Restart the agent',304 'instructions.restartButton': 'Restart the agent',
305+ 'instructions.delete': 'Delete the instructions',
306+ 'instructions.deleteConfirm': 'Delete {file}? It goes to the trash of this computer (or is gone for good in a container or a sandbox without a folder here).',
302 'instructions.template': '# {agent}\n\n## Your role\n\nYou help me with … (say what the agent is for).\n\n## How you answer\n\n- In English, clearly and briefly.\n- Ask a question when something is not clear.\n\n## Rules\n\n- Ask before deleting or replacing a file.\n- Say when you are not sure.\n',307 'instructions.template': '# {agent}\n\n## Your role\n\nYou help me with … (say what the agent is for).\n\n## How you answer\n\n- In English, clearly and briefly.\n- Ask a question when something is not clear.\n\n## Rules\n\n- Ask before deleting or replacing a file.\n- Say when you are not sure.\n',
303 'workspace.conversation': '💬 Conversation',308 'workspace.conversation': '💬 Conversation',
304 'workspace.start': '▶ Start',309 'workspace.start': '▶ Start',
@@ -843,6 +848,9 @@ export const fr: Record<MessageKey, string> = {
843 'skills.description': "Quand l'utiliser",848 'skills.description': "Quand l'utiliser",
844 'skills.descriptionHint': "Une ou deux phrases : l'agent les lit pour choisir la skill.",849 'skills.descriptionHint': "Une ou deux phrases : l'agent les lit pour choisir la skill.",
845 'skills.create': 'Créer la skill',850 'skills.create': 'Créer la skill',
851+ 'skills.delete': 'Supprimer la skill',
852+ 'skills.deleteConfirm': "Supprimer la skill {name} ? Son dossier part à la corbeille de cet ordinateur (ou disparaît pour de bon dans un conteneur ou une sandbox sans dossier ici).",
853+ 'skills.deleteYes': 'Supprimer',
846 'skills.restart': "{agent} découvre ses skills au début de sa session : redémarrez-le pour qu'il voie les nouvelles.",854 'skills.restart': "{agent} découvre ses skills au début de sa session : redémarrez-le pour qu'il voie les nouvelles.",
847 'skills.template': "# {name}\n\n## Quand utiliser cette skill\n\n(Ce qui doit amener l'agent à l'utiliser.)\n\n## Comment faire\n\n1. …\n2. …\n\n## Exemple\n\n(Un court exemple de demande, et de la réponse.)\n",855 'skills.template': "# {name}\n\n## Quand utiliser cette skill\n\n(Ce qui doit amener l'agent à l'utiliser.)\n\n## Comment faire\n\n1. …\n2. …\n\n## Exemple\n\n(Un court exemple de demande, et de la réponse.)\n",
848 'instructions.intro': "{agent} lit ses instructions dans {file}, dans son dossier, au début de sa session : son rôle, son ton, ses règles. Écrivez-les avec des mots simples.",856 'instructions.intro': "{agent} lit ses instructions dans {file}, dans son dossier, au début de sa session : son rôle, son ton, ses règles. Écrivez-les avec des mots simples.",
@@ -857,6 +865,8 @@ export const fr: Record<MessageKey, string> = {
857 'instructions.reload': 'Recharger',865 'instructions.reload': 'Recharger',
858 'instructions.restart': "{agent} lit ses instructions au début de sa session : redémarrez-le pour qu'il utilise les nouvelles.",866 'instructions.restart': "{agent} lit ses instructions au début de sa session : redémarrez-le pour qu'il utilise les nouvelles.",
859 'instructions.restartButton': "Redémarrer l'agent",867 'instructions.restartButton': "Redémarrer l'agent",
868+ 'instructions.delete': 'Supprimer les instructions',
869+ 'instructions.deleteConfirm': "Supprimer {file} ? Il part à la corbeille de cet ordinateur (ou disparaît pour de bon dans un conteneur ou une sandbox sans dossier ici).",
860 'instructions.template': "# {agent}\n\n## Ton rôle\n\nTu m'aides à … (dites à quoi sert l'agent).\n\n## Comment tu réponds\n\n- En français, clairement et brièvement.\n- Pose une question quand quelque chose n'est pas clair.\n\n## Règles\n\n- Demande avant de supprimer ou de remplacer un fichier.\n- Dis-le quand tu n'es pas sûr.\n",870 'instructions.template': "# {agent}\n\n## Ton rôle\n\nTu m'aides à … (dites à quoi sert l'agent).\n\n## Comment tu réponds\n\n- En français, clairement et brièvement.\n- Pose une question quand quelque chose n'est pas clair.\n\n## Règles\n\n- Demande avant de supprimer ou de remplacer un fichier.\n- Dis-le quand tu n'es pas sûr.\n",
861 'workspace.conversation': '💬 Conversation',871 'workspace.conversation': '💬 Conversation',
862 'workspace.start': '▶ Démarrer',872 'workspace.start': '▶ Démarrer',
modified internal/app/instructions.go +19 -1
@@ -129,7 +129,8 @@ func (s *WorkspaceService) SaveInstructions(ctx context.Context, agent, content,
129129
130130 // writeInstructions writes the agent's instruction file. The file is
131131 // protected (config.AlwaysProtected) against the Files tab, not against this
132-// tab made for it (the owner's choice, issue #113); it is never removed.
132+// tab made for it (the owner's choice, issue #113), which may also remove it
133+// after asking (issue #122).
133134 func (s *WorkspaceService) writeInstructions(ctx context.Context, agent string, current Instructions, content string) (Instructions, error) {
134135 ws, err := s.Core.settingsWorkspaceOf(agent)
135136 if err != nil {
@@ -143,6 +144,23 @@ func (s *WorkspaceService) writeInstructions(ctx context.Context, agent string,
143144 return Instructions{File: current.File, Exists: true, Content: written.Content, Version: written.Version, Files: current.Files}, nil
144145 }
145146
147+// DeleteInstructions removes the agent's instruction file (issue #122) —
148+// that file only; on this computer it goes to the trash.
149+func (s *WorkspaceService) DeleteInstructions(ctx context.Context, agent string) error {
150+ current, err := s.Instructions(ctx, agent)
151+ if err != nil {
152+ return err
153+ }
154+ if !current.Exists {
155+ return workspace.ErrNotFound
156+ }
157+ ws, err := s.Core.settingsWorkspaceOf(agent)
158+ if err != nil {
159+ return err
160+ }
161+ return ws.Remove(ctx, current.File)
162+}
163+
146164 // ChooseInstructions asks the user for a text file to import as an agent's
147165 // instructions, starting in their home folder; "" when they cancelled.
148166 func (s *WorkspaceService) ChooseInstructions() (string, error) {
@@ -129,7 +129,8 @@ func (s *WorkspaceService) SaveInstructions(ctx context.Context, agent, content,
129 129
130 // writeInstructions writes the agent's instruction file. The file is130 // writeInstructions writes the agent's instruction file. The file is
131 // protected (config.AlwaysProtected) against the Files tab, not against this131 // protected (config.AlwaysProtected) against the Files tab, not against this
132-// tab made for it (the owner's choice, issue #113); it is never removed.132+// tab made for it (the owner's choice, issue #113), which may also remove it
133+// after asking (issue #122).
133 func (s *WorkspaceService) writeInstructions(ctx context.Context, agent string, current Instructions, content string) (Instructions, error) {134 func (s *WorkspaceService) writeInstructions(ctx context.Context, agent string, current Instructions, content string) (Instructions, error) {
134 ws, err := s.Core.settingsWorkspaceOf(agent)135 ws, err := s.Core.settingsWorkspaceOf(agent)
135 if err != nil {136 if err != nil {
@@ -143,6 +144,23 @@ func (s *WorkspaceService) writeInstructions(ctx context.Context, agent string,
143 return Instructions{File: current.File, Exists: true, Content: written.Content, Version: written.Version, Files: current.Files}, nil144 return Instructions{File: current.File, Exists: true, Content: written.Content, Version: written.Version, Files: current.Files}, nil
144 }145 }
145 146
147+// DeleteInstructions removes the agent's instruction file (issue #122) —
148+// that file only; on this computer it goes to the trash.
149+func (s *WorkspaceService) DeleteInstructions(ctx context.Context, agent string) error {
150+ current, err := s.Instructions(ctx, agent)
151+ if err != nil {
152+ return err
153+ }
154+ if !current.Exists {
155+ return workspace.ErrNotFound
156+ }
157+ ws, err := s.Core.settingsWorkspaceOf(agent)
158+ if err != nil {
159+ return err
160+ }
161+ return ws.Remove(ctx, current.File)
162+}
163+
146 // ChooseInstructions asks the user for a text file to import as an agent's164 // ChooseInstructions asks the user for a text file to import as an agent's
147 // instructions, starting in their home folder; "" when they cancelled.165 // instructions, starting in their home folder; "" when they cancelled.
148 func (s *WorkspaceService) ChooseInstructions() (string, error) {166 func (s *WorkspaceService) ChooseInstructions() (string, error) {
modified internal/app/instructions_test.go +25 -0
@@ -106,3 +106,28 @@ func TestInstructionsAreSavedOverTheVersionRead(t *testing.T) {
106106 t.Fatal("protected in the Files tab")
107107 }
108108 }
109+
110+// Issue #122: the instruction file is removed — to the trash on this
111+// computer —, and the tab is back to "none yet"; the other files stay.
112+func TestTheInstructionsAreDeleted(t *testing.T) {
113+ t.Setenv("HOME", t.TempDir())
114+ t.Setenv("XDG_DATA_HOME", t.TempDir())
115+ service, directory := instructionsSetup(t)
116+ ctx := context.Background()
117+ if err := service.DeleteInstructions(ctx, "claude"); err == nil {
118+ t.Fatal("nothing to delete yet")
119+ }
120+ write(t, filepath.Join(directory, "claude", "notes.md"), "kept")
121+ if _, err := service.CreateInstructions(ctx, "claude", "# Claude"); err != nil {
122+ t.Fatal(err)
123+ }
124+ if err := service.DeleteInstructions(ctx, "claude"); err != nil {
125+ t.Fatal(err)
126+ }
127+ if got, _ := service.Instructions(ctx, "claude"); got.Exists || got.File != "CLAUDE.md" {
128+ t.Fatalf("none again: %+v", got)
129+ }
130+ if _, err := os.Stat(filepath.Join(directory, "claude", "notes.md")); err != nil {
131+ t.Fatal("the other files stay")
132+ }
133+}
@@ -106,3 +106,28 @@ func TestInstructionsAreSavedOverTheVersionRead(t *testing.T) {
106 t.Fatal("protected in the Files tab")106 t.Fatal("protected in the Files tab")
107 }107 }
108 }108 }
109+
110+// Issue #122: the instruction file is removed — to the trash on this
111+// computer —, and the tab is back to "none yet"; the other files stay.
112+func TestTheInstructionsAreDeleted(t *testing.T) {
113+ t.Setenv("HOME", t.TempDir())
114+ t.Setenv("XDG_DATA_HOME", t.TempDir())
115+ service, directory := instructionsSetup(t)
116+ ctx := context.Background()
117+ if err := service.DeleteInstructions(ctx, "claude"); err == nil {
118+ t.Fatal("nothing to delete yet")
119+ }
120+ write(t, filepath.Join(directory, "claude", "notes.md"), "kept")
121+ if _, err := service.CreateInstructions(ctx, "claude", "# Claude"); err != nil {
122+ t.Fatal(err)
123+ }
124+ if err := service.DeleteInstructions(ctx, "claude"); err != nil {
125+ t.Fatal(err)
126+ }
127+ if got, _ := service.Instructions(ctx, "claude"); got.Exists || got.File != "CLAUDE.md" {
128+ t.Fatalf("none again: %+v", got)
129+ }
130+ if _, err := os.Stat(filepath.Join(directory, "claude", "notes.md")); err != nil {
131+ t.Fatal("the other files stay")
132+ }
133+}
modified internal/app/skills.go +20 -2
@@ -25,8 +25,8 @@ import (
2525 // Skills tab, in the folder its program reads (agents.SkillsDir) — on this
2626 // computer, in its container or in its sandbox alike, through its
2727 // workspace. Like its instructions (issue #113), the skills folders are
28-// protected in the Files tab: only this tab writes there, and it never
29-// removes anything.
28+// protected in the Files tab: only this tab writes there — and removes a
29+// skill, deliberately, after asking (issue #119).
3030
3131 // SkillFile is the file every skill folder holds.
3232 const SkillFile = "SKILL.md"
@@ -162,6 +162,24 @@ func (s *WorkspaceService) ReadSkill(ctx context.Context, agent, file string) (w
162162 return ws.Read(ctx, file)
163163 }
164164
165+// DeleteSkill removes the skill whose file is file (issue #119): its whole
166+// folder for a <folder>/SKILL.md, the file itself for a mini-me <name>.md —
167+// never anything else. On this computer it goes to the trash.
168+func (s *WorkspaceService) DeleteSkill(ctx context.Context, agent, file string) error {
169+ dir, ws, err := s.skillsDir(ctx, agent)
170+ if err != nil {
171+ return err
172+ }
173+ if !inSkills(dir, file) {
174+ return fmt.Errorf("%s is not a skill of %s", file, agent)
175+ }
176+ target := path.Clean(file)
177+ if path.Base(target) == SkillFile {
178+ target = path.Dir(target)
179+ }
180+ return ws.Remove(ctx, target)
181+}
182+
165183 // inSkills: file is a skill's file of the skills folder dir — its
166184 // <folder>/SKILL.md, or a <name>.md right in dir (mini-me).
167185 func inSkills(dir, file string) bool {
@@ -25,8 +25,8 @@ import (
25 // Skills tab, in the folder its program reads (agents.SkillsDir) — on this25 // Skills tab, in the folder its program reads (agents.SkillsDir) — on this
26 // computer, in its container or in its sandbox alike, through its26 // computer, in its container or in its sandbox alike, through its
27 // workspace. Like its instructions (issue #113), the skills folders are27 // workspace. Like its instructions (issue #113), the skills folders are
28-// protected in the Files tab: only this tab writes there, and it never28+// protected in the Files tab: only this tab writes there — and removes a
29-// removes anything.29+// skill, deliberately, after asking (issue #119).
30 30
31 // SkillFile is the file every skill folder holds.31 // SkillFile is the file every skill folder holds.
32 const SkillFile = "SKILL.md"32 const SkillFile = "SKILL.md"
@@ -162,6 +162,24 @@ func (s *WorkspaceService) ReadSkill(ctx context.Context, agent, file string) (w
162 return ws.Read(ctx, file)162 return ws.Read(ctx, file)
163 }163 }
164 164
165+// DeleteSkill removes the skill whose file is file (issue #119): its whole
166+// folder for a <folder>/SKILL.md, the file itself for a mini-me <name>.md —
167+// never anything else. On this computer it goes to the trash.
168+func (s *WorkspaceService) DeleteSkill(ctx context.Context, agent, file string) error {
169+ dir, ws, err := s.skillsDir(ctx, agent)
170+ if err != nil {
171+ return err
172+ }
173+ if !inSkills(dir, file) {
174+ return fmt.Errorf("%s is not a skill of %s", file, agent)
175+ }
176+ target := path.Clean(file)
177+ if path.Base(target) == SkillFile {
178+ target = path.Dir(target)
179+ }
180+ return ws.Remove(ctx, target)
181+}
182+
165 // inSkills: file is a skill's file of the skills folder dir — its183 // inSkills: file is a skill's file of the skills folder dir — its
166 // <folder>/SKILL.md, or a <name>.md right in dir (mini-me).184 // <folder>/SKILL.md, or a <name>.md right in dir (mini-me).
167 func inSkills(dir, file string) bool {185 func inSkills(dir, file string) bool {
modified internal/app/skills_test.go +33 -0
@@ -175,3 +175,36 @@ func TestTheSkillsOfASandboxAgentAreWrittenInItsFolderOnThisComputer(t *testing.
175175 t.Fatalf("instructions too: %v", err)
176176 }
177177 }
178+
179+// Issue #119: deleting a skill removes its folder — to the trash on this
180+// computer —, or a mini-me <name>.md; never anything else.
181+func TestASkillIsDeletedWithItsFolder(t *testing.T) {
182+ t.Setenv("HOME", t.TempDir()) // the skill goes to a test trash
183+ t.Setenv("XDG_DATA_HOME", t.TempDir())
184+ service, folder := miniCoderSetup(t)
185+ ctx := context.Background()
186+ if _, err := service.CreateSkill(ctx, "mini-coder", "review", translate); err != nil {
187+ t.Fatal(err)
188+ }
189+ write(t, filepath.Join(folder, ".mm", "skills", "review", "notes.txt"), "kept with the skill")
190+ if err := service.DeleteSkill(ctx, "mini-coder", ".mm/skills/review/SKILL.md"); err != nil {
191+ t.Fatal(err)
192+ }
193+ if _, err := os.Stat(filepath.Join(folder, ".mm", "skills", "review")); !os.IsNotExist(err) {
194+ t.Fatalf("the whole folder goes: %v", err)
195+ }
196+ if err := service.DeleteSkill(ctx, "mini-coder", ".mm/skills/commit.md"); err != nil {
197+ t.Fatal(err)
198+ }
199+ if listed, _ := service.Skills(ctx, "mini-coder"); len(listed.Skills) != 0 {
200+ t.Fatalf("none left: %+v", listed)
201+ }
202+ for _, other := range []string{".mm/agent.yaml", ".mm/skills", "AGENTS.md", ".mm/skills/../agent.yaml"} {
203+ if err := service.DeleteSkill(ctx, "mini-coder", other); err == nil {
204+ t.Errorf("%s is not a skill", other)
205+ }
206+ }
207+ if _, err := os.Stat(filepath.Join(folder, ".mm", "agent.yaml")); err != nil {
208+ t.Fatal("the agent's settings stay")
209+ }
210+}
@@ -175,3 +175,36 @@ func TestTheSkillsOfASandboxAgentAreWrittenInItsFolderOnThisComputer(t *testing.
175 t.Fatalf("instructions too: %v", err)175 t.Fatalf("instructions too: %v", err)
176 }176 }
177 }177 }
178+
179+// Issue #119: deleting a skill removes its folder — to the trash on this
180+// computer —, or a mini-me <name>.md; never anything else.
181+func TestASkillIsDeletedWithItsFolder(t *testing.T) {
182+ t.Setenv("HOME", t.TempDir()) // the skill goes to a test trash
183+ t.Setenv("XDG_DATA_HOME", t.TempDir())
184+ service, folder := miniCoderSetup(t)
185+ ctx := context.Background()
186+ if _, err := service.CreateSkill(ctx, "mini-coder", "review", translate); err != nil {
187+ t.Fatal(err)
188+ }
189+ write(t, filepath.Join(folder, ".mm", "skills", "review", "notes.txt"), "kept with the skill")
190+ if err := service.DeleteSkill(ctx, "mini-coder", ".mm/skills/review/SKILL.md"); err != nil {
191+ t.Fatal(err)
192+ }
193+ if _, err := os.Stat(filepath.Join(folder, ".mm", "skills", "review")); !os.IsNotExist(err) {
194+ t.Fatalf("the whole folder goes: %v", err)
195+ }
196+ if err := service.DeleteSkill(ctx, "mini-coder", ".mm/skills/commit.md"); err != nil {
197+ t.Fatal(err)
198+ }
199+ if listed, _ := service.Skills(ctx, "mini-coder"); len(listed.Skills) != 0 {
200+ t.Fatalf("none left: %+v", listed)
201+ }
202+ for _, other := range []string{".mm/agent.yaml", ".mm/skills", "AGENTS.md", ".mm/skills/../agent.yaml"} {
203+ if err := service.DeleteSkill(ctx, "mini-coder", other); err == nil {
204+ t.Errorf("%s is not a skill", other)
205+ }
206+ }
207+ if _, err := os.Stat(filepath.Join(folder, ".mm", "agent.yaml")); err != nil {
208+ t.Fatal("the agent's settings stay")
209+ }
210+}