Files
SuperBizAgent-java/openspec/specs/rag-log-projections/spec.md
T

1.6 KiB

rag-log-projections Specification

Purpose

Define bounded RAG and Mock query-log projections that execute through the stage 3A ToolBoundary and expose only the frozen ACI contracts to the Agent.

Requirements

Requirement: RAG projection SHALL expose bounded document evidence only

The RAG adapter SHALL accept the logical query request, execute the existing knowledge tool through ToolBoundary, and project only RagToolResult fields. Context packs, retrieval traces, rerank traces, scores, hit reasons, domains, messages and full document bodies SHALL NOT appear in the Agent result.

Requirement: Query-log projection SHALL preserve logical scope and Mock provenance

The query-log adapter SHALL accept only logical topic, query and optional lookback minutes, execute the existing Mock source through ToolBoundary, and project source_kind=MOCK, complete scope, match count, returned count, bounded patterns, bounded timeline events and truncation.

Requirement: Projection SHALL redact and bound sensitive log content

The log projector SHALL exclude instance and metrics fields and redact credentials, token-like values, host/pod identifiers, PIDs, IP addresses, SQL literals and stack-like suffixes from Agent-facing messages. It SHALL enforce per-item, collection and total UTF-8 bounds and set truncated=true when any bound removes data.

Requirement: Adapters SHALL reuse canonical boundary ownership

Both adapters SHALL pass the framework tool_call_id and RunContext to the existing ToolBoundary and SHALL NOT create a second ID, write a parallel store, return raw responses, or modify legacy audit paths.