Skip to content

Commit 1afc8b4

Browse files
authored
Add onboard-team-area skill (#5615)
## Changes Add `.agent/skills/onboard-team-area/SKILL.md`, a small skill that encodes the repeatable steps for onboarding a new team or reserving a new code area: 1. Add the team to `.github/OWNERTEAMS` (explicit `@members`, the source of truth). 2. Reserve `experimental/<area>/` and `acceptance/experimental/<area>/` with `.gitkeep`. 3. Map both paths to the team in `.github/OWNERS`. 4. Validate and open the PR. It also has a short experimental-vs-stable note and a pointer to the aitools graduation (PR #4917) so a new team knows where code lives and how it later moves to a stable top-level command. ## Why PR #5605 onboarded the ai-training team by hand-editing `OWNERTEAMS` + `OWNERS` and reserving the experimental dirs, but that recipe was not written down. This skill captures it so the next onboarding is one prompt. It lives in-repo under `.agent/skills` (next to `pr-checklist` and `bump-cli-compat`, not in an external plugin) so it versions alongside the OWNERS files it describes. ## Tests - [x] `./task checks` - [x] Frontmatter and structure match the existing `pr-checklist` and `bump-cli-compat` skills This pull request and its description were written by Isaac.
1 parent ace5f45 commit 1afc8b4

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
name: onboard-team-area
3+
description: "Onboard a new team or reserve a new code area in the Databricks CLI: add the team to .github/OWNERTEAMS, reserve experimental/<area>/ and acceptance/experimental/<area>/, and map both paths in .github/OWNERS so the maintainer-approval gate routes the area's PRs to the team. Use when the user says 'onboard a team', 'add an OWNERS team', 'reserve an experimental area', 'add a new team to the CLI', or wants a new owned directory wired into review."
4+
user-invocable: true
5+
allowed-tools: Read, Edit, Write, Bash, Glob, Grep, AskUserQuestion
6+
---
7+
8+
# Onboard a team / area into the CLI
9+
10+
How ownership works here: `.github/OWNERS` is CODEOWNERS-style and last-match-wins. `.github/OWNERTEAMS` maps `team:<name>` to an explicit `@member` list and is the source of truth, because the CI token cannot resolve GitHub org-team membership. The `maintainer-approval` workflow is a required check that blocks merge until every owned group a PR touches has at least one approval from one of its owners.
11+
12+
Worked example: PR #5605 ("Add ai-training OWNERS team and reserve experimental/air") is exactly the steps below: +1 line in OWNERTEAMS, two `.gitkeep` files, +2 lines in OWNERS.
13+
14+
## Inputs (ask if missing)
15+
16+
- Team alias, e.g. `ai-training`, and the `@member` list.
17+
- Area/dir name, e.g. `air`.
18+
- Experimental or stable? This decides where code lands (see the last section).
19+
20+
## Step 1 — Add the team to `.github/OWNERTEAMS`
21+
22+
Append one line, keeping the existing column alignment:
23+
24+
```
25+
team:<name> @member1 @member2 ...
26+
```
27+
28+
If the team has a GitHub team page, add its URL to the header comment block. Skip the URL if the team page does not exist yet; the validator only warns about a missing URL, it does not block.
29+
30+
## Step 2 — Reserve the directories
31+
32+
Create empty `.gitkeep` placeholders so the owned paths exist before any code lands:
33+
34+
```
35+
experimental/<area>/.gitkeep
36+
acceptance/experimental/<area>/.gitkeep
37+
```
38+
39+
## Step 3 — Map the paths in `.github/OWNERS`
40+
41+
Add rules under an `# <Area>` comment. Because last-match-wins, specific rules go after the `*` maintainer catch-all:
42+
43+
```
44+
/experimental/<area>/ team:<name>
45+
/acceptance/experimental/<area>/ team:<name>
46+
```
47+
48+
## Step 4 — Validate and open the PR
49+
50+
```bash
51+
# OWNERS parser + approval-logic tests
52+
node --test .github/scripts/owners.test.js .github/workflows/maintainer-approval.test.js
53+
# OWNERS/OWNERTEAMS consistency: undefined teams, zero-owner rules, missing paths
54+
node .github/scripts/owners.js validate
55+
# Repo quick checks (no Go/Python/YAML changed, so the formatters have nothing to do)
56+
./task checks
57+
```
58+
59+
No `NEXT_CHANGELOG.md` entry; this is ownership/config only. Write the PR using the `.github/PULL_REQUEST_TEMPLATE.md` sections (Why / Changes / Tests).
60+
61+
## Experimental vs stable, and graduation
62+
63+
- **Experimental** — code under `experimental/<area>/`, tests under `acceptance/experimental/<area>/`. Register it under the hidden parent in `cmd/experimental/experimental.go`, or top-level in `cmd/cmd.go` with `Hidden: true` (as `ssh` does). Experimental commands still ship enabled in every release; `Hidden` only removes them from `--help`, it does not gate or compile them out. No `NEXT_CHANGELOG` entries while experimental. To hand a build to testers, push a `bugbash-<topic>` branch (auto-builds a snapshot) and share the `internal/bugbash/exec.sh` one-liner.
64+
- **Graduating to stable**`git mv` the feature-complete commands to `cmd/<area>/` + `libs/<area>/`, register them top-level in `cmd/cmd.go`, keep the old `experimental` paths as deprecated cobra aliases (`sub.Hidden = true`, `sub.Deprecated = '...'`), add OWNERS rules for the new stable paths, and add the `NEXT_CHANGELOG` entry. See `experimental/aitools` graduating to top-level `aitools` (PR #4917) as the worked example.

0 commit comments

Comments
 (0)