How tacticguy/ai-architecture-guardian works
This repository builds a Python PR architecture dataset through two related workflows: it collects and filters merged-PR metadata, and clones configured repositories for static analysis. The analysis path extracts AST facts, constructs a dependency graph, and derives inspectable node features; it does not train models or predict risk. The graph also preserves scrape checkpoints and clone provenance. Internal call edges are grounded in excerpts or the SOURCE INDEX; workflow connections documented only in the README are cited there.
Main entry points: pr_scraper.py Merged-PR scraper · analysis/pipeline.py Analysis orchestrator · filtering/pipeline.py Filter pipeline · clone.py Repository cloner
Components 23
PR collection
- GraphQL client
src/github/client.py - PR queries
src/github/queries.py - Rate-limit manager
src/github/rate_limit.py - Merged-PR scraper
src/scraper/pr_scraper.py - Scrape checkpoint
src/scraper/checkpoint.py
PR filtering
- Filter pipeline
src/filtering/pipeline.py - Impact filter
src/filtering/impact_filter.py - Keyword filter
src/filtering/semantic_filter.py - PR statistics
scripts/generate_statistics.py
Repository analysis
- Repository cloner
src/repository/clone.py - Clone manifest
data/repositories - Cloned repositories
data/repositories
Static analysis
- Analysis orchestrator
src/analysis/pipeline.py - AST extraction
src/analysis/ast_parser.py - Dependency graph
src/analysis/dependency_graph.py - Node features
src/analysis/features.py - Analysis artifacts
data/analysis
Shared support
- Pipeline settings
src/utils/config.py - Repository selection
config/repositories.json - JSONL storage
src/storage/jsonl.py - Logging setup
src/utils/logging_config.py
Other components
- Pipeline operator
- GitHub GraphQL
Connections 27
- Pipeline operator → Merged-PR scraper: starts scrape
README.md - Pipeline operator → Filter pipeline: runs filtering
README.md - Pipeline operator → Repository cloner: starts clone
README.md - Pipeline operator → Analysis orchestrator: starts analysis
README.md - Pipeline settings → Repository selection: loads selection
README.md - Repository selection → Merged-PR scraper: selects repositories
README.md - Repository selection → Repository cloner: selects repositories
README.md - Merged-PR scraper → GraphQL client: requests pages
src/scraper/pr_scraper.py - Merged-PR scraper → PR queries: uses queries
src/scraper/pr_scraper.py - Merged-PR scraper → Scrape checkpoint: reads and updates
src/scraper/pr_scraper.py - Merged-PR scraper → JSONL storage: appends records
src/scraper/pr_scraper.py - GraphQL client → GitHub GraphQL: sends GraphQL
README.md - GraphQL client → Rate-limit manager: handles limits
src/github/client.py - JSONL storage → Filter pipeline: provides raw records
README.md - Filter pipeline → Impact filter: checks impact
src/filtering/pipeline.py - Filter pipeline → Keyword filter: matches keywords
src/filtering/pipeline.py - Filter pipeline → JSONL storage: writes filtered records
README.md - JSONL storage → PR statistics: supplies filtered data
README.md - Repository cloner → GitHub GraphQL: clones repository
README.md - Repository cloner → Clone manifest: records provenance
README.md - Repository cloner → Cloned repositories: stores clone
README.md - Cloned repositories → Analysis orchestrator: provides source tree
README.md - Analysis orchestrator → AST extraction: extracts syntax
src/analysis/pipeline.py - Analysis orchestrator → Dependency graph: builds graph
src/analysis/pipeline.py - Analysis orchestrator → Node features: derives features
src/analysis/pipeline.py - Analysis orchestrator → Analysis artifacts: writes artifacts
src/analysis/pipeline.py - Pipeline operator → Logging setup: configures logging
README.md