Context
Part of the repo-specific CLAUDE.md/AGENT.md generation roadmap. Once generation exists and is config-gated, it needs a way to actually run periodically, and a way for an operator to trigger it on demand, so repos stay current without a maintainer remembering to invoke it manually. The self-host stack already has scheduled-job infrastructure (src/selfhost patterns used elsewhere for maintenance and admission work); this issue reuses that rather than introducing a second scheduler.
Goal
Add a scheduled job (default weekly, operator-configurable interval) plus a manual/on-demand trigger that re-run generation and open a fresh PR only when the proposed content meaningfully changed.
Requirements
- Reuse the self-host stack's existing scheduled-job/cron pattern rather than a bespoke timer.
- Interval is operator-configurable per repo (or globally with a per-repo override), consistent with how other self-host scheduled behaviors are configured.
- Manual/on-demand trigger exposed via CLI and/or an MCP tool, matching how other maintainer-facing operations in this engine are already exposed.
- Before opening a new PR, diff the freshly generated content against the current state of the target file(s) and skip opening a PR when there is no meaningful change -- avoid PR spam on a stable repo.
- Refresh runs respect the same config-as-code enable/scope/exclusion surface as the on-demand path -- no separate code path with different eligibility rules.
Deliverables
Expected outcomes
- A repo with generation enabled receives an updated PR only when the underlying codebase has drifted enough to change the generated content
- An operator can force an immediate refresh for a single repo without waiting for the scheduled interval
Part of the repo-doc generation roadmap: #2993
Context
Part of the repo-specific CLAUDE.md/AGENT.md generation roadmap. Once generation exists and is config-gated, it needs a way to actually run periodically, and a way for an operator to trigger it on demand, so repos stay current without a maintainer remembering to invoke it manually. The self-host stack already has scheduled-job infrastructure (src/selfhost patterns used elsewhere for maintenance and admission work); this issue reuses that rather than introducing a second scheduler.
Goal
Add a scheduled job (default weekly, operator-configurable interval) plus a manual/on-demand trigger that re-run generation and open a fresh PR only when the proposed content meaningfully changed.
Requirements
Deliverables
Expected outcomes
Part of the repo-doc generation roadmap: #2993