context_get_project_summary
Generate a detailed project summary by analyzing the specified project directory, enabling efficient context management and AI development insights.
Instructions
Get a comprehensive project summary
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Path to project directory |
Implementation Reference
- src/context-manager.ts:16-42 (handler)The getProjectSummary method implements the core logic for the 'context_get_project_summary' tool by computing project statistics from session files, milestones, and configuration in the .context directory.async getProjectSummary(projectPath: string): Promise<ProjectSummary> { const contextDir = path.join(projectPath, '.context'); const config = await this.loadConfig(projectPath); // Get all sessions const sessionsDir = path.join(contextDir, 'sessions'); const sessions = await this.getAllSessions(sessionsDir); // Calculate stats const totalTokens = sessions.reduce((acc, s) => acc + s.tokenCount, 0); const lastActivity = sessions.length > 0 ? new Date(Math.max(...sessions.map(s => s.startTime.getTime()))) : new Date(); // Get milestones const milestones = await this.getMilestones(projectPath); return { name: config.projectName || path.basename(projectPath), path: projectPath, totalSessions: sessions.length, totalTokens, lastActivity, currentPhase: await this.getCurrentPhase(projectPath), keyMilestones: milestones.slice(0, 5), // Most recent 5 }; }
- src/types.ts:20-28 (schema)TypeScript interface defining the structure of the project summary returned by the tool.export interface ProjectSummary { name: string; path: string; totalSessions: number; totalTokens: number; lastActivity: Date; currentPhase?: string; keyMilestones: Milestone[]; }