vibeapp.win

How it works

A marketing agent may suggest, but a suggestion may never become a draft

On 19 November the engine behind this site started sending its numbers to a marketing agent every hour and reading the agent's proposals back. The design keeps every proposal out of the autopilot's queue: unknown numbers are null with a reason, files are validated strictly, and "published" is reported only when we can trace it.

On 19 November 2026 the engine that writes and publishes this site got a new connection. Every hour it writes a file of numbers for a marketing agent. The agent can write proposals back, and the engine reads them. Henning set the terms: the agent reads the numbers and suggests, and the app publishes only what Henning approves. Claude wrote the code, the tests and the docs in one commit.

Moving files between two programs is the easy part. The interesting part is the rules that stop a suggestion from becoming a published post without anyone noticing.

The numbers go out: unknown is null, never 0

The export is a JSON file. The engine writes it 30 seconds after startup and then once an hour. It contains:

  • visits to www.vibeapp.win from Cloudflare Web Analytics for the last 7 and 30 days, plus the previous 7 days (calculated as the 14-day total minus the last 7)
  • the pages with the most unique visits
  • posts published from the repository
  • Instagram posts, their links and their lifetime insights
  • the queue: how many items wait for approval and how many are scheduled

The export uses the same functions as the admin pages. Visits come from the same call as the operations page, and the queue figures come from the same functions as the inbox. The agent sees the same numbers Henning sees.

The main rule is that a number we do not have is null, and a mangler (“missing”) field next to it says why. It is never 0. A 0 tells the agent nothing happened. A null with a reason tells it we don’t know. An agent that plans from a fake 0 will reach the wrong conclusion and sound sure about it.

Instagram showed why this matters. Its API gives lifetime insights per post, not per week. The export needs a weekly figure, so it adds up the lifetime numbers for posts from the last seven days, and mangler says so. The session notes give the reason: this is better than pretending it is a real weekly figure.

Proposals come in: validated strictly

Each proposal is its own JSON file in an inbox folder, named after the proposal’s id. The engine checks for new files every ten minutes and handles at most 20 per run. A file can be at most 512 KB, and the same limit applies to files the engine writes.

The code comment says how the engine treats the content: proposal text is model output, not instructions. Validation is strict. A proposal is rejected (avvist, with a reason written back) if it has:

  • fields the contract doesn’t define
  • text that is too long
  • control characters
  • an address that isn’t https
  • an id that doesn’t match the file name
  • a channel we don’t publish to

A valid proposal is stored on the engine’s side, and the agent gets a mottatt (“received”) answer with a link to the inbox. Both valid and rejected files then move to a processed folder, so nothing gets read twice.

One edge case got its own rule. If the file name itself is invalid, the engine moves the file away and writes no answer, because the answer file would have needed that same name.

A proposal is an idea, never a draft

This is the decision the whole design depends on. Proposals appear on the inbox page in their own section, “Forslag fra Marked” (proposals from Marketing). Each one has two buttons: “keep as idea” and “discard”. Discarding sends forkastet (“discarded”) back to the agent.

The obvious option was to turn a proposal into a draft in the queue. We considered it and dropped it, and the session notes give two reasons:

  1. The autopilot. Since October the autopilot marks every draft in the queue green and schedules it. A proposal placed there could reach the public site without Henning ever seeing it. The marketing agent would end up as a publisher with nobody reviewing what it sends.
  2. Sources. A post on this site needs sources in commits, and the fact gate checks them. A proposal has none.

So a kept proposal stays an idea. If Henning wants to act on it, he makes a post the normal way, through the same tools as any other post, and it goes through the same gates.

Two more rules keep the proposal text away from anything that acts on it:

  • On the inbox page the text is HTML-escaped. It is shown as text and never rendered as markup.
  • The text is never sent to the model. The code comment lists what it must never be passed to: the model call, git and the publisher.

A test enforces this. It checks that none of the modules that publish, schedule or call the model import the proposals, and that the proposal module itself imports only read functions. If a later change wires proposals into the publishing path, the test fails.

If the proposals can’t be read, the inbox shows an error message in place of the section, and the rest of the page still loads.

“Published” only when we can trace it

The agent learns what happened to its proposals: received, rejected, discarded, or published. “Published” carries the most weight, so it has the strictest rule. The engine writes publisert only when all of these are true:

  • the proposal points to one of our own posts, by that post’s address on this site
  • that post went out on the channel the proposal named (Instagram or the site)
  • it went out after Henning kept the idea

If a post on the same topic appears with no traceable link to the proposal, the agent gets no credit for it. This follows the same reasoning as null over 0: the agent should learn from what we can show, not from what we guess.

What else came with it

CI arrived in the same commit: tests, a dependency audit and a gitleaks secret scan, running on our own runner. Gitleaks flagged one value in a test file. It was a made-up value used to test the leak gate, not a real key. It was reviewed, marked in the code and listed in an ignore file with a note on why. Dependabot now covers the CI workflow’s actions as well.

Status

At the time of the commit the exchange had not been tried in the running container. The notes say what to check after the next start from Portal: the numbers file should appear in the shared folder, and the log should not report that the exchange is off. If the exchange folder isn’t configured, the exchange stays off and says so in the log at startup.

The rule underneath all of this: the agent gets our numbers as they are, gaps included, and what it sends back can reach the public only through a person.