import fs from 'node:fs'; import path from 'node:path'; const root = path.resolve('examples/ai-quality'); const cases = [ ['01', '사용자 목록', 'Easy', 'GNB_ONLY', 'SearchList', '', ['조회', '초기화'], ['FilterBar', 'DataTable']], ['02', '현장 업무', 'Medium', 'GNB_ONLY', 'SearchList', '', ['조회', '초기화'], ['FilterBar']], ['03', '승인 결재', 'Hard', 'GNB_ONLY', 'SearchList', '', ['조회', '초기화', '결재 확인', '취소', '승인'], ['FilterBar', 'DataTable']], ['04', '채용 관리', 'Hard', 'GNB_ONLY', 'SearchList', '', ['조회', '초기화', '채용 상세', '확인'], ['FilterBar', 'DataTable']], ['05', '업무 요청', 'Medium', 'GNB_ONLY', 'RequestForm', '', ['제출'], []], ['06', '권한 설정', 'Medium', 'LNB_ONLY', 'Permissions', '', ['저장'], []], ['07', '업무 Dashboard', 'Medium', 'DASHBOARD_ONLY', 'Dashboard', '', [], ['DashboardLayout']], ['08', '통계 Dashboard', 'Medium', 'DASHBOARD_ONLY', 'Dashboard', '', [], ['DashboardLayout', 'DataTable']], ['09', '작업 변경', 'Hard', 'GNB_ONLY', 'OverlayWorkflow', '', ['작업 변경 열기', '취소', '적용'], []], ['10', '처리 상태', 'Easy', 'LNB_ONLY', 'StateWorkflow', '', ['로딩', '오류', '빈 결과', '다시 시도'], []], ]; for (const [id, title, difficulty, mode, component, jsx, actions, patterns] of cases) { const folder = path.join(root, id); fs.mkdirSync(folder, { recursive: true }); const frame = mode === 'GNB_ONLY' ? 'GNBFrame' : mode === 'LNB_ONLY' ? 'LNBFrame' : null; fs.writeFileSync(path.join(folder, 'main.tsx'), `import { createRoot } from "react-dom/client"\nimport { ${component} } from "../shared/${component}"${frame ? '\nimport { ' + frame + ' } from "../shared/' + frame + '"' : ''}\nimport "../shared/index.css"\nimport "../shared/hm-theme.css"\ncreateRoot(document.getElementById("root")!).render(${frame ? `<${frame} title="${title}">${jsx}` : jsx})\n`); fs.writeFileSync(path.join(folder, 'index.html'), `${title}
\n`); fs.writeFileSync(path.join(folder, 'requirements.json'), JSON.stringify({ id, title, difficulty, mode, actions, patterns, generation: { model: 'GPT-6 (session identity)', reasoningLevel: 'UNAVAILABLE', randomSeed: null, seedReason: 'Session sampling seed unavailable', condition: 'Generated in current Codex session, shared compositions, no previous experiment solution source supplied', comparability: 'NON-COMPARABLE' } }, null, 2) + '\n'); } console.log('Prepared 10 independent React bootstraps; shared composition source is explicit.');