opencode-overclock 0.5.0 → 0.5.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 CHANGED
@@ -13,17 +13,17 @@ opencode plugin -g opencode-overclock # every project
13
13
 
14
14
  ## What you get
15
15
 
16
- | Module | What it does | Tools it adds |
17
- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
18
- | `workflow` | 5 lifecycle commands (`/define`, `/plan`, `/build`, `/diagnose`, `/ship`), 9 sandboxed subagents, and 9 bundled engineering skills (`tdd`, `grilling`, `doubt`, etc.). | — |
19
- | `safety` | Blocks destructive git operations (`git reset --hard`, force-push, `clean -f`, `branch -D`, `stash drop`) in `bash` tool calls before they run. | — |
20
- | `tasks` | Run shell commands in the background. The agent gets the result posted back into the session when they finish, and a nudge if one blocks on a prompt. | `task_run` `task_status` `task_output` `task_kill` |
21
- | `sched` | Recurring prompts on a cron expression or an interval (`"5m"`). Survives restarts; an interval on the current session makes a loop. | `schedule_create` `schedule_list` `schedule_delete` |
22
- | `guard` | Your own quality gates: run a command after the agent edits files, feed failures back on idle, edit recovery hints, and `floorGuard` anti-bypass protection. | — |
23
- | `recovery` | Automatically heal provider errors (missing tool results, thinking block sequencing, context limit) and auto-resume sessions. | — |
24
- | `truncator` | Context-protecting smart output truncation for high-volume tools (`task_output`, `bash`, `grep`, `glob`, `webfetch`) preserving header & tail diagnostics. | — |
25
- | `usage` | Per-day and per-session cost and token totals, collected from the event bus (accessible via TUI `/oc-usage`). | — |
26
- | `buddy` | An ASCII pet next to the prompt that reacts to what the session is doing. Purely cosmetic. | — |
16
+ | Module | What it does | Tools it adds |
17
+ | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
18
+ | `workflow` | 5 lifecycle commands (`/define`, `/plan`, `/build`, `/diagnose`, `/ship`), 11 agents (interactive & sandboxed subagents), and 9 bundled engineering skills (`tdd`, `grilling`, `doubt`, etc.). | — |
19
+ | `safety` | Blocks destructive git operations (`git reset --hard`, force-push, `clean -f`, `branch -D`, `stash drop`) in `bash` tool calls before they run. | — |
20
+ | `tasks` | Run shell commands in the background. The agent gets the result posted back into the session when they finish, and a nudge if one blocks on a prompt. | `task_run` `task_status` `task_output` `task_kill` |
21
+ | `sched` | Recurring prompts on a cron expression or an interval (`"5m"`). Survives restarts; an interval on the current session makes a loop. | `schedule_create` `schedule_list` `schedule_delete` |
22
+ | `guard` | Your own quality gates: run a command after the agent edits files, feed failures back on idle, edit recovery hints, and `floorGuard` anti-bypass protection. | — |
23
+ | `recovery` | Automatically heal provider errors (missing tool results, thinking block sequencing, context limit) and auto-resume sessions. | — |
24
+ | `truncator` | Context-protecting smart output truncation for high-volume tools (`task_output`, `bash`, `grep`, `glob`, `webfetch`) preserving header & tail diagnostics. | — |
25
+ | `usage` | Per-day and per-session cost and token totals, collected from the event bus (accessible via TUI `/oc-usage`). | — |
26
+ | `buddy` | An ASCII pet next to the prompt that reacts to what the session is doing. Purely cosmetic. | — |
27
27
 
28
28
  On top of the tools, the TUI side adds desktop notifications when a turn finishes or the agent
29
29
  needs you, plus `/oc-tasks`, `/oc-usage`, `/oc-schedules`, `/oc-buddy` (pet), `/oc-buddy-switch` (choose species), and `/oc-buddy-cycle` (next species).
@@ -129,19 +129,28 @@ Auto-discovered by opencode's `skill` tool when relevant:
129
129
  - `doubt`: Adversarial verification where artifacts are audited against contracts without author confirmation bias.
130
130
  - `source-discipline`: Grounding framework code in official, version-matched documentation.
131
131
 
132
- #### 3. Sandboxed Worker Subagents (The "Who")
132
+ #### 3. Workflow Agents (The "Who")
133
133
 
134
- Specialized leaf subagents invoked via the `task` tool with **enforced read-only tool sandboxing** (`tools: { write: false, edit: false }`, `permission: { edit: "deny" }`):
134
+ Specialized agents available interactively in the TUI (`Tab`) and delegable via the `task` tool:
135
+
136
+ ##### Interactive & Subagent Agents (`mode: "all"`)
137
+
138
+ - `craftsman`: Disciplined implementation agent enforcing TDD (public seam first), minimal vertical slices, and zero compromises on code quality.
139
+ - `doc-writer`: Technical writer synthesizing accurate documentation, API references, ADRs, and user guides grounded directly in codebase evidence.
140
+ - `engineering-coach`: Elite staff mentor providing Socratic debugging guidance, mental models, and architectural critique (read-only sandboxed).
141
+ - `design-explorer`: Architect formulating contrasting minimalist vs extensible interface proposals ("Design It Twice", read-only sandboxed).
142
+ - `codebase-researcher`: Scout tracing call graphs, seams, and dependencies without cluttering context (read-only sandboxed).
143
+ - `doubt-reviewer`: Adversarial verifier probing race conditions, error bounds, and silent assumptions (read-only sandboxed).
144
+
145
+ ##### Sandboxed Audit Subagents (`mode: "subagent"`)
146
+
147
+ Leaf subagents invoked via the `task` tool with **enforced read-only tool sandboxing** (`tools: { write: false, edit: false }`, `permission: { edit: "deny" }`):
135
148
 
136
- - `codebase-researcher`: Scout tracing call graphs, seams, and dependencies without cluttering orchestrator context.
137
- - `design-explorer`: Architect formulating contrasting minimalist vs extensible interface proposals ("Design It Twice").
138
- - `doubt-reviewer`: Adversarial verifier probing race conditions, error bounds, and silent assumptions.
139
149
  - `standards-reviewer`: Senior reviewer auditing code diffs against Martin Fowler's code smells and repo idioms.
140
150
  - `spec-reviewer`: Product reviewer ensuring strict compliance with `SPEC.md` and zero unrequested scope creep.
141
151
  - `security-auditor`: Adversarial security engineer auditing diffs for OWASP Top 10 flaws and secret hygiene.
142
152
  - `test-engineer`: QA engineer assessing test coverage gaps, assertion quality, and mocking boundaries.
143
153
  - `performance-auditor`: Performance engineer identifying N+1 queries, unbounded memory, and latency bottlenecks.
144
- - `engineering-coach`: Elite staff mentor providing Socratic debugging guidance and architectural critique.
145
154
 
146
155
  ### Quality gates (`guard`)
147
156
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-overclock",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Power-ups for opencode: background tasks, cron scheduling, quality-gate hooks, usage telemetry, and companion. Modular, toggleable.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -16,6 +16,8 @@ import { DOUBT_REVIEWER_PROMPT } from "../workflow/agents/doubt-reviewer.ts"
16
16
  import { CODEBASE_RESEARCHER_PROMPT } from "../workflow/agents/codebase-researcher.ts"
17
17
  import { DESIGN_EXPLORER_PROMPT } from "../workflow/agents/design-explorer.ts"
18
18
  import { ENGINEERING_COACH_PROMPT } from "../workflow/agents/engineering-coach.ts"
19
+ import { CRAFTSMAN_PROMPT } from "../workflow/agents/craftsman.ts"
20
+ import { DOC_WRITER_PROMPT } from "../workflow/agents/doc-writer.ts"
19
21
 
20
22
  function getBundledSkillsDir(customPath?: string): string {
21
23
  if (customPath) return customPath
@@ -109,7 +111,7 @@ export const WORKFLOW_AGENTS = {
109
111
  },
110
112
  },
111
113
  "doubt-reviewer": {
112
- mode: "subagent" as const,
114
+ mode: "all" as const,
113
115
  description: "Adversarial Verification Engineer evaluating artifacts without author bias",
114
116
  prompt: DOUBT_REVIEWER_PROMPT,
115
117
  tools: {
@@ -121,7 +123,7 @@ export const WORKFLOW_AGENTS = {
121
123
  },
122
124
  },
123
125
  "codebase-researcher": {
124
- mode: "subagent" as const,
126
+ mode: "all" as const,
125
127
  description: "Scout Agent tracing seams, dependencies, and call graphs without polluting context",
126
128
  prompt: CODEBASE_RESEARCHER_PROMPT,
127
129
  tools: {
@@ -133,7 +135,7 @@ export const WORKFLOW_AGENTS = {
133
135
  },
134
136
  },
135
137
  "design-explorer": {
136
- mode: "subagent" as const,
138
+ mode: "all" as const,
137
139
  description: "Principal Architect producing contrasting 'Design It Twice' interface proposals",
138
140
  prompt: DESIGN_EXPLORER_PROMPT,
139
141
  tools: {
@@ -145,7 +147,7 @@ export const WORKFLOW_AGENTS = {
145
147
  },
146
148
  },
147
149
  "engineering-coach": {
148
- mode: "subagent" as const,
150
+ mode: "all" as const,
149
151
  description: "Elite Staff Mentor providing Socratic debugging guidance and design critique",
150
152
  prompt: ENGINEERING_COACH_PROMPT,
151
153
  tools: {
@@ -156,6 +158,18 @@ export const WORKFLOW_AGENTS = {
156
158
  edit: "deny" as const,
157
159
  },
158
160
  },
161
+ craftsman: {
162
+ mode: "all" as const,
163
+ description:
164
+ "Disciplined software craftsman enforcing TDD, minimal vertical slices, and clean architecture",
165
+ prompt: CRAFTSMAN_PROMPT,
166
+ },
167
+ "doc-writer": {
168
+ mode: "all" as const,
169
+ description:
170
+ "Technical writer synthesizing accurate documentation, API references, and architecture records from code",
171
+ prompt: DOC_WRITER_PROMPT,
172
+ },
159
173
  }
160
174
 
161
175
  export const workflow: FeatureModule = {
@@ -222,7 +236,7 @@ export const workflow: FeatureModule = {
222
236
  current.mode = current.mode ?? ag.mode
223
237
  current.description = current.description ?? ag.description
224
238
  current.system = current.system ?? ag.prompt
225
- if (ag.permission?.edit === "deny") {
239
+ if ("permission" in ag && ag.permission?.edit === "deny") {
226
240
  const perms = (current.permissions as any[]) ?? []
227
241
  const hasDenyEdit = perms.some((p: any) => p.action === "edit" && p.effect === "deny")
228
242
  if (!hasDenyEdit) {
@@ -0,0 +1,26 @@
1
+ export const CRAFTSMAN_PROMPT = `You are an elite Software Craftsman and Implementation Engineer.
2
+ Your sole responsibility is executing high-leverage, production-grade implementations and refactorings with extreme discipline, test-driven rigor, and architectural clarity.
3
+
4
+ Core Disciplines:
5
+ 1. Test-Driven Development (Red -> Green -> Refactor):
6
+ - Always establish a failing automated test at the public seam before touching implementation code.
7
+ - Use independent test oracles: never mirror production code logic inside test assertions.
8
+ - For bug fixes, write a test reproducing the defect first (Prove-It pattern) before applying the fix.
9
+ - Write the absolute minimal production code necessary to pass the test clean.
10
+ - Refactor only when green; keep the test suite green after every change.
11
+
12
+ 2. Minimal Vertical Slices:
13
+ - Slice work into context-sized vertical increments that cut through logic, interfaces, and tests.
14
+ - Avoid massive speculative layer-by-layer rewrites.
15
+ - Deliver working, independently verifiable software at each step.
16
+
17
+ 3. Deep Modules & Information Hiding:
18
+ - Adhere to John Ousterhout's principles: simple public interfaces hiding significant implementation depth.
19
+ - Never leak internal data structures, raw vendor types, or transient states through public seams.
20
+ - Design interfaces to be hard to misuse.
21
+
22
+ 4. Zero Compromises on Quality:
23
+ - Never use compiler warning/error suppressions, lint overrides, or disabled tests.
24
+ - Never catch and swallow errors silently.
25
+ - Always run project linters, typecheckers, and test suites to verify zero regressions.
26
+ `
@@ -0,0 +1,24 @@
1
+ export const DOC_WRITER_PROMPT = `You are a Principal Technical Writer and Documentation Architect.
2
+ Your sole responsibility is synthesizing clear, accurate, and high-leverage technical documentation, API references, architecture decision records (ADRs), and user guides grounded directly in codebase evidence.
3
+
4
+ Core Disciplines:
5
+ 1. Grounded in Code Truth:
6
+ - Never speculate or invent API signatures, behavior, or configuration options.
7
+ - Always inspect source files, type definitions, exports, and tests using read/grep/glob to verify reality before documenting.
8
+ - Ensure code examples in documentation are syntactically valid and match actual project conventions.
9
+
10
+ 2. Clear Structure & Progressive Disclosure:
11
+ - Design documentation for rapid scanning and discoverability.
12
+ - Start with a clear mental model and high-level concepts before diving into details.
13
+ - Provide minimal, copy-pasteable, working quickstart examples first.
14
+ - Structure reference documentation with explicit parameter tables, defaults, return types, and failure modes.
15
+
16
+ 3. Architectural Documentation:
17
+ - Document "why" decisions were made, trade-offs accepted, and invariants enforced.
18
+ - Keep ADRs (Architecture Decision Records) concise: Context, Decision, Consequences.
19
+ - Maintain ubiquitous domain terminology consistent with the codebase.
20
+
21
+ 4. Scope:
22
+ - Focus exclusively on documentation files (Markdown, README, docs/, API specs).
23
+ - Do not modify production application code or logic.
24
+ `