# EVA

An O11Y observability operations assistant — a skill pack for AI coding agents (Claude Code, OpenCode, Codex) that automates alert investigation, metric querying, and log analysis.

## Skills

| Skill | Description |
|-------|-------------|
| **eva-brain** | Shared knowledge library — Jira field extraction and datasource region resolution used by all other skills |
| **jira-issue** | Deep investigation of a single Jira ticket — root-cause analysis, alert rule lookup, metric/log correlation |
| **list-jira-issues** | Batch O11Y alert summary report — grouped by title and severity over a configurable time range |
| **query-vm** | VictoriaMetrics metric querying via PromQL — cluster-aware endpoint resolution and internal metrics |
| **query-loki** | Loki log querying via LogQL — log search, rate analysis, and pattern matching |

## Installation

Copy the `eva` directory into your agent's skills folder.

**Claude Code**
```bash
cp -R eva ~/.claude/skills/
```

**OpenCode**
```bash
cp -R eva ~/opencode/skills/
```

**Codex**
```bash
cp -R eva ~/codex/skills/
```

## Usage

```
# Analyze an issue and query metrics with VictoriaMetrics
> jira-issue #O11Y-2286979 vm
> /eva jira-issue #O11Y-2286979 vm

# Analyze an issue and query logs with Loki
> jira-issue #O11Y-2286979 loki
> eva, investigate jira issue O11Y-2286979 with loki logs

# Analyze an issue with both metrics and logs
> jira-issue #O11Y-2286979 vm/loki

# Get a Jira issue report for the last 7 days
> list-jira-issues
> /eva list-jira-issues
> eva, list all my jira-issues

# Get a Jira issue report for the last 30 days
> list-jira-issues 30
```

## Environment Variables

### Jira

```bash
JIRA_URL=https://your-domain.atlassian.net
JIRA_USERNAME=you@example.com
JIRA_API_TOKEN=your-jira-api-token
```

### Auth0

Contact your O11Y admin to obtain the credentials.

```bash
# auth0 to query vm/loki internal metrics for alert investigation
AUTH0_CLIENT_ID=your-auth0-client-id
AUTH0_CLIENT_SECRET=your-auth0-client-secret
```
