feat(core): team-repo-maintenance rule — governance for shared-repo changes#1
Merged
feat(core): team-repo-maintenance rule — governance for shared-repo changes#1
Conversation
… repo changes Adds core/rules/team-repo-maintenance.md (new global rule). Codifies the discipline that must accompany every change Claude makes to a shared public repo in the agentteamland/ org. Four mandatory steps: 1. Bump team.json (or CLI internal/config.Version) following semver 2. Conventional commit format (type(scope): summary + body) 3. "Discovered via" context in the commit body — audit trail for which project/session revealed the fix 4. PR flow (default; enforced by branch protection added on 2026-04-24) The rule is the METHOD; branch protection is the SAFETY NET. Branch protection refuses direct pushes; this rule tells Claude how to produce a PR-ready change with the right shape. Discovered via dst-new-ds Q3 fix (design-system-team@0.4.1→0.4.2), where version bump was initially forgotten — surfaced the governance gap. Bumps team.json 1.3.0 → 1.3.1 (patch: new rule, no breaking change). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ndatory assignee Two reinforcements to the team-repo-maintenance rule based on feedback: 1. **PR merge discipline — absolute, no exceptions.** Claude never merges PRs, regardless of triviality, approval count, urgency, or prior user authorization. The previous "self-merge instantly for trivial changes" language was a loophole and has been removed. Explicit list of prohibited actions (gh pr merge, --approve, MCP browser clicks, API calls) so there is no interpretive wiggle room. 2. **Mandatory --assignee @me at PR creation.** Every PR Claude opens must have the authenticated maintainer as assignee so it surfaces on their dashboard for review. Both the code example in step 4 and a dedicated paragraph make this explicit; fallback (gh pr edit --add-assignee) is documented for retroactive fixing if forgotten. Admin bypass for DIRECT PUSH remains available for genuine emergencies (unchanged), because that's a different operation (commit on main) and a different escape valve (user's, not Claude's). The no-auto-merge rule specifically closes the path where Claude would merge its own PRs, which defeats the whole review-gate purpose. No version bump (same rule, two reinforcements within the unmerged PR). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The earlier revision added "always --assignee @me" as an absolute rule, but that has two problems in the solo-maintainer setup where Claude pushes under the maintainer's own GitHub account: 1. Author field ALREADY equals the maintainer. An explicit assignee is redundant and pollutes the "Assigned to me" dashboard queue with PRs the maintainer authored. 2. GitHub blocks `--add-reviewer <self>` at the API level, so the companion symmetric rule ("reviewer = mkurak") is unachievable without a separate bot account. Revised position: Claude does NOT add --assignee or --reviewer on its own PRs. The maintainer reaches these PRs through the normal "Created by me" / author filters on GitHub. A note reserves --reviewer mkurak for a future setup where Claude pushes under a distinct bot account. The absolute no-merge rule (section above) stays unchanged — that one didn't depend on GitHub identity at all. Discovered via Mesut flagging the redundancy after all 6 in-flight PRs landed with `assignees: mkurak` next to author `mkurak` — purely noisy, no functional benefit. No version bump (still within the unmerged core@1.3.1 PR). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The earlier description amendment in this PR pushed the string to 216
characters, exceeding the team.schema.json maxLength of 200. CI's
schema-validate job caught it:
team.json invalid
{
instancePath: '/description',
schemaPath: '#/properties/description/maxLength',
keyword: 'maxLength',
params: { limit: 200 },
message: 'must NOT have more than 200 characters'
}
Rewrote the description as a compact comma-separated list of subsystems
(memory, journal, wiki, version-check, learning-capture, docs-sync,
team-repo-maintenance, karpathy-guidelines, schemas). Dropped the prose
elaborations "inline markers + hook-driven capture" and "governance"
which were explanatory-verbose. The shorter form mirrors the rules/
skills names exactly, making it easier for a reader to cross-reference.
New length: 164 chars. All other skill/rule descriptions already under
200, so no additional edits needed.
Discovered via CI failure on PR#1 schema-validate job (core#1).
No version bump (still within the unmerged core@1.3.1 PR).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
This was referenced May 2, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
core/rules/team-repo-maintenance.md.team.json(orinternal/config.Versionfor CLI) following semvertype(scope): summary)team.jsonupdated to register the new rule + description.README.mdrules table updated.Discovered via
While pushing the
fix(dst-new-ds): Q3 single-selectfix todesign-system-team, I realized the/save-learningsflow had no built-in discipline for semver bumping — the team repo change was prepared without a version bump, just flagged for user confirmation. Mesut caught this as a governance gap and asked for a principled workflow.This rule is the workflow. Branch protection (also added today) refuses direct push; this rule tells Claude how to produce a PR-ready change with the right shape.
Version bump
team.json:1.3.0 → 1.3.1(patch — new rule, no breaking change to existing rules).Test plan
/save-learningsshould produce: version bump + conventional message + "Discovered via" context + PR (not direct push)~/.claude/rules/symlinks auto-createteam-repo-maintenance.mdafter nextatl update(install.sh glob pattern already covers new.mdfiles incore/rules/)git pushto main on any protected repo should fail with "Protected branch update failed" (no soft bypass)🤖 Generated with Claude Code