TIM SCHROEDER
Work / Infinity Social
Responsible generative AI

InfinitySocial

An AI content studio that writes Facebook, Instagram and LinkedIn posts for real-estate agents, and checks the facts before a post is shown.

In development · privateJan–Mar 2026
Sanitized preview of the Infinity Social content studio: a content brief for an Instagram homeowner-education post beside a generated rainy-season post, with verification, knowledge-boundary and brand-alignment checks marked as passedSanitized preview

The problem

Agents need a steady flow of posts, but general AI writers invent market numbers, legal rules and personal stories. One wrong claim can hurt an agent's licence and reputation.

Who it's for

Real-estate agents and brokerages who post on Facebook, Instagram and LinkedIn.

Where AI is used

Claude Sonnet 4.6 drafts and rewrites the posts. Claude Haiku 4.5 generates post ideas, spots factual claims and searches the web for current local data. An image model draws the post graphics.

Built with

  • Next.js 16
  • Supabase
  • Claude Sonnet 4.6
  • Claude Haiku 4.5
  • Anthropic web search tool
  • Ideogram v3 Turbo
  • Tailwind CSS
01 · The problem

AI writes confidently about things it does not know

Real-estate posts touch prices, mortgage rates, local laws, taxes and disclosure rules. These facts change by county and by month, and a language model will happily fill the gaps with numbers that sound right.

Agents also post under their own name. A post that says "I've closed" or "my clients told me" when the agent never said it is a fabrication, even if it reads well.

  • Models invent statistics, dollar amounts and legal timelines when no data is given.
  • Location-specific claims are stated as universal rules.
  • Generated posts slip into first-person stories the agent never told.
  • Hooks drift toward fear and clickbait, which undermines a professional brand.

Why custom software

General AI writers do not know which real-estate claims are safe to make. Infinity Social sorts claims into what can be said freely, what must be qualified and what must never be invented, then checks the result in code and against a web search.

02 · The solution

Write freely, but check every claim

The agent picks a platform, a content type, a topic and a tone. Claude drafts the post from the agent's brand profile, then code checks and a fact-check step decide what survives.

AI

Knowledge boundaries in every prompt

Every request carries a core rulebook: use general real-estate concepts freely, qualify anything location-specific, and never invent dollar amounts, legal timelines or named sources. Fair Housing rules sit in the same core.

AI

A fact-check step after the draft

Haiku 4.5 lists the factual claims in the draft and searches the web for current local figures with a source and date. Sonnet 4.6 then rewrites with those figures, or with general wording if none are found.

Rule checks written in code

After each draft, code scans for invented first-person claims and for fear, clickbait, hyperbole and obvious hooks. A failed check triggers one rewrite.

AI

Posts for each platform

Separate routes write Facebook, Instagram and LinkedIn posts and LinkedIn articles, each with its own platform rules. Each post returns whether it was fact-checked and which sources were used.

AI

An ideas engine on a smaller model

Haiku 4.5 suggests post ideas by category. Two filters drop ideas with stock AI phrasing or invented sale data, offers or forecasts.

AI

Planning and creative tools

A drag-and-drop content planner, saved ideas, a listing package builder, an image lab using Ideogram v3 Turbo, and a video script lab.

03 · My role

What I did. What the AI did.

I set what the product does and what it must never say. Claude Code, an AI coding agent, wrote the code.

Tim · human judgement

I owned

  • Set the concept: one studio where an agent plans, writes and illustrates posts for Facebook, Instagram and LinkedIn.
  • Set the trust rule in the project's agent instructions: never invent statistics, legal claims, dollar amounts or first-person agent claims, and prefer a less detailed accurate post to a detailed invented one.
  • Chose to keep Fair Housing rules in the core prompt that goes with every request.
  • Directed the cost and speed passes: smaller prompts, Haiku for ideas, and prompt caching across the routes.
  • Asked for the fact-check to be on by default, with a switch the user can turn off.
  • Reviewed and committed every change; all 18 commits are under my name.
Claude Code · AI implementation

AI did

  • Wrote the application code: 78 API routes, 38 pages and 19 database migrations.
  • Split the prompts into a small core, task supplements and a reference document that is never sent.
  • Built the code checks, the one-shot rewrite and the fact-check step for each platform.
  • Traced the hanging ideas page to stacked SDK timeouts and added per-attempt timeouts and parallel database queries.
  • Moved the system prompts to cached blocks and upgraded the Anthropic SDK.

I decide what the content may claim and which model does which job. The agent writes the code and explains each change in the commit, and I review it before it is committed.

04 · How I built it with AI

From idea to production.

The git history runs from 27 January to 12 March 2026: a fast feature build in January and February, then two passes on accuracy, cost and speed.

  1. Jan 2026 · Foundation

    First version under version control

    The first commit captured the app with its first post generator. Two days later came image generation, multi-platform posts, analytics and planning.

    commits 1e8f24b (27 Jan) · 21d0c6d (29 Jan)
  2. Feb 2026 · Feature build

    Labs, listing tools and integrations

    Image Lab, Video Lab, Market Pulse, Listing Factory and public pages were added, then new dashboard pages, outside data integrations and a UI audit pass.

    commits 50dcda5 (5 Feb) · b481da4 (7 Feb) · f4b6762 (10 Feb)
  3. Feb 2026 · Prompt architecture

    Three-tier prompts and a single Sonnet pipeline

    The long rulebook was split into a small core, task supplements and a reference document. Posts now run draft, code checks, fact-check.

    commit 623e8a5 (11 Feb) · docs/prompt-reference.md
  4. Mar 2026 · Model upgrade

    Sonnet 4.6 and platform-specific routes

    Post generation moved to Claude Sonnet 4.6, and the routes were reworked so each platform follows its own rules.

    commits df0d5ff · 1192a45 (11 Mar)
  5. Mar 2026 · Accuracy

    Ideas engine and listing package accuracy

    A shared ideas layer added category safety rules and two filters. The listing package route gained wider fabrication rules and the same runtime checks as posts.

    commit 3559942 (12 Mar)
  6. Mar 2026 · Cost and speed

    Haiku for ideas, timeouts and prompt caching

    Ideas moved from Sonnet to Haiku 4.5 with shorter prompts and per-attempt timeouts. Every route's system prompt became a cached block.

    commits a2d3b96 · 605e1db · 24c4dba (12 Mar)
05 · Technologies

What it runs on, and why.

Every item here is in the project's code or configuration. I chose and connected them; AI coding agents wrote the code that uses them.

AI models

Claude Sonnet 4.6
Drafts each post, rewrites it after a failed check, and rewrites it with fact-checked data
Claude Haiku 4.5
Generates and tags post ideas, finds factual claims in a draft, and runs the web search
Anthropic web search tool
Looks up current local market figures with a source and publication date
Ideogram v3 Turbo via Replicate
Draws the graphics for posts
Anthropic prompt caching
Reuses the same system prompt across the draft, retry and rewrite calls in one request

App

Next.js 16 and React 18
The dashboard, public pages and API routes
TypeScript
The whole codebase, including the prompt library
Tailwind CSS and Radix UI
The interface components
dnd-kit
Drag-and-drop in the content planner

Data

Supabase Postgres
Brand profiles, posts, drafts, saved ideas, templates, listing packages and planner data
Supabase Auth and Storage
Sign-in, and a storage bucket for post images
06 · System architecture

How the pieces fit.

A Next.js app sends each request to Claude with a cached rulebook, checks the draft in code, then fact-checks it with a second model and a web search before returning it.

Infinity Social architectureA Next.js app sends each request to Claude with a cached rulebook, checks the draft in code, then fact-checks it with a second model and a web search before returning it.briefcached rulebook + briefdraftfind claimssearchpost graphicbrand profile, recent postsContent studioNext.js dashboardGeneration routesFacebook · Instagram · LinkedInClaude Sonnet 4.6Draft and rewriteCode checksFabrication and tone phrase listsClaude Haiku 4.5Claim detection · ideasWeb searchCurrent local figuresPostgresSupabaseImage modelIdeogram v3 Turbo
InterfaceApp / serverAI serviceData / storageExternal service
Technical detail for engineers
  • Each system prompt is built from a fixed core (output rules, voice, Fair Housing, data integrity, anti-fabrication) plus a supplement for the task and platform. The long examples live in docs/prompt-reference.md and are never sent.
  • The draft is checked against a 13-phrase list of invented first-person claims and four lists of fear, clickbait, hyperbole and obvious hooks (lib/social-media-rules.ts). A failure triggers one Sonnet rewrite.
  • The fact-check runs only if the draft contains factual claims. The search result counts as current only if it carries this year's or last year's date and no 'no data' marker. That is a heuristic on the model's text, not a check of the source page.
  • Every Claude call goes through one retry helper with 2, 4 and 8 second backoff on rate limits and server errors, plus an optional per-attempt timeout (lib/api-utils.ts).
  • Recent posts are loaded into the prompt so new posts avoid repeating them. Ideas pass a 32-phrase stock-wording filter and a 17-pattern filter for invented sales data before they are returned.
07 · Challenges

Problems worth telling you about.

Real incidents from the project's history, each with how it was found, fixed and checked.

CHALLENGE 01

A rule in a prompt is not a guarantee

The first version put the whole anti-hallucination protocol, a chain-of-verification routine and the three knowledge tiers into the system prompt of every call. It was long, costly, and nothing confirmed the model had followed it.

VERIFIEDEach post response now reports whether fact-checking ran, the data freshness and the sources found. The commit reports a 72–93% cut in system-prompt tokens. There is no automated test suite yet.
Why it was hard, what I decided, how AI helped
Why it was hard
Asking a model to verify its own draft in the same answer cannot be observed from outside. Making the prompt longer only adds cost on every call.
My approach
I kept the trust rule fixed: no invented statistics, legal claims, dollar amounts or agent stories. I asked for the checking to move out of the prompt and into steps that leave a trace.
How AI helped
Claude Code condensed the protocol into a short data-integrity section of the core prompt and moved the full rulebook into a reference document. It added code checks after the draft and a separate fact-check step with its own model calls.
The decision
Keep the principles in the prompt and put the checking in code and in separate calls, so each check either runs or visibly does not.
Evidence
commit 623e8a5 · lib/prompts-core.ts · docs/prompt-reference.md · app/api/generate/route.ts
CHALLENGE 02

An ideas page that could hang for half an hour

Generating post ideas sometimes never returned. The page sat waiting while the request retried in the background.

VERIFIEDEach attempt on both ideas routes is now capped at 30 seconds, with up to three attempts. The commit expects a 3–8 second response; that figure is an estimate, not a recorded measurement.
Why it was hard, what I decided, how AI helped
Why it was hard
Nothing was failing fast. The SDK's default 10-minute timeout, multiplied by three retries, let one request run for more than 30 minutes, and large prompts made slow answers more likely.
My approach
I wanted the ideas page to answer in seconds, and ideas did not need the strongest model.
How AI helped
Claude Code added a per-attempt timeout to the shared retry helper, ran the database reads in parallel, trimmed duplicated rules from the prompt and moved both ideas routes from Sonnet to Haiku 4.5.
The decision
Use the smaller, faster model for ideas and keep Sonnet for the posts people publish.
Evidence
commits a2d3b96 · 605e1db · lib/api-utils.ts
CHALLENGE 03

Shorter prompts were too short to cache

One post request makes three or four Sonnet calls with the same system prompt, but after the prompts were trimmed the shared part was too small for prompt caching to apply.

VERIFIEDThe commit message estimates about 61% savings on system input tokens per post request. No cost dashboard in the repo confirms it.
Why it was hard, what I decided, how AI helped
Why it was hard
Trimming and caching pulled in opposite directions. Static quality rules sat in the user prompt, which changes each time and cannot be cached.
My approach
I asked for caching on every route that calls Claude.
How AI helped
Claude Code moved the static quality rules from the user prompt into the system prompt, turned every system prompt into a cached block and upgraded the Anthropic SDK.
The decision
Put everything that never changes in the system prompt, so the retry and rewrite calls in the same request reuse it.
Evidence
commit 24c4dba · 15 API routes converted
08 · Results

What is true today.

Infinity Social is a private, working codebase with a full post pipeline. It has not launched publicly, and there have been no commits since 12 March 2026.

18
commits, 27 Jan–12 Mar 2026
Source: git log, 2 Nov 2026
14 of 18
commits co-authored by Claude
Source: Co-Authored-By trailers in git log, 2 Nov 2026
78
API routes
Source: route.ts files under app/api, git ls-files
38
app pages
Source: page.tsx files, git ls-files
3 of 3
post routes with a fact-check step and web search
Source: app/api/generate, generate-instagram, generate-linkedin
72–93%
fewer system-prompt tokens after the three-tier split
Source: commit 623e8a5 message (reported, not re-measured)
  • Facebook, Instagram and LinkedIn posts run the same pipeline: Sonnet draft, code checks with one rewrite, then an optional fact-check and rewrite.
  • Each post comes back with a fact-check flag, a data-freshness label and any sources found.
  • Ideas run on Haiku 4.5 and pass two filters before they reach the user.
  • Every route that calls Claude uses a cached system prompt and a shared retry helper.
  • There is no automated test suite or CI pipeline in the repo yet, and no public URL.
09 · Lessons

What this project taught me.

  1. A rule in a prompt is a request, not a guarantee. The checks I can rely on run in code or in a separate call after the model answers.
  2. Long rulebooks cost money on every call. Keep the principles in the prompt and the examples in a document for people.
  3. Set timeouts on purpose. The default timeout times three retries turned one slow answer into a half-hour hang.
  4. Define what 'verified' means. Here it means a dated source turned up in a search, which is weaker than reading the source, and the label should say so.
10 · Demo

No public demo yet

Infinity Social is private and has no public site. The image at the top is a sanitized preview with synthetic content, not a screenshot of real client data.

Let's talk about
what you need built.

Open to AI roles: full-time, contract or consulting. I build AI products, internal tools and automations with AI coding agents.