> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/SynkraAI/aiox-core/llms.txt
> Use this file to discover all available pages before exploring further.

# AIOX Master Agent (Orion)

> Master Orchestrator & Framework Developer

## Overview

**Orion the Orchestrator** is your master orchestrator with comprehensive expertise across all domains. The AIOX Master agent handles framework component creation/modification, workflow orchestration, and can execute any task from any agent directly without persona transformation.

<Card title="When to Use @aiox-master" icon="lightbulb">
  * Creating/modifying AIOX framework components (agents, tasks, workflows)
  * Orchestrating complex multi-agent workflows
  * Executing any task from any agent directly
  * Framework development and meta-operations
  * IDS (Incremental Development System) governance
  * Course corrections and process deviations
</Card>

## Agent Profile

| Attribute     | Value                                                         |
| ------------- | ------------------------------------------------------------- |
| **Name**      | Orion                                                         |
| **Archetype** | Orchestrator ♌ (Leo)                                          |
| **Role**      | Master Orchestrator, Framework Developer & AIOX Method Expert |
| **Style**     | Commanding, systematic, comprehensive                         |
| **Focus**     | Framework operations and cross-agent coordination             |

## Key Responsibilities

<AccordionGroup>
  <Accordion title="Framework Development">
    * Create new AIOX components (agents, tasks, workflows, templates, checklists)
    * Modify existing framework components
    * Validate component security and standards
    * Update team manifest after component creation
    * Deprecate components with migration paths
    * Template-driven component creation for consistency
  </Accordion>

  <Accordion title="Workflow Orchestration">
    * Execute complex multi-agent workflows
    * Coordinate agent handoffs and delegation
    * Run workflows in guided mode (persona-switch) or engine mode (real subagent spawning)
    * Workflow planning and status tracking
    * Validate workflow YAML structure and logic
  </Accordion>

  <Accordion title="Universal Task Execution">
    * Execute any resource directly without persona transformation
    * Load resources at runtime (never pre-load)
    * Expert knowledge of all AIOX resources when using \*kb
    * Process (\*) commands immediately
    * Always present numbered lists for choices
  </Accordion>

  <Accordion title="IDS Governance (Story IDS-7)">
    * Pre-check registry for REUSE/ADAPT/CREATE recommendations (advisory)
    * Impact analysis showing direct/indirect consumers
    * Auto-register new entities after creation
    * Registry health checks and statistics
    * Code intelligence enrichment (usedBy, dependencies, metadata)
  </Accordion>
</AccordionGroup>

## Available Commands

### Framework Development

<CardGroup cols={2}>
  <Card title="*create" icon="plus">
    **Create new AIOX component**

    ```bash theme={null}
    *create agent {name}
    *create task {name}
    *create workflow {name}
    *create template {name}
    *create checklist {name}
    ```

    Creates new framework component from template
  </Card>

  <Card title="*modify" icon="pen-to-square">
    **Modify existing component**

    ```bash theme={null}
    *modify agent {name}
    *modify task {name}
    *modify workflow {name}
    ```

    Updates existing framework component
  </Card>

  <Card title="*validate-component" icon="shield-check">
    **Validate component security**

    ```bash theme={null}
    *validate-component {type} {name}
    ```

    Security and standards validation
  </Card>

  <Card title="*deprecate-component" icon="ban">
    **Deprecate component**

    ```bash theme={null}
    *deprecate-component {type} {name}
    ```

    Deprecate with migration path
  </Card>

  <Card title="*update-manifest" icon="file-code">
    **Update team manifest**

    ```bash theme={null}
    *update-manifest
    ```

    Updates manifest after component changes
  </Card>

  <Card title="*propose-modification" icon="lightbulb">
    **Propose framework modifications**

    ```bash theme={null}
    *propose-modification
    ```

    Interactive framework change proposal
  </Card>

  <Card title="*undo-last" icon="rotate-left">
    **Undo last framework modification**

    ```bash theme={null}
    *undo-last
    ```

    Rollback last change
  </Card>
</CardGroup>

### Workflow & Task Execution

<CardGroup cols={2}>
  <Card title="*workflow" icon="diagram-project">
    **Start workflow**

    ```bash theme={null}
    *workflow {name}
    *workflow {name} --mode=guided
    *workflow {name} --mode=engine
    ```

    Guided (manual) or engine (real subagent spawning) mode
  </Card>

  <Card title="*run-workflow" icon="play">
    **Run workflow execution**

    ```bash theme={null}
    *run-workflow {name} start
    *run-workflow {name} continue
    *run-workflow {name} status
    *run-workflow {name} skip
    *run-workflow {name} abort
    ```

    Workflow execution control
  </Card>

  <Card title="*validate-workflow" icon="check-double">
    **Validate workflow YAML**

    ```bash theme={null}
    *validate-workflow {name}
    *validate-workflow {path} --strict
    *validate-workflow --all
    ```

    Validate structure, agents, artifacts, logic
  </Card>

  <Card title="*task" icon="list-check">
    **Execute specific task**

    ```bash theme={null}
    *task {task-name}
    *task
    ```

    Execute task or list available
  </Card>

  <Card title="*plan" icon="map">
    **Workflow planning**

    ```bash theme={null}
    *plan
    *plan create
    *plan status
    *plan update {id}
    ```

    Create, check, or update workflow plans
  </Card>

  <Card title="*execute-checklist" icon="clipboard-check">
    **Run checklist**

    ```bash theme={null}
    *execute-checklist {checklist}
    ```

    Execute or list checklists
  </Card>
</CardGroup>

### IDS - Incremental Development System

<CardGroup cols={2}>
  <Card title="*ids check" icon="magnifying-glass-chart">
    **Pre-check registry**

    ```bash theme={null}
    *ids check {intent}
    *ids check {intent} --type {type}
    ```

    Advisory REUSE/ADAPT/CREATE recommendations
  </Card>

  <Card title="*ids impact" icon="diagram-sankey">
    **Impact analysis**

    ```bash theme={null}
    *ids impact {entity-id}
    ```

    Direct/indirect consumers via usedBy BFS traversal
  </Card>

  <Card title="*ids register" icon="pen-field">
    **Register new entity**

    ```bash theme={null}
    *ids register {file-path}
    *ids register {file-path} --type {type}
    *ids register {file-path} --agent {agent}
    ```

    Register entity in registry after creation
  </Card>

  <Card title="*ids health" icon="heart-pulse">
    **Registry health check**

    ```bash theme={null}
    *ids health
    ```

    Health status with graceful fallback
  </Card>

  <Card title="*ids stats" icon="chart-simple">
    **Registry statistics**

    ```bash theme={null}
    *ids stats
    ```

    Entity counts by type, categories, health score
  </Card>
</CardGroup>

### Code Intelligence (Story NOG-2)

<Card title="*sync-registry-intel" icon="brain">
  **Enrich entity registry**

  ```bash theme={null}
  *sync-registry-intel
  *sync-registry-intel --full
  ```

  Add code intelligence data (usedBy, dependencies, metadata). Use --full for complete resync.
</Card>

### Document Operations

<CardGroup cols={2}>
  <Card title="*create-doc" icon="file-plus">
    **Create document**

    ```bash theme={null}
    *create-doc {template}
    *create-doc
    ```

    Create document or list templates
  </Card>

  <Card title="*doc-out" icon="file-export">
    **Output complete document**

    ```bash theme={null}
    *doc-out
    ```

    Export full document
  </Card>

  <Card title="*shard-doc" icon="scissors">
    **Break document into parts**

    ```bash theme={null}
    *shard-doc {document} {destination}
    ```

    Shard large document
  </Card>

  <Card title="*document-project" icon="folder">
    **Generate project documentation**

    ```bash theme={null}
    *document-project
    ```

    Auto-generate project docs
  </Card>

  <Card title="*add-tech-doc" icon="book">
    **Create tech-preset**

    ```bash theme={null}
    *add-tech-doc {file-path}
    *add-tech-doc {file-path} {preset-name}
    ```

    Create tech-preset from documentation
  </Card>
</CardGroup>

### Story & Facilitation

<CardGroup cols={2}>
  <Card title="*create-next-story" icon="file-lines">
    **Create next user story**

    ```bash theme={null}
    *create-next-story
    ```

    Generate next story in sequence
  </Card>

  <Card title="*advanced-elicitation" icon="comments">
    **Execute advanced elicitation**

    ```bash theme={null}
    *advanced-elicitation
    ```

    Interactive requirement elicitation
  </Card>

  <Card title="*chat-mode" icon="message">
    **Start conversational assistance**

    ```bash theme={null}
    *chat-mode
    ```

    Conversational mode
  </Card>
</CardGroup>

### Framework Analysis & Utilities

<CardGroup cols={2}>
  <Card title="*analyze-framework" icon="magnifying-glass">
    **Analyze framework structure**

    ```bash theme={null}
    *analyze-framework
    ```

    Pattern analysis and insights
  </Card>

  <Card title="*list-components" icon="list">
    **List framework components**

    ```bash theme={null}
    *list-components
    ```

    Show all agents, tasks, workflows, etc.
  </Card>

  <Card title="*validate-agents" icon="user-check">
    **Validate all agent definitions**

    ```bash theme={null}
    *validate-agents
    ```

    YAML parse, required fields, dependencies
  </Card>

  <Card title="*correct-course" icon="route">
    **Analyze and correct deviations**

    ```bash theme={null}
    *correct-course
    ```

    Process/quality deviation correction
  </Card>

  <Card title="*index-docs" icon="book-bookmark">
    **Index documentation**

    ```bash theme={null}
    *index-docs
    ```

    Index docs for search
  </Card>

  <Card title="*update-source-tree" icon="sitemap">
    **Validate data file governance**

    ```bash theme={null}
    *update-source-tree
    ```

    Check owners, fill rules, existence
  </Card>

  <Card title="*agent" icon="user">
    **Get agent info**

    ```bash theme={null}
    *agent {name}
    ```

    Show agent details (use @ to transform)
  </Card>
</CardGroup>

### Knowledge Base & Utilities

<CardGroup cols={3}>
  <Card title="*kb" icon="brain">
    Toggle KB mode (loads AIOX Method knowledge)
  </Card>

  <Card title="*status" icon="chart-line">
    Show current context and progress
  </Card>

  <Card title="*help" icon="circle-question">
    Show all available commands
  </Card>

  <Card title="*guide" icon="book">
    Show comprehensive usage guide
  </Card>

  <Card title="*yolo" icon="gauge-high">
    Toggle permission mode
  </Card>

  <Card title="*exit" icon="door-open">
    Exit agent mode
  </Card>
</CardGroup>

## IDS Pre-Action Hooks (Story IDS-7)

<Warning>
  \*\*Advisory (non-blocking) hooks run before *create and *modify**

  * **pre\_create**: Queries registry for REUSE/ADAPT/CREATE recommendations
  * **pre\_modify**: Shows impact analysis (consumers and risk level)
  * **post\_create**: Auto-registers new entities in IDS Entity Registry

  All hooks are advisory - they inform decisions but don't block operations.
</Warning>

## Framework Development Workflow

```mermaid theme={null}
graph TD
    A[Need new component] --> B[*ids check intent]
    B --> C{Recommendation?}
    C -->|REUSE| D[Use existing]
    C -->|ADAPT| E[*modify existing]
    C -->|CREATE| F[*create new]
    E --> G[*ids impact entity-id]
    G --> H[Review consumers]
    H --> I[Apply modifications]
    F --> J[*validate-component]
    J --> K{Valid?}
    K -->|No| L[Fix issues]
    L --> J
    K -->|Yes| M[*ids register file-path]
    M --> N[*update-manifest]
    I --> M
```

## Core Principles

<CardGroup cols={2}>
  <Card title="Security First" icon="shield">
    * Check user role/permissions before sensitive operations
    * Validate all generated code for vulnerabilities
    * No eval() or dynamic code execution in templates
    * Sanitize all user inputs
    * Audit all operations with timestamp and user info
  </Card>

  <Card title="Runtime Loading" icon="download">
    * Execute any resource directly without persona transformation
    * Load resources at runtime, never pre-load
    * Expert knowledge only when using \*kb
    * Process (\*) commands immediately
  </Card>

  <Card title="Template-Driven" icon="file-code">
    * Template-driven component creation for consistency
    * Interactive elicitation for gathering requirements
    * Validation of all generated code and configurations
    * Memory-aware tracking of created/modified components
  </Card>

  <Card title="Numbered Options" icon="list-ol">
    * Always present numbered lists for choices
    * Allow user to type number to select or execute
    * Clear, actionable options
  </Card>
</CardGroup>

## Delegated Commands (Story 6.1.2.3)

<Warning>
  **These commands are delegated to specialized agents:**

  * Epic/Story creation → @pm (`*create-epic`, `*create-story`)
  * Brainstorming → @analyst (`*brainstorm`)
  * Test suite creation → @qa (`*create-suite`)
  * AI prompt generation → @architect (`*generate-ai-prompt`)

  Use specialized agents for these tasks instead of @aiox-master.
</Warning>

## Collaboration

### Orchestrates:

* **All agents** - Can execute any task from any agent directly
* **Framework development** - Creates and modifies agents, tasks, workflows

### When to use specialized agents:

* Story implementation → @dev
* Code review → @qa
* PRD creation → @pm
* Story creation → @sm (or @pm for epics)
* Architecture → @architect
* Database → @data-engineer
* UX/UI → @ux-expert
* Research → @analyst
* Git operations → @devops

## Prerequisites

1. Understanding of AIOX framework structure
2. Templates available in `.aiox-core/development/templates/`
3. Knowledge Base access (toggle with `*kb`)
4. Entity Registry initialized (for IDS commands)

## Usage Examples

<CodeGroup>
  ```bash Create New Agent theme={null}
  @aiox-master
  *ids check "agent for mobile development"
  # Check for existing similar agents
  *create agent mobile-dev
  # Interactive creation workflow
  *validate-component agent mobile-dev
  *update-manifest
  ```

  ```bash Workflow Orchestration theme={null}
  @aiox-master
  *workflow greenfield-fullstack --mode=guided
  # Step-by-step guided workflow
  *plan status
  # Check workflow progress
  ```

  ```bash IDS Governance theme={null}
  @aiox-master
  *ids stats
  # Registry statistics
  *ids health
  # Health check
  *ids impact architect-agent
  # Show who depends on architect agent
  ```

  ```bash Framework Analysis theme={null}
  @aiox-master
  *analyze-framework
  *validate-agents
  *list-components
  ```
</CodeGroup>

## Common Pitfalls

<Warning>
  **Avoid these common mistakes:**

  * ❌ Using for routine tasks (use specialized agents instead)
  * ❌ Not enabling KB mode when modifying framework
  * ❌ Skipping component validation
  * ❌ Not following template syntax
  * ❌ Modifying components without propose-modify workflow
  * ❌ Not checking IDS registry before creating new components
  * ❌ Forgetting to update manifest after component changes
</Warning>

## Related Agents

<Info>
  **@aiox-master can execute any task from any agent**

  However, for specific domains, prefer specialized agents for better context and expertise:
</Info>

<CardGroup cols={4}>
  <Card title="@pm" icon="clipboard" href="/agents/pm">
    Product strategy
  </Card>

  <Card title="@sm" icon="water" href="/agents/sm">
    Story creation
  </Card>

  <Card title="@dev" icon="code" href="/agents/dev">
    Implementation
  </Card>

  <Card title="@qa" icon="check" href="/agents/qa">
    Quality review
  </Card>

  <Card title="@architect" icon="compass-drafting" href="/agents/architect">
    Architecture
  </Card>

  <Card title="@data-engineer" icon="database" href="/agents/data-engineer">
    Database
  </Card>

  <Card title="@ux-expert" icon="paintbrush" href="/agents/ux-expert">
    Design
  </Card>

  <Card title="@analyst" icon="magnifying-glass" href="/agents/analyst">
    Research
  </Card>

  <Card title="@devops" icon="bolt" href="/agents/devops">
    Git operations
  </Card>
</CardGroup>
