<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muhammad Murtuza Hussain</title>
    <description>The latest articles on DEV Community by Muhammad Murtuza Hussain (@muhammadmurtuzahussain).</description>
    <link>https://dev.to/muhammadmurtuzahussain</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4154813%2F86752f9a-5229-4b61-9e04-390216e7c845.jpg</url>
      <title>DEV Community: Muhammad Murtuza Hussain</title>
      <link>https://dev.to/muhammadmurtuzahussain</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muhammadmurtuzahussain"/>
    <language>en</language>
    <item>
      <title>Pīzhù 批注: a writing tutor that never rewrites your essay, built for my friend Joy (Gemma 4)</title>
      <dc:creator>Muhammad Murtuza Hussain</dc:creator>
      <pubDate>Fri, 02 Oct 2026 17:11:44 +0000</pubDate>
      <link>https://dev.to/muhammadmurtuzahussain/pizhu-pi-zhu-a-writing-tutor-that-never-rewrites-your-essay-built-for-my-friend-joy-gemma-4-2n6e</link>
      <guid>https://dev.to/muhammadmurtuzahussain/pizhu-pi-zhu-a-writing-tutor-that-never-rewrites-your-essay-built-for-my-friend-joy-gemma-4-2n6e</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;My friend &lt;strong&gt;Joy&lt;/strong&gt; is doing an MA in Global Mass Communication in Ireland. Her first language is Mandarin. She reads media theory in two languages, argues well, and still gets essays back with comments like &lt;em&gt;"expression needs work"&lt;/em&gt; and &lt;em&gt;"be careful with academic tone"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Me and Joy met at the library of our university, both of us spend most of our day working in the reading room. This one particular afternoon, Joy invited me for a drink break at our student bar, where she also had her informal meeting with her EAP (english for academic purposes) faculty, where they discussed her dissertation, and I noticed how Joy received the feedback from faculty, but couldn't get the reasoning behind it, the faculty all could say was, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It's Just bad english&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;she said.&lt;/p&gt;

&lt;p&gt;This moment had me to tinkering, but also I recalled that, I have seen the same thing with a lot of friends from China and Taiwan. The marks they lose are rarely about ideas. They come from a handful of habits that make perfect sense in Chinese and read badly to a British marker:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No articles.&lt;/strong&gt; Mandarin has no &lt;em&gt;a&lt;/em&gt; or &lt;em&gt;the&lt;/em&gt;, so &lt;em&gt;"The society is changing"&lt;/em&gt; feels natural.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;一逗到底, "one comma all the way".&lt;/strong&gt; A Chinese sentence can run through commas until the thought is complete. In English that is a comma splice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exam-template English.&lt;/strong&gt; &lt;em&gt;"With the development of society…"&lt;/em&gt;, &lt;em&gt;"In a word…"&lt;/em&gt; were taught as good style for 高考 and IELTS. A UK marker reads them as filler.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confident claims.&lt;/strong&gt; &lt;em&gt;"This proves…"&lt;/em&gt; and &lt;em&gt;"Everyone knows…"&lt;/em&gt; (众所周知) persuade in Chinese argumentative writing. In a UK essay they are unsupported.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The usual tools make this worse. Grammar checkers and chatbots &lt;strong&gt;rewrite&lt;/strong&gt; the paragraph. It sounds fluent, it stops sounding like the student, she learns nothing, and in UK and Irish universities an AI-rewritten essay is an academic-integrity problem.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;Pīzhù (批注)&lt;/strong&gt;. The word means &lt;em&gt;margin notes&lt;/em&gt;: the comments a good teacher writes beside your work. That is the whole product:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It underlines the &lt;strong&gt;exact words&lt;/strong&gt; a UK marker would pause on.&lt;/li&gt;
&lt;li&gt;It explains &lt;strong&gt;why&lt;/strong&gt;, in English and in Chinese (简体 or 繁體), including &lt;strong&gt;why a Mandarin speaker tends to write it that way&lt;/strong&gt;, framed as a habit, never a mistake in thinking.&lt;/li&gt;
&lt;li&gt;It gives a &lt;strong&gt;hint&lt;/strong&gt;, and at most a tiny &lt;strong&gt;nudge&lt;/strong&gt; of a few words.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It never rewrites.&lt;/strong&gt; Joy makes every change herself.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7hm0qn4so6yfwvfiim4r.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7hm0qn4so6yfwvfiim4r.gif" alt="Pīzhù's live demo: a Chinglish sentence gets marker-pen underlines and bilingual margin notes" width="599" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Try it:&lt;/strong&gt; &lt;a href="https://pizhu.onrender.com" rel="noopener noreferrer"&gt;pizhu.onrender.com&lt;/a&gt;. Press &lt;strong&gt;Try a sample&lt;/strong&gt;, then &lt;strong&gt;Check my writing&lt;/strong&gt;. The sample essay is one I wrote for testing; it is full of these habits and includes one reference I invented on purpose, so you can watch the reference checker catch it. (The demo runs on Render's free tier, so the very first load can take a few seconds to wake up.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The essay on grid paper, with notes in the margin.&lt;/strong&gt; Every note sits beside its own line, and the open one draws an ink line to its words.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1sn9eyb82knezbyz2h2s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1sn9eyb82knezbyz2h2s.png" alt="Margin notes beside the essay" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson mode.&lt;/strong&gt; One note at a time, with tapioca pearls as progress. Enter for "got it", the arrow keys to move.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk1ngji5hvrwpxh33860i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk1ngji5hvrwpxh33860i.png" alt="Lesson mode" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Back to Word.&lt;/strong&gt; Students write in Word, and Word comments are literally margin notes, so one click gives Joy her own document back, every word unchanged, with each note as a comment from Mòmo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reference check.&lt;/strong&gt; Google Scholar via SerpApi: three real books found, the invented one flagged.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh3icgrn54lafzhulnnta.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh3icgrn54lafzhulnnta.png" alt="Reference check" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On a phone, in dark mode, in 简体中文.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzv1kiy8h3s5t13uy4jts.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzv1kiy8h3s5t13uy4jts.png" alt="Mobile, dark mode, Simplified Chinese" width="800" height="1731"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;Everything is open source (MIT) at &lt;strong&gt;&lt;a href="https://github.com/MuhammadMurtuzaHussain/pizhu" rel="noopener noreferrer"&gt;github.com/MuhammadMurtuzaHussain/pizhu&lt;/a&gt;&lt;/strong&gt;. If you only read four files, read these:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/MuhammadMurtuzaHussain/pizhu/blob/main/src/lib/guard.ts" rel="noopener noreferrer"&gt;&lt;code&gt;src/lib/guard.ts&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;The "never rewrite" rule: verbatim spans and a word-level edit budget for nudges&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/MuhammadMurtuzaHussain/pizhu/blob/main/src/mastra/agents/prompts.ts" rel="noopener noreferrer"&gt;&lt;code&gt;src/mastra/agents/prompts.ts&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;The tutor brief: twelve Mandarin-to-English habits and the checklist Gemma follows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/MuhammadMurtuzaHussain/pizhu/blob/main/src/mastra/workflows/references.ts" rel="noopener noreferrer"&gt;&lt;code&gt;src/mastra/workflows/references.ts&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;The reference check: Gemma extracts, code matches, SerpApi verifies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/MuhammadMurtuzaHussain/pizhu/blob/main/src/components/MarginPaper.tsx" rel="noopener noreferrer"&gt;&lt;code&gt;src/components/MarginPaper.tsx&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Margin notes positioned beside each line, with the ink connector&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Run it privately on your own laptop in three commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull gemma4:e4b
git clone https://github.com/MuhammadMurtuzaHussain/pizhu &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;pizhu &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; pnpm &lt;span class="nb"&gt;install
&lt;/span&gt;pnpm dev   &lt;span class="c"&gt;# http://localhost:3000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/MuhammadMurtuzaHussain" rel="noopener noreferrer"&gt;
        MuhammadMurtuzaHussain
      &lt;/a&gt; / &lt;a href="https://github.com/MuhammadMurtuzaHussain/pizhu" rel="noopener noreferrer"&gt;
        pizhu
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;
  &lt;a href="https://pizhu.onrender.com" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FMuhammadMurtuzaHussain%2Fpizhu%2Fmain%2Fsrc%2Fapp%2Fopengraph-image.png" alt="Pīzhù 批注: margin notes, not rewrites. Mòmo the ink panda holding a bubble tea." width="100%"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;b&gt;Margin notes, not rewrites.&lt;/b&gt; An open-source writing tutor for Mandarin-speaking students at UK and Irish universities, powered by open-weight &lt;b&gt;Gemma 4&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;a href="https://pizhu.onrender.com" rel="nofollow noopener noreferrer"&gt;&lt;b&gt;Live demo&lt;/b&gt;&lt;/a&gt; ·
  &lt;a href="https://dev.to/muhammadmurtuzahussain" rel="nofollow"&gt;DEV post&lt;/a&gt; ·
  &lt;a href="https://github.com/MuhammadMurtuzaHussain/pizhu#run-it-locally-private-nothing-leaves-your-laptop" rel="noopener noreferrer"&gt;Run locally&lt;/a&gt; ·
  Built for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01" rel="nofollow"&gt;DEV Hacktoberfest Weekend Challenge&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/MuhammadMurtuzaHussain/pizhu/main/docs/screenshots/demo.gif"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FMuhammadMurtuzaHussain%2Fpizhu%2Fmain%2Fdocs%2Fscreenshots%2Fdemo.gif" alt="A Chinglish sentence gets marker-pen underlines and bilingual margin notes" width="760"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;My friend Joy is doing an MA in Global Mass Communication in an Irish University. Her ideas are sharp; her marks lose points to a small set of habits that make perfect sense in Chinese and read badly to a British marker: no articles (中文没有冠词), comma splices (一逗到底), exam-template phrases ("With the development of society…"), and confident claims (众所周知).&lt;/p&gt;

&lt;p&gt;Grammar tools and chatbots &lt;strong&gt;rewrite&lt;/strong&gt; the paragraph. It sounds fluent, it stops sounding like her, she learns nothing, and in an Irish university it is an academic-integrity risk.&lt;/p&gt;

&lt;p&gt;Pīzhù does what a good tutor does in the margin: it points at the exact words, explains &lt;em&gt;why&lt;/em&gt; in English and Chinese (简体 or…&lt;/p&gt;&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/MuhammadMurtuzaHussain/pizhu" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Gemma 4 is the only model in Pīzhù.&lt;/strong&gt; It is open weights under Apache 2.0, and the same family runs in two places:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Where&lt;/th&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Joy's laptop (the default)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;gemma4:e4b&lt;/code&gt; or &lt;code&gt;gemma4:12b&lt;/code&gt; via &lt;strong&gt;Ollama&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Her coursework never leaves her machine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hosted demo&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt; via &lt;strong&gt;Google AI Studio&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;So anyone can try it without installing anything&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;One environment variable switches between them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Next.js UI ──► /api/analyze  (streams one paragraph at a time)
                 │
                 ▼
          Mastra tutorAgent ──► Gemma 4  (structured output, Zod schema)
                 │
                 ▼
          guard.ts  ← the "never rewrite" rule, enforced in code
                 │
                 ▼
          + rule-based British spelling  →  margin notes

Reference tab ──► Mastra workflow:
          extract (Gemma) → match citations (code) → verify (SerpApi Google Scholar)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  1. Teaching Gemma to annotate instead of rewrite
&lt;/h3&gt;

&lt;p&gt;The tutor is a &lt;a href="https://mastra.ai" rel="noopener noreferrer"&gt;Mastra&lt;/a&gt; agent with a system prompt written like a brief for a university writing-centre tutor. It describes twelve habits, each pairing a UK convention with the Mandarin pattern behind it, and gives Gemma a checklist: check every comma, every &lt;em&gt;"As for…"&lt;/em&gt;, every bare countable noun.&lt;/p&gt;

&lt;p&gt;Gemma returns structured JSON validated with Zod. The schema has &lt;strong&gt;no field for a rewritten paragraph&lt;/strong&gt;. The only text Gemma may propose is an optional &lt;code&gt;nudge&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  2. Not trusting the prompt
&lt;/h3&gt;

&lt;p&gt;Prompts are requests, not guarantees. &lt;code&gt;guard.ts&lt;/code&gt; checks every note before Joy sees it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The highlighted span must exist in her text&lt;/strong&gt; (tolerating curly quotes and spacing). If Gemma "quotes" something she never wrote, the note is dropped.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A nudge may change at most &lt;code&gt;max(4, 30%)&lt;/code&gt; of the span's words&lt;/strong&gt;, measured by word-level edit distance. Anything bigger is stripped back to a hint, and the card says &lt;em&gt;"Try this one yourself."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spans that cross a sentence boundary never get a nudge.&lt;/strong&gt; Restructuring is the student's job.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;nudgeAllowed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;nudge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;nudge&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;nudge&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;span&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;words&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;crossesSentence&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;wordEditDistance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;nudge&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ceil&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;words&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;span&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.3&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Across my evaluation runs, Gemma proposed 89 nudges and the guard turned 8 of them back into hints. Most came from the smallest model, which is exactly where you want the safety net.&lt;/p&gt;
&lt;h3&gt;
  
  
  3. Rules for what rules do best
&lt;/h3&gt;

&lt;p&gt;The small model was unreliable at spotting American spellings, so I stopped asking it. A word list catches &lt;em&gt;analyze → analyse&lt;/em&gt; and &lt;em&gt;behavior → behaviour&lt;/em&gt; every time, and those notes merge with Gemma's. Gemma handles the judgement; the rules handle the lookups.&lt;/p&gt;
&lt;h3&gt;
  
  
  4. Checking references with SerpApi
&lt;/h3&gt;

&lt;p&gt;Fabricated or garbled references are a growing problem, so the reference tab runs a three-step Mastra workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Gemma extracts&lt;/strong&gt; each entry (authors, year, title) and offers Harvard formatting &lt;em&gt;hints&lt;/em&gt;, never a corrected entry.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plain code matches&lt;/strong&gt; in-text citations like &lt;code&gt;(Hall, 1980)&lt;/code&gt; against the list: cited but missing, or listed but never cited.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SerpApi's Google Scholar engine&lt;/strong&gt; looks up every title: ✅ found, ≈ details differ, or ❓ couldn't find it, so check it exists.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Two real-world snags made it better. Scholar often drops subtitles (&lt;em&gt;"Understanding media"&lt;/em&gt; for &lt;em&gt;Understanding Media: The Extensions of Man&lt;/em&gt;), and its top hit is sometimes a &lt;strong&gt;book review&lt;/strong&gt; rather than the book. Pīzhù compares main titles, searches with Scholar's &lt;code&gt;author:&lt;/code&gt; operator first, and accepts a one-year drift for reprints. Only titles and first authors are sent, never essay text.&lt;/p&gt;
&lt;h3&gt;
  
  
  5. Designed for Joy, not for a generic user
&lt;/h3&gt;

&lt;p&gt;This is where I spent the second half of the weekend, because a tool you feel judged by is a tool you stop opening.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mòmo 墨墨, the ink panda.&lt;/strong&gt; Black and white is literally 墨 ink on paper. Pandas are loved in both mainland China and Taiwan, and a gentle mascot takes the sting out of being corrected. Mòmo reads with you, sips bubble tea, cheers when you fix things, and presses a 好 seal when you finish. A reduplicated name like 墨墨 feels affectionate, the way 团团圆圆 does.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A bubble-tea palette.&lt;/strong&gt; Taro purple, milk white, strawberry for must-fix, mango for worth-fixing, matcha for all good. Red is the colour of luck and celebration in Chinese culture, so errors are a soft strawberry, never alarm red.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feedback that protects 面子 (face).&lt;/strong&gt; Notes are private, never graded, and called &lt;em&gt;habits&lt;/em&gt;. The "Marker's eye" summary under each paragraph uses UK marking dimensions (argument, structure, language, referencing) and never gives a mark.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;集章, collecting stamps.&lt;/strong&gt; Anyone who grew up with 7-Eleven point cards or station stamp books knows the pull. Work through three notes of a habit and you earn its stamp.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Handwriting-style Chinese.&lt;/strong&gt; Explanations are set in 霞鹜文楷 (LXGW WenKai), an open-source kai typeface many Chinese and Taiwanese students already love, so they read like a teacher's note.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The interface in 简体 and 繁體&lt;/strong&gt;, with explanations in English, Chinese or both.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk0bkhnrijzpof51dqx6u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk0bkhnrijzpof51dqx6u.png" alt="The stamp book" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;This project only makes sense with open models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Privacy and academic integrity.&lt;/strong&gt; Pasting unsubmitted coursework into a third-party chatbot means handing it to a server you do not control, and universities increasingly tell students to be careful with exactly that. With Gemma in Ollama, Joy's drafts stay on her laptop, and the app says so in plain words: &lt;em&gt;🔒 Local. Your essay stays on this laptop.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Control over behaviour.&lt;/strong&gt; Closed chat products are built to produce the answer. I needed the opposite: a model that points and explains but does not fix. With open weights inside my own pipeline, I could enforce that rule in code instead of hoping a prompt holds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Being able to swap models, and measure it.&lt;/strong&gt; I wrote fifteen test paragraphs seeded with known habits, plus two clean ones to catch over-flagging, and ran the same pipeline on three sizes of Gemma:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model (where it runs)&lt;/th&gt;
&lt;th&gt;Recall on seeded habits&lt;/th&gt;
&lt;th&gt;Must-fix notes on clean paragraphs&lt;/th&gt;
&lt;th&gt;Seconds per paragraph&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Gemma 4 E4B (laptop, 16 GB)&lt;/td&gt;
&lt;td&gt;84.2%&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;12.8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemma 4 12B (laptop, 16 GB)&lt;/td&gt;
&lt;td&gt;94.7%&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;34.1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemma 4 26B-A4B (AI Studio)&lt;/td&gt;
&lt;td&gt;89.5%&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;25.4&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Joy can choose her trade-off: E4B for quick checks while drafting, 12B before she submits. Tuning the hosted model taught me something too: Gemma 4 "thinks" at length by default, and one paragraph took &lt;strong&gt;335 seconds&lt;/strong&gt;. Setting the thinking level to &lt;code&gt;minimal&lt;/code&gt; brought it to about &lt;strong&gt;30 seconds&lt;/strong&gt; with no visible loss in quality.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Cost.&lt;/strong&gt; Running locally costs nothing. International students already pay some of the highest fees in UK higher education; a tool behind a subscription is a tool many of them will not use.&lt;/p&gt;
&lt;h2&gt;
  
  
  Handing it to Joy
&lt;/h2&gt;

&lt;p&gt;I sent Joy the link on WeChat with a slightly nervous &lt;em&gt;"i made this app for u"&lt;/em&gt;. She didn't test it on my sample essay. She tested it on what she is actually writing right now, her dissertation, and later sent back a review I could not have scripted.&lt;/p&gt;

&lt;p&gt;What worked for her:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The general feeling of this app: it's very useful, especially for our module assignments. The Chinese explanation is easier to understand than the criteria written in our module 😂&lt;/p&gt;

&lt;p&gt;Another advantage of it is that it explains why I should correct my sentence. As grammarly could only give me a red label but sometimes I don't know that's the problem and how to fix it. The explanation really helps me to understand how to write properly.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That second message is the reason Pīzhù exists, put better than I managed: a red underline tells you &lt;em&gt;that&lt;/em&gt; something is wrong, and Joy needed to know &lt;em&gt;why&lt;/em&gt;. It is the same gap as "It's just bad English".&lt;/p&gt;

&lt;p&gt;She was just as honest about what didn't work:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;As my dissertation is a long paper, when I tried to ask advice from momo, I have to send my paper separately, even need to split each chapter to 2-3 parts. Thus, momo cannot get the full understanding of my argument. If the app could do longer articles, it would be great!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;(She calls it "momo". That made my day.)&lt;/p&gt;

&lt;p&gt;And she had two requests:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Another advice I would like to share it that, if it could help you analyse the assignment requirements or criteria, and have similarity detection like turntin, it will help students understand how to do their assignments and worry less before submitting.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  What I shipped the same evening
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Longer papers.&lt;/strong&gt; The hosted demo now accepts 6,000 words instead of 1,500. The cap only exists because the demo runs on free tiers; running Pīzhù locally has no limit at all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A whole-paper overview.&lt;/strong&gt; Mòmo now reads the entire paper in one pass, alongside the line-by-line notes, and tells you what it thinks your argument is, what works, and the three most important whole-paper fixes. If Mòmo's summary of your argument isn't what you meant, that is the most useful feedback of all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your assignment brief, explained.&lt;/strong&gt; Paste the task and the marking criteria, and Mòmo restates each criterion in plain English and Chinese, then marks it met, partly or missing against your paper. Joy's line about the Chinese being easier than her module criteria was the whole spec.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It travels.&lt;/strong&gt; The overview sits at the top of the Word export, above her own unchanged text.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F882zunbd0e96zkwba039.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F882zunbd0e96zkwba039.png" alt="Whole-paper overview checked against an assignment brief" width="800" height="670"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Turnitin-style similarity checking is the one request I'm deliberately not building.&lt;/strong&gt; It only works by comparing your essay against a database of other people's papers, which means uploading and keeping your writing: exactly what Pīzhù is designed never to do. It does the honest half of that job instead: it flags claims that need a citation and checks that every reference actually exists.&lt;/p&gt;

&lt;p&gt;Her last message: &lt;em&gt;"No problem, it's already a brilliant app!"&lt;/em&gt; I've promised her half the prize if it wins.&lt;/p&gt;
&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;I built Pīzhù with Claude Code over the weekend, from reading the challenge rules, to the PRD, to debugging the reference matcher and the margin-note layout:&lt;/p&gt;


&lt;div class="ltag-agent-session"&gt;
  &lt;div class="agent-session-header"&gt;
    
    &lt;span class="agent-session-tool-icon-badge" title="Claude Code"&gt;
&lt;/span&gt;
    &lt;span class="agent-session-title"&gt;Building Pīzhù 批注 with Claude Code: a margin-note writing tutor on Gemma 4&lt;/span&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-scroll"&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Today's Hacktoberfest challenge is Build for a Friend. My idea: a tool that helps Mandarin-native students write better academic English (EAP). Lots of my friends from China and Taiwan lose marks and confidence when they're so smart. I do NOT want the model to rewrite their work, just tell them where the English is off and why. Focus on UK and Irish academic writing, UI relevant to Mandarin speakers, with a Chinese UI option. Plan it against the submission template and partners, build a PRD, and ask me questions.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Read the challenge rules (deadline 5 Oct 06:59 UTC; writing quality weighted most) and checked partner tech. Gemma 4 is open-weight under Apache 2.0, multilingual and runs locally, so it is the core model; Tinker can't fine-tune Gemma, so I left it out. Asked four questions: the friend, where Gemma runs, partner categories, and stack.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-getchallenges"&gt;get_challenges&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;DEV challenges&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;DEV challenges&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Hacktoberfest Weekend Challenge: Build for a Friend, 2-5 Oct&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-websearch"&gt;WebSearch&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;latest Gemma open model release 2026 Ollama sizes&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;latest Gemma open model release 2026 Ollama sizes&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;Gemma 4: E2B, E4B, 12B, 26B A4B, 31B&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Named friend who will test (Joy, Global Mass Communication, Simplified Chinese). Hybrid inference. Gemma with SerpApi. TypeScript: Next.js + Mastra. 16 GB RAM.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Wrote the PRD: 'annotate, don't rewrite'. Built a Mastra tutor agent with a Zod schema that has no field for a rewritten paragraph, plus guard.ts: every span must exist verbatim in the student's text, and any nudge changing more than max(4, 30%) of the words is stripped back to a hint. First local run on gemma4:e4b: six notes on paragraph 1 with natural Chinese explanations, one oversized fix stripped by the guard.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-bash"&gt;Bash&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Smoke-test paragraph analysis with local Gemma&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre agent-session-terminal"&gt;&lt;code&gt;$ Smoke-test paragraph analysis with local Gemma&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;6 annotations, nudgesStripped: 1&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-bash"&gt;Bash&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Write and run unit tests for guard and citations&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre agent-session-terminal"&gt;&lt;code&gt;$ Write and run unit tests for guard and citations&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;14 passed&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Wrote 15 hand-made test paragraphs seeded with Mandarin-L1 habits plus 2 clean ones. E4B recall 73.7%, weakest on American spellings and missing citations. Added a deterministic US→UK spelling list (rules for lookups, Gemma for judgement) and a sharper checklist: recall rose to 84.2%. 12B: 94.7% with zero false must-fix notes.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-bash"&gt;Bash&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Run eval fixtures on Gemma 4 E4B&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre agent-session-terminal"&gt;&lt;code&gt;$ Run eval fixtures on Gemma 4 E4B&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;recall 0.737&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-bash"&gt;Bash&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Eval Gemma 12B then re-eval E4B&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre agent-session-terminal"&gt;&lt;code&gt;$ Eval Gemma 12B then re-eval E4B&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;12B 0.947, E4B 0.842&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Hosted path: one paragraph took 335 s on Gemma 4 31B because it thinks at length. Probed the API: 31B was returning 500s, and 26B-A4B with thinkingLevel 'minimal' answered in ~7 s. Switched the hosted demo to 26B-A4B; paragraphs now take ~30 s with no visible quality loss (89.5% recall).&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-bash"&gt;Bash&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Compare latency of Gemma 26B MoE vs 31B&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre agent-session-terminal"&gt;&lt;code&gt;$ Compare latency of Gemma 26B MoE vs 31B&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;26b-a4b minimal: 6.7s; default: 28.4s&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Reference checker as a Mastra workflow: Gemma extracts entries, plain code matches in-text citations, SerpApi Google Scholar verifies. Two real snags fixed: Scholar drops subtitles ('Understanding media'), and its top hit is sometimes a book review. Compare main titles, search with author: first, allow ±1 year for reprints. Result: three real books found, the invented one flagged.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-bash"&gt;Bash&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Run reference check twice for stability&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre agent-session-terminal"&gt;&lt;code&gt;$ Run reference check twice for stability&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;found, found, found, not_found&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Deploy failed (Render: EROFS read-only file system, unlink /usr/bin/pnpm).&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;&lt;code&gt;corepack enable&lt;/code&gt; tries to write a pnpm link into Render's read-only /usr/bin. Switched render.yaml to &lt;code&gt;corepack pnpm install/build/start&lt;/code&gt;, verified a local production build, pushed. It went live at pizhu.onrender.com.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Load the design skills we used for my website and enhance the UI/UX and colours. It's for a Chinese audience, so maybe a dragon or panda avatar, chosen by the consumer psychology of Chinese and Taiwanese students.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Recommended 墨墨 Mòmo, an ink panda: black and white is literally ink on paper, pandas are loved in both the PRC and Taiwan, and a dragon reads as authority, intimidating for something that corrects you. Design principles: protect 面子 (private, never graded, 'habits' not errors), 萌 mascot culture, 集章 stamp collecting, and 霞鹜文楷 for Chinese so notes read like a teacher's handwriting.&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;It's still lackluster, and the palette looks like the Claude colour scheme. Can we think of something much more?&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Offered four palette worlds; you chose 珍奶 taro &amp;amp; boba, plus all four signature features. Built: a live demo hero (sentence types in, underlines draw, notes pop in); true margin notes positioned beside each line with an ink connector; lesson mode with tapioca-pearl progress and a share card; and a Mòmo companion dock that narrates, cheers and stamps 好.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-write"&gt;Write&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;src/components/MarginPaper.tsx&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre highlight tsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;components&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;MarginPaper&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tsx&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-write"&gt;Write&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;src/components/LessonMode.tsx&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre highlight tsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;components&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;LessonMode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tsx&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-user"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-user"&gt;
          You
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Add a light/dark toggle. Bug: the line from words to note stays while I edit a paragraph. The hero demo grows and shrinks so the page jumps. Export my habits gives JSON, improve it. Credit the challenge and me in the footer. Make this a great finished product that would make us win!&lt;/p&gt;

                &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;

      &lt;div class="agent-session-message agent-session-assistant"&gt;
        &lt;div class="agent-session-role-badge agent-session-role-assistant"&gt;
          Agent
        &lt;/div&gt;
        &lt;div class="agent-session-content"&gt;
                &lt;div class="agent-session-text"&gt;
                  &lt;p&gt;Fixed all five, each verified in the browser: the toggle applies before first paint; editing hides that paragraph's notes and connector; the demo card reserves its final size (height constant across a full loop); a habit-report image and 集章 stamp book replace raw JSON; and the footer has credits. Extras: Word export with notes as real Word comments, friendly errors with retry, draft autosave, WCAG contrast fixes, OG card. A headless-Chrome script ran the whole flow on the live site and captured the README screenshots.&lt;/p&gt;

                &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-bash"&gt;Bash&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Capture production screenshots and demo GIF&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre agent-session-terminal"&gt;&lt;code&gt;$ Capture production screenshots and demo GIF&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;analysis done in 84.7s; all scenes captured&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="agent-session-tool-call"&gt;
                
                  &lt;span class="agent-session-chevron"&gt;▸&lt;/span&gt;
                  &lt;span class="tool-name tool-name-bash"&gt;Bash&lt;/span&gt;
                    &lt;span class="tool-input-preview"&gt;Final checks&lt;/span&gt;
                
                &lt;div class="agent-session-tool-detail"&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Input&lt;/div&gt;
                      &lt;pre class="agent-session-pre agent-session-terminal"&gt;&lt;code&gt;$ Final checks&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                    &lt;div class="tool-section"&gt;
                      &lt;div class="tool-section-label"&gt;Output&lt;/div&gt;
                      &lt;pre class="agent-session-pre"&gt;&lt;code&gt;lint clean, 19 tests passed&lt;/code&gt;&lt;/pre&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;

  &lt;div class="agent-session-footer"&gt;
    &lt;span class="agent-session-meta"&gt;
        15 of 16 messages
          · some content was hidden by the author
    &lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma:&lt;/strong&gt; Gemma 4 is the only model, running locally (E4B and 12B via Ollama) and hosted (26B-A4B via AI Studio), with a measured size comparison and a guardrail built around its structured output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of SerpApi:&lt;/strong&gt; the Google Scholar engine powers the reference checker that catches sources which may not exist, using the &lt;code&gt;author:&lt;/code&gt; operator to find the work itself rather than reviews of it.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Built with AI assistance (Claude Code). I reviewed, tested and edited everything, and the evaluation numbers come from real runs of the code in the repo.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
      <category>hacktoberfest</category>
    </item>
    <item>
      <title>Any Feedbacks on this?</title>
      <dc:creator>Muhammad Murtuza Hussain</dc:creator>
      <pubDate>Fri, 02 Oct 2026 12:38:52 +0000</pubDate>
      <link>https://dev.to/muhammadmurtuzahussain/any-feedbacks-on-this-523c</link>
      <guid>https://dev.to/muhammadmurtuzahussain/any-feedbacks-on-this-523c</guid>
      <description>&lt;p&gt;&lt;a href="https://pizhu.onrender.com/" rel="noopener noreferrer"&gt;https://pizhu.onrender.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have made this for the weekend 1 challenge, looking for UI/UX improvement. &lt;/p&gt;

&lt;h2&gt;
  
  
  &amp;gt; Recommend me skills below!
&lt;/h2&gt;

</description>
      <category>sideprojects</category>
      <category>hacktoberfest</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Cool social media</title>
      <dc:creator>Muhammad Murtuza Hussain</dc:creator>
      <pubDate>Thu, 01 Oct 2026 12:53:27 +0000</pubDate>
      <link>https://dev.to/muhammadmurtuzahussain/cool-social-media-2og2</link>
      <guid>https://dev.to/muhammadmurtuzahussain/cool-social-media-2og2</guid>
      <description>&lt;p&gt;How do you make friends here?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
