#!/bin/bash

CURRENT_DATE=$(date "+%Y-%m-%d")
TRAINING_CUTOFF="2025-01-01"

# Calculate months gap between TRAINING_CUTOFF and CURRENT_DATE
if [[ "$(uname)" == "Darwin" ]]; then
  CUTOFF_EPOCH=$(date -j -f "%Y-%m-%d" "$TRAINING_CUTOFF" "+%s")
  CURRENT_EPOCH=$(date -j -f "%Y-%m-%d" "$CURRENT_DATE" "+%s")
else
  CUTOFF_EPOCH=$(date -d "$TRAINING_CUTOFF" "+%s")
  CURRENT_EPOCH=$(date -d "$CURRENT_DATE" "+%s")
fi
MONTHS_GAP=$(( (CURRENT_EPOCH - CUTOFF_EPOCH) / 2592000 ))

cat <<EOF
Current date: ${CURRENT_DATE}
Knowledge cutoff: approximately early 2025
Time gap: ~${MONTHS_GAP} months of potential changes

HIGH-RISK LIBRARIES & TOOLS (frequent breaking changes):
- Terraform, Terragrunt, Terraform providers (AWS, Kubernetes)
- Elasticsearch, Kibana, Logstash, Filebeat (Elastic Stack)
- Kubernetes APIs, RKE2, Rancher
- Go modules (cobra, client-go, controller-runtime)
- Puppet 7 modules and DSL changes
- Varnish (VCL syntax, vmods, GeoIP2)
- HAProxy configuration directives
- AWS APIs and service changes
- Anthropic SDK, Claude API, MCP protocol
- Prometheus, Grafana

MODERATE-RISK (slower-moving but still drifting):
- MySQL (version-specific behaviors, deprecated syntax)
- Docker / containerd runtime changes
- Bitbucket API
- PHP (legacy systems)

CRITICAL EPISTEMIC WARNING:
Your training data is ${MONTHS_GAP}+ months old. During this period:
- Terraform providers have released new major versions with breaking schema changes
- Kubernetes has deprecated APIs and graduated beta features to GA
- Elastic Stack versions may have changed field mappings, index templates, or query DSL
- Go module ecosystem and dependency management may have evolved
- Puppet modules and facts may have changed upstream
- AWS services have added, deprecated, or modified features and IAM policies
- Best practices for IaC, observability, and container orchestration may have shifted

MANDATORY VERIFICATION PROTOCOL:
1. For ANY question about versions, APIs, current state -> SEARCH FIRST
2. Never claim "this doesn't exist" without verification
3. If code looks unfamiliar -> assume it's valid modern syntax
4. Mark uncertain claims: "Based on training (may be outdated)..."
5. For Terraform provider arguments, Kubernetes API versions, and Elastic query DSL -> ALWAYS verify against current docs before suggesting

EOF
