AI JOB 3: Stage to Quartz & Deploy to Cloudflare Pages

Your Role

You are deploying a cleaned and indexed Theophysics vault as a Quartz v4 website on Cloudflare Pages. The content has been cleaned (Job 1) and indexed (Job 2). Your job: stage it into the Quartz site, configure, build, and deploy.

Key Paths

WhatPath
Source contentO:\_Theophysics_v3\04_THEOPYHISCS\
Quartz siteO:\999_IGNORE\Obsidian Quartz\Quartz\theophysics-framework\
Quartz templateO:\999_IGNORE\Obsidian Quartz\QUARTZ_TEMPLATE\
ScriptsO:\999_IGNORE\Obsidian Quartz\scripts\
AI RunbookO:\999_IGNORE\Obsidian Quartz\AI_PUBLISH_RUNBOOK.md
Full READMEO:\999_IGNORE\Obsidian Quartz\README_FIRST.md

READ AI_PUBLISH_RUNBOOK.md FIRST. It has the exact commands.

Current State

  • The Quartz site already exists at O:\999_IGNORE\Obsidian Quartz\Quartz\theophysics-framework\
  • It has old content in content/collections/04_theopyhiscs/ — this needs to be REPLACED with the cleaned version
  • Config is already set:
    • Title: “Theophysics Framework”
    • Base URL: framework.faiththruphysics.com
    • Typography: Schibsted Grotesk / Crimson Text / IBM Plex Mono
    • Dark mode theme configured

Tasks (in order)

1. Clear Old Staged Content

Remove-Item -Recurse -Force "O:\999_IGNORE\Obsidian Quartz\Quartz\theophysics-framework\content\collections\04_theopyhiscs"

2. Stage Fresh Content

Use the staging script:

powershell -ExecutionPolicy Bypass -File "O:\999_IGNORE\Obsidian Quartz\scripts\stage-content.ps1" `
  -SiteDir "O:\999_IGNORE\Obsidian Quartz\Quartz\theophysics-framework" `
  -SourcePaths "O:\_Theophysics_v3\04_THEOPYHISCS" `
  -Mode separate `
  -ClearTarget

If this script doesn’t exist or fails, do a manual robocopy:

robocopy "O:\_Theophysics_v3\04_THEOPYHISCS" `
  "O:\999_IGNORE\Obsidian Quartz\Quartz\theophysics-framework\content\collections\theophysics" `
  /E /COPY:DAT /XD ".obsidian" "node_modules" ".git" /XF "*.url" "Clipboard Text.txt"

3. Update the Site Index

Replace content/index.md with a landing page that links into the theophysics collection. Adjust wikilink paths based on actual directory names after staging.

4. Verify Features

powershell -ExecutionPolicy Bypass -File "O:\999_IGNORE\Obsidian Quartz\scripts\verify-quartz-features.ps1" `
  -SiteDir "O:\999_IGNORE\Obsidian Quartz\Quartz\theophysics-framework"

5. Build Locally

cd "O:\999_IGNORE\Obsidian Quartz\Quartz\theophysics-framework"
npm install
npx quartz build --serve

Check:

  • Site builds without fatal errors (warnings are OK)
  • Landing page renders with working links
  • Tags page exists
  • Folder listings render
  • Graph view works
  • Search works
  • RSS exists at public/index.xml

6. Deploy to Cloudflare Pages

Use filtered deploy (25MB per-file limit):

$src = "O:\999_IGNORE\Obsidian Quartz\Quartz\theophysics-framework\public"
$dst = "O:\999_IGNORE\Obsidian Quartz\Quartz\theophysics-framework\public_cf"
Remove-Item -Recurse -Force $dst -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Path $dst -Force | Out-Null
robocopy $src $dst /E /MAX:26214400 /NFL /NDL /NJH /NJS /NP
wrangler pages deploy $dst --project-name theophysics-framework

7. Verify Live Site

After deploy, check https://theophysics-framework.pages.dev:

  • Landing page loads
  • Navigation works
  • Dark mode renders correctly
  • Graph view functional

Output

Create DEPLOY_LOG.md with: date/time, total files staged, build warnings, deploy URL, broken links found.

Rules

  • Do NOT modify quartz.config.ts or quartz.layout.ts unless something is broken
  • Do NOT change typography or color settings
  • If build fails, check for files with special characters in filenames (emoji, etc.) and rename them
  • The ignorePatterns in quartz.config.ts already excludes Axiom-Explorer (33K files — too large). Don’t remove that exclusion.

Ring 3 — Framework Connections

Canonical Hub: CANONICAL_INDEX