|
| 1 | +# Manual Testing Guide for Module 2 Solution |
| 2 | + |
| 3 | +## Prerequisites |
| 4 | + |
| 5 | +1. Ensure you're in a git repository with commit history |
| 6 | +2. Install uv following instructions at: https://docs.astral.sh/uv/getting-started/installation/ |
| 7 | +3. Install dependencies: |
| 8 | + ```bash |
| 9 | + uv sync --all-extras |
| 10 | + ``` |
| 11 | + |
| 12 | +## Test 1: Verify Resources Setup |
| 13 | + |
| 14 | +Check that the shared directories exist: |
| 15 | +```bash |
| 16 | +# From the solution directory |
| 17 | +ls ../../templates/ |
| 18 | +ls ../../team-guidelines/ |
| 19 | +``` |
| 20 | + |
| 21 | +You should see: |
| 22 | +- Templates: bug.md, feature.md, docs.md, etc. |
| 23 | +- Team guidelines: coding-standards.md, pr-guidelines.md |
| 24 | + |
| 25 | +## Test 2: Test with Claude |
| 26 | + |
| 27 | +1. **Configure MCP Settings** |
| 28 | + |
| 29 | + Add to your Claude Desktop MCP settings (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS): |
| 30 | + |
| 31 | + ```json |
| 32 | + { |
| 33 | + "mcpServers": { |
| 34 | + "pr-agent": { |
| 35 | + "command": "uv", |
| 36 | + "args": [ |
| 37 | + "--directory", |
| 38 | + "/absolute/path/to/smart-file-analysis/solution", |
| 39 | + "run", |
| 40 | + "server.py" |
| 41 | + ] |
| 42 | + } |
| 43 | + } |
| 44 | + } |
| 45 | + ``` |
| 46 | + |
| 47 | +2. **Import to Claude Code** ([documentation](https://docs.anthropic.com/en/docs/claude-code/tutorials#import-mcp-servers-from-claude-desktop)): |
| 48 | + ```bash |
| 49 | + claude mcp import-from-desktop |
| 50 | + ``` |
| 51 | + |
| 52 | +3. **Restart Claude Desktop/Code** to pick up the new server |
| 53 | + |
| 54 | +4. **Test Resource Access** |
| 55 | + |
| 56 | + Ask Claude to test the new resources: |
| 57 | + - "What are our team's coding standards?" |
| 58 | + - "Show me the PR guidelines" |
| 59 | + - "What are the recent commits in this repository?" |
| 60 | + - "What's our team's review process?" |
| 61 | + - "Can you read the bug.md template?" |
| 62 | + |
| 63 | +## Test 3: Combined Tool and Resource Usage |
| 64 | + |
| 65 | +Test how Claude uses both tools and resources together: |
| 66 | + |
| 67 | +1. **Make some changes in your repo**: |
| 68 | + ```bash |
| 69 | + echo "# New feature" >> feature.py |
| 70 | + git add feature.py |
| 71 | + ``` |
| 72 | + |
| 73 | +2. **Ask Claude for comprehensive help**: |
| 74 | + - "Can you analyze my changes and suggest a PR based on our team guidelines?" |
| 75 | + - "What template should I use given our coding standards?" |
| 76 | + - "Based on recent commits, does my change follow the project patterns?" |
| 77 | + |
| 78 | +## Expected Behavior |
| 79 | + |
| 80 | +### Resources Should Return: |
| 81 | + |
| 82 | +1. **read_template("filename.md")** |
| 83 | + - Full content of the template file |
| 84 | + - Error message if file not found |
| 85 | + |
| 86 | +2. **read_team_guidelines("filename.md")** |
| 87 | + - Content of the guideline file |
| 88 | + - Error message if file not found |
| 89 | + |
| 90 | +3. **get_recent_changes()** |
| 91 | + - JSON with recent_commits array |
| 92 | + - Each commit has: hash, author, email, date, message |
| 93 | + - Includes change_statistics |
| 94 | + |
| 95 | +4. **get_team_review_process()** |
| 96 | + - JSON with pr_size_limits, review_sla, merge_requirements, communication |
| 97 | + |
| 98 | +### Claude Should Be Able To: |
| 99 | + |
| 100 | +1. **Access team context** when making suggestions |
| 101 | +2. **Reference specific guidelines** in responses |
| 102 | +3. **Analyze commit patterns** to suggest consistent changes |
| 103 | +4. **Apply team processes** when recommending workflows |
| 104 | + |
| 105 | +## Troubleshooting |
| 106 | + |
| 107 | +- **"File not found"**: Check that team-guidelines and templates directories exist at the correct path |
| 108 | +- **Resources not showing in Claude**: Ensure the server restarted after adding resources |
| 109 | +- **Git errors**: Make sure you're in a git repository with commit history |
| 110 | +- **Path issues**: Verify TEAM_GUIDELINES_DIR and TEMPLATES_DIR point to correct locations |
| 111 | + |
| 112 | +## Integration Testing |
| 113 | + |
| 114 | +Test that Module 2 builds on Module 1: |
| 115 | + |
| 116 | +1. All Module 1 tools should still work |
| 117 | +2. Resources should enhance tool suggestions |
| 118 | +3. Claude should reference guidelines when analyzing changes |
| 119 | + |
| 120 | +Example test: |
| 121 | +- "Analyze my changes and suggest a template that follows our team guidelines" |
| 122 | + |
| 123 | +This should use: |
| 124 | +- `analyze_file_changes` tool (from Module 1) |
| 125 | +- `read_team_guidelines` resource (new in Module 2) |
| 126 | +- `suggest_template` tool with context from resources |
0 commit comments