From 1f4b3e840a860e576fd1bbb7c47c40d980afca41 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 3 Oct 2025 11:02:46 -0400 Subject: [PATCH 1/2] Instruct agents to create a repo root alias 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.) --- AGENTS.md | 11 ++++++++--- script/tool/README.md | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 5daf3b70aa6..7ce025b95a1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -40,10 +40,15 @@ The primary tool for this repository is `flutter_plugin_tools.dart`. ### Initial Setup -First, initialize the tooling: +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. +export REPO_ROOT=$(pwd) + +# Verify that the alias is working correctly. +echo "Repository root directory: $REPO_ROOT" + +dart pub get -C $REPO_ROOT/script/tool ``` ### Identifying Target Packages diff --git a/script/tool/README.md b/script/tool/README.md index daa81e3309e..754a03d74e7 100644 --- a/script/tool/README.md +++ b/script/tool/README.md @@ -8,7 +8,7 @@ local development. Set up: ```sh -cd script/tool && dart pub get && cd ../../ +dart pub get -C script/tool ``` Run: From 8051f864bbe4ba2d73427f72ab03d7ab05ef3d15 Mon Sep 17 00:00:00 2001 From: stuartmorgan-g Date: Fri, 3 Oct 2025 11:17:51 -0400 Subject: [PATCH 2/2] Change terminology --- AGENTS.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 7ce025b95a1..92d0f90a74b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -40,12 +40,12 @@ The primary tool for this repository is `flutter_plugin_tools.dart`. ### Initial Setup -First, define an alias for the repository root directory and initialize the tooling: +First, define an environment variable for the repository root directory and initialize the tooling: ```bash -# Define an alias for the repository root. +# Define an environment variable for the repository root. export REPO_ROOT=$(pwd) -# Verify that the alias is working correctly. +# Verify that the environment variable is working correctly. echo "Repository root directory: $REPO_ROOT" dart pub get -C $REPO_ROOT/script/tool