EA Publishing Process

Step-by-step runbook from extracted CSVs to a live client portal. The process has a hard gate: CSVs must be validated before D1 seeding. D1 is never the editing surface.

What Are You Publishing?

Full EA Catalog → D1 + Pages

You have validated CSVs and want to publish/update the customer's live catalog site. Follow Steps 1–5 below.

HTML Deliverable → JCT Portal

You have a standalone HTML file (DAE deliverable page) and want to push it to the client's JCT Cloudflare Pages portal. Follow Steps 4b–5b below.

Steps 1–5: CSV → D1 → Pages

1
Validate CSVs
Correction loop before any D1 write

Run the validation skill on your objects + relations CSVs. Fix any issues before proceeding.

/ea:leanix-catalog-extract [path-to-csv-directory] ← Validation mode (auto-detected from existing CSVs)
Checks performed: missing required fields, ID prefix/type mismatches, orphan objects (no relations and no Parent_ID), missing Display_Names, invalid relationship types, broken Parent_ID references.
Gate: Do not proceed to Step 2 until /api/orphans returns empty and all required fields are populated.
2
Generate seed SQL
CSV → SQL import file for D1

The importer reads CSVs from the customer's OneDrive folder and generates a seed SQL file. Source folder is configurable via DEMANDES_ROOT.

# From experiments/dae-catalog-d1/
npm run seed:transgesco # CSV → transgesco-seed.sql
npm run seed:stm # CSV → stm-seed.sql

Source: %USERPROFILE%/OneDrive - STM/agent-ea/demandes-ae/

3
Test locally
Verify D1 + Pages before remote deploy
npm run db:transgesco # schema + seed into local DB
npm run dev:transgesco # http://127.0.0.1:8789
npm run db:stm # schema + seed into local DB
npm run dev:stm # http://127.0.0.1:8788

No Cloudflare account needed for local testing. Verify orphan check: visit http://127.0.0.1:8789/api/orphans → should return [].

Never run customers combined. Always pick one customer per npm run command. There is no bare wrangler.toml — every wrangler call must pass an explicit --config wrangler.<customer>.toml.
4
Deploy to Cloudflare
Authenticate once, then push per-customer

One-time setup: Run this interactive browser OAuth with the ! prefix in Claude Code session:

! npx wrangler login

Then per customer:

# Transgesco
npx wrangler d1 execute transgesco --config wrangler.transgesco.toml --remote --file=schema.sql
npx wrangler d1 execute transgesco --config wrangler.transgesco.toml --remote --file=transgesco-seed.sql
npm run deploy:transgesco
# STM
npx wrangler d1 execute stm --config wrangler.stm.toml --remote --file=schema.sql
npx wrangler d1 execute stm --config wrangler.stm.toml --remote --file=stm-seed.sql
npm run deploy:stm

The D1 DB IDs are already set in each wrangler.<customer>.toml. Free tier: D1 5 GB / 5M reads per day; Pages unlimited static.

5
Generate delivery bundle
Portable .sqlite + CSV for client handover

The delivery bundle is the contractual deliverable. It runs independently of the factory and of any specific LLM or tooling (foundry rule).

wrangler d1 export transgesco --config wrangler.transgesco.toml --output transgesco.sqlite
# + include the validated CSVs alongside the .sqlite

Hand the bundle to the client: they get the .sqlite + CSVs. Same schema on both sides. They can query it with any SQLite tool.

Steps 4b–5b: HTML Deliverable → JCT Portal

For standalone HTML deliverable files (DAE pages, diagrams, analysis docs) that go to the client's JCT portal. No D1 involvement — direct git push to the portal repo.

4b
Copy HTML to portal repo
Clone is at C:\tmp\jct-{client}
# Working clone: C:\tmp\jct-transgesco
cp [path-to-html-file] "C:\tmp\jct-transgesco\public\[dest-path]"

Each client has a GitHub repo at bockbr/jct-portail-{client} and a local clone at C:\tmp\jct-{client}. The portal uses Cloudflare Pages — every push to main triggers a deploy.

5b
Commit and push
Cloudflare Pages deploys automatically on push
cd "C:\tmp\jct-transgesco"
git add [file]
git commit -m "publish: DAE-0007 [page description]"
git push origin main

Live at transgesco.jacksoncreektech.ca/[dest-path] within ~60 seconds. Auth is Cloudflare Access (Zero Trust Free) — one-time PIN to client email.

Quick Reference

Customer Wrangler config Local port Portal URL Git repo
Transgesco wrangler.transgesco.toml :8789 transgesco.jacksoncreektech.ca bockbr/jct-portail-transgesco
STM wrangler.stm.toml :8788 stm.jacksoncreektech.ca bockbr/jct-portail-stm