Search by

adachsoft / prompt-manager-lib

Arkadiusz Adach

Manage system prompts with CRUD operations and atomic fragment editing.

Package info

gitlab.com/a.adach/prompt-manager-lib

Issues

pkg:composer/adachsoft/prompt-manager-lib

Statistics

Installs: 5

Dependents: 1

Suggesters: 0

Stars: 0

v0.1.0 2026-11-23 04:14 UTC

This package is auto-updated.

Last update: 2026-11-23 03:14:32 UTC


README

A framework-independent PHP library for managing system prompts through the SystemPromptRepositoryInterface contract. It provides prompt CRUD operations and ordered, atomic edits to raw prompt templates.

Features

  • List, retrieve, create, update, and delete system prompts.
  • Retrieve rendered prompt content or the raw template.
  • Apply validated literal replacements, insertions, and deletions as one edit sequence.
  • Persist an edit sequence once, only after every operation succeeds, and return a unified diff.

Requirements

  • PHP 8.3 or later.
  • An implementation of SystemPromptRepositoryInterface from adachsoft/ai-agent-config-repository.

Installation

Install the library with Composer:

composer require adachsoft/prompt-manager-lib

Usage

Create the manager with PromptManagerFactory, passing your repository implementation. See the usage example for CRUD and template-editing examples.