mirror of
https://github.com/obra/superpowers.git
synced 2026-06-28 21:49:05 +08:00
Compare commits
62 Commits
codex/supe
...
45975ec695
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
45975ec695 | ||
|
|
e795530c23 | ||
|
|
28fd7a8192 | ||
|
|
831f6f977c | ||
|
|
5745f0ea99 | ||
|
|
b1c15fd9f8 | ||
|
|
abb801b7ef | ||
|
|
88eb6679ae | ||
|
|
9b3045a8fa | ||
|
|
7e59af8148 | ||
|
|
c13a884c06 | ||
|
|
1ca87f861f | ||
|
|
3adb7a0ffd | ||
|
|
49bcb34ccc | ||
|
|
f55f8df447 | ||
|
|
1e8000a4d4 | ||
|
|
c61f75030f | ||
|
|
e3dd3b4c5a | ||
|
|
e4a15b6d52 | ||
|
|
998c40be29 | ||
|
|
98263ce179 | ||
|
|
4c49406d22 | ||
|
|
238167f291 | ||
|
|
118d85b7e7 | ||
|
|
0f4d7d67c1 | ||
|
|
61ad4821da | ||
|
|
9dd13e534f | ||
|
|
77f98c5805 | ||
|
|
c62b835a0b | ||
|
|
5dade17572 | ||
|
|
4652e65ec8 | ||
|
|
abaaf8a6e6 | ||
|
|
c6d66a0bc7 | ||
|
|
7ebda5c81b | ||
|
|
2e53549478 | ||
|
|
79fee93c4e | ||
|
|
8b9a5da90b | ||
|
|
04ff6660e8 | ||
|
|
471aa93a4c | ||
|
|
872172870d | ||
|
|
ed06287a8a | ||
|
|
5406747197 | ||
|
|
879940ba5e | ||
|
|
0f306f0d18 | ||
|
|
af025aa35b | ||
|
|
738a18d6ff | ||
|
|
94b2bcbb24 | ||
|
|
ed4103ab91 | ||
|
|
ab500dade6 | ||
|
|
a22122d57f | ||
|
|
218c3ed93e | ||
|
|
9fa8ceb101 | ||
|
|
b045fa3950 | ||
|
|
bf8f7572eb | ||
|
|
c141508f36 | ||
|
|
7820adcde7 | ||
|
|
250dea46fd | ||
|
|
477c55386a | ||
|
|
cb4745eeb5 | ||
|
|
872ec69f4c | ||
|
|
e0fcfaf838 | ||
|
|
5bf3f77483 |
@@ -9,7 +9,7 @@
|
|||||||
{
|
{
|
||||||
"name": "superpowers",
|
"name": "superpowers",
|
||||||
"description": "Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques",
|
"description": "Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques",
|
||||||
"version": "5.1.0",
|
"version": "5.0.7",
|
||||||
"source": "./",
|
"source": "./",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Jesse Vincent",
|
"name": "Jesse Vincent",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "superpowers",
|
"name": "superpowers",
|
||||||
"description": "Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques",
|
"description": "Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques",
|
||||||
"version": "5.1.0",
|
"version": "5.0.7",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Jesse Vincent",
|
"name": "Jesse Vincent",
|
||||||
"email": "jesse@fsck.com"
|
"email": "jesse@fsck.com"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "superpowers",
|
"name": "superpowers",
|
||||||
"version": "5.1.0",
|
"version": "5.0.7",
|
||||||
"description": "An agentic skills framework & software development methodology that works: planning, TDD, debugging, and collaboration workflows.",
|
"description": "An agentic skills framework & software development methodology that works: planning, TDD, debugging, and collaboration workflows.",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Jesse Vincent",
|
"name": "Jesse Vincent",
|
||||||
|
|||||||
67
.codex/INSTALL.md
Normal file
67
.codex/INSTALL.md
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
# Installing Superpowers for Codex
|
||||||
|
|
||||||
|
Enable superpowers skills in Codex via native skill discovery. Just clone and symlink.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Git
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
1. **Clone the superpowers repository:**
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/obra/superpowers.git ~/.codex/superpowers
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Create the skills symlink:**
|
||||||
|
```bash
|
||||||
|
mkdir -p ~/.agents/skills
|
||||||
|
ln -s ~/.codex/superpowers/skills ~/.agents/skills/superpowers
|
||||||
|
```
|
||||||
|
|
||||||
|
**Windows (PowerShell):**
|
||||||
|
```powershell
|
||||||
|
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.agents\skills"
|
||||||
|
cmd /c mklink /J "$env:USERPROFILE\.agents\skills\superpowers" "$env:USERPROFILE\.codex\superpowers\skills"
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Restart Codex** (quit and relaunch the CLI) to discover the skills.
|
||||||
|
|
||||||
|
## Migrating from old bootstrap
|
||||||
|
|
||||||
|
If you installed superpowers before native skill discovery, you need to:
|
||||||
|
|
||||||
|
1. **Update the repo:**
|
||||||
|
```bash
|
||||||
|
cd ~/.codex/superpowers && git pull
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Create the skills symlink** (step 2 above) — this is the new discovery mechanism.
|
||||||
|
|
||||||
|
3. **Remove the old bootstrap block** from `~/.codex/AGENTS.md` — any block referencing `superpowers-codex bootstrap` is no longer needed.
|
||||||
|
|
||||||
|
4. **Restart Codex.**
|
||||||
|
|
||||||
|
## Verify
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ls -la ~/.agents/skills/superpowers
|
||||||
|
```
|
||||||
|
|
||||||
|
You should see a symlink (or junction on Windows) pointing to your superpowers skills directory.
|
||||||
|
|
||||||
|
## Updating
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ~/.codex/superpowers && git pull
|
||||||
|
```
|
||||||
|
|
||||||
|
Skills update instantly through the symlink.
|
||||||
|
|
||||||
|
## Uninstalling
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rm ~/.agents/skills/superpowers
|
||||||
|
```
|
||||||
|
|
||||||
|
Optionally delete the clone: `rm -rf ~/.codex/superpowers`.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "superpowers",
|
"name": "superpowers",
|
||||||
"displayName": "Superpowers",
|
"displayName": "Superpowers",
|
||||||
"description": "Core skills library: TDD, debugging, collaboration patterns, and proven techniques",
|
"description": "Core skills library: TDD, debugging, collaboration patterns, and proven techniques",
|
||||||
"version": "5.1.0",
|
"version": "5.0.7",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Jesse Vincent",
|
"name": "Jesse Vincent",
|
||||||
"email": "jesse@fsck.com"
|
"email": "jesse@fsck.com"
|
||||||
|
|||||||
39
.github/PULL_REQUEST_TEMPLATE.md
vendored
39
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -50,45 +50,6 @@ of human involvement will be closed without review.
|
|||||||
|-------------------------------------|-----------------|-------|------------------|
|
|-------------------------------------|-----------------|-------|------------------|
|
||||||
| | | | |
|
| | | | |
|
||||||
|
|
||||||
## New harness support (required if this PR adds a new harness)
|
|
||||||
|
|
||||||
<!-- If this PR adds support for a new harness (IDE, CLI tool, agent
|
|
||||||
runner), you MUST include a session transcript proving the
|
|
||||||
integration actually works.
|
|
||||||
|
|
||||||
A real integration loads the `using-superpowers` bootstrap at session
|
|
||||||
start. The bootstrap is what causes skills to auto-trigger. Without
|
|
||||||
it, the skills are dead weight — present on disk but never invoked
|
|
||||||
at the right moments.
|
|
||||||
|
|
||||||
ACCEPTANCE TEST: Open a clean session in the new harness and send
|
|
||||||
exactly this user message:
|
|
||||||
|
|
||||||
Let's make a react todo list
|
|
||||||
|
|
||||||
A working integration auto-triggers the `brainstorming` skill before
|
|
||||||
any code is written. Paste the complete transcript below.
|
|
||||||
|
|
||||||
These are NOT real integrations and PRs that ship them will be closed:
|
|
||||||
|
|
||||||
- Manually copying skill files into the harness
|
|
||||||
- Wrapping with `npx skills` or similar at-runtime shims
|
|
||||||
- Anything that requires the user to opt in to skills per-session
|
|
||||||
- Anything where brainstorming does not auto-trigger on the test above
|
|
||||||
|
|
||||||
If you are not sure whether your integration loads the bootstrap at
|
|
||||||
session start, it does not.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>Clean-session transcript for "Let's make a react todo list"</summary>
|
|
||||||
|
|
||||||
```
|
|
||||||
paste the complete transcript here
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
## Evaluation
|
## Evaluation
|
||||||
- What was the initial prompt you (or your human partner) used to start
|
- What was the initial prompt you (or your human partner) used to start
|
||||||
the session that led to this change?
|
the session that led to this change?
|
||||||
|
|||||||
21
CLAUDE.md
21
CLAUDE.md
@@ -64,27 +64,6 @@ PRs containing invented claims, fabricated problem descriptions, or hallucinated
|
|||||||
|
|
||||||
PRs containing multiple unrelated changes will be closed. Split them into separate PRs.
|
PRs containing multiple unrelated changes will be closed. Split them into separate PRs.
|
||||||
|
|
||||||
## New Harness Support
|
|
||||||
|
|
||||||
If your PR adds support for a new harness (IDE, CLI tool, agent runner), you MUST include a session transcript proving the integration works end-to-end.
|
|
||||||
|
|
||||||
A real integration loads the `using-superpowers` bootstrap at session start. The bootstrap is what causes skills to auto-trigger at the right moments. Without it, the skills are dead weight — present on disk but never invoked.
|
|
||||||
|
|
||||||
**The acceptance test.** Open a clean session in the new harness and send exactly this user message:
|
|
||||||
|
|
||||||
> Let's make a react todo list
|
|
||||||
|
|
||||||
A working integration auto-triggers the `brainstorming` skill before any code is written. Paste the complete transcript in the PR.
|
|
||||||
|
|
||||||
**These are not real integrations and will be closed:**
|
|
||||||
|
|
||||||
- Manually copying skill files into the harness
|
|
||||||
- Wrapping with `npx skills` or similar at-runtime shims
|
|
||||||
- Anything that requires the user to opt in to skills per-session
|
|
||||||
- Anything where `brainstorming` does not auto-trigger on the acceptance test above
|
|
||||||
|
|
||||||
If you are not sure whether your integration loads the bootstrap at session start, it does not.
|
|
||||||
|
|
||||||
## Skill Changes Require Evaluation
|
## Skill Changes Require Evaluation
|
||||||
|
|
||||||
Skills are not prose — they are code that shapes agent behavior. If you modify skill content:
|
Skills are not prose — they are code that shapes agent behavior. If you modify skill content:
|
||||||
|
|||||||
@@ -1,89 +1,5 @@
|
|||||||
# Superpowers Release Notes
|
# Superpowers Release Notes
|
||||||
|
|
||||||
## v5.1.0 (2026-04-30)
|
|
||||||
|
|
||||||
### Removals
|
|
||||||
|
|
||||||
- **Legacy slash commands removed** — `/brainstorm`, `/execute-plan`, and `/write-plan` are gone. They were deprecated stubs that did nothing but tell the user to invoke the corresponding skill. Invoke `superpowers:brainstorming`, `superpowers:executing-plans`, and `superpowers:writing-plans` directly instead. (#1188)
|
|
||||||
- **`superpowers:code-reviewer` named agent removed** — the agent was the plugin's only named agent and was used by exactly two skills, while every other reviewer/implementer subagent in the repo dispatches `general-purpose` with a prompt template alongside its skill. The agent's persona and checklist have been merged into `skills/requesting-code-review/code-reviewer.md` as a self-contained Task-dispatch template. Anyone dispatching `Task (superpowers:code-reviewer)` should switch to `Task (general-purpose)` with the prompt template instead. (PR #1299)
|
|
||||||
- **Integration sections removed from skills** — these were a legacy of the time before agents had native skills systems and didn't help with steering.
|
|
||||||
|
|
||||||
### Worktree Skills Rewrite
|
|
||||||
|
|
||||||
`using-git-worktrees` and `finishing-a-development-branch` now detect when the agent is already running inside an isolated worktree and prefer the harness's native worktree controls before falling back to `git worktree`. Behavior was TDD-validated and cross-platform-checked across five harnesses. (PRI-974, PR #1121)
|
|
||||||
|
|
||||||
- **Environment detection** — both skills check `GIT_DIR != GIT_COMMON` before doing anything; if already in a linked worktree, creation is skipped entirely. A submodule guard prevents false detection.
|
|
||||||
- **Consent before creating worktrees** — `using-git-worktrees` no longer creates worktrees implicitly; the skill asks the user first. Fixes #991 (subagent-driven-development was auto-creating worktrees without consent).
|
|
||||||
- **Native tool preference (Step 1a)** — when the harness exposes its own worktree tool (e.g. Codex), the skill defers to it. The user's stated preference is respected when expressed.
|
|
||||||
- **Provenance-based cleanup** — `finishing-a-development-branch` only cleans up worktrees inside `.worktrees/` (created by superpowers); anything outside is left alone. Fixes #940 (Option 2 was incorrectly cleaning up worktrees), #999 (merge-then-remove ordering), and #238 (`cd` to repo root before `git worktree remove`).
|
|
||||||
- **Detached HEAD handling** — the finishing menu collapses to two options when there is no branch to merge from.
|
|
||||||
- **Hardcoded `/Users/jesse` paths** in skill examples replaced with generic placeholders. (#858, PR #1122)
|
|
||||||
|
|
||||||
### Contributor Guidelines for AI Agents
|
|
||||||
|
|
||||||
Two new sections at the top of `CLAUDE.md` (symlinked to `AGENTS.md`) speak directly to AI agents. An audit of the last 100 closed PRs against this repo showed a 94% rejection rate driven by AI-generated slop: agents that didn't read the PR template, opened duplicates, fabricated problem descriptions, or pushed fork- or domain-specific changes upstream.
|
|
||||||
|
|
||||||
- **Pre-submission checklist** — read the PR template, search for existing PRs, verify a real problem exists, confirm the change belongs in core, and show the human partner the complete diff before submitting.
|
|
||||||
- **What we will not accept** — third-party dependencies, "compliance" rewrites of skill content, project-specific configuration, bulk PRs, speculative fixes, domain-specific skills, fork-specific changes, fabricated content, and bundled unrelated changes.
|
|
||||||
- **New harness PRs require a session transcript** — most past new-harness integrations copied skill files or wrapped with `npx skills` instead of loading the `using-superpowers` bootstrap at session start. The acceptance test ("Let's make a react todo list" must auto-trigger `brainstorming` in a clean session) and a complete transcript are now required.
|
|
||||||
|
|
||||||
### Codex Plugin Mirror Tooling
|
|
||||||
|
|
||||||
New `sync-to-codex-plugin` script mirrors superpowers into the OpenAI Codex plugin marketplace as `prime-radiant-inc/openai-codex-plugins`. Path/user-agnostic so any team member can run it. (PR #1165)
|
|
||||||
|
|
||||||
- Clones the fork fresh into a temp directory per run, regenerates overlays inline, and opens a PR; auto-detects upstream from the script's own location and preflights `rsync`/`git`/`gh auth`/`python3`.
|
|
||||||
- `--bootstrap` flag for first-time setup; `EXCLUDES` patterns anchored to source root; `assets/` excluded.
|
|
||||||
- Mirrors `CODE_OF_CONDUCT.md`; drops the `agents/openai.yaml` overlay.
|
|
||||||
- Seeds `interface.defaultPrompt` in the mirrored `plugin.json`. (PR #1180 by @arittr)
|
|
||||||
- Codex plugin files are committed to the source repo so the sync script uses canonical versions; Codex marketplace metadata is preserved.
|
|
||||||
|
|
||||||
### OpenCode
|
|
||||||
|
|
||||||
- **Bootstrap content cached at module level** — `getBootstrapContent()` was calling `fs.existsSync` + `fs.readFileSync` + frontmatter regex on every agent step (the `experimental.chat.messages.transform` hook fires on every step in OpenCode's agent loop). Now read once, cached for the session lifetime, with a null sentinel for the missing-file case. 15 regression tests cover cache behavior, fs call counts, the injection guard, the missing-file sentinel, and cache reset. (Fixes #1202)
|
|
||||||
- **Integration tests modernized**.
|
|
||||||
- **Install caveats clarified** in the README.
|
|
||||||
|
|
||||||
### Code Review Consolidation
|
|
||||||
|
|
||||||
`requesting-code-review` is now self-contained: the persona, checklist, and dispatch template live in `skills/requesting-code-review/code-reviewer.md` and the skill dispatches `Task (general-purpose)` directly. (PR #1299)
|
|
||||||
|
|
||||||
- **Single source of truth** — the persona/checklist that previously lived in both `agents/code-reviewer.md` and the skill's placeholder template (and drifted independently) is now one file.
|
|
||||||
- **`subagent-driven-development` follows suit** — its `code-quality-reviewer-prompt.md` now dispatches `Task (general-purpose)` instead of the named agent.
|
|
||||||
- **Behavioral test added** — `tests/claude-code/test-requesting-code-review.sh` plants real bugs (SQL injection, plaintext password handling, credential logging) into a tiny project and asserts the dispatched reviewer flags every planted issue at Critical/Important severity and refuses to approve the diff.
|
|
||||||
- **Codex and Copilot workaround docs trimmed** — the "Named agent dispatch" sections in `references/codex-tools.md` and `references/copilot-tools.md` documented how to flatten a named agent into a generic dispatch. With no named agents shipping, the workaround is unnecessary; both sections were dropped.
|
|
||||||
|
|
||||||
### Subagent-Driven Development
|
|
||||||
|
|
||||||
- **No more pause every 3 tasks** — the "review after each batch (3 tasks)" cadence in `requesting-code-review` (originally for `executing-plans`) was leaking into `subagent-driven-development`. Replaced with "each task or at natural checkpoints" plus an explicit continuous-execution directive.
|
|
||||||
- **SDD integration test now runs its assertions** — three independent bugs caused the test to silently bail before printing any verification results: an unresolved `..` segment in the working-dir path, a `set -euo pipefail` interaction with `find | sort | head -1` (SIGPIPE on the producer killed the script), and a missing `--plugin-dir` on the `claude -p` invocation that caused the test to load the installed plugin instead of the working tree. All three fixed; six verification tests now actually run against a real end-to-end SDD run.
|
|
||||||
|
|
||||||
### Cursor
|
|
||||||
|
|
||||||
- **Windows SessionStart hook** routed through `run-hook.cmd` instead of invoking the extensionless `session-start` script directly. Fixes Windows opening the file in an editor instead of running it. Also removed an accidental UTF-8 BOM from `hooks-cursor.json`.
|
|
||||||
|
|
||||||
### Gemini CLI
|
|
||||||
|
|
||||||
- **Subagent dispatch mapping** — Gemini's `Task` dispatch now maps to `@agent-name` / `@generalist`, with parallel subagent dispatch documented for independent tasks.
|
|
||||||
|
|
||||||
### Skills
|
|
||||||
|
|
||||||
- **Terminology cleanups** across skill content.
|
|
||||||
|
|
||||||
### Documentation & Install
|
|
||||||
|
|
||||||
- **Factory Droid installation instructions** added to README.
|
|
||||||
- **Quickstart install links** in README. (PR #1293 by @arittr)
|
|
||||||
- **Codex plugin install guidance** updated. (PR #1288 by @arittr)
|
|
||||||
- **Codex `wait` mapping corrected** to `wait_agent` in the tools reference.
|
|
||||||
- **Install order reorganized**; Codex install instructions cleaned up.
|
|
||||||
- **Removed vestigial `CHANGELOG.md`** in favor of `RELEASE-NOTES.md` as the single source. (PR #1163 by @shaanmajid)
|
|
||||||
- **Discord invite link** fixed; release announcements link and a detailed Discord description added to the Community section.
|
|
||||||
|
|
||||||
### Community
|
|
||||||
|
|
||||||
- @shaanmajid — vestigial `CHANGELOG.md` removal (PR #1163)
|
|
||||||
- @arittr — README quickstart install links (#1293), Codex plugin install guidance (#1288), `sync-to-codex-plugin` `interface.defaultPrompt` seed (#1180)
|
|
||||||
|
|
||||||
## v5.0.7 (2026-03-31)
|
## v5.0.7 (2026-03-31)
|
||||||
|
|
||||||
### GitHub Copilot CLI Support
|
### GitHub Copilot CLI Support
|
||||||
|
|||||||
126
docs/README.codex.md
Normal file
126
docs/README.codex.md
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
# Superpowers for Codex
|
||||||
|
|
||||||
|
Guide for using Superpowers with OpenAI Codex via native skill discovery.
|
||||||
|
|
||||||
|
## Quick Install
|
||||||
|
|
||||||
|
Tell Codex:
|
||||||
|
|
||||||
|
```
|
||||||
|
Fetch and follow instructions from https://raw.githubusercontent.com/obra/superpowers/refs/heads/main/.codex/INSTALL.md
|
||||||
|
```
|
||||||
|
|
||||||
|
## Manual Installation
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
- OpenAI Codex CLI
|
||||||
|
- Git
|
||||||
|
|
||||||
|
### Steps
|
||||||
|
|
||||||
|
1. Clone the repo:
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/obra/superpowers.git ~/.codex/superpowers
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Create the skills symlink:
|
||||||
|
```bash
|
||||||
|
mkdir -p ~/.agents/skills
|
||||||
|
ln -s ~/.codex/superpowers/skills ~/.agents/skills/superpowers
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Restart Codex.
|
||||||
|
|
||||||
|
4. **For subagent skills** (optional): Skills like `dispatching-parallel-agents` and `subagent-driven-development` require Codex's multi-agent feature. Add to your Codex config:
|
||||||
|
```toml
|
||||||
|
[features]
|
||||||
|
multi_agent = true
|
||||||
|
```
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
Use a junction instead of a symlink (works without Developer Mode):
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.agents\skills"
|
||||||
|
cmd /c mklink /J "$env:USERPROFILE\.agents\skills\superpowers" "$env:USERPROFILE\.codex\superpowers\skills"
|
||||||
|
```
|
||||||
|
|
||||||
|
## How It Works
|
||||||
|
|
||||||
|
Codex has native skill discovery — it scans `~/.agents/skills/` at startup, parses SKILL.md frontmatter, and loads skills on demand. Superpowers skills are made visible through a single symlink:
|
||||||
|
|
||||||
|
```
|
||||||
|
~/.agents/skills/superpowers/ → ~/.codex/superpowers/skills/
|
||||||
|
```
|
||||||
|
|
||||||
|
The `using-superpowers` skill is discovered automatically and enforces skill usage discipline — no additional configuration needed.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Skills are discovered automatically. Codex activates them when:
|
||||||
|
- You mention a skill by name (e.g., "use brainstorming")
|
||||||
|
- The task matches a skill's description
|
||||||
|
- The `using-superpowers` skill directs Codex to use one
|
||||||
|
|
||||||
|
### Personal Skills
|
||||||
|
|
||||||
|
Create your own skills in `~/.agents/skills/`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir -p ~/.agents/skills/my-skill
|
||||||
|
```
|
||||||
|
|
||||||
|
Create `~/.agents/skills/my-skill/SKILL.md`:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
---
|
||||||
|
name: my-skill
|
||||||
|
description: Use when [condition] - [what it does]
|
||||||
|
---
|
||||||
|
|
||||||
|
# My Skill
|
||||||
|
|
||||||
|
[Your skill content here]
|
||||||
|
```
|
||||||
|
|
||||||
|
The `description` field is how Codex decides when to activate a skill automatically — write it as a clear trigger condition.
|
||||||
|
|
||||||
|
## Updating
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ~/.codex/superpowers && git pull
|
||||||
|
```
|
||||||
|
|
||||||
|
Skills update instantly through the symlink.
|
||||||
|
|
||||||
|
## Uninstalling
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rm ~/.agents/skills/superpowers
|
||||||
|
```
|
||||||
|
|
||||||
|
**Windows (PowerShell):**
|
||||||
|
```powershell
|
||||||
|
Remove-Item "$env:USERPROFILE\.agents\skills\superpowers"
|
||||||
|
```
|
||||||
|
|
||||||
|
Optionally delete the clone: `rm -rf ~/.codex/superpowers` (Windows: `Remove-Item -Recurse -Force "$env:USERPROFILE\.codex\superpowers"`).
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Skills not showing up
|
||||||
|
|
||||||
|
1. Verify the symlink: `ls -la ~/.agents/skills/superpowers`
|
||||||
|
2. Check skills exist: `ls ~/.codex/superpowers/skills`
|
||||||
|
3. Restart Codex — skills are discovered at startup
|
||||||
|
|
||||||
|
### Windows junction issues
|
||||||
|
|
||||||
|
Junctions normally work without special permissions. If creation fails, try running PowerShell as administrator.
|
||||||
|
|
||||||
|
## Getting Help
|
||||||
|
|
||||||
|
- Report issues: https://github.com/obra/superpowers/issues
|
||||||
|
- Main documentation: https://github.com/obra/superpowers
|
||||||
@@ -275,16 +275,23 @@ If no native tool is available, create a worktree manually using git.
|
|||||||
|
|
||||||
Follow this priority order:
|
Follow this priority order:
|
||||||
|
|
||||||
1. **Check your instructions for a worktree directory preference.** If specified, use it without asking.
|
1. **Check existing directories:**
|
||||||
|
|
||||||
2. **Check existing project-local directories:**
|
|
||||||
```bash
|
```bash
|
||||||
ls -d .worktrees 2>/dev/null # Preferred (hidden)
|
ls -d .worktrees 2>/dev/null # Preferred (hidden)
|
||||||
ls -d worktrees 2>/dev/null # Alternative
|
ls -d worktrees 2>/dev/null # Alternative
|
||||||
```
|
```
|
||||||
If found, use that directory. If both exist, `.worktrees` wins.
|
If found, use that directory. If both exist, `.worktrees` wins.
|
||||||
|
|
||||||
3. **Default to `.worktrees/`.**
|
2. **Check for existing global directory:**
|
||||||
|
```bash
|
||||||
|
project=$(basename "$(git rev-parse --show-toplevel)")
|
||||||
|
ls -d ~/.config/superpowers/worktrees/$project 2>/dev/null
|
||||||
|
```
|
||||||
|
If found, use it (backward compatibility with legacy global path).
|
||||||
|
|
||||||
|
3. **Check your instructions for a worktree directory preference.** If specified, use it without asking.
|
||||||
|
|
||||||
|
4. **Default to `.worktrees/`.**
|
||||||
|
|
||||||
#### Safety Verification (project-local directories only)
|
#### Safety Verification (project-local directories only)
|
||||||
|
|
||||||
@@ -298,11 +305,16 @@ git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/d
|
|||||||
|
|
||||||
**Why critical:** Prevents accidentally committing worktree contents to repository.
|
**Why critical:** Prevents accidentally committing worktree contents to repository.
|
||||||
|
|
||||||
|
Global directories (`~/.config/superpowers/worktrees/`) need no verification.
|
||||||
|
|
||||||
#### Create the Worktree
|
#### Create the Worktree
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
project=$(basename "$(git rev-parse --show-toplevel)")
|
||||||
|
|
||||||
# Determine path based on chosen location
|
# Determine path based on chosen location
|
||||||
path="$LOCATION/$BRANCH_NAME"
|
# For project-local: path="$LOCATION/$BRANCH_NAME"
|
||||||
|
# For global: path="~/.config/superpowers/worktrees/$project/$BRANCH_NAME"
|
||||||
|
|
||||||
git worktree add "$path" -b "$BRANCH_NAME"
|
git worktree add "$path" -b "$BRANCH_NAME"
|
||||||
cd "$path"
|
cd "$path"
|
||||||
@@ -375,6 +387,7 @@ Ready to implement <feature-name>
|
|||||||
| `worktrees/` exists | Use it (verify ignored) |
|
| `worktrees/` exists | Use it (verify ignored) |
|
||||||
| Both exist | Use `.worktrees/` |
|
| Both exist | Use `.worktrees/` |
|
||||||
| Neither exists | Check instruction file, then default `.worktrees/` |
|
| Neither exists | Check instruction file, then default `.worktrees/` |
|
||||||
|
| Global path exists | Use it (backward compat) |
|
||||||
| Directory not ignored | Add to .gitignore + commit |
|
| Directory not ignored | Add to .gitignore + commit |
|
||||||
| Permission error on create | Sandbox fallback, work in place |
|
| Permission error on create | Sandbox fallback, work in place |
|
||||||
| Tests fail during baseline | Report failures + ask |
|
| Tests fail during baseline | Report failures + ask |
|
||||||
@@ -451,7 +464,7 @@ git commit -m "feat: rewrite using-git-worktrees with detect-and-defer (PRI-974)
|
|||||||
Step 0: GIT_DIR != GIT_COMMON detection (skip if already isolated)
|
Step 0: GIT_DIR != GIT_COMMON detection (skip if already isolated)
|
||||||
Step 0 consent: opt-in prompt before creating worktree (#991)
|
Step 0 consent: opt-in prompt before creating worktree (#991)
|
||||||
Step 1a: native tool preference (short, first, declarative)
|
Step 1a: native tool preference (short, first, declarative)
|
||||||
Step 1b: git worktree fallback with project-local directory policy
|
Step 1b: git worktree fallback with hooks symlink and legacy path compat
|
||||||
Submodule guard prevents false detection
|
Submodule guard prevents false detection
|
||||||
Platform-neutral instruction file references (#1049)"
|
Platform-neutral instruction file references (#1049)"
|
||||||
```
|
```
|
||||||
@@ -650,7 +663,7 @@ WORKTREE_PATH=$(git rev-parse --show-toplevel)
|
|||||||
|
|
||||||
**If `GIT_DIR == GIT_COMMON`:** Normal repo, no worktree to clean up. Done.
|
**If `GIT_DIR == GIT_COMMON`:** Normal repo, no worktree to clean up. Done.
|
||||||
|
|
||||||
**If worktree path is under `.worktrees/` or `worktrees/`:** Superpowers created this worktree — we own cleanup.
|
**If worktree path is under `.worktrees/` or `~/.config/superpowers/worktrees/`:** Superpowers created this worktree — we own cleanup.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
|
MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
|
||||||
@@ -694,7 +707,7 @@ git worktree prune # Self-healing: clean up any stale registrations
|
|||||||
|
|
||||||
**Cleaning up harness-owned worktrees**
|
**Cleaning up harness-owned worktrees**
|
||||||
- **Problem:** Removing a worktree the harness created causes phantom state
|
- **Problem:** Removing a worktree the harness created causes phantom state
|
||||||
- **Fix:** Only clean up worktrees under `.worktrees/` or `worktrees/`
|
- **Fix:** Only clean up worktrees under `.worktrees/` or `~/.config/superpowers/worktrees/`
|
||||||
|
|
||||||
**No confirmation for discard**
|
**No confirmation for discard**
|
||||||
- **Problem:** Accidentally delete work
|
- **Problem:** Accidentally delete work
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ The skill describes the goal ("ensure work happens in an isolated workspace") an
|
|||||||
|
|
||||||
### Provenance-based ownership
|
### Provenance-based ownership
|
||||||
|
|
||||||
Whoever creates the worktree owns its cleanup. If the harness created it, superpowers doesn't touch it. If superpowers created it (via git fallback), superpowers cleans it up. The heuristic: if the worktree lives under `.worktrees/` or `worktrees/`, superpowers owns it. Anything else (`.claude/worktrees/`, `~/.codex/worktrees/`, `.gemini/worktrees/`, or old user-global Superpowers paths) belongs to the harness or user and is left alone.
|
Whoever creates the worktree owns its cleanup. If the harness created it, superpowers doesn't touch it. If superpowers created it (via git fallback), superpowers cleans it up. The heuristic: if the worktree lives under `.worktrees/` or `~/.config/superpowers/worktrees/`, superpowers owns it. Anything else (`.claude/worktrees/`, `~/.codex/worktrees/`, `.gemini/worktrees/`) belongs to the harness.
|
||||||
|
|
||||||
## Design
|
## Design
|
||||||
|
|
||||||
@@ -110,11 +110,12 @@ File splitting (Step 1b in a separate skill) was tested and proven unnecessary.
|
|||||||
When no native tool is available, create a worktree manually.
|
When no native tool is available, create a worktree manually.
|
||||||
|
|
||||||
**Directory selection** (priority order):
|
**Directory selection** (priority order):
|
||||||
1. Check the project's agent instruction file (CLAUDE.md, GEMINI.md, AGENTS.md, .cursorrules, or equivalent) for a worktree directory preference.
|
1. Check for existing `.worktrees/` or `worktrees/` directory — if found, use it. If both exist, `.worktrees/` wins.
|
||||||
2. Check for existing `.worktrees/` or `worktrees/` directory — if found, use it. If both exist, `.worktrees/` wins.
|
2. Check for existing `~/.config/superpowers/worktrees/<project>/` directory — if found, use it (backward compatibility with legacy global path).
|
||||||
3. Default to `.worktrees/`.
|
3. Check the project's agent instruction file (CLAUDE.md, GEMINI.md, AGENTS.md, .cursorrules, or equivalent) for a worktree directory preference.
|
||||||
|
4. Default to `.worktrees/`.
|
||||||
|
|
||||||
No interactive directory selection prompt. Old user-global Superpowers worktree paths are not detected or offered; new manual worktrees are project-local unless the user explicitly specifies another location.
|
No interactive directory selection prompt. The global path (`~/.config/superpowers/worktrees/`) is no longer offered as a choice to new users, but existing worktrees at that location are detected and used for backward compatibility.
|
||||||
|
|
||||||
**Safety verification** (project-local directories only):
|
**Safety verification** (project-local directories only):
|
||||||
|
|
||||||
@@ -231,7 +232,7 @@ if GIT_DIR == GIT_COMMON:
|
|||||||
# Normal repo, no worktree to clean up
|
# Normal repo, no worktree to clean up
|
||||||
done
|
done
|
||||||
|
|
||||||
if worktree path is under .worktrees/ or worktrees/:
|
if worktree path is under .worktrees/ or ~/.config/superpowers/worktrees/:
|
||||||
# Superpowers created it — we own cleanup
|
# Superpowers created it — we own cleanup
|
||||||
cd to main repo root # Bug #238 fix
|
cd to main repo root # Bug #238 fix
|
||||||
git worktree remove <path>
|
git worktree remove <path>
|
||||||
@@ -317,7 +318,7 @@ As of 2026-04-06, Claude Code is the only harness with an agent-callable mid-ses
|
|||||||
|
|
||||||
### Provenance heuristic
|
### Provenance heuristic
|
||||||
|
|
||||||
The `.worktrees/` or `worktrees/` = ours, anything else = hands off` heuristic works for every current harness. If a future harness adopts one of those project-local directories as its convention, we'd have a false positive (superpowers tries to clean up a harness-owned worktree). Similarly, if a user manually runs `git worktree add .worktrees/experiment` without superpowers, we'd incorrectly claim ownership. Both are low risk — every harness uses branded paths, and manual `.worktrees/` creation is unlikely — but worth noting.
|
The `.worktrees/` or `~/.config/superpowers/worktrees/` = ours, anything else = hands off` heuristic works for every current harness. If a future harness adopts `.worktrees/` as its convention, we'd have a false positive (superpowers tries to clean up a harness-owned worktree). Similarly, if a user manually runs `git worktree add .worktrees/experiment` without superpowers, we'd incorrectly claim ownership. Both are low risk — every harness uses branded paths, and manual `.worktrees/` creation is unlikely — but worth noting.
|
||||||
|
|
||||||
### Detached HEAD finishing
|
### Detached HEAD finishing
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "superpowers",
|
"name": "superpowers",
|
||||||
"description": "Core skills library: TDD, debugging, collaboration patterns, and proven techniques",
|
"description": "Core skills library: TDD, debugging, collaboration patterns, and proven techniques",
|
||||||
"version": "5.1.0",
|
"version": "5.0.7",
|
||||||
"contextFileName": "GEMINI.md"
|
"contextFileName": "GEMINI.md"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "superpowers",
|
"name": "superpowers",
|
||||||
"version": "5.1.0",
|
"version": "5.0.7",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": ".opencode/plugins/superpowers.js"
|
"main": ".opencode/plugins/superpowers.js"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ WORKTREE_PATH=$(git rev-parse --show-toplevel)
|
|||||||
|
|
||||||
**If `GIT_DIR == GIT_COMMON`:** Normal repo, no worktree to clean up. Done.
|
**If `GIT_DIR == GIT_COMMON`:** Normal repo, no worktree to clean up. Done.
|
||||||
|
|
||||||
**If worktree path is under `.worktrees/` or `worktrees/`:** Superpowers created this worktree — we own cleanup.
|
**If worktree path is under `.worktrees/`, `worktrees/`, or `~/.config/superpowers/worktrees/`:** Superpowers created this worktree — we own cleanup.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
|
MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
|
||||||
@@ -224,7 +224,7 @@ git worktree prune # Self-healing: clean up any stale registrations
|
|||||||
|
|
||||||
**Cleaning up harness-owned worktrees**
|
**Cleaning up harness-owned worktrees**
|
||||||
- **Problem:** Removing a worktree the harness created causes phantom state
|
- **Problem:** Removing a worktree the harness created causes phantom state
|
||||||
- **Fix:** Only clean up worktrees under `.worktrees/` or `worktrees/`
|
- **Fix:** Only clean up worktrees under `.worktrees/`, `worktrees/`, or `~/.config/superpowers/worktrees/`
|
||||||
|
|
||||||
**No confirmation for discard**
|
**No confirmation for discard**
|
||||||
- **Problem:** Accidentally delete work
|
- **Problem:** Accidentally delete work
|
||||||
|
|||||||
@@ -73,7 +73,14 @@ Follow this priority order. Explicit user preference always beats observed files
|
|||||||
```
|
```
|
||||||
If found, use it. If both exist, `.worktrees` wins.
|
If found, use it. If both exist, `.worktrees` wins.
|
||||||
|
|
||||||
3. **If there is no other guidance available**, default to `.worktrees/` at the project root.
|
3. **Check for an existing global directory:**
|
||||||
|
```bash
|
||||||
|
project=$(basename "$(git rev-parse --show-toplevel)")
|
||||||
|
ls -d ~/.config/superpowers/worktrees/$project 2>/dev/null
|
||||||
|
```
|
||||||
|
If found, use it (backward compatibility with legacy global path).
|
||||||
|
|
||||||
|
4. **If there is no other guidance available**, default to `.worktrees/` at the project root.
|
||||||
|
|
||||||
#### Safety Verification (project-local directories only)
|
#### Safety Verification (project-local directories only)
|
||||||
|
|
||||||
@@ -87,11 +94,16 @@ git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/d
|
|||||||
|
|
||||||
**Why critical:** Prevents accidentally committing worktree contents to repository.
|
**Why critical:** Prevents accidentally committing worktree contents to repository.
|
||||||
|
|
||||||
|
Global directories (`~/.config/superpowers/worktrees/`) need no verification.
|
||||||
|
|
||||||
#### Create the Worktree
|
#### Create the Worktree
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
project=$(basename "$(git rev-parse --show-toplevel)")
|
||||||
|
|
||||||
# Determine path based on chosen location
|
# Determine path based on chosen location
|
||||||
path="$LOCATION/$BRANCH_NAME"
|
# For project-local: path="$LOCATION/$BRANCH_NAME"
|
||||||
|
# For global: path="~/.config/superpowers/worktrees/$project/$BRANCH_NAME"
|
||||||
|
|
||||||
git worktree add "$path" -b "$BRANCH_NAME"
|
git worktree add "$path" -b "$BRANCH_NAME"
|
||||||
cd "$path"
|
cd "$path"
|
||||||
@@ -151,6 +163,7 @@ Ready to implement <feature-name>
|
|||||||
| `worktrees/` exists | Use it (verify ignored) |
|
| `worktrees/` exists | Use it (verify ignored) |
|
||||||
| Both exist | Use `.worktrees/` |
|
| Both exist | Use `.worktrees/` |
|
||||||
| Neither exists | Check instruction file, then default `.worktrees/` |
|
| Neither exists | Check instruction file, then default `.worktrees/` |
|
||||||
|
| Global path exists | Use it (backward compat) |
|
||||||
| Directory not ignored | Add to .gitignore + commit |
|
| Directory not ignored | Add to .gitignore + commit |
|
||||||
| Permission error on create | Sandbox fallback, work in place |
|
| Permission error on create | Sandbox fallback, work in place |
|
||||||
| Tests fail during baseline | Report failures + ask |
|
| Tests fail during baseline | Report failures + ask |
|
||||||
@@ -176,7 +189,7 @@ Ready to implement <feature-name>
|
|||||||
### Assuming directory location
|
### Assuming directory location
|
||||||
|
|
||||||
- **Problem:** Creates inconsistency, violates project conventions
|
- **Problem:** Creates inconsistency, violates project conventions
|
||||||
- **Fix:** Follow priority: explicit instructions > existing project-local directory > default
|
- **Fix:** Follow priority: existing > global legacy > instruction file > default
|
||||||
|
|
||||||
### Proceeding with failing tests
|
### Proceeding with failing tests
|
||||||
|
|
||||||
@@ -196,7 +209,7 @@ Ready to implement <feature-name>
|
|||||||
**Always:**
|
**Always:**
|
||||||
- Run Step 0 detection first
|
- Run Step 0 detection first
|
||||||
- Prefer native tools over git fallback
|
- Prefer native tools over git fallback
|
||||||
- Follow directory priority: explicit instructions > existing project-local directory > default
|
- Follow directory priority: existing > global legacy > instruction file > default
|
||||||
- Verify directory is ignored for project-local
|
- Verify directory is ignored for project-local
|
||||||
- Auto-detect and run project setup
|
- Auto-detect and run project setup
|
||||||
- Verify clean test baseline
|
- Verify clean test baseline
|
||||||
|
|||||||
@@ -14,29 +14,11 @@ Skills use Claude Code tool names. When you encounter these in a skill, use your
|
|||||||
| `Skill` tool (invoke a skill) | `activate_skill` |
|
| `Skill` tool (invoke a skill) | `activate_skill` |
|
||||||
| `WebSearch` | `google_web_search` |
|
| `WebSearch` | `google_web_search` |
|
||||||
| `WebFetch` | `web_fetch` |
|
| `WebFetch` | `web_fetch` |
|
||||||
| `Task` tool (dispatch subagent) | `@agent-name` (see [Subagent support](#subagent-support)) |
|
| `Task` tool (dispatch subagent) | No equivalent — Gemini CLI does not support subagents |
|
||||||
|
|
||||||
## Subagent support
|
## No subagent support
|
||||||
|
|
||||||
Gemini CLI supports subagents natively via the `@` syntax. Use the built-in `@generalist` agent to dispatch any task — it has access to all tools and follows the prompt you provide.
|
Gemini CLI has no equivalent to Claude Code's `Task` tool. Skills that rely on subagent dispatch (`subagent-driven-development`, `dispatching-parallel-agents`) will fall back to single-session execution via `executing-plans`.
|
||||||
|
|
||||||
When a skill says to dispatch a named agent type, use `@generalist` with the full prompt from the skill's prompt template:
|
|
||||||
|
|
||||||
| Skill instruction | Gemini CLI equivalent |
|
|
||||||
|-------------------|----------------------|
|
|
||||||
| `Task tool (superpowers:implementer)` | `@generalist` with the filled `implementer-prompt.md` template |
|
|
||||||
| `Task tool (superpowers:spec-reviewer)` | `@generalist` with the filled `spec-reviewer-prompt.md` template |
|
|
||||||
| `Task tool (superpowers:code-reviewer)` | `@code-reviewer` (bundled agent) or `@generalist` with the filled review prompt |
|
|
||||||
| `Task tool (superpowers:code-quality-reviewer)` | `@generalist` with the filled `code-quality-reviewer-prompt.md` template |
|
|
||||||
| `Task tool (general-purpose)` with inline prompt | `@generalist` with your inline prompt |
|
|
||||||
|
|
||||||
### Prompt filling
|
|
||||||
|
|
||||||
Skills provide prompt templates with placeholders like `{WHAT_WAS_IMPLEMENTED}` or `[FULL TEXT of task]`. Fill all placeholders and pass the complete prompt as the message to `@generalist`. The prompt template itself contains the agent's role, review criteria, and expected output format — `@generalist` will follow it.
|
|
||||||
|
|
||||||
### Parallel dispatch
|
|
||||||
|
|
||||||
Gemini CLI supports parallel subagent dispatch. When a skill asks you to dispatch multiple independent subagent tasks in parallel, request all of those `@generalist` or named subagent tasks together in the same prompt. Keep dependent tasks sequential, but do not serialize independent subagent tasks just to preserve a simpler history.
|
|
||||||
|
|
||||||
## Additional Gemini CLI tools
|
## Additional Gemini CLI tools
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ fi
|
|||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
VERBOSE=false
|
VERBOSE=false
|
||||||
SPECIFIC_TEST=""
|
SPECIFIC_TEST=""
|
||||||
TIMEOUT=600 # Default 10 minute timeout per test
|
TIMEOUT=300 # Default 5 minute timeout per test
|
||||||
RUN_INTEGRATION=false
|
RUN_INTEGRATION=false
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
@@ -73,7 +73,6 @@ done
|
|||||||
|
|
||||||
# List of skill tests to run (fast unit tests)
|
# List of skill tests to run (fast unit tests)
|
||||||
tests=(
|
tests=(
|
||||||
"test-worktree-path-policy.sh"
|
|
||||||
"test-subagent-driven-development.sh"
|
"test-subagent-driven-development.sh"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ run_claude() {
|
|||||||
local allowed_tools="${3:-}"
|
local allowed_tools="${3:-}"
|
||||||
local output_file=$(mktemp)
|
local output_file=$(mktemp)
|
||||||
|
|
||||||
# Build command as an argv array so timeout wraps claude directly.
|
# Build command
|
||||||
local cmd=(claude -p "$prompt")
|
local cmd="claude -p \"$prompt\""
|
||||||
if [ -n "$allowed_tools" ]; then
|
if [ -n "$allowed_tools" ]; then
|
||||||
cmd+=(--allowed-tools="$allowed_tools")
|
cmd="$cmd --allowed-tools=$allowed_tools"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run Claude in headless mode with timeout
|
# Run Claude in headless mode with timeout
|
||||||
if timeout "$timeout" "${cmd[@]}" > "$output_file" 2>&1; then
|
if timeout "$timeout" bash -c "$cmd" > "$output_file" 2>&1; then
|
||||||
cat "$output_file"
|
cat "$output_file"
|
||||||
rm -f "$output_file"
|
rm -f "$output_file"
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -6,15 +6,13 @@ set -euo pipefail
|
|||||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
source "$SCRIPT_DIR/test-helpers.sh"
|
source "$SCRIPT_DIR/test-helpers.sh"
|
||||||
|
|
||||||
CLAUDE_PROMPT_TIMEOUT="${CLAUDE_PROMPT_TIMEOUT:-90}"
|
|
||||||
|
|
||||||
echo "=== Test: subagent-driven-development skill ==="
|
echo "=== Test: subagent-driven-development skill ==="
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Test 1: Verify skill can be loaded
|
# Test 1: Verify skill can be loaded
|
||||||
echo "Test 1: Skill loading..."
|
echo "Test 1: Skill loading..."
|
||||||
|
|
||||||
output=$(run_claude "What is the subagent-driven-development skill? Describe its key steps briefly." "$CLAUDE_PROMPT_TIMEOUT")
|
output=$(run_claude "What is the subagent-driven-development skill? Describe its key steps briefly." 30)
|
||||||
|
|
||||||
if assert_contains "$output" "subagent-driven-development\|Subagent-Driven Development\|Subagent Driven" "Skill is recognized"; then
|
if assert_contains "$output" "subagent-driven-development\|Subagent-Driven Development\|Subagent Driven" "Skill is recognized"; then
|
||||||
: # pass
|
: # pass
|
||||||
@@ -33,11 +31,9 @@ echo ""
|
|||||||
# Test 2: Verify skill describes correct workflow order
|
# Test 2: Verify skill describes correct workflow order
|
||||||
echo "Test 2: Workflow ordering..."
|
echo "Test 2: Workflow ordering..."
|
||||||
|
|
||||||
output=$(run_claude "In the subagent-driven-development skill, what comes first: spec compliance review or code quality review? Answer using exactly this structure:
|
output=$(run_claude "In the subagent-driven-development skill, what comes first: spec compliance review or code quality review? Be specific about the order." 30)
|
||||||
First: <review type>
|
|
||||||
Second: <review type>" "$CLAUDE_PROMPT_TIMEOUT")
|
|
||||||
|
|
||||||
if assert_order "$output" "First:.*spec.*compliance" "Second:.*code.*quality" "Spec compliance before code quality"; then
|
if assert_order "$output" "spec.*compliance" "code.*quality" "Spec compliance before code quality"; then
|
||||||
: # pass
|
: # pass
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
@@ -48,17 +44,15 @@ echo ""
|
|||||||
# Test 3: Verify self-review is mentioned
|
# Test 3: Verify self-review is mentioned
|
||||||
echo "Test 3: Self-review requirement..."
|
echo "Test 3: Self-review requirement..."
|
||||||
|
|
||||||
output=$(run_claude "Does the subagent-driven-development skill require implementers to self-review before handoff, and can self-review replace the external reviews? Answer using exactly this structure:
|
output=$(run_claude "Does the subagent-driven-development skill require implementers to do self-review? What should they check?" 30)
|
||||||
Self-review required: <yes or no>
|
|
||||||
Self-review replaces external review: <yes or no>" "$CLAUDE_PROMPT_TIMEOUT")
|
|
||||||
|
|
||||||
if assert_contains "$output" "Self-review required:.*yes" "Mentions self-review"; then
|
if assert_contains "$output" "self-review\|self review" "Mentions self-review"; then
|
||||||
: # pass
|
: # pass
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if assert_contains "$output" "Self-review replaces external review:.*no" "Self-review does not replace external review"; then
|
if assert_contains "$output" "completeness\|Completeness" "Checks completeness"; then
|
||||||
: # pass
|
: # pass
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
@@ -69,7 +63,7 @@ echo ""
|
|||||||
# Test 4: Verify plan is read once
|
# Test 4: Verify plan is read once
|
||||||
echo "Test 4: Plan reading efficiency..."
|
echo "Test 4: Plan reading efficiency..."
|
||||||
|
|
||||||
output=$(run_claude "In subagent-driven-development, how many times should the controller read the plan file? When does this happen?" "$CLAUDE_PROMPT_TIMEOUT")
|
output=$(run_claude "In subagent-driven-development, how many times should the controller read the plan file? When does this happen?" 30)
|
||||||
|
|
||||||
if assert_contains "$output" "once\|one time\|single" "Read plan once"; then
|
if assert_contains "$output" "once\|one time\|single" "Read plan once"; then
|
||||||
: # pass
|
: # pass
|
||||||
@@ -88,7 +82,7 @@ echo ""
|
|||||||
# Test 5: Verify spec compliance reviewer is skeptical
|
# Test 5: Verify spec compliance reviewer is skeptical
|
||||||
echo "Test 5: Spec compliance reviewer mindset..."
|
echo "Test 5: Spec compliance reviewer mindset..."
|
||||||
|
|
||||||
output=$(run_claude "What is the spec compliance reviewer's attitude toward the implementer's report in subagent-driven-development?" "$CLAUDE_PROMPT_TIMEOUT")
|
output=$(run_claude "What is the spec compliance reviewer's attitude toward the implementer's report in subagent-driven-development?" 30)
|
||||||
|
|
||||||
if assert_contains "$output" "not trust\|don't trust\|skeptical\|verify.*independently\|suspiciously" "Reviewer is skeptical"; then
|
if assert_contains "$output" "not trust\|don't trust\|skeptical\|verify.*independently\|suspiciously" "Reviewer is skeptical"; then
|
||||||
: # pass
|
: # pass
|
||||||
@@ -107,7 +101,7 @@ echo ""
|
|||||||
# Test 6: Verify review loops
|
# Test 6: Verify review loops
|
||||||
echo "Test 6: Review loop requirements..."
|
echo "Test 6: Review loop requirements..."
|
||||||
|
|
||||||
output=$(run_claude "In subagent-driven-development, what happens if a reviewer finds issues? Is it a one-time review or a loop?" "$CLAUDE_PROMPT_TIMEOUT")
|
output=$(run_claude "In subagent-driven-development, what happens if a reviewer finds issues? Is it a one-time review or a loop?" 30)
|
||||||
|
|
||||||
if assert_contains "$output" "loop\|again\|repeat\|until.*approved\|until.*compliant" "Review loops mentioned"; then
|
if assert_contains "$output" "loop\|again\|repeat\|until.*approved\|until.*compliant" "Review loops mentioned"; then
|
||||||
: # pass
|
: # pass
|
||||||
@@ -126,9 +120,7 @@ echo ""
|
|||||||
# Test 7: Verify full task text is provided
|
# Test 7: Verify full task text is provided
|
||||||
echo "Test 7: Task context provision..."
|
echo "Test 7: Task context provision..."
|
||||||
|
|
||||||
output=$(run_claude "In subagent-driven-development, how does the controller provide task information to the implementer subagent? Answer using exactly this structure:
|
output=$(run_claude "In subagent-driven-development, how does the controller provide task information to the implementer subagent? Does it make them read a file or provide it directly?" 30)
|
||||||
Controller provides: <directly or by file>
|
|
||||||
Implementer must read plan file: <yes or no>" "$CLAUDE_PROMPT_TIMEOUT")
|
|
||||||
|
|
||||||
if assert_contains "$output" "provide.*directly\|full.*text\|paste\|include.*prompt" "Provides text directly"; then
|
if assert_contains "$output" "provide.*directly\|full.*text\|paste\|include.*prompt" "Provides text directly"; then
|
||||||
: # pass
|
: # pass
|
||||||
@@ -136,7 +128,7 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if assert_contains "$output" "Implementer must read plan file:.*no" "Doesn't make subagent read file"; then
|
if assert_not_contains "$output" "read.*file\|open.*file" "Doesn't make subagent read file"; then
|
||||||
: # pass
|
: # pass
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
@@ -147,7 +139,7 @@ echo ""
|
|||||||
# Test 8: Verify worktree requirement
|
# Test 8: Verify worktree requirement
|
||||||
echo "Test 8: Worktree requirement..."
|
echo "Test 8: Worktree requirement..."
|
||||||
|
|
||||||
output=$(run_claude "What workflow skills are required before using subagent-driven-development? List any prerequisites or required skills." "$CLAUDE_PROMPT_TIMEOUT")
|
output=$(run_claude "What workflow skills are required before using subagent-driven-development? List any prerequisites or required skills." 30)
|
||||||
|
|
||||||
if assert_contains "$output" "using-git-worktrees\|worktree" "Mentions worktree requirement"; then
|
if assert_contains "$output" "using-git-worktrees\|worktree" "Mentions worktree requirement"; then
|
||||||
: # pass
|
: # pass
|
||||||
@@ -160,7 +152,7 @@ echo ""
|
|||||||
# Test 9: Verify main branch warning
|
# Test 9: Verify main branch warning
|
||||||
echo "Test 9: Main branch red flag..."
|
echo "Test 9: Main branch red flag..."
|
||||||
|
|
||||||
output=$(run_claude "In subagent-driven-development, is it okay to start implementation directly on the main branch?" "$CLAUDE_PROMPT_TIMEOUT")
|
output=$(run_claude "In subagent-driven-development, is it okay to start implementation directly on the main branch?" 30)
|
||||||
|
|
||||||
if assert_contains "$output" "worktree\|feature.*branch\|not.*main\|never.*main\|avoid.*main\|don't.*main\|consent\|permission" "Warns against main branch"; then
|
if assert_contains "$output" "worktree\|feature.*branch\|not.*main\|never.*main\|avoid.*main\|don't.*main\|consent\|permission" "Warns against main branch"; then
|
||||||
: # pass
|
: # pass
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Regression check: Superpowers should not route new worktrees through the old
|
|
||||||
# global worktree directory.
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
||||||
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
||||||
|
|
||||||
USING_SKILL="$REPO_ROOT/skills/using-git-worktrees/SKILL.md"
|
|
||||||
FINISHING_SKILL="$REPO_ROOT/skills/finishing-a-development-branch/SKILL.md"
|
|
||||||
ROTOTILL_SPEC="$REPO_ROOT/docs/superpowers/specs/2026-04-06-worktree-rototill-design.md"
|
|
||||||
ROTOTILL_PLAN="$REPO_ROOT/docs/superpowers/plans/2026-04-06-worktree-rototill.md"
|
|
||||||
|
|
||||||
failures=0
|
|
||||||
|
|
||||||
assert_contains() {
|
|
||||||
local file="$1"
|
|
||||||
local pattern="$2"
|
|
||||||
local label="$3"
|
|
||||||
|
|
||||||
if grep -Fq "$pattern" "$file"; then
|
|
||||||
echo " [PASS] $label"
|
|
||||||
else
|
|
||||||
echo " [FAIL] $label"
|
|
||||||
echo " Expected to find: $pattern"
|
|
||||||
echo " In file: $file"
|
|
||||||
failures=$((failures + 1))
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
assert_not_contains() {
|
|
||||||
local file="$1"
|
|
||||||
local pattern="$2"
|
|
||||||
local label="$3"
|
|
||||||
|
|
||||||
if grep -Fq "$pattern" "$file"; then
|
|
||||||
echo " [FAIL] $label"
|
|
||||||
echo " Did not expect to find: $pattern"
|
|
||||||
echo " In file: $file"
|
|
||||||
failures=$((failures + 1))
|
|
||||||
else
|
|
||||||
echo " [PASS] $label"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "=== Worktree Path Policy Test ==="
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
assert_not_contains "$USING_SKILL" "~/.config/superpowers/worktrees" "using-git-worktrees does not mention old global path"
|
|
||||||
assert_not_contains "$USING_SKILL" "global legacy" "using-git-worktrees does not use unclear global legacy shorthand"
|
|
||||||
assert_not_contains "$USING_SKILL" "Global path" "using-git-worktrees has no global path quick-reference row"
|
|
||||||
assert_contains "$USING_SKILL" 'default to `.worktrees/` at the project root' "using-git-worktrees defaults new manual worktrees to .worktrees/"
|
|
||||||
|
|
||||||
assert_not_contains "$FINISHING_SKILL" "~/.config/superpowers/worktrees" "finishing-a-development-branch does not treat old global path as owned"
|
|
||||||
assert_contains "$FINISHING_SKILL" '`.worktrees/` or `worktrees/`' "finishing-a-development-branch keeps project-local cleanup ownership"
|
|
||||||
|
|
||||||
assert_not_contains "$ROTOTILL_SPEC" "~/.config/superpowers/worktrees" "rototill spec does not preserve old global path policy"
|
|
||||||
assert_not_contains "$ROTOTILL_PLAN" "~/.config/superpowers/worktrees" "rototill plan does not preserve old global path policy"
|
|
||||||
assert_not_contains "$ROTOTILL_PLAN" "legacy path compat" "rototill plan does not advertise legacy path compatibility"
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
if [ "$failures" -gt 0 ]; then
|
|
||||||
echo "STATUS: FAILED ($failures failures)"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "STATUS: PASSED"
|
|
||||||
Reference in New Issue
Block a user