Skip to content

PromptScript API


Interface: PromptScriptConfig

Defined in: core/src/types/config.ts:188

PromptScript configuration file (promptscript.yaml).

Properties

builds?

optional builds?: Record\<string, BuildProfileConfig>

Defined in: core/src/types/config.ts:336

Named per-command build profiles. Profiles let one repository build multiple instruction artifacts to different target directories without changing the default project compile.


customConventions?

optional customConventions?: Record\<string, OutputConvention>

Defined in: core/src/types/config.ts:385

Custom convention definitions. Register custom conventions that can be referenced by name in targets.


description?

optional description?: string

Defined in: core/src/types/config.ts:196

Project description


extends?

optional extends?: string

Defined in: core/src/types/config.ts:206

Extend another configuration file. Paths are resolved relative to the current config file.

Example

extends: '../base-config.yaml'

formatting?

optional formatting?: FormattingConfig

Defined in: core/src/types/config.ts:363

Formatting configuration. Controls how generated markdown files are formatted.

Example

formatting:
  prettier: true  # Auto-detect .prettierrc

formatting:
  tabWidth: 4
  proseWrap: always

id

id: string

Defined in: core/src/types/config.ts:190

Project identifier


includePromptScriptSkill?

optional includePromptScriptSkill?: boolean

Defined in: core/src/types/config.ts:409

Include the bundled PromptScript language skill in compilation output. When enabled, the SKILL.md that teaches AI agents how to work with .prs files is automatically added to each target's native skill directory.

Default

true

inherit?

optional inherit?: string

Defined in: core/src/types/config.ts:209

Inheritance path


input?

optional input?: object

Defined in: core/src/types/config.ts:215

Input file configuration. Controls which PromptScript files to compile.

entry?

optional entry?: string

Entry file path (defaults to '.promptscript/project.prs')

exclude?

optional exclude?: string[]

Glob patterns for files to exclude

include?

optional include?: string[]

Glob patterns for additional files to include


output?

optional output?: object

Defined in: core/src/types/config.ts:322

Output configuration. Global output settings applied to all targets.

baseDir?

optional baseDir?: string

Base directory for all output files

optional header?: string

Custom header to prepend to generated files

overwrite?

optional overwrite?: boolean

Whether to overwrite existing files without warning


policies?

optional policies?: PolicyDefinition[]

Defined in: core/src/types/config.ts:423

Extension compliance policies


registries?

optional registries?: RegistriesConfig

Defined in: core/src/types/config.ts:301

Named registry aliases for multi-source imports. Maps alias names to Git repository URLs. Coexists with registry - aliases take precedence for matching paths.


registry?

optional registry?: object

Defined in: core/src/types/config.ts:225

Registry configuration

auth?

optional auth?: object

Authentication for HTTP registries

auth.token?

optional token?: string

Token for bearer auth, or "username:password" for basic auth

auth.tokenEnvVar?

optional tokenEnvVar?: string

Environment variable containing the token (alternative to token)

auth.type

type: "bearer" | "basic"

Authentication type

cache?

optional cache?: object

Cache settings

cache.enabled?

optional enabled?: boolean

Whether caching is enabled

cache.ttl?

optional ttl?: number

Cache TTL in milliseconds

git?

optional git?: object

Git repository configuration. When specified, the registry will be cloned from a Git repository.

git.auth?

optional auth?: object

Authentication options for private repositories

git.auth.sshKeyPath?

optional sshKeyPath?: string

Path to SSH key (for SSH auth).

Default
'~/.ssh/id_rsa'
git.auth.token?

optional token?: string

Personal access token (for token auth)

git.auth.tokenEnvVar?

optional tokenEnvVar?: string

Environment variable containing the token

git.auth.type

type: "token" | "ssh"

Authentication type. - 'token': Use a personal access token (PAT) - 'ssh': Use SSH key authentication

git.fallbackUrl?

optional fallbackUrl?: string

Fallback Git URL to try when the primary url fails with an auth error. Useful when the registry references an HTTPS URL but the user authenticates via SSH (or vice versa).

Example
registry:
  git:
    url: 'https://github.com/org/registry.git'
    fallbackUrl: 'git@github.com:org/registry.git'
git.path?

optional path?: string

Subdirectory within the repository to use as registry root.

Example
'registry/'
git.ref?

optional ref?: string

Git ref to checkout (branch, tag, or commit hash).

Default
'main'
git.url

url: string

Git repository URL (HTTPS or SSH)

path?

optional path?: string

Local path to registry

url?

optional url?: string

Remote URL (HTTP registry)


skillTargets?

optional skillTargets?: Record\<string, string>

Defined in: core/src/types/config.ts:350

Per-source output directories for @use imports.

Maps a @use source string (matching the path's raw value) to a relative directory underneath each target's skill output location. An inline into "<path>" on the same @use declaration overrides the configured value.

Example

skillTargets:
  "github.com/coreyhaines31/marketingskills/skills/seo-audit": "skills/seo-audit"

syntax

syntax: string

Defined in: core/src/types/config.ts:193

PromptScript syntax version


targets?

optional targets?: TargetEntry[]

Defined in: core/src/types/config.ts:379

Output targets.

Optional only when every target lives in a named build profile: such builds-only projects compile through --build <name> or --all-builds.

Can be simple names or objects with configuration:

Example

targets:
  - github
  - claude:
      convention: markdown
      output: custom/CLAUDE.md

telemetry?

optional telemetry?: boolean

Defined in: core/src/types/config.ts:199

Enable anonymous aggregate usage telemetry for this project


universalDir?

optional universalDir?: string | boolean

Defined in: core/src/types/config.ts:401

Universal directory for auto-discovering skills and commands. Skills are discovered from <universalDir>/skills/ and commands from <universalDir>/commands/.

  • true or omitted: Use default .agents/ directory
  • false: Disable universal directory discovery
  • string: Custom path (relative to project root)

Default

'.agents'

Example

universalDir: true           # Use .agents/ (default)
universalDir: '.my-agents'   # Custom directory
universalDir: false          # Disable

validation?

optional validation?: object

Defined in: core/src/types/config.ts:412

Validation settings

guardRequiresDepth?

optional guardRequiresDepth?: number

Maximum depth for recursive guard requires resolution. Default: 3. Must be >= 1. Values <= 0 are clamped to 1 by the resolver.

requiredGuards?

optional requiredGuards?: string[]

rules?

optional rules?: Record\<string, "error" | "warning" | "off">


watch?

optional watch?: object

Defined in: core/src/types/config.ts:307

Watch mode configuration. Settings for prs compile --watch.

clearScreen?

optional clearScreen?: boolean

Clear screen before each recompilation

debounce?

optional debounce?: number

Debounce time in milliseconds before recompiling

exclude?

optional exclude?: string[]

Glob patterns for files to ignore

include?

optional include?: string[]

Glob patterns for files to watch (defaults to '**/*.prs')