bigpowers 2.86.4 → 2.86.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/.agents/skills/craft-skill/SKILL.md +2 -2
- package/.agents/skills/define-success/SKILL.md +6 -59
- package/.agents/skills/deploy/SKILL.md +1 -1
- package/.agents/skills/elaborate-spec/SKILL.md +1 -1
- package/.agents/skills/harden-vps/SKILL.md +63 -60
- package/.agents/skills/investigate-bug/SKILL.md +2 -2
- package/.agents/skills/orchestrate-project/SKILL.md +1 -1
- package/.agents/skills/plan-refactor/SKILL.md +2 -2
- package/.agents/skills/plan-release/SKILL.md +2 -2
- package/.agents/skills/plan-work/SKILL.md +1 -1
- package/.agents/skills/using-bigpowers/SKILL.md +2 -2
- package/.agents/skills/wire-ci/SKILL.md +11 -14
- package/.codebuddy/skills/craft-skill/SKILL.md +2 -2
- package/.codebuddy/skills/define-success/SKILL.md +6 -59
- package/.codebuddy/skills/deploy/SKILL.md +1 -1
- package/.codebuddy/skills/elaborate-spec/SKILL.md +1 -1
- package/.codebuddy/skills/harden-vps/SKILL.md +63 -60
- package/.codebuddy/skills/investigate-bug/SKILL.md +2 -2
- package/.codebuddy/skills/orchestrate-project/SKILL.md +1 -1
- package/.codebuddy/skills/plan-refactor/SKILL.md +2 -2
- package/.codebuddy/skills/plan-release/SKILL.md +2 -2
- package/.codebuddy/skills/plan-work/SKILL.md +1 -1
- package/.codebuddy/skills/using-bigpowers/SKILL.md +2 -2
- package/.codebuddy/skills/wire-ci/SKILL.md +11 -14
- package/.codex/skills/craft-skill/SKILL.md +2 -2
- package/.codex/skills/define-success/SKILL.md +6 -59
- package/.codex/skills/deploy/SKILL.md +1 -1
- package/.codex/skills/elaborate-spec/SKILL.md +1 -1
- package/.codex/skills/harden-vps/SKILL.md +63 -60
- package/.codex/skills/investigate-bug/SKILL.md +2 -2
- package/.codex/skills/orchestrate-project/SKILL.md +1 -1
- package/.codex/skills/plan-refactor/SKILL.md +2 -2
- package/.codex/skills/plan-release/SKILL.md +2 -2
- package/.codex/skills/plan-work/SKILL.md +1 -1
- package/.codex/skills/using-bigpowers/SKILL.md +2 -2
- package/.codex/skills/wire-ci/SKILL.md +11 -14
- package/.hermes/skills/craft-skill/SKILL.md +2 -2
- package/.hermes/skills/define-success/SKILL.md +6 -59
- package/.hermes/skills/deploy/SKILL.md +1 -1
- package/.hermes/skills/elaborate-spec/SKILL.md +1 -1
- package/.hermes/skills/harden-vps/SKILL.md +63 -60
- package/.hermes/skills/investigate-bug/SKILL.md +2 -2
- package/.hermes/skills/orchestrate-project/SKILL.md +1 -1
- package/.hermes/skills/plan-refactor/SKILL.md +2 -2
- package/.hermes/skills/plan-release/SKILL.md +2 -2
- package/.hermes/skills/plan-work/SKILL.md +1 -1
- package/.hermes/skills/using-bigpowers/SKILL.md +2 -2
- package/.hermes/skills/wire-ci/SKILL.md +11 -14
- package/.kilocode/rules/craft-skill.md +2 -2
- package/.kilocode/rules/define-success.md +6 -59
- package/.kilocode/rules/deploy.md +1 -1
- package/.kilocode/rules/elaborate-spec.md +1 -1
- package/.kilocode/rules/harden-vps.md +63 -60
- package/.kilocode/rules/investigate-bug.md +2 -2
- package/.kilocode/rules/orchestrate-project.md +1 -1
- package/.kilocode/rules/plan-refactor.md +2 -2
- package/.kilocode/rules/plan-release.md +2 -2
- package/.kilocode/rules/plan-work.md +1 -1
- package/.kilocode/rules/using-bigpowers.md +2 -2
- package/.kilocode/rules/wire-ci.md +11 -14
- package/.mimocode/skills/craft-skill/SKILL.md +2 -2
- package/.mimocode/skills/define-success/SKILL.md +6 -59
- package/.mimocode/skills/deploy/SKILL.md +1 -1
- package/.mimocode/skills/elaborate-spec/SKILL.md +1 -1
- package/.mimocode/skills/harden-vps/SKILL.md +63 -60
- package/.mimocode/skills/investigate-bug/SKILL.md +2 -2
- package/.mimocode/skills/orchestrate-project/SKILL.md +1 -1
- package/.mimocode/skills/plan-refactor/SKILL.md +2 -2
- package/.mimocode/skills/plan-release/SKILL.md +2 -2
- package/.mimocode/skills/plan-work/SKILL.md +1 -1
- package/.mimocode/skills/using-bigpowers/SKILL.md +2 -2
- package/.mimocode/skills/wire-ci/SKILL.md +11 -14
- package/.pi/package.json +1 -1
- package/.pi/prompts/craft-skill.md +2 -2
- package/.pi/prompts/define-success.md +5 -58
- package/.pi/prompts/deploy.md +1 -1
- package/.pi/prompts/elaborate-spec.md +1 -1
- package/.pi/prompts/harden-vps.md +63 -60
- package/.pi/prompts/investigate-bug.md +2 -2
- package/.pi/prompts/orchestrate-project.md +1 -1
- package/.pi/prompts/plan-refactor.md +2 -2
- package/.pi/prompts/plan-release.md +2 -2
- package/.pi/prompts/plan-work.md +1 -1
- package/.pi/prompts/using-bigpowers.md +2 -2
- package/.pi/prompts/wire-ci.md +11 -14
- package/.pi/skills/craft-skill/SKILL.md +2 -2
- package/.pi/skills/define-success/SKILL.md +6 -59
- package/.pi/skills/deploy/SKILL.md +1 -1
- package/.pi/skills/elaborate-spec/SKILL.md +1 -1
- package/.pi/skills/harden-vps/SKILL.md +63 -60
- package/.pi/skills/investigate-bug/SKILL.md +2 -2
- package/.pi/skills/orchestrate-project/SKILL.md +1 -1
- package/.pi/skills/plan-refactor/SKILL.md +2 -2
- package/.pi/skills/plan-release/SKILL.md +2 -2
- package/.pi/skills/plan-work/SKILL.md +1 -1
- package/.pi/skills/using-bigpowers/SKILL.md +2 -2
- package/.pi/skills/wire-ci/SKILL.md +11 -14
- package/.trae/skills/craft-skill/SKILL.md +2 -2
- package/.trae/skills/define-success/SKILL.md +6 -59
- package/.trae/skills/deploy/SKILL.md +1 -1
- package/.trae/skills/elaborate-spec/SKILL.md +1 -1
- package/.trae/skills/harden-vps/SKILL.md +63 -60
- package/.trae/skills/investigate-bug/SKILL.md +2 -2
- package/.trae/skills/orchestrate-project/SKILL.md +1 -1
- package/.trae/skills/plan-refactor/SKILL.md +2 -2
- package/.trae/skills/plan-release/SKILL.md +2 -2
- package/.trae/skills/plan-work/SKILL.md +1 -1
- package/.trae/skills/using-bigpowers/SKILL.md +2 -2
- package/.trae/skills/wire-ci/SKILL.md +11 -14
- package/.windsurf/rules/craft-skill.md +2 -2
- package/.windsurf/rules/define-success.md +6 -59
- package/.windsurf/rules/deploy.md +1 -1
- package/.windsurf/rules/elaborate-spec.md +1 -1
- package/.windsurf/rules/harden-vps.md +63 -60
- package/.windsurf/rules/investigate-bug.md +2 -2
- package/.windsurf/rules/orchestrate-project.md +1 -1
- package/.windsurf/rules/plan-refactor.md +2 -2
- package/.windsurf/rules/plan-release.md +2 -2
- package/.windsurf/rules/plan-work.md +1 -1
- package/.windsurf/rules/using-bigpowers.md +2 -2
- package/.windsurf/rules/wire-ci.md +11 -14
- package/.zcode/skills/craft-skill/SKILL.md +2 -2
- package/.zcode/skills/define-success/SKILL.md +6 -59
- package/.zcode/skills/deploy/SKILL.md +1 -1
- package/.zcode/skills/elaborate-spec/SKILL.md +1 -1
- package/.zcode/skills/harden-vps/SKILL.md +63 -60
- package/.zcode/skills/investigate-bug/SKILL.md +2 -2
- package/.zcode/skills/orchestrate-project/SKILL.md +1 -1
- package/.zcode/skills/plan-refactor/SKILL.md +2 -2
- package/.zcode/skills/plan-release/SKILL.md +2 -2
- package/.zcode/skills/plan-work/SKILL.md +1 -1
- package/.zcode/skills/using-bigpowers/SKILL.md +2 -2
- package/.zcode/skills/wire-ci/SKILL.md +11 -14
- package/CHANGELOG.md +7 -0
- package/SKILL-INDEX.md +2 -2
- package/package.json +1 -1
- package/scripts/check-skill-links.py +35 -0
- package/scripts/land-branch.sh +9 -3
- package/scripts/lib/__pycache__/link_utils.cpython-312.pyc +0 -0
- package/scripts/lib/__pycache__/srp_engine_links.cpython-312.pyc +0 -0
- package/scripts/lib/golden-suite-gates.sh +4 -0
- package/scripts/lib/target-contracts.sh +37 -1
- package/scripts/test-target-contracts.sh +73 -0
- package/scripts/tombstone-skill.sh +6 -0
- package/skills/craft-skill/SKILL.md +2 -2
- package/skills/define-success/SKILL.md +7 -61
- package/skills/deploy/SKILL.md +1 -1
- package/skills/elaborate-spec/SKILL.md +1 -1
- package/skills/harden-vps/REFERENCE.md +39 -36
- package/skills/harden-vps/SKILL.md +24 -24
- package/skills/investigate-bug/SKILL.md +2 -2
- package/skills/orchestrate-project/REFERENCE.md +1 -1
- package/skills/plan-refactor/SKILL.md +2 -2
- package/skills/plan-release/SKILL.md +2 -2
- package/skills/plan-work/SKILL.md +1 -1
- package/skills/security-review/fixtures/CWE-639-idor-negative.go +1 -1
- package/skills/security-review/fixtures/CWE-639-idor-positive.go +1 -1
- package/skills/using-bigpowers/SKILL.md +2 -2
- package/skills/wire-ci/REFERENCE.md +11 -14
- package/skills-lock.json +12 -12
- package/.fix_regex.sh +0 -16
- package/.hermes-verify-sed-fix.py +0 -53
- package/_test_e28s01.sh +0 -2
- package/audit-independent-unwaived-2026-07-06.md +0 -49
- package/hermes-verify-sed-fix.py +0 -30
- package/instructions +0 -1
- package/scripts/hermes-verify-e39s02.sh +0 -28
- package/test_figlet.py +0 -17
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: harden-vps
|
|
3
|
-
description: "Harden a production Linux VPS for
|
|
3
|
+
description: "Harden a production Linux VPS for your application across three layers — application (systemd hardening, monitoring alerts, backup automation), Ubuntu OS (UFW firewall, fail2ban SSH, unattended-upgrades, SSH hardening), and VPS provider (health checks, daily backups, monthly snapshots). Use when the user wants to secure a production server, harden a VPS, audit server security, or mentions production hardening, VPS security, or harden the server."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Harden VPS
|
|
7
7
|
|
|
8
|
-
Three-layer production hardening for
|
|
8
|
+
Three-layer production hardening for a self-hosted app on any VPS. Each layer independently verifiable. Apply OS first (firewall blocks attacks immediately), then your application (alerts + backups), then your VPS provider (snapshots). See [REFERENCE.md](REFERENCE.md) for full script bodies, systemd unit template, and gotchas.
|
|
9
9
|
|
|
10
10
|
## Quick start
|
|
11
11
|
|
|
12
|
-
SSH as root into the VPS. Find credentials in the
|
|
12
|
+
SSH as root into the VPS. Find credentials in the your VPS provider Customer Control Panel.
|
|
13
13
|
|
|
14
14
|
> **HARD GATE** — Run `ufw status` first. No firewall = layer 1 takes priority over everything.
|
|
15
15
|
|
|
@@ -34,21 +34,21 @@ apt install -y unattended-upgrades && dpkg-reconfigure -plow unattended-upgrades
|
|
|
34
34
|
# SSH: PermitRootLogin no, PasswordAuthentication no, PubkeyAuthentication yes
|
|
35
35
|
# → verify: sshd -T | grep -E 'permitrootlogin no|passwordauthentication no'
|
|
36
36
|
|
|
37
|
-
# Deploy healthcheck.sh → /opt/
|
|
38
|
-
# Crontab: */5 * * * * /opt/
|
|
37
|
+
# Deploy healthcheck.sh → /opt/your-app/scripts/healthcheck.sh
|
|
38
|
+
# Crontab: */5 * * * * /opt/your-app/scripts/healthcheck.sh
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
## Layer 2 —
|
|
41
|
+
## Layer 2 — applicationlication
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
# systemd: User=
|
|
44
|
+
# systemd: User=your-app, NoNewPrivileges=yes, ProtectSystem=full,
|
|
45
45
|
# ProtectKernelTunables=yes, ProtectKernelModules=yes,
|
|
46
46
|
# ProtectControlGroups=yes, RestrictAddressFamilies=AF_INET AF_INET6,
|
|
47
47
|
# RestrictRealtime=yes, PrivateTmp=yes, LimitNOFILE=65536
|
|
48
|
-
# → verify: systemctl show
|
|
48
|
+
# → verify: systemctl show your-app -p NoNewPrivileges -p ProtectSystem -p User
|
|
49
49
|
|
|
50
|
-
# Alerts (
|
|
51
|
-
sqlite3 /opt/
|
|
50
|
+
# Alerts (your application requires auth; insert via SQLite)
|
|
51
|
+
sqlite3 /opt/your-app/data/your-app.db "
|
|
52
52
|
INSERT INTO monitoring_alerts (id,name,metric,threshold,operator,enabled,duration_seconds)
|
|
53
53
|
VALUES ('a1','Disk >80%','disk_used_percent',80,'gt',1,300);
|
|
54
54
|
INSERT INTO monitoring_alerts (id,name,metric,threshold,operator,enabled,duration_seconds)
|
|
@@ -56,14 +56,14 @@ VALUES ('a2','CPU >90%','cpu_percent',90,'gt',1,60);
|
|
|
56
56
|
INSERT INTO monitoring_alerts (id,name,metric,threshold,operator,enabled,duration_seconds)
|
|
57
57
|
VALUES ('a3','RAM >85%','mem_used_percent',85,'gt',1,120);
|
|
58
58
|
"
|
|
59
|
-
systemctl restart
|
|
59
|
+
systemctl restart your-app
|
|
60
60
|
|
|
61
61
|
# Backup crontab (root):
|
|
62
|
-
# 0 2 * * * cp /opt/
|
|
63
|
-
# 0 3 * * * find /backup/ -name "
|
|
62
|
+
# 0 2 * * * cp /opt/your-app/data/your-app.db /backup/your-app-$(date +\%Y\%m\%d).db
|
|
63
|
+
# 0 3 * * * find /backup/ -name "your-app-*.db" -mtime +90 -delete
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
## Layer 3 —
|
|
66
|
+
## Layer 3 — VPS provider
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
69
|
# cntb CLI
|
|
@@ -71,14 +71,14 @@ curl -sL "$(curl -sL https://api.github.com/repos/contabo/cntb/releases/latest \
|
|
|
71
71
|
| grep browser_download_url.*linux_amd64.tar.gz | head -1 | cut -d'"' -f4)" \
|
|
72
72
|
| tar xz -C /usr/local/bin
|
|
73
73
|
|
|
74
|
-
# Snapshot script → /opt/
|
|
75
|
-
# Credentials as env vars in /opt/
|
|
74
|
+
# Snapshot script → /opt/your-app/scripts/contabo-snapshot.sh (reads from /opt/your-app/.env)
|
|
75
|
+
# Credentials as env vars in /opt/your-app/.env (deployed by GitHub Actions):
|
|
76
76
|
# CONTABO_CLIENT_ID, CONTABO_CLIENT_SECRET, CONTABO_API_USER, CONTABO_API_PASSWORD
|
|
77
|
-
# Crontab: 0 4 1 * * /opt/
|
|
77
|
+
# Crontab: 0 4 1 * * /opt/your-app/scripts/contabo-snapshot.sh
|
|
78
78
|
|
|
79
79
|
# > HARD GATE — Snapshot cron silently fails until env vars are set in .env.
|
|
80
|
-
# Credentials source:
|
|
81
|
-
# Local dev: add to .envrc. Production: GitHub Secrets → deploy → /opt/
|
|
80
|
+
# Credentials source: your VPS provider Customer Panel → API Details.
|
|
81
|
+
# Local dev: add to .envrc. Production: GitHub Secrets → deploy → /opt/your-app/.env
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
## CRITICAL GOTCHAS
|
|
@@ -86,7 +86,7 @@ curl -sL "$(curl -sL https://api.github.com/repos/contabo/cntb/releases/latest \
|
|
|
86
86
|
1. **Shell escaping in Orca terminals:** `$VAR`, `$(…)`, and `%` get eaten by the local shell. Always use base64: `echo '<base64>' | base64 -d > script.sh`
|
|
87
87
|
2. **Crontab `%`:** cron interprets `%` as newline. Escape as `\%` in `$(date +\%Y\%m\%d)`
|
|
88
88
|
3. **fail2ban exit 255:** means a jail references a missing log file. Remove the broken jail, restart.
|
|
89
|
-
4. **
|
|
89
|
+
4. **your application alerts need auth:** POST to `/api/monitoring/alerts` requires Bearer token. Workaround: insert directly into SQLite, then restart your application.
|
|
90
90
|
|
|
91
91
|
## Verify all 8 gates
|
|
92
92
|
|
|
@@ -95,10 +95,10 @@ ufw status|grep -q active||echo FAIL:ufw
|
|
|
95
95
|
fail2ban-client status sshd>/dev/null 2>&1||echo FAIL:fail2ban
|
|
96
96
|
systemctl is-active unattended-upgrades|grep -q active||echo FAIL:unattended
|
|
97
97
|
sshd -T|grep -q 'permitrootlogin no'||echo FAIL:sshd
|
|
98
|
-
systemctl show
|
|
99
|
-
systemctl is-active
|
|
100
|
-
sqlite3 /opt/
|
|
101
|
-
crontab -l|grep -q healthcheck&&crontab -l|grep -q
|
|
98
|
+
systemctl show your-app -p NoNewPrivileges|grep -q yes||echo FAIL:systemd
|
|
99
|
+
systemctl is-active your-app|grep -q active||echo FAIL:your-app
|
|
100
|
+
sqlite3 /opt/your-app/data/your-app.db "SELECT count(*) FROM monitoring_alerts"|grep -q 3||echo FAIL:alerts
|
|
101
|
+
crontab -l|grep -q healthcheck&&crontab -l|grep -q your-app.db&&crontab -l|grep -q contabo-snapshot||echo FAIL:crontab
|
|
102
102
|
echo ALL 8 GATES PASSED
|
|
103
103
|
```
|
|
104
104
|
|
|
@@ -110,47 +110,47 @@ echo ALL 8 GATES PASSED
|
|
|
110
110
|
|
|
111
111
|
## Health check script
|
|
112
112
|
|
|
113
|
-
Deploy to `/opt/
|
|
113
|
+
Deploy to `/opt/your-app/scripts/healthcheck.sh`:
|
|
114
114
|
|
|
115
115
|
```bash
|
|
116
116
|
#!/bin/bash
|
|
117
|
-
LOG=/var/log/
|
|
118
|
-
mkdir -p /var/log/
|
|
117
|
+
LOG=/var/log/your-app/health.log
|
|
118
|
+
mkdir -p /var/log/your-app
|
|
119
119
|
DISK=$(df / | awk 'NR==2 {print $5}' | tr -d '%')
|
|
120
120
|
RAM=$(free | awk '/Mem:/ {printf "%.0f", $3/$2*100}')
|
|
121
121
|
NOW=$(date -Iseconds)
|
|
122
122
|
[ "$DISK" -gt 85 ] && echo "$NOW ALERT: Disk ${DISK}%" >> "$LOG"
|
|
123
123
|
[ "$RAM" -gt 90 ] && echo "$NOW ALERT: RAM ${RAM}%" >> "$LOG"
|
|
124
|
-
systemctl is-active --quiet
|
|
124
|
+
systemctl is-active --quiet your-app || { echo "$NOW ALERT: your application DOWN" >> "$LOG"; systemctl restart your-app; }
|
|
125
125
|
[ -f /var/run/reboot-required ] && echo "$NOW WARN: kernel reboot pending" >> "$LOG"
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
-
Make executable: `chmod +x /opt/
|
|
128
|
+
Make executable: `chmod +x /opt/your-app/scripts/healthcheck.sh`
|
|
129
129
|
|
|
130
|
-
##
|
|
130
|
+
## your application systemd unit
|
|
131
131
|
|
|
132
|
-
Full hardened unit at `/etc/systemd/system/
|
|
132
|
+
Full hardened unit at `/etc/systemd/system/your-app.service`:
|
|
133
133
|
|
|
134
134
|
```ini
|
|
135
135
|
[Unit]
|
|
136
|
-
Description=
|
|
137
|
-
Documentation=https://github.com/
|
|
136
|
+
Description=your application BaaS Platform
|
|
137
|
+
Documentation=https://github.com/example-org/example-app
|
|
138
138
|
After=network.target caddy.service
|
|
139
139
|
Wants=caddy.service
|
|
140
140
|
|
|
141
141
|
[Service]
|
|
142
142
|
Type=simple
|
|
143
|
-
User=
|
|
144
|
-
Group=
|
|
145
|
-
WorkingDirectory=/opt/
|
|
146
|
-
ExecStart=/opt/
|
|
143
|
+
User=your-app
|
|
144
|
+
Group=your-app
|
|
145
|
+
WorkingDirectory=/opt/your-app
|
|
146
|
+
ExecStart=/opt/your-app/bin/your-app serve \
|
|
147
147
|
--port 8080 \
|
|
148
|
-
--db /opt/
|
|
148
|
+
--db /opt/your-app/data/your-app.db \
|
|
149
149
|
--sites-domain <your-domain.example.com>
|
|
150
|
-
EnvironmentFile=-/opt/
|
|
151
|
-
Environment=
|
|
152
|
-
Environment=HOME=/opt/
|
|
153
|
-
Environment=NPM_CONFIG_CACHE=/opt/
|
|
150
|
+
EnvironmentFile=-/opt/your-app/.env
|
|
151
|
+
Environment=APP_HOME=/opt/your-app
|
|
152
|
+
Environment=HOME=/opt/your-app
|
|
153
|
+
Environment=NPM_CONFIG_CACHE=/opt/your-app/.npm
|
|
154
154
|
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
155
155
|
Restart=always
|
|
156
156
|
RestartSec=5
|
|
@@ -167,11 +167,11 @@ ProtectKernelModules=yes
|
|
|
167
167
|
ProtectControlGroups=yes
|
|
168
168
|
RestrictAddressFamilies=AF_INET AF_INET6
|
|
169
169
|
RestrictRealtime=yes
|
|
170
|
-
ReadWritePaths=/opt/
|
|
171
|
-
ReadWritePaths=/opt/
|
|
172
|
-
ReadWritePaths=/opt/
|
|
173
|
-
ReadWritePaths=/opt/
|
|
174
|
-
ReadWritePaths=/opt/
|
|
170
|
+
ReadWritePaths=/opt/your-app/data
|
|
171
|
+
ReadWritePaths=/opt/your-app/backups
|
|
172
|
+
ReadWritePaths=/opt/your-app/secrets
|
|
173
|
+
ReadWritePaths=/opt/your-app/.npm
|
|
174
|
+
ReadWritePaths=/opt/your-app/logs
|
|
175
175
|
LimitNOFILE=65536
|
|
176
176
|
|
|
177
177
|
[Install]
|
|
@@ -191,17 +191,20 @@ bantime = 3600
|
|
|
191
191
|
findtime = 600
|
|
192
192
|
```
|
|
193
193
|
|
|
194
|
-
Note:
|
|
194
|
+
Note: your application auth jail deferred — your application logs to journald, not a file. To enable, use `backend = systemd` with a journald filter.
|
|
195
195
|
|
|
196
|
-
##
|
|
196
|
+
## provider-snapshot.sh — worked example (Contabo API)
|
|
197
197
|
|
|
198
|
-
|
|
198
|
+
> Snapshot APIs are provider-specific. This is one worked example, not a
|
|
199
|
+
> bigpowers default; swap the auth and endpoint calls for your own provider.
|
|
200
|
+
|
|
201
|
+
Deploy to `/opt/your-app/scripts/contabo-snapshot.sh`. Reads credentials from `/opt/your-app/.env` (same file used by your application systemd unit):
|
|
199
202
|
|
|
200
203
|
```bash
|
|
201
204
|
#!/bin/bash
|
|
202
205
|
set -e
|
|
203
|
-
LOG=/var/log/
|
|
204
|
-
ENVFILE=/opt/
|
|
206
|
+
LOG=/var/log/your-app/snapshot.log
|
|
207
|
+
ENVFILE=/opt/your-app/.env
|
|
205
208
|
INSTANCE_ID=<your-contabo-instance-id>
|
|
206
209
|
|
|
207
210
|
[ -f "$ENVFILE" ] || { echo "$(date -Iseconds) ERROR: $ENVFILE missing" >> "$LOG"; exit 1; }
|
|
@@ -230,9 +233,9 @@ echo >> "$LOG"
|
|
|
230
233
|
echo "$(date -Iseconds) Snapshot requested for $INSTANCE_ID" >> "$LOG"
|
|
231
234
|
```
|
|
232
235
|
|
|
233
|
-
##
|
|
236
|
+
## your VPS provider credentials
|
|
234
237
|
|
|
235
|
-
Add to `/opt/
|
|
238
|
+
Add to `/opt/your-app/.env` (same file used by your application systemd unit, deployed by GitHub Actions):
|
|
236
239
|
|
|
237
240
|
```
|
|
238
241
|
CONTABO_CLIENT_ID=
|
|
@@ -241,13 +244,13 @@ CONTABO_API_USER=
|
|
|
241
244
|
CONTABO_API_PASSWORD=
|
|
242
245
|
```
|
|
243
246
|
|
|
244
|
-
Source:
|
|
247
|
+
Source: your VPS provider Customer Control Panel → API Details. ClientId and ClientSecret are generated there. API User is your email. API Password is set separately in the panel.
|
|
245
248
|
|
|
246
|
-
**Pipeline:** GitHub Secrets → deploy workflow → `/opt/
|
|
249
|
+
**Pipeline:** GitHub Secrets → deploy workflow → `/opt/your-app/.env` on VPS. For local dev (`cntb get instances`), add to `.envrc`.
|
|
247
250
|
|
|
248
|
-
##
|
|
251
|
+
## your VPS provider instance info template
|
|
249
252
|
|
|
250
|
-
Fill in your instance details from the
|
|
253
|
+
Fill in your instance details from the your VPS provider Customer Control Panel:
|
|
251
254
|
|
|
252
255
|
```
|
|
253
256
|
IP: <your-instance-ip>
|
|
@@ -259,7 +262,7 @@ Default user: root
|
|
|
259
262
|
Customer ID: <your-customer-id>
|
|
260
263
|
```
|
|
261
264
|
|
|
262
|
-
##
|
|
265
|
+
## your application monitoring alert SQL
|
|
263
266
|
|
|
264
267
|
```sql
|
|
265
268
|
INSERT INTO monitoring_alerts (id, name, metric, threshold, operator, enabled, duration_seconds)
|
|
@@ -272,7 +275,7 @@ INSERT INTO monitoring_alerts (id, name, metric, threshold, operator, enabled, d
|
|
|
272
275
|
VALUES ('alert-003', 'VPS RAM above 85%', 'mem_used_percent', 85, 'gt', 1, 120);
|
|
273
276
|
```
|
|
274
277
|
|
|
275
|
-
Alerts are loaded at
|
|
278
|
+
Alerts are loaded at your application startup. Restart with `systemctl restart your-app` after inserting.
|
|
276
279
|
|
|
277
280
|
## Base64 encoding workaround
|
|
278
281
|
|
|
@@ -122,5 +122,5 @@ After writing the bug file, print a one-line summary of the root cause and sugge
|
|
|
122
122
|
|
|
123
123
|
<!-- story: e35s10 -->
|
|
124
124
|
|
|
125
|
-
- [Feathers' Seams & Characterization Tests](
|
|
126
|
-
- [Fowler's Code Smells](
|
|
125
|
+
- [Feathers' Seams & Characterization Tests](../../docs/references/feathers.md) — seam types, characterization tests, and the legacy code change algorithm
|
|
126
|
+
- [Fowler's Code Smells](../../docs/references/fowler.md) — identifying structural problems by smell before investigating
|
|
@@ -93,7 +93,7 @@ Detailed documentation for the `orchestrate-project` meta-skill.
|
|
|
93
93
|
### PHASE 3: PLAN
|
|
94
94
|
- **Goal**: Write a verifiable implementation plan with success criteria.
|
|
95
95
|
- **Deliverables**: `release-plan.yaml`, `epics/eNN-*.yaml` with `verify:` per task.
|
|
96
|
-
- **Skills**: `scope-work`, `slice-tasks`, `
|
|
96
|
+
- **Skills**: `scope-work`, `slice-tasks`, `plan-work`.
|
|
97
97
|
- **Gate**: Quality (request-review ≥94%) + slopcheck [SUS]/[SLOP].
|
|
98
98
|
|
|
99
99
|
### PHASE 4: BUILD
|
|
@@ -80,7 +80,7 @@ After writing `specs/REFACTOR_LATEST.md`, suggest running `kickoff-branch` next
|
|
|
80
80
|
|
|
81
81
|
<!-- story: e35s10 -->
|
|
82
82
|
|
|
83
|
-
- [Fowler's Refactoring Catalog](
|
|
84
|
-
- [Beck's Tidy First?](
|
|
83
|
+
- [Fowler's Refactoring Catalog](../../docs/references/fowler.md) — canonical refactoring vocabulary and code-smell taxonomy
|
|
84
|
+
- [Beck's Tidy First?](../../docs/references/kent-beck.md) — structural change before behavioral change
|
|
85
85
|
|
|
86
86
|
## Verify
|
|
@@ -16,7 +16,7 @@ Synthesize the conversation context into `specs/release-plan.yaml` (index) and s
|
|
|
16
16
|
|------|---------|
|
|
17
17
|
| `specs/release-plan.yaml` | `release.version`, semver bump hint, WSJF-ordered epic list with `id`, `capsule_dir`, `wsjf`, `bcps` — **no story status** |
|
|
18
18
|
| `specs/epics/eNN-<slug>/epic.yaml` | Epic manifest: `id`, `title`, `wsjf`, `total_bcps`, `status`, `stories[]` list |
|
|
19
|
-
| `specs/epics/eNN-<slug>/eNNsYY-<slug>.md` | Story spec in [countable-story-format.md](
|
|
19
|
+
| `specs/epics/eNN-<slug>/eNNsYY-<slug>.md` | Story spec in [countable-story-format.md](../../docs/countable-story-format.md) with 20 sections and Gherkin acceptance criteria |
|
|
20
20
|
| `specs/epics/eNN-<slug>/eNNsYY-tasks.yaml` | Decoupled task checklist with `verify:` commands per task |
|
|
21
21
|
| `specs/execution-status.yaml` | Flat key-value store for story status (`eNNsYY: todo`) |
|
|
22
22
|
|
|
@@ -101,7 +101,7 @@ stories:
|
|
|
101
101
|
```
|
|
102
102
|
### 6. Save story specs (countable-story-format .md)
|
|
103
103
|
|
|
104
|
-
Each story becomes a standalone `.md` file following [countable-story-format.md](
|
|
104
|
+
Each story becomes a standalone `.md` file following [countable-story-format.md](../../docs/countable-story-format.md). Minimum: maturity 3 (Countable) with all 20 sections present. Acceptance criteria in §17 use Gherkin scenarios.
|
|
105
105
|
### 7. Save decoupled task files (`-tasks.yaml`)
|
|
106
106
|
|
|
107
107
|
Each story has a decoupled `-tasks.yaml` with implementation steps:
|
package/.pi/prompts/plan-work.md
CHANGED
|
@@ -11,7 +11,7 @@ description: "PLANNING SPINE STEP 3 of 3 — Plan the work: write detailed imple
|
|
|
11
11
|
|
|
12
12
|
Produce a detailed, verifiable implementation plan in the **active epic capsule directory** (`specs/epics/eNN-slug/`). Output: a story spec `.md` file (countable-story-format) and a decoupled `eNNsYY-tasks.yaml` with runnable verify commands. "I think it works" is not a step.
|
|
13
13
|
|
|
14
|
-
> **HARD GATE** — Do NOT proceed with a plan until the task's success criteria are clear. If success is ambiguous,
|
|
14
|
+
> **HARD GATE** — Do NOT proceed with a plan until the task's success criteria are clear. If success is ambiguous, convert the task into "step → verify: `<cmd>`" pairs here before writing tasks — every task ships a runnable `verify:` or the plan is not done.
|
|
15
15
|
>
|
|
16
16
|
> **RECURSIVE DISCIPLINE** — This lifecycle applies to EVERY task, including updating these skills. Never skip planning because a task is "meta" or "just documentation."
|
|
17
17
|
|
|
@@ -7,7 +7,7 @@ description: "One-time bootstrap that introduces the bigpowers skills system, th
|
|
|
7
7
|
> **HARD GATE** — **HARD GATE** — This skill is the entry point. Do NOT skip it when onboarding new users or starting a new session. It establishes the bigpowers methodology, lifecycle phases, and conventions.
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
Welcome to **bigpowers** — a lifecycle of
|
|
10
|
+
Welcome to **bigpowers** — a lifecycle of agent skills for production-ready, TDD-driven software by solo developers. The live catalog and its count are generated in [`SKILL-INDEX.md`](../../SKILL-INDEX.md); never hardcode the number here.
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
@@ -36,7 +36,7 @@ DISCOVER survey-context → research-first → elaborate-spec
|
|
|
36
36
|
↓
|
|
37
37
|
DESIGN model-domain / define-language / grill-me / deepen-architecture / design-interface
|
|
38
38
|
↓
|
|
39
|
-
PLAN scope-work → slice-tasks →
|
|
39
|
+
PLAN scope-work → slice-tasks → plan-work / plan-refactor
|
|
40
40
|
↓
|
|
41
41
|
INITIATE kickoff-branch → guard-git / hook-commits / seed-conventions
|
|
42
42
|
↓
|
package/.pi/prompts/wire-ci.md
CHANGED
|
@@ -257,7 +257,7 @@ jobs:
|
|
|
257
257
|
|
|
258
258
|
---
|
|
259
259
|
|
|
260
|
-
## Reference block 2 — deploy.yml (
|
|
260
|
+
## Reference block 2 — deploy.yml (generic web app, excerpt)
|
|
261
261
|
|
|
262
262
|
```yaml
|
|
263
263
|
name: Deploy
|
|
@@ -275,7 +275,7 @@ concurrency:
|
|
|
275
275
|
cancel-in-progress: false
|
|
276
276
|
|
|
277
277
|
env:
|
|
278
|
-
SITE_URL: "https://CHANGE-ME.
|
|
278
|
+
SITE_URL: "https://CHANGE-ME.example.com"
|
|
279
279
|
|
|
280
280
|
jobs:
|
|
281
281
|
deploy:
|
|
@@ -291,18 +291,15 @@ jobs:
|
|
|
291
291
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
292
292
|
run-id: ${{ github.event.workflow_run.id }}
|
|
293
293
|
path: deploy-meta
|
|
294
|
-
#
|
|
295
|
-
#
|
|
296
|
-
#
|
|
297
|
-
#
|
|
298
|
-
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
deploy_token: ${{ secrets.BIGBASE_DEPLOY_TOKEN }}
|
|
304
|
-
ref: ${{ steps.meta.outputs.ref }}
|
|
305
|
-
skip_health_check: true
|
|
294
|
+
# Placeholder deploy step — bigpowers ships no deploy templates and pins
|
|
295
|
+
# no third-party action. Substitute your platform's own step here, or drop
|
|
296
|
+
# the deploy job entirely for CLI and library repos. Pin whatever action
|
|
297
|
+
# you choose to a full commit SHA rather than a tag. (GH #104)
|
|
298
|
+
- name: Deploy
|
|
299
|
+
run: |
|
|
300
|
+
echo "Replace this step with your platform's deploy command."
|
|
301
|
+
echo "commit=$(jq -r .sha deploy-meta/deploy-meta.json)"
|
|
302
|
+
exit 1
|
|
306
303
|
- name: Health check
|
|
307
304
|
run: |
|
|
308
305
|
curl -sf "${{ env.SITE_URL }}" || exit 1
|
|
@@ -44,7 +44,7 @@ Skill-body instructional prose MUST follow [AGENTIC-STE.md](../../../docs/AGENTI
|
|
|
44
44
|
- Any reference materials to include?
|
|
45
45
|
- What specs/ output does it produce (if any)?
|
|
46
46
|
|
|
47
|
-
2. **Verify Principles** — Ensure the skill aligns with [PRINCIPLES.md](
|
|
47
|
+
2. **Verify Principles** — Ensure the skill aligns with [PRINCIPLES.md](../../../docs/PRINCIPLES.md):
|
|
48
48
|
- Is it atomic (verb-noun)?
|
|
49
49
|
- Is it "deep" (simple interface, complex internal logic)?
|
|
50
50
|
- Does it include Hard Gates?
|
|
@@ -58,7 +58,7 @@ Skill-body instructional prose MUST follow [AGENTIC-STE.md](../../../docs/AGENTI
|
|
|
58
58
|
**Auto-skill from library README:** When user provides a library README or API docs URL, extract triggers and HARD GATEs.
|
|
59
59
|
Draft verify commands and specs/ output into SKILL.md. Do NOT invent APIs not in the source.
|
|
60
60
|
|
|
61
|
-
4. Add `model:` frontmatter (`haiku` | `sonnet` | `opus`) per [model-profiles.md](
|
|
61
|
+
4. Add `model:` frontmatter (`haiku` | `sonnet` | `opus`) per [model-profiles.md](../../../docs/references/model-profiles.md).
|
|
62
62
|
|
|
63
63
|
> **STREAM CONTINUITY** — When writing file content, output in continuous chunks of ~200 lines. Do not pause. Continue immediately until complete. If you need time, emit a placeholder comment rather than going silent.
|
|
64
64
|
|
|
@@ -1,65 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: define-success
|
|
3
|
-
model:
|
|
4
|
-
description: "
|
|
3
|
+
model: haiku
|
|
4
|
+
description: "TOMBSTONE — renamed/merged to plan-work. This stub resolves for one release then is removed."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# define-success (tombstoned)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
This skill has been renamed or merged into `plan-work`. Use `plan-work` instead.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Why this matters
|
|
14
|
-
|
|
15
|
-
"Implement user authentication" is not a plan. It has no checkpoints, no evidence requirement, and no way to know if you're done. The Karpathy principle: every step must be independently verifiable with a runnable command. If you can't verify it, you can't prove it works.
|
|
16
|
-
|
|
17
|
-
## Process
|
|
18
|
-
|
|
19
|
-
### 1. Read the task statement
|
|
20
|
-
|
|
21
|
-
Take the task as stated (from conversation, or from `specs/epics/ (see slice-tasks)`, or from `specs/product/SCOPE_LATEST.yaml`).
|
|
22
|
-
|
|
23
|
-
### 2. Break into observable outcomes
|
|
24
|
-
|
|
25
|
-
For each thing the task requires, identify:
|
|
26
|
-
- The smallest unit of observable behavior that proves something works
|
|
27
|
-
- The command that proves it
|
|
28
|
-
|
|
29
|
-
Work at the level of behaviors (what the system does) not implementation steps (how you'll write the code).
|
|
30
|
-
|
|
31
|
-
### 3. Write the pairs
|
|
32
|
-
|
|
33
|
-
Format each pair as:
|
|
34
|
-
```
|
|
35
|
-
N. [What must be true] → verify: <runnable command>
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Examples:
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
Task: "Add user registration to the API"
|
|
42
|
-
|
|
43
|
-
1. POST /users accepts {email, name} and returns {id, email, name} → verify: curl -s -X POST http://localhost:3000/users -H 'Content-Type: application/json' -d '{"email":"test@test.com","name":"Test"}' | jq .id
|
|
44
|
-
2. Duplicate email is rejected with 409 → verify: npm test -- user-registration.test.ts
|
|
45
|
-
3. Missing email is rejected with 400 and descriptive error → verify: npm test -- user-validation.test.ts
|
|
46
|
-
4. Password is hashed (never stored in plaintext) → verify: npm test -- user-security.test.ts
|
|
47
|
-
5. All existing tests still pass → verify: npm test
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
### 4. Challenge completeness
|
|
51
|
-
|
|
52
|
-
Ask yourself:
|
|
53
|
-
- Is there any behavior the task requires that isn't covered by a verify step?
|
|
54
|
-
- Is every verify step runnable right now without additional setup?
|
|
55
|
-
- Does the final step verify the whole thing end-to-end?
|
|
56
|
-
|
|
57
|
-
Add any missing pairs.
|
|
58
|
-
|
|
59
|
-
### 5. Output
|
|
60
|
-
|
|
61
|
-
Present the pairs to the user and ask: "Does this capture everything the task requires? Anything missing?"
|
|
62
|
-
|
|
63
|
-
Once confirmed, these pairs become the skeleton for `plan-work`'s steps. Pass them along when calling `plan-work`.
|
|
64
|
-
|
|
65
|
-
## Verify
|
|
11
|
+
This stub exists for one release as a transition aid, then is removed once
|
|
12
|
+
`scripts/validate-tombstones.sh` flags it as expired.
|
|
@@ -72,7 +72,7 @@ Platform-agnostic — supports multiple deployment targets via environment varia
|
|
|
72
72
|
|----------|---------|---------|
|
|
73
73
|
| Vercel | `VERCEL_TOKEN`, `VERCEL_PROJECT_ID` | `vercel deploy --prod --token $VERCEL_TOKEN` |
|
|
74
74
|
| Netlify | `NETLIFY_AUTH_TOKEN`, `NETLIFY_SITE_ID` | `netlify deploy --prod --auth $NETLIFY_AUTH_TOKEN --dir $ARTIFACT_DIR` |
|
|
75
|
-
|
|
|
75
|
+
| Platform MCP | MCP tool call | `mcp deploy` via your platform MCP server |
|
|
76
76
|
| rsync/SSH | `DEPLOY_SSH_USER`, `DEPLOY_SSH_HOST`, `DEPLOY_SSH_PATH` | `rsync -avz $ARTIFACT_DIR/ $DEPLOY_SSH_USER@$DEPLOY_SSH_HOST:$DEPLOY_SSH_PATH` |
|
|
77
77
|
| Custom | `DEPLOY_COMMAND` | Run any deploy command string |
|
|
78
78
|
|
|
@@ -63,7 +63,7 @@ Once the user has answered the main questions, probe for assumptions:
|
|
|
63
63
|
|
|
64
64
|
### 4. Synthesize and confirm
|
|
65
65
|
|
|
66
|
-
Summarize your understanding in 3–5 bullet points aligned with [countable-story-format.md](
|
|
66
|
+
Summarize your understanding in 3–5 bullet points aligned with [countable-story-format.md](../../../docs/countable-story-format.md):
|
|
67
67
|
- The problem (feeds into §1 Business narrative)
|
|
68
68
|
- The solution and main flow (feeds into §5)
|
|
69
69
|
- The key constraints and alternative flows (feeds into §6)
|