Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions install.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ Set up Autoloop in this repository by:
2. Initializing the repo for agentic workflows
3. Copying the Autoloop workflow and configuration files
4. Compiling the workflows
5. Creating a branch, committing, and opening a pull request
6. Helping create the first Autoloop program
5. Adding agent instructions to keep generated workflow files fresh
6. Creating a branch, committing, and opening a pull request
7. Helping create the first Autoloop program

## Step 1: Install gh-aw CLI Extension

Expand Down Expand Up @@ -89,7 +90,29 @@ gh aw compile autoloop

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

## Step 5: Create a Branch, Commit, and Open a Pull Request
## Step 5: Add Agent Instructions

Add repository instructions so future coding agents recompile generated files after editing agentic workflows:

````bash
cat >> AGENTS.md <<'EOF'

## Agentic Workflows

After modifying any `.md` workflow file under `.github/workflows/`, always recompile:

```bash
gh aw compile
apm compile
```

Commit the regenerated `.lock.yml` and integration files together with your changes.
EOF
````

If your repository already uses `CLAUDE.md` or `COPILOT.md` instead of `AGENTS.md`, add the same instruction there too.

## Step 6: Create a Branch, Commit, and Open a Pull Request

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

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

Report the pull request link to the user.

## Step 6: Create Your First Program
## Step 7: Create Your First Program

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.

Expand Down
2 changes: 1 addition & 1 deletion tests/install-integration/prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Follow the install instructions at the URL below, EXACTLY AS WRITTEN. Execute
each step using shell commands. Do not skip steps. Do not improvise. Do not
optimize or "improve" the instructions.

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

Expand Down
12 changes: 12 additions & 0 deletions tests/install-integration/verify-phase1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ require_file ".github/ISSUE_TEMPLATE/autoloop-program.md"
# --- programs directory present (may be empty) ----------------------------
require_dir ".autoloop/programs"

# --- repo-agent instructions remind agents to recompile generated files ----
require_file "AGENTS.md"
grep -F "After modifying any \`.md\` workflow file under \`.github/workflows/\`, always recompile:" AGENTS.md >/dev/null \
|| fail "AGENTS.md missing agentic workflow recompile instruction"
grep -F "gh aw compile" AGENTS.md >/dev/null \
|| fail "AGENTS.md missing gh aw compile instruction"
grep -F "apm compile" AGENTS.md >/dev/null \
|| fail "AGENTS.md missing apm compile instruction"
grep -F 'Commit the regenerated `.lock.yml` and integration files together with your changes.' AGENTS.md >/dev/null \
|| fail "AGENTS.md missing regenerated files commit instruction"
ok "AGENTS.md includes agentic workflow recompile instructions"

# --- lock idempotency: re-running compile must not change the lock file --
LOCK=".github/workflows/autoloop.lock.yml"
sha256() { shasum -a 256 "$1" | awk '{print $1}'; }
Expand Down
Loading