How we handle GDPR data-subject requests on a deadline
Legal
The docs agent we run on Kortix — connected to GitHub and our codebase. Once a day it checks the code that landed since its last run and updates the docs those changes affected, opening a PR for review.

Documentation tends to fall behind the code. The README, the setup guide, the API reference, and architecture notes drift a release or two back while the code keeps changing. The person who changes the code is usually not the person who owns the page it affects, so the two rarely get updated together. A renamed environment variable, a new setup step, or a removed endpoint is a small code change and a docs change that often goes unmade.
We handle this by running a docs sweep close to when the code changes: once a day, over everything that merged since the last run. This writes up how we run that on Kortix — the connections, the steps, and the guardrails — so you can set up the same thing for your own repo.
The common fixes each have limits. "Docs are part of the PR" tends to get cut under deadline. A scheduled audit finds drift late and in bulk, when reconstructing what changed is hardest. And a generic AI writer pointed at the docs produces prose that doesn't match the code, because it never reads the code.
We wanted the docs we already have to stay accurate to the code, updated on each merge rather than in periodic cleanups.
On Kortix, a docs agent runs once a day in the same persistent session — a cloud sandbox — with scoped access to what a docs update needs: the commits that landed since its last run, the codebase for context, and the docs. It picks up from a checkpoint it kept from the previous run, determines what changed, rewrites the affected pages, and opens a single docs PR for review. Nothing publishes without a human merge.
Open your Kortix workspace, start a new session, paste this prompt and send it. The agent writes the agent file, the docs sync skill and the daily trigger, and opens a change request for you to review. Prefer clicks? Choose Use this template instead.
Set up a daily docs maintainer agent in this workspace.
Create the agent agents/docs-maintainer.md. Its job is to keep the docs in owner/repo accurate to the code. It may use the GitHub connector and open pull requests.
Create the skill skills/docs-sync/SKILL.md with these rules:
Add a cron trigger daily-docs-sync to kortix.yaml. It runs the docs-maintainer agent every day at 06:00 with the prompt "Load the docs-sync skill and run one docs sync pass on owner/repo."
Tell me which of these connectors are not connected yet.
Open a change request with all of it. Do not merge it.
Open Connectors in your workspace and connect GitHub. Credentials are brokered server-side and never enter the agent's machine.
Add a GitHub token as the GH_TOKEN secret so the agent can open the pull
request.
Reads new commits and opens one PR with the doc updates.
Publishes the docs once a person merges the PR.
Merge the change request, then start a session with the docs-maintainer agent and send this prompt. Read the pull request before you let the schedule take over.
Run one docs sync pass on owner/repo.
The change request added this trigger to kortix.yaml. From now on the agent
runs every day at 06:00, each run in a new session on its own cloud computer.
The checkpoint in memory tells each run where the last one stopped.
To change the time, edit the cron line, or open Triggers in the workspace.
triggers:- slug: daily-docs-sync name: Daily docs sync on: cron: "0 0 6 * * *" run: agent: docs-maintainer prompt: Load the docs-sync skill and run one docs sync pass on owner/repo.The agent edits only files under the docs path and README files. The rest of the code is read-only to it. When the code itself looks wrong, it logs the problem for a person instead of changing it. A person reviews the pull request and merges it.
Each run ends with one docs pull request, or none when nothing drifted. This is what a run looks like in the session:
Read 9 commits since the last checkpoint. 3 changed documented behavior: a renamed env var, a new API endpoint and a removed CLI flag. Updated 4 pages in one pull request, and the checkpoint moved to the newest commit.
Once it works, paste any of these into the same session.
When a commit adds a public endpoint or command with no doc page, draft a new page for it in the same pull request.
Run every code sample in the pages you change, and fix the sample when its output no longer matches the text.
Every Friday, list the doc pages that have not changed in 6 months but describe code that changed since then.
Giving an agent write access to documentation is a trust question. The relevant controls on Kortix:
The backlog of "someone should update the README" changes now arrives as small, reviewable PRs within a day of the code landing, with the reasoning written down. The team reviews a diff instead of reconstructing months of drift, and readers stop hitting instructions that are no longer accurate.
The setup relies on four pieces working together: sandbox isolation for the daily session, a secrets manager to broker the GitHub token, a PR gate on every change, and a durable checkpoint that carries the sweep forward run to run.