workshop/packages
Corey Johnson 238df92888 Untangle Spike architecture with bridge pattern
Split the monolithic gitea/helpers.ts (which had Discord imports and created circular dependencies) into three focused libs:

1. **gitea/** — Pure API client: fetchPR, fetchReviewComments, convertUsername, threadName. No side effects or external deps.

2. **discord/** — Discord client setup: bot login, event listeners, slash commands. Now isolated from Gitea internals.

3. **bridge/** — New integration layer: webhook handler, DB mappings (Gitea PR ↔ Discord thread), Discord helpers, and createPRComment.

Dependencies now flow one direction: bridge → gitea and bridge → discord. No circular imports.

Added:
- Barrel exports (index.ts) for each lib with public API
- README.md for each lib documenting the barrel exports
- Comprehensive spike README.md with setup guide and architecture explanation
- Integration tests for webhooks (callback-based, no race conditions)
- Unit tests for pure API functions
- CLAUDE.md with links to each lib's README

This architecture makes it possible for AI to understand a lib by reading just its README, keeping context focused and small.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-09 15:23:11 -07:00
..
arg-completer fixed runner 2025-09-19 17:35:22 -07:00
cubby don't break on lowercase readmes 2025-09-25 21:15:53 -07:00
glyph Introducing... 2025-07-16 22:58:08 -07:00
http REMEMBER US FOR A YEAR! 2025-08-13 09:39:31 -07:00
iago wip 2025-07-14 14:47:30 -07:00
nano-remix it is working 2025-07-19 11:50:06 -07:00
nose-bbs ignore local sqlite file 2025-09-08 14:05:12 -07:00
query wip 2025-07-14 14:47:30 -07:00
shared cool dude 2025-11-07 14:40:11 -08:00
spike Untangle Spike architecture with bridge pattern 2026-03-09 15:23:11 -07:00
todo Added cron 2025-07-25 14:15:23 -07:00
truism truisms 2025-07-28 18:00:39 -07:00
werewolf-ui don't run whiteboard on 3000! 2025-07-22 09:33:51 -07:00
whiteboard Added cron 2025-07-25 14:15:23 -07:00