@divaltor/academy 0.5.0 → 0.6.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 +2 -2
- package/package.json +4 -4
- package/src/agents.ts +2 -2
- package/src/index.ts +4 -1
- package/src/session-guidance.ts +24 -0
package/README.md
CHANGED
|
@@ -56,9 +56,9 @@ Without a version suffix OpenCode resolves `latest` on install; run `opencode pl
|
|
|
56
56
|
| ------ | ----------------------------- |
|
|
57
57
|
| Rudolf | OpenCode's configured default |
|
|
58
58
|
| Agnes | `openai/gpt-6-astra#xhigh` |
|
|
59
|
-
| Cafe | `openai/gpt-6-sol#
|
|
59
|
+
| Cafe | `openai/gpt-6.1-sol#low` |
|
|
60
60
|
| Dantsu | `openai/gpt-6-luna#high` |
|
|
61
|
-
| Bellno | `openai/gpt-6-
|
|
61
|
+
| Bellno | `openai/gpt-6-astra#medium` |
|
|
62
62
|
|
|
63
63
|
> [!WARNING]
|
|
64
64
|
>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@divaltor/academy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "An OpenCode plugin that trains a Tracen Academy roster of specialist coding agents to research, build, and review.",
|
|
5
5
|
"homepage": "https://github.com/divaltor/academy#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@ff-labs/fff-bun": "0.11.0",
|
|
33
|
-
"@opencode/plugin": "2.0.
|
|
34
|
-
"@opencode/schema": "2.0.
|
|
35
|
-
"effect": "4.0.
|
|
33
|
+
"@opencode/plugin": "2.0.29",
|
|
34
|
+
"@opencode/schema": "2.0.29",
|
|
35
|
+
"effect": "4.0.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/bun": "1.4.2",
|
package/src/agents.ts
CHANGED
|
@@ -90,7 +90,7 @@ export const agents: readonly AcademyAgent[] = [
|
|
|
90
90
|
"Librarian-style external research for official docs, API behavior, dependency internals, and remote repositories.",
|
|
91
91
|
id: "cafe",
|
|
92
92
|
mode: "subagent",
|
|
93
|
-
model: "openai/gpt-6-sol#
|
|
93
|
+
model: "openai/gpt-6.1-sol#low",
|
|
94
94
|
name: "Cafe",
|
|
95
95
|
permissions: [
|
|
96
96
|
...defaultPermissions,
|
|
@@ -135,7 +135,7 @@ export const agents: readonly AcademyAgent[] = [
|
|
|
135
135
|
"Read-only general reviewer for complete, systematic reviews of diffs, commits, branches, and pull requests.",
|
|
136
136
|
id: "bellno",
|
|
137
137
|
mode: "subagent",
|
|
138
|
-
model: "openai/gpt-6-
|
|
138
|
+
model: "openai/gpt-6-astra#medium",
|
|
139
139
|
name: "Bellno",
|
|
140
140
|
permissions: [
|
|
141
141
|
...defaultPermissions,
|
package/src/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { Config, Effect, Option, Redacted, Schema } from "effect";
|
|
|
4
4
|
import { agents, rudolfCommunicationPrompt } from "./agents";
|
|
5
5
|
import { FffTools } from "./fff-tools";
|
|
6
6
|
import { SessionCommunication } from "./session-communication";
|
|
7
|
+
import { SessionGuidance } from "./session-guidance";
|
|
7
8
|
|
|
8
9
|
const ModelReference = Schema.NonEmptyString.check(
|
|
9
10
|
Schema.isPattern(/^[^/#]+\/[^#]+(?:#[^#]+)?$/u)
|
|
@@ -39,7 +40,7 @@ const AcademyOptions = Schema.Struct({
|
|
|
39
40
|
|
|
40
41
|
const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
|
|
41
42
|
const githubToken = yield* Config.option(
|
|
42
|
-
Config.
|
|
43
|
+
Config.Redacted("GITHUB_TOKEN")
|
|
43
44
|
).pipe(Effect.orDie);
|
|
44
45
|
const options = yield* Schema.decodeUnknownEffect(AcademyOptions, {
|
|
45
46
|
onExcessProperty: "error",
|
|
@@ -89,6 +90,8 @@ const setup = Effect.fn("Academy.setup")(function* setup(ctx: Plugin.Context) {
|
|
|
89
90
|
yield* FffTools.register(ctx);
|
|
90
91
|
}
|
|
91
92
|
|
|
93
|
+
yield* SessionGuidance.register(ctx);
|
|
94
|
+
|
|
92
95
|
yield* ctx.agent.transform((editor) => {
|
|
93
96
|
for (const id of ["build", "plan", "explore", "general"]) {
|
|
94
97
|
editor.update(id, (agent) => {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Plugin } from "@opencode/plugin/effect";
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
|
|
4
|
+
export namespace SessionGuidance {
|
|
5
|
+
const anthropicRule = [
|
|
6
|
+
"Search and edit rules: never run shell `grep` or `sed`, including piped segments (`| grep`, `| sed`).",
|
|
7
|
+
'- Search: use the `grep` tool first; in shell use only `rg` (`rg -n "pattern" path`, `-F` literal, `-i` case-insensitive, `-v` invert, `-l`/`-c` files/count, `-A`/`-B`/`-C` context, `--replace` for substitutions).',
|
|
8
|
+
"- Edit/view: use Edit (or Write for new files) and Read with offset/limit instead of `sed -i`, `sed -n 'A,Bp'`, or `/pat/d`.",
|
|
9
|
+
"- `rg` is not `grep`-compatible: it recurses, respects .gitignore, and skips hidden files; add `--hidden --no-ignore` only when hidden or ignored files are explicitly required.",
|
|
10
|
+
].join("\n");
|
|
11
|
+
|
|
12
|
+
export const register = Effect.fn("SessionGuidance.register")(
|
|
13
|
+
function* register(ctx: Plugin.Context) {
|
|
14
|
+
yield* ctx.session.hook(
|
|
15
|
+
"context",
|
|
16
|
+
(input) =>
|
|
17
|
+
Effect.sync(() => {
|
|
18
|
+
input.system.push({ text: anthropicRule, type: "text" as const });
|
|
19
|
+
}),
|
|
20
|
+
{ providerID: "anthropic" }
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|