129 lines
8.4 KiB
Markdown
129 lines
8.4 KiB
Markdown
# paper-illustration Skill Architecture
|
||
|
||
## File Budget
|
||
|
||
```
|
||
.claude/skills/paper-illustration/
|
||
├── SKILL.md ~280 行 ~1,800 字 接口层(工作流 + 约束)
|
||
├── ARCHITECTURE.md ~120 行 ~800 字 架构总览(本文件)
|
||
└── references/
|
||
├── illustration-taxonomy.md ~210 行 ~1,400 字 6 种图表类型分类 + prompt 模板
|
||
├── academic-styles.md ~185 行 ~1,200 字 5 种会议风格规范
|
||
└── critic-checklist.md ~130 行 ~800 字 5 维度 20 项质量检查
|
||
─────────────────
|
||
~925 行 ~6,000 字 总上下文消耗
|
||
```
|
||
|
||
## Progressive Disclosure Architecture
|
||
|
||
```
|
||
Agent 加载顺序(上下文消耗)
|
||
─────────────────────────────────────────────────────────────
|
||
|
||
第 1 层:SKILL.md(必加载,~1,800 字)
|
||
┌──────────────────────────────────────────────────────────┐
|
||
│ frontmatter 触发匹配 + 路由规则 │
|
||
│ 输入要求 2 必填 + 8 可选 │
|
||
│ 决策树 figure_type 自动检测 │
|
||
│ 路由表 figure_type → backend 映射 │
|
||
│ 6 步工作流 摘要+指针,不含详细规则 │
|
||
│ 8 条 NEVER 零容忍规则 │
|
||
│ 失败处理 6 种失败模式 │
|
||
└──────────────┬───────────────────────────────────────────┘
|
||
│ 按需加载(只在对应 Step 触发时读取)
|
||
▼
|
||
第 2 层:references/(按需,~3,400 字)
|
||
┌────────────────────────┐ ┌───────────────────┐ ┌──────────────────┐
|
||
│ illustration-taxonomy │ │ academic-styles │ │ critic-checklist │
|
||
│ │ │ │ │ │
|
||
│ Step 1 → §1-§6 分类 │ │ Step 3 → 风格参数 │ │ Step 5 → 评估 │
|
||
│ Step 1 → §7 自动检测 │ │ Step 4 → 色值/字号 │ │ │
|
||
│ Step 4 → §8 prompt 模板│ │ │ │ │
|
||
└────────────────────────┘ └───────────────────┘ └──────────────────┘
|
||
│
|
||
▼
|
||
第 3 层:外部依赖(运行时)
|
||
┌──────────────────────────────────────────────────────────┐
|
||
│ basic-image-gen skill AI 图像生成 │
|
||
│ matplotlib/seaborn 代码生成(用户本地 Python) │
|
||
│ obsidian CLI vault 资产管理 │
|
||
└──────────────────────────────────────────────────────────┘
|
||
```
|
||
|
||
## 6-Step Workflow x File Dependency Matrix
|
||
|
||
```
|
||
Step 名称 SKILL.md taxonomy styles checklist basic-image-gen vault
|
||
──── ──── ──────── ──────── ────── ───────── ────────────── ─────
|
||
1 Retrieve & Classify ✓ 指令 ✓ §1-§7 ✓ obsidian read
|
||
2 Plan Blueprint ✓ 模板
|
||
3 Apply Style ✓ 约束 ✓ 全文
|
||
4 Generate Figure ✓ 路由 ✓ §8 prompt ✓ 色值 ✓ conceptual
|
||
5 Critic Evaluation ✓ 约束 ✓ 全文
|
||
6 Archive to Vault ✓ 模板 ✓ obsidian property:set
|
||
```
|
||
|
||
Step 4 是资源消耗峰值——同时需要 taxonomy(prompt 模板)+ styles(色值字号)+ basic-image-gen(外部 skill)。这是合理的:生成阶段是整个 skill 的核心价值所在。
|
||
|
||
## Content-Forge Pipeline Integration
|
||
|
||
```
|
||
content-forge 生产线 paper-illustration 覆盖范围
|
||
──────────────────────────────────────────────────────────────
|
||
|
||
S0 选题入库 ──▶ 01-topics/*.md
|
||
│
|
||
S2 草稿生成 ──▶ write-article
|
||
│
|
||
S4 格式清洗 ──▶ format-markdown
|
||
│
|
||
┌─────────────────────────────────────────────┐
|
||
│ S5 视觉资产 │
|
||
│ │
|
||
│ ┌─ paper-illustration ◀── NEW (学术图表) │
|
||
│ │ Step 1: 读取源笔记 + 分类 figure_type │
|
||
│ │ Step 2: Figure Blueprint │
|
||
│ │ Step 3: 风格参数(NeurIPS/ICML/...) │
|
||
│ │ Step 4: matplotlib 代码 / AI 图像 │
|
||
│ │ Step 5: Critic 5 维度评估 │
|
||
│ │ Step 6: 存入 05-assets/ │
|
||
│ │ │
|
||
│ ├─ baoyu-cover-image(社媒封面) │
|
||
│ ├─ baoyu-article-illustrator(博客配图) │
|
||
│ └─ baoyu-xhs-images(小红书配图) │
|
||
└─────────────────────────────────────────────┘
|
||
│
|
||
S6 审核 ──▶ /review + /multi-review
|
||
│
|
||
S8 发布 ──▶ post-to-wechat / post-to-x
|
||
```
|
||
|
||
paper-illustration 与 baoyu-* 系列平级,在 S5(视觉资产)阶段按内容类型路由:学术内容走 paper-illustration,社媒内容走 baoyu-*。
|
||
|
||
## Differentiation Matrix
|
||
|
||
```
|
||
paper-illustration baoyu-article-illustrator baoyu-cover-image
|
||
───────────────── ──────────────────────── ─────────────────
|
||
目的 信息性学术图表 装饰性博客配图 社媒封面图
|
||
输出 图片 + 可复现代码 仅图片 仅图片
|
||
受众 学术审稿人 博客读者 社媒用户
|
||
文字处理 标签/坐标轴/图例 极少装饰文字 标题文字
|
||
可复现性 必须(代码输出) 无需 无需
|
||
后端 matplotlib + AI AI only AI only
|
||
质量检查 20 项 Critic 无结构化检查 无结构化检查
|
||
迭代 ≤3 轮 无 无
|
||
```
|
||
|
||
## Architecture Scorecard
|
||
|
||
| Dimension | Rating | Notes |
|
||
|-----------|--------|-------|
|
||
| Progressive Disclosure | PASS | SKILL.md 摘要+指针,3 个 reference 按需加载 |
|
||
| Cross-File Consistency | PASS | 图表类型名在 SKILL.md 和 taxonomy.md 完全一致 |
|
||
| Single Responsibility | PASS | taxonomy=分类, styles=风格, checklist=评估 |
|
||
| Extensibility | PASS | 新增会议风格只需扩展 academic-styles.md |
|
||
| Vault Integration | PASS | 读取 obsidian read, 归档 property:set + 05-assets/ |
|
||
| Quality Assurance | PASS | 20 项 Critic checklist, 18/20 pass threshold, ≤3 rounds |
|
||
| Context Efficiency | PASS | 总量 ~6,000 字,Step 4 峰值 ~3 源(合理,生成阶段固有复杂度) |
|