Xprompt Package Cheatsheet
Root namespace:Cognesy\Xprompt
This file is a quick, code-aligned map of the package surface.
For narrative guidance and design rationale, see packages/xprompt/concept.md.
1. Prompt (base class)
Properties
Static Constructors
Rendering
Override Point
Metadata & Introspection
Config
2. NodeSet (structured data prompt)
Properties
Methods
Default Node Format
3. PromptRegistry
Constructor
Registration & Retrieval
Introspection
4. AsPrompt Attribute
5. PromptDiscovery
#[AsPrompt] > $promptName property > FQCN convention.
6. flatten()
null->''string-> pass throughPrompt->$node->render(...$ctx)array-> recurse, join with"\n\n", skip emptiesStringable->(string) $node