diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2040171..0a8e3b7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,36 +11,75 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
+- Renamed the package from `veeqtoh/prompt-deck` to `promptphp/deck`.
+- Renamed the PHP namespace from `Veeqtoh\PromptDeck` to `PromptPHP\Deck`.
+- Renamed the public package identity from Prompt Deck to Deck by PromptPHP.
+- Updated installation, usage, README, badges, documentation links, and package metadata to reflect the new PromptPHP organisation.
+
### Removed
+- Removed the old `Veeqtoh\PromptDeck` public namespace.
+- Removed old Prompt Deck naming from the main public API.
+
+## [0.3.1] - 2026-05-17
+
+### Added
+
+- Mintlify documentation structure under the `docs` directory. [#5](https://github.com/promptphp/deck/pull/5)
+- Documentation configuration, navigation, logo assets, favicon, and landing page content for the docs site.
+- Dedicated documentation pages for installation, configuration, commands, prompt management, Laravel AI SDK integration, tracking, testing, and API reference.
+
+### Changed
+
+- Reworked the documentation from flat markdown files into organised Mintlify MDX pages.
+- Updated documentation navigation and internal links for the new docs structure.
+- Updated README logo/banner display and package badges. [#6](https://github.com/promptphp/deck/pull/6)
+- Updated documentation copy and spelling consistency.
+
+### Fixed
+
+- Fixed stale documentation links and docs navigation paths.
+- Fixed README badge markup and logo references.
+
## [0.2.1] - 2026-03-28
### Added
-- This CHANGELOG file to hopefully serve as an evolving CHANGELOG.
+- This CHANGELOG file to document project updates.
- GitHub Actions workflow for automated testing.
- `.gitattributes` file to manage text file handling and export-ignore rules.
+- Laravel News feature badge in the README.
+
+### Changed
+
+- Refined Composer package keywords for better clarity and discoverability.
### Fixed
-- README and documentation.
+- README and documentation updates.
## [0.2.0] - 2026-03-27
### Added
-- Support for Laravel 13. [#3](https://github.com/veeqtoh/prompt-deck/pull/3)
-- Configuration option to toggle auto-scaffolding of prompts on agent creation
-- This CHANGELOG file to hopefully serve as an evolving CHANGELOG.
+- Support for Laravel 13. [#3](https://github.com/promptphp/deck/pull/3)
+- Configuration option to toggle auto-scaffolding of prompts on agent creation.
### Fixed
-- README and documentation.
+- README and documentation updates.
## [0.1.0] - 2026-03-04
### Added
-- First version. [#1](https://github.com/veeqtoh/prompt-deck/pull/1)
+- First version. [#1](https://github.com/promptphp/deck/pull/1)
+- Core versioned prompt management.
+- File-based prompt storage using structured prompt directories.
+- Variable interpolation for prompt templates.
+- Artisan commands for creating, listing, testing, diffing, and activating prompts.
+- Prompt execution tracking support.
+- A/B testing support through versioned prompt activation and tracking.
+- Optional Laravel AI SDK integration.
- README documenting the package.
-- Link to package's full documentation: [full documentation](https://vu-ddaf4ff3.mintlify.app/).
+- Link to the package's full documentation.
\ No newline at end of file
diff --git a/README.md b/README.md
index 8d0e3ad..8844866 100644
--- a/README.md
+++ b/README.md
@@ -1,37 +1,53 @@
## Introduction
-Prompt Deck helps you organise your AI Agents instructions as structured, version-controlled files, making it easy to iterate, compare, and activate prompt versions across your Laravel / PHP application. It provides variable interpolation, performance tracking, A/B testing, and optional seamless integration with the Laravel AI SDK.
+Deck, formerly Prompt Deck, provides AI prompt management for Laravel and PHP.
+
+Organise your AI agent instructions as versioned files, compare prompt performance, and activate the right version across your app with variable interpolation, tracking, A/B testing, and Laravel AI SDK integration.
+
+> [!IMPORTANT]
+> Prompt Deck is now **Deck by PromptPHP**.
+>
+> From `v0.4.0`, the package moved from `veeqtoh/prompt-deck` to `promptphp/deck`, and the namespace changed from `Veeqtoh\PromptDeck` to `PromptPHP\Deck`.
+>
+> Upgrading from `v0.3.x`? See the [upgrade guide](UPGRADE.md).
## Quick Start
### Installation
```bash
-composer require veeqtoh/prompt-deck
+composer require promptphp/deck
```
Publish the config and migrations
```bash
-php artisan vendor:publish --provider="Veeqtoh\PromptDeck\Providers\PromptDeckServiceProvider"
+php artisan vendor:publish --provider="PromptPHP\Deck\Providers\DeckServiceProvider"
# Run migrations.
php artisan migrate
```
+
### Creating a Prompt
Use the Artisan command to create a versioned prompt
@@ -42,7 +58,7 @@ php artisan make:prompt order-summary
This creates the following structure
-```
+```txt
resources/prompts/
└── order-summary/
├── v1/
@@ -59,19 +75,19 @@ Summarise the following order for the customer: {{ $order }}.
### Using a Prompt
-Load and render prompts with the `PromptDeck` facade
+Load and render prompts with the `Deck` facade
```php
-use Veeqtoh\PromptDeck\Facades\PromptDeck;
+use PromptPHP\Deck\Facades\Deck;
-// Load the active version of a prompt
-$prompt = PromptDeck::get('order-summary');
+// Load the active version of a prompt.
+$prompt = Deck::get('order-summary');
-// Render a role with variables
+// Render a role with variables.
$prompt->system(['tone' => 'friendly', 'order' => $orderDetails]);
// "You are a friendly customer service agent. Summarise the following order..."
-// Build a messages array ready for any chat-completion API
+// Build a messages array ready for any chat-completion API.
$messages = $prompt->toMessages(['tone' => 'friendly', 'order' => $orderDetails]);
// [['role' => 'system', 'content' => '...']]
```
@@ -94,7 +110,7 @@ php artisan prompt:activate order-summary v2
Or load a specific version programmatically
```php
-$prompt = PromptDeck::get('order-summary', 'v2');
+$prompt = Deck::get('order-summary', 'v2');
```
### Laravel AI SDK Integration
@@ -102,7 +118,7 @@ $prompt = PromptDeck::get('order-summary', 'v2');
If you use the [Laravel AI SDK](https://laravel.com/docs/ai-sdk), add the `HasPromptTemplate` trait to your agents. This way, you do not need to define the `instructions()` method as it is provided automatically.
```php
-use Veeqtoh\PromptDeck\Concerns\HasPromptTemplate;
+use PromptPHP\Deck\Concerns\HasPromptTemplate;
class OrderAgent extends Agent
{
@@ -120,24 +136,24 @@ For the complete guide, see the [full documentation](#documentation) below.
## Documentation
-Full documentation can be found on the [Prompt Deck website](https://vu-ddaf4ff3.mintlify.app/) or the [docs](docs/) directory on GitHub.
+Full documentation can be found at [https://deck.promptphp.com/](https://deck.promptphp.com/) or the [docs](docs/) directory on GitHub.
## Contributing
-Thank you for considering contributing to Prompt Deck! Please open an issue or submit a pull request on [GitHub](https://github.com/veeqtoh/prompt-deck).
+Thank you for considering contributing to Deck by PromptPHP. Please open an issue or submit a pull request on [GitHub](https://github.com/promptphp/deck).
## Code of Conduct
-While we aren't affiliated with Laravel, we follow the Laravel [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). We expect you to abide by these guidelines as well.
+We follow the Laravel [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct). We expect you to abide by these guidelines as well.
## Security Vulnerabilities
-If you discover a security vulnerability within Prompt Deck, please email Victor Ukam at [victorjohnukam@gmail.com](victorjohnukam@gmail.com). All security vulnerabilities will be addressed promptly.
+If you discover a security vulnerability within Deck by PromptPHP, please email Victor Ukam at [victorjohnukam@gmail.com](victorjohnukam@gmail.com). All security vulnerabilities will be addressed promptly.
## License
-Prompt Deck is open-sourced software licensed under the [MIT license](LICENSE).
+Deck by PromptPHP is open-sourced software licensed under the [MIT license](LICENSE).
## Support
-This library is created by [Victor Ukam](https://victorukam.com) with contributions from the [Open Source Community](https://github.com/veeqtoh/prompt-deck/graphs/contributors). If you've found this package useful, please consider [sponsoring this project](https://github.com/sponsors/veeqtoh). It will go a long way to help with maintenance.
+This library is created by [Victor Ukam](https://victorukam.com) with contributions from the [Open Source Community](https://github.com/promptphp/deck/graphs/contributors). If you've found this package useful, please consider [sponsoring this project](https://github.com/sponsors/veeqtoh). It will go a long way to help with maintenance.
diff --git a/UPGRADE.md b/UPGRADE.md
new file mode 100644
index 0000000..e25a65a
--- /dev/null
+++ b/UPGRADE.md
@@ -0,0 +1,162 @@
+# Upgrade Guide
+
+- [Update Composer](#update-composer)
+- [Update namespaces](#update-namespaces)
+- [Update Laravel AI SDK trait imports](#update-laravel-ai-sdk-trait-imports)
+- [Update config publishing](#update-config-publishing)
+- [Update environment variables](#update-environment-variables)
+- [Clear Laravel caches](#clear-laravel-caches)
+- [Database notes](#database-notes)
+
+## Upgrading from Prompt Deck `v0.3.x` to Deck `v0.4.0`
+
+Deck `v0.4.0` is a breaking release.
+
+The package has moved from `veeqtoh/prompt-deck` to `promptphp/deck`, and the PHP namespace has changed from `Veeqtoh\PromptDeck` to `PromptPHP\Deck`.
+
+## 1. Update Composer
+
+Remove the old package:
+
+```bash
+composer remove veeqtoh/prompt-deck
+```
+
+Install the new package:
+
+```bash
+composer require promptphp/deck:^0.4
+```
+
+## 2. Update namespaces
+
+Replace:
+
+```php
+Veeqtoh\PromptDeck
+```
+
+with:
+
+```php
+PromptPHP\Deck
+```
+
+Common replacements:
+
+```php
+use Veeqtoh\PromptDeck\Facades\PromptDeck;
+```
+
+becomes:
+
+```php
+use PromptPHP\Deck\Facades\Deck;
+```
+
+And usage changes from:
+
+```php
+$prompt = PromptDeck::get('order-summary');
+```
+
+to:
+
+```php
+$prompt = Deck::get('order-summary');
+```
+
+## 3. Update Laravel AI SDK trait imports
+
+Replace:
+
+```php
+use Veeqtoh\PromptDeck\Concerns\HasPromptTemplate;
+```
+
+with:
+
+```php
+use PromptPHP\Deck\Concerns\HasPromptTemplate;
+```
+
+## 4. Update config publishing
+
+>> [!IMPORTANT]
+> The config file is now changed from **prompt-deck.php** to **deck.php**.
+
+If you previously published the config file, simply republish the config:
+
+```bash
+php artisan vendor:publish --tag=deck-config
+```
+
+or rename from
+
+```bash
+config/prompt-deck.php
+```
+
+to:
+
+```bash
+config/deck.php
+```
+
+## 5. Update environment variables
+
+Replace old `PROMPTDECK_*` variables with `DECK_*`.
+
+```txt
+PROMPTDECK_CACHE_ENABLED=true
+PROMPTDECK_CACHE_STORE=file
+PROMPTDECK_CACHE_TTL=3600
+PROMPTDECK_CACHE_PREFIX=prompt-deck:
+PROMPTDECK_TRACKING_ENABLED=true
+PROMPTDECK_DB_CONNECTION=null
+PROMPTDECK_SCAFFOLD_ON_MAKE_AGENT=true
+```
+
+becomes:
+
+```txt
+DECK_CACHE_ENABLED=true
+DECK_CACHE_STORE=file
+DECK_CACHE_TTL=3600
+DECK_CACHE_PREFIX=deck:
+DECK_TRACKING_ENABLED=true
+DECK_DB_CONNECTION=null
+DECK_SCAFFOLD_ON_MAKE_AGENT=true
+```
+
+## 6. Clear Laravel caches
+
+```bash
+php artisan optimize:clear
+composer dump-autoload
+```
+
+## 7. Database notes
+
+No database table migration is required for the rename.
+
+The existing tracking tables remain:
+
+```txt
+prompt_versions
+prompt_executions
+```
+
+These table names describe the domain concept, not the old package name, so they are intentionally unchanged.
+
+### Summary of changes
+
+| Old | New |
+| --------------------------- | --------------------- |
+| `veeqtoh/prompt-deck` | `promptphp/deck` |
+| `Veeqtoh\PromptDeck` | `PromptPHP\Deck` |
+| `PromptDeck` facade | `Deck` facade |
+| `PromptDeckServiceProvider` | `DeckServiceProvider` |
+| `config/prompt-deck.php` | `config/deck.php` |
+| `config('prompt-deck.*')` | `config('deck.*')` |
+| `PROMPTDECK_*` env vars | `DECK_*` env vars |
diff --git a/composer.json b/composer.json
index 40e3bba..719f239 100644
--- a/composer.json
+++ b/composer.json
@@ -1,12 +1,12 @@
{
- "name": "veeqtoh/prompt-deck",
- "description": "A Laravel package that adds versioned, file-based prompt management with variable interpolation, performance tracking, A/B testing, and optional seamless integration with the Laravel AI SDK.",
+ "name": "promptphp/deck",
+ "description": "Deck is a Laravel and PHP package for versioned, file-based AI prompt management with variable interpolation, performance tracking, A/B testing, and optional Laravel AI SDK integration.",
"type": "library",
- "homepage": "https://github.com/veeqtoh/prompt-deck",
+ "homepage": "https://github.com/promptphp/deck",
"license": "MIT",
"support": {
- "issues": "https://github.com/veeqtoh/prompt-deck/issues",
- "source": "https://github.com/veeqtoh/prompt-deck"
+ "issues": "https://github.com/promptphp/deck/issues",
+ "source": "https://github.com/promptphp/deck"
},
"authors": [
{
@@ -15,20 +15,20 @@
}
],
"keywords": [
+ "promptphp",
+ "deck",
+ "prompt-deck",
"ai",
- "laravel",
- "laravel-package",
- "laravel-ai",
- "laravel-ai-sdk",
- "agentic-prompting",
- "agentic-ai",
+ "prompts",
"prompt-management",
"versioned-prompts",
"file-based-prompts",
"variable-interpolation",
"performance-tracking",
"ab-testing",
- "victor-ukam"
+ "laravel",
+ "laravel-ai",
+ "laravel-package"
],
"require": {
"php": "^8.2",
@@ -50,23 +50,23 @@
},
"autoload": {
"psr-4": {
- "Veeqtoh\\PromptDeck\\": "src/",
- "Veeqtoh\\PromptDeck\\Database\\Factories\\": "src/database/factories/",
- "Veeqtoh\\PromptDeck\\Database\\Seeders\\": "src/database/seeders/"
+ "PromptPHP\\Deck\\": "src/",
+ "PromptPHP\\Deck\\Database\\Factories\\": "src/database/factories/",
+ "PromptPHP\\Deck\\Database\\Seeders\\": "src/database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
- "Veeqtoh\\PromptDeck\\Tests\\": "tests/"
+ "PromptPHP\\Deck\\Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"providers": [
- "Veeqtoh\\PromptDeck\\Providers\\PromptDeckServiceProvider"
+ "PromptPHP\\Deck\\Providers\\DeckServiceProvider"
],
"aliases": {
- "PromptDeck": "Veeqtoh\\PromptDeck\\Facades\\PromptDeck"
+ "PromptDeck": "PromptPHP\\Deck\\Facades\\Deck"
}
}
},
diff --git a/config/prompt-deck.php b/config/deck.php
similarity index 77%
rename from config/prompt-deck.php
rename to config/deck.php
index 6c82ed0..40a7d54 100644
--- a/config/prompt-deck.php
+++ b/config/deck.php
@@ -43,10 +43,10 @@
|
*/
'cache' => [
- 'enabled' => env('PROMPTDECK_CACHE_ENABLED', env('APP_DEBUG', false) ? false : true),
- 'store' => env('PROMPTDECK_CACHE_STORE', 'file'), // null to use default cache
- 'ttl' => env('PROMPTDECK_CACHE_TTL', 3600), // seconds
- 'prefix' => env('CACHE_PREFIX', env('PROMPTDECK_CACHE_PREFIX', 'prompt-deck:')),
+ 'enabled' => env('DECK_CACHE_ENABLED', env('APP_DEBUG', false) ? false : true),
+ 'store' => env('DECK_CACHE_STORE', 'file'), // null to use default cache
+ 'ttl' => env('DECK_CACHE_TTL', 3600), // seconds
+ 'prefix' => env('CACHE_PREFIX', env('DECK_CACHE_PREFIX', 'deck:')),
],
/*
@@ -59,8 +59,8 @@
|
*/
'tracking' => [
- 'enabled' => env('PROMPTDECK_TRACKING_ENABLED', env('APP_DEBUG', false) ? false : true),
- 'connection' => env('PROMPTDECK_DB_CONNECTION'), // null for default
+ 'enabled' => env('DECK_TRACKING_ENABLED', env('APP_DEBUG', false) ? false : true),
+ 'connection' => env('DECK_DB_CONNECTION'), // null for default
],
/*
@@ -69,9 +69,9 @@
|--------------------------------------------------------------------------
|
| When the Laravel AI SDK is installed and this option is enabled,
- | PromptDeck will automatically create a matching prompt directory
+ | Deck will automatically create a matching prompt directory
| whenever you run `php artisan make:agent`. Set to false to disable.
|
*/
- 'scaffold_on_make_agent' => env('PROMPTDECK_SCAFFOLD_ON_MAKE_AGENT', true),
+ 'scaffold_on_make_agent' => env('DECK_SCAFFOLD_ON_MAKE_AGENT', true),
];
diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md
index e0be1d4..fd2e6ef 100644
--- a/docs/CONTRIBUTING.md
+++ b/docs/CONTRIBUTING.md
@@ -1,6 +1,6 @@
# Contribute to the documentation
-Thank you for your interest in contributing to Prompt Deck's documentation! This guide will help you get started.
+Thank you for your interest in contributing to the documentation. This guide will help you get started.
## How to contribute
diff --git a/docs/LICENSE b/docs/LICENSE
deleted file mode 100644
index 5411374..0000000
--- a/docs/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2023 Mintlify
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
diff --git a/docs/advanced/api-reference.mdx b/docs/advanced/api-reference.mdx
index 87560fe..eb884dd 100644
--- a/docs/advanced/api-reference.mdx
+++ b/docs/advanced/api-reference.mdx
@@ -1,11 +1,11 @@
---
title: "API reference"
-description: "Complete class and method reference for Prompt Deck."
+description: "Complete class and method reference for Deck by PromptPHP."
---
## PromptManager
-`Veeqtoh\PromptDeck\PromptManager`
+`PromptPHP\Deck\PromptManager`
The core service class responsible for loading, caching, versioning, and tracking prompts. Registered as a singleton in the service container.
@@ -96,7 +96,7 @@ $manager->track('order-summary', 2, [
## PromptTemplate
-`Veeqtoh\PromptDeck\PromptTemplate`
+`PromptPHP\Deck\PromptTemplate`
Represents a loaded prompt with its roles, metadata, and interpolation capabilities. Implements `Illuminate\Contracts\Support\Arrayable`.
@@ -212,9 +212,9 @@ $prompt->custom_role(); // renders 'custom_role' role
---
-## PromptDeck facade
+## Deck facade
-`Veeqtoh\PromptDeck\Facades\PromptDeck`
+`PromptPHP\Deck\Facades\Deck`
Static proxy to the `PromptManager` singleton.
@@ -222,19 +222,19 @@ Static proxy to the `PromptManager` singleton.
| Method | Returns | Description |
| ------------------------------------------------------------ | ---------------- | ------------------------------------------- |
-| `PromptDeck::get(string $name, ?int $version = null)` | `PromptTemplate` | Load a prompt by name and optional version. |
-| `PromptDeck::active(string $name)` | `PromptTemplate` | Load the active version of a prompt. |
-| `PromptDeck::versions(string $name)` | `array` | List all versions for a prompt. |
-| `PromptDeck::activate(string $name, int $version)` | `bool` | Activate a specific version. |
-| `PromptDeck::track(string $name, int $version, array $data)` | `void` | Record a prompt execution. |
+| `Deck::get(string $name, ?int $version = null)` | `PromptTemplate` | Load a prompt by name and optional version. |
+| `Deck::active(string $name)` | `PromptTemplate` | Load the active version of a prompt. |
+| `Deck::versions(string $name)` | `array` | List all versions for a prompt. |
+| `Deck::activate(string $name, int $version)` | `bool` | Activate a specific version. |
+| `Deck::track(string $name, int $version, array $data)` | `void` | Record a prompt execution. |
---
## HasPromptTemplate trait
-`Veeqtoh\PromptDeck\Concerns\HasPromptTemplate`
+`PromptPHP\Deck\Concerns\HasPromptTemplate`
-Trait for integrating Prompt Deck templates with Laravel AI SDK agents.
+Trait for integrating Deck templates with Laravel AI SDK agents.
### Methods
@@ -274,7 +274,7 @@ Clear the cached `PromptTemplate`, forcing a fresh load on next access. Returns
## TrackPromptMiddleware
-`Veeqtoh\PromptDeck\Ai\TrackPromptMiddleware`
+`PromptPHP\Deck\Ai\TrackPromptMiddleware`
Laravel AI SDK agent middleware that automatically tracks prompt executions.
@@ -290,9 +290,9 @@ Only tracks agents that use the `HasPromptTemplate` trait (i.e. agents with a `p
## AfterMakeAgent listener
-`Veeqtoh\PromptDeck\Listeners\AfterMakeAgent`
+`PromptPHP\Deck\Listeners\AfterMakeAgent`
-Listens for the Laravel AI SDK's `make:agent` command and automatically scaffolds a corresponding Prompt Deck prompt.
+Listens for the Laravel AI SDK's `make:agent` command and automatically scaffolds a corresponding Deck prompt.
### Methods
@@ -306,7 +306,7 @@ Handle the `CommandFinished` event. Only acts on successful `make:agent` command
### PromptVersion
-`Veeqtoh\PromptDeck\Models\PromptVersion`
+`PromptPHP\Deck\Models\PromptVersion`
| Attribute | Type | Cast | Description |
| --------------- | -------------- | --------- | ----------------------------------- |
@@ -319,7 +319,7 @@ Handle the `CommandFinished` event. Only acts on successful `make:agent` command
### PromptExecution
-`Veeqtoh\PromptDeck\Models\PromptExecution`
+`PromptPHP\Deck\Models\PromptExecution`
| Attribute | Type | Cast | Description |
| ---------------- | -------------- | ----------- | ------------------------ |
@@ -338,17 +338,17 @@ Handle the `CommandFinished` event. Only acts on successful `make:agent` command
## Exceptions
-All Prompt Deck exceptions extend the base `PromptDeckException` class.
+All Deck exceptions extend the base `DeckException` class.
-### PromptDeckException
+### DeckException
-`Veeqtoh\PromptDeck\Exceptions\PromptDeckException`
+`PromptPHP\Deck\Exceptions\DeckException`
-Abstract base exception for all Prompt Deck errors. Extends PHP's `Exception` class.
+Abstract base exception for all Deck errors. Extends PHP's `Exception` class.
### PromptNotFoundException
-`Veeqtoh\PromptDeck\Exceptions\PromptNotFoundException`
+`PromptPHP\Deck\Exceptions\PromptNotFoundException`
Thrown when a prompt directory does not exist.
@@ -358,7 +358,7 @@ Thrown when a prompt directory does not exist.
### InvalidVersionException
-`Veeqtoh\PromptDeck\Exceptions\InvalidVersionException`
+`PromptPHP\Deck\Exceptions\InvalidVersionException`
Thrown when a requested version does not exist or no versions are found.
@@ -369,9 +369,9 @@ Thrown when a requested version does not exist or no versions are found.
### ConfigurationException
-`Veeqtoh\PromptDeck\Exceptions\ConfigurationException`
+`PromptPHP\Deck\Exceptions\ConfigurationException`
-Thrown when Prompt Deck configuration is invalid.
+Thrown when Deck configuration is invalid.
| Factory Method | Description |
| --------------------------------- | ------------------------------------------------------------------------------------------------ |
@@ -379,7 +379,7 @@ Thrown when Prompt Deck configuration is invalid.
### PromptRenderingException
-`Veeqtoh\PromptDeck\Exceptions\PromptRenderingException`
+`PromptPHP\Deck\Exceptions\PromptRenderingException`
Thrown when prompt rendering fails.
diff --git a/docs/advanced/testing.mdx b/docs/advanced/testing.mdx
index 4c56e3d..132e386 100644
--- a/docs/advanced/testing.mdx
+++ b/docs/advanced/testing.mdx
@@ -1,11 +1,11 @@
---
-title: "Testing"
+title: "Testing"php
description: "Testing strategies and examples for prompts, commands, tracking, and AI SDK integration."
---
## Introduction
-Prompt Deck is designed to be easily testable. This guide covers strategies for testing prompts, commands, tracking, and AI SDK integration in your Laravel application.
+Deck by PromptPHP is designed to be easily testable. This guide covers strategies for testing prompts, commands, tracking, and AI SDK integration in your Laravel application.
## Setting up tests
@@ -19,21 +19,21 @@ If you're using Orchestra Testbench (recommended for package testing), register
namespace Tests;
use Orchestra\Testbench\TestCase as BaseTestCase;
-use Veeqtoh\PromptDeck\Providers\PromptDeckServiceProvider;
+use PromptPHP\Deck\Providers\DeckServiceProvider;
abstract class TestCase extends BaseTestCase
{
protected function getPackageProviders($app): array
{
return [
- PromptDeckServiceProvider::class,
+ DeckServiceProvider::class,
];
}
protected function getPackageAliases($app): array
{
return [
- 'PromptDeck' => \Veeqtoh\PromptDeck\Facades\PromptDeck::class,
+ 'Deck' => \PromptPHP\Deck\Facades\Deck::class,
];
}
}
@@ -46,9 +46,9 @@ For most tests, disable caching and tracking to avoid side effects:
```php
protected function defineEnvironment($app): void
{
- $app['config']->set('prompt-deck.cache.enabled', false);
- $app['config']->set('prompt-deck.tracking.enabled', false);
- $app['config']->set('prompt-deck.path', $this->getFixturePath('prompts'));
+ $app['config']->set('deck.cache.enabled', false);
+ $app['config']->set('deck.tracking.enabled', false);
+ $app['config']->set('deck.path', $this->getFixturePath('prompts'));
}
protected function getFixturePath(string $path = ''): string
@@ -90,29 +90,29 @@ Summarise this order: {{ $input }}
### Testing prompt loading
```php
-use Veeqtoh\PromptDeck\Facades\PromptDeck;
+use PromptPHP\Deck\Facades\Deck;
it('loads a prompt by name', function () {
- $prompt = PromptDeck::get('order-summary', 1);
+ $prompt = Deck::get('order-summary', 1);
expect($prompt->name())->toBe('order-summary');
expect($prompt->version())->toBe(1);
});
it('throws when prompt does not exist', function () {
- PromptDeck::get('non-existent');
-})->throws(\Veeqtoh\PromptDeck\Exceptions\PromptNotFoundException::class);
+ Deck::get('non-existent');
+})->throws(\PromptPHP\Deck\Exceptions\PromptNotFoundException::class);
it('throws when version does not exist', function () {
- PromptDeck::get('order-summary', 999);
-})->throws(\Veeqtoh\PromptDeck\Exceptions\InvalidVersionException::class);
+ Deck::get('order-summary', 999);
+})->throws(\PromptPHP\Deck\Exceptions\InvalidVersionException::class);
```
### Testing variable interpolation
```php
it('interpolates variables in prompt content', function () {
- $prompt = PromptDeck::get('order-summary', 1);
+ $prompt = Deck::get('order-summary', 1);
$content = $prompt->system(['tone' => 'friendly']);
@@ -121,7 +121,7 @@ it('interpolates variables in prompt content', function () {
});
it('leaves unmatched placeholders intact', function () {
- $prompt = PromptDeck::get('order-summary', 1);
+ $prompt = Deck::get('order-summary', 1);
$content = $prompt->system([]);
@@ -133,26 +133,26 @@ it('leaves unmatched placeholders intact', function () {
```php
it('lists available roles', function () {
- $prompt = PromptDeck::get('order-summary', 1);
+ $prompt = Deck::get('order-summary', 1);
expect($prompt->roles())->toContain('system', 'user');
});
it('checks if a role exists', function () {
- $prompt = PromptDeck::get('order-summary', 1);
+ $prompt = Deck::get('order-summary', 1);
expect($prompt->has('system'))->toBeTrue();
expect($prompt->has('nonexistent'))->toBeFalse();
});
it('returns empty string for missing roles', function () {
- $prompt = PromptDeck::get('order-summary', 1);
+ $prompt = Deck::get('order-summary', 1);
expect($prompt->role('nonexistent'))->toBe('');
});
it('gets raw content without interpolation', function () {
- $prompt = PromptDeck::get('order-summary', 1);
+ $prompt = Deck::get('order-summary', 1);
$raw = $prompt->raw('system');
@@ -164,7 +164,7 @@ it('gets raw content without interpolation', function () {
```php
it('builds messages array for AI APIs', function () {
- $prompt = PromptDeck::get('order-summary', 1);
+ $prompt = Deck::get('order-summary', 1);
$messages = $prompt->toMessages(['tone' => 'friendly', 'input' => 'Order #123']);
@@ -174,7 +174,7 @@ it('builds messages array for AI APIs', function () {
});
it('filters messages to specific roles', function () {
- $prompt = PromptDeck::get('order-summary', 1);
+ $prompt = Deck::get('order-summary', 1);
$messages = $prompt->toMessages([], ['system']);
@@ -188,11 +188,11 @@ it('filters messages to specific roles', function () {
You can mock the facade in tests where you don't want filesystem access:
```php
-use Veeqtoh\PromptDeck\Facades\PromptDeck;
-use Veeqtoh\PromptDeck\PromptTemplate;
+use PromptPHP\Deck\Facades\Deck;
+use PromptPHP\Deck\PromptTemplate;
it('uses a mocked prompt', function () {
- PromptDeck::shouldReceive('get')
+ Deck::shouldReceive('get')
->with('order-summary', null)
->andReturn(new PromptTemplate(
'order-summary',
@@ -201,7 +201,7 @@ it('uses a mocked prompt', function () {
['description' => 'Test prompt']
));
- $prompt = PromptDeck::get('order-summary');
+ $prompt = Deck::get('order-summary');
expect($prompt->system())->toBe('You are a helpful assistant.');
});
@@ -211,7 +211,7 @@ it('uses a mocked prompt', function () {
```php
it('lists all versions for a prompt', function () {
- $versions = PromptDeck::versions('order-summary');
+ $versions = Deck::versions('order-summary');
expect($versions)->toBeArray();
expect($versions[0])->toHaveKey('version');
@@ -219,7 +219,7 @@ it('lists all versions for a prompt', function () {
it('activates a specific version', function () {
// With tracking disabled, this writes to metadata.json
- $result = PromptDeck::activate('order-summary', 1);
+ $result = Deck::activate('order-summary', 1);
expect($result)->toBeTrue();
});
@@ -232,7 +232,7 @@ When testing tracking, enable it and run the migrations in your test setup:
```php
protected function defineEnvironment($app): void
{
- $app['config']->set('prompt-deck.tracking.enabled', true);
+ $app['config']->set('deck.tracking.enabled', true);
$app['config']->set('database.default', 'testing');
}
@@ -243,10 +243,10 @@ protected function defineDatabaseMigrations(): void
```
```php
-use Veeqtoh\PromptDeck\Models\PromptExecution;
+use PromptPHP\Deck\Models\PromptExecution;
it('tracks prompt executions', function () {
- PromptDeck::track('order-summary', 1, [
+ Deck::track('order-summary', 1, [
'input' => ['message' => 'test'],
'output' => 'response',
'tokens' => 100,
@@ -258,9 +258,9 @@ it('tracks prompt executions', function () {
});
it('does not track when disabled', function () {
- config(['prompt-deck.tracking.enabled' => false]);
+ config(['deck.tracking.enabled' => false]);
- PromptDeck::track('order-summary', 1, ['tokens' => 50]);
+ Deck::track('order-summary', 1, ['tokens' => 50]);
expect(PromptExecution::count())->toBe(0);
});
@@ -271,8 +271,8 @@ it('does not track when disabled', function () {
Use the included factories to seed test data:
```php
-use Veeqtoh\PromptDeck\Models\PromptVersion;
-use Veeqtoh\PromptDeck\Models\PromptExecution;
+use PromptPHP\Deck\Models\PromptVersion;
+use PromptPHP\Deck\Models\PromptExecution;
it('queries execution data', function () {
PromptExecution::factory()
@@ -307,7 +307,7 @@ it('creates a prompt via make:prompt', function () {
$this->artisan('make:prompt', ['name' => 'test-prompt'])
->assertSuccessful();
- $promptPath = config('prompt-deck.path') . '/test-prompt/v1';
+ $promptPath = config('deck.path') . '/test-prompt/v1';
expect(File::isDirectory($promptPath))->toBeTrue();
expect(File::exists($promptPath . '/system.md'))->toBeTrue();
});
@@ -355,7 +355,7 @@ it('shows diff between versions', function () {
Create a test agent class that uses the trait:
```php
-use Veeqtoh\PromptDeck\Concerns\HasPromptTemplate;
+use PromptPHP\Deck\Concerns\HasPromptTemplate;
class TestAgent
{
diff --git a/docs/advanced/tracking.mdx b/docs/advanced/tracking.mdx
index 9b3d3ae..6b50aba 100644
--- a/docs/advanced/tracking.mdx
+++ b/docs/advanced/tracking.mdx
@@ -6,7 +6,7 @@ sidebarTitle: "Tracking"
## Introduction
-Prompt Deck includes an optional database tracking system that logs prompt versions and execution data. This enables:
+Deck by PromptPHP includes an optional database tracking system that logs prompt versions and execution data. This enables:
- **Performance monitoring** — Track token usage, latency, and cost per prompt version.
- **A/B testing** — Compare performance metrics across different prompt versions.
@@ -14,25 +14,25 @@ Prompt Deck includes an optional database tracking system that logs prompt versi
- **Cost analysis** — Monitor API spending per prompt, model, and provider.
- **User feedback** — Attach ratings and comments to individual executions.
-Tracking is entirely optional. Prompt Deck works fully without it.
+Tracking is entirely optional. Deck works fully without it.
## Setup
### Enable tracking
-Set the tracking configuration in `config/prompt-deck.php`:
+Set the tracking configuration in `config/deck.php`:
```php
'tracking' => [
- 'enabled' => env('PROMPTDECK_TRACKING_ENABLED', true),
- 'connection' => env('PROMPTDECK_DB_CONNECTION'),
+ 'enabled' => env('DECK_TRACKING_ENABLED', true),
+ 'connection' => env('DECK_DB_CONNECTION'),
],
```
Or via environment variable:
```dotenv
-PROMPTDECK_TRACKING_ENABLED=true
+DECK_TRACKING_ENABLED=true
```
By default, tracking is **disabled** when `APP_DEBUG=true` and **enabled** in production.
@@ -42,7 +42,7 @@ By default, tracking is **disabled** when `APP_DEBUG=true` and **enabled** in pr
Publish and run the migrations to create the required tables:
```bash
-php artisan vendor:publish --tag=prompt-deck-migrations
+php artisan vendor:publish --tag=deck-migrations
php artisan migrate
```
@@ -51,7 +51,7 @@ php artisan migrate
By default, tracking uses your application's default database connection. To store tracking data on a separate database:
```dotenv
-PROMPTDECK_DB_CONNECTION=analytics
+DECK_DB_CONNECTION=analytics
```
The connection name must match a connection defined in `config/database.php`.
@@ -111,12 +111,12 @@ Logs individual prompt executions with performance data.
### Manual tracking
-Use the `PromptDeck::track()` method to record an execution manually:
+Use the `Deck::track()` method to record an execution manually:
```php
-use Veeqtoh\PromptDeck\Facades\PromptDeck;
+use PromptPHP\Deck\Facades\Deck;
-PromptDeck::track('order-summary', 2, [
+Deck::track('order-summary', 2, [
'input' => ['message' => 'Summarise order #1234'],
'output' => 'Your order contains 3 items totalling $150.00...',
'tokens' => 150,
@@ -132,10 +132,10 @@ All fields in the data array are optional. You can track as little or as much as
```php
// Minimal tracking — just record that the prompt was used
-PromptDeck::track('order-summary', 2, []);
+Deck::track('order-summary', 2, []);
// Track only tokens and cost
-PromptDeck::track('order-summary', 2, [
+Deck::track('order-summary', 2, [
'tokens' => 150,
'cost' => 0.002,
]);
@@ -162,16 +162,16 @@ When using the [Laravel AI SDK integration](/integrations/ai-sdk), the `TrackPro
## Eloquent models
-Prompt Deck provides two Eloquent models for interacting with tracking data.
+Deck provides two Eloquent models for interacting with tracking data.
### PromptVersion
-`Veeqtoh\PromptDeck\Models\PromptVersion`
+`PromptPHP\Deck\Models\PromptVersion`
Represents a prompt version record in the `prompt_versions` table.
```php
-use Veeqtoh\PromptDeck\Models\PromptVersion;
+use PromptPHP\Deck\Models\PromptVersion;
// Find the active version
$active = PromptVersion::where('name', 'order-summary')
@@ -196,12 +196,12 @@ $versions = PromptVersion::where('name', 'order-summary')
### PromptExecution
-`Veeqtoh\PromptDeck\Models\PromptExecution`
+`PromptPHP\Deck\Models\PromptExecution`
Represents an execution record in the `prompt_executions` table.
```php
-use Veeqtoh\PromptDeck\Models\PromptExecution;
+use PromptPHP\Deck\Models\PromptExecution;
// Get recent executions
$recent = PromptExecution::where('prompt_name', 'order-summary')
@@ -240,7 +240,7 @@ Both models include factories for testing.
### PromptVersionFactory
```php
-use Veeqtoh\PromptDeck\Models\PromptVersion;
+use PromptPHP\Deck\Models\PromptVersion;
// Create a basic version
$version = PromptVersion::factory()->create();
@@ -267,7 +267,7 @@ $version = PromptVersion::factory()
### PromptExecutionFactory
```php
-use Veeqtoh\PromptDeck\Models\PromptExecution;
+use PromptPHP\Deck\Models\PromptExecution;
// Create a basic execution
$execution = PromptExecution::factory()->create();
@@ -299,7 +299,7 @@ $execution = PromptExecution::factory()
### Basic queries
```php
-use Veeqtoh\PromptDeck\Models\PromptExecution;
+use PromptPHP\Deck\Models\PromptExecution;
// Total executions for a prompt
$count = PromptExecution::where('prompt_name', 'order-summary')->count();
@@ -383,11 +383,11 @@ $dailyCost = PromptExecution::where('prompt_name', 'order-summary')
When tracking is enabled, version activation is managed through the `prompt_versions` table instead of `metadata.json` files. This provides a centralised, queryable record of version history.
-The `PromptDeck::activate()` method and `prompt:activate` command automatically use the appropriate storage (database or file) based on your tracking configuration.
+The `Deck::activate()` method and `prompt:activate` command automatically use the appropriate storage (database or file) based on your tracking configuration.
```php
// Activate programmatically
-PromptDeck::activate('order-summary', 2);
+Deck::activate('order-summary', 2);
// Query active versions
$activeVersions = PromptVersion::where('is_active', true)->get();
diff --git a/docs/core/commands.mdx b/docs/core/commands.mdx
index f1b26ff..f647116 100644
--- a/docs/core/commands.mdx
+++ b/docs/core/commands.mdx
@@ -5,7 +5,7 @@ description: "All available Artisan commands for managing prompts from the comma
## Introduction
-Prompt Deck registers five Artisan commands for managing your prompts from the command line. All commands are available when running in the console.
+Deck by PromptPHP registers five Artisan commands for managing your prompts from the command line. All commands are available when running in the console.
| Command | Description |
| ----------------- | ------------------------------------------------------------ |
diff --git a/docs/core/make-prompt.mdx b/docs/core/make-prompt.mdx
index 00bc559..d5d77db 100644
--- a/docs/core/make-prompt.mdx
+++ b/docs/core/make-prompt.mdx
@@ -1,11 +1,11 @@
---
title: "Creating prompts"
-description: "Generate versioned, role-based prompt structures with the make:prompt Artisan command."
+description: "Generate versioned, role-based prompt structures with the `make:prompt` Artisan command."
---
## Introduction
-Prompt Deck provides an Artisan generator command that scaffolds versioned, role-based prompt structures for your AI agents. The command follows Laravel conventions and supports interactive workflows, automatic versioning, customisable stubs, and rich metadata — everything you need to manage prompts as first-class project assets.
+Deck by PromptPHP provides an Artisan generator command that scaffolds versioned, role-based prompt structures for your AI agents. The command follows Laravel conventions and supports interactive workflows, automatic versioning, customisable stubs, and rich metadata.
## Generating prompts
@@ -92,7 +92,7 @@ resources/prompts/
└── metadata.json
```
-The file extension is controlled by the `prompt-deck.extension` configuration value (default: `md`). For example, setting it to `txt` produces `system.txt`, `user.txt`, etc.
+The file extension is controlled by the `deck.extension` configuration value (default: `md`). For example, setting it to `txt` produces `system.txt`, `user.txt`, etc.
### Metadata
@@ -197,7 +197,7 @@ All scaffolded roles (including `system` and optionally `user`) are recorded in
## Versioning
-Prompt Deck uses directory-based versioning. Each version lives in its own sub-directory (`v1/`, `v2/`, etc.) inside the prompt folder.
+Deck uses directory-based versioning. Each version lives in its own sub-directory (`v1/`, `v2/`, etc.) inside the prompt folder.
### Auto-increment
@@ -253,7 +253,7 @@ To customise the stubs for your project, create a `stubs/prompt-deck/` directory
```
your-app/
└── stubs/
- └── prompt-deck/
+ └── deck/
├── system-prompt.stub
├── user-prompt.stub
└── role-prompt.stub
@@ -288,12 +288,12 @@ This normalisation applies to both the prompt name and any extra role names prov
## Configuration
-The command respects the following values from `config/prompt-deck.php`:
+The command respects the following values from `config/deck.php`:
| Key | Default | Description |
| ----------------------- | -------------------------- | --------------------------------------------------- |
-| `prompt-deck.path` | `resource_path('prompts')` | Base directory where prompt structures are created. |
-| `prompt-deck.extension` | `md` | File extension for generated prompt files. |
+| `deck.path` | `resource_path('prompts')` | Base directory where prompt structures are created. |
+| `deck.extension` | `md` | File extension for generated prompt files. |
See the full [Configuration](/getting-started/configuration) reference for all options.
diff --git a/docs/core/prompts.mdx b/docs/core/prompts.mdx
index 2bc77fe..d4c1699 100644
--- a/docs/core/prompts.mdx
+++ b/docs/core/prompts.mdx
@@ -5,14 +5,14 @@ description: "Load, render, version, cache, and track AI prompts in your Laravel
## Introduction
-Prompt Deck provides a clean, expressive API for loading, rendering, and managing versioned AI prompts in your Laravel application. Prompts are stored as plain files on disk and organised by name, version, and role. They are accessed through the `PromptDeck` facade, which feels like any other first-party Laravel service.
+Deck by PromptPHP provides a clean, expressive API for loading, rendering, and managing versioned AI prompts in your Laravel application. Prompts are stored as plain files on disk and organised by name, version, and role. They are accessed through the `Deck` facade.
A prompt can contain multiple **roles** (system, user, assistant, developer, tool, or any custom role you define). Each role's content supports `{{ $variable }}` interpolation, and the entire prompt can be converted into a messages array ready to send to OpenAI, Anthropic, or any chat-completion API.
```php
-use Veeqtoh\PromptDeck\Facades\PromptDeck;
+use PromptPHP\Deck\Facades\Deck;
-$prompt = PromptDeck::get('order-summary');
+$prompt = Deck::get('order-summary');
$prompt->system(['tone' => 'friendly']);
// "You are a friendly AI assistant..."
@@ -23,18 +23,18 @@ $prompt->user(['input' => $request->message]);
## Retrieving prompts
-### The PromptDeck facade
+### The Deck facade
-The `PromptDeck` facade is the primary entry point for loading prompts. It delegates to the `PromptManager` singleton registered by the service provider:
+The `Deck` facade is the primary entry point for loading prompts. It delegates to the `PromptManager` singleton registered by the service provider:
```php
-use Veeqtoh\PromptDeck\Facades\PromptDeck;
+use PromptPHP\Deck\Facades\Deck;
-// Load the active version
-$prompt = PromptDeck::get('order-summary');
+// Load the active version.
+$prompt = Deck::get('order-summary');
-// Load a specific version
-$prompt = PromptDeck::get('order-summary', 2);
+// Load a specific version.
+$prompt = Deck::get('order-summary', 2);
```
The `get` method returns a `PromptTemplate` instance. If no version is specified, the [active version](#version-resolution-order) is resolved automatically.
@@ -44,7 +44,7 @@ The `get` method returns a `PromptTemplate` instance. If no version is specified
You can also inject the `PromptManager` directly via Laravel's service container:
```php
-use Veeqtoh\PromptDeck\PromptManager;
+use PromptPHP\Deck\PromptManager;
class OrderController extends Controller
{
@@ -65,7 +65,7 @@ The `PromptManager` is registered as a singleton, so the same instance is reused
Use the `active` method to explicitly load the active version:
```php
-$prompt = PromptDeck::active('order-summary');
+$prompt = Deck::active('order-summary');
$prompt->version(); // e.g. 3
```
@@ -77,7 +77,7 @@ This is equivalent to calling `get()` without a version number.
Pass a version number as the second argument to `get` to load a specific version, regardless of which version is currently active:
```php
-$prompt = PromptDeck::get('order-summary', 1);
+$prompt = Deck::get('order-summary', 1);
$prompt->version(); // 1
```
@@ -93,15 +93,15 @@ Once you have a `PromptTemplate` instance, you can render any role's content wit
The most expressive way to render a role is to call it as a method directly on the prompt instance. This uses PHP's `__call` magic method and works for **any** role — not just `system` and `user`:
```php
-$prompt = PromptDeck::get('code-reviewer');
+$prompt = Deck::get('code-reviewer');
-// Render the system role
+// Render the system role.
$prompt->system(['tone' => 'professional']);
-// Render the user role
+// Render the user role.
$prompt->user(['input' => $code]);
-// Render custom roles
+// Render custom roles.
$prompt->assistant(['context' => $history]);
$prompt->developer(['task' => 'review']);
$prompt->tool(['name' => 'search']);
@@ -184,7 +184,7 @@ $prompt->version(); // 2
The `toMessages` method builds a messages array compatible with OpenAI, Anthropic, and other chat-completion APIs. It renders every role with the given variables and returns them in definition order:
```php
-$messages = PromptDeck::get('chat-agent')->toMessages([
+$messages = Deck::get('chat-agent')->toMessages([
'tone' => 'helpful',
'input' => $userMessage,
]);
@@ -229,7 +229,7 @@ Roles specified in the filter that don't exist in the prompt are silently skippe
### Syntax
-Prompt Deck supports two placeholder syntaxes within prompt files:
+Deck by PromptPHP supports two placeholder syntaxes within prompt files:
| Syntax | Example |
| -------------------- | ------------- |
@@ -301,7 +301,7 @@ Each version directory can contain:
Retrieve all versions for a prompt programmatically:
```php
-$versions = PromptDeck::versions('order-summary');
+$versions = Deck::versions('order-summary');
// [
// ['version' => 1, 'path' => '...', 'metadata' => [...]],
@@ -324,7 +324,7 @@ See [Artisan Commands — prompt:list](/core/commands#promptlist) for details.
Set a specific version as the active version:
```php
-PromptDeck::activate('order-summary', 2);
+Deck::activate('order-summary', 2);
```
**When database tracking is enabled**, this updates the `prompt_versions` table — setting `is_active = false` on all versions of that prompt, then `is_active = true` on the specified version.
@@ -341,7 +341,7 @@ See [Artisan Commands — prompt:activate](/core/commands#promptactivate) for de
### Version resolution order
-When you call `PromptDeck::get('name')` without a version, the active version is resolved in this priority order:
+When you call `Deck::get('name')` without a version, the active version is resolved in this priority order:
1. **Database** — If tracking is enabled, looks for a version marked `is_active = true` in the `prompt_versions` table for that prompt name.
2. **metadata.json** — Reads the `active_version` key from the prompt's root `metadata.json` file.
@@ -354,12 +354,12 @@ If no versions exist at all, an `InvalidVersionException` is thrown.
When caching is enabled, loaded prompts are stored in your configured cache store to avoid repeated filesystem reads:
```php
-// config/prompt-deck.php
+// config/deck.php
'cache' => [
- 'enabled' => env('PROMPTDECK_CACHE_ENABLED', true),
- 'store' => env('PROMPTDECK_CACHE_STORE', 'file'),
+ 'enabled' => env('DECK_CACHE_ENABLED', true),
+ 'store' => env('DECK_CACHE_STORE', 'file'),
'ttl' => 3600, // seconds
- 'prefix' => 'prompt-deck:',
+ 'prefix' => 'deck:',
],
```
@@ -374,7 +374,7 @@ See [Configuration — Cache](/getting-started/configuration#cache) for the full
When database tracking is enabled, you can log prompt executions for performance monitoring, A/B testing, and audit trails:
```php
-PromptDeck::track('order-summary', 2, [
+Deck::track('order-summary', 2, [
'input' => ['message' => 'Summarise order #1234'],
'output' => 'Your order contains...',
'tokens' => 150,
diff --git a/docs/docs.json b/docs/docs.json
index 2c804b8..99ebaf5 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -45,12 +45,12 @@
"anchors": [
{
"anchor": "GitHub",
- "href": "https://github.com/promptphp/prompt-deck",
+ "href": "https://github.com/promptphp/deck",
"icon": "github"
},
{
"anchor": "Packagist",
- "href": "https://packagist.org/packages/veeqtoh/prompt-deck",
+ "href": "https://packagist.org/packages/promptphp/deck",
"icon": "box"
}
]
@@ -64,7 +64,7 @@
"links": [
{
"label": "GitHub",
- "href": "https://github.com/promptphp/prompt-deck"
+ "href": "https://github.com/promptphp/deck"
},
{
"label": "Sponsor",
@@ -86,7 +86,7 @@
},
"footer": {
"socials": {
- "github": "https://github.com/promptphp/prompt-deck"
+ "github": "https://github.com/promptphp/deck"
}
}
}
diff --git a/docs/favicon.svg b/docs/favicon.svg
index b785c73..2f1a293 100644
--- a/docs/favicon.svg
+++ b/docs/favicon.svg
@@ -1,19 +1,6 @@
-