Keep automations/docs/automation-operations-permissions.md up to date. Detects new/changed automation operations (in code or in the doc), adds them to the Matrix current and Matrix target tables, and recomputes the Matrix diff. Run at the end of any task that touches automation operations or their permissions, or after editing the doc by hand. Usage: /automation-permission-matrix
Maintains automations/docs/automation-operations-permissions.md: the per-role availability matrix for every user-facing
AIR Automations operation. The document has three generated sections — Matrix current (today's behaviour, from
code), Matrix target (intended future model), and Matrix diff — plus a static "How to read", "Notes", and
"Open questions" section that you must preserve.
Run this skill:
Each operation row has five availability cells, then a functionality description:
| Column | Actor |
|---|---|
| Private | Private/personal automation (no project); actor is its creator/owner. |
| Member + repo | Project automation; actor is a project member (not admin) with repo access. |
| Member − repo | Project automation; actor is a project member (not admin) without repo access. |
| Admin + repo | Project automation; actor is a project admin with repo access. |
| Admin − repo | Project automation; actor is a project admin without repo access. |
Cell values: Yes, No, N/A (code does not determine it). A trailing ? (e.g. Yes?) marks a target value
that has not been verified by a human yet — only ever add ? in Matrix target, never in Matrix current.
Authorization is JCP AuthZ (Can-I) on the air_automation entity with actions read / update / delete, plus a
repo-access check (unconditional). Model assumes AIR_CLOUD_PROJECTS_FEATURE_FLAG on.
withAutomation*Permission / withAutomationSnapshot*Permission
wrapper the handler uses (in automations, automation-runs, notifications, triggers services):
...ReadPermission → read action....EditPermission → update action....DeletePermission → delete action.automation.service.ts createAutomation (assertUserHasRepositoryAccess, ~line 101), which also runs on the save/edit path (createAutomation with an id). It is write for a project automation (projectId set) and read for a private one; it is not re-checked on read/pause/delete/stop/etc. So the + repo and − repo columns differ only for create and snapshot-save operations.<feature> — own — project automation the actor created (creator grants apply).<feature> — another project member — created by someone else (role-based only); the Private cell is N/A.
Read-class, create, and no-per-automation-check ([g]) operations are not split.Yes | Yes | Yes | Yes | Yes (Private N/A if it is project-only, e.g. list-by-project).[w]: Yes | Yes | No | Yes | No.— own [w]: Yes | Yes | No | Yes | No. Save — another project member [w]: N/A | No | No | Yes | No.— own (pause, stop, update-status, delete): Yes | Yes | Yes | Yes | Yes.
— another project member: N/A | No | No | Yes | Yes.[g] (webhook token, Run Now): Yes | Yes | Yes | Yes | Yes.[w] repo-write-gated save; [g] no
per-automation authorization; [r] write gated only by read permission; [n] notification-config nuance.@AllowPrincipalTypes(PrincipalType.Service), internal*
controllers, health, launcher dispatch) and non-per-automation endpoints (access/permanent tokens, Jira
provisioning). If unsure whether an operation is user-facing, add it with N/A cells and a note.git status --porcelain
git diff --stat HEAD # working + staged; add --cached if needed
git diff -- automations/docs/automation-operations-permissions.mdClassify the changes:
automations/apps/backend/src/modules/*/controllers/, their services' permission wrappers, gateway
automations controller/guards, or frontend actions under cloud/frontend/src/modules/automations/ and
cloud/frontend/src/pages/automations/.automations/docs/automation-operations-permissions.md.If neither is present, stop — nothing to do.
For each new user-facing operation found in code:
file:line in the
row rationale you keep in your working notes / commit message, not in the table).— own and — another project member rows.? (so the reviewer verifies them).For a changed operation (its gate changed in code), update its Matrix current cells and add ? to the
corresponding Matrix target cells if the target value is now uncertain.
For manual doc edits:
? cells copied from current).Rebuild the Matrix diff section from scratch by comparing Matrix current and Matrix target cell by cell,
textually (so Yes vs Yes? counts as a difference — it flags an unverified target):
current → target in the differing cells and — in unchanged cells._No differences: Matrix target matches Matrix current._[x]), document it under the marker legend.Summarize what changed: operations added/updated (with the code file:line that justifies each), any values you
corrected, and the new Matrix diff rows. Call out anything you could not determine from code (left as N/A / added to
Open questions) so the human can fill it in.
b758a8e
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.