From b22bbf15f36582c2ab6ca560e27acdca05683ee6 Mon Sep 17 00:00:00 2001 From: Sam Rolfe Date: Sun, 14 Jun 2026 18:00:46 +1000 Subject: [PATCH] add memory: project to all agents, remove custom subagent-registry skill --- agents/chat-search.md | 1 + agents/code-analysis.md | 1 + agents/code-ingest.md | 1 + agents/coder-basic.md | 1 + agents/database.md | 1 + agents/devops-basic.md | 1 + agents/devops-pro.md | 1 + agents/document-writer.md | 1 + agents/file-ops.md | 1 + agents/home-automation.md | 1 + agents/image-maker.md | 1 + agents/iot-coder.md | 1 + agents/iot-hardware.md | 1 + agents/obsidian.md | 1 + agents/research.md | 1 + agents/video-analyze.md | 1 + agents/vscode-setup.md | 1 + skills/subagent-registry/SKILL.md | 100 ------------------------------ 18 files changed, 17 insertions(+), 100 deletions(-) delete mode 100644 skills/subagent-registry/SKILL.md diff --git a/agents/chat-search.md b/agents/chat-search.md index 3ac074e..b0ca0ca 100644 --- a/agents/chat-search.md +++ b/agents/chat-search.md @@ -1,6 +1,7 @@ --- description: Quick chat, web search, and lookups model: openrouter/google/gemini-2.5-flash:free +memory: project thinking: off tools: read, bash, grep, find max_turns: 15 diff --git a/agents/code-analysis.md b/agents/code-analysis.md index a91bcf7..ad469f4 100644 --- a/agents/code-analysis.md +++ b/agents/code-analysis.md @@ -1,6 +1,7 @@ --- description: Code review, analysis, and summarization model: opencode-go/deepseek-r1-distill-qwen-32b +memory: project thinking: medium tools: read, bash, grep, find max_turns: 30 diff --git a/agents/code-ingest.md b/agents/code-ingest.md index 0ad7e72..e250496 100644 --- a/agents/code-ingest.md +++ b/agents/code-ingest.md @@ -1,6 +1,7 @@ --- description: Scan and ingest code, docs, GitHub, webpages model: openrouter/google/gemini-2.5-flash:free +memory: project thinking: off tools: read, bash, grep, find max_turns: 20 diff --git a/agents/coder-basic.md b/agents/coder-basic.md index cb89ab7..ad12fed 100644 --- a/agents/coder-basic.md +++ b/agents/coder-basic.md @@ -1,6 +1,7 @@ --- description: Code editing (React, PHP, Python, Arduino) model: openrouter/deepseek/deepseek-chat +memory: project thinking: low tools: read, bash, write, grep, find max_turns: 30 diff --git a/agents/database.md b/agents/database.md index d945992..d702f83 100644 --- a/agents/database.md +++ b/agents/database.md @@ -1,6 +1,7 @@ --- description: Database design, SQL, and schema creation model: opencode-go/deepseek-r1-distill-qwen-32b +memory: project thinking: low tools: read, bash, write, grep max_turns: 25 diff --git a/agents/devops-basic.md b/agents/devops-basic.md index cd585b4..8b429cd 100644 --- a/agents/devops-basic.md +++ b/agents/devops-basic.md @@ -1,6 +1,7 @@ --- description: Docker, YAML, NixOS config editing model: openrouter/deepseek/deepseek-chat +memory: project thinking: low tools: read, bash, write, grep, find skills: nixos-workflow, system-architect diff --git a/agents/devops-pro.md b/agents/devops-pro.md index 1f2a265..d74b4bd 100644 --- a/agents/devops-pro.md +++ b/agents/devops-pro.md @@ -1,6 +1,7 @@ --- description: Complex multi-service DevOps (deep reasoning) model: openrouter/deepseek/deepseek-v4-pro +memory: project thinking: high tools: read, bash, write, grep, find, edit max_turns: 50 diff --git a/agents/document-writer.md b/agents/document-writer.md index 297fbf5..71c8fda 100644 --- a/agents/document-writer.md +++ b/agents/document-writer.md @@ -1,6 +1,7 @@ --- description: Documents, letters, and planning notes model: opencode-go/deepseek-r1-distill-qwen-32b +memory: project thinking: low tools: read, bash, write max_turns: 25 diff --git a/agents/file-ops.md b/agents/file-ops.md index 5470253..b538210 100644 --- a/agents/file-ops.md +++ b/agents/file-ops.md @@ -1,6 +1,7 @@ --- description: Filesystem scanning, drive management model: opencode-go/qwen-coder-32b-instruct +memory: project thinking: off tools: read, bash, grep, find, write max_turns: 20 diff --git a/agents/home-automation.md b/agents/home-automation.md index a2e7497..200f0a1 100644 --- a/agents/home-automation.md +++ b/agents/home-automation.md @@ -1,6 +1,7 @@ --- description: Bash, Python, MQTT, and Home Assistant model: opencode-go/deepseek-r1-distill-qwen-32b +memory: project thinking: low tools: read, bash, write, grep max_turns: 30 diff --git a/agents/image-maker.md b/agents/image-maker.md index 8c46b09..e024b16 100644 --- a/agents/image-maker.md +++ b/agents/image-maker.md @@ -1,6 +1,7 @@ --- description: Image generation via OpenRouter chat completions API model: openrouter/openai/gpt-5-image-mini +memory: project thinking: off tools: read, bash, write max_turns: 15 diff --git a/agents/iot-coder.md b/agents/iot-coder.md index bac0a53..a29c798 100644 --- a/agents/iot-coder.md +++ b/agents/iot-coder.md @@ -1,6 +1,7 @@ --- description: Arduino C++, ESP32, and IoT firmware model: opencode-go/qwen-coder-32b-instruct +memory: project thinking: low tools: read, bash, write, grep, find max_turns: 30 diff --git a/agents/iot-hardware.md b/agents/iot-hardware.md index 309f14d..aed9656 100644 --- a/agents/iot-hardware.md +++ b/agents/iot-hardware.md @@ -1,6 +1,7 @@ --- description: Hardware specs, boards, and ESP Home model: openrouter/moonshotai/kimi-k2.6 +memory: project thinking: off tools: read, bash, grep, find max_turns: 20 diff --git a/agents/obsidian.md b/agents/obsidian.md index 37368e7..7f804e5 100644 --- a/agents/obsidian.md +++ b/agents/obsidian.md @@ -1,6 +1,7 @@ --- description: Obsidian note-taking and vault management model: opencode-go/deepseek-r1-distill-qwen-14b +memory: project thinking: low tools: read, bash, write, grep, find skills: obsidian-cli diff --git a/agents/research.md b/agents/research.md index f2f2e70..183505d 100644 --- a/agents/research.md +++ b/agents/research.md @@ -1,6 +1,7 @@ --- description: Web search and documentation lookup model: openrouter/google/gemini-2.5-flash:free +memory: project thinking: off tools: read, bash, grep, find max_turns: 15 diff --git a/agents/video-analyze.md b/agents/video-analyze.md index 2865fcf..ed8358c 100644 --- a/agents/video-analyze.md +++ b/agents/video-analyze.md @@ -1,6 +1,7 @@ --- description: Video and image analysis via vision models model: openrouter/qwen/qwen-2.5-vl +memory: project thinking: off tools: read, bash, grep, find max_turns: 20 diff --git a/agents/vscode-setup.md b/agents/vscode-setup.md index a509662..828892e 100644 --- a/agents/vscode-setup.md +++ b/agents/vscode-setup.md @@ -1,6 +1,7 @@ --- description: VS Code, AI dev tools, and IDE setup model: openrouter/qwen/qwen-3-coder-next +memory: project thinking: off tools: read, bash, grep, find max_turns: 20 diff --git a/skills/subagent-registry/SKILL.md b/skills/subagent-registry/SKILL.md deleted file mode 100644 index 6221c78..0000000 --- a/skills/subagent-registry/SKILL.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -name: subagent-registry -description: Manage named subagent instances. MUST be used when spawning, resuming, listing, or deleting subagents. Read this skill FIRST before any subagent operation. ---- - -# Subagent Registry — CRITICAL - -You MUST manage `/.pi/subagents.json` for ALL subagent operations. Read the file before any operation. Write the file after any change. - -## File Location - -`/.pi/subagents.json` (where cwd is the current project directory) - -## File Format - -```json -{ - "session": "", - "agents": [ - { - "name": "", - "id": "", - "type": "", - "provider": "", - "status": "running|completed|error", - "created": "" - } - ] -} -``` - -## MANDATORY Operations - -### SPAWN — Always do this: -1. Ask user for a name if not provided: "What should I name this subagent?" -2. Spawn the agent: `Agent({ subagent_type, prompt, run_in_background: true })` -3. Wait for completion notification — extract the agent ID from the response -4. Read current `.pi/subagents.json` -5. Append new agent entry with name, id, type, provider, status="running", timestamp -6. Write updated `.pi/subagents.json` -7. Tell user: "Created subagent '' () using " - -### LIST — Always do this: -1. Read `.pi/subagents.json` -2. If file doesn't exist or agents array is empty: "No subagents found." -3. Display compact table: -``` -Name Type Provider Status Created ----- ---- -------- ------ ------- -searcher chat-search Google ↻ run 15:35 -``` -4. Show: name, type, provider, status, created time - -### RESUME — Always do this: -1. Read `.pi/subagents.json`, find agent by name -2. If not found: "No subagent named ''. Available: " -3. If found: `Agent({ subagent_type, resume: "", prompt: "", run_in_background: true })` -4. Update status to "running" in registry -5. Tell user: "Resumed '' () — cache warm" - -### DELETE — Always do this: -1. Read `.pi/subagents.json`, find agent by name -2. If running: steer to abort first -3. Remove entry from registry array -4. Write updated `.pi/subagents.json` -5. Tell user: "Deleted ''" - -### DELETE SESSION — Always do this: -1. Read `.pi/subagents.json` -2. Remove all agents where session matches -3. Write updated `.pi/subagents.json` -4. Tell user: "Deleted subagents from session ''" - -## Rules - -- **NEVER spawn without asking for a name first** -- **NEVER skip writing to the registry** after spawn/resume/delete -- **ALWAYS read the registry** before listing or resuming -- **Provider config must be preserved exactly** from the agent's frontmatter (e.g., "only:DeepInfra") -- **No auto-cleanup** — agents persist until explicitly deleted -- **Each named agent gets `memory: project`** in its frontmatter for persistent memory - -## Example Workflow - -``` -User: "Spawn a coder-pro to fix the login module" -You: "What should I name this subagent?" -User: "auth-login" -You: *spawn agent → get ID 7efad0d8-5a78-415* -You: *read .pi/subagents.json → append entry → write file* -You: "Created subagent 'auth-login' (7efad0d8) using DeepInfra" - -User: "List my subagents" -You: *read .pi/subagents.json → display table* - auth-login coder-pro DeepInfra ↻ running 20:00 - -User: "Resume auth-login and add password reset" -You: *read .pi/subagents.json → find ID → resume* -You: "Resumed 'auth-login' (7efad0d8) — DeepInfra cache warm" -```