opencode-discipline 0.1.4 → 0.1.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # opencode-discipline Agent Suite
2
2
 
3
- This package ships seven agent definitions for disciplined plan-first execution.
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
- Manual install:
18
+ Enable the plugin in `opencode.json`:
18
19
 
19
- ```bash
20
- mkdir -p ~/.config/opencode/agents
21
- cp agents/*.md ~/.config/opencode/agents/
20
+ ```json
21
+ {
22
+ "plugin": ["opencode-discipline"]
23
+ }
22
24
  ```
23
25
 
24
- Then enable the plugin in `opencode.json`:
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
@@ -16,6 +16,7 @@ permission:
16
16
  bash:
17
17
  "*": ask
18
18
  "rtk *": allow
19
+ "echo *": allow
19
20
  "git log *": allow
20
21
  "git diff *": allow
21
22
  "git status": allow
@@ -17,6 +17,7 @@ permission:
17
17
  bash:
18
18
  "*": ask
19
19
  "rtk *": allow
20
+ "echo *": allow
20
21
  edit: deny
21
22
  write: deny
22
23
  ---
package/agents/explore.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Fast codebase search. Finds files, patterns, and structure quickly. Cheap and parallel-friendly.
3
- model: openai/gpt-5.4-mini
3
+ model: openai/gpt-5.2
4
4
  temperature: 0
5
5
  mode: subagent
6
6
  color: "#78909C"
@@ -24,6 +24,7 @@ permission:
24
24
  "wc *": allow
25
25
  "git log *": allow
26
26
  "git show *": allow
27
+ "echo *": allow
27
28
  ---
28
29
 
29
30
  You are a fast codebase explorer. Your job is to find files, patterns, and structure as quickly as possible. You never implement or modify anything.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Research specialist. Gathers context from codebase, external docs, and reference implementations before work begins. Returns structured findings.
3
- model: openai/gpt-5.4-mini
3
+ model: openai/gpt-5.2
4
4
  temperature: 0
5
5
  mode: subagent
6
6
  color: "#1D9E75"
@@ -17,6 +17,7 @@ permission:
17
17
  bash:
18
18
  "*": ask
19
19
  "rtk *": allow
20
+ "echo *": allow
20
21
  ---
21
22
 
22
23
  You are a research specialist. Your job is to gather, organize, and present information. You never implement.
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."
@@ -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.
@@ -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>>;