opencode-team-lead 0.2.1 → 0.3.1
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 +25 -0
- package/index.js +40 -21
- package/package.json +1 -1
- package/prompt.md +3 -0
package/README.md
CHANGED
|
@@ -59,8 +59,33 @@ The agent has a minimal permission set:
|
|
|
59
59
|
| `memoai_*` | allow |
|
|
60
60
|
| `sequential-thinking_*` | allow |
|
|
61
61
|
| `bash` (git only) | allow |
|
|
62
|
+
| `read` / `edit` (`.opencode/scratchpad.md` only) | allow |
|
|
62
63
|
| Everything else | deny |
|
|
63
64
|
|
|
65
|
+
## Customization
|
|
66
|
+
|
|
67
|
+
You can override agent properties in your `opencode.json` — `temperature`, `color`, `variant`, `mode`, and additional permissions are all fair game:
|
|
68
|
+
|
|
69
|
+
```jsonc
|
|
70
|
+
// opencode.json
|
|
71
|
+
{
|
|
72
|
+
"agent": {
|
|
73
|
+
"team-lead": {
|
|
74
|
+
"temperature": 0.5,
|
|
75
|
+
"color": "#FF5733",
|
|
76
|
+
"permission": {
|
|
77
|
+
"webfetch": "allow",
|
|
78
|
+
"my_custom_tool": "allow"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Your overrides are merged on top of the plugin defaults — anything you don't specify keeps its default value. Permissions work the same way: the plugin's built-in permissions stay intact, and yours are added (or override specific entries).
|
|
86
|
+
|
|
87
|
+
The system prompt is always provided by the plugin and cannot be overridden.
|
|
88
|
+
|
|
64
89
|
## License
|
|
65
90
|
|
|
66
91
|
MIT
|
package/index.js
CHANGED
|
@@ -27,6 +27,42 @@ export const TeamLeadPlugin = async ({ directory, worktree }) => {
|
|
|
27
27
|
// ── Config hook: inject the team-lead agent ──────────────────────
|
|
28
28
|
config: async (input) => {
|
|
29
29
|
input.agent = input.agent ?? {};
|
|
30
|
+
|
|
31
|
+
// Capture any existing user config (e.g. from opencode.json)
|
|
32
|
+
const userConfig = input.agent["team-lead"] ?? {};
|
|
33
|
+
|
|
34
|
+
const defaultPermission = {
|
|
35
|
+
"*": "deny",
|
|
36
|
+
todowrite: "allow",
|
|
37
|
+
todoread: "allow",
|
|
38
|
+
skill: "allow",
|
|
39
|
+
task: "allow",
|
|
40
|
+
question: "allow",
|
|
41
|
+
distill: "allow",
|
|
42
|
+
prune: "allow",
|
|
43
|
+
compress: "allow",
|
|
44
|
+
read: {
|
|
45
|
+
"*": "deny",
|
|
46
|
+
".opencode/scratchpad.md": "allow",
|
|
47
|
+
},
|
|
48
|
+
edit: {
|
|
49
|
+
"*": "deny",
|
|
50
|
+
".opencode/scratchpad.md": "allow",
|
|
51
|
+
},
|
|
52
|
+
"memoai_*": "allow",
|
|
53
|
+
"sequential-thinking_*": "allow",
|
|
54
|
+
bash: {
|
|
55
|
+
"*": "deny",
|
|
56
|
+
"git status*": "allow",
|
|
57
|
+
"git diff*": "allow",
|
|
58
|
+
"git log*": "allow",
|
|
59
|
+
"git add*": "allow",
|
|
60
|
+
"git commit*": "allow",
|
|
61
|
+
"git push*": "allow",
|
|
62
|
+
"git tag*": "allow",
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
30
66
|
input.agent["team-lead"] = {
|
|
31
67
|
description:
|
|
32
68
|
"Strict delegation-only team lead. Understands requests, breaks them into tasks, " +
|
|
@@ -35,29 +71,12 @@ export const TeamLeadPlugin = async ({ directory, worktree }) => {
|
|
|
35
71
|
temperature: 0.3,
|
|
36
72
|
variant: "max",
|
|
37
73
|
mode: "all",
|
|
74
|
+
color: "error",
|
|
75
|
+
...userConfig,
|
|
38
76
|
prompt,
|
|
39
77
|
permission: {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
todoread: "allow",
|
|
43
|
-
skill: "allow",
|
|
44
|
-
task: "allow",
|
|
45
|
-
question: "allow",
|
|
46
|
-
distill: "allow",
|
|
47
|
-
prune: "allow",
|
|
48
|
-
compress: "allow",
|
|
49
|
-
"memoai_*": "allow",
|
|
50
|
-
"sequential-thinking_*": "allow",
|
|
51
|
-
bash: {
|
|
52
|
-
"*": "deny",
|
|
53
|
-
"git status*": "allow",
|
|
54
|
-
"git diff*": "allow",
|
|
55
|
-
"git log*": "allow",
|
|
56
|
-
"git add*": "allow",
|
|
57
|
-
"git commit*": "allow",
|
|
58
|
-
"git push*": "allow",
|
|
59
|
-
"git tag*": "allow",
|
|
60
|
-
},
|
|
78
|
+
...defaultPermission,
|
|
79
|
+
...userConfig.permission,
|
|
61
80
|
},
|
|
62
81
|
};
|
|
63
82
|
},
|
package/package.json
CHANGED
package/prompt.md
CHANGED
|
@@ -51,6 +51,7 @@ If you catch yourself about to use `read`, `edit`, `bash`, `glob`, `grep`, or `w
|
|
|
51
51
|
- Specify what the agent should RETURN so you can synthesize results
|
|
52
52
|
- **Parallelize independent tasks** — launch multiple agents simultaneously when possible
|
|
53
53
|
- Never assume an agent knows project context — be explicit
|
|
54
|
+
- **Update the scratchpad** after each delegation — add agent result summaries to the Agent Results section
|
|
54
55
|
|
|
55
56
|
### 4. Review
|
|
56
57
|
- **Every code, architecture, infra, or security change MUST be reviewed before reporting success**
|
|
@@ -61,12 +62,14 @@ If you catch yourself about to use `read`, `edit`, `bash`, `glob`, `grep`, or `w
|
|
|
61
62
|
- If the reviewer returns **BLOCKED**: escalate immediately to the user with the reviewer's reasoning
|
|
62
63
|
- **Maximum 2 review rounds** — if still not approved after 2 iterations, escalate to the user
|
|
63
64
|
- Parallelize reviews when possible (e.g., code review + security review simultaneously)
|
|
65
|
+
- **Update the scratchpad** after each review — update task statuses and record review outcomes
|
|
64
66
|
|
|
65
67
|
### 5. Synthesize & Report
|
|
66
68
|
- **Self-evaluate first** — before reporting anything, run through the Self-Evaluation checklist below. If something doesn't pass, loop back to the appropriate phase.
|
|
67
69
|
- Collect outputs from all agents
|
|
68
70
|
- Summarize results concisely for the user
|
|
69
71
|
- Flag any issues, conflicts, or failures
|
|
72
|
+
- **Update the scratchpad** — final state capture before reporting to the user
|
|
70
73
|
- Propose next steps if applicable
|
|
71
74
|
- **Record learnings in `memoai_memo_record`** — don't just offer, do it systematically (see Memory Protocol below)
|
|
72
75
|
|