How nawaz-builds/gitcord-githubdiscordbot works
Gitcord is an offline-first GitHub–Discord automation bot. Its documented run-once workflow loads configuration, ingests activity, plans changes, produces audit reports, and optionally applies permitted writes; Discord slash commands provide a separate interactive path for identity linking, profiles, metrics, and notifications. The graph preserves those product areas and the SQLite state layer. Several subsystem links follow the README’s documented workflow; unsampled implementation details are not asserted as verified calls.
Main entry points: orchestrator.py Sync orchestration · bot.py Discord bot · cli.py CLI · sqlite.py SQLite state
Components 23
Entry points
- CLI
src/ghdcbot/cli.py - Discord bot
src/ghdcbot/bot.py
Sync workflow
- Sync orchestration
src/ghdcbot/engine/orchestrator.py - Deterministic planning
src/ghdcbot/engine/planning.py - Assignment strategy
src/ghdcbot/engine/assignment.py - Audit reports
src/ghdcbot/engine/audit_export.py - Sync reporting
src/ghdcbot/engine/reporting.py - Sync snapshots
src/ghdcbot/engine/snapshots.py - Notifications
src/ghdcbot/engine/notifications.py
Platform adapters
- Activity readers
src/ghdcbot/adapters/github/rest.py - GitHub writes
src/ghdcbot/adapters/github/writer.py - Discord API
src/ghdcbot/adapters/discord/api.py - Discord writes
src/ghdcbot/adapters/discord/writer.py
Discord features
- Identity linking
src/ghdcbot/engine/identity_linking.py - Contributor profiles
src/ghdcbot/engine/social_profiles.py - Social commands
src/ghdcbot/adapters/discord/social_commands.py - Metrics
src/ghdcbot/engine/metrics.py
Configuration and state
- Config loading
src/ghdcbot/config/loader.py - Config models
src/ghdcbot/config/models.py - SQLite state
src/ghdcbot/adapters/storage/sqlite.py
Other components
- Operator
- GitHub
- Discord users
Connections 25
- Operator → CLI: runs
- Operator → Discord bot: uses commands
- CLI → Config loading: loads
src/ghdcbot/cli.py - Config loading → Config models: validates
src/ghdcbot/config/loader.py - CLI → Sync orchestration: runs sync
src/ghdcbot/cli.py - Sync orchestration → Activity readers: ingests activity
- GitHub → Activity readers: provides activity
- Sync orchestration → Deterministic planning: plans changes
src/ghdcbot/engine/orchestrator.py - Deterministic planning → Assignment strategy: uses strategy
- Sync orchestration → Audit reports: exports audit
src/ghdcbot/cli.py - Sync orchestration → Sync reporting: generates reports
src/ghdcbot/engine/orchestrator.py - Sync orchestration → Sync snapshots: records snapshots
src/ghdcbot/engine/orchestrator.py - Sync orchestration → GitHub writes: optionally applies
- Sync orchestration → Discord writes: optionally applies
- GitHub writes → GitHub: mutates
- Discord writes → Discord users: mutates
- Discord bot → Discord API: serves commands
- Discord bot → Identity linking: handles linking
src/ghdcbot/bot.py - Discord bot → Social commands: registers commands
src/ghdcbot/bot.py - Social commands → Contributor profiles: uses profiles
src/ghdcbot/adapters/discord/social_commands.py - Discord bot → Metrics: offers metrics
src/ghdcbot/bot.py - Discord bot → Notifications: offers notifications
- Identity linking → SQLite state: persists links
src/ghdcbot/engine/identity_linking.py - Contributor profiles → SQLite state: reads and writes
src/ghdcbot/engine/social_profiles.py - Sync orchestration → SQLite state: uses state