STEP 1535 — Meta-Optimize Event Log Infrastructure v0.1

STEP 1535 · ARIS /meta-optimize 前提 layer · Rei-AIOS · 2026-08-30 · commit b49d9449f

要旨

ARIS /meta-optimize (SKILL.md 自己 patch 提案 + human gate 必須) の 前提 infrastructure。 ARIS は .aris/meta/events.jsonl に skill invocation / tool call / failure / user intervention / model selection を append-only 記録し、 /meta-optimize が その log から patch 提案を生成。 本 STEP は Rei 版 の per-day jsonl rotation EventLogger primitive を 起草 (Phase 0 = infrastructure 前提、 実 event capture inject は 別 STEP)。

Schema

File:   data/meta-optimize/events-<YYYY-MM-DD>.jsonl
Format: 1 event per line, JSON

MetaEvent {
  timestamp: ISO 8601 UTC
  sessionId?: string
  eventType: EventType
  subject: string   (short label = skill name / tool name / phase)
  detail: Record<string, any>   (per-eventType payload)
}

EventType 7 種:
  skill_invocation      slash command / MCP tool invoked
  tool_call             tool call attempted
  tool_failure          tool call failed (retry / fallback / error)
  user_intervention     user interrupted / redirected
  model_selection       model chosen / switched
  human_override        human judgment overrode automated decision
  convergence_signal    loop converged / diverged (future /meta-optimize primitive)

API

Test coverage (22/22 PASS)

test/step1535-meta-optimize-event-log-test.ts — 6 section:

  1. append + readDate + jsonl format verify (3 event / sessionId 保持 / per-line valid JSON)
  2. query filters (eventType / subjectPrefix / maxCount / no filter)
  3. Corrupted line handling (2 valid + 1 invalid → 2 returned)
  4. Missing file → [] (readDate + query)
  5. convergenceCounts helper (converged/diverged/other/total)
  6. Graceful — append never throws on unwritable path

Honest scope (Phase 0 skeleton)

Related