UNPKG

arela

Version:

AI-powered CTO with multi-agent orchestration, code summarization, visual testing (web + mobile) for blazing fast development.

137 lines 3.51 kB
import type { Decision, Pattern, Todo, ProjectStats } from "./types.js"; /** * Project Memory Layer (Layer 5 - Hexi-Memory) * * Stores medium-term context specific to the current project/repository: * - Project architecture and tech stack * - Architecture decisions (ADR-like) * - Code patterns and their usage frequency * - Project todos and milestones * - Conventions and standards * - Arbitrary metadata key-value pairs * * Features: * - SQLite persistence per project * - Architecture decision recording * - Pattern tracking with frequency * - Todo management with priorities * - Convention storage * - Searchable decisions * - Fast queries (<100ms) * * Lifespan: Project lifetime (persists across sessions) */ export declare class ProjectMemory { private db?; private dbPath; private projectId?; private initialized; private projectPath; constructor(projectPath?: string); /** * Initialize project memory * - Sets up SQLite database * - Creates tables if needed * - Loads or creates project record */ init(projectPath?: string): Promise<void>; /** * Create database tables */ private createTables; /** * Initialize or load project record */ private initProject; /** * Get current project ID */ getProjectId(): string; /** * Set project architecture */ setArchitecture(architecture: string): Promise<void>; /** * Get project architecture */ getArchitecture(): Promise<string | undefined>; /** * Add technology to tech stack */ addTechStack(technology: string): Promise<void>; /** * Get tech stack */ getTechStack(): Promise<string[]>; /** * Add architecture decision */ addDecision(decision: Omit<Decision, "id"> & { id?: string; }): Promise<void>; /** * Get decisions, optionally filtered by tags */ getDecisions(tags?: string[]): Promise<Decision[]>; /** * Search decisions by query (searches title, description, and rationale) */ searchDecisions(query: string): Promise<Decision[]>; /** * Add code pattern */ addPattern(pattern: Omit<Pattern, "id"> & { id?: string; }): Promise<void>; /** * Get all patterns */ getPatterns(): Promise<Pattern[]>; /** * Increment pattern usage frequency */ incrementPatternUsage(patternId: string): Promise<void>; /** * Add todo */ addTodo(todo: Omit<Todo, "id" | "createdAt"> & { id?: string; }): Promise<void>; /** * Get todos, optionally filtered by priority */ getTodos(priority?: string): Promise<Todo[]>; /** * Complete a todo */ completeTodo(todoId: string): Promise<void>; /** * Set a convention */ setConvention(key: string, value: string): Promise<void>; /** * Get a convention value */ getConvention(key: string): Promise<string | undefined>; /** * Get all conventions */ getAllConventions(): Promise<Record<string, string>>; /** * Set metadata value */ setMetadata(key: string, value: any): Promise<void>; /** * Get metadata value */ getMetadata(key: string): Promise<any>; /** * Get project statistics */ getStats(): Promise<ProjectStats>; /** * Close database connection */ close(): void; } //# sourceMappingURL=project.d.ts.map