Repository navigation
Closed
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Description
Story
As a org-standards maintainer,
I want document the off-peak-minute scheduling convention (plus the idempotent-sweep higher-frequency guidance) as a repo-local standard and add a CI check that flags any new minute-0 scheduled cron,
so that the convention is enforced for future workflow edits instead of relying on memory, and is staged for promotion into the org-wide standard.
Acceptance Criteria
- AGENTS.md gains a 'Scheduled workflows' standard section (mirroring the existing 'Cost reporting' repo-local-standard precedent) stating: never schedule at minute 0 /
0 * * * *; use a staggered off-peak minute; and per Option 2, idempotent/self-healing sweeps may run at a higher frequency on odd offsets because extra ticks are harmless and missed ticks self-heal. - That section includes a 'Promotion' note: this is currently a repo-local standard; to make it org-wide, lift it into petry-projects/.github (standards/ci-standards.md) and have repos defer to it -- explicitly referencing the org-wide rollout story.
- A CI check (a new step/job in lint.yml, e.g. validate-workflow-schedules, backed by a small shell script) detects any schedule.cron using minute 0 across this repo's .github/workflows/*.yml and agentic *.md sources and reports the offending file(s).
- The check passes on the current tree (it runs after Story 1's offsets are applied) and flags a reintroduced
0 * * * *cron (demonstrated by a fixture/test). - If the check is script-backed, it follows repo conventions (POSIX bash, set -euo pipefail) and its bats test file is added to the bats list in lint.yml.
Tasks / Subtasks
- Write the 'Scheduled workflows' standard section in AGENTS.md, including the minute-0 prohibition, the stagger guidance, the Option-2 idempotent-sweep note, and the Promotion pointer (AC: test issue from agent #1, Go-live improvements for PR review agent #2)
- Implement the schedule-lint: a script that parses schedule.cron from workflow sources and fails/flags on a minute-0 first field (AC: Add @claude delegation, auto-merge, and rebase handling #3, Optimize review: small-PR and incremental fast paths #4, feat: add Copilot engine support via REVIEW_ENGINE toggle #5)
- Scan both .github/workflows/*.yml and agentic *.md headers
- Report file + offending cron line; choose and document warn-vs-fail behavior (see open questions)
- Wire the check into lint.yml as a new step/job and (if script-backed) add its bats test to the bats list (AC: Add @claude delegation, auto-merge, and rebase handling #3, feat: add Copilot engine support via REVIEW_ENGINE toggle #5)
- Add a bats fixture proving a clean tree passes and a reintroduced 0 * * * * cron is flagged (AC: Optimize review: small-PR and incremental fast paths #4)
Dev Notes
- Precedent for a repo-local standard with a promotion path: AGENTS.md '### Cost reporting' ends with a 'Promotion: this is currently a repo-local standard ... lift it into petry-projects/.github' note -- follow that exact shape so the standard is consistent and Story 4 can lift it cleanly.
- lint.yml already hosts focused validation jobs (shellcheck, bats, validate-agent-profiles, gh-aw-compile) -- add the schedule check as a sibling job/step; the bats job runs an explicit allow-list of test files, so a new test file must be appended to that list (AGENTS.md documents that the bats list is intentionally repo-extended and must not be reset by template syncs).
- This must land AFTER Story 1: a hard-failing minute-0 check would otherwise fail CI on the existing tree. The standard text also documents the convention Story 1 just applied.
- Keep the parser simple and robust: match the cron minute field (first whitespace-delimited token after the quoted cron value). Guidance only -- do not attempt full cron validation.
Project Structure Notes
Edits AGENTS.md and lint.yml; adds one small script under scripts/ and one bats file under tests/ (added to the lint.yml bats list). No changes to workflow runtime behavior beyond the new check.
References
- AGENTS.md#cost-reporting
- AGENTS.md#workflow-files
- .github/workflows/lint.yml#bats
- .github/workflows/lint.yml#validate-agent-profiles
- tests/fleet_report.bats
Likely target surface
AGENTS.md.github/workflows/lint.ymlscripts/tests/
Story prepared by the BMAD Scrum Master (Bob) for epic #722. Status: ready-for-dev.
Metadata
Metadata
Assignees
Labels
dev-leadFor dev-lead agent pickupFor dev-lead agent pickupinitiativeEpic / initiative tracking issueEpic / initiative tracking issue
Activity
don-petry commentedon Jul 14, 2026
Dev-Lead Implementation Plan
Issue: #724 — [Phase 1] Codify the off-peak scheduling standard + CI compliance check
Scope
Document the off-peak (never minute-0) scheduled-workflow convention as a repo-local standard in AGENTS.md (with a Promotion note), and add a script-backed CI check in lint.yml that flags any
schedule.cronwhose minute field is0across this repo's own workflow/agentic sources.Implementation Checklist
### Scheduled workflowsstandard section — minute-0 prohibition, staggered off-peak minute, Option-2 idempotent-sweep note, and a Promotion pointer (mirrors### Cost reporting)scripts/validate-workflow-schedules.sh: POSIX bash (set -euo pipefail) — extractschedule.cronminute field from in-scope sources and flag any minute-0 cron, reporting file:line + offending cron.github/workflows/*.yml,.github/workflows/*.md,docs/aw/*.md(excludesframeworks/subtrees).github/workflows/lint.yml: addvalidate-workflow-schedulesjob + append the new bats test to thebatsjob listtests/fixtures/schedule-lint/(clean tree passes, reintroduced0 * * * *flagged)Tests to Write
tests/test_validate_workflow_schedules.bats: unit tests for the minute-field parser (flags0 * * * *, passes11 9 * * 1, handles quotes/comments/*/6), plus fixture-tree tests (clean passes, dirty flagged), plus a guard that the live repo tree passesTest Command
scripts/run-bats.sh tests/test_validate_workflow_schedules.batsdon-petry commentedon Jul 14, 2026
Dev-Lead: Implementation Complete
Plan Execution
### Scheduled workflowsstandard (minute-0 prohibition, staggered off-peak minute, Option-2 idempotent-sweep note, CI-enforcement pointer, and a Promotion note referencingstandards/ci-standards.md+ the epic Reliable scheduled Actions: off-peak cron offsets, scheduling standard, and schedule-reliability reporting #722 rollout)scripts/validate-workflow-schedules.sh— POSIX bash (set -euo pipefail) that extracts eachschedule.cronminute field and flags any minute-0 cron, reportingfile:line: <cron>.github/workflows/*.yml,.github/workflows/*.md,docs/aw/*.md);frameworks/subtrees intentionally excludedlint.yml— addedvalidate-workflow-schedulesjob and appended the new bats file to thebatsjob listtests/fixtures/schedule-lint/(clean tree passes; reintroduced0 * * * *in both a.ymland an agentic.mdis flagged)tests/test_validate_workflow_schedules.bats— parser unit tests + fixture-tree tests + a live-repo-tree guardTest Results
Files Changed
AGENTS.md: new### Scheduled workflowsrepo-local standard with Promotion note.github/workflows/lint.yml: newvalidate-workflow-schedulesjob + bats-list entryscripts/validate-workflow-schedules.sh: the schedule-lint (new)tests/test_validate_workflow_schedules.bats: unit + fixture tests (new)tests/fixtures/schedule-lint/**: clean/dirty/dirty-md fixtures (new)Notes
0), not a full cron validator, per the issue's Dev Notes — it precisely targets the documented0 * * * *prohibition. It handles single/double-quoted and bare cron values and strips trailing comments.frameworks/still contains upstream0 * * * *examples in subtree knowledge docs; these are upstream-owned, not our schedules, and are out of scope by design.feat: implement issue #724 — [Phase 1] Codify the off-peak scheduling…
feat: implement issue #724 — [Phase 1] Codify the off-peak scheduling…
feat: implement issue #724 — [Phase 1] Codify the off-peak scheduling…
feat: implement issue #724 — [Phase 1] Codify the off-peak scheduling…
feat: implement issue #724 — [Phase 1] Codify the off-peak scheduling…
feat: implement issue #724 — [Phase 1] Codify the off-peak scheduling…
feat: implement issue #724 — [Phase 1] Codify the off-peak scheduling…
feat: implement issue #724 — [Phase 1] Codify the off-peak scheduling…
feat: implement issue #724 — [Phase 1] Codify the off-peak scheduling…
feat: implement issue #724 — [Phase 1] Codify the off-peak scheduling…
feat: implement issue #724 — [Phase 1] Codify the off-peak scheduling…