Product.ai / Join / Projects / LLMAdapter Constitutional Implementation — thin sovereignty across one Product.ai backend surface
Project Open to Alpha Team

LLMAdapter Constitutional Implementation — thin sovereignty across one Product.ai backend surface

Define and ship the `LLMAdapter` interface as Product.ai's constitutional pattern for talking to model providers. One internal interface across all production code on the chosen surface. Pinned model versions explicitly. Reasoning effort set explicitly. System prompts in repo. No vendor SDK imports in business logic. The candidate picks one Product.ai backend surface and migrates it end-to-end. Real production code, real provider switch validation.
Project Overview
Discipline
software-engineer-backend · AI Systems — AI Engineer · Engineering — Full-Stack Software Engineer
Duration
2 weeks
Compensation
Your stated freelance rate
Surface
Engineering · Product.ai
Kernels
engineering · productai
Outcomes
dev-integrate · team-visible · team-velocity
Tier
Consequential
Alpha Team
Open to alpha members who want to take this on
Tooling
Claude Code or Co-work

Why we want this done

The April 2026 Anthropic Claude Code regression is the canonical case study for vendor capture as a live architectural risk. Three product-layer changes stacked between March 4 and April 20 — reasoning effort silently dropped highmedium, thinking-history cleared every turn, system-prompt updates between tool calls — and AMD's 234,760-tool-call dataset documented read-to-edit ratio dropping 70%, daily costs spiking 125x, BridgeBench accuracy losing 15 points. Critical finding: the raw Anthropic API was unaffected throughout. AMD's response was thin abstraction + provider switch within a week, not a thick-sovereignty migration. Phase 2 cross-provider verification finds zero 25-100 person firms have executed thick sovereignty; the expected-value math is -$700K to -$2M over 5 years. The thin pattern at ~0.25 FTE delivers ~80% of optionality at ~17% of cost. Product.ai today calls Anthropic and OpenAI directly across multiple surfaces with vendor SDK imports in business logic. That makes us non-defensible against the next vendor regression. The candidate ships the constitutional pattern that closes that exposure.

Scope

  1. Survey Product.ai backend code — find the surface with the most direct vendor API calls (productai-mcp, alloy backend, productai-web API routes, simplycodes backend)
  2. Define LLMAdapter interface — a small, opinionated surface area: completion, streaming, tool-use, structured-output. Strict typing. Pinned versions. Explicit reasoning effort. System prompts loaded from repo files
  3. Implement adapters for Anthropic and OpenAI as the first two providers
  4. Migrate the chosen surface — replace every vendor SDK import in business logic with LLMAdapter calls
  5. Validate: the surface can switch primary provider (Anthropic ↔ OpenAI) by changing a config value, with no business-logic edit, in under 1 hour
  6. Write the architectural decision record — why this interface, what it rejects (Vercel AI Gateway, LangGraph Cloud, vendor SDK harness layers), what comes next

What success looks like

  • One Product.ai backend surface ships with all vendor calls routed through LLMAdapter
  • A 1-hour provider-switch drill is run during the trial; the surface continues operating after the switch with no business-logic edits
  • Model versions, reasoning effort, and system prompts are all in repo, all version-controlled
  • The adapter has paired tests against a fake provider (deterministic) for unit tests and against a live provider (gated) for integration tests
  • The ADR is one page; an engineer migrating the next surface can apply the pattern without re-asking

References

references.md
Backend Engineering Phase 3 briefing axioms D1 (Anthropic regression case study), E5 (Thin sovereignty math)
AMD GitHub issue #42796 — forensic dataset of the April 2026 regression
AI Engineering Phase 3 briefing axiom F2 (Substrate-vs-Harness Boundary)
Product.ai backend code surfaces (productai-mcp, alloy, productai-web, simplycodes)
Existing ops/scripts/model_router.py — context for the routing layer; the LLMAdapter sits BENEATH it
Anthropic API + OpenAI API documentation (April 2026)
axioms/Engineering/Engineering Backend Frontier Practice Phase 2 (2026-04-28).md

Constraints

  • Claude Code as primary substrate
  • No vendor SDK imports in business logic — strict; an import anthropic outside the adapter is a fail
  • Pinned model versions; no claude-sonnet-latest or equivalent floating tags
  • System prompts loaded from repo — not embedded as string literals in code
  • All API calls through model_router.py for routing AND LLMAdapter for the call itself — these are different layers, not duplicates
  • Quality-first cost-aware: thin sovereignty is the default; thick sovereignty deferred until forcing function (regulatory, sustained $20K+/month gateway markup, or vendor-quality regression that thin pattern cannot recover from in 1 week)
Apply
01

Read the Codex (10 min)

The operating principles we work by. If they resonate, the rest of this will land. Open the Codex →

02

12-minute video screen

Hireflix, async. Questions are calibrated to this project specifically.

03

Chemistry call (30-60 min)

Direct call with the CEO. Strategic alignment and mutual fit. No problem-solving exercise.

04

Project begins within 2-3 weeks

1099 contractor agreement, NDA, paid at your stated rate. Day 1 in Santa Monica.

Alpha Team members can take this project without the screen-and-call sequence. Reach out via the Alpha Team channel.