llmsbrieftxt 1.4.0__tar.gz → 1.11.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of llmsbrieftxt might be problematic. Click here for more details.

Files changed (47) hide show
  1. llmsbrieftxt-1.11.0/.github/workflows/claude-cli-qa.yml +296 -0
  2. llmsbrieftxt-1.11.0/.github/workflows/claude-doc-review.yml +296 -0
  3. llmsbrieftxt-1.11.0/.github/workflows/claude.yml +54 -0
  4. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/CLAUDE.md +42 -2
  5. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/PKG-INFO +77 -3
  6. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/README.md +76 -2
  7. llmsbrieftxt-1.11.0/docs/USER_JOURNEYS.md +700 -0
  8. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/llmsbrieftxt/cli.py +15 -1
  9. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/llmsbrieftxt/crawler.py +8 -0
  10. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/llmsbrieftxt/main.py +204 -7
  11. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/llmsbrieftxt/summarizer.py +42 -18
  12. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/pyproject.toml +1 -1
  13. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/tests/unit/test_cli.py +135 -0
  14. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/tests/unit/test_robustness.py +16 -17
  15. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/tests/unit/test_summarizer.py +40 -28
  16. llmsbrieftxt-1.4.0/.github/PULL_REQUEST_TEMPLATE.md +0 -44
  17. llmsbrieftxt-1.4.0/.github/pull_request_template.md +0 -63
  18. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  19. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  20. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  21. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/.github/ISSUE_TEMPLATE/question.yml +0 -0
  22. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/.github/copilot-instructions.md +0 -0
  23. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/.github/workflows/ci.yml +0 -0
  24. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/.github/workflows/pr-title-check.yml +0 -0
  25. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/.github/workflows/release.yml +0 -0
  26. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/.gitignore +0 -0
  27. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/CONTRIBUTING.md +0 -0
  28. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/LICENSE +0 -0
  29. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/PRODUCTION_CLEANUP_PLAN.md +0 -0
  30. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/llmsbrieftxt/__init__.py +0 -0
  31. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/llmsbrieftxt/constants.py +0 -0
  32. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/llmsbrieftxt/doc_loader.py +0 -0
  33. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/llmsbrieftxt/extractor.py +0 -0
  34. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/llmsbrieftxt/schema.py +0 -0
  35. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/llmsbrieftxt/url_filters.py +0 -0
  36. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/llmsbrieftxt/url_utils.py +0 -0
  37. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/pytest.ini +0 -0
  38. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/scripts/bump_version.py +0 -0
  39. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/tests/__init__.py +0 -0
  40. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/tests/conftest.py +0 -0
  41. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/tests/fixtures/__init__.py +0 -0
  42. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/tests/integration/__init__.py +0 -0
  43. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/tests/integration/test_doc_loader_integration.py +0 -0
  44. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/tests/unit/__init__.py +0 -0
  45. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/tests/unit/test_doc_loader.py +0 -0
  46. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/tests/unit/test_extractor.py +0 -0
  47. {llmsbrieftxt-1.4.0 → llmsbrieftxt-1.11.0}/uv.lock +0 -0
@@ -0,0 +1,296 @@
1
+ name: Claude CLI QA Tests
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize, reopened, ready_for_review]
6
+ branches: [main]
7
+ paths:
8
+ - 'llmsbrieftxt/**'
9
+ - 'tests/**'
10
+ - 'pyproject.toml'
11
+ - 'uv.lock'
12
+ - '.github/workflows/claude-cli-qa.yml'
13
+ workflow_dispatch:
14
+ inputs:
15
+ branch:
16
+ description: 'Branch to test (leave empty for current branch)'
17
+ required: false
18
+ type: string
19
+ test_scope:
20
+ description: 'Test scope (quick, standard, thorough)'
21
+ required: false
22
+ default: 'standard'
23
+ type: choice
24
+ options:
25
+ - quick
26
+ - standard
27
+ - thorough
28
+ single_test_case:
29
+ description: 'Run single test case (e.g., TS-001). Leave empty to run full test scope.'
30
+ required: false
31
+ type: choice
32
+ options:
33
+ - ''
34
+ - TS-001
35
+ - TS-002
36
+ - TS-003
37
+ - TS-004A
38
+ - TS-004B
39
+ - TS-005
40
+ - TS-006
41
+ - TS-007
42
+ - TS-008
43
+ - TS-009
44
+ - TS-010
45
+ - TS-011
46
+ - TS-012
47
+
48
+ jobs:
49
+ cli-qa-tests:
50
+ name: Agent-Based CLI QA
51
+ runs-on: ubuntu-latest
52
+ timeout-minutes: 20
53
+ permissions:
54
+ contents: read
55
+ pull-requests: write
56
+ issues: read
57
+ id-token: write
58
+ env:
59
+ OLLAMA_MODEL: gemma3:270m
60
+
61
+ steps:
62
+ - name: Checkout repository
63
+ uses: actions/checkout@v4
64
+ with:
65
+ ref: ${{ github.event.inputs.branch || github.head_ref || github.ref }}
66
+ fetch-depth: 1
67
+
68
+ - name: Setup Python
69
+ uses: actions/setup-python@v5
70
+ with:
71
+ python-version: '3.11'
72
+
73
+ - name: Install uv
74
+ run: |
75
+ curl -LsSf https://astral.sh/uv/install.sh | sh
76
+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
77
+
78
+ - name: Install package with dependencies
79
+ run: |
80
+ uv sync --all-groups
81
+
82
+ - name: Install Ollama
83
+ run: |
84
+ echo "Installing Ollama for local LLM testing..."
85
+ curl -fsSL https://ollama.com/install.sh | sh
86
+
87
+ # Verify installation
88
+ ollama --version
89
+
90
+ - name: Start Ollama service
91
+ run: |
92
+ echo "Starting Ollama service..."
93
+ ollama serve > ollama.log 2>&1 &
94
+ echo $! > ollama.pid
95
+
96
+ # Wait for Ollama to be ready
97
+ echo "Waiting for Ollama to be ready..."
98
+ timeout 60 bash -c 'until curl -s http://localhost:11434/api/tags > /dev/null; do sleep 2; done'
99
+
100
+ echo "✓ Ollama service is running"
101
+
102
+ - name: Pull Ollama model
103
+ run: |
104
+ echo "Pulling ${{ env.OLLAMA_MODEL }} model for testing..."
105
+ ollama pull ${{ env.OLLAMA_MODEL }}
106
+
107
+ echo "✓ Model pulled successfully"
108
+
109
+ - name: Verify Ollama setup
110
+ run: |
111
+ echo "Verifying Ollama models..."
112
+ ollama list
113
+
114
+ echo "✓ Model ready"
115
+
116
+ - name: Verify CLI installation
117
+ run: |
118
+ # Ensure CLI is accessible
119
+ uv run llmtxt --help
120
+
121
+ echo "✓ CLI installed and accessible"
122
+
123
+ - name: Determine test scope
124
+ id: test-scope
125
+ run: |
126
+ SCOPE="${{ github.event.inputs.test_scope || 'standard' }}"
127
+ echo "scope=$SCOPE" >> $GITHUB_OUTPUT
128
+
129
+ case "$SCOPE" in
130
+ quick)
131
+ echo "max_urls=2" >> $GITHUB_OUTPUT
132
+ echo "depth=1" >> $GITHUB_OUTPUT
133
+ ;;
134
+ thorough)
135
+ echo "max_urls=5" >> $GITHUB_OUTPUT
136
+ echo "depth=1" >> $GITHUB_OUTPUT
137
+ ;;
138
+ *)
139
+ echo "max_urls=3" >> $GITHUB_OUTPUT
140
+ echo "depth=1" >> $GITHUB_OUTPUT
141
+ ;;
142
+ esac
143
+
144
+ - name: Determine test argument
145
+ id: test-arg
146
+ run: |
147
+ # If single test case is specified, use that; otherwise use test scope
148
+ if [ -n "${{ github.event.inputs.single_test_case }}" ]; then
149
+ echo "arg=${{ github.event.inputs.single_test_case }}" >> $GITHUB_OUTPUT
150
+ else
151
+ # Default to 'standard' for PR events, or use the specified scope
152
+ SCOPE="${{ github.event.inputs.test_scope || 'standard' }}"
153
+ echo "arg=$SCOPE" >> $GITHUB_OUTPUT
154
+ fi
155
+
156
+ - name: Run Claude CLI QA Agent
157
+ id: claude-cli-qa
158
+ uses: anthropics/claude-code-action@v1
159
+ with:
160
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
161
+
162
+ # Allow Claude bot to trigger this workflow
163
+ allowed_bots: '*'
164
+
165
+ # Use Haiku model for faster/cheaper testing
166
+ claude_args: |
167
+ --model claude-haiku-4-5-20251001
168
+ --allowedTools "Bash,Read,Write,Glob,Grep,TodoWrite,Task,SlashCommand"
169
+
170
+ # Enable progress tracking for PR events only
171
+ track_progress: ${{ github.event_name == 'pull_request' }}
172
+
173
+ # Show full output in workflow logs for debugging
174
+ show_full_output: true
175
+
176
+ prompt: |
177
+ Run the QA test suite using the slash command: /qa-test ${{ steps.test-arg.outputs.arg }}
178
+
179
+ - name: Validate test execution
180
+ id: validate-tests
181
+ if: always()
182
+ run: |
183
+ echo "=== Validating CLI QA Test Results ==="
184
+
185
+ # Check if CLI is accessible via uv run
186
+ if ! uv run llmtxt --help &> /dev/null; then
187
+ echo "❌ ERROR: llmtxt CLI not accessible via 'uv run'"
188
+ exit 1
189
+ fi
190
+
191
+ echo "✅ CLI validation passed (accessible via 'uv run llmtxt')"
192
+
193
+ - name: Evaluate test results
194
+ id: evaluate-results
195
+ if: always()
196
+ run: |
197
+ echo "=== Evaluating Test Results ==="
198
+
199
+ # Check Claude agent execution status
200
+ if [ "${{ steps.claude-cli-qa.outcome }}" = "failure" ]; then
201
+ echo "❌ Claude QA agent failed to complete"
202
+ echo "status=failure" >> $GITHUB_OUTPUT
203
+ exit 1
204
+ fi
205
+
206
+ # Parse output for test failures (these patterns match the prompt output)
207
+ CLAUDE_OUTPUT="${{ steps.claude-cli-qa.outputs.text }}"
208
+
209
+ # Check for critical failures in output
210
+ if echo "$CLAUDE_OUTPUT" | grep -q "NO-GO\|❌ FAIL\|CRITICAL"; then
211
+ echo "❌ Test failures detected in QA results"
212
+ echo "status=failure" >> $GITHUB_OUTPUT
213
+ exit 1
214
+ fi
215
+
216
+ # Check for test summary with failures
217
+ if echo "$CLAUDE_OUTPUT" | grep -q "FAIL.*\|Failed:.*[1-9]"; then
218
+ echo "⚠️ Some tests failed but not critical - checking severity"
219
+ if echo "$CLAUDE_OUTPUT" | grep -q "Exit Code Bug\|returns exit code 0\|CRITICAL"; then
220
+ echo "❌ Critical test failures detected"
221
+ echo "status=failure" >> $GITHUB_OUTPUT
222
+ exit 1
223
+ fi
224
+ fi
225
+
226
+ echo "✅ All critical tests passed"
227
+ echo "status=success" >> $GITHUB_OUTPUT
228
+
229
+ - name: Generate test summary
230
+ if: always()
231
+ env:
232
+ CLAUDE_STATUS: ${{ steps.claude-cli-qa.outcome }}
233
+ EVALUATION_STATUS: ${{ steps.evaluate-results.outputs.status }}
234
+ GITHUB_SERVER_URL: ${{ github.server_url }}
235
+ GITHUB_REPOSITORY: ${{ github.repository }}
236
+ GITHUB_RUN_ID: ${{ github.run_id }}
237
+ run: |
238
+ cat <<'EOF' >> $GITHUB_STEP_SUMMARY
239
+ ## llmtxt CLI QA Test Summary
240
+
241
+ **Test Mode**: ${{ github.event.inputs.single_test_case != '' && format('🔍 Single Test (Troubleshooting) - {0}', github.event.inputs.single_test_case) || format('📦 Full Test Suite - {0}', steps.test-arg.outputs.arg) }}
242
+ **Status**: ${{ steps.evaluate-results.outputs.status == 'success' && '✅ All Tests Passed' || '❌ Tests Failed' }}
243
+
244
+ ### Environment
245
+ - Python: 3.11
246
+ - Package Manager: uv
247
+ - LLM Provider: Ollama (${{ env.OLLAMA_MODEL }})
248
+ - Max URLs: ${{ steps.test-scope.outputs.max_urls }}
249
+ - Crawl Depth: ${{ steps.test-scope.outputs.depth }}
250
+
251
+ ### Test Categories
252
+ - Basic Functionality Tests
253
+ - CLI Flags and Options Tests
254
+ - Cache Behavior Tests
255
+ - Error Handling Tests
256
+ - Output Format Validation
257
+
258
+ ### Results
259
+ ${{ github.event.inputs.single_test_case != '' && format('The CLI QA agent executed test case **{0}** for troubleshooting.', github.event.inputs.single_test_case) || 'The CLI QA agent executed comprehensive tests using the `cli-qa-tester` agent.' }}
260
+ Detailed test report and findings are available in the workflow logs.
261
+
262
+ **View full logs**: [${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
263
+
264
+ ---
265
+
266
+ 🤖 **Agent-Based Testing**: This workflow uses Claude Code agents to perform intelligent,
267
+ adaptive CLI testing without traditional E2E test frameworks.
268
+ EOF
269
+
270
+ - name: Upload test artifacts
271
+ if: always()
272
+ uses: actions/upload-artifact@v4
273
+ with:
274
+ name: cli-qa-artifacts
275
+ path: |
276
+ ~/.claude/docs/
277
+ .llmsbrieftxt_cache/
278
+ ollama.log
279
+ **/test-*.txt
280
+ **/test-*.log
281
+ if-no-files-found: warn
282
+ retention-days: 7
283
+
284
+ - name: Fail workflow if tests failed
285
+ if: always() && steps.evaluate-results.outputs.status == 'failure'
286
+ run: |
287
+ echo "❌ CLI QA tests have critical failures - blocking PR"
288
+ exit 1
289
+
290
+ - name: Cleanup
291
+ if: always()
292
+ run: |
293
+ if [ -f ollama.pid ]; then
294
+ kill $(cat ollama.pid) || true
295
+ fi
296
+ echo "✓ Cleanup complete"
@@ -0,0 +1,296 @@
1
+ name: Documentation Review
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize, reopened, ready_for_review]
6
+ branches: [main]
7
+
8
+ jobs:
9
+ doc-review:
10
+ name: Agent-Based Documentation Review
11
+ runs-on: ubuntu-latest
12
+ timeout-minutes: 10
13
+ permissions:
14
+ contents: read
15
+ pull-requests: write
16
+ id-token: write
17
+
18
+ steps:
19
+ - name: Checkout repository
20
+ uses: actions/checkout@v4
21
+ with:
22
+ fetch-depth: 0 # Need full history to compare changes
23
+
24
+ - name: Get changed files
25
+ id: changed-files
26
+ uses: tj-actions/changed-files@v44
27
+ with:
28
+ files: |
29
+ llmsbrieftxt/**/*.py
30
+ tests/**/*.py
31
+ pyproject.toml
32
+ files_ignore: |
33
+ **/__pycache__/**
34
+ **/*.pyc
35
+ .git/**
36
+
37
+ - name: Get documentation files
38
+ id: doc-files
39
+ uses: tj-actions/changed-files@v44
40
+ with:
41
+ files: |
42
+ README.md
43
+ CLAUDE.md
44
+ docs/**/*.md
45
+ **/*.md
46
+
47
+ - name: Check if documentation review needed
48
+ id: check-review
49
+ run: |
50
+ CODE_CHANGED="${{ steps.changed-files.outputs.any_changed }}"
51
+ DOCS_CHANGED="${{ steps.doc-files.outputs.any_changed }}"
52
+
53
+ echo "code_changed=$CODE_CHANGED" >> $GITHUB_OUTPUT
54
+ echo "docs_changed=$DOCS_CHANGED" >> $GITHUB_OUTPUT
55
+
56
+ if [ "$CODE_CHANGED" == "true" ]; then
57
+ echo "review_needed=true" >> $GITHUB_OUTPUT
58
+ if [ "$DOCS_CHANGED" == "true" ]; then
59
+ echo "review_type=validate" >> $GITHUB_OUTPUT
60
+ echo "📝 Code and documentation changed - will validate accuracy"
61
+ else
62
+ echo "review_type=check_missing" >> $GITHUB_OUTPUT
63
+ echo "⚠️ Code changed but no documentation updates - will check if updates needed"
64
+ fi
65
+ else
66
+ echo "review_needed=false" >> $GITHUB_OUTPUT
67
+ echo "ℹ️ No code changes detected - skipping documentation review"
68
+ fi
69
+
70
+ - name: Run Documentation Review Agent
71
+ if: steps.check-review.outputs.review_needed == 'true'
72
+ id: doc-review
73
+ uses: anthropics/claude-code-action@v1
74
+ with:
75
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
76
+
77
+ # Allow Claude bot to trigger this workflow
78
+ allowed_bots: '*'
79
+
80
+ # Use Haiku model for faster/cheaper reviews
81
+ claude_args: |
82
+ --model claude-haiku-4-5-20251001
83
+ --allowedTools "Glob,Grep,Read,Bash(git:*),Bash(gh:*),Task,TodoWrite"
84
+
85
+ # Enable progress tracking
86
+ track_progress: true
87
+
88
+ # Optional: Show full output in workflow logs for debugging
89
+ # Rerun in debug mode or enable `show_full_output: true` in your workflow file for full output.
90
+ # show_full_output: false
91
+
92
+ prompt: |
93
+ You are reviewing documentation accuracy for a pull request.
94
+
95
+ **PR Information**:
96
+ - Repository: ${{ github.repository }}
97
+ - PR Number: ${{ github.event.pull_request.number }}
98
+ - Base Branch: ${{ github.event.pull_request.base.ref }}
99
+ - Head Branch: ${{ github.event.pull_request.head.ref }}
100
+
101
+ **Change Summary**:
102
+ - Code files changed: ${{ steps.changed-files.outputs.all_changed_files }}
103
+ - Documentation files changed: ${{ steps.doc-files.outputs.all_changed_files }}
104
+ - Review Type: ${{ steps.check-review.outputs.review_type }}
105
+
106
+ **Task**:
107
+ Launch the `documentation-accuracy-reviewer` agent to analyze documentation:
108
+
109
+ ```
110
+ Use the Task tool to launch the documentation-accuracy-reviewer agent with this task:
111
+
112
+ "Review documentation accuracy for PR #${{ github.event.pull_request.number }}
113
+
114
+ Review Type: ${{ steps.check-review.outputs.review_type }}
115
+
116
+ Step 1: Analyze Code Changes
117
+ - Use git diff to see what code changed between base and head branches
118
+ - Identify files: ${{ steps.changed-files.outputs.all_changed_files }}
119
+ - Determine what functionality was added, modified, or removed
120
+ - Note any new CLI flags, options, or behavior changes
121
+ - Identify any API or function signature changes
122
+
123
+ Step 2: Review Documentation Files
124
+ - Read current README.md
125
+ - Read current CLAUDE.md
126
+ - Read any other relevant documentation files
127
+ - Check if documentation reflects the code changes
128
+
129
+ Step 3: Documentation Accuracy Analysis
130
+
131
+ ${{ steps.check-review.outputs.review_type == 'validate' && 'Documentation WAS updated - verify accuracy:
132
+ - Do the documentation updates accurately describe the code changes?
133
+ - Are new features/flags properly documented?
134
+ - Are examples correct and working?
135
+ - Is the documentation complete (no missing features)?
136
+ - Are there any outdated sections that need updating?
137
+ - Is the documentation clear and helpful to users?' || '' }}
138
+
139
+ ${{ steps.check-review.outputs.review_type == 'check_missing' && 'Documentation WAS NOT updated - check if needed:
140
+ - Do the code changes require documentation updates?
141
+ - Are new user-facing features undocumented?
142
+ - Are CLI changes reflected in usage examples?
143
+ - Would users be confused by the changes without documentation?
144
+ - Are internal changes that do not need documentation?' || '' }}
145
+
146
+ Step 4: Specific Checks
147
+ - README.md: Usage examples, CLI flags, installation instructions
148
+ - CLAUDE.md: Development commands, test instructions, architecture notes
149
+ - Code comments: Public function docstrings, parameter descriptions
150
+ - CLI help text: Ensure --help output matches documentation
151
+
152
+ Step 5: Report Findings
153
+
154
+ Create a detailed review report with:
155
+
156
+ **Documentation Review Report**
157
+
158
+ **Summary**: [One-line assessment of documentation quality]
159
+
160
+ **Code Changes Analyzed**:
161
+ - [List key changes that might need documentation]
162
+
163
+ **Documentation Status**: ✅ Adequate | ⚠️ Needs Updates | ❌ Missing Critical Docs
164
+
165
+ **Findings**:
166
+
167
+ 1. **Issue Title** (Critical/Major/Minor)
168
+ - Location: [file:line or section]
169
+ - Problem: [What's wrong or missing]
170
+ - Impact: [Why it matters to users]
171
+ - Recommendation: [Specific fix]
172
+
173
+ 2. [Additional findings...]
174
+
175
+ **Positive Findings**:
176
+ - [What was done well]
177
+
178
+ **Recommendations**:
179
+ 1. [High priority]
180
+ 2. [Medium priority]
181
+ 3. [Nice to have]
182
+
183
+ **Approval Status**:
184
+ - ✅ APPROVE: Documentation is accurate and complete
185
+ - ⚠️ APPROVE WITH SUGGESTIONS: Minor improvements recommended
186
+ - ❌ REQUEST CHANGES: Critical documentation issues must be addressed
187
+
188
+ Provide your report in markdown format suitable for PR comments."
189
+ ```
190
+
191
+ After the agent completes:
192
+ 1. Review the documentation review report
193
+ 2. Post findings as PR comment using gh CLI
194
+ 3. If critical issues found, note that changes are recommended
195
+ 4. If documentation is adequate, approve the documentation aspect
196
+
197
+ - name: Post review summary
198
+ if: always() && steps.check-review.outputs.review_needed == 'true'
199
+ env:
200
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
201
+ REVIEW_STATUS: ${{ steps.doc-review.outcome }}
202
+ run: |
203
+ if [ "$REVIEW_STATUS" == "success" ]; then
204
+ echo "✅ Documentation review completed successfully"
205
+
206
+ # Post a summary comment (the agent already posted detailed findings)
207
+ gh pr comment ${{ github.event.pull_request.number }} --body "
208
+ ## 📚 Documentation Review Complete
209
+
210
+ The documentation-accuracy-reviewer agent has completed its analysis.
211
+ Please review the detailed findings in the comments above.
212
+
213
+ **Status**: ✅ Review completed
214
+ **Reviewed by**: Claude Code (documentation-accuracy-reviewer agent)
215
+ "
216
+ else
217
+ echo "❌ Documentation review encountered issues"
218
+
219
+ gh pr comment ${{ github.event.pull_request.number }} --body "
220
+ ## 📚 Documentation Review
221
+
222
+ ⚠️ The documentation review encountered issues. Please check the workflow logs for details.
223
+
224
+ [View workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
225
+ "
226
+ fi
227
+
228
+ - name: Generate summary
229
+ if: always()
230
+ env:
231
+ REVIEW_NEEDED: ${{ steps.check-review.outputs.review_needed }}
232
+ CODE_CHANGED: ${{ steps.check-review.outputs.code_changed }}
233
+ DOCS_CHANGED: ${{ steps.check-review.outputs.docs_changed }}
234
+ REVIEW_TYPE: ${{ steps.check-review.outputs.review_type }}
235
+ REVIEW_STATUS: ${{ steps.doc-review.outcome }}
236
+ run: |
237
+ cat <<'EOF' >> $GITHUB_STEP_SUMMARY
238
+ ## 📚 Documentation Review Summary
239
+
240
+ ### Change Analysis
241
+ - Code files changed: ${{ env.CODE_CHANGED == 'true' && '✅ Yes' || '❌ No' }}
242
+ - Documentation files changed: ${{ env.DOCS_CHANGED == 'true' && '✅ Yes' || '❌ No' }}
243
+
244
+ ### Review Status
245
+ EOF
246
+
247
+ if [ "$REVIEW_NEEDED" == "true" ]; then
248
+ cat <<'EOF' >> $GITHUB_STEP_SUMMARY
249
+ **Review Type**: ${{ env.REVIEW_TYPE }}
250
+ **Status**: ${{ env.REVIEW_STATUS == 'success' && '✅ Completed' || '❌ Failed' }}
251
+
252
+ The `documentation-accuracy-reviewer` agent analyzed:
253
+ - Code changes to identify what needs documentation
254
+ - Existing documentation for accuracy and completeness
255
+ - README.md, CLAUDE.md, and other documentation files
256
+ - Code comments and docstrings
257
+
258
+ **Detailed findings** have been posted as PR comments.
259
+ EOF
260
+ else
261
+ cat <<'EOF' >> $GITHUB_STEP_SUMMARY
262
+ **Review**: ⏭️ Skipped (no code changes)
263
+
264
+ No code changes detected in this PR, so documentation review was not necessary.
265
+ EOF
266
+ fi
267
+
268
+ cat <<'EOF' >> $GITHUB_STEP_SUMMARY
269
+
270
+ ---
271
+
272
+ 🤖 **Automated Review**: This workflow uses the Claude Code `documentation-accuracy-reviewer`
273
+ agent to ensure documentation stays in sync with code changes.
274
+ EOF
275
+
276
+ - name: Check documentation adequacy
277
+ if: steps.check-review.outputs.review_needed == 'true'
278
+ run: |
279
+ # This step will fail the workflow if critical documentation issues were found
280
+ # The agent should have posted details in PR comments
281
+
282
+ if [ "${{ steps.doc-review.outcome }}" != "success" ]; then
283
+ echo "❌ Documentation review did not complete successfully"
284
+ echo "Please check the agent's findings and address any critical issues"
285
+ exit 1
286
+ fi
287
+
288
+ # If code changed but no docs changed, at least warn
289
+ if [ "${{ steps.check-review.outputs.code_changed }}" == "true" ] && \
290
+ [ "${{ steps.check-review.outputs.docs_changed }}" == "false" ]; then
291
+ echo "⚠️ Code changed but no documentation updates detected"
292
+ echo "Please verify that documentation updates are not needed"
293
+ # Don't fail - let the agent's analysis determine if this is acceptable
294
+ fi
295
+
296
+ echo "✅ Documentation review passed"
@@ -0,0 +1,54 @@
1
+ name: Claude Code
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_review_comment:
7
+ types: [created]
8
+ issues:
9
+ types: [opened, assigned]
10
+ pull_request_review:
11
+ types: [submitted]
12
+
13
+ jobs:
14
+ claude:
15
+ if: |
16
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19
+ (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ contents: read
23
+ pull-requests: read
24
+ issues: read
25
+ id-token: write
26
+ actions: read # Required for Claude to read CI results on PRs
27
+ steps:
28
+ - name: Checkout repository
29
+ uses: actions/checkout@v4
30
+ with:
31
+ fetch-depth: 1
32
+
33
+ - name: Run Claude Code
34
+ id: claude
35
+ uses: anthropics/claude-code-action@v1
36
+ with:
37
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38
+
39
+ # This is an optional setting that allows Claude to read CI results on PRs
40
+ additional_permissions: |
41
+ actions: read
42
+
43
+ # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44
+ # prompt: 'Update the pull request description to include a summary of changes.'
45
+
46
+ # Optional: Add claude_args to customize behavior and configuration
47
+ # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48
+ # or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
49
+ # claude_args: '--allowed-tools Bash(gh pr:*)'
50
+
51
+ # Optional: Show full output in workflow logs for debugging
52
+ # Rerun in debug mode or enable `show_full_output: true` in your workflow file for full output.
53
+ # show_full_output: false
54
+