How andrewnordstrom-eng/corgi works
Corgi is a community-governed Bluesky feed: public activity is collected and filtered, posts are scored against an approved community policy, and the ranked feed is published with inspectable score receipts. Members vote on weights, topics, and content rules in governance rounds; aggregation and review precede policy changes and reranking. The README documents PostgreSQL as canonical storage and Redis as the live-feed snapshot. The graph also includes transparency, user/operator interfaces, and the scoring SDK. Some subsystem links are documented rather than source-verified because their implementation excerpts were not provided.
Main entry points: pipeline.ts Scoring pipeline · server.ts Governance API · post-handler.ts Post processing · client.ts PostgreSQL
Components 25
Collection and Topics
- Activity ingestion
src/ingestion/jetstream.ts - Post processing
src/ingestion/handlers/post-handler.ts - Content rules
src/governance/content-filter.ts - Topic tagging
src/scoring/topics/classifier.ts - Topic embeddings
src/scoring/topics/embedder.ts - Topic taxonomy
src/scoring/topics/taxonomy.ts
Governance and Ranking
- Governance API
src/governance/server.ts - Epoch lifecycle
src/governance/epoch-manager.ts - Vote aggregation
src/governance/aggregation.ts - Scoring pipeline
src/scoring/pipeline.ts - Ranking signals
src/scoring/components
Feed and Transparency
- Feed endpoint
src/feed/server.ts - Transparency API
src/transparency/server.ts
User and Operator Interfaces
- Website
web-next - Operator CLI
cli/src/index.ts - MCP tools
src/mcp/server.ts - Scoring SDK
packages/feed-sdk/src/index.ts
Runtime and Research
- PostgreSQL
src/db/client.ts - Redis feed snapshot
src/db/redis.ts - Service runtime
src/index.ts - Data maintenance
src/maintenance/cleanup.ts - Governance harness
src/harness/index.ts
Other components
- Bluesky Jetstream
- Community members
- Bluesky apps
Connections 27
- Bluesky Jetstream → Activity ingestion: streams activity
README.md - Activity ingestion → Post processing: dispatches events
- Post processing → Content rules: applies rules
src/ingestion/handlers/post-handler.ts - Post processing → Topic tagging: tags topics
src/ingestion/handlers/post-handler.ts - Topic tagging → Topic taxonomy: uses taxonomy
src/scoring/topics/classifier.ts - Topic tagging → Topic embeddings: uses embeddings
- Post processing → PostgreSQL: stores posts
README.md - Community members → Governance API: submit ballots
README.md - Governance API → Epoch lifecycle: routes governance
- Epoch lifecycle → Vote aggregation: aggregates votes
src/governance/epoch-manager.ts - Epoch lifecycle → Scoring pipeline: reruns ranking
src/governance/epoch-manager.ts - Scoring pipeline → PostgreSQL: reads and stores scores
README.md - Scoring pipeline → Ranking signals: scores posts
src/scoring/pipeline.ts - Scoring pipeline → Redis feed snapshot: publishes snapshot
README.md - Bluesky apps → Feed endpoint: requests feed
README.md - Feed endpoint → Redis feed snapshot: serves snapshot
README.md - Website → Governance API: uses APIs
README.md - Website → Transparency API: views receipts
README.md - Operator CLI → Governance API: operates governance
README.md - MCP tools → Governance API: exposes tools
- Transparency API → PostgreSQL: reads score data
README.md - Service runtime → Feed endpoint: starts service
src/index.ts - Service runtime → Activity ingestion: starts ingestion
src/index.ts - Service runtime → Scoring pipeline: starts scoring
src/index.ts - Data maintenance → PostgreSQL: cleans data
src/maintenance/cleanup.ts - Governance harness → Community members: simulates ballots
- Scoring SDK → Ranking signals: defines contract
README.md