<?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 Hamid Raza</title>
    <description>The latest articles on DEV Community by Muhammad Hamid Raza (@muhammadhamidraza).</description>
    <link>https://dev.to/muhammadhamidraza</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3837079%2F38f22981-d65b-4ad3-8f9b-cf6c3d7a266a.jpeg</url>
      <title>DEV Community: Muhammad Hamid Raza</title>
      <link>https://dev.to/muhammadhamidraza</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muhammadhamidraza"/>
    <language>en</language>
    <item>
      <title>I Built a Framework That Makes AI Ask Questions Before Writing Any Code</title>
      <dc:creator>Muhammad Hamid Raza</dc:creator>
      <pubDate>Sat, 21 Mar 2026 21:39:20 +0000</pubDate>
      <link>https://dev.to/muhammadhamidraza/i-built-a-framework-that-makes-ai-ask-questions-before-writing-any-code-16e4</link>
      <guid>https://dev.to/muhammadhamidraza/i-built-a-framework-that-makes-ai-ask-questions-before-writing-any-code-16e4</guid>
      <description>&lt;h1&gt;
  
  
  I Built a Framework That Makes AI Ask Questions Before Writing Any Code
&lt;/h1&gt;

&lt;h2&gt;
  
  
  The Moment I Got Frustrated
&lt;/h2&gt;

&lt;p&gt;I asked AI to build me an authentication system.&lt;/p&gt;

&lt;p&gt;90 seconds later — 40 files generated.&lt;/p&gt;

&lt;p&gt;3 months later — I had no idea how any of it worked.&lt;/p&gt;

&lt;p&gt;I couldn't debug it. I couldn't extend it.&lt;br&gt;
I was completely dependent on AI forever.&lt;/p&gt;

&lt;p&gt;Sound familiar?&lt;/p&gt;


&lt;h2&gt;
  
  
  The Real Problem
&lt;/h2&gt;

&lt;p&gt;AI coding tools are optimized for one thing: &lt;strong&gt;speed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You say "add authentication"&lt;br&gt;
AI immediately starts writing code.&lt;/p&gt;

&lt;p&gt;But that's NOT how senior developers work.&lt;/p&gt;

&lt;p&gt;A senior developer never opens their editor &lt;br&gt;
the moment they hear a feature request.&lt;/p&gt;

&lt;p&gt;They:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ask questions — What exactly do you need?&lt;/li&gt;
&lt;li&gt;Consider options — What are the trade-offs?&lt;/li&gt;
&lt;li&gt;Surface edge cases — What could go wrong?&lt;/li&gt;
&lt;li&gt;Plan architecture — How does it fit the system?&lt;/li&gt;
&lt;li&gt;THEN write code — Only after all of the above&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;AI skips steps 1 through 4.&lt;/strong&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  My Solution: Spec-Kit-CoLearn
&lt;/h2&gt;

&lt;p&gt;I built &lt;a href="https://github.com/MuhammadHamidRaza/spec-kit-colearn" rel="noopener noreferrer"&gt;Spec-Kit-CoLearn&lt;/a&gt; — a free open-source &lt;br&gt;
framework that transforms any AI coding tool into &lt;br&gt;
your senior architect co-partner first, &lt;br&gt;
coding worker second.&lt;/p&gt;


&lt;h2&gt;
  
  
  Two Modes — One Tool
&lt;/h2&gt;
&lt;h3&gt;
  
  
  MODE 1: Senior Architect (Default)
&lt;/h3&gt;

&lt;p&gt;When you start, AI enters Senior Architect Mode:&lt;/p&gt;

&lt;p&gt;✅ Asks 3-6 discovery questions&lt;br&gt;
✅ Presents 2-3 design options with trade-offs&lt;br&gt;
✅ &lt;strong&gt;Teaches you concepts you don't know&lt;/strong&gt;&lt;br&gt;
✅ Surfaces at least 3 edge cases&lt;br&gt;
✅ Defines measurable success criteria&lt;br&gt;
❌ Does NOT write code in this mode&lt;/p&gt;
&lt;h3&gt;
  
  
  MODE 2: Coding Worker
&lt;/h3&gt;

&lt;p&gt;Only activates AFTER you say "tasks approved":&lt;/p&gt;

&lt;p&gt;✅ Executes tasks one by one in order&lt;br&gt;
✅ Writes code matching spec exactly&lt;br&gt;
✅ Runs tests after each task&lt;br&gt;
✅ Stops and asks if scope changes&lt;/p&gt;
&lt;h3&gt;
  
  
  Why This Order Matters
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WRONG: Code first → Realize it's wrong → Rewrite → Waste days
RIGHT: Think first → Spec → Plan → Tasks → Code once, code right
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Teaching Mode — The Feature I'm Most Proud Of
&lt;/h2&gt;

&lt;p&gt;This is what makes Spec-Kit-CoLearn unique.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You say:&lt;/strong&gt; "I want users to log in"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI doesn't write code. It teaches:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You mentioned authentication. Let me explain &lt;br&gt;
your options before we design anything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JWT&lt;/strong&gt; is like a concert wristband.&lt;br&gt;
You show your ID once at entry.&lt;br&gt;
They give you a wristband.&lt;br&gt;
You show the wristband everywhere inside.&lt;br&gt;
No ID check again on every request.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sessions&lt;/strong&gt; store user data on the server.&lt;br&gt;
More control. Instant logout possible.&lt;br&gt;
But harder to scale.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OAuth&lt;/strong&gt; lets users log in via Google or GitHub.&lt;br&gt;
Less friction. You don't manage passwords.&lt;br&gt;
But you depend on third-party.&lt;/p&gt;

&lt;p&gt;Which fits your use case?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now you've learned AND made an informed decision.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Clarity Gate
&lt;/h2&gt;

&lt;p&gt;Before ANY spec is written, AI must pass &lt;br&gt;
a hard check — all 6 must pass:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;✅ WHO is clear        — Who uses this feature?
✅ WHAT is clear       — What exactly does it do?
✅ SCOPE is defined    — What's IN and what's OUT?
✅ EDGE CASES covered  — At least 3 discussed
✅ SUCCESS measurable  — At least 2 measurable criteria
✅ YOU approved        — You explicitly said "approved"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If ANY item fails → more questions.&lt;br&gt;
No gate passed = no spec written.&lt;br&gt;
&lt;strong&gt;This alone saves weeks of rewrites.&lt;/strong&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  The Learning Log
&lt;/h2&gt;

&lt;p&gt;After every feature, AI generates a Learning Log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## What You Learned:&lt;/span&gt;

| Term         | Definition                              |
|--------------|-----------------------------------------|
| JWT          | Stateless token for API authentication  |
| OAuth 2.0    | Third-party login protocol              |
| Sessions     | Server-side user state storage          |
| Bcrypt       | Password hashing with built-in salt     |
| httpOnly     | Cookie JavaScript cannot read (XSS safe)|
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You don't just ship code — &lt;strong&gt;you ship understanding.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Full Workflow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. pip install spec-kit-colearn
2. spec-kit-colearn init my-project
3. Open any AI coding tool
4. Paste activation prompt
5. Tell AI what you want (vague is fine!)
6. AI asks questions → teaches concepts
7. You choose from 3 options
8. Say "approved"
9. AI creates spec → plan → tasks
10. Say "tasks approved"
11. AI switches to Mode 2 → codes task by task
12. Learning log generated ✅
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Python&lt;/span&gt;
pip &lt;span class="nb"&gt;install &lt;/span&gt;spec-kit-colearn

&lt;span class="c"&gt;# JavaScript / Node&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @muhammad-hamid-raza/spec-kit-colearn

&lt;span class="c"&gt;# Initialize project&lt;/span&gt;
spec-kit-colearn init my-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Works With Every AI Tool
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;AI Tool&lt;/th&gt;
&lt;th&gt;Support&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Codex CLI&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini CLI&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GitHub Copilot&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cursor&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Windsurf&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qwen CLI&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Who Is This For?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Non-developers&lt;/strong&gt; — Have ideas but can't code?&lt;br&gt;
AI guides you step by step and teaches along the way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Junior developers&lt;/strong&gt; — Learn architecture, not just syntax.&lt;br&gt;
Understand WHY before HOW.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Senior developers&lt;/strong&gt; — Structured workflow, clear docs,&lt;br&gt;
no more "just write it" chaos.&lt;/p&gt;




&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;⭐ GitHub: &lt;a href="https://github.com/MuhammadHamidRaza/spec-kit-colearn" rel="noopener noreferrer"&gt;https://github.com/MuhammadHamidRaza/spec-kit-colearn&lt;/a&gt;&lt;br&gt;
📦 PyPI: &lt;a href="https://pypi.org/project/spec-kit-colearn" rel="noopener noreferrer"&gt;https://pypi.org/project/spec-kit-colearn&lt;/a&gt;&lt;br&gt;
📦 npm: &lt;a href="https://npmjs.com/package/@muhammad-hamid-raza/spec-kit-colearn" rel="noopener noreferrer"&gt;https://npmjs.com/package/@muhammad-hamid-raza/spec-kit-colearn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MIT license. Free forever. Contributions welcome.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;AI should be your &lt;strong&gt;thinking partner.&lt;/strong&gt;&lt;br&gt;
Not just your code generator.&lt;/p&gt;

&lt;p&gt;Build with clarity.&lt;br&gt;
Ship with confidence.&lt;br&gt;
Learn along the way.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with 🔥 from Pakistan 🇵🇰&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Feedback welcome in the comments!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>python</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
