Skip to content

Latest commit

 

History

History
60 lines (51 loc) · 3.67 KB

File metadata and controls

60 lines (51 loc) · 3.67 KB

AGENTS.md — guide for coding agents

This repo is a test station for VEDA GitHub Actions + Netlify dashboards. Full context is in CLAUDE.md; app-specific docs are in docs/.

Environment

  • Python 3.12, standard library only for all generators (no pip install, no requests, no boto3). AWS pricing is pulled from AWS's public Price List Bulk API — no credentials.
  • Node 18+ for the dashboards (cost-dashboard/, fte-dashboard/, …): cd <dir> && npm ci. CI and Netlify both run Node 24 (Netlify auto-installs it; no NODE_VERSION var needed).
  • Quick checks: python3 aws-pricing/test_generate.py (offline golden test), cd cost-dashboard && npm run typecheck && npm run build.
  • Algorithm Catalog checks (stdlib-only, no install): python3 algorithm-catalog/scripts/validate_data.py and python3 algorithm-catalog/scripts/rules_parity_test.py, then cd algorithm-catalog && npm run typecheck && npm run build.

Conventions

  • Match surrounding style; keep generators stdlib-only and deterministic (they take --now).
  • Netlify "Pattern B": each dashboard owns its <dir>/netlify.toml; there is no root netlify.toml. The base directory is set in the Netlify UI, and build command + publish directory are left EMPTY. A blank base dir fails silently — green deploy, 404 site, Starting to deploy site from '/' in the log.
  • algorithm-catalog/src/rules.ts and scripts/validate_data.py are mirrors. Edit one → edit the other → run scripts/rules_parity_test.py. It fails on drift, including a new exported constant.

⭐ Scheduled task: Weekly AWS pricing review (run Monday evening)

Goal: pull the latest AWS On-Demand prices, compare to the committed snapshot, and open a PR that updates it — and if any price moved more than 1%, make that impossible to miss.

Do exactly this:

  1. Fetch fresh prices for the default regions (heavy EC2 files; ~1–2 min each):
    python3 aws-pricing/generate_aws_pricing.py --region us-east-1,us-west-2,eu-west-1 \
      --out-dir /tmp/new --now "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
  2. Diff each region against its committed snapshot and generate the combined report:
    python3 aws-pricing/pricing_diff.py --regions us-east-1,us-west-2,eu-west-1 \
      --old-dir cost-dashboard/public/data --new-dir /tmp/new \
      --threshold 1.0 --out-md PRICING_CHANGES.md --out-summary /tmp/summary.json
  3. If /tmp/summary.json has "changed": false, do nothing (no PR).
  4. Otherwise, in the PR:
    • Update each reviewed region's cost-dashboard/public/data/pricing_<region>.json (and index.json).
    • Save the report to cost-reports/weekly-<YYYY-MM-DD>.md.
    • Use PRICING_CHANGES.md as the PR body verbatim — it already contains the loud 🚨 spike banner and giant headers. Do not soften or summarize it away.
    • Use summary.json's title as the PR title — for a spike it starts with 🚨 AWS pricing SPIKE ±X% so it's impossible to miss in the PR list.
  5. Spikes = any price where |Δ| > 1%. If there are spikes, the biggest one must be shouted at the very top of the PR body (the report already does this). Never bury a spike.

Rules: On-Demand prices only; they are approximate. Keep the report's alarm formatting loud — the whole point is that a >1% move is obvious at a glance. One PR per run; if a same-day PR exists, update it.

This runs automatically every Monday evening via .github/workflows/aws-pricing-review.yml (a plain price-diff — no external agent required). Test the alert formatting with its demo_spike input (or pricing_diff.py --demo-spike), which injects a synthetic +7.3% move.