Agent Operations Retrospective (6/7) — 10 Omissions Found by Full Inventory Audit

memcore — SQLite로 다시 짠 메모리 코어, 51 tests pass

Subtitle: A full cross-reference of 65 scripts reveals 10 missing entries around the memory layer


핵심 요약

  • Full cross-reference of 65 files in ~/Project/scripts/ confirmed that 10 peripheral memory scripts were missing from the previously documented inventory.
  • The 10 core memory pipeline scripts (retain/dialectic/decay/lint/entities/topics/prefetch/bank_migrate) are fully migrated.
  • Three items must be resolved before Hermes goes live: vector embedding / decisions queue / archive & housekeeping.

This post documents the full cross-reference audit pattern for detecting the "migrate the core, drop the periphery" mistake in migration work — and classifies the 10 omitted scripts it surfaced.

1. memcore 라이브러리

Full Cross-Reference Audit — How It Works

Migration inventories are typically built around "what looks necessary." This approach gets the core pipeline across but drops housekeeping, archive, and cleanup scripts. The system runs fine initially, then archive/TTL/stale cleanup accumulates as deferred debt and fails days later.

The procedure to catch this is straightforward.

  1. Snapshot the full file list of the source directory (~/Project/scripts/).
  2. Map each entry against the migration inventory (the porting spec).
  3. Classify unmapped files into three tiers: core / peripheral / diagnostic & utility.
  4. Re-classify peripheral tier into: pre-launch / post-launch / low-priority.

Applying this procedure to 65 files in ~/Project/scripts/ confirmed the core inventory was already migrated, but 10 peripheral scripts remained unmapped.

The 10 Omissions — By Category

Immediate Add — memcore v0.2

  1. decision-prepare.py — Generates LLM decision requests (TOPIC_CLASSIFY, CONFLICT_RESOLVE, CHANGELOG_SUMMARIZE)
  2. decision-apply.py — Applies LLM responses to bank/
  3. conflict-apply.py — Applies W-tag conflict resolution
  4. memory-archive.sh — Moves processed memory/ entries to archived/
  5. memory-optimize.py — Reflect Phase 2 optimization
  6. memory-warning-report.py — Daily audit Phase C memory warning
3. bank/ → memcore 마이그레이션

Medium Priority

  1. recall-cleanup.py — Recall TTL cleanup
  2. session-cleanup.py — Stale/orphan session cleanup
  3. session-archive.py — Harvests content from .deleted sessions
  4. monthly-review.py — Monthly memory review data collection

Diagnostic & Utility (Low Priority)

reflect-trace.py, section-extract.py, source-ingest.py, skill-candidate-stage.py. These are not launch blockers; they are classified separately as observation and collection utilities.

Decision Tree — Pre/Post-Launch Split

The audit results drove four architectural decisions.

  • (a) Vector embedding: Required. Preserves semantic search when DB scales.
  • (b) Sync interval: 30 min → 24 h relaxation is dual-run period only. Reverts to real-time sync_turn when Hermes becomes primary.
  • (c) Heartbeat escalation: Port after Hermes launch.
  • (d) docs-snapshot: Configured separately for Hermes.

Priority Table — Before and After Hermes Launch

# Task Timing Est.
1 Vector embedding layer (sqlite-vss or separate .ann + bge-m3 / Hermes auxiliary_client) Pre-launch 2–3h
2 memcore.decisions (LLM decision queue) Pre-launch 2h
3 memcore.archive + housekeeping Pre-launch 1–2h
4 Hermes live launch validation Launch
5 memcore.heartbeat (proactive 1310→300) Post-launch 2h
6 Daily Audit → Hermes cron Post-launch 1h

Migration Baseline (Unchanged)

Items that were not disturbed by the audit. Recording these alongside the omission list prevents self-correction from skewing in one direction.

  • memcore.dialectic (U-tag 3-phase)
  • memcore.decay (confidence decay)
  • memcore.lint (Retain tag validator)
  • memcore.entities (stale detection)
  • memcore.topics (registry + M2M)
  • memcore.ingest (retain-extract / merge unified)
  • memcore.prefetch (FTS5 hybrid)
  • memcore.bank_migrate (READ-ONLY, --incremental)
  • MemcoreProvider adapter (Hermes MemoryProvider implementation)
  • LaunchAgent auto sync (daily 03:30)
  • Data migration: 38 files → 236 sections + 4 entities + 15 topics + 498 links (0 errors)
  • Tests: 51/51 passed

Scope and Limitations

The full cross-reference audit is effective under these conditions.

  • The source tree is concentrated in one folder or one repository (distributed source trees produce unwieldy file snapshots).
  • Migration targets are script or utility units (function- or class-level porting is better served by AST-based tooling).
  • Unmapped files can be manually classified by someone with domain knowledge (without it, the boundary between diagnostic/utility and peripheral tiers blurs).

The limitation is explicit. The cross-reference only catches "file present / absent." It does not catch semantic omissions — cases where functionality was ported but constraints, configuration, or defaults differ. Those require separate behavior-based validation (tests, sample input comparison).

Summary

An inventory is never complete on the first pass. A list built by selecting only what looks essential will always drop the peripheral tier. "Scan the entire script folder one more time" is the single cheapest and most effective safety net in migration audit work.

Open question: how far can full cross-reference be automated? File list comparison is scriptable, but the three-tier classification and pre/post-launch split currently require human judgment. Whether an LLM-based classifier can absorb that boundary is the next thing to observe.


Series Index

  1. Dissecting OpenClaw — Agent and Cron Structure Analysis
  2. What to Migrate, What to Drop — 4-Category Classification Table
  3. Code Review: Selecting 8 Scripts Worth Porting
  4. Migration Plan — Porting Spec Grouped into 11 Categories
  5. memcore — Memory Core Rebuilt on SQLite, 51 Tests Pass
  6. 10 Omissions Found by Full Inventory Audit — Script Audit Pattern (this post)

댓글

이 블로그의 인기 게시물

Agent Memory Engine (2/10) — Building an AI Agent Memory System with SQLite Alone

"ML Foundations (9/9) — PyTorch vs TensorFlow, and the Road to Local LLMs"

"RAG Core Study (14/26) — Evaluation Sets with RAGAS & DeepEval"

"ML Foundations (8/9) — Deep Learning Architectures: CNN, RNN, Attention"

"ML Foundations (7/9) — Deep Learning Training: Optimizers, Regularization, Initialization"

OpenClaw to Hermes Migration (2/13) — What to Preserve, Partially Port, or Discard

AI Agents I Built (5/7) — Building an Automated Blogger API Publishing System