# Scripts Directory

## Structure
| Directory | Purpose | Primary Agent(s) |
|-----------|---------|-------------------|
| `core/` | System operations — session compaction, email checks, heartbeats, QMD, memory | **Kitt** |
| `discord/` | Discord posting, webhooks, team show, Twitter/X API wrappers | **Kitt**, **Julia** |
| `email/` | Gmail send/read, calendar, contacts, OAuth | **Kitt** |
| `figma/` | Figma relay, slide manipulation, component inspection, content push | **Jessica**, **Thibault** |
| `images/` | Image generation, compression, compositing, upload, postprocessing | **Tatiana**, **Thibault** |
| `notion/` | Notion API — inspiration imports, dedup, sync, content push | **Julia**, **Kitt** |
| `taste/` | Taste board — ingestion, screenshots, DNA extraction, cover sync | **Julia**, **Tatiana** |
| `visual-capture/` | Website screenshots, Behance scraping, agency captures | **Julia** |
| `visual-research/` | Brand New, Creative Boom scraping, image tagging | **Julia** |
| `legacy/` | Archived duplicates and versioned scripts — DO NOT USE | None |

## Rules
1. **No new scripts in `legacy/`** — it's an archive
2. **No `tmp/` or `utils/` dirs** — put scripts in the right functional directory
3. **Agent-specific one-offs** stay in `agents/[name]/` if they won't be reused
4. **Shared utilities** go in the matching functional directory above
5. **Name clearly** — `figma-push-all-copy.cjs` not `script2.cjs`

## Key Scripts by Agent

### Kitt (Infrastructure)
- `core/auto-compact-sessions.py` — Session hygiene
- `core/check-kitt-email.py` — Email monitoring
- `core/qmd-compact.py` — Working memory compaction
- `core/memory-compact-monthly.py` — Memory file maintenance
- `core/heartbeat-day.sh` / `heartbeat-night.sh` — Cron heartbeats
- `email/send_email.py` — Send via Gmail API
- `email/read_email.py` — Read inbox
- `email/gcal-create.py` — Create calendar events
- `discord/team-show.cjs` — Team intro webhook show

### Julia (Research & Publishing)
- `visual-capture/capture-agency-screenshots.js` — Agency site screenshots
- `visual-capture/scrape-behance*.cjs` — Behance scraping
- `visual-research/scrape-brandnew.js` — Brand New scraping
- `visual-research/scrape-creativeboom.js` — Creative Boom scraping
- `taste/taste-ingest.py` — Taste board ingestion
- `taste/taste-smart-capture.py` — Smart screenshot capture
- `taste/extract-taste-dna.py` — Visual DNA extraction
- `notion/inspo_notion_import.py` — Inspiration to Notion
- `notion/notion-sync.py` — Notion sync
- `discord/twitter_*.py` — X/Twitter API scripts

### Jessica (Art Direction & Layout)
- `figma/figma-relay-web.cjs` — Figma bridge relay
- `figma/figma-read-doc.cjs` — Read Figma document
- `figma/figma-push-all-slides.cjs` — Push slide content
- `figma/figma-update-slides.cjs` — Update existing slides
- `figma/figma-inspect-frames.cjs` — Inspect frame structure
- `figma/scan-components.cjs` — Component inventory
- `images/compress-images.js` — Image compression (before deploy)

### Tatiana (Visual Execution)
- `images/gen-*.py` — Image generation scripts (Gemini/Imagen)
- `images/image_processor.py` — Image processing
- `images/image-postprocess.py` — Post-processing
- `images/composite-panel.py` — Panel compositing
- `images/composite-slide.py` — Slide compositing
- `images/compress-images.js` — Compression before delivery
- `taste/taste-screenshots.py` — Reference screenshots

### Thibault (Engineering)
- `figma/figma-relay-web.cjs` — Figma bridge maintenance
- `figma/recraft-to-figma.cjs` — Asset pipeline
- `images/compress-images.js` — Build-step compression
- `images/upload-image.cjs` — Image upload
- `images/set-image-fill-func.js` — Figma image fills

### Ogilvy (Copy)
- No scripts — works with file read/write and COPY-STANDARDS.md

### Anton (Quality)
- No scripts — works with file read and STANDARDS.md / VISUAL-STANDARDS.md / COPY-STANDARDS.md
