Documentation
¶
Overview ¶
Package aw defines the source AST for agentic workflow Markdown files.
Document separates YAML frontmatter from the Markdown prompt and retains source locations for diagnostics. Parse uses the shared frontmatter parser; Emit preserves unchanged source verbatim, including comments, shorthands, line endings, and prompt whitespace. Edited frontmatter is serialized deterministically without losing fields that are not modeled by a typed view.
Frontmatter retains the complete AW configuration, including engine, tools, imports, safe outputs, triggers, and custom jobs. Schema validation, import resolution, and typed configuration parsing remain the compiler's job.
workflow.Compiler.ParseWorkflowDocument accepts this source AST, and CompileDocument lowers it through the existing compiler to an actions.Workflow. The AW source AST and the native Actions execution AST are separate stages; AW-specific fields are never emitted as native Actions workflow properties.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Document ¶
type Document struct {
Frontmatter map[string]any
Markdown string
Location SourceLocation
// contains filtered or unexported fields
}
Document represents an AW .md source file before imports or compiler defaults have been applied. Frontmatter is the authoritative configuration.
func Parse ¶
Parse accepts main workflows, shared imports, redirect placeholders, and plain Markdown. Semantic workflow validation happens during compilation.
func (*Document) FrontmatterResult ¶
func (document *Document) FrontmatterResult() *parser.FrontmatterResult
FrontmatterResult returns an independent parser view. Compiler preprocessing may mutate it without modifying the authored document or its source metadata.