$ show microsoft/poml
POML (Prompt Orchestration Markup Language) is a developer toolchain for structured, reusable LLM prompt engineering. It provides an HTML-like markup language with semantic components, CSS-like styling, templating (variables, loops, conditionals), and multimodal data integration (PDFs, images, tables). The repository contains a core TypeScript/React SDK, a Python wrapper with OpenAI/LangChain/MLflow integrations, a VS Code extension (LSP, live preview, test command), and a Chrome browser extension for content extraction. It is packaged as CLI tools and libraries on npm and PyPI. Designed for building maintainable prompts in LLM applications, it also includes research artifacts (arXiv papers) and a tracing system for debugging prompt execution.
The LLM identified 4 files worth highlighting for reuse:
Implements a generic RPC system for Chrome extension cross-context communication (background, content script, sidebar). Uses a singleton EverywhereManager with dispatch/register/createFunction for type-safe, decoupled messaging. Reusable in any Chrome extension requiring structured inter-role calls.
Defines a CardModel type for representing heterogeneous content (text, binary, file, nested) with serialization/deserialization and component type mapping. Designed for browser content extraction, but its generic structure is reusable for any application needing a unified content representation with type discrimination.
Provides `to_strict_json_schema` that converts a Pydantic BaseModel to an OpenAI-compatible strict JSON schema with proper formatting. Handles nested models, optional fields, and enums. A self-contained utility that can be extracted to any Python project needing Pydantic-to-OpenAI schema conversion for tool definitions or structured outputs.
Implements a level-based notification system (important, warn, debug, trace) with object serialization, console fallback, and RPC-driven delivery. Can be reused in any browser extension or web app needing consistent, context-aware logging and user notifications.