Skip to content

Update Slackbot documentation to reflect current implementation#1204

Merged
zzstoatzz merged 3 commits intomainfrom
update-slackbot-docs
Aug 20, 2025
Merged

Update Slackbot documentation to reflect current implementation#1204
zzstoatzz merged 3 commits intomainfrom
update-slackbot-docs

Conversation

@zzstoatzz
Copy link
Copy Markdown
Collaborator

@zzstoatzz zzstoatzz commented Aug 20, 2025

summary

  • update documentation to reflect current slackbot configuration and capabilities
  • refactor slackbot internals for better maintainability and fix tool execution issues
  • move configuration from prefect variables to version-controlled code where appropriate

changes

documentation updates

  • README.md: document GPT-5 support, list all prefect variables/secrets, add new settings like MAX_TOOL_CALLS_PER_TURN
  • CLAUDE.md: update with current configuration details and model selection information

code refactoring

  • wrap.py: complete refactor with proper separation of concerns
    • generic monkey-patching logic moved to _internal/monkey_patch.py
    • tool tracking and limiting moved to _internal/tool_tracking.py
    • prefect-specific integration remains in wrap.py
  • prompts.py: extract system prompts to dedicated module for cleaner separation
  • api.py: move welcome message from prefect variable to version-controlled code

bug fixes

  • fix double tool execution in prefect ui caused by multiple wrapping when pydantic-ai subclasses call super() or delegate to other toolsets
  • use context variables to track wrapped calls and prevent duplicate task creation
  • remove duplicate USER_MESSAGE_MAX_TOKENS definition

context

the slackbot had accumulated technical debt with configuration spread across variables and messy wrapper logic. this pr modernizes the codebase while fixing a critical bug where tools were being executed twice in the prefect ui, improving both maintainability and performance.

🤖 Generated with Claude Code

- Document GPT-5 model support and configuration
- Add comprehensive list of Prefect Variables and Secrets
- Include new settings like MAX_TOOL_CALLS_PER_TURN
- Clarify temperature auto-adjustment for GPT-5
- Remove duplicate USER_MESSAGE_MAX_TOKENS definition
- Update CLAUDE.md with current configuration details

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

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 20, 2025 00:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Slackbot documentation to accurately reflect the current implementation after switching to GPT-5 support and adding new configuration options. The documentation had become outdated and this brings it in line with the actual codebase capabilities.

  • Updated documentation to include GPT-5 model support alongside Claude
  • Added comprehensive configuration details including new Prefect Variables and Secrets
  • Removed duplicate code definition that was already imported from settings

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
examples/slackbot/src/slackbot/core.py Removed duplicate USER_MESSAGE_MAX_TOKENS definition that's properly imported from settings
examples/slackbot/README.md Updated to document GPT-5 support, comprehensive configuration variables, and model selection options
examples/slackbot/CLAUDE.md Updated architecture documentation with current model support and detailed configuration requirements

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

zzstoatzz and others added 2 commits August 19, 2025 19:54
- Replace Variable.aget() with hardcoded Marvin-style welcome message
- Remove unused Variable import from api.py
- Update documentation to remove marvin_welcome_message variable
- Welcome message now provides docs, GitHub, and community info with Marvin's characteristic tone

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

Co-Authored-By: Claude <noreply@anthropic.com>
- move prompts to dedicated prompts.py module for cleaner separation
- refactor wrap.py with proper separation of concerns:
  - generic monkey-patching in _internal/monkey_patch.py
  - tool tracking/limiting in _internal/tool_tracking.py
  - prefect integration stays in wrap.py
- fix double tool execution in prefect ui by using context variables to prevent duplicate wrapping when subclasses call super() or delegate
- move welcome message from prefect variable to version-controlled code

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

Co-Authored-By: Claude <noreply@anthropic.com>
@zzstoatzz zzstoatzz merged commit ed50ee6 into main Aug 20, 2025
4 checks passed
@zzstoatzz zzstoatzz deleted the update-slackbot-docs branch August 20, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants