Skip to content

Conversation

@sydney-runkle
Copy link
Contributor

@sydney-runkle sydney-runkle commented Oct 23, 2025

uv pip install -e ./docs_reviewer
docs-reviewer

basic summary

Docs Reviewer - AI-powered documentation code reviewer

I can help you:
  • Review markdown files and validate code snippets
  • Find and list code snippets in documentation
  • Generate corrected versions of docs with fixes
  • Search for markdown files in your project

Just tell me what you'd like to do, or type 'exit' to quit.

 
You: please review demo_snippet.md

Docs Reviewer
I'll review the markdown file for you. Let me start by reading it to see what code snippets it contains.

🔧 read_file
  file_path: /Users/sydney_runkle/oss/deepagents/demo_snippet.md
Let me check what files are available in the current directory:

🔧 ls
  path: /Users/sydney_runkle/oss/deepagents

🔧 get_working_directory

🔧 find_markdown_files
  directory: /Users/sydney_runkle/oss/deepagents
  ✅ Found 12 markdown files
    • notes_for_me.md
    • README.md
    • demo_snippet.md
    • claude.md
    • docs_reviewer/README.md
    • docs_reviewer/SIMPLE_USAGE.md
    • .pytest_cache/README.md
    • .venv/lib/python3.13/site-packages/httpx-0.28.1.dist-info/licenses/LICENSE.md
    • .venv/lib/python3.13/site-packages/httpcore-1.0.9.dist-info/licenses/LICENSE.md
    • .venv/lib/python3.13/site-packages/idna-3.11.dist-info/licenses/LICENSE.md
    ... and 2 more

Great! I found the file. Let me read it now:

🔧 read_file
  file_path: /Users/sydney_runkle/oss/deepagents/demo_snippet.md
That's strange - the file was found by find_markdown_files but can't be read. Let me try using the review_markdown_file tool 
directly:

🔧 review_markdown_file
  markdown_file: /Users/sydney_runkle/oss/deepagents/demo_snippet.md
Perfect! I found 2 code snippets. Now I'll spawn a snippet_fixer subagent for each snippet in parallel to test and fix them.

🤖 Spawning subagent: unknown


🤖 Spawning subagent: unknown
Excellent! Both snippets have been tested and fixed. Now I'll finalize the review by applying the fixes to the markdown file:

🔧 finalize_review
  ✅ Review finalized
    2/2 passed

Changes:
--- /Users/sydney_runkle/oss/deepagents/demo_snippet.md                                                                      
+++ /Users/sydney_runkle/oss/deepagents/demo_snippet.md                                                                      
@@ -5,24 +5,13 @@                                                                                                            
 ## Python Example                                                                                                           
                                                                                                                             
                                                                                                                             
                                                                                                                                                                                            
                                                                                                                             
-# Calculate factorial                                                                                                       
                                                                                                                             
-def factorial(n):                                                                                                           
                                                                                                                             
-    if n <= 1:                                                                                                              
                                                                                                                             
-        return 1                                                                                                            
                                                                                                                             
-    return n * factorial(n - 1)                                                                                             
                                                                                                                             
+# Calculate factorial                                                                                                       
def factorial(n):                                                                                                            
    if n <= 1:                                                                                                               
        return 1                                                                                                             
    return n * factorial(n - 1)                                                                                              
                                                                                                                             
result = factorial(5)                                                                                                        
print(f"Factorial of 5 is: {result}")                                                                                        
                                                                                                                             
                                                                                                                             
-result = factorial('not a number')                                                                                          
                                                                                                                             
-print(f"Factorial of 5 is: {result}")                                                                                       
                                                                                                                                                                                                                                                 
                                                                                                                             
                                                                                                                             
                                                                                                                             
 ## JavaScript Example                                                                                                       
                                                                                                                             
                                                                                                                             
                                                                                                                                                                                                                                        
                                                                                                                             
-// Simple function test                                                                                                     
                                                                                                                             
-function greet(name) {                                                                                                      
                                                                                                                             
-    return `Hello, ${name}!`;                                                                                               
                                                                                                                             
-}                                                                                                                           
                                                                                                                             
+// Simple function test                                                                                                     
function greet(name) {                                                                                                       
    return `Hello, ${name}!`;                                                                                                
}                                                                                                                            
                                                                                                                             
const undefinedVariable = "World";                                                                                           
result = greet(undefinedVariable)                                                                                            
console.log("Testing complete!");                                                                                            
                                                                                                                             
                                                                                                                             
-result = greet(undefinedVariable)                                                                                           
                                                                                                                             
-console.log("Testing complete!");                                                                                           
                                                                                                                                                                                                                                              
                                                                                                                             

Perfect! I've successfully reviewed and fixed the code snippets in `demo_snippet.md`. Here's a summary:

## Review Complete ✓

**File:** demo_snippet.md  
**Total Snippets:** 2  
**Success Rate:** 100%

### Issues Found and Fixed:

1. **Python Snippet (lines 7-15)**
   - **Issue:** Passing a string `'not a number'` to the `factorial()` function, which would cause a TypeError
   - **Fix:** Changed to `factorial(5)` to match the expected output message

2. **JavaScript Snippet (lines 20-27)**
   - **Issue:** Reference to undefined variable `undefinedVariable` causing a ReferenceError
   - **Fix:** Added `const undefinedVariable = "World";` before using it

Both snippets now execute successfully! The markdown file has been updated with the corrected code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant