2026 03 09 Vitto Memory Job Mastery Design
Documentation for Plans
Vitto Memory Enhancements + Job Mastery Framework — Design Document
Session: 196 Date: 2026-03-09 Status: Approved
Overview
Two major systems built together:
- User Dossier System — Per-user structured knowledge in
vitto-usersdatabase, replacing 60-read brute-force with single-doc pre-compiled briefs - Job Mastery Framework — Two-layer (global + per-user) composable skill system where Vitto tracks, learns, and self-optimizes at specific job types
Architecture
Database: vitto-users (new, same cluster as vitto-mind)
Collections:
dossiers— One doc per user (identity, personality, expertise, workPatterns, spaces, relationships, timeline, jobMastery, brief)job-playbooks— Global playbook definitions (composable skill trees, strategies, graduation criteria)memories— Migrated from vitto-mind.vitto-memories (future phase)knowledge-graphs— Migrated from vitto-mind.knowledge-edges/entities (future phase)
Job Mastery: Two-Layer Design
Layer 1 — Global Playbooks (job-playbooks collection):
- Composable sub-skills (each with embedding for semantic retrieval)
- Self-optimizing strategies with version history
- 5-tier graduation criteria (intern → junior → mid → senior → principal)
- Origin tracking:
seededvsemergent - Progressive disclosure: brief (~50 tokens) → strategy (~500 tokens) → deep context (~2K tokens)
Layer 2 — Per-User Overlay (embedded in dossier.jobMastery):
- Per sub-skill mastery scores
- Personal strategy refinements
- Autonomy level (derived from tier)
- Optimization log (audit trail of self-improvements)
- Level history with graduation timestamps
Self-Optimization Loop
After 3+ failures at same sub-skill:
- Cheap LLM analyzes failure patterns against current strategy
- Proposes revised strategy → stored as new version
- A/B tested on next executions
- Better? Promote. Worse? Rollback + flag for human review.
Progressive Disclosure (context injection)
- Always:
playbook.brief(~50 tokens per active job) - On task start:
playbook.activeStrategy(~500 tokens) - Per phase:
skill.detailedInstructions(~200 tokens, loaded per-phase) - On failure:
skill.pitfalls + optimizationLog(~500 tokens)
Backend Implementation (backend-vitto-api)
New Files
| File | Purpose |
|---|---|
app/users/schemas/user-dossier.schema.ts |
Dossier schema (identity, personality, expertise, workPatterns, spaces, relationships, timeline, jobMastery, brief) |
app/users/schemas/job-playbook.schema.ts |
Global playbook schema (skills, strategies, graduation criteria) |
app/users/user-dossier.service.ts |
Dossier CRUD + brief compilation + hydration from gograb-api |
app/users/job-mastery.service.ts |
Mastery tracking, tier promotion, self-optimization loop |
app/users/users.module.ts |
NestJS module for vitto-users DB |
app/users/users.controller.ts |
REST endpoints for dossier + mastery |
Modified Files
| File | Change |
|---|---|
app/app.module.ts |
Add vitto-users DB connection |
app/engine/context-assembly.service.ts |
Wire dossier + mastery into prompt assembly |
app/mind/mind.service.ts |
Auto-populate dossier after executions |
libs/libs-api/backend-core/.../database-names.config.ts |
Add VITTO_USERS constant |
Frontend Implementation
New Library: @libs-ai/vitto-intelligence
Location: libs/libs-ai/vitto-intelligence/
Components:
JobMasteryDashboardComponent— Overview of all job types + user mastery levelsJobMasteryDetailComponent— Deep dive: skills, scores, history, optimization logPlaybookEditorComponent— Edit playbook (strategies, skills, criteria). Role-gated: roleLevel >= 90PlaybookCreatorComponent— Create new job type with Vitto-assisted pre-fillUserDossierViewComponent— User's dossier (identity, expertise, timeline, mastery)ExecutiveInstructionsComponent— Manage executive directives. Role-gated: roleLevel >= 90
Services:
VittoIntelligenceApiService— HTTP client to backend-vitto-api /users/* endpointsMasteryProgressionService— Client-side mastery state + progression tracking
New Routes (under /vitto/)
| Route | Component | Access |
|---|---|---|
/vitto/mastery |
JobMasteryDashboardComponent | All authenticated |
/vitto/mastery/:jobType |
JobMasteryDetailComponent | All authenticated |
/vitto/mastery/:jobType/edit |
PlaybookEditorComponent | roleLevel >= 90 |
/vitto/mastery/new |
PlaybookCreatorComponent | roleLevel >= 90 |
/vitto/dossier |
UserDossierViewComponent | All authenticated (own) |
/vitto/dossier/:userId |
UserDossierViewComponent | roleLevel >= 90 |
/vitto/instructions |
ExecutiveInstructionsComponent | roleLevel >= 90 |
New Chat Plugin: mastery.plugin.ts
- Injects mastery context into chat based on current task type
- Shows skill progression badges in chat
- Enables "teach Vitto" flow — user can refine strategies via chat
- Pre-fills PlaybookCreator form when user describes a new job type in chat
Modified: VittoUnifiedChildRoutes
Add new routes to existing unified shell navigation.
Seeded Job Type: code-platform-generation
First playbook, seeded with sub-skills:
analyze-space-profile— Understand space context, modules, tech stackselect-template— Choose appropriate generation templateplan-architecture— Design module structure before generationgenerate-backend— Backend code generation (NestJS, MongoDB)generate-frontend— Frontend code generation (Angular, standalone)verify-build— Build verification, lint, type checkvalidate-output— Quality validation against success criteria
Key Constraints
- gograb-api remains source of truth for platform data
- All reads from gograb-api via HTTP (BackendApiClientService)
- @Optional() on all new service injections for backward compatibility
- Build must pass:
npx nx build backend-vitto-api - Follow existing NestJS patterns (mind/ directory as reference)
- Angular: standalone, OnPush, signals, inject(), separate files
- RxJS only — no Promises, no setTimeout