Chore/pysdk 000 claude doc review #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "+ Claude Code / Documentation Review" | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| documentation-review: | |
| name: Review doc changes | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Analyze requirements impact | |
| uses: anthropics/claude-code-action@v1 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
| prompt: | | |
| You are reviewing a pull request to ensure requirements and specifications documentation stays synchronized with code changes. | |
| **Analysis Process:** | |
| 1. Run `git diff origin/${{ github.base_ref }}...HEAD` to identify all changed files | |
| 2. For each changed file, determine: | |
| - Which module/component it belongs to | |
| - What functionality was added, modified, or removed | |
| 3. Read ALL existing files in: | |
| - `requirements/` (SHR-*.md for stakeholder requirements, SWR-*.md for software requirements) | |
| - `specifications/` (SPEC-*.md for software item specifications) | |
| 4. Cross-reference code changes against documentation to identify: | |
| - Docs that describe changed functionality (needs update) | |
| - New functionality lacking documentation (needs new doc) | |
| - Documentation that remains accurate (no action needed) | |
| **Requirements:** | |
| - Analyze ONLY `requirements/` and `specifications/` directories | |
| - Ignore template files (files with "TEMPLATE" in the name) | |
| - For new docs, follow existing naming conventions exactly | |
| - Be specific about WHY each doc needs updating (cite the code change) | |
| **Output Format:** | |
| Post a single PR comment using this exact structure: | |
| ## 📋 Requirements & Specifications Review | |
| ### 🔍 Code Changes Summary | |
| **Modified files:** [list each file] | |
| **Affected modules:** [comma-separated list] | |
| ### 📝 Documentation Updates Required | |
| #### Files Needing Updates: | |
| - **`requirements/SHR-XXX.md`** - Reason: [specific code change that invalidates current doc] | |
| - **`specifications/SPEC-YYY.md`** - Reason: [specific code change that invalidates current doc] | |
| #### New Documentation Needed: | |
| - **`requirements/SWR-[MODULE]-[FEATURE].md`** - Coverage: [what new requirement this addresses] | |
| - **`specifications/SPEC-[MODULE]-[SERVICE].md`** - Coverage: [what new implementation this describes] | |
| ### ✅ Documentation Still Accurate | |
| - `requirements/SHR-ZZZ.md` - Covers [feature], unaffected by changes | |
| - `specifications/SPEC-AAA.md` - Covers [component], unaffected by changes | |
| ### 💡 Recommendations | |
| [If applicable: suggest priority order for updates or note if changes are traceability-critical] | |
| **Note:** If no documentation changes are needed, state: "✅ All requirements and specifications remain accurate." | |
| claude_args: >- | |
| --max-turns 20 | |
| --model claude-sonnet-4-5-20250929 |