From 20427b6487615417bd2e81732fec1da1532192a7 Mon Sep 17 00:00:00 2001 From: Jonas Ha Date: Fri, 3 Apr 2026 14:22:37 -0400 Subject: [PATCH 1/7] chore(dependabot): update config to ignore specific dependencies - Ignored major updates for `System.Text.Json`, `Microsoft.Extensions.Hosting`, and related packages - Pinned `Microsoft.CodeAnalysis` and `Microsoft.CodeAnalysis.CSharp` to version `5.3.0` --- .github/dependabot.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b2e72395..4ffaa8e3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -14,9 +14,25 @@ updates: update-types: - "minor" - "patch" + ignore: + - dependency-name: "System.Text.Json" + update-types: + - "version-update:semver-major" + - dependency-name: "Microsoft.Extensions.Hosting" + update-types: + - "version-update:semver-major" + - dependency-name: "Microsoft.Extensions.Hosting.Abstractions" + update-types: + - "version-update:semver-major" + - dependency-name: "Microsoft.CodeAnalysis" + versions: + - "5.3.0" + - dependency-name: "Microsoft.CodeAnalysis.CSharp" + versions: + - "5.3.0" - package-ecosystem: "github-actions" - directory: "/" + directoSystem.Text.Jsonry: "/" schedule: interval: "weekly" open-pull-requests-limit: 10 From 852e22be72a5479458245c9c3146f539081e1871 Mon Sep 17 00:00:00 2001 From: Jonas Ha Date: Fri, 3 Apr 2026 15:15:50 -0400 Subject: [PATCH 2/7] chore(project): update language version and dependencies - Updated `LangVersion` to `14.0` for compatibility. - Replaced `System.Text.Json` with `System.Threading.Tasks.Extensions` dependency. - Added exclusion for `System.Diagnostics.CodeAnalysis.RequiresAssemblyFilesAttribute` in PolySharp. - Enabled runtime-supported attributes in PolySharp configuration. --- .../MinimalLambda.SourceGenerators.csproj | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/MinimalLambda.SourceGenerators/MinimalLambda.SourceGenerators.csproj b/src/MinimalLambda.SourceGenerators/MinimalLambda.SourceGenerators.csproj index 3db2ab7a..fe0e4c27 100644 --- a/src/MinimalLambda.SourceGenerators/MinimalLambda.SourceGenerators.csproj +++ b/src/MinimalLambda.SourceGenerators/MinimalLambda.SourceGenerators.csproj @@ -1,7 +1,7 @@  netstandard2.0 - preview + 14.0 enable true true @@ -27,7 +27,7 @@ - + @@ -39,7 +39,8 @@ - System.Runtime.CompilerServices.ModuleInitializerAttribute + System.Runtime.CompilerServices.ModuleInitializerAttribute;System.Diagnostics.CodeAnalysis.RequiresAssemblyFilesAttribute + true false From b97ca202acb85db71026fc7ad59f7bcccd04e382 Mon Sep 17 00:00:00 2001 From: Jonas Ha Date: Fri, 3 Apr 2026 15:16:00 -0400 Subject: [PATCH 3/7] chore(dependencies): remove unused AWSSDK.Core package - Removed `AWSSDK.Core` package reference from Kinesis project. - Cleaned up project file to eliminate unnecessary dependencies. --- .../MinimalLambda.Envelopes.Kinesis.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj b/src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj index 83b3ec0e..6e1fdc7f 100644 --- a/src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj @@ -22,7 +22,6 @@ - From 7a76db6dca6fb413144c6a001256ca1482d2fefa Mon Sep 17 00:00:00 2001 From: Jonas Ha Date: Fri, 3 Apr 2026 15:16:14 -0400 Subject: [PATCH 4/7] chore(dependencies): update package versions - Updated `Autofac.Extensions.DependencyInjection` to `11.0.0`. - Updated `Scriban` to `7.0.6`. - Updated `System.Text.Json` to `[10.0.5, 11.0.0)` for `netstandard2.0` target. - Updated `Verify.XunitV3` to `31.15.0`. - Updated `OpenTelemetry.*` packages to latest `1.15.1` versions. - Added `OpenTelemetry.Instrumentation.AWSLambda` and `System.Threading.Tasks.Extensions`. - Removed redundant `OpenTelemetry.Instrumentation.AWSLambda` conditions in specific target groups. --- Directory.Packages.props | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 24f0a352..06d9315c 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -12,7 +12,7 @@ - + @@ -33,13 +33,14 @@ - - + - - + + + + @@ -49,8 +50,9 @@ + - + @@ -64,7 +66,7 @@ - + @@ -73,11 +75,9 @@ - - \ No newline at end of file From f58d19390d5e6e574b0af7df4763b2e298a66c9e Mon Sep 17 00:00:00 2001 From: Jonas Ha Date: Fri, 3 Apr 2026 15:27:10 -0400 Subject: [PATCH 5/7] chore(dependencies): remove unused Amazon.Lambda.Core references - Removed `Amazon.Lambda.Core` package references from multiple projects: - ApiGateway, Envelopes, Sns, CloudWatchLogs, Kinesis, KinesisFirehose, Alb, and Kafka projects. - Streamlined project files by eliminating redundant dependencies. --- .../MinimalLambda.Envelopes.Alb.csproj | 1 - .../MinimalLambda.Envelopes.ApiGateway.csproj | 1 - .../MinimalLambda.Envelopes.CloudWatchLogs.csproj | 1 - .../MinimalLambda.Envelopes.Kafka.csproj | 1 - .../MinimalLambda.Envelopes.Kinesis.csproj | 1 - .../MinimalLambda.Envelopes.KinesisFirehose.csproj | 1 - .../MinimalLambda.Envelopes.Sns.csproj | 1 - .../MinimalLambda.Envelopes/MinimalLambda.Envelopes.csproj | 1 - 8 files changed, 8 deletions(-) diff --git a/src/Envelopes/MinimalLambda.Envelopes.Alb/MinimalLambda.Envelopes.Alb.csproj b/src/Envelopes/MinimalLambda.Envelopes.Alb/MinimalLambda.Envelopes.Alb.csproj index 5a59e00d..e9ec06c5 100644 --- a/src/Envelopes/MinimalLambda.Envelopes.Alb/MinimalLambda.Envelopes.Alb.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.Alb/MinimalLambda.Envelopes.Alb.csproj @@ -15,7 +15,6 @@ - diff --git a/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/MinimalLambda.Envelopes.ApiGateway.csproj b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/MinimalLambda.Envelopes.ApiGateway.csproj index 0d617cf2..4b19c5e1 100644 --- a/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/MinimalLambda.Envelopes.ApiGateway.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.ApiGateway/MinimalLambda.Envelopes.ApiGateway.csproj @@ -15,7 +15,6 @@ - diff --git a/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/MinimalLambda.Envelopes.CloudWatchLogs.csproj b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/MinimalLambda.Envelopes.CloudWatchLogs.csproj index 5231f268..c915e9d0 100644 --- a/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/MinimalLambda.Envelopes.CloudWatchLogs.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.CloudWatchLogs/MinimalLambda.Envelopes.CloudWatchLogs.csproj @@ -15,7 +15,6 @@ - diff --git a/src/Envelopes/MinimalLambda.Envelopes.Kafka/MinimalLambda.Envelopes.Kafka.csproj b/src/Envelopes/MinimalLambda.Envelopes.Kafka/MinimalLambda.Envelopes.Kafka.csproj index dcb70d40..615fe4b9 100644 --- a/src/Envelopes/MinimalLambda.Envelopes.Kafka/MinimalLambda.Envelopes.Kafka.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.Kafka/MinimalLambda.Envelopes.Kafka.csproj @@ -15,7 +15,6 @@ - diff --git a/src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj b/src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj index 6e1fdc7f..4863d830 100644 --- a/src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.Kinesis/MinimalLambda.Envelopes.Kinesis.csproj @@ -14,7 +14,6 @@ - diff --git a/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/MinimalLambda.Envelopes.KinesisFirehose.csproj b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/MinimalLambda.Envelopes.KinesisFirehose.csproj index ee363bc0..4cf94cb4 100644 --- a/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/MinimalLambda.Envelopes.KinesisFirehose.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.KinesisFirehose/MinimalLambda.Envelopes.KinesisFirehose.csproj @@ -14,7 +14,6 @@ - diff --git a/src/Envelopes/MinimalLambda.Envelopes.Sns/MinimalLambda.Envelopes.Sns.csproj b/src/Envelopes/MinimalLambda.Envelopes.Sns/MinimalLambda.Envelopes.Sns.csproj index 53b06aee..d5f67f2c 100644 --- a/src/Envelopes/MinimalLambda.Envelopes.Sns/MinimalLambda.Envelopes.Sns.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes.Sns/MinimalLambda.Envelopes.Sns.csproj @@ -15,7 +15,6 @@ - diff --git a/src/Envelopes/MinimalLambda.Envelopes/MinimalLambda.Envelopes.csproj b/src/Envelopes/MinimalLambda.Envelopes/MinimalLambda.Envelopes.csproj index 95a25a3c..784782e5 100644 --- a/src/Envelopes/MinimalLambda.Envelopes/MinimalLambda.Envelopes.csproj +++ b/src/Envelopes/MinimalLambda.Envelopes/MinimalLambda.Envelopes.csproj @@ -29,7 +29,6 @@ - From 39800496f2c27e47495e87309a3e09fd9ddae99e Mon Sep 17 00:00:00 2001 From: Jonas Ha Date: Fri, 3 Apr 2026 15:32:31 -0400 Subject: [PATCH 6/7] feat(workflow): add Git workflow automation skill - Added a new skill for automating Git workflows, including branching, committing, and pull requests. - Included detailed documentation for commit, branch, and PR workflows, following the Conventional Commits standard. - Added shared references for scope detection, file inclusion policy, conventional types, and safety rules. - Provided templates for pull request creation and release notes. - Examples for feature, fix, and CI scenarios to guide expected branch names, commit messages, and PR titles. - Implemented flexible and consistent naming and workflow rules, with safeguards to prevent destructive actions. --- .agents/skills/git-workflow/SKILL.md | 53 ++++++++ .agents/skills/git-workflow/docs/branch.md | 63 +++++++++ .agents/skills/git-workflow/docs/commit.md | 47 +++++++ .agents/skills/git-workflow/docs/pr.md | 123 ++++++++++++++++++ .../git-workflow/examples/ci-example.md | 17 +++ .../git-workflow/examples/feature-example.md | 52 ++++++++ .../git-workflow/examples/fix-example.md | 17 +++ .../git-workflow/shared/conventional-types.md | 36 +++++ .../shared/file-inclusion-policy.md | 56 ++++++++ .../git-workflow/shared/safety-rules.md | 13 ++ .../git-workflow/shared/scope-detection.md | 20 +++ .../templates/pull-request-template.md | 54 ++++++++ .../templates/release-notes-template.md | 17 +++ .claude/skills/git-workflow | 1 + skills-lock.json | 10 ++ 15 files changed, 579 insertions(+) create mode 100644 .agents/skills/git-workflow/SKILL.md create mode 100644 .agents/skills/git-workflow/docs/branch.md create mode 100644 .agents/skills/git-workflow/docs/commit.md create mode 100644 .agents/skills/git-workflow/docs/pr.md create mode 100644 .agents/skills/git-workflow/examples/ci-example.md create mode 100644 .agents/skills/git-workflow/examples/feature-example.md create mode 100644 .agents/skills/git-workflow/examples/fix-example.md create mode 100644 .agents/skills/git-workflow/shared/conventional-types.md create mode 100644 .agents/skills/git-workflow/shared/file-inclusion-policy.md create mode 100644 .agents/skills/git-workflow/shared/safety-rules.md create mode 100644 .agents/skills/git-workflow/shared/scope-detection.md create mode 100644 .agents/skills/git-workflow/templates/pull-request-template.md create mode 100644 .agents/skills/git-workflow/templates/release-notes-template.md create mode 120000 .claude/skills/git-workflow create mode 100644 skills-lock.json diff --git a/.agents/skills/git-workflow/SKILL.md b/.agents/skills/git-workflow/SKILL.md new file mode 100644 index 00000000..8c1db881 --- /dev/null +++ b/.agents/skills/git-workflow/SKILL.md @@ -0,0 +1,53 @@ +--- +name: git-workflow +description: >- + Git workflow automation for committing, branching, and opening pull requests. + Use this whenever the user asks to commit their work, create a branch, or + create/open/draft a PR. +--- + +# Git Workflow + +Use this skill whenever the user asks to: + +- commit these changes +- create a commit +- save my work +- stage and commit +- commit current work +- create a branch +- start a feature branch +- make a branch for this work +- start working on a change +- create a PR +- open a PR +- draft a PR +- prepare a pull request +- commit and open a PR +- create a branch and PR +- submit the current work + +______________________________________________________________________ + +## Shared references + +Before executing any workflow, load all four shared references: + +- [Scope Detection](shared/scope-detection.md) +- [File Inclusion Policy](shared/file-inclusion-policy.md) +- [Safety Rules](shared/safety-rules.md) +- [Conventional Types](shared/conventional-types.md) + +______________________________________________________________________ + +## Intent routing + +Based on the user's request, load exactly one workflow doc: + +| User intent | Load | +| ----------------------------------------------- | -------------------------------- | +| Commit work, save changes, stage and commit | [docs/commit.md](docs/commit.md) | +| Create a branch, start a feature branch | [docs/branch.md](docs/branch.md) | +| Create/open/draft a PR, submit the current work | [docs/pr.md](docs/pr.md) | + +When intent is ambiguous, prefer the more complete workflow. If the user says "commit and open a PR", load `docs/pr.md` — it covers the full lifecycle including commit and branch. diff --git a/.agents/skills/git-workflow/docs/branch.md b/.agents/skills/git-workflow/docs/branch.md new file mode 100644 index 00000000..77641a69 --- /dev/null +++ b/.agents/skills/git-workflow/docs/branch.md @@ -0,0 +1,63 @@ +# Branch Workflow + +## Shared references + +Load before executing: + +- [Scope Detection](../shared/scope-detection.md) +- [Conventional Types](../shared/conventional-types.md) +- [Safety Rules](../shared/safety-rules.md) + +______________________________________________________________________ + +## Goal + +Create a properly named branch for the current work based on inferred change intent, then switch to it. + +## Branch naming format + +``` +/- +``` + +If no scope applies: + +``` +/ +``` + +Rules: + +- lowercase only +- hyphen-separated +- concise and descriptive +- remove punctuation + +Examples: + +- `feat/core-add-pr-automation` +- `fix/github-handle-detached-head` +- `docs/update-readme` +- `ci/github-improve-release-workflow` + +## Workflow + +1. Inspect repository status and changed files +2. Infer change type (see [Conventional Types](../shared/conventional-types.md)) +3. Infer optional scope (see [Scope Detection](../shared/scope-detection.md)) +4. Generate branch name +5. Create the branch +6. Switch to the branch + +## Branch-specific safety + +If a branch with the same name already exists, append a short numeric suffix (e.g. `-2`) rather than overwriting it. + +See also [Safety Rules](../shared/safety-rules.md) for general constraints. + +## Output + +Report: + +- branch name created +- branch switched to diff --git a/.agents/skills/git-workflow/docs/commit.md b/.agents/skills/git-workflow/docs/commit.md new file mode 100644 index 00000000..07785f7c --- /dev/null +++ b/.agents/skills/git-workflow/docs/commit.md @@ -0,0 +1,47 @@ +# Commit Workflow + +## Shared references + +Load before executing: + +- [Scope Detection](../shared/scope-detection.md) +- [File Inclusion Policy](../shared/file-inclusion-policy.md) +- [Safety Rules](../shared/safety-rules.md) +- [Conventional Types](../shared/conventional-types.md) + +______________________________________________________________________ + +## Goal + +Create a commit representing the user's current working changes using a conventional commit format. + +## Commit format + +``` +[optional scope]: + +[optional body] + +[optional footer(s)] +``` + +The description must immediately follow the colon and space. Scope is wrapped in parentheses when present: `feat(parser): add CSV support`. + +For breaking changes, append `!` after the type/scope and/or include a `BREAKING CHANGE:` footer. See [Conventional Types](../shared/conventional-types.md) for details. + +## Workflow + +1. Inspect repository status +2. Identify all modified files +3. Stage all user-modified files (see [File Inclusion Policy](../shared/file-inclusion-policy.md)) +4. Exclude only obvious junk artifacts +5. Infer `` and `` (see [Conventional Types](../shared/conventional-types.md) and [Scope Detection](../shared/scope-detection.md)) +6. Generate and create the commit + +## Output + +Report: + +- commit message used +- files committed +- any files excluded and why diff --git a/.agents/skills/git-workflow/docs/pr.md b/.agents/skills/git-workflow/docs/pr.md new file mode 100644 index 00000000..a88e3416 --- /dev/null +++ b/.agents/skills/git-workflow/docs/pr.md @@ -0,0 +1,123 @@ +# PR Workflow + +## Shared references + +Load before executing: + +- [Scope Detection](../shared/scope-detection.md) +- [File Inclusion Policy](../shared/file-inclusion-policy.md) +- [Safety Rules](../shared/safety-rules.md) +- [Conventional Types](../shared/conventional-types.md) + +______________________________________________________________________ + +## Goal + +Prepare the current work for review and create a pull request that includes: + +- a correctly named branch +- a conventional commit message +- a PR title following the required format +- a reviewable PR body that explains what changed, why, validation, and risk + +Template location: `../templates/pull-request-template.md` + +______________________________________________________________________ + +## PR title format + +``` +[optional scope]: +``` + +For breaking changes, append `!` after the type/scope: `feat(api)!: remove deprecated endpoint` + +Example: `feat(core): add automated PR workflow` + +______________________________________________________________________ + +## Branch rules + +Create a new branch if: + +- the current branch is `main` +- the repository is in detached `HEAD` + +If already on a feature branch, use the current branch. + +Branch naming follows `/-` (or `/` when no scope applies). See [Branch Workflow](branch.md) for full naming rules. + +______________________________________________________________________ + +## Execution flow + +### 1 — Inspect repository + +Determine: current branch, whether HEAD is detached, git status, modified files, diff summary, and commit history against the base branch. + +### 2 — Infer metadata + +Determine: PR type, optional scope, short description, PR title, branch name. + +### 3 — Prepare branch + +If on `main` or detached `HEAD`, create a new branch and switch to it. Otherwise stay on the current branch. + +### 4 — Commit work + +Stage all user-modified files per [File Inclusion Policy](../shared/file-inclusion-policy.md). Exclude only obvious junk. Create commit. Skip if nothing to commit. + +### 5 — Push branch + +Push to origin. Set upstream if necessary. + +### 6 — Generate PR body + +Load `../templates/pull-request-template.md` and adapt it to the actual change. + +Treat the template as a default outline, not a rigid contract. Prioritize reviewer scanability and signal quality over filling every heading. + +Required information: + +- what changed +- why it changed +- how it was validated + +Default outline (adapt as needed): + +- Summary - 2-4 sentences covering what changed and why +- Changes - grouped in the way that makes the diff easiest to review (for example by concern, subsystem, workflow, or user impact) +- Validation - concrete tests, manual verification, and confidence signals +- Breaking Changes - include only when applicable +- Related Issues - include only when applicable; do not invent issue numbers +- Release Notes - include only for user-visible or package-relevant changes +- Notes for Reviewers - include when review guidance, risks, tradeoffs, follow-up context, or requested feedback focus would help; for UI changes, include screenshots/video links when useful + +Review mode: + +- open as draft when implementation is incomplete, checks are pending, or early feedback is requested +- when draft, state what is incomplete and what feedback is being requested + +Rules: + +- omit empty sections entirely (do not include `N/A`, `None`, or `No related issues`) +- prefer fewer, high-signal sections over boilerplate +- use backticks for identifiers, commands, files, and code terms +- keep the Summary concise and focused on intent, not file-by-file trivia + +### 7 — Create PR + +Create the pull request using the generated title and body, as draft or ready-for-review based on the review mode rules above. + +______________________________________________________________________ + +## Output + +Report: + +- branch name and whether it was created +- commit message and whether a commit was created +- PR title +- PR body +- any files excluded and why +- any assumptions or blockers diff --git a/.agents/skills/git-workflow/examples/ci-example.md b/.agents/skills/git-workflow/examples/ci-example.md new file mode 100644 index 00000000..cf033520 --- /dev/null +++ b/.agents/skills/git-workflow/examples/ci-example.md @@ -0,0 +1,17 @@ +# Example: CI PR + +## Scenario + +Current work updates GitHub Actions and release automation for NuGet publishing. + +## Expected branch + +`ci/github-improve-nuget-release-workflow` + +## Expected commit + +`ci(github): improve NuGet release workflow` + +## Expected PR title + +`ci(github): improve NuGet release workflow` diff --git a/.agents/skills/git-workflow/examples/feature-example.md b/.agents/skills/git-workflow/examples/feature-example.md new file mode 100644 index 00000000..1cd8a990 --- /dev/null +++ b/.agents/skills/git-workflow/examples/feature-example.md @@ -0,0 +1,52 @@ +# Example: Feature PR + +## Scenario + +Current work adds automatic PR template loading and branch creation when running from `main`. + +## Expected branch + +`feat/core-automate-pr-workflow` + +## Expected commit + +`feat(core): automate PR workflow from main` + +## Expected PR title + +`feat(core): automate PR workflow from main` + +## Example PR body + +# 🚀 Pull Request + +## 📋 Summary + +> Adds automation for branch preparation and PR generation when opening a pull request from the current repository state. This removes manual branch setup when starting from `main` and keeps PR metadata generation consistent with inferred change intent. + +______________________________________________________________________ + +## 📝 Changes + +- Branch preparation flow + - Detects `main` and detached `HEAD` before PR creation + - Creates and switches to a generated branch only when needed +- Metadata and PR drafting + - Infers PR metadata (`type`, optional `scope`, short description) + - Loads the local PR template and builds the PR body from current repository state +- Workflow consistency + - Reuses shared scope and inclusion policy logic so commit and PR behavior stay aligned + +______________________________________________________________________ + +## 🧪 Validation + +- Build/test status: Not explicitly verified by the agent +- Manual verification performed: Reviewed repository status, branch behavior, and generated PR content paths +- Edge cases checked: Existing feature branch path and detached `HEAD` path + +______________________________________________________________________ + +## 💬 Notes for Reviewers + +> Please focus on branch creation guardrails and metadata inference fallbacks, especially when repository state is ambiguous. diff --git a/.agents/skills/git-workflow/examples/fix-example.md b/.agents/skills/git-workflow/examples/fix-example.md new file mode 100644 index 00000000..1586ac13 --- /dev/null +++ b/.agents/skills/git-workflow/examples/fix-example.md @@ -0,0 +1,17 @@ +# Example: Fix PR + +## Scenario + +Current work fixes a bug in GitHub workflow handling for detached HEAD repositories. + +## Expected branch + +`fix/github-handle-detached-head` + +## Expected commit + +`fix(github): handle detached HEAD when opening PRs` + +## Expected PR title + +`fix(github): handle detached HEAD when opening PRs` diff --git a/.agents/skills/git-workflow/shared/conventional-types.md b/.agents/skills/git-workflow/shared/conventional-types.md new file mode 100644 index 00000000..e1d40033 --- /dev/null +++ b/.agents/skills/git-workflow/shared/conventional-types.md @@ -0,0 +1,36 @@ +# Conventional Types + +Valid `` values: + +| Type | Description | SemVer impact | +| ---------- | ----------------------------------------------------------------- | ------------- | +| `feat` | Introduces a new feature | MINOR | +| `fix` | Patches a bug | PATCH | +| `build` | Changes to the build system or external dependencies | — | +| `chore` | Maintenance tasks not modifying src or test files | — | +| `ci` | Changes to CI/CD configuration or scripts | — | +| `docs` | Documentation changes only | — | +| `perf` | A code change that improves performance | — | +| `refactor` | A code change that neither fixes a bug nor adds a feature | — | +| `style` | Changes that do not affect meaning (whitespace, formatting, etc.) | — | +| `test` | Adding or updating tests | — | + +## Breaking changes + +A breaking change correlates with MAJOR in SemVer. Mark it in one of two ways: + +**Append `!` after the type/scope:** + +``` +feat(api)!: remove deprecated endpoint +``` + +**Or include a `BREAKING CHANGE:` footer:** + +``` +feat(api): remove deprecated endpoint + +BREAKING CHANGE: The /v1/users endpoint has been removed. Use /v2/users instead. +``` + +Both forms may be combined. diff --git a/.agents/skills/git-workflow/shared/file-inclusion-policy.md b/.agents/skills/git-workflow/shared/file-inclusion-policy.md new file mode 100644 index 00000000..dd60bfe6 --- /dev/null +++ b/.agents/skills/git-workflow/shared/file-inclusion-policy.md @@ -0,0 +1,56 @@ +# File Inclusion Policy + +Treat the working tree as the user's intent. + +## Default behavior + +Include **all user-modified files** in the commit: + +- modified files +- staged files +- unstaged files +- untracked files +- deleted files + +If the user changed a file, assume the change is intentional. + +Do **not** exclude files merely because they appear unrelated to the inferred task. + +## Allowed automatic exclusions + +Files may only be excluded if they are clearly not intended for source control: + +- `.DS_Store` +- editor swap files +- temporary files +- build output folders +- cache folders +- machine-local configuration files +- secret files that should never be committed + +Example patterns: + +``` +.DS_Store +*.swp +*.tmp +bin/ +obj/ +node_modules/ +.vscode/* +``` + +## Ambiguity rule + +If there is **any uncertainty** about whether a file should be committed: + +**Include the file.** + +Never silently omit a user-modified file. + +## Transparency rule + +If any files are excluded automatically, explicitly report: + +- which files were excluded +- the reason they were excluded diff --git a/.agents/skills/git-workflow/shared/safety-rules.md b/.agents/skills/git-workflow/shared/safety-rules.md new file mode 100644 index 00000000..7ba692f5 --- /dev/null +++ b/.agents/skills/git-workflow/shared/safety-rules.md @@ -0,0 +1,13 @@ +# Safety Rules + +Never: + +- rewrite history +- force push +- silently omit user-modified files +- invent issue numbers +- fabricate test results +- mark checklist items complete without evidence +- overwrite existing branches without confirmation + +If the repository state is ambiguous, choose the safest non-destructive option. diff --git a/.agents/skills/git-workflow/shared/scope-detection.md b/.agents/skills/git-workflow/shared/scope-detection.md new file mode 100644 index 00000000..95df6d0a --- /dev/null +++ b/.agents/skills/git-workflow/shared/scope-detection.md @@ -0,0 +1,20 @@ +# Scope Detection + +Infer scope from the folder containing the majority of the changes. + +| Folder | Scope | +| ----------------------------- | ------------------- | +| `.github/workflows` | `github` | +| `src/Core` | `core` | +| `src/Abstractions` | `abstractions` | +| `src/SourceGenerators` | `source-generators` | +| `src/OpenTelemetry` | `opentelemetry` | +| `tests` | `tests` | +| `test` | `testing` | +| `docs` | `docs` | +| `build` | `build` | +| dependency or package updates | `deps` | + +If multiple folders are involved, prioritize the **primary concern of the change**. + +If no mapping clearly applies, omit the scope. diff --git a/.agents/skills/git-workflow/templates/pull-request-template.md b/.agents/skills/git-workflow/templates/pull-request-template.md new file mode 100644 index 00000000..dbbb7cf2 --- /dev/null +++ b/.agents/skills/git-workflow/templates/pull-request-template.md @@ -0,0 +1,54 @@ +# 🚀 Pull Request + +## 📋 Summary + +> 2-4 sentences: what changed, why it changed, and the expected outcome. + +______________________________________________________________________ + +## 📝 Changes + + + + + +______________________________________________________________________ + +## 🧪 Validation + + + +- Build/test status: +- Manual verification performed: +- Edge cases checked: + +______________________________________________________________________ + +## ⚠️ Breaking Changes (Optional) + + + +- What changed: +- Previous behavior: +- New behavior: +- Migration/action needed: + +______________________________________________________________________ + +## 🧩 Related Issues (Optional) + + + + + +______________________________________________________________________ + +## 📦 Release Notes (Optional) + + + +______________________________________________________________________ + +## 💬 Notes for Reviewers (Optional) + + diff --git a/.agents/skills/git-workflow/templates/release-notes-template.md b/.agents/skills/git-workflow/templates/release-notes-template.md new file mode 100644 index 00000000..c37c9c25 --- /dev/null +++ b/.agents/skills/git-workflow/templates/release-notes-template.md @@ -0,0 +1,17 @@ +## Release Notes + +### Added + +- + +### Changed + +- + +### Fixed + +- + +### Internal + +- diff --git a/.claude/skills/git-workflow b/.claude/skills/git-workflow new file mode 120000 index 00000000..0ef95d2f --- /dev/null +++ b/.claude/skills/git-workflow @@ -0,0 +1 @@ +../../.agents/skills/git-workflow \ No newline at end of file diff --git a/skills-lock.json b/skills-lock.json new file mode 100644 index 00000000..9d98ce1c --- /dev/null +++ b/skills-lock.json @@ -0,0 +1,10 @@ +{ + "version": 1, + "skills": { + "git-workflow": { + "source": "LayeredCraft/skills", + "sourceType": "github", + "computedHash": "fbd78cda46da7d8753beca0d68ce6532589daa4da0a457aa709fe1e11da468fe" + } + } +} From 613e30a0ffef6adc82a577d4cc5992cb534e0c1e Mon Sep 17 00:00:00 2001 From: Jonas Ha Date: Fri, 3 Apr 2026 15:35:19 -0400 Subject: [PATCH 7/7] docs(claude): update scope validation rules in CLAUDE.md - Added a list of valid scopes for commit messages. - Updated formatting rules to reflect scope requirements. - Clarified examples for strict validation enforcement by CI. --- CLAUDE.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 0ad5a757..db2833ef 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -213,10 +213,23 @@ When Claude makes commits, ALWAYS follow conventional commits format: **Types:** `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `ci` -**Scope (optional but recommended):** See `./.claude/commands/pr.md` for the complete list of valid -scopes. - -- Omit scope for general changes +**Scope (optional):** If used, it must be one of these exact values: + +- `host` +- `envelopes` +- `abstractions` +- `opentelemetry` +- `source-generators` +- `deps` +- `build` +- `ci` +- `github` +- `core` +- `docs` +- `testing` +- `tests` + +- Omit scope for general or mixed changes when no single valid scope fits **Examples:** @@ -239,7 +252,8 @@ When creating PRs, the title MUST follow conventional commits format (same rules messages): - Strict validation is enforced by CI -- Format: `(scope): ` +- Format: `(scope): ` or `: ` +- If a scope is present, it must be one of the valid scopes listed above - Dependabot PRs are exempt from this requirement **Examples:**