← back to blog
IDEAbackend8min readmin

Porter & Odradek: The Goal Behind an Autonomous Local-First Publisher

Why I built a self-contained Go system that researches, drafts, and publishes technical content to LinkedIn and sidequestlab.dev — without handing editorial control to a SaaS.

Matheus Nunes PereiraSoftware Engineer

Two names, one question

Porter & Odradek started as a single question I kept circling back to: can a technical publisher run entirely on a developer’s own machine — owning its context, its voice, and its output — without surrendering editorial control to a hosted SaaS?

The project has two halves, and the names come from two very different places.

Odradek is the perception, research, rendering, and QA engine (internal/odradek + internal/agents). The name is a deliberate collision. In Kafka’s 1917 short story “Die Sorge des Hausvaters” (“The Cares of a Family Man”), Odradek is a flat, star-shaped spool wound with tangled, multi-colored threads — a nimble, sleepless observer that outlives human routines. In Hideo Kojima’s Death Stranding, the Odradek is the courier’s shoulder-mounted terrain and hazard scanner that pulses to reveal deep water, obstacles, and invisible threats before the courier takes a step. Both readings fit what the subsystem actually does: it interprets natural-language requests, gathers web/repository/commit context, transcribes Telegram voice notes, renders high-DPI visual cards, and runs multimodal Vision+Text QA — flagging has_uncertainty=true whenever a claim or visual layout looks risky.

Porter is the orchestration, trust, and delivery subsystem (internal/porter + internal/pipeline + internal/settings). In Death Stranding, Porters like Sam Porter Bridges traverse isolated landscapes carrying vital cargo to reconnect fragmented nodes. In this codebase, Porter manages human interaction via Telegram, live SQLite configuration, adaptive topic trust, OAuth2 token lifecycles, and reliable delivery of verified technical cargo to LinkedIn and sidequestlab.dev (a bilingual EN + PT-BR Astro MDX blog).

The Kafka/Kojima tension is a nice framing device, but it is not the point. The point is the goal: a self-contained Go system that researches, drafts, and publishes while keeping every artifact local and auditable.

The goal, stated plainly

Porter & Odradek is meant to be an autonomous, local-first technical publisher. That sentence carries three commitments:

  1. Local-first. The daemon, the database, the rendered media, the drafts, the QA artifacts, and the publish records all live on my machine. There is no hosted control plane deciding what I write or when I publish.
  2. Autonomous where it has earned it. The system can research, draft, QA, and schedule. It can auto-publish on topic patterns that have been explicitly trusted. Everywhere else, it stops and asks.
  3. Human-in-the-loop by design. The default is not “publish and hope.” The default is “draft, verify, and pause for review in Telegram.” Autonomy is a privilege the system earns per topic pattern, not a global switch.

That is the whole thesis. Everything else in the codebase is machinery in service of those three commitments.

Architecture: how a request becomes a published post

The end-to-end flow looks like this:

Approve / Trust Regen / Edit Discard User requestTelegram or CLI Portercontext routing + editorial direction Self-contextsettings, tone, history Web search Repository inspection Git activitycommits, diffs URL fetch Odradekdraft + QA Human gateevaluateHumanGate Publish Drop LinkedIn sidequestlab.devEN + PT-BR MDX

The division of labor is intentional and strict:

Concern Porter Odradek
Interpret the request ✅ —
Decide what context to gather ✅ —
Frame the editorial direction ✅ —
Fetch web / repo / git / URL context — ✅
Draft the prose — ✅
Render cards and diagrams — ✅
Multimodal QA (Vision + Text) — ✅
Human gate and trust decisions ✅ —
OAuth2 and delivery ✅ —

Porter decides what to read and how to frame the post. Odradek turns that direction into publishable prose and verified visuals. Neither side does the other’s job.

Context routing: the part that actually matters

Most “AI publisher” tools fail because they have one context source: the prompt. Porter & Odradek has five, and choosing among them is an explicit routing decision rather than an accident of whatever happened to be in the prompt window.

  • Self-context. The active writer tone, the settings table, the history of published posts, and the learned topic patterns all live in SQLite. When the tone is informal, that is a live row, not a config file I forgot to reload.
  • Web search. For external claims, references, and background. This is where the Kafka and Kojima material in this very post came from.
  • Repository inspection. For posts about the codebase itself, Odradek reads the actual files under internal/ rather than trusting my memory of them.
  • Git activity. Commits and diffs are first-class context. A post about “what I shipped this week” should be grounded in what actually landed, not in what I think landed.
  • URL fetching. When I paste a link in Telegram, Odradek fetches and extracts it instead of hallucinating its contents.

The routing decision is the editorial decision. If Porter routes a request to web search when it should have routed to git activity, the draft will be confidently wrong. That is why routing lives in Porter and not in the writer.

The dual publish targets

One core, two outputs:

  • LinkedIn. Short-form, tone-sensitive, with rendered high-DPI cards for code snippets and architecture diagrams.
  • sidequestlab.dev. Long-form bilingual EN + PT-BR Astro MDX entries, with proper frontmatter, tags, stack, and cover alt text.

The same research and QA pipeline feeds both. The difference is the rendering and the schema, not the editorial process. This is why the system is worth building at all: writing the same idea twice in two formats and two languages is exactly the kind of work that should be automated, while the judgment about what to say stays with me.

The technical substrate

A few decisions make the local-first goal actually hold up:

Single static Go binary (CGO_ENABLED=0). Built with modernc.org/sqlite — a pure-Go SQLite driver — so there is no C toolchain to fight during cross-compilation. The database runs in WAL mode with SetMaxOpenConns(1) to serialize writes cleanly and avoid SQLITE_BUSY. Migrations are embedded via goose with //go:embed.

Zero .env, live runtime settings. All secrets, models, tones, and cron schedules live in the settings table and update immediately via porter config set or Telegram commands (/set, /config, /tone) without restarting the daemon. There is no “did you reload the env file?” failure mode because there is no env file.

Near-zero operational cost. The writer agent uses DeepSeek (deepseek-chat) with strict JSON Schema validation via go-playground/validator and invopop/jsonschema. Multimodal QA, audio transcription, and analytics reading use Google Gemini Flash’s free tier (google.golang.org/genai) or a local agy CLI fallback. The whole thing runs at roughly $0/month.

100% local high-DPI media rendering. Embedded HTML/CSS/JS templates (//go:embed assets/* with highlight.js and mermaid.min.js) are served on 127.0.0.1:0 to headless Chromium via playwright-go with DeviceScaleFactor: 2. Code cards and architecture diagrams come out crisp without any external rendering service.

Adaptive human-in-the-loop gate. evaluateHumanGate pauses on untrusted topic patterns (topic_patterns), low confidence scores, or QA/Writer uncertainty, and surfaces inline buttons in Telegram: Approve, Approve + Trust, Regen, Edit, Discard. After repeated approvals — or an explicit trust action — Odradek earns autonomy to auto-publish scheduled posts on that pattern.

Deployment. Runs 24/7 via Arch Linux (PKGBUILD + systemd), macOS (launchd), or multi-stage Docker Compose.

Tradeoffs and where the system deliberately stops

Local-first is not free. Here is what it actually costs:

Orchestration complexity moves into my codebase. A hosted SaaS hides the pipeline behind an API. Here, the pipeline is mine: context routing, QA gating, OAuth2 token refresh, SQLite migrations, and the renderer all have to be correct. The upside is that when something is wrong, I can read the code and the database instead of filing a support ticket.

Provider dependencies still exist. Local-first does not mean offline. DeepSeek and Gemini are still remote APIs. The difference is that they are swappable rows in a settings table, not the product itself. If a provider changes terms or pricing, I change a row.

The human gate is a feature, not a bug. The system deliberately stops short of autonomous publishing without review. Untrusted patterns pause. Low confidence pauses. QA uncertainty pauses. This is slower than full autonomy, and that is the point: the cost of a bad post is higher than the cost of one Telegram tap.

Autonomy is per-pattern, not global. Eleven learned topic patterns currently live in SQLite, and exactly one is trusted for auto-publish. That ratio is intentional. Trust is earned by evidence, not granted by configuration.

Bilingual output doubles the surface area. EN + PT-BR means two drafts, two QA passes, and two sets of frontmatter. The PT-BR version has to read like natural Brazilian developer prose, not a literal translation. That is a real editorial constraint, and it is why the human gate matters even more for the PT-BR side.

What “done” looks like

For this goal, “done” is not “the system publishes without me.” It is:

  • Every artifact — context, drafts, rendered media, QA results, publish records — is local and auditable.
  • Context routing is explicit and inspectable, not hidden in a prompt.
  • The human gate is the default, and autonomy is earned per topic pattern.
  • The same core produces both LinkedIn posts and sidequestlab.dev entries, in both languages.
  • The whole thing runs at roughly $0/month on hardware I already own.

What remains open: expanding the trusted pattern set with evidence rather than optimism, improving the PT-BR editorial quality without losing the informal tone, and making the QA layer catch more layout and claim risks before they reach the gate. The current state — 11 learned patterns, 1 trusted, 2 published posts tracked — is early, and that is fine. The goal was never to ship a SaaS. The goal was to own the pipeline.

That is what Porter & Odradek is for.

In this post
Written by Matheus Nunes PereiraSoftware Engineer. Distributed systems, real-time telemetry and software that talks to hardware. If you have a problem like that, let’s talk.Software Engineer

Distributed systems, real-time telemetry and software that talks to hardware. If you have a problem like that, let’s talk.