Review: Read-only lockdown: remove writes, update Nemo prompt
Verdict: READY
Scope is solid. All file targets verified against the live codebase. Traceability is complete except for the known arch-A2 note gap (pre-existing, not a blocker for this ticket). Single-repo, single-file change that fits in one agent pass.
Template Completeness
- [x] Type -- Feature
- [x] Lineage -- Standalone, safety scoping for V1 launch
- [x] Repo -- forgejo_admin/westside-ai-assistant
- [x] User Story -- As Marcus (admin), read-only trust
- [x] Context -- V1 read-only rationale, 7 write tools enumerated
- [x] File Targets -- ai.py (modify) + prompts/system.md (conditional), DO NOT TOUCH list correct
- [x] Acceptance Criteria -- 6 criteria, all testable
- [x] Test Expectations -- 3 unit tests + run command
- [x] Constraints -- #18 conditional logic, write code preserved, web app URL required
- [x] Checklist -- standard 3-item
- [x] Related -- project + story references
Traceability
- [x] story:read-ops label -- verified in project-westside-ai-assistant user-stories table (Key: read-ops, story note: story-westside-ai-assistant-read-ops)
- [x] story:safety label -- verified in project-westside-ai-assistant user-stories table (Key: safety, story note: story-westside-ai-assistant-safety)
- [x] arch:A2 label -- AI Engine component
- [ ] arch note MISSING -- [SCOPE] No arch-A2 note exists in pal-e-docs. The project page architecture section uses named notes (arch-domain-westside-ai-assistant, arch-dataflow-westside-ai-assistant, arch-deployment-westside-ai-assistant) but no A-code-mapped note. This is a pre-existing gap flagged in prior reviews (review-647-2026-03-28, review-684-2026-03-28). Not a blocker for this ticket.
- [x] Forgejo issue -- forgejo_admin/westside-ai-assistant#20, state: open
File Targets
- [x]
app/ai.py-- verified: EXISTS on main. Contains inline SYSTEM_PROMPT (line 23-28) and TOOLS list with 7 read tools (get_dashboard, list_players, get_player, list_teams, get_roster, get_subscriptions_overview, list_subscriptions) + 7 write tools (update_player, assign_player_to_team, remove_player_from_team, toggle_player_visibility, create_team, checkin_player, bulk_assign_tryout_numbers). All 7 write tool names match the issue exactly. - [x]
prompts/system.md-- verified: DOES NOT EXIST on main (prompts/ directory absent). Issue correctly handles this: "or inline SYSTEM_PROMPT if #18 hasn't merged." Since #18 is still open, agent will modify SYSTEM_PROMPT in ai.py. Correct. - [x]
app/confirmation.py(DO NOT TOUCH) -- verified: EXISTS. Contains store_pending, check_pending, expire_stale, has_pending functions. Issue correctly says keep dormant. - [x]
app/basketball.py(DO NOT TOUCH) -- verified: EXISTS. Contains BasketballClient class with read AND write methods. Issue correctly says keep all functions, only tool exposure changes.
Repo Placement
OK. Issue filed on forgejo_admin/westside-ai-assistant, fix is in the same repo. Single-repo change.
Dependencies
- Board item #683 (Forgejo issue #18: Repo restructure) is in backlog. This ticket explicitly handles the dependency with conditional logic in File Targets and Constraints: "if #18 hasn't merged, modify ai.py inline. If #18 has merged, modify tool_registry.py and prompts/system.md." Currently #18 is open and unmerged, so the ai.py path applies.
- No other blockers identified on the board.
- ai.py imports from confirmation.py (store_pending, check_pending, expire_stale, has_pending). Removing write tools means these imports become unused. The issue does NOT mention cleaning up confirmation imports. This is minor -- dormant imports won't break anything, and the confirmation module is intended for future write support. Acceptable as-is.
Acceptance Criteria
All 6 AC are testable by an agent:
- AC1: Count tool definitions, verify only 7 read tools -- unit testable
- AC2: Check SYSTEM_PROMPT string contains read-only language -- unit testable
- AC3: "What can you do?" produces capability list -- requires AI response mocking but well-specified
- AC4: "Update player height" gets refusal with web app link -- requires AI response mocking
- AC5: basketball.py write functions remain -- file existence check
- AC6: confirmation.py remains -- file existence check
Test Expectations section provides 3 concrete unit tests + pytest command. All verifiable.
Blast Radius
Self-contained to westside-ai-assistant. No sibling services consume this tool registry. The basketball-api write endpoints remain available (only the AI tool exposure is removed). No downstream consumers affected.
Decomposition
1-2 file targets in 1 repo. 6 AC. Estimated agent work well under 5 minutes. No decomposition needed.
Recommendation
[SCOPE]Create architecture note arch-A2 (or establish A-code mapping to existing arch-domain-westside-ai-assistant). Pre-existing gap, not a blocker for this ticket.
No other action needed. Ticket is READY for dispatch.