Add Watchflow governance rules (4 rules, 3 high-priority) #46
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.
Add Watchflow Governance Rules
This PR adds automated governance rules for warestack/watchflow based on repository analysis of recent PR history and codebase patterns.
Repository Health Analysis Report: warestack/watchflow
This report provides a data-driven assessment of the current health of the warestack/watchflow repository based on hygiene metrics from the last 30 merged pull requests and repository context. The goal is to identify key problems and risks, and to highlight actionable areas for improvement.
|
| Average PR Size | 428 lines| Medium | Code Review | Large PR sizes can hinder effective code review, increasing the chance of overlooked defects and slowing down the review process.
|
| First-Time Contributors| 0 | Medium | Community Health | No contributions from first-time contributors may suggest barriers to entry or lack of community engagement, potentially limiting project growth and diversity.
|
| Codeowner Bypass Rate | 35.0% | High | Code Review | A significant portion of PRs bypass codeowner reviews, risking unvetted changes to critical code areas and reducing code quality assurance.
|
| New Code Test Coverage | 0.0% | Critical | Testing | Absence of test coverage on new code is a critical risk, leading to potential regressions and reduced confidence in code stability.
|
| Issue-Diff Mismatch Rate| 15.0% | Medium | Issue Management | Mismatches between issues and code diffs indicate inconsistencies that can cause confusion and reduce traceability.
Summary and Recommendations
Addressing these areas will significantly enhance the repository's health, maintainability, and community engagement.
Recommended Rules
require_linked_issue: Block PRs without issue references to improve traceability and accountability given the 40% unlinked issue rate. - High
Rationale: The rule to require linked issues for PRs directly addresses the high unlinked issue rate of 40%, which undermines traceability and accountability by ensuring every code change is connected to a tracked issue, thereby reducing undocumented changes and improving project oversight.
max_pr_size: Limit lines changed per PR to 500 to reduce review complexity and improve code quality given the average PR size of 428 lines. - Medium
Rationale: The recommended rule to limit PR size to 500 lines directly addresses the medium-severity problem of large average PR sizes (428 lines), which hinder effective code review and increase the risk of overlooked defects, thereby improving review efficiency and code quality.
code_owners: Enforce CODEOWNERS approval for critical paths to prevent unvetted changes, addressing the 35% codeowner bypass rate. - High
Rationale: The rule to enforce CODEOWNERS approval directly addresses the high (35%) codeowner bypass rate identified, ensuring that critical code changes receive expert review to maintain code quality and reduce risks from unvetted modifications.
required_workflows: Ensure CI passes before merge to maintain code stability and quality given the presence of CI/CD workflows. - High
Rationale: Requiring CI workflows to pass before merging directly addresses the critical issue of 0% test coverage on new code by ensuring automated tests run and pass, thereby improving code stability and quality despite the presence of large PRs and codeowner bypasses.
Changes
.watchflow/rules.yamlwith the recommended governance rulesNext Steps
.watchflow/rules.yamlGenerated by Watchflow repository analysis.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.