@slowdini/slow-powers-opencode 0.3.0 → 0.4.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.
Files changed (85) hide show
  1. package/README.md +34 -72
  2. package/bootstrap.md +1 -7
  3. package/opencode/plugins/slow-powers.js +69 -5
  4. package/package.json +14 -17
  5. package/skills/evaluating-skills/SKILL.md +90 -338
  6. package/skills/evaluating-skills/evals/baseline/BASELINE.md +23 -0
  7. package/skills/evaluating-skills/evals/baseline/NOTES.md +40 -0
  8. package/skills/evaluating-skills/evals/baseline/benchmark.json +54 -0
  9. package/skills/evaluating-skills/evals/baseline/grading/deterministic-edit-skip__new_skill.json +39 -0
  10. package/skills/evaluating-skills/evals/baseline/grading/deterministic-edit-skip__old_skill.json +39 -0
  11. package/skills/evaluating-skills/evals/baseline/grading/did-my-revision-help__new_skill.json +39 -0
  12. package/skills/evaluating-skills/evals/baseline/grading/did-my-revision-help__old_skill.json +39 -0
  13. package/skills/evaluating-skills/evals/baseline/grading/is-new-skill-ready-to-ship__new_skill.json +32 -0
  14. package/skills/evaluating-skills/evals/baseline/grading/is-new-skill-ready-to-ship__old_skill.json +32 -0
  15. package/skills/hardening-plans/SKILL.md +29 -7
  16. package/skills/hardening-plans/evals/baseline/BASELINE.md +11 -6
  17. package/skills/hardening-plans/evals/baseline/NOTES.md +72 -58
  18. package/skills/hardening-plans/evals/baseline/benchmark.json +25 -25
  19. package/skills/hardening-plans/evals/baseline/grading/concrete-todo-app-plan__new_skill.json +2 -2
  20. package/skills/hardening-plans/evals/baseline/grading/concrete-todo-app-plan__old_skill.json +2 -2
  21. package/skills/hardening-plans/evals/baseline/grading/docs-refactor-plan-mode__new_skill.json +39 -0
  22. package/skills/hardening-plans/evals/baseline/grading/docs-refactor-plan-mode__old_skill.json +39 -0
  23. package/skills/hardening-plans/evals/baseline/grading/oauth-task-breakdown-cold__new_skill.json +39 -0
  24. package/skills/hardening-plans/evals/baseline/grading/oauth-task-breakdown-cold__old_skill.json +39 -0
  25. package/skills/hardening-plans/evals/baseline/grading/research-plan-no-required-skill__new_skill.json +32 -0
  26. package/skills/hardening-plans/evals/baseline/grading/research-plan-no-required-skill__old_skill.json +32 -0
  27. package/skills/hardening-plans/evals/baseline/grading/seeded-plan-mode-todo-app-adversarial__new_skill.json +39 -0
  28. package/skills/hardening-plans/evals/baseline/grading/seeded-plan-mode-todo-app-adversarial__old_skill.json +39 -0
  29. package/skills/hardening-plans/evals/baseline/grading/seeded-plan-mode-todo-app__new_skill.json +39 -0
  30. package/skills/hardening-plans/evals/baseline/grading/seeded-plan-mode-todo-app__old_skill.json +39 -0
  31. package/skills/hardening-plans/evals/baseline/grading/seeded-review-catches-defects__new_skill.json +3 -3
  32. package/skills/hardening-plans/evals/baseline/grading/seeded-review-catches-defects__old_skill.json +8 -8
  33. package/skills/hardening-plans/evals/baseline/grading/structural-refactor-cold__new_skill.json +39 -0
  34. package/skills/hardening-plans/evals/baseline/grading/structural-refactor-cold__old_skill.json +39 -0
  35. package/skills/hardening-plans/evals/evals.json +46 -0
  36. package/skills/test-driven-development/evals/baseline/NOTES.md +2 -2
  37. package/skills/evaluating-skills/examples/verifying-development-work-evals.json +0 -30
  38. package/skills/evaluating-skills/harness-details/claude.md +0 -194
  39. package/skills/evaluating-skills/harness-parity.md +0 -155
  40. package/skills/evaluating-skills/runner/README.md +0 -163
  41. package/skills/evaluating-skills/runner/adapters/claude-code-session.test.ts +0 -56
  42. package/skills/evaluating-skills/runner/adapters/claude-code-session.ts +0 -43
  43. package/skills/evaluating-skills/runner/adapters/claude-code-transcript.test.ts +0 -485
  44. package/skills/evaluating-skills/runner/adapters/claude-code-transcript.ts +0 -242
  45. package/skills/evaluating-skills/runner/aggregate.test.ts +0 -484
  46. package/skills/evaluating-skills/runner/aggregate.ts +0 -269
  47. package/skills/evaluating-skills/runner/context.test.ts +0 -181
  48. package/skills/evaluating-skills/runner/context.ts +0 -90
  49. package/skills/evaluating-skills/runner/detect-stray-writes.test.ts +0 -396
  50. package/skills/evaluating-skills/runner/detect-stray-writes.ts +0 -288
  51. package/skills/evaluating-skills/runner/fill-transcripts.test.ts +0 -73
  52. package/skills/evaluating-skills/runner/fill-transcripts.ts +0 -154
  53. package/skills/evaluating-skills/runner/grade.test.ts +0 -347
  54. package/skills/evaluating-skills/runner/grade.ts +0 -603
  55. package/skills/evaluating-skills/runner/guard/guard.ts +0 -49
  56. package/skills/evaluating-skills/runner/guard/install.test.ts +0 -92
  57. package/skills/evaluating-skills/runner/guard/install.ts +0 -147
  58. package/skills/evaluating-skills/runner/guard/policy.test.ts +0 -128
  59. package/skills/evaluating-skills/runner/guard/policy.ts +0 -74
  60. package/skills/evaluating-skills/runner/plugin-shadow.test.ts +0 -228
  61. package/skills/evaluating-skills/runner/plugin-shadow.ts +0 -201
  62. package/skills/evaluating-skills/runner/profiles/claude-code/plan-mode.md +0 -11
  63. package/skills/evaluating-skills/runner/promote-baseline.test.ts +0 -281
  64. package/skills/evaluating-skills/runner/promote-baseline.ts +0 -204
  65. package/skills/evaluating-skills/runner/record-runs.test.ts +0 -314
  66. package/skills/evaluating-skills/runner/record-runs.ts +0 -209
  67. package/skills/evaluating-skills/runner/run.test.ts +0 -1703
  68. package/skills/evaluating-skills/runner/run.ts +0 -1388
  69. package/skills/evaluating-skills/runner/sandbox-policy.ts +0 -94
  70. package/skills/evaluating-skills/runner/types.ts +0 -121
  71. package/skills/evaluating-skills/runner/validate-all.ts +0 -54
  72. package/skills/evaluating-skills/runner/validate-schema.test.ts +0 -99
  73. package/skills/evaluating-skills/runner/validate-schema.ts +0 -51
  74. package/skills/evaluating-skills/runner/validate.test.ts +0 -56
  75. package/skills/evaluating-skills/runner/validate.ts +0 -21
  76. package/skills/evaluating-skills/runner/workspace-teardown.test.ts +0 -227
  77. package/skills/evaluating-skills/runner/workspace-teardown.ts +0 -136
  78. package/skills/evaluating-skills/schema/evals.schema.json +0 -105
  79. package/skills/evaluating-skills/schema/grading.schema.json +0 -84
  80. package/skills/evaluating-skills/schema/run-record.schema.json +0 -80
  81. package/skills/evaluating-skills/schema/stray-writes.schema.json +0 -80
  82. package/skills/evaluating-skills/templates/eval-task-prompt.md +0 -69
  83. package/skills/evaluating-skills/templates/evals.json.example +0 -17
  84. package/skills/evaluating-skills/templates/judge-prompt.md +0 -56
  85. package/skills/evaluating-skills/templates/revise-skill-prompt.md +0 -56
package/README.md CHANGED
@@ -1,68 +1,43 @@
1
1
  # Slow-powers
2
2
 
3
- Slow-powers gives your agent superpowers. It's a complete software development
4
- methodology for coding agents — a set of composable skills plus a bootstrap
5
- that ensures the agent reaches for them at the right moments.
3
+ Slow-powers is an agent skill set for professional software development. It enhances plan mode and debugging work, enforces best practices, and works _with_ the features of modern agents, instead of replacing them. It's a plugin for people who don't install plugins.
6
4
 
7
5
  ## About this fork
8
6
 
9
- Slow-powers is a fork of [obra/superpowers](https://github.com/obra/superpowers)
10
- at v5.1.0. We preserve the overall workflow of superpowers, while fixing bugs
11
- and clarifying skill content.
7
+ Slow-powers is a fork of [obra/superpowers](https://github.com/obra/superpowers). Much of the skill content is sourced from upstream, with rewrites focusing on clarity, token efficiency, and enhancing instead of replacing plan mode.
12
8
 
13
9
  ## Quickstart
14
10
 
15
- Give your agent superpowers with slow-powers: [Claude Code](#claude-code) · [Codex CLI](#codex-cli) · [OpenCode](#opencode). Support varies per harness — see the [feature support](#feature-support) tables.
11
+ [Claude Code](#claude-code) · [Codex CLI](#codex-cli) · [OpenCode](#opencode)
16
12
 
17
- ## Feature support
13
+ ## How it works
18
14
 
19
- Parity is tracked on two independent surfaces. **Plugin distribution** is how Slow-powers reaches a user's session manifests, bootstrap injection, skill discovery, hooks:
15
+ Slow-powers is designed to improve the actual day-to-day work of software developers working with agents. It instructs agents to check for skills first, and use the ones that apply. The shipped skills fill real gaps in agentic development, but all discoverable skills benefit from the skill-enforcing guidance.
20
16
 
21
- | Harness | Status | Notes |
22
- |-----------------|----------|-----------------------------------------------------------------------------------|
23
- | Claude Code | Full | Reference implementation |
24
- | Codex CLI | Full | Plugin manifest + shared `hooks/hooks.json`; the plan hand-off hook is Claude-native (N/A here, see #141) |
25
- | OpenCode | Full | JS plugin (npm package) injects bootstrap and registers skills via the native plugin API |
17
+ ### Start in plan mode
26
18
 
27
- The **skill-eval runner** (developer tooling under `skills/evaluating-skills/`, slated to move into its own project) is tracked separately:
19
+ Even small features are developed better with a plan. Slow-powers hardens the plan to catch hallucinations and other mistakes before you review it. During implementation, skills guide the agent through best practices, working in isolation, following test-driven development, and reviewing and verifying its work before it hands it back to you.
28
20
 
29
- | Harness | Status | Notes |
30
- |-----------------|----------|-----------------------------------------------------------------------------------|
31
- | Claude Code | Full | Reference implementation: transcript adapter, auto-record, `--guard`, `--plan-mode` |
32
- | Codex CLI | Manual | No transcript adapter — hand-authored run records; `llm_judge` assertions carry the measurement |
33
- | OpenCode | Manual | No transcript adapter — hand-authored run records; `llm_judge` assertions carry the measurement |
21
+ ### Debugging
34
22
 
35
- Contributors closing parity gaps should follow [`harness-parity-check.md`](./harness-parity-check.md) for distribution gaps, or [`skills/evaluating-skills/harness-parity.md`](./skills/evaluating-skills/harness-parity.md) for eval-runner gaps: each audits which features are wired up for a given harness and preps an agent to close one gap.
23
+ Slow-powers guides agents through an evidence-backed, no-guess debugging approach. No "It works now!" without proof.
36
24
 
37
- ## How it works
25
+ ### Writing skills
38
26
 
39
- Slow-powers integrates directly into your agent's session, providing a highly disciplined set of technical execution utilities. It enforces strict test-driven development (TDD), systematic scientific debugging, rigorous verification checks, safe workspace isolation so new work doesn't collide with existing work, and clean branch-finishing hygiene. It also enhances native agent planning phases with strict rules: banning placeholders, enforcing atomic task granularity, and requiring TDD-first checklists.
27
+ Skills for writing skills! Slow-powers skills are all written and evaluated following the same guidelines and processes it ships. Back up your own skills with real stats, and understand their cost in time and tokens.
40
28
 
41
- ## Installation
29
+ Skill evaluations are powered by [@slowdini/eval-runner](https://github.com/slowdini/eval-runner)
42
30
 
43
- Installation differs by harness. If you use more than one, install
44
- Slow-powers separately for each.
31
+ ## Installation
45
32
 
46
33
  ### Install with your agent
47
34
 
48
- Don't want to look up the steps? Open the harness you want Slow-powers on and
49
- paste this prompt to its agent — it'll read the guide, work out which harness
50
- it's in, and do the install for you:
35
+ Open the harness you want Slow-powers on and paste this prompt:
51
36
 
52
37
  ```text
53
- Install the "slow-powers" plugin for the coding-agent harness you are currently
54
- running in. Read the installation guide at
55
- https://github.com/slowdini/slow-powers#installation, determine which harness
56
- this is (Claude Code, Codex CLI, or OpenCode), and follow the matching steps —
57
- run the documented marketplace/install commands for Claude Code or Codex, or add
58
- the package to the `plugin` array in opencode.json for OpenCode. Then tell me
59
- exactly what you changed and what I need to do to finish (e.g. restart the
60
- session so the skills load).
38
+ Install the slow-powers plugin from https://github.com/slowdini/slow-powers#installation for this harness.
61
39
  ```
62
40
 
63
- The per-harness instructions below are the source of truth the agent follows —
64
- and the reference for installing by hand.
65
-
66
41
  ### Claude Code
67
42
 
68
43
  ```
@@ -70,6 +45,9 @@ and the reference for installing by hand.
70
45
  /plugin install slow-powers@slow-powers
71
46
  ```
72
47
 
48
+ You can also browse and install it interactively: run `claude`, open
49
+ `/plugin`, choose the `slowdini` marketplace, and install `slow-powers`.
50
+
73
51
  ### Codex CLI
74
52
 
75
53
  ```bash
@@ -79,15 +57,10 @@ codex plugin add slow-powers@slowdini
79
57
 
80
58
  You can also browse and install it interactively: run `codex`, open
81
59
  `/plugins`, choose the `slowdini` marketplace, and install `slow-powers`.
82
- Start a new Codex thread after installing so the bundled skills are loaded.
83
-
84
- Slow-powers includes a plugin-bundled `SessionStart` hook for bootstrap
85
- context. Codex hooks are stable, but plugin hooks must be reviewed and trusted
86
- before Codex runs them.
87
60
 
88
61
  ### OpenCode
89
62
 
90
- Add Slow-powers to the `plugin` array in your `opencode.json` (global or project-level):
63
+ Add Slow-powers to the `plugin` array in `~/.config/opencode/opencode.json`:
91
64
 
92
65
  ```json
93
66
  {
@@ -95,44 +68,34 @@ Add Slow-powers to the `plugin` array in your `opencode.json` (global or project
95
68
  }
96
69
  ```
97
70
 
98
- This installs the latest published version from npm.
99
-
100
- ## The Core Execution Utilities
71
+ ## The skills
101
72
 
102
- Slow-powers provides a set of highly focused, execution-level skills that ensure your agent operates with maximum discipline:
73
+ Slow-powers provides a set of highly focused skills that ensure your agent operates with maximum discipline:
103
74
 
104
- 1. **`working-in-isolation`** — Establishes an isolated workspace so new work doesn't collide with existing or in-progress work, keeping protected branches like `main` clean.
105
- 2. **`test-driven-development`** — Enforces a strict RED-GREEN-REFACTOR cycle, ensuring all production code is backed by failing test verification first.
106
- 3. **`systematic-debugging`** — Guides the agent to locate the root cause of failures via scientific hypothesis testing, avoiding "guess-and-check" thrashing.
107
- 4. **`verifying-development-work`** — Requires running actual test/build commands and presenting concrete evidence before any success claim, with a final review pass over the change before work is handed back.
108
- 5. **`writing-skills`** — Handles future custom skill authoring and updates.
109
-
110
- ## What's inside
111
-
112
- **Testing & Verification** — `test-driven-development`, `verifying-development-work`
113
-
114
- **Debugging** — `systematic-debugging`
115
-
116
- **Workspace & Git Hygiene** — `working-in-isolation`
117
-
118
- **Meta & Extension** — `writing-skills`
75
+ 1. **`hardening-plans`** — Instructs the agent to re-review any plans before it hands them back to you, looking for hallucinations, logical inconsistencies, and other common plan mistakes.
76
+ 2. **`systematic-debugging`** — Guides the agent to locate the root cause of failures via scientific hypothesis testing, avoiding "guess-and-check" thrashing.
77
+ 3. **`working-in-isolation`** — Establishes an isolated workspace (worktree or branch) so new work doesn't collide with existing or in-progress work, keeping protected branches like `main` clean.
78
+ 4. **`test-driven-development`** — Enforces a strict RED-GREEN-REFACTOR cycle, ensuring all code is backed by failing test verification first.
79
+ 5. **`verifying-development-work`** — Requires running actual test/build commands and presenting concrete evidence before any success claim, with a final review pass over the change, code AND comments, before work is handed back.
80
+ 6. **`writing-skills`** — Helps write and edit skills, following the same best practices that guide slow-powers itself.
81
+ 7. **`evaluating-skills`** — Teaches the agent how to run skill evals, so the value of skills and prose changes can be objectively assessed.
119
82
 
120
83
  ## Intended Workflows
121
84
 
122
- The skills declare lightweight prerequisite / next-step gates so the agent knows the intended sequence. These gates **suggest** what comes before and after a skill once it is invoked; they do **not** restrict when any skill can be invoked. An agent may invoke `test-driven-development`, `verifying-development-work`, or any other skill at any point.
85
+ The skills declare prerequisite / next-step gates so the agent follows an intended skill sequence. These gates **suggest** what comes before and after a skill once it is invoked; they do **not** restrict when any skill can be invoked.
123
86
 
124
87
  **Plan mode:** plan mode → `hardening-plans` → `working-in-isolation` → `test-driven-development` → `verifying-development-work`
125
88
 
126
89
  **Debugging:** (`working-in-isolation`) → `systematic-debugging` → `verifying-development-work`
127
90
 
128
- `hardening-plans` points to `test-driven-development` as its next step, and `test-driven-development` requires `working-in-isolation` first — so isolation is reached as TDD's prerequisite, producing the plan-mode order above.
129
-
130
91
  ## Philosophy
131
92
 
93
+ Slow-powers skills follow a few opinionated principles:
94
+
132
95
  - Test-Driven Development — write tests first, always
133
- - Systematic over ad-hoc process over guessing
134
- - Complexity reductionsimplicity as a primary goal
135
- - Evidence over claimsverify before declaring success
96
+ - Plan modeeven small features should start with a plan
97
+ - Prefer branches to worktrees branches are easier for human review and testing, worktrees are better for agent isolation
98
+ - Skills need evalsevals prove a new skill is better than no skill, and an edit to an existing skill is valuable
136
99
 
137
100
  ## Repository structure
138
101
 
@@ -146,7 +109,6 @@ Flat layout — skills and assets live at root, harness-specific integration liv
146
109
  - `opencode/` — OpenCode plugin
147
110
  - `.claude-plugin/marketplace.json` — Claude Code marketplace registry
148
111
  - `package.json` — OpenCode plugin manifest + dev tooling
149
- - `harness-parity-check.md` — Instructions for an agent in any harness to audit plugin-distribution gaps and prep to close one (the eval runner's counterpart lives at `skills/evaluating-skills/harness-parity.md`)
150
112
 
151
113
  ## Releasing
152
114
 
package/bootstrap.md CHANGED
@@ -1,15 +1,9 @@
1
- # Instructions for using Slow-powers Skills
2
-
3
1
  <EXTREMELY-IMPORTANT>
4
2
  If you think there is even a 1% chance a skill might apply to what you are doing, you ABSOLUTELY MUST invoke the skill.
5
3
  IF A SKILL APPLIES TO YOUR TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT.
6
4
  This is not negotiable. This is not optional. You cannot rationalize your way out of this.
7
5
  </EXTREMELY-IMPORTANT>
8
6
 
9
- These skills are quality gates on procedures you already run. They don't grant abilities — they enhance how you execute work you already know how to do.
10
-
11
- When you reach a gate moment — about to code, hand off a plan, debug, claim done, finish a branch — the matching skill's description surfaces it. Load it then, even if your procedure already feels complete. That "feels complete" is the gate's target.
12
-
13
7
  ## The Rule
14
8
 
15
9
  **Invoke relevant or requested skills BEFORE any response or action.** Even a 1% chance a skill might apply means that you should invoke the skill to check. If an invoked skill turns out to be wrong for the situation, you don't need to use it.
@@ -55,7 +49,7 @@ These thoughts mean STOP — you're rationalizing:
55
49
 
56
50
  ## Instruction Priority
57
51
 
58
- Slow-powers skills override default system behavior where they conflict, but user instructions always take precedence:
52
+ Skills override default system behavior where they conflict, but user instructions always take precedence:
59
53
  1. **User's explicit instructions** (CLAUDE.md, AGENTS.md, direct requests) — highest priority
60
54
  2. **Slow-powers skills / bootstrap guidelines** — override default system prompt behavior where they conflict
61
55
  3. **Default system prompt** — lowest priority
@@ -3,8 +3,10 @@
3
3
  *
4
4
  * Injects slow-powers bootstrap context via system prompt transform.
5
5
  * Auto-registers skills directory via config hook (no symlinks needed).
6
+ * Intercepts plan file writes in plan mode and triggers hardening-plans skill.
6
7
  */
7
8
 
9
+ import { createHash } from "node:crypto";
8
10
  import fs from "node:fs";
9
11
  import path from "node:path";
10
12
  import { fileURLToPath } from "node:url";
@@ -15,17 +17,19 @@ const bootstrapPath = path.resolve(__dirname, "../../bootstrap.md");
15
17
  // First line of bootstrap.md — used as an idempotency check so we don't
16
18
  // re-inject when OpenCode reruns the transform on an already-transformed
17
19
  // message array. Specific enough that user prompts won't accidentally match.
18
- const bootstrapLeadingPhrase = "# Instructions for using Slow-powers Skills";
20
+ const bootstrapLeadingPhrase = "<EXTREMELY-IMPORTANT>";
19
21
 
20
22
  // Module-level cache for bootstrap content.
21
23
  // The bootstrap.md file does not change during a session, so reading it
22
24
  // once eliminates redundant fs work on every agent step.
23
25
  let _bootstrapCache; // undefined = not yet loaded, null = file missing
24
26
 
25
- export const SlowPowersPlugin = async ({
26
- client: _client,
27
- directory: _directory,
28
- }) => {
27
+ // Deduplication state for plan hardening
28
+ // Map<filePath, contentHash> - tracks processed plan file versions
29
+ const processedPlanHashes = new Map();
30
+ const HARDENED_MARKER = "<!-- hardened-plans -->";
31
+
32
+ export const SlowPowersPlugin = async ({ client, directory: _directory }) => {
29
33
  // Helper to load bootstrap content (cached after first call)
30
34
  const getBootstrapContent = () => {
31
35
  if (_bootstrapCache !== undefined) return _bootstrapCache;
@@ -40,6 +44,61 @@ export const SlowPowersPlugin = async ({
40
44
  return _bootstrapCache;
41
45
  };
42
46
 
47
+ const hashContent = (content) =>
48
+ createHash("sha256").update(content).digest("hex");
49
+
50
+ const isPlanHardened = (content) => content.includes(HARDENED_MARKER);
51
+
52
+ const handlePlanFileEdit = async (event) => {
53
+ const filePath = event.properties.file;
54
+ const sessionID = event.properties.sessionID;
55
+
56
+ if (!filePath || !sessionID) return;
57
+
58
+ if (!filePath.match(/\.opencode\/plans\/.*\.md$/)) return;
59
+
60
+ let session;
61
+ try {
62
+ session = await client.session.get({ path: { id: sessionID } });
63
+ } catch {
64
+ return;
65
+ }
66
+ if (session.agent !== "plan") return;
67
+
68
+ let content;
69
+ try {
70
+ content = fs.readFileSync(filePath, "utf8");
71
+ } catch {
72
+ return;
73
+ }
74
+
75
+ if (isPlanHardened(content)) return;
76
+
77
+ const contentHash = hashContent(content);
78
+ const previousHash = processedPlanHashes.get(filePath);
79
+ if (previousHash === contentHash) return;
80
+
81
+ processedPlanHashes.set(filePath, contentHash);
82
+
83
+ try {
84
+ await client.session.prompt({
85
+ path: { id: sessionID },
86
+ body: {
87
+ noReply: true,
88
+ parts: [
89
+ {
90
+ type: "text",
91
+ text: `The plan at ${filePath} has been written. Please run the hardening-plans skill on this plan file to review it for hallucinations, missing file references, vague steps, and coverage gaps before presenting it. Update the file in place with the hardened version. Add ${HARDENED_MARKER} marker when done.`,
92
+ },
93
+ ],
94
+ },
95
+ });
96
+ } catch (err) {
97
+ processedPlanHashes.delete(filePath);
98
+ console.error("[slow-powers] Failed to trigger hardening-plans:", err);
99
+ }
100
+ };
101
+
43
102
  return {
44
103
  // Inject skills path into live config so OpenCode discovers slow-powers skills
45
104
  // without requiring manual symlinks or config file edits.
@@ -82,5 +141,10 @@ export const SlowPowersPlugin = async ({
82
141
 
83
142
  firstUser.parts.unshift({ type: "text", text: bootstrap });
84
143
  },
144
+
145
+ event: async ({ event }) => {
146
+ if (event.type !== "file.edited") return;
147
+ await handlePlanFileEdit(event);
148
+ },
85
149
  };
86
150
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slowdini/slow-powers-opencode",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Slow-powers — structured development workflows for coding agents (TDD, debugging, verification, git hygiene)",
5
5
  "type": "module",
6
6
  "main": "./opencode/plugins/slow-powers.js",
@@ -36,19 +36,19 @@
36
36
  },
37
37
  "scripts": {
38
38
  "test": "bun test --path-ignore-patterns='skills-workspace/**'",
39
- "evals": "bun run skills/evaluating-skills/runner/run.ts --skill-dir ./skills --bootstrap ./bootstrap.md",
40
- "evals:snapshot": "bun run skills/evaluating-skills/runner/run.ts snapshot --skill-dir ./skills",
41
- "evals:validate": "bun run skills/evaluating-skills/runner/validate-all.ts --skill-dir ./skills",
42
- "evals:ingest": "bun run skills/evaluating-skills/runner/run.ts ingest --skill-dir ./skills",
43
- "evals:finalize": "bun run skills/evaluating-skills/runner/run.ts finalize --skill-dir ./skills",
44
- "evals:record-runs": "bun run skills/evaluating-skills/runner/record-runs.ts --skill-dir ./skills",
45
- "evals:fill-transcripts": "bun run skills/evaluating-skills/runner/fill-transcripts.ts --skill-dir ./skills",
46
- "evals:detect-stray-writes": "bun run skills/evaluating-skills/runner/detect-stray-writes.ts --skill-dir ./skills",
47
- "evals:teardown-guard": "bun run skills/evaluating-skills/runner/run.ts teardown-guard --skill-dir ./skills",
48
- "evals:teardown": "bun run skills/evaluating-skills/runner/run.ts teardown --skill-dir ./skills",
49
- "evals:grade": "bun run skills/evaluating-skills/runner/grade.ts --skill-dir ./skills",
50
- "evals:aggregate": "bun run skills/evaluating-skills/runner/aggregate.ts --skill-dir ./skills",
51
- "evals:promote-baseline": "bun run skills/evaluating-skills/runner/promote-baseline.ts --skill-dir ./skills",
39
+ "evals": "bunx @slowdini/eval-runner run --skill-dir ./skills --bootstrap ./bootstrap.md",
40
+ "evals:snapshot": "bunx @slowdini/eval-runner snapshot --skill-dir ./skills",
41
+ "evals:validate": "bunx @slowdini/eval-runner validate --skill-dir ./skills",
42
+ "evals:ingest": "bunx @slowdini/eval-runner ingest --skill-dir ./skills",
43
+ "evals:finalize": "bunx @slowdini/eval-runner finalize --skill-dir ./skills",
44
+ "evals:record-runs": "bunx @slowdini/eval-runner record-runs --skill-dir ./skills",
45
+ "evals:fill-transcripts": "bunx @slowdini/eval-runner fill-transcripts --skill-dir ./skills",
46
+ "evals:detect-stray-writes": "bunx @slowdini/eval-runner detect-stray-writes --skill-dir ./skills",
47
+ "evals:teardown-guard": "bunx @slowdini/eval-runner teardown-guard --skill-dir ./skills",
48
+ "evals:teardown": "bunx @slowdini/eval-runner teardown --skill-dir ./skills",
49
+ "evals:grade": "bunx @slowdini/eval-runner grade --skill-dir ./skills",
50
+ "evals:aggregate": "bunx @slowdini/eval-runner aggregate --skill-dir ./skills",
51
+ "evals:promote-baseline": "bunx @slowdini/eval-runner promote-baseline --skill-dir ./skills",
52
52
  "check": "biome check --write .",
53
53
  "check:ci": "biome check --error-on-warnings .",
54
54
  "typecheck": "tsc --noEmit",
@@ -62,8 +62,5 @@
62
62
  "husky": "^9.1.7",
63
63
  "lint-staged": "^17.0.4",
64
64
  "typescript": "^6.0.3"
65
- },
66
- "dependencies": {
67
- "ajv": "^8.20.0"
68
65
  }
69
66
  }