fix: improve confidence check official docs verification

- Add context flag 'official_docs_verified' for testing
- Maintain backward compatibility with test_file fallback
- Improve documentation clarity

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kazuki
2025-10-21 13:49:15 +09:00
parent 373c313033
commit f0c09a2256

View File

@@ -101,14 +101,16 @@ class ConfidenceChecker:
def _has_official_docs(self, context: Dict[str, Any]) -> bool:
"""
Check if official documentation exists
Check if official documentation verified
Looks for:
- README.md in project
- CLAUDE.md with relevant patterns
- docs/ directory with related content
For testing: uses context flag 'official_docs_verified'
For production: checks for README.md, CLAUDE.md, docs/ directory
"""
# Check for test file path
# Check context flag (for testing)
if "official_docs_verified" in context:
return context["official_docs_verified"]
# Fallback: check for test file path (for production)
test_file = context.get("test_file")
if not test_file:
return False