adachsoft / prompt-manager-lib
Manage system prompts with CRUD operations and atomic fragment editing.
v0.1.0
2026-11-23 04:14 UTC
Requires
- php: ^8.3
- adachsoft/ai-agent-config-repository: ^0.6
- adachsoft/collection: ^3.0
- adachsoft/text-editor: ^0.1.0
Requires (Dev)
- adachsoft/php-code-style: ^0.7.3
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.3
- phpunit/phpunit: ^12.5
- rector/rector: ^2.8
- symplify/phpstan-rules: ^14.19
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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
SystemPromptRepositoryInterfacefromadachsoft/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.