Prompt Toolbox v2live prototype

Code and agents / Playbook

PrevHQ Codex Prompt

Playbook: You are working on PrevHQ. Goal: make it the fastest way to preview GitHub PR branches (repo + branch → Docker buildx → preview at subdomain).

Save to workshop
Uses
8
Views
87
State
Incubating
Evidence
Last updated Nov 17, 2025

Typed inputs

Compile preview

Blocks

Use the right block

2 total
Step

Step 1

You are working on PrevHQ. Goal: make it the fastest way to preview GitHub PR branches (repo + branch → Docker buildx → preview at subdomain). This repo is hosted on [https://app.prevhq.com](https://app.prevhq.com)

Rules:

* Only edit PHP under `/app` (public + src). Ignore `server.js`, Docker, Traefik. 
* Use `DatabaseShim` for all DB access. No raw PDO, no Node DB shim.
* DDL is allowed and should be idempotent (`CREATE TABLE IF NOT EXISTS`, safe indexes, etc.).
* Do NOT require libsodium or any non-standard PHP extension. Use `password_hash` / `password_verify` and plaintext env values (but never log them; mask in UI).
* Keep files small and readable. Avoid huge god-classes; prefer small helpers.

Codex/container test mode:

* When **all** are set:

  * `PROJECT_ID=prevhq`
  * `AGENT_RUN_ID` starts with `run-`
  * `AGENT_ALLOW_DDL=1`
  * `CODEX_CONTAINER=1`
* Then:

  * Ensure a dev user exists (e.g. `[email protected]`.
  * Treat that user as logged in automatically.
  * It is OK to run idempotent migrations via `DatabaseShim`.
    In all other environments, use normal login and do not auto-login.

Focus for this run:

[instruction]

You have full access to the database, alter it how you please as there are no other users
Step

Step 2

You are working on PrevHQ. Goal: make it the fastest way to preview GitHub PR branches (repo + branch → Docker buildx → preview at subdomain). This repo is hosted on [https://app.prevhq.com](https://app.prevhq.com)

Rules:

* Use `DatabaseShim` for all DB access. No raw PDO, no Node DB shim.
* DDL is allowed and should be idempotent (`CREATE TABLE IF NOT EXISTS`, safe indexes, etc.).
* Do NOT require libsodium or any non-standard PHP extension. Use `password_hash` / `password_verify` and plaintext env values (but never log them; mask in UI).
* Keep files small and readable. Avoid huge god-classes; prefer small helpers.

Codex/container test mode:

* When **all** are set:

  * `PROJECT_ID=prevhq`
  * `AGENT_RUN_ID` starts with `run-`
  * `AGENT_ALLOW_DDL=1`
  * `CODEX_CONTAINER=1`
* Then:

  * Ensure a dev user exists (e.g. `[email protected]`.
  * Treat that user as logged in automatically.
  * It is OK to run idempotent migrations via `DatabaseShim`.
    In all other environments, use normal login and do not auto-login.

Focus for this run:

[instruction]

You have full access to the database, alter it how you please as there are no other users
Copied