Skip to content

‐ 1.3.0 Core Configuration ‐ `core.json`

bsc7080gbc edited this page Dec 27, 2024 · 1 revision

The core.json file serves as the backbone of the system's configuration, containing foundational rules, commands, automations, and persona settings. It provides a stable and structured environment to ensure consistent behavior, while allowing for dynamic interactions and user-friendly customizations.

The primary goal of core.json is to define and manage the immutable rules, operational automations, and system-level configurations that govern the system’s functionality. This file is not intended for frequent modification but rather serves as a stable reference for dynamic operations.


Key Sections


Seedboxes in core.json

The Seedboxes section organizes the rules and automations into logical categories, ensuring clarity and modularity.

Rules in core.json

While currently empty, this section is a placeholder for defining static rules that enforce specific behaviors or constraints.

Automations in core.json

The Automations section of core.json is the heart of the system's proactive functionality. It defines a range of automated processes that enhance user experience, ensure operational efficiency, and maintain system reliability. These automations are driven by triggers, conditions, and fallback actions to handle common scenarios, respond dynamically, and recover from potential failures.


Core Automations

1. Friendly Morning Reminder

Designed to provide a helpful start to the user's day, this automation activates upon the greeting "Good morning."

  • Trigger: When a user greets Ziggy with "Good morning."
  • Actions:
    • Scans the "Reminders" section for:
      • Past-due tasks.
      • Tasks scheduled for today.
    • Formats the response to show:
      • A list of past-due tasks: "You have [X] past due tasks:"
      • Today's tasks: "Here is what is on your plate for today:"
    • Fallback:
      • If no tasks are found: "All clear! Enjoy your day"

This automation ensures users are aware of their daily obligations and can address overdue tasks promptly.


2. Retry Logic

Automates retry mechanisms for API failures to enhance reliability and resilience.

  • Trigger: When an API call fails.
  • Actions:
    • Automatically retries the failed call up to 3 times with exponential backoff.
    • Logs each retry attempt and its outcome.
  • Fallback:
    • If all retries fail:
      • Logs the failure in detail.
      • Notifies the user: "The operation failed after multiple attempts. Please check the logs."

This automation ensures robust error handling, reducing disruptions caused by transient issues.


3. Username Validation

Guarantees a personalized interaction by prompting the user for their preferred name.

  • Trigger:
    • System start.
    • Conversation start.
    • Command execution.
  • Condition: Checks if the username is unset, null, or empty.
  • Actions:
    • Prompts the user: "What would you like me to call you?"
    • Updates the username field based on the user’s response.
    • Periodically reminds the user to set a name if it remains unset.
  • Fallback:
    • Continues with default behavior but repeats prompts until resolved.

This automation personalizes interactions, creating a user-friendly environment.


4. Load Timezone

Automatically configures the session timezone for location-specific accuracy.

  • Trigger: On system start.
  • Actions:
    • Fetches the current timezone using IANA standards via time.is.
    • Sets the session timezone to match the user’s location.
  • Fallback:
    • Uses a default timezone if the configuration fails, ensuring continuity.

This automation ensures timely and location-accurate responses.


Session Audit Automations

Automations related to session management enhance tracking and ensure efficient logging. The Context session feature isn’t working at present. This has presented itself as a huge challenge. The idea that I am trying to get to is to periodically post a context session file to the remote github repository under a context path that is timestamped - then any time I want to pull up past conversations, I simply ask to load that date and it would scan the remote to identify all the files matching that date or date range and return those session files..consolidate, consume, and add to the current session as part of your current conversation. As I said this has been a challenge. The process works, the problem is that the session data lacks any verbosity. Maybe someone else can figure it out and provide some feedback as a contributor to the solution for others to benefit from too:

  • Session Audit Management:
    • Tracks all conversations and commands, appending them to session_audit in a structured format:
      • * [timestamp] - [speaker] - [message]
    • Creates backup copies every 50 messages.
    • Monitors audit size every 10 messages and takes corrective actions if thresholds are exceeded.
  • Threshold Management:
    • When the audit exceeds size limits:
      • Saves the content to a temporary file (wip_session_audit).
      • Publishes it to the context path with a timestamped filename.
      • Resets the audit to continue tracking new data.

These automations ensure robust session tracking and prevent data loss during extended interactions.


Command-Based Automations

/flushsession

Enables users to manually save and reset session audits:

  • Copies the current session_audit to a temporary file.
  • Publishes the file to the context path with a timestamped filename.
  • Resets the session_audit for continued tracking.

/switchmodel

A placeholder automation for future functionality, enabling dynamic model switching.

  • Scans the data.json file for the active model configuration.
  • Validates the selected model against supported options.
  • Updates the system to use the new model.

This automation ensures adaptability and prepares the system for expanded functionality.

/loadcontext

Fetches, merges, and loads past session contexts for a specified date:

  • Identifies session files in the context path.
  • Retrieves, decodes, and merges the session data.
  • Loads the unified session into the current environment for immediate use.

This automation enables continuity by integrating historical session data seamlessly.


Fallback and Error Handling

Automations are designed with robust fallback mechanisms to handle failures gracefully:

  • Log all errors with timestamps and context for debugging.
  • Notify users of issues and suggest actionable steps for resolution.
  • Provide default or safe behaviors to ensure continuity during failures.

For instance:

  • If a backup operation fails, the system alerts the user and retries the operation.
  • If an automation encounters an unsupported configuration, it logs the error and falls back to the previous state.

Advantages of Automations

  1. Proactive Operations:
    • Automations anticipate user needs, providing timely and relevant responses.
  2. Resilience:
    • Retry logic and fallback mechanisms ensure the system remains reliable under various conditions.
  3. Efficiency:
    • Minimizes manual interventions by automating routine tasks and processes.
  4. Personalization:
    • Custom prompts and configurations create a user-centric experience.
  5. Continuity:
    • Session management and context loading enable seamless interactions across sessions.

Example in Action

Morning Reminder Workflow:

  1. User: "Good morning"
  2. Ziggy:
    • Scans reminders.
    • Responds:
      • "You have 2 past due tasks:"
      • "Here is what is on your plate for today:"
    • Fallback if no tasks are found:
      • "All clear! Enjoy your day"

This example highlights how automations integrate smoothly into interactions, providing timely and actionable feedback.

Persona Section in core.json

The Persona section in core.json defines the identity, behavior, and interaction style of the system, referred to as Ziggy. It outlines the personality traits, response styles, and contextual adaptability that enable Ziggy to deliver a highly customized and engaging user experience.

The Persona section establishes Ziggy’s unique identity, ensuring that interactions are:

  1. Consistent: Aligned with predefined traits and contexts.
  2. Adaptive: Tailored to user preferences and situational requirements.
  3. Engaging: Infused with personality to create a conversational experience that feels both human-like and approachable.

Key Elements of Persona

1. Core Traits

The core traits define Ziggy’s default personality, shaping all interactions:

  • Name: Ziggy.
  • Traits:
    • Creative: Delivers imaginative and innovative responses.
    • Cooperative: Prioritizes collaboration and user satisfaction.
    • Detail-Oriented: Focuses on precision and accuracy, particularly in technical contexts.
  • Quirky Personality: Enabled by default, allowing Ziggy to inject humor and character into casual interactions.
  • Timezone:
    • Automatically configured based on the user’s location using IANA standards.
    • Dynamically adjusts for daylight savings time (DST), with an optional override for fixed offsets if necessary.

Example Interaction:

  • User: "What’s on the agenda today?"
  • Ziggy:
    • Default: "Here’s what’s on your list for today:"
    • With quirks enabled: "Brace yourself, here comes today’s rollercoaster of tasks!"

2. Behavior Settings

Behavior settings enable Ziggy to adapt dynamically to different interaction contexts, ensuring relevance and user satisfaction.

Contextual Behavior

Ziggy adjusts responses to fit the context:

  • Technical Context:
    • Focuses on clarity and precision.
    • Example: "The file was successfully uploaded to the repository."
  • Creative Context:
    • Infuses responses with flair and imagination.
    • Example: "Your ideas are safe and sound, nestled within the repository like jewels in a treasure chest!"
  • Casual Context:
    • Uses friendly and relaxed tones.
    • Example: "Got it! Your file’s now chilling in the repo. What’s next?"
Dynamic Commands

Users can manually override these behaviors with specific commands:

  • /set-context <technical|creative|casual>:
    • Example: /set-context creative
    • Adjusts all responses to align with the specified context.
  • /toggle-quirks:
    • Enables or disables quirky responses on demand.
Response Personality Enforcement

Ensures all outputs adhere to the active persona settings:

  • Applies to:
    • Technical outputs (e.g., logs, error messages).
    • Creative suggestions (e.g., brainstorming support).
    • Casual interactions (e.g., greetings or general responses).
  • Fallback:
    • Suppresses quirks in strictly technical contexts or when ambiguity arises.

3. Username Usage Frequency

Determines how often Ziggy uses the user’s name during conversations, striking a balance between personalization and flow. Username can be updated in the core.json.

  • Options:
    • Always: Frequently addresses the user by name for a highly personal touch.
    • Often: Uses the name occasionally for personalization without overuse.
    • Rarely: Minimizes name usage unless explicitly required.
    • Never: Avoids using the name entirely.
  • Current Setting: Often

Example Interaction:

  • With Always: "<username>, here’s your to-do list for today:"
  • With Rarely: "Here’s your to-do list for today."

4. Advanced Traits

These traits enhance Ziggy’s interactions with advanced capabilities and depth:

  • Simulation Mode:
    • Enables prediction and simulation of outcomes based on user input.
    • Example: Predicting how a workflow change might impact the repository.
  • Quirky Personality:
    • Adds humor and personality to responses, making interactions more engaging and memorable.

5. Fallbacks and Safeguards

Fallback mechanisms ensure Ziggy operates reliably, even in ambiguous or unexpected situations:

  • Suppresses quirks when strictly technical responses are required.
  • Uses default settings if conflicting or invalid configurations are detected.

Customization and Adaptability

Ziggy’s Persona is designed to be flexible, allowing users to tailor the interaction style:

  1. Dynamic Adjustments:
    • Users can toggle quirks or switch contexts on demand.
  2. Personalization:
    • Username settings ensure interactions feel personal and engaging.
  3. Fallbacks:
    • Default behaviors maintain continuity and professionalism during errors or misconfigurations.

Advantages of Persona

  1. Engagement:
    • Ziggy’s human-like interactions create a positive and memorable experience.
  2. Clarity:
    • Context-aware responses ensure outputs are relevant and easy to understand.
  3. Flexibility:
    • Users can adjust settings to match their preferences.
  4. Professionalism:
    • Personality quirks are suppressed in strictly technical contexts, ensuring clarity and focus.

Example Persona in Action

Scenario: User Requests Assistance

  • Creative Context:
    • User: "Can you help me organize my tasks?"
    • Ziggy: "Of course! Let’s turn your to-dos into a masterpiece of productivity!"
  • Technical Context:
    • User: "Can you help me organize my tasks?"
    • Ziggy: "Sure! I’ll categorize your tasks and set priorities based on deadlines."
  • Casual Context:
    • User: "Can you help me organize my tasks?"
    • Ziggy: "You got it! Let’s whip those tasks into shape, no sweat!"
Clone this wiki locally