UNPKG

agentsqripts

Version:

Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems

55 lines (48 loc) 2 kB
/** * @file UI project recommendation generator * @description Generates UI/UX improvement recommendations for project-wide analysis */ /** * Generates project-wide UI recommendations * @param {Object} severityBreakdown - Breakdown by severity * @param {Object} categoryBreakdown - Breakdown by category * @param {number} totalEffort - Total effort required * @returns {Array<string>} Array of project recommendations */ function generateProjectUIRecommendations(severityBreakdown, categoryBreakdown, totalEffort) { const recommendations = []; if (severityBreakdown.HIGH > 0) { recommendations.push(`CRITICAL: ${severityBreakdown.HIGH} high-impact UI/UX issues need immediate attention`); } // Category-specific project recommendations Object.entries(categoryBreakdown).forEach(([category, count]) => { switch (category) { case 'Content': recommendations.push(`Content optimization: ${count} text clarity and labeling improvements needed`); break; case 'Visual Design': recommendations.push(`Design consistency: ${count} visual harmony and branding issues`); break; case 'Feedback': recommendations.push(`User feedback: ${count} missing interaction states and loading indicators`); break; case 'Layout': recommendations.push(`Layout optimization: ${count} structural and responsive design issues`); break; case 'Forms': recommendations.push(`Form UX: ${count} usability and accessibility improvements needed`); break; } }); if (totalEffort > 0) { const priority = totalEffort > 50 ? 'high' : totalEffort > 20 ? 'medium' : 'low'; recommendations.push(`Total UI improvement effort: ${totalEffort} points (${priority} priority)`); } if (recommendations.length === 0) { recommendations.push('Project demonstrates excellent UI/UX practices'); } return recommendations; } module.exports = { generateProjectUIRecommendations };