# The Content-Swarm + Quality-Gate Recipe — ship AI content without fabricating

> Free, tool-agnostic. The exact pattern we use to generate large batches of pages with AI
> and NOT publish the ~1-in-5 that contain an invented fact.
> From the "How We Built It" series at grandewebnetwork.com.

AI content generation is fast and cheap. The danger isn't speed — it's that AI produces
**confident, plausible, sometimes-wrong** output, and a wrong fact published under your name
costs more than the page ever earns. This recipe separates *generation* from *verification* so
nothing unverified reaches the public.

---

## The five stages

```
1. GENERATE   → many pages at once, from a tight brief, saved straight to disk
2. SALVAGE    → write each result to a file; strip any AI preamble before the real content
3. REVIEW     → a SEPARATE, skeptical pass that flags anything wrong/fabricated/off-template
4. FIX        → regenerate ONLY the flagged pages, with the specific flaw called out
5. SHIP       → publish only what passes. Unpublished beats wrong-and-published.
```

The non-negotiable part: **review is a separate step with fresh eyes.** The model that wrote
the page is the worst judge of it. Use a clean reviewer pass (a new prompt, ideally framed as
"find what's wrong"), not "the writer checking its own work."

---

## Stage 1 — Generate (the brief is everything)
- Give a tight, repeatable brief: exact output format, the design/template to match verbatim,
  and the accuracy rules up front ("hedge or omit if uncertain; NEVER invent a date, number,
  or origin").
- **De-dupe first.** Generate a list of what already exists and exclude it, or you'll make
  duplicates.
- Batch the work. If your tool runs agents in parallel, keep concurrency modest — too many at
  once trips shared rate limits and the excess comes back empty (see the rate-limit lesson).

## Stage 2 — Salvage to disk
- Write each generated page to its own file immediately. Disk is durable; a chat window is not.
- AI often prepends reasoning before the real output — strip everything before your real start
  marker (e.g. `<!DOCTYPE`).
- Record a small manifest: filename, title, type. You'll need it to deploy and to build hubs.

## Stage 3 — Review (the gate)
A strict reviewer reads each page and leads its reply with ONE token: **PASS / REVISE / FAIL**,
then the reasons. Make it check, at minimum:
- **Accuracy:** quote any wrong/fabricated/dubious claim. ("No accuracy flags" if clean.)
- **Completeness:** real substance, valid structure, no placeholder/TODO text.
- **Template match:** uses the exact design/format you specified.
- **Hygiene:** no leftover scaffolding, no broken markup.

Two things that will bite you:
- **Tell the reviewer your real conventions.** We once flagged 36 perfectly-correct pages
  because the reviewer assumed our hero should be light when our real design has a dark hero.
  A reviewer with the wrong expectation produces confident false positives. Bake the truth in.
- **Watch for review noise.** If your reviewer runs under heavy load it can fail and its error
  reads as "FAIL." Re-review suspicious failures in isolation before throwing work away.

## Stage 4 — Fix (only the flagged)
- Regenerate just the REVISE/FAIL-for-real pages, passing the specific flaw to fix.
- Re-review the fixes. Loop until clean. Pages that can't be made clean simply don't ship —
  their absence is better than a fabrication.

## Stage 5 — Ship (verified only)
- Deploy the PASS set. Verify a sample through the **real public URL**, not a backend "200 OK."
- Build/refresh any index or hub pages so the new content is discoverable + internally linked.

---

## The mindset
"It earns nothing yet, so there's no risk in shipping it fast" is the trap. Fabrication is
**active** harm — it can get a site penalized and erodes the trust that makes content rank at
all. The gate is what makes "generate a lot with AI" a safe strategy instead of a reckless one.

*Next in the series: coordination — how multiple AI agents work the same project without
overwriting each other.*
