Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .claude/agents/planner-migration-auditor.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ tools: Read, Grep, Glob, Bash
model: inherit
---

You are the **planner-migration auditor** for AEDIN. The crop planner is **NOT dead code** — it is being **migrated to the separate PolyCrop repo** (`/home/beef/projects/polycrop/`). aedin is academic + bot-facing; PolyCrop owns the consumer planner. Your job is to report the migration's true state across BOTH repos, dependency-aware, so the team neither removes something still depended on nor assumes something migrated that isn't. Read-only — never delete or edit.
You are the **planner-migration auditor** for AEDIN. The crop planner is **NOT dead code** — it is being **migrated to the separate PolyCrop repo** (checked out alongside this one). aedin is academic + bot-facing; PolyCrop owns the consumer planner. Your job is to report the migration's true state across BOTH repos, dependency-aware, so the team neither removes something still depended on nor assumes something migrated that isn't. Read-only — never delete or edit.

## Context (verify, don't trust — this drifts)
As of 2026-06-25: aedin's `/api/planner/*` endpoints were ALREADY removed (`grep /api/planner backend/server.js` = 0; server.js comment "PolyCrop owns the planner now"), BUT PolyCrop had **no backend** and its `src/CropPlanner.tsx` still fetched aedin's `/api/planner/*` via `API_BASE` (default `http://localhost:3001`) — i.e. the planner was BROKEN mid-migration. Re-verify; do not rely on this paragraph.

## What to check — BOTH repos

### aedin (source: /home/beef/projects/aedin)
### aedin (source: this repository)
1. `grep -nE "/api/planner" backend/server.js` — endpoints present or removed?
2. Residual artifacts: `migrations/002_planner_schema.js`; tables `tritrophic_chains` / `beneficial_chains` (drop candidates IF empty) / `companion_scores` (KEEP — derived academic data product, not consumer-served). Query row counts read-only via `backend/lib/db-paths.cjs` CORPUS_DB (or the aedin-corpus MCP).
3. Any remaining `*planner*` scripts.

### PolyCrop (destination: /home/beef/projects/polycrop)
4. **Does PolyCrop have a backend at all?** (`ls polycrop/backend`; grep `src` for `express`/`app.listen`/`createServer` — IGNORE `dist/` build bundles, they're compiled frontend). No backend ⇒ it cannot serve the `/api/planner/*` its own frontend calls.
### PolyCrop (destination: the PolyCrop checkout)
4. **Does PolyCrop have a backend at all?** (`ls <polycrop>/backend`; grep `src` for `express`/`app.listen`/`createServer` — IGNORE `dist/` build bundles, they're compiled frontend). No backend ⇒ it cannot serve the `/api/planner/*` its own frontend calls.
5. **Does PolyCrop's frontend still call aedin's planner over HTTP?** grep `src` for `/api/planner` + `API_BASE`/`VITE_API_URL`. If yes AND aedin removed them AND PolyCrop has no backend ⇒ the planner is BROKEN.
6. What planner assets already live in PolyCrop (`CropPlanner.tsx`, `polyculture_planner_schema*.sql`).

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ backend/globi-interactions.tsv.gz
.wrangler/

# Re-ingest campaign workspace (regenerated by multi-critic-batch-prepare.js;
# verdicts produced by subscription-mode agents per GUAM-REINGEST-RESUME.md)
# verdicts produced by subscription-mode agents)
backend/critic-batches/
backend/critic-verdicts/
backend/critic-batches-recovery/
Expand Down
75 changes: 0 additions & 75 deletions backend/GUAM-REINGEST-RESUME.md

This file was deleted.

2 changes: 1 addition & 1 deletion backend/prompts/role-agent-interactive.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ You are an ecological role-assignment agent for the AgroEco Explorer database. Y

## Context

**Database location:** `/home/beef/AgroEco/backend/globi.sqlite`
**Database location:** `backend/globi.sqlite`

**Key tables:**
- `entities` — organisms with `primary_role`, `bio_category`, `family`, `genus`
Expand Down
22 changes: 0 additions & 22 deletions backend/recovery-939-prompt.txt

This file was deleted.

4 changes: 2 additions & 2 deletions backend/scripts/backup-globi-to-nas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
#
# Schedule via cron:
# crontab -e
# 0 3 * * * /home/beef/projects/agroeco/backend/scripts/backup-globi-to-nas.sh >> /home/beef/.local/share/agroeco-backup.log 2>&1
# 0 3 * * * /path/to/aedin/backend/scripts/backup-globi-to-nas.sh >> "$HOME"/.local/share/aedin-backup.log 2>&1

set -euo pipefail

# ─── Defaults (override in ~/.agroeco-backup.conf) ───────────────────────
SOURCE_DB="/home/beef/projects/agroeco/backend/globi.sqlite"
SOURCE_DB="$(cd "$(dirname "$0")/.." && pwd)/globi.sqlite"
NAS_HOST="REPLACE_WITH_NAS_HOSTNAME_OR_IP" # e.g. 192.168.1.100 or yournas.local
NAS_USER="REPLACE_WITH_NAS_USERNAME" # your Synology DSM user
NAS_PATH="/volume1/backups/agroeco" # path on the NAS
Expand Down
2 changes: 1 addition & 1 deletion backend/scripts/fetch-uog-ceo-pdfs.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* publications via the publications-press.uog.edu Laravel API, then download
* the ag/IPM-scope PDFs to literature/extension/ for the Pass-13+ ingest pipeline.
*
* API discovery notes (see GUAM-REINGEST-RESUME.md for the Pass-12 playbook):
* API discovery notes:
* - publications-press.uog.edu is a Nuxt SPA backed by a Laravel API. The
* SPA viewer URL (/ceo/technicalreport/<slug>/<id>) is JS-only, but the
* underlying API is plain JSON over POST.
Expand Down
2 changes: 1 addition & 1 deletion backend/smoke-provenance-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail
cd "$(dirname "$0")"

DB="${SMOKE_DB:-${TMPDIR:-/tmp}/globi-provenance-e2e.sqlite}"
PROD_DB="${PROD_DB:-/home/beef/projects/agroeco/backend/globi.sqlite}"
PROD_DB="${PROD_DB:-$(dirname "$0")/globi.sqlite}"

if [ ! -f "$PROD_DB" ]; then
echo "ERROR: production DB not found at $PROD_DB"
Expand Down
2 changes: 1 addition & 1 deletion backend/smoke-substrate-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail
cd "$(dirname "$0")"

DB="${SMOKE_DB:-/tmp/globi-substrate-e2e.sqlite}"
PROD_DB=/home/beef/projects/agroeco/backend/globi.sqlite
PROD_DB="${PROD_DB:-$(dirname "$0")/globi.sqlite}"

if [ ! -f "$PROD_DB" ]; then
echo "ERROR: production DB not found at $PROD_DB"
Expand Down
2 changes: 1 addition & 1 deletion backend/smoke-variety-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -euo pipefail
cd "$(dirname "$0")"

DB="${SMOKE_DB:-${TMPDIR:-/tmp}/globi-variety-e2e.sqlite}"
PROD_DB="${PROD_DB:-/home/beef/projects/agroeco/backend/globi.sqlite}"
PROD_DB="${PROD_DB:-$(dirname "$0")/globi.sqlite}"

if [ ! -f "$PROD_DB" ]; then
echo "ERROR: production DB not found at $PROD_DB"
Expand Down
Loading