Reference¶
Complete reference documentation for pfig syntax, API, and command-line interface.
Documentation Sections¶
- Syntax Reference - Complete pfig language syntax, including bindings, providers, includes, externals, and expressions
- CLI Reference - Command-line interface for view, validate, run, diff, fmt, bundle, replay, and install-rules
- API Reference - Python API documentation for
instantiate(),execute_pfig(), andparse_pfig_source() - LSP API - API for LSP-based editors (parsing, indexing, go-to-definition, diagnostics, semantic tokens)
- Snapshot Format - Specification of snapshot
log.jsonand payload contents - Troubleshooting - Common issues and solutions
Quick Links¶
Syntax¶
- The
@Sigil - Understanding when to use@for references - Imports - Importing Python modules and symbols
- Includes - Modularize configs with namespaces
- Values - Constants and configuration values
- Providers - Lazy recipes for creating objects
API¶
instantiate()- Instantiate a specific bindingexecute_pfig()- Execute a configurationexecute_pfig_with_metadata()- Execute with full metadataparse_pfig_source()- Parse source code to AST
CLI¶
pfig view- Open the browser graph viewerpfig validate- Validate configuration filespfig run- Execute configurationspfig bundle- Create portable config bundlespfig replay- Reproduce runs from snapshotspfig diff- Compare configurationspfig fmt- Format.pfigfiles to a canonical stylepfig install-rules- Install AI agent authoring rules
Snapshots¶
- Snapshot Format -
log.jsonschema and payload structure - IR Graph - Resolved configuration representation