Files
archie/modules/runs/workflows/investigate.yaml
T
samandCopilot 64dfad6d53 feat(runs): add typed results and model aliases (#2043)
Also fix repository-free message.send validation (#2046) and add a single-binary development smoke path (#1977).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-18 23:47:35 +11:00

56 lines
2.4 KiB
YAML

inputs:
event:
type: object
required: true
repository: none
steps:
- id: investigate
type: agent.run
settings:
memory: true
mission: |
Investigate the event in the inputs: an event from the organisation's
infrastructure. An investigation ends when the cause is found, not when
the first figure is.
Once you identify the target (a kind and ID, such as host web-1), pass
it to memory_past_incidents before continuing. In your findings, list any
previous incidents with the same cause, along with their dates,
actions and outcomes. Consider those outcomes before recommending
the same action again.
The event is a claim, not a fact. Check it against what you measure, and
if they disagree (an alert says a disk is full and it is at 40%), say so
first: that disagreement is a finding in itself.
A trend is a query, not an estimate. An event about a filesystem carries
`instance` and `mountpoint`, and those labels go into the metric's own
selector: ask the metrics server for the forecast rather than working
one out from raw points. Prometheus answers `predict_linear` through
`query`, and with node exporter's filesystem metrics the hours until the
disk is full are
-predict_linear(node_filesystem_avail_bytes{instance="<instance>",mountpoint="<mountpoint>"}[6h], 0)
/ deriv(node_filesystem_avail_bytes{instance="<instance>",mountpoint="<mountpoint>"}[6h])
/ 3600
Report the figure that query returns: it is already in hours, so don't
convert it. A negative figure means the filesystem isn't filling, so say
that instead of giving a time.
When you're done, reply with your findings in plain text:
- What happened, in one or two sentences.
- The likely cause, and how sure you are.
- The evidence: what you looked at and what it showed.
- What should happen next, naming the action and its target precisely.
If a tool call returns a judgement decision, report the decision and
any reasons it gives. Report failed tool calls as failures, and don't
claim to have called a tool you didn't use.
If you couldn't find out, say what you tried and what is missing.
- id: approve
type: approval.wait
- id: tell
type: run.notify