Pack Commands

Custom slash commands defined by packs.

What Are Pack Commands

Packs can define their own slash commands via the commands/ directory. These commands are only registered when the pack is loaded. They appear in /help alongside builtin commands.

How Commands Work

A pack command is a markdown file in commands/ that defines:

  • Name -- the slash command identifier (e.g., /fine-tune)
  • Description -- what the command does
  • Task -- the directive injected into the agent's currentTask when the command runs
  • Confirmation -- whether the command requires user approval before execution

Command Files

---
name: fine-tune
description: Export knowledge graph for fine-tuning dataset creation
requiresConfirmation: true
---

Export the knowledge graph as a structured dataset suitable for
fine-tuning. Include:
1. Readiness check -- verify the graph has enough data
2. Persona selection -- which perspective to export from
3. Format selection -- JSONL, CSV, or markdown
4. Export to the current directory

How They Differ from Builtin Commands

AspectBuiltin CommandsPack Commands
AvailabilityAlways presentOnly when pack is loaded
ImplementationTypeScript code in src/builtins/Markdown in commands/
ScopeCore operations (session, model, memory)Domain-specific workflows
ConfirmationPer-command (hardcoded)Via requiresConfirmation frontmatter

Current Pack Commands

Starter Pack

CommandDescription
/curationGenerate session summary and export options

Distillery Pack (Post-MVP)

CommandDescription
/fine-tuneExport knowledge graph for fine-tuning dataset creation

Creating a Pack Command

  1. Create a markdown file in commands/ (e.g., commands/summarize.md)
  2. Add frontmatter with name, description, and optionally requiresConfirmation
  3. Write the task instructions in the body
  4. Test with wmind --pack ./my-pack and run /help to see your command

When the user runs your command, the task instructions are injected into the agent's system prompt via currentTask, and the agent executes the workflow using its available tools.