GFS Platform · R588 task-first operating deck

Admin dashboard

Internal operating deck. Cmd+K for the command palette (or click the chip bottom-right).

Needs attention
Events (live feed)
Last sync
$AI · last 60 min
🔔 Needs your attention scanning live signals…
Polling /api/healthcheck · /api/intake/queue · /api/events/recent · /api/admin/customer-health/at-risk · /api/sync-status…

Surfaces only what's actionable RIGHT NOW. Rules: HITL>0 · red-tier health customers · failing crons 24h · CostCapDO breach · active bid deviations · workflow.failed 24h · sync errors 2h. Cards hidden when value=0.

⚡ Live now 5s polling · pauses when tab hidden
Active sync tier
scheduled() per wrangler.jsonc
AI spend rate
$/min
last 60 min · CostCapDO $5/day
Next cron fire
wrangler.jsonc
Running workflows
0
status=running in workflow_run_log
Events 24h
append-only ledger
Live event stream · /api/events/recent connecting…
waiting for first poll…

Color: price hitl sync email workflow customer ar. Click any row → /timeline.html

📚 Reference · facts & drill-ins click 26 contracts-style numbers to expand inline
Platform at a glance: · · · · · · 36 ADRs · 3,371 corpus chunks · v10 audit 87.1/B
Worker
checking…
D1 rows
tables · views
Last sync
stale —
NS rows synced 24h
errors
Council runs 24h
avg $ · % cache hit
Pending review
Training progress
/235
System status

💬 Quick chat — scoped by pillar 10 chat roles · 7 job pillars + admin + 2 specialist

R96 consolidated 11→7 pillars; R52 added admin + 2 specialist roles for 10 total. Order Mgmt absorbs Inventory + Logistics + USDA; Reports merged into All. Bid kept separate from Price. Each pillar narrows the chat's tool set + lowers cost (single-mode pillars ~30× cheaper than council). Council v2 is the default chat mode (~$0.007/query). Click to open chat scoped to that pillar.

🌐 All (Admin · council) 💵 Price Admin 🥗 Nutrition Admin 💰 Finance Admin 🤝 Relationship Admin 📦 Order Mgmt Admin 🎯 Bid Admin 🏭 Production Admin 🎓 Train the system →

🧱 Substrate R549–R586 · the operating fabric

The substrate-level systems that make every workflow auditable, every event observable, and every decision reversible. Live counts pull from /api/healthcheck, /api/tool-registry/list, /api/workflow/runs, /api/events/recent, /api/admin/compute-customer-health-now.

📚 Wiki Hub · NEW (R585–R586)

32 wikis · 12 sections each

The operating documentation layer. 32 workflow wikis × 12 sections = 384 documented surfaces. R586 added 4 new sections per wiki: Changelog · Schema · Runbook · Backlog. When something breaks at 2am, open the Runbook tab.

Open wiki index ↗
Workflow runner

26 v2 contracts · runs + verify

Contract-driven execution: 22 original + 4 NS expansion (R585e — work_order_lifecycle, assembly_build_request, inventory_reconciliation, sales_order_lifecycle). Logs to workflow_run_log, steps to workflow_step_log, verify scores to workflow_verify_results. R563 verify scheduler (8,38 * * * *).

Open ops console →
Event ledger

Events · workflow.completed / partial / failed

Append-only ledger (events) + drain state (event_drain_state) + subscriptions (event_subscriptions). Endpoints: /api/events/{record,drain,recent}.

Open timeline →
Customer health

At-risk customers · nightly compute

Predictive scoring via R558 nightly cron + R567 bootstrap. Tables: customer_health_scores, customer_health_signals, customer_health_score_history. Chat tools: get_customer_health_score, list_at_risk_customers.

Open health board →
Tool registry

50 tools · 10 role palettes

Registry-driven tool selection. Tables: tool_registry, tool_role_palettes, tool_invocations. Chat tool: search_tools. Seed: /api/admin/tool-registry/seed.

Open catalog →
Knowledge corpus

3,371 chunks · Vectorize ns_knowledge

NetSuite knowledge corpus indexed for chat. Table: knowledge_chunks. Refresh cron: 15 4 * * SUN (R566). Chat tool: search_netsuite_knowledge. Ingest: /api/knowledge/ingest.

Search via chat →
Reflexion + HITL

Self-correction log · atomic claim

Workflow self-reflection (reflexion_log) + R560 HITL race-fix (UPDATE…RETURNING atomic claim before enqueue). Every write-back to NS lands here for approval. Invariant: Mike is always the loop step.

Open HITL queue →

R586 wiki structure · 12 sections per wiki

R585 created the wiki hub (32 wikis × 8 sections). R586 extended every wiki with 4 new sections so operators have everything in one place:

R586 · NEW

📜 Changelog

Every R-tag that touched this workflow with the diff hash. Audit trail for behavior drift.

R586 · NEW

🗂️ Schema

D1 tables read/written + columns + indexes touched by the workflow. The mechanical contract.

R586 · NEW · 2am surface

🚨 Runbook

What to check when this workflow fails at 2am. Diagnostic queries, kill switch, rollback steps. Operators check Runbook first.

R586 · NEW

🎯 Backlog

Known gaps + planned improvements per workflow. Pulls forward from GAPS_TO_CLOSE.md.

📊 Live operations strip R586 · D1-backed snapshots

Build-time snapshots from D1. Numbers refresh per round; live tickers below pull from worker endpoints when bearer set.

AI spend 7d
$11.34
1,123 queries · council_v2 $9.46 / single $1.88
CostCapDO
$5/day
cap holds · per-role debit
Events 7d
580
workflow.* + sync.* + push.*
Workflow runs
0
workflow_run_log empty · runner active R549+
v10 design audit
87.1 / B
R585d · report
Migrations
129
R585e added 129_ns_expansion_workflows.sql

🗺️ Flow diagrams R586 · gfs-flows.pages.dev

104+ deployed flow diagrams covering every workflow, substrate system, and process graph. v10 cobalt design language applied (R578–R579 v9 + R585d v10 audit at 87.1/B). Each diagram is interactive — click nodes for popovers, see REAL vs STUB states, watch playback against the workflow runner (R571 Play animation + R572 node-active fix + R576 codex Majors fix).

R585 wave — 5 new high-value diagrams (agent C)

R583 wave — 5 refreshed system flows

R585e wave — 4 NS expansion contracts as flow diagrams

v10 tokens: cobalt palette · Inter + IBM Plex Mono · cobalt-tinted shadows · reduced-motion safe · dark-mode safe. Source: docs/GFS_DESIGN_V9_TOKENS.md + ~/.claude/skills/gfs-design-10.0/SKILL.md. Admin dashboard audit-fixed in R585d.

🎯 Bid command center B5875 · NYC DOE Food Distribution

Active bid response platform. 246 specs (Amend 13), 6 PPI tabs, GFS price quotes, Sept 2026 menus (214 rows, 5 core menus, K-8 + HS deduped, 100% dated), 34 Fall 2026 recipes. Live at gfs-nycdoe-hub.pages.dev. B5875 due 2026-06-03.

🚦 Pipeline health intake · learning · email

Live from /api/intake/queue, /api/learning/promotions, /api/mailbox-routes, /api/email-templates, /api/outbound-emails. Bearer required.

Pending review
Inbound (7d)
via mailbox routing
Outbound sent (7d)
all triggers
Last promotion
Mailboxes / templates
templates

checking…

Service health

Live checks against the Worker. If api.ai-globalfoodsolutions.co is unreachable, the page falls back to the workers.dev URL.

ServiceEndpointStatus
Worker — healthapi.ai-globalfoodsolutions.co/api/health
Worker — sync-statusapi.ai-globalfoodsolutions.co/api/sync-status
D1 databasegfs-netsuiteProvisioned
KV namespaceCACHE (e880e40b…)Provisioned
R2 bucketgfs-filesProvisioned
Custom domainapi.ai-globalfoodsolutions.co

Risk register

Strategic risks (separate from per-item GAPS tracker). Source: data/risk-register.json.

RiskDescriptionMitigation
Chartstone SPOFEntire sync pipeline depends on Chartstone Pro running on a single Mac. If machine is off/asleep/broken, D1 stops updating. No monitoring, no alerting, no failover.Move to Worker-based sync via SuiteAPI RESTlet (eliminates localhost dependency)
Single AdminOnly Michael Levine can deploy Workers, manage D1, rotate secrets, and access all CF/NS admin. Bus factor = 1.Document all procedures (done in runbook). Cross-train second admin. Share CF access.
No BackupsNo D1 backup strategy, no NS data export schedule, no disaster recovery plan. If CF account compromised, D1 data could be lost.D1 has point-in-time recovery (paid plan). Schedule regular wrangler d1 export.
48 Public SuiteletsInternal ops portal, all broker portals, and product program portals accessible without NS login. Data exposure risk.Audit each isonline=T deployment. Restrict internal ops immediately. Broker portals may need to stay public.

Known issues

Operational truth board — current bugs and limitations with status. Source: data/known-issues.json.

IssueStatusImpactFix
Cloudflare Access on PagesOPENTier 1 GAP — Pages site is wide-open. Internal data exposure risk.Configure CF Access policy (mikelevine@globalfoodsolutions.co email gate) on gfs-netsuite.pages.dev
Period close (NS)OPENAll 154 NS periods open since 2018. Tier 1 GAP. Affects financial integrity.Close historical periods in NS Setup → Accounting → Manage Accounting Periods
Worker sync cron stubFIXEDWas stub through R54; replaced by live tiered sync in R55–R121R55 TBA + custom RESTlet (customscript_gfs_platform_query)
sync.sh launchd quarantineOBSOLETELocal launchd retired — Worker scheduled() runs all sync nowNo action — local sync deprecated
Worker daily report emailTODOhandleDailyReport() still logs to console onlyImplement via Cloudflare Email Routing send
KV and R2 utilizationFIXEDBoth in active use: KV for cache/sessions/cost-caps; R2 for specs/bid attachments/SuiteAttachNo action
vb_lines coverageRESOLVED100% of bills with inventory items (11,631/11,631). Expense-only bills have no item lines by design.No action needed
Custom domain SSLCHECKVerify api.ai-globalfoodsolutions.co cert health quarterlyCheck CF dashboard Edge Certificates
No DKIM TXT record foundCHECKEmail deliverability may be affectedVerify in CF dashboard Email Routing
D1 scheduled backupTODOwrangler d1 export available manually; no scheduled jobAdd to wrangler cron or external job

Build status

Live snapshot of platform component readiness.

ComponentStatusNotes
Worker — REST endpointsComplete175+ endpoints, CORS, security headers, Bearer auth (R52 state)
D1 — schema + loadComplete162 tables (R563 verified), 311K+ rows, 129 migration files (R585e added 129_ns_expansion_workflows.sql)
Workflow runner (R549)Live26 v2 contracts (22 original + 4 NS expansion R585e). R571 Play animation + R572 node-active fix + R576 codex Majors fix + R585c audit findings. workflow_run_log + workflow_step_log + workflow_verify_results + reflexion_log
Event ledger (R555)Liveevents + event_subscriptions + event_drain_state. workflow.completed/partial/failed fire from runner
Customer health (R558/R567)LiveNightly compute + bootstrap. customer_health_scores + signals + history
Tool registry (R562)Live50 tools paletted to 10 roles. tool_registry + tool_role_palettes + tool_invocations
Knowledge corpus (R564)Live3,371 chunks in Vectorize ns_knowledge. Weekly refresh cron (R566). 32 wiki docs added R585 + 4 sections per wiki added R586 (Changelog/Schema/Runbook/Backlog).
HITL race fix (R560)LiveUPDATE…RETURNING atomic claim before enqueue
KV — CACHE namespaceIn useQuery cache, session storage, cost-cap counters
R2 — gfs-files bucketIn useSpec PDFs, bid attachments, SuiteAttach uploads
Vectorize — ns_knowledgeIn use3,371 NS knowledge chunks for chat retrieval (live D1 count)
Sync — Worker scheduled()Live14+ NS tables on 2/5/60-min tiers via SuiteAPI + custom RESTlet (R55–R121)
Pages — gfs-netsuiteDeployedConsolidated platform live
Pages — gfs-flows (R580–R586)Deployed104+ flow diagrams + 32 wikis (12 sections each = 384 surfaces) · v10 design language · audit 87.1/B · gfs-flows.pages.dev
Admin dashboard (this page)v10 audit-fixedR582 cobalt refresh → R585d v10 audit (87.1/B) → R587 R586 content refresh. Reduced-motion + dark-mode safe.
Pages — legacy gfs-system-guideDeprecatedPre-consolidation deploy, kept until migration confirmed
Cloudflare Access on PagesNot configuredTier 1 GAP — Pages site is wide-open
Period close (NS)OpenAll 154 periods open since 2018; Tier 1 GAP
Custom domain SSLPendingapi.ai-globalfoodsolutions.co serving HTTPS — confirm cert health
DKIM recordCheckEmail deliverability may be affected
git baselineActive69 commits, 4 tags (R52 state). Per-round commit discipline (R76+)
Backup strategy (D1)Partialwrangler d1 export available; scheduled job still a gap

Sync status & crons

NS-to-D1 sync runs in the Worker via scheduled() against SuiteAPI + custom RESTlet (R55–R121). 14+ NS tables on tiered cadence (2/5/60 min). See infrastructure → cron for the full wrangler.jsonc cron declaration.

JobSourceCadenceFunctionStatus
NS sync — hot tiersyncTable / handleSyncTierevery 2 minSOs, POs, invoices, customer payments deltaLive
NS sync — warm tiersyncTable / handleSyncTierevery 5 mincustomers, items, vendors, contactsLive
NS sync — cold tiersyncTable / handleSyncTierevery 60 minemployees, GL, departments, locations, subsidiariesLive
r563_verify_schedulerscheduled()8,38 * * * *Workflow verify-results sweep against workflow_run_logLive
r558_customer_healthscheduled()nightlyCompute customer_health_scores + signal extractionLive
r566_corpus_refreshscheduled()15 4 * * SUNRefresh knowledge_chunks → Vectorize ns_knowledgeLive
Worker cron 0 19wrangler.jsonc7pm dailyDaily report (handleDailyReport)Logs only

Integrations

Full inventory at NetSuite reference → integrations.

IntegrationInternal IDStatus
SuiteAttach File Upload RESTlettba:11/app:318active
NetSuite Analytics Warehousetba:2/app:11active
Atlas Agent (Read Only) - 315tba:10/app:315inactive
Atlas Agent (Read Only) - 314tba:9/app:314inactive
Twin Agenttba:8/app:313inactive
integrator.io (Celigo) 1tba:7/app:112inactive
integrator.io (Celigo) 2tba:6/app:112inactive
integrator.io (Celigo) 3tba:5/app:112inactive
Zapier 1tba:4/app:12inactive
Zapier 2tba:3/app:12inactive
Tray.IOtba:1/app:4inactive
Chartstone Toolkit RESTletrestlet:2949active
SuiteAPI RESTletrestlet:2948active
File Upload RESTlet (SuiteAttach)restlet:2512active
Attach File - Zapier RESTletrestlet:989active
Celigo IO RESTlets (5)restlet:1805-1811active
Zapier Suite (13 RESTlets)restlet:990-2747active
ECOB Bill of Lading Integrationbundle:312584active
Cash 360 Bundlebundle:cash360active
Costed BOM Bundlebundle:costedbomactive
APM Bundlebundle:apmactive
Last Sales Activity Bundlebundle:lsaactive
Allergen Statement Bundlebundle:allergeninactive
Dashboard Tiles Bundle (185219)bundle:185219active
Dunning Bundle (392827)bundle:392827active
Electronic Payments Bundle (533070)bundle:533070active
Supply Chain Management Bundle (47193)bundle:47193active
Tax Audit Files Bundle (4599)bundle:4599active
Prompt Payment Discount Bundle (STC)bundle:stcactive
NetSuite PS/PM Bundle (39609)bundle:39609active
Vendor Bill Bundle (240841)bundle:240841inactive
Client Audit Trailbundle:catactive
File Drag and Dropbundle:filedragdropactive
SII (Spain) Bundlebundle:siiinactive
Intrastat Bundlebundle:intrastatinactive
Norway SAF-T Bundlebundle:saftnoinactive
UAE Emirate Bundlebundle:uaeinactive
France Tax Bundlebundle:frinactive

Pricing pipeline status ADR-012 · Phase 1 done

Live pull from /api/pricing/audit/summary. Static counters fall back to the last documented derive if the API is unreachable. Full procedures in runbook → pricing pipeline. Roadmap in cloudflare → pricing roadmap.

Proposed rows
661
103 customers, 219 items
median_last_3
445
67%
last_paid
216
33%
Open SOs in flight
90
33 customers
Last derived
2026-05-20

Three-bucket diff

BucketRowsAction
Listed + Recent434Drift check — compare proposed vs current price, flag > threshold
Listed + Stale830Deprecate — item on NS list but no invoice in 18+ months
Not-Listed + Recent227Close gap — customer is buying but not on NS price list (negotiated at SO time)

Live operations round 7 wire-up

Live from /api/healthcheck, /api/ai/metrics, /api/ai/caps, /api/ns/touchpoints, /api/bids, /api/mapping/unmatched. Bearer required; placeholders shown when no key.

Healthchecks (ADR-018)

Enabled
of 17 seeded
Unresolved
all severities
Critical
requires action
High
Medium
Last run

AI economics (ADR-020/021)

Calls (30d)
Cost (30d)
Errors (30d)
Cache hit rate
target ~70%
Tier escalation
vision tier-2 use
Today cap (total)
3 tiers seeded
Spent today
Headroom

NetSuite touchpoints (ADR-019)

Writes (30d)
Reads (30d)
Gov units
Errors
Mirror drift
UI overwrite signal
Conflicts

Bids (Pillar 2)

Pending review
Effectively overdue
due_date past
Awarded

Mapping coverage (Phase 4 prereq)

Customer mapped
unmatched
Item mapped
unmatched

Data quality

Grades reflect coverage of mandatory or important fields per entity.

EntityRowsGradeNotes
Customers283B71% have terms set (28 missing), category gaps on ~10%
Vendors484F93% missing payment terms (451), 70% missing emails (341)
Items1,148F78% missing GTIN/UPC (765), 71% missing case weight (694), 75% missing storage temp
Transactions102,367AFull coverage 2018-2027, all 20 types, sync running
Customer pricing1,264CStale-price alert exists, manual refresh
Employees116BAll active employees, some role assignments incomplete
GL accounts152AFull chart of accounts
Contacts490BCoverage adequate, email/phone gaps on some entities

NetSuite reference at a glance

Scripts
1,141

Related surfaces 70+ surfaces · all internal

Operations

Ops console

Workflow runs, step logs, verify scores, reflexion entries. Live view into the workflow runner.

Observability

Event timeline

Append-only event ledger. workflow.* + sync.* + push.* + intake.* events with drain state.

Predictive

Customer health board

At-risk customers, signal breakdown, score history. Updated nightly.

Active bid

Bid command center

B5875 NYC DOE — specs, pricing, USDA, submissions. Due 2026-06-03.

HITL

Proposed actions

AI-proposed writes pending Mike's approval. Every NS write-back lands here first.

Registry

Tools catalog

50 tools paletted to 10 roles. Live invocation stats per tool.

Pricing

Cost ingestion

Vendor cost upload + diff vs current item costs. Pre-pricing-roll workflow.

Diagrams ↗

Flow diagrams (104+)

26 contracts + 27 archify + 4 substrate + 11 system + 32 wikis. v10 cobalt design (audit 87.1/B).

Wiki hub ↗

Wiki hub · 32 wikis

32 wikis × 12 sections = 384 documented surfaces. R586 added Changelog/Schema/Runbook/Backlog per wiki.

Live ticker ↗

AI cost surface (live)

$11.34 / 1,123 queries · 7d. Council_v2 vs single split. CostCapDO $5/day cap holds.

Procedures

Runbook

Onboarding, secret rotation, incident response, pricing procedures.

Reference

Infrastructure

175+ Worker endpoints, cron, bindings, secrets map, DNS records.

Reference

Cloudflare

Workers, D1, KV, R2, Vectorize, Queues, Workflows, Durable Objects, Pages.

Reference

Data model

162 D1 tables, schema, relationships, KV/R2 usage.

Reference

NetSuite reference

Every NS object across 15 categories — 3,486 items.

Operating doc

Decision log · 36 ADRs

All architectural decisions including ADRs 032–036 (R561 substrate batch).

Tracker

Gaps to close

4-tier backlog. Tier 1: CF Access on Pages + period close.

Blueprint

Architecture blueprint

Full platform architecture incl. R549–R580 substrate arc.