add memory: project to all agents, remove custom subagent-registry skill
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 `<project>/.pi/subagents.json` for ALL subagent operations. Read the file before any operation. Write the file after any change.
|
||||
|
||||
## File Location
|
||||
|
||||
`<cwd>/.pi/subagents.json` (where cwd is the current project directory)
|
||||
|
||||
## File Format
|
||||
|
||||
```json
|
||||
{
|
||||
"session": "<pi-session-name-or-project-dir>",
|
||||
"agents": [
|
||||
{
|
||||
"name": "<human-readable-name>",
|
||||
"id": "<agent-uuid-from-spawn-notification>",
|
||||
"type": "<subagent_type>",
|
||||
"provider": "<exact-provider-config-from-agent-frontmatter>",
|
||||
"status": "running|completed|error",
|
||||
"created": "<ISO-timestamp>"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## 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 '<name>' (<id-short>) using <provider>"
|
||||
|
||||
### 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 '<name>'. Available: <list-of-names>"
|
||||
3. If found: `Agent({ subagent_type, resume: "<agent-id>", prompt: "<new-task>", run_in_background: true })`
|
||||
4. Update status to "running" in registry
|
||||
5. Tell user: "Resumed '<name>' (<id-short>) — <provider> 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 '<name>'"
|
||||
|
||||
### 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 <N> subagents from session '<name>'"
|
||||
|
||||
## 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"
|
||||
```
|
||||
Reference in New Issue
Block a user