Skip to content

Commit 438782f

Browse files
authored
Merge pull request #68 from githubnext/copilot/add-agents-md-recompile-instruction
Add install guidance to recompile agentic workflows
2 parents 41daa35 + 9b3a309 commit 438782f

3 files changed

Lines changed: 40 additions & 5 deletions

File tree

install.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ Set up Autoloop in this repository by:
1010
2. Initializing the repo for agentic workflows
1111
3. Copying the Autoloop workflow and configuration files
1212
4. Compiling the workflows
13-
5. Creating a branch, committing, and opening a pull request
14-
6. Helping create the first Autoloop program
13+
5. Adding agent instructions to keep generated workflow files fresh
14+
6. Creating a branch, committing, and opening a pull request
15+
7. Helping create the first Autoloop program
1516

1617
## Step 1: Install gh-aw CLI Extension
1718

@@ -117,7 +118,29 @@ gh aw compile autoloop
117118

118119
**What this does**: Generates `.github/workflows/autoloop.lock.yml` from the workflow definition.
119120

120-
## Step 5: Create a Branch, Commit, and Open a Pull Request
121+
## Step 5: Add Agent Instructions
122+
123+
Add repository instructions so future coding agents recompile generated files after editing agentic workflows:
124+
125+
````bash
126+
cat >> AGENTS.md <<'EOF'
127+
128+
## Agentic Workflows
129+
130+
After modifying any `.md` workflow file under `.github/workflows/`, always recompile:
131+
132+
```bash
133+
gh aw compile
134+
apm compile
135+
```
136+
137+
Commit the regenerated `.lock.yml` and integration files together with your changes.
138+
EOF
139+
````
140+
141+
If your repository already uses `CLAUDE.md` or `COPILOT.md` instead of `AGENTS.md`, add the same instruction there too.
142+
143+
## Step 6: Create a Branch, Commit, and Open a Pull Request
121144

122145
Create a new branch for the installation changes, commit, and push:
123146

@@ -136,7 +159,7 @@ gh pr create --title "Install Autoloop" --body "Set up Autoloop workflows and co
136159

137160
Report the pull request link to the user.
138161

139-
## Step 6: Create Your First Program
162+
## Step 7: Create Your First Program
140163

141164
Next, suggest to the user that we create their first program, which will be added to the existing PR. If they decline, we're done. Else, continue.
142165

tests/install-integration/prompt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Follow the install instructions at the URL below, EXACTLY AS WRITTEN. Execute
77
each step using shell commands. Do not skip steps. Do not improvise. Do not
88
optimize or "improve" the instructions.
99

10-
Stop after Step 5 (the install PR is opened). Do NOT proceed to Step 6
10+
Stop after Step 6 (the install PR is opened). Do NOT proceed to Step 7
1111
("Create Your First Program") -- the test harness handles program creation
1212
itself in a deterministic way.
1313

tests/install-integration/verify-phase1.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ require_file ".github/ISSUE_TEMPLATE/autoloop-program.md"
4949
# --- programs directory present (may be empty) ----------------------------
5050
require_dir ".autoloop/programs"
5151

52+
# --- repo-agent instructions remind agents to recompile generated files ----
53+
require_file "AGENTS.md"
54+
grep -F "After modifying any \`.md\` workflow file under \`.github/workflows/\`, always recompile:" AGENTS.md >/dev/null \
55+
|| fail "AGENTS.md missing agentic workflow recompile instruction"
56+
grep -F "gh aw compile" AGENTS.md >/dev/null \
57+
|| fail "AGENTS.md missing gh aw compile instruction"
58+
grep -F "apm compile" AGENTS.md >/dev/null \
59+
|| fail "AGENTS.md missing apm compile instruction"
60+
grep -F 'Commit the regenerated `.lock.yml` and integration files together with your changes.' AGENTS.md >/dev/null \
61+
|| fail "AGENTS.md missing regenerated files commit instruction"
62+
ok "AGENTS.md includes agentic workflow recompile instructions"
63+
5264
# --- lock idempotency: re-running compile must not change the lock file --
5365
LOCK=".github/workflows/autoloop.lock.yml"
5466
sha256() { shasum -a 256 "$1" | awk '{print $1}'; }

0 commit comments

Comments
 (0)