Skip to content

Commit 15f3c24

Browse files
author
UncleBats
committed
update agent.md protected file process
1 parent db0a79e commit 15f3c24

2 files changed

Lines changed: 21 additions & 6 deletions

File tree

57.2 KB
Loading

docs/workshop/participant-handout.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,6 +1765,13 @@ git checkout -b workflow/agents-md-maintenance
17651765
create a workflow that keeps the AGENTS.md file up to date.
17661766
17671767
It should run weekly, review merged pull requests and updated source files since the last run, then open a pull request that keeps AGENTS.md accurate and current.
1768+
1769+
make sure to allow the agents.md file, as it is an a protected file
1770+
---
1771+
allowed-files: ["AGENTS.md"]
1772+
protected-files: fallback-to-issue
1773+
---
1774+
17681775
```
17691776

17701777
When copilot asks to get some web reference choose allow. Same goes if it wants to compile the workflow.
@@ -1822,15 +1829,23 @@ The workflow will:
18221829
- Review merged pull requests since the last run
18231830
- Analyze the workflows you've added (daily-report, ci-coach, ci-doctor, continuous-test-updates)
18241831
- Update AGENTS.md with descriptions of these new workflows
1825-
- Create a PR with the updated documentation
18261832

1827-
**Step 6: Review the generated documentation**
1833+
Because `AGENTS.md` is a **protected file** (we configured `protected-files: fallback-to-issue` in the workflow), the agent **cannot directly create a PR** that modifies it. Instead, it falls back to creating an **issue** with the proposed changes.
1834+
1835+
**Step 6: Review the generated issue and create the PR**
18281836

18291837
After the workflow completes:
1830-
1. Check for a new PR titled something like "Update AGENTS.md documentation"
1831-
2. Review how the workflow documented your recent changes
1832-
3. Notice it understands the purpose and context of each workflow you added
1833-
4. Merge the PR to keep your documentation current
1838+
1. Check your repository's **Issues** tab for a new issue created by the workflow
1839+
2. The issue will contain the proposed AGENTS.md updates — a summary of the workflows you've added and how the file should be updated
1840+
3. At the bottom of the issue, click the **link to create a PR** from the issue content
1841+
1842+
![Create PR from issue](images/pr-from-issue.png)
1843+
1844+
4. Review the PR with the proposed AGENTS.md changes
1845+
5. Notice how the workflow documented your recent changes — it understands the purpose and context of each workflow you added
1846+
6. **Merge the PR** to update AGENTS.md
1847+
1848+
> **💡 Why protected files matter:** This is the `fallback-to-issue` pattern in action. By marking `AGENTS.md` as a protected file, you ensure a human always reviews changes to critical documentation before they're merged. The workflow does the analysis work; you make the final call.
18341849

18351850
**Key Insight:** The best automation is automation you actually create. By putting the agent directly in your development environment, you remove friction from the workflow creation process. When it's easy to automate, you automate more. This makes the repository agent the most practical method for ongoing workflow development.
18361851

0 commit comments

Comments
 (0)