Skip to content

PromptScript API


Interface: FormatterOutput

Defined in: compiler/src/types.ts:15

Output from a formatter.

Properties

additionalFiles?

optional additionalFiles?: FormatterOutput[]

Defined in: compiler/src/types.ts:32

Additional files to generate (e.g., .cursor/commands/, .github/prompts/)


content

content: string

Defined in: compiler/src/types.ts:19

Formatted content


managedOutputDirectories?

optional managedOutputDirectories?: string[]

Defined in: compiler/src/types.ts:38

Relative directories exclusively managed by this output. Writers may remove obsolete PromptScript-generated files within these directories, but must preserve unmarked files and symlinks.


managedOutputFiles?

optional managedOutputFiles?: string[]

Defined in: compiler/src/types.ts:44

Relative files exclusively managed by this output. Writers may remove an obsolete file only when it carries a PromptScript ownership marker.


merge?

optional merge?: StructuredMergePlan

Defined in: compiler/src/types.ts:23

Structured merge plan for JSON/TOML settings files


mode?

optional mode?: number

Defined in: compiler/src/types.ts:21

File mode (e.g. 0o755 for executable scripts)


path

path: string

Defined in: compiler/src/types.ts:17

Output file path


warnings?

optional warnings?: object[]

Defined in: compiler/src/types.ts:25

Target compatibility warnings produced during formatting

code

code: string

location?

optional location?: SourceLocation

message

message: string

suggestion?

optional suggestion?: string