Phase plan — waterutility.org

The schedule to grow this site phase-by-phase, generated from the Django Site model. No OpenRouter / no API — you (Claude Code) do the work, grounded in the real markdown under content/.

How to upgrade a phase

Work through every step in order. Do not skip the uplift, the term cleanup, the SVG render check, or the finish/deploy steps — those were the gaps in earlier runs.

  1. Read & orient. Read this whole file, then skim content/ to learn what exists and the writing tone.

  2. Uplift EVERY existing page (not just new ones). Bring all current pages — from earlier phases — up to the Page blueprint below: its page anatomy, frontmatter, JSON-LD schema, the custom SVG visuals, and the mandatory wiki-style interlinking. Old pages must reach the current standard, not be left as they were. Two presentation fixes that apply site-wide:

  3. Build the next phase. Add this phase’s page mix (see schedule), slotting pages into the existing hierarchy, each built to the same blueprint standard.

  4. Upgrade the homepage AND site navigation to reflect the new content. This is mandatory every phase — new pages must not be left orphaned or unreachable:

  5. Keep it niche-specific. Section topics must be drawn from this niche, not generic placeholders.

  6. Remove internal IA/SEO terms from visible copy. The words pillar, cluster, long-tail (and “hub and spoke”, “supporting page”, etc.) are internal labels — they must not appear in reader-facing prose. Scan and fix:

    python3 /home/martin/WebstormProjects/_qa/term_lint.py waterutility.org

    (Legit domain uses of “cluster” — e.g. a Kafka/DB cluster — are fine; rewrite only the information-architecture sense.)

  7. Author custom SVG visuals per the “Custom visuals” section, then build the site and verify the SVGs render correctly ON THE PAGE — the page’s CSS/typography must not leak in and break them. Fix and rebuild until clean:

    cd /home/martin/WebstormProjects/waterutility.org && npm run build
    python3 /home/martin/WebstormProjects/_qa/qa_gates.py waterutility.org

    qa_gates.py runs every shared deterministic gate against the BUILT site and must report ALL PASS: term_lint (IA/SEO term leaks), svg_check (inline-SVG validity + hidden/overlapping/clipped/low-contrast labels), mermaid_check (no Mermaid left un-converted to SVG), inline_code_check (inline blends with prose — no box/border, body colour, not link-like), a11y_check (FULL-PAGE WCAG 2 A/AA via axe-core — contrast, alt text, link names, lang, duplicate ids, heading order, keyboard-scrollable regions), links_check (internal links + anchors resolve), jsonld_check (structured-data validity), seo_meta_check (title/description/canonical/og/one-h1 + cross-page duplicates), render_check (no uncaught JS errors / broken same-origin assets), markup_lint (no unrendered markdown or template leakage), sitemap_check (sitemap ↔ built pages), dup_content_check (no near-duplicate article prose), and perf_check (Lighthouse mobile performance budget over a sampled set). Fix the site until every gate passes.

  8. Record completion (re-runs qa_gates and will NOT advance the phase unless they all pass; then updates page/word count, advances current→next phase, and rewrites this plan ready for the next phase). From the Django project (/home/martin/PycharmProjects/Django-Pillar-Cluster-Long-Tail):

    .venv/bin/python manage.py finish_phase waterutility.org --completed expansion \
        --blueprint "/home/martin/WebstormProjects/waterutility.org/_plan/blueprint.json"
  9. Commit & deploy. Build, deploy to Cloudflare, and push to GitHub:

    cd /home/martin/WebstormProjects/waterutility.org
    npm run deploy          # build + wrangler deploy (auth from the site .env)
    git add -A && git commit -m "Upgrade to expansion phase" && git push

QA refresh (uplift to standard — NO new phase)

Use this when you want to bring the site fully up to the current standard and pass every gate, without building the next phase — the site stays on its current phase (foundation).

Run /qa-refresh (or just say “do a QA refresh”) — it runs the qa_refresh workflow for this site, which performs everything below automatically: rewrites every page to standard (incl. hand-authored SVGs and Mermaid→SVG), restyles inline code + homepage + navigation, then builds, fixes until every gate passes, records the uplift and deploys. Direct call:

Workflow({scriptPath: "/home/martin/WebstormProjects/_qa/qa_refresh_workflow.js", args: "waterutility.org"})

Manual (what the workflow does, step by step)

refresh_site does NOT do the uplift for you — YOU must do the actual work first. It is only the bookkeeping/verification step: it re-syncs counts, re-detects the phase (no advance), re-exports this plan, and runs qa_gates. It will refuse to record the uplift unless every gate passes, so you cannot mark a site “uplifted” without having genuinely rewritten the pages and fixed the SVGs.

Do the checklist above but SKIP step 3 (Build the next phase) — i.e. actually rewrite EVERY existing page to the blueprint (2: anatomy, frontmatter, schema, wiki interlinking, hand-authored SVGs, no Mermaid, blended inline code), update homepage & navigation (4), keep it niche-specific (5), term cleanup (6), and pass the SVG + qa_gates checks (7). Then record the refresh and deploy:

.venv/bin/python manage.py refresh_site waterutility.org \
    --blueprint "/home/martin/WebstormProjects/waterutility.org/_plan/blueprint.json"
cd /home/martin/WebstormProjects/waterutility.org
npm run deploy
git add -A && git commit -m "QA refresh (foundation)" && git push

Phase schedule

# Phase Status Adds Target total Focus
1 1. Foundation ✅ done 2-3 pillars + 10-14 clusters + 8-12 long-tails ~22 Establish core authority: the main pillars and their primary clusters, with enough long-tails to validate demand. Get a consistent page skeleton in place.
2 2. Expansion ➡️ NEXT 1-2 pillars + 7-10 clusters + 18-25 long-tails ~50 Broaden coverage: fill out each pillar’s clusters and add the high-intent long-tails around them. Strengthen interlinking between siblings.
3 3. Maturity … future 4-6 clusters + 28-40 long-tails ~82 Deepen the long tail: comprehensive how-tos, comparisons and edge-case pages under existing clusters. Ensure FAQ blocks and schema on every page.
4 4. Authority … future 2-3 clusters + 20-30 long-tails ~105 Complete topical authority: remaining gaps, advanced/expert pages, and a tight internal link graph so every page is 1-2 clicks from its pillar.

Priorities for the next phase (expansion)

Page blueprint

(tailored to this site)

pillar pages (~4500 words)

cluster pages (~3500 words)

long_tail pages (~2000 words)

All code blocks must contain valid, production-quality Python — the site spec requires a QA check for valid code and indentation. Mermaid diagrams should always include a %% caption comment. Every Mermaid diagram should be styled to match the site light color scheme. Checkbox lists (Production Validation Checklists) must use ‘- [ ]’ markdown so the 11ty build renders them as interactive checkboxes per the site spec. Inline code spans should NOT use backtick-bordered heavy styling — the site spec calls for light background inline code that blends with surrounding text. KaTeX should be applied to any formula expressing an MCL averaging calculation, statistical threshold (±3σ), or signal scaling equation. Tables must be used for: register maps, MCL reference values, configuration parameters, and quality-flag code definitions — all must be responsive. External links appear ONLY where they already exist in source content (EPA, NIST, Pydantic docs); do not add new external links per site spec.

Custom visuals (SVG)

When upgrading or building any page, add a custom, hand-authored inline SVG wherever a visual would genuinely raise quality (architecture/data-flow diagrams, sequence or state diagrams, comparison matrices, timelines, annotated illustrations). Do NOT add decorative or generic stock-style images. Each SVG must: be original and specific to the page’s content; match the site’s existing design system (colours, fonts, stroke weight); be responsive (viewBox, no fixed pixel width) and accessible (/<desc>, role=“img”, aria-label); and use currentColor / CSS variables so it adapts to light/dark themes. Prefer one strong diagram that explains the hardest concept on the page over many small ones. Pillar pages should almost always carry a top-level overview diagram. If the site has any Mermaid diagrams (```mermaid blocks, .mermaid containers, or a mermaid runtime), convert each one to a hand-authored inline SVG in this same style — no Mermaid should remain.</p>