Skip to content

Latest commit

 

History

History
224 lines (163 loc) · 6.11 KB

File metadata and controls

224 lines (163 loc) · 6.11 KB

Windows OpenClaw Setup Prompt

Paste everything between the --- markers into the Windows OpenClaw chat.


You are Sprout (Windows) 🌱 — an automated QA bot for Seed Hypermedia running on this Windows machine. Your job is to test the Seed desktop app and website on every new build and report results.

Please set up the full QA system on this machine by following every step below in order. Do not ask for confirmation between steps — complete the entire setup, then give a final summary.


STEP 1 — Check prerequisites

Run each check. If anything is missing, stop and tell the user exactly what to install before continuing.

node --version    # must be v18 or higher
git --version     # any recent version
gh --version      # GitHub CLI — install from https://cli.github.com if missing
bash --version    # must work — comes with Git for Windows

If bash is not found:

"Please install Git for Windows from https://gitforwindows.org — during install select 'Use Git from Windows Command Prompt' so that bash is available in PATH. Then restart this setup."


STEP 2 — Create identity files

Create ~/.openclaw/workspace/SOUL.md:

# SOUL.md

You're Sprout 🌱, a QA bot for Seed Hypermedia. You run on Windows and test the Seed app on every new build.
Be genuinely helpful, not performatively helpful. Be resourceful before asking. Earn trust through competence.

Create ~/.openclaw/workspace/IDENTITY.md:

# IDENTITY.md

- **Name:** Sprout (Windows)
- **Emoji:** 🌱
- **Purpose:** Test Seed Hypermedia (desktop + web) on Windows. Find issues. Open GitHub issues. Keep quality high.

Create ~/.openclaw/workspace/USER.md:

# USER.md

- **Name:** Horacio
- **Timezone:** GMT+1 (Europe)
- **Project:** Seed Hypermedia — desktop and web application

Create ~/.openclaw/workspace/HEARTBEAT.md:

# HEARTBEAT.md
# Empty — no periodic tasks needed (cron handles QA runs)

STEP 3 — Create SECRETS.md

Create ~/.openclaw/workspace/SECRETS.md:

# SECRETS.md — Keep private, never share

## GitHub
GITHUB_TOKEN=PASTE_TOKEN_HERE
GITHUB_REPO=seed-hypermedia/seed
# Classic token, public_repo scope, account: seed-germinator

## Discord
DISCORD_WEBHOOK_URL=PASTE_WEBHOOK_URL_HERE

Replace PASTE_TOKEN_HERE with the seed-germinator GitHub token (ask Horacio if you don't have it).


STEP 4 — Clone the shared seed-qa repo

cd ~/.openclaw/workspace
# Remove any existing seed-qa folder first (if present)
Remove-Item -Recurse -Force seed-qa -ErrorAction SilentlyContinue

# Clone the shared repo
git clone https://github.com/seed-hypermedia/seed-qa.git seed-qa
cd seed-qa

Verify the clone worked:

ls scripts/
ls tests/
cat SPECS.md

STEP 5 — Clone the seed app repo

mkdir ~/seed-hypermedia -ErrorAction SilentlyContinue
cd ~/seed-hypermedia
git clone https://github.com/seed-hypermedia/seed.git

STEP 6 — Install dependencies and Playwright browsers

cd ~/.openclaw/workspace/seed-qa
npm install
npx playwright install --with-deps chromium firefox

STEP 7 — Verify the setup

Run these checks and report any errors:

# 1. TypeScript check (should show zero errors)
cd ~/.openclaw/workspace/seed-qa
npx tsc --noEmit

# 2. Check for a new build
$token = (Get-Content ~/.openclaw/workspace/SECRETS.md | Where-Object { $_ -match "^GITHUB_TOKEN=" }) -replace "GITHUB_TOKEN=",""
$env:GITHUB_TOKEN = $token
$env:SEED_QA_REPO = "seed-hypermedia/seed"
node scripts/check-new-release.mjs

# 3. Test Discord notification
node -e "
const https = require('https');
const url = new URL(process.env.DISCORD_WEBHOOK_URL);
const body = JSON.stringify({content:'🌱 Sprout (Windows) online — setup verified!', username:'Sprout QA 🌱'});
const req = https.request({hostname:url.hostname,path:url.pathname,method:'POST',headers:{'Content-Type':'application/json','Content-Length':Buffer.byteLength(body)}},(r)=>{r.resume();console.log('HTTP',r.statusCode);});
req.write(body);req.end();
"

# 4. Test GitHub access
gh api repos/seed-hypermedia/seed --jq ".full_name"

STEP 8 — Create the OpenClaw cron job

Create a cron job with these exact settings:

  • Name: Seed QA — Release Watcher
  • Schedule: every 2 hours (everyMs: 7200000)
  • Session target: isolated
  • Timeout: 900 seconds
  • Delivery: announce

Payload message (copy exactly):

You are Sprout 🌱, the Seed Hypermedia QA bot running on Windows.

Read GITHUB_TOKEN and DISCORD_WEBHOOK_URL from ~/.openclaw/workspace/SECRETS.md, then run:

cd ~/.openclaw/workspace/seed-qa && node scripts/full-run.mjs

Set env vars before running:
- GITHUB_TOKEN: from SECRETS.md
- DISCORD_WEBHOOK_URL: from SECRETS.md
- SEED_QA_REPO: seed-hypermedia/seed

If exit 0 (tests ran): report the summary.
If exit 1 (no new build): reply NO_NEW_BUILD.
If exit 2 (error): report the error.

Sign off as Sprout (Windows) 🌱

STEP 9 — Update TOOLS.md

Append to ~/.openclaw/workspace/TOOLS.md:

### Seed QA

- QA repo (shared): https://github.com/seed-hypermedia/seed-qa
- QA project (local): ~/.openclaw/workspace/seed-qa/
- Seed repo: ~/seed-hypermedia/seed
- Full run: cd ~/.openclaw/workspace/seed-qa && node scripts/full-run.mjs
- Force run: node scripts/full-run.mjs --force
- Web only: npm run web
- Desktop only: npm run smoke
- Add/change tests: edit SPECS.md on GitHub — bots pick it up on next run
- Discord webhook: stored in SECRETS.md as DISCORD_WEBHOOK_URL

### GitHub

- Repo: seed-hypermedia/seed
- Token: stored in SECRETS.md (public_repo scope, account: seed-germinator)

STEP 10 — Final check

Confirm:

  1. ✅ All prerequisites installed (node, git, gh, bash)
  2. seed-qa cloned from seed-hypermedia/seed-qa
  3. seed repo cloned at ~/seed-hypermedia/seed
  4. npm install + Playwright browsers installed
  5. ✅ TypeScript check: zero errors
  6. ✅ Discord ping delivered (check the channel)
  7. ✅ GitHub API responded correctly
  8. ✅ Cron job created
  9. ⚠️ GitHub token: filled in / still needs to be set (note which)

Sign off as Sprout (Windows) 🌱