feat: add submitted skills review desk
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { mkdirSync, writeFileSync } from 'node:fs';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { catalog } from '../skills-review/catalog.js';
|
||||
|
||||
for (const entry of catalog) {
|
||||
const output = join('skill-reviews', 'improved', entry.id, 'SKILL.md');
|
||||
mkdirSync(dirname(output), { recursive: true });
|
||||
writeFileSync(output, entry.improved);
|
||||
}
|
||||
console.log(`wrote ${catalog.length} improved skill drafts`);
|
||||
@@ -11,6 +11,9 @@ const modelRouting = read('docs/references/model-routing.md');
|
||||
const rulesHtml = read('rules/index.html');
|
||||
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 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');
|
||||
for (const token of ['data-phase="plan"','data-phase="build"','data-phase="review"','data-tree="main"','data-tree="ui"','data-worker="ui"','data-route="plan"','data-model-provider="openai"','data-model-provider="claude"','data-model-provider="gemini"','data-effort="low"','data-effort="medium"','data-effort="high"','data-skill-file="skill"','data-skill-step="observe"','data-skill-step="validate"','data-common-skill="ponytail"','data-common-skill="caveman"','data-common-skill="unlazy"','id="hands-on"','data-copy-target="prompt-install-skills"','data-copy-target="prompt-basic"','data-copy-target="prompt-skills"','hands-on/starter/','additional-reading.md','role="tablist"','<table']) if (!html.includes(token)) throw new Error(`missing content ${token}`);
|
||||
@@ -30,6 +33,12 @@ for (const token of ['const languageCopy','const stages','const skills','const p
|
||||
for (const token of ['data-lang="en"','data-lang="pt"','data-copy-prompt','aria-live="polite"','role="tablist"']) if (!rulesHtml.includes(token)) throw new Error(`missing rules control ${token}`);
|
||||
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');
|
||||
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}`);
|
||||
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');
|
||||
|
||||
Reference in New Issue
Block a user