Skip to content

Unify skill/prompt seeding with markdown import pipeline #1056

Closed

Description

@malibio

Overview

Skill and prompt seed data is currently defined as Rust structs (SeedSkill, SeedPrompt, SeedGuidancePrompt) with manual to_node() conversions and custom parent-child creation logic in db.rs. This duplicates the hierarchy creation that create_nodes_from_markdown already handles well.

Problem

  • Two separate code paths for creating root nodes with children: markdown import and programmatic seeding
  • Adding a new skill requires Rust code changes and recompilation
  • The markdown import already handles hierarchy, ordering, and batch creation efficiently
  • Skills are structurally identical to markdown documents: a root node with child content nodes

Proposed Solution

Extend create_nodes_from_markdown (or add a parallel create_nodes_from_template) to support:

  1. Root node type override — caller specifies node_type: "skill" instead of inferring from markdown syntax
  2. Root properties injection — caller passes description, tool_whitelist, max_iterations etc.
  3. Child type override — children created as prompt nodes with priority/source/template_syntax instead of text/header

This would allow seed skills to be defined as markdown files (or embedded strings):

# Schema Creation

To create a new schema, use create_node with node_type="schema".
Fields are defined in properties.fields as an array.

## Example Structure
{json example}

With metadata passed alongside:

{
  "markdown_content": "...",
  "root_node_type": "skill",
  "root_properties": {"description": "...", "tool_whitelist": ["create_node"]},
  "child_node_type": "prompt",
  "child_properties": {"source": "built-in", "template_syntax": "plain"}
}

Benefits

  • Single code path for hierarchy creation
  • Skills definable as markdown (no Rust changes for new skills)
  • Future: users create skills by writing markdown in the UI
  • Eliminates SeedSkill, SeedGuidancePrompt structs and custom seeding logic

Current State

  • SeedSkill + SeedGuidancePrompt in packages/agent/src/skill_pipeline.rs
  • SeedPrompt in packages/agent/src/prompt_assembler.rs
  • Custom seeding in packages/desktop-app/src-tauri/src/commands/db.rs
  • Markdown import in packages/core/src/mcp/handlers/markdown.rs

Dependencies

Activity

  1. self-assigned this
    on Apr 8, 2026
  2. added 3 commits that reference this issue on Apr 8, 2026
    e42ac58
    d723da8
    1e927cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions