oira666_pi-subagent 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/agents/team-of-subagents.md +14 -0
- package/package.json +2 -3
- package/agents/team-lead.md +0 -16
- package/create-subagent/SKILL.md +0 -83
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ Write clear, concise technical documentation.
|
|
|
69
69
|
|
|
70
70
|
The body is appended to Pi's system prompt. Project definitions override user/environment definitions, which override bundled definitions of the same name. Custom definitions replace the bundled instructions too.
|
|
71
71
|
|
|
72
|
-
See [configuration](docs/configuration.md) for frontmatter, layer restrictions, prompt overrides, and environment settings.
|
|
72
|
+
See [configuration](docs/configuration.md) for frontmatter, layer restrictions, prompt overrides, and environment settings.
|
|
73
73
|
|
|
74
74
|
## Interactive controls
|
|
75
75
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: team-of-subagents
|
|
3
|
+
description: "This is a team of subagents with a teamlead focuced on task-managment for substencial problems. You talk to a TeamLead, he coordinates the team. Use very rarely, when a large subproject really needs a coordinator agent. Give the TeamLead a sensible max allowed subagents - this is the team size"
|
|
4
|
+
first-layer: only
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Coordinate one bounded subproject while your caller retains the surrounding work.
|
|
8
|
+
|
|
9
|
+
1. Define a bounded scope and expected output before launching workers.
|
|
10
|
+
2. Plan a small, flat set of substantial work slices and delegate to your subagents.
|
|
11
|
+
3. If you need to repeat the same instruction for several subagents - better save them as a file and handoff only the filepath.
|
|
12
|
+
5. Give each worker its scope, constraints, known files, expected output, and validation requirements. Run independent slices together. Avoid overlapping edits and routine chains of newly launched planners, writers, and reviewers.
|
|
13
|
+
6. Stop when the requested deliverable is complete. Report the result, validation, unresolved issues to your caller, make the
|
|
14
|
+
report full but very consise, focused.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oira666_pi-subagent",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Subagent extension for Pi coding agent. Delegate tasks to specialized agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -27,8 +27,7 @@
|
|
|
27
27
|
"storage/",
|
|
28
28
|
"types/",
|
|
29
29
|
"ui/",
|
|
30
|
-
"docs/"
|
|
31
|
-
"create-subagent/"
|
|
30
|
+
"docs/"
|
|
32
31
|
],
|
|
33
32
|
"pi": {
|
|
34
33
|
"extensions": [
|
package/agents/team-lead.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: team-lead
|
|
3
|
-
description: "Use rarely, when managing one large subproject would take too much of the main agent's context and attention. Direct workers are usually cheaper. Count this agent and its workers in the same budget; do not just forward the whole task."
|
|
4
|
-
first-layer: only
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Coordinate one bounded subproject while your caller retains the surrounding work.
|
|
8
|
-
An extra coordinator costs another startup, context handoff, and integration step. Use it only when keeping subproject details out of your caller's context pays for that cost.
|
|
9
|
-
|
|
10
|
-
1. Define a bounded scope and expected output before launching workers. Stay within the supplied allowance. If the task is merely forwarded unchanged, propose direct execution or direct specialists instead of adding a coordination layer.
|
|
11
|
-
2. Plan a small, flat set of substantial work slices. Launch new workers for independent review, time savings, or context isolation.
|
|
12
|
-
3. Your allowance comes from the root's task-wide budget, not a fresh budget. Count every new worker across all calls and phases. Give workers substantial scopes they can normally finish directly. Another coordinator needs its own demonstrated context saving and an allowance for its whole team; a complex task alone is not enough.
|
|
13
|
-
4. Read the supplied handoff first. Gather only enough additional context to define ownership and dependencies. Let workers explore their own scopes. If you already investigated a scope, pass those findings directly or through an absolute path under the project's tmp/ directory. Do not make workers repeat broad discovery.
|
|
14
|
-
5. Give each worker its scope, constraints, known files, expected output, and validation requirements. Run independent slices together. Avoid overlapping edits and routine chains of newly launched planners, writers, and reviewers.
|
|
15
|
-
6. Stop when the requested deliverable is complete. Report the result, validation, unresolved issues to your caller, make the
|
|
16
|
-
report full but very consise, focused.
|
package/create-subagent/SKILL.md
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: create-subagent
|
|
3
|
-
description: >
|
|
4
|
-
Creates new pi subagent definition files (.md with YAML frontmatter) in
|
|
5
|
-
~/.pi/agent/agents/ (user-global) or .pi/agents/ (project-local).
|
|
6
|
-
Trigger when the user asks to define a new agent, create a specialist, add a
|
|
7
|
-
subagent, write an agent file, or set up a delegated worker for a specific
|
|
8
|
-
task.
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Create Subagent
|
|
12
|
-
|
|
13
|
-
This skill guides you through creating a well-formed pi subagent definition file.
|
|
14
|
-
Subagents are Markdown files with YAML frontmatter that pi-subagent discovers at
|
|
15
|
-
startup and injects into the main agent's system prompt.
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## Step 1 — Clarify intent
|
|
20
|
-
|
|
21
|
-
Before writing anything, gather the following from the user (ask only what isn't
|
|
22
|
-
already obvious from context):
|
|
23
|
-
|
|
24
|
-
1. **What should this agent do?** — its core specialisation.
|
|
25
|
-
2. **User-global or project-local?**
|
|
26
|
-
- User-global → `~/.pi/agent/agents/<name>.md` (available in every session)
|
|
27
|
-
- Project-local → `.pi/agents/<name>.md` (scoped to the current repo; requires user confirmation before pi runs it)
|
|
28
|
-
3. **Model preference?** — leave blank to use Pi's default; specify when a task
|
|
29
|
-
clearly benefits from a specific model (e.g. a heavy reasoning task → a thinking
|
|
30
|
-
model; a fast lookup task → a smaller/faster model).
|
|
31
|
-
4. **Thinking level?** — `off | minimal | low | medium | high | xhigh`. Only set
|
|
32
|
-
this when you know it matters; otherwise omit and let the model default apply.
|
|
33
|
-
5. **Tools needed?** — choose the minimal set (see reference below). If unsure,
|
|
34
|
-
leave at defaults (`read, bash, edit, write`).
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Step 2 — Choose a name and write the description
|
|
39
|
-
|
|
40
|
-
**Name rules:**
|
|
41
|
-
- Lowercase, hyphen-separated (e.g. `code-reviewer`, `doc-writer`)
|
|
42
|
-
- Short and unambiguous — this is the identifier used in tool calls
|
|
43
|
-
- Must match exactly when the main agent calls `subagent({ agent: "..." })`
|
|
44
|
-
|
|
45
|
-
**Description rules:**
|
|
46
|
-
- One to two sentences maximum
|
|
47
|
-
- Describe *what the agent is good at*, not what it is
|
|
48
|
-
- The main agent reads this description to decide which subagent to call — be
|
|
49
|
-
specific and action-oriented (e.g. "Rewrites code for clarity and performance"
|
|
50
|
-
is better than "A code expert")
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
## Step 4 — Write the system prompt (Markdown body)
|
|
56
|
-
|
|
57
|
-
The Markdown body below the frontmatter becomes the agent's system prompt. It is
|
|
58
|
-
*appended* to Pi's default system prompt, not a replacement.
|
|
59
|
-
|
|
60
|
-
Good system prompts for subagents:
|
|
61
|
-
- State the agent's role clearly in the first sentence
|
|
62
|
-
- List any hard constraints (e.g. "never modify files outside the `src/` directory")
|
|
63
|
-
- Describe the expected output format if it matters (e.g. JSON, diff, prose)
|
|
64
|
-
- Keep it concise — the description field already covers "what the agent does";
|
|
65
|
-
the body covers *how* it should behave
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Step 5 — Write the file
|
|
70
|
-
|
|
71
|
-
Use the template below, then save to the appropriate location.
|
|
72
|
-
|
|
73
|
-
```markdown
|
|
74
|
-
---
|
|
75
|
-
name: <agent-name>
|
|
76
|
-
description: <one or two sentences — what the agent is good at>
|
|
77
|
-
model: <provider/model-id> # omit to use Pi default
|
|
78
|
-
thinking: <off|minimal|low|medium|high|xhigh> # omit to use Pi default
|
|
79
|
-
tools: <comma-separated tool list> # omit for defaults: read,bash,edit,write
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
<System prompt for the agent. Starts here. Be concise.>
|
|
83
|
-
```
|