Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,55 @@ React on Rails demo app — a Rails application with React, Redux, Tailwind CSS,

- `prompts/`: shared prompt templates for Codex, GPT, and other non-Claude tools

## Build and Test Commands
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commands shown here (e.g. bundle exec rspec) are the bare forms, but the Conductor Compatibility section added below recommends wrapping them all with bin/conductor-exec. An agent reading sequentially could run these bare commands before reaching that guidance.

Consider adding a brief callout here, e.g.:

Suggested change
## Build and Test Commands
## Build and Test Commands
> **Conductor users:** prefix every command below with `bin/conductor-exec` — see [Conductor Compatibility](#conductor-compatibility).

Or alternatively, show the wrapped forms here and drop the duplication in the Conductor section.


```bash
# Run development server
bin/dev

# Run tests
bundle exec rspec
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prefix Bundler examples with conductor wrapper

The new build/test quick-reference shows running bundle exec commands directly, but this same document now says Bundler commands in non-interactive Conductor shells must go through bin/conductor-exec to avoid wrong tool versions. That inconsistency makes users likely to copy commands that fail with the version-mismatch symptoms described below (e.g., incompatible Ruby), so the examples should be wrapped or explicitly labeled as interactive-shell-only.

Useful? React with 👍 / 👎.


# Run linting
bundle exec rubocop

# Auto-fix linting issues
bundle exec rubocop -a
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commands here are shown without bin/conductor-exec, but the Working Rules section (line 28) says to run Ruby/Bundler/Node commands through that wrapper. An agent scanning only this block will run them bare — exactly the failure mode documented in the Conductor Compatibility section below.

Consider adding a note, e.g.:

In Conductor / non-interactive shells, prefix these with bin/conductor-exec (see Conductor Compatibility).

Or restructure so the wrapper examples in the Conductor section cover rspec and rubocop too.

Comment on lines +11 to +23
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The quick-reference commands contradict the Working Rule directly below them. bundle exec rspec, bundle exec rubocop, and bundle exec rubocop -a are exactly the kinds of Bundler commands that the Working Rules say must be prefixed with bin/conductor-exec. A developer reading only this section will copy-paste the unwrapped versions and hit the Conductor shell-environment problem the rest of the doc is trying to prevent.

Suggested change
```bash
# Run development server
bin/dev
# Run tests
bundle exec rspec
# Run linting
bundle exec rubocop
# Auto-fix linting issues
bundle exec rubocop -a
```
```bash
# Run development server
bin/dev
# Run tests
bin/conductor-exec bundle exec rspec
# Run linting
bin/conductor-exec bundle exec rubocop
# Auto-fix linting issues
bin/conductor-exec bundle exec rubocop -a


## Working Rules

- When the user asks to address PR review comments, follow `prompts/address-review.md`.
- Run Ruby, Bundler, Node, pnpm, and git hook-sensitive commands through `bin/conductor-exec` so non-interactive shells use the project tool versions.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"non-interactive shells" is generic — the section below clarifies this is specifically a Conductor issue. Tying the rule to Conductor here makes the bullet self-contained and matches the section heading just below.

Suggested change
- Run Ruby, Bundler, Node, pnpm, and git hook-sensitive commands through `bin/conductor-exec` so non-interactive shells use the project tool versions.
- Run Ruby, Bundler, Node, pnpm, and git hook-sensitive commands through `bin/conductor-exec` when running inside Conductor, so version-managed tools are used instead of system defaults.


## Conductor Compatibility

Conductor runs commands in a non-interactive shell that does not source `.zshrc`.
That means version manager shell hooks, such as mise PATH reordering from `.tool-versions`,
may not run. Commands can accidentally use system Ruby or Node instead of the project versions.

Symptoms include:

- `ruby --version` returns system Ruby instead of the project Ruby.
- Pre-commit hooks fail with the wrong tool versions.
- `bundle` commands fail due to incompatible Ruby versions.
- Node or pnpm commands use the wrong Node version.

Use the wrapper for commands that depend on project tool versions:

```bash
# Instead of:
ruby --version
bundle exec rubocop
pnpm install
git commit -m "message"

# Use:
bin/conductor-exec ruby --version
bin/conductor-exec bundle exec rubocop
bin/conductor-exec pnpm install
bin/conductor-exec git commit -m "message"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth adding the same inline comment that bin/conductor-exec itself uses — it explains the non-obvious reason you'd wrap a plain git commit:

Suggested change
bin/conductor-exec git commit -m "message"
bin/conductor-exec git commit -m "message" # Pre-commit hooks use the correct tool versions

```

The wrapper uses `mise exec` when mise is available and falls back to direct execution
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback is exec "$@" — plain direct execution — which also won't resolve correct tool versions for asdf/rbenv/nvm/nodenv users in a non-interactive shell. The current wording ("falls back to direct execution for non-mise users") implies it works for them, but they'll silently get system versions too.

Suggested change
The wrapper uses `mise exec` when mise is available and falls back to direct execution
The wrapper uses `mise exec` when mise is available. For non-mise users (asdf, rbenv,
nvm, nodenv), the fallback runs the command directly; those users may still need to
ensure their version manager is initialised in the shell environment.

for non-mise users.
Loading