Skip to main content

Prompt generator

Fill in the form once. It produces the two Claude Code prompts that do steps 1 to 5 for you: one for the project repo, one for this repo. Every choice below maps to a decision explained in the step pages, so read the "Traps" there before you paste.

The prompts never commit or push; you review every diff and push yourself. What stays manual, in order:

  1. Move or create the GitLab project at gitlab.com/onyourmarks/k8s/<slug> (step 1).
  2. Create the Infisical project, fix its slug, add the CI/CD machine identity and fill the secrets (step 2).
  3. After prompt 1: answer its confirmation questions, review the diff, commit and push, wait for build:image and click tag:image:staging (step 4).
  4. After prompt 2: review the diff, commit on main and push (step 5).

Project

Environments
one values file and one Kargo warehouse per environment; at least one

Components

Hosts

Staging hosts
hosts on k8s.instance.onyourmarks.tech get the block-robots middleware
Production hosts
custom domains need an A record at 57.129.55.146 before Let's Encrypt issues a certificate

Tasks

Same image, different command. Cron runs on a schedule, a worker runs continuously, a manual job runs on demand.

Prompt 1: run inside the project repo (steps 1 to 4)

Publish this project on oym-k8s-cluster. Work through the four phases below in order,
following https://k8s.docs.onyourmarks.tech/onboarding/publishing exactly. Stop and ask me if something on those pages contradicts what you find in the repo.

Project slug: <slug>. Stack: SvelteKit (adapter-node). Chart: sveltekit (container port 3000).
Reference project: ziggo-espn-quiz-fe (git@gitlab.com:onyourmarks/k8s/ziggo-espn-quiz-fe.git). Clone it to ../ziggo-espn-quiz-fe if it is not there.
Environments: staging and production.
Staging hosts: <slug>.staging.k8s.instance.onyourmarks.tech.
Production hosts: <slug>.prod.k8s.instance.onyourmarks.tech.
Database: no.
Redis: no.

Phase 1 - project requirements (https://k8s.docs.onyourmarks.tech/onboarding/publishing/project)
1. Add GET /health (200, no I/O) and GET /ready (static 200) using the snippet for my stack from that page: src/routes/health/+server.ts and src/routes/ready/+server.ts; let them through in src/hooks.server.ts. Both must answer within 2 seconds.
2. Confirm the server listens on process.env.PORT with default 3000 on 0.0.0.0.
3. Find every place config is read at build time instead of runtime (hardcoded URLs, .env files copied into builds) and change it to runtime env: use $env/dynamic/private and $env/dynamic/public, never $env/static/*.
4. Make .env.example complete: every variable the app reads, with dummy values, grouped and commented. Do not add PORT, HOST or NODE_ENV.
5. Do not create .container-init.sh: the sveltekit chart has no init container.
6. Check that pnpm-lock.yaml (Node) or composer.lock (PHP) is committed and that the production build succeeds without network secrets.
7. Check that Sentry is installed and initialised from runtime env (SENTRY_DSN, environment, release). If it is missing or reads its DSN at build time, tell me and ask whether to add it before you continue.

Phase 2 - Infisical (https://k8s.docs.onyourmarks.tech/onboarding/publishing/infisical)
1. Read .env.example and produce a table of every variable with a suggested value for the Infisical environments staging and prod.
2. Output the same as infisical secrets set KEY=value --env=<env> commands so I can paste them.
3. Add the ddev post-start hook exec-host: 'infisical export --env=dev > .env' to .ddev/config.yaml if the project uses ddev and the hook is missing.
4. Ensure .env is gitignored and .infisical.json is committed (run infisical init if it does not exist and tell me to pick the project).
Do not put real secrets in git.

Phase 3 - the .deploy folder (https://k8s.docs.onyourmarks.tech/onboarding/publishing/deploy-folder)
1. Copy ../ziggo-espn-quiz-fe/.deploy into this repo.
2. Adapt app.Dockerfile to this repo: only copy files that actually exist (pnpm-workspace.yaml, .npmrc, prisma/, public/, views/), use the correct build output dir and CMD, and nothing else.
Keep the # syntax line, the NODE_VERSION/PNPM_VERSION/PHP_VERSION ARGs, the OCI ARG/LABEL block, EXPOSE 3000 and the exec-form CMD exactly as in the reference. No ENTRYPOINT.
3. Adapt .dockerignore (keep .env, .env.*, node_modules, build output and .deploy in it).
4. Build and run the image exactly like the "Test the image locally" section of that page (NODE_VERSION=24, PNPM_VERSION=11, PHP_VERSION=8.5, tag <slug>:local), fix until GET /health returns 200 on port 3000, and show me the output.
Do not add secrets, .env files or hardcoded versions to the Dockerfile.

Phase 4 - GitLab CI (https://k8s.docs.onyourmarks.tech/onboarding/publishing/gitlab-ci)
1. Create .gitlab-ci.yml with the Node variant from that page, every component pinned at @<version>.
2. Include only the stage-test-* components for tools this repo actually has (check package.json scripts, phpstan.neon, phpunit.xml).
3. Set DEPLOY_ENVIRONMENTS: "staging,production".
4. Do not define OYM_COMPONENT_URL, ARGOCD_KARGO_WEBHOOK_URL or ARGOCD_TOKEN; they come from the group.
5. Validate the YAML parses and show me the final file.

Never commit or push. I review the diff and push myself.

Before you finish, ask me to confirm each of these one by one and wait for my answer. If I say no, tell me what to do and where (https://k8s.docs.onyourmarks.tech/onboarding/publishing) instead of doing it yourself:
- The GitLab project is at gitlab.com/onyourmarks/k8s/<slug> and its name is exactly <slug>.
- The Infisical project exists and its slug is exactly <slug>.
- The machine identity CI/CD has Viewer access to the Infisical project.
- Every key from .env.example is set in Infisical for staging and prod, including SENTRY_DSN.
- Sentry is installed and receives events from a local run.
- The local docker build from phase 3 started and answered 200 on /health.
Then give me a summary per phase: what you changed, what I still have to do by hand (commit and push, click tag:image:staging once build:image is green), and anything you could not resolve.

Prompt 2: run inside your checkout of oym-k8s-cluster (step 5)

Both prompts are generated from the same choices, so they agree on slug, chart, environments, hosts and the database key.

Add a platform app to oym-k8s-cluster following https://k8s.docs.onyourmarks.tech/onboarding/publishing/cluster-repo.

slug: <slug>. chart: sveltekit. environments: staging, production.
Use k8s/app/platform/ziggo-espn-quiz-fe as the template.
Needs: database no; redis no; shared volume: none; probes: on.
component-tasks: none.
Hosts per environment (hosts and tls entries; traefik-block-robots@kubernetescrd only on *.k8s.instance.onyourmarks.tech hosts, never on a custom domain):
staging: <slug>.staging.k8s.instance.onyourmarks.tech.
production: <slug>.prod.k8s.instance.onyourmarks.tech.
Image tag: "initial" in every values file; Kargo replaces it after the first tag:image job.

1. Create k8s/app/platform/<slug>/definition/xplatformapp.yaml with chartVersion read from k8s/helm/charts/sveltekit/Chart.yaml.
2. Create k8s/app/platform/<slug>/helm/values-<env>.yaml for each environment using the annotated templates from that page.
environmentSlug: "staging" in values-staging.yaml, "prod" in values-production.yaml.
3. Run the helm template checks from section 5.3 for every values file and show me the output.
4. Show me the git diff. Never commit or push; I do that myself.

Before you finish, ask me to confirm each of these one by one and wait for my answer:
- The image tag from tag:image:staging exists in the GitLab registry of <slug>.
- Infisical has every secret for staging and prod and the CI/CD identity has access.
- Every host listed above is either a cluster host or a domain whose A record points at 57.129.55.146.

Then continue with step 6.