This release adds 3 notable features for engineering teams evaluating rollout.
✓ No known CVEs patched in this version
Summary
AI summaryClarifyPrompt 1.3 introduces a Context Curator that solves a token‑budget problem for context selection.
Full changelog
[1.3.0] — 2026-04-24
ClarifyPrompt 1.3 stops tuning prompts and starts curating context. Every call becomes an explicit token-budget problem — memory, tools, MCP, history — and every decision the curator makes is inspectable, persistent, and improves with use.
Framed against Anthropic's four context-engineering pillars:
| Pillar | What 1.3 adds |
|---|---|
| System instructions | Unchanged from 1.2 (intent overlay + shape-aware sizing) |
| MCP & external data | Knowledge packs — markdown + YAML frontmatter, loaded by URL / path / inline, chunked and embedded into the persistent memory store |
| Tools | 4 new MCP tools: load_knowledge_pack, list_packs, unload_pack, memory_search, explain_last_curation (15 total, up from 11) |
| Message history | Persistent memory via SQLite + sqlite-vec; reflective learning via save_outcome → LLM fact extraction → invalidation; semantic retrieval across sessions |
Added — Persistent memory substrate
- SQLite + sqlite-vec as the storage layer (new deps:
better-sqlite3 ^12.9.0,sqlite-vec ^0.1.9). Singlememory.dbat$CLARIFYPROMPT_HOME/memory/, WAL mode. - Bi-temporal schema (Graphiti-style): every fact has
valid_from+observed_at+ optionalinvalidated_at. New contradicting facts don't overwrite — they invalidate the prior edge. - Tables:
sessions,entities,facts,edges,outcomes,optimizations,packs,pack_chunks, plus vec0 vector indexembeddings_768. - Versioned migrations with
schema_migrationstracking — safe to re-run. - Graceful degradation: if sqlite-vec fails to load, memory operations become no-ops instead of errors; the rest of the engine keeps working.
Added — Pluggable embedder
OpenAICompatibleEmbedderfollowing the same contract as the LLM client. Any/v1/embeddings-shaped endpoint works.- Defaults to local Ollama +
nomic-embed-text:v1.5(768-dim).EMBED_API_URLfalls back toLLM_API_URLso Ollama users "just work". - Pre-configured examples in
.env.examplefor OpenAI (text-embedding-3-small), Voyage (voyage-3), Cohere (embed-english-v3.0).
Added — The Context Curator
The centerpiece of 1.3. Replaces flat priority-ordered context stacking with an explicit token-budget solver:
computeBudget— derives the grounding-budget envelope from the target model's context window, system-prompt tokens, output budget, and the original prompt size.buildCandidates— constructs a scoreable candidate per grounding source: user-pinned, project rules, active file, session few-shots, web search, memory matches, workspace meta, target-model hints, custom platform instructions, platform syntax hints.scoreCandidate— weighted combination ofbaseUtility × 0.5 + intentMatch × 0.25 + authority × 0.15 + freshness × 0.10. User-pinned sources are hard-pinned (utility = 1.0, always included).curate— dedupes, pins required sources, then fills the remaining budget greedily by utility-per-token. Returns a fullCurationResultwithselected,rejected(with reasons),budget, andused— making every decision inspectable.- Token counting: 4-chars-per-token approximation; cheap and good enough for budgeting decisions that operate at the hundreds-of-tokens granularity.
Added — Semantic retrieval into the pipeline
- Every
optimize_promptcall now does a dual vector search (facts + pack chunks) over the persistent memory store and injects the top matches as curator candidates. - Each optimization is persisted to memory with its original-prompt embedding, so "have I seen a similar prompt before?" works across sessions and processes.
- The old session ring buffer remains as a fast-path for same-session retrieval.
Added — Reflective memory
save_outcomenow extracts facts via an LLM pass when the verdict isacceptedoredited. Facts are 1–3(subject, predicate, object)triples per outcome, stored withsource: "reflection:<optId>", embedded, and available for retrieval on subsequent calls.- Rejection path invalidates recent reflection-sourced facts from the same session (last hour window) as a conservative anti-pattern signal.
skip_reflectionflag onsave_outcomefor latency-sensitive callers.
Added — Knowledge packs
A community-contributable primitive for teaching ClarifyPrompt durable knowledge.
- Pack format: markdown body + optional YAML frontmatter (
name,version,description,scope,author,license,tags). Parsed by a minimal YAML-lite parser (no external deps). load_knowledge_packMCP tool — loads from local path, HTTPS URL, or inline markdown. Chunks the body by H1/H2 headings (fallback to paragraph splitting for sections > ~1500 chars), embeds each chunk, writes everything to memory.list_packsandunload_packtools for pack management.- 3 starter packs shipped in
packs/:nextjs-14-best-practices— server-first Next.js 14 App Router conventionsanthropic-brand-voice— Anthropic's public tone, register, word choicessox-compliance— Sarbanes-Oxley 404 guardrails for AI-assisted financial work
- Companion registry at github.com/LumabyteCo/clarifyprompt-packs — Apache-2.0, community-curated.
Added — Curation observability
- Trace entries now carry a
curationblock:{budget, used, selected[], rejected[]}with per-candidate tokens, utility score, and rejection reasons. explain_last_curationMCP tool renders a human-readable explanation of the most recent (or specified) optimization's curator decisions. Use this when an output feels off and you want to know which grounding sources the engine chose and why.
Added — New MCP tools (16 total, up from 11)
load_knowledge_pack— load a pack into persistent memorylist_packs— list loaded packsunload_pack— remove a pack and its chunksmemory_search— semantic search over facts + pack chunksexplain_last_curation— inspect the Context Curator's decisions
Added — Env vars
| Variable | Required | Description |
|---|---|---|
| EMBED_API_URL | No | Embedding endpoint. Defaults to LLM_API_URL if unset. |
| EMBED_API_KEY | No | Embedding API key. Defaults to LLM_API_KEY if unset. |
| EMBED_MODEL | No | Embedding model ID. Default: nomic-embed-text:v1.5. |
| EMBED_DIMENSION | No | Embedding dimension. Default: 768. |
Changed
optimize_promptresponse now includescurationmetadata: how the token budget was allocated, what was kept, what was cut.- Trace JSONL schema gains the
curationfield. Existing 1.2 traces remain readable. save_outcomeresponse now includes areflectionsub-object:{factsExtracted, factsInvalidated, source, notes}.- Server version bumped to
1.3.0acrosspackage.json,server.json,src/index.ts,package-lock.json. - npm tarball now includes
packs/— the 3 starter packs ship with the install.
Notes for integrators
- All new features are opt-in. Callers that only pass
{ prompt }still get 1.2-level behavior. Memory / packs require an embedding endpoint; missing it degrades tomemoryMatches: []instead of erroring. - Reflection adds latency to
save_outcome. Expect 1–3 seconds on a local 7B model. Passskip_reflection: truefor sub-100ms outcome recording. memory.dbis a single file. Back it up, sync it between machines, ship it as part of a team's workspace if you want — it's yours.- Knowledge packs are strictly local. The registry at
github.com/LumabyteCo/clarifyprompt-packsis just a curated markdown-file index;load_knowledge_packfetches the file once and stores everything locally. No callbacks, no telemetry.
Positioning (the one-sentence 1.3 pitch)
ClarifyPrompt 1.3 stops tuning prompts and starts curating context. Every call becomes an explicit token-budget problem — memory, tools, MCP, history — and every decision the curator makes is inspectable, persistent, and improves with use.
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About LumabyteCo/clarifyprompt-mcp
MCP server for AI prompt optimization — transforms vague prompts into platform-optimized prompts for 58+ AI platforms across 7 categories (image, video, voice, music, code, chat, document).
Related context
Beta — feedback welcome: [email protected]