Projects

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
ArcGym Incident page: a brief, a three-box topology diagram from Snowflake through a Data Cloud zero-copy cache to Agentforce traffic, and the symptom
Incident view: brief, topology diagram, and symptom before probing and grading.

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

  1. 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.

  2. 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.

  3. 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.

    A second ArcGym Incident in the dark theme, showing a streaming transform topology and its symptom
    Dark-theme Incident; topology diagrams inherit app theme tokens.
  4. 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.

  5. 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

  1. Crawl & indexChunk official docs into ChromaDB and extract reviewed Friction Cards.
  2. Retrieve & draftPair a Friction Card with matching official chunks to draft a drill.
  3. Lint & red-teamRun schema, citation, wording, and adversarial checks.
  4. PublishValidate the catalog, bake Mermaid SVGs, and seed KV.
  5. Play & gradeEnforce probe budgets, grade via CLEF, and compute Brier scores.

Decisions

  • Retrieval-augmented generation
  • LLM evaluation & grading
  • Agent workflows
  • Cloudflare Workers / Pages / D1 / KV
  • OAuth & privacy by design
  • Domain-driven design
  • Architecture decision records
  • Salesforce architecture