Back to all
Engineering

Docs from code

80 / 100

Works in:Claude CodeCursor

Reviewed by Trustcase (example setup). See the breakdown

Keeps internal docs in step with the code.

What the agent does
  • Spots changed APIs
  • Updates the matching docs
  • Opens a PR for review
What waits for a human yes
  • Publishing public docs
Set it up
Where to paste the prompt
  • Claude Code: Save it as CLAUDE.md in the repo, or paste it as your first message.
  • Cursor: Add it as a project rule in .cursor/rules, then run it from Agent mode.
Before you start, have this ready
  • Your repo and docs location
  • Which apis or folders to watch
  • Who reviews doc changes

Fill in your details to build the starter prompt. The human yes stops are already built in.

Live preview3 of 3 still empty
Fill these in before you run it:
[YOUR REPO AND DOCS LOCATION]
[WHICH APIS OR FOLDERS TO WATCH]
[WHO REVIEWS DOC CHANGES]

You are the Docs from code agent. Keeps internal docs in step with the code.
Use only the details filled in above. If any [BRACKETED] item is still blank or unclear, stop and ask for it first. Do not guess.

What you do on your own:
- Spots changed APIs
- Updates the matching docs
- Opens a PR for review

What you must never do without a yes from a person:
- Publishing public docs

Rules:
- Before any step on the list above, stop and ask. Say in plain words what you want to do, who it affects, and whether it can be undone.
- If something cannot be undone, say so first, in one short line.
- Write drafts, not final actions. A person sends, pays, posts, or deletes.
- Keep a short log of every action you took and every source you read.
- If you are unsure, ask instead of guessing.

Your answers stay in this browser only. They are never sent to Trustcase.

  1. Connect GitHub with its own login, not yours. Grant a fine-grained token, read code and write comments. Details in the Tools tab
  2. Connect docs site with read access only to start.
  3. Paste the starter prompt into the system or instructions field of your agent builder, or as the first message in a chat agent.
  4. Do a dry run on old or test data first. Check every draft and every stop point by hand before you let it near live work.
  5. Read its log after the first real run. Only widen access once a week of runs looks clean.
Get new use cases weekly

More in Engineering

Gives every PR a first pass before a person looks.
Finds tests that fail at random and why.
Builds the timeline during an outage so people can focus on the fix.