Commit Graph

522 Commits

Author SHA1 Message Date
Fahad
1d070e43fd Improved 2025-06-15 19:23:08 +04:00
Fahad
d8f4eb99f5 Improved 2025-06-15 19:21:57 +04:00
Fahad
978b6ef155 Improved 2025-06-15 19:20:15 +04:00
Fahad
0bb54d721a Moved API editing instructions above run-server 2025-06-15 19:16:01 +04:00
Fahad
7ef99fb9ce Improved schema description for precommit 2025-06-15 19:11:37 +04:00
Fahad
6dcf095c3d Improved schema description to allow Claude to pre-think harder before invoking thinkdeep 2025-06-15 19:05:23 +04:00
Fahad
ad6cff4498 Lint, bump 2025-06-15 18:43:37 +04:00
Fahad
dfed6f0cbd New tool: "tracer" helps with static analysis / call-flow generation. Does NOT use external models. Used as a quick prompt generator to aid in call-flow / dependency-chart generation. Can be used as an input into another tool / model for extended analysis and deeper thought.
Faster docker restarts
2025-06-15 18:42:10 +04:00
Fahad
6f8d3059a1 Merge branch 'main' into feature/tracer
# Conflicts:
#	tools/base.py
#	tools/debug.py
#	tools/thinkdeep.py
2025-06-15 16:09:54 +04:00
Fahad
f3720ad8e9 Use mock-reddis 2025-06-15 16:09:07 +04:00
Fahad
07a078b4f2 Updated tests and additional tests for folder expansion during conversation tracking 2025-06-15 16:03:43 +04:00
Fahad
d36a85a3f3 Fix directory expansion tracking in conversation memory
When directories were provided to tools, only the directory path was stored
in conversation history instead of the individual expanded files. This caused
file filtering to incorrectly skip files in continued conversations.

Changes:
- Modified _prepare_file_content_for_prompt to return (content, processed_files)
- Updated all tools to track actually processed files for conversation memory
- Ensures directories are tracked as their expanded individual files

Fixes issue where Swift directory with 46 files was not properly embedded
in conversation continuations.
2025-06-15 15:36:45 +04:00
Fahad
99ed09be8d Update tracer tool for new file tracking system 2025-06-15 15:36:33 +04:00
Fahad
64a1d8664e Fix directory expansion tracking in conversation memory
When directories were provided to tools, only the directory path was stored
in conversation history instead of the individual expanded files. This caused
file filtering to incorrectly skip files in continued conversations.

Changes:
- Modified _prepare_file_content_for_prompt to return (content, processed_files)
- Updated all tools to track actually processed files for conversation memory
- Ensures directories are tracked as their expanded individual files

Fixes issue where Swift directory with 46 files was not properly embedded
in conversation continuations.
2025-06-15 15:36:12 +04:00
Fahad
86728a1442 WIP 2025-06-15 15:32:41 +04:00
Fahad
9b8ea72280 Fixed for git actions 2025-06-15 14:14:15 +04:00
Fahad
3bc7956239 Implement TracePath tool for static call path analysis
Add comprehensive TracePath tool that predicts and explains full call paths
and control flow without executing code. Features include:

**Core Functionality:**
- Static call path prediction with confidence levels (🟢🟡🔴)
- Multi-language support (Python, JavaScript, TypeScript, C#, Java)
- Value-driven flow analysis based on parameter combinations
- Side effects identification (database, network, filesystem)
- Polymorphism and dynamic dispatch analysis
- Entry point parsing for multiple syntax patterns

**Technical Implementation:**
- Hybrid AI-first architecture (Phase 1: pure AI, Phase 2: AST enhancement)
- Export formats: Markdown, JSON, PlantUML
- Confidence threshold filtering for speculative branches
- Integration with existing tool ecosystem and conversation threading
- Comprehensive error handling and token management

**Files Added:**
- tools/tracepath.py - Main tool implementation
- systemprompts/tracepath_prompt.py - System prompt for analysis
- tests/test_tracepath.py - Comprehensive unit tests (32 tests)

**Files Modified:**
- server.py - Tool registration
- tools/__init__.py - Tool exports
- systemprompts/__init__.py - Prompt exports

**Quality Assurance:**
- All 449 unit tests pass including 32 new TracePath tests
- Full linting and formatting compliance
- Follows established project patterns and conventions
- Multi-model validation with O3 and Gemini Pro insights

**Usage Examples:**
- "Use zen tracepath to analyze BookingManager::finalizeInvoice(invoiceId: 123)"
- "Trace payment.process_payment() with confidence levels and side effects"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-15 14:07:23 +04:00
Fahad
6304b7af6b Native support for xAI Grok3
Model shorthand mapping related fixes
Comprehensive auto-mode related tests
2025-06-15 12:21:44 +04:00
Fahad
4becd70a82 Perform prompt size checks only at the MCP boundary
New test to confirm history build-up and system prompt does not affect prompt size checks
Also check for large prompts in focus_on
Fixed .env.example incorrectly did not comment out CUSTOM_API causing the run-server script to think at least one key exists
2025-06-15 10:37:08 +04:00
Fahad
3b03783ea7 Instructions on how to add a new tool 2025-06-15 09:42:28 +04:00
Fahad
44db8c9e63 Updated to reflect actual prompt 2025-06-15 09:37:56 +04:00
Fahad
3c56694d3f Formatting 2025-06-15 09:34:37 +04:00
Fahad
f4395a796c Typo 2025-06-15 09:33:48 +04:00
Fahad
81ab4da60c Typo 2025-06-15 09:33:18 +04:00
Fahad
77faea24e1 Typo 2025-06-15 09:30:55 +04:00
Fahad
8364170881 Merge remote-tracking branch 'origin/main' 2025-06-15 09:25:58 +04:00
Fahad
c7835e7eef Easier access to logs at startup with -f on the run script
Improved prompt for immediate action
Additional logging of tool names
Updated documentation
Context aware decomposition system prompt
New script to run code quality checks
2025-06-15 09:25:52 +04:00
Fahad
318b5c7ae7 Easier access to logs at startup
Updated documentation
2025-06-15 07:09:44 +04:00
Fahad
99fab3e83d Docs added to show how a new provider is added
Docs added to show how a new tool is created
All tools should add numbers to code for models to be able to reference if needed
Enabled line numbering for code for all tools to use
Additional tests to validate line numbering is not added to git diffs
2025-06-15 07:02:27 +04:00
Fahad
b5004b91fc Major new addition: refactor tool
Supports decomposing large components and files, finding codesmells, finding modernizing opportunities as well as code organization opportunities. Fix this mega-classes today!
Line numbers added to embedded code for better references from model -> claude
2025-06-15 06:00:01 +04:00
Beehive Innovations
be907a7b29 Merge pull request #39 from NikolaiUgelvik/fix-openrouter-auto-mode
Fix auto mode when only OpenRouter is configured
2025-06-14 21:37:17 +04:00
Nikolai Ugelvik
0eeea3dd67 Apply black formatting to test_openrouter_provider.py 2025-06-14 19:33:20 +02:00
Nikolai Ugelvik
be2612752a Fix auto mode when only OpenRouter is configured
The get_available_models method in ModelProviderRegistry was only checking
for providers with SUPPORTED_MODELS attribute, which OpenRouter doesn't have.
This caused auto mode to fail with "No models available" error when only
OpenRouter API key was configured.

Added special handling for OpenRouter provider to check its _registry
for available models, ensuring auto mode works correctly with OpenRouter.

Added comprehensive tests to verify:
- Auto mode works with only OpenRouter configured
- Model restrictions are respected
- Graceful handling when no providers are available
- No crashes when OpenRouter lacks _registry attribute
2025-06-14 19:21:14 +02:00
Fahad
70f1356e3e Improved trigger words to enforce large prompts are passed in as a file reference 2025-06-14 21:03:17 +04:00
Fahad
4cacd2dad9 Fixed trigger word 2025-06-14 20:14:40 +04:00
Fahad
6b05096ba0 testgen grounding 2025-06-14 20:10:59 +04:00
Fahad
b2489409eb Move o3-pro test into its own 2025-06-14 19:53:33 +04:00
Beehive Innovations
9f973b90e5 Merge pull request #36 from lox/add-o3-pro-support
feat: Add o3-pro model support
2025-06-14 19:44:14 +04:00
Fahad
68a75a7791 Updated lint instructions for PRs 2025-06-14 19:37:53 +04:00
Fahad
a8fd7f3d24 Bump 2025-06-14 19:32:11 +04:00
Fahad
f1ad06c529 Fixed lint, tests after recent fix
Updated readme
2025-06-14 19:31:31 +04:00
Fahad
b41b874e31 Fixed model name mapping for openrouter 2025-06-14 19:19:59 +04:00
Fahad
b405aaf8bd some justifications 2025-06-14 19:01:53 +04:00
Fahad
a4f9e22256 Renamed version tool 2025-06-14 18:54:53 +04:00
Fahad
442decba70 Improved model response handling to handle additional response statuses in future
Improved testgen; encourages follow-ups with less work in between and less token generation to avoid surpassing the 25K barrier
Improved coderevew tool to request a focused code review instead where a single-pass code review is too large or complex
2025-06-14 18:43:56 +04:00
Fahad
ec5fee4409 Bump 2025-06-14 16:48:21 +04:00
Fahad
698c1611d2 Lint fix 2025-06-14 16:47:59 +04:00
Fahad
d0d0a171dc Ensure duplicate file references are gracefully handled
Improved prompt to encourage immediate action
2025-06-14 16:37:02 +04:00
Fahad
ec707e021a Fix for path translation within docker 2025-06-14 16:00:54 +04:00
Fahad
acbfa1c94e Improved prompt for next steps 2025-06-14 15:51:04 +04:00