<?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: Rahul Patra</title>
    <description>The latest articles on DEV Community by Rahul Patra (@rahul_patra_1260322e0e191).</description>
    <link>https://dev.to/rahul_patra_1260322e0e191</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%2F4158029%2Fb47e65f8-01c4-4f7f-b7d8-a863e524a52d.jpg</url>
      <title>DEV Community: Rahul Patra</title>
      <link>https://dev.to/rahul_patra_1260322e0e191</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rahul_patra_1260322e0e191"/>
    <language>en</language>
    <item>
      <title>CodeGuide is a CLI that reads a code repository</title>
      <dc:creator>Rahul Patra</dc:creator>
      <pubDate>Sat, 31 Oct 2026 15:31:07 +0000</pubDate>
      <link>https://dev.to/rahul_patra_1260322e0e191/codeguide-is-a-cli-that-reads-a-code-repository-3p16</link>
      <guid>https://dev.to/rahul_patra_1260322e0e191/codeguide-is-a-cli-that-reads-a-code-repository-3p16</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week4-2026-10-26"&gt;Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;CodeGuide is a CLI that reads a code repository and writes an onboarding guide for&lt;br&gt;
a new developer. It outputs &lt;code&gt;ONBOARDING.md&lt;/code&gt; and a single-file HTML report with a&lt;br&gt;
searchable file tree and dependency graph.&lt;/p&gt;

&lt;p&gt;I read the theme as the ghosts inside old codebases: the engineer who left, the&lt;br&gt;
reason a strange function exists, the folder nobody dares touch. That knowledge&lt;br&gt;
is in the code but nobody wrote it down. CodeGuide tries to bring it back, and it&lt;br&gt;
only says what it can point to. Every claim cites a file and line range, or is&lt;br&gt;
marked "unclear". A ghost story without evidence is just a rumor.&lt;/p&gt;

&lt;p&gt;I built it because new hires spend their first week asking the same questions&lt;br&gt;
in Slack, and the answers are already in the repo.&lt;/p&gt;

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

&lt;p&gt;[Link to video or deployed report]&lt;/p&gt;

&lt;p&gt;Sample run on [repo name]:&lt;a href="https://github.com/brobengali/codereviewer" rel="noopener noreferrer"&gt;https://github.com/brobengali/codereviewer&lt;/a&gt;&lt;br&gt;
&lt;code&gt;codeguide scan ./repo --offline&lt;/code&gt;&lt;br&gt;
[Screenshot of the generated ONBOARDING.md and the HTML report]&lt;/p&gt;

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

&lt;p&gt;[GitHub repo link or embed]&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Python 3.11+&lt;/strong&gt;, Typer for the CLI, pydantic for config and output validation,
tree-sitter for parsing, Jinja2 for prompts and report templates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local inference:&lt;/strong&gt; with &lt;code&gt;--offline&lt;/code&gt;, only a local OpenAI-compatible server
is allowed ([Ollama / llama.cpp], model: [open-weight model you used]). No code
leaves the machine. Gemini is an optional provider for people who want it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Untrusted input:&lt;/strong&gt; the target repo is never executed. No install scripts,
tests, or git hooks run. Secrets are redacted before any model sees the code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt injection defense:&lt;/strong&gt; repo text goes into a data block with a random
per-request boundary token. The model gets no tools, and its output must pass
a strict JSON schema with citations or it is rejected.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No hard-coded values:&lt;/strong&gt; models, limits, ignore patterns, detection rules and
prompts all live in config, rule files and templates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Slop gate:&lt;/strong&gt; &lt;code&gt;codeguide lint-docs&lt;/code&gt; flags uncited, generic, or repeated
sentences in generated docs, and a grounding pass checks that every cited
line exists.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I built it step by step with a coding agent, one reviewed milestone at a time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;The people who most need a codebase explained are often the ones who can't send&lt;br&gt;
it to a third party: private repos, client code, regulated industries. Open-weight&lt;br&gt;
models and local inference make &lt;code&gt;--offline&lt;/code&gt; possible, so the code never leaves&lt;br&gt;
the machine. A closed API would have forced a trade-off between a useful&lt;br&gt;
onboarding guide and a data-policy violation.&lt;/p&gt;

&lt;p&gt;Open tooling also means anyone can inspect the prompts, the redaction rules and&lt;br&gt;
the rule files, then change them. Adding a new language is a data file, not a&lt;br&gt;
fork of the core.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;[Link or agent_session embed, or remove this section]&lt;/p&gt;

&lt;h2&gt;
  
  
  The Spirit of It
&lt;/h2&gt;

&lt;p&gt;[Optional: one real moment. For example, the first time it explained a repo&lt;br&gt;
you had never opened and you checked the cited lines and they were right.&lt;br&gt;
Or the first time it said "unclear" instead of making something up.&lt;br&gt;
If you don't have one, delete this section.]&lt;/p&gt;

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

&lt;p&gt;[List the partner categories that apply after checking the challenge page.&lt;br&gt;
Candidates: anything tied to local or open-weight inference. Otherwise remove.]&lt;/p&gt;

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