Skip to content

feat: 消息格式抽象层 — platform-agnostic JSON + per-platform renderer #117

@loning

Description

@loning

Summary

Ornn skill 输出 platform-agnostic 结构化 JSON。Aevatar 的 per-platform renderer 将其转换为目标平台的消息格式。

架构

Ornn skill output (JSON)
  → LarkCardRenderer → Lark interactive card JSON
  → (future) SlackBlockRenderer → Slack Block Kit JSON
  → MarkdownRenderer → plain text fallback

Skill Output Schema

{
  "type": "daily_briefing",
  "sections": [
    {"type": "header", "text": "每日更新 2026-04-06"},
    {"type": "metric", "label": "北极星", "value": "0", "target": "10"},
    {"type": "roadmap", "milestones": [...]},
    {"type": "action_list", "items": [...]}
  ]
}

MVP Scope

  • 实现 LarkCardRenderer (Lark interactive card)
  • 实现 MarkdownRenderer (plain text fallback)
  • Card 渲染失败时自动 fallback 到纯文本

设计要求 (CEO 指示)

做一层抽象,未来接 Slack/Discord 只需要写 renderer,不改 skill。

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions