@continuum-dev/prompts
v0.3.0
Published
Prompt templates and helpers for Continuum AI view generation
Maintainers
Readme
@continuum-dev/prompts
Website: continuumstack.dev GitHub: brytoncooper/continuum-dev
Core Premise: The Ephemerality Gap
The Ephemerality Gap is the mismatch between ephemeral, regenerating interfaces and durable user intent. Continuum keeps UI structure and user state separate, then uses deterministic reconciliation so user intent survives schema changes.
Prompt templates and assembly helpers for Continuum AI view generation.
If you want the opinionated UI layer and prompt helpers from one install path, @continuum-dev/starter-kit re-exports this package.
Install
npm install @continuum-dev/promptsWhat this package provides
- A production-ready base system prompt
- Mode prompts for create, evolve, and correction loops
- Optional addons for attachment extraction and strict continuity
- A default JSON schema output contract for
ViewDefinition - Typed helpers to assemble system prompts and build user messages
Quick usage
import {
assembleSystemPrompt,
buildEvolveUserMessage,
getDefaultOutputContract,
type PromptMode,
} from '@continuum-dev/prompts';
const mode: PromptMode = 'evolve-view';
const systemPrompt = assembleSystemPrompt({
mode,
addons: ['strict-continuity'],
outputContract: getDefaultOutputContract(),
});
const userMessage = buildEvolveUserMessage({
currentView,
instruction: 'Add co-borrower employment and preserve semantic keys.',
});Output contract helpers
VIEW_DEFINITION_RESPONSE_SCHEMA: default JSON schema for ContinuumViewDefinitionVIEW_DEFINITION_OUTPUT_CONTRACT: named default contract objectbuildOutputContractInstructions: renders explicit schema instructions for system promptsgetDefaultOutputContract: returns the default contract fromPROMPT_LIBRARY
Exports
PROMPT_LIBRARY_VERSIONPROMPT_LIBRARYSYSTEM_COREMODE_CREATE_VIEWMODE_EVOLVE_VIEWMODE_CORRECTION_LOOPADDON_ATTACHMENTSADDON_STRICT_CONTINUITYVIEW_DEFINITION_RESPONSE_SCHEMAVIEW_DEFINITION_OUTPUT_CONTRACTassembleSystemPromptbuildCreateUserMessagebuildEvolveUserMessagebuildCorrectionUserMessagebuildOutputContractInstructionsgetDefaultOutputContractgetModePromptgetAddonPrompt
Recommended request metadata
Store this with each model request:
promptVersionmode- enabled addons list
- output contract name/version
This makes prompt behavior auditable and easier to tune.
