You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenMeta previously generated PR metadata from its own defaults, which could produce technically valid but repository-noncompliant PRs. This change adds a contribution-rules pass so PR draft content and submission behavior align with repository-specific templates and contribution constraints.
Repository rules detection in workspace prep
Added structured RepositoryContributionRules to workspace context.
Detects and parses common policy sources (e.g., CONTRIBUTING.md, PR templates, CODEOWNERS-related and release/commit policy docs).
Extended PR drafting prompt with Repository Contribution Rules context.
LLM now receives detected rule files, hard requirements, and PR template content to shape title/body/checklist output.
Rule-aware contribution PR publication
ContributionPrService now consumes detected rules to influence:
branch naming prefix selection
commit message style (conventional vs neutral fallback)
PR body composition with template + generated draft + required issue/release metadata
Maintains existing behavior when no repository rules are detected.
Submission safety gate for strong constraints
Added a pre-submit guard that blocks real PR opening when strong repository constraints are unsatisfied (e.g., prior maintainer discussion required, blocking validation required but failing).
Falls back to artifact-only flow and records explicit reasons in run warnings/UI path.
Traceability in generated artifacts
Contribution dossier now includes a dedicated Repository Contribution Rules section showing detected files and parsed constraints for run transparency.
constunsatisfiedContributionRules=this.evaluateUnsatisfiedContributionRules(input.workspace,hasBlockingValidationFailures,);if(unsatisfiedContributionRules.length>0){// keep artifact flow, skip real PR creationreturn{changedFiles: input.changedFiles,validationResults: input.validationResults};}
CopilotAI
changed the title
[WIP] Use repository PR templates and contributing rules before draft PR creation
feat(agent): enforce repository contribution rules in PR drafting and submission flow
Jun 20, 2026
I re-audited this draft. It is currently conflicting with main, and both Ubuntu and Windows CI are failing, so it is not ready for maintainer review. The feature direction (feeding repository contribution rules into PR drafting) is still relevant, but this branch needs a fresh rebase and a focused pass over the failing validation before it can be marked ready. I’m leaving it as draft rather than asking maintainers to resolve the conflict.
Rebased onto current main and resolved the conflicts while preserving both the existing permission-policy flow and this PR's repository-contribution-rules checks. The branch now includes the contribution-rule context in PR prompts, validates required repository constraints before submission, and keeps the existing policy gate intact.
Local validation: Biome check --linter-enabled=false passes for all 159 files; tsgo --noEmit passes after resolving the repository's transitive Octokit type package; the Bun-based test/build commands could not run because Bun is not installed in this environment. GitHub CI has been kicked off by the force-push; I'm leaving the PR as draft until it reports clean.
The rebased branch is mergeable and Ubuntu CI passes. Windows CI still fails in the existing skill bundle rendering > export works from the packed CLI with runtime-resolved skill assets test (spawnSync npm.cmd EINVAL); this is unchanged from the latest main CI run (base e27b24b) and is outside this PR's contribution-rule changes. No safe PR-scoped code change was made for that pre-existing platform failure. The PR remains draft pending maintainer direction.
The branch is rebased and Ubuntu CI passes; the remaining Windows failure is pre-existing on main (npm.cmd EINVAL in the skill-bundle packaging test). I have marked the PR ready for maintainer review.
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
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.
OpenMeta previously generated PR metadata from its own defaults, which could produce technically valid but repository-noncompliant PRs. This change adds a contribution-rules pass so PR draft content and submission behavior align with repository-specific templates and contribution constraints.
Repository rules detection in workspace prep
RepositoryContributionRulesto workspace context.CONTRIBUTING.md, PR templates, CODEOWNERS-related and release/commit policy docs).Rule-aware PR draft generation
Repository Contribution Rulescontext.Rule-aware contribution PR publication
ContributionPrServicenow consumes detected rules to influence:Submission safety gate for strong constraints
Traceability in generated artifacts