Add org readiness intelligence reporting#160
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds an org-level “readiness intelligence” model and reporting pipeline to normalize GitHub repo/PR JSON into a buyer-readable markdown report, backed by unit tests and a Phase 3 execution plan.
Changes:
- Introduces
appguardrail_core.org_intelligencefor repo inventory, PR gate classification, and report rendering. - Adds
scripts/ci/render_org_readiness_report.pyto generate the readiness report fromghJSON (or provided JSON files). - Adds Phase 3 org readiness plan documentation and unit tests covering inventory, gate classification, and report recommendations.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
appguardrail_core/org_intelligence.py |
New core module to normalize org repo/PR state and render a readiness report. |
scripts/ci/render_org_readiness_report.py |
CLI/script to fetch GitHub data (or load JSON) and render the markdown report. |
tests/test_org_intelligence_core.py |
Unit tests validating inventory counts, PR gate classification, and report recommendations. |
docs/product/2026-07-03-phase3-org-readiness-plan.md |
Phase 3 execution plan documenting evidence, decisions, and acceptance criteria. |
appguardrail_core/__init__.py |
Re-exports org intelligence types/functions as part of the core public API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+133
to
+137
| if check_states & TECHNICAL_CHECK_FAILURES: | ||
| return "ci-failure" | ||
| if check_states and check_states <= WAITING_CHECK_STATES: | ||
| return "external-queued" | ||
| if review_decision == "review_required": |
| f"- Non-fork repositories: {inventory.nonfork_repositories}", | ||
| f"- Fork repositories: {inventory.fork_repositories}", | ||
| f"- Private repositories: {inventory.private_repositories}", | ||
| f"- Supported non-fork primary languages: {inventory.supported_nonfork_repositories}", |
Comment on lines
+18
to
+24
| EXTERNAL_FIRST_LANGUAGES = { | ||
| "C++", | ||
| "Kotlin", | ||
| "R", | ||
| "Rust", | ||
| "Shell", | ||
| } |
Comment on lines
+78
to
+94
| nonforks = [repo for repo in repo_list if not _truthy(repo.get("isFork"))] | ||
| forks = [repo for repo in repo_list if _truthy(repo.get("isFork"))] | ||
| primary_languages = Counter(_primary_language(repo) for repo in repo_list) | ||
| default_branches = Counter(_default_branch(repo) for repo in repo_list) | ||
| unsupported = sorted( | ||
| { | ||
| _primary_language(repo) | ||
| for repo in nonforks | ||
| if _primary_language(repo) not in SUPPORTED_PRIMARY_LANGUAGES | ||
| and _primary_language(repo) != "Unknown" | ||
| } | ||
| ) | ||
| supported_nonforks = sum( | ||
| 1 | ||
| for repo in nonforks | ||
| if _primary_language(repo) in SUPPORTED_PRIMARY_LANGUAGES | ||
| ) |
| pr_summary = summarize_pr_gates(prs) | ||
| report = render_org_readiness_report(inventory, pr_summary) | ||
| if args.out: | ||
| Path(args.out).write_text(report) |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
appguardrail_core.org_intelligenceto normalize ContextualWisdomLab repository inventory and PR gate state into a product-ready org readiness model.scripts/ci/render_org_readiness_report.pyso live GitHub repo/PR JSON can render a markdown readiness report without moving raw code or logs outside GitHub.Live evidence checked
Validation
python3 -m py_compile appguardrail_core/org_intelligence.py scripts/ci/render_org_readiness_report.pypython3 -m pytest -q tests/test_org_intelligence_core.pypython3 -m pytest -q-> 177 passedgit diff --checkpython3 scanner/cli/appguardrail.py scan .-> 0 critical / 0 high deploy blockers, 1 warningNotes
.Jules/palette.mdwas already modified locally and is intentionally not included in this PR.