feat: organize guide into focused chapters

This commit is contained in:
Marcos Paulo
2026-09-04 03:52:36 +00:00
parent 82fff29571
commit 94f3491d7a
10 changed files with 42 additions and 10 deletions
+12 -1
View File
@@ -13,6 +13,12 @@ const rulesJs = read('rules/app.js');
const rulesCss = read('rules/styles.css');
const reviewHtml = read('skills-review/index.html');
const reviewJs = read('skills-review/app.js');
const reviewFiles = read('skills-review/files.js');
const chaptersCss = read('chapters.css');
const summaryHtml = read('summary/index.html');
const modelsHtml = read('models/index.html');
const agentsHtml = read('agents/index.html');
const skillsHtml = read('skills/index.html');
const reviewCatalog = read('skills-review/catalog.js');
for (const url of ['https://code.claude.com/docs/en/sub-agents','https://code.claude.com/docs/en/skills','https://code.claude.com/docs/en/worktrees','https://git-scm.com/docs/git-worktree.html','https://developers.openai.com/codex/skills']) if (!refs.includes(url)) throw new Error(`missing reference ${url}`);
console.log('content verification passed');
@@ -34,11 +40,16 @@ for (const token of ['data-lang="en"','data-lang="pt"','data-copy-prompt','aria-
console.log('rules interaction verification passed');
if (!html.includes('href="rules/"')) throw new Error('main presentation does not link to rules page');
if (!html.includes('href="skills-review/"')) throw new Error('main presentation does not link to skills review page');
for (const token of ['summary/','models/','agents/','skills/','chapter-route']) if (!html.includes(token)) throw new Error(`main presentation missing chapter route ${token}`);
if (rulesHtml.includes('script src="http') || rulesHtml.includes('rel="stylesheet" href="http')) throw new Error('rules page has an external runtime dependency');
for (const token of ['@media(min-width:2200px)','@media(max-width:900px)','@media(max-width:600px)','prefers-reduced-motion']) if (!rulesCss.includes(token)) throw new Error(`missing rules responsive contract ${token}`);
console.log('rules standalone verification passed');
for (const token of ['id="catalog"','id="skill-filter"','id="skill-list"','id="detail"','?author=Name&skill=skill-id&view=improved']) if (!reviewHtml.includes(token)) throw new Error(`missing review page content ${token}`);
for (const token of ["from './catalog.js'",'function renderList','function renderDetail','function original','function selectFromUrl','function syncUrl','URLSearchParams','navigator.clipboard','document.execCommand','download']) if (!reviewJs.includes(token)) throw new Error(`missing review interaction ${token}`);
for (const token of ["from './catalog.js'", "from './files.js'",'function renderList','function renderDetail','function original','function selectFromUrl','function syncUrl','URLSearchParams','navigator.clipboard','document.execCommand','download','data-file','searchParams.set(\'file\'']) if (!reviewJs.includes(token)) throw new Error(`missing review interaction ${token}`);
for (const token of ['ndo-repro','reference.md','files =']) if (!reviewFiles.includes(token)) throw new Error(`missing review file manifest ${token}`);
if ((reviewCatalog.match(/id:'/g) || []).length !== 16) throw new Error('review catalog does not cover all submissions');
if (!reviewCatalog.includes('hardcoded password') || !reviewCatalog.includes('safety-redacted') || !reviewJs.includes('[REDACTED]')) throw new Error('review catalog does not record secret safety handling');
console.log('skills review verification passed');
for (const page of [summaryHtml, modelsHtml, agentsHtml, skillsHtml]) if (!page.includes('../chapters.css') || !page.includes('ROUTE MAP')) throw new Error('chapter page missing shared navigation');
for (const token of ['--ink','@media(max-width:800px)','@media(max-width:520px)']) if (!chaptersCss.includes(token)) throw new Error(`missing chapter responsive contract ${token}`);
console.log('chapter route verification passed');