./scale-down-audit.gnougo-flow.yaml
v0.1.0
version: 1
name: scale-down-audit
skill:
description: Audits namespaces in parallel for safe scale-to-zero candidates.
tags: [kubernetes, audit, cost-savings]
inputs:
namespaces: { type: array, required: true }
outputs:
report: { type: object }
workflows:
main:
inputs:
namespaces:
type: array
items: { type: string }
required: true
server:
type: string
required: false
default: SlimFaas.Kubernetes.Mcp
model:
type: string
required: false
default: gpt-4o-mini
steps:
- id: discover_cluster_tools
type: mcp.list
input:
servers: ["${data.inputs.server}"]
include: [tools]
- id: audit_namespaces
type: loop.parallel
input:
items: "${data.inputs.namespaces}"
max_concurrency: 4
item_var: namespace
index_var: namespace_index
steps:
- id: audit
type: mcp.call
input:
server: "${data.inputs.server}"
model: "${data.inputs.model}"
temperature: 0
prompt: "Audit namespace ${data.namespace} for safe scale-to-zero candidates. Do not mutate resources."
tools: "${data.steps.discover_cluster_tools.tools}"
- id: synthesize
type: llm.call
input:
model: "${data.inputs.model}"
temperature: 0
prompt: "Summarize these namespace audit traces: ${json(data.steps.audit_namespaces.results)}"
structured_output:
schema_inline:
type: object
properties:
safe_candidates:
type: array
items: { type: string }
blocked_candidates:
type: array
items: { type: string }
notes:
type: array
items: { type: string }
required: [safe_candidates, blocked_candidates, notes]
additionalProperties: false
strict: true
outputs:
report: "${data.steps.synthesize.json}"
namespaces_audited: "${data.steps.audit_namespaces.count}"
audit_trace: "${data.steps.audit_namespaces.results}"Semantic view
Workflow graph
✓ Semantically valid
Generated from the validated YAML with GnOuGo.Flow.Mermaid. Emit steps are hidden to keep the execution graph focused.
flowchart TD
n0_start(("Start"))
n1_end(("End"))
n2_inputs[/"Inputs: model, namespaces, server"/]
n3_discover_cluster_tools[("discover_cluster_tools - mcp.list")]
n4_audit_namespaces{{"audit_namespaces - loop.parallel"}}
n5_audit[("audit - mcp.call")]
n6_loop_exit(("Loop exit"))
n7_synthesize>"synthesize - llm.call"]
n8_outputs[/"Outputs: audit_trace, namespaces_audited, report"/]
n0_start --> n2_inputs
n4_audit_namespaces -->|loop body| n5_audit
n5_audit --> n6_loop_exit
n3_discover_cluster_tools --> n4_audit_namespaces
n6_loop_exit --> n7_synthesize
n2_inputs --> n3_discover_cluster_tools
n7_synthesize --> n8_outputs
n8_outputs --> n1_end