@eliceio/cdk-cli 1.7.2-sharedqa.0 → 1.8.1-qa.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/README.md +18 -15
  2. package/es/commands/create/index.js +6 -3
  3. package/es/commands/create/scaffold.d.ts +1 -1
  4. package/es/commands/create/scaffold.js +1 -1
  5. package/es/commands/doctor/index.js +34 -1
  6. package/es/core/lesson-check.d.ts +7 -0
  7. package/es/core/lesson-check.js +87 -0
  8. package/es/core/templates.d.ts +2 -0
  9. package/es/core/templates.js +4 -1
  10. package/es/dev/host-page.js +5 -2
  11. package/package.json +2 -2
  12. package/skills/_shared/always.md +1 -1
  13. package/skills/_shared/references/02-design-the-material.md +10 -9
  14. package/skills/_shared/references/03-create-the-project.md +12 -11
  15. package/skills/_shared/references/08-fix-check-errors.md +1 -0
  16. package/skills/_shared/references/12-upload-with-the-material-mcp.md +2 -2
  17. package/skills/_shared/references/17-using-the-entry-template.md +44 -5
  18. package/skills/_shared/references/18-using-the-lesson-template.md +207 -0
  19. package/skills/_shared/references/19-lesson-layouts.md +2132 -0
  20. package/skills/elice-content-create/SKILL.md +4 -3
  21. package/skills/elice-content-publish/SKILL.md +3 -3
  22. package/templates/blank/template.json +1 -1
  23. package/templates/board/package.json +1 -1
  24. package/templates/board/template.json +1 -1
  25. package/templates/board/ui/board.css +4 -1
  26. package/templates/board/ui/texts.js +3 -1
  27. package/templates/entry/screens/edit.js +8 -3
  28. package/templates/entry/template.json +1 -1
  29. package/templates/lesson/README.md +71 -0
  30. package/templates/lesson/commentary.txt +7 -0
  31. package/templates/lesson/core/dom.d.ts +4 -0
  32. package/templates/lesson/core/dom.js +22 -0
  33. package/templates/lesson/core/engine.d.ts +23 -0
  34. package/templates/lesson/core/engine.js +169 -0
  35. package/templates/lesson/core/interact.d.ts +2 -0
  36. package/templates/lesson/core/interact.js +429 -0
  37. package/templates/lesson/core/layout-files.d.ts +4 -0
  38. package/templates/lesson/core/layout-files.js +9 -0
  39. package/templates/lesson/core/lesson.d.ts +95 -0
  40. package/templates/lesson/core/lesson.js +609 -0
  41. package/templates/lesson/core/sample.d.ts +4 -0
  42. package/templates/lesson/core/sample.js +128 -0
  43. package/templates/lesson/edit.html +21 -0
  44. package/templates/lesson/gitignore +4 -0
  45. package/templates/lesson/index.html +22 -0
  46. package/templates/lesson/layouts/_actions.html +1 -0
  47. package/templates/lesson/layouts/_cmp.html +1 -0
  48. package/templates/lesson/layouts/_deco-corner.html +1 -0
  49. package/templates/lesson/layouts/_deco-cover.html +1 -0
  50. package/templates/lesson/layouts/_deco-section.html +1 -0
  51. package/templates/lesson/layouts/_foot.html +1 -0
  52. package/templates/lesson/layouts/_head.html +1 -0
  53. package/templates/lesson/layouts/_media.html +1 -0
  54. package/templates/lesson/layouts/agenda.html +13 -0
  55. package/templates/lesson/layouts/bar-chart.html +14 -0
  56. package/templates/lesson/layouts/cards.html +12 -0
  57. package/templates/lesson/layouts/checklist.html +12 -0
  58. package/templates/lesson/layouts/choice-list.html +13 -0
  59. package/templates/lesson/layouts/closing.html +13 -0
  60. package/templates/lesson/layouts/compare.html +12 -0
  61. package/templates/lesson/layouts/cover-dark.html +13 -0
  62. package/templates/lesson/layouts/cover.html +15 -0
  63. package/templates/lesson/layouts/figures.html +12 -0
  64. package/templates/lesson/layouts/flow.html +13 -0
  65. package/templates/lesson/layouts/how-to.html +15 -0
  66. package/templates/lesson/layouts/image-bg.html +12 -0
  67. package/templates/lesson/layouts/image-pair.html +15 -0
  68. package/templates/lesson/layouts/image-split.html +12 -0
  69. package/templates/lesson/layouts/layers.html +12 -0
  70. package/templates/lesson/layouts/objectives.html +12 -0
  71. package/templates/lesson/layouts/ox-card.html +24 -0
  72. package/templates/lesson/layouts/ox-list.html +21 -0
  73. package/templates/lesson/layouts/process.html +14 -0
  74. package/templates/lesson/layouts/profile.html +13 -0
  75. package/templates/lesson/layouts/prompt-builder.html +18 -0
  76. package/templates/lesson/layouts/quiz.html +14 -0
  77. package/templates/lesson/layouts/quote.html +12 -0
  78. package/templates/lesson/layouts/scenario-rows.html +12 -0
  79. package/templates/lesson/layouts/section.html +14 -0
  80. package/templates/lesson/layouts/simulation.html +18 -0
  81. package/templates/lesson/layouts/stat.html +14 -0
  82. package/templates/lesson/layouts/statement.html +13 -0
  83. package/templates/lesson/layouts/stats.html +12 -0
  84. package/templates/lesson/layouts/stepper.html +13 -0
  85. package/templates/lesson/layouts/table.html +12 -0
  86. package/templates/lesson/layouts/tabs.html +13 -0
  87. package/templates/lesson/layouts/text-visual.html +16 -0
  88. package/templates/lesson/layouts/timeline.html +12 -0
  89. package/templates/lesson/layouts/toggle.html +16 -0
  90. package/templates/lesson/layouts/variables.html +14 -0
  91. package/templates/lesson/layouts/venn.html +15 -0
  92. package/templates/lesson/layouts/versus.html +12 -0
  93. package/templates/lesson/metadata.json +9 -0
  94. package/templates/lesson/package.json +15 -0
  95. package/templates/lesson/public/img/sample-chat.svg +21 -0
  96. package/templates/lesson/screens/edit.js +79 -0
  97. package/templates/lesson/screens/learn.js +56 -0
  98. package/templates/lesson/styles.css +27 -0
  99. package/templates/lesson/template.json +7 -0
  100. package/templates/lesson/ui/design.css +1103 -0
  101. package/templates/lesson/ui/fonts/PretendardVariable.woff2 +0 -0
  102. package/templates/lesson/ui/learn.css +64 -0
  103. package/templates/lesson/ui/mobile.css +492 -0
  104. package/templates/lesson/ui/reset.css +6 -0
package/README.md CHANGED
@@ -122,7 +122,8 @@ Claude에게 만들고 싶은 자료를 말하면 설계 · 화면 코드 · 검
122
122
 
123
123
  ```bash
124
124
  ecdk create my-quiz # 퀴즈 (기본): 문항(20개까지)을 편집 화면에서 만듦
125
- ecdk create my-page --template blank # 퀴즈가 아닌 자료(시뮬레이션 · 활동 · 설명 · 플래시카드 · 설문): 예제 · 내용 JSON 편집기로 시작
125
+ ecdk create my-lesson --template lesson # 쪽을 넘기며 읽고 실습하는 학습 자료: 레이아웃 39종에 내용(JSON)만 채움, 퀴즈는 자가 확인 (스킬의 기본)
126
+ ecdk create my-page --template blank # 화면을 직접 짜는 자료(시뮬레이션 · 활동 · 시각화 · 플래시카드): 예제 · 내용 JSON 편집기로 시작
126
127
  ecdk create my-steps --template steps # 여러 단계 자료(도입 → 실험 → 정리): 키트 스테퍼 + 단계마다 콘텐츠 레이아웃
127
128
  ecdk create my-doc --template document # 문서(PDF · PPTX) 한 편: 편집 화면에서 문서를 올리고 PPTX 글자를 바로 고침, 열람 시 학습 완료
128
129
  ecdk create my-survey --template survey # 수업 설문(척도 · 단일 · 다중 선택 · 서술형): 정답 · 채점 없음, 완료 정책은 "열면 완료"(on_access, 2026-11-25 결정 · 나중에 바뀔 수 있음)
@@ -191,6 +192,7 @@ ecdk dev --check --screens learn,edit --viewport mobile --json
191
192
  - **`--json`**: `{ ok, screens: [{ screen, viewport, width, rendered, loading, consoleErrors, pageErrors, blocked, failedRequests, overflowX, layout, theme, step, missingStep, screenshot, ms }], validate: { errors, warnings, issues }, browser, screenshotsDir }`
192
193
  - **종료 코드**: 0 모든 화면 문제 없음 · 1 문제 있음(`[fail]` 오류 · 막힘 · 빈 화면 · 가려진 스테퍼 버튼 · 스테퍼 줄에 깔린 제출 버튼, `[warn]` 불러오는 중이 남음 · 가로 넘침 · 배치, 검사 오류) · 2 사용법 오류 · 3 브라우저 없음(Chrome을 설치하거나 `ecdk dev`로 띄워 직접 확인).
193
194
  - dev 화면도 주소로 보기 · 폭을 고를 수 있습니다: `http://localhost:4170/?view=edit&width=360px` (`view`: `student` · `tutor` · `instructor` · `edit`).
195
+ - 엔트리 템플릿: 주소에 `&entryWorkspace=https://entry-workspace.elice.io`를 붙이면 운영 워크스페이스로 엽니다 (dev가 콘텐츠 주소로 넘김, 없으면 `http://localhost:9000`).
194
196
 
195
197
  터미널에 콘텐츠의 콘솔 오류 · 404가 나오면 고칩니다. 화면 위 기록과 터미널의 **막힌 외부 요청: <주소> (<지시어>)**는 콘텐츠 CSP가 막은 요청입니다 (외부 이미지 · 글꼴 · `fetch`, 라이브러리가 실행 중 부르는 외부 주소). LXP에서도 막히므로 파일을 zip 안에 넣습니다.
196
198
 
@@ -412,7 +414,7 @@ app.useSave({
412
414
 
413
415
  ```js
414
416
  // 내용 편집기 (blank 템플릿 예제): 내용 JSON 모양 · 칸 설명만 주면 폼 보기 · 코드 보기를 키트가 그린다.
415
- // lib/elice-content-editor.js는 편집 화면이 이것을 부르는 템플릿(blank · steps)에만 ecdk create가 넣는다
417
+ // lib/elice-content-editor.js는 편집 화면이 이것을 부르는 템플릿(blank · steps · lesson)에만 ecdk create가 넣는다
416
418
  // 저장한 내용이 없으면 initial(견본)로 시작. 폼은 목록 추가 · 삭제(되돌리기) · 끌어서 순서, 코드는 정렬 · 오류 줄:칸
417
419
  import { useContentEditor } from '../lib/elice-content-editor.js';
418
420
  const editor = useContentEditor(app, {
@@ -532,19 +534,19 @@ q1=b;q2=a,d;q3=c,a,b;q4=가중치;q5=g1:a|g2:b,c
532
534
 
533
535
  공통 옵션: `--json`(기계용 출력), `--help`, `--version`
534
536
 
535
- | 명령 | 하는 일 | 종료 코드 |
536
- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
537
- | `ecdk create <폴더> [--template quiz\|blank\|steps\|document\|survey\|video\|entry] [--theme light\|dark] [--no-install]` · `ecdk create --list` | 프로젝트 만들기 (비어 있지 않은 폴더는 거절) + `npm install`(SDK). `--no-install`은 설치를 건너뜀. `--list`는 템플릿 목록 · 버전 · 설명 | 0 · 1 설치 실패(프로젝트는 둠) · 2 |
538
- | `ecdk dev [폴더] [--port 4170]` | LXP 흉내 화면 + 운영 조건(다른 출처 · sandbox · 콘텐츠 CSP)으로 콘텐츠 띄우기, 막힌 외부 요청 알림, 고치면 다시 검사 · 새로 띄움 | Ctrl+C |
539
- | `ecdk dev [폴더] --check [--screens …] [--viewport desktop,mobile] [--step all\|1,2] [--theme light\|dark\|all] [--json]` | 같은 서버를 띄워 화면 × 폭마다 헤드리스 브라우저로 열고 확인(그려짐 · 콘솔 오류 · 예외 · 막힌 요청 · 실패한 요청 · 가로 넘침) → 그림 `.ecdk/screens/` → 끝냄 | 0 · 1 문제 있음 · 2 · 3 브라우저 없음 |
540
- | `ecdk validate [폴더\|.zip\|.html]` | 서버와 같은 규칙으로 검사 (프로젝트는 `ecdk build` 결과를 검사) | 0 통과 · 1 오류 · 2 |
541
- | `ecdk build [폴더]` | 빼기 → SDK 넣기(`node_modules`) → metadata → 묶기 · 묶은 원본 빼기 → minify(기본) → 검사 → `dist/content.zip` | 0 · 1 검사 오류(zip 없음) · 2 설정 오류 · SDK 미설치 |
542
- | `ecdk doctor [폴더] [--fix]` | 환경 · 프로젝트 점검, `--fix`는 자동으로 고칠 수 있는 항목만 | 0 · 1 실패 · 2 |
543
- | `ecdk setup [--only skills\|mcp] [--project] [--url <주소>] [--target claude\|helpycode\|all] [--force]` | 처음 한 번: 스킬 설치(전역) → MCP 등록 → 점검 요약(Node · 스킬 · MCP) → 로그인 안내. 다시 실행해도 됨(있는 것은 건너뛰고 옛 것 · 빠진 것만 고침). MCP는 배포 전 · 직접 할 일이 남아도 실패로 치지 않음("직접 할 일"), `--only` 없이는 `--force`가 MCP에만 | 0 스킬 설치됨 · 1 스킬 실패 · 2 |
544
- | `ecdk setup --only skills [--project] [--force]` | Claude Code 스킬만 설치 · 갱신. 기본 `~/.claude/skills/`, `--project`면 현재 폴더 `.claude/skills/`. 손으로 고친 스킬 · CLI보다 새 스킬은 `--force`일 때만 바꿈 | 0 · 1 고친 스킬 둠 · 2 |
545
- | `ecdk setup --only mcp [--url <주소>] [--target claude\|helpycode\|all] [--force]` | 학습자료 서버 MCP(`elice-material`)만 Claude Code · Helpy Code에 등록. 주소는 기본 운영 서버, 다른 서버는 `--url`. 등록 전 서버에 MCP가 있는지 확인(없으면 `--force`), Helpy Code 설정에 주석이 있으면 붙여 넣을 내용만 출력 | 0 · 1 직접 할 일 · 2 |
546
- | `ecdk update [--project] [--check]` | npm `latest`로 올리기: `npm install -g @eliceio/cdk-cli@<latest>` → 새 ecdk로 `ecdk setup --only skills`(`--project`면 `--only skills --project`, 현재 폴더 `.claude/skills/`) → 프로젝트 폴더면 `npm update @eliceio/cdk`. 같거나 더 새 버전이면 하지 않음(내리지 않음), `npx`면 전역 설치 건너뛰고 스킬은 `npx -y @eliceio/cdk-cli@<latest> setup --only skills`, `--check`는 확인만 | 0 · 1 확인 실패 · 단계 실패 · 2 |
547
- | `ecdk uninstall [--only skills\|mcp] [--project] [--target claude\|helpycode\|all] [--force]` | `ecdk setup`이 설치한 스킬 5개(옛 ecdk가 다른 이름으로 설치한 스킬 · 옛 가이드 스킬 포함) · MCP 등록(`elice-material`) 지우기. `--only`는 setup과 같음(스킬만 · MCP 등록만), `--project`는 `--only skills`에서만. 손으로 고친 스킬은 `--force`일 때만, 다른 스킬 · MCP 서버 · 프로젝트는 건드리지 않음. CLI는 지우지 않음 ([지우기](#지우기)) | 0 · 1 남긴 것 · 직접 할 일 · 2 |
537
+ | 명령 | 하는 일 | 종료 코드 |
538
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
539
+ | `ecdk create <폴더> [--template quiz\|blank\|steps\|document\|survey\|video\|entry\|board\|lesson] [--theme light\|dark] [--no-install]` · `ecdk create --list` | 프로젝트 만들기 (비어 있지 않은 폴더는 거절) + `npm install`(SDK). `--no-install`은 설치를 건너뜀. `--list`는 템플릿 목록 · 버전 · 설명 | 0 · 1 설치 실패(프로젝트는 둠) · 2 |
540
+ | `ecdk dev [폴더] [--port 4170]` | LXP 흉내 화면 + 운영 조건(다른 출처 · sandbox · 콘텐츠 CSP)으로 콘텐츠 띄우기, 막힌 외부 요청 알림, 고치면 다시 검사 · 새로 띄움 | Ctrl+C |
541
+ | `ecdk dev [폴더] --check [--screens …] [--viewport desktop,mobile] [--step all\|1,2] [--theme light\|dark\|all] [--json]` | 같은 서버를 띄워 화면 × 폭마다 헤드리스 브라우저로 열고 확인(그려짐 · 콘솔 오류 · 예외 · 막힌 요청 · 실패한 요청 · 가로 넘침) → 그림 `.ecdk/screens/` → 끝냄 | 0 · 1 문제 있음 · 2 · 3 브라우저 없음 |
542
+ | `ecdk validate [폴더\|.zip\|.html]` | 서버와 같은 규칙으로 검사 (프로젝트는 `ecdk build` 결과를 검사) | 0 통과 · 1 오류 · 2 |
543
+ | `ecdk build [폴더]` | 빼기 → SDK 넣기(`node_modules`) → metadata → 묶기 · 묶은 원본 빼기 → minify(기본) → 검사 → `dist/content.zip` | 0 · 1 검사 오류(zip 없음) · 2 설정 오류 · SDK 미설치 |
544
+ | `ecdk doctor [폴더] [--fix]` | 환경 · 프로젝트 점검, `--fix`는 자동으로 고칠 수 있는 항목만 | 0 · 1 실패 · 2 |
545
+ | `ecdk setup [--only skills\|mcp] [--project] [--url <주소>] [--target claude\|helpycode\|all] [--force]` | 처음 한 번: 스킬 설치(전역) → MCP 등록 → 점검 요약(Node · 스킬 · MCP) → 로그인 안내. 다시 실행해도 됨(있는 것은 건너뛰고 옛 것 · 빠진 것만 고침). MCP는 배포 전 · 직접 할 일이 남아도 실패로 치지 않음("직접 할 일"), `--only` 없이는 `--force`가 MCP에만 | 0 스킬 설치됨 · 1 스킬 실패 · 2 |
546
+ | `ecdk setup --only skills [--project] [--force]` | Claude Code 스킬만 설치 · 갱신. 기본 `~/.claude/skills/`, `--project`면 현재 폴더 `.claude/skills/`. 손으로 고친 스킬 · CLI보다 새 스킬은 `--force`일 때만 바꿈 | 0 · 1 고친 스킬 둠 · 2 |
547
+ | `ecdk setup --only mcp [--url <주소>] [--target claude\|helpycode\|all] [--force]` | 학습자료 서버 MCP(`elice-material`)만 Claude Code · Helpy Code에 등록. 주소는 기본 운영 서버, 다른 서버는 `--url`. 등록 전 서버에 MCP가 있는지 확인(없으면 `--force`), Helpy Code 설정에 주석이 있으면 붙여 넣을 내용만 출력 | 0 · 1 직접 할 일 · 2 |
548
+ | `ecdk update [--project] [--check]` | npm `latest`로 올리기: `npm install -g @eliceio/cdk-cli@<latest>` → 새 ecdk로 `ecdk setup --only skills`(`--project`면 `--only skills --project`, 현재 폴더 `.claude/skills/`) → 프로젝트 폴더면 `npm update @eliceio/cdk`. 같거나 더 새 버전이면 하지 않음(내리지 않음), `npx`면 전역 설치 건너뛰고 스킬은 `npx -y @eliceio/cdk-cli@<latest> setup --only skills`, `--check`는 확인만 | 0 · 1 확인 실패 · 단계 실패 · 2 |
549
+ | `ecdk uninstall [--only skills\|mcp] [--project] [--target claude\|helpycode\|all] [--force]` | `ecdk setup`이 설치한 스킬 5개(옛 ecdk가 다른 이름으로 설치한 스킬 · 옛 가이드 스킬 포함) · MCP 등록(`elice-material`) 지우기. `--only`는 setup과 같음(스킬만 · MCP 등록만), `--project`는 `--only skills`에서만. 손으로 고친 스킬은 `--force`일 때만, 다른 스킬 · MCP 서버 · 프로젝트는 건드리지 않음. CLI는 지우지 않음 ([지우기](#지우기)) | 0 · 1 남긴 것 · 직접 할 일 · 2 |
548
550
 
549
551
  `--json` 출력의 `issues[].id`는 바뀌지 않는 이름이라 스크립트 · Claude가 판단에 씁니다.
550
552
 
@@ -674,6 +676,7 @@ npm uninstall -g @eliceio/cdk-cli # CLI 자체 (npx로만 썼다면 지
674
676
  | `project.deps` | SDK(`@eliceio/cdk`) 설치(`npm install`) · 최소 버전 이상(`npm update @eliceio/cdk`). SDK 복사본 `lib/cdk.js`만 있으면 실패, `--fix`가 `package.json`에 넣음 |
675
677
  | `project.grading` | `.ecdk/settings.json`의 `grading`이 서버 저장 규칙에 맞지 않거나 공개 값 `gradingType`과 어긋남 → `ecdk dev` 내용 편집에서 표시되는 칸을 고쳐 다시 저장 (파일을 지우면 내용도 사라짐). AI 평가 설정(`criteria` · `apiId`)만 있고 `grading`이 없으면 경고 → 편집 화면 `getGrading`으로 `rubric` 저장 |
676
678
  | `project.quiz` | 퀴즈 템플릿만: 저장한 문항 · 정답 · 배점이 편집 화면 규칙과 다름 (프로젝트 `core/model.js`로 검증 · 정답 정규식 왕복 · `answer_key` · `scores` 자리 · `points`와 `scores` · `gradingType` · `pointsMode`). settings를 손으로 고쳤을 때 → `ecdk dev` 내용 편집에서 '초안으로 저장', 직접 고치는 법은 스킬 참고 문서 15 |
679
+ | `project.lesson` | lesson 템플릿만: 저장한 슬라이드가 편집 화면 검사와 다름 (프로젝트 `core/lesson.js`로 필수 슬롯 · 항목 수 · 허용값 · 레이아웃 이름 · 퀴즈 정답 번호 · 외부 이미지 · 없는 이미지 파일은 실패, 글자 수 · 문체 · 빈 이미지 자리는 경고). 슬롯 · 글자 수는 스킬 참고 문서 19 |
677
680
  | `project.root` | `root` · `outDir` 확인 |
678
681
  | `project.answer-import` | 콘텐츠가 정답 · 설정 파일을 불러옴 → 정답은 채점 설정으로 |
679
682
  | `project.check` | `ecdk build`로 위치 확인 |
@@ -9,7 +9,8 @@ const usage = `사용법: ecdk create <폴더> [--template ${TEMPLATES.join('|')
9
9
  학생 화면 · 교육자 화면 · 내용 편집(CMS) 화면, 화면 키트(lib/), metadata.json, package.json이 든 프로젝트를 만들고
10
10
  npm install을 실행한다. SDK(@eliceio/cdk)는 package.json 의존성이다 (node_modules에 설치, 네트워크 필요).
11
11
  quiz: 퀴즈(문항 20개까지, 모두 맞혀야 100점, 선택 · 순서 · 주관식 · 그룹 분류, 편집 화면 포함, 기본)
12
- blank: 퀴즈가 아닌 모든 자료(시뮬레이션 · 시각화 · 활동 · 설명 · 플래시카드 · 설문)를 직접 만들 때. 화면 3개 골격
12
+ lesson: 설명 · 실습 · 자가 확인 학습 자료(기본). 레이아웃에 내용(.ecdk/settings.json)만 채우고 화면 코드는 쓰지 않음
13
+ blank: 화면을 직접 짜야 하는 자료(시뮬레이션 · 게임 · 시각화 등). 화면 3개 골격
13
14
  steps: 여러 단계로 나눈 자료(도입 → 실험 → 정리). 키트 스테퍼(app.useStepper) + 단계마다 콘텐츠 레이아웃
14
15
  document: 문서(PDF · PPTX) 한 편 보기. 편집 화면에서 문서를 올리고 PPTX 글자를 바로 고침 (.ppt · .pps · .ppsx는 .pptx · .pdf로 바꿔 올림)
15
16
  survey: 수업 설문(척도 · 단일 · 다중 선택 · 서술형, 필수 응답). 정답 · 채점 없음, 완료 정책은 "열면 완료"(on_access)
@@ -60,11 +61,13 @@ async function run(args, deps = {}) {
60
61
  exitCode: 1,
61
62
  output: `${head}\n\n[fail] ${INSTALL_COMMAND} 실패 (${installed.error ?? '-'}). 프로젝트는 그대로 두었습니다.\n위 npm 출력과 네트워크 · 사내 프록시를 확인한 뒤 다시 실행해 주세요:\n\n ${cd}\n ${INSTALL_COMMAND}\n ecdk build`
62
63
  };
63
- // 고칠 화면 코드: 템플릿에 있는 screens/*.js
64
+ // 템플릿이 정한 다음 할 일(template.json next, 예: lesson은 화면 코드 없이 .ecdk/settings.json만 씀), 없으면 고칠 화면 코드
65
+ const custom = listTemplates().find(t => t.name === r.template)?.next;
64
66
  const screens = ['learn', 'instructor', 'edit'].map(s => `screens/${s}.js`).filter(f => r.files.includes(f));
67
+ const next = custom ?? `고칠 파일: ${[...screens, 'styles.css'].join(' · ')}\n내용 · 정답은 편집 화면에서 입력하고(ecdk dev 내용 편집에서 저장하면 .ecdk/settings.json, publish 스킬이 동의를 받아 업로드와 함께 보냄 · 아니면 LXP 편집 화면에서 저장한 뒤 '수업 자료에 반영'), 완료 정책은 LXP 편집 페이지 '설정' 패널에서 교육자가 고릅니다 (기본 내용 없음).`;
65
68
  return {
66
69
  exitCode: 0,
67
- output: `${head}\n\n고칠 파일: ${[...screens, 'styles.css'].join(' · ')}\n내용 · 정답은 편집 화면에서 입력하고(ecdk dev 내용 편집에서 저장하면 .ecdk/settings.json, publish 스킬이 동의를 받아 업로드와 함께 보냄 · 아니면 LXP 편집 화면에서 저장한 뒤 '수업 자료에 반영'), 완료 정책은 LXP 편집 페이지 '설정' 패널에서 교육자가 고릅니다 (기본 내용 없음).\n\n ${cd}\n${installed ? '' : ` ${INSTALL_COMMAND}\n`} ecdk doctor\n ecdk build`
70
+ output: `${head}\n\n${next}\n\n ${cd}\n${installed ? '' : ` ${INSTALL_COMMAND}\n`} ecdk doctor\n ecdk build`
68
71
  };
69
72
  }
70
73
 
@@ -1,4 +1,4 @@
1
- export declare const TEMPLATES: readonly ["quiz", "blank", "steps", "document", "survey", "video", "entry", "board"];
1
+ export declare const TEMPLATES: readonly ["quiz", "blank", "steps", "document", "survey", "video", "entry", "board", "lesson"];
2
2
  export type TemplateName = (typeof TEMPLATES)[number];
3
3
  /** 화면 테마. dark는 화면 HTML에 data-eds-theme="dark"를 붙여 EDS 어두운 팔레트를 쓴다 */
4
4
  export declare const THEMES: readonly ["light", "dark"];
@@ -5,7 +5,7 @@ import { SDK_PACKAGE } from '../../core/sdk.js';
5
5
  import { listTemplates } from '../../core/templates.js';
6
6
  import { localSdkSpec } from './install.js';
7
7
 
8
- const TEMPLATES = ['quiz', 'blank', 'steps', 'document', 'survey', 'video', 'entry', 'board'];
8
+ const TEMPLATES = ['quiz', 'blank', 'steps', 'document', 'survey', 'video', 'entry', 'board', 'lesson'];
9
9
  /** 화면 테마. dark는 화면 HTML에 data-eds-theme="dark"를 붙여 EDS 어두운 팔레트를 쓴다 */
10
10
  const THEMES = ['light', 'dark'];
11
11
  /** 패키지 루트의 templates/ (es/commands/create/와 src/commands/create/ 모두 세 단계 위) */
@@ -4,6 +4,7 @@ import { homedir } from 'node:os';
4
4
  import { resolve, join, dirname } from 'node:path';
5
5
  import { loadConfig, CONFIG_FILE, planLegacyMigration, applyLegacyMigration, PACKAGE_FILE, PACKAGE_CONFIG_KEY, legacyGradingTypesWarning, legacyCompletionWarning, loadSavedSettings, savedGradingProblem, loadGrading, SETTINGS_DATA_FILE } from '../../core/config.js';
6
6
  import { NO_UPDATE_CHECK_ENV, npmLatest, isNewer, LATEST_DOCTOR_TIMEOUT_MS } from '../../core/latest.js';
7
+ import { checkLessonSettings } from '../../core/lesson-check.js';
7
8
  import { defaultMcpEnv, detectTargets, claudeRegistration, helpyRegisteredUrl, MCP_NAME, envOfUrl } from '../../core/mcp.js';
8
9
  import { prepareContent } from '../../core/prepare.js';
9
10
  import { projectCheckOptions, findLegacySdkCopy } from '../../core/project-check.js';
@@ -373,6 +374,38 @@ async function checkQuiz(dir, config) {
373
374
  }
374
375
  };
375
376
  }
377
+ /**
378
+ * 학습 자료(lesson) 템플릿 프로젝트의 저장한 슬라이드가 편집 화면 검사(슬롯 · 레이아웃 · 이미지)를 통과하는지 (core/lesson-check.ts).
379
+ * 학습 자료 템플릿이 아니거나 저장한 슬라이드가 없으면 건너뛴다. 글자 수 · 문체는 경고만
380
+ */
381
+ async function checkLesson(dir, config) {
382
+ const id = 'project.lesson';
383
+ let settings;
384
+ try {
385
+ settings = await loadSavedSettings(dir);
386
+ } catch {
387
+ return {
388
+ id,
389
+ level: 'skip',
390
+ message: `${SETTINGS_DATA_FILE}을 읽지 못함 (project.grading)`
391
+ };
392
+ }
393
+ const r = await checkLessonSettings(resolve(dir, config.root), settings);
394
+ if (r.level === 'ok' || r.level === 'skip') return {
395
+ id,
396
+ level: r.level,
397
+ message: r.message
398
+ };
399
+ return {
400
+ id,
401
+ level: r.level,
402
+ message: r.message,
403
+ fix: {
404
+ description: `${SETTINGS_DATA_FILE}의 슬라이드를 고친 뒤(슬롯 이름 · 글자 수: 스킬 참고 문서 19) 다시 ecdk doctor. 사람이 있으면 ecdk dev의 '내용 편집'에서 확인 · 저장`,
405
+ auto: false
406
+ }
407
+ };
408
+ }
376
409
  /**
377
410
  * 프로젝트 설정 (ADR 0011): package.json "ecdk"(빌드 옵션) + 원본 metadata.json(화면 · 완료 정책). 옛 elice.config.json이
378
411
  * 남아 있으면 경고하고, --fix가 metadata.json · package.json "ecdk"로 옮긴 뒤 지운다 (내용 · 답 파일은 옮기지 않음)
@@ -545,7 +578,7 @@ async function doctor(target, opts) {
545
578
  message: `설정을 읽을 수 없습니다: ${e.message}`
546
579
  });
547
580
  }
548
- if (config) checks.push(await checkDeps(dir, config), checkTemplate(config), await checkGrading(dir, config), await checkQuiz(dir, config));
581
+ if (config) checks.push(await checkDeps(dir, config), checkTemplate(config), await checkGrading(dir, config), await checkQuiz(dir, config), await checkLesson(dir, config));
549
582
  if (config) {
550
583
  const srcDir = resolve(dir, config.root);
551
584
  if (!(await exists(srcDir))) {
@@ -0,0 +1,7 @@
1
+ export interface LessonCheck {
2
+ level: 'ok' | 'skip' | 'warn' | 'fail';
3
+ message: string;
4
+ problems: string[];
5
+ warnings: string[];
6
+ }
7
+ export declare function checkLessonSettings(srcDir: string, saved: Record<string, unknown>): Promise<LessonCheck>;
@@ -0,0 +1,87 @@
1
+ import { existsSync, statSync } from 'node:fs';
2
+ import { readdir, readFile } from 'node:fs/promises';
3
+ import { join, normalize, sep } from 'node:path';
4
+ import { pathToFileURL } from 'node:url';
5
+
6
+ /** 같은 프로세스에서 고친 파일을 다시 읽게 수정 시각을 주소에 붙인다 */
7
+ async function importFresh(path) {
8
+ const url = `${pathToFileURL(path).href}?mtime=${statSync(path).mtimeMs}`;
9
+ return await import(url);
10
+ }
11
+ /** 레이아웃 틀 폴더 (템플릿 package.json ecdk.exclude로 zip에서 빠지고 화면 코드에 글로 묶임) */
12
+ const LAYOUT_DIR = 'layouts';
13
+ /** layouts/*.html → { 'layouts/이름.html': 내용 } (화면의 import.meta.glob 결과와 같은 모양) */
14
+ async function readLayoutFiles(dir) {
15
+ const files = {};
16
+ for (const name of (await readdir(dir)).filter(n => n.endsWith('.html')).sort()) files[`${LAYOUT_DIR}/${name}`] = await readFile(join(dir, name), 'utf8');
17
+ return files;
18
+ }
19
+ /** 보여 줄 문제 수 (나머지는 개수만) */
20
+ const SHOW = 8;
21
+ async function checkLessonSettings(srcDir, saved) {
22
+ const skip = message => ({
23
+ level: 'skip',
24
+ message,
25
+ problems: [],
26
+ warnings: []
27
+ });
28
+ const modelPath = join(srcDir, 'core', 'lesson.js');
29
+ if (!existsSync(modelPath)) return skip('학습 자료 템플릿 아님 (core/lesson.js 없음)');
30
+ let validateLesson;
31
+ let layouts;
32
+ try {
33
+ const mod = await importFresh(modelPath);
34
+ if (typeof mod.validateLesson !== 'function' || typeof mod.parseLayouts !== 'function') return skip('학습 자료 템플릿 아님 (core/lesson.js에 validateLesson · parseLayouts 없음)');
35
+ validateLesson = mod.validateLesson;
36
+ layouts = mod.parseLayouts(await readLayoutFiles(join(srcDir, LAYOUT_DIR)));
37
+ } catch (e) {
38
+ return {
39
+ level: 'fail',
40
+ message: `core/lesson.js · ${LAYOUT_DIR}/를 불러오지 못했습니다: ${e.message}`,
41
+ problems: [],
42
+ warnings: []
43
+ };
44
+ }
45
+ const {
46
+ grading: _grading,
47
+ ...content
48
+ } = saved;
49
+ if (content.slides === undefined && content.meta === undefined) return skip('저장한 슬라이드 없음 (편집 화면에서 아직 저장하지 않음)');
50
+ const root = normalize(srcDir);
51
+ /** zip 안 상대 경로: public/(zip 최상위) 또는 원본 폴더의 파일 */
52
+ const imageExists = path => {
53
+ const rel = path.replace(/^\.\//, '').split(/[?#]/)[0] ?? '';
54
+ return ['public', ''].some(base => {
55
+ const p = normalize(join(root, base, rel));
56
+ return p.startsWith(root + sep) && existsSync(p);
57
+ });
58
+ };
59
+ const found = validateLesson(content, {
60
+ layouts,
61
+ imageExists
62
+ });
63
+ const problems = found.filter(f => f.level === 'error').map(f => f.message);
64
+ const warnings = found.filter(f => f.level === 'warn').map(f => f.message);
65
+ const list = items => items.slice(0, SHOW).join(' / ') + (items.length > SHOW ? ` 외 ${items.length - SHOW}건` : '');
66
+ const slides = Array.isArray(content.slides) ? content.slides.length : 0;
67
+ if (problems.length > 0) return {
68
+ level: 'fail',
69
+ message: `슬라이드 ${slides}장: 오류 ${problems.length}건 · 경고 ${warnings.length}건: ${list(problems)}`,
70
+ problems,
71
+ warnings
72
+ };
73
+ if (warnings.length > 0) return {
74
+ level: 'warn',
75
+ message: `슬라이드 ${slides}장: 경고 ${warnings.length}건 (글자 수 · 문체 · 빈 이미지 자리, 읽고 판단): ${list(warnings)}`,
76
+ problems,
77
+ warnings
78
+ };
79
+ return {
80
+ level: 'ok',
81
+ message: `슬라이드 ${slides}장: 슬롯 · 문체 검사 통과`,
82
+ problems,
83
+ warnings
84
+ };
85
+ }
86
+
87
+ export { checkLessonSettings };
@@ -11,6 +11,8 @@ export interface TemplateInfo {
11
11
  description: string;
12
12
  /** 템플릿 metadata.json에서 켠 화면 */
13
13
  screens: string[];
14
+ /** ecdk create가 기본 안내(고칠 화면 코드 · 내용은 편집 화면) 대신 보여 줄 다음 할 일 (화면 코드를 고치지 않는 템플릿) */
15
+ next?: string;
14
16
  }
15
17
  /** 이 CLI가 가진 템플릿 (이름 순, 공통 폴더 `_shared` 제외) */
16
18
  export declare function listTemplates(root?: string): TemplateInfo[];
@@ -16,7 +16,10 @@ function listTemplates(root = TEMPLATE_ROOT) {
16
16
  version: meta.version,
17
17
  title: meta.title,
18
18
  description: meta.description,
19
- screens: Object.entries(manifest.screens ?? {}).filter(([, s]) => s.enabled === true).map(([name]) => name)
19
+ screens: Object.entries(manifest.screens ?? {}).filter(([, s]) => s.enabled === true).map(([name]) => name),
20
+ ...(meta.next === undefined ? {} : {
21
+ next: meta.next
22
+ })
20
23
  };
21
24
  }).sort((a, b) => a.name.localeCompare(b.name));
22
25
  }
@@ -136,6 +136,9 @@ function hostPage(opts) {
136
136
  // 주소로 보기 · 폭을 고른다 (?view=edit&width=360px). ecdk dev --check가 쓰고, 사람이 북마크로 써도 된다
137
137
  const query = new URLSearchParams(location.search);
138
138
  if (query.get('view')) current = query.get('view');
139
+ // 콘텐츠 주소로 넘기는 값: ?entryWorkspace=<출처> (엔트리 템플릿 core/workspace.js가 로컬에서만 읽는 워크스페이스 주소,
140
+ // 예: https://entry-workspace.elice.io). 콘텐츠는 이 페이지의 iframe이라 넘기지 않으면 템플릿이 볼 수 없다
141
+ const FORWARD = query.get('entryWorkspace') ? 'entryWorkspace=' + encodeURIComponent(query.get('entryWorkspace')) + '&' : '';
139
142
  // ecdk dev --check가 읽는 기록: 이번에 연 콘텐츠의 막힌 외부 요청
140
143
  window.__ECDK_HOST__ = { blocked: [] };
141
144
 
@@ -159,11 +162,11 @@ function hostPage(opts) {
159
162
  previewEl.setAttribute('aria-pressed', String(scenario === PREVIEW[0]));
160
163
  editDraftEl.setAttribute('aria-pressed', String(scenario === EDIT_DRAFT[0]));
161
164
  for (const b of document.querySelectorAll('[data-tool]')) b.setAttribute('aria-pressed', String(b.dataset.tool === scenario));
162
- document.getElementById('open-next-student').href = '?view=' + (NEXT_STUDENT[scenario] ?? 'student:2');
165
+ document.getElementById('open-next-student').href = '?' + FORWARD + 'view=' + (NEXT_STUDENT[scenario] ?? 'student:2');
163
166
  const [, label, screen, fragment, extra, tokenScenario = scenario] = scenarioOf(scenario);
164
167
  const entry = entryOf(screen);
165
168
  // 같은 파일이면 해시만 바뀌어 다시 로드되지 않으므로 매번 쿼리를 바꾼다
166
- const url = state.contentBase + entry + '?ecdk=' + Date.now();
169
+ const url = state.contentBase + entry + '?' + FORWARD + 'ecdk=' + Date.now();
167
170
  if (fragment === 'token') {
168
171
  const { token } = await (await fetch('/__ecdk/token?scenario=' + tokenScenario)).json();
169
172
  frame.src = url + '#token=' + token + (extra ? '&' + extra : '') + '&baseUrl=' + BASE_URL;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eliceio/cdk-cli",
3
- "version": "1.7.2-sharedqa.0",
3
+ "version": "1.8.1-qa.0",
4
4
  "description": "교육자용 Custom HTML 콘텐츠 CLI",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -47,7 +47,7 @@
47
47
  "rollup": "4.62.4",
48
48
  "tslib": "2.8.1",
49
49
  "typescript": "6.0.3",
50
- "@eliceio/cdk": "^1.7.2-sharedqa.0"
50
+ "@eliceio/cdk": "^1.8.1-qa.0"
51
51
  },
52
52
  "scripts": {
53
53
  "prebuild": "del-cli \"buildcache/*\" \"es/*\"",
@@ -1,7 +1,7 @@
1
1
  ## Always
2
2
 
3
3
  - **Never ask for, store or send a learner's personal data (name, phone number, email, address, date of birth, student number, resident registration number, bank account, face photo, location, or anything else that identifies a person): not in a submission (`submit` · `useSubmit`), `kvstore`, `saveSettings` (`useSave`), a file upload (`assets`) or an AI call (`mlapi`). If the request needs it, ask the person before you build.** Why and what to use instead: `references/02-design-the-material.md` "Personal data".
4
- - Answer the person in their language. The reference files are in English: `references/` next to this SKILL.md, read only the ones you need with the Read tool: 00 what the person decides · 01 environment · 02 design · 03 create the project · 04 sandbox rules · 05 screen code and kit API · 06 quiz template · 07 move existing HTML · 08 error ids · 09 check · 10 build and report · 11 more · 12 upload · 13 edit screen design · 14 layouts and stepper · 15 edit settings by hand · 16 survey template · 17 Entry template.
4
+ - Answer the person in their language. The reference files are in English: `references/` next to this SKILL.md, read only the ones you need with the Read tool: 00 what the person decides · 01 environment · 02 design · 03 create the project · 04 sandbox rules · 05 screen code and kit API · 06 quiz template · 07 move existing HTML · 08 error ids · 09 check · 10 build and report · 11 more · 12 upload · 13 edit screen design · 14 layouts and stepper · 15 edit settings by hand · 16 survey template · 17 Entry template · 18 lesson template (the default learning material) · 19 lesson layouts.
5
5
  - Never put correct answers in the content zip. The edit screen saves them to `settings.grading` (locally `.ecdk/settings.json` from `ecdk dev`, which stays local unless the person agrees to send it with the upload, `references/12-upload-with-the-material-mcp.md`).
6
6
  - The completion policy is not in the project or the zip: it is a setting of the LXP page. Say which one fits (`references/02-design-the-material.md` ②); the elice-content-publish skill sets it with the upload after the person agrees (`on_graded` only with grading saved), otherwise the instructor picks it in the '설정' panel at the top of the LXP edit page. Only `on_graded` grades: `on_submit` completes on any submission without grading (`is_correct: null`, the kit shows "제출했어요."), `on_access` completes on open.
7
7
  - The content runs in a sandboxed iframe on its own origin: use the SDK (`app.useSubmit`, `app.useSave`) for anything that must be kept (storage and cookies stay only in that browser), and in-page UI instead of `alert`/`confirm`, new windows, the parent window or external requests.
@@ -15,15 +15,16 @@ Read or watch / change values and observe (simulation, visualization) / follow s
15
15
 
16
16
  **② Submission and grading** (the completion policy is a setting of the LXP page, not in the package, ADR 0012; since 2026-11-12 the publish skill sets it with the upload after the person agrees, otherwise the instructor picks it in the '설정' panel at the top of the LXP edit page. The grading settings `settings.grading` hold the grader `type` and its answers)
17
17
 
18
- | Material | Policy to propose (LXP setting) | Grading (`type`) | Student screen |
19
- | ----------------------------------------------------------- | ----------------------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
20
- | Something to read or watch, such as a simulation | `on_access` (done on open) | - | No submission |
21
- | A survey (decided 2026-11-25; may change) | `on_access` (done on open) | - | Submit the answers with `useSubmit` (the survey template, [16](16-using-the-survey-template.md)); submissions are still recorded |
22
- | Done when the activity ends (results, self-check) | `on_submit` (done on submit) | - | Submit the result with `useSubmit` |
23
- | One correct answer or one set of answers | `on_graded` (done when it passes) | `pattern` (one regex) | `useSubmit` |
24
- | Several questions with a score per question (partial score) | `on_graded` | `partial_pattern` | `useSubmit` with a string array |
25
- | Writing or assignments graded against a rubric (AI grading) | `on_graded` | `rubric` (the criteria) | `useSubmit`, the score comes back at once |
26
- | Block coding in Entry (the Entry template) | `on_graded` (`on_submit` without grading) | `entry` (general or AI) | The template submits the project ([17](17-using-the-entry-template.md)) |
18
+ | Material | Policy to propose (LXP setting) | Grading (`type`) | Student screen |
19
+ | ------------------------------------------------------------------------------------------------ | ----------------------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
20
+ | Something to read or watch, such as a simulation | `on_access` (done on open) | - | No submission |
21
+ | A lesson-template learning material (the lesson template, [18](18-using-the-lesson-template.md)) | `on_access` (done on open) | - | No submission; its quizzes are self-check on the page |
22
+ | A survey (decided 2026-11-25; may change) | `on_access` (done on open) | - | Submit the answers with `useSubmit` (the survey template, [16](16-using-the-survey-template.md)); submissions are still recorded |
23
+ | Done when the activity ends (results, self-check) | `on_submit` (done on submit) | - | Submit the result with `useSubmit` |
24
+ | One correct answer or one set of answers | `on_graded` (done when it passes) | `pattern` (one regex) | `useSubmit` |
25
+ | Several questions with a score per question (partial score) | `on_graded` | `partial_pattern` | `useSubmit` with a string array |
26
+ | Writing or assignments graded against a rubric (AI grading) | `on_graded` | `rubric` (the criteria) | `useSubmit`, the score comes back at once |
27
+ | Block coding in Entry (the Entry template) | `on_graded` (`on_submit` without grading) | `entry` (general or AI) | The template submits the project ([17](17-using-the-entry-template.md)) |
27
28
 
28
29
  > **Personal data: never collect it.** A material never asks for, stores or sends a learner's personal data: name, phone number, email, address, date of birth, student number, resident registration number, bank account, face photo, location, or anything else that identifies a person. Not in a submission (`useSubmit` · `submit`), `kvstore`, the content the edit screen saves (`useSave` · `saveSettings`), a file upload (`assets`) or an AI call (`mlapi`).
29
30
  >
@@ -2,17 +2,18 @@
2
2
 
3
3
  Run `ecdk create --list` first: it prints each template with its own version (`quiz@1.5.0`), what it is for and its screens. Pick the template from that list. `ecdk create` records the template and version in `package.json` `"ecdk"` (`template`), `ecdk build` copies it to `metadata.json` `build.template`, and `ecdk doctor` says when the installed ecdk ships a newer version of that template (nothing changes on its own).
4
4
 
5
- | Case | Start with |
6
- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
7
- | A quiz (up to 20 questions per quiz material) | `ecdk create <folder>` (quiz template: starts with no question; the edit screen adds questions of any of the five types with "+ 문제 추가"; answers set on the edit screen; `pattern` or `partial_pattern` grading, `on_graded` picked in LXP) |
8
- | A survey (course feedback: scale, single or multiple choice with "other", free text; no answers or grading) | `ecdk create <folder> --template survey` (edit screen builds the questions; the student submits and sees a thank-you screen, reopening shows it and lets them change the answers; no instructor screen; no `grading`; suggest `on_access` (decided 2026-11-25; may change); then [16](16-using-the-survey-template.md)) |
9
- | Any other material | `ecdk create <folder> --template blank` (three screens with a small example to replace, "예측하고 확인하기", and the kit content editor on the edit screen: see 5) |
10
- | A material in several steps (intro → experiment → summary, slides) | `ecdk create <folder> --template steps` (kit stepper `app.useStepper` and a different content layout per step, example "진자의 주기", content editor on the edit screen: see [14](14-layouts.md)) |
11
- | One document to read (PDF or PPTX, completion on opening) | `ecdk create <folder> --template document` (the edit screen uploads a `.pdf` or `.pptx` and edits PPTX slide text in place; the student screen pages through it; `on_access` picked in LXP; `.ppt` · `.pps` · `.ppsx` must be saved as `.pptx` or `.pdf` first; in `ecdk dev` the file stays in `.ecdk/assets/`; for a page on LXP upload it with the MCP `create_asset_upload`, [12](12-upload-with-the-material-mcp.md) "Images and documents") |
12
- | Block coding or Entry Python practice in Entry, AI blocks included | `ecdk create <folder> --template entry` (the Entry workspace in an iframe, so it works only where the server's content CSP allows the workspace; the person builds the start and answer projects on the edit screen; general or AI grading; then [17](17-using-the-entry-template.md)) |
13
- | A dark screen | Add `--theme dark` to the above |
14
- | A problem description | Create with blank, set `metadata.json` to `{ "kind": "description", "screens": { "learn": { "enabled": true, "entry": "index.html" } }, "commentary": "commentary.txt" }`, delete the other screen files |
15
- | An existing HTML page | [7. Move existing HTML](07-move-existing-html.md) |
5
+ | Case | Start with |
6
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
7
+ | A quiz (up to 20 questions per quiz material) | `ecdk create <folder>` (quiz template: starts with no question; the edit screen adds questions of any of the five types with "+ 문제 추가"; answers set on the edit screen; `pattern` or `partial_pattern` grading, `on_graded` picked in LXP) |
8
+ | A survey (course feedback: scale, single or multiple choice with "other", free text; no answers or grading) | `ecdk create <folder> --template survey` (edit screen builds the questions; the student submits and sees a thank-you screen, reopening shows it and lets them change the answers; no instructor screen; no `grading`; suggest `on_access` (decided 2026-11-25; may change); then [16](16-using-the-survey-template.md)) |
9
+ | A learning material to read and practice (explanation, guided practice, workshop, self-check) when the person gives no screen layout: **the default** for anything that is not a type template above or below | `ecdk create <folder> --template lesson` (39 fixed page layouts in the designer's style; you write only the content `{ meta, slides }` and the edit screen checks it; quizzes are self-check, no grading; suggest `on_access`; then [18](18-using-the-lesson-template.md) and [19](19-lesson-layouts.md)) |
10
+ | The person designs the screens, or an interaction the lesson layouts cannot do (live simulation, game, custom visualization) | `ecdk create <folder> --template blank` (three screens with a small example to replace, "예측하고 확인하기", and the kit content editor on the edit screen: see 5) |
11
+ | A material in several steps (intro → experiment → summary, slides) | `ecdk create <folder> --template steps` (kit stepper `app.useStepper` and a different content layout per step, example "진자의 주기", content editor on the edit screen: see [14](14-layouts.md)) |
12
+ | One document to read (PDF or PPTX, completion on opening) | `ecdk create <folder> --template document` (the edit screen uploads a `.pdf` or `.pptx` and edits PPTX slide text in place; the student screen pages through it; `on_access` picked in LXP; `.ppt` · `.pps` · `.ppsx` must be saved as `.pptx` or `.pdf` first; in `ecdk dev` the file stays in `.ecdk/assets/`; for a page on LXP upload it with the MCP `create_asset_upload`, [12](12-upload-with-the-material-mcp.md) "Images and documents") |
13
+ | Block coding or Entry Python practice in Entry, AI blocks included | `ecdk create <folder> --template entry` (the Entry workspace in an iframe, so it works only where the server's content CSP allows the workspace; the person builds the start and answer projects on the edit screen; general or AI grading; then [17](17-using-the-entry-template.md)) |
14
+ | A dark screen | Add `--theme dark` to the above |
15
+ | A problem description | Create with blank, set `metadata.json` to `{ "kind": "description", "screens": { "learn": { "enabled": true, "entry": "index.html" } }, "commentary": "commentary.txt" }`, delete the other screen files |
16
+ | An existing HTML page | [7. Move existing HTML](07-move-existing-html.md) |
16
17
 
17
18
  `create` refuses a folder that is not empty. Use a new subfolder. It then runs `npm install` in the project (the SDK `@eliceio/cdk` comes from npm through `package.json`; `--no-install` skips it). When the install fails, the project stays: run `npm install` in it (network or proxy problem; tell the user).
18
19
 
@@ -26,6 +26,7 @@ Read `check.issues[]` (`id` · `level` · `path` · `line` · `message`) from `e
26
26
  | `project.deps` (doctor) · "@eliceio/cdk 패키지를 찾지 못했습니다" | The SDK package is not installed in the project: run `npm install` in the project, then build again |
27
27
  | `project.grading` (doctor) | The saved `.ecdk/settings.json` `grading` breaks the server's save rules or does not match the public `gradingType`. Have the person open the edit view in `ecdk dev`, fix the marked field (points, answers) and save again; if you edited the file by hand, correct those values ([15](15-edit-settings-by-hand.md)). Never delete the file: the content goes with it. It warns when the settings hold AI evaluation config (`criteria` · `apiId`) but no `grading`: save a `rubric` with the edit screen's `getGrading` ([5](05-screen-code.md) "AI grading") |
28
28
  | `project.quiz` (doctor, quiz template) | The saved questions, answers or points do not pass the quiz edit screen's own checks (run with the project's `core/model.js`): answers or scores left in the old question order, `points` ≠ `scores`, an answer pointing at a deleted option, a missing `gradingType`, a regex the edit screen cannot read (a text answer in the wrong shape for the project's template version), quiz 1.10.0+: a regex answer not in the stored shape or with a blocked syntax, an answer regex over 500 characters, `answerFormat` · `requires` · `answerMode` the project's template does not know, text answers that look as typed (or a regex question) but `answerFormat` is missing, `answerFormat` 2 with URL-encoded text answers (saved again by a 1.9.x edit screen) - for these two, students typing 한글, spaces or `%` are marked wrong: have the person press "초안으로 저장" once in the edit view and the answers are saved again in the right shape. A warning (`warn`): tags written in snake_case (`answer_format` · `answer_mode`). Fix as [15](15-edit-settings-by-hand.md) says, run `ecdk doctor` again, then have the person save once in the edit view ("초안으로 저장") |
29
+ | `project.lesson` (doctor, lesson template) | The saved slides do not pass the lesson edit screen's checks (run with the project's `core/lesson.js`). Errors: a missing required slot, a list with too few or too many items, a value outside the allowed list, an unknown layout, a quiz `answer` that is not an option number (`ox-*`: not `O`/`X`), an external image URL (the content CSP blocks it) or an image file missing from `public/`, a wrong `meta` value. Warnings: over the character limit, writing style, the same layout three times in a row, an empty image place. Fix as [18](18-using-the-lesson-template.md) and [19](19-lesson-layouts.md) say (shorten or split a page, never shrink the font), run `ecdk doctor` again, then have the person save once in the edit view |
29
30
  | `build.template-unknown` (warn) | The material was made with a template or template version this ecdk does not know. Update ecdk (`npm i -g @eliceio/cdk-cli`) or check `template` in `package.json` `"ecdk"` |
30
31
  | `manifest.*` · `entry.*` | Check `screens` and `kind` in `metadata.json` |
31
32
  | `limit.*` · `file.large-image` | Shrink images (longest side 2048px, WebP 85, [6](06-using-the-quiz-template.md) "Adding images") and video, drop unused files (build output: "files not referenced anywhere") |
@@ -58,13 +58,13 @@ Next time, read it, confirm the page with the person as above (기관 · 과목
58
58
  - **Merge, then show.** `settings` replaces the whole object: start from the page's current settings (`get_material`, or `get_draft` before the first save), keep every `asset:` reference already there exactly as it is, add the new keys, and write the result to `.ecdk/settings.json` as well. Before saving, show the person which file goes where (question number or the document, file name, size after shrinking, alt text) and wait for a yes. The draft preview does not show these settings before the save, and `ecdk dev` cannot show a server file: check on the LXP page after saving.
59
59
  - **Nothing changes until a save.** An uploaded file that no saved settings point at is unused; there is no MCP tool to delete it. If the person says no, do not save.
60
60
 
61
- **Fallback (the server has no `settings`, the person said no, or there is no file)**: upload the zip only, without content or `grading`, and without `on_graded` (see "Completion policy"). After saving, tell the person to open the LXP edit page, enter the content and answers on the edit screen (`settings`, with `settings.grading` for `on_graded`) and save with the edit screen's own button (the quiz template: "초안으로 저장"). That saves to the draft; learners see it only after '수업 자료에 반영' at the top of the LXP edit page.
61
+ **Fallback (the server has no `settings`, the person said no, or there is no file)**: upload the zip only, without content or `grading`, and without `on_graded` (see "Completion policy"). After saving, tell the person to open the LXP edit page, enter the content and answers on the edit screen (`settings`, with `settings.grading` for `on_graded`) and save with the edit screen's own button (the quiz template: "초안으로 저장"). That saves to the draft; learners see it only after '수업 자료에 반영' at the top of the LXP edit page. The Entry template always ends here when no person saved its edit view (never write its settings yourself), and that to-do goes in the final report ([17](17-using-the-entry-template.md) "Runs without a person").
62
62
 
63
63
  **Uploading a zip by hand in LXP**: on the LXP edit page, ⋮ › '다른 파일로 변경', pick the zip, then '수업 자료에 반영'.
64
64
 
65
65
  **Completion policy** (2026-11-12: the upload can set it)
66
66
 
67
- The completion policy is not in the project or the zip (ADR 0012): it is a setting of the LXP page, independent of versions, and it applies as soon as it is set. The publish skill proposes one and sets it with the save after the person agrees, when the save tool takes it. Detect support like `settings`: use `completion_policy` only when the input schema of `save_draft` (or `update_material`) lists it in `payload`. If no tool has it, tell the person after saving which one to pick in the '설정' panel opened from the top of the LXP edit page (choosing applies at once). The templates carry a default that the server sets when the template is applied to a page that has never been saved (quiz `on_graded`; survey, document and video `on_access`); a saved page keeps its policy, so still check `get_material` and propose as below.
67
+ The completion policy is not in the project or the zip (ADR 0012): it is a setting of the LXP page, independent of versions, and it applies as soon as it is set. The publish skill proposes one and sets it with the save after the person agrees, when the save tool takes it. Detect support like `settings`: use `completion_policy` only when the input schema of `save_draft` (or `update_material`) lists it in `payload`. If no tool has it, tell the person after saving which one to pick in the '설정' panel opened from the top of the LXP edit page (choosing applies at once). The templates carry a default that the server sets when the template is applied to a page that has never been saved (quiz and Entry `on_graded`; survey, document, video and board `on_access`); a saved page keeps its policy, so still check `get_material` and propose as below.
68
68
 
69
69
  | The material | Propose |
70
70
  | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |