Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf86679d42 | ||
|
|
0d53fc6981 | ||
|
|
244f4de1bd | ||
|
|
e3d4219323 | ||
|
|
82491b073f | ||
|
|
1f24556833 | ||
|
|
42301cf38e | ||
|
|
a96b6134a5 | ||
|
|
6cb27a576d |
No files matched your search
@@ -59,7 +59,7 @@
|
||||
{
|
||||
"name": "delivery",
|
||||
"description": "Agents and skills for taking a change from spec to a verified merge through tracker-gated stages.",
|
||||
"version": "0.6.0",
|
||||
"version": "0.8.0",
|
||||
"category": "Developer Tools",
|
||||
"source": "./plugins/delivery"
|
||||
},
|
||||
|
||||
@@ -73,7 +73,7 @@ executables:
|
||||
bin: true
|
||||
# delivery ships the guard hook (ADR-0032 enforcement layer 2). Same
|
||||
# version-in-key convention as above, kept by the same sync check.
|
||||
delivery#0.6.0:
|
||||
delivery#0.8.0:
|
||||
hooks: true
|
||||
|
||||
marketplace:
|
||||
|
||||
@@ -32,10 +32,19 @@ Every package skill classifies each command it drives into one tier:
|
||||
Agents never decrypt Ansible Vault or Sealed Secrets and never read the material that would. Stage
|
||||
sessions use a kubeconfig bound to the built-in `view` ClusterRole (which excludes Secrets) plus a
|
||||
read-only aggregated role for `SealedSecret` objects. Ansible stage work runs only what succeeds with
|
||||
a placeholder vault password (`--syntax-check`, `ansible-lint`, inventory reads). A real
|
||||
`--check --diff` before merge is reopened: check mode still runs PR-controlled code (lookups,
|
||||
`delegate_to: localhost`, `check_mode: false` tasks, plugins) with the production credentials, so
|
||||
running it in CI on a bot PR hands the bot those credentials. Decided in
|
||||
a placeholder vault password (`--syntax-check`, `ansible-lint`, inventory reads).
|
||||
|
||||
Ansible's pre-merge `--check --diff` runs in CI from the base branch's copy (`pull_request_target`)
|
||||
with the production vault password and SSH key. It runs automatically on human-authored PRs. On a
|
||||
bot-authored PR it runs only after a user on the human allowlist adds the `Dry run` label, and after
|
||||
every bot push the label must be removed and re-added, because the push leaves the new head without
|
||||
a status. This is because PR code really executes: `check_mode: false` tasks on production hosts,
|
||||
and lookups, plugins and `delegate_to: localhost` on the runner with the production credentials.
|
||||
The gate guards against accidents, not a hostile bot: a bot branch can already reach the secrets
|
||||
through a workflow of its own (see the same-repo-branch accepted risk). It runs only the Ansible
|
||||
stages (pve, lxc, vm, services) the change touches, shares the `homelab-provision` concurrency
|
||||
group, and its required status proves the preview ran on the head commit, not that check mode
|
||||
passed. Failed tasks are shown in the PR comment for the approver to judge. Decided in
|
||||
[Pre-merge Ansible dry run without exposing production credentials](https://git.rkdr.net/Mortis/Holocron/issues/200).
|
||||
|
||||
## Enforcement layers
|
||||
@@ -52,8 +61,9 @@ running it in CI on a bot PR hands the bot those credentials. Decided in
|
||||
- every PR carries the dry run as a required status and a PR comment; apply happens after merge.
|
||||
Flux's is an offline rendered diff of base and head that holds no cluster credential; a live
|
||||
`flux diff` needs write RBAC, because Kubernetes authorises dry-run requests like real ones, so
|
||||
it is not used. Ansible's pre-merge `--check --diff` is reopened (see Secrets); later
|
||||
`tofu plan`;
|
||||
it is not used. Ansible's is a CI `--check --diff` from the base branch's copy, gated on bot
|
||||
PRs by an allowlisted human's `Dry run` label, re-added after every bot push; its status proves the preview ran on
|
||||
the head commit, not that check mode passed (see Secrets). Later `tofu plan`;
|
||||
- in step mode (v1) the human launching a stage is the approval, and stage leads check gate
|
||||
state only: the stage's gate label, if it has one, is present, and for verify the PR is
|
||||
merged with a non-stale, non-dismissed approval by a user on the human allowlist in
|
||||
@@ -70,8 +80,16 @@ running it in CI on a bot PR hands the bot those credentials. Decided in
|
||||
|
||||
- **Agent drafts odd jobs, human runs them** (no agent ever holds apply credentials): rejected by the
|
||||
owner in favour of agent-run odd jobs in HITL sessions with per-command ask.
|
||||
- **Gated vault-touching check runs, or a scoped vault credential for agents**: rejected — moving
|
||||
`--check --diff` to CI removes the conflict without loosening the read rule.
|
||||
- **A scoped vault credential for agents**: rejected — running `--check --diff` in CI removes the
|
||||
conflict without loosening the read rule.
|
||||
- **A scoped vault or check-only SSH user for the CI dry run**: rejected — a check-only user still
|
||||
needs `become`, which is root, and a scoped vault drifts from the real one.
|
||||
- **Ungated vault-touching check runs on bot PRs**: rejected — check mode still executes
|
||||
PR-controlled code with the production credentials (`check_mode: false` tasks on production
|
||||
hosts; lookups, plugins and `delegate_to: localhost` on the runner), so an ungated run would let
|
||||
bot-authored code act on production before any human looks. The bot path is gated instead: the
|
||||
run starts only on an allowlisted human's `Dry run` label, re-added after every bot push (see
|
||||
Secrets).
|
||||
- **Apply before merge** (Atlantis model): rejected — Gitea has no native support; merge-then-apply
|
||||
with the dry run as a required check is the existing pattern in the reference repo.
|
||||
- **A deny hook on test paths**: rejected for v1 — a repo-wide hook cannot portably tell the test
|
||||
@@ -99,12 +117,22 @@ running it in CI on a bot PR hands the bot those credentials. Decided in
|
||||
- **Accepted risk:** Copilot CLI's TUI auto-approves a hook `ask` (github/copilot-cli#3590, open
|
||||
since v1.0.53), so on Copilot an odd-job ask may run without a human answer. The owner kept ask
|
||||
on Copilot rather than deny; Copilot is untested in v1 and the credential boundary still holds.
|
||||
- **Accepted risk:** human-authored PRs run PR code against production hosts before approval. The
|
||||
Ansible dry run starts automatically on them, and check mode executes `check_mode: false` tasks on
|
||||
the hosts, and lookups, plugins and `delegate_to: localhost` on the runner, for real; the owner
|
||||
accepted this for human authors and gated only the bot.
|
||||
- The guard hook (`plugins/delivery/.apm/hooks/guard.py`) also checks file-tool paths (Read, Grep,
|
||||
Edit, Write, Copilot's `view`, Codex's `apply_patch`) against the secret-path globs, not only
|
||||
shell commands. `kubectl`, `helm`, `flux` and `tofu` are allowlists of subcommands that change no
|
||||
cluster or state and print no secret: anything not on the list is denied, so an unlisted mutating
|
||||
subcommand fails safe. Codex cannot ask, so odd jobs are
|
||||
denied there; an unrecognised runtime is treated the same way.
|
||||
- *Amended 2026-11-25 ([Pre-merge Ansible dry run without exposing production credentials](https://git.rkdr.net/Mortis/Holocron/issues/200)):
|
||||
the reopened Ansible `--check --diff` now runs in CI from the base branch's copy with production
|
||||
credentials — automatic on human-authored PRs, gated on bot PRs by an allowlisted human's
|
||||
`Dry run` label, re-added after every bot push; the gated-run rejection was narrowed to ungated
|
||||
runs on bot PRs, a scoped vault or check-only user for CI was rejected, and human-authored PRs
|
||||
running PR code against production before approval became an accepted risk.*
|
||||
- *Amended 2026-11-23 ([delivery-handoff skill](https://git.rkdr.net/Mortis/Holocron/issues/191)): stage
|
||||
leads check gate state only and the who-set-the-label check moved to the run-mode launcher,
|
||||
because gitea-mcp v1.13.0 has no timeline method, the timeline needs a token on private repos,
|
||||
|
||||
@@ -17,9 +17,10 @@ they do the work.
|
||||
|
||||
- Never edit, create or delete a file — not with a file tool and not through the shell (`>`, `tee`,
|
||||
`sed -i`, `git mv`, `git rm`). Every change to the repo is a role agent's commit.
|
||||
- Never set, add or remove a Gate label (`Status/Ready for Agent`), never approve or merge a PR, and
|
||||
never mark the PR ready except by removing `WIP:` after `delivery-qa` returns `pass`. Gates are
|
||||
human approval recorded in the tracker; an agent that sets one approves its own work.
|
||||
- Never set, add or remove a Gate label (`Status/Ready for Agent`) or a gated dry run's label, never
|
||||
approve or merge a PR, and never mark the PR ready except by removing `WIP:` after `delivery-qa`
|
||||
returns `pass`. Gates are human approval recorded in the tracker; an agent that sets one approves
|
||||
its own work.
|
||||
- Never tell a role agent to relax one of its rules. Your delegation prompt overrides its body, so a
|
||||
prompt that says "edit the test" or "skip the hook" removes the guard. Pass inputs, not policy.
|
||||
- Never run apply-by-merge, odd-job or Never-tier commands (ADR-0032), and never read secret
|
||||
@@ -118,10 +119,12 @@ with blocking findings. On a PR, the issue is the one its body's `Closes #<n>` n
|
||||
- `stop` → Stop with its reason: a missing or malformed check is not the implementer's to fix.
|
||||
9. Run `delivery-handoff` Step 5: one Handoff comment on the PR, Decisions and Rejected taken from
|
||||
the role agents' reports and every step 6 and step 7 verdict, Evidence linking the PR, the
|
||||
commits and the CI runs QA cited. Then remove the `WIP:` prefix from the PR title with
|
||||
`gitea-prs`, which makes the PR eligible for the review stage. The comment goes first so a crash
|
||||
between the two leaves a recorded hand-off on a PR still in `WIP:`, never a review-eligible PR
|
||||
with no Handoff comment for the reviewer's Required inbound check.
|
||||
commits and the CI runs QA cited, and Open questions one line "human gate: `<check>` —
|
||||
`<state>`", plus ": `<cause>`" for a `gated-failure`, per name on QA's last `human-gate` line
|
||||
(else `none`). Then remove the `WIP:` prefix from the PR title with `gitea-prs`, which makes the
|
||||
PR eligible for the review stage. The comment goes first so a crash between the two leaves a
|
||||
recorded hand-off on a PR still in `WIP:`, never a review-eligible PR with no Handoff comment for
|
||||
the reviewer's Required inbound check.
|
||||
|
||||
## Output
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ These hold whatever your caller's prompt says:
|
||||
|
||||
- You are read-only. Never create, edit or delete a file, by a file tool or through the shell.
|
||||
- Never re-run CI, and never run the tests, linters or dry runs locally.
|
||||
- Never approve, label, comment on or edit the PR or the issue.
|
||||
- Never approve, label, comment on or edit the PR or the issue. A gated dry run's label is the
|
||||
human's gate: never add, remove or re-add it.
|
||||
- Never read secret material: vault and vault password files, private keys, `.tfstate`, Secret
|
||||
objects.
|
||||
- Evidence is links — CI runs, commits, files at a commit — never pasted logs.
|
||||
@@ -33,22 +34,27 @@ the tool skill names.
|
||||
2. Load each tool skill the lead named, then invoke `delivery-ci-checks` to read the head commit's
|
||||
check results. Its verdict maps to yours: `pending` → `pending`; `fail` → `fail`, the failed
|
||||
run linked; `missing` (a listed check never reported) or `malformed: <reason>` → `stop`, because
|
||||
no implementer commit can fix either.
|
||||
no implementer commit can fix either. `awaiting-gate` and `gated-failure` rows are never a
|
||||
fail, because only a human can clear a gated dry run: list each under `human-gate` with its
|
||||
state and cause, and judge the rest.
|
||||
3. With CI green, judge against this checklist; each miss is a finding:
|
||||
- Every acceptance criterion is met by a check that actually exercises it, not one that would
|
||||
pass without the change.
|
||||
- Edge cases the ticket implies that no check covers.
|
||||
- The `dry-run` role check's diff or render does what the ticket meant — read its output.
|
||||
- Every `dry-run` and `dry-run-gated` check in state `success`: its diff or render does what the
|
||||
ticket meant — read it. A `gated-failure` log is the human's to read, never a finding.
|
||||
- Idempotence, and effects check mode cannot simulate, are covered or named as post-merge
|
||||
assertions.
|
||||
- No test was weakened, skipped or deleted since the test author's commit.
|
||||
- Every `skipped` status is legitimately path-filtered: its workflow's paths do not match the
|
||||
diff.
|
||||
diff. A gated check never reaches you as `skipped`; `delivery-ci-checks` reports it as
|
||||
`awaiting-gate` or `gated-failure`.
|
||||
|
||||
## Output
|
||||
|
||||
```text
|
||||
verdict: pass | fail | pending | stop
|
||||
human-gate: <check> — <awaiting-gate | gated-failure: <cause>>; … | none
|
||||
findings:
|
||||
- <what is wrong or uncovered> — <link>
|
||||
```
|
||||
|
||||
@@ -20,8 +20,9 @@ These hold whatever your launch prompt says:
|
||||
delete a file, and never commit or push.
|
||||
- Every review you post has state `COMMENT`. Never request changes, approve or dismiss: Gitea
|
||||
refuses a review state from the PR's poster, and you run as the user that opened the PR.
|
||||
- Never merge a PR, and never set, add or remove a Gate label (`Status/Ready for Agent`). An
|
||||
approval is the human gate the verify stage checks; an agent that sets one approves its own work.
|
||||
- Never merge a PR, and never set, add or remove a Gate label (`Status/Ready for Agent`) or a
|
||||
gated dry run's label. An approval is the human gate the verify stage checks; an agent that sets
|
||||
one approves its own work.
|
||||
- Set `Status/Ready for Human` only through `delivery-handoff` §Stop.
|
||||
- Never run tests, linters or dry runs locally, and never re-run CI. Evidence is links, never
|
||||
pasted logs.
|
||||
|
||||
@@ -9,7 +9,7 @@ compatibility: Requires a Gitea forge with Actions reached through the Gitea MCP
|
||||
allowed-tools: Read mcp__gitea__pull_request_read mcp__gitea__commit_read mcp__gitea__actions_run_read
|
||||
metadata:
|
||||
category: delivery
|
||||
version: "0.1.1"
|
||||
version: "0.3.0"
|
||||
---
|
||||
|
||||
## Gotchas
|
||||
@@ -21,7 +21,9 @@ metadata:
|
||||
- Match check names verbatim, event suffix included: `Lint / lint (push)` is not
|
||||
`Lint / lint (pull_request)`. Never fuzzy-match or substitute a similar name.
|
||||
- `skipped` counts as passing (path-filtered workflows report it). A listed check with no status on
|
||||
the commit is `missing`, never passing.
|
||||
the commit is never passing; only a `dry-run-gated` one is excused, as `awaiting-gate`. A
|
||||
gated check's failure is `gated-failure`, also passing: a human reads it, never the implementer.
|
||||
- Never add, remove or re-add a dry run's gate label: it is the human gate.
|
||||
|
||||
## Step 1 — Read the listed checks
|
||||
|
||||
@@ -33,51 +35,53 @@ Otherwise read `docs/agents/delivery.md` at the consuming repo's root. Its forma
|
||||
`delivery-repo-doc`'s `references/format.md`; you parse only section `## CI checks`:
|
||||
|
||||
- one item per line: `` - `<exact status name>`: <role> ``
|
||||
- `<role>` is one of `dry-run`, `test-path`, `test`, `lint`, `build`, `other`; `dry-run` on exactly
|
||||
one item
|
||||
- `<role>` is one of `dry-run`, `dry-run-gated`, `test-path`, `test`, `lint`, `build`, `other`;
|
||||
`dry-run` on one or more items
|
||||
- `- none` as the only item means no checks: return verdict `pass` with an empty table and stop.
|
||||
|
||||
File missing, section missing, an item outside that syntax, an unknown role, or not exactly one
|
||||
`dry-run` → return `malformed: <reason>` and no verdict. The caller stops with
|
||||
`Status/Ready for Human` through `delivery-handoff`'s Stop; do not guess the list.
|
||||
File missing, section missing, an item outside that syntax, an unknown role, or no `dry-run`
|
||||
item → return `malformed: <reason>` and no verdict; never guess the list.
|
||||
|
||||
## Step 2 — Pin the commit
|
||||
|
||||
- **PR** → `mcp__gitea__pull_request_read` method `get`; take `head.sha` and the PR's `html_url`.
|
||||
- **Commit** (e.g. post-merge on `main`) → use the SHA you were given.
|
||||
|
||||
Only statuses on this SHA count. A status from an older commit of the PR is stale and is ignored.
|
||||
Only statuses on this SHA count; an older commit's are stale and ignored.
|
||||
|
||||
## Step 3 — Read statuses, with bounded waiting
|
||||
|
||||
Read `references/statuses.md` now. Read the pinned SHA's statuses with
|
||||
`mcp__gitea__commit_read` method `get_status`, `ref` set to the SHA, and classify each listed
|
||||
check as `success`, `failure`, `skipped`, `pending` or `missing` per its mapping.
|
||||
check as `success`, `failure`, `skipped`, `pending`, `missing`, `awaiting-gate` or
|
||||
`gated-failure` per its mapping and §Gated dry runs.
|
||||
|
||||
Re-read while any listed check is `pending`, or while no listed check has reported yet. With a
|
||||
caller-supplied list, also re-read while any is `missing`: workflows on a fresh commit start
|
||||
late. Each re-read passes `wait_seconds: 45`. For a PR, re-read `head.sha` first; if it moved, go
|
||||
back to Step 2 with the new SHA. The hard cap, across all SHAs, is **20 reads, about 15
|
||||
minutes**. A caller's wait cap in minutes replaces it: the caller's minutes, at most
|
||||
⌈minutes×4/3⌉ reads, whichever comes first. At the cap, report what you have; never wait past it.
|
||||
Re-read while any listed check is `pending`, or while no ungated listed check has reported yet;
|
||||
never for an `awaiting-gate` or `gated-failure` check. With a caller-supplied list, also re-read
|
||||
while any is `missing`: workflows on a fresh commit start late. Each re-read passes
|
||||
`wait_seconds: 45`. For a PR, re-read `head.sha` first; if it moved, go back to Step 2 with the
|
||||
new SHA. The hard cap, across all SHAs, is **20 reads, about 15 minutes**. A caller's wait cap in
|
||||
minutes replaces it: the caller's minutes, at most ⌈minutes×4/3⌉ reads, whichever comes first. At
|
||||
the cap, report what you have; never wait past it.
|
||||
|
||||
## Step 4 — Explain failures
|
||||
|
||||
For each `failure`, read the job's log as `references/statuses.md` §Failure cause says and write
|
||||
the cause in one line. Link the job; never paste log text into the result.
|
||||
For each `failure` and `gated-failure`, write its one-line cause per `references/statuses.md`
|
||||
§Failure cause.
|
||||
|
||||
## Step 5 — Return the result
|
||||
|
||||
Overall verdict, first match wins: any `failure` → `fail`; any `missing` → `missing`; any
|
||||
`pending` → `pending`; else → `pass`.
|
||||
`pending` → `pending`; else → `pass`. `awaiting-gate` and `gated-failure` pass like `skipped`.
|
||||
|
||||
Output format:
|
||||
|
||||
```text
|
||||
Commit: <full SHA> Verdict: <pass|fail|pending|missing>
|
||||
Human gate: <name> (<awaiting-gate|gated-failure>), … | none
|
||||
| Check | Role | State | Run | Cause |
|
||||
```
|
||||
|
||||
One row per listed check, in the doc's or the caller's order. `Run` is the absolute job link, or
|
||||
`none` for a skipped or missing check. `Cause` is the one-line failure cause, else empty. On `pending` or
|
||||
`missing` the caller decides what follows; you do not.
|
||||
`none` for a check with no job. `Cause` is the one-line cause of a `failure` or `gated-failure`,
|
||||
else empty. On `pending` or `missing` the caller decides what follows; you do not.
|
||||
@@ -26,11 +26,37 @@
|
||||
|---|---|
|
||||
| `success` | `success` |
|
||||
| `skipped` | `skipped`, passing |
|
||||
| `failure`, `error`, `warning` | `failure` |
|
||||
| `failure`, `error`, `warning`, role `dry-run-gated` | `gated-failure`, passing |
|
||||
| `failure`, `error`, `warning`, any other role | `failure` |
|
||||
| `pending` (Gitea Actions reports queued and running jobs as this), any other value | `pending` |
|
||||
| no status whose `context` equals the listed name | `missing` |
|
||||
| no status whose `context` equals the listed name, role `dry-run-gated` | `awaiting-gate`, passing |
|
||||
| no status whose `context` equals the listed name, any other role | `missing` |
|
||||
|
||||
When two statuses share a `context`, use the one with the latest `updated_at`.
|
||||
When two statuses share a `context`, use the one with the latest `updated_at`. For role
|
||||
`dry-run-gated`, ignore its `skipped` statuses first and take the latest of the rest; none left →
|
||||
`awaiting-gate`. A gated job whose label condition is unmet posts `skipped`, and a later label
|
||||
event on the same SHA posts a newer `skipped` that would otherwise mask an earlier
|
||||
`gated-failure`.
|
||||
|
||||
## Gated dry runs
|
||||
|
||||
- `awaiting-gate` is a `dry-run-gated` check with no non-`skipped` status on the pinned SHA: no
|
||||
human has added its label yet, and only a human can, so waiting for it is pointless. It is never
|
||||
`missing`.
|
||||
- A gated check whose latest non-`skipped` status is `pending` or `success` is classified like any
|
||||
other check.
|
||||
- `gated-failure` is a gated check whose latest non-`skipped` status is `failure`, `error` or
|
||||
`warning`. The workflow may fail on purpose while it awaits its label, or the dry run itself may
|
||||
have failed; either way a human reads it, never the implementer, and it is never waited on. Its
|
||||
`Run` is the job link and its `Cause` follows §Failure cause, e.g. "Awaiting the Dry run label
|
||||
from an allowlisted human" or "Infrastructure error in at least one stage".
|
||||
- Only the delivery doc gives roles, so a caller-supplied list never yields `awaiting-gate` or
|
||||
`gated-failure`.
|
||||
- A gated status on an older commit is stale like any other. The label is needed fresh per push,
|
||||
so after a push the check is `awaiting-gate` again until a human re-adds it.
|
||||
- The `Human gate:` line names every `awaiting-gate` and `gated-failure` row with its state, e.g.
|
||||
`Human gate: Ansible Dry Run / ansible_dry_run (pull_request_target) (gated-failure)`, else
|
||||
`none`.
|
||||
|
||||
## Links
|
||||
|
||||
@@ -38,7 +64,7 @@ Build the absolute link from the forge's origin, the scheme and host of the PR's
|
||||
the API `url` fields, plus `target_url`:
|
||||
`https://git.example.org` + `/<owner>/<repo>/actions/runs/4872/jobs/5907`.
|
||||
|
||||
A skipped or missing check has no job, so its `Run` cell is `none`.
|
||||
A skipped, missing or `awaiting-gate` check has no job, so its `Run` cell is `none`.
|
||||
|
||||
## Failure cause
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@ compatibility: Requires a Gitea forge reached through the Gitea MCP server (via
|
||||
allowed-tools: Read mcp__gitea__issue_read mcp__gitea__issue_write mcp__gitea__pull_request_read
|
||||
metadata:
|
||||
category: delivery
|
||||
version: "0.2.1"
|
||||
version: "0.2.2"
|
||||
---
|
||||
|
||||
## Gotchas
|
||||
|
||||
- `Status/Ready for Human` is a stop signal, not a Gate, so you may set it. Every real gate —
|
||||
`Status/Ready for Agent`, a PR approval — is human-only: never set, add or remove a gate label,
|
||||
and never approve a PR.
|
||||
`Status/Ready for Agent`, a gated dry run's label, a PR approval — is human-only: never set, add
|
||||
or remove a gate label, and never approve a PR.
|
||||
- Check gate *state*, not who set it: in step mode the human launching your stage is the approval.
|
||||
Do not read the issue timeline.
|
||||
- `Status/Ready for Agent` and `Status/Ready for Human` must not share an exclusive label scope:
|
||||
|
||||
@@ -9,7 +9,7 @@ compatibility: Requires git and a forge remote. Gitea needs the Gitea MCP server
|
||||
allowed-tools: Bash Read Write Edit
|
||||
metadata:
|
||||
category: delivery
|
||||
version: "0.2.0"
|
||||
version: "0.4.0"
|
||||
---
|
||||
|
||||
## Gotchas
|
||||
|
||||
@@ -49,11 +49,16 @@ syntax. A format change is an edit here, plus every consumer's restatement.
|
||||
```
|
||||
|
||||
- `<status check name>` is the exact string the forge shows on a PR's head commit.
|
||||
- `<role>` is exactly one of: `dry-run`, `test-path`, `test`, `lint`, `build`, `other`.
|
||||
- `dry-run` appears on exactly one item unless the section is `- none`. `test-path` appears on at
|
||||
- `<role>` is exactly one of: `dry-run`, `dry-run-gated`, `test-path`, `test`, `lint`, `build`,
|
||||
`other`.
|
||||
- `dry-run` appears on one or more items unless the section is `- none`. `test-path` appears on at
|
||||
most one item, and on exactly one when the repo has a test-path check.
|
||||
- Whatever its role, a consumer treats a check reported as "skipped" (a path-filtered workflow
|
||||
whose paths did not match) as passing.
|
||||
- `dry-run-gated` (zero or more items) is a dry run that runs only after a user on the human
|
||||
allowlist adds its gate label to the PR. Until then its status on the head commit may be absent,
|
||||
`skipped` or a failure, and other events may post a status that does not reflect a dry run.
|
||||
Consumers never send its failure to the implementer: a human reads it.
|
||||
- Whatever its role, except `dry-run-gated`, a consumer treats a check reported as "skipped" (a
|
||||
path-filtered workflow whose paths did not match) as passing.
|
||||
|
||||
### 3. Test paths
|
||||
|
||||
@@ -146,6 +151,7 @@ Placement only decides where the line sits; the line itself never changes:
|
||||
## CI checks
|
||||
|
||||
- `ci / render-diff (pull_request)`: dry-run
|
||||
- `ci / plan (pull_request_target)`: dry-run-gated
|
||||
- `ci / test-paths (pull_request)`: test-path
|
||||
- `ci / lint (pull_request)`: lint
|
||||
|
||||
@@ -182,8 +188,8 @@ The values in the skeleton are illustrative only; every real value comes from th
|
||||
- [ ] Sections 1–4 and 7 hold only items in the syntax above, or `- none`.
|
||||
- [ ] Every skill in section 1 is installed. A listed skill that is not installed makes every
|
||||
consumer hard-stop on any change matching its glob.
|
||||
- [ ] Section 2: `dry-run` on exactly one item unless the section is `- none`; one `test-path` if
|
||||
the repo has that check.
|
||||
- [ ] Section 2: `dry-run` on one or more items unless the section is `- none`; `dry-run-gated`
|
||||
only on a dry run the human named as label-gated; one `test-path` if the repo has that check.
|
||||
- [ ] Section 3 is the `globs file:` pointer whenever a test-path check reads a globs file.
|
||||
- [ ] Section 4 is non-empty and every name came from the human or a source they named.
|
||||
- [ ] Section 5 holds paths and markdown links, no secret values.
|
||||
|
||||
@@ -18,9 +18,9 @@ repo; facts only a human holds come from the human. A value with no source stays
|
||||
### CI checks
|
||||
|
||||
1. Read every workflow under `.gitea/workflows/` or `.github/workflows/` that runs on
|
||||
`pull_request`. A path-filtered `pull_request` workflow still counts: Gitea reports it as
|
||||
"skipped" when its paths don't match. List it, usually with role `test`. Workflows that run only
|
||||
on push, schedule or dispatch are not PR checks; leave them out.
|
||||
`pull_request` or `pull_request_target`. A path-filtered `pull_request` workflow still counts:
|
||||
Gitea reports it as "skipped" when its paths don't match. List it, usually with role `test`.
|
||||
Workflows that run only on push, schedule or dispatch are not PR checks; leave them out.
|
||||
2. Derive each candidate name:
|
||||
- Gitea Actions: `<workflow name> / <job name> (<event>)`. The workflow name is the file's
|
||||
top-level `name:` (else the file name); the job name is the job's `name:` (else the job id).
|
||||
@@ -32,7 +32,12 @@ repo; facts only a human holds come from the human. A value with no source stays
|
||||
forge's string wins over the derived one. With no PR to read, keep the derived name and say so
|
||||
in the PR body.
|
||||
4. Assign roles. `test-path` is the check that fails when a commit after the
|
||||
`Delivery-Stage: test-author` commit touches the test globs. `dry-run` comes from the human.
|
||||
`Delivery-Stage: test-author` commit touches the test globs. `dry-run` and `dry-run-gated`
|
||||
come from the human: a dry run whose workflow waits for a label (a `labeled` trigger or a
|
||||
label condition on the job) is a `dry-run-gated` candidate to confirm, never assigned unasked.
|
||||
A gated check's name must come from the forge, read on a PR where the gated job ran (step 3).
|
||||
With no such PR, list it as open in the PR body instead: a wrong name stays `awaiting-gate`
|
||||
forever and never blocks.
|
||||
|
||||
### Test paths
|
||||
|
||||
@@ -72,8 +77,10 @@ SKILL.md Step 3 asks for these:
|
||||
- Bot user the agents act as.
|
||||
- Read-only kubeconfig path, or "no cluster".
|
||||
- Branch-protection status: in place, or pending with the tracking link.
|
||||
- Which CI check is the dry run. A repo with PR checks but no dry-run check is not ready for the
|
||||
delivery team: say so in the PR body as open and stop.
|
||||
- Which CI checks are dry runs, and which of those are label-gated: they post a status only after an
|
||||
allowlisted human adds a label. For each gated one, confirm its workflow runs only on that one
|
||||
named label (the filter read from the workflow). A repo with PR checks but no ungated dry-run
|
||||
check is not ready for the delivery team: say so in the PR body as open and stop.
|
||||
- Test-path globs, when no globs file exists (confirm the derived list).
|
||||
- Post-merge items for a push workflow with no path filter (confirm the derived directories).
|
||||
- Accepted risks: the ADR or issue links, or "none".
|
||||
@@ -9,7 +9,7 @@ compatibility: Requires a Gitea forge with Actions reached through the Gitea MCP
|
||||
allowed-tools: Read mcp__gitea__pull_request_read mcp__gitea__issue_read mcp__gitea__commit_read mcp__gitea__actions_run_read mcp__gitea__get_file_contents
|
||||
metadata:
|
||||
category: delivery
|
||||
version: "0.1.0"
|
||||
version: "0.3.0"
|
||||
---
|
||||
|
||||
## Gotchas
|
||||
|
||||
@@ -137,9 +137,14 @@ be encrypted and is not is itself the finding.
|
||||
|
||||
## 7. Dry run
|
||||
|
||||
Take the `dry-run` row from the `delivery-ci-checks` table. No such row (its CI checks are
|
||||
`- none`) → add nothing. `failure` is already a blocking finding from check 1. `skipped` → no
|
||||
output to judge; add nothing. `success` → read its job log:
|
||||
Apply this to every `dry-run` and `dry-run-gated` row in the `delivery-ci-checks` table. No such
|
||||
row (its CI checks are `- none`) → add nothing. `failure` is already a blocking finding from
|
||||
check 1. `skipped` → no output to judge; add nothing. `awaiting-gate` → non-blocking, "gated dry
|
||||
run `<name>` has not run yet; the approver judges its output once it does", linking
|
||||
`<PR html_url>/files`. `gated-failure` → non-blocking, never sent back to the implementer: "gated
|
||||
dry run `<name>` did not pass: `<cause>`; the approver reads it before approving", linking its
|
||||
`Run` job link.
|
||||
`success` → read its job log:
|
||||
|
||||
```text
|
||||
mcp__gitea__actions_run_read method get_job_log_preview, job_id <id from the Run link>,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: delivery
|
||||
version: 0.6.0
|
||||
version: 0.8.0
|
||||
description: Agents and skills for taking a change from spec to a verified merge through tracker-gated stages.
|
||||
author:
|
||||
name: Mortis
|
||||
|
||||
Reference in new issue
Block a user