@eliceio/cdk-cli 1.7.1 → 1.8.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 (127) 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/es/dev/learner-files.d.ts +1 -1
  12. package/es/dev/learner-files.js +7 -4
  13. package/es/dev/learner-shares.d.ts +90 -0
  14. package/es/dev/learner-shares.js +282 -0
  15. package/es/dev/mock-api.d.ts +28 -0
  16. package/es/dev/mock-api.js +32 -1
  17. package/es/dev/server.d.ts +3 -0
  18. package/es/dev/server.js +22 -1
  19. package/package.json +2 -2
  20. package/skills/_shared/always.md +1 -1
  21. package/skills/_shared/references/02-design-the-material.md +10 -9
  22. package/skills/_shared/references/03-create-the-project.md +12 -11
  23. package/skills/_shared/references/05-screen-code.md +1 -0
  24. package/skills/_shared/references/08-fix-check-errors.md +1 -0
  25. package/skills/_shared/references/12-upload-with-the-material-mcp.md +2 -2
  26. package/skills/_shared/references/17-using-the-entry-template.md +44 -5
  27. package/skills/_shared/references/18-using-the-lesson-template.md +207 -0
  28. package/skills/_shared/references/19-lesson-layouts.md +2132 -0
  29. package/skills/elice-content-create/SKILL.md +4 -3
  30. package/skills/elice-content-publish/SKILL.md +3 -3
  31. package/templates/_shared/lib/cdk-mock.d.ts +16 -0
  32. package/templates/_shared/lib/cdk-mock.js +49 -0
  33. package/templates/blank/template.json +1 -1
  34. package/templates/board/README.md +15 -7
  35. package/templates/board/core/board.d.ts +13 -0
  36. package/templates/board/core/board.js +11 -1
  37. package/templates/board/core/files.d.ts +40 -0
  38. package/templates/board/core/files.js +176 -0
  39. package/templates/board/core/model.d.ts +5 -0
  40. package/templates/board/core/model.js +24 -7
  41. package/templates/board/core/settings.d.ts +2 -0
  42. package/templates/board/core/settings.js +12 -1
  43. package/templates/board/package.json +1 -1
  44. package/templates/board/screens/board.js +58 -0
  45. package/templates/board/screens/edit.js +36 -1
  46. package/templates/board/template.json +1 -1
  47. package/templates/board/ui/board.css +176 -0
  48. package/templates/board/ui/card.js +74 -1
  49. package/templates/board/ui/composer.js +169 -20
  50. package/templates/board/ui/icons.js +2 -0
  51. package/templates/board/ui/texts.js +30 -2
  52. package/templates/lesson/README.md +71 -0
  53. package/templates/lesson/commentary.txt +7 -0
  54. package/templates/lesson/core/dom.d.ts +4 -0
  55. package/templates/lesson/core/dom.js +22 -0
  56. package/templates/lesson/core/engine.d.ts +23 -0
  57. package/templates/lesson/core/engine.js +169 -0
  58. package/templates/lesson/core/interact.d.ts +2 -0
  59. package/templates/lesson/core/interact.js +429 -0
  60. package/templates/lesson/core/layout-files.d.ts +4 -0
  61. package/templates/lesson/core/layout-files.js +9 -0
  62. package/templates/lesson/core/lesson.d.ts +95 -0
  63. package/templates/lesson/core/lesson.js +609 -0
  64. package/templates/lesson/core/sample.d.ts +4 -0
  65. package/templates/lesson/core/sample.js +128 -0
  66. package/templates/lesson/edit.html +21 -0
  67. package/templates/lesson/gitignore +4 -0
  68. package/templates/lesson/index.html +22 -0
  69. package/templates/lesson/layouts/_actions.html +1 -0
  70. package/templates/lesson/layouts/_cmp.html +1 -0
  71. package/templates/lesson/layouts/_deco-corner.html +1 -0
  72. package/templates/lesson/layouts/_deco-cover.html +1 -0
  73. package/templates/lesson/layouts/_deco-section.html +1 -0
  74. package/templates/lesson/layouts/_foot.html +1 -0
  75. package/templates/lesson/layouts/_head.html +1 -0
  76. package/templates/lesson/layouts/_media.html +1 -0
  77. package/templates/lesson/layouts/agenda.html +13 -0
  78. package/templates/lesson/layouts/bar-chart.html +14 -0
  79. package/templates/lesson/layouts/cards.html +12 -0
  80. package/templates/lesson/layouts/checklist.html +12 -0
  81. package/templates/lesson/layouts/choice-list.html +13 -0
  82. package/templates/lesson/layouts/closing.html +13 -0
  83. package/templates/lesson/layouts/compare.html +12 -0
  84. package/templates/lesson/layouts/cover-dark.html +13 -0
  85. package/templates/lesson/layouts/cover.html +15 -0
  86. package/templates/lesson/layouts/figures.html +12 -0
  87. package/templates/lesson/layouts/flow.html +13 -0
  88. package/templates/lesson/layouts/how-to.html +15 -0
  89. package/templates/lesson/layouts/image-bg.html +12 -0
  90. package/templates/lesson/layouts/image-pair.html +15 -0
  91. package/templates/lesson/layouts/image-split.html +12 -0
  92. package/templates/lesson/layouts/layers.html +12 -0
  93. package/templates/lesson/layouts/objectives.html +12 -0
  94. package/templates/lesson/layouts/ox-card.html +24 -0
  95. package/templates/lesson/layouts/ox-list.html +21 -0
  96. package/templates/lesson/layouts/process.html +14 -0
  97. package/templates/lesson/layouts/profile.html +13 -0
  98. package/templates/lesson/layouts/prompt-builder.html +18 -0
  99. package/templates/lesson/layouts/quiz.html +14 -0
  100. package/templates/lesson/layouts/quote.html +12 -0
  101. package/templates/lesson/layouts/scenario-rows.html +12 -0
  102. package/templates/lesson/layouts/section.html +14 -0
  103. package/templates/lesson/layouts/simulation.html +18 -0
  104. package/templates/lesson/layouts/stat.html +14 -0
  105. package/templates/lesson/layouts/statement.html +13 -0
  106. package/templates/lesson/layouts/stats.html +12 -0
  107. package/templates/lesson/layouts/stepper.html +13 -0
  108. package/templates/lesson/layouts/table.html +12 -0
  109. package/templates/lesson/layouts/tabs.html +13 -0
  110. package/templates/lesson/layouts/text-visual.html +16 -0
  111. package/templates/lesson/layouts/timeline.html +12 -0
  112. package/templates/lesson/layouts/toggle.html +16 -0
  113. package/templates/lesson/layouts/variables.html +14 -0
  114. package/templates/lesson/layouts/venn.html +15 -0
  115. package/templates/lesson/layouts/versus.html +12 -0
  116. package/templates/lesson/metadata.json +9 -0
  117. package/templates/lesson/package.json +15 -0
  118. package/templates/lesson/public/img/sample-chat.svg +21 -0
  119. package/templates/lesson/screens/edit.js +79 -0
  120. package/templates/lesson/screens/learn.js +56 -0
  121. package/templates/lesson/styles.css +27 -0
  122. package/templates/lesson/template.json +7 -0
  123. package/templates/lesson/ui/design.css +1103 -0
  124. package/templates/lesson/ui/fonts/PretendardVariable.woff2 +0 -0
  125. package/templates/lesson/ui/learn.css +64 -0
  126. package/templates/lesson/ui/mobile.css +492 -0
  127. package/templates/lesson/ui/reset.css +6 -0
@@ -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
  | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
@@ -1,13 +1,16 @@
1
1
  # 17. Using the Entry template
2
2
 
3
- - **When to use it**: block coding or Entry Python practice in Entry (엔트리), including the AI blocks (인공지능 › 모델 학습하기). Create it with `ecdk create <folder> --template entry`. It is not in the LXP material type list, so make it with `ecdk create` and upload the zip. It has a student screen and an edit screen, and **no instructor screen** (`screens.instructor.enabled: false`): instructors get the student screen.
3
+ - **When to use it**: block coding or Entry Python practice in Entry (엔트리), including the AI blocks (인공지능 › 모델 학습하기). Create it with `ecdk create <folder> --template entry`. LXP also lists it as a material type ("엔트리", from `catalog` in `template.json`); with ecdk, make it with `ecdk create` and upload the zip. It has a student screen and an edit screen, and **no instructor screen** (`screens.instructor.enabled: false`): instructors get the student screen.
4
4
  - **It needs the server to allow the workspace.** The screens show the Entry workspace in an `<iframe>` from another origin (`https://entry-workspace.elice.io`). The content CSP blocks it unless the server's content CSP lists that origin in `frame-src`; where it does not, the workspace area shows "엔트리를 열 수 없습니다." and nothing else works. Tell the person this before you build. Object pictures in the AI criteria rows stay empty for the same reason (`img-src`).
5
5
  - **The inside of the workspace is not yours.** Blocks, menus and the stage come from the workspace. The project can change only the screen around it (`ui/`, `styles.css`, `screens/`) and what it passes in (the projects and the language). Hiding blocks or adding a workspace option needs a change in the workspace itself: tell the person it is a feature request. Do not edit `core/` (Always).
6
6
 
7
7
  **Who makes what**
8
8
 
9
- - **The start project and the answer project are Entry project JSON. Never write or change them yourself**, not in code and not in `.ecdk/settings.json`. The person builds them with blocks and objects in the workspace on the edit screen (the content edit view in `ecdk dev`, or the LXP edit screen after the upload) and presses "초안으로 저장".
10
- - **You draft the words around them**: `commentary.txt` (what to make, blocks that must be used, when it is done; no answers, learners can read it), AI grading criteria and scores, and the completion policy. Give the criteria to the person as text to type in: each row belongs to an object of the answer project, so it can be filled in only after that project exists. Write them as one check each, like the edit screen's examples ("시작하면 x좌표를 100 이동하는가?").
9
+ - **The start project and the answer project are Entry project JSON. Never write or change them yourself**, not in code and not in `.ecdk/settings.json`, also not by copying a project from another material into settings. The person builds them with blocks and objects in the workspace on the edit screen (the content edit view in `ecdk dev`, or the LXP edit screen after the upload) and presses "초안으로 저장". `settings.grading` holds the answer project, so it comes only from that save too.
10
+ - **Runs without a person at the edit screen** (Helpy and other agents that finish on their own, or a person who leaves it to you): the rule above still holds. Do not write the projects to get a complete upload: upload the zip without `settings` (12 "Fallback"), and **always put this in the final report and in its remaining to-dos**, in the person's language: "LXP 편집 화면을 열어 '시작 화면' 탭에서 시작 작품을, '채점 화면' 탭에서 정답 작품을 만들고, '설정' 탭에서 채점 방식(일반 채점 · AI 채점)과 AI 채점 기준을 정한 뒤 '초안으로 저장'하고, 위쪽 '수업 자료에 반영'을 누르세요." Add the AI criteria you drafted as text to type in. Until that save, learners see "학습 자료를 준비하고 있어요" instead of the workspace, and nothing can be graded. Never report such a material as finished.
11
+ - **Completion policy with grading is `on_graded`** ("답안 확인 후 완료"). It can be sent only with `settings.grading` (or once the page has it), so in a run without a person: send no policy, or `on_submit` only if the person asked for submit-only; and add to the to-dos "채점을 저장한 뒤 LXP 편집 페이지 위쪽 '설정' 패널에서 '답안 확인 후 완료'를 고르세요" (check the page's current policy with `get_material`; see "Completion policy" below).
12
+ - **You draft the words around them**: `commentary.txt` (what to make, blocks that must be used, when it is done; no answers, learners can read it), AI grading criteria and scores, and the completion policy. Give the criteria to the person as text to type in: each row belongs to an object of the answer project, so it can be filled in only after that project exists. Write them as one check each, like the edit screen's examples ("시작하면 x좌표를 100 이동하는가?"). Name blocks and objects with Entry's own words ("Block names" below).
13
+ - **Bringing in an existing project**: the workspace header on the edit screen has "작품 불러오기": it opens an Entry project file (`.ent`, as saved by Entry's "다운로드하기" or "내 컴퓨터에 저장하기") into that tab. To reuse a project (another Entry material, playentry.org, Entry offline), the person saves it as `.ent` there, opens it with "작품 불러오기" in the "시작 화면" or "채점 화면" tab and presses "초안으로 저장"; the edit screen's checks run as for a hand-built project. A bare project JSON file is not accepted ("불러오기에 실패하였습니다"). "다운로드하기" inside a material works only where LXP gives the material iframe `allow-downloads`; if nothing downloads, take the file from the original Entry service instead. You never make the `.ent` or its JSON for them.
11
14
  - The student screen shows only the workspace and its bottom bar; there is no text area for the task. If learners must read the task on screen, suggest a problem description page before this one ([3](03-create-the-project.md), `kind: description`), or that the person writes it into the start project (for example a text box object).
12
15
 
13
16
  **The edit screen**
@@ -45,7 +48,43 @@ Three tabs at the top, and a save bar at the bottom ("초안으로 저장"; noth
45
48
 
46
49
  Other settings keys are kept when the edit screen saves.
47
50
 
48
- **Completion policy** (12 "Completion policy"): graded → `on_graded` ("답안 확인 후 완료"), only with `settings.grading` saved; without it every submission scores 0 and never completes. Submit only, no grading → `on_submit`. This template has no default policy on the server, so propose one with the upload.
51
+ **Completion policy** (12 "Completion policy"): graded → `on_graded` ("답안 확인 후 완료"), only with `settings.grading` saved; without it every submission scores 0 and never completes. Submit only, no grading → `on_submit`. The template's `catalog.defaultCompletionPolicy` is `on_graded`: the server sets it when the '엔트리' type is applied to a page that was never saved. A page made otherwise (a zip upload to a new or existing page) keeps its own policy, so read it with `get_material` and propose `on_graded` with the upload when grading goes with it, or in the to-dos when the person saves grading later.
52
+
53
+ **Block names** (Entry, not Scratch: Entry calls a sprite an **오브젝트**, so never write "스프라이트" or Scratch block names such as 「스프라이트를 클릭했을 때」). Use these names in `commentary.txt` and AI criteria. The type is what a project JSON holds; it helps only to read a project the person made, never to write one. Names and types are from the public entryjs source (Apache-2.0, `src/playground/blocks/block_*.js` and `extern/lang/ko.js`):
54
+
55
+ | Category | Block (Korean name) | Type |
56
+ | -------- | --------------------------------------------------- | ----------------------------------- |
57
+ | 시작 | 시작하기 버튼을 클릭했을 때 | `when_run_button_click` |
58
+ | 시작 | ( ) 키를 눌렀을 때 | `when_some_key_pressed` |
59
+ | 시작 | 마우스를 클릭했을 때 | `mouse_clicked` |
60
+ | 시작 | 오브젝트를 클릭했을 때 | `when_object_click` |
61
+ | 시작 | ( ) 신호를 받았을 때 | `when_message_cast` |
62
+ | 시작 | ( ) 신호 보내기 | `message_cast` |
63
+ | 시작 | 장면이 시작되었을 때 | `when_scene_start` |
64
+ | 흐름 | ( ) 초 기다리기 | `wait_second` |
65
+ | 흐름 | ( ) 번 반복하기 | `repeat_basic` |
66
+ | 흐름 | 계속 반복하기 | `repeat_inf` |
67
+ | 흐름 | ( )이 될 때까지 / 인 동안 반복하기 | `repeat_while_true` |
68
+ | 흐름 | 만일 ( )(이)라면 | `_if` |
69
+ | 흐름 | 만일 ( )(이)라면 … 아니면 | `if_else` |
70
+ | 흐름 | ( ) 코드 멈추기 | `stop_object` |
71
+ | 흐름 | ( )의 복제본 만들기 · 복제본이 처음 생성되었을 때 | `create_clone` · `when_clone_start` |
72
+ | 움직임 | 이동 방향으로 ( ) 만큼 움직이기 | `move_direction` |
73
+ | 움직임 | x 좌표를 ( ) 만큼 바꾸기 · y 좌표를 ( ) 만큼 바꾸기 | `move_x` · `move_y` |
74
+ | 움직임 | x: ( ) y: ( ) 위치로 이동하기 | `locate_xy` |
75
+ | 움직임 | ( ) 위치로 이동하기 | `locate` |
76
+ | 움직임 | 방향을 ( ) 만큼 회전하기 | `rotate_relative` |
77
+ | 생김새 | ( )을(를) 말하기 · 생각하기 | `dialog` (option `speak` · `think`) |
78
+ | 생김새 | ( )을(를) ( ) 초 동안 말하기 | `dialog_time` |
79
+ | 생김새 | 모양 보이기 · 모양 숨기기 | `show` · `hide` |
80
+ | 생김새 | 다음 · 이전 모양으로 바꾸기 | `change_to_next_shape` |
81
+ | 소리 | 소리 ( ) 재생하기 | `sound_something_with_block` |
82
+ | 판단 | ( ) 키가 눌러져 있는가? | `is_press_some_key` |
83
+ | 판단 | ( )에 닿았는가? | `reach_something` |
84
+ | 계산 | ( )부터 ( ) 사이의 무작위 수 | `calc_rand` |
85
+ | 자료 | ( )를 ( )(으)로 정하기 · ( )에 ( ) 만큼 더하기 | `set_variable` · `change_variable` |
86
+
87
+ A task like "엔트리봇을 클릭하면 앞으로 움직이고 '안녕!'이라고 말하게" starts with 「오브젝트를 클릭했을 때」 (`when_object_click`), not 「시작하기 버튼을 클릭했을 때」.
49
88
 
50
89
  **The student screen**
51
90
 
@@ -56,6 +95,6 @@ Other settings keys are kept when the edit screen saves.
56
95
 
57
96
  **Checking it in `ecdk dev`**
58
97
 
59
- - It needs an Entry workspace running at `http://localhost:9000`; ecdk does not include one (the template README, "로컬에서 확인"). `ecdk dev` adds that origin to its CSP. Without it the workspace area shows "엔트리를 불러오지 못했습니다." after a wait.
98
+ - By default it looks for an Entry workspace at `http://localhost:9000`, which ecdk does not include (the template README, "로컬에서 확인"); without it the workspace area shows "엔트리를 불러오지 못했습니다." after a wait. To use the production workspace, open the dev URL with `?entryWorkspace=https://entry-workspace.elice.io` (for example `http://localhost:4170/?view=edit&entryWorkspace=https://entry-workspace.elice.io`); dev passes it on to the content, and the edit view then saves `.ecdk/settings.json` as on LXP. The person builds the projects there; you do not.
60
99
  - `ecdk dev --check` sees only the first state and cannot look inside the workspace. Ask the person to build the projects and try the screens in the browser.
61
100
  - Grading in `ecdk dev` is a mock: general gives 100 only when the project is exactly the answer project, and AI gives a size-based score with sample feedback. Real grading happens only on LXP.
@@ -0,0 +1,207 @@
1
+ # 18. Using the lesson template
2
+
3
+ the lesson template (`ecdk create <folder> --template lesson`) makes a **learning material the student pages through**: read a concept, enter a value, copy a prompt, check themselves with a quiz. It is not a presentation: nobody talks over it, so every page must make sense from its own text. You never write HTML or CSS for it. The content is one JSON object (`meta` + `slides`) that the edit screen saves; the template draws each slide from one of 39 fixed layouts in the designer's style (purple `#673cda`, Pretendard, 16:9 pages). Design and wording stay consistent because only the content changes.
4
+
5
+ ## When to use it
6
+
7
+ - **The default** for a learning material when the request is not one of the type templates (quiz, survey, PDF/PPT document, video, Entry, board) and the person has not specified their own screen layout: explanations, guided practice, workshop material, "학습 자료 · 교육 자료 · 실습 자료 · 강의 자료 만들어줘".
8
+ - **Not lesson**: a type template fits (use that template), the person describes their own screens, or the activity needs an interaction the layouts cannot do (a simulation whose picture changes with the values, a game, a custom visualization) → the blank template ([3](03-create-the-project.md)). Tell the person the choice in one line.
9
+ - A graded test is the quiz template: lesson quizzes are **self-check only** (the student sees right or wrong and the explanation on the page; nothing is submitted or graded, and the answers are in the content, which students can read). Suggest the completion policy `on_access` (done on open) in LXP. The template has no instructor screen.
10
+
11
+ ## Steps
12
+
13
+ 1. **Conditions.** Learners (level, prior knowledge), learning goals, length (pages or minutes), language, source material and images. Do not invent facts or numbers the conclusion depends on: ask, or mark `확인 필요`.
14
+ 2. **Learning flow.** Write one claim per page as one sentence first (the flow below). Reading only the titles must show the flow.
15
+ 3. **Layouts.** Pick from the table below; slots and character limits are in [19](19-lesson-layouts.md) (the `<...>` examples there are blanks to fill, never content).
16
+ 4. **Write the content.** Create the project, then write `.ecdk/settings.json` as the lesson content object at the top level (`{ "meta": {…}, "slides": [ { "layout": "cover", "data": {…} }, … ] }`, the shape below; [9](09-check.md)). The edit screen's sample (9 pages, "생성형 AI에게 질문 잘하기") shows the shape; replace all of it.
17
+ 5. **Check.** `ecdk doctor` → `project.lesson` must not fail. It runs the edit screen's own checks with the project's `core/lesson.js`: errors (missing required slot, list size, allowed values, unknown layout, quiz answer number, external or missing image) must be fixed; warnings (character limit, writing style, same layout three times in a row, empty image place) are read one by one and fixed unless intended. Fix by shortening the text or splitting the page, never by shrinking the font.
18
+ 6. **Look.** `ecdk dev <folder> --check --screens learn --step all` takes one screenshot per page (`.ecdk/screens/learn-desktop-step<n>.png`). Read them: overflowing text, empty image places, where titles break, repeated layouts.
19
+ 7. **Review the wording** against the style rules and checklist below, top to bottom. Passing the automatic checks is not the review.
20
+ 8. **Save and report.** With a person: have them open the content edit view in `ecdk dev` and press 저장 once (the edit screen checks again and blocks on errors), then `ecdk build`. Report the files, the check results and what needs confirming (empty image places, numbers without a source).
21
+
22
+ **Runs without a person at the edit screen** (Helpy and other agents that finish on their own, or a person who leaves it to you): there is no save step. Unlike the Entry template ([17](17-using-the-entry-template.md)), the lesson content is yours to write: leave `.ecdk/settings.json` as you wrote it (step 5's `ecdk doctor` already ran the edit screen's own checks through `core/lesson.js`; `project.lesson` must not fail), then `ecdk build` and `ecdk validate`. The zip does not carry the content (LXP keeps it as the page's `settings`), so the final report, in the person's language, says how it reaches LXP: either the publish skill sends `.ecdk/settings.json` with the upload once the person agrees (`elice-content-publish` step 3), or, uploaded without it, a remaining to-do "LXP 편집 화면을 열어 내용을 확인하고 '초안으로 저장'한 뒤 '수업 자료에 반영'을 누르세요" with the file path to paste into the content editor's 코드 보기. Also list what needs confirming (empty image places, numbers without a source).
23
+
24
+ ## The learning flow
25
+
26
+ Start from this order and shorten or extend it to fit:
27
+
28
+ 1. Cover (`cover`)
29
+ 2. Learning goals (`objectives`, each ending in `~할 수 있다`) or contents (`agenda`)
30
+ 3. Unit divider (`section`)
31
+ 4. Concepts: `text-visual`, `cards`, `compare`, `flow`, `timeline` … one concept per page
32
+ 5. Practice: `variables` first to take the values, then `how-to`, `prompt-builder`, `tabs` to follow along (practice pages get the `따라 하기` tag)
33
+ 6. Check: `checklist` (materials, self-check), `quiz` (learning check)
34
+ 7. Wrap-up (`closing`): what was learned and what comes next
35
+
36
+ In every unit a concept is followed by practice or a check; never only concept pages in a row.
37
+
38
+ ## Writing style (문체 기준)
39
+
40
+ Source: the company handbook's AI-assisted writing standard. `project.lesson` checks part of it automatically (warnings); awkward wording and keeping the meaning are your judgment.
41
+
42
+ | 대상 | 기준 | 예 |
43
+ | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
44
+ | 페이지 제목 (`title`) | 한 장에 핵심 주장 하나. 제목만 보아도 주제와 결론을 알 수 있게 쓴다. 체언으로 끝내고 마침표를 쓰지 않는다 | 기획 목록 대조로 누락 항목 확인 |
45
+ | 화면 문구 (`label`) | 제목, 라벨, 표, 목록은 개조식. 체언이나 `~하기`로 끝내고 마침표와 `~함`, `~음`, `~임` 종결을 쓰지 않는다. 한 목록 안에서 문장 형태를 통일한다 | 완료 보고와 기획 목록 대조 |
46
+ | 설명 문장 (`sentence`) | 합니다체. 한 문장에 한 가지 내용을 쓴다 | 읽기는 저장된 내용을 볼 수 있는 범위입니다. |
47
+ | 실습 안내 (`practice`) | 합니다체. 단계마다 수행할 행동을 쓴다 | 완료 보고에서 기능 목록을 추출합니다. |
48
+ | 학습 목표 (`goal`) | 관찰할 수 있는 행동을 `~할 수 있다`로 쓴다 | 누락된 기능을 식별할 수 있다 |
49
+ | 질문과 퀴즈 (`question`) | `~인가?`, `~는가?`. 보기는 개조식, 40자 이내 | 기획 목록 중 완료 보고에 없는 기능은 무엇인가? |
50
+ | 해설 (`explain`) | 합니다체로 풀이 근거를 쓰고 `정답은`으로 시작하지 않는다 | |
51
+ | 강의 노트 (`notes`) | 실제로 말하는 합니다체. 질문은 `~일까요?`, 권유는 `~해 보세요`. 문장마다 한 가지, 공백 제외 60자 이내. 화면 문구를 그대로 반복하지 않는다 | 보고에서 빠진 기능은 무엇일까요? 기획 목록과 비교해 보세요. |
52
+ | 인용, 코드, UI 문구 (`quote`) | 원문 그대로 | |
53
+
54
+ - Conclusion and request first, then reasons and conditions.
55
+ - Keep fact, interpretation, proposal and assumption apart. A number has its unit, period, comparison and source; no number without a source.
56
+ - Replace vague words (`적극 검토`, `고도화`, `유의미한 성과`) with the concrete action or observation.
57
+ - One name per concept; spell out an unfamiliar abbreviation once. No translationese, coined compounds or noun chains.
58
+ - On screen: no middle dot (·), long dash (—, –), emoji, exclamation, exaggeration, promotional wording, slang or spoken style. List with commas, slashes or separate sentences. No direct address such as `여러분`.
59
+ - Never change the source's numbers, dates, actors, conditions or level of certainty, and add no fact you cannot verify.
60
+ - In text, `**강조**` is purple bold, `` `코드` `` is code, `\n` is a line break. At most one emphasis per sentence.
61
+
62
+ Review checklist (all at the end):
63
+
64
+ - [ ] 제목만 이어 읽어도 자료의 결론이 보이는가?
65
+ - [ ] 숫자, 일정, 고유명사가 원자료와 일치하는가?
66
+ - [ ] 사실과 가정, 해석, 제안이 구분되는가?
67
+ - [ ] 같은 대상의 이름이 일관되고 약어를 풀었는가?
68
+ - [ ] 직역, 합성어, 명사 나열, 과장, 중복이 없는가?
69
+ - [ ] 화면 문구, 설명, 노트에 각각 맞는 문체를 썼는가?
70
+
71
+ ## Layout by what you want to say
72
+
73
+ | 하려는 말 | 레이아웃 | 비고 |
74
+ | ----------------------------------------------------- | ------------------------------------- | --------------------------------------------------------------- |
75
+ | 자료의 첫 장 | `cover` 또는 `cover-dark` | 챕터가 4개 안팎인 긴 자료는 `cover-dark`. 요청이 없으면 `cover` |
76
+ | 오늘 다룰 내용과 시간 | `agenda` | 카드 3~5개 |
77
+ | 교육 자료의 도달 목표 | `objectives` | `~할 수 있다` |
78
+ | 장 전환 | `section` | 5~8장마다 한 번. `tone: light`는 밝은 배경 |
79
+ | 질문으로 시작, 한 문장 결론 | `statement` | 도입부 |
80
+ | 설명 몇 줄과 화면 캡처 | `text-visual` | 가장 범용적 |
81
+ | 병렬 항목 2~4개 | `cards` | `cols`로 밀도 조절 |
82
+ | 전후, 좋은 예와 나쁜 예 | `compare` | |
83
+ | 두 접근법의 대비 | `versus` | 보조 레이아웃, 요청이 있을 때 |
84
+ | 순서가 있는 3~6단계 | `process` | 묶음 띠 가능 |
85
+ | 상황별로 어디로 이어지는지 | `scenario-rows` | |
86
+ | A에서 B, C로 이어지는 흐름 | `flow` | 3~6개 |
87
+ | 연도별 변화, 로드맵 | `timeline` | |
88
+ | 근거 수치 비교와 대표 수치 | `stat` | 출처 필수 |
89
+ | 핵심 수치 3~4개 | `stats` | |
90
+ | 분포나 추세를 막대로 | `bar-chart` | |
91
+ | 기준이 같은 항목 비교 | `table` | 열 5개 이하 |
92
+ | 층으로 된 구조 / 세 영역의 교집합 | `layers` / `venn` | |
93
+ | 가장 기억시킬 한 문장 | `quote` | 자료 전체에서 2회 이하 |
94
+ | 인물과 인용 / 사례와 큰 이미지 | `profile` / `image-split` | |
95
+ | 전면 이미지 위 글 / 그림 2~3장 비교 / 변경 전후 두 장 | `image-bg` / `figures` / `image-pair` | |
96
+ | 실습 전 값(기관명, 경로 등) 입력 | `variables` | `meta.variables` 필요 |
97
+ | 실습 절차, 복사할 프롬프트 | `how-to` | 머리글에 `따라 하기` |
98
+ | 항목을 골라 프롬프트 완성 | `prompt-builder` | 칩 선택, 진행률 표시 |
99
+ | 도구나 환경별 절차 | `tabs` | 탭 전환 |
100
+ | 두세 가지 방식을 큰 토글로 전환 | `toggle` | 설명과 이미지가 바뀜 |
101
+ | 한 페이지 안에서 단계(1, 2, 3)를 차례로 | `stepper` | 번호 칩과 다음 단계 버튼 |
102
+ | 준비물과 점검 목록 | `checklist` | |
103
+ | 장면을 고르고 슬라이더로 값을 바꾸는 실습 설계 | `simulation` | 결과는 이미지 한 장 (아래 "시뮬레이션") |
104
+ | 객관식 한 문제를 크게 / 여러 문제(2~3개) | `quiz` / `choice-list` | 자가 확인 |
105
+ | OX 한 문제를 크게 / 여러 문제(2~4개) | `ox-card` / `ox-list` | 자가 확인 |
106
+ | 마무리와 다음 행동 | `closing` | |
107
+
108
+ One question per page → card (`quiz`, `ox-card`); several → list (`choice-list`, `ox-list`).
109
+
110
+ ## Composition rules
111
+
112
+ - **List items are title and description pairs.** Repeated items (cards, rows, facts, history) use `title` and `desc`, whatever the title is (a year, a job title, an English label). Do not guess content from a field name.
113
+ - **Rhythm.** Never the same layout three pages in a row. After a text-heavy page, a page with a figure or numbers. 15 pages or more → divide with `section`.
114
+ - **Density.** One claim per page. Keep the character limits (`max`); if it does not fit, shorten or split the page.
115
+ - **Line breaks.** No line with one or two characters. Titles end in one or two lines; break by meaning with `\n`. The template keeps the last two characters of a line together, which does not help once the limit is exceeded.
116
+ - **Titles** state the conclusion, not the topic (`디자인` → `디자인의 관심은 물건에서 경험으로 옮겨왔다`).
117
+ - **Visuals.** No more than three explanation-only pages in a row. Without images, show structure with `cards`, `flow`, `table`, `layers`.
118
+ - **eyebrow** (small label above the title) is optional; if used, use it the same way on every body page. The document style hides it.
119
+ - **Numbers.** Show key numbers big with `stat` or `stats`, never with an empty source slot.
120
+
121
+ ## Interactive elements
122
+
123
+ Everything runs inside the page; nothing is sent to the server.
124
+
125
+ - **Variables.** `meta.variables: [{ "key": "org", "label": "기관 이름", "default": "my-org", "hint": "…" }]` (`key`: lowercase letters, digits, `-`, `_`). Write `[[org]]` anywhere in text or code boxes: it shows with a dotted purple underline and changes everywhere to what the student types on the `variables` page (kept only while the page is open). `default` shows before input. An undefined `[[key]]` is a warning.
126
+ - **Copy box.** `code` in `how-to`, `tabs`, `stepper` becomes a box with a copy button; the student may edit it, and the copied text carries the entered values. The copy button turns into a check + "복사됨"; when the browser blocks the clipboard it selects the text and shows "Ctrl+C로 복사".
127
+ - **Prompt builder.** `groups` (`key`, `label`, `options`, `custom: true` adds a free-input chip) and a `template` with `[[key]]` where the choices go. The completed prompt and `n / 전체` update as chips are picked; the primary button copies it once every group is chosen.
128
+ - **Stepper chips** (`stepper`): for content that must be seen in order inside one page. For a flow that may span pages use `process` or `flow`.
129
+ - **Action buttons** sit bottom right: primary (submit, run) rightmost, outline secondary (retry) to its left; primary stays disabled until the choice is complete. Labels: `submit_label`, `retry_label`.
130
+ - **Quizzes.** Options are short labels (40 characters at most), `answer` is the option number from 1 (`ox-*`: `"O"` or `"X"`), the explanation is 합니다체 and gives the reason, never starting with `정답은`. Self-check: submit shows right or wrong and the explanation, retry resets.
131
+ - **Checklist**: big round checkboxes the student ticks (not saved).
132
+ - **Emoji** only in short tab, scene or toggle labels (`tabs`, `simulation` `scenes`, `toggle` `options`, field `emoji`): all items of a list or none, different meanings. Never in titles, body, explanations, options or buttons.
133
+
134
+ ## Simulation (`simulation`)
135
+
136
+ 1. Decide in one sentence what changes what (e.g. aperture, shutter and ISO change brightness, blur and motion). 2–3 `controls` with 3–6 `values` each, smallest first.
137
+ 2. 2–4 `scenes`: conditions where the same values give different results; names are noun phrases of 8 characters at most.
138
+ 3. 2–3 `missions`: a goal sentence and a condition `when` like `key=값1|값2; key2=값3`, using only values from `controls`; `scene` limits it to one scene. A mission once met stays checked; all met enables submit (on the page only).
139
+ 4. The result is one `image`. The template does not compute a picture from the values; if the picture must really change, build it with the blank template and use this layout only as the design reference.
140
+ 5. Before it `objectives`, a `stepper` showing how; after it `ox-list` or `choice-list`, then `closing`.
141
+
142
+ ## Page style
143
+
144
+ - `meta.style: "document"` (default): learning-material look. The top header and eyebrow are hidden, the title sits top left with an icon at the same place on every body page, `tag` is a small label on its right (24 characters). Keep titles on one line (about 24 characters).
145
+ - `meta.style: "slide"`: the older presentation look with header (chapter name, material title) and big titles. Only when asked.
146
+ - Fine control: `meta.title_mode` (`fixed` · `free`), `meta.header` (`hide` · `show`), `meta.title_label` (`chapter` · `title` · `none`), `meta.background` (`decor` · `plain`), `meta.header_right` (`none` · `title`); each overrides `style`. `meta.key_color` (`#rrggbb`) changes the primary button and accent color. `meta.brand`: organization or event name on cover and section pages (optional).
147
+ - Page turning (side buttons, ← → keys, the first page's back and last page's next go to the previous or next LXP material) and the `n / N` indicator are the kit stepper's; the lesson pages have no page numbers of their own.
148
+ - `notes` (lecture notes) are kept in the content but not shown to students.
149
+
150
+ ## On phones (narrow screens)
151
+
152
+ Below 768px of content width (phones, portrait tablets) a page is not shrunk as a 16:9 picture: it unfolds into one column that scrolls down (`ui/mobile.css`). Text and buttons keep their size, side-by-side parts (columns, text and image, compare, versus, image split) stack top to bottom, arrows in flows point down, decorations are hidden, tables scroll sideways. Wide screens keep the 16:9 page unchanged. So when you write:
153
+
154
+ - A page that fits on 16:9 can become several screens tall on a phone. Keep within the character limits; prefer splitting a long page in two over filling every slot.
155
+ - Images show at full width above or below the text, so the image's ratio decides how much it pushes the text down: a tall image (3:4, 9:16) takes most of a phone screen. Keep the important part in the middle; `image-split` · `image-bg` images become a short band (about 220px) on top.
156
+ - Tables wider than the screen scroll sideways; keep columns few and cells short.
157
+
158
+ ## Images
159
+
160
+ - Put image files in the project's `public/` folder (for example `public/img/step1.png`) and write the path without `public/` (`"image": "img/step1.png"`). External URLs are blocked by the content CSP (error). Never invent a file. Images over 1MB are warned by `ecdk validate` (`file.large-image`).
161
+ - Without an image, leave `image` empty and write what belongs there in `image_hint`: a dashed placeholder shows and `project.lesson` counts it. List them in the report.
162
+ - Frames (`frame`): `card` (diagram, illustration, photo), `window` (web screen capture with a browser bar, for pages where the student operates a screen; `url` for the address bar), `plain` (no frame; use it when the capture already has a browser bar), `phone` (app screens, 9:16), `tint` (white-background diagram on a panel), `bleed` (edge to edge), `portrait` (people). Ask the person whether a practice capture should look operable (`window`) or plain.
163
+ - Ratios (`ratio`) and pixels: 16:10 (1600x1000, default), 16:9 (1600x900), 2:1 (1600x800), 4:3 (1600x1200), 1:1 (1200x1200), 3:4 (1200x1600), 9:16 (1080x1920); full background 1920x1080 or more. Screen captures `fit: "contain"`, photos and illustrations `cover` (default) with `focus` for what to keep. Keep the important part in the middle.
164
+
165
+ ## What does not change
166
+
167
+ Until the person says otherwise: the font (Pretendard, bundled in the template), the colors, the 16:9 page, the layouts' CSS (`ui/design.css`, and `ui/mobile.css` for phones). Do not add CSS or HTML for a page; if no layout fits, tell the person (adding a layout is a template change).
168
+
169
+ ## Content shape
170
+
171
+ ```json
172
+ {
173
+ "meta": {
174
+ "title": "자료 제목",
175
+ "brand": "",
176
+ "variables": [
177
+ {
178
+ "key": "org",
179
+ "label": "기관 이름",
180
+ "default": "my-org",
181
+ "hint": "영문 소문자, 숫자, 하이픈"
182
+ }
183
+ ]
184
+ },
185
+ "slides": [
186
+ {
187
+ "layout": "cover",
188
+ "data": {
189
+ "title": "신규 기능\n도입 가이드",
190
+ "subtitle": "도입 전 확인 항목과 적용 절차",
191
+ "meta": "교육팀 / 2026년 12월 1일"
192
+ }
193
+ },
194
+ {
195
+ "layout": "cards",
196
+ "data": {
197
+ "title": "세 가지 방법을 비교한다",
198
+ "cols": "3",
199
+ "items": [{ "title": "방법 A", "desc": "설명 문장입니다." }],
200
+ "notes": "강의 노트입니다."
201
+ }
202
+ }
203
+ ]
204
+ }
205
+ ```
206
+
207
+ Every layout also takes `tag`, `notes` and `image_alt`. Slot names, required slots and limits: [19](19-lesson-layouts.md).