Tech stack evaluator

From matteocervelli/llms · View interactive version

Tech stack evaluator is an AI agent skill from the GitHub repository matteocervelli/llms. Auto-activates during requirements analysis to evaluate technical stack compatibility, recommend appropriate technologies, and assess performance implications.

How to use this skill

Skill file

Purpose

The tech-stack-evaluator skill provides systematic evaluation of technical stack requirements and compatibility for feature implementations. It analyzes existing project technology, recommends appropriate libraries/frameworks, assesses compatibility, and identifies performance implications.

When to Use

This skill auto-activates when you:

Provided Capabilities

1. Technology Stack Analysis

2. Library/Framework Recommendation

3. Compatibility Assessment

4. Performance Analysis

5. Technology Constraints

Usage Guide

Step 1: Identify Current Project Stack

Check project configuration files:

Python Projects:

# Check Python version and dependencies
python --version
cat requirements.txt
cat pyproject.toml
cat setup.py
cat Pipfile

# Check installed packages
pip list

TypeScript/JavaScript Projects:

# Check Node version and dependencies
node --version
cat package.json
cat package-lock.json
cat yarn.lock

Rust Projects:

# Check Rust version and dependencies
rustc --version
cat Cargo.toml
cat Cargo.lock

Document Current Stack:

## Current Project Stack

### Language & Runtime
- **Language**: Python 3.11
- **Package Manager**: uv
- **Virtual Environment**: venv

### Framework
- **Web Framework**: FastAPI 0.104.0
- **ORM**: SQLAlchemy 2.0.23
- **Validation**: Pydantic 2.5.0

### Key Dependencies
- `httpx`: 0.25.2 (HTTP client)
- `redis`: 5.0.1 (Caching)
- `pytest`: 7.4.3 (Testing)

### Infrastructure
- **Database**: PostgreSQL 15
- **Cache**: Redis 7
- **Server**: Uvicorn

Step 2: Analyze Feature Requirements

Based on extracted requirements, identify technology needs:

Example Requirements:

Technology Mapping:

## Technology Requirements

| Requirement | Technology Need | Current Support | Gap |
|-------------|----------------|-----------------|-----|
| Real-time updates | WebSockets | ✅ FastAPI supports | None |
| Data validation | Schema validation | ✅ Pydantic | None |
| Background tasks | Task queue | ❌ No task queue | Need Celery/RQ |
| File uploads | File handling | ✅ Built-in | None |
| PDF generation | PDF library | ❌ No PDF lib | Need reportlab |

Step 3: Recommend Technologies

Use tech-stack-matrix.md to match requirements with technologies:

Python Recommendations:

Web Frameworks:

Database Libraries:

Validation:

HTTP Clients:

Task Queues:

Testing:

Step 4: Evaluate Compatibility

Check for compatibility issues:

Version Compatibility:

# Example: Check Python version requirements
import sys
if sys.version_info < (3, 10):
    raise RuntimeError("Requires Python 3.10+")

Dependency Conflicts:

# Check for dependency conflicts
pip check

# Analyze dependency tree
pip-tree
pipdeptree

Compatibility Matrix:

## Compatibility Assessment

### Python Version Compatibility
- **Current**: Python 3.11
- **Required**: Python 3.10+ (for new libraries)
- **Status**: ✅ Compatible

### Framework Compatibility
| Library | Required Version | Current Version | Compatible | Notes |
|---------|-----------------|-----------------|------------|-------|
| FastAPI | ≥0.100.0 | 0.104.0 | ✅ | Compatible |
| Pydantic | ≥2.0.0 | 2.5.0 | ✅ | Compatible |
| SQLAlchemy | ≥2.0.0 | 2.0.23 | ✅ | Compatible |
| New: Celery | ≥5.3.0 | - | ✅ | No conflicts |
| New: reportlab | ≥4.0.0 | - | ✅ | No conflicts |

### Breaking Changes
- None identified for proposed libraries

Step 5: Assess Performance Implications

Evaluate performance characteristics using language-feature-map.md:

Performance Considerations:

Async I/O (Python asyncio, FastAPI):

Database Performance:

Caching Strategy:

Serialization:

## Performance Assessment

### Expected Performance Characteristics
- **API Response Time**: <200ms (target), FastAPI typically achieves 50-100ms
- **Database Query Time**: <50ms (with proper indexing)
- **Caching Hit Rate**: >80% (target)
- **Concurrent Users**: 1000+ (FastAPI handles well with async)

### Performance Optimizations
1. **Use Connection Pooling**: SQLAlchemy connection pool (size=20)
2. **Implement Caching**: Redis for frequently accessed data
3. **Async I/O**: Use httpx async client for external APIs
4. **Database Indexing**: Add indexes on frequently queried columns
5. **Background Processing**: Use Celery for heavy computations

### Performance Risks
- **Risk**: Large file uploads could block event loop
  - **Mitigation**: Use streaming uploads, background processing
- **Risk**: N+1 query problem with ORM
  - **Mitigation**: Use eager loading (joinedload, selectinload)

Step 6: Identify Constraints

Document technical constraints:

Platform Constraints:

## Technical Constraints

### Platform Requirements
- **OS**: Linux (Ubuntu 22.04+) or macOS
- **Python**: 3.10+ (for match statements, improved typing)
- **Database**: PostgreSQL 14+ (for JSON improvements)
- **Memory**: 2GB minimum, 4GB recommended
- **Storage**: 10GB for application + dependencies

### Deployment Constraints
- **Container**: Docker-compatible
- **Environment**: Supports environment variables
- **Network**: Outbound HTTPS required for external APIs
- **Ports**: 8000 (application), 5432 (database), 6379 (Redis)

### Licensing Constraints
- All proposed libraries use permissive licenses (MIT, Apache 2.0, BSD)
- No GPL dependencies (avoid copyleft)
- Commercial use permitted

### Development Constraints
- **IDE**: VS Code, PyCharm (type checking support)
- **Type Checking**: mypy required in CI/CD
- **Code Formatting**: Black, isort
- **Testing**: pytest with 80%+ coverage

Step 7: Compare Alternatives

When multiple options exist, create comparison:

## Technology Alternatives

### Task Queue Comparison

| Feature | Celery | RQ | Dramatiq |
|---------|--------|----|---------|
| **Maturity** | High (2009) | Medium (2011) | Medium (2016) |
| **Complexity** | High | Low | Low |
| **Broker** | RabbitMQ/Redis | Redis only | RabbitMQ/Redis |
| **Performance** | High | Medium | High |
| **Monitoring** | Flower | RQ Dashboard | Basic |
| **Learning Curve** | Steep | Gentle | Gentle |
| **Recommendation** | ⭐ Enterprise | ⭐ Simple | ⭐ Middle ground |

**Recommendation**: Use RQ for this project
- **Reasoning**: Already using Redis, simple requirements, faster learning curve
- **Trade-off**: Less features than Celery, but sufficient for current needs

Step 8: Create Technology Recommendation

Synthesize findings into recommendation:

## Technology Stack Recommendation

### New Libraries to Add

1. **RQ (Redis Queue)** - Background Task Processing
   - **Version**: 1.15.1+
   - **Purpose**: Process file uploads, send emails asynchronously
   - **Justification**: Simple, integrates with existing Redis, sufficient for needs
   - **Alternative Considered**: Celery (too complex for current requirements)

2. **reportlab** - PDF Generation
   - **Version**: 4.0.7+
   - **Purpose**: Generate PDF reports
   - **Justification**: Mature, feature-rich, good documentation
   - **Alternative Considered**: WeasyPrint (CSS-based, but slower)

3. **httpx** - Async HTTP Client
   - **Version**: 0.25.2+ (already using, version OK)
   - **Purpose**: Make async external API calls
   - **Justification**: Modern, async support, timeout handling
   - **Alternative Considered**: aiohttp (more complex API)

### No Changes Required

- **FastAPI**: Current framework suitable for requirements
- **Pydantic**: Current validation library sufficient
- **SQLAlchemy**: Current ORM handles database needs
- **pytest**: Current testing framework adequate

### Version Updates

None required - all current versions compatible with new libraries

### Compatibility Verification

✅ All proposed libraries compatible with:
- Python 3.11
- FastAPI 0.104.0
- Existing dependency versions

### Performance Impact

**Expected Improvements**:
- Background tasks don't block API responses (+50% perceived responsiveness)
- Async external API calls improve throughput (+30% under load)

**Minimal Overhead**:
- RQ: <5% overhead for task queuing
- reportlab: Only used on-demand for PDF generation

Best Practices

1. Prefer Existing Stack

2. Evaluate Maturity

3. Consider Ecosystem

4. Performance Testing

5. Future-Proofing

6. Security Considerations

Resources

tech-stack-matrix.md

Comprehensive matrix of:

language-feature-map.md

Language-specific features:

Example Usage

Input (Feature Requirements)

Feature: User notification system
- Send email notifications
- In-app real-time notifications
- Background processing for bulk sends
- Track delivery status

Output (Tech Stack Evaluation)

## Technical Stack Evaluation

### Current Stack Analysis
- **Language**: Python 3.11 ✅
- **Framework**: FastAPI 0.104.0 ✅ (WebSocket support for real-time)
- **Database**: PostgreSQL 15 ✅
- **Cache**: Redis 7 ✅

### Required Technologies

1. **Task Queue**: RQ 1.15.1
   - **Purpose**: Background email sending
   - **Justification**: Integrates with existing Redis, simple API
   - **Performance**: Handles 1000+ tasks/minute

2. **Email Library**: python-email-validator + SMTP
   - **Purpose**: Email validation and sending
   - **Justification**: Standard library sufficient, no extra dependencies
   - **Alternative**: SendGrid (if high volume needed)

3. **WebSocket**: FastAPI built-in
   - **Purpose**: Real-time in-app notifications
   - **Justification**: Already supported by FastAPI
   - **Performance**: Handles 10,000+ concurrent connections

4. **Notification Storage**: PostgreSQL (existing)
   - **Purpose**: Store notification history
   - **Justification**: Existing database, JSON column support
   - **Performance**: Adequate with proper indexing

### Compatibility Assessment
✅ All technologies compatible with existing stack
✅ No version conflicts
✅ No breaking changes required

### Performance Expectations
- **Email Send**: 100-200ms (backgrounded via RQ)
- **Real-time Push**: <50ms via WebSocket
- **Database Write**: <10ms
- **Overall**: <200ms API response (tasks queued)

### Recommendation
**Proceed with proposed stack** - all requirements met with minimal additions

Integration

This skill is used by:


Version: 2.0.0

Auto-Activation: Yes (when evaluating tech stack)

Phase: 1 (Requirements Analysis)

Created: 2025-10-29

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.