Repository navigation
Unify skill/prompt seeding with markdown import pipeline #1056
Copy link
Copy link
Closed
Labels
Description
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:
- Root node type override — caller specifies
node_type: "skill"instead of inferring from markdown syntax - Root properties injection — caller passes
description,tool_whitelist,max_iterationsetc. - Child type override — children created as
promptnodes withpriority/source/template_syntaxinstead oftext/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,SeedGuidancePromptstructs and custom seeding logic
Current State
SeedSkill+SeedGuidancePromptinpackages/agent/src/skill_pipeline.rsSeedPromptinpackages/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
Reactions are currently unavailable
Activity
Unify skill/prompt seeding with markdown import pipeline (closes #1056)
Unify skill/prompt seeding with markdown import pipeline (#1056)
Unify skill/prompt seeding with markdown import pipeline (#1096)
Unify skill/prompt seeding with markdown import pipeline (#1096)