본문으로 건너뛰기
cccskills
무료GitHub에 공개

deploy-and-runtime-verification

MANDATORY deploy after every code change. Typecheck → deploy → purge CDN → E2E on production → visual verify → fix-forward loop. Workers Builds native CI/CD, D1 Time Travel PIT recovery, D1→R2 long-term backups, wrangler rollback, wrangler secrets management, structured observability, cross-browser smoke tests, rollback procedures, and GitHub auto-configuration.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(12)

  • SKILL.md5.6 KB
  • backup-and-disaster-recovery.md2.7 KB
  • changelog-and-releases.md5.3 KB
  • ci-cd-pipeline.md7.1 KB
  • critical-css.md4.7 KB
  • font-subsetting.md4.5 KB
  • gh-fix-ci.md3.5 KB
  • launch-day-sequence.md5.2 KB
  • pipeline-health-check.md4.5 KB
  • r2-lifecycle.md5.6 KB
  • service-worker.md9.7 KB
  • uptime-and-health.md6.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

08 — Deploy and Runtime Verification

Enforce the mandatory typecheck→deploy→CDN-purge→prod-E2E→visual-verify loop after every code change; never mark done without a live PROD assertion.

Mandatory deploy loop (every code change)

  1. Build + typecheck
  2. wrangler deploy (or platform equivalent)
  3. Purge CDN (wrangler cache purge or curl -X POST https://api.cloudflare.com/client/v4/zones/{id}/purge_cache)
  4. Fetch each changed route on PROD URL via curl + Playwright
  5. Assert new content / headers / JSON-LD / status live
  6. AI vision QA at 6 viewports (per _kernel/standards.md#breakpoints)
  7. Fix-forward (max 3 redeploys) — never silently fail
  8. Only then mark DONE

"Local typecheck + build pass" is NOT done. Per rules/verification-loop.md.

Auth fallback chain

  • CLOUDFLARE_API_TOKEN from /Users/Apple/.local/bin/get-secret
  • On 401: CLOUDFLARE_API_KEY + CLOUDFLARE_EMAIL
  • Both stale: prompt ! npx wrangler login, resume deploy once fresh
  • NEVER silently skip deploy because creds missing — surface as blocker

Cloudflare cf CLI transition (beta — doctrine stays wrangler-first)

  • cf CLI open beta since 2026-09-28: ~3,000 generated API commands (vs wrangler's ~280). Wrangler gets ONE final major redirecting to cf, then 18-month maintenance; config format moves wrangler.jsonc → cloudflare.config.ts with typed bindings. Wrangler now requires Node ≥22.
  • Keep every deploy command wrangler-based while cf is beta (still beta 2026-10, no GA date); re-evaluate at cf GA (signal: non-beta npm dist-tag). Even post-GA, cf shells out to wrangler for esbuild/Rust/Python Workers + can't yet stream live logs (wrangler tail) or set single secrets (wrangler secret put).

Workers Builds (native CI/CD)

  • Configure in wrangler.jsonc build block
  • Auto-deploys on push to main per rules/main-only-branch.md
  • Runs npm install + npm run build + wrangler deploy
  • Secrets injected via dashboard or wrangler secret put per rules/secret-provisioning.md

Secrets management

  • wrangler secret put KEY — runtime secrets; wrangler secret list — names only, never values
  • Two-way mirror: every prod secret also in chezmoi (~/.local/share/chezmoi/home/.chezmoitemplates/secrets/{KEY})
  • scripts/check-secrets.mjs --audit runs before every deploy
  • Per rules/secret-provisioning.md + rules/secret-auto-provisioning.md

D1 backup strategy

  • Time Travel — 30-day PIT, free: wrangler d1 time-travel restore <db> --timestamp=<ts>
  • D1 → R2 long-term — wrangler d1 export <db> --output=backup.sql + upload to R2 daily via cron
  • Pre-migration safety — wrangler d1 export BEFORE any destructive migration
  • 1 TB storage limit per account, 10 GB per database

Rollback procedures

  • Worker — wrangler rollback <version-id> in <30s
  • D1 — Time Travel PIT to known-good timestamp
  • R2 — bucket versioning enabled; revert via object version
  • Combined deploy — log {commit, version_id, timestamp} to D1 after every deploy; rollback target one query away

Auto-rollback gates (gradual deployment)

  • 1% → watch error rate 5 min → 10% → watch 5 min → 100%
  • Auto-rollback at p99 error >1% or LCP regression >20%

Browser console gate

Per rules/verification-loop.md § Console-error gate — all must be 0:

  • Console errors / CSP report-uri violations / Trusted Types violations / Deprecation warnings / Third-party script errors

Run as part of npm run e2e:prod Playwright suite.

Cross-browser smoke

Per _kernel/standards.md#breakpoints × 3 browsers (Chromium, Firefox, WebKit):

  • Homepage loads; primary CTA clickable; form submit succeeds (Turnstile invisible)
  • No console errors at any breakpoint
  • Lighthouse Perf ≥75 + A11y ≥95

Observability check post-deploy

Verify each is firing (missing = blocker):

  • Sentry — recent events in dashboard
  • PostHog — recent pageviews + captures
  • Workers Tracing — recent traces in Axiom (Tier 2)
  • AI Gateway — recent LLM calls logged (Tier 3)
  • GA4 — recent events (Tier 2)

GitHub auto-configuration

  • New project: gh repo create with template
  • Add CF Workers Builds via dashboard or API
  • Wire OIDC + cloudflare/wrangler-action@v3 for CI
  • Trust policy: GitHub OIDC token verifies repo + branch — no long-lived CLOUDFLARE_API_TOKEN in repo secrets

Per-deploy CHANGELOG entry

Every deploy logs to CHANGELOG.md (## [version] — YYYY-MM-DD / ### Added / Changed / Fixed). Auto-generated by changelog-generator agent from conventional commits.

See submodules: workers-builds.md, d1-backups.md, rollback.md, github-config.md.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Every delivered app — the non-inferable business requirements + exact stack/brand choices every build must satisfy. Loads on every app/site build.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

heymegabyte/agent-skills242026년 10월 11일 업데이트

Cloudflare-first platform selection. Decision trees for Workers, D1, R2, KV, DO, Queues, Vectorize, Containers, Sandboxes, Flagship, Agent Memory, Workflows v2. Default stack, override conditions, auth, data patterns, reliability.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

heymegabyte/agent-skills242026년 10월 11일 업데이트

Extract real brands (Wayback for rebuilds). Copy system, headline/CTA rules, trust surfaces, legal pages, SEO+structured data, anti-AI-slop, microcopy, DESIGN.md, W3C DTCG tokens, pSEO 5 types, GEO/AI search.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

heymegabyte/agent-skills242026년 10월 11일 업데이트

Implements features in vertical slices, always starting with homepage. Enforces anti-placeholder rules — no lorem ipsum, no TODO stubs, no gray boxes. Real content, real images, real interactions. TypeScript strict mode, Zod validation, and structured file organization.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

heymegabyte/agent-skills242026년 10월 11일 업데이트

The consolidated, world-class Cloudflare + integrations reference — CF platform/data/AI-edge patterns, media pipeline, observability/growth, payments, and the site-generation pipeline. The non-inferable choices that build the greatest web apps.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

heymegabyte/agent-skills242026년 10월 11일 업데이트

One-line-prompt → cinematic, gorgeous, functional, well-tested, deployed website. Pre-hydrated SPA + full PWA kit + JSON-LD rich snippets + third-party integrations. React 19+Vite default (Angular optional). 100 concrete improvements grouped into 10 categories that EVERY single-prompt site build must satisfy before being marked done. Trigger whenever the user says 'make a website for X', 'build a site for X', 'rebuild X.com', or any equivalent one-liner.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

heymegabyte/agent-skills242026년 10월 11일 업데이트

heymegabyte의 스킬 모두 보기

이 스킬의 문제 신고