Skip to content

Commit ca5d2d9

Browse files
refine claude-code-doc-review 2.
1 parent 3ecf712 commit ca5d2d9

File tree

1 file changed

+29
-41
lines changed

1 file changed

+29
-41
lines changed

.github/workflows/claude-code-doc-review.yml

Lines changed: 29 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010

1111
jobs:
1212
documentation-review:
13-
name: Review doc changes
13+
name: Review requirements impact
1414
runs-on: ubuntu-latest
1515

1616
steps:
@@ -25,56 +25,44 @@ jobs:
2525
github_token: ${{ secrets.GITHUB_TOKEN }}
2626
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
2727
prompt: |
28-
You are reviewing a pull request to ensure requirements and specifications documentation stays synchronized with code changes.
28+
You are reviewing a PR to check if requirements/specs documentation needs updates.
2929
30-
**Analysis Process:**
30+
**Your task:**
3131
32-
1. Run `git diff origin/${{ github.base_ref }}...HEAD` to identify all changed files
33-
2. For each changed file, determine:
34-
- Which module/component it belongs to
35-
- What functionality was added, modified, or removed
36-
3. Read ALL existing files in:
37-
- `requirements/` (SHR-*.md for stakeholder requirements, SWR-*.md for software requirements)
38-
- `specifications/` (SPEC-*.md for software item specifications)
39-
4. Cross-reference code changes against documentation to identify:
40-
- Docs that describe changed functionality (needs update)
41-
- New functionality lacking documentation (needs new doc)
42-
- Documentation that remains accurate (no action needed)
32+
1. Run: git diff origin/${{ github.base_ref }}...HEAD
33+
2. Identify changed modules (application, platform, wsi, bucket, dataset, etc.)
34+
3. Use Glob to find relevant docs:
35+
- Glob pattern: requirements/*{MODULE}*.md
36+
- Glob pattern: specifications/SPEC-{MODULE}*.md
37+
4. Read ONLY the relevant docs for changed modules
38+
5. Analyze if they need updates
4339
44-
**Requirements:**
45-
- Analyze ONLY `requirements/` and `specifications/` directories
46-
- Ignore template files (files with "TEMPLATE" in the name)
47-
- For new docs, follow existing naming conventions exactly
48-
- Be specific about WHY each doc needs updating (cite the code change)
40+
**Rules:**
41+
- ONLY analyze requirements/ and specifications/ directories
42+
- Skip files with "TEMPLATE" in name
43+
- Use Glob and Read tools (NOT bash ls/head commands)
44+
- Be specific about WHY docs need updating
4945
50-
**Output Format:**
51-
52-
Post a single PR comment using this exact structure:
46+
**Post PR comment:**
5347
5448
## 📋 Requirements & Specifications Review
5549
56-
### 🔍 Code Changes Summary
57-
**Modified files:** [list each file]
58-
**Affected modules:** [comma-separated list]
59-
60-
### 📝 Documentation Updates Required
61-
62-
#### Files Needing Updates:
63-
- **`requirements/SHR-XXX.md`** - Reason: [specific code change that invalidates current doc]
64-
- **`specifications/SPEC-YYY.md`** - Reason: [specific code change that invalidates current doc]
50+
### Changed Code
51+
- Files: [list]
52+
- Modules: [list]
6553
66-
#### New Documentation Needed:
67-
- **`requirements/SWR-[MODULE]-[FEATURE].md`** - Coverage: [what new requirement this addresses]
68-
- **`specifications/SPEC-[MODULE]-[SERVICE].md`** - Coverage: [what new implementation this describes]
54+
### 📝 Docs to Update
55+
- `requirements/XXX.md`: [why]
56+
- `specifications/XXX.md`: [why]
6957
70-
### ✅ Documentation Still Accurate
71-
- `requirements/SHR-ZZZ.md` - Covers [feature], unaffected by changes
72-
- `specifications/SPEC-AAA.md` - Covers [component], unaffected by changes
58+
### ➕ New Docs Needed
59+
- `requirements/SWR-XXX.md`: [what it should cover]
7360
74-
### 💡 Recommendations
75-
[If applicable: suggest priority order for updates or note if changes are traceability-critical]
61+
### ✅ Docs Still Accurate
62+
- [list docs that don't need changes]
7663
77-
**Note:** If no documentation changes are needed, state: "✅ All requirements and specifications remain accurate."
64+
Keep it concise.
7865
claude_args: >-
79-
--max-turns 20
66+
--max-turns 30
67+
--allowed-tools Read,Glob,Grep,Bash(git:*)
8068
--model claude-sonnet-4-5-20250929

0 commit comments

Comments
 (0)