agy-superpowers 5.2.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/agent/skills/brainstorming/scripts/server.cjs +1 -1
- package/template/agent/skills/brainstorming/scripts/start-server.sh +5 -2
- package/template/agent/skills/brainstorming/scripts/stop-server.sh +4 -4
- package/template/agent/skills/brainstorming/visual-companion.md +2 -2
- package/template/agent/skills/writing-skills/testing-skills-with-subagents.md +1 -1
- package/template/agent/workflows/update-superpowers.md +3 -3
package/package.json
CHANGED
|
@@ -76,7 +76,7 @@ function decodeFrame(buffer) {
|
|
|
76
76
|
const PORT = process.env.BRAINSTORM_PORT || (49152 + Math.floor(Math.random() * 16383));
|
|
77
77
|
const HOST = process.env.BRAINSTORM_HOST || '127.0.0.1';
|
|
78
78
|
const URL_HOST = process.env.BRAINSTORM_URL_HOST || (HOST === '127.0.0.1' ? 'localhost' : HOST);
|
|
79
|
-
const SESSION_DIR = process.env.BRAINSTORM_DIR || '
|
|
79
|
+
const SESSION_DIR = process.env.BRAINSTORM_DIR || path.resolve(__dirname, '..', '..', '..', 'tmp', 'brainstorm');
|
|
80
80
|
const CONTENT_DIR = path.join(SESSION_DIR, 'content');
|
|
81
81
|
const STATE_DIR = path.join(SESSION_DIR, 'state');
|
|
82
82
|
let ownerPid = process.env.BRAINSTORM_OWNER_PID ? Number(process.env.BRAINSTORM_OWNER_PID) : null;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
#
|
|
8
8
|
# Options:
|
|
9
9
|
# --project-dir <path> Store session files under <path>/.superpowers/brainstorm/
|
|
10
|
-
# instead of /tmp
|
|
10
|
+
# instead of .agent/tmp/. Files persist after server stops.
|
|
11
11
|
# --host <bind-host> Host/interface to bind (default: 127.0.0.1).
|
|
12
12
|
# Use 0.0.0.0 in remote/containerized environments.
|
|
13
13
|
# --url-host <host> Hostname shown in returned URL JSON.
|
|
@@ -77,10 +77,13 @@ fi
|
|
|
77
77
|
# Generate unique session directory
|
|
78
78
|
SESSION_ID="$$-$(date +%s)"
|
|
79
79
|
|
|
80
|
+
# SCRIPT_DIR is .agent/skills/brainstorming/scripts — walk up to .agent/
|
|
81
|
+
AGENT_DIR="$(cd "$SCRIPT_DIR/../../.." && pwd)"
|
|
82
|
+
|
|
80
83
|
if [[ -n "$PROJECT_DIR" ]]; then
|
|
81
84
|
SESSION_DIR="${PROJECT_DIR}/.superpowers/brainstorm/${SESSION_ID}"
|
|
82
85
|
else
|
|
83
|
-
SESSION_DIR="/tmp/brainstorm-${SESSION_ID}"
|
|
86
|
+
SESSION_DIR="${AGENT_DIR}/tmp/brainstorm-${SESSION_ID}"
|
|
84
87
|
fi
|
|
85
88
|
|
|
86
89
|
STATE_DIR="${SESSION_DIR}/state"
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
# Usage: stop-server.sh <session_dir>
|
|
4
4
|
#
|
|
5
5
|
# Kills the server process. Only deletes session directory if it's
|
|
6
|
-
#
|
|
7
|
-
# kept so mockups can be reviewed later.
|
|
6
|
+
# ephemeral (/tmp or .agent/tmp). Persistent directories (.superpowers/)
|
|
7
|
+
# are kept so mockups can be reviewed later.
|
|
8
8
|
|
|
9
9
|
SESSION_DIR="$1"
|
|
10
10
|
|
|
@@ -45,8 +45,8 @@ if [[ -f "$PID_FILE" ]]; then
|
|
|
45
45
|
|
|
46
46
|
rm -f "$PID_FILE" "${STATE_DIR}/server.log"
|
|
47
47
|
|
|
48
|
-
# Only delete ephemeral /tmp
|
|
49
|
-
if [[ "$SESSION_DIR" == /tmp/* ]]; then
|
|
48
|
+
# Only delete ephemeral directories (/tmp or .agent/tmp)
|
|
49
|
+
if [[ "$SESSION_DIR" == /tmp/* ]] || [[ "$SESSION_DIR" == */.agent/tmp/* ]]; then
|
|
50
50
|
rm -rf "$SESSION_DIR"
|
|
51
51
|
fi
|
|
52
52
|
|
|
@@ -45,7 +45,7 @@ Save `screen_dir` and `state_dir` from the response. Tell user to open the URL.
|
|
|
45
45
|
|
|
46
46
|
**Finding connection info:** The server writes its startup JSON to `$STATE_DIR/server-info`. If you launched the server in the background and didn't capture stdout, read that file to get the URL and port. When using `--project-dir`, check `<project>/.superpowers/brainstorm/` for the session directory.
|
|
47
47
|
|
|
48
|
-
**Note:** Pass the project root as `--project-dir` so mockups persist in `.superpowers/brainstorm/` and survive server restarts. Without it, files go to
|
|
48
|
+
**Note:** Pass the project root as `--project-dir` so mockups persist in `.superpowers/brainstorm/` and survive server restarts. Without it, files go to `.agent/tmp/` and get cleaned up on server stop. Remind the user to add `.superpowers/` to `.gitignore` if it's not already there.
|
|
49
49
|
|
|
50
50
|
**Launching the server by platform:**
|
|
51
51
|
|
|
@@ -256,7 +256,7 @@ If `$STATE_DIR/events` doesn't exist, the user didn't interact with the browser
|
|
|
256
256
|
scripts/stop-server.sh $SESSION_DIR
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
If the session used `--project-dir`, mockup files persist in `.superpowers/brainstorm/` for later reference. Only
|
|
259
|
+
If the session used `--project-dir`, mockup files persist in `.superpowers/brainstorm/` for later reference. Only ephemeral sessions (`.agent/tmp/`) get deleted on stop.
|
|
260
260
|
|
|
261
261
|
## Reference
|
|
262
262
|
|
|
@@ -145,7 +145,7 @@ Forces explicit choice.
|
|
|
145
145
|
|
|
146
146
|
1. **Concrete options** - Force A/B/C choice, not open-ended
|
|
147
147
|
2. **Real constraints** - Specific times, actual consequences
|
|
148
|
-
3. **Real file paths** -
|
|
148
|
+
3. **Real file paths** - `.agent/tmp/payment-system` not "a project"
|
|
149
149
|
4. **Make agent act** - "What do you do?" not "What should you do?"
|
|
150
150
|
5. **No easy outs** - Can't defer to "I'd ask your human partner" without choosing
|
|
151
151
|
|
|
@@ -8,13 +8,13 @@ This workflow has two phases:
|
|
|
8
8
|
|
|
9
9
|
// turbo
|
|
10
10
|
1. Preserve user config (if exists):
|
|
11
|
-
`[ -f .agent/config.yml ] && cp .agent/config.yml /tmp/agent-config-backup.yml && echo "Config backed up" || echo "No config to backup"`
|
|
11
|
+
`mkdir -p .agent/tmp && [ -f .agent/config.yml ] && cp .agent/config.yml .agent/tmp/agent-config-backup.yml && echo "Config backed up" || echo "No config to backup"`
|
|
12
12
|
|
|
13
13
|
// turbo
|
|
14
14
|
2. Run the update script:
|
|
15
15
|
`bash .agent/.shared/update-superpowers.sh`
|
|
16
16
|
|
|
17
|
-
- If output ends with "Already up to date" → restore config if backed up (`[ -f /tmp/agent-config-backup.yml ] && cp /tmp/agent-config-backup.yml .agent/config.yml`), then **STOP**. Nothing to do.
|
|
17
|
+
- If output ends with "Already up to date" → restore config if backed up (`[ -f .agent/tmp/agent-config-backup.yml ] && cp .agent/tmp/agent-config-backup.yml .agent/config.yml`), then **STOP**. Nothing to do.
|
|
18
18
|
- If clone fails → restore config if backed up, then **STOP**. Report the error to the user.
|
|
19
19
|
- On success the script prints `SCRIPT_DONE:<new-tag>` — note the new tag and continue.
|
|
20
20
|
|
|
@@ -24,7 +24,7 @@ This workflow has two phases:
|
|
|
24
24
|
|
|
25
25
|
// turbo
|
|
26
26
|
4. Restore user config:
|
|
27
|
-
`[ -f /tmp/agent-config-backup.yml ] && cp /tmp/agent-config-backup.yml .agent/config.yml && echo "Config restored" || echo "No config to restore"`
|
|
27
|
+
`[ -f .agent/tmp/agent-config-backup.yml ] && cp .agent/tmp/agent-config-backup.yml .agent/config.yml && echo "Config restored" || echo "No config to restore"`
|
|
28
28
|
|
|
29
29
|
5. **Phase 2 — Update skill list in rules**
|
|
30
30
|
|