opencode-discipline 0.1.4 → 0.1.5
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/agents/README.md +16 -7
- package/agents/deep.md +1 -0
- package/agents/designer.md +1 -0
- package/agents/explore.md +1 -0
- package/agents/librarian.md +1 -0
- package/agents/oracle.md +1 -0
- package/agents/plan.md +5 -0
- package/agents/reviewer.md +1 -0
- package/dist/agents.d.ts +9 -0
- package/dist/index.js +7123 -21
- package/dist/wave-state.d.ts +3 -0
- package/package.json +1 -1
package/agents/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# opencode-discipline Agent Suite
|
|
2
2
|
|
|
3
|
-
This package ships
|
|
3
|
+
This package ships eight agent definitions for disciplined plan-first execution.
|
|
4
4
|
|
|
5
5
|
| Agent | Model | Mode | Purpose |
|
|
6
6
|
| --- | --- | --- | --- |
|
|
@@ -11,24 +11,33 @@ This package ships seven agent definitions for disciplined plan-first execution.
|
|
|
11
11
|
| `reviewer` | `openai/gpt-5.4` | subagent | Read-only quality critic for plans and code |
|
|
12
12
|
| `designer` | `anthropic/claude-sonnet-4-6` | subagent | Read-only UI/UX and accessibility advisor |
|
|
13
13
|
| `deep` | `openai/gpt-5.3-codex` | subagent | Advanced implementation subagent for complex coding work |
|
|
14
|
+
| `explore` | `openai/gpt-5.4-mini` | subagent | Fast codebase search and file discovery |
|
|
14
15
|
|
|
15
16
|
## Installation
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Enable the plugin in `opencode.json`:
|
|
18
19
|
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"plugin": ["opencode-discipline"]
|
|
23
|
+
}
|
|
22
24
|
```
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
The plugin automatically injects all agent configurations via the `config` hook — no manual file copying required.
|
|
27
|
+
|
|
28
|
+
To override a specific field for any agent, add it to `opencode.json`:
|
|
25
29
|
|
|
26
30
|
```json
|
|
27
31
|
{
|
|
28
|
-
"plugin": ["opencode-discipline"]
|
|
32
|
+
"plugin": ["opencode-discipline"],
|
|
33
|
+
"agent": {
|
|
34
|
+
"plan": { "model": "anthropic/claude-sonnet-4-6" }
|
|
35
|
+
}
|
|
29
36
|
}
|
|
30
37
|
```
|
|
31
38
|
|
|
39
|
+
User overrides take precedence per field; non-overridden fields use the plugin defaults.
|
|
40
|
+
|
|
32
41
|
## Delegation flow
|
|
33
42
|
|
|
34
43
|
```text
|
package/agents/deep.md
CHANGED
package/agents/designer.md
CHANGED
package/agents/explore.md
CHANGED
package/agents/librarian.md
CHANGED
package/agents/oracle.md
CHANGED
|
@@ -23,6 +23,7 @@ permission:
|
|
|
23
23
|
"cargo clippy *": allow
|
|
24
24
|
"npm run type-check *": allow
|
|
25
25
|
"tsc --noEmit *": allow
|
|
26
|
+
"echo *": allow
|
|
26
27
|
---
|
|
27
28
|
|
|
28
29
|
You are a senior staff engineer acting as an architecture consultant. You are the "last resort" advisor — consulted when facing unfamiliar patterns, tricky tradeoffs, or repeated failures.
|
package/agents/plan.md
CHANGED
|
@@ -37,6 +37,7 @@ permission:
|
|
|
37
37
|
"wc *": allow
|
|
38
38
|
"mkdir *": allow
|
|
39
39
|
"ls *": allow
|
|
40
|
+
"echo *": allow
|
|
40
41
|
task:
|
|
41
42
|
"*": deny
|
|
42
43
|
"explore": allow
|
|
@@ -158,10 +159,14 @@ After writing and completing Wave 4 review:
|
|
|
158
159
|
1. Tell the user: "Plan written to `tasks/plans/{filename}.md`"
|
|
159
160
|
2. Summarize in 3-5 sentences
|
|
160
161
|
3. The plugin will inject a handoff prompt into your system context with three choices. Follow those instructions exactly — present the choices and wait for the user's response before acting.
|
|
162
|
+
- Choice 1 label must be: **Accept plan, clear context and build.**
|
|
163
|
+
- Choice 2 label: **Start work later**
|
|
164
|
+
- Choice 3 label: **I have modifications to make**
|
|
161
165
|
|
|
162
166
|
## Rules
|
|
163
167
|
|
|
164
168
|
- NEVER write implementation code. Only markdown files in `tasks/`.
|
|
169
|
+
- Immediately after Wave 1 starts, call `todowrite` to create the 5-item planning checklist (Wave 1-4 plus Step 5 handoff) and keep it updated.
|
|
165
170
|
- Every phase MUST have a verify step that is a runnable command.
|
|
166
171
|
- Every phase with destructive changes MUST have a rollback step.
|
|
167
172
|
- Reference specific file paths, function names, and line numbers — never "the auth module."
|
package/agents/reviewer.md
CHANGED
|
@@ -23,6 +23,7 @@ permission:
|
|
|
23
23
|
"cargo clippy *": allow
|
|
24
24
|
"npm test *": allow
|
|
25
25
|
"npm run type-check *": allow
|
|
26
|
+
"echo *": allow
|
|
26
27
|
---
|
|
27
28
|
|
|
28
29
|
You are a ruthless reviewer. You review plans and code changes with zero tolerance for vagueness, missing tests, or scope creep. Your job is to catch what others miss.
|
package/dist/agents.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads all agent `.md` files from the given directory, parses their YAML
|
|
3
|
+
* frontmatter and markdown body, and returns a map of agent name to config.
|
|
4
|
+
*
|
|
5
|
+
* The returned config objects have the same shape as `AgentConfig` in the
|
|
6
|
+
* OpenCode SDK — frontmatter keys map directly to config fields, and the
|
|
7
|
+
* markdown body becomes the `prompt` field.
|
|
8
|
+
*/
|
|
9
|
+
export declare function loadAgentConfigs(agentsDir: string): Record<string, Record<string, unknown>>;
|