---
globs: <root>/**/*
alwaysApply: false
---

# Pampa - Semantic Code Search Tool

## Overview

Pampa is a powerful semantic search tool designed specifically for AI agents to efficiently navigate and understand codebases. It provides intelligent code indexing and search capabilities that go beyond simple text matching.

## Core Concepts

### What is Pampa?

Pampa is an AI-powered code search engine that:

-   **Indexes code semantically**: Understands code meaning, not just syntax
-   **Provides contextual search**: Finds relevant code based on intent
-   **Supports multiple languages**: Works with Python, TypeScript, Java, Go, and more
-   **Integrates with AI agents**: Designed specifically for AI-assisted development

### Key Features

#### Semantic Understanding

-   Analyzes code structure, relationships, and patterns
-   Understands function purposes, class relationships, and design patterns
-   Provides context-aware search results

#### Multi-Language Support

-   Python, TypeScript, JavaScript, Java, Kotlin, C#, Swift, Go, PHP, Ruby, C/C++
-   Language-specific parsing and understanding
-   Cross-language reference tracking

#### AI Agent Integration

-   Optimized for AI agent workflows
-   Provides structured responses for automated processing
-   Supports batch operations and complex queries

## How Pampa Works

### 1. Code Indexing

Pampa scans your codebase and creates a semantic index:

-   Parses source files for structure and meaning
-   Extracts functions, classes, imports, and dependencies
-   Builds relationships between code components
-   Creates embeddings for semantic similarity

### 2. Intelligent Search

When you search for code:

-   Understands natural language queries
-   Finds functionally similar code even with different naming
-   Returns relevant context and usage examples
-   Provides explanations of how code works

### 3. Context Provision

Pampa helps AI agents by:

-   Providing relevant code context for tasks
-   Finding examples of patterns and implementations
-   Identifying dependencies and relationships
-   Suggesting related code sections

## Benefits for Development

### For AI Agents

-   **Faster code understanding**: Quickly grasp large codebases
-   **Better context awareness**: Find relevant code for any task
-   **Improved suggestions**: Make informed recommendations based on existing patterns
-   **Efficient navigation**: Jump to relevant code sections instantly

### For Developers

-   **Code discovery**: Find existing implementations before writing new code
-   **Pattern learning**: Understand how patterns are implemented in your codebase
-   **Documentation**: Get instant explanations of code functionality
-   **Refactoring assistance**: Identify related code that might need updates

## Integration with Development Workflow

Pampa integrates seamlessly into your development process:

1. **Installation**: Simple setup with minimal configuration
2. **Indexing**: Automatic scanning and indexing of your codebase
3. **Search**: Natural language queries to find relevant code
4. **Results**: Structured responses with code snippets and explanations

## Best Practices

### Query Formulation

-   Use descriptive, intent-based queries
-   Include context about what you're trying to accomplish
-   Ask about patterns, implementations, or specific functionality

### Code Organization

-   Keep consistent coding styles for better analysis
-   Use meaningful names for functions and variables
-   Include docstrings and comments for better semantic understanding

### Maintenance

-   Regular re-indexing for updated codebases
-   Keep dependencies up to date
-   Monitor search performance and optimize queries

This foundation enables efficient, intelligent code search that enhances both AI agent capabilities and developer productivity.
