agy-superpowers 5.0.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.
- package/LICENSE +21 -0
- package/README.md +180 -0
- package/bin/init.js +58 -0
- package/package.json +36 -0
- package/template/agent/.shared/update-superpowers.sh +171 -0
- package/template/agent/agents/code-reviewer.md +48 -0
- package/template/agent/rules/superpowers.md +52 -0
- package/template/agent/skills/brainstorming/SKILL.md +164 -0
- package/template/agent/skills/brainstorming/scripts/frame-template.html +214 -0
- package/template/agent/skills/brainstorming/scripts/helper.js +88 -0
- package/template/agent/skills/brainstorming/scripts/server.cjs +338 -0
- package/template/agent/skills/brainstorming/scripts/start-server.sh +153 -0
- package/template/agent/skills/brainstorming/scripts/stop-server.sh +55 -0
- package/template/agent/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/template/agent/skills/brainstorming/visual-companion.md +286 -0
- package/template/agent/skills/dispatching-parallel-agents/SKILL.md +182 -0
- package/template/agent/skills/executing-plans/SKILL.md +70 -0
- package/template/agent/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/template/agent/skills/receiving-code-review/SKILL.md +213 -0
- package/template/agent/skills/requesting-code-review/SKILL.md +105 -0
- package/template/agent/skills/requesting-code-review/code-reviewer.md +146 -0
- package/template/agent/skills/subagent-driven-development/SKILL.md +277 -0
- package/template/agent/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
- package/template/agent/skills/subagent-driven-development/implementer-prompt.md +113 -0
- package/template/agent/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/template/agent/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/template/agent/skills/systematic-debugging/SKILL.md +296 -0
- package/template/agent/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/template/agent/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/template/agent/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/template/agent/skills/systematic-debugging/find-polluter.sh +63 -0
- package/template/agent/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/template/agent/skills/systematic-debugging/test-academic.md +14 -0
- package/template/agent/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/template/agent/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/template/agent/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/template/agent/skills/test-driven-development/SKILL.md +371 -0
- package/template/agent/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/template/agent/skills/using-git-worktrees/SKILL.md +218 -0
- package/template/agent/skills/using-superpowers/SKILL.md +115 -0
- package/template/agent/skills/using-superpowers/references/codex-tools.md +25 -0
- package/template/agent/skills/using-superpowers/references/gemini-tools.md +33 -0
- package/template/agent/skills/verification-before-completion/SKILL.md +139 -0
- package/template/agent/skills/writing-plans/SKILL.md +145 -0
- package/template/agent/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/template/agent/skills/writing-skills/SKILL.md +655 -0
- package/template/agent/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/template/agent/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/template/agent/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/template/agent/skills/writing-skills/persuasion-principles.md +187 -0
- package/template/agent/skills/writing-skills/render-graphs.js +168 -0
- package/template/agent/skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/template/agent/superpowers-version.json +5 -0
- package/template/agent/workflows/brainstorm.md +20 -0
- package/template/agent/workflows/code-review.md +45 -0
- package/template/agent/workflows/debug.md +17 -0
- package/template/agent/workflows/execute-plan.md +25 -0
- package/template/agent/workflows/update-superpowers.md +47 -0
- package/template/agent/workflows/write-plan.md +17 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Jesse Vincent
|
|
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,180 @@
|
|
|
1
|
+
# antigravity-superpowers
|
|
2
|
+
|
|
3
|
+
> **Superpowers for [Google Antigravity](https://antigravity.google)** — a complete development workflow powered by composable skills, workflows, and rules.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
This repo ports the [Superpowers](https://github.com/obra/superpowers) skills library to work natively with **Google Antigravity agent**, with Antigravity-compatible path conventions, an auto-update workflow, and curated workflow files translated from the upstream skills.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
### Option 1 — npx (recommended, no install needed)
|
|
13
|
+
|
|
14
|
+
Inside any project directory:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npx agy-superpowers@latest init
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This scaffolds `.agent/` with all Superpowers skills, workflows, and rules.
|
|
21
|
+
Open the project with **Google Antigravity** — Superpowers activates automatically.
|
|
22
|
+
|
|
23
|
+
To overwrite an existing `.agent/`:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx agy-superpowers@latest init --force
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Option 2 — Global install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g agy-superpowers
|
|
33
|
+
agy-superpowers init
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## What's Inside
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
antigravity-superpowers/
|
|
43
|
+
├── .agent/
|
|
44
|
+
│ ├── rules/
|
|
45
|
+
│ │ └── superpowers.md # Always-on rule: agent checks skills before acting
|
|
46
|
+
│ ├── skills/ # Symlinks → superpowers/skills/*
|
|
47
|
+
│ │ ├── brainstorming/
|
|
48
|
+
│ │ ├── writing-plans/
|
|
49
|
+
│ │ ├── executing-plans/
|
|
50
|
+
│ │ ├── subagent-driven-development/
|
|
51
|
+
│ │ ├── test-driven-development/
|
|
52
|
+
│ │ ├── systematic-debugging/
|
|
53
|
+
│ │ ├── verification-before-completion/
|
|
54
|
+
│ │ ├── requesting-code-review/
|
|
55
|
+
│ │ ├── receiving-code-review/
|
|
56
|
+
│ │ ├── using-git-worktrees/
|
|
57
|
+
│ │ ├── finishing-a-development-branch/
|
|
58
|
+
│ │ ├── dispatching-parallel-agents/
|
|
59
|
+
│ │ ├── writing-skills/
|
|
60
|
+
│ │ └── using-superpowers/
|
|
61
|
+
│ ├── workflows/
|
|
62
|
+
│ │ ├── brainstorm.md # /brainstorm
|
|
63
|
+
│ │ ├── write-plan.md # /write-plan
|
|
64
|
+
│ │ ├── execute-plan.md # /execute-plan
|
|
65
|
+
│ │ ├── code-review.md # /code-review
|
|
66
|
+
│ │ ├── debug.md # /debug
|
|
67
|
+
│ │ └── update-superpowers.md # /update-superpowers
|
|
68
|
+
│ └── .shared/
|
|
69
|
+
│ └── update-superpowers.sh # Shell script for version management
|
|
70
|
+
└── superpowers/ # Upstream source (git-managed)
|
|
71
|
+
└── skills/ # All skill SKILL.md files live here
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## How It Works
|
|
77
|
+
|
|
78
|
+
**Antigravity automatically reads skills before every response.** You don't need to invoke them manually — the `superpowers.md` rule (set to `alwaysApply: true`) instructs the agent to check for a relevant skill before acting.
|
|
79
|
+
|
|
80
|
+
### The Core Development Loop
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
💡 Idea → /brainstorm → /write-plan → /execute-plan → /code-review → merge
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
| Step | Workflow | What happens |
|
|
87
|
+
| ---- | --------------- | -------------------------------------------------------------- |
|
|
88
|
+
| 1 | `/brainstorm` | Agent asks clarifying questions, refines your idea into a spec |
|
|
89
|
+
| 2 | `/write-plan` | Spec → bite-sized tasks (2–5 min each) with exact file paths |
|
|
90
|
+
| 3 | `/execute-plan` | Tasks run in batches with human checkpoints |
|
|
91
|
+
| 4 | `/code-review` | Pre-review checklist, severity-based issue reporting |
|
|
92
|
+
| 5 | _(auto)_ | `finishing-a-development-branch` — merge / PR / discard |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Skills Reference
|
|
97
|
+
|
|
98
|
+
| Skill | Triggers automatically when... |
|
|
99
|
+
| -------------------------------- | -------------------------------------------------------------------- |
|
|
100
|
+
| `brainstorming` | You're adding a feature, building a component, or modifying behavior |
|
|
101
|
+
| `writing-plans` | Design is approved — breaking work into tasks |
|
|
102
|
+
| `executing-plans` | Running a plan step-by-step with checkpoints |
|
|
103
|
+
| `subagent-driven-development` | Dispatching subagents per task with two-stage review |
|
|
104
|
+
| `test-driven-development` | During ALL implementation (RED → GREEN → REFACTOR) |
|
|
105
|
+
| `systematic-debugging` | Debugging any issue |
|
|
106
|
+
| `verification-before-completion` | Before declaring a fix or task done |
|
|
107
|
+
| `requesting-code-review` | Before submitting code for review |
|
|
108
|
+
| `receiving-code-review` | Responding to review feedback |
|
|
109
|
+
| `using-git-worktrees` | Starting work on a new isolated branch |
|
|
110
|
+
| `finishing-a-development-branch` | When tasks are complete |
|
|
111
|
+
| `dispatching-parallel-agents` | Running concurrent subagent workflows |
|
|
112
|
+
| `writing-skills` | Creating a new skill |
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Keeping Up to Date
|
|
117
|
+
|
|
118
|
+
Upstream Superpowers releases are tracked automatically. To update:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
/update-superpowers
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
This workflow will:
|
|
125
|
+
|
|
126
|
+
1. Pull the latest Superpowers release from GitHub
|
|
127
|
+
2. Re-sync all skill symlinks
|
|
128
|
+
3. AI-rewrite any changed workflows and rules to stay Antigravity-compatible
|
|
129
|
+
4. Commit all changes with a versioned commit message
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Installation
|
|
134
|
+
|
|
135
|
+
### Using This Repo in Your Project
|
|
136
|
+
|
|
137
|
+
Copy the `.agent/` folder into your project root:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
cp -r /path/to/antigravity-superpowers/.agent /your/project/
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Or clone this repo as a submodule and symlink `.agent/`:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
git submodule add https://github.com/<your-username>/antigravity-superpowers .antigravity-superpowers
|
|
147
|
+
ln -s .antigravity-superpowers/.agent .agent
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Starting Fresh
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
git clone https://github.com/<your-username>/antigravity-superpowers
|
|
154
|
+
cd antigravity-superpowers
|
|
155
|
+
# Open with Antigravity — the agent will detect .agent/ automatically
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Philosophy
|
|
161
|
+
|
|
162
|
+
This setup enforces four core principles across every task:
|
|
163
|
+
|
|
164
|
+
- **Test-Driven Development** — Write the failing test first, always
|
|
165
|
+
- **YAGNI** — Don't build what isn't needed yet
|
|
166
|
+
- **Systematic over ad-hoc** — Follow the skill process, don't guess
|
|
167
|
+
- **Evidence over claims** — Verify before declaring success
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Credits
|
|
172
|
+
|
|
173
|
+
- **[Superpowers](https://github.com/obra/superpowers)** by [Jesse Vincent](https://blog.fsck.com) & [Prime Radiant](https://primeradiant.com) — the upstream skills library this repo is built on.
|
|
174
|
+
- Antigravity integration & workflow adaptation by [@bonnguyenitc](https://github.com/bonnguyenitc).
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## License
|
|
179
|
+
|
|
180
|
+
MIT — see [LICENSE](./LICENSE) for details.
|
package/bin/init.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// bin/init.js
|
|
3
|
+
// Usage: npx antigravity-superpowers init
|
|
4
|
+
import fs from 'fs';
|
|
5
|
+
import path from 'path';
|
|
6
|
+
import { fileURLToPath } from 'url';
|
|
7
|
+
|
|
8
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const TEMPLATE_DIR = path.resolve(__dirname, '..', 'template', 'agent');
|
|
10
|
+
const TARGET_DIR = path.join(process.cwd(), '.agent');
|
|
11
|
+
|
|
12
|
+
const args = process.argv.slice(2);
|
|
13
|
+
const command = args[0];
|
|
14
|
+
|
|
15
|
+
if (command !== 'init') {
|
|
16
|
+
console.error(`❌ Unknown command: ${command || '(none)'}`);
|
|
17
|
+
console.error('');
|
|
18
|
+
console.error('Usage: npx antigravity-superpowers init');
|
|
19
|
+
console.error(' npx antigravity-superpowers init --force # overwrite existing .agent/');
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function copyDir(src, dest) {
|
|
24
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
25
|
+
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
26
|
+
const srcPath = path.join(src, entry.name);
|
|
27
|
+
const destPath = path.join(dest, entry.name);
|
|
28
|
+
if (entry.isDirectory()) {
|
|
29
|
+
copyDir(srcPath, destPath);
|
|
30
|
+
} else {
|
|
31
|
+
fs.copyFileSync(srcPath, destPath);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Guard: don't overwrite existing .agent/ without --force
|
|
37
|
+
if (fs.existsSync(TARGET_DIR)) {
|
|
38
|
+
console.warn('⚠️ .agent/ already exists in this directory.');
|
|
39
|
+
console.warn(' Delete it first or re-run with --force to overwrite:');
|
|
40
|
+
console.warn('');
|
|
41
|
+
console.warn(' npx antigravity-superpowers init --force');
|
|
42
|
+
console.warn('');
|
|
43
|
+
if (!args.includes('--force')) {
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
fs.rmSync(TARGET_DIR, { recursive: true });
|
|
47
|
+
console.log('🗑 Removed existing .agent/');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
console.log('🚀 Initialising antigravity-superpowers…');
|
|
51
|
+
copyDir(TEMPLATE_DIR, TARGET_DIR);
|
|
52
|
+
console.log('✅ .agent/ created successfully!\n');
|
|
53
|
+
console.log('📖 Next steps:');
|
|
54
|
+
console.log(' 1. Open your project with Google Antigravity');
|
|
55
|
+
console.log(' 2. The agent will automatically detect .agent/ and activate Superpowers');
|
|
56
|
+
console.log(' 3. Use /brainstorm, /write-plan, /execute-plan, /code-review, /debug');
|
|
57
|
+
console.log('');
|
|
58
|
+
console.log('📦 Keep skills up to date: /update-superpowers');
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agy-superpowers",
|
|
3
|
+
"version": "5.0.5",
|
|
4
|
+
"description": "Superpowers skills library for Google Antigravity agent — scaffold .agent/ with one command",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"agy-superpowers": "bin/init.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
"template/",
|
|
12
|
+
"README.md",
|
|
13
|
+
"LICENSE"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "node scripts/build-template.js",
|
|
17
|
+
"prepublishOnly": "npm run build"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"antigravity",
|
|
21
|
+
"superpowers",
|
|
22
|
+
"agent",
|
|
23
|
+
"skills",
|
|
24
|
+
"workflow",
|
|
25
|
+
"ai"
|
|
26
|
+
],
|
|
27
|
+
"author": "bonnguyenitc",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/bonnguyenitc/antigravity-superpowers.git"
|
|
32
|
+
},
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=18.0.0"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
REPO="https://github.com/obra/superpowers"
|
|
5
|
+
VERSION_FILE=".agent/superpowers-version.json"
|
|
6
|
+
SKILLS_DIR=".agent/skills"
|
|
7
|
+
|
|
8
|
+
# ── Phase 0: Version Check ────────────────────────────────────────────────────
|
|
9
|
+
|
|
10
|
+
echo "🔍 Checking superpowers version..."
|
|
11
|
+
|
|
12
|
+
# Read current installed tag
|
|
13
|
+
CURRENT_TAG=$(jq -r '.tag // "none"' "$VERSION_FILE" 2>/dev/null || echo "none")
|
|
14
|
+
|
|
15
|
+
# Fetch latest release tag from GitHub API
|
|
16
|
+
LATEST_TAG=$(curl -Lfs --retry 3 \
|
|
17
|
+
"https://api.github.com/repos/obra/superpowers/releases/latest" \
|
|
18
|
+
| grep '"tag_name"' | cut -d'"' -f4)
|
|
19
|
+
|
|
20
|
+
if [[ -z "$LATEST_TAG" ]]; then
|
|
21
|
+
echo "❌ Failed to fetch latest release from GitHub. Check your network." >&2
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
echo " Current: ${CURRENT_TAG}"
|
|
26
|
+
echo " Latest: ${LATEST_TAG}"
|
|
27
|
+
|
|
28
|
+
if [[ "$CURRENT_TAG" == "$LATEST_TAG" ]]; then
|
|
29
|
+
echo "✅ Already up to date (${LATEST_TAG}). Nothing to do."
|
|
30
|
+
exit 0
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
# ── Show release notes excerpt ────────────────────────────────────────────────
|
|
34
|
+
|
|
35
|
+
echo ""
|
|
36
|
+
echo "🆕 New release available: ${CURRENT_TAG} → ${LATEST_TAG}"
|
|
37
|
+
echo ""
|
|
38
|
+
|
|
39
|
+
RELEASE_BODY=$(curl -Lfs --retry 3 \
|
|
40
|
+
"https://api.github.com/repos/obra/superpowers/releases/latest" \
|
|
41
|
+
| python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('body','')[:800])" 2>/dev/null \
|
|
42
|
+
|| echo "(no notes)")
|
|
43
|
+
|
|
44
|
+
echo "Release notes (excerpt):"
|
|
45
|
+
echo "────────────────────────"
|
|
46
|
+
echo "$RELEASE_BODY"
|
|
47
|
+
echo "────────────────────────"
|
|
48
|
+
echo ""
|
|
49
|
+
|
|
50
|
+
# ── Phase 1: Clone + Symlinks ─────────────────────────────────────────────────
|
|
51
|
+
|
|
52
|
+
echo "📥 Cloning superpowers @ ${LATEST_TAG}..."
|
|
53
|
+
|
|
54
|
+
TMP_DIR=$(mktemp -d)
|
|
55
|
+
CLONE_TARGET="${TMP_DIR}/superpowers"
|
|
56
|
+
|
|
57
|
+
# Clone at exact release tag, shallow for speed
|
|
58
|
+
if ! git clone --branch "$LATEST_TAG" --depth 1 "$REPO" "$CLONE_TARGET" 2>&1; then
|
|
59
|
+
echo "❌ Clone failed. Aborting — superpowers/ is unchanged." >&2
|
|
60
|
+
rm -rf "$TMP_DIR"
|
|
61
|
+
exit 1
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
echo "✅ Clone successful."
|
|
65
|
+
|
|
66
|
+
# Backup existing superpowers/ before replacing
|
|
67
|
+
if [[ -d "superpowers" ]]; then
|
|
68
|
+
BACKUP_DIR="superpowers.bak.$(date +%s)"
|
|
69
|
+
mv superpowers "$BACKUP_DIR"
|
|
70
|
+
echo "📦 Old superpowers/ backed up to ${BACKUP_DIR}"
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# Move new clone into place
|
|
74
|
+
mv "$CLONE_TARGET" superpowers/
|
|
75
|
+
rm -rf "$TMP_DIR"
|
|
76
|
+
echo "✅ superpowers/ replaced."
|
|
77
|
+
|
|
78
|
+
# Remove nested .git (we don't want a nested git repo)
|
|
79
|
+
rm -rf superpowers/.git
|
|
80
|
+
|
|
81
|
+
# ── Recreate all skill symlinks ───────────────────────────────────────────────
|
|
82
|
+
|
|
83
|
+
echo "🔗 Rebuilding ${SKILLS_DIR}/ symlinks..."
|
|
84
|
+
|
|
85
|
+
mkdir -p "$SKILLS_DIR"
|
|
86
|
+
|
|
87
|
+
# Remove old symlinks only (not regular files)
|
|
88
|
+
find "$SKILLS_DIR" -maxdepth 1 -type l -delete
|
|
89
|
+
|
|
90
|
+
# Detect and link ALL skills in new superpowers
|
|
91
|
+
NEW_SKILLS=()
|
|
92
|
+
for skill_dir in superpowers/skills/*/; do
|
|
93
|
+
skill_name=$(basename "$skill_dir")
|
|
94
|
+
ln -sf "../../${skill_dir}" "${SKILLS_DIR}/${skill_name}"
|
|
95
|
+
NEW_SKILLS+=("$skill_name")
|
|
96
|
+
done
|
|
97
|
+
|
|
98
|
+
echo "✅ Linked ${#NEW_SKILLS[@]} skills: ${NEW_SKILLS[*]}"
|
|
99
|
+
|
|
100
|
+
# ── Sync agents: copy + fix path references ───────────────────────────────────
|
|
101
|
+
|
|
102
|
+
echo "📋 Syncing .agent/agents/ from superpowers/agents/..."
|
|
103
|
+
|
|
104
|
+
AGENTS_DIR=".agent/agents"
|
|
105
|
+
mkdir -p "$AGENTS_DIR"
|
|
106
|
+
|
|
107
|
+
SYNCED_AGENTS=()
|
|
108
|
+
for agent_src in superpowers/agents/*.md; do
|
|
109
|
+
[[ -f "$agent_src" ]] || continue
|
|
110
|
+
agent_name=$(basename "$agent_src")
|
|
111
|
+
dest="${AGENTS_DIR}/${agent_name}"
|
|
112
|
+
|
|
113
|
+
# Copy verbatim, then fix known Antigravity path differences in-place:
|
|
114
|
+
# .agents/ → .agent/ (superpowers uses .agents/, Antigravity uses .agent/)
|
|
115
|
+
cp "$agent_src" "$dest"
|
|
116
|
+
sed -i '' 's|\.agents/|.agent/|g' "$dest"
|
|
117
|
+
|
|
118
|
+
SYNCED_AGENTS+=("$agent_name")
|
|
119
|
+
echo " ✅ ${agent_name}"
|
|
120
|
+
done
|
|
121
|
+
|
|
122
|
+
echo "✅ Synced ${#SYNCED_AGENTS[@]} agent(s): ${SYNCED_AGENTS[*]}"
|
|
123
|
+
|
|
124
|
+
# ── Sync commands → workflows: copy + fix path references ─────────────────────
|
|
125
|
+
|
|
126
|
+
echo "🔄 Syncing .agent/workflows/ from superpowers/commands/..."
|
|
127
|
+
|
|
128
|
+
WORKFLOWS_DIR=".agent/workflows"
|
|
129
|
+
mkdir -p "$WORKFLOWS_DIR"
|
|
130
|
+
|
|
131
|
+
SYNCED_WORKFLOWS=()
|
|
132
|
+
for cmd_src in superpowers/commands/*.md; do
|
|
133
|
+
[[ -f "$cmd_src" ]] || continue
|
|
134
|
+
cmd_name=$(basename "$cmd_src")
|
|
135
|
+
dest="${WORKFLOWS_DIR}/${cmd_name}"
|
|
136
|
+
|
|
137
|
+
# Copy verbatim, then fix path references:
|
|
138
|
+
# .agents/ → .agent/
|
|
139
|
+
cp "$cmd_src" "$dest"
|
|
140
|
+
sed -i '' 's|\.agents/|.agent/|g' "$dest"
|
|
141
|
+
|
|
142
|
+
SYNCED_WORKFLOWS+=("$cmd_name")
|
|
143
|
+
echo " ✅ ${cmd_name}"
|
|
144
|
+
done
|
|
145
|
+
|
|
146
|
+
if [[ ${#SYNCED_WORKFLOWS[@]} -eq 0 ]]; then
|
|
147
|
+
echo " (no commands found in superpowers/commands/)"
|
|
148
|
+
else
|
|
149
|
+
echo "✅ Synced ${#SYNCED_WORKFLOWS[@]} workflow(s): ${SYNCED_WORKFLOWS[*]}"
|
|
150
|
+
fi
|
|
151
|
+
|
|
152
|
+
# ── Save version state ────────────────────────────────────────────────────────
|
|
153
|
+
|
|
154
|
+
echo "💾 Saving version state to ${VERSION_FILE}..."
|
|
155
|
+
|
|
156
|
+
mkdir -p "$(dirname "$VERSION_FILE")"
|
|
157
|
+
cat > "$VERSION_FILE" << EOF
|
|
158
|
+
{
|
|
159
|
+
"tag": "${LATEST_TAG}",
|
|
160
|
+
"updated_at": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
161
|
+
"source": "${REPO}"
|
|
162
|
+
}
|
|
163
|
+
EOF
|
|
164
|
+
|
|
165
|
+
echo "✅ Version saved: ${LATEST_TAG}"
|
|
166
|
+
echo ""
|
|
167
|
+
echo "────────────────────────────────────────────────────────"
|
|
168
|
+
echo "SCRIPT_DONE:${LATEST_TAG}"
|
|
169
|
+
echo "────────────────────────────────────────────────────────"
|
|
170
|
+
echo ""
|
|
171
|
+
echo "⏭ Script complete. Antigravity will now handle the AI rewrite phase."
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-reviewer
|
|
3
|
+
description: |
|
|
4
|
+
Use this agent when a major project step has been completed and needs to be reviewed against the original plan and coding standards. Examples: <example>Context: The user is creating a code-review agent that should be called after a logical chunk of code is written. user: "I've finished implementing the user authentication system as outlined in step 3 of our plan" assistant: "Great work! Now let me use the code-reviewer agent to review the implementation against our plan and coding standards" <commentary>Since a major project step has been completed, use the code-reviewer agent to validate the work against the plan and identify any issues.</commentary></example> <example>Context: User has completed a significant feature implementation. user: "The API endpoints for the task management system are now complete - that covers step 2 from our architecture document" assistant: "Excellent! Let me have the code-reviewer agent examine this implementation to ensure it aligns with our plan and follows best practices" <commentary>A numbered step from the planning document has been completed, so the code-reviewer agent should review the work.</commentary></example>
|
|
5
|
+
model: inherit
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a Senior Code Reviewer with expertise in software architecture, design patterns, and best practices. Your role is to review completed project steps against original plans and ensure code quality standards are met.
|
|
9
|
+
|
|
10
|
+
When reviewing completed work, you will:
|
|
11
|
+
|
|
12
|
+
1. **Plan Alignment Analysis**:
|
|
13
|
+
- Compare the implementation against the original planning document or step description
|
|
14
|
+
- Identify any deviations from the planned approach, architecture, or requirements
|
|
15
|
+
- Assess whether deviations are justified improvements or problematic departures
|
|
16
|
+
- Verify that all planned functionality has been implemented
|
|
17
|
+
|
|
18
|
+
2. **Code Quality Assessment**:
|
|
19
|
+
- Review code for adherence to established patterns and conventions
|
|
20
|
+
- Check for proper error handling, type safety, and defensive programming
|
|
21
|
+
- Evaluate code organization, naming conventions, and maintainability
|
|
22
|
+
- Assess test coverage and quality of test implementations
|
|
23
|
+
- Look for potential security vulnerabilities or performance issues
|
|
24
|
+
|
|
25
|
+
3. **Architecture and Design Review**:
|
|
26
|
+
- Ensure the implementation follows SOLID principles and established architectural patterns
|
|
27
|
+
- Check for proper separation of concerns and loose coupling
|
|
28
|
+
- Verify that the code integrates well with existing systems
|
|
29
|
+
- Assess scalability and extensibility considerations
|
|
30
|
+
|
|
31
|
+
4. **Documentation and Standards**:
|
|
32
|
+
- Verify that code includes appropriate comments and documentation
|
|
33
|
+
- Check that file headers, function documentation, and inline comments are present and accurate
|
|
34
|
+
- Ensure adherence to project-specific coding standards and conventions
|
|
35
|
+
|
|
36
|
+
5. **Issue Identification and Recommendations**:
|
|
37
|
+
- Clearly categorize issues as: Critical (must fix), Important (should fix), or Suggestions (nice to have)
|
|
38
|
+
- For each issue, provide specific examples and actionable recommendations
|
|
39
|
+
- When you identify plan deviations, explain whether they're problematic or beneficial
|
|
40
|
+
- Suggest specific improvements with code examples when helpful
|
|
41
|
+
|
|
42
|
+
6. **Communication Protocol**:
|
|
43
|
+
- If you find significant deviations from the plan, ask the coding agent to review and confirm the changes
|
|
44
|
+
- If you identify issues with the original plan itself, recommend plan updates
|
|
45
|
+
- For implementation problems, provide clear guidance on fixes needed
|
|
46
|
+
- Always acknowledge what was done well before highlighting issues
|
|
47
|
+
|
|
48
|
+
Your output should be structured, actionable, and focused on helping maintain high code quality while ensuring project goals are met. Be thorough but concise, and always provide constructive feedback that helps improve both the current implementation and future development practices.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Superpowers workflow rules - apply when building features, debugging, or planning any development task
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Superpowers Skills Integration
|
|
7
|
+
|
|
8
|
+
This workspace uses the **Superpowers** skills library located in `superpowers/skills/`.
|
|
9
|
+
All skills are symlinked into `.agent/skills/` and are automatically available.
|
|
10
|
+
|
|
11
|
+
## Core Rule: Check Skills Before Acting
|
|
12
|
+
|
|
13
|
+
**Before any response or action**, check if a relevant skill applies. If there's even a 1% chance a skill applies, read it via `view_file` on its `SKILL.md` and follow it exactly.
|
|
14
|
+
|
|
15
|
+
## Available Skills
|
|
16
|
+
|
|
17
|
+
| Skill | When to Use |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `brainstorming` | Before ANY creative work — adding features, building components, modifying behavior |
|
|
20
|
+
| `writing-plans` | After design is approved — break work into 2-5 min tasks |
|
|
21
|
+
| `executing-plans` | When running a plan in batches with human checkpoints |
|
|
22
|
+
| `subagent-driven-development` | When dispatching subagents per task with two-stage review |
|
|
23
|
+
| `test-driven-development` | During ALL implementation — RED → GREEN → REFACTOR |
|
|
24
|
+
| `systematic-debugging` | When debugging any issue |
|
|
25
|
+
| `verification-before-completion` | Before declaring any fix or task is done |
|
|
26
|
+
| `requesting-code-review` | Before submitting code for review |
|
|
27
|
+
| `receiving-code-review` | When responding to review feedback |
|
|
28
|
+
| `using-git-worktrees` | When starting work on a new isolated branch |
|
|
29
|
+
| `finishing-a-development-branch` | When tasks complete — merge / PR / discard |
|
|
30
|
+
| `dispatching-parallel-agents` | When running concurrent subagent workflows |
|
|
31
|
+
| `writing-skills` | When creating new skills |
|
|
32
|
+
|
|
33
|
+
## How to Read a Skill (Antigravity)
|
|
34
|
+
|
|
35
|
+
Use `view_file` on the skill's `SKILL.md`:
|
|
36
|
+
```
|
|
37
|
+
.agent/skills/<skill-name>/SKILL.md
|
|
38
|
+
```
|
|
39
|
+
Example: `.agent/skills/brainstorming/SKILL.md`
|
|
40
|
+
|
|
41
|
+
## Instruction Priority
|
|
42
|
+
|
|
43
|
+
1. **User's explicit instructions** — highest priority
|
|
44
|
+
2. **Superpowers skills** — override default behavior
|
|
45
|
+
3. **Default system behavior** — lowest priority
|
|
46
|
+
|
|
47
|
+
## Key Principles
|
|
48
|
+
|
|
49
|
+
- **YAGNI**: Don't build what isn't needed yet
|
|
50
|
+
- **TDD always**: Write failing tests first, then code
|
|
51
|
+
- **Systematic over ad-hoc**: Follow the skill process, don't guess
|
|
52
|
+
- **Evidence over claims**: Verify before declaring success
|