Instruct agents to create a repo root alias#10165
Instruct agents to create a repo root alias#10165auto-submit[bot] merged 2 commits intoflutter:mainfrom
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.
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.
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.
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 [email protected] Roll Flutter from 5c0c9e9 to 908012d (18 revisions) (flutter/packages#10175) 2025-10-03 [email protected] Manual roll Flutter from 65aca36 to 5c0c9e9 (16 revisions) (flutter/packages#10170) 2025-10-03 [email protected] Instruct agents to create a repo root alias (flutter/packages#10165) 2025-10-03 [email protected] [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 [email protected] 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
flutter/packages@e401aeb...d3ef88b 2025-10-06 [email protected] Roll Flutter from 5c0c9e9 to 908012d (18 revisions) (flutter/packages#10175) 2025-10-03 [email protected] Manual roll Flutter from 65aca36 to 5c0c9e9 (16 revisions) (flutter/packages#10170) 2025-10-03 [email protected] Instruct agents to create a repo root alias (flutter/packages#10165) 2025-10-03 [email protected] [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 [email protected] 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
flutter/packages@e401aeb...d3ef88b 2025-10-06 [email protected] Roll Flutter from 5c0c9e9 to 908012d (18 revisions) (flutter/packages#10175) 2025-10-03 [email protected] Manual roll Flutter from 65aca36 to 5c0c9e9 (16 revisions) (flutter/packages#10170) 2025-10-03 [email protected] Instruct agents to create a repo root alias (flutter/packages#10165) 2025-10-03 [email protected] [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 [email protected] 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
flutter/packages@e401aeb...d3ef88b 2025-10-06 [email protected] Roll Flutter from 5c0c9e9 to 908012d (18 revisions) (flutter/packages#10175) 2025-10-03 [email protected] Manual roll Flutter from 65aca36 to 5c0c9e9 (16 revisions) (flutter/packages#10170) 2025-10-03 [email protected] Instruct agents to create a repo root alias (flutter/packages#10165) 2025-10-03 [email protected] [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 [email protected] 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 -Cinstead ofcdfollowed bydart pub getfor initializing the tooling. (Also makes the same change to the tool README, because why not have humans run one command instead of three.)