Skip to content

docs(agents): document dogfood hook setup - #194

Open
gutierrezje wants to merge 1 commit into
mainfrom
docs/agents-dogfood-hook
Open

gutierrezje wants to merge 1 commit into
mainfrom
docs/agents-dogfood-hook

Conversation

@gutierrezje

@gutierrezje gutierrezje commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Issue

None. This is a small docs change, so the PR is its complete record.

Outcome

AGENTS.md stops telling agents to pnpm link --global a branch build. That command replaces the global diffowl binary that other projects use. A new Dogfooding section documents the safe setup instead: keep the released global install, and pin this repo's post-commit hook to a dedicated worktree detached at origin/main. Codex, Cursor, and Claude sessions all read AGENTS.md, so every agent sees the same rule.

Reviewer guide

  • Start with: the new ## Dogfooding section in AGENTS.md.
  • Then check: the replaced pnpm link --global command and the reworded Notes bullet. The old bullet assumed a linked global binary.
  • Risk: docs only. README.md "Develop locally" still shows pnpm link --global. That is reasonable for a new contributor who doesn't use DiffOwl elsewhere, so I left it alone.

Verification

  • pnpm run check:anti-slop and oxfmt --check AGENTS.md pass.
  • Confirmed that hook install pins the CLI that ran it, for the current repo only. It uses cli: fileURLToPath(import.meta.url) in src/git/hook-installation.ts.
  • Tried the documented setup on this machine. I built a dogfood worktree at origin/main (89a6be4, migration 008, matching the shared state.db) and installed the hook from it. Committing this change triggered an automatic Codex review through that build with no issues. Other projects' hooks still point at the global 0.5.2 install.
  • Full test suite: not run, because only docs changed.

Review dispositions

None.

Intentionally out of scope

  • README.md development instructions.
  • Any CLI support for a dogfood mode, such as a hook that resolves the newest build automatically.

Note

Low Risk
Documentation-only change to agent onboarding; no runtime or CLI behavior is modified.

Overview
AGENTS.md now steers agents away from pnpm link --global on branch builds and documents a Dogfooding workflow instead.

The Commands block tells contributors to run node dist/cli.js <command> for the current checkout. The new section says to keep a released global diffowl for other repos, use a dedicated worktree at origin/main to build and run hook install (which pins that CLI for this repo only), refresh that worktree after merges, and test unreleased migrations in a throwaway repo because worktrees share .git/hooks and .diffowl/state.db. The Notes bullet now says rebuilding is required before node dist/cli.js and that the global binary and dogfood hook do not pick up branch changes.

Reviewed by Cursor Bugbot for commit 5960c1d. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 08f261fe-a558-46a8-bf1f-6dfc8546874b
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant