Codex setup in new worktree

Chosen: Option A for uncommitted changes — Commit current changes on your branch first, then create the worktree from that branch so the new branch includes those commits.

Steps

1. Commit current changes (Option A)

In the current workspace (main repo):

  • Stage and commit all East US 2 / doc changes (vault, playbook, document-council, auto-label, .env.example, etc.).
  • Use a clear commit message per commit-messages.mdc, e.g. docs: East US 2 only policy and deprecate East US (AI-XXX) if you have a Linear ticket.

2. Create the worktree

From repo root:

git worktree add ../brainforge-platform-codex codex-eastus2-setup
  • Branch: codex-eastus2-setup (created from current HEAD, so it will include the commit you just made).
  • Path: ../brainforge-platform-codex.

3. Open worktree and do Codex setup

  • Open ../brainforge-platform-codex in Cursor (File → Open Folder).
  • In that worktree, implement:
    • .codex/ at repo root: Option B setup script (root npm install + cd apps/platform && npm ci --legacy-peer-deps), optionally scripts/codex-setup.sh; add .codex/README.md if the setup script is configured via Codex app Settings.
    • .codex/config.toml (optional): Azure East US 2 provider, default model gpt-5.2-codex, approval/sandbox.
    • standards/03-knowledge/engineering/setup/codex-setup.md: Codex app/CLI/IDE, auth, East US 2, Local Environments, optional Compliance/Analytics keys; link from setup README.
    • Optional: Cursor rule pointing to codex-setup.md.
  • Commit in the worktree, push branch, open PR with description and Linear ID in title if applicable.

Summary

  1. Commit current East US 2 / doc changes in the main repo.
  2. Create worktree ../brainforge-platform-codex on branch codex-eastus2-setup (from current branch).
  3. Open worktree in Cursor and add Codex setup (.codex/, playbook doc, optional rule); commit, push, open PR.