LearnNewsExamplesServices
Frontmatter
id12087
titleSub 2 Phase 1b — MCP exposure of 5-axis REM observability primitive + doc scaffold
stateClosed
labels
enhancementaiarchitecturemodel-experience
assigneesneo-gpt
createdAtMay 27, 2026, 10:17 AM
updatedAtMay 27, 2026, 6:09 PM
githubUrlhttps://github.com/neomjs/neo/issues/12087
authorneo-opus-4-7
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 27, 2026, 6:09 PM

Sub 2 Phase 1b — MCP exposure of 5-axis REM observability primitive + doc scaffold

Closedenhancementaiarchitecturemodel-experience
neo-opus-4-7
neo-opus-4-7 commented on May 27, 2026, 10:17 AM

Parent context

Epic #12065 Sub 2 #12068 — Phase 1b follow-up to PR #12081 (Phase 1a, APPROVED, awaiting human merge). Phase 1a shipped 5 axis-count helpers across ChromaManager + GraphService + TopologyInferenceEngine. Phase 1b exposes those helpers via Memory Core MCP for operator-facing queryability + lands the learn/agentos/rem-state-model.md doc scaffold.

Dependency

BLOCKED-ON: PR #12081 merge (Phase 1a helpers must exist on origin/dev before MCP exposure can import them).

Contract Ledger

Per ticket-intake-workflow.md §7 — documented upfront per ticket-author discipline.

MCP tool surface

Surface Input Output (success) Output (fallback) Bounded by
manage_database action get_rem_pipeline_state (preferred — extends existing tool) OR new get_rem_pipeline_state tool Optional {sessionId?: string} — if provided, includes per-session axis C count for that session {undigested: Number, digested: Number, sessionNodes: Number, topologyConflicts: Number, perSession?: {sessionId, entityCount: Number}} Empty/zero values per axis when underlying storage/file unavailable (helpers' graceful-degradation contract propagates) Single MCP call ≤ ~500ms (5 helpers + serialize)

OpenAPI delta

File Change Source of Authority
ai/mcp/server/memory-core/openapi.yaml NEW operation get_rem_pipeline_state OR EXTENDED manage_database action enum mcp-tool-description-budget.md audit — description ≤ 1024 chars, no internal cross-refs, no architectural narrative, single-line preferred
ai/mcp/server/memory-core/Server.mjs NEW MCP handler invoking the 5 helpers + assembling response pull-request-workflow.md §1.1 if touching MCP server substrate

Doc scaffold

File Disposition Content
learn/agentos/rem-state-model.md NEW file (a) 5-axis observability framing + GPT 76× divergence anchor; (b) MCP tool usage examples; (c) operator-facing "how to diagnose REM pipeline silent failures" cookbook; (d) forward-pointer to Phase 2 state model schema

Acceptance Criteria

  • AC1: MCP exposure shipped — either new get_rem_pipeline_state tool OR manage_database action extension (operator/lead picks shape; both satisfy AC1)
  • AC2: Returned envelope contains all 5 axes: undigested, digested, sessionNodes, topologyConflicts, plus optional per-session entityCount keyed on sessionId parameter
  • AC3: Doc scaffold at learn/agentos/rem-state-model.md covers the 4 content rows above; cross-references PR #12081 helper JSDocs + PR #12077 Sub 1 forensics runbook
  • AC4: Unit test for the MCP handler (mocked helpers + response shape assertion); integration test optional pending Sub 2 Phase 2 state model availability
  • AC5: OpenAPI passes McpServerToolLimits validation (≤ 1024 char description per mcp-tool-description-budget.md)
  • AC6: PR body includes Phase 1b → Phase 2 sequencing note (Phase 2 absorbs the per-cycle JSONL state model + wall-clock + cadence-overflow detection — see #12068 comment 4552584285)

Avoided Traps

  • ❌ Don't ship Phase 1b BEFORE Phase 1a (#12081) merges — Phase 1b imports the 5 helpers Phase 1a adds
  • ❌ Don't bundle Phase 2 scope (JSONL state model + wall-clock + cadence-overflow detection) — that's a separate ticket (TBD-filed-shortly) with its own AC surface
  • ❌ Don't extend the helpers' return shape in this phase — helpers stay verbatim from Phase 1a; MCP layer is the projection/composition surface

Related

  • Epic #12065
  • Sub 2 ticket #12068
  • PR #12081 (Phase 1a, dependency)
  • PR #12077 Sub 1 forensics runbook (cross-references in doc scaffold)
  • Sub 2 Phase 2 follow-up ticket #12088 (per-cycle JSONL state model + wall-clock + cadence-overflow detection scope)
tobiu closed this issue on May 27, 2026, 6:09 PM
tobiu referenced in commit 14e4807 - "feat(ai): expose REM pipeline state MCP tool (#12087) (#12095) on May 27, 2026, 6:09 PM