{
  "report_info": {
    "version": "9.0.1",
    "generated_at": "2026-04-11T17:16:18Z",
    "binary_name": "ai-learner"
  },
  "binary": {
    "name": "ai-learner",
    "path": "/home/kodachi/k900/dashboard/hooks/ai-learner",
    "timestamp": "2026-04-11T17:16:18Z",
    "file_info": {
      "size": 22416960,
      "sha256": "74b0ce4861f0b1c6c2cd1c3e99a69bc452fa2ab3588fc21866cfa5c8f69b7d5e"
    },
    "flag_n": {
      "status": "success",
      "timestamp": "2026-04-11T17:16:18.620125977Z",
      "command": "info",
      "version": "9.0.1",
      "data": {
        "name": "ai-learner",
        "version": "9.0.1",
        "author": "Warith Al Maawali <warith@digi77.com>",
        "description": "AI learning engine for continuous improvement and performance analysis",
        "copyright": "© 2013-2026 Warith Al Maawali - Linux Kodachi",
        "website": "https://kodachi.cloud",
        "license": "LicenseRef-Kodachi-SAN-1.0",
        "features": [
          "Feedback aggregation and analysis",
          "Incremental learning with convergence detection",
          "Performance tracking and trend analysis",
          "Multi-format report generation (JSON, Markdown, HTML)"
        ],
        "securityFeatures": {
          "inputValidation": "All inputs are validated and sanitized",
          "rateLimiting": "Built-in rate limiting for network operations",
          "authentication": "Secure authentication with certificate pinning",
          "encryption": "TLS 1.3 for all network communications"
        },
        "systemRequirements": {
          "os": "Linux (Debian-based)",
          "privileges": "root/sudo for system operations",
          "dependencies": [
            "OpenSSL",
            "libcurl"
          ]
        }
      },
      "errors": [],
      "warnings": [],
      "metadata": {
        "executionTime": 0,
        "hostname": "Boardroom-System",
        "user": "kodachi"
      }
    },
    "flag_v": {
      "status": "success",
      "timestamp": "2026-04-11T17:16:18.709393283Z",
      "command": "version",
      "version": "9.0.1",
      "data": {
        "name": "ai-learner",
        "version": "9.0.1",
        "buildDate": "2026-04-11T17:16:18.708621278Z",
        "gitCommit": "unknown",
        "rustVersion": "1.82.0"
      },
      "errors": [],
      "warnings": [],
      "metadata": {
        "executionTime": 0,
        "hostname": "Boardroom-System",
        "user": "kodachi"
      }
    },
    "flag_h": {
      "status": "success",
      "timestamp": "2026-04-11T17:16:18.789876101Z",
      "command": "help",
      "version": "9.0.1",
      "data": {
        "name": "ai-learner",
        "description": "AI learning engine for continuous improvement and performance analysis",
        "usage": "ai-learner [OPTIONS] [COMMAND] [ARGS]",
        "commandCategories": [
          {
            "category": "Analysis Operations",
            "commands": [
              {
                "name": "analyze",
                "description": "Analyze model performance and trends",
                "usage": "ai-learner analyze [OPTIONS]",
                "options": [],
                "requires_sudo": false
              }
            ]
          },
          {
            "category": "Learning Operations",
            "commands": [
              {
                "name": "learn",
                "description": "Run learning cycle to improve model based on feedback",
                "usage": "ai-learner learn [OPTIONS]",
                "options": [],
                "requires_sudo": false
              }
            ]
          },
          {
            "category": "Reporting Operations",
            "commands": [
              {
                "name": "report",
                "description": "Generate comprehensive performance reports",
                "usage": "ai-learner report [OPTIONS]",
                "options": [],
                "requires_sudo": false
              }
            ]
          },
          {
            "category": "Status Operations",
            "commands": [
              {
                "name": "status",
                "description": "Show ai-learner status, database health, and activity metrics",
                "usage": "ai-learner status [OPTIONS]",
                "options": [],
                "requires_sudo": false
              }
            ]
          }
        ],
        "globalOptions": [
          {
            "flag": "-h, --help",
            "description": "Print help information"
          },
          {
            "flag": "-v, --version",
            "description": "Print version information"
          },
          {
            "flag": "-n, --info",
            "description": "Display detailed information"
          },
          {
            "flag": "-e, --examples",
            "description": "Show usage examples"
          },
          {
            "flag": "--json",
            "description": "Output in JSON format"
          },
          {
            "flag": "--json-pretty",
            "description": "Pretty-print JSON output with indentation"
          },
          {
            "flag": "--json-human",
            "description": "Enhanced JSON output with improved formatting (like jq)"
          },
          {
            "flag": "--verbose",
            "description": "Enable verbose output"
          },
          {
            "flag": "--quiet",
            "description": "Suppress non-essential output"
          },
          {
            "flag": "--no-color",
            "description": "Disable colored output"
          },
          {
            "flag": "--config <FILE>",
            "description": "Use custom configuration file"
          },
          {
            "flag": "--timeout <SECS>",
            "description": "Set timeout (default: 30)"
          },
          {
            "flag": "--retry <COUNT>",
            "description": "Retry attempts (default: 3)"
          }
        ],
        "environmentVariables": [
          {
            "name": "RUST_LOG",
            "description": "Set logging level",
            "default": "info",
            "values": "error|warn|info|debug|trace"
          },
          {
            "name": "NO_COLOR",
            "description": "Disable all colored output when set",
            "default": "unset",
            "values": "1|true|yes (any value disables color)"
          }
        ],
        "exitCodes": {
          "2": "Invalid arguments",
          "0": "Success",
          "3": "Permission denied",
          "1": "General error",
          "4": "Network error",
          "5": "File not found"
        }
      },
      "errors": [],
      "warnings": [],
      "metadata": {
        "executionTime": 0,
        "hostname": "Boardroom-System",
        "user": "kodachi"
      }
    },
    "flag_e": {
      "status": "success",
      "timestamp": "2026-04-11T17:16:18.949211756Z",
      "command": "examples",
      "version": "9.0.1",
      "data": {
        "name": "ai-learner",
        "description": "Usage examples for ai-learner",
        "categories": [
          {
            "id": "1_basic_learning",
            "title": "Basic Learning Operations",
            "description": "Run learning cycles and update models based on feedback",
            "examples": [
              {
                "command": "sudo ai-learner learn",
                "description": "Run a full learning cycle on all feedback",
                "expectedOutput": "Learning statistics showing improvements",
                "notes": "Processes all feedback since last run"
              },
              {
                "command": "sudo ai-learner learn --incremental",
                "description": "Run incremental learning on new feedback only",
                "expectedOutput": "Quick learning update with delta statistics"
              },
              {
                "command": "sudo ai-learner learn --json",
                "description": "Get learning results in JSON format",
                "expectedOutput": "JSON response with detailed learning metrics",
                "notes": "Useful for automated processing"
              },
              {
                "command": "sudo ai-learner learn --learning-rate 0.05",
                "description": "Learn with custom learning rate",
                "expectedOutput": "Learning results with adjusted convergence speed",
                "notes": "Lower rates for more stable convergence"
              },
              {
                "command": "sudo ai-learner learn --min-feedback 100",
                "description": "Learn with minimum feedback threshold",
                "expectedOutput": "Learning skipped if insufficient feedback available",
                "notes": "Ensures statistical significance"
              },
              {
                "command": "sudo ai-learner learn --incremental --json",
                "description": "Incremental learning with JSON output",
                "expectedOutput": "JSON with incremental learning delta statistics",
                "notes": "Combines fast incremental mode with structured output"
              },
              {
                "command": "sudo ai-learner learn --learning-rate 0.05 --min-feedback 100 --json",
                "description": "Full parameter learning with JSON output",
                "expectedOutput": "JSON with custom rate and threshold learning metrics",
                "notes": "All learning parameters combined for fine-tuned runs"
              },
              {
                "command": "sudo ai-learner learn --output-policy",
                "description": "Generate signed AI policy file after learning",
                "expectedOutput": "Learning cycle + ai-policy.json generated in results/",
                "notes": "Policy contains intent thresholds, tool allowlist, risk mode"
              },
              {
                "command": "sudo ai-learner learn --output-policy --json",
                "description": "Generate policy with JSON output",
                "expectedOutput": "JSON learning results + signed policy file written",
                "notes": "Policy is signed with SHA-256 HMAC to prevent tampering"
              }
            ]
          },
          {
            "id": "2_performance_analysis",
            "title": "Performance Analysis",
            "description": "Analyze model accuracy and performance trends",
            "examples": [
              {
                "command": "sudo ai-learner analyze --period last-7-days",
                "description": "Analyze performance over the last week",
                "expectedOutput": "Accuracy metrics and trend analysis"
              },
              {
                "command": "sudo ai-learner analyze --metric accuracy --json",
                "description": "Get accuracy analysis in JSON format",
                "expectedOutput": "JSON with per-intent accuracy breakdown",
                "notes": "Supports: accuracy, confidence, f1-score"
              },
              {
                "command": "sudo ai-learner analyze --learning-curve",
                "description": "Generate learning curve visualization data",
                "expectedOutput": "Time-series data showing accuracy improvement",
                "notes": "Useful for identifying plateaus"
              },
              {
                "command": "sudo ai-learner analyze --metric confidence",
                "description": "Analyze confidence metrics",
                "expectedOutput": "Confidence score distribution and statistics",
                "notes": "Shows prediction certainty levels"
              },
              {
                "command": "sudo ai-learner analyze --period last-30-days --json",
                "description": "Analyze last 30 days as JSON",
                "expectedOutput": "JSON with monthly performance trends",
                "notes": "Useful for monthly reporting"
              },
              {
                "command": "sudo ai-learner analyze --period all-time",
                "description": "Analyze all-time data",
                "expectedOutput": "Complete historical performance analysis",
                "notes": "Shows long-term improvement trends"
              },
              {
                "command": "sudo ai-learner analyze --metric f1-score --json",
                "description": "Analyze F1-score metric with JSON output",
                "expectedOutput": "JSON with F1-score breakdown per intent",
                "notes": "F1-score balances precision and recall"
              },
              {
                "command": "sudo ai-learner analyze --learning-curve --json",
                "description": "Learning curve data as JSON",
                "expectedOutput": "JSON time-series of accuracy improvement",
                "notes": "Structured data for visualization tools"
              }
            ]
          },
          {
            "id": "2b_tier_analysis",
            "title": "AI Tier Performance",
            "description": "Analyze learning metrics per AI engine tier (TF-IDF, ONNX, Mistral.rs, GenAI/Ollama, Legacy LLM, Claude)",
            "examples": [
              {
                "command": "sudo ai-learner analyze --metric accuracy --json",
                "description": "Show accuracy breakdown across all AI tiers",
                "expectedOutput": "JSON with per-tier accuracy metrics",
                "notes": "Compares tier performance for optimization decisions"
              },
              {
                "command": "sudo ai-learner analyze --period last-7-days --json",
                "description": "Weekly tier performance trends",
                "expectedOutput": "JSON with weekly metrics including new tier data",
                "notes": "Tracks mistral.rs and GenAI tier improvement over time"
              },
              {
                "command": "sudo ai-learner analyze --metric accuracy --json",
                "description": "ONNX vs LLM routing breakdown",
                "expectedOutput": "JSON with fast-path vs slow-path query statistics",
                "notes": "Shows what percentage of queries use ONNX fast path vs LLM"
              }
            ]
          },
          {
            "id": "3_reporting",
            "title": "Report Generation",
            "description": "Generate comprehensive reports on learning performance",
            "examples": [
              {
                "command": "sudo ai-learner report",
                "description": "Generate a summary report in JSON format",
                "expectedOutput": "JSON report with all performance metrics"
              },
              {
                "command": "sudo ai-learner report --format markdown",
                "description": "Generate a Markdown report",
                "expectedOutput": "Formatted Markdown document with tables and graphs",
                "notes": "Great for documentation"
              },
              {
                "command": "sudo ai-learner report --format html --output results/learning-report.html",
                "description": "Generate an HTML report with visualizations",
                "expectedOutput": "Interactive HTML report saved to file",
                "notes": "Includes charts and graphs"
              },
              {
                "command": "sudo ai-learner report --period last-7-days",
                "description": "Generate weekly report",
                "expectedOutput": "JSON report covering last 7 days of activity",
                "notes": "Useful for weekly reviews"
              },
              {
                "command": "sudo ai-learner report --period all-time --format markdown --json",
                "description": "Full report in markdown JSON format",
                "expectedOutput": "Complete historical report in markdown format as JSON",
                "notes": "Combines all-time data with markdown formatting"
              },
              {
                "command": "sudo ai-learner report --format html --output results/report.html",
                "description": "Generate HTML report to file",
                "expectedOutput": "HTML report with charts saved to results/report.html",
                "notes": "File output within execution folder"
              }
            ]
          },
          {
            "id": "4_related_tools",
            "title": "Integration Workflow",
            "description": "ai-learner commands commonly used alongside training/query cycles",
            "examples": [
              {
                "command": "ai-learner status --json",
                "description": "Check learner health before running learning jobs",
                "expectedOutput": "JSON status with metrics and last run timestamps",
                "notes": "Recommended first step in automation pipelines"
              },
              {
                "command": "ai-learner analyze --period last-day --json",
                "description": "Inspect recent feedback trends before retraining",
                "expectedOutput": "JSON analysis of recent learner performance",
                "notes": "Useful for deciding whether to run learn now"
              },
              {
                "command": "ai-learner report --period last-7-days --format markdown --json",
                "description": "Generate weekly markdown report for training review",
                "expectedOutput": "JSON envelope containing markdown report",
                "notes": "Good handoff artifact before ai-trainer operations"
              },
              {
                "command": "sudo ai-learner learn --incremental",
                "description": "Run incremental learning with existing feedback",
                "expectedOutput": "Incremental learning summary and convergence data",
                "notes": "Requires authentication"
              },
              {
                "command": "sudo ai-learner learn --output-policy --json",
                "description": "Learn and regenerate policy artifacts in one step",
                "expectedOutput": "JSON with learning results and policy output status",
                "notes": "Requires authentication"
              },
              {
                "command": "ai-learner report --period all-time --format html --output results/learning-report.html",
                "description": "Generate long-range HTML report for model tuning",
                "expectedOutput": "HTML report written to results/learning-report.html",
                "notes": "Use before planning major trainer updates"
              }
            ]
          }
        ],
        "quickReference": [
          "sudo ai-learner --help",
          "sudo ai-learner --version",
          "sudo ai-learner --info --json",
          "sudo ai-learner --examples --json"
        ]
      },
      "errors": [],
      "warnings": [],
      "metadata": {
        "executionTime": 0,
        "hostname": "Boardroom-System",
        "user": "kodachi"
      }
    }
  }
}
