Skip to content

Commit 2f90ce0

Browse files
Merge pull request #13 from agentnameservice/codex/conditional-issue-policy
feat: add shared contribution and governance tooling
2 parents d094907 + fec26fa commit 2f90ce0

19 files changed

Lines changed: 1096 additions & 30 deletions

‎.github/ISSUE_TEMPLATE/change.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Change request
2-
description: Discuss a change before opening a pull request.
2+
description: Suggest a self-contained improvement to existing behavior.
33
body:
44
- type: textarea
55
id: problem
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Reviewer or Maintainer nomination
2+
description: Propose a repository role with supporting contribution evidence.
3+
title: 'Nomination: '
4+
labels: [nomination]
5+
body:
6+
- type: input
7+
id: nominee
8+
attributes:
9+
label: Nominee
10+
placeholder: '@handle'
11+
validations:
12+
required: true
13+
- type: dropdown
14+
id: role
15+
attributes:
16+
label: Role
17+
options: [Reviewer, Maintainer]
18+
validations:
19+
required: true
20+
- type: input
21+
id: scope
22+
attributes:
23+
label: Repository or review scope
24+
description: Identify the repository and any CODEOWNERS paths covered by this nomination.
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: evidence
29+
attributes:
30+
label: Contribution evidence
31+
description: Link relevant reviews, implementations, releases, and sustained maintenance work.
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: decision
36+
attributes:
37+
label: Sponsor and decision process
38+
description: Name the sponsor and link published eligibility and approval rules if available, including the decision deadline. Accepted access changes go through reviewed Peribolos configuration and CODEOWNERS updates.
39+
validations:
40+
required: false
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Proposal
2+
description: Discuss a change that needs agreement on scope, compatibility, or support.
3+
title: 'Proposal: '
4+
labels: [proposal]
5+
body:
6+
- type: textarea
7+
id: problem
8+
attributes:
9+
label: Problem
10+
description: What is missing or incorrect, and who is affected?
11+
validations:
12+
required: true
13+
- type: textarea
14+
id: proposal
15+
attributes:
16+
label: Proposed change
17+
description: Describe the resulting behavior. Show current and proposed wording for specification changes.
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: alternatives
22+
attributes:
23+
label: Alternatives considered
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: compatibility
28+
attributes:
29+
label: Compatibility and maintenance
30+
description: Identify affected interfaces, deployments, schemas, implementations, and ongoing support obligations.
31+
validations:
32+
required: true
33+
- type: textarea
34+
id: decision
35+
attributes:
36+
label: Decision process
37+
description: Link the published governance process if available, and identify the decision owner, review deadline, and related tracking issues. An issue label does not itself approve the proposal.
38+
validations:
39+
required: false
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Specification tracking
2+
description: Track implementation work associated with a specification change.
3+
title: 'Spec tracking: '
4+
labels: [spec-tracking]
5+
body:
6+
- type: input
7+
id: specification
8+
attributes:
9+
label: Specification change
10+
description: Link the specification PR or accepted proposal.
11+
validations:
12+
required: true
13+
- type: input
14+
id: release
15+
attributes:
16+
label: Target specification release
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: implementation
21+
attributes:
22+
label: Implementation work
23+
description: Describe the required behavior and link implementation PRs as they become available.
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: verification
28+
attributes:
29+
label: Conformance and verification
30+
description: Identify affected conformance vectors and how the implementation will be verified.
31+
validations:
32+
required: true
33+
- type: textarea
34+
id: coordination
35+
attributes:
36+
label: Release dependencies or deferrals
37+
description: State whether this work blocks a release. Link any approved deferral and its decision owner.

‎.github/workflows/contribution-policy.yml‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,23 @@ jobs:
3333
author = pr.get('user') or {}
3434
is_dependabot = author.get('login') == 'dependabot[bot]' and author.get('type') == 'Bot'
3535
errors = []
36-
if not re.match(r'^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert|spec)(\([^\r\n()]+\))?!?: \S', pr['title']):
36+
title = re.match(r'^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert|spec)(\([^\r\n()]+\))?(?P<breaking>!)?: \S', pr['title'])
37+
if not title:
3738
errors.append('Use a Conventional Commit PR title, such as docs: explain the setup.')
3839
body = re.sub(r'<!--[\s\S]*?-->', '', pr.get('body') or '')
39-
if not is_dependabot and not re.search(r'\b(?:fix(?:es|ed)?|close[sd]?|resolve[sd]?)\s+(?:#\d+|[\w.-]+/[\w.-]+#\d+|https://github\.com/[\w.-]+/[\w.-]+/issues/\d+)\b', body, re.I):
40-
errors.append('Link a real issue using Fixes, Closes, or Resolves.')
40+
labels = {label['name'] for label in pr.get('labels', [])}
41+
breaking = (title and title.group('breaking')) or re.search(r'(?im)^[ \t]*BREAKING[ -]CHANGE:', body)
42+
issue_required = bool(labels & {'normative', 'issue-required'} or breaking)
43+
has_issue = re.search(r'(?im)(?:^|[\s(])(?:refs?|related(?: to)?|see|part of|implements?|tracks?|tracking|address(?:es|ed)?|fix(?:es|ed)?|close[sd]?|resolve[sd]?|proposal|issue)[ \t:]+(?:[\w.-]+/[\w.-]+)?#[1-9]\d*\b|https://github\.com/agentnameservice/[\w.-]+/issues/[1-9]\d*\b', body)
44+
explanation = re.search(r'(?im)^[ \t]*No issue needed:[ \t]*([^\r\n]*)', body)
45+
reason = explanation.group(1).strip() if explanation else ''
46+
has_explanation = bool(reason) and not re.fullmatch(r'<[^>]*>|\[[^\]]*\]|\.{3}|…', reason)
47+
if not has_issue:
48+
if issue_required:
49+
errors.append('Link an issue or proposal for normative, breaking, or issue-required PRs; a No issue needed explanation or Dependabot authorship does not exempt them.')
50+
elif not is_dependabot and not has_explanation:
51+
errors.append('Reference an issue (for example, Refs #123) or add No issue needed: followed by a brief reason. Use Fixes or Closes only when this PR completes the issue.')
4152
if os.environ['SPECIFICATION_REPOSITORY'] == 'true':
42-
labels = {label['name'] for label in pr.get('labels', [])}
4353
if len(labels & {'editorial', 'normative'}) != 1:
4454
errors.append('Apply exactly one specification label: editorial or normative.')
4555
for error in errors:

‎.github/workflows/inactive-prs.yml‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
name: Inactive pull requests
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
dry_run:
8+
description: Report proposed actions without changing pull requests
9+
type: boolean
10+
default: true
11+
12+
permissions:
13+
contents: read
14+
issues: write
15+
pull-requests: write
16+
17+
jobs:
18+
sweep:
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 15
21+
steps:
22+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
23+
with:
24+
repository: agentnameservice/.github
25+
ref: ${{ job.workflow_sha }}
26+
persist-credentials: false
27+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
28+
with:
29+
node-version: '24'
30+
- run: npm ci --ignore-scripts --no-audit --no-fund
31+
- name: Update author-response timers and process reminders
32+
env:
33+
GH_TOKEN: ${{ github.token }}
34+
DRY_RUN: ${{ inputs.dry_run }}
35+
run: node scripts/inactive-prs.mjs

‎.gitvote.yml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
profiles:
2+
default:
3+
duration: 7days
4+
pass_threshold: 51
5+
pass_threshold_base: allowed_voters
6+
allowed_voters:
7+
teams: [tsc]
8+
close_on_passing: false
9+
periodic_status_check: 3 days
10+
two-thirds:
11+
duration: 7days
12+
# Rounding up to 66.67 would reject exactly two thirds of three, six, or nine voters.
13+
pass_threshold: 66.66
14+
pass_threshold_base: allowed_voters
15+
allowed_voters:
16+
teams: [tsc]
17+
close_on_passing: false
18+
periodic_status_check: 3 days

‎CONTRIBUTING.md‎

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,33 @@ Repository-specific contribution instructions may add requirements.
88

99
## Pull requests
1010

11-
Open a tracking issue and reference it with a closing keyword such as `Fixes
12-
#123`. Use a [Conventional Commits](https://www.conventionalcommits.org/) title.
13-
Explain the change and how you tested it, and complete the PR template. For
14-
changes in `ans-spec` or `trust-index-spec`, use exactly one of the
15-
`editorial` or `normative` labels.
16-
17-
Dependabot PRs do not need a separate tracking issue. Conventional Commit titles,
18-
specification labels, and required review, DCO and CI checks still apply.
11+
Use a [Conventional Commits](https://www.conventionalcommits.org/) title.
12+
Explain the problem, change, and verification in the PR template. In `ans-spec`
13+
and `trust-index-spec`, apply exactly one of `editorial` or `normative`.
14+
15+
A separate issue or proposal is required for normative specification changes,
16+
breaking changes or deprecations, work requiring coordination across PRs or
17+
repositories, and new capabilities needing agreement on scope or ongoing
18+
support. Existing governance and proposal approval requirements still apply.
19+
20+
Self-contained changes may go directly to a PR: contained bug fixes, editorial
21+
corrections, tests, behavior-preserving refactoring, routine maintenance, and
22+
straightforward additions such as CLI convenience options or internal helpers.
23+
The change's impact and coordination needs determine whether an issue is needed,
24+
not its size or title prefix.
25+
26+
Link existing issues when relevant. Use `Refs #123` for ongoing work and `Fixes
27+
#123` or `Closes #123` only when the PR completes the issue. If no issue is needed,
28+
write `No issue needed:` followed by a brief reason in the PR description.
29+
Use an explicit relationship such as `Refs #123`, or an ANS issue URL; incidental
30+
issue numbers and upstream changelog URLs do not count as tracking references.
31+
Maintainers confirm the classification during review and may apply
32+
`issue-required` to require a reference.
33+
34+
Routine Dependabot updates need neither an issue nor an explanation. Normative,
35+
explicitly breaking, and `issue-required` PRs still require a reference,
36+
including Dependabot PRs. Review, DCO, CI, and private security reporting
37+
requirements continue to apply.
1938

2039
## Developer Certificate of Origin
2140

‎PULL_REQUEST_TEMPLATE.md‎

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
<!--
22
Thank you for contributing to the Agent Name Service project!
33
4-
REQUIRED: every PR except Dependabot updates must link an issue with a closing
5-
keyword (e.g. "Fixes #123").
6-
The issue is where we triage and prioritize; the PR is where we review.
7-
If no issue exists yet, open one first.
8-
9-
Note for AI coding agents: complete every section below, keep the section
10-
headings, and put a real issue number after "Fixes". If you were not given
11-
an issue number, ask your operator or create the issue before opening this PR.
4+
Complete the sections below. Follow CONTRIBUTING.md to determine whether a
5+
separate issue or proposal is needed. A self-contained change can be explained
6+
and reviewed in the PR without creating a duplicate tracking issue.
127
-->
138

149
## Related issue
1510

16-
<!-- REQUIRED — use a closing keyword so GitHub links it: Fixes / Closes / Resolves #NNN -->
17-
18-
Fixes #
11+
<!-- Reference an existing issue or proposal, for example Refs #123 or
12+
Refs owner/repo#123. Use Fixes / Closes / Resolves only if this PR completes it.
13+
If no issue is needed, write No issue needed: followed by a brief reason.
14+
Normative, explicitly breaking, and issue-required PRs must reference an
15+
issue or proposal. Routine Dependabot updates need neither a reference nor
16+
an explanation unless one of those conditions applies. -->
1917

2018
## Summary
2119

@@ -41,5 +39,5 @@ Fixes #
4139

4240
- [ ] The PR title follows [Conventional Commits](https://www.conventionalcommits.org) — release notes are generated from it
4341
- [ ] Tests cover the change
44-
- [ ] The linked issue above uses a closing keyword
42+
- [ ] I linked the relevant issue or proposal, or explained why no separate issue is needed
4543
- [ ] Every commit is signed off (`git commit -s`) certifying the [DCO](https://developercertificate.org)

‎README.md‎

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,76 @@ repository; the shared defaults maintain those labels after enrollment.
9393
GoReleaser publishes their generated package updates directly to `main`.
9494
Their Maintainer team access is still managed through Peribolos.
9595

96+
## Shared contribution tooling
97+
98+
| Feature | How repositories receive it |
99+
| --- | --- |
100+
| Shared labels | Safe Settings applies `safe-settings/suborgs/defaults.yml` only to repositories in the settings scope, when organization management runs in apply mode. Labels do not inherit from `.github` on their own. |
101+
| Issue forms | Forms in `.github/ISSUE_TEMPLATE/` automatically become organization defaults when merged, wherever repositories have no local issue forms. Provision the labels they use before publishing them. Local template directories override the fallback, so copy all forms that repository needs. |
102+
| Contribution and inactivity workflows | Install a caller from `workflow-templates/` in each repository's `.github/workflows/`. Workflows are not inherited or automatically copied. Callers use the centrally maintained workflow on `main`. |
103+
| Specification release form | Copy `repo-templates/specification/ISSUE_TEMPLATE/spec-release.yml` into `ans-spec` or `trust-index-spec`, alongside the other forms that repository needs. |
104+
| GitVote | With the [GitVote App](https://github.com/apps/git-vote) installed, the root `.gitvote.yml` is an organization fallback. A repository's own configuration takes precedence. |
105+
106+
Proposal forms cover coordinated changes and decisions; the default change-request
107+
form covers self-contained improvements. Proposal, specification-tracking, and
108+
nomination forms collect evidence and the decision process, with optional links
109+
to published governance rules. Labels record status; they do not approve
110+
proposals, grant team access, or enforce release acceptance. Governance-only
111+
forms and quarterly health checks belong in the governance repository.
112+
113+
The contribution check accepts an issue reference or a `No issue needed:`
114+
explanation. `normative`, `issue-required`, and explicitly breaking PRs require
115+
a reference even for Dependabot. Create `issue-required` in repositories using
116+
that override before relying on it; the shared label configuration maintains it
117+
once those repositories are enrolled. Repository-local contribution requirements
118+
continue to apply until updated; align each repository's `CONTRIBUTING.md` with
119+
the [shared contribution guide](CONTRIBUTING.md) when adopting the shared check.
120+
121+
### Inactive pull requests
122+
123+
The caller defaults to `dry_run: true`. Each run reports proposed actions in
124+
the Actions log and job summary without changing labels, posting comments, or
125+
closing PRs. Dry-run does not create or reset timers. Review the
126+
classifications before changing the caller to `dry_run: false`; this requires
127+
an explicit configuration change and never happens automatically.
128+
129+
Create the `awaiting-author` and `stale` labels before enabling active mode.
130+
The first active run starts a 60-day response period when it observes a
131+
non-draft PR with changes requested and no pending review requests. Existing PRs start a fresh
132+
period when the workflow adds `awaiting-author` and records the current commit
133+
in a bot comment, regardless of their age. Restarts update that same comment;
134+
a new comment is created only when the period marker is missing. A missing or
135+
mismatched period marker starts a fresh period. After 60 days it posts a reminder;
136+
after another 30 days without an author response it closes the PR, leaving
137+
related issues open. Authors can reopen a PR when ready to continue.
138+
139+
Pushes are detected by comparing the current commit with the period marker,
140+
even when the push event was missed. Pushes, author comments (including review-thread
141+
replies and review summaries), and new change requests restart the full period. A pending review request,
142+
approval, draft conversion, or closure removes both labels. Bot comments do not
143+
restart the clock. Removing `stale` manually
144+
restarts the period; the workflow's own label cleanup does not. The timer uses
145+
the server timestamp of `awaiting-author`,
146+
and a close requires a reminder for the current head commit. General PR update
147+
timestamps and contributor-supplied commit dates do not determine inactivity.
148+
149+
The caller handles trusted base-repository events, including
150+
`pull_request_target`, and runs a daily sweep. The reusable workflow checks out
151+
only `agentnameservice/.github` at the commit that defines the executing workflow,
152+
using `job.workflow_sha`; it never checks out or executes the contributor's branch.
153+
The caller queues runs in a single concurrency group. Its token is scoped to the
154+
calling repository.
155+
156+
### GitVote
157+
158+
Keep the `tsc` team aligned with the eligible voting members before using
159+
`/vote` (majority) or `/vote-two-thirds`. Both profiles count all eligible voters
160+
and remain open for seven days. The thresholds implement majority and two-thirds
161+
for up to nine eligible members, including vacancies. Special voter exclusions
162+
or a different electorate require a matching profile. These defaults do not
163+
start votes automatically or replace proposal review periods and other required
164+
approvals. The GitVote App must have access to the voting repositories and team.
165+
96166
## Development
97167

98168
```sh

0 commit comments

Comments
 (0)