Contentrain
AI agent playbook

Govern AI agents that create and edit product content

A practical operating model for giving AI coding agents content authority without giving them uncontrolled repository access.

Open Studio

Audience

AI-native product teams, platform teams, and founders using coding agents.

Outcome

Agents can inspect models, normalize strings, change content, validate work, and hand off reviewable branches without bypassing human approval.

Operating model

What the workflow needs to prove

Boundary

Start by limiting how agents operate

Do not ask agents to freely edit content files and source files. Give them MCP tools for status, scan, content save, validate, normalize, and branch submission so every operation has a known shape.

  • Use tool boundaries instead of prompt-only policy
  • Keep project context in the repository
  • Require validation before merge or delivery

Context

Make the content system readable before it is writable

Agents need models, vocabulary, content paths, field rules, locale strategy, and workflow rules before they can create useful content. Contentrain keeps those signals in files the agent can inspect.

  • Model definitions
  • Vocabulary and context files
  • Content quality and SEO rules

Review

Route important changes through human approval

The safe path is not automation or manual work. It is AI-assisted work that produces reviewable diffs, validation output, and branch state that a human can approve.

  • Branch review
  • Diff inspection
  • Studio reviewer roles

Implementation steps

Run the workflow in this order

1

Initialize Contentrain

Create the local content contract so agents can see models, context, and content state.

npx contentrain init
2

Run scan before extraction

Use scan summary, graph, and candidates to understand what text is in source files before approving content changes.

contentrain scan --mode summary
3

Extract before reuse

Write approved content entries first, then patch source code after review.

contentrain normalize extract
4

Validate before handoff

Run validation so schema, required fields, i18n parity, and structural issues are caught early.

contentrain validate
5

Move collaboration into Studio

Use Studio when non-developers, reviewers, roles, media, or delivery surfaces enter the workflow.

Checklist

Quality gates before handoff

Agent permissions

  • Define which tools the agent can call
  • Keep destructive changes out of default flows
  • Require validation output in handoff notes

Content quality

  • Use one H1 per page
  • Keep titles and meta descriptions unique
  • Add FAQs and extractable answer sections

Studio handoff

  • Assign editor and reviewer roles
  • Review branch health
  • Use media and CDN settings inside the same project

Common questions

Is MCP required for agent governance?

MCP is the cleanest interface because it gives agents bounded, repeatable tools instead of asking them to invent file operations.

Can agents still write content?

Yes. The point is to make writing content model-aware, validated, and reviewable.

Where does Studio fit?

Studio adds human review, roles, branch views, media, CDN, forms, webhooks, and team operations around the same content contract.

Start local. Scale to Studio.

Build a governed content layer before content becomes product debt.

Developers can start with the MIT packages. Teams can move into Studio when review, roles, delivery, and licensing matter.

Open Studio