Interface: CanonicalFormatter¶
Defined in: formatters/src/types.ts:117
Formatter contract for implementations that consume the immutable AST.
Extends¶
Properties¶
defaultConvention¶
readonlydefaultConvention:string
Defined in: formatters/src/types.ts:79
Default convention for this formatter
Inherited from¶
description¶
readonlydescription:string
Defined in: formatters/src/types.ts:77
Human-readable description
Inherited from¶
name¶
readonlyname:string
Defined in: formatters/src/types.ts:73
Unique formatter identifier
Inherited from¶
outputPath¶
readonlyoutputPath:string
Defined in: formatters/src/types.ts:75
Default output file path
Inherited from¶
Methods¶
format()¶
format(
ast,options?):FormatterOutput
Defined in: formatters/src/types.ts:81
Transform AST to target format
Parameters¶
ast¶
options?¶
Returns¶
Inherited from¶
formatCanonical()¶
formatCanonical(
ast,options?):FormatterOutput
Defined in: formatters/src/types.ts:118
Optional canonical entry point.
Implementations that do not provide this method are legacy formatters. The formatter adapter creates a detached compatibility projection before invoking their format method.
Parameters¶
ast¶
options?¶
Returns¶
Overrides¶
getSkillBasePath()¶
getSkillBasePath():
string|null
Defined in: formatters/src/types.ts:91
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: formatters/src/types.ts:93
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: formatters/src/types.ts:95
How this formatter handles skill references: 'directory', 'inline', or 'none'
Returns¶
"none" | "directory" | "inline"
Inherited from¶
transformInjectedSkillContent()?¶
optionaltransformInjectedSkillContent(content):string
Defined in: formatters/src/types.ts:104
Transform the raw content of a pass-through skill file (e.g. the bundled PromptScript SKILL.md injected by the compiler) before it is written to disk. Formatters whose target tools enforce frontmatter schemas (such as Factory AI) can override this to strip unsupported fields.
Defaults to identity when not implemented.
Parameters¶
content¶
string
Returns¶
string