Operator drives the Bid Center live via chat tools (add customer, update pricing, fill regional, compare quotes). Session opens three ways: /gfsbidsandprices slash command, drop the Bids_and_Customer_Pricing folder into Claude.ai, or invoke a chat tool directly via /api/tools/invoke. The operator picks one of the 11 skill workflows (see step 7). The skill reads STATUS.json, applies edits to the folder, builds outputs. On skill completion, scripts/post-session-sync.js runs and pushes every changed file to /api/tools/invoke with the X-Sync-Source: customer-pricing-folder header. R614 added a post-sync self-check (calls /api/healthcheck + verifies table-count deltas). Per ADR-031 every write lands in proposed_actions; Mike approves via the admin dashboard before the write is committed to D1 / NS. Per ADR-039 the operator writes ONLY through the folder — no direct API writes from the chat UI — enforced at runtime by R603's edit_mode_guard.ts.
edit_mode_guard.tsVerified against source-documents/Bids_and_Customer_Pricing/Prompts/ on 2026-05-27. Each .md file is one workflow. Count: 11.
| # | workflow | purpose (one-liner) |
|---|---|---|
| 1 | ADD_UPDATE_CUSTOMER_PRICING | upsert pricing for a customer + SY-version |
| 2 | ADD_UPDATE_ITEM | upsert an item / spec across customers |
| 3 | ARCHIVE_CUSTOMER | retire a customer; freeze quote history |
| 4 | BID_PIPELINE | register an active bid in the pipeline |
| 5 | COMPARE_CUSTOMER_QUOTES | diff two SY-versions for a customer |
| 6 | CREATE_NEW_CUSTOMER | onboard a new customer (folder + bid_customers) |
| 7 | FILL_REGIONAL_PRICES | regional price fill across SKUs |
| 8 | LOG_EXTERNAL_BID | append a competitor / 3P bid to External_Bids/bids_log.json |
| 9 | PREPARE_NEXT_SCHOOL_YEAR | roll customer to next SY-version baseline |
| 10 | REBUILD_REGIONAL_SHEETS | regenerate regional sheets from D1 + folder |
| 11 | SYSTEM_HEALTH_CHECK | verify folder ↔ D1 parity + freshness |
| kind | name | purpose |
|---|---|---|
| Entry point | /gfsbidsandprices | slash command at ~/.claude/commands/gfsbidsandprices.md |
| Entry point | folder drop in Claude.ai | drop Bids_and_Customer_Pricing folder |
| Entry point | POST /api/tools/invoke | direct chat tool invocation |
| Code path | chat-pipeline.html | chat UI |
| Code path | src/chat_tools/impls.ts | chat tool routing |
| Code path | src/lib/edit_mode_guard.ts | R603 · enforces ADR-039 folder-only writes |
| Script | scripts/post-session-sync.js | pushes folder changes; R614 added /api/healthcheck + table-count self-check |
| HTTP header | X-Sync-Source: customer-pricing-folder | marks sync requests from the folder |
| R2 bucket | bid-attachments | PDF / XLSX |
| D1 table | chat_session | session identity |
| D1 table | proposed_actions | HITL queue for every write (ADR-031) |
| D1 table | bid_customers | customer match |
| D1 table | bid_quote_versions | SY-version source-of-truth |
| D1 table | bid_price_snapshots | line-level |
| Event | bid.chat_review_completed | downstream |
| ADR | ADR-031 | HITL: every write → proposed_actions |
| ADR | ADR-039 | folder-only: operator writes only via Bids_and_Customer_Pricing folder |