MetaObjectSchema (object v0.1.2)

Meta-schema system enabling objects to reason about and modify their own schemas. Implements hierarchical schema inheritance with runtime evolution capabilities.

Summary

Functions

Returns the base agent schema that defines fundamental agent capabilities.

Returns the rules and constraints governing meta-schema evolution.

Creates a specialized agent schema based on the provided specialization type.

Types

action_spec()

@type action_spec() :: map()

behavior_pattern()

@type behavior_pattern() :: %{
  triggers: [trigger_condition()],
  actions: [action_spec()],
  learning_weight: float(),
  adaptation_rate: float(),
  effectiveness_threshold: float()
}

compatibility_rule()

@type compatibility_rule() :: map()

compatibility_score()

@type compatibility_score() :: float()

constraint()

@type constraint() :: map()

evolution_rules()

@type evolution_rules() :: map()

inheritance_spec()

@type inheritance_spec() :: map()

learning_config()

@type learning_config() :: map()

meta_operation()

@type meta_operation() :: map()

protocol_spec()

@type protocol_spec() :: %{
  message_types: [atom()],
  state_requirements: [state_condition()],
  response_patterns: %{required(atom()) => response_spec()},
  compatibility_requirements: [compatibility_rule()]
}

reflection_capability()

@type reflection_capability() :: map()

response_spec()

@type response_spec() :: map()

schema_attribute()

@type schema_attribute() :: %{
  type: :primitive | :composite | :emergent,
  constraints: [constraint()],
  mutability: :immutable | :mutable | :evolvable,
  inheritance_rules: inheritance_spec()
}

state_condition()

@type state_condition() :: map()

t()

@type t() :: %MetaObjectSchema{
  behavioral_patterns: %{required(atom()) => behavior_pattern()},
  compatibility_matrix: %{required(atom()) => compatibility_score()},
  core_attributes: %{required(atom()) => schema_attribute()},
  evolution_constraints: evolution_rules(),
  interaction_protocols: %{required(atom()) => protocol_spec()},
  learning_parameters: learning_config(),
  meta_operations: %{required(atom()) => meta_operation()},
  parent_schemas: [atom()],
  reflection_capabilities: reflection_capability(),
  schema_id: atom(),
  version: String.t()
}

trigger_condition()

@type trigger_condition() :: map()

Functions

base_agent_schema()

Returns the base agent schema that defines fundamental agent capabilities.

Provides a foundational schema for autonomous agents with core attributes, behavioral patterns, interaction protocols, and meta-cognitive capabilities. This schema serves as the parent for all specialized agent schemas.

Returns

  • Base agent schema struct with:
    • Core attributes: identity, state, goals, memory
    • Behavioral patterns: goal pursuit, social interaction
    • Interaction protocols: basic messaging
    • Learning parameters and evolution constraints
    • Reflection capabilities and meta-operations

Examples

iex> MetaObjectSchema.base_agent_schema()
%MetaObjectSchema{schema_id: :base_agent, version: "1.0.0", ...}

meta_schema_evolution_rules()

Returns the rules and constraints governing meta-schema evolution.

Defines the framework for how schemas can evolve over time while maintaining system stability and compatibility. Includes compatibility requirements, adaptation triggers, evolution strategies, and validation requirements.

Returns

  • Map containing evolution rules with:
    • :compatibility_preservation - Backward compatibility requirements
    • :adaptation_triggers - Conditions that trigger schema evolution
    • :evolution_strategies - Available strategies (incremental, branching, revolutionary)
    • :validation_requirements - Testing and validation requirements

Examples

iex> MetaObjectSchema.meta_schema_evolution_rules()
%{compatibility_preservation: %{minimum_backward_compatibility: 0.8}, ...}

specialist_agent_schema(specialization)

Creates a specialized agent schema based on the provided specialization type.

Extends the base agent schema with domain-specific capabilities and behaviors tailored to the specialization. Currently supports researcher, coordinator, and creative agent specializations.

Parameters

  • specialization - The type of specialization (:researcher, :coordinator, :creative)

Returns

  • Specialized agent schema struct with extended capabilities:
    • :researcher - Enhanced with knowledge acquisition and hypothesis formation
    • :coordinator - Enhanced with resource allocation and optimization strategies
    • :creative - Enhanced with creative synthesis and aesthetic evaluation

Examples

iex> MetaObjectSchema.specialist_agent_schema(:researcher)
%MetaObjectSchema{schema_id: :researcher_agent, ...}

iex> MetaObjectSchema.specialist_agent_schema(:coordinator)
%MetaObjectSchema{schema_id: :coordinator_agent, ...}