# UCC live Meta test API — Muse, Hermes, Claude Code and Codex This is Alan's controlled test, not a learner release. Base URL: https://ucc-learning-meta-test-wbg25ukt3a-as.a.run.app Browser: `/kit/workflow.html`. REST: `POST /test/analyze`. Streamable HTTP MCP: `/mcp`; initialize, acknowledge `notifications/initialized`, call `ucc_get_workflow`, then `ucc_analyze_test` with `{request: ...}`. JSON and event-stream Accept types are required for MCP. No UCC login, Cloud IAM token or Meta key is needed by the tester/agent. MCP supports 2025-03-26, 2025-06-18 and 2025-11-25; initialize negotiates a requested supported version. Send that negotiated value in subsequent MCP-Protocol-Version headers. No SSE listener is required. Responses are inline JSON. Use supplied work; do not fabricate examples or test scenarios. ## Direct topic explanation For “explain how to calculate the perimeter of a hexagon”, call `ucc_explain_topic` with `{topic:"Explain how to calculate the perimeter of a hexagon."}`. Do not submit topic questions as worksheet_text. The response is `ucc.topic-authoring.v1`: verified generic files, `delivery:local_only`, and `approval_required:false`. Save each file locally after verifying bytes/SHA-256, follow AUTHORING.md, and build/personalize the standalone HTML on the owner's machine. Do not ask for ordinary build approval or publish personalized lessons on Firebase. Retain the owner's exported JSON/TXT practice receipts locally; this practice schema is not a supported assessment receipt. HTTP equivalent: `POST /metamuse/test/explain`. The former hosted HTML route returns 410 LOCAL_LESSON_ONLY. Any K–12 mathematics topic is accepted. Existing recipes retain their v1 packets. Other topics receive a `ucc.universal-authoring.v1` general handoff with explicit source/model gaps, or one clarification question. This routing preview does not certify complete curriculum coverage. See AGENT_DISCOVERY.md for the canonical authoring instructions. ## Three parent journeys The product goal is to help parents work toward NAEP mathematical proficiency. This test does not measure or certify NAEP levels. Its teaching principle is feedback close to the attempt → a focused action/lesson → an independent check → later review. Immediate feedback inside a mini-app should help the learner correct and explain; a second correct click alone is not proof of learning. 1. **Assessment:** Give the user https://uncommoncore.web.app/assessmenttest/ . Ask for the exported .txt or .json, submit the receipt, save the returned report/prompt kit, build and test one standalone HTML, and invite a pressure-mode return. Current receipt support is Fractions & Ratios schema 1.2 only; do not advertise unsupported adapters. 2. **Schoolwork:** Accept the user's document in your own workspace. Submit supported inline images or text for extraction, have the parent confirm/correct/omit, then submit confirmed evidence. For PDFs, read/render/transcribe the relevant page locally; the UCC API does not accept a PDF or fetch a URL. Do not promise support for mathematics outside the confirmed-item schema. 3. **Dialogue:** Keep the conversation in the personal agent. Download one handoff instruction card: `/kit/DIALOGUE_GAUSS.md` for math discovery/explainers, `/kit/DIALOGUE_HYPATIA.md` for learning habits, or `/kit/DIALOGUE_NEWTON.md` for competition problems. Read the matching **complete** private coach guide before answering with its strategies. Handoff cards do not replace full guides. This path needs no UCC chat endpoint or paid UCC model call. The user may submit their worksheet, test or assessment receipt. The browser offers an optional acknowledgement: Meta may use submitted material for training; UCC does not store it. Neither the checkbox nor a synthetic declaration is required for processing. Muse/user storage decisions and provider retention are separate from UCC's no-learner-storage design. Jev is not active in this v2 test; it is not needed for dialogue or generating the explainer. The measured synchronous request budget is 55 seconds, below Firebase Hosting’s 60-second ceiling. Explicit earlier caller deadlines remain honored. No automatic retry is added. ## Exact envelope Build the following values from the user's submitted document. Set a fresh UUID and deadline just before each action. Every property is required except data_class, the legacy synthetic_declared field and the stated optional round-2 fields. - `schema_version`: `ucc.test.request.v1` - `request_id`: UUID - `data_class`: `user_supplied` (default if omitted). Legacy `tester_supplied_synthetic` and `real_learner` values remain accepted. - `synthetic_declared`: obsolete optional boolean, accepted for backward compatibility and never used as an admission gate. New clients should omit it. - `deadline_at_ms`: current Unix milliseconds + 55000 - `input_kind`: one of `worksheet_image`, `worksheet_text`, `confirmed_homework`, `ucc_receipt` - `content`: exactly one content variant below - `client_profile_id`: `muse-manual-v1`, `hermes-manual-v1`, `claude-code-manual-v1` or `codex-manual-v1` - `client_budget`: `{max_response_bytes:524288,max_tool_output_tokens:100000,deadline_ms:55000}`. The token allowance is conservatively checked using UTF-8 bytes, not a model tokenizer. The browser-compatible helpers `meta-test-client.mjs` export buildTestRequest, requestTestAnalysis and verifyTestBundle for reuse. They do not contain credentials or a sample worksheet. For remote MCP the body is `{jsonrpc:"2.0",id:YOUR_ID,method:"tools/call",params:{name:"ucc_analyze_test",arguments:{request:YOUR_REQUEST}}}`. A tool error is a bounded safe code; no automatic retry. ## Extraction → explicit confirmation → interpretation 1. Image content: `{image:{mime:"image/png" | "image/jpeg" | "image/webp",base64:CANONICAL_BASE64}}`. Maximum 2MiB file, 8192 per side, 16M pixels, 4MiB whole request. Inline images only, no remote URL. Text content: `{text:ACTUAL_WORKSHEET_TEXT}`, at most 100000 characters. At most 20 questions. 2. The single Meta extraction call returns `status:"needs_confirmation"` and `extraction:{schema_version:"ucc.extraction.v1",items:[...],uncertain_item_ids:[...],unsupported_item_ids:[...]}`. Each item is `{id:"item-N",kind:"supported" | "untranscribable_item" | "unsupported_item",work:TYPED_WORK_OR_NULL,location,reason}`. No grade or lesson yet. 3. Show the tester the transcription. Correct readable quantities/answers and explicitly omit unsupported/unreadable items. Do not treat model confidence as confirmation. 4. Resubmit `input_kind:"confirmed_homework"`, content `{confirmed_items:[{id,work}],omitted_item_ids:[...],extraction:ORIGINAL_EXTRACTION}`. Every original item ID must be accounted for once. At least one supported confirmed item is needed. `work` is `{kind:"homework",item:...}` or `{kind:"observation",observation:...}`; keep returned typed shapes and supported bounds. Do not include the old homework `confirmed` property. The submission itself is explicit tester confirmation. 5. Code verifies the mathematics and Meta selects source-linked coaching strategies. The response contains five hash-verified files: interpretation-report.md, muse-single-html-prompt.md, lesson-brief.json, next-step.md and bundle-manifest.json. Save all five plus a local round-response.json transport record. `verifyTestBundle` validates the hashes and produces the record `{bundle:WHOLE_RESPONSE,manifest_sha256:HASH_OF_MANIFEST_CONTENT}`. ## Receipt and pressure return Receipt input is `{receipt:RAW_TXT_EXPORT_OR_JSON_OBJECT}`. Supported nested export: schema 1.2, assessment fractions_ratio_v1, reconciled usable/warning integrity, CALM or PRESSURE. Other receipt formats fail explicitly. The same single coaching call returns the five files. For Round 2 include top-level `previous_receipt:ORIGINAL_CALM_EXPORT` and `previous_bundle:SAVED_ROUND_RESPONSE_RECORD` along with the current PRESSURE receipt. Hashes bind the original evidence and bundle; UCC has no server session or recovery copy. Compare conditions descriptively, not as proof of proficiency or caused improvement. ## Agent builds the explainer Save/read back the delivered files in the user's personal workspace. Download `/kit/download.zip`, verify manifest hashes and read CODING_REFERENCE.md, EXPLAINER_QA_REFERENCE.md and the selected complete coach guides from the user's imported muse-reference-cleared package. The complete portable package is separate from the generic cloud kit; public short coach cards do not substitute for it. Ask for the package if it has not been imported; don't claim to have read a missing guide. Follow muse-single-html-prompt.md to create one standalone HTML with checked maths, paper-craft stones where suitable, keyboard/DOM fallback, reduced motion, independent retrieval and changed-context transfer. Build locally with pack-single-html.mjs; no CDN, tracking or uploaded code execution. Offer the pressure retest in next-step.md, retain the original CALM receipt and Round 1 transport record, then submit the pressure receipt for the next report/prompt. The user or personal agent chooses artifact storage. ## Assessment receipt handoff After the student completes the test, ask them to export the complete .txt or .json test receipt and give it back to their AI agent for submission to UCC. This is a manual step: UCC does not store receipts or provide a recovery copy, for privacy and security. The AI agent should save the original receipt for its owner/user in their chosen personal workspace, verify readback and confirm the saved location. If the agent cannot save files, tell the user and ask them to keep the downloaded receipt; do not claim it was saved. On Firebase, connect to https://uncommoncore.web.app/metamuse/mcp and fetch the kit at https://uncommoncore.web.app/metamuse/kit/download.zip. The existing Cloud Run endpoints remain available. ## Test controls and privacy Model: Meta Muse Spark 1.3 Contributor, native Meta API. Alan reports an API-account spending cap and authorizes relying on it for this controlled test. No new quota database, launch admission system, broker prerequisite or 30-minute campaign expiry is imposed in this explicit test mode. This service does not itself prove or enforce the account cap. The one-worker limit, 55s deadline, native image bounds, schema validation, finite safe errors, one-call/no-retry rule remain. The optional training acknowledgement is informational and does not block submissions. Cross-origin browser submissions reject; native agents and same-origin browser submissions work. Busy requests return 429; wait and explicitly submit again only after resolving whether a model call occurred. UCC processes requests in memory and retains no worksheet, transcription, report, receipt, generated HTML or recovery copy. Intermediate transcription/round records live in the browser memory or explicit user downloads. Meta receives submitted content and may use it for training; store:false disables response retrieval, not all Meta retention. No synthetic-only restriction is applied. ## UCC communication voice Read UCC_COMMUNICATIONS_GUIDE.md from the coding kit before parent dialogue, report explanations or learner-facing lesson text. Use warm, direct, curious and practical language. State the evidence, keep uncertainty visible and end with one manageable action. Use ordinary learning language rather than publicity or crisis vocabulary. This authoring guide does not add an intake gate or change the mathematics. The complete owner’s manual is UCC_math_loop_owners_manual.html (or its Markdown edition) in the same kit. It covers the full Math/STEM persona and textbook approach, California Common Core authoring alignment, reusable assets and the parent workflow. Universal authoring routing preview: `/test/explain` and `ucc_explain_topic` now accept any K–12 math request. They perform no LLM inference. Save and build locally. The browser accepts both packet schemas. Assessment and worksheet analysis adapters retain their documented evidence contracts; they do not limit topic authoring.