You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create a workflow that keeps the AGENTS.md file up to date.
1766
1766
1767
1767
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
+
1768
1775
```
1769
1776
1770
1777
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:
1822
1829
- Review merged pull requests since the last run
1823
1830
- Analyze the workflows you've added (daily-report, ci-coach, ci-doctor, continuous-test-updates)
1824
1831
- Update AGENTS.md with descriptions of these new workflows
1825
-
- Create a PR with the updated documentation
1826
1832
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**
1828
1836
1829
1837
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
+

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.
1834
1849
1835
1850
**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.
0 commit comments