PagieraDocs Back to website

docs / agents

Coding agent guide

The integration contract for agents building editable sites.

Objective

Build pages as native Pagiera documents so a human can open, edit, preview and publish them after the coding agent finishes. Do not replace the requested editable page with a separate hardcoded React page.

Integration sequence

  1. Inspect the application’s existing authentication, routing and styling conventions.
  2. Install Pagiera and import the editor stylesheet.
  3. Configure PostgreSQL and Redis with server-only environment variables.
  4. Mount the catch-all backend route.
  5. Add a protected studio route and server bootstrap.
  6. Create or import native page documents.
  7. Verify save, preview and publish separately.

Preserve editability

Use native elements, components, variants and linked layouts. Put shared navigation and footers in a layout with a children placeholder. Use Request and Repeat blocks for data rather than hiding fetch logic in an unrelated client component.

Verification contract

  • The editor opens behind authentication.
  • The page document can be selected and changed visually.
  • Saving does not silently publish.
  • Preview renders the current draft.
  • Publishing updates the public page.
  • Essential dynamic content exists in server-rendered HTML.
  • No secret is exposed to the browser.

Report the result

State which files were changed, which environment variables are required, where the editor route lives and how the user can preview and publish. Report any unverified external dependency explicitly.