LearnNewsExamplesServices
Frontmatter
id11922
titleClean Memory Core source-comment archaeology
stateClosed
labels
documentationenhancementairefactoringarchitecturemodel-experience
assigneesneo-gpt
createdAtMay 24, 2026, 10:48 PM
updatedAtJun 7, 2026, 7:15 PM
githubUrlhttps://github.com/neomjs/neo/issues/11922
authorneo-gpt
commentsCount1
parentIssue11912
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 1, 2026, 7:51 AM

Clean Memory Core source-comment archaeology

Closed v13.0.0/archive-v13-0-0-chunk-13 documentationenhancementairefactoringarchitecturemodel-experience
neo-gpt
neo-gpt commented on May 24, 2026, 10:48 PM

Parent epic: #11912

Context

#11912 started as a single cleanup ticket, but the current ai/**/*.mjs diagnostic is broad enough that it should be managed as an epic. This subissue owns the Memory Core group instead of splitting work per file.

Current grouped baseline on origin/dev:

  • ai/services/memory-core/**/*.mjs: 171 diagnostic matches.
  • ai/mcp/server/memory-core/**/*.mjs: 36 diagnostic matches.
  • Top files include MailboxService.mjs, HealthService.mjs, GraphService.mjs, MemoryService.mjs, SessionService.mjs, DatabaseService.mjs, WakeSubscriptionService.mjs, and Memory Core MCP server/config files.

The Problem

Memory Core source comments carry dense ticket, PR, AC, cycle, and phase archaeology. These comments often describe the origin story of a behavior rather than the durable runtime contract a maintainer needs when editing Memory Core.

The Architectural Reality

Memory Core is the highest-risk ai/ surface for this cleanup because it owns mailbox coordination, graph persistence, Chroma migration observability, memory/session retrieval, wake subscriptions, and MCP server configuration. Comments must preserve local invariants and failure modes while removing snapshot references that belong in tickets, PRs, ADRs, or release notes.

The Fix

Clean Memory Core source comments and JSDoc in grouped batches:

  1. Rewrite ticket/PR/AC/cycle/phase references into durable contracts, stable symbols, and local service boundaries.
  2. Preserve behavior and runtime strings unless a comment exposes a separate executable bug.
  3. Document before/after counts per batch, including false positives left untouched.
  4. Use this subissue as the close target only after the Memory Core group is clean; individual PRs may reference it while contributing partial batches.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
ai/services/memory-core/**/*.mjs comments/JSDoc #11912 source-comment cleanup epic Source comments explain Memory Core invariants without historical ticket anchors Keep runtime strings unchanged and document as false positives PR bodies Before/after focused diagnostics
ai/mcp/server/memory-core/**/*.mjs comments/JSDoc #11912 source-comment cleanup epic MCP server/config comments explain stable operator contracts Defer generated/openapi surfaces outside .mjs unless separately scoped PR bodies Before/after focused diagnostics

Decision Record Impact

Aligned with ADR 0005 and ADR 0008. No ADR amendment expected; this is cleanup under the already-graduated why-first source-comment contract.

Acceptance Criteria

  • Clean Memory Core service comments/JSDoc so the focused diagnostic returns only documented false positives, if any.
  • Clean Memory Core MCP server/config .mjs comments/JSDoc under the same rule.
  • Preserve runtime behavior; any executable bug discovered during cleanup is filed separately.
  • PR evidence includes before/after focused counts and git diff --check.
  • Parent #11912 remains open until all grouped subissues are complete.

Out of Scope

  • Knowledge Base, Graph, GitHub Workflow, daemon, script, and residual config groups.
  • Generated resource mirrors, tests, PR bodies, issue bodies, and ADR/discussion archaeology.
  • Runtime behavior changes.

Related

  • Parent epic: #11912
  • Existing contribution: PR #11920 cleaned MailboxService.mjs as the first Memory Core batch.

Origin Session ID: 019e5bac-15f3-7830-a59c-72772c757f9a

Handoff Retrieval Hint: query_raw_memories("11912 Memory Core source-comment archaeology MailboxService HealthService GraphService")

tobiu referenced in commit 13447af - "chore(ai): clean memory-core source comments (#11922) (#11927) on May 24, 2026, 11:37 PM
tobiu referenced in commit 1f42721 - "chore(ai): clean memory-core helper comments (#11922) (#11944) on May 25, 2026, 7:22 AM
tobiu referenced in commit 96a9f05 - "chore(ai): clean memory core service comments (#11922) (#11975) on May 25, 2026, 3:56 PM
tobiu referenced in commit 0aebc26 - "chore(ai): clean residual memory-core comments (#11922) (#12127) on May 28, 2026, 9:35 AM
tobiu closed this issue on Jun 1, 2026, 7:51 AM
tobiu referenced in commit e3cc70f - "chore(ai): clean memory-core comment archaeology (#11922) (#12283) on Jun 1, 2026, 7:51 AM