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:
- No alternatives documented
💭 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
APIs/backend-vitto-api/src/app/mind/space-intelligence.service.ts
🔗 Related
- Decision ID:
dev_1773352664861_k1m3b40 - Session: 210
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation