stage-dsl
하는 일
OpenMAIC 교실 구조의 지도로, 어떤 부분이 어떤 값을 담는지 보여 줍니다. 교실을 직접 읽거나 편집하는 사람이나 AI를 위한 스킬입니다.
사용하는 경우
- ✓교실 안에서 값이 어디에 저장되어 있는지 찾아야 할 때.
- ✓교실 편집이 거부되어 그 이유를 알아야 하는 경우.
- ✓교실의 모든 페이지에서 텍스트를 검색해야 할 때.
스킬 링크
https://github.com/THU-MAIC/OpenMAIC/blob/main/skills/agent-runtime/stage-dsl/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 교실에서 budget이라는 단어가 나오는 모든 페이지를 찾고, 각각이 어디에 저장되어 있는지 보여 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 교실을 읽고 편집하고 검색하는 도구를 사용하며, 쓰기 전에 이 지도를 따라 구조에서 올바른 부분을 고릅니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
The stage document map
This is a map, not the field manual.
Use it to decide which subtree owns a value, which path to read, and which reference chapter to load. Then read the exact source before writing.
The document model
The durable structure is:
stage
├── outline
└── scenes[] ordered by scene.order, shown as pages 1..N
├── id stable scene identity
├── order 1-based page position
├── type slide | quiz | interactive | pbl
├── content shape selected by scene.type
│ ├── slide.canvas
│ ├── quiz.questions[]
│ ├── interactive.html / widgetConfig
│ └── pbl.projectV2
└── actions[] ordered playback verbs
stage is the stage's metadata. outline is the generation plan. A persisted page
is a scene. Its type and content.type must agree.
The three generic tools do not replace page-list operations. Insert, delete,
reorder, and retitle pages with edit_deck.
Tool vocabulary
| Need | Tool | How |
|---|---|---|
| Read a scene | read_stage |
`path:/scenes/<order |
| Edit scene content or actions | patch_stage |
`target:/scenes/<order |
| Search visible text or source | grep_stage |
literal search over the whole stage |
| List stages in folders | list_folder_stages |
returns the explicit stageId required by every stage tool |
| Insert, delete, reorder, or retitle pages | edit_deck |
page-list operations stay outside the document patcher |
| Plan and build a new stage | conversation + create_stage + generate_scene |
settle the page plan in conversation, then call generate_scene once per page with an explicit brief |
| Set the classroom cast | set_roster |
write the settled roster before page generation |
Addressing with read_stage
| Path | Resolves to |
|---|---|
"" or omitted |
the whole stage |
/outline |
the persisted outline snapshot |
/scenes/3 |
the scene whose order is 3 |
/scenes/scene_abc |
the scene with that stable id |
/scenes/scene-abc |
the historical hyphenated scene-id form |
/scenes/3/actions |
only scene 3's action array |
Orders are 1-based. Array indices inside source JSON are 0-based.
detail:"tree" is the compact structural inventory. It reports scene id,
order, type, title, element/question/project counts, and action counts. It is
for finding a target, never for reconstructing a write value.
detail:"source" is the exact JSON at the selected path. A scene source is the
persisted scene object, so writable pointers begin /content/... or
/actions/.... Inline media bytes larger than 2 KiB are replaced in this read
projection by a read-only placeholder. The stored document is unchanged.
detail:"text" is the visible-text projection. Use it to find learner-facing
copy or prove that old wording no longer remains. It deliberately omits known
internal PBL prompts and runtime state.
Source and text responses are character-paged after 12,000 characters. Pass
the returned nextOffset back as offset until it disappears.
Writing with patch_stage
target is one scene path: /scenes/<order|sceneId>.
Every call carries a human intent and one or more ops. The ops are atomic:
the server applies them to a clone, validates the resulting scene, and writes
once. If op 2 fails, op 1 is not persisted.
| Op | Fields | Meaning |
|---|---|---|
set |
path, value |
replace an existing leaf or add an optional object key |
remove |
path |
delete an existing object key or splice an array index |
str_replace |
path, oldText, newText, optional replaceAll |
replace one exact occurrence of oldText inside the string field at path; replaceAll:true replaces every occurrence |
add_element |
element, optional afterId or index |
add one complete id-less slide element |
delete_element |
elementId |
delete one slide element by stable id |
Set/remove/str_replace paths are JSON Pointers rooted at the scene source:
/content/canvas/elements/0/content
/content/questions/1/options/0/label
/content/widgetConfig/description
/content/projectV2/milestones/0/title
/actions/2/text
Escape / in an object key as ~1 and ~ as ~0. Array indices are
canonical zero-based integers: 0, 1, 2, never 03, -1, or +1.
Every intermediate segment must exi
자주 묻는 질문
어떤 페이지 유형이 있나요?
슬라이드, 퀴즈, 대화형, pbl 페이지 유형을 나열합니다.
페이지를 어떻게 추가하거나 삭제하나요?
페이지 목록 도구를 써서 페이지를 삽입, 삭제, 재정렬하고 제목을 바꿉니다.
이것이 완전한 필드 설명서인가요?
아니요. 이 스킬은 더 자세한 참고 장으로 안내하는 지도입니다.
상세 정보
작성자의 원본 설명
The map for reading and editing an OpenMAIC stage document with read_stage, patch_stage, and grep_stage. Load it before patching a structure you have not patched before, when patch_stage rejects an operation, or whenever the path from a stage, outline, scene, content object, or action to the field you need is uncertain. It routes to field-level references for quizzes, interactive widgets, actions, and PBL projects; the installed slide-dsl skill remains the complete slide canvas manual.
repo: THU-MAIC/OpenMAIC
인기도
- GitHub 스타
- 42k
- 순위
- #6412
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
build-personal-skill
42k과거 수업 제작 기록과 대화를 바탕으로, 자신의 이력에서 찾은 패턴을 담은 개인 재사용 스킬을 만들도록 돕습니다.
curriculum-planner
42k7일짜리 과정이나 장별로 나눈 책처럼, 연결된 여러 수업의 계획을 세우고 승인 후 하나씩 만들도록 돕습니다.
deep-interactive
42k학습자가 슬라이드를 읽는 대신 대부분의 페이지에서 시뮬레이션, 다이어그램, 코드, 게임을 다루는 과정을 설계하도록 돕습니다.
deep-research
42k최신이나 사실 기반 주제에 대해 실시간 출처를 먼저 조사하고, 각 주장을 확인한 출처와 연결하는 과정을 만들도록 돕습니다.