AI engine core: Anthropic integration, tool definitions, GroupMe response posting #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Depends on forgejo_admin/westside-ai-assistant #4 (scaffold) and #5 (basketball client).
Repo
forgejo_admin/westside-ai-assistantUser Story
As Marcus (admin)
I want to send natural language messages and have the AI interpret them as basketball-api operations
So that I can manage the program without learning API endpoints or UI navigation
Context
This is the AI engine core — Anthropic Claude tool_use integration with read-only dispatch. The system prompt defines the assistant's role and safety rules. Each basketball.py function becomes an Anthropic tool definition. This ticket handles read operations (immediate execution) and the GroupMe response posting. Write confirmation flow is handled in #8 (separate ticket).
File Targets
Files the agent should create:
app/ai.py— AI engine: system prompt, 14 tool definitions (7 reads + 7 writes, all tagged with read/write metadata), conversation history (in-memory dict, last 20 messages per group, lost on restart), process_message() entry point that calls Anthropic and executes read tools immediatelytests/test_ai.py— tool dispatch, response formatting, conversation history managementFiles the agent should modify:
app/groupme.py— wire callback to ai.process_message(), post AI response to GroupMe via bot API (POST https://api.groupme.com/v3/bots/post with bot_id + text)Files the agent should NOT touch:
app/basketball.py— consumed as-is from #5app/config.py— should already have all needed env vars from #4Acceptance Criteria
Test Expectations
pytest tests/test_ai.py -vConstraints
anthropicPython SDKChecklist
Related
project-westside-ai-assistant— parent projectarch-dataflow-westside-ai-assistant— full message flowstory-westside-ai-assistant-read-ops— read operations storyScope Review: NEEDS_REFINEMENT
Review note:
review-598-2026-03-28Template is complete and traceability triangle is solid (3 story labels + arch:A2 + open issue). File targets verified against repo state. However, 9 ACs + 7 test expectations exceed the 5-item decomposition threshold and estimated agent time is 8-12 minutes.
Issues found:
app/groupme.py,app/config.py, andtests/__init__.pywhich this ticket requires. Update to: "Depends on #4 (scaffold) and #5 (basketball client)."Anthropic AI engine with tool definitions and confirmation flowto AI engine core: Anthropic integration, tool definitions, GroupMe response postingScope refinement (review-598-2026-03-28):
Scope Review: READY
Review note:
review-598-2026-03-28-v2Re-review after refinement. Both issues from v1 review resolved:
All template sections complete. Traceability triangle solid (3 story labels + arch:A2 + open issue). File targets verified. Dependencies documented and correctly ordered (#4 → #5 → #6 → #8). No blast radius concerns.