Automated maintenance scripts for the AgentReady research report.
The update_research.py script runs weekly via GitHub Actions to:
- Search for recent research on AI-assisted development
- Analyze relevance using Claude API
- Update
agent-ready-codebase-attributes.mdwith new citations - Create a pull request for review
pip install anthropic pyyaml requests python-dotenvexport ANTHROPIC_API_KEY="sk-ant-api03-..."Edit research_config.yaml to customize:
max_updates_per_run: How many attributes to update per weekmin_citation_quality_score: Threshold for including updatespriority_attributes: Which attributes get updated first
python scripts/update_research.py# Verify config loads correctly
python -c "import yaml; print(yaml.safe_load(open('scripts/research_config.yaml')))"The workflow runs automatically every Monday at 9 AM UTC.
Manual trigger:
gh workflow run research-update.ymlView recent runs:
gh run list --workflow=research-update.yml0: Changes made, PR should be created1: No changes needed or error occurred
agent-ready-codebase-attributes.md: Research report content- Updated attribute sections with new findings
- New citations added
- Version incremented
- Date updated to current
update_settings:
max_updates_per_run: 5 # Limit changes per PR
min_citation_quality_score: 0.7 # Claude relevance threshold
search_recency_months: 12 # Only recent research
priority_attributes:
- "1.1" # CLAUDE.md
- "2.1" # README
# ... Tier 1 attributes processed first
search_domains:
prioritized:
- anthropic.com
- arxiv.org
# ... High-authority sources
blocked:
- spam-site.com
# ... Low-quality sources to avoidfrom update_research import ResearchUpdater
updater = ResearchUpdater()
results = updater.search_recent_research("1.1", "CLAUDE.md Configuration Files")
print(f"Found {len(results)} results")from update_research import ResearchUpdater
updater = ResearchUpdater()
analysis = updater.analyze_relevance(
"1.1",
search_results,
"Current attribute content..."
)
print(f"Relevance score: {analysis['relevance_score']}")# Comment out the write operations in update_attribute_section()
# to test without modifying filesPossible causes:
min_citation_quality_scoretoo high- No recent research found
- Search API issues
Solutions:
- Lower threshold in config
- Check search functionality manually
- Verify API credentials
Possible causes:
- Script exited with code 1 (no changes)
- GitHub Actions permissions issue
- Branch conflicts
Solutions:
- Check workflow logs:
gh run view --log - Verify repository permissions
- Delete stale
automated/research-updatebranch
Claude API:
- Default: 1,000 requests/minute
- Cost: ~$0.30 per weekly run
- Caching: Search results cached 7 days
Mitigation:
- Reduce
max_updates_per_run - Increase
search_recency_months(fewer new results)
- Search generation: 5 × ~2K tokens = 10K tokens
- Relevance analysis: 5 × ~6K tokens = 30K tokens
- Total: ~40K tokens/week ≈ $0.30/week
- ~$15-20/year for weekly automation
- Scales linearly with
max_updates_per_run
- Store only in GitHub Secrets (never commit)
- Rotate quarterly or after team changes
- Use least-privilege API keys
- All URLs verified before adding
- Malicious content filtered
- JSON parsing validated to prevent injection
research-update.skill.md: Complete skill documentation.github/workflows/research-update.yml: GitHub Actions workflowagent-ready-codebase-attributes.md: The research report
Last Updated: 2025-12-03 Maintainer: Jeremy Eder