LearnNewsExamplesServices
Frontmatter
id7332
titleEnhance Session Summary with Rich Metadata
stateClosed
labels
enhancement
assigneestobiu
createdAtOct 3, 2025, 10:41 AM
updatedAtOct 3, 2025, 10:42 AM
githubUrlhttps://github.com/neomjs/neo/issues/7332
authortobiu
commentsCount0
parentIssue7316
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 3, 2025, 10:42 AM

Enhance Session Summary with Rich Metadata

Closed v11.0.0 enhancement
tobiu
tobiu commented on Oct 3, 2025, 10:41 AM

The buildScripts/ai/summarizeSession.mjs script should be enhanced to extract more detailed, structured metadata from each agent session. This will allow for better filtering, analysis, and learning from past sessions.

The Problem

Currently, the session summary is a block of text. While useful, it is difficult to programmatically query or filter sessions based on their quality, outcome, or complexity.

The Solution

The summarization prompt sent to the generative model will be updated to request a JSON object containing the summary along with several key metrics.

New Data Structure:

The model will be asked to provide a JSON object with the following structure:

{
  "summary": "A detailed summary of the session's events...",
  "title": "A concise, descriptive title for the session.",
  "category": "bugfix | feature | refactoring | documentation | new-app | etc.",
  "quality": "A score (0-100) rating the session's flow and focus.",
  "productivity": "A score (0-100) indicating if the session's goals were achieved.",
  "impact": "A score (0-100) estimating the significance of the changes made.",
  "complexity": "A score (0-100) rating the task's complexity based on factors like file touchpoints, depth of changes (core vs. app-level), and cognitive load. A simple typo fix is < 10. A deep refactoring of a core module is > 90.",
  "technologies": ["neo.mjs", "chromadb", "nodejs"]
}

Implementation Steps:

  1. Update Prompt: Modify the summaryPrompt in buildScripts/ai/summarizeSession.mjs to instruct the model to return the data in the specified JSON format.
  2. Parse Response: Parse the JSON response from the model.
  3. Store Metadata: Add the new fields (title, category, quality, productivity, impact, complexity, technologies) to the metadatas object being upserted into the sessionsCollection. The summary text will remain the main document content.
tobiu assigned to @tobiu on Oct 3, 2025, 10:41 AM
tobiu added the enhancement label on Oct 3, 2025, 10:41 AM
tobiu added parent issue #7316 on Oct 3, 2025, 10:41 AM
tobiu referenced in commit 52a2923 - "Enhance Session Summary with Rich Metadata #7332" on Oct 3, 2025, 10:42 AM
tobiu closed this issue on Oct 3, 2025, 10:42 AM