You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a maintainer of the agentic fleet,
I want a checked-in, machine-readable interaction contract for each agentic role, in the location and shape the standard fixes,
so that each role's triggers, timers, emitted events, idempotency key, concurrency lane, stop markers, and budget are declared and diffable, so the CI enforcer (Story 4) has something to validate against.
Acceptance Criteria
Every existing agentic role has a machine-readable interaction contract checked into the repo: the personas (dev-lead, pr-review, business-analyst, devops-lead, qa-lead, scrum-master, security-lead, sre-lead) and the non-persona agents (dev-lead runtime, pr-review runtime, ci-failure-analyst) covered per the standard's location decision.
Each contract declares triggers.events[], triggers.timers[] (each with cron + timer_role + justification + stop_condition + event_fast_path), emits[] (event + identity token/PAT), idempotency_key, concurrency_lane, stop_markers[], and budget.
Each contract's declared triggers match the role's actual deployed on: block (verified against the workflow source), so the contract is not aspirational.
The contract location matches the decision recorded in docs/agentic-interaction-model.md; if contracts extend persona.yml, the persona validator/schema dependency is respected (org-first or a standalone file), with no failing validate-personas.
A hermetic parse/consistency check (or the existing persona validator, if extended) confirms every contract is well-formed.
Cross-check each contract's triggers.events[]/timers[] against the workflow's actual on: block (dev-lead.yml, pr-review-trigger.yml, pr-review-sweep.yml, dev-lead-retry.yml, ci-failure-analyst.lock.yml, persona-mention.yml, etc.) and reconcile any divergence into the contract. (AC: Add @claude delegation, auto-merge, and rebase handling #3)
The persona manifests already model triggers as structured data — see personas/dev-lead/persona.yml (triggers.surfaces[] with surface/events/mode/gate_label/notes). The interaction contract extends this concept with the timer/emit/idempotency fields; reuse the existing structure rather than inventing a parallel one.
personas/validate-personas.py fetches persona.schema.json from petry-projects/.github (SCHEMA_REPO). New persona.yml fields must be permitted by that schema or validate-personas fails — this is the cross-repo prerequisite in the epic. Prefer the location the standard chose in Story 1; do not silently pick a different one.
The non-persona agents' real triggers: dev-lead.yml (labeled issues, review, check_run), pr-review-trigger.yml (event fast-path), pr-review-sweep.yml (schedule + workflow_run), dev-lead-retry.yml (schedule), ci-failure-analyst.lock.yml (check_run:completed). Note ci-failure-analyst.lock.yml is a byte-frozen ring-0 caller stub — the contract must describe it, not edit it.
idempotency_key / concurrency_lane values already exist implicitly as concurrency.group in each workflow (e.g. ci-failure-analyst-${{ head_sha }}); source the declared values from those, do not invent new ones.
Testing standard: a hermetic (no-network) parse test in the bats suite, mirroring tests/test_validate_personas.bats. If extending persona.yml, add cases to the persona validator test set.
Split option (if the org persona.schema.json decision stalls): the three standalone runtime contracts (dev-lead, pr-review, ci-failure-analyst) have NO external-schema gate and can land in a first PR; the 8 persona.yml extensions, which depend on the org schema permitting the new fields, can follow in a second PR. Keep them one story only if the schema decision from Story 1 is already settled.
Project Structure Notes
Contracts live under personas// (extending persona.yml) and/or a standalone per-role file for the three non-persona agents, exactly as the Story 1 standard dictates. This is the data Story 4's validator consumes.
References
personas/dev-lead/persona.yml
personas/validate-personas.py
personas/pr-review/persona.yml
.github/workflows/dev-lead.yml
.github/workflows/pr-review-trigger.yml
.github/workflows/ci-failure-analyst.lock.yml
Likely target surface
personas/dev-lead/persona.yml
personas/pr-review/persona.yml
personas/validate-personas.py
Story prepared by the BMAD Scrum Master (Bob) for epic #1402. Status: ready-for-dev.
Story
As a maintainer of the agentic fleet,
I want a checked-in, machine-readable interaction contract for each agentic role, in the location and shape the standard fixes,
so that each role's triggers, timers, emitted events, idempotency key, concurrency lane, stop markers, and budget are declared and diffable, so the CI enforcer (Story 4) has something to validate against.
Acceptance Criteria
Tasks / Subtasks
Dev Notes
Project Structure Notes
Contracts live under personas// (extending persona.yml) and/or a standalone per-role file for the three non-persona agents, exactly as the Story 1 standard dictates. This is the data Story 4's validator consumes.
References
Likely target surface
personas/dev-lead/persona.ymlpersonas/pr-review/persona.ymlpersonas/validate-personas.pyStory prepared by the BMAD Scrum Master (Bob) for epic #1402. Status: ready-for-dev.