Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ The free tools under `/tools` ([`src/pages/tools/`](../src/pages/tools/)) are pr

[`scripts/sitemap.mjs`](../scripts/sitemap.mjs) then writes `dist/sitemap.xml` from every page in `dist/` that names itself as canonical and is not `noindex`. Each `<lastmod>` is the `dateModified` the page declares in its JSON-LD: the guide pages' `CONTENT_DATE` in [`scripts/generate_seo_content.py`](../scripts/generate_seo_content.py), the legal pages' "last updated" dates, the tool pages' `TOOL_PAGES_MODIFIED`, and the landing page's last source commit. A page without a date is listed without `<lastmod>`.

[`scripts/check-site.mjs`](../scripts/check-site.mjs) runs next and fails the build when an internal link, a `#fragment`, a sitemap URL or an `llms.txt` URL does not resolve (it applies the `vercel.json` redirects and rewrites), when JSON-LD does not parse or carries HTML entities, when an indexed page other than `/terms`, `/privacy`, and `/expocit/sources` lacks its question H2 (`#short-answer`) as the first H2, or when an image has no alt text, a button has no name or a form field has no label.
[`scripts/check-site.mjs`](../scripts/check-site.mjs) runs next and fails the build when an internal link, a `#fragment`, a sitemap URL or an `llms.txt` URL does not resolve (it applies the `vercel.json` redirects and rewrites), when JSON-LD does not parse or carries HTML entities, when an indexed page other than `/terms`, `/privacy`, and `/expocit/sources` lacks its question H2 (`#short-answer`) as the first H2, when a page's first heading is not its H1 or a heading skips a level (H1 to H3), or when an image has no alt text, a button has no name or a form field has no label.

The guide pages in `public/<slug>/index.html` are generated, not hand-edited: run `python3 scripts/generate_seo_content.py` and commit its output. Short pages live in its `PAGES` list; pages with long-form copy, their own highlight-card descriptions, and their own FAQs (which also feed the page's FAQPage JSON-LD) live in [`scripts/seo_guides.py`](../scripts/seo_guides.py). Keep `PAGES` in order, because each page's related-guide links are picked by position. A guide entry can set its own `modified` date, which overrides `CONTENT_DATE` for that page alone.
The guide pages in `public/<slug>/index.html` are generated, not hand-edited: run `python3 scripts/generate_seo_content.py` and commit its output. Short pages live in its `PAGES` list; pages with long-form copy, their own highlight-card descriptions, and their own FAQs (which also feed the page's FAQPage JSON-LD) live in [`scripts/seo_guides.py`](../scripts/seo_guides.py). Keep `PAGES` in order, because each page's related-guide links are picked by position. A guide entry can set its own `modified` date, which overrides `CONTENT_DATE` for that page alone. Pages that show the shared `FAQS` are dated no earlier than `FAQS_DATE`, so move it when those questions change.

Every guide opens with the reader's main question as its first H2 and an answer of at most 100 words, kept in [`scripts/seo_answers.py`](../scripts/seo_answers.py); the generator refuses a page without one or with a longer answer. Each guide shows visible "Published" and "Updated" dates (`PUBLISHED_DATE` or a `published` key, and the `modified` date) that match its Article JSON-LD. Prices and plan facts are stated "as of" the month in `factsCheckedOn` in `src/config/site.json`; move that date when you recheck them, and the generated About line on every guide, `llms.txt` and the landing page follow. Copy in `seo_guides.py` and `seo_answers.py` that names the month itself (prices and competitor facts) needs the same edit: search those files for "As of". The generator also writes `public/llms.txt`, the plain summary for AI agents. `public/robots.txt` allows AI crawlers by name in their own group, which repeats the private-route rules because a crawler that matches a named group ignores `*`.

To retire a guide, delete its `PAGES` entry and its `public/<slug>/` folder (the generator never deletes), add its redirects to `vercel.json`, and repoint any link to it. Two guides that answer the same search should become one page, not two thin ones.

The site origin, product name, brand line, and organization name live in [`src/config/site.json`](../src/config/site.json). The app's head tags, the prerender and sitemap scripts, and the guide generator all read it, and guide copy names the product with a `{product}` token. Do not hardcode those strings in new code or copy.
The site origin, product name, brand line, and organization name live in [`src/config/site.json`](../src/config/site.json). The app's head tags, the prerender and sitemap scripts, and the guide generator all read it, and guide copy names the product with a `{product}` token and the Pro price with `{pro_price}`. The number of prep modes comes from the tool lists in [`tool-links.tsx`](../src/components/features/tools/tool-links.tsx): the app's copy reads `PREP_MODE_COUNT` and `UTILITY_COUNT`, and guide copy uses `{mode_count}`, `{mode_names}` and `{utility_names}`. Do not hardcode those strings in new code or copy.

[`src/test/vercel-deployment-config.test.ts`](../src/test/vercel-deployment-config.test.ts) guards these rules. Update it together with `vercel.json`, and do not paste the full configuration into another guide.

Expand Down
2 changes: 1 addition & 1 deletion docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ This sends one tiny typed choice to OpenRouter's Decisions endpoint using the pi
npm run build
```

This proves the Vite production bundle compiles, prerenders the public pages, checks the built site's links, fragments, JSON-LD and basic accessibility with `scripts/check-site.mjs`, and then walks the emitted Vite manifest to reject feature-only PDF, DOCX, chart, ReactFlow, export, and Admin modules, the Spanish and Hungarian catalogs, and the signed-in layout from the static `index.html` dependency graph. It does not prove authentication, database behavior, provider access, or production deployment.
This proves the Vite production bundle compiles, prerenders the public pages, checks the built site's links, fragments, JSON-LD and basic accessibility (including heading order) with `scripts/check-site.mjs`, and then walks the emitted Vite manifest to reject feature-only PDF, DOCX, chart, ReactFlow, export, and Admin modules, the Spanish and Hungarian catalogs, and the signed-in layout from the static `index.html` dependency graph. It does not prove authentication, database behavior, provider access, or production deployment.

## Production service-worker smoke

Expand Down
2 changes: 1 addition & 1 deletion public/ai-debate-case-generator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<meta name="twitter:image" content="https://debate.pi-stack.org/hero-visual.jpg" />
<meta name="twitter:image:alt" content="DebateLab debate prep workspace preview" />
<link rel="stylesheet" href="/seo-pages.css" />
<script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"Article","headline":"AI Debate Case Generator with Citations","name":"AI Debate Case Generator with Citations | DebateLab","url":"https://debate.pi-stack.org/ai-debate-case-generator","description":"Use an AI debate case generator to draft structured cases with claims, warrants, impacts, and evidence leads, then verify sources before round.","inLanguage":"en","dateModified":"2026-10-21","datePublished":"2026-07-05","author":{"@type":"Organization","@id":"https://debate.pi-stack.org/#organization","name":"Pi-Stack","url":"https://debate.pi-stack.org/"},"publisher":{"@type":"Organization","@id":"https://debate.pi-stack.org/#organization","name":"Pi-Stack","url":"https://debate.pi-stack.org/"},"about":{"@id":"https://debate.pi-stack.org/#software"}},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Can an AI debate case generator write a case I can actually use?","acceptedAnswer":{"@type":"Answer","text":"It can write a usable draft, not a finished case. A good generator gives you a thesis, a framework, contentions with warrants and impacts, the case the other side is likely to run, and counters to it. Treat its citations as research leads: open every source, confirm the exact claim and record the full citation. The judgement calls, such as which contention to cut and where to pre-empt the opposition, stay with you. Rewrite the case in your own words, because judges can hear when you are reading a draft for the first time."}},{"@type":"Question","name":"Does the case generator write a complete case?","acceptedAnswer":{"@type":"Answer","text":"It writes a complete draft: thesis, framework, contentions with warrants and impacts, the likely opposing case and counters. Treat it as a structure to cut, verify and rewrite in your own words."}},{"@type":"Question","name":"Are the generated citations reliable?","acceptedAnswer":{"@type":"Answer","text":"They are research leads. Every draft is researched on the web and lists the sources it found, and a contention that still needs evidence is marked Needs Source. Open every source, confirm the exact claim and record the full citation before using it."}},{"@type":"Question","name":"Which debate formats does the generator support?","acceptedAnswer":{"@type":"Answer","text":"Set the Current Debate's format to British Parliamentary, Policy, Classroom or Custom, and Generate reads it along with the debate's Instructions. Generate's own speaker roles (introductor, R1, R2 and conclusor) follow the School 4-6-6-3 format. For WSDC, Public Forum and Lincoln-Douglas, use Custom and describe the structure in the Instructions."}},{"@type":"Question","name":"Can I change one part of a case without starting over?","acceptedAnswer":{"@type":"Answer","text":"Yes. Regenerate a single section and the rest of the case stays on screen unchanged."}},{"@type":"Question","name":"Can I export a generated case?","acceptedAnswer":{"@type":"Answer","text":"Yes. Cases export to PDF and DOCX, and cases created in a Current Debate are saved to it automatically."}}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"DebateLab by Pi-Stack","item":"https://debate.pi-stack.org/"},{"@type":"ListItem","position":2,"name":"AI Debate Case Generator with Citations","item":"https://debate.pi-stack.org/ai-debate-case-generator"}]}]}</script>
<script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"Article","headline":"AI Debate Case Generator with Citations","name":"AI Debate Case Generator with Citations | DebateLab","url":"https://debate.pi-stack.org/ai-debate-case-generator","description":"Use an AI debate case generator to draft structured cases with claims, warrants, impacts, and evidence leads, then verify sources before round.","inLanguage":"en","dateModified":"2026-10-21","datePublished":"2026-07-05","author":{"@type":"Organization","@id":"https://debate.pi-stack.org/#organization","name":"Pi-Stack","url":"https://debate.pi-stack.org/","logo":"https://debate.pi-stack.org/icon-1024.png"},"publisher":{"@type":"Organization","@id":"https://debate.pi-stack.org/#organization","name":"Pi-Stack","url":"https://debate.pi-stack.org/","logo":"https://debate.pi-stack.org/icon-1024.png"},"about":{"@id":"https://debate.pi-stack.org/#software"}},{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Can an AI debate case generator write a case I can actually use?","acceptedAnswer":{"@type":"Answer","text":"It can write a usable draft, not a finished case. A good generator gives you a thesis, a framework, contentions with warrants and impacts, the case the other side is likely to run, and counters to it. Treat its citations as research leads: open every source, confirm the exact claim and record the full citation. The judgement calls, such as which contention to cut and where to pre-empt the opposition, stay with you. Rewrite the case in your own words, because judges can hear when you are reading a draft for the first time."}},{"@type":"Question","name":"Does the case generator write a complete case?","acceptedAnswer":{"@type":"Answer","text":"It writes a complete draft: thesis, framework, contentions with warrants and impacts, the likely opposing case and counters. Treat it as a structure to cut, verify and rewrite in your own words."}},{"@type":"Question","name":"Are the generated citations reliable?","acceptedAnswer":{"@type":"Answer","text":"They are research leads. Every draft is researched on the web and lists the sources it found, and a contention that still needs evidence is marked Needs Source. Open every source, confirm the exact claim and record the full citation before using it."}},{"@type":"Question","name":"Which debate formats does the generator support?","acceptedAnswer":{"@type":"Answer","text":"Set the Current Debate's format to British Parliamentary, Policy, Classroom or Custom, and Generate reads it along with the debate's Instructions. Generate's own speaker roles (introductor, R1, R2 and conclusor) follow the School 4-6-6-3 format. For WSDC, Public Forum and Lincoln-Douglas, use Custom and describe the structure in the Instructions."}},{"@type":"Question","name":"Can I change one part of a case without starting over?","acceptedAnswer":{"@type":"Answer","text":"Yes. Regenerate a single section and the rest of the case stays on screen unchanged."}},{"@type":"Question","name":"Can I export a generated case?","acceptedAnswer":{"@type":"Answer","text":"Yes. Cases export to PDF and DOCX, and cases created in a Current Debate are saved to it automatically."}}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"DebateLab by Pi-Stack","item":"https://debate.pi-stack.org/"},{"@type":"ListItem","position":2,"name":"AI Debate Case Generator with Citations","item":"https://debate.pi-stack.org/ai-debate-case-generator"}]}]}</script>
</head>
<body>
<header class="wrap">
Expand Down
Loading
Loading