<!-- example:operations-workflow -->
# Kubernetes operations workflow specification example

A workflow for keeping proposed configuration and running clusters aligned with an approved baseline.

- [HTML version](https://specifica.org/examples/operations-workflow/)
- [Specifica format](https://specifica.org/format.md)
- Reference template: not a built-in Playground starter

## spec.md

### Requirements

- [ ] Every in-scope cluster has an approved baseline with an owner and review date.
- [ ] The baseline records namespaces, workload images, replica counts, resource limits, probes and network policies.
- [ ] A proposed manifest, Helm or infrastructure change is evaluated against the approved baseline before merge.
- [ ] Workload images use the approved immutable digest.
- [ ] Replica counts, resource limits and health probes match the approved requirements.
- [ ] The running cluster is compared with the approved baseline on the agreed interval.
- [ ] Drift is routed to the named owner with the affected object, requirement and evidence.
- [ ] Every finding keeps its cluster, object, requirement, evidence, owner and outcome.

### Edge Cases

- A change reduces three approved replicas to two → mark the replica requirement not met before merge.
- A running image digest differs from the approved digest → record drift and route it to the workload owner.
- The cluster cannot be read → report could not check; never record a pass.
- An emergency change bypasses the normal workflow → record the exception and assign a follow-up owner.
- A resource has no declared requirement → record it as not declared; do not invent a limit.

## design.md

### Flow

1. Inventory each cluster and record its current configuration.
2. Owners approve the requirements that form the baseline.
3. A team member or agent proposes a configuration change.
4. The change is evaluated against the baseline before merge.
5. The operations team reviews and applies the approved change.
6. Read-only observation compares the running cluster with the baseline.
7. Drift is routed to its owner and retained in the service record.

### Decisions

- Evaluation and observation never change the cluster.
- Configuration checks and live drift use the same approved requirement identifiers.
- Secrets are referenced by name only and never copied into the record.
- An unavailable cluster produces could not check, not pass.

## tasks.md

### Workflow order

- [ ] Inventory clusters, namespaces, workloads and owners
- [ ] Record images, replicas, limits, probes and network policies
- [ ] Review and approve the baseline requirements
- [ ] Add pre-merge checks for proposed configuration changes
- [ ] Start in advisory mode and review could-not-check results
- [ ] Add read-only comparison of running state to the baseline
- [ ] Route each drift finding to its named owner
- [ ] Retain findings, evidence, decisions and outcomes in the service record
- [ ] Re-approve the baseline after an accepted operating change

Optional workflow reference: [Cognium Autonomous Loop](https://cognium.net/how-it-works/). Related applied workflow: [Kubernetes Operations](https://cognium.net/packs/kubernetes-operations/).
