QUICK START
Comprehensive guidelines for AI-assisted development within the Editor platform
🚀 AI Intelligence System - Quick Start
Get started with the complete closed-loop learning system in 5 minutes
Step 1: Enable Module Intelligence (1 min)
Add to apps/gograb-space/src/app/app.config.ts:
import { provideModuleIntelligence } from '@libs-ai/module-intelligence';
export const appConfig: ApplicationConfig = {
providers: [
provideModuleIntelligence(), // ← Add this
// ... existing providers
],
};
What this does:
- Auto-harvests module intelligence on app startup
- Creates flash-persisted intelligence store
- Makes all 40+ modules searchable by AI
Step 2: Test Module Generation (2 min)
- Start the app:
yarn dev:gograb - Open AI Panel (bottom-left button)
- Type: "Create an ecommerce module"
- Click Generate
Expected console output:
[AI Panel] 🎯 Outcome tracking started
outcomeId: outcome-1734287654321-abc123
moduleId: ecommerce
Step 3: Test Drop Tracking (1 min)
- Drag the generated module from AI Panel
- Drop it on the canvas
Expected console output:
[CanvasRoot] 🎯 Outcome tracking: Module dropped
outcomeId: outcome-1734287654321-abc123
droppedRegion: section-xyz
Step 4: View Intelligence (1 min)
Open browser dev console and run:
// Get intelligence service
const intel = ng.probe(document.querySelector('lib-canvas-root')).injector.get(ng.coreTokens.ɵModuleIntelligenceHarvesterService);
// View harvested modules
console.log('Modules:', intel.intelligence());
// View stats by category
console.log('Stats:', intel.getCategoryStats());
// Get tracker
const tracker = ng.probe(document.querySelector('lib-canvas-root')).injector.get(ng.coreTokens.ɵModuleOutcomeTrackerService);
// View outcomes
console.log('Outcomes:', tracker.allOutcomes());
console.log('Stats:', tracker.getStats());
Step 5: Verify Backend (Optional)
If backend is running on port 3001:
# Check module intelligence endpoint
curl http://localhost:3001/ai-agents/module-intelligence/modules
# Check outcome stats
curl http://localhost:3001/ai-agents/module-intelligence/outcomes/stats
# Check pattern stats
curl http://localhost:3001/ai-agents/module-intelligence/patterns/stats
✅ Verification Checklist
- App starts without errors
- Module intelligence harvested on startup
- AI Panel generates modules
- Outcome tracking starts (console message)
- Module appears in palette with
_outcomeId - Drop tracking works (console message)
- Edit tracking works (console message)
- Delete tracking works (console message)
- Backend endpoints respond (if running)
🎯 What to Look For
Successful Harvesting
🌾 Starting module intelligence harvest
📦 Found 45 registered modules
✅ Harvested: Ecommerce (ecommerce)
✅ Harvested: Blog (blog)
✅ Harvested: Sidebar Nav (structural)
🎉 Module intelligence harvest complete
Successful Outcome Tracking
🎯 Started outcome tracking
outcomeId: outcome-xyz
moduleId: ecommerce
category: ecommerce
📍 Recorded drop event
outcomeId: outcome-xyz
region: main-content
✏️ Recorded edit event
outcomeId: outcome-xyz
editType: config
🐛 Troubleshooting
"Module intelligence not harvested"
Solution: Check that provideModuleIntelligence() is in app.config.ts
"Outcome tracker not available"
Solution: Service is optional - it's OK if not available. System degrades gracefully.
"No console messages"
Solution: Open browser dev console (F12) - messages appear there
"Backend not responding"
Solution: Start backend-ai-api: yarn serve:backend-ai
📚 Next Steps
Once basic tracking works:
- Generate 5-10 modules of different categories
- Interact with them (drop, edit, deploy)
- Check outcome stats (
tracker.getStats()) - Extract patterns (
patterns.extractAllPatterns()) - View agent routing (
router.routeModuleGeneration('...'))
🌟 Expected Results
After 10 module generations:
- Intelligence: 40+ modules catalogued
- Outcomes: 10 tracked lifecycles
- Patterns: 5-7 extracted (from successful ones)
- Quality Scores: 50-90 range
- Success Rate: 70-85%
- Agent Learning: Active and improving
The system is ready to learn and improve with every interaction! 🎊
For full documentation: COMPLETE-AI-INTELLIGENCE-SYSTEM.md