Skip to content

PromptScript API


Class: WindsurfFormatter

Defined in: formatters/src/formatters/windsurf.ts:37

Abstract base class for markdown-based instruction formatters.

Provides shared section extraction logic (project, tech stack, architecture, code standards, git commits, config files, commands, post-work, documentation, diagrams, restrictions) and standard simple/multifile/full mode implementations.

Subclasses configure behavior via MarkdownFormatterConfig and can override specific methods for format-specific customization.

Extends

Constructors

Constructor

new WindsurfFormatter(): WindsurfFormatter

Defined in: formatters/src/formatters/windsurf.ts:38

Returns

WindsurfFormatter

Overrides

MarkdownInstructionFormatter.constructor

Properties

config

protected readonly config: MarkdownFormatterConfig

Defined in: formatters/src/markdown-instruction-formatter.ts:152

Inherited from

MarkdownInstructionFormatter.config


defaultConvention

readonly defaultConvention: string

Defined in: formatters/src/markdown-instruction-formatter.ts:150

Default convention for this formatter

Inherited from

MarkdownInstructionFormatter.defaultConvention


description

readonly description: string

Defined in: formatters/src/markdown-instruction-formatter.ts:149

Human-readable description

Inherited from

MarkdownInstructionFormatter.description


name

readonly name: string

Defined in: formatters/src/markdown-instruction-formatter.ts:147

Unique formatter identifier

Inherited from

MarkdownInstructionFormatter.name


outputPath

readonly outputPath: string

Defined in: formatters/src/markdown-instruction-formatter.ts:148

Default output file path

Inherited from

MarkdownInstructionFormatter.outputPath


standardsExtractor

protected readonly standardsExtractor: StandardsExtractor

Defined in: formatters/src/base-formatter.ts:33

Shared standards extractor for consistent extraction across all formatters.

Inherited from

MarkdownInstructionFormatter.standardsExtractor


CONTEXT_RENDERED_KEYS

protected readonly static CONTEXT_RENDERED_KEYS: ReadonlySet\<string>

Defined in: formatters/src/base-formatter.ts:242

@context keys that already have a dedicated rendering path. Anything outside this set is generic and must be surfaced by the context section.

Inherited from

MarkdownInstructionFormatter.CONTEXT_RENDERED_KEYS

Methods

addCommonSections()

protected addCommonSections(ast, renderer, sections): void

Defined in: formatters/src/markdown-instruction-formatter.ts:654

Parameters

ast

Program

renderer

ConventionRenderer

sections

string[]

Returns

void

Inherited from

MarkdownInstructionFormatter.addCommonSections


addSection()

protected addSection(sections, content): void

Defined in: formatters/src/markdown-instruction-formatter.ts:675

Parameters

sections

string[]

content

string | null

Returns

void

Inherited from

MarkdownInstructionFormatter.addSection


appendGenericStandardItems()

protected appendGenericStandardItems(items, props, knownKeys): void

Defined in: formatters/src/base-formatter.ts:361

Append generic Label: value items for standards keys not handled by the known-key rendering in a section method. Keeps custom

Parameters

items

string[]

props

Record\<string, Value>

knownKeys

ReadonlySet\<string>

Returns

void

Standards

keys (git/config/documentation/diagrams) visible in monolith output. Skips null/undefined/false; renders bare labels for true.

Inherited from

MarkdownInstructionFormatter.appendGenericStandardItems


architecture()

protected architecture(ast, renderer): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:770

Parameters

ast

Program

renderer

ConventionRenderer

Returns

string | null

Inherited from

MarkdownInstructionFormatter.architecture


codeStandards()

protected codeStandards(ast, renderer): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:841

Parameters

ast

Program

renderer

ConventionRenderer

Returns

string | null

Inherited from

MarkdownInstructionFormatter.codeStandards


commands()

protected commands(ast, renderer): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:910

Parameters

ast

Program

renderer

ConventionRenderer

Returns

string | null

Inherited from

MarkdownInstructionFormatter.commands


configFiles()

protected configFiles(ast, renderer): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:887

Parameters

ast

Program

renderer

ConventionRenderer

Returns

string | null

Inherited from

MarkdownInstructionFormatter.configFiles


context()

protected context(ast, renderer): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:807

Render

Parameters

ast

Program

renderer

ConventionRenderer

Returns

string | null

Context

block text content as a "## Context" section.

The "## Architecture" subsection (with code block) is stripped because it is already rendered separately by architecture. Remaining "## " headings are downgraded to "### " to avoid clashing with the formatter's own h2 section headings. When no

Identity

block exists, the project() fallback already consumes the full

Context

text, so only the generic properties are rendered to avoid duplication.

Inherited from

MarkdownInstructionFormatter.context


contextArchitectureProperty()

protected contextArchitectureProperty(ast): string | null

Defined in: formatters/src/base-formatter.ts:262

Read the architecture property of @context. Used as a fallback for sources that declare architecture as a property rather than as an ## Architecture heading inside the block text.

Parameters

ast

Program

Returns

string | null

Inherited from

MarkdownInstructionFormatter.contextArchitectureProperty


contextPropertyItems()

protected contextPropertyItems(ast, alsoRenderedKeys?): string[]

Defined in: formatters/src/base-formatter.ts:275

Render @context properties that no dedicated section consumes as Label: value items, so structured context is never silently dropped.

Parameters

ast

Program

alsoRenderedKeys?

readonly string[] = []

Returns

string[]

Inherited from

MarkdownInstructionFormatter.contextPropertyItems


createRenderer()

protected createRenderer(options?): ConventionRenderer

Defined in: formatters/src/base-formatter.ts:39

Create a convention renderer for this formatter. Uses the provided convention from options or falls back to the default.

Parameters

options?

FormatOptions

Returns

ConventionRenderer

Inherited from

MarkdownInstructionFormatter.createRenderer


dedent()

protected dedent(text): string

Defined in: formatters/src/base-formatter.ts:671

Remove common leading whitespace from all lines (dedent). Handles the case where trim() was already called, causing the first line to lose its indentation while subsequent lines retain theirs. Calculates minimum indent from lines 2+ only.

Parameters

text

string

Returns

string

Inherited from

MarkdownInstructionFormatter.dedent


diagrams()

protected diagrams(ast, renderer): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:992

Parameters

ast

Program

renderer

ConventionRenderer

Returns

string | null

Inherited from

MarkdownInstructionFormatter.diagrams


documentation()

protected documentation(ast, renderer): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:961

Parameters

ast

Program

renderer

ConventionRenderer

Returns

string | null

Inherited from

MarkdownInstructionFormatter.documentation


documentationItem()

protected documentationItem(value, defaultText): string | null

Defined in: formatters/src/base-formatter.ts:346

Resolve a documentation-standard entry that accepts either a boolean flag or author-supplied prose. A string value is authoritative and replaces the target's default phrasing, so authored text is never silently discarded.

Parameters

value

Value | undefined

defaultText

string

Returns

string | null

Inherited from

MarkdownInstructionFormatter.documentationItem


examples()

protected examples(ast, renderer): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:1081

Parameters

ast

Program

renderer

ConventionRenderer

Returns

string | null

Inherited from

MarkdownInstructionFormatter.examples


extractAgents()

protected extractAgents(ast): MarkdownAgentConfig[]

Defined in: formatters/src/markdown-instruction-formatter.ts:575

Parameters

ast

Program

Returns

MarkdownAgentConfig[]

Inherited from

MarkdownInstructionFormatter.extractAgents


extractCommands()

protected extractCommands(ast): MarkdownCommandConfig[]

Defined in: formatters/src/markdown-instruction-formatter.ts:402

Parameters

ast

Program

Returns

MarkdownCommandConfig[]

Inherited from

MarkdownInstructionFormatter.extractCommands


extractContextTechStackItems()

protected extractContextTechStackItems(props): string[]

Defined in: formatters/src/base-formatter.ts:308

Collect @context tech-stack entries from every supported shape: an explicit techStack list plus the languages/runtime/monorepo properties.

Parameters

props

Record\<string, Value>

Returns

string[]

Inherited from

MarkdownInstructionFormatter.extractContextTechStackItems


extractExamples()

protected extractExamples(ast): object[]

Defined in: formatters/src/base-formatter.ts:818

Extract examples from the

Parameters

ast

Program

Returns

object[]

Examples

block. Returns an array of example definitions with name, input, output, and optional description.

Inherited from

MarkdownInstructionFormatter.extractExamples


extractRestrictionsItems()

protected extractRestrictionsItems(block): string[]

Defined in: formatters/src/markdown-instruction-formatter.ts:1089

Parameters

block

Block

Returns

string[]

Inherited from

MarkdownInstructionFormatter.extractRestrictionsItems


extractSectionWithCodeBlock()

protected extractSectionWithCodeBlock(text, header): string | null

Defined in: formatters/src/base-formatter.ts:395

Safe extraction of a section that contains a header + content + code block + content Avoids ReDoS by using string search instead of backtracking regex. Matches pattern: Header ... ...

Parameters

text

string

string

Returns

string | null

Inherited from

MarkdownInstructionFormatter.extractSectionWithCodeBlock


extractSkillExamples()

protected extractSkillExamples(skillProps): object[]

Defined in: formatters/src/base-formatter.ts:831

Extract examples from a skill's nested examples property. Returns the same shape as extractExamples.

Parameters

skillProps

Record\<string, Value>

Returns

object[]

Inherited from

MarkdownInstructionFormatter.extractSkillExamples


extractSkills()

protected extractSkills(ast, options?): MarkdownSkillConfig[]

Defined in: formatters/src/markdown-instruction-formatter.ts:472

Parameters

ast

Program

options?

FormatOptions

Returns

MarkdownSkillConfig[]

Inherited from

MarkdownInstructionFormatter.extractSkills


extractTechStackFromContext()

protected extractTechStackFromContext(context): string[]

Defined in: formatters/src/markdown-instruction-formatter.ts:749

Parameters

context

Block | undefined

Returns

string[]

Inherited from

MarkdownInstructionFormatter.extractTechStackFromContext


extractTechStackFromStandards()

protected extractTechStackFromStandards(standards): string[]

Defined in: formatters/src/markdown-instruction-formatter.ts:754

Parameters

standards

Block | undefined

Returns

string[]

Inherited from

MarkdownInstructionFormatter.extractTechStackFromStandards


extractText()

protected extractText(content): string

Defined in: formatters/src/base-formatter.ts:74

Extract text from block content.

Parameters

content

BlockContent

Returns

string

Inherited from

MarkdownInstructionFormatter.extractText


findBlock()

protected findBlock(ast, name): Block | undefined

Defined in: formatters/src/base-formatter.ts:67

Find a block by name, ignoring internal blocks (starting with __).

Parameters

ast

Program

name

string

Returns

Block | undefined

Inherited from

MarkdownInstructionFormatter.findBlock


format()

format(ast, options?): FormatterOutput

Defined in: formatters/src/markdown-instruction-formatter.ts:177

Transform AST to tool-specific format

Parameters

ast

Program

options?

FormatOptions

Returns

FormatterOutput

Inherited from

MarkdownInstructionFormatter.format


formatArray()

protected formatArray(arr): string

Defined in: formatters/src/base-formatter.ts:125

Format an array as comma-separated string.

Parameters

arr

unknown[]

Returns

string

Inherited from

MarkdownInstructionFormatter.formatArray


formatFull()

protected formatFull(ast, options?): FormatterOutput

Defined in: formatters/src/formatters/windsurf.ts:72

Parameters

ast

Program

options?

FormatOptions

Returns

FormatterOutput

Overrides

MarkdownInstructionFormatter.formatFull


formatMultifile()

protected formatMultifile(ast, options?): FormatterOutput

Defined in: formatters/src/formatters/windsurf.ts:68

Parameters

ast

Program

options?

FormatOptions

Returns

FormatterOutput

Overrides

MarkdownInstructionFormatter.formatMultifile


formatSimple()

protected formatSimple(ast, options?): FormatterOutput

Defined in: formatters/src/formatters/windsurf.ts:58

Parameters

ast

Program

options?

FormatOptions

Returns

FormatterOutput

Overrides

MarkdownInstructionFormatter.formatSimple


formatStandardsList()

protected formatStandardsList(items): string[]

Defined in: formatters/src/base-formatter.ts:117

Format standards list from array of values (pass-through). Returns array of strings for rendering as bullet list.

Parameters

items

Value

Returns

string[]

Inherited from

MarkdownInstructionFormatter.formatStandardsList


generateAgentFile()

protected generateAgentFile(config): FormatterOutput

Defined in: formatters/src/markdown-instruction-formatter.ts:599

Parameters

config

MarkdownAgentConfig

Returns

FormatterOutput

Inherited from

MarkdownInstructionFormatter.generateAgentFile


generateCommandFile()

protected generateCommandFile(config): FormatterOutput

Defined in: formatters/src/markdown-instruction-formatter.ts:445

Parameters

config

MarkdownCommandConfig

Returns

FormatterOutput

Inherited from

MarkdownInstructionFormatter.generateCommandFile


generateFrontmatter()

protected generateFrontmatter(_ast, _options?): string | undefined

Defined in: formatters/src/markdown-instruction-formatter.ts:362

Parameters

_ast

Program

_options?

FormatOptions

Returns

string | undefined

Inherited from

MarkdownInstructionFormatter.generateFrontmatter


generateMcpConfig()

protected generateMcpConfig(ast): FormatterOutput | undefined

Defined in: formatters/src/markdown-instruction-formatter.ts:339

Generate MCP config file from

Parameters

ast

Program

Returns

FormatterOutput | undefined

Mcp Servers

block if configured. Returns FormatterOutput or undefined if no MCP block or no config path.

Inherited from

MarkdownInstructionFormatter.generateMcpConfig


generateSkillFile()

protected generateSkillFile(config, options?): FormatterOutput

Defined in: formatters/src/markdown-instruction-formatter.ts:508

Parameters

config

MarkdownSkillConfig

options?

FormatOptions

Returns

FormatterOutput

Inherited from

MarkdownInstructionFormatter.generateSkillFile


getArrayElements()

protected getArrayElements(content): Value[]

Defined in: formatters/src/base-formatter.ts:149

Extract array elements from block content.

Parameters

content

BlockContent

Returns

Value[]

Inherited from

MarkdownInstructionFormatter.getArrayElements


getBlockArrayElements()

protected getBlockArrayElements(block): Value[]

Defined in: formatters/src/base-formatter.ts:172

Parameters

block

Block

Returns

Value[]

Inherited from

MarkdownInstructionFormatter.getBlockArrayElements


getMetaField()

protected getMetaField(ast, key): string | undefined

Defined in: formatters/src/base-formatter.ts:139

Get meta field value as string.

Parameters

ast

Program

key

string

Returns

string | undefined

Inherited from

MarkdownInstructionFormatter.getMetaField


getOutputPath()

protected getOutputPath(options?): string

Defined in: formatters/src/base-formatter.ts:60

Get the output path, respecting options override.

Parameters

options?

FormatOptions

Returns

string

Inherited from

MarkdownInstructionFormatter.getOutputPath


getPrettierOptions()

protected getPrettierOptions(options?): Required\<PrettierMarkdownOptions>

Defined in: formatters/src/base-formatter.ts:50

Get resolved Prettier options, merging provided options with defaults.

Parameters

options?

FormatOptions

Returns

Required\<PrettierMarkdownOptions>

Inherited from

MarkdownInstructionFormatter.getPrettierOptions


getProp()

protected getProp(content, key): Value | undefined

Defined in: formatters/src/base-formatter.ts:88

Get a specific property from block content.

Parameters

content

BlockContent

key

string

Returns

Value | undefined

Inherited from

MarkdownInstructionFormatter.getProp


getProps()

protected getProps(content): Record\<string, Value>

Defined in: formatters/src/base-formatter.ts:102

Get all properties from block content.

Parameters

content

BlockContent

Returns

Record\<string, Value>

Inherited from

MarkdownInstructionFormatter.getProps


getRenderedSectionName()

protected getRenderedSectionName(ast, key, renderer, defaultTitle?): string

Defined in: formatters/src/markdown-instruction-formatter.ts:377

Parameters

ast

Program

key

SectionNameKey

renderer

ConventionRenderer

defaultTitle?

string

Returns

string

Inherited from

MarkdownInstructionFormatter.getRenderedSectionName


getSectionName()

protected getSectionName(ast, key, defaultTitle?): string

Defined in: formatters/src/markdown-instruction-formatter.ts:370

Parameters

ast

Program

key

SectionNameKey

defaultTitle?

string

Returns

string

Inherited from

MarkdownInstructionFormatter.getSectionName


getSkillBasePath()

getSkillBasePath(): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:163

Base path for skills, or null if formatter has no skill support.

Returns

string | null

Inherited from

MarkdownInstructionFormatter.getSkillBasePath


getSkillFileName()

getSkillFileName(): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:168

Skill file name, or null if formatter has no skill support.

Returns

string | null

Inherited from

MarkdownInstructionFormatter.getSkillFileName


gitCommits()

protected gitCommits(ast, renderer): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:860

Parameters

ast

Program

renderer

ConventionRenderer

Returns

string | null

Inherited from

MarkdownInstructionFormatter.gitCommits


humanizeLabel()

protected humanizeLabel(value): string

Defined in: formatters/src/base-formatter.ts:381

Convert a camelCase/kebab-case key into a human-readable label.

Parameters

value

string

Returns

string

Inherited from

MarkdownInstructionFormatter.humanizeLabel


isSafeName()

protected isSafeName(name): boolean

Defined in: formatters/src/base-formatter.ts:918

Check if a name is safe for use in file paths. Rejects path traversal sequences and path separators.

Parameters

name

string

Returns

boolean

Inherited from

MarkdownInstructionFormatter.isSafeName


isSafeSkillName()

protected isSafeSkillName(name): boolean

Defined in: formatters/src/base-formatter.ts:931

Check if a skill name is safe for use in file paths.

Parameters

name

string

Returns

boolean

Inherited from

MarkdownInstructionFormatter.isSafeSkillName


knowledgeContent()

protected knowledgeContent(ast, renderer, includeResolvedTitle?): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:1021

Render remaining

Parameters

ast

Program

renderer

ConventionRenderer

includeResolvedTitle?

boolean = true

Returns

string | null

Knowledge

text content that isn't consumed by other sections. Strips "## Development Commands" and "## Post-Work Verification" sub-sections since those are already rendered by commands() and postWork().

Inherited from

MarkdownInstructionFormatter.knowledgeContent


normalizeMarkdownForPrettier()

protected normalizeMarkdownForPrettier(content): string

Defined in: formatters/src/base-formatter.ts:423

Normalize markdown content to match Prettier formatting. - Strips common leading indentation from lines - Trims trailing whitespace from lines - Normalizes markdown table formatting - Adds blank lines before lists when preceded by text - Adds blank lines before code blocks when preceded by text - Escapes markdown special characters in paths

Parameters

content

string

Returns

string

Inherited from

MarkdownInstructionFormatter.normalizeMarkdownForPrettier


normalizeOutputDir()

protected normalizeOutputDir(dir): string

Defined in: formatters/src/base-formatter.ts:704

Normalize a user-provided output directory (from @use ... into "<path>" or skillTargets config) to a safe forward-slash relative path. Rejects .., . and leading slashes so the result can be appended to a target's dot-directory without escaping it.

Parameters

dir

string

Returns

string

Inherited from

MarkdownInstructionFormatter.normalizeOutputDir


postWork()

protected postWork(ast, renderer): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:943

Parameters

ast

Program

renderer

ConventionRenderer

Returns

string | null

Inherited from

MarkdownInstructionFormatter.postWork


project()

protected project(ast, renderer): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:679

Parameters

ast

Program

renderer

ConventionRenderer

Returns

string | null

Inherited from

MarkdownInstructionFormatter.project


referenceProvenance()

protected referenceProvenance(sourcePath): string

Defined in: formatters/src/base-formatter.ts:910

Generate a provenance comment for a reference file.

Parameters

sourcePath

string

Returns

string

Inherited from

MarkdownInstructionFormatter.referenceProvenance


referencesMode()

referencesMode(): "none" | "directory" | "inline"

Defined in: formatters/src/markdown-instruction-formatter.ts:173

How this formatter handles skill references. - 'directory': emit as separate files in references/ subdirectory - 'inline': append as sections in the main output file - 'none': references not supported

Returns

"none" | "directory" | "inline"

Inherited from

MarkdownInstructionFormatter.referencesMode


renderCodeFence()

protected renderCodeFence(content, lang?): string

Defined in: formatters/src/base-formatter.ts:939

Render content inside a code fence, using a longer fence if the content itself contains triple backticks (prevents code fence injection).

Parameters

content

string

lang?

string = ''

Returns

string

Inherited from

MarkdownInstructionFormatter.renderCodeFence


renderExamplesSection()

protected renderExamplesSection(ast, renderer, sectionName?): string | null

Defined in: formatters/src/base-formatter.ts:847

Render an examples section from the

Parameters

ast

Program

renderer

ConventionRenderer

sectionName?

string = 'Examples'

Custom section heading name (default: 'Examples')

Returns

string | null

Examples

block. Shared rendering logic used by Claude, GitHub, and MarkdownInstructionFormatter.

Inherited from

MarkdownInstructionFormatter.renderExamplesSection


resolveSkillDir()

protected resolveSkillDir(defaultSkillBasePath, skillName, outputDir?, options?): string

Defined in: formatters/src/base-formatter.ts:734

Resolve the directory for a generated skill, respecting per-target skill base overrides while preserving existing @use ... into behavior.

Parameters

defaultSkillBasePath

string

skillName

string

outputDir?

string

options?

FormatOptions

Returns

string

Inherited from

MarkdownInstructionFormatter.resolveSkillDir


resolveVersion()

protected resolveVersion(version?): MarkdownVersion

Defined in: formatters/src/markdown-instruction-formatter.ts:196

Parameters

version?

string

Returns

MarkdownVersion

Inherited from

MarkdownInstructionFormatter.resolveVersion


restrictions()

protected restrictions(ast, renderer): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:1068

Parameters

ast

Program

renderer

ConventionRenderer

Returns

string | null

Inherited from

MarkdownInstructionFormatter.restrictions


sanitizeResourceFiles()

protected sanitizeResourceFiles(resources, targetDir): FormatterOutput[]

Defined in: formatters/src/base-formatter.ts:768

Filter resource files to only include safe paths. Rejects paths with traversal, absolute paths, and unsafe names.

Parameters

resources

object[] | undefined

targetDir

string

Returns

FormatterOutput[]

Inherited from

MarkdownInstructionFormatter.sanitizeResourceFiles


shortcutSummary()

protected shortcutSummary(value, fallback?): string

Defined in: formatters/src/base-formatter.ts:219

Extract a stable one-line summary from any supported shortcut value.

Parameters

value

Value

fallback?

string = ''

Returns

string

Inherited from

MarkdownInstructionFormatter.shortcutSummary


shouldIncludeSkill()

protected shouldIncludeSkill(name, options?): boolean

Defined in: formatters/src/base-formatter.ts:723

Return true when the target configuration allows emitting the given skill.

Parameters

name

string

options?

FormatOptions

Returns

boolean

Inherited from

MarkdownInstructionFormatter.shouldIncludeSkill


stripAllIndent()

protected stripAllIndent(content): string

Defined in: formatters/src/base-formatter.ts:567

Strip all leading indentation from markdown content. Used for AGENTS.md where content from multiple sources has inconsistent indentation. Preserves indentation inside code blocks.

Parameters

content

string

Returns

string

Inherited from

MarkdownInstructionFormatter.stripAllIndent


techStack()

protected techStack(ast, renderer): string | null

Defined in: formatters/src/markdown-instruction-formatter.ts:719

Parameters

ast

Program

renderer

ConventionRenderer

Returns

string | null

Inherited from

MarkdownInstructionFormatter.techStack


transformInjectedSkillContent()

transformInjectedSkillContent(content): string

Defined in: formatters/src/base-formatter.ts:903

Default pass-through for injected skill content. Formatters whose target tools restrict skill frontmatter (e.g. Factory AI) override this hook to filter unsupported fields before the compiler writes the file.

Parameters

content

string

Returns

string

Inherited from

MarkdownInstructionFormatter.transformInjectedSkillContent


transformRestrictionItem()

protected transformRestrictionItem(s): string

Defined in: formatters/src/markdown-instruction-formatter.ts:394

Parameters

s

string

Returns

string

Inherited from

MarkdownInstructionFormatter.transformRestrictionItem


truncate()

protected truncate(str, max): string

Defined in: formatters/src/base-formatter.ts:132

Truncate string to max length with ellipsis.

Parameters

str

string

max

number

Returns

string

Inherited from

MarkdownInstructionFormatter.truncate


valueToString()

protected valueToString(value): string

Defined in: formatters/src/base-formatter.ts:199

Convert value to string representation.

Parameters

value

Value

Returns

string

Inherited from

MarkdownInstructionFormatter.valueToString


yamlQuoted()

protected yamlQuoted(value): string

Defined in: formatters/src/base-formatter.ts:253

Escape a value for use inside a double-quoted YAML scalar.

Parameters

value

string

Returns

string

Inherited from

MarkdownInstructionFormatter.yamlQuoted


yamlString()

protected yamlString(value): string

Defined in: formatters/src/markdown-instruction-formatter.ts:625

Parameters

value

string

Returns

string

Inherited from

MarkdownInstructionFormatter.yamlString


getSupportedVersions()

static getSupportedVersions(): SimpleFormatterVersions

Defined in: formatters/src/formatters/windsurf.ts:54

Returns

SimpleFormatterVersions