Implementation: How should getSpaceBriefForPrompt inject space context into ...

Documentation for Sessions

⚙️ Implementation: How should getSpaceBriefForPrompt inject space context into ...

Date: 2026-03-12
Time: 21:57:44 UTC
Session: gspace1-210.5
Agent: angular
Confidence: 95%
Status: ✅ Documented


📋 Decision Context

Question:

How should getSpaceBriefForPrompt inject space context into LLM prompts?

Task: Not specified


🎯 Decision Made

Chosen:

Retrieve space profile, extract brief, format with space name header for prompt injection

Options Considered:


💭 Reasoning

The method needs to provide contextual information to LLM prompts about the current space. By retrieving the cached/built profile (which includes business type, maturity, module inventory, generation history, and learned patterns), we can construct a meaningful brief. The implementation uses the business type as space name (fallback to spaceId), wraps the brief in a clear header format, and gracefully handles errors by returning empty string. This follows the existing getProfileForPrompt pattern but adds space name context.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation