Skip to content

Preset/overlay system: org and project-level component customization #135

@Alan-Jowett

Description

@Alan-Jowett

Summary

Add a preset/overlay system that lets organizations and projects customize PromptKit components (personas, protocols, formats, templates) without forking the core library — using a priority-based resolution stack.

Motivation

GitHub Spec Kit has a mature preset system with a clean design:

  • Resolution stack: project overrides > org presets > extension templates > core templates
  • Priority-based: Multiple presets stack with explicit priority ordering (lower number wins)
  • Runtime resolution: Templates resolved dynamically on every lookup — presets can be added/removed without rebuilding
  • Dual catalogs: Official (curated, install-allowed) + community (discoverable, explicit install)
  • Scaffolding: Template directory for creating new presets

This solves a real PromptKit need. Today, organizations that want to:

  • Replace systems-engineer with their own domain-specific persona
  • Add company-specific guardrail protocols (""always use our internal auth library"")
  • Customize the requirements-doc format with additional sections

...must either fork the repo or manually edit assembled output every time.

Proposed Design

PromptKit's ""code"" is all Markdown/YAML, so the preset system can be much simpler than Spec Kit's Python-based implementation:

  1. Resolution stack for component lookup during assembly:

    Priority 1: .promptkit/overrides/{type}/{name}.md    (project-local)
    Priority 2: .promptkit/presets/{preset-id}/{type}/    (installed presets)
    Priority 3: {promptkit-repo}/{type}/{name}.md         (core library)
    
  2. Preset manifest (preset.yaml):

    name: acme-corp-standards
    version: 1.0.0
    description: ACME Corp engineering standards overlay
    overrides:
      personas: [systems-engineer]
      protocols: [operational-constraints]
      formats: [requirements-doc]
    adds:
      protocols: [acme-security-review]
  3. CLI support: npx promptkit preset add <path-or-url>

  4. Catalog (future): A community catalog of preset packs for specific domains (embedded systems, web development, data engineering, etc.)

Credit

This pattern is directly inspired by GitHub Spec Kit's preset system. See their presets/ARCHITECTURE.md for the resolution stack design and presets/README.md for the CLI interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions