# Tostr Project Rules

This project uses **Tostr**, a tool for semantic code search and AST-aware navigation. To ensure efficiency and accuracy, follow these rules:

## 1. Initialize Tostr
Always ensure the Tostr MCP server is initialized for the current workspace using `init`.
- **Workspace Path:** Use the absolute path of the project root (`/Users/averybrown/Projects/python/Tostr`).
- **Language:** Specify 'python' as the primary language.

## 2. Navigation & Exploration
Prefer Tostr tools over standard file-reading or grep tools:
- **Skeleton View:** Use `skeleton` instead of `list_files` or `ls` to understand the architecture, classes, and function signatures. It provides a much richer view of the project structure and includes UIDs for all code elements.
- **Semantic Search:** Use `search` instead of `grep` or `search_files` when looking for specific logic, functionality, or concepts. Tostr understands the meaning of code, not just text patterns.

## 3. Code Inspection
When you need to understand the implementation of a specific component (class, method, or file):
- Use `inspect_by_uid` or `inspect_by_id`.
- These tools provide AST-aware context, including inbound/outbound dependencies and AI-generated summaries.
- Use the `include_body: true` parameter if you need to see the full implementation code.
- Only fallback to `read_file` if you need to see the entire raw file content without AST metadata, or for non-source files.

## 4. Tostr Identifiers (UIDs)
- Tostr uses unique identifiers (UIDs) for code structs:
  - `D-...` for Directories
  - `F-...` for Files
  - `C-...` for Classes
  - `M-...` for Methods
  - `A-...` for Attributes/Fields
- These UIDs are visible in the `skeleton` and `search` outputs. Use them with `inspect_by_uid` for targeted analysis.

## 5. Summary of Tool Priority
1. `init` (Verify initialization)
2. `skeleton` (Broad exploration / architectural understanding)
3. `search` (Finding specific logic or concepts)
4. `inspect_by_uid` (Deep dive into implementation and dependencies)
