Skip to content

Commit b280843

Browse files
Instruct agents to create a repo root alias (#10165)
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.)
1 parent 617d1b2 commit b280843

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

AGENTS.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,15 @@ The primary tool for this repository is `flutter_plugin_tools.dart`.
4040

4141
### Initial Setup
4242

43-
First, initialize the tooling:
43+
First, define an environment variable for the repository root directory and initialize the tooling:
4444
```bash
45-
cd $REPO_ROOT/script/tool # $REPO_ROOT is the repository root
46-
dart pub get
45+
# Define an environment variable for the repository root.
46+
export REPO_ROOT=$(pwd)
47+
48+
# Verify that the environment variable is working correctly.
49+
echo "Repository root directory: $REPO_ROOT"
50+
51+
dart pub get -C $REPO_ROOT/script/tool
4752
```
4853

4954
### Identifying Target Packages

script/tool/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ local development.
88
Set up:
99

1010
```sh
11-
cd script/tool && dart pub get && cd ../../
11+
dart pub get -C script/tool
1212
```
1313

1414
Run:

0 commit comments

Comments
 (0)