Skip to content

Commit 105d98c

Browse files
committed
Add Centralised InnerSource Repository Governance pattern
1 parent 34b416b commit 105d98c

1 file changed

Lines changed: 229 additions & 0 deletions

File tree

Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
## Title
2+
3+
Centralised InnerSource Repository Governance
4+
5+
## Patlet
6+
7+
InnerSource repositories lose contributor readiness when project hygiene drifts across teams. A central governance repository defines readiness checks as policy-as-code and runs automated audits that help Trusted Committers and repository maintainers keep projects discoverable, understandable, and contribution-ready without removing local ownership.
8+
9+
## Problem
10+
11+
As InnerSource adoption grows, teams publish repositories with uneven documentation, ownership clarity, contribution guidance, communication channels, and discoverability metadata. Some projects have strong `README.md` and `CONTRIBUTING.md` files; others have no maintainer contact, no issue templates, unclear CODEOWNERS, stale labels, or no clear signal that outside contributions are welcome.
12+
13+
Contributors then hesitate. They cannot tell whether a repository is active, who owns it, how to ask questions, what contributions are welcome, or whether the project follows the organisation's InnerSource standards. Manual reviews by an InnerSource Program Office, platform team, or community group do not scale.
14+
15+
## Story
16+
17+
An InnerSource Program Office observed that contributors often stopped before opening a pull request. The source code was visible, but the contribution path was not. Some repositories lacked `CONTRIBUTING.md`; others had outdated contacts or no newcomer-friendly issue labels.
18+
19+
The program office created a governance repository with versioned InnerSource readiness policies. A scheduled audit compared participating repositories with those policies and sent Trusted Committers and repository maintainers a concise report: which checks passed, which needed attention, who owned the repository, and how to remediate gaps.
20+
21+
The audit did not block teams. It made readiness visible and helped maintainers improve discoverability, documentation, ownership, and contribution paths.
22+
23+
## Context
24+
25+
* InnerSource is practiced across many teams, business units, or repositories.
26+
* Teams retain ownership of their repositories and contribution process.
27+
* Contributors need clear signals for how to use, discuss, and contribute to projects.
28+
* Trusted Committers and repository maintainers keep project documentation and contribution paths usable.
29+
* An InnerSource Program Office, platform team, or community group stewards shared readiness expectations.
30+
* An InnerSource Portal, source code inventory, or repository catalogue may already exist.
31+
* GitHub Actions, GitHub APIs, or similar automation tooling is available.
32+
33+
## Forces
34+
35+
* **Autonomy vs consistency:** Teams need local ownership; contributors need predictable project signals.
36+
* **Contributor confidence:** Missing documentation, stale ownership, or unclear communication channels discourage contributions.
37+
* **Scale:** Manual InnerSource readiness reviews fail as repository count grows.
38+
* **Signal quality:** Noisy or generic findings are ignored.
39+
* **Quality over presence:** A repository can contain the expected files and still be hard to contribute to if they are incomplete, outdated, or ignored.
40+
* **Valid variation:** Governance levels and maturity stages may need different readiness expectations.
41+
* **Infrastructure strain:** Large audits can consume API rate limits, runner capacity, logs, and team attention.
42+
* **Control-plane security:** Tampering with governance policies, exceptions, inventory, or workflows can hide readiness gaps across many repositories.
43+
44+
## Solution
45+
46+
Create a **central InnerSource governance repository** that defines contributor-readiness expectations as policy-as-code and audits repositories in scope. Treat it as an internal product with clear roles, review rules, actionable reports, and an exception process.
47+
48+
Example structure:
49+
50+
```text
51+
innersource-governance/
52+
policies/
53+
default/
54+
base-documentation.yml
55+
contribution-process.yml
56+
communication.yml
57+
discoverability.yml
58+
shared-ownership/
59+
codeowners.yml
60+
maintainer-model.yml
61+
repository-inventory.yml
62+
exceptions.yml
63+
audit/
64+
audit.py
65+
.github/
66+
workflows/
67+
readiness-audit.yml
68+
```
69+
70+
### InnerSource Policies
71+
72+
Store readiness expectations in `policies/`. Use a small set of profiles aligned with your InnerSource operating models, such as `default`, `contributions-welcome`, or `shared-ownership`.
73+
74+
Typical checks include:
75+
76+
* `README.md` with purpose, usage, and getting-started guidance,
77+
* `CONTRIBUTING.md` with contribution and review expectations,
78+
* CODEOWNERS or documented maintainer ownership,
79+
* issue and pull request templates,
80+
* documented communication channels,
81+
* support or maintainer contact information,
82+
* license or internal sharing guidance,
83+
* repository description, topics, and discoverability metadata,
84+
* labels such as `good first issue` or `help wanted`,
85+
* InnerSource Portal badge or registration metadata, and
86+
* repository settings that support trusted collaboration, such as branch protection or workflow permissions.
87+
88+
Avoid checkbox compliance. Where possible, evaluate freshness, required sections, useful links, and whether contribution-related information is maintained.
89+
90+
### Repository Inventory
91+
92+
Maintain the audit scope in `repository-inventory.yml`, or import it from an InnerSource Portal or source code inventory.
93+
94+
```yaml
95+
repositories:
96+
- name: payments-api
97+
owner: payments-platform-team
98+
profile: contributions-welcome
99+
lifecycle: active
100+
portal_slug: payments-api
101+
```
102+
103+
Each repository should have an owner, lifecycle state, and assigned InnerSource profile. If a portal or inventory is already authoritative for ownership, lifecycle, or discoverability metadata, consume that data instead of duplicating it. Store only governance-specific configuration in the governance repository.
104+
105+
### Exception Registry
106+
107+
Record approved deviations from the readiness baseline in `exceptions.yml`. Each exception needs an owner, reason, and expiry or review date.
108+
109+
```yaml
110+
exceptions:
111+
- repository: payments-api
112+
policy: issue_templates_required
113+
reason: Team is migrating from an external tracker this quarter.
114+
owner: payments-platform-team
115+
expires: 2026-12-31
116+
```
117+
118+
Exceptions keep governance practical, but they must remain visible in reports. Avoid broad or non-expiring exceptions because they hide contributor-experience problems.
119+
120+
### Readiness Audit
121+
122+
Audit each repository against its assigned InnerSource policy profile. Findings should include repository, owner, policy, severity, expected state, actual state, exception status, and suggested remediation.
123+
124+
Prioritise checks that affect contributor success:
125+
126+
* missing or incomplete base documentation,
127+
* missing contribution process,
128+
* unclear ownership or maintainer contact,
129+
* undocumented communication channel,
130+
* missing issue or pull request templates,
131+
* stale portal metadata or missing discoverability tags,
132+
* missing newcomer-friendly labels, and
133+
* repository settings that make contribution review unsafe or unclear.
134+
135+
Design the audit to be incremental and rate-aware. Store the last known state and re-check changed repositories where possible. Use `ETag` / `If-None-Match`, cache expensive checks such as repository metadata, branch names, workflow files, and CODEOWNERS, and use GraphQL batching carefully for bulk metadata. Stagger scans by importance: active InnerSource projects nightly, candidate projects every few days, and archived or sandbox repositories weekly or monthly.
136+
137+
### Reporting and Remediation
138+
139+
Run the audit on a schedule and publish a digest report.
140+
141+
```yaml
142+
on:
143+
schedule:
144+
- cron: "0 2 * * *"
145+
```
146+
147+
Start with visibility-only reporting. Reports should help Trusted Committers, repository maintainers, and contributors improve contributor experience; they should not rank or shame teams. Leadership views should aggregate trends without ranking individual teams.
148+
149+
For each finding, include remediation guidance or links to templates. If remediation is automated later, use reviewable pull requests for straightforward fixes, such as adding a missing template file.
150+
151+
Track:
152+
153+
* percentage of repositories covered,
154+
* percentage passing readiness checks,
155+
* open findings by severity,
156+
* mean time to remediate contributor-blocking gaps,
157+
* active and expired exceptions,
158+
* false positives and repeated findings,
159+
* audit runtime, API usage, and runner minutes.
160+
161+
### Govern the Governance Repository
162+
163+
The governance repository should itself follow strong InnerSource practices. Policy changes happen through pull requests with visible discussion and review by the InnerSource Program Office, platform team, security partners, and affected Trusted Committers or repository maintainers.
164+
165+
Roles:
166+
167+
* **Contributors** use readiness signals to decide whether and how to contribute.
168+
* **Trusted Committers and repository maintainers** keep project guidance current and act on findings.
169+
* **InnerSource Program Office or community stewards** maintain readiness policies, templates, and reporting practices.
170+
* **Platform and security partners** support automation, credentials, repository settings, and control-plane protection.
171+
* **Product Owners or business sponsors** help prioritise remediation when contributor-readiness work competes with feature delivery.
172+
173+
Trusted Committers and repository maintainers should be able to propose policy changes, improve templates, and challenge low-value checks.
174+
175+
Protect the governance repository more strictly than ordinary project repositories. Require branch protection, mandatory reviews, CODEOWNERS approval for `policies/`, `exceptions.yml`, inventory, audit code, and workflows, and signed or verified changes for sensitive files.
176+
177+
Use least-privilege credentials. Separate read-only audit credentials from remediation credentials. Log and alert on changes to policies, exceptions, inventory, workflows, and credentials. Periodically audit the governance repository through an independent check.
178+
179+
## Resulting Context
180+
181+
* Contributors can quickly assess whether a repository is ready for InnerSource participation.
182+
* Trusted Committers and repository maintainers receive actionable guidance for documentation, ownership, communication, and discoverability.
183+
* InnerSource expectations are transparent, version-controlled, and open to contribution.
184+
* Exceptions are explicit, time-bound, and visible.
185+
* InnerSource Portal and inventory data become more reliable.
186+
* Incremental, staggered scans control audit cost and infrastructure load.
187+
* Leadership sees InnerSource health trends without micromanaging Trusted Committers or repository maintainers.
188+
189+
## Use This Pattern When
190+
191+
* You have many InnerSource repositories owned by different teams.
192+
* Contributors struggle to identify how to use or contribute to projects.
193+
* InnerSource Portal quality depends on repository metadata and project hygiene.
194+
* Manual readiness checks are too slow or incomplete.
195+
* You want transparent policy-as-code instead of undocumented central checks.
196+
* Poor contributor experience costs more than maintaining the governance process.
197+
198+
## Don’t Use This Pattern When
199+
200+
* Only a few InnerSource repositories exist and manual support is enough.
201+
* You need hard enforcement at merge time rather than periodic guidance.
202+
* You cannot maintain repository ownership or lifecycle metadata.
203+
* You cannot protect the governance repository and its credentials.
204+
* Most projects require unique contribution models that do not fit a small set of profiles.
205+
206+
## Known Instances
207+
208+
TBD
209+
210+
## Status
211+
212+
* Initial
213+
214+
## Authors
215+
216+
* [Amburi Roy](https://www.linkedin.com/in/amburi/)
217+
218+
## Related Patterns
219+
220+
* [Standard Base Documentation](../2-structured/base-documentation.md) — defines contributor-facing files that readiness checks can evaluate.
221+
* [Assisted Compliance](assisted_compliance.md) — helps Trusted Committers and repository maintainers add missing contribution guidance.
222+
* [Communication Tooling](../2-structured/communication-tooling.md) — describes communication channels that readiness checks can require.
223+
* [Issue Tracker Use Cases](../2-structured/issue-tracker.md) — supports checks for issue templates and transparent planning.
224+
* [Unified Source Code Inventory](source-code-inventory.md) — can provide audit scope and repository metadata.
225+
* [Explicit Governance Levels](../2-structured/governance-levels.md) — can provide profiles for InnerSource operating models.
226+
* [InnerSource Portal - Hygiene](innersource-portal-hygiene.md) — overlaps with checks for portal badges, metadata, and active projects.
227+
* [Include Product Owners](include-product-owners.md) — helps with stewardship of the governance repository.
228+
* [Trusted Committer](../2-structured/trusted-committer.md) — supports safe and consistent policy changes.
229+
* [InnerSource Portal](../2-structured/innersource-portal.md) — complements central access to shared organisational knowledge.

0 commit comments

Comments
 (0)