Skip to content

Commit 9b3a309

Browse files
Copilotmrjf
andauthored
Add agentic workflow recompile install instruction
Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
1 parent f398137 commit 9b3a309

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

@@ -89,7 +90,29 @@ gh aw compile autoloop
8990

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

92-
## Step 5: Create a Branch, Commit, and Open a Pull Request
93+
## Step 5: Add Agent Instructions
94+
95+
Add repository instructions so future coding agents recompile generated files after editing agentic workflows:
96+
97+
````bash
98+
cat >> AGENTS.md <<'EOF'
99+
100+
## Agentic Workflows
101+
102+
After modifying any `.md` workflow file under `.github/workflows/`, always recompile:
103+
104+
```bash
105+
gh aw compile
106+
apm compile
107+
```
108+
109+
Commit the regenerated `.lock.yml` and integration files together with your changes.
110+
EOF
111+
````
112+
113+
If your repository already uses `CLAUDE.md` or `COPILOT.md` instead of `AGENTS.md`, add the same instruction there too.
114+
115+
## Step 6: Create a Branch, Commit, and Open a Pull Request
93116

94117
Create a new branch for the installation changes, commit, and push:
95118

@@ -108,7 +131,7 @@ gh pr create --title "Install Autoloop" --body "Set up Autoloop workflows and co
108131

109132
Report the pull request link to the user.
110133

111-
## Step 6: Create Your First Program
134+
## Step 7: Create Your First Program
112135

113136
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.
114137

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)