DESIGN.md@packages/@openmaic/rendererA

DESIGN.md@packages/@openmaic/renderer from thu-maic/openmaic is a DESIGN.md file: the design rules coding agents follow in that repo.

Install it, pinned
mdr add thu-maic/openmaic/packages/@openmaic/renderer/DESIGN.md@git:20260727.ff95e66

Pins git:20260727.ff95e66 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
DESIGN.md file
Repository
thu-maic/openmaic
Path
packages/@openmaic/renderer/DESIGN.md
Versions recorded
2
Latest version
git:20260727.ff95e66, committed Jul 27, 2026
First version recorded
Jun 24, 2026
Size
8,931 bytes
Repository stars
42,430
License
MIT

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# maic-renderer 设计稿(v1:只读画布)

> 配套计划:`docs/superpowers/plans/2026-05-28-maic-renderer-package.md`
> 原始 spec:`docs/superpowers/specs/2026-05-28-maic-renderer-package-design.md`

## 1. 目标

把 OpenMAIC 主仓 `components/maic-renderer/` 中的只读画布部分抽成独立 workspace 包,让任意 React + Tailwind 4 项目都能"装包 → 传 Slide → 直接渲染"。

**v1 范围限定为只读画布**(对应主仓 `Editor/ScreenCanvas.tsx` 子树)。编辑能力(`Editor/Canvas/*`、`Operate/*`、ProseMirror live editor)留给 v2。

理由:
1. 闭环最小可用,跟 `pptxtojson-pro` 形成「产 Slide → 渲 Slide」对子。
2. 编辑器接口面(选中态、命令、撤销、剪贴板、协作)定型后难改,第一版强行定下来大概率返工。
3. 只读包本身有独立价值(嵌课件、报告、回放、PDF 导出预览等)。

## 2. 设计决策

| # | 决策点 | 选择 | 理由 |
|---|--------|------|------|
| D1 | 范围 | 分两步:v1 只读 + v2 编辑 | 闭环最小,风险可控 |
| D2 | 数据 API | **纯 Props 主**;同时导出可选 Provider | 上手最快,进阶用户也照顾到 |
| D3 | 样式 | **要求消费者使用 Tailwind 4** | 工作量最小,跟主仓工程实践一致 |
| D4 | 特效层 | **包含**,4 个全做成可选 props,默认关 | 还原"OpenMAIC 同款画布"必备,但默认零负担 |
| D5 | 业务耦合元素 | **暴露 renderImage / renderVideo 插槽**,包内默认渲原生标签 | 包不感知业务,消费者按需注入 |
| D6 | i18n | 包不带文案 | UI 文案下放给消费者 |
| D7 | ProseMirror | v1 不依赖 | 只读用 dangerouslySetInnerHTML 就够,体积大幅缩小 |
| D8 | 包发布 | workspace 包,未来可发 npm;当前名 `maic-renderer`(同 `pptxtojson-pro` 风格) | 一致性 |

## 3. 对外 API

### 3.1 主入口

```ts
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add thu-maic/openmaic/packages/@openmaic/renderer/DESIGN.md@sha256:11ff2d7fccd162ae

The line at the top of this page pins the label git:20260727.ff95e66, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_ioqla4edc75fwejs.svg)](https://markdownregistry.com/a/art_ioqla4edc75fwejs)

5 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 2 versions of this file, between Jun 24, 2026 and Jul 27, 2026, about one every 33 days.

versioncommittedcommitsizeaudit
git:20260727.ff95e66 latest2026-07-27 ff95e66 8,931 BA view · diff
git:20260624.7cb12912026-06-24 7cb1291 8,774 BA view

Audit of the latest version

A  14 of 14 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Size between 200 bytes and 200 KB (8931 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

thu-maic/openmaic · 42,430 stars · license MIT · pushed 2026-11-02 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_ioqla4edc75fwejs
GET https://markdownregistry.com/api/v1/resolve?ref=thu-maic/openmaic/packages/@openmaic/renderer/DESIGN.md
GET https://markdownregistry.com/api/v1/blob/11ff2d7fccd162ae0be0f6ee8004f1ea9eda81a1c5804956e0b2b0b0869f506a

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: what DESIGN.md is and how agents use it · which agent file does what.

More from thu-maic/openmaic

AGENTS.md AGENTS.md file
thu-maic/openmaic · AGENTS.md
git:20261027.76009ef · audit A · 42,430 stars
DESIGN.md@packages/@openmaic/importer DESIGN.md file
thu-maic/openmaic · packages/@openmaic/importer/DESIGN.md
git:20260624.7cb1291 · audit A · 42,430 stars
importer SKILL.md skill
thu-maic/openmaic · packages/@openmaic/importer/SKILL.md
git:20260624.7cb1291 · audit C · 42,430 stars
build-personal-skill SKILL.md skill
thu-maic/openmaic · skills/agent-runtime/build-personal-skill/SKILL.md · Evidence-based creation of a reusable personal course-making Skill from the user's own classroom and chat history. Use…
git:20260827.0462157 · audit A · 42,430 stars
curriculum-planner SKILL.md skill
thu-maic/openmaic · skills/agent-runtime/curriculum-planner/SKILL.md · Multi-stage series — a request for several classrooms that belong together, like 「7 天学 Python」, a four-week onboarding…
git:20260904.4cfc7c1 · audit A · 42,430 stars
deep-interactive SKILL.md skill
thu-maic/openmaic · skills/agent-runtime/deep-interactive/SKILL.md · Deep Interactive courses. Plans the course so the learner manipulates something on most pages — simulations, diagrams…
git:20260827.0462157 · audit A · 42,430 stars
deep-research SKILL.md skill
thu-maic/openmaic · skills/agent-runtime/deep-research/SKILL.md · Courses whose content rests on current, external or real-world facts that must be verified against live sources before…
git:20260827.0462157 · audit A · 42,430 stars
fact-check SKILL.md skill
thu-maic/openmaic · skills/agent-runtime/fact-check/SKILL.md · Improve factual reliability while creating or reviewing a course or supplied content. Use when the user asks to…
git:20260828.3cd174b · audit A · 42,430 stars
feynman-learning SKILL.md skill
thu-maic/openmaic · skills/agent-runtime/feynman-learning/SKILL.md · Turn any concept, lesson, slide deck, or source material into a Feynman learning cycle in which learners explain first…
git:20260827.0462157 · audit A · 42,430 stars
k12-core-literacy-planning SKILL.md skill
thu-maic/openmaic · skills/agent-runtime/k12-core-literacy-planning/SKILL.md · Chinese K-12 core-literacy course design for a single OpenMAIC classroom. Use when a teacher asks for…
git:20260827.0462157 · audit A · 42,430 stars
learning-to-learn SKILL.md skill
thu-maic/openmaic · skills/agent-runtime/learning-to-learn/SKILL.md · Infuse learning strategies and metacognition into a concept-centered OpenMAIC classroom as a parallel goal. Use when…
git:20260827.0462157 · audit A · 42,430 stars
lecture-style SKILL.md skill
thu-maic/openmaic · skills/agent-runtime/lecture-style/SKILL.md · Masterclass lecturing — one continuous explanation carried by slides, with dense pages, long narration that builds an…
git:20260827.0462157 · audit A · 42,430 stars

Every file in thu-maic/openmaic

Browse by kind, by grade A, or by owner.