Add weekly gh-aw workflow to keep AGENTS.md current#17066
Add weekly gh-aw workflow to keep AGENTS.md current#17066
Conversation
Agent-Logs-Url: https://github.com/DynamoDS/Dynamo/sessions/9131ce49-96a4-4649-8268-986df9e665e7 Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Agent-Logs-Url: https://github.com/DynamoDS/Dynamo/sessions/9131ce49-96a4-4649-8268-986df9e665e7 Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
Agent-Logs-Url: https://github.com/DynamoDS/Dynamo/sessions/9131ce49-96a4-4649-8268-986df9e665e7 Co-authored-by: QilongTang <3942418+QilongTang@users.noreply.github.com>
|
There was a problem hiding this comment.
Pull request overview
Adds a new Agentic Workflow (gh-aw) that runs weekly to keep AGENTS.md aligned with recent repository changes, with a compiled .lock.yml workflow artifact and git attributes to treat lock files as generated.
Changes:
- Added a weekly agentic workflow source file to reconcile/update
AGENTS.mdand open/update a maintenance PR. - Added the compiled workflow lock file that GitHub Actions will execute.
- Updated
.gitattributesto mark workflow lock files as generated and preferourson merges.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/weekly-update-agents-md.md |
Defines the agent’s mission/guardrails, tool access, and safe-output constraints for AGENTS.md maintenance. |
.github/workflows/weekly-update-agents-md.lock.yml |
Compiled workflow executed by GitHub Actions (jobs, permissions, safe-outputs plumbing, threat detection, etc.). |
.gitattributes |
Treats .github/workflows/*.lock.yml as generated and resolves merges using ours. |
| permissions: | ||
| contents: read | ||
| issues: read | ||
| pull-requests: read | ||
| actions: read |
There was a problem hiding this comment.
The source workflow frontmatter lists only read permissions, but the compiled .lock.yml requires contents/pull-requests/issues: write to open/update the maintenance PR. This is easy to miss when reviewing just the .md source and also contradicts the PR description’s “read-only repo permissions” claim. Please clarify this in the .md (e.g., document the write scopes used by the safe-outputs/conclusion jobs) so reviewers and maintainers have an accurate security picture.
| ## Mission | ||
|
|
||
| Every run, review changes since the previous successful run and keep `AGENTS.md` current. If updates are needed, commit only `AGENTS.md` and open or update a pull request. | ||
|
|
There was a problem hiding this comment.
This workflow relies on repository secrets/vars (at least COPILOT_GITHUB_TOKEN, plus the GH_AW_* tokens referenced in the compiled workflow) but the source .md doesn’t document prerequisites. Adding a short “Prerequisites” section listing required secrets/variables (and what they’re used for) will make setup/maintenance significantly easier and reduce first-run failures.
| ## Prerequisites | |
| Before enabling or running this workflow, ensure the repository is configured with the authentication values required by the Copilot/Actions runtime: | |
| - `COPILOT_GITHUB_TOKEN` repository secret: used by the Copilot workflow engine to authenticate GitHub API requests made while reviewing changes and preparing PR updates. | |
| - `GH_AW_*` repository variables/tokens referenced by the compiled workflow: used by the GitHub Actions workflow runtime for the authenticated automation steps that inspect workflow history, review repository state, and create or update the maintenance pull request. | |
| If these prerequisites are missing or misconfigured, scheduled and manual runs may fail before any `AGENTS.md` updates are produced. |
| 5. Validate the result: | ||
| - Confirm `AGENTS.md` remains internally consistent. | ||
| - Confirm no unrelated files are modified. | ||
|
|
||
| 6. Open or update PR: | ||
| - If no `AGENTS.md` changes are required, call `noop` with a short explanation. | ||
| - If changes are required: | ||
| - Reuse an existing open maintenance PR if one exists with title prefix `[agents-maintenance]` by pushing to its branch. | ||
| - Otherwise create a new PR. |
There was a problem hiding this comment.
The compiled workflow config sets the noop safe-output to report-as-issue: true, but this workflow’s process explicitly calls noop when no AGENTS.md changes are needed. That combination will likely open a new issue on every successful weekly no-change run, creating repo noise. Consider disabling issue reporting for noop (and reserving issues for error cases via missing-tool/missing-data/report-incomplete) and recompile the lock file.



This introduces an Agentic Workflow that runs weekly to reconcile
AGENTS.mdwith recently merged PRs and repository changes, then opens/updates a PR when drift is detected. The workflow is designed for low-touch maintenance with explicit file-scope guardrails.Workflow added: weekly AGENTS maintenance
.github/workflows/weekly-update-agents-md.mdschedule: weekly+workflow_dispatchAGENTS.mdif neededSafe output and change controls
create-pull-request,push-to-pull-request-branch,noop,missing-tool)AGENTS.mdvia:allowed-files: [AGENTS.md]protected-files: allowedTooling and runtime configuration
copilotdefault,actions) plus minimaledit/bashcommands for AGENTS diffing and inspectionCompiled workflow artifacts
.github/workflows/weekly-update-agents-md.lock.yml.gitattributesso lock files are treated as generated and merged withours:.github/workflows/*.lock.yml linguist-generated=true merge=ours