<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Counterstep Relay</title><link rel="stylesheet" href="style.css"></head><body>
<header><a class='brand' href='/'>C<span>↗</span> <strong>Counterstep Relay</strong></a><span id="connection" role="status">Connecting to MCP…</span></header>
<main><section class="intro"><div><p class="eyebrow">REPAIR → TRANSFER → RESUME</p><h1>Keep the work.<br><span>Not just the answer.</span></h1><p class="lead">An assistant that remembers where help was used, checks every algebra step, and hands the session back without inventing progress.</p></div><aside class="identity"><span class="pill">Alexa+ experience simulator</span><p>Real Streamable HTTP MCP calls.<br>Exact math. A learned practice ranker.</p><small>This reference host is not Amazon Alexa and has no speech or language model. It sends equations and actions to this server. <a href="README.md">How it works</a></small></aside></section>
<section class="workspace"><div class="conversation panel"><div class="section-title"><h2>01 / Your repair session</h2><button id="new" class="quiet">New session</button></div><div id="messages" aria-live="polite"><p class="empty">Start with a worked solution, including its mistakes.</p></div><form id="commandForm"><label for="command">A short turn</label><div class="send"><input id="command" placeholder="hint · show why · practice · answer 4x + 32 = 44" autocomplete="off" maxlength="4000"><button id="send" type="submit">Send ↗</button></div><small>Supported commands are explicit. No chat response is being invented.</small></form><div class="help-actions"><button id="hint" disabled>Hint only</button><button id="reveal" disabled>Show why</button><button id="practice" disabled>Fresh practice</button></div></div>
<div class="board panel"><div class="section-title"><h2>02 / Shared workboard</h2><span id="phase" class="pill">NOT STARTED</span></div><label for="chain">One equation per line</label><textarea id="chain" spellcheck="false" rows="5">2(x + 3) = 10
2x + 3 = 10
2x = 4
x = 2</textarea><div class="board-actions"><button id="begin" class="primary" disabled>Find the first wrong step</button><button id="repair" disabled>Check my repair</button></div><div id="audit" role="status" class="audit">The final answer is correct. Does every step deserve a pass?</div><div id="witness" hidden></div><section id="card" hidden><p class="eyebrow">NEW NUMBERS / TRANSFER CARD</p><h3 id="cardTitle"></h3><p id="cardEquation" class="equation"></p><form id="answerForm"><label for="answer">Write the requested next step</label><div class="send"><input id="answer" autocomplete="off" maxlength="300" placeholder="Your equation"><button id="checkAnswer" type="submit">Check exactly</button></div></form><p id="cardHelp"></p></section></div></section>
<section class="progress panel"><div><h2>03 / Evidence, not a mastery badge</h2><p>Helped answers and revised answers remain visible. Imported outcomes are recomputed.</p></div><div class="metric"><strong id="independent">0</strong><span>independent first attempts</span></div><div class="metric"><strong id="assisted">0</strong><span>assisted completions</span></div><div class="metric"><strong id="attempts">0</strong><span>submitted attempts</span></div></section>
<section class="handoff panel"><div><h2>04 / Leave. Come back. Keep the context.</h2><p>A portable session stores original work and actions, not trusted scores. Fingerprints detect changed bytes; they do not certify who did the work.</p></div><div class="handoff-actions"><button id="save" disabled>Save handoff</button><label class="file-button" for="load">Open handoff</label><input id="load" type="file" accept=".json,application/json"><button id="remember" disabled>Remember on this device</button><button id="resumeDevice" hidden>Resume saved session</button><button id="forget" class="quiet" hidden>Forget device copy</button><button id="report" disabled>Export review</button></div></section>
<details class="panel"><summary>MCP activity and implementation</summary><p><code id="endpoint"></code> · Protocol <code>2025-11-25</code> · Official SDK <code>1.29.0</code></p><p>Four real tools orchestrate repair, help, generated practice and a portable handoff. Application state is carried by the client, not an in-memory MCP connection. The service has no accounts or database. Use synthetic equations in this public demo.</p><pre id="wire"></pre><p><a href="source.zip">Complete source</a> · <a href="SKILL.md">Agent skill</a> · <a href='/judge'>Demo and project notes</a></p></details><div id="error" role="alert" hidden></div>
<footer>Counterstep Relay • MIT • Built with AI assistance. The earlier exact checker and learned model are reused with attribution. No student study, certified grade, or live Alexa deployment is claimed.</footer></main><script type="module" src="app.js"></script></body></html>
