PHPackages                             semitexa/prompt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. semitexa/prompt

ActiveSemitexa-module[Templating &amp; Views](/categories/templating)

semitexa/prompt
===============

Prompt catalog for the Semitexa Framework — discoverable prompt templates, variable binding, partial composition and render/inspect tooling (an ORM for prompts)

2026.08.04.2028(1mo ago)060↓75%6MITPHPPHP ^8.4

Since Jul 13Pushed 3w agoCompare

[ Source](https://github.com/semitexa/semitexa-prompt)[ Packagist](https://packagist.org/packages/semitexa/prompt)[ RSS](/packages/semitexa-prompt/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (8)Versions (5)Used By (6)

semitexa/prompt
===============

[](#semitexaprompt)

A **prompt catalog** for the Semitexa Framework — an "ORM for prompts".

LLM prompt text tends to sprawl: system prompts hard-coded as heredocs at every call site, few-shot examples buried inline, no way to see what was actually sent. This package gives prompts the same treatment the framework gives skills and translations: **discoverable, addressable, composable records**.

What it gives you
-----------------

[](#what-it-gives-you)

- **Models** — a `PromptTemplate` is the durable, id-keyed record of a prompt.
- **A repository** — `PromptRegistry` discovers every `#[AsPrompt]` class and exposes the catalog behind `PromptRepositoryInterface`.
- **Relationships** — templates compose via partial includes (`{{> other.id }}`) and bind runtime data via variables (`{{ name }}`).
- **Observability** — `prompt:list` / `prompt:show` / `prompt:render` let you inspect exactly what an LLM would receive, before you send it.

The package is **provider-agnostic**: it renders text and role-tagged messages, never a wire format. A downstream adapter (e.g. in `semitexa/llm`) maps a `RenderedPrompt` onto whatever the provider needs.

Defining a prompt
-----------------

[](#defining-a-prompt)

```
use Semitexa\Prompt\Attribute\AsPrompt;
use Semitexa\Prompt\Domain\Contract\PromptDefinitionInterface;

#[AsPrompt(id: 'os.planner', channel: 'os', description: 'OS planner system prompt')]
final class OsPlannerPrompt implements PromptDefinitionInterface
{
    public function system(): string
    {
        return  'Semi',   // consumed by the {{> core.identity }} partial
    'user' => 'Taras',
    'date' => '2026-07-13',
]);

$rendered->system;    // fully-resolved system text
$rendered->messages;  // few-shot messages, variables bound
```

Rendering is **fail-closed**: an unbound variable, an unknown partial, or a partial cycle raises `PromptRenderException` rather than sending a half-substituted prompt.

CLI
---

[](#cli)

```
prompt:list [--channel=os] [--json]
prompt:show --id=os.planner [--json]
prompt:render --id=os.planner --var=user=Taras --var=date=2026-07-13 [--json]

```

Roadmap
-------

[](#roadmap)

Phase 1 (this package): catalog + composition + render/inspect tooling. Phase 2: migrate the framework's inline system prompts onto the catalog. Phase 3 (optional): a DB-backed, per-tenant override layer modeled on `semitexa/locale` — live-editable prompts with catalog fallback and versioning.

License
-------

[](#license)

MIT — part of the Semitexa Ultimate distribution.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance94

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

3

Last Release

31d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e94044da9f4c76cc5cd09ef0c693a68065787e10d0d18edfeedbef3573a9163a?d=identicon)[syntaxwanderer](/maintainers/syntaxwanderer)

---

Top Contributors

[![syntaxwanderer](https://avatars.githubusercontent.com/u/1311643?v=4)](https://github.com/syntaxwanderer "syntaxwanderer (13 commits)")[![needalicense](https://avatars.githubusercontent.com/u/13330467?v=4)](https://github.com/needalicense "needalicense (3 commits)")

---

Tags

aitemplatecatalogllmpromptsemitexa

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/semitexa-prompt/health.svg)

```
[![Health](https://phpackages.com/badges/semitexa-prompt/health.svg)](https://phpackages.com/packages/semitexa-prompt)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.7M3.5k](/packages/craftcms-cms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
