ProcLens uses an agentic GitHub Actions workflow to keep documentation aligned with implementation changes.
The workflow:
- Monitors repository changes when pull requests are closed into main
- Maps code/process changes to the correct docs files
- Opens a pull request with documentation updates when needed
- Skips self-trigger loops from github-actions[bot] and Copilot actors/authors
This is intentionally high-level. Detailed behavior and policy live in the workflow source file:
.github/workflows/update-docs-agent.md
Use this model:
- Author/edit workflow logic in
.github/workflows/update-docs-agent.md - Treat
.github/workflows/update-docs-agent.lock.ymlas generated output
Do not hand-edit the lock file unless absolutely necessary for emergency triage.
-
Edit the source workflow:
.github/workflows/update-docs-agent.md -
Apply your policy/trigger/tooling changes (for example: triggers, safe outputs, PR behavior, guard conditions).
-
Compile the workflow to regenerate the lock file.
From repository root:
gh aw compile update-docs-agentThis updates:
.github/workflows/update-docs-agent.lock.yml
Optional compile checks:
gh aw compile update-docs-agent --validate
gh aw compile update-docs-agent --actionlintRun compile and inspect the generated lock file for expected trigger/guard/output behavior.
Useful checks:
gh aw compile update-docs-agent
git diff -- .github/workflows/update-docs-agent.md .github/workflows/update-docs-agent.lock.ymlValidate expected event behavior in Actions:
- Automatic run on pull_request closed targeting main
- No automatic run on push
- No run when actor or PR author is github-actions[bot] or Copilot
A practical test sequence:
- Open a test PR against main
- Merge/close it
- Confirm workflow execution in Actions
- Confirm resulting documentation PR behavior and labels
Ensure workflow output policy is still enforced:
- PR creation path is allowed
- Protected files/path prefixes remain respected
- Unexpected writes fall back to issue/no-op handling as configured
- Keep workflow description aligned with real trigger behavior.
- When changing workflow behavior, update this document if operational steps change.
- Prefer small policy changes and recompile immediately to avoid source/generated drift.