supipowers 0.1.0
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/LICENSE +21 -0
- package/README.md +194 -0
- package/bin/install.mjs +220 -0
- package/package.json +38 -0
- package/skills/code-review/SKILL.md +45 -0
- package/skills/debugging/SKILL.md +23 -0
- package/skills/planning/SKILL.md +54 -0
- package/skills/qa-strategy/SKILL.md +32 -0
- package/src/commands/config.ts +70 -0
- package/src/commands/plan.ts +85 -0
- package/src/commands/qa.ts +52 -0
- package/src/commands/release.ts +60 -0
- package/src/commands/review.ts +84 -0
- package/src/commands/run.ts +175 -0
- package/src/commands/status.ts +51 -0
- package/src/commands/supi.ts +42 -0
- package/src/config/defaults.ts +72 -0
- package/src/config/loader.ts +101 -0
- package/src/config/profiles.ts +64 -0
- package/src/config/schema.ts +42 -0
- package/src/index.ts +28 -0
- package/src/lsp/bridge.ts +59 -0
- package/src/lsp/detector.ts +38 -0
- package/src/lsp/setup-guide.ts +81 -0
- package/src/notifications/renderer.ts +67 -0
- package/src/notifications/types.ts +19 -0
- package/src/orchestrator/batch-scheduler.ts +59 -0
- package/src/orchestrator/conflict-resolver.ts +38 -0
- package/src/orchestrator/dispatcher.ts +106 -0
- package/src/orchestrator/prompts.ts +123 -0
- package/src/orchestrator/result-collector.ts +72 -0
- package/src/qa/detector.ts +61 -0
- package/src/qa/report.ts +22 -0
- package/src/qa/runner.ts +46 -0
- package/src/quality/ai-review-gate.ts +43 -0
- package/src/quality/gate-runner.ts +67 -0
- package/src/quality/lsp-gate.ts +24 -0
- package/src/quality/test-gate.ts +39 -0
- package/src/release/analyzer.ts +22 -0
- package/src/release/notes.ts +26 -0
- package/src/release/publisher.ts +33 -0
- package/src/storage/plans.ts +129 -0
- package/src/storage/reports.ts +36 -0
- package/src/storage/runs.ts +124 -0
- package/src/types.ts +142 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pedro Mendes
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
<img width="1584" height="672" alt="image" src="https://github.com/user-attachments/assets/ec0f3658-54d7-4471-91ba-39297191f055" />
|
|
2
|
+
|
|
3
|
+
# Supipowers
|
|
4
|
+
|
|
5
|
+
Agentic workflows for [OMP](https://github.com/can1357/oh-my-pi). Plan features, orchestrate sub-agents, run quality gates, and ship releases — all from slash commands.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
bunx supipowers@latest
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The installer checks for OMP, helps you install it if needed, sets up supipowers, and optionally configures LSP servers for your project.
|
|
14
|
+
|
|
15
|
+
### Manual install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Global (all projects)
|
|
19
|
+
omp install npm:supipowers
|
|
20
|
+
|
|
21
|
+
# Project-local
|
|
22
|
+
omp install npm:supipowers -l
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Commands
|
|
26
|
+
|
|
27
|
+
| Command | What it does |
|
|
28
|
+
| --------------- | ------------------------------------------------ |
|
|
29
|
+
| `/supi` | Overview — available commands and project status |
|
|
30
|
+
| `/supi:plan` | Collaborative planning with task breakdown |
|
|
31
|
+
| `/supi:run` | Execute a plan with parallel sub-agents |
|
|
32
|
+
| `/supi:review` | Quality gates at chosen depth |
|
|
33
|
+
| `/supi:qa` | Run test suite and E2E pipeline |
|
|
34
|
+
| `/supi:release` | Version bump, release notes, publish |
|
|
35
|
+
| `/supi:config` | View and edit configuration |
|
|
36
|
+
| `/supi:status` | Check running sub-agents and progress |
|
|
37
|
+
|
|
38
|
+
### Planning
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
/supi:plan add authentication to the API
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Starts an interactive planning session: clarifying questions, approach proposals, then a structured task breakdown saved to `.omp/supipowers/plans/`.
|
|
45
|
+
|
|
46
|
+
For simple tasks, skip the brainstorming:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
/supi:plan --quick add rate limiting middleware
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Running plans
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
/supi:run
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Loads the latest plan and executes it with sub-agent orchestration. Tasks marked `[parallel-safe]` run concurrently (up to the configured limit). Sequential tasks respect their dependency chains.
|
|
59
|
+
|
|
60
|
+
The orchestration loop: dispatch batch → collect results → detect conflicts → retry failures → next batch. If interrupted, re-running picks up where it left off.
|
|
61
|
+
|
|
62
|
+
### Quality review
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
/supi:review # uses default profile
|
|
66
|
+
/supi:review --quick # fast: LSP diagnostics + AI scan
|
|
67
|
+
/supi:review --thorough # deep: full AI review + code quality
|
|
68
|
+
/supi:review --full # everything: tests + E2E + all gates
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### QA
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
/supi:qa # full test suite
|
|
75
|
+
/supi:qa --changed # tests for changed files only
|
|
76
|
+
/supi:qa --e2e # Playwright / E2E only
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Detects your test framework on first run (vitest, jest, pytest, cargo test, go test) and caches it.
|
|
80
|
+
|
|
81
|
+
### Release
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
/supi:release
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Analyzes commits since last tag, suggests a version bump, generates release notes, and publishes (npm, GitHub release, or manual — configured on first run).
|
|
88
|
+
|
|
89
|
+
## Configuration
|
|
90
|
+
|
|
91
|
+
Layered config: project (`.omp/supipowers/config.json`) overrides global (`~/.omp/supipowers/config.json`).
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
/supi:config # view current config
|
|
95
|
+
/supi:config set orchestration.maxParallelAgents 5
|
|
96
|
+
/supi:config set defaultProfile thorough
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Profiles
|
|
100
|
+
|
|
101
|
+
Three built-in profiles control quality gate depth:
|
|
102
|
+
|
|
103
|
+
| Profile | LSP | AI Review | Code Quality | Tests | E2E |
|
|
104
|
+
| ----------------- | --- | ----------- | ------------ | ----- | --- |
|
|
105
|
+
| `quick` | yes | quick scan | no | no | no |
|
|
106
|
+
| `thorough` | yes | deep review | yes | no | no |
|
|
107
|
+
| `full-regression` | yes | deep review | yes | yes | yes |
|
|
108
|
+
|
|
109
|
+
Create custom profiles in `.omp/supipowers/profiles/`.
|
|
110
|
+
|
|
111
|
+
### Key settings
|
|
112
|
+
|
|
113
|
+
```jsonc
|
|
114
|
+
{
|
|
115
|
+
"defaultProfile": "thorough",
|
|
116
|
+
"orchestration": {
|
|
117
|
+
"maxParallelAgents": 3, // concurrent sub-agents per batch
|
|
118
|
+
"maxFixRetries": 2, // retry failed tasks
|
|
119
|
+
"maxNestingDepth": 2, // sub-agent nesting limit
|
|
120
|
+
"modelPreference": "auto", // "auto" | "fast" | "capable" | "<model-id>"
|
|
121
|
+
},
|
|
122
|
+
"lsp": {
|
|
123
|
+
"autoDetect": true,
|
|
124
|
+
"setupGuide": true,
|
|
125
|
+
},
|
|
126
|
+
"qa": {
|
|
127
|
+
"framework": null, // auto-detected and cached
|
|
128
|
+
"command": null,
|
|
129
|
+
},
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## How it works
|
|
134
|
+
|
|
135
|
+
Supipowers is built on OMP's extension API. Every command is an immediate action — no state machine, no workflow phases.
|
|
136
|
+
|
|
137
|
+
**Sub-agent orchestration**: Plans are broken into batches of parallel-safe tasks. Each batch dispatches sub-agents with full OMP tool access (file editing, bash, LSP). After a batch completes, the orchestrator checks for file conflicts, retries failures, and moves to the next batch.
|
|
138
|
+
|
|
139
|
+
**Quality gates**: Composable checks selected by profile. LSP diagnostics feed real type errors. AI review catches logic issues. Test gates run your actual test suite. Gates report issues with severity levels (error/warning/info).
|
|
140
|
+
|
|
141
|
+
**LSP integration**: Sub-agents query LSP before making changes (find references, check diagnostics). If no LSP is active, everything still works — just better with it. Run `/supi:config` for setup guidance.
|
|
142
|
+
|
|
143
|
+
## Project structure
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
src/
|
|
147
|
+
index.ts # extension entry point
|
|
148
|
+
commands/ # slash command handlers
|
|
149
|
+
supi.ts, plan.ts, run.ts, review.ts, qa.ts, release.ts, config.ts, status.ts
|
|
150
|
+
orchestrator/ # sub-agent dispatch & coordination
|
|
151
|
+
batch-scheduler.ts, dispatcher.ts, result-collector.ts, conflict-resolver.ts, prompts.ts
|
|
152
|
+
quality/ # composable quality gates
|
|
153
|
+
gate-runner.ts, lsp-gate.ts, ai-review-gate.ts, test-gate.ts
|
|
154
|
+
qa/ # QA pipeline
|
|
155
|
+
detector.ts, runner.ts, report.ts
|
|
156
|
+
lsp/ # LSP integration
|
|
157
|
+
detector.ts, bridge.ts, setup-guide.ts
|
|
158
|
+
notifications/ # rich inline notifications
|
|
159
|
+
renderer.ts, types.ts
|
|
160
|
+
config/ # configuration & profiles
|
|
161
|
+
loader.ts, profiles.ts, defaults.ts, schema.ts
|
|
162
|
+
storage/ # persistence
|
|
163
|
+
plans.ts, runs.ts, reports.ts
|
|
164
|
+
release/ # release automation
|
|
165
|
+
analyzer.ts, notes.ts, publisher.ts
|
|
166
|
+
types.ts # shared type definitions
|
|
167
|
+
skills/
|
|
168
|
+
planning/SKILL.md
|
|
169
|
+
code-review/SKILL.md
|
|
170
|
+
debugging/SKILL.md
|
|
171
|
+
qa-strategy/SKILL.md
|
|
172
|
+
bin/
|
|
173
|
+
install.mjs # bunx installer
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Development
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
git clone https://github.com/pedromendes/supipowers.git
|
|
180
|
+
cd supipowers
|
|
181
|
+
bun install
|
|
182
|
+
bun run test # run tests
|
|
183
|
+
bun run typecheck # type checking
|
|
184
|
+
bun run test:watch # watch mode
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Requirements
|
|
188
|
+
|
|
189
|
+
- [OMP](https://github.com/can1357/oh-my-pi) (oh-my-pi)
|
|
190
|
+
- [Bun](https://bun.sh) runtime
|
|
191
|
+
|
|
192
|
+
## License
|
|
193
|
+
|
|
194
|
+
MIT
|
package/bin/install.mjs
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
intro,
|
|
5
|
+
outro,
|
|
6
|
+
confirm,
|
|
7
|
+
select,
|
|
8
|
+
multiselect,
|
|
9
|
+
spinner,
|
|
10
|
+
isCancel,
|
|
11
|
+
cancel,
|
|
12
|
+
note,
|
|
13
|
+
} from "@clack/prompts";
|
|
14
|
+
import { spawnSync } from "node:child_process";
|
|
15
|
+
import { readdirSync, readFileSync, existsSync } from "node:fs";
|
|
16
|
+
import { resolve, extname, dirname, join } from "node:path";
|
|
17
|
+
import { fileURLToPath } from "node:url";
|
|
18
|
+
import { homedir } from "node:os";
|
|
19
|
+
|
|
20
|
+
// ── Helpers ──────────────────────────────────────────────────
|
|
21
|
+
|
|
22
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
23
|
+
const pkg = JSON.parse(
|
|
24
|
+
readFileSync(resolve(__dirname, "..", "package.json"), "utf8")
|
|
25
|
+
);
|
|
26
|
+
const VERSION = pkg.version;
|
|
27
|
+
|
|
28
|
+
function run(cmd, args, opts = {}) {
|
|
29
|
+
return spawnSync(cmd, args, {
|
|
30
|
+
stdio: "pipe",
|
|
31
|
+
encoding: "utf8",
|
|
32
|
+
timeout: 120_000,
|
|
33
|
+
...opts,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function bail(msg) {
|
|
38
|
+
cancel(msg);
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function findOmpBinary() {
|
|
43
|
+
// Check PATH first
|
|
44
|
+
const check = run("omp", ["--version"]);
|
|
45
|
+
if (!check.error && check.status === 0) return "omp";
|
|
46
|
+
|
|
47
|
+
// Fallback: check common bun global location
|
|
48
|
+
const bunPath = join(homedir(), ".bun", "bin", "omp");
|
|
49
|
+
if (existsSync(bunPath)) {
|
|
50
|
+
const fallback = run(bunPath, ["--version"]);
|
|
51
|
+
if (!fallback.error && fallback.status === 0) return bunPath;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ── LSP Server Data ──────────────────────────────────────────
|
|
58
|
+
|
|
59
|
+
const LSP_SERVERS = [
|
|
60
|
+
{
|
|
61
|
+
language: "TypeScript / JavaScript",
|
|
62
|
+
extensions: [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"],
|
|
63
|
+
server: "typescript-language-server",
|
|
64
|
+
installCmd: "bun add -g typescript-language-server typescript",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
language: "Python",
|
|
68
|
+
extensions: [".py"],
|
|
69
|
+
server: "pyright",
|
|
70
|
+
installCmd: "pip install pyright",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
language: "Rust",
|
|
74
|
+
extensions: [".rs"],
|
|
75
|
+
server: "rust-analyzer",
|
|
76
|
+
installCmd: "rustup component add rust-analyzer",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
language: "Go",
|
|
80
|
+
extensions: [".go"],
|
|
81
|
+
server: "gopls",
|
|
82
|
+
installCmd: "go install golang.org/x/tools/gopls@latest",
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
function detectLanguages(dir) {
|
|
87
|
+
const detected = new Set();
|
|
88
|
+
try {
|
|
89
|
+
const entries = readdirSync(dir, { withFileTypes: true });
|
|
90
|
+
for (const entry of entries) {
|
|
91
|
+
if (entry.isFile()) {
|
|
92
|
+
detected.add(extname(entry.name));
|
|
93
|
+
} else if (entry.isDirectory() && !entry.name.startsWith(".") && entry.name !== "node_modules") {
|
|
94
|
+
// One level deep
|
|
95
|
+
try {
|
|
96
|
+
const subEntries = readdirSync(join(dir, entry.name), { withFileTypes: true });
|
|
97
|
+
for (const sub of subEntries) {
|
|
98
|
+
if (sub.isFile()) detected.add(extname(sub.name));
|
|
99
|
+
}
|
|
100
|
+
} catch {
|
|
101
|
+
// skip unreadable dirs
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
} catch {
|
|
106
|
+
// skip
|
|
107
|
+
}
|
|
108
|
+
return detected;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// ── Main ─────────────────────────────────────────────────────
|
|
112
|
+
|
|
113
|
+
async function main() {
|
|
114
|
+
intro(`supipowers v${VERSION}`);
|
|
115
|
+
|
|
116
|
+
// ── Step 1: OMP check ──────────────────────────────────────
|
|
117
|
+
|
|
118
|
+
let omp = findOmpBinary();
|
|
119
|
+
|
|
120
|
+
if (!omp) {
|
|
121
|
+
note(
|
|
122
|
+
"OMP (oh-my-pi) is an AI coding agent that supipowers extends.\n" +
|
|
123
|
+
"It adds sub-agents, LSP integration, and plugin support to pi.\n" +
|
|
124
|
+
"Learn more: https://github.com/can1357/oh-my-pi",
|
|
125
|
+
"OMP not found"
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
const shouldInstall = await confirm({
|
|
129
|
+
message: "Install OMP now?",
|
|
130
|
+
});
|
|
131
|
+
if (isCancel(shouldInstall) || !shouldInstall) {
|
|
132
|
+
bail("Cannot continue without OMP.");
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const s = spinner();
|
|
136
|
+
s.start("Installing OMP via bun...");
|
|
137
|
+
const result = run("bun", ["add", "-g", "@oh-my-pi/pi-coding-agent"]);
|
|
138
|
+
if (result.status !== 0) {
|
|
139
|
+
s.stop("OMP installation failed");
|
|
140
|
+
bail(result.stderr?.trim() || "Unknown error during OMP install.");
|
|
141
|
+
}
|
|
142
|
+
s.stop("OMP installed successfully");
|
|
143
|
+
|
|
144
|
+
// Re-detect after install
|
|
145
|
+
omp = findOmpBinary();
|
|
146
|
+
if (!omp) {
|
|
147
|
+
bail("OMP was installed but the binary was not found in PATH. Try restarting your shell.");
|
|
148
|
+
}
|
|
149
|
+
} else {
|
|
150
|
+
const version = run(omp, ["--version"]);
|
|
151
|
+
const ver = version.stdout?.trim() || "unknown";
|
|
152
|
+
note(`OMP ${ver}`, "OMP detected");
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// ── Step 2: Install supipowers ─────────────────────────────
|
|
156
|
+
|
|
157
|
+
const scope = await select({
|
|
158
|
+
message: "Where should supipowers be installed?",
|
|
159
|
+
options: [
|
|
160
|
+
{ value: "global", label: "Global", hint: "available in all projects" },
|
|
161
|
+
{ value: "local", label: "Project-local", hint: "only this directory" },
|
|
162
|
+
],
|
|
163
|
+
});
|
|
164
|
+
if (isCancel(scope)) bail("Cancelled.");
|
|
165
|
+
|
|
166
|
+
const packageSpec = `npm:supipowers@${VERSION}`;
|
|
167
|
+
const installArgs = ["install", packageSpec];
|
|
168
|
+
if (scope === "local") installArgs.push("-l");
|
|
169
|
+
|
|
170
|
+
const s = spinner();
|
|
171
|
+
s.start(`Installing supipowers (${scope})...`);
|
|
172
|
+
const result = run(omp, installArgs);
|
|
173
|
+
if (result.status !== 0) {
|
|
174
|
+
s.stop("Installation failed");
|
|
175
|
+
bail(result.stderr?.trim() || "omp install failed.");
|
|
176
|
+
}
|
|
177
|
+
s.stop("supipowers installed");
|
|
178
|
+
|
|
179
|
+
// ── Step 3: LSP setup (optional) ──────────────────────────
|
|
180
|
+
|
|
181
|
+
const detectedExts = detectLanguages(process.cwd());
|
|
182
|
+
const matchingServers = LSP_SERVERS.filter((srv) =>
|
|
183
|
+
srv.extensions.some((ext) => detectedExts.has(ext))
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
if (matchingServers.length > 0) {
|
|
187
|
+
const selected = await multiselect({
|
|
188
|
+
message: "Detected project languages. Install LSP servers for better code intelligence?",
|
|
189
|
+
options: matchingServers.map((srv) => ({
|
|
190
|
+
value: srv,
|
|
191
|
+
label: srv.language,
|
|
192
|
+
hint: srv.server,
|
|
193
|
+
})),
|
|
194
|
+
required: false,
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
if (!isCancel(selected) && selected.length > 0) {
|
|
198
|
+
for (const srv of selected) {
|
|
199
|
+
const ls = spinner();
|
|
200
|
+
ls.start(`Installing ${srv.server}...`);
|
|
201
|
+
const [cmd, ...args] = srv.installCmd.split(" ");
|
|
202
|
+
const r = run(cmd, args);
|
|
203
|
+
if (r.status !== 0) {
|
|
204
|
+
ls.stop(`Failed to install ${srv.server} — you can install manually: ${srv.installCmd}`);
|
|
205
|
+
} else {
|
|
206
|
+
ls.stop(`${srv.server} installed`);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// ── Done ───────────────────────────────────────────────────
|
|
213
|
+
|
|
214
|
+
outro("supipowers is ready! Run `omp` to start using it.");
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
main().catch((e) => {
|
|
218
|
+
console.error(e);
|
|
219
|
+
process.exit(1);
|
|
220
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "supipowers",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "OMP-native workflow extension inspired by Superpowers.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "vitest run",
|
|
8
|
+
"typecheck": "tsc --noEmit",
|
|
9
|
+
"test:watch": "vitest",
|
|
10
|
+
"build": "tsc -p tsconfig.build.json"
|
|
11
|
+
},
|
|
12
|
+
"keywords": ["omp-extension", "workflow", "agent", "superpowers"],
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"bin": {
|
|
15
|
+
"supipowers": "./bin/install.mjs"
|
|
16
|
+
},
|
|
17
|
+
"files": ["src", "skills", "bin", "README.md", "LICENSE"],
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@clack/prompts": "^0.10.0"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@oh-my-pi/pi-coding-agent": "*",
|
|
23
|
+
"@oh-my-pi/pi-tui": "*",
|
|
24
|
+
"@sinclair/typebox": "*"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@oh-my-pi/pi-coding-agent": "latest",
|
|
28
|
+
"@oh-my-pi/pi-tui": "latest",
|
|
29
|
+
"@sinclair/typebox": "^0.34.48",
|
|
30
|
+
"@types/node": "^22.0.0",
|
|
31
|
+
"typescript": "^5.9.3",
|
|
32
|
+
"vitest": "^4.0.0"
|
|
33
|
+
},
|
|
34
|
+
"omp": {
|
|
35
|
+
"extensions": ["./src/index.ts"],
|
|
36
|
+
"skills": ["./skills"]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: Deep code review methodology for thorough quality assessment
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review Skill
|
|
7
|
+
|
|
8
|
+
Systematic approach to reviewing code changes.
|
|
9
|
+
|
|
10
|
+
## Review Checklist
|
|
11
|
+
|
|
12
|
+
### Correctness
|
|
13
|
+
- Does the code do what it claims?
|
|
14
|
+
- Are edge cases handled?
|
|
15
|
+
- Are error conditions handled?
|
|
16
|
+
|
|
17
|
+
### Security
|
|
18
|
+
- Input validation at system boundaries?
|
|
19
|
+
- SQL injection, XSS, command injection risks?
|
|
20
|
+
- Secrets in code or logs?
|
|
21
|
+
- Authentication/authorization checks?
|
|
22
|
+
|
|
23
|
+
### Performance
|
|
24
|
+
- Unnecessary loops or allocations?
|
|
25
|
+
- N+1 query patterns?
|
|
26
|
+
- Missing indexes for frequent queries?
|
|
27
|
+
- Large payloads or unbounded lists?
|
|
28
|
+
|
|
29
|
+
### Maintainability
|
|
30
|
+
- Clear naming (functions, variables, files)?
|
|
31
|
+
- Single responsibility per unit?
|
|
32
|
+
- Unnecessary abstractions or premature optimization?
|
|
33
|
+
- Comments where logic isn't self-evident?
|
|
34
|
+
|
|
35
|
+
### Testing
|
|
36
|
+
- Tests cover the happy path?
|
|
37
|
+
- Tests cover error/edge cases?
|
|
38
|
+
- Tests are deterministic (no flaky tests)?
|
|
39
|
+
- Test names describe the behavior?
|
|
40
|
+
|
|
41
|
+
## Severity Levels
|
|
42
|
+
|
|
43
|
+
- **error**: Must fix before merge. Bugs, security issues, data loss risks.
|
|
44
|
+
- **warning**: Should fix. Code quality, maintainability, minor issues.
|
|
45
|
+
- **info**: Nice to have. Style, naming suggestions, minor improvements.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debugging
|
|
3
|
+
description: Systematic debugging approach — investigate before fixing
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Debugging Skill
|
|
7
|
+
|
|
8
|
+
## Process
|
|
9
|
+
|
|
10
|
+
1. **Reproduce**: Can you reliably trigger the bug?
|
|
11
|
+
2. **Isolate**: What's the smallest input that triggers it?
|
|
12
|
+
3. **Investigate**: Read the relevant code. Trace the execution path.
|
|
13
|
+
4. **Hypothesize**: Form a theory about the root cause.
|
|
14
|
+
5. **Verify**: Add logging or a test that confirms the theory.
|
|
15
|
+
6. **Fix**: Make the minimal change that fixes the root cause.
|
|
16
|
+
7. **Validate**: Run the reproducer and existing tests.
|
|
17
|
+
|
|
18
|
+
## Rules
|
|
19
|
+
|
|
20
|
+
- Never guess-and-fix. Investigate first.
|
|
21
|
+
- After 3 failed fix attempts, step back and question your assumptions.
|
|
22
|
+
- Fix the root cause, not the symptom.
|
|
23
|
+
- Add a test that would have caught this bug.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planning
|
|
3
|
+
description: Guides collaborative planning and task breakdown for implementation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Planning Skill
|
|
7
|
+
|
|
8
|
+
Guide the user through planning an implementation. This skill is loaded by `/supi:plan`.
|
|
9
|
+
|
|
10
|
+
## Process
|
|
11
|
+
|
|
12
|
+
1. **Understand**: Ask one clarifying question at a time. Prefer multiple choice.
|
|
13
|
+
2. **Propose**: Offer 2-3 approaches with trade-offs and your recommendation.
|
|
14
|
+
3. **Break down**: Generate bite-sized tasks with clear boundaries.
|
|
15
|
+
|
|
16
|
+
## Task Format
|
|
17
|
+
|
|
18
|
+
Each task must have:
|
|
19
|
+
- Name with parallelism: `[parallel-safe]` or `[sequential: depends on N]`
|
|
20
|
+
- **files**: Exact paths the agent will touch
|
|
21
|
+
- **criteria**: Acceptance criteria (testable)
|
|
22
|
+
- **complexity**: `small` | `medium` | `large`
|
|
23
|
+
|
|
24
|
+
## Plan Structure
|
|
25
|
+
|
|
26
|
+
Use this template:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
---
|
|
30
|
+
name: <feature-name>
|
|
31
|
+
created: <YYYY-MM-DD>
|
|
32
|
+
tags: [<relevant>, <tags>]
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
# <Feature Name>
|
|
36
|
+
|
|
37
|
+
## Context
|
|
38
|
+
<What this plan accomplishes and why>
|
|
39
|
+
|
|
40
|
+
## Tasks
|
|
41
|
+
|
|
42
|
+
### 1. <Task name> [parallel-safe]
|
|
43
|
+
- **files**: src/path/to/file.ts
|
|
44
|
+
- **criteria**: <what success looks like>
|
|
45
|
+
- **complexity**: small
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Principles
|
|
49
|
+
|
|
50
|
+
- Each task should be completable in 2-10 minutes
|
|
51
|
+
- Tasks that touch different files are parallel-safe
|
|
52
|
+
- Tasks that depend on others' output are sequential
|
|
53
|
+
- Include test files in the files list
|
|
54
|
+
- Prefer small, focused tasks over large ones
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qa-strategy
|
|
3
|
+
description: QA test planning for comprehensive coverage
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# QA Strategy Skill
|
|
7
|
+
|
|
8
|
+
## Test Pyramid
|
|
9
|
+
|
|
10
|
+
1. **Unit tests**: Fast, isolated, cover individual functions
|
|
11
|
+
2. **Integration tests**: Test component interactions
|
|
12
|
+
3. **E2E tests**: Test user-facing flows end-to-end
|
|
13
|
+
|
|
14
|
+
## When to Write What
|
|
15
|
+
|
|
16
|
+
- New function → unit test
|
|
17
|
+
- New API endpoint → integration test
|
|
18
|
+
- New user flow → E2E test
|
|
19
|
+
- Bug fix → regression test at the appropriate level
|
|
20
|
+
|
|
21
|
+
## Coverage Priorities
|
|
22
|
+
|
|
23
|
+
Focus testing effort on:
|
|
24
|
+
1. Business logic (highest value)
|
|
25
|
+
2. Error handling paths
|
|
26
|
+
3. Edge cases in input validation
|
|
27
|
+
4. Integration points (API boundaries, DB queries)
|
|
28
|
+
|
|
29
|
+
Don't test:
|
|
30
|
+
- Framework boilerplate
|
|
31
|
+
- Simple getters/setters
|
|
32
|
+
- Third-party library behavior
|