arcgym
Architectural judgment drills for Salesforce architects, grounded in official Well-Architected docs and scored on confidence calibration.
- Status
- Live
- Platform
- Web · Cloudflare Pages
- Built with
- React 19 · TypeScript · Python
- Drill formats
- Case File · Incident
- Decision records
- 9 ADRs
- Gate
- pnpm gate · quality-kit CI
- Harness
- Claude · Cursor · Antigravity CLI
- Started
- Sep 2026

Overview
ArcGym trains CTA-style trade-off decisions through Case Files (multi-station briefs with a limited question budget) and Incidents (diagnose a topology symptom, write the root cause, and pick a fix).
Every answer includes a confidence rating scored with Brier calibration, and every correct option must cite crawled official Salesforce docs— enforced by a crawler, lint, and red-team pipeline documented across nine ADRs.
Stack
Web
- React 19 + Vite
- SPA styled with Tailwind CSS 4 and accessible Radix primitives.
- @arcgym/drill-core
- Pure TypeScript scoring, calibration, probe budgets, and reducers.
- Mermaid via pele
- Topology diagrams baked to themed SVGs at build time.
Edge
- Cloudflare Pages Functions
- OAuth, grading, feedback, and HMAC-signed publish webhooks.
- KV + D1
- Immutable drill JSON in KV; learner progress and ratings in D1.
- Workers AI (CLEF)
- Classifies free-text root causes against authored options without generation.
Content pipeline
- Python crawlers + ChromaDB
- Chunks official docs with canonical URLs and hybrid BM25 + dense retrieval.
- Friction Cards
- Human-reviewed Trailblazer Community problems turned into realistic distractors.
- Agent skills
- Separate drafting, review, and red-team skills; nothing publishes automatically.
Quality
- quality-kit (js-ts + python)
- Biome, tsc -b, import-graph and complexity ratchets, plus ruff and basedpyright.
- Vitest
- Tests reducers, scoring, wording lint rules, and Pages Functions.
Engineering highlights
Citations verified against crawled docs
A build-time Citation Manifest lists every crawled official doc URL; any correct option citing an unlisted URL fails the build. Community threads only feed distractors, and failed ingests write findings sidecars for targeted agent repair.
Three-tier publish gate
Tier 1 checks schema and citations. Tier 2 enforces deterministic wording lint (±25% option lengths, named antipatterns, no shape giveaways). Tier 3 runs an adversarial red-team subagent before a drill can become
published.Free-text grading via classification, not generation
Workers AI's CLEF model scores a learner's root-cause text against the hidden gold cause, three antipattern causes, and "other". Answers are stripped from client payloads, and CI injects probability maps instead of calling live models.

Dark-theme Incident; topology diagrams inherit app theme tokens. Calibration scoring with Brier quadrants
Learners commit 50%, 70%, 85%, or 95% confidence before submitting. Brier scoring penalizes confident mistakes more than hesitant ones, mapping results into four calibration quadrants.
Privacy-first OAuth with zero PII
Plain OAuth redirects avoid third-party scripts. D1 stores only a server-peppered HMAC of the provider subject ID—no names or emails— with HttpOnly JWT sessions and one-click deletion.
Architecture
From official docs to a scored answer
- Crawl & indexChunk official docs into ChromaDB and extract reviewed Friction Cards.
- Retrieve & draftPair a Friction Card with matching official chunks to draft a drill.
- Lint & red-teamRun schema, citation, wording, and adversarial checks.
- PublishValidate the catalog, bake Mermaid SVGs, and seed KV.
- Play & gradeEnforce probe budgets, grade via CLEF, and compute Brier scores.
More screens

