@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.
- package/README.md +34 -72
- package/bootstrap.md +1 -7
- package/opencode/plugins/slow-powers.js +69 -5
- package/package.json +14 -17
- package/skills/evaluating-skills/SKILL.md +90 -338
- package/skills/evaluating-skills/evals/baseline/BASELINE.md +23 -0
- package/skills/evaluating-skills/evals/baseline/NOTES.md +40 -0
- package/skills/evaluating-skills/evals/baseline/benchmark.json +54 -0
- package/skills/evaluating-skills/evals/baseline/grading/deterministic-edit-skip__new_skill.json +39 -0
- package/skills/evaluating-skills/evals/baseline/grading/deterministic-edit-skip__old_skill.json +39 -0
- package/skills/evaluating-skills/evals/baseline/grading/did-my-revision-help__new_skill.json +39 -0
- package/skills/evaluating-skills/evals/baseline/grading/did-my-revision-help__old_skill.json +39 -0
- package/skills/evaluating-skills/evals/baseline/grading/is-new-skill-ready-to-ship__new_skill.json +32 -0
- package/skills/evaluating-skills/evals/baseline/grading/is-new-skill-ready-to-ship__old_skill.json +32 -0
- package/skills/hardening-plans/SKILL.md +29 -7
- package/skills/hardening-plans/evals/baseline/BASELINE.md +11 -6
- package/skills/hardening-plans/evals/baseline/NOTES.md +72 -58
- package/skills/hardening-plans/evals/baseline/benchmark.json +25 -25
- package/skills/hardening-plans/evals/baseline/grading/concrete-todo-app-plan__new_skill.json +2 -2
- package/skills/hardening-plans/evals/baseline/grading/concrete-todo-app-plan__old_skill.json +2 -2
- package/skills/hardening-plans/evals/baseline/grading/docs-refactor-plan-mode__new_skill.json +39 -0
- package/skills/hardening-plans/evals/baseline/grading/docs-refactor-plan-mode__old_skill.json +39 -0
- package/skills/hardening-plans/evals/baseline/grading/oauth-task-breakdown-cold__new_skill.json +39 -0
- package/skills/hardening-plans/evals/baseline/grading/oauth-task-breakdown-cold__old_skill.json +39 -0
- package/skills/hardening-plans/evals/baseline/grading/research-plan-no-required-skill__new_skill.json +32 -0
- package/skills/hardening-plans/evals/baseline/grading/research-plan-no-required-skill__old_skill.json +32 -0
- package/skills/hardening-plans/evals/baseline/grading/seeded-plan-mode-todo-app-adversarial__new_skill.json +39 -0
- package/skills/hardening-plans/evals/baseline/grading/seeded-plan-mode-todo-app-adversarial__old_skill.json +39 -0
- package/skills/hardening-plans/evals/baseline/grading/seeded-plan-mode-todo-app__new_skill.json +39 -0
- package/skills/hardening-plans/evals/baseline/grading/seeded-plan-mode-todo-app__old_skill.json +39 -0
- package/skills/hardening-plans/evals/baseline/grading/seeded-review-catches-defects__new_skill.json +3 -3
- package/skills/hardening-plans/evals/baseline/grading/seeded-review-catches-defects__old_skill.json +8 -8
- package/skills/hardening-plans/evals/baseline/grading/structural-refactor-cold__new_skill.json +39 -0
- package/skills/hardening-plans/evals/baseline/grading/structural-refactor-cold__old_skill.json +39 -0
- package/skills/hardening-plans/evals/evals.json +46 -0
- package/skills/test-driven-development/evals/baseline/NOTES.md +2 -2
- package/skills/evaluating-skills/examples/verifying-development-work-evals.json +0 -30
- package/skills/evaluating-skills/harness-details/claude.md +0 -194
- package/skills/evaluating-skills/harness-parity.md +0 -155
- package/skills/evaluating-skills/runner/README.md +0 -163
- package/skills/evaluating-skills/runner/adapters/claude-code-session.test.ts +0 -56
- package/skills/evaluating-skills/runner/adapters/claude-code-session.ts +0 -43
- package/skills/evaluating-skills/runner/adapters/claude-code-transcript.test.ts +0 -485
- package/skills/evaluating-skills/runner/adapters/claude-code-transcript.ts +0 -242
- package/skills/evaluating-skills/runner/aggregate.test.ts +0 -484
- package/skills/evaluating-skills/runner/aggregate.ts +0 -269
- package/skills/evaluating-skills/runner/context.test.ts +0 -181
- package/skills/evaluating-skills/runner/context.ts +0 -90
- package/skills/evaluating-skills/runner/detect-stray-writes.test.ts +0 -396
- package/skills/evaluating-skills/runner/detect-stray-writes.ts +0 -288
- package/skills/evaluating-skills/runner/fill-transcripts.test.ts +0 -73
- package/skills/evaluating-skills/runner/fill-transcripts.ts +0 -154
- package/skills/evaluating-skills/runner/grade.test.ts +0 -347
- package/skills/evaluating-skills/runner/grade.ts +0 -603
- package/skills/evaluating-skills/runner/guard/guard.ts +0 -49
- package/skills/evaluating-skills/runner/guard/install.test.ts +0 -92
- package/skills/evaluating-skills/runner/guard/install.ts +0 -147
- package/skills/evaluating-skills/runner/guard/policy.test.ts +0 -128
- package/skills/evaluating-skills/runner/guard/policy.ts +0 -74
- package/skills/evaluating-skills/runner/plugin-shadow.test.ts +0 -228
- package/skills/evaluating-skills/runner/plugin-shadow.ts +0 -201
- package/skills/evaluating-skills/runner/profiles/claude-code/plan-mode.md +0 -11
- package/skills/evaluating-skills/runner/promote-baseline.test.ts +0 -281
- package/skills/evaluating-skills/runner/promote-baseline.ts +0 -204
- package/skills/evaluating-skills/runner/record-runs.test.ts +0 -314
- package/skills/evaluating-skills/runner/record-runs.ts +0 -209
- package/skills/evaluating-skills/runner/run.test.ts +0 -1703
- package/skills/evaluating-skills/runner/run.ts +0 -1388
- package/skills/evaluating-skills/runner/sandbox-policy.ts +0 -94
- package/skills/evaluating-skills/runner/types.ts +0 -121
- package/skills/evaluating-skills/runner/validate-all.ts +0 -54
- package/skills/evaluating-skills/runner/validate-schema.test.ts +0 -99
- package/skills/evaluating-skills/runner/validate-schema.ts +0 -51
- package/skills/evaluating-skills/runner/validate.test.ts +0 -56
- package/skills/evaluating-skills/runner/validate.ts +0 -21
- package/skills/evaluating-skills/runner/workspace-teardown.test.ts +0 -227
- package/skills/evaluating-skills/runner/workspace-teardown.ts +0 -136
- package/skills/evaluating-skills/schema/evals.schema.json +0 -105
- package/skills/evaluating-skills/schema/grading.schema.json +0 -84
- package/skills/evaluating-skills/schema/run-record.schema.json +0 -80
- package/skills/evaluating-skills/schema/stray-writes.schema.json +0 -80
- package/skills/evaluating-skills/templates/eval-task-prompt.md +0 -69
- package/skills/evaluating-skills/templates/evals.json.example +0 -17
- package/skills/evaluating-skills/templates/judge-prompt.md +0 -56
- 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
|
|
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
|
-
|
|
11
|
+
[Claude Code](#claude-code) · [Codex CLI](#codex-cli) · [OpenCode](#opencode)
|
|
16
12
|
|
|
17
|
-
##
|
|
13
|
+
## How it works
|
|
18
14
|
|
|
19
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
23
|
+
Slow-powers guides agents through an evidence-backed, no-guess debugging approach. No "It works now!" without proof.
|
|
36
24
|
|
|
37
|
-
|
|
25
|
+
### Writing skills
|
|
38
26
|
|
|
39
|
-
|
|
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
|
-
|
|
29
|
+
Skill evaluations are powered by [@slowdini/eval-runner](https://github.com/slowdini/eval-runner)
|
|
42
30
|
|
|
43
|
-
Installation
|
|
44
|
-
Slow-powers separately for each.
|
|
31
|
+
## Installation
|
|
45
32
|
|
|
46
33
|
### Install with your agent
|
|
47
34
|
|
|
48
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
99
|
-
|
|
100
|
-
## The Core Execution Utilities
|
|
71
|
+
## The skills
|
|
101
72
|
|
|
102
|
-
Slow-powers provides a set of highly focused
|
|
73
|
+
Slow-powers provides a set of highly focused skills that ensure your agent operates with maximum discipline:
|
|
103
74
|
|
|
104
|
-
1. **`
|
|
105
|
-
2. **`
|
|
106
|
-
3. **`
|
|
107
|
-
4. **`
|
|
108
|
-
5. **`
|
|
109
|
-
|
|
110
|
-
|
|
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
|
|
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
|
-
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
96
|
+
- Plan mode — even 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 evals — evals 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
|
-
|
|
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 = "
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
+
"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": "
|
|
40
|
-
"evals:snapshot": "
|
|
41
|
-
"evals:validate": "
|
|
42
|
-
"evals:ingest": "
|
|
43
|
-
"evals:finalize": "
|
|
44
|
-
"evals:record-runs": "
|
|
45
|
-
"evals:fill-transcripts": "
|
|
46
|
-
"evals:detect-stray-writes": "
|
|
47
|
-
"evals:teardown-guard": "
|
|
48
|
-
"evals:teardown": "
|
|
49
|
-
"evals:grade": "
|
|
50
|
-
"evals:aggregate": "
|
|
51
|
-
"evals:promote-baseline": "
|
|
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
|
}
|