<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Generation on Ometeotl, an abstract decision meta-model</title><link>https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/</link><description>Recent content in Generation on Ometeotl, an abstract decision meta-model</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/index.xml" rel="self" type="application/rss+xml"/><item><title>ContextualBuilder / per-kind builders</title><link>https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/context-builder/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/context-builder/</guid><description>&lt;p&gt;Source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kakchouch/ometeotl/blob/main/src/ometeotl_core/generation/context_builder.py"&gt;src/ometeotl_core/generation/context_builder.py&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;__&lt;/p&gt;
&lt;p&gt;Local role:
Typed class-based abstraction wrapping the function-based builders in &lt;code&gt;builders.py&lt;/code&gt;. Provides a stable override point for kind-specific generation behavior.&lt;/p&gt;
&lt;p&gt;Big-picture role:
Enables callers to compose or replace per-kind generation logic without touching the pipeline. Satisfies the pluggable builder requirement of the generation architecture (F-16).&lt;/p&gt;
&lt;p&gt;Inheritance (&lt;code&gt;ContextualBuilder&lt;/code&gt;):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ABC&lt;/code&gt;, &lt;code&gt;Generic[TGenerated]&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Parameters and fields:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;kind: str&lt;/code&gt; — class-level attribute; must be declared on each concrete subclass&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Methods (&lt;code&gt;ContextualBuilder&lt;/code&gt;):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ensure_kind(context)&lt;/code&gt; — raises &lt;code&gt;ValueError&lt;/code&gt; if &lt;code&gt;context.kind&lt;/code&gt; does not match &lt;code&gt;self.kind&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;build(context) -&amp;gt; TGenerated&lt;/code&gt; — abstract; must be implemented by subclasses&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Concrete builders:&lt;/p&gt;</description></item><item><title>ContextualGenerationPipeline / GenerationResult</title><link>https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/pipeline/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/pipeline/</guid><description>&lt;p&gt;Source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kakchouch/ometeotl/blob/main/src/ometeotl_core/generation/pipeline.py"&gt;src/ometeotl_core/generation/pipeline.py&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;__&lt;/p&gt;
&lt;p&gt;Local role:
Orchestrates the full generation workflow: rule application → builder dispatch → optional registration → optional validation → structured result.&lt;/p&gt;
&lt;p&gt;Big-picture role:
Top-level entry point for the generation architecture (F-16 to F-22). Accepts a &lt;code&gt;GenerationContext&lt;/code&gt;, applies the configured &lt;code&gt;GenerationRuleSet&lt;/code&gt;, delegates to the appropriate builder, and returns a &lt;code&gt;GenerationResult&lt;/code&gt; carrying the generated object, applied rule names, validation outcome, and repair suggestions.&lt;/p&gt;
&lt;p&gt;Parameters and fields (&lt;code&gt;ContextualGenerationPipeline&lt;/code&gt;):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;rules: GenerationRuleSet&lt;/code&gt; — rule set applied before building; defaults to &lt;code&gt;combined_generation_rules()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;validation_pipeline: ValidationPipeline | None&lt;/code&gt; — optional validation pipeline; only runs when &lt;code&gt;context.validate=True&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Methods (&lt;code&gt;ContextualGenerationPipeline&lt;/code&gt;):&lt;/p&gt;</description></item><item><title>Generation examples</title><link>https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/examples/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/examples/</guid><description>&lt;p&gt;Source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kakchouch/ometeotl/blob/main/src/ometeotl_core/generation/examples.py"&gt;src/ometeotl_core/generation/examples.py&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;__&lt;/p&gt;
&lt;p&gt;Local role:
Self-contained runnable demo scenarios for the contextual generation pipeline. Each function is independent and illustrates one generation pattern end to end.&lt;/p&gt;
&lt;p&gt;Big-picture role:
Executable documentation for the generation architecture (F-16 to F-22). Run &lt;code&gt;python -m ometeotl_core.generation.examples&lt;/code&gt; to see all four scenarios.&lt;/p&gt;
&lt;p&gt;Module-level helpers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;demo_simple_world()&lt;/code&gt; — generates a world with 2 spaces and 1 placed actor; demonstrates nested contexts and &lt;code&gt;GenerationPlacement&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;demo_multi_actor_world()&lt;/code&gt; — generates a world with 3 actors and temporal/spatial constraint propagation; demonstrates deduplication and &lt;code&gt;combined_generation_rules&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;demo_perception_generation()&lt;/code&gt; — generates a &lt;code&gt;Perception&lt;/code&gt; object for an actor observing a known space; demonstrates metadata-driven perception and registry-selected rule sets&lt;/li&gt;
&lt;li&gt;&lt;code&gt;demo_goal_generation()&lt;/code&gt; — generates a &lt;code&gt;Goal&lt;/code&gt; with admissibility constraints; demonstrates confidence clamping, capability propagation, and priority validation&lt;/li&gt;
&lt;li&gt;&lt;code&gt;run_all()&lt;/code&gt; — runs all four scenarios in sequence; called when the module is executed directly&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Notes:&lt;/p&gt;</description></item><item><title>GenerationContext / GenerationPlacement</title><link>https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/generation-context/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/generation-context/</guid><description>&lt;p&gt;Source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kakchouch/ometeotl/blob/main/src/ometeotl_core/generation/context.py"&gt;src/ometeotl_core/generation/context.py&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;__&lt;/p&gt;
&lt;p&gt;Local role:
Declarative input dataclass threaded through every generation function and builder. Carries identity, attributes, nested child contexts, placement instructions, and optional constraint overrides.&lt;/p&gt;
&lt;p&gt;Big-picture role:
Central data-transfer object of the generation pipeline (F-16 to F-22). Consumed by &lt;a href="https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/context-builder/"&gt;ContextualBuilder&lt;/a&gt;, the &lt;a href="https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/rule-engine/"&gt;rule engine&lt;/a&gt;, and &lt;a href="https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/pipeline/"&gt;ContextualGenerationPipeline&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Parameters and fields (&lt;code&gt;GenerationContext&lt;/code&gt;):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;kind: str&lt;/code&gt; — target entity kind: &lt;code&gt;&amp;quot;world&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;actor&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;goal&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;strategy&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;perception&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;space&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;resource&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;action&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;id: str&lt;/code&gt; — stable identity of the generated object&lt;/li&gt;
&lt;li&gt;&lt;code&gt;label: str&lt;/code&gt; — promoted into &lt;code&gt;attributes[&amp;quot;label&amp;quot;]&lt;/code&gt; by the &lt;code&gt;promote_label&lt;/code&gt; rule&lt;/li&gt;
&lt;li&gt;&lt;code&gt;attributes: dict&lt;/code&gt; — arbitrary key/value pairs forwarded to the model object&lt;/li&gt;
&lt;li&gt;&lt;code&gt;relations: dict[str, list[str]]&lt;/code&gt; — named relation groups; duplicates deduplicated by &lt;code&gt;normalize_relations&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;state: dict&lt;/code&gt;, &lt;code&gt;context: dict&lt;/code&gt;, &lt;code&gt;provenance: dict&lt;/code&gt; — forwarded verbatim to the model object&lt;/li&gt;
&lt;li&gt;&lt;code&gt;spaces&lt;/code&gt;, &lt;code&gt;actors&lt;/code&gt;, &lt;code&gt;resources&lt;/code&gt;, &lt;code&gt;goals&lt;/code&gt;, &lt;code&gt;strategies&lt;/code&gt;, &lt;code&gt;actions: list[GenerationContext]&lt;/code&gt; — nested child contexts for world generation&lt;/li&gt;
&lt;li&gt;&lt;code&gt;placements: list[GenerationPlacement]&lt;/code&gt; — explicit object-to-space placement instructions&lt;/li&gt;
&lt;li&gt;&lt;code&gt;metadata: dict&lt;/code&gt; — read by constraint propagation rules; also forwarded into &lt;code&gt;merged_context()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;rules: dict&lt;/code&gt; — rule override hints (reserved)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;constraints: dict&lt;/code&gt; — constraint declarations consumed by the &lt;a href="https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/rule-engine/"&gt;rule engine&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;operation: str&lt;/code&gt; — &lt;code&gt;&amp;quot;create&amp;quot;&lt;/code&gt; (default), &lt;code&gt;&amp;quot;partial_update&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;corrective_update&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;registration_policy: str&lt;/code&gt; — &lt;code&gt;&amp;quot;none&amp;quot;&lt;/code&gt; (default), &lt;code&gt;&amp;quot;if_available&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;require&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;validate: bool&lt;/code&gt; — if &lt;code&gt;True&lt;/code&gt;, pipeline runs validation after generation&lt;/li&gt;
&lt;li&gt;&lt;code&gt;validation_mode: str&lt;/code&gt; — &lt;code&gt;&amp;quot;lenient&amp;quot;&lt;/code&gt; (default) or &lt;code&gt;&amp;quot;strict&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stage_modes: dict[str, str]&lt;/code&gt; — per-stage validation mode overrides&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Methods:&lt;/p&gt;</description></item><item><title>GenerationRule / GenerationRuleSet / RuleRegistry</title><link>https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/rule-engine/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/rule-engine/</guid><description>&lt;p&gt;Source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kakchouch/ometeotl/blob/main/src/ometeotl_core/generation/rule_engine.py"&gt;src/ometeotl_core/generation/rule_engine.py&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;__&lt;/p&gt;
&lt;p&gt;Local role:
Pluggable, ordered transformation layer that refines a &lt;code&gt;GenerationContext&lt;/code&gt; before it is handed to builders. All rules are deterministic: same input → same output, no side effects.&lt;/p&gt;
&lt;p&gt;Big-picture role:
Implements the rule engine and constraint propagation requirements of F-17 and F-18. Consumed by &lt;a href="https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/pipeline/"&gt;ContextualGenerationPipeline&lt;/a&gt;. The &lt;code&gt;RuleRegistry&lt;/code&gt; enables pluggable policy selection without modifying pipeline code.&lt;/p&gt;
&lt;p&gt;Parameters and fields (&lt;code&gt;GenerationRule&lt;/code&gt;, frozen dataclass):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;name: str&lt;/code&gt; — unique human-readable identifier&lt;/li&gt;
&lt;li&gt;&lt;code&gt;predicate: Callable[[GenerationContext], bool]&lt;/code&gt; — guard; rule runs only when this returns &lt;code&gt;True&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;apply: Callable[[GenerationContext], GenerationContext]&lt;/code&gt; — pure transformation returning a new context&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Methods (&lt;code&gt;GenerationRule&lt;/code&gt;):&lt;/p&gt;</description></item><item><title>LLMGenerationAdapter / LLMRefinementResult</title><link>https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/llm-integration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://kakchouch.github.io/ometeotl/documentation/class-reference/generation/llm-integration/</guid><description>&lt;p&gt;Source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kakchouch/ometeotl/blob/main/src/ometeotl_core/generation/llm_integration.py"&gt;src/ometeotl_core/generation/llm_integration.py&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;__&lt;/p&gt;
&lt;p&gt;Local role:
Provider-agnostic bridge that converts a &lt;code&gt;GenerationContext&lt;/code&gt; into a prompt, calls an external text generator, parses the response, and returns a refined &lt;code&gt;GenerationContext&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Big-picture role:
Optional pre-refinement step in the hybrid generation workflow (F-20). Keeps LLM usage opt-in and auditable — the pipeline does not call the adapter automatically.&lt;/p&gt;
&lt;p&gt;Parameters and fields (&lt;code&gt;LLMGenerationAdapter&lt;/code&gt;):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;text_generator: Callable[[str], str]&lt;/code&gt; — any callable that takes a prompt and returns a text response&lt;/li&gt;
&lt;li&gt;&lt;code&gt;response_parser: Callable[[str], Mapping[str, Any]] | None&lt;/code&gt; — optional custom parser; defaults to &lt;code&gt;json.loads&lt;/code&gt;-based mapping extraction&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Methods (&lt;code&gt;LLMGenerationAdapter&lt;/code&gt;):&lt;/p&gt;</description></item></channel></rss>