Skip to content

Commit 9f65c7f

Browse files
committed
build: require validate branch protection context
Why: GitHub exposes the managed repo-maintenance workflow check as the job context validate, not the display-style Validate Repo Maintenance / validate string. New repos could pass CI but stay blocked by branch protection when guidance used the display string. Verification: - uv run pytest skills/maintain-project-repo/tests/test_maintain_project_repo_workflow.py - uv run pytest tests/test_swift_package_guidance_sync_workflow.py tests/test_xcode_guidance_sync_workflow.py - bash .github/scripts/validate_repo_docs.sh - uv run scripts/validate_socket_metadata.py - uv run pytest (plugins/apple-dev-skills) - uv run pytest (plugins/productivity-skills) Closes #14
1 parent a1a6b83 commit 9f65c7f

23 files changed

Lines changed: 58 additions & 0 deletions

File tree

plugins/apple-dev-skills/ROADMAP.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ Completed Milestone 40 by shipping `swiftui-app-architecture-workflow`, groundin
359359

360360
## History
361361

362+
- Clarified the Apple repo-maintenance toolkit's branch-protection contract so generated and synced repos require the `validate` Actions check context instead of the workflow-title display string.
362363
- Completed Milestones 1 through 17 by establishing the repository, shipping the core Apple skill bundle, improving portability and customization guidance, adding bootstrap and repo-sync workflows, extracting Apple docs exploration into its own skill, and cleaning up the install surface around the top-level export model.
363364
- Completed Milestones 19 and 20 by shipping `format-swift-sources` and `structure-swift-sources` as distinct cleanup workflows with clear boundaries.
364365
- Completed Milestones 22 and 23 by expanding deterministic TODO/FIXME ledger normalization and finishing the customization consolidation review. See `docs/maintainers/customization-consolidation-review.md`.

plugins/apple-dev-skills/docs/maintainers/workflow-atlas.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ flowchart TD
8888
- The active skill surface now uses the intended install-facing names directly.
8989
- The shared repo-maintenance toolkit now lives inside the active Apple skill surface under `shared/repo-maintenance-toolkit/` so bootstrap and sync skills can keep installing the same managed file set without a second plugin or repo.
9090
- The canonical shipped toolkit contract now lives in this repository, stays profile-aware, and gives downstream repos `scripts/repo-maintenance/config/profile.env` while Apple workflows choose either the `swift-package` or `xcode-app` profile explicitly.
91+
- The managed workflow's protected-branch check context is `validate`; GitHub exposes the job check run by that context, not by the display-style workflow title plus job string `Validate Repo Maintenance / validate`.
9192
- The Swift package side of the execution split is now in place, with build-run and testing split into separate primary skills while `swift-package-workflow` remains only as a legacy compatibility-routing surface.
9293
- The Xcode side of the execution split is now in place too, with `xcode-build-run-workflow` and `xcode-testing-workflow` as the real owners while `xcode-app-project-workflow` remains only as a legacy compatibility-routing surface.
9394

plugins/apple-dev-skills/shared/repo-maintenance-toolkit/assets/github/repo-maintenance-workflows/validate-repo-maintenance.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Validate Repo Maintenance
22

3+
# Branch protection should require the Actions check context `validate`.
4+
# GitHub exposes the job check run by this job name, not by the workflow title.
5+
36
on:
47
pull_request:
58
push:
@@ -8,6 +11,7 @@ on:
811

912
jobs:
1013
validate:
14+
name: validate
1115
runs-on: macos-latest
1216
steps:
1317
- uses: actions/checkout@v4

plugins/apple-dev-skills/skills/bootstrap-swift-package/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Create a new Swift package repository with one top-level entry point, a simplici
6262
- `scripts/repo-maintenance/release.sh`
6363
- `Tests/`
6464
- `swift build` and `swift test` unless `--skip-validation` was requested
65+
- branch protection, when enabled, requires the GitHub Actions check context `validate`; do not require the display-style string `Validate Repo Maintenance / validate`
6566
7. Ensure the generated guidance encodes the shared Swift policy:
6667
- apply the detailed local policy in `references/snippets/apple-swift-package-core.md`
6768
- keep the generated repo aligned with the simplicity-first, shape-preserving, and anti-ceremony Swift guidance in that snippet
@@ -138,6 +139,7 @@ Create a new Swift package repository with one top-level entry point, a simplici
138139
- After a successful scaffold, hand off Xcode-managed package build or run tasks to `xcode-build-run-workflow`.
139140
- After a successful scaffold, hand off Xcode-managed package test tasks to `xcode-testing-workflow`.
140141
- After a successful scaffold, use `scripts/repo-maintenance/validate-all.sh` for local maintainer validation and `scripts/repo-maintenance/release.sh` for releases.
142+
- After a successful scaffold, configure protected branches to require `validate` for the managed repo-maintenance workflow; GitHub exposes that job check context directly rather than the workflow title plus job string.
141143
- After a successful scaffold, hand off later repo-guidance alignment work to `sync-swift-package-guidance`.
142144
- For ordinary package work, prefer `swift build` and `swift test`.
143145
- For package builds that need Xcode-managed SDK or toolchain behavior, use `xcode-build-run-workflow` and `xcodebuild` guidance instead of stretching the bootstrap skill into an execution skill.

plugins/apple-dev-skills/skills/bootstrap-swift-package/assets/github/repo-maintenance-workflows/validate-repo-maintenance.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Validate Repo Maintenance
22

3+
# Branch protection should require the Actions check context `validate`.
4+
# GitHub exposes the job check run by this job name, not by the workflow title.
5+
36
on:
47
pull_request:
58
push:
@@ -8,6 +11,7 @@ on:
811

912
jobs:
1013
validate:
14+
name: validate
1115
runs-on: macos-latest
1216
steps:
1317
- uses: actions/checkout@v4

plugins/apple-dev-skills/skills/bootstrap-swift-package/references/automation-prompts.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ Verification:
9191
- Confirm `Package.swift` keeps the explicit Swift 6 language-mode declaration `swiftLanguageModes: [.v6]`.
9292
- Confirm `Package.swift` keeps `// swift-tools-version:` at `6.0` or newer, even if it is lowered from the scaffold default.
9393
- If validation is enabled, verify `swift build` and `swift test` success.
94+
- If branch protection is configured, require the GitHub Actions check context `validate`, not `Validate Repo Maintenance / validate`.
9495
9596
Return contract:
9697
- `status: success|blocked|failed`
@@ -116,3 +117,4 @@ Return contract:
116117
- Stop if target exists and is non-empty.
117118
- Stop if script invocation fails at any step.
118119
- Never continue after failed validation unless `<SKIP_VALIDATION>` is explicitly `true`.
120+
- Do not configure protected branches to require the workflow-title display string `Validate Repo Maintenance / validate`.

plugins/apple-dev-skills/skills/bootstrap-xcode-app-project/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Create a new native Apple app repository from nothing to a usable baseline on di
6363
- verify `AGENTS.md` exists when enabled
6464
- verify `scripts/repo-maintenance/hooks/pre-commit.sample` exists
6565
- verify `scripts/repo-maintenance/validate-all.sh` and `scripts/repo-maintenance/release.sh` exist
66+
- verify branch protection, when enabled, requires the GitHub Actions check context `validate` rather than `Validate Repo Maintenance / validate`
6667
- if validation is enabled, verify project generation and basic project introspection succeeded
6768
9. Hand off existing-project work cleanly:
6869
- recommend `sync-xcode-project-guidance` when the repo guidance should be refreshed or merged after creation
@@ -128,6 +129,7 @@ Create a new native Apple app repository from nothing to a usable baseline on di
128129
- After a successful bootstrap, hand off to `sync-xcode-project-guidance` for repo-guidance alignment when needed, then to `xcode-build-run-workflow` for build, run, diagnostics, mutation, preview, and docs work.
129130
- After a successful bootstrap, hand off to `xcode-testing-workflow` for Swift Testing, XCTest, XCUITest, `.xctestplan`, and test diagnosis work.
130131
- After a successful bootstrap, use `scripts/repo-maintenance/validate-all.sh` for local maintainer validation and `scripts/repo-maintenance/release.sh` for releases.
132+
- After a successful bootstrap, configure protected branches to require `validate` for the managed repo-maintenance workflow; GitHub exposes that job check context directly rather than the workflow title plus job string.
131133
- Recommend `bootstrap-swift-package` directly when the task is really package bootstrap.
132134
- Recommend `sync-xcode-project-guidance` when the repo already exists and only needs repo-guidance or documentation alignment.
133135

plugins/apple-dev-skills/skills/bootstrap-xcode-app-project/assets/github/repo-maintenance-workflows/validate-repo-maintenance.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Validate Repo Maintenance
22

3+
# Branch protection should require the Actions check context `validate`.
4+
# GitHub exposes the job check run by this job name, not by the workflow title.
5+
36
on:
47
pull_request:
58
push:
@@ -8,6 +11,7 @@ on:
811

912
jobs:
1013
validate:
14+
name: validate
1115
runs-on: macos-latest
1216
steps:
1317
- uses: actions/checkout@v4

plugins/apple-dev-skills/skills/bootstrap-xcode-app-project/references/automation-prompts.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ Constraints:
101101
Verification:
102102
- Confirm the expected scaffold files exist.
103103
- If validation is enabled, verify the supported project-generation path completed successfully.
104+
- If branch protection is configured, require the GitHub Actions check context `validate`, not `Validate Repo Maintenance / validate`.
104105
105106
Return contract:
106107
- `status: success|blocked|failed`

plugins/apple-dev-skills/skills/sync-swift-package-guidance/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Bring an existing Swift package repository up to the expected guidance baseline
6969
- `scripts/repo-maintenance/validate-all.sh`
7070
- `scripts/repo-maintenance/sync-shared.sh`
7171
- `scripts/repo-maintenance/release.sh`
72+
- protected branches, when configured, require the GitHub Actions check context `validate` rather than `Validate Repo Maintenance / validate`
7273
10. Hand off ongoing package work cleanly:
7374
- prefer `swift-package-build-run-workflow` or `swift-package-testing-workflow` for ordinary package work after guidance sync
7475
- recommend `xcode-build-run-workflow` or `xcode-testing-workflow` only when package work needs Xcode-managed SDK, toolchain, or test behavior
@@ -117,6 +118,7 @@ Bring an existing Swift package repository up to the expected guidance baseline
117118
- The only current fallback is a non-mutating dry-run or guided result that explains what the sync would do.
118119
- After a successful sync, use `swift-package-build-run-workflow` or `swift-package-testing-workflow` for ordinary package work by default.
119120
- After a successful sync, use `scripts/repo-maintenance/validate-all.sh` for local maintainer validation and `scripts/repo-maintenance/release.sh` for releases.
121+
- After a successful sync, configure protected branches to require `validate` for the managed repo-maintenance workflow; GitHub exposes that job check context directly rather than the workflow title plus job string.
120122
- Recommend `xcode-build-run-workflow` when package work needs Xcode-managed SDK or toolchain behavior.
121123
- Recommend `xcode-testing-workflow` when package work needs Xcode-managed test execution behavior.
122124
- Recommend `bootstrap-swift-package` when the repository still needs to be created from scratch.

0 commit comments

Comments
 (0)