@slowdini/slow-powers-opencode 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.
Files changed (31) hide show
  1. package/README.md +3 -3
  2. package/bootstrap.md +19 -20
  3. package/package.json +1 -1
  4. package/skills/auditing-slow-powers-usage/evals/baseline/NOTES.md +8 -0
  5. package/skills/auditing-slow-powers-usage/evals/evals.json +2 -2
  6. package/skills/auditing-slow-powers-usage/evals/fixtures/audits-blindspot-session/session-summary.md +1 -1
  7. package/skills/evaluating-skills/SKILL.md +1 -1
  8. package/skills/evaluating-skills/evals/evals.json +1 -1
  9. package/skills/finishing-a-development-branch/SKILL.md +1 -1
  10. package/skills/systematic-debugging/condition-based-waiting.md +10 -11
  11. package/skills/systematic-debugging/root-cause-tracing.md +31 -33
  12. package/skills/working-in-isolation/SKILL.md +58 -0
  13. package/skills/working-in-isolation/evals/baseline/BASELINE.md +22 -0
  14. package/skills/working-in-isolation/evals/baseline/NOTES.md +67 -0
  15. package/skills/working-in-isolation/evals/baseline/benchmark.json +51 -0
  16. package/skills/working-in-isolation/evals/baseline/grading/base-branch-checkout__with_skill.json +46 -0
  17. package/skills/working-in-isolation/evals/baseline/grading/base-branch-checkout__without_skill.json +31 -0
  18. package/skills/working-in-isolation/evals/baseline/grading/dirty-tree-worktree__with_skill.json +39 -0
  19. package/skills/working-in-isolation/evals/baseline/grading/dirty-tree-worktree__without_skill.json +24 -0
  20. package/skills/working-in-isolation/evals/baseline/grading/feature-branch-in-place__with_skill.json +32 -0
  21. package/skills/working-in-isolation/evals/baseline/grading/feature-branch-in-place__without_skill.json +17 -0
  22. package/skills/working-in-isolation/evals/baseline/grading/seeded-on-main-momentum__with_skill.json +39 -0
  23. package/skills/working-in-isolation/evals/baseline/grading/seeded-on-main-momentum__without_skill.json +24 -0
  24. package/skills/working-in-isolation/evals/baseline/grading/typo-no-worktree__with_skill.json +32 -0
  25. package/skills/working-in-isolation/evals/baseline/grading/typo-no-worktree__without_skill.json +17 -0
  26. package/skills/working-in-isolation/evals/evals.json +87 -0
  27. package/skills/writing-skills/SKILL.md +179 -195
  28. package/skills/using-git-worktrees/SKILL.md +0 -70
  29. package/skills/using-git-worktrees/evals/evals.json +0 -40
  30. package/skills/writing-skills/graphviz-conventions.dot +0 -172
  31. package/skills/writing-skills/scripts/render-graphs.js +0 -181
@@ -1,172 +0,0 @@
1
- digraph STYLE_GUIDE {
2
- // The style guide for our process DSL, written in the DSL itself
3
-
4
- // Node type examples with their shapes
5
- subgraph cluster_node_types {
6
- label="NODE TYPES AND SHAPES";
7
-
8
- // Questions are diamonds
9
- "Is this a question?" [shape=diamond];
10
-
11
- // Actions are boxes (default)
12
- "Take an action" [shape=box];
13
-
14
- // Commands are plaintext
15
- "git commit -m 'msg'" [shape=plaintext];
16
-
17
- // States are ellipses
18
- "Current state" [shape=ellipse];
19
-
20
- // Warnings are octagons
21
- "STOP: Critical warning" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
22
-
23
- // Entry/exit are double circles
24
- "Process starts" [shape=doublecircle];
25
- "Process complete" [shape=doublecircle];
26
-
27
- // Examples of each
28
- "Is test passing?" [shape=diamond];
29
- "Write test first" [shape=box];
30
- "npm test" [shape=plaintext];
31
- "I am stuck" [shape=ellipse];
32
- "NEVER use git add -A" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
33
- }
34
-
35
- // Edge naming conventions
36
- subgraph cluster_edge_types {
37
- label="EDGE LABELS";
38
-
39
- "Binary decision?" [shape=diamond];
40
- "Yes path" [shape=box];
41
- "No path" [shape=box];
42
-
43
- "Binary decision?" -> "Yes path" [label="yes"];
44
- "Binary decision?" -> "No path" [label="no"];
45
-
46
- "Multiple choice?" [shape=diamond];
47
- "Option A" [shape=box];
48
- "Option B" [shape=box];
49
- "Option C" [shape=box];
50
-
51
- "Multiple choice?" -> "Option A" [label="condition A"];
52
- "Multiple choice?" -> "Option B" [label="condition B"];
53
- "Multiple choice?" -> "Option C" [label="otherwise"];
54
-
55
- "Process A done" [shape=doublecircle];
56
- "Process B starts" [shape=doublecircle];
57
-
58
- "Process A done" -> "Process B starts" [label="triggers", style=dotted];
59
- }
60
-
61
- // Naming patterns
62
- subgraph cluster_naming_patterns {
63
- label="NAMING PATTERNS";
64
-
65
- // Questions end with ?
66
- "Should I do X?";
67
- "Can this be Y?";
68
- "Is Z true?";
69
- "Have I done W?";
70
-
71
- // Actions start with verb
72
- "Write the test";
73
- "Search for patterns";
74
- "Commit changes";
75
- "Ask for help";
76
-
77
- // Commands are literal
78
- "grep -r 'pattern' .";
79
- "git status";
80
- "npm run build";
81
-
82
- // States describe situation
83
- "Test is failing";
84
- "Build complete";
85
- "Stuck on error";
86
- }
87
-
88
- // Process structure template
89
- subgraph cluster_structure {
90
- label="PROCESS STRUCTURE TEMPLATE";
91
-
92
- "Trigger: Something happens" [shape=ellipse];
93
- "Initial check?" [shape=diamond];
94
- "Main action" [shape=box];
95
- "git status" [shape=plaintext];
96
- "Another check?" [shape=diamond];
97
- "Alternative action" [shape=box];
98
- "STOP: Don't do this" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
99
- "Process complete" [shape=doublecircle];
100
-
101
- "Trigger: Something happens" -> "Initial check?";
102
- "Initial check?" -> "Main action" [label="yes"];
103
- "Initial check?" -> "Alternative action" [label="no"];
104
- "Main action" -> "git status";
105
- "git status" -> "Another check?";
106
- "Another check?" -> "Process complete" [label="ok"];
107
- "Another check?" -> "STOP: Don't do this" [label="problem"];
108
- "Alternative action" -> "Process complete";
109
- }
110
-
111
- // When to use which shape
112
- subgraph cluster_shape_rules {
113
- label="WHEN TO USE EACH SHAPE";
114
-
115
- "Choosing a shape" [shape=ellipse];
116
-
117
- "Is it a decision?" [shape=diamond];
118
- "Use diamond" [shape=diamond, style=filled, fillcolor=lightblue];
119
-
120
- "Is it a command?" [shape=diamond];
121
- "Use plaintext" [shape=plaintext, style=filled, fillcolor=lightgray];
122
-
123
- "Is it a warning?" [shape=diamond];
124
- "Use octagon" [shape=octagon, style=filled, fillcolor=pink];
125
-
126
- "Is it entry/exit?" [shape=diamond];
127
- "Use doublecircle" [shape=doublecircle, style=filled, fillcolor=lightgreen];
128
-
129
- "Is it a state?" [shape=diamond];
130
- "Use ellipse" [shape=ellipse, style=filled, fillcolor=lightyellow];
131
-
132
- "Default: use box" [shape=box, style=filled, fillcolor=lightcyan];
133
-
134
- "Choosing a shape" -> "Is it a decision?";
135
- "Is it a decision?" -> "Use diamond" [label="yes"];
136
- "Is it a decision?" -> "Is it a command?" [label="no"];
137
- "Is it a command?" -> "Use plaintext" [label="yes"];
138
- "Is it a command?" -> "Is it a warning?" [label="no"];
139
- "Is it a warning?" -> "Use octagon" [label="yes"];
140
- "Is it a warning?" -> "Is it entry/exit?" [label="no"];
141
- "Is it entry/exit?" -> "Use doublecircle" [label="yes"];
142
- "Is it entry/exit?" -> "Is it a state?" [label="no"];
143
- "Is it a state?" -> "Use ellipse" [label="yes"];
144
- "Is it a state?" -> "Default: use box" [label="no"];
145
- }
146
-
147
- // Good vs bad examples
148
- subgraph cluster_examples {
149
- label="GOOD VS BAD EXAMPLES";
150
-
151
- // Good: specific and shaped correctly
152
- "Test failed" [shape=ellipse];
153
- "Read error message" [shape=box];
154
- "Can reproduce?" [shape=diamond];
155
- "git diff HEAD~1" [shape=plaintext];
156
- "NEVER ignore errors" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
157
-
158
- "Test failed" -> "Read error message";
159
- "Read error message" -> "Can reproduce?";
160
- "Can reproduce?" -> "git diff HEAD~1" [label="yes"];
161
-
162
- // Bad: vague and wrong shapes
163
- bad_1 [label="Something wrong", shape=box]; // Should be ellipse (state)
164
- bad_2 [label="Fix it", shape=box]; // Too vague
165
- bad_3 [label="Check", shape=box]; // Should be diamond
166
- bad_4 [label="Run command", shape=box]; // Should be plaintext with actual command
167
-
168
- bad_1 -> bad_2;
169
- bad_2 -> bad_3;
170
- bad_3 -> bad_4;
171
- }
172
- }
@@ -1,181 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Render graphviz diagrams from a skill's SKILL.md to SVG files.
5
- *
6
- * Usage (run from the writing-skills directory):
7
- * ./scripts/render-graphs.js <skill-directory> # Render each diagram separately
8
- * ./scripts/render-graphs.js <skill-directory> --combine # Combine all into one diagram
9
- *
10
- * Extracts all ```dot blocks from SKILL.md and renders to SVG.
11
- * Useful for visualizing skill process flows.
12
- *
13
- * Requires: graphviz (dot) installed on system
14
- */
15
-
16
- const fs = require("node:fs");
17
- const path = require("node:path");
18
- const { execSync } = require("node:child_process");
19
-
20
- function extractDotBlocks(markdown) {
21
- const blocks = [];
22
- const regex = /```dot\n([\s\S]*?)```/g;
23
- let match;
24
-
25
- match = regex.exec(markdown);
26
- while (match !== null) {
27
- const content = match[1].trim();
28
-
29
- // Extract digraph name
30
- const nameMatch = content.match(/digraph\s+(\w+)/);
31
- const name = nameMatch ? nameMatch[1] : `graph_${blocks.length + 1}`;
32
-
33
- blocks.push({ name, content });
34
- match = regex.exec(markdown);
35
- }
36
-
37
- return blocks;
38
- }
39
-
40
- function extractGraphBody(dotContent) {
41
- // Extract just the body (nodes and edges) from a digraph
42
- const match = dotContent.match(/digraph\s+\w+\s*\{([\s\S]*)\}/);
43
- if (!match) return "";
44
-
45
- let body = match[1];
46
-
47
- // Remove rankdir (we'll set it once at the top level)
48
- body = body.replace(/^\s*rankdir\s*=\s*\w+\s*;?\s*$/gm, "");
49
-
50
- return body.trim();
51
- }
52
-
53
- function combineGraphs(blocks, skillName) {
54
- const bodies = blocks.map((block, i) => {
55
- const body = extractGraphBody(block.content);
56
- // Wrap each subgraph in a cluster for visual grouping
57
- return ` subgraph cluster_${i} {
58
- label="${block.name}";
59
- ${body
60
- .split("\n")
61
- .map((line) => ` ${line}`)
62
- .join("\n")}
63
- }`;
64
- });
65
-
66
- return `digraph ${skillName}_combined {
67
- rankdir=TB;
68
- compound=true;
69
- newrank=true;
70
-
71
- ${bodies.join("\n\n")}
72
- }`;
73
- }
74
-
75
- function renderToSvg(dotContent) {
76
- try {
77
- return execSync("dot -Tsvg", {
78
- input: dotContent,
79
- encoding: "utf-8",
80
- maxBuffer: 10 * 1024 * 1024,
81
- });
82
- } catch (err) {
83
- console.error("Error running dot:", err.message);
84
- if (err.stderr) console.error(err.stderr.toString());
85
- return null;
86
- }
87
- }
88
-
89
- function main() {
90
- const args = process.argv.slice(2);
91
- const combine = args.includes("--combine");
92
- const skillDirArg = args.find((a) => !a.startsWith("--"));
93
-
94
- if (!skillDirArg) {
95
- console.error(
96
- "Usage: scripts/render-graphs.js <skill-directory> [--combine]",
97
- );
98
- console.error("");
99
- console.error("Options:");
100
- console.error(" --combine Combine all diagrams into one SVG");
101
- console.error("");
102
- console.error("Example (run from the writing-skills directory):");
103
- console.error(
104
- " ./scripts/render-graphs.js ../subagent-driven-development",
105
- );
106
- console.error(
107
- " ./scripts/render-graphs.js ../subagent-driven-development --combine",
108
- );
109
- process.exit(1);
110
- }
111
-
112
- const skillDir = path.resolve(skillDirArg);
113
- const skillFile = path.join(skillDir, "SKILL.md");
114
- const skillName = path.basename(skillDir).replace(/-/g, "_");
115
-
116
- if (!fs.existsSync(skillFile)) {
117
- console.error(`Error: ${skillFile} not found`);
118
- process.exit(1);
119
- }
120
-
121
- // Check if dot is available
122
- try {
123
- execSync("which dot", { encoding: "utf-8" });
124
- } catch {
125
- console.error("Error: graphviz (dot) not found. Install with:");
126
- console.error(" brew install graphviz # macOS");
127
- console.error(" apt install graphviz # Linux");
128
- process.exit(1);
129
- }
130
-
131
- const markdown = fs.readFileSync(skillFile, "utf-8");
132
- const blocks = extractDotBlocks(markdown);
133
-
134
- if (blocks.length === 0) {
135
- console.log("No ```dot blocks found in", skillFile);
136
- process.exit(0);
137
- }
138
-
139
- console.log(
140
- `Found ${blocks.length} diagram(s) in ${path.basename(skillDir)}/SKILL.md`,
141
- );
142
-
143
- const outputDir = path.join(skillDir, "diagrams");
144
- if (!fs.existsSync(outputDir)) {
145
- fs.mkdirSync(outputDir);
146
- }
147
-
148
- if (combine) {
149
- // Combine all graphs into one
150
- const combined = combineGraphs(blocks, skillName);
151
- const svg = renderToSvg(combined);
152
- if (svg) {
153
- const outputPath = path.join(outputDir, `${skillName}_combined.svg`);
154
- fs.writeFileSync(outputPath, svg);
155
- console.log(` Rendered: ${skillName}_combined.svg`);
156
-
157
- // Also write the dot source for debugging
158
- const dotPath = path.join(outputDir, `${skillName}_combined.dot`);
159
- fs.writeFileSync(dotPath, combined);
160
- console.log(` Source: ${skillName}_combined.dot`);
161
- } else {
162
- console.error(" Failed to render combined diagram");
163
- }
164
- } else {
165
- // Render each separately
166
- for (const block of blocks) {
167
- const svg = renderToSvg(block.content);
168
- if (svg) {
169
- const outputPath = path.join(outputDir, `${block.name}.svg`);
170
- fs.writeFileSync(outputPath, svg);
171
- console.log(` Rendered: ${block.name}.svg`);
172
- } else {
173
- console.error(` Failed: ${block.name}`);
174
- }
175
- }
176
- }
177
-
178
- console.log(`\nOutput: ${outputDir}/`);
179
- }
180
-
181
- main();