Corners · Operations · Build Spec ← This Friday's Issue   The Pitch
Operations · Build spec v0.1

OPS

How the Friday agent gets built. Seven small services chained into a single pipeline that pulls from a few dozen sources Thursday night, dedupes into a canonical LP/EP list, enriches it with critic data and cover art, hands it to editorial for review at 8:30 AM, and ships at 9:00 AM ET sharp.

v0.1 spec · May 15 2026 7 agents 6-week MVP Typescript / Postgres / Vercel

01 · ArchitectureThe Pipeline

Seven services. Top-to-bottom. Each does one thing, hands off a structured payload to the next, and writes its state to Postgres so the pipeline is resumable from any step.

Pipeline · Sources → Stages → Storage → Distributionfig. 1
SOURCES TIER · POLLED THU 11PM + FRI 6AM MUSIC DATABASES MusicBrainz /ws/2/ Apple iTunes Search Spotify Web API AllMusic (scrape) CANONICAL METADATA CRITIC RSS FEEDS Pitchfork · Stereogum Hearing Things · AV Club Rolling Stone · PopMatters Metacritic · ADM (aggr.) SCORES + QUOTES SUBSTACK CURATORS Britpop · Brittany Spanos Sterlewine String Theories Don't Rock the Inbox CURATED PICKS LABEL RADAR 41 curated labels Metal · Americana Archival · crossover Polled site + Bandcamp GIMME-LEGACY COVERAGE 01 SOURCE CONNECTORS One TypeScript module per source · fetches raw API/RSS/HTML responses /agents/connectors/*.ts 02 NORMALIZER Each source mapped into one CanonicalRelease shape · 80% of bugs live here /agents/normalizer.ts 03 DEDUPER Match by MBID → ISRC → Jaro-Winkler fuzzy on artist+title · 0.92 threshold /agents/deduper.ts 04 FILTER + ROUTE LP/EP only (tracks > 4) · this Friday · singles → Radio Radio · off-Friday → Late Drops /agents/filter.ts 05 ENRICHER Cover art · label tier · aggregate score · YouTube lead single · curator quotes /agents/enricher.ts 06 EDITORIAL CMS Human review · promote/demote · override scores · curated quotes · approve /apps/cms (Next.js · password-auth) 07 PUBLISHER Renders the issue HTML → staging → production · sends the email blast /agents/publisher.ts POSTGRES · STORAGE SUPABASE issues id · date · status publishedAt · editor releases artist · title · format · label tier · score · isHero · mbid singles artist · title · label · genre tier · context · radioRank critics releaseId · publication score · quote · url · isSubstack labels name · category · parent · tier autoPromote · feeds · notes posts releaseId · userId · body upvotes · replies · createdAt users id · name · email · role handle · joinedAt sources_raw source · fetchedAt · payload runId · status · errors DISTRIBUTION TIER · FIRES FRI 9:00 AM ET STAGING staging.corners.fm Vercel preview · auto-deploy Editorial window: 8:30 – 8:55 PRODUCTION corners.fm Promoted on editorial OK Auto-publish backstop @ 9:00 EMAIL BLAST Resend / Postmark Renders from issue JSON Subscriber segments RSS + SOCIAL /feed.xml · OG cards Bluesky / Threads / IG Auto-generated from issue RUNS WEEKLY · THU 23:00 → FRI 09:00 ET

02 · AgentsThe Seven Services

Each agent is a small, testable TypeScript module with a single responsibility. They share types via a common @corners/schema package and communicate by writing to Postgres — never by direct function calls — so any stage can be rerun independently when a Friday goes sideways.

01 / Connectors

Source Connectors

One TypeScript module per external source. Each exports a single fetchReleases(dateRange) function. Authentication, rate-limiting, retry, and pagination are encapsulated per-source. Outputs the source's raw response wrapped with a runId and timestamp; everything later in the pipeline can be replayed from sources_raw.

Inputs
Date range, source-specific config
Output
sources_raw rows
Runs
Thu 23:00, Fri 06:00, Fri 08:30
Code
/agents/connectors/{name}.ts
02 / Normalizer

Normalizer

Converts every source's response into one CanonicalRelease shape: artist, title, releaseDate, format, trackCount, labels[], mbid?, isrc?, artworkUrl?, sourceConfidence. The plumbing layer where most bugs live — built with a debug mode that logs every field mapping so editorial can audit decisions.

Inputs
Rows from sources_raw
Output
releases draft rows
Runs
After every connector sweep
Code
/agents/normalizer.ts
03 / Deduper

Deduper

Matches releases across sources. Priority: MusicBrainz Release ID (MBID) → ISRC for tracks → Jaro-Winkler fuzzy match on normalize(artist) + normalize(title) at 0.92 threshold. Every dedup decision is logged so the CMS can audit and roll back. The highest-stakes single piece of code — diehards notice duplicates.

Inputs
Draft releases rows
Output
Merged canonical rows · dedup log
Runs
After every Normalizer pass
Code
/agents/deduper.ts
04 / Filter

Filter + Route

Enforces the rules. Format check: tracks > 4 → LP/EP main feed; tracks ≤ 4 → routed to singles for Radio, Radio. Date filter: this Friday in the main feed, +14-day window flagged as Late Drops candidates. Reissues kept but flagged. Anything from a label in the registry gets a "label radar" annotation.

Inputs
Deduped releases
Output
Tagged releases + singles
Runs
After Deduper
Code
/agents/filter.ts
05 / Enricher

Enricher

Fills the gaps. Cover art from MusicBrainz Cover Art Archive → iTunes fallback at 600×600. Label tier from LABEL_REGISTRY. Lead single from Spotify album_tracks popularity-ranked. YouTube video ID via Data API. Critic data parallel pipe: match each Pitchfork / Stereogum / Substack post from this week to a release; store score + URL + quote.

Inputs
Filtered releases + critic feeds
Output
Fully populated releases + critics
Runs
Fri 06:00 + Fri 08:30
Code
/agents/enricher.ts
06 / CMS

Editorial CMS

A Next.js admin app behind password auth. You see the staged issue Thursday night through Friday morning, can promote/demote releases between Hero / Complete-List / Radio-Radio, override aggregate scores, add curated quotes from Substacks where there's no formal review, mark off-Friday entries for Late Drops. Nothing publishes without an "Approve" click — or auto-publishes at 9:00 AM if you don't.

Inputs
Staged issues
Output
Approved issue · audit log
Runs
Always-on web app
Code
/apps/cms/*
07 / Publisher

Publisher · Staging → Production → Distribution

Renders the approved issue's HTML from a templating layer that matches the public mock structure. Writes the rendered page + JSON payload to the staging branch — Vercel builds the preview in 30-60 seconds. Editorial gets a Slack/email ping with the staging URL at 08:30. One-click "Publish" merges staging → main. At 09:00 ET sharp, the email blast fires via Resend; RSS regenerates; OG cards render for social. If editorial doesn't click "Publish" by 08:55, an auto-promote runs anyway so the issue ships.

Inputs
Approved issues
Output
HTML + email + RSS + social cards
Runs
Fri 08:30 (stage) + 09:00 (publish)
Code
/agents/publisher.ts · /templates/issue.tsx

03 · ScheduleThursday Night → Friday Morning

Three cron triggers do most of the work. The pipeline is idempotent: any agent can be rerun from any point without breaking downstream state.

Weekly cadence · America/New_Yorkfig. 2
THU 23:00 FRI 02:00 FRI 04:00 FRI 06:00 FRI 08:00 FRI 09:00 10:00 CRON #1 · FULL SOURCE SWEEP Connectors · Normalizer · Deduper · Filter CRON #2 · CRITIC PULL Connectors (RSS) · Enricher (scores) CRON #3 Enrich + Stage EDIT WINDOW 08:30 – 08:55 ET SHIP 09:00 EMAIL + RSS AGENTS · WHEN THEY RUN First sweep is the heaviest — pulls every source. Reviews drop overnight in different timezones — second sweep catches them. Auto-publish backstop fires at 09:00 if editorial doesn't approve by 08:55.

04 · SchemaData Model

Eight tables. issues is the root — every Friday is one. releases and singles are the canonical published artifacts. critics and labels feed enrichment. posts and users power the From-the-Corners community layer (Phase 2). sources_raw is the audit trail.

issuesid · pk
  • id uuid · pk
  • date date · unique
  • status enum: staged|approved|published
  • issueNumber int
  • publishedAt timestamp?
  • approvedByUserId → users
  • heroNote text?
releasesid · pk
  • id uuid · pk
  • issueId → issues
  • artist text
  • title text
  • format enum: lp|ep|reissue
  • trackCount int
  • labelId → labels
  • tier enum: major|indie
  • aggregateScore int 0–100?
  • isHero bool
  • isReissue bool
  • artworkUrl text
  • leadSingleYtId text?
  • mbid · isrc text?
singlesid · pk
  • id uuid · pk
  • issueId → issues
  • artist · title text
  • labelId → labels
  • tier enum
  • genre text[]
  • context enum: loosie|leadSingle|betweenAlbums
  • radioRank int?
  • leadSingleYtId text?
criticsid · pk
  • id uuid · pk
  • releaseId → releases
  • publication text
  • isSubstack bool
  • score numeric?
  • grade text?
  • quote text?
  • url text
  • publishedAt timestamp
labelsid · pk
  • id uuid · pk
  • name text · unique
  • category enum: indie-metal|americana|crossover
  • parent text?
  • tier enum: major|indie
  • autoPromote bool
  • feeds jsonb (rss, site, bandcamp)
  • addedBy enum: jon|seed
  • notes text?
postsid · pk
  • id uuid · pk
  • releaseId · singleId → releases|singles
  • userId → users
  • body text
  • upvotes int
  • replyCount int
  • parentPostId → posts (self)
  • createdAt timestamp
usersid · pk
  • id uuid · pk
  • handle text · unique
  • displayName text
  • email text · unique
  • role enum: reader|editor|admin
  • joinedAt timestamp
sources_rawaudit trail
  • id uuid · pk
  • runId uuid · indexed
  • source text
  • fetchedAt timestamp
  • payload jsonb
  • status enum: ok|partial|error
  • error text?

05 · DeployStaging → Production

Vercel preview deployments do most of this for free. The cleaner setup is a dedicated subdomain pointed at a separate branch so the editorial review URL is stable and shareable.

Build & deploy flow · One Friday in seven steps · fig. 3
STEP 1 · 08:30 ET PUBLISHER renders issue HTML + JSON payload STEP 2 GIT PUSH to staging branch + tags issue id STEP 3 · ~60s VERCEL BUILDS staging.corners.fm deploys automatically STEP 4 · 08:31 EDITORIAL PING Slack + email + CMS dashboard alert STEP 5 · 08:30 – 08:55 EDIT WINDOW 25 min · review staging, make CMS overrides STEP 6 · 08:55 OR EARLIER PUBLISH BUTTON merges staging → main + auto-promote backstop @ 09:00 STEP 7 · 09:00 ET DISTRIBUTION FIRES corners.fm live · email blast, RSS, OG cards generate

06 · StackTech Choices

Boring, well-documented, TypeScript-native. Nothing exotic. The workspace already has TypeScript / Expo scaffolding so the language choice is consistent.

Language & Frameworks

LanguageTypeScript · end to end
Web appNext.js 14+ · public site + CMS
AgentsNode.js or Bun · serverless
Shared types@corners/schema · workspace pkg

Data & Storage

DatabasePostgres on Supabase · free tier OK
ORMDrizzle · typed, no codegen
Object storageCloudflare R2 · cached covers
CacheUpstash Redis · optional v2

Hosting & Scheduling

HostingVercel · web + cron + preview
CronVercel Cron · three triggers
OrchestrationInngest · v2 if needed
DNSCloudflare · corners.fm

Distribution & Monitoring

EmailResend · typed templates
AuthAuth.js / Clerk · CMS only v1
ErrorsSentry · agent + web
LogsVercel + Axiom · structured

07 · RoadmapSix Weeks to MVP

A phased build that ships a publishable Friday by end of week 6. Each week ends with a working artifact that you can review.

Week 1
· · ·
Foundations

Connectors + schema

Stand up the workspace, define @corners/schema, build the first three connectors (MusicBrainz, iTunes, Spotify). Output: a JSON dump of one real Friday's raw releases, no normalization yet.

Week 2
· · ·
Normalize + dedupe

Canonical pipeline

Build Normalizer and Deduper. Add 4–5 more connectors (Pitchfork RSS, Stereogum RSS, the four Substacks, AllMusic). Output: a single canonical list of LP/EPs for a real Friday, deduped, with the dedup log visible for audit.

Week 3
· · ·
Enrich

Filter + Enricher

Build Filter (LP/EP routing + singles → Radio Radio) and Enricher (cover art, label tier, lead single, YouTube). Wire the labels table from label-registry.json. Output: a fully enriched issue JSON ready to render.

Week 4
· · ·
Critic pipe

Reception aggregation

Pitchfork/Stereogum/Hearing Things RSS reader → critic-match → score aggregation. Substack picks stored as quoted blurbs since they don't grade. Output: every release in the issue carries critic chips.

Week 5
· · ·
CMS

Editorial admin

Next.js admin app with auth. Issue dashboard, promote/demote, override scores, add curated quotes, approve button. Read-only first then editable. Output: you can review and approve a real Friday.

Week 6
· · ·
Ship

Publisher + email + production

Templating layer that renders the public mock structure. Vercel staging + production setup. Resend email integration. RSS + OG cards. Wire the three crons. Goal: a real, publishable Friday issue ships at 9:00 AM ET on a target date in late August / early September.

08 · Risk NotesWhere This Gets Hard

Three places we know in advance will need more attention than they look.

  1. The label-tier classifier is a moving target. Labels get sold, sublabels reshuffle, "indie-distributed-via-Universal" is a real category. The labels table is versioned; treat misclassification as a real bug not a small one. The Jon-curated registry is what makes this tractable — we already have provenance on every entry.
  2. Scraping the publications respectfully. Cache aggressively (4-hour TTL on review pages), set a real User-Agent that identifies Corners, honor robots.txt, and reach out to anyone whose RSS we depend on for explicit blessing. Most music critics will say yes when they see what we're building — but ask first.
  3. The deduper is the single highest-stakes piece of code. A release showing up twice on Friday morning is the kind of mistake diehards will notice and screenshot. Build with a debug mode that logs every match decision, surface those in the CMS, and maintain a set of "golden weeks" — past Fridays we've manually verified — as regression tests before every change.