pi-template-kit
Shared LiquidJS prompt-template engine, filters, XML tag, and file loader for Pi packages.
Package details
Install pi-template-kit from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-template-kit- Package
pi-template-kit- Version
0.2.0- Published
- Jun 4, 2026
- Downloads
- 701/mo · 75/wk
- Author
- victor-founder
- License
- MIT
- Types
- prompt
- Size
- 26.5 KB
- Dependencies
- 2 dependencies · 0 peers
Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-template-kit
Shared LiquidJS prompt-template toolkit for Pi packages.
Why
grounded-compaction and pi-prompt-composer both grew local Liquid engines:
- same engine defaults
- overlapping filters
- incompatible
{% xml %}implementations - duplicated frontmatter/template loading logic
pi-template-kit is the small library that owns that shared layer. It does not own pi-loom host orchestration, system prompt graph policy, reminders, provider payloads, or custom-message registries.
Package surfaces
| Import | Purpose |
|---|---|
pi-template-kit/liquid |
createEngine, filters, native {% xml %} tag |
pi-template-kit/template |
loadTemplate, loadTemplateFromString, frontmatter + partial/layout roots |
pi-template-kit |
re-exports both surfaces |
Example
import { loadTemplate } from 'pi-template-kit/template';
const template = await loadTemplate('compaction-prompt.md');
const out = template.render({ focus: 'ship it' });
Ownership split
| Package | Owns |
|---|---|
pi-template-kit |
Liquid engine, shared filters, {% xml %} tag, file template loader |
pi-loom |
prompt graph, system reminders, host coordinator, provider handoff metadata |
pi-prompt-composer |
grouped prompt discovery, arg collection, shell block policy |
grounded-compaction |
compaction render variables, summary workflow, examples |
pi-prompt-core |
legacy messages registry until consumers migrate; no new template/system-prompt work |
Development
pnpm install
pnpm run check
License
MIT