<?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: Prathamesh Anvekar</title>
    <description>The latest articles on DEV Community by Prathamesh Anvekar (@prathamanvekar).</description>
    <link>https://dev.to/prathamanvekar</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%2F2067975%2F0b760f91-64cf-4294-9b2f-74acbf8e586a.jpg</url>
      <title>DEV Community: Prathamesh Anvekar</title>
      <link>https://dev.to/prathamanvekar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prathamanvekar"/>
    <language>en</language>
    <item>
      <title>Turning metacognition notes to your competitive programming coach</title>
      <dc:creator>Prathamesh Anvekar</dc:creator>
      <pubDate>Mon, 05 Oct 2026 00:11:51 +0000</pubDate>
      <link>https://dev.to/prathamanvekar/turning-metacognition-notes-to-your-competitive-programming-coach-12lg</link>
      <guid>https://dev.to/prathamanvekar/turning-metacognition-notes-to-your-competitive-programming-coach-12lg</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;Ved&lt;/strong&gt; and I have been grinding competitive programming together for months. After discussing Colin Galen's video on how top competitors dissect their practice, we started doing something specific: keeping a text file open while solving LeetCode and Codeforces problems to record &lt;strong&gt;timestamped "metacognition notes"&lt;/strong&gt; of our thoughts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0:00 - read problem statement. contiguous subarrays with k distinct elements.
0:03 - thought about standard sliding window with two pointers.
0:06 - issue: how to count *exact* k without missing smaller left bounds?
0:12 - stuck trying to rewind left pointer. count gets messy with duplicates.
0:18 - breakthrough: exact(k) = atMost(k) - atMost(k - 1)!
0:25 - wrote helper, tested edge cases, submitted -&amp;gt; Accepted.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;These notes capture our real-time &lt;strong&gt;cognitive blindspots&lt;/strong&gt; - the exact minute we got confused, the false paths we went down, and the habits that cost us time, like jumping straight into code before proving invariants. But the moment a problem was accepted, we always discarded them.&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;cpmeta&lt;/strong&gt; for Ved and myself to stop that hard-earned data from going to waste.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;cpmeta&lt;/strong&gt; is a project that analyzes raw thinking notes alongside the problem statement using an open-weight LLM. Instead of just handing you an algorithmic solution, it acts like an &lt;strong&gt;ICPC coach&lt;/strong&gt; reviewing your thought process. It calculates exactly how long you stalled and diagnoses the &lt;strong&gt;root cause&lt;/strong&gt;, such as missing a monotonic reduction trick. It also detects recurring &lt;strong&gt;cognitive traps&lt;/strong&gt;, like abandoning valid approaches too early or overlooking problem constraints. Over time, it aggregates data across all your logged sessions to generate a &lt;strong&gt;prioritized study plan&lt;/strong&gt; that highlights your persistent topic weaknesses and proven strengths.&lt;/p&gt;

&lt;p&gt;When I showed it to Ved, he was stunned: &lt;em&gt;"Brochacho we're actually using this for our contest prep now."&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;Below is the full demo of the project, you may have to wait good 2 sec for it to load!&lt;/p&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%2Fhhppgy7a35jdjtzb17gm.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%2Fhhppgy7a35jdjtzb17gm.gif" alt="cpmeta Full Project Demo" width="720" height="405"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Code
&lt;/h2&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/prathamanvekar" rel="noopener noreferrer"&gt;
        prathamanvekar
      &lt;/a&gt; / &lt;a href="https://github.com/prathamanvekar/cpmeta" rel="noopener noreferrer"&gt;
        cpmeta
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Feeding your chaotic scratchpad notes to a local LLM so it can professionally diagnose your skill issues.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;cpmeta 🧠&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;A thinking-process analyzer for competitive programmers. Takes raw, timestamped scratchpad notes from your practice sessions and turns them into actionable algorithmic insights, stall root causes, and targeted study plans using local LLMs.&lt;/p&gt;




&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why cpmeta?&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;When solving LeetCode or Codeforces problems, developers often keep scratchpad notes:&lt;/p&gt;

&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;0:00 - read problem statement. contiguous subarrays with k distinct elements.
0:03 - thought about standard sliding window with two pointers.
0:07 - stuck: how to count *exact* k without missing smaller left bounds?
0:15 - breakthrough: exact(k) = atMost(k) - atMost(k - 1)
0:22 - tested edge cases and submitted -&amp;gt; Accepted.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;These notes capture your real-time cognitive blindspots, but usually get discarded. &lt;strong&gt;cpmeta&lt;/strong&gt; parses your notes alongside the problem statement with a local LLM to figure out:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Where and why you got stuck&lt;/strong&gt; (root cause analysis with exact durations).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Behavioral patterns&lt;/strong&gt; (e.g. abandoning correct approaches too early, missing invariants).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cumulative weaknesses&lt;/strong&gt;…&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/prathamanvekar/cpmeta" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



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

&lt;p&gt;The engine is powered by &lt;strong&gt;Ollama&lt;/strong&gt; running open-weight coding models like &lt;code&gt;qwen2.5-coder:7b&lt;/code&gt; locally. It connects directly to the local Ollama instance on port 11434, while also supporting remote endpoints via Cloudflare tunnels or Ngrok when needed.&lt;/p&gt;

&lt;p&gt;To make local models output consistent coaching data instead of unstructured chat, we constrain inference to a &lt;strong&gt;strict JSON schema&lt;/strong&gt; and pair it with a multi-stage parser that heals trailing truncations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Querying local Ollama with JSON enforcement and defensive extraction
&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/api/generate&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;model&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;system&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;SINGLE_PROBLEM_SYSTEM_PROMPT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;prompt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;user_prompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;stream&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;format&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;options&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;temperature&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;top_p&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.9&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;analysis&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;extract_clean_json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;response&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The interface is built with &lt;strong&gt;Python and Streamlit&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;All sessions, raw notes, and coach metrics persist in an embedded &lt;strong&gt;SQLite database&lt;/strong&gt; (&lt;code&gt;cpmeta.db&lt;/code&gt;). For longitudinal synthesis, a custom aggregator condenses weeks of practice history into high-signal JSON summaries that fit comfortably within local LLM context windows without blowing past token limits. To ensure stable UI rendering, a multi-stage parser sanitizes raw model responses and auto-recovers valid JSON schemas.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Competitive programmers solve hundreds of problems every month. Paying metered cloud API bills for every quick thought note or practice session is unrealistic for students and independent builders. Open-weight models running on consumer hardware &lt;strong&gt;cost nothing to run&lt;/strong&gt;, making deliberate practice truly unlimited.&lt;/p&gt;

&lt;p&gt;Problem-solving scratchpads are also raw, unfiltered mental dumps. Keeping inference &lt;strong&gt;entirely on-device&lt;/strong&gt; ensures that no personal notes, contest thoughts, or thinking habits ever leave the machine.&lt;/p&gt;

&lt;p&gt;Finally, practice happens anywhere - on commutes, in libraries with restrictive firewalls, or during offline study sprints. Because cpmeta relies on local Ollama inference, the entire diagnostic suite works seamlessly &lt;strong&gt;without internet access&lt;/strong&gt;, accounts, or third-party API dependencies.&lt;/p&gt;
&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;


&lt;div class="ltag-agent-session"&gt;
  &lt;div class="agent-session-header"&gt;
    
    &lt;span class="agent-session-tool-icon-badge" title="Gemini CLI"&gt;
&lt;/span&gt;
    &lt;span class="agent-session-title"&gt;Building cpmeta: Local AI Metacognition Engine for Competitive Programming&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;Build cpmeta: a Competitive Programming Metacognition Notes Analyzer using local Ollama LLMs, Streamlit, and SQLite.&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;Designed the Minimal Neobrutalist UI, implemented Ollama API client with defensive multi-stage JSON parsing, SQLite schema and session seeder, single-problem ICPC coach analysis, and cross-session longitudinal pattern synthesis.&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;Fix the card rendering issue where HTML tags were displaying as raw text inside divs, rename the project to cpmeta across all files, and create clean gitignore and documentation.&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;Identified CommonMark 4-space indentation bug where markdown engines treat indented HTML as code blocks. Implemented robust line-stripping render_html helper, refactored dynamic item templates, renamed all branding and database schema to cpmeta with automatic migration, and created production-ready .gitignore and minimal README.&lt;/p&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;
        4 of 4 messages
    &lt;/span&gt;
  &lt;/div&gt;
&lt;/div&gt;



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

&lt;p&gt;Render&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
