Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions patterns/archetypes/contribution-guidelines-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"id": "contribution-guidelines-checker",
"label": "Contribution Guidelines Checker",
"description": "Check pull requests against CONTRIBUTING.md and label them ready or needing work",
"success_rate": null,
"count": 0,
"recommended_triggers": [
{
"type": "pull_request",
"config": {}
}
],
"recommended_safe_outputs": [
"pull-requests"
],
"recommended_tools": [
"add-labels",
"add-comment"
],
"timeout_minutes": 10,
"prompt_style": "role-steps",
"size_range_bytes": [
3000,
8000
],
"top_repos": [],
"tips": [
"Search CONTRIBUTING.md, .github/CONTRIBUTING.md, docs/CONTRIBUTING.md, and README contribution sections in order before falling back to general best practices",
"Label the pull request ready when it complies and leave one constructive comment when it does not — never both",
"Use a small model since this runs on every pull request open/synchronize event and cost adds up",
"For high-volume repositories, pre-filter and fetch PR data in a steps: block, then dispatch each PR to an inline sub-agent for evaluation so the parent workflow only compiles results",
"Use DO NOT constraints to avoid merging, approving, or closing contributions — label and comment only"
],
"anti_patterns": []
}
3 changes: 2 additions & 1 deletion patterns/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"code-health-auditor",
"ci-failure-triage",
"community-digest",
"agent-cost-tracker"
"agent-cost-tracker",
"contribution-guidelines-checker"
],
"workflow_generation": "workflow-generation.json",
"anti_patterns": [
Expand Down
37 changes: 37 additions & 0 deletions patterns/workflow-generation.json
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,43 @@
"- **DO NOT** create an issue or comment when the token-usage log is missing or empty.",
"- **DO NOT** let cost reports accumulate — cap and deduplicate created issues."
]
},
"contribution-guidelines-checker": {
"icon": "checklist",
"capabilities": {
"bash": true,
"github_toolsets": true
},
"permissions": [
"contents",
"issues",
"pull-requests"
],
"github_toolsets": [
"repos",
"issues",
"pull_requests"
],
"body": [
"# {{label}}",
"",
"You are a **contribution guidelines checker** for this repository.",
"",
"Your job is to verify pull request #${{ github.event.pull_request.number }} complies with the repository's contribution guidelines.",
"",
"## Process",
"",
"1. Find the contribution guidelines: check `CONTRIBUTING.md`, `.github/CONTRIBUTING.md`, `docs/CONTRIBUTING.md`, then contribution sections in `README.md`. Fall back to general best practices if none exist.",
"2. Read the pull request title, description, changed files, and commit messages",
"3. Compare the pull request against the guidelines (scope, tests, documentation, commit style)",
"4. If it complies, apply the `contribution-ready` label. Otherwise, leave one constructive comment describing what needs to change.",
"",
"## Constraints",
"",
"- **DO NOT** merge, approve, or close contributions.",
"- **DO NOT** post more than one comment per run.",
"- **DO NOT** apply the ready label and post a needs-work comment in the same run — pick one outcome."
]
}
}
}
Loading