md² documentation

Placeholders

Placeholders let one action definition work for every card. They are written as {{name}} and resolved on the desktop side, just before the process starts.

Placeholder Resolves to
{{card-file}} Path to the selected card’s Markdown file.
{{this-card}} Alias of {{card-file}}; the same path to the selected card’s Markdown file.
{{card-title}} Title of the selected card.
{{card-prompt}} The extra text you typed in the action popup for this run.
{{active-cards-folder}} Absolute path to the configured working folder under the opened repository. Active cards are root-level Markdown files in this folder shown on the dashboard.
{{worktree-folder}} Absolute path to the action execution checkout.
{{repository-folder}} Absolute path to the opened repository.
{{project-folder}} Absolute path to the configured project.projectFolder under the opened repository. Equal to {{repository-folder}} when configuration is empty.
{{releases-folder}} Absolute path to the configured releases folder under the opened repository.
{{actions-folder}} Absolute path to the configured actions folder under the opened repository. Includes project.projectFolder when configured.
{{diagram-file}} Output path for a diagram action. Available when the action has diagram output.
{{parent-node}} Label of the selected item when running a child diagram action.
{{diagram-changes}} Generated text from reviewed diagram edits when sending changes to an agent.
{{version}} Free-form answer confirmed for the current action run. Linked actions use the same answer.
{{conflict-file}} Path of the conflicted file the action was started for in the merge conflict dialog.
{{conflict-files}} Paths of all files still conflicted in the merge conflict session, one per line.

They work in both prompt (agent actions) and command (command actions).

Using them

In the prompt editor, type {{ for a typeahead list, or insert one from the toolbar.

{
  "id": "fix-bug",
  "label": "Fix bug",
  "description": "Fix the bug described on the card",
  "type": "agent",
  "prompt": "Fix the bug described in {{card-file}}.\n\nExtra instructions: {{card-prompt}}"
}
{
  "id": "open-in-editor",
  "label": "Open in VS Code",
  "description": "Open the card file in VS Code",
  "type": "command",
  "command": "code {{card-file}}"
}

Notes

See also: Action definition, Diagrams, Cookbook.