DESIGN.md@packages/@openmaic/importerA

DESIGN.md@packages/@openmaic/importer 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/importer/DESIGN.md@git:20260624.7cb1291

Pins git:20260624.7cb1291 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/importer/DESIGN.md
Versions recorded
1
Latest version
git:20260624.7cb1291, committed Jun 24, 2026
Size
6,732 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

# DESIGN

`maic-importer`:将 `.pptx` 文件解析为结构化 JSON,供 PPTist 等下游渲染器消费。

## 解析管线

```
.pptx (ArrayBuffer)
  ↓  parser/ZipParser ── 解压 zip,按用途分类
PptxFiles
  ↓  model/* ── XML → 结构化模型(位置、大小、层级)
PresentationData
  ↓  serializer/* ── 模型 + 主题/模板上下文 → JSON 元素
Element[]
  ↓  adapter/toPptxtojson ── 组装最终输出
Output { slides, themeColors, size }
```

入口:`src/index.ts` → `parse(buffer, options?)`

## 分层职责

| 层 | 目录 | 做什么 | 不做什么 |
|---|---|---|---|
| **parser** | `src/parser/` | zip 解压、XML 解析(SafeXmlNode)、rels 映射、单位换算 | 不解析 OOXML 业务语义 |
| **model** | `src/model/` | 解析几何与结构:位置、大小、旋转、占位符、节点类型 | 不解析视觉样式(颜色、字体、填充) |
| **serializer** | `src/serializer/` | 结合 theme/master/layout 上下文,把模型转成 JSON 元素 | 不直接读 zip |
| **adapter** | `src/adapter/` | 定义对外 JSON 类型,组装最终 Output | 不写业务逻辑 |
| **shapes** | `src/shapes/` | 生成 SVG path 字符串(200+ preset + 自定义几何) | 不决定填充/边框 |
| **utils** | `src/utils/` | 通用工具(颜色变换、媒体格式、EMF 解析、EQ 公式等) | 不引用业务类型 |

依赖方向:`adapter → serializer → model → parser`,单向。`shapes` 和 `utils` 是底层工具。

## 目录结构

```
src/
├── index.ts                    # 入口:parse() + 类型导出
├── adapter/
│   ├── types.ts                # ★ 对外 JSON 类型定义(改它 = 改协议)
│   └── toPptxtojson.ts         # 组装 Output
├── parser/
…

Read the whole file at its exact version.

How to install

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

The line at the top of this page pins the label git:20260624.7cb1291, 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_fkv4jy4se4d4jtgw.svg)](https://markdownregistry.com/a/art_fkv4jy4se4d4jtgw)

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

Versions

The registry has recorded 1 version of this file, committed on Jun 24, 2026.

versioncommittedcommitsizeaudit
git:20260624.7cb1291 latest2026-06-24 7cb1291 6,732 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 (6732 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_fkv4jy4se4d4jtgw
GET https://markdownregistry.com/api/v1/resolve?ref=thu-maic/openmaic/packages/@openmaic/importer/DESIGN.md
GET https://markdownregistry.com/api/v1/blob/e8b98723c68740b4753fe7e806fcf7761f97351932f6d76f54d6fede2a660443

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
importer SKILL.md skill
thu-maic/openmaic · packages/@openmaic/importer/SKILL.md
git:20260624.7cb1291 · audit C · 42,430 stars
DESIGN.md@packages/@openmaic/renderer DESIGN.md file
thu-maic/openmaic · packages/@openmaic/renderer/DESIGN.md
git:20260727.ff95e66 · audit A · 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.