CanonicalFormatter
Defined in: compiler/src/types.ts:115
Canonical formatter contract for immutable pipeline consumers.
Extends
Properties
defaultConvention
readonlydefaultConvention:string
Defined in: compiler/src/types.ts:87
Default convention for this formatter
Inherited from
description
readonlydescription:string
Defined in: compiler/src/types.ts:85
Human-readable description
Inherited from
name
readonlyname:string
Defined in: compiler/src/types.ts:81
Formatter name (e.g., “github”, “claude”, “cursor”)
Inherited from
outputPath
readonlyoutputPath:string
Defined in: compiler/src/types.ts:83
Output path pattern
Inherited from
Methods
format()
format(
ast,options?):FormatterOutput
Defined in: compiler/src/types.ts:89
Format the AST to target format
Parameters
ast
options?
Returns
Inherited from
formatCanonical()
formatCanonical(
ast,options?):FormatterOutput
Defined in: compiler/src/types.ts:116
Optional canonical entry point for migrated formatters.
Parameters
ast
options?
Returns
Overrides
getSkillBasePath()
getSkillBasePath():
string|null
Defined in: compiler/src/types.ts:93
Base path for skills (e.g., ‘.claude/skills’), or null if no skill support
Returns
string | null
Inherited from
getSkillFileName()
getSkillFileName():
string|null
Defined in: compiler/src/types.ts:95
Skill file name (e.g., ‘SKILL.md’ or ‘skill.md’), or null if no skill support
Returns
string | null
Inherited from
referencesMode()
referencesMode():
"none"|"directory"|"inline"
Defined in: compiler/src/types.ts:97
How this formatter handles skill references: ‘directory’, ‘inline’, or ‘none’
Returns
"none" | "directory" | "inline"
Inherited from
transformInjectedSkillContent()?
optionaltransformInjectedSkillContent(content):string
Defined in: compiler/src/types.ts:104
Optional hook to transform the raw content of a pass-through skill file (e.g. the bundled PromptScript SKILL.md) before it is written. Formatters whose target tools enforce frontmatter schemas can override this to strip unsupported fields.
Parameters
content
string
Returns
string