Repo restructure: Nemo agent definition + modular tool registry #18
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
Standalone — restructure for maintainability and tool extensibility. Follows claude-custom agent/skills pattern.
Repo
forgejo_admin/westside-ai-assistantUser Story
As Lucas (platform operator)
I want Nemo's tools organized as modular, auto-discovered definitions
So that adding or removing capabilities is a file operation, not a code change
Context
The assistant is named Nemo. Currently all 14 tool definitions are inline in ai.py as a giant list. Restructure to mirror the claude-custom pattern: agent personality in
agents/nemo.md, tools intools/{category}/TOOL.md+handler.py, system prompt inprompts/system.md. A tool registry auto-discovers tools at startup and generates Anthropic tool definitions. This makes adding/removing tools mechanical — add a directory, restart. Write tools (7 total) stay in the codebase as tool directories but are NOT registered by default — atools/{category}/TOOL.mdfrontmatter fieldenabled: falsecontrols this. The registry only loads enabled tools.File Targets
Files the agent should create:
agents/nemo.md— personality definition (name, role, voice, constraints, read-only V1 policy)tools/__init__.py— emptytools/players/TOOL.md— tool definitions for get_player, list_players (frontmatter: name, description, parameters, enabled: true)tools/players/handler.py— functions that call basketball.pytools/teams/TOOL.md— list_teams, get_roster (enabled: true)tools/teams/handler.pytools/billing/TOOL.md— get_subscriptions_overview, list_subscriptions (enabled: true)tools/billing/handler.pytools/dashboard/TOOL.md— get_dashboard (enabled: true)tools/dashboard/handler.pytools/player_writes/TOOL.md— update_player, toggle_player_visibility (enabled: false — dormant for V1)tools/player_writes/handler.pytools/team_writes/TOOL.md— assign_player_to_team, remove_player_from_team, create_team (enabled: false)tools/team_writes/handler.pytools/tryouts/TOOL.md— checkin_player, bulk_assign_tryout_numbers (enabled: false)tools/tryouts/handler.pyapp/tool_registry.py— auto-discover tools/ dirs, parse TOOL.md frontmatter, only load enabled tools, import handler.py functions, generate Anthropic tool definitions listprompts/system.md— system prompt template that references nemo.md personalityFiles the agent should modify:
app/ai.py— replace inline TOOLS list withtool_registry.get_tools(), replace inline dispatch with registry-based dispatchtests/test_ai.py— update imports from inline TOOLS/dispatch to tool_registry. Update any direct references to _TOOL_META, _execute_read_tool, etc.Files the agent should NOT touch:
app/basketball.py— stays as-is (the HTTP client tools call into)app/groupme.py— stays as-isapp/confirmation.py— stays dormant (future write support)Acceptance Criteria
agents/nemo.mddefines personality, role, voice, constraints (read-only V1)tool_registry.pyauto-discovers tools, respectsenabledflag, generates Anthropic-format tool definitionsget_tools()(7 read tools in V1)ai.pyuses registry instead of inline definitions — same behavior, modular structuretools/new_category/TOOL.md+handler.py— no ai.py changesTest Expectations
pytest tests/ -vConstraints
enabled: falseChecklist
Related
project-westside-ai-assistant— parent projectstory-westside-ai-assistant-read-ops— read operations storyarch-domain-westside-ai-assistant— architecture referenceScope Review: NEEDS_REFINEMENT
Review note:
review-683-2026-03-28Template is complete and well-structured. Three issues found before this ticket is READY:
Scope refinement (review-683-2026-03-28):
enabled: falsein TOOL.md frontmatter. Registry only loads enabled tools.tests/test_ai.pyadded to file targets as modification target (imports will change).arch-domain-westside-ai-assistantand related notes exist in pal-e-docs (created earlier this session).