Docs / Repo-prep PR flow

Repo-prep PRs make workspace setup reviewable.

EnvForge starts by reading the repository, then opens a small envforge.yml setup PR. The PR is the place to review commands, ports, inputs, dev routes, runtime defaults, and checks before any branch workspace depends on them.

repo prepreview first

$envforge repo connect

repo: github.com/acme/scheduler

detected: npm, Vite web, Backend /api

$envforge prepare-pr

PR opened: add envforge.yml workspace contract

Flow

Prepare the repo before the first runtime wakes.

The setup PR is deliberately small. It names the workspace contract in code review so the first envforge up uses a shared, approved shape instead of a one-off operator note.

  1. Discoverenvforge repo connect

    Read the repo before writing config

    Detect the package manager, service command, ports, test entry points, and obvious resource inputs before opening a setup PR.

  2. Draftenvforge prepare-pr

    Open one focused envforge.yml PR

    Keep the diff reviewable: service commands, ports, inputs, dev routes, runtime defaults, and first-run checks in the repo that owns them.

  3. Reviewrepo owner review

    Approve the workspace contract

    Repo owners review the same contract branch workspaces will use, including how the service receives URLs, resources, and dev traffic.

  4. Runenvforge up <branch>

    Branch workspaces inherit the PR

    After merge, developers and agents attach to the reviewed workspace shape instead of rebuilding local setup from memory.

Review surface

Review the contract before branch workspaces depend on it.

The PR should read like an application contract, not cloud wiring. Repo owners should be able to check the service command, resource inputs, dev routing, smoke command, runtime size, and idle sleep behavior without seeing raw VM hostnames or cloud credentials.

envforge.ymlsetup PR
version: 1
service:
  name: Web
  command: npm run dev
  port: 5173
  inputs:
    api_url:
      required: true
  environment:
    VITE_API_URL:
      from: input.api_url
resources:
  postgres:
    mode: branch_scoped
preview:
  routes:
    - web
    - /api
runtime:
  size: Small
  sleep: idle
checks:
  smoke: npm test

Acceptance

A repo-prep PR is ready when review can answer these checks.

Keep setup review focused on what future workspaces will actually run and expose. Anything private stays behind authenticated workspace access or control-plane secret handling.

  • The PR is one repo-scoped envforge.yml change, not a generated cloud dump.
  • Service commands, ports, checks, and runtime defaults are visible enough for repo owners to verify.
  • Inputs name contracts like API_URL or DATABASE_URL instead of embedding shared secrets.
  • Dev routes call out web and same-origin /api without exposing SSH, logs, secrets, or runtime admin.
  • Runtime defaults name size and idle sleep so awake-only billing behavior is reviewable before use.