-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Instruct agents to create a repo root alias #10165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instruct agents to create a repo root alias #10165
Conversation
In my trials so far, Jules struggles to run the repo tooling commands once it has moved into a target directory, because it frequently tries to use a root-relative path instead of an absolute path. To try to reduce that problem, this instructs the agent to explicitly create an alias so that the later commands that reference REPO_ROOT as a placeholder will, hopefully, be run exactly as written in the examples instead. Also, to reduce unnecessary working directory confusion, switch to `dart pub get -C` instead of `cd` followed by `dart pub get` for initializing the tooling. (Also makes the same change to the tool README, because why not have humans run one command instead of three.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates setup instructions in AGENTS.md
and script/tool/README.md
. It introduces a command to define a REPO_ROOT
environment variable in AGENTS.md
. It also replaces a multi-command sequence involving cd
and dart pub get
with a single dart pub get -C
command in both files. I have provided one comment to suggest a terminology clarification in the documentation for accuracy.
AGENTS.md
Outdated
First, define an alias for the repository root directory and initialize the tooling: | ||
```bash | ||
cd $REPO_ROOT/script/tool # $REPO_ROOT is the repository root | ||
dart pub get | ||
# Define an alias for the repository root. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For improved accuracy, it's better to call REPO_ROOT
an 'environment variable' instead of an 'alias'. In shell scripting, an alias is a shortcut for a command, whereas export
creates an environment variable that holds a value. This change updates the terminology in both the description and the code comment for correctness.
First, define an alias for the repository root directory and initialize the tooling: | |
```bash | |
cd $REPO_ROOT/script/tool # $REPO_ROOT is the repository root | |
dart pub get | |
# Define an alias for the repository root. | |
First, define an environment variable for the repository root directory and initialize the tooling: | |
```bash | |
# Define an environment variable for the repository root. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Entertainingly, the use of "alias" came from Gemini in the first place 🤷🏻 I left it alone before because it was a Gemini suggestion, so I was trusting the model, but it seems like maybe it was a quirk of my prompt rather than a model preference so I've changed it to be accurate.
flutter/packages@e401aeb...d3ef88b 2025-10-06 engine-flutter-autoroll@skia.org Roll Flutter from 5c0c9e9 to 908012d (18 revisions) (flutter/packages#10175) 2025-10-03 engine-flutter-autoroll@skia.org Manual roll Flutter from 65aca36 to 5c0c9e9 (16 revisions) (flutter/packages#10170) 2025-10-03 stuartmorgan@google.com Instruct agents to create a repo root alias (flutter/packages#10165) 2025-10-03 jessiewong401@gmail.com [Gradle 9] Fixed Gradle 9 Deprecations in Packages (flutter/packages#10016) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#176582) flutter/packages@e401aeb...d3ef88b 2025-10-06 engine-flutter-autoroll@skia.org Roll Flutter from 5c0c9e9 to 908012d (18 revisions) (flutter/packages#10175) 2025-10-03 engine-flutter-autoroll@skia.org Manual roll Flutter from 65aca36 to 5c0c9e9 (16 revisions) (flutter/packages#10170) 2025-10-03 stuartmorgan@google.com Instruct agents to create a repo root alias (flutter/packages#10165) 2025-10-03 jessiewong401@gmail.com [Gradle 9] Fixed Gradle 9 Deprecations in Packages (flutter/packages#10016) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#176582) flutter/packages@e401aeb...d3ef88b 2025-10-06 engine-flutter-autoroll@skia.org Roll Flutter from 5c0c9e9 to 908012d (18 revisions) (flutter/packages#10175) 2025-10-03 engine-flutter-autoroll@skia.org Manual roll Flutter from 65aca36 to 5c0c9e9 (16 revisions) (flutter/packages#10170) 2025-10-03 stuartmorgan@google.com Instruct agents to create a repo root alias (flutter/packages#10165) 2025-10-03 jessiewong401@gmail.com [Gradle 9] Fixed Gradle 9 Deprecations in Packages (flutter/packages#10016) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
In my trials so far, Jules struggles to run the repo tooling commands once it has moved into a target directory, because it frequently tries to use a root-relative path instead of an absolute path. To try to reduce that problem, this instructs the agent to explicitly create an alias so that the later commands that reference REPO_ROOT as a placeholder will, hopefully, be run exactly as written in the examples instead.
Also, to reduce unnecessary working directory confusion, switch to
dart pub get -C
instead ofcd
followed bydart pub get
for initializing the tooling. (Also makes the same change to the tool README, because why not have humans run one command instead of three.)