<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by loosefingers on Medium]]></title>
        <description><![CDATA[Stories by loosefingers on Medium]]></description>
        <link>https://medium.com/@loosefingers?source=rss-23bdc1d70b98------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*CqpGUmfYVmvJg7sb0Uj2QQ.png</url>
            <title>Stories by loosefingers on Medium</title>
            <link>https://medium.com/@loosefingers?source=rss-23bdc1d70b98------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 08:57:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@loosefingers/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Tiny-Todo-MCP: Designing and Implementing a Simple TODO App Leveraging LLM Power]]></title>
            <link>https://medium.com/@loosefingers/tiny-todo-mcp-designing-and-implementing-a-simple-todo-app-leveraging-llm-power-51aad4063cb3?source=rss-23bdc1d70b98------2</link>
            <guid isPermaLink="false">https://medium.com/p/51aad4063cb3</guid>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[loosefingers]]></dc:creator>
            <pubDate>Sun, 23 Mar 2025 08:29:58 GMT</pubDate>
            <atom:updated>2025-03-23T11:27:04.635Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>“What would happen if we built a TODO app using MCP and LLM?”</p><p>I’d like to share this experimental project that began with this simple question. MCP stands for Model Context Protocol, a new protocol proposed by Anthropic that enables Large Language Models (LLMs) to use external tools and APIs.</p><p>In this project, I explored creating an application where TODOs could be manipulated with natural language expressions like “Actually, let’s move this to next week,” and investigated application design patterns that work well with LLMs.</p><p>You can check out the full source code on GitHub: <a href="https://github.com/tkc/tinyt-todo-mcp">https://github.com/tkc/tinyt-todo-mcp</a></p><h3>Designing a TODO App Compatible with LLMs</h3><p>Traditional TODO apps have complex UIs and data structures. However, when utilizing LLMs, a different approach becomes possible.</p><p>The design philosophy of Tiny-Todo-MCP focused on leveraging the “strengths of LLMs”:</p><ol><li><strong>Natural Language Input</strong>: Instead of complex UI operations, users can give instructions in natural language like “Write a report by tomorrow”</li><li><strong>Minimal Data Structure</strong>: Rather than complex fields like title, description, and deadline, we store only simple text</li><li><strong>AI-Enhanced Information</strong>: Keep storage simple, but use LLM interpretation to create rich displays</li><li><strong>Contextual Information Utilization</strong>: Provide external information like holiday calendars to the LLM</li></ol><p>In essence, this is a reversed design philosophy compared to traditional apps: “Store data simply, then enrich it with AI power when displaying.”</p><h3>System Data Flow</h3><p>The basic flow of the system is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0DvMDGLV36w6jE5LsqEnAQ.png" /></figure><p>The database is extremely simple, storing only text content and creation timestamps. When displaying, the LLM transforms this simple data into a human-readable format using formatting prompts and holiday information.</p><h3>Usage Examples</h3><p>Let’s look at some examples of how it functions:</p><h3>Example 1: Adding a Task</h3><p><strong>User</strong>: “I want to write an article for Medium by April 13th, but with low priority.”</p><p>Added. Current TODO list:</p><blockquote>- [ ] ✍️ **Write an article for Medium**<br> *Due:* 2025/04/13 (TBD)<br> *Priority:* Low</blockquote><h3>Example 2: Changing a Deadline</h3><p><strong>User</strong>: “Actually, let’s move this to next week”</p><p>Deadline updated. Current TODO list:</p><blockquote>- [ ] ✍️ **Write an article for Medium**<br> *Due:* 2025/03/30 (TBD)<br> *Priority:* Low</blockquote><h3>Example 3: Extending Deadline and Changing Priority</h3><p><strong>User</strong>: “I want to slow down the pace, so let’s extend this until after Golden Week and lower the priority”</p><p>Deadline and priority updated. Current TODO list:</p><blockquote>- [ ] ✍️ **Write an article for Medium**<br> *Due:* 2025/05/07 (TBD)<br> *Priority:* Lowest<br> *Notes:* After Golden Week</blockquote><h3>Example 4: Handling Ambiguous Requests</h3><p>One of the most powerful aspects of using LLMs for TODO management is their ability to understand ambiguous or imprecise requests. Traditional apps require specific inputs in specific fields, but our system can interpret natural human communication.</p><p><strong>User</strong>: “I’m feeling overwhelmed this week”</p><blockquote>I’ve adjusted your tasks based on your current workload. Current TODO list:</blockquote><blockquote>- [ ] ✍️ **Write an article for Zenn**<br> *Due:* 2025/05/14 (TBD)<br> *Priority:* Low<br> *Notes:* Moved forward due to current workload<br> <br>Would you like me to suggest breaking this task into smaller subtasks?</blockquote><p><strong>User</strong>: “Make it more fun somehow”</p><blockquote>I’ve updated your task to make it more enjoyable. Current TODO list:</blockquote><blockquote>- [ ] 🎮 **Write an article for Zenn — gamified approach**<br> *Due:* 2025/05/14 (TBD)<br> *Priority:* Low<br> *Notes:* Try the Pomodoro technique (25 min work, 5 min break) and reward yourself after each session. Consider writing about a topic you’re passionate about!</blockquote><p><strong>User</strong>: “Get back to it next month when I have time”</p><blockquote>Task rescheduled for next month. Current TODO list:</blockquote><blockquote>- [ ] ✍️ **Write an article for Zenn**<br> *Due:* 2025/04/15 (TBD)<br> *Priority:* Normal<br> *Notes:* Scheduled for when you have more availability next month</blockquote><p>With traditional TODO apps, these operations would require manipulating multiple UI components, but this app allows operations using just natural language, even when those requests are ambiguous or incomplete.</p><h3>Technical Implementation</h3><p>The implementation is very straightforward. The main components are:</p><ol><li><strong>Database</strong>: A simple SQLite database</li><li><strong>Repository Layer</strong>: Abstraction of data access</li><li><strong>Service Layer</strong>: Business logic and management of holiday information and formatting prompts</li><li><strong>MCP Tools</strong>: User interaction interface</li></ol><h3>The Importance of Formatting Prompts</h3><p>The formatting prompt that handles conversion during display instructs the LLM on how to interpret TODO data. For example:</p><pre>Below is a TODO list written in various formats. Please convert it into a clean, unified Markdown format according to the rules below:<br><br>1. **Task Status:**<br>- Each task should be a list item with a checkbox.<br>- Use `[ ]` for incomplete tasks and `[x]` for completed tasks.<br>2. **Task Name &amp; Emojis:**<br>- Make the task name **bold**.<br>Prepend the task name with an appropriate emoji that matches the task&#39;s nature.</pre><p>This prompt allows simply stored data to be displayed in a consistent, easy-to-read format.</p><h3>Insights Gained Through Development</h3><p>Through this project, I gained several important insights:</p><ol><li><strong>Effective Use of LLMs</strong>: Appropriate prompt design and contextual information enable rich expressions from simple data.</li><li><strong>Separation of Data and Display</strong>: A new pattern emerges where stored data is kept minimal, but enhanced by AI power during display.</li><li><strong>Potential of MCP</strong>: Even with simple APIs, powerful feature extensions are possible when working with LLMs.</li><li><strong>Handling Ambiguity</strong>: Perhaps the most significant advantage is how LLMs can handle ambiguous, contextual, or imprecise requests. While traditional apps break when users don’t follow exact input requirements, LLM-powered apps can:</li></ol><ul><li>Interpret emotional context (“I’m feeling overwhelmed”)</li><li>Apply cultural knowledge (knowing when “Golden Week” occurs)</li><li>Make reasonable inferences (“next month” → appropriate date range)</li><li>Provide helpful suggestions beyond the literal request</li></ul><h3>Conclusion</h3><p>Tiny-Todo-MCP demonstrates new possibilities for application design in the AI era. Rather than complicating data structures, we can keep them simple while utilizing the flexibility and comprehension abilities of LLMs to enhance user experiences.</p><p>Designs centered around natural language interactions reduce users’ psychological burden and realize more human-centered interfaces.</p><p>As protocols like MCP become more widespread, such approaches may become more common, potentially causing a paradigm shift in application design. I look forward to continuing experimentation and exploration of application designs that work well with LLMs.</p><p>If you’re interested in exploring this project further or contributing, please check out the repository at <a href="https://github.com/tkc/tinyt-todo-mcp">https://github.com/tkc/tinyt-todo-mcp</a>.</p><p><strong>Code Example</strong></p><p>Finally, here’s a simple implementation example of an MCP tool:</p><pre>// MCP tool implementation example<br>async function update_todo(content: string): Promise&lt;string&gt; {<br>  try {<br>    const latestTodo = await todoService.getOrCreateLatestTodo(content);<br>    const formattingPrompt = await todoService.getFormattingPrompt();<br>    const holidaysInfo = await todoService.getHolidaysInfo();<br>    <br>    return {<br>      content: latestTodo.content,<br>      prompt: formattingPrompt,<br>      holidays: holidaysInfo<br>    };<br>  } catch (error) {<br>    console.error(&quot;Error updating TODO:&quot;, error);<br>    throw new Error(&quot;Failed to update TODO&quot;);<br>  }<br>}</pre><p>Though the implementation is simple, it achieves powerful functionality by working with LLMs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51aad4063cb3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Custom MCP Server Template with TypeScript: Connecting AI Models to External Tools]]></title>
            <link>https://medium.com/@loosefingers/building-a-custom-mcp-server-template-with-typescript-connecting-ai-models-to-external-tools-c3c3f95741b0?source=rss-23bdc1d70b98------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3c3f95741b0</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[mcp-server]]></category>
            <dc:creator><![CDATA[loosefingers]]></dc:creator>
            <pubDate>Sat, 22 Mar 2025 06:23:18 GMT</pubDate>
            <atom:updated>2025-03-22T06:33:20.557Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/944/0*0NMjOcTPNH4117Gw.png" /></figure><h3><strong>Introduction</strong></h3><p>As AI continues to evolve rapidly, the demand for seamless integration between Large Language Models (LLMs) and external tools is growing exponentially. The Model Context Protocol (MCP) has emerged as a standardized protocol allowing AI models to access external functionalities and data sources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oJJN7f6l6eeKG_UpHui_xA.png" /></figure><p>The complete code for this project is available on GitHub:</p><p><a href="https://github.com/tkc/mcp-server-template">https://github.com/tkc/mcp-server-template</a></p><h3>There are three primary reasons to build your own MCP server:</h3><p>1. <strong>Custom Functionality</strong>: Provide AI with tools tailored to specific domains or business needs<br>2. <strong>Security &amp; Privacy Control</strong>: Safely manage access to your data and APIs<br>3. <strong>Performance Optimization</strong>: Implement efficient solutions optimized for specific use cases</p><p>To deepen my understanding of this technology, I created a simple MCP server with comprehensive tests. In this article, I’ll walk through the basic structure, implementation, and testing strategies of an MCP server.</p><h3><strong>Understanding the MCP Architecture</strong></h3><p>The Model Context Protocol establishes a standardized way for AI models to interact with external tools. Here’s the typical flow of an MCP interaction:</p><p>1. A user sends a query to an AI model<br>2. The AI analyzes the query and determines if external tools are needed<br>3. If needed, the AI sends a request to the MCP server with the appropriate tool name and parameters<br>4. The MCP server validates the parameters and executes the specified tool<br>5. The execution results are returned to the AI, which incorporates them into its response to the user</p><p>This architecture enables AI models to safely access various functionalities implemented on the server side, providing richer responses to users.</p><h3><strong>Creating an MCP Server Instance</strong></h3><p>The first step in building an MCP server is initializing the `McpServer` class:</p><pre><br>const server = new McpServer({<br> name: ‘quiz-mcp-server’,<br> version: ‘1.0.0’,<br> description: ‘A specialized Model Context Protocol server that provides interactive quiz functionality…’,<br>});</pre><p>Let’s examine these parameters:</p><ul><li><strong>name</strong>: The server’s identifier, used by clients to recognize this MCP server</li><li><strong>version</strong>: The server’s version number, helpful for API compatibility and tracking changes</li><li><strong>description</strong>: A detailed explanation of the server’s functionality that helps AI models understand its capabilities and make appropriate tool selections</li></ul><p>This information is used during protocol handshakes and client information provision. The description is particularly important as it allows the AI to understand when and how to use this server and its tools.</p><h3><strong>Registering Tools</strong></h3><p>The <em>`</em><strong><em>server.tool()</em></strong><em>`</em> method registers new tools to the MCP server:</p><pre><br>server.tool(<br> ‘get_quiz’, // Tool name<br> ‘Detailed description…’, // Tool description<br> QuizSchema.shape, // Parameter schema<br> // Implementation function (code omitted)<br>);<br></pre><h3>The parameters are:</h3><p>1. <strong>Tool name</strong>: A unique identifier that the AI model will use to call this tool. Names should be concise and clearly indicate functionality.</p><p>2. <strong>Tool description</strong>: A detailed explanation of what the tool does and when it should be used. This is crucial for the AI model to understand the tool’s purpose. It should include appropriate use cases, input parameters, and expected outputs.</p><p>3. <strong>Parameter schema</strong>: A Zod schema that defines the structure and types of parameters the tool accepts. This ensures type safety and automated parameter validation:</p><pre><br> const QuizSchema = z.object({<br> category: z.enum([‘general’, ‘science’, ‘history’]),<br> difficulty: z.enum([‘easy’, ‘medium’, ‘hard’]),<br> count: z.number().min(1).max(10),<br> });<br> ```</pre><p>4. <strong>Implementation function</strong>: The function that performs the actual processing. It receives validated parameters and returns processing results.</p><p>The key to effective tool registration is providing clear and specific descriptions that enable AI models to use tools effectively. Tool names and descriptions are crucial cues for the model to understand user intent and call tools at appropriate times.</p><h3><strong>Implementing Tests</strong></h3><p>Testing is critical for ensuring the reliability of an MCP server. I implemented several types of tests:</p><h3><strong>Unit Tests for Individual Tools</strong></h3><pre><br>describe(‘Quiz Tool’, () =&gt; {<br> const quizTool = new QuizTool();<br> <br> test(‘returns quizzes with valid parameters’, async () =&gt; {<br> const result = await quizTool.execute({<br> category: ‘general’,<br> difficulty: ‘easy’,<br> count: 1,<br> });<br> <br> expect(result.status).toBe(‘success’);<br> expect(result.quizzes).toBeDefined();<br> expect(result.quizzes.length).toBe(1);<br> });<br> <br> test(‘throws error with invalid parameters’, async () =&gt; {<br> await expect(async () =&gt; {<br> await quizTool.execute({<br> category: ‘invalid’,<br> difficulty: ‘easy’,<br> count: 1,<br> });<br> }).rejects.toThrow();<br> });<br>});<br></pre><h3><strong>Integration Tests for the Server</strong></h3><pre><br>describe(‘MCP Server’, () =&gt; {<br> const server = new McpServer({<br> name: ‘test-server’,<br> version: ‘1.0.0’,<br> });<br> <br> server.registerTool(new QuizTool());<br> <br> test(‘tools are correctly registered’, () =&gt; {<br> expect(server.getTools()).toContain(‘get_quiz’);<br> });<br> <br> test(‘handles requests properly’, async () =&gt; {<br> const response = await server.processRequest({<br> tool: ‘get_quiz’,<br> params: {<br> category: ‘general’,<br> difficulty: ‘easy’,<br> count: 1,<br> },<br> });<br> <br> expect(response.status).toBe(‘success’);<br> });<br> <br> test(‘handles requests to non-existent tools’, async () =&gt; {<br> const response = await server.processRequest({<br> tool: ‘non_existent_tool’,<br> params: {},<br> });<br> <br> expect(response.status).toBe(‘error’);<br> expect(response.error.message).toContain(‘Tool not found’);<br> });<br>});</pre><h3><strong>Performance Tests</strong></h3><pre><br>test(‘handles multiple concurrent requests’, async () =&gt; {<br> const requests = Array(50)<br> .fill(null)<br> .map(() =&gt;<br> server.processRequest({<br> tool: ‘get_quiz’,<br> params: {<br> category: ‘general’,<br> difficulty: ‘easy’,<br> count: 1,<br> },<br> })<br> );<br> <br> const results = await Promise.all(requests);<br> expect(results.every(r =&gt; r.status === ‘success’)).toBe(true);<br>});</pre><h3><strong>Best Practices for MCP Server Development</strong></h3><p>Based on my implementation experience, here are some best practices to consider:</p><h3>1. Detailed Tool Descriptions</h3><p>Spend time crafting detailed, specific tool descriptions. The better your description, the more effectively AI models can utilize your tools. Include:</p><ul><li>Primary purpose of the tool</li><li>When to use (and when not to use) the tool</li><li>Expected inputs and outputs</li><li>Example scenarios</li></ul><h3>2. Robust Parameter Validation</h3><p>Use Zod or similar validation libraries to ensure that all parameters are properly validated before execution. This prevents runtime errors and provides clear error messages when validation fails.</p><h3>3. Error Handling</h3><p>Implement comprehensive error handling throughout your MCP server. All tools should catch and properly handle exceptions, returning standardized error responses rather than crashing.</p><h3>4. Testing Strategy</h3><p>Implement a multi-layered testing strategy:</p><ul><li>Unit tests for individual tools</li><li>Integration tests for the server and tool interactions</li><li>Performance tests to ensure the server can handle expected load</li><li>Error case tests to verify proper error handling</li></ul><h3>5. Authentication and Authorization</h3><p>For production MCP servers, implement proper authentication and authorization mechanisms to ensure that only authorized clients can access your tools.</p><h3>Conclusion</h3><p>Building a custom MCP server template with TypeScript provides a robust foundation for integrating AI models with external tools. The key benefits include:</p><ul><li><strong>Type safety</strong>: Strict type checking and validation with TypeScript and Zod</li><li><strong>Test coverage</strong>: Comprehensive testing from unit tests to integration and performance tests</li><li><strong>Extensibility</strong>: Easy addition of new tools through a consistent architecture</li></ul><p>While the MCP protocol is still evolving, it’s clear that it will play an important role in connecting AI with external systems. This template serves as a starting point for efficiently building backends for various AI applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3c3f95741b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Convenience of Large Language Models (LLMs) in Code Analysis Using ChatGPT o1]]></title>
            <link>https://medium.com/@loosefingers/the-convenience-of-large-language-models-llms-in-code-analysis-using-chatgpt-o1-6b82e9767c09?source=rss-23bdc1d70b98------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b82e9767c09</guid>
            <category><![CDATA[code-analysis]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[chatgpt-o1]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[loosefingers]]></dc:creator>
            <pubDate>Mon, 16 Sep 2024 17:19:38 GMT</pubDate>
            <atom:updated>2024-09-16T20:36:47.668Z</atom:updated>
            <content:encoded><![CDATA[<p>Code analysis is an essential process in software development for detecting bugs and optimizing code. However, as code becomes more complex, human analysis can become time-consuming, leading to missed errors and optimization opportunities. This is where <strong>LLMs (Large Language Models)</strong>, a type of AI technology, are expected to dramatically improve code analysis by leveraging their superior natural language processing capabilities.</p><p><a href="https://github.com/tkc/llm-repository-loader">GitHub - tkc/llm-repository-loader: LLM Repository Loader is a Go-based command-line tool that reads, processes, and outputs the contents of a Git repository while respecting custom ignore patterns. The tool supports both local and remote GitHub repositories, allowing developers to efficiently export repository structures and file contents into a single text file.</a></p><p><strong>Understanding and Automated Code Analysis</strong></p><p>LLMs, trained on vast datasets, are highly flexible and can handle various programming languages. This allows them not only to detect syntactic errors but also to perform advanced analyses, such as:</p><p><strong>Understanding Code Intent</strong>:</p><p>LLMs can explain the purpose of code and its context in natural language. For instance, they can describe the intent of functions or classes, point out design flaws, and identify inefficiencies.</p><p><strong>Code Improvement Suggestions</strong>:</p><p>LLMs can analyze written code and suggest refactoring to enhance performance or security. For example, they can detect inefficient algorithms and recommend more efficient alternatives.</p><p><strong>Automated Bug Detection</strong><br>LLMs have the ability to recognize patterns in code and identify potential bugs. They can detect complex bugs and incompatibilities between libraries that static analysis tools might miss. Additionally, LLMs can provide specific error messages and solutions, significantly reducing developers’ debugging time.</p><p><strong>Automated Documentation Generation</strong><br>When documentation is lacking, LLMs can automatically generate explanations and usage guides for functions directly from existing code. This improves code readability and makes it easier for other developers or future maintenance. Moreover, LLMs can offer concrete examples of how to use functions and classes, streamlining the onboarding process for new developers.</p><p><strong>Summarizing and Visualizing Complex Code</strong><br>LLMs can extract key components from large codebases and summarize them. For example, in large-scale projects, they can create summaries to help developers understand the interdependencies between important functions and classes. LLMs can also collaborate with visualization tools to graphically represent the overall structure of the code, making it easier to grasp complex systems and enabling developers to focus on specific issues more quickly.</p><p><strong>Enhancing Code Reviews</strong><br>In traditional code reviews, developers must thoroughly examine code written by team members and identify problems. By using LLMs, the time required for code reviews can be significantly reduced. LLMs can automatically analyze submitted code, flagging areas that violate style guides, detecting potential bugs, and pointing out performance issues. They can also ensure that the code aligns with existing architectures and design patterns, thereby improving consistency in code quality.</p><p><strong>Usage</strong></p><p>For analyzing code that exists locally, use the following approach.</p><pre>go run main.go -local_repo_path /path/to/local/repository</pre><p>For directly analyzing code hosted on Git, use the following approach.</p><pre>go run main.go -local_repo_path tkc/llm-repository-loader</pre><p>The following text will be generated.</p><pre><br>----<br>cmd/main.go<br>package main<br><br>import (<br> &quot;flag&quot;<br> &quot;fmt&quot;<br> &quot;os&quot;<br> &quot;path/filepath&quot;<br> &quot;strings&quot;<br> &quot;tkc/llm-repository-loader/internal&quot;<br>)<br><br>func main() {<br> remoteRepo := flag.String(&quot;remote_repo&quot;, &quot;&quot;, &quot;Path to the GitHub repository (e.g., tkc/go_bedrock_proxy_server)&quot;)<br> localRepoPath := flag.String(&quot;local_repo_path&quot;, &quot;&quot;, &quot;Path to the local repo&quot;)<br> flag.Parse()<br><br> if *remoteRepo == &quot;&quot; &amp;&amp; *localRepoPath == &quot;&quot; {<br>  fmt.Println(&quot;Error: You must specify either a remote repository or a local repository.&quot;)<br>  fmt.Println(&quot;Usage: go run main.go [-local_repo_path /path/to/local/repo] [-remote_repo tkc/go_bedrock_proxy_server]&quot;)<br>  os.Exit(1)<br> }<br><br> // Find the project root where go.mod exists<br> projectRoot, err := internal.FindGoModRoot()<br> if err != nil {<br>  fmt.Printf(&quot;Error: %v\n&quot;, err)<br>  os.Exit(1)<br> }<br><br> // Define the output directory in the same location as go.mod<br> outputDir := filepath.Join(projectRoot, &quot;output&quot;)<br> if err := os.MkdirAll(outputDir, 0755); err != nil {<br>  fmt.Printf(&quot;Failed to create output directory: %v\n&quot;, err)<br>  os.Exit(1)<br> }<br><br> var repoPath string<br> if *remoteRepo != &quot;&quot; {<br>  // Download and extract remote repo if specified<br>  repoPath, err = internal.DownloadRemoteRepo(*remoteRepo)<br>  if err != nil {<br>   fmt.Printf(&quot;Error downloading repository: %v\n&quot;, err)<br>   os.Exit(1)<br>  }<br>  fmt.Printf(&quot;Repository downloaded and extracted to %s\n&quot;, repoPath)<br> } else if *localRepoPath != &quot;&quot; {<br>  // Use local repository if specified<br>  repoPath = *localRepoPath<br>  fmt.Printf(&quot;Using local repository at %s\n&quot;, repoPath)<br> }<br><br> ignoreFilePath := filepath.Join(projectRoot, &quot;.loader_ignores&quot;)<br><br> var ignoreList []string<br> if _, err := os.Stat(ignoreFilePath); err == nil {<br>  ignoreList = internal.GetIgnoreList(ignoreFilePath)<br> }<br><br> fmt.Print(ignoreList)<br><br> outputFilePath := filepath.Join(outputDir, strings.ReplaceAll(filepath.Base(repoPath), &quot;/&quot;, &quot;_&quot;)+&quot;.txt&quot;)<br> outputFile, err := os.Create(outputFilePath)<br> if err != nil {<br>  fmt.Printf(&quot;Error creating output file: %v\n&quot;, err)<br>  os.Exit(1)<br> }<br><br> internal.ProcessRepository(repoPath, ignoreList, outputFile)<br><br> outputFile.WriteString(&quot;--END--\n&quot;)<br> fmt.Printf(&quot;Repository contents written to %s\n&quot;, outputFilePath)<br>}<br><br><br>--END--</pre><p>If you ask ChatGPT o1-mini to “refactor the following code,” it can perform refactoring based on the entire code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gTmCAErBvMpDATQt81lM1A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8zVSQbdMsPOzmpuRSHm-9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n6qirlthvQSqFNmjN2Z_EA.png" /></figure><p><strong>Conclusion</strong></p><p>LLMs, with their advanced natural language processing capabilities, are revolutionizing the field of code analysis. They provide deep insights, natural language explanations, and optimization suggestions that were not possible with traditional tools. As a result, LLMs have the potential to dramatically increase developers’ productivity. It is anticipated that the integration of LLMs will become indispensable in the future of software development.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b82e9767c09" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>