Expert guide for developing on Alexandria - an AI-driven CS platform with microkernel architecture, plugin system, and advanced prompt engineering templates.
This skill provides comprehensive guidance for developing on Alexandria, an AI-driven customer care platform with a sophisticated microkernel architecture and plugin system.
This skill helps you navigate and contribute to the Alexandria repository, which serves dual purposes:
1. **Advanced Prompt Engineering Templates** - Collection of AI-assisted content generation templates for software architecture, API documentation, code explanation, and educational content
2. **Modular AI-Enhanced Customer Care Platform** - Enterprise application with microkernel architecture, event-driven communication, and plugin system
Before making any changes, internalize these critical rules:
**Rule 1: Never Replace Complex Components**
**Rule 2: Always Fix Root Causes**
**Rule 3: Ask for Clarification**
**Rule 4: Match Requirements Exactly**
**Rule 5: Handle All Errors and Edge Cases**
**Microkernel Architecture:**
**Event-Driven Communication:**
**Plugin Lifecycle Management:**
**Comprehensive Error Strategy:**
```typescript
// Always provide context-rich error information
try {
// operation
} catch (error) {
logger.error('Operation failed', {
context: 'specific-operation',
error: error instanceof Error ? error.message : String(error),
stack: error instanceof Error ? error.stack : undefined,
metadata: { /* relevant context */ }
});
throw new ApplicationError('User-friendly message', { cause: error });
}
```
**Error Handling Requirements:**
**TypeScript Best Practices:**
**Type Definition Example:**
```typescript
interface PluginMetadata {
id: string;
name: string;
version: string;
dependencies?: string[];
capabilities: PluginCapability[];
}
type PluginCapability = 'file-analysis' | 'data-visualization' | 'export';
```
**Testing Requirements:**
**Test Structure:**
```typescript
describe('PluginManager', () => {
let pluginManager: PluginManager;
let mockEventBus: jest.Mocked<EventBus>;
beforeEach(() => {
mockEventBus = createMockEventBus();
pluginManager = new PluginManager(mockEventBus);
});
it('should activate plugin successfully', async () => {
// Arrange
const plugin = createTestPlugin();
// Act
await pluginManager.activate(plugin.id);
// Assert
expect(plugin.state).toBe('active');
expect(mockEventBus.publish).toHaveBeenCalledWith('plugin:activated', {
pluginId: plugin.id
});
});
});
```
**Performance Considerations:**
**Code Documentation:**
**JSDoc Example:**
```typescript
/**
* Analyzes crash files and extracts relevant error information
* @param filePath - Path to the crash file
* @param options - Analysis options
* @returns Promise resolving to analysis results
* @throws {FileNotFoundError} If the file doesn't exist
* @throws {InvalidFormatError} If the file format is unsupported
*/
async function analyzeCrashFile(
filePath: string,
options?: AnalysisOptions
): Promise<AnalysisResult>
```
The Crash File Analyzer is a core plugin demonstrating the platform's capabilities:
**Key Features:**
**Integration Points:**
1. Create plugin directory structure
2. Implement plugin interface with lifecycle methods
3. Define plugin metadata and capabilities
4. Register event handlers
5. Create UI components (if needed)
6. Write comprehensive tests
7. Document plugin functionality
1. Assess impact on existing plugins
2. Maintain backward compatibility
3. Update plugin API documentation
4. Implement migration path if needed
5. Test with all active plugins
1. Check logs for error context
2. Verify plugin dependencies
3. Test plugin lifecycle transitions
4. Validate event bus communications
5. Use browser DevTools for frontend issues
**Completed:**
**Current Focus:**
**Ongoing Priorities:**
Request clarification when:
Remember: It's always better to ask than to assume incorrectly.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/alexandria-ai-platform-developer/raw