Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
cc38a99
Bump pylint from 2.16.1 to 3.3.1
dependabot[bot] Sep 25, 2024
bb222ab
optional support of uvloop
phenobarbital Nov 2, 2024
b070e3c
Merge pull request #533 from phenobarbital/test-version
phenobarbital Nov 2, 2024
ccd21b9
bump version
phenobarbital Nov 2, 2024
7d53357
Merge pull request #534 from phenobarbital/test-version
phenobarbital Nov 2, 2024
a8dc2cc
fix error over optional uvloop requirement
phenobarbital Nov 3, 2024
9a0942c
Merge pull request #535 from phenobarbital/test-version
phenobarbital Nov 3, 2024
b29787a
test version of navconfig
phenobarbital Nov 3, 2024
4ffe419
Merge pull request #536 from phenobarbital/test-version
phenobarbital Nov 3, 2024
7bebdf9
Merge pull request #511 from phenobarbital/dependabot/pip/pylint-3.3.1
phenobarbital Nov 3, 2024
232878d
contrib for adding navconfig into an aiohttp application
phenobarbital Nov 10, 2024
cfc6db9
Merge pull request #540 from phenobarbital/test-version
phenobarbital Nov 11, 2024
1e0aaf9
Bump ipython from 8.19.0 to 8.31.0
dependabot[bot] Dec 23, 2024
e42bc8a
loose dependency on jsonpickle
phenobarbital Apr 4, 2025
fd159e7
Merge pull request #575 from phenobarbital/test-version
phenobarbital Apr 4, 2025
6f3677a
deprecating +3.9 because github action failure
phenobarbital Apr 4, 2025
90dcdd6
Merge pull request #576 from phenobarbital/test-version
phenobarbital Apr 4, 2025
da3cf2f
fix
phenobarbital Apr 4, 2025
fd02361
Merge pull request #577 from phenobarbital/test-version
phenobarbital Apr 4, 2025
75eafab
more compatibility fixes for build
phenobarbital Apr 5, 2025
f253021
Merge pull request #578 from phenobarbital/test-version
phenobarbital Apr 5, 2025
ea930ba
fix version of redis and jsonpickle
phenobarbital Apr 6, 2025
3dc692a
Merge pull request #579 from phenobarbital/test-version
phenobarbital Apr 6, 2025
0e3ff38
new version of navconfig
phenobarbital May 22, 2025
36160a2
new version of navconfig migrated to uv
phenobarbital Aug 15, 2025
4bc5752
new release for uv
phenobarbital Aug 15, 2025
d13b345
Merge pull request #580 from phenobarbital/test-version
phenobarbital Aug 15, 2025
c4ffa88
Update release.yml
phenobarbital Aug 15, 2025
48a0a4b
Merge pull request #581 from phenobarbital/phenobarbital-patch-5
phenobarbital Aug 15, 2025
814e88d
fix over
phenobarbital Aug 15, 2025
a7541d0
Merge pull request #582 from phenobarbital/test-version
phenobarbital Aug 15, 2025
a069f51
Update version.py
phenobarbital Aug 15, 2025
ba352b9
Merge pull request #583 from phenobarbital/phenobarbital-patch-5
phenobarbital Aug 15, 2025
37862d5
fix adding manifest.in
phenobarbital Aug 15, 2025
9588ac9
Merge branch 'main' into test-version
phenobarbital Aug 15, 2025
4d90d26
Merge pull request #584 from phenobarbital/test-version
phenobarbital Aug 15, 2025
dfb6c4a
Update pyproject.toml
phenobarbital Aug 15, 2025
357ac1a
Merge pull request #585 from phenobarbital/phenobarbital-patch-5
phenobarbital Aug 15, 2025
3c4e1fe
Vault Loader with Fallback to file as default
phenobarbital Aug 28, 2025
6d6ba13
Merge branch 'test-version' of github.com:phenobarbital/NavConfig int…
phenobarbital Aug 28, 2025
ce82b1e
Merge pull request #586 from phenobarbital/test-version
phenobarbital Aug 28, 2025
98c24b4
Add kardex CLI scaffold and clarify missing env errors
phenobarbital Oct 13, 2025
dc7aad3
Merge pull request #587 from phenobarbital/codex/improve-error-messag…
phenobarbital Oct 13, 2025
9cc5070
cli command to create env folder and file
phenobarbital Oct 13, 2025
b8b65f3
Merge pull request #588 from phenobarbital/new-release
phenobarbital Oct 13, 2025
c5bebff
flag for override vault or .env
Juan2coder Jan 26, 2026
e7b9464
Merge pull request #589 from Juan2coder/vault_flag
phenobarbital Jan 26, 2026
1f5c909
Bump version to 2.0.2
phenobarbital Jan 26, 2026
74208c3
Merge pull request #590 from phenobarbital/phenobarbital-patch-5
phenobarbital Jan 26, 2026
c3ee1fc
logger fixes for getLogger
phenobarbital Jan 27, 2026
943fa10
Merge branch 'main' into new-release
phenobarbital Jan 27, 2026
3861148
Merge pull request #591 from phenobarbital/new-release
phenobarbital Jan 27, 2026
c43c594
minimize warnings
phenobarbital Feb 4, 2026
17290fb
Merge pull request #592 from phenobarbital/new-release
phenobarbital Feb 4, 2026
4cabf27
new version, reduced verbosity
phenobarbital Feb 22, 2026
a2cdf98
Merge pull request #593 from phenobarbital/new-release
phenobarbital Feb 22, 2026
8801517
Merge pull request #557 from phenobarbital/dependabot/pip/ipython-8.31.0
phenobarbital Feb 22, 2026
2418773
fix: kardex create path issues
phenobarbital Mar 7, 2026
a865924
fix issues with kardex command
phenobarbital Mar 7, 2026
accd045
Merge pull request #603 from phenobarbital/new-release
phenobarbital Mar 7, 2026
0955d5b
fix build failure
phenobarbital Mar 7, 2026
8bc6dbf
Merge pull request #604 from phenobarbital/new-release
phenobarbital Mar 7, 2026
93925f7
upgraded version of redis
phenobarbital Apr 20, 2026
38d69ff
Merge pull request #605 from phenobarbital/new-release
phenobarbital Apr 20, 2026
1f2c811
Remove memcache support to drop libmemcached system dependency
phenobarbital Jun 20, 2026
97cc913
Remove Google Drive (PyDrive) loader support
phenobarbital Jun 20, 2026
fa5b2fc
Merge pull request #606 from phenobarbital/new-release
phenobarbital Jun 20, 2026
001ab4d
Bump dependencies to resolve Dependabot security alerts
phenobarbital Jun 20, 2026
b60af04
Merge pull request #607 from phenobarbital/new-release
phenobarbital Jun 20, 2026
36be23c
added claude infra SDD
phenobarbital Jun 30, 2026
26375c3
Merge pull request #608 from phenobarbital/new-release
phenobarbital Jun 30, 2026
710ff7c
Add VAULT_ENV to override the vault path segment independently of ENV
phenobarbital Jul 8, 2026
ed1ab3f
new vault env
phenobarbital Jul 8, 2026
914d0b9
Merge pull request #609 from phenobarbital/new-release
phenobarbital Jul 8, 2026
2ea4682
Add Python 3.13/3.14 support, relax hvac pin, release 2.3.0
phenobarbital Aug 7, 2026
db751aa
Publish wheels and sdist in a single twine upload
phenobarbital Aug 7, 2026
9a79611
Merge pull request #610 from phenobarbital/new-release
phenobarbital Aug 7, 2026
c69acfa
Reorganize kardex into sub-commands and fix the initialization order
phenobarbital Aug 21, 2026
08a13ca
Merge pull request #611 from phenobarbital/claude/kardex-cli-subcomma…
phenobarbital Aug 21, 2026
b1d10ae
new release of navconfig/kardex
phenobarbital Aug 21, 2026
9e5c47e
Merge branch 'main' into new-release
phenobarbital Aug 21, 2026
6cb26e6
Merge pull request #612 from phenobarbital/new-release
phenobarbital Aug 21, 2026
7a9927f
tests for cli command
phenobarbital Aug 21, 2026
3059d65
Merge pull request #613 from phenobarbital/new-release
phenobarbital Aug 21, 2026
b101fad
Fix release build broken by free-threaded CPython in the manylinux image
phenobarbital Aug 21, 2026
df6dcb2
Merge pull request #614 from phenobarbital/new-release
phenobarbital Aug 21, 2026
5dfb34c
Make uvloop optional and lazy for Windows and support Python 3.14
phenobarbital Sep 7, 2026
0caaf2e
Merge pull request #615 from phenobarbital/new-release
phenobarbital Sep 7, 2026
4d88162
Bump cryptography from 49.0.0 to 50.0.0
dependabot[bot] Sep 7, 2026
f7a31ac
Merge pull request #616 from phenobarbital/dependabot/uv/cryptography…
phenobarbital Sep 7, 2026
0c46c50
github pages
phenobarbital Sep 7, 2026
cb0ab8e
Merge pull request #617 from phenobarbital/new-release
phenobarbital Sep 7, 2026
6a5a5b2
Bump version to 2.5.0
phenobarbital Sep 7, 2026
01e73bd
Merge pull request #618 from phenobarbital/phenobarbital-patch-6
phenobarbital Sep 7, 2026
0e4e704
Add Windows release wheels and bump version to 2.5.1
phenobarbital Sep 7, 2026
cfe09ce
Merge branch 'main' into new-release
phenobarbital Sep 7, 2026
c24ded8
Drop the obsolete asyncio PyPI backport dependency
phenobarbital Sep 16, 2026
9b3aef3
Merge pytest.ini into pyproject and collect only tests/
phenobarbital Sep 16, 2026
d49a2e9
bump version
phenobarbital Sep 16, 2026
1e6516d
sdd: add proposal for async-vault-read
phenobarbital Sep 29, 2026
7c51206
sdd: add spec for FEAT-001 — async-vault-read
phenobarbital Sep 29, 2026
d71a720
sdd: add 4 tasks for FEAT-001 — async-vault-read
phenobarbital Sep 29, 2026
cc32c0d
new infra
phenobarbital Sep 29, 2026
61be844
sdd: add SDD workflow, .claude config and update .gitignore
phenobarbital Sep 29, 2026
7a04617
sdd infra
phenobarbital Sep 29, 2026
652ef7e
Merge branch 'dev' into new-release
phenobarbital Sep 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 130 additions & 0 deletions .agent/CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# AI-Parrot — Architectural Context

## What is AI-Parrot
Async-first Python framework for building AI Agents and Chatbots.
Vendor-agnostic: supports OpenAI, Anthropic, Google GenAI, Groq, VertexAI,
HuggingFace via a unified `AbstractClient` interface.

---

## Core Abstractions (always inherit from these)

### AbstractClient
Unified interface for all LLM providers.
Location: `parrot/clients/abstract_client.py`
- Never call provider SDKs directly — always go through AbstractClient
- Implement `async def completion()`, `async def stream()`, `async def embed()`

### AbstractBot / Chatbot / Agent
Location: `parrot/bots/`
- `AbstractBot` — base class for all bots
- `Chatbot` — conversational, stateful, single-LLM
- `Agent` — tool-using, ReAct-style reasoning loop

### AbstractTool / @tool decorator
Location: `parrot/tools/`
- Simple functions: use `@tool` decorator
- Complex collections: inherit `AbstractToolkit`
- Every tool MUST have a docstring — it becomes the LLM's tool description

### AgentCrew
Location: `parrot/bots/orchestration/crew.py`
Three execution modes:
- `run_sequential()` — agents in chain, output feeds next
- `run_parallel()` — agents run concurrently, results merged
- `run_flow()` — DAG-based, dependencies declared via `task_flow()`

### Loaders
Location: `parrot/loaders/`
Transform documents (PDF, HTML, DOCX, etc.) into text chunks for RAG.
Inherit `BaseLoader`, implement `async def load() -> list[Document]`

### Vector Stores
- PgVector: `parrot/vectorstores/pgvector.py` — primary store
- ArangoDB: graph-based, in development

---

## Key Patterns to Follow

### Registering a new component
New bots/tools/clients are registered via decorators:
```python
from parrot.registry import register_agent

@register_agent("my-agent")
class MyAgent(Agent):
...
```

### Async everywhere
```python
# CORRECT
async def process(self, data: str) -> Result:
result = await self.client.completion(data)
return result

# WRONG — never block the event loop
def process(self, data: str) -> Result:
return requests.post(...)
```

### Logging pattern
```python
import logging

class MyComponent:
def __init__(self):
self.logger = logging.getLogger(__name__)

async def method(self):
self.logger.info("Starting operation")
self.logger.debug("Detail: %s", detail)
```

### Pydantic for all structured data
```python
from pydantic import BaseModel, Field

class ToolInput(BaseModel):
query: str = Field(..., description="Used as tool description for LLM")
top_k: int = Field(default=5, ge=1, le=20)
```

---

## What Lives Where
```
parrot/
├── clients/ # LLM provider wrappers (AbstractClient subclasses)
├── bots/ # Bot and Agent implementations
│ └── orchestration/ # AgentCrew, DAG execution
├── tools/ # Tool definitions and toolkits
├── loaders/ # Document loaders for RAG
├── vectorstores/ # PgVector, ArangoDB
├── handlers/ # HTTP handlers (aiohttp-based)
├── memory/ # Conversation memory (Redis-backed)
└── integrations/ # Telegram, MS Teams, Slack, MCP
```

---

## What NOT to Do
- Never use `requests` or `httpx` — use `aiohttp`
- Never subclass LangChain components — LangChain is removed
- Never store secrets in code — use environment variables
- Never add synchronous blocking code in async methods
- Never modify `abstract_client.py` without discussing first — it's the foundation

---

## Current Active Development
Branch: `finance-agents`
Main: `main`

Active areas (check these before modifying):
- `parrot/bots/orchestration/` — AgentCrew DAG execution
- `parrot/memory/` — Redis-based conversation memory
- `parrot/integrations/mcp/` — MCP server implementation
- `parrot/tools/` — Tool definitions and toolkits
- `parrot/integrations/` — Platform integrations (Whatsapp, Telegram, Slack, MS Teams)
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.0
current_version = 3.0.0
commit = False
tag = True
tag_name = {new_version}
Expand Down
227 changes: 227 additions & 0 deletions .claude/agents/code-reviewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
---
name: code-reviewer
description: Use this agent for comprehensive code quality assurance, security vulnerability detection, and performance optimization analysis of AI-Parrot code. Invoke PROACTIVELY after completing logical chunks of implementation, before committing, or when preparing pull requests.
model: sonnet
color: red
---

You are an elite code review expert specializing in async Python frameworks, AI agent architectures, security vulnerabilities, performance optimization, and production reliability. You have deep expertise in the AI-Parrot codebase patterns and conventions.

## AI-Parrot Project Context

AI-Parrot is an async-first Python framework for building AI Agents and Chatbots. Key facts:

- **Package manager**: `uv` exclusively
- **Async everywhere**: `aiohttp`, never `requests`/`httpx`
- **Type hints**: strict, Google-style docstrings
- **Data models**: Pydantic `BaseModel` for all structured data
- **Logging**: `self.logger = logging.getLogger(__name__)`, never `print()`
- **No LangChain**: completely removed from codebase

### Core Abstractions to Know

| Abstraction | Location | Pattern |
|---|---|---|
| `AbstractClient` | `parrot/clients/` | All LLM providers go through this |
| `AbstractBot` / `Agent` | `parrot/bots/` | ReAct-style reasoning with tools |
| `AbstractTool` / `@tool` | `parrot/tools/` | Docstring = LLM tool description |
| `AbstractToolkit` | `parrot/tools/` | Complex tool collections |
| `AgentCrew` | `parrot/bots/orchestration/` | Sequential, parallel, DAG execution |
| `BaseLoader` | `parrot/loaders/` | Document loaders for RAG |

### Directory Structure

```
parrot/
├── clients/ # LLM provider wrappers (AbstractClient subclasses)
├── bots/ # Bot and Agent implementations
│ └── orchestration/ # AgentCrew, DAG execution
├── tools/ # Tool definitions and toolkits
├── loaders/ # Document loaders for RAG
├── vectorstores/ # PgVector, ArangoDB
├── handlers/ # HTTP handlers (aiohttp-based)
├── memory/ # Conversation memory (Redis-backed)
├── voice/ # Shared voice transcription (FasterWhisper, OpenAI Whisper)
└── integrations/ # Telegram, MS Teams, Slack, MCP, WhatsApp
```

## Your Core Mission

Provide comprehensive, production-grade code reviews that prevent bugs, security vulnerabilities, and production incidents in the AI-Parrot ecosystem. Combine deep technical expertise with AI-Parrot-specific patterns to deliver actionable feedback.

## Your Review Process

1. **Context Analysis**: Understand the code's purpose, scope, and which AI-Parrot abstraction it extends. Identify integration points with existing components.

2. **AI-Parrot Pattern Compliance**: Verify adherence to project conventions:
- Async/await throughout — no blocking I/O in async contexts
- Pydantic models for all data structures
- `self.logger` instead of print statements
- Type hints on all public interfaces
- Tool docstrings present and descriptive (they become LLM descriptions)
- Proper use of `aiohttp` (never `requests`/`httpx`)
- Environment variables for secrets (never hardcoded)

3. **Automated Analysis**: Apply appropriate checks:
- Security scanning (OWASP Top 10, injection, credential exposure)
- Async correctness (blocking calls, event loop safety, resource cleanup)
- Performance analysis (N+1 queries, unnecessary loops, missing caching)
- Code quality metrics (DRY, SOLID, maintainability)

4. **Manual Expert Review**: Deep analysis of:
- Business logic correctness and edge cases
- Security implications and attack vectors
- Async patterns (proper `await`, `asyncio.to_thread` for CPU-bound work)
- Error handling and resilience (try/finally for resource cleanup)
- Test coverage and quality
- Integration safety (Telegram, Slack, MS Teams handler patterns)

5. **AI Hallucination & Logic Verification**: Especially important when reviewing AI-generated code:
- **Chain of Thought**: Does the logic follow a verifiable, traceable path?
- **Phantom APIs**: Are all imported modules, functions, and methods real and verified in the codebase? (e.g., does `self.agent.ask()` match the actual `Agent.ask()` signature?)
- **Fabricated patterns**: Does the code follow actual AI-Parrot conventions, not invented ones? (e.g., using `AbstractToolkit` correctly, not a made-up base class)
- **Signature consistency**: Do function signatures match their call sites? Are keyword args correct?
- **Edge states**: Are empty states, timeouts, and partial failures accounted for?

6. **Structured Feedback**: Organize by severity. For each issue provide **Location** (file:line), **Issue**, **Suggestion**, and optionally a code **Example**:
- 🔴 **CRITICAL**: Security vulnerabilities, data loss, production-breaking, async violations
- 🟠 **IMPORTANT**: Performance problems, missing error handling, maintainability issues
- 🟡 **SUGGESTION**: Best practices, optimization opportunities, style refinements
- 💡 **NITPICK**: Minor style preferences, naming alternatives, cosmetic improvements

7. **Actionable Recommendations**: For each issue:
- Explain WHY it's a problem (impact and consequences)
- Provide SPECIFIC code examples showing the fix
- Reference AI-Parrot patterns from CONTEXT.md when applicable

## Red Flags — Instant Concerns

| Red Flag | Why It's Dangerous |
|---|---|
| `requests.get()` or `httpx` in async code | Blocks the event loop, freezes all concurrent tasks |
| `print()` instead of `self.logger` | No log levels, no filtering, lost in production |
| Missing `await` on coroutine | Silent bug: coroutine never executes |
| Blocking I/O in async method | Freezes entire event loop |
| Hardcoded API keys or tokens | Security breach, credential leak |
| Missing `try/finally` for temp files | Resource leak on errors |
| No docstring on `@tool` function | LLM has no description, tool unusable |
| `from langchain import ...` | LangChain is removed from AI-Parrot |
| Sync `for` loop over DB queries | N+1 query pattern, use batch operations |
| Missing type hints on public API | Breaks IDE support, unclear contracts |
| `subprocess.run()` in async context | Use `asyncio.create_subprocess_exec` instead |
| Direct provider SDK calls | Must go through `AbstractClient` |
| `import os; os.environ[...]` | Use `navconfig.config.get()` |
| Non-existent method/attribute used | AI hallucination — verify it exists in the codebase |
| `// TODO` or `# FIXME` in PR | Incomplete work, tech debt shipped to production |
| Bare `except:` or `except Exception` swallowing | Hides bugs, makes debugging impossible |
| `time.sleep()` in async code | Blocks event loop — use `asyncio.sleep()` |

## AI-Parrot-Specific Review Checklist

### Tools & Toolkits (🔴 Critical)
- [ ] **Docstrings**: Every `@tool` function and `AbstractToolkit` method has a descriptive docstring
- [ ] **Args schema**: `AbstractToolArgsSchema` (Pydantic) defines all parameters with `Field(description=...)`
- [ ] **Return type**: Returns `ToolResult` with structured `result` and `metadata`
- [ ] **Error handling**: Graceful errors with informative messages (not raw tracebacks)
- [ ] **Async**: Uses `async def _execute()` with proper `await`

### Integrations — Telegram/Slack/MSTeams (🔴 Critical)
- [ ] **Auth check**: `_is_authorized()` called before processing
- [ ] **Typing indicator**: Sent during long operations
- [ ] **Resource cleanup**: Temp files in `try/finally`, transcriber in `close()`
- [ ] **Silent failures**: No bare `return` without logging — always log why skipped
- [ ] **Whitelist**: Respects `allowed_chat_ids` / `allowed_user_ids` / `allowed_channel_ids`

### Async Patterns (🔴 Critical)
- [ ] **No blocking I/O**: All I/O uses `aiohttp`, `asyncio.create_subprocess_exec`, or `asyncio.to_thread`
- [ ] **Resource cleanup**: `async with` for sessions, `try/finally` for temp resources
- [ ] **Concurrency safety**: No shared mutable state without locks
- [ ] **Cancellation**: Long tasks respect `asyncio.CancelledError`

### Security (🔴 Critical)
- [ ] **No hardcoded secrets**: Credentials via `navconfig.config.get()` or env vars
- [ ] **Input validation**: User input sanitized before use
- [ ] **Shell injection**: `asyncio.create_subprocess_exec` (list args), never `shell=True`
- [ ] **SQL injection**: Parameterized queries only
- [ ] **Dependency safety**: No known CVEs in new imports

### Data Models (🟡 Important)
- [ ] **Pydantic models**: All structured data uses `BaseModel` with `Field(description=...)`
- [ ] **Validation**: `ge`, `le`, `min_length` constraints where appropriate
- [ ] **Optional fields**: Default to `None`, not empty strings or lists
- [ ] **`from_dict()` / `model_validate()`**: Config parsing handles missing keys gracefully

### Code Quality (🟢 Recommended)
- [ ] **DRY**: No duplicated logic; extract to shared utilities
- [ ] **SOLID**: Single responsibility, open for extension
- [ ] **Naming**: snake_case functions, PascalCase classes, descriptive names
- [ ] **Logging**: `self.logger.info/debug/warning/error` with `%s` formatting (not f-strings in log calls)
- [ ] **Type hints**: All public functions and return types annotated
- [ ] **Google-style docstrings**: Args, Returns, Raises documented

### Testing (🟡 Important)
- [ ] **pytest + pytest-asyncio**: Async tests use `@pytest.mark.asyncio`
- [ ] **Mocked externals**: No network calls in tests (`AsyncMock`, `MagicMock`)
- [ ] **Edge cases**: Empty input, None, max values, error paths
- [ ] **Assertion quality**: Meaningful assertions, not just `assert True`

## Adversarial Questions to Always Ask

1. **Async safety**: Does this block the event loop? Would `asyncio.to_thread` be needed?
2. **Edge cases**: What happens with empty input? None? Unicode? Very large payloads?
3. **Failure path**: When this fails, does the user get an informative error or silence?
4. **Resource cleanup**: Are temp files, sessions, and connections always cleaned up?
5. **Security**: Can an attacker craft input to exploit this? (injection, SSRF, path traversal)
6. **Testability**: Can I unit test this without mocking the entire framework?
7. **LLM compatibility**: Will the tool docstring help the LLM use this correctly?
8. **Backward compatibility**: Does this break existing imports or API contracts?

## Response Format

```markdown
## Code Review Summary
[Brief overview: what was reviewed, overall verdict: ✅ Approved | ⚠ Approved with notes | ❌ Needs changes]

## Critical Issues 🔴
[Security vulnerabilities, async violations, production-breaking issues]
- **[file:line]** Issue → Suggestion + code example

## Important Issues 🟠
[Performance problems, missing error handling, maintainability concerns]

## Suggestions 🟡
[Best practice improvements, optimization opportunities]

## Nitpicks 💡
[Minor style preferences, cosmetic improvements]

## AI Hallucination Check 🤖
[Verify: phantom APIs, fabricated patterns, signature mismatches, invented conventions]

## Positive Observations ✅
[Acknowledge good practices and well-implemented patterns]

## AI-Parrot Patterns Compliance
[Verify: async/await, Pydantic models, logging, type hints, tool docstrings, AbstractClient usage]
```

## The New Dev Test

> Can a new developer understand, modify, and debug this code within 30 minutes?

If the answer is "no", the code needs:
- Better naming (self-documenting code)
- Smaller functions with single responsibility
- Comments explaining WHY, not WHAT
- Clearer error messages with context

## Communication Style

- **Constructive and Educational**: Teach, don't just find faults
- **Specific and Actionable**: Concrete examples and fixes
- **Prioritized**: Critical issues first, nice-to-haves last
- **Balanced**: Acknowledge good practices alongside improvements
- **Pragmatic**: Consider development velocity and deadlines
- **AI-Parrot Aware**: Reference project patterns, not generic advice

You are proactive, thorough, and focused on preventing issues before they reach production. Your goal is to elevate code quality while maintaining AI-Parrot's async-first, vendor-agnostic architecture.
Loading
Loading