From 73888d457ae307e3c7c4ccd17f8126cd3ad00459 Mon Sep 17 00:00:00 2001 From: Kenneth Belitzky Date: Mon, 7 Jul 2025 18:29:02 +0000 Subject: [PATCH 1/4] Add GitHub labeler configuration for feature, bug, and docs labels --- .github/labeler.yml | 11 +++ .github/workflows/labeler.yaml | 12 +++ .../contribs/github/workflows/labeler.yaml | 96 ++++++++++--------- 3 files changed, 75 insertions(+), 44 deletions(-) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yaml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..8949052 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,11 @@ +# Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name +feature: +- head-branch: ['^feature', 'feature'] + +# Add 'bug' label to any PR where the head branch name starts with `bug` or has a `bug` section in the name +bug: +- head-branch: ['^bug', 'bug'] + +# Add 'docs' label to any PR where the head branch name starts with `docs` or has a `docs` section in the name +docs: +- head-branch: ['^docs', 'docs'] diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml new file mode 100644 index 0000000..373948c --- /dev/null +++ b/.github/workflows/labeler.yaml @@ -0,0 +1,12 @@ +name: "labeler" +on: + - pull_request_target + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5.0.0 diff --git a/struct_module/contribs/github/workflows/labeler.yaml b/struct_module/contribs/github/workflows/labeler.yaml index 95f3b24..811f74e 100644 --- a/struct_module/contribs/github/workflows/labeler.yaml +++ b/struct_module/contribs/github/workflows/labeler.yaml @@ -1,58 +1,66 @@ files: - .github/labeler.yml: - content: | - # Add 'root' label to any root file changes - # Quotation marks are required for the leading asterisk - root: - - changed-files: - - any-glob-to-any-file: '*' - - # Add 'AnyChange' label to any changes within the entire repository - AnyChange: - - changed-files: - - any-glob-to-any-file: '**' + content: | + # Add 'root' label to any root file changes + # Quotation marks are required for the leading asterisk + root: + - changed-files: + - any-glob-to-any-file: '*' - # Add 'Documentation' label to any changes within 'docs' folder or any subfolders - Documentation: - - changed-files: - - any-glob-to-any-file: docs/** + # Add 'AnyChange' label to any changes within the entire repository + AnyChange: + - changed-files: + - any-glob-to-any-file: '**' - # Add 'Documentation' label to any file changes within 'docs' folder - Documentation: - - changed-files: - - any-glob-to-any-file: docs/* + # Add 'Documentation' label to any changes within 'docs' folder or any subfolders + Documentation: + - changed-files: + - any-glob-to-any-file: docs/** - # Add 'Documentation' label to any file changes within 'docs' or 'guides' folders - Documentation: - - changed-files: - - any-glob-to-any-file: - - docs/* - - guides/* + # Add 'Documentation' label to any file changes within 'docs' folder + Documentation: + - changed-files: + - any-glob-to-any-file: docs/* - ## Equivalent of the above mentioned configuration using another syntax - Documentation: - - changed-files: - - any-glob-to-any-file: ['docs/*', 'guides/*'] + # Add 'Documentation' label to any file changes within 'docs' or 'guides' folders + Documentation: + - changed-files: + - any-glob-to-any-file: + - docs/* + - guides/* - # Add 'Documentation' label to any change to .md files within the entire repository - Documentation: - - changed-files: - - any-glob-to-any-file: '**/*.md' + ## Equivalent of the above mentioned configuration using another syntax + Documentation: + - changed-files: + - any-glob-to-any-file: ['docs/*', 'guides/*'] - # Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder - source: - - all: + # Add 'Documentation' label to any change to .md files within the entire repository + Documentation: - changed-files: - - any-glob-to-any-file: 'src/**/*' - - all-globs-to-all-files: '!src/docs/*' + - any-glob-to-any-file: '**/*.md' + + # Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder + source: + - all: + - changed-files: + - any-glob-to-any-file: 'src/**/*' + - all-globs-to-all-files: '!src/docs/*' + + # Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name + feature: + - head-branch: ['^feature', 'feature'] + + # Add 'release' label to any PR that is opened against the `{{@ current_repo() | default_branch @}}` branch + release: + - base-branch: '{{@ current_repo() | default_branch @}}' - # Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name - feature: - - head-branch: ['^feature', 'feature'] + # Add 'bug' label to any PR where the head branch name starts with `bug` or has a `bug` section in the name + bug: + - head-branch: ['^bug', 'bug'] - # Add 'release' label to any PR that is opened against the `{{@ current_repo() | default_branch @}}` branch - release: - - base-branch: '{{@ current_repo() | default_branch @}}' + # Add 'docs' label to any PR where the head branch name starts with `docs` or has a `docs` section in the name + docs: + - head-branch: ['^docs', 'docs'] - .github/workflows/labeler.yaml: content: | name: "labeler" From 8bb2262a26d6e775bb191fbe7e6d1d15a974149f Mon Sep 17 00:00:00 2001 From: Kenneth Belitzky Date: Mon, 7 Jul 2025 18:29:25 +0000 Subject: [PATCH 2/4] Add custom structures and mappings configuration --- .../contribs/project/custom-structures.yaml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 struct_module/contribs/project/custom-structures.yaml diff --git a/struct_module/contribs/project/custom-structures.yaml b/struct_module/contribs/project/custom-structures.yaml new file mode 100644 index 0000000..f93f32a --- /dev/null +++ b/struct_module/contribs/project/custom-structures.yaml @@ -0,0 +1,24 @@ +files: + - README.md: + content: | + # Custom Struct Structures + - custom-mappings.yaml: + content: | + # Custom Struct Mappings + # This file defines custom mappings for the Struct. + mappings: + aws_account_ids: + nonprod: "123456789012" + prod: "987654321098" + + - structures/.gitkeep: + content: "" +folders: + - ./: + struct: + - configs/devcontainer + - configs/editor-config + - configs/prettier + - github/workflows/run-struct + - github/workflows/release-drafter + - github/workflows/pre-commit From b20a60bd1aad0bb610713e77a71a4f87259efe21 Mon Sep 17 00:00:00 2001 From: Kenneth Belitzky Date: Mon, 7 Jul 2025 18:29:33 +0000 Subject: [PATCH 3/4] Add labeler workflow to project structure --- .struct.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.struct.yaml b/.struct.yaml index 9501e41..3b064c2 100644 --- a/.struct.yaml +++ b/.struct.yaml @@ -4,5 +4,6 @@ folders: - github/prompts/struct - github/workflows/pre-commit - github/workflows/release-drafter + - github/workflows/labeler - configs/prettier - configs/editor-config From d261e48114e36a34e1c83e70dcc85d86d9b15e3b Mon Sep 17 00:00:00 2001 From: Kenneth Belitzky Date: Thu, 17 Jul 2025 18:20:15 +0000 Subject: [PATCH 4/4] Add planning mode instructions for generating implementation plans --- .../contribs/github/chatmodes/plan.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 struct_module/contribs/github/chatmodes/plan.yaml diff --git a/struct_module/contribs/github/chatmodes/plan.yaml b/struct_module/contribs/github/chatmodes/plan.yaml new file mode 100644 index 0000000..deb46c3 --- /dev/null +++ b/struct_module/contribs/github/chatmodes/plan.yaml @@ -0,0 +1,18 @@ +files: + - ./github/chatmodes/plan.chatmode.md: + content: | + --- + description: Generate an implementation plan for new features or refactoring existing code. + tools: ['codebase', 'fetch', 'findTestFiles', 'githubRepo', 'search', 'usages'] + model: Claude Sonnet 4 + --- + # Planning mode instructions + You are in planning mode. Your task is to generate an implementation plan for a new feature or for refactoring existing code. + Don't make any code edits, just generate a plan. + + The plan consists of a Markdown document that describes the implementation plan, including the following sections: + + * Overview: A brief description of the feature or refactoring task. + * Requirements: A list of requirements for the feature or refactoring task. + * Implementation Steps: A detailed list of steps to implement the feature or refactoring task. + * Testing: A list of tests that need to be implemented to verify the feature or refactoring task.