Skip to content

Artifacts

The Artifacts section declares the expected output format of the playbook’s final result. This metadata helps implementations render, download, or route the output appropriately.

Section Heading

## ARTIFACTS

Also recognized: ## OUTPUT (case-insensitive).

Type Declaration

The artifact type is declared with a type: line:

## ARTIFACTS
type: markdown

Regex

(?i)^type:\s*(\S+)$

Type matching is case-insensitive.

Valid Types

TypeDescriptionTypical Use
markdownFormatted text with headings, lists, code blocksReports, analyses, documentation
jsonStructured JSON dataData pipelines, API responses, configurations
mermaidMermaid diagram syntaxFlowcharts, sequence diagrams, architecture diagrams
chartjsChart.js configuration objectData visualizations, dashboards
html_cssHTML with embedded or linked CSSRich formatted output, email templates
javascriptJavaScript codeGenerated scripts, automation code
typescriptTypeScript codeGenerated typed code

Unrecognized types produce a warning listing all valid types.

Behavior

The artifact type is metadata only — it does not change how steps execute. It informs the implementation about how to handle the final output:

  • Rendering: A mermaid artifact could be rendered as a diagram; markdown as formatted HTML
  • Download: The type suggests an appropriate file extension (.md, .json, .html, etc.)
  • Validation: Implementations may validate that the final step output conforms to the declared type
  • Routing: Output delivery systems can format payloads based on the artifact type

Default

If no ## ARTIFACTS section is present, implementations should treat the output as untyped text. The recommended default rendering is plain text or markdown.

Examples

Markdown Report

## ARTIFACTS
type: markdown

JSON Data Pipeline

## ARTIFACTS
type: json

Diagram Generation

## ARTIFACTS
type: mermaid

Future Considerations

  • Multiple artifacts: A playbook could declare multiple output artifacts from different steps
  • Custom types: Allow implementation-specific artifact types beyond the standard set
  • Schema validation: For json artifacts, an optional JSON Schema could validate output structure