-
Notifications
You must be signed in to change notification settings - Fork 99
[PM-33575] llm: Add delivery skills for preflight, commit, PR, and labeling #2449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
622c98d
[PM-33575] llm: Add delivery skills for preflight, commit, PR, and laβ¦
SaintPatrck 14f9e55
Add AI review label prompt to PR creation skill
SaintPatrck 697ed84
Add llm commit type and t:llm label to delivery skills
SaintPatrck ca56d9a
Add delivery workflow skill pointers to CLAUDE.md
SaintPatrck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| --- | ||
| name: committing-ios-changes | ||
| description: Commit changes, stage files, or create a commit for Bitwarden iOS. Use when asked to "commit", "stage changes", "create commit", "git commit", or when ready to record changes to git history. | ||
| --- | ||
|
|
||
| # Committing iOS Changes | ||
|
|
||
| ## Pre-commit Check | ||
|
|
||
| Before committing, verify the preflight checklist is complete. | ||
| If not done: invoke `perform-ios-preflight-checklist` first. | ||
|
|
||
| ## Commit Message Format | ||
|
|
||
| ``` | ||
| [PM-XXXXX] <type>: Brief description of what changed | ||
| ``` | ||
|
|
||
| - **Ticket**: `[PM-XXXXX]` or `[BWA-XXX]` β required | ||
| - **Type**: one of `feat`, `fix`, `bug`, `chore`, `refactor`, `test`, `docs` | ||
| - **Description**: imperative mood, lowercase after colon, no period at end | ||
| - PR number is appended automatically by GitHub on merge: `(#2399)` | ||
|
|
||
| ### Type Guide | ||
|
|
||
| | Type | Use when | | ||
| |------|----------| | ||
| | `feat` | New user-visible feature | | ||
| | `fix` | Bug fix | | ||
| | `bug` | Bug fix (alternate convention used in this repo) | | ||
| | `chore` | Maintenance, dependency update, build change | | ||
| | `refactor` | Code restructuring without behavior change | | ||
| | `test` | Adding or updating tests only | | ||
| | `docs` | Documentation only | | ||
|
|
||
| ### Examples from git log | ||
| ``` | ||
| [PM-32221] chore: Add appcontext to crashlytics | ||
| [PM-31470] bug: Show migrate personal vault on unlock | ||
| [PM-33136] fix: Centralize TOTP key error handling to reduce Crashlytics noise | ||
| [PM-31836] bug: Create Passkeys into MyItems | ||
| ``` | ||
|
|
||
| ## What to Stage | ||
|
|
||
| Stage specific files β avoid `git add -A` or `git add .`: | ||
|
|
||
| ```bash | ||
| git add BitwardenShared/UI/Auth/Login/LoginProcessor.swift | ||
| git add BitwardenShared/UI/Auth/Login/LoginProcessorTests.swift | ||
| ``` | ||
|
|
||
| ## What NOT to Commit | ||
|
|
||
| - Files containing credentials, API keys, or secrets | ||
| - Build artifacts (`.build/`, `DerivedData/`, `.xcodeproj/` β already gitignored) | ||
| - Unintended changes to `project-*.yml` (verify these are intentional) | ||
| - Snapshot test images unless your PR intentionally changes UI | ||
|
|
||
| ## Create the Commit | ||
|
|
||
| ```bash | ||
| git commit -m "$(cat <<'EOF' | ||
| [PM-XXXXX] <type>: Your commit message here | ||
| EOF | ||
| )" | ||
| ``` | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| --- | ||
| name: creating-ios-pull-request | ||
| description: Create a pull request, open a PR, or submit a PR for Bitwarden iOS changes. Use when asked to "create PR", "open pull request", "submit PR", "push and open PR", or when work is ready for review. | ||
| --- | ||
|
|
||
| # Creating an iOS Pull Request | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - All commits are in place | ||
| - Preflight checklist complete (`perform-ios-preflight-checklist`) | ||
| - Branch is pushed to remote: `git push -u origin <branch-name>` | ||
|
|
||
| ## PR Title Format | ||
|
|
||
| Match the commit format: | ||
| ``` | ||
| [PM-XXXXX] <type>: Brief description | ||
| ``` | ||
|
|
||
| Keep under 70 characters. GitHub appends the PR number on merge. | ||
|
|
||
| ## PR Body | ||
|
|
||
| Use the repo's `.github/PULL_REQUEST_TEMPLATE.md` structure: | ||
|
|
||
| ```markdown | ||
| ## ποΈ Tracking | ||
| [PM-XXXXX](https://bitwarden.atlassian.net/browse/PM-XXXXX) | ||
|
|
||
| ## π Objective | ||
| [1-3 sentences: what this PR does and why] | ||
|
|
||
| ## πΈ Screenshots | ||
| [Required for UI changes. Use fixed-width images. Delete section if not applicable.] | ||
| ``` | ||
|
|
||
| ## Create as Draft | ||
|
|
||
| ```bash | ||
| gh pr create \ | ||
| --draft \ | ||
| --base main \ | ||
| --title "[PM-XXXXX] <type>: Brief description" \ | ||
| --body "$(cat <<'EOF' | ||
| ## ποΈ Tracking | ||
| [PM-XXXXX](https://bitwarden.atlassian.net/browse/PM-XXXXX) | ||
|
|
||
| ## π Objective | ||
| [Description] | ||
| EOF | ||
| )" | ||
| ``` | ||
|
|
||
| Always create as `--draft`. Mark ready for review only after self-review. | ||
|
|
||
| ## AI Review Label | ||
|
|
||
| Before running `gh pr create`, **always** use the `AskUserQuestion` tool to ask whether to add an AI review label: | ||
|
|
||
| - **Question**: "Would you like to add an AI review label to this PR?" | ||
| - **Options**: `ai-review-vnext`, `ai-review`, `No label` | ||
|
|
||
| If the user selects a label, include it via the `--label` flag: | ||
|
|
||
| ```bash | ||
| gh pr create --draft --label "ai-review-vnext" --title "..." --body "..." | ||
| ``` | ||
|
|
||
| ## After Creating | ||
|
|
||
| 1. Add labels via `labeling-ios-changes` skill | ||
| 2. Self-review using `reviewing-changes` skill | ||
| 3. Mark ready for review when satisfied |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| --- | ||
| name: labeling-ios-changes | ||
| description: Label a pull request, categorize changes, or add labels to a PR for Bitwarden iOS. Use when asked to "label PR", "add labels", "categorize changes", "what labels should I add", or after creating a PR. | ||
| --- | ||
|
|
||
| # Labeling iOS Changes | ||
|
|
||
| Apply labels to categorize the change type and affected app(s). | ||
|
|
||
| ## Change Type Label (pick one) | ||
|
|
||
| | Commit type | Label | | ||
| |-------------|-------| | ||
| | `feat` β user-facing feature | `t:feature-app` | | ||
| | `feat` β internal tool/automation | `t:feature-tool` | | ||
| | `fix` / `bug` | `t:bug` | | ||
| | `chore` / `refactor` / `test` | `t:tech-debt` | | ||
| | `docs` | `t:docs` | | ||
| | CI/workflow changes | `t:ci` | | ||
| | Dependency updates | `t:deps` | | ||
| | LLM-generated / misc | `t:misc` | | ||
| | Breaking change (add alongside type label) | `t:breaking-change` | | ||
SaintPatrck marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## App Context Label (pick one or both) | ||
|
|
||
| | App affected | Label | | ||
| |--------------|-------| | ||
| | Password Manager (`BitwardenShared/`, `Bitwarden/`) | `app:password-manager` | | ||
| | Authenticator (`AuthenticatorShared/`, `Authenticator/`) | `app:authenticator` | | ||
| | Both | `app:password-manager` + `app:authenticator` | | ||
|
|
||
| ## Apply Labels | ||
|
|
||
| ```bash | ||
| gh pr edit <PR_NUMBER> --add-label "t:feature-app,app:password-manager" | ||
| ``` | ||
|
|
||
| On the current branch (no PR number needed): | ||
| ```bash | ||
| gh pr edit --add-label "t:bug,app:password-manager" | ||
| ``` | ||
|
|
||
| ## Special Labels | ||
|
|
||
| | Label | When to use | | ||
| |-------|-------------| | ||
| | `ai-review` | Request a Claude code review via CI | | ||
| | `automated-pr` | PR created by automation or workflow | | ||
| | `hold` | Prevent merge β add when PR should not be merged yet | | ||
| | `needs-qa` | QA review required before merge | | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| --- | ||
| name: perform-ios-preflight-checklist | ||
| description: Perform preflight checks, pre-commit check, self review, or verify changes are ready to commit for Bitwarden iOS. Use when asked to "preflight", "pre-commit check", "self review", "ready to commit", "check my changes", or before creating a PR. | ||
| --- | ||
|
|
||
| # iOS Pre-flight Checklist | ||
|
|
||
| Run this before every commit or PR. | ||
|
|
||
| ## Automated Checks (Run These First) | ||
|
|
||
| ```bash | ||
| mint run swiftformat --lint --lenient . # Formatting | ||
| mint run swiftlint # Lint | ||
| typos # Spell check | ||
| ``` | ||
|
|
||
| Fix any failures before continuing. | ||
|
|
||
| ## Manual Checklist | ||
|
|
||
| ### Architecture | ||
| - [ ] UDF respected: views send actions/effects, never mutate state directly | ||
| - [ ] Business logic in Processor; navigation logic in Coordinator | ||
| - [ ] No new top-level subdirectories in `Core/` or `UI/` | ||
| - [ ] `Services` typealias uses only the `Has*` protocols this processor needs | ||
|
|
||
| ### Security | ||
| - [ ] Zero-knowledge: no unencrypted vault data logged, stored, or transmitted | ||
| - [ ] Secrets use `KeychainRepository`, not `UserDefaults`/`CoreData` | ||
| - [ ] User input validated via `InputValidator` | ||
| - [ ] Sensitive errors implement `NonLoggableError` | ||
| - [ ] Extension memory impact checked if KDF is involved | ||
|
|
||
| ### Testing | ||
| - [ ] New processor actions/effects have tests | ||
| - [ ] Error paths tested (not just happy path) | ||
| - [ ] New protocols have `// sourcery: AutoMockable` | ||
| - [ ] Test files co-located with implementation files | ||
|
|
||
| ### Documentation & Style | ||
| - [ ] All new public types/methods have DocC (`///`) documentation | ||
| - [ ] `TODO` comments include JIRA ticket: `// TODO: PM-12345 - description` | ||
| - [ ] Imports grouped: system β third-party β project modules | ||
| - [ ] `Has*` / `Default*` / `Mock*` naming conventions followed | ||
|
|
||
| ### Hygiene | ||
| - [ ] No hardcoded secrets, credentials, or API keys | ||
| - [ ] No `try!` or force-unwraps (`!`) in production code paths | ||
| - [ ] No unintended changes to `project-*.yml` specs | ||
|
|
||
| ## All Green? | ||
|
|
||
| Proceed to commit using the `committing-ios-changes` skill. |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.