From 3fbf66185914a947d7b03cc5bc53f34bf4179e10 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Sun, 4 Oct 2026 13:49:06 +1100 Subject: [PATCH] feat(playbooks,profiles): playbook and agent profile packages --- README.md | 2 + playbooks/bug-tdd/bug-tdd.yaml | 46 +++++++++++++++++++ playbooks/bug-tdd/package.yaml | 10 ++++ playbooks/label-trigger/label-trigger.yaml | 19 ++++++++ playbooks/label-trigger/package.yaml | 10 ++++ .../network-investigator.yaml | 2 + profiles/network-investigator/package.yaml | 10 ++++ 7 files changed, 99 insertions(+) create mode 100644 playbooks/bug-tdd/bug-tdd.yaml create mode 100644 playbooks/bug-tdd/package.yaml create mode 100644 playbooks/label-trigger/label-trigger.yaml create mode 100644 playbooks/label-trigger/package.yaml create mode 100644 profiles/network-investigator/network-investigator.yaml create mode 100644 profiles/network-investigator/package.yaml diff --git a/README.md b/README.md index 9d9008b..f1d2720 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ directory holds one subdirectory per extension. ``` secret-engines// package.yaml + Go source, served over secretengine.v1 workflows// package.yaml + workflow YAML, projected into workflow-definitions +playbooks// package.yaml + EDA playbook YAML, projected into eda-playbooks +profiles// package.yaml + agent profile YAML, projected into agent-profiles sdk/ generated surface stubs and the Serve helper scripts/pack.sh build one package and push it to a registry ``` diff --git a/playbooks/bug-tdd/bug-tdd.yaml b/playbooks/bug-tdd/bug-tdd.yaml new file mode 100644 index 0000000..daeb6a5 --- /dev/null +++ b/playbooks/bug-tdd/bug-tdd.yaml @@ -0,0 +1,46 @@ +# Example EDA playbook document (t2db.15 slice). +# +# Installed as an archipelago package, it applies without a restart. A +# malformed playbook, a mixed workflow/module action shape, or a `when`/args +# compile failure refuses the install: a partially-valid set never runs. +# +# This file is the workflow playbook shape: exactly one action, position: +# workflow. Action playbooks (one or more module actions) load and type-check +# but do not execute yet. +# +# A trigger matches on either axis, and both are checked when both are given: +# +# kind: the closed workintake routing vocabulary -- bug, feature, +# bootstrap, default. It is closed because a kind also addresses the +# task's NATS subject; anything else is rejected at load. Set it +# when you want the rule to follow archie's own classification. +# labels: any labels you like, including ones no kind recognises +# ("ops::security-review"). All of them must be present on the +# issue. This is the axis an instance defines for itself: it binds +# your own taxonomy to a workflow with no code change. See +# label-trigger.yaml. The `when` condition is a CEL +# expression over `event`. +# +# A matching playbook decides the task's workflow ahead of the kind/label +# binding files, and a workflow it names that is not defined parks the task +# rather than falling back. For a forge-discovered task, `event` carries: +# +# kind routing kind the labels produced (bug/feature/bootstrap/default) +# labels the issue's labels, as a list +# owner repo owner +# repo repo name +# number issue number +# title issue title +# body issue body +# source "forge" or "chat" +# +# Reading a field that is not in that set is an evaluation error, which the +# coordinator treats as the condition being false (the playbook is skipped). + +trigger: + kind: bug + +actions: + - position: workflow + workflow: tdd + when: '"regression" in event.labels' diff --git a/playbooks/bug-tdd/package.yaml b/playbooks/bug-tdd/package.yaml new file mode 100644 index 0000000..4275e4d --- /dev/null +++ b/playbooks/bug-tdd/package.yaml @@ -0,0 +1,10 @@ +apiVersion: dev.archie.package.v1 +displayName: bug-tdd +description: Route bugs labelled regression to the tdd workflow. +version: 1.0.0 +contributes: + playbooks: + - bug-tdd.yaml +files: + - path: bug-tdd.yaml + mode: 420 diff --git a/playbooks/label-trigger/label-trigger.yaml b/playbooks/label-trigger/label-trigger.yaml new file mode 100644 index 0000000..fd04b9b --- /dev/null +++ b/playbooks/label-trigger/label-trigger.yaml @@ -0,0 +1,19 @@ +# Example EDA playbook triggering on an instance-defined label. +# +# The kind axis (bug/feature/bootstrap/default) is archie's own closed +# classification. This file is the other axis: a label set of your own +# choosing, matched as a subset of the issue's labels. Every label listed here +# must be present on the issue for the playbook to fire. +# +# A matching playbook decides the task's workflow ahead of the +# workflow_routing_file, workflow_labels_file and playbook_dirs bindings. The +# workflow it names must be a defined workflow; naming one that is not parks +# the task with a reported error rather than quietly running a different one. + +trigger: + labels: + - ops::security-review + +actions: + - position: workflow + workflow: feasibility diff --git a/playbooks/label-trigger/package.yaml b/playbooks/label-trigger/package.yaml new file mode 100644 index 0000000..e8c4691 --- /dev/null +++ b/playbooks/label-trigger/package.yaml @@ -0,0 +1,10 @@ +apiVersion: dev.archie.package.v1 +displayName: label-trigger +description: Route an instance-defined label to a workflow. +version: 1.0.0 +contributes: + playbooks: + - label-trigger.yaml +files: + - path: label-trigger.yaml + mode: 420 diff --git a/profiles/network-investigator/network-investigator.yaml b/profiles/network-investigator/network-investigator.yaml new file mode 100644 index 0000000..2fb6c6e --- /dev/null +++ b/profiles/network-investigator/network-investigator.yaml @@ -0,0 +1,2 @@ +name: network-investigator +image: archie-agent-net:local diff --git a/profiles/network-investigator/package.yaml b/profiles/network-investigator/package.yaml new file mode 100644 index 0000000..29025eb --- /dev/null +++ b/profiles/network-investigator/package.yaml @@ -0,0 +1,10 @@ +apiVersion: dev.archie.package.v1 +displayName: Network investigator profile +description: Agent profile for the firewall workflows. Needs the archie-agent-net image, built from Dockerfile.agent-net. +version: 1.0.0 +contributes: + profiles: + - network-investigator.yaml +files: + - path: network-investigator.yaml + mode: 420