diff --git a/.claude/commands/make-branch.md b/.claude/commands/make-branch.md index 84ea147..89fe6d6 100644 --- a/.claude/commands/make-branch.md +++ b/.claude/commands/make-branch.md @@ -18,10 +18,12 @@ i{issue-index}-{type}/{action-description_with_underscores} ## Supported Types - `feat` - New features -- `fix` - Bug fixes -- `docs` - Documentation changes +- `fix` - Bug fixes +- `doc` - Documentation changes - `config` - Configuration updates - `refactor` - Code refactoring +- `test` - Test additions or improvements +- `perf` - Performance improvements ## Examples @@ -37,9 +39,9 @@ i{issue-index}-{type}/{action-description_with_underscores} #23` - Output: `i23-fix/resolve-styling-issues-in-dialog` -- Input: `/make-branch [docs]: add component usage examples +- Input: `/make-branch [doc]: add component usage examples #42` -- Output: `i42-docs/add-component-usage-examples` +- Output: `i42-doc/add-component-usage-examples` ## Implementation diff --git a/.claude/commands/make-pr.md b/.claude/commands/make-pr.md index aec6c04..a642734 100644 --- a/.claude/commands/make-pr.md +++ b/.claude/commands/make-pr.md @@ -29,11 +29,13 @@ Automatically generate draft pull requests with intelligent content analysis. Generate titles based on branch analysis using these prefixes: -- **feat**: New features, updates, output-changing code, agent rules/commands, utils -- **config**: prettier, eslint, ci/cd, dependency installs/bumps, docker, vscode settings -- **refactor**: lint fixes, prettier fixes, output-unchanged code improvements -- **fix**: bug fixes, correcting mistakes -- **test**: separate test PRs, storybook, .test file additions +- **feat**: New features, updates, output-changing code +- **fix**: Bug fixes, correcting mistakes +- **doc**: Documentation changes +- **config**: prettier, eslint, ci/cd, dependency installs/bumps, docker, vscode settings +- **refactor**: Lint fixes, prettier fixes, output-unchanged code improvements +- **test**: Test additions or improvements, storybook, .test file additions +- **perf**: Performance improvements Note: Use `config` instead of `chore` (chore implies unimportance) diff --git a/.github/ISSUE_TEMPLATE/agent.md b/.github/ISSUE_TEMPLATE/agent.md index 72fd829..7f22eac 100644 --- a/.github/ISSUE_TEMPLATE/agent.md +++ b/.github/ISSUE_TEMPLATE/agent.md @@ -1,9 +1,9 @@ --- name: agent about: Add or update agent rules, commands, or automation -title: "[agent]: " -labels: feat-agent -assignees: p-iknow +title: "agent: " +labels: agent +assignees: "" --- diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index 580bbf8..cd95044 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -1,9 +1,9 @@ --- name: bug about: Create a bug report to help us improve -title: "[bug]: [Descrption]" +title: "bug: " labels: bug -assignees: p-iknow +assignees: "" --- diff --git a/.github/ISSUE_TEMPLATE/component.md b/.github/ISSUE_TEMPLATE/component.md deleted file mode 100644 index 51c2837..0000000 --- a/.github/ISSUE_TEMPLATE/component.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: component -about: Implement a new basecn-ui component -title: "[component]:" -labels: feat-component -assignees: p-iknow - ---- - -## Compnents - -**basecn-ui Component Name:** - -**shadcn/ui Reference:** - -** base-ui Component(s) Reference:** - -## Context (optional) - -**Context** -*If the MUI Base UI interface differs from Radix UI or requires intentional API changes* - -## Should be Tested -- [ ] xx - -## Reference (optional) diff --git a/.github/ISSUE_TEMPLATE/config.md b/.github/ISSUE_TEMPLATE/config.md index b84b5a3..95aeb09 100644 --- a/.github/ISSUE_TEMPLATE/config.md +++ b/.github/ISSUE_TEMPLATE/config.md @@ -1,9 +1,9 @@ --- name: config about: Add or update project configuration, dependencies, or tooling -title: "[confg]:" -labels: feat-config -assignees: p-iknow +title: "config: " +labels: config +assignees: "" --- diff --git a/.github/ISSUE_TEMPLATE/doc.md b/.github/ISSUE_TEMPLATE/doc.md index e509bc0..74d49d4 100644 --- a/.github/ISSUE_TEMPLATE/doc.md +++ b/.github/ISSUE_TEMPLATE/doc.md @@ -1,9 +1,9 @@ --- name: doc about: Add or update project documentation -title: "[doc]:" +title: "doc: " labels: doc -assignees: p-iknow +assignees: "" --- diff --git a/.github/ISSUE_TEMPLATE/feat.md b/.github/ISSUE_TEMPLATE/feat.md new file mode 100644 index 0000000..a3230ee --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feat.md @@ -0,0 +1,28 @@ +--- +name: feat +about: Add a new feature or enhancement +title: "feat: " +labels: feat +assignees: "" + +--- + +## Requirement + +**What feature needs to be implemented:** + +## Implementation Plan (optional) + +**Feature scope:** + +**Key components:** + +**Files to be modified:** + +## Should be tested + +- [ ] Feature tested locally +- [ ] Edge cases covered +- [ ] Documentation updated (if applicable) + +## Reference (optional) diff --git a/.github/ISSUE_TEMPLATE/fix.md b/.github/ISSUE_TEMPLATE/fix.md new file mode 100644 index 0000000..73ff0cd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/fix.md @@ -0,0 +1,38 @@ +--- +name: fix +about: Fix a bug or issue +title: "fix: " +labels: fix +assignees: "" + +--- + +## Summary + +A clear and concise description of what needs to be fixed. + +## Steps to Reproduce (if applicable) + +1. +2. +3. + +## Expected Behavior + +## Current Behavior + +## Root Cause (optional) + +## Implementation Plan (optional) + +**Files to be modified:** + +**Approach:** + +## Should be tested + +- [ ] Fix verified locally +- [ ] Regression testing completed +- [ ] Edge cases covered + +## Reference (optional) diff --git a/.github/ISSUE_TEMPLATE/perf.md b/.github/ISSUE_TEMPLATE/perf.md new file mode 100644 index 0000000..c4df061 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/perf.md @@ -0,0 +1,35 @@ +--- +name: perf +about: Improve performance +title: "perf: " +labels: perf +assignees: "" + +--- + +## Requirement + +**What needs performance improvement:** + +**Current performance issue:** + +**Target performance goal:** + +## Implementation Plan (optional) + +**Approach:** + +**Optimization strategy:** + +**Files to be modified:** + +**Breaking changes (if any):** + +## Should be tested + +- [ ] Performance benchmarks run +- [ ] Improvement verified and measured +- [ ] No regression in other areas +- [ ] Documentation updated with performance notes + +## Reference (optional) diff --git a/.github/ISSUE_TEMPLATE/refactor.md b/.github/ISSUE_TEMPLATE/refactor.md new file mode 100644 index 0000000..4da0f06 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/refactor.md @@ -0,0 +1,33 @@ +--- +name: refactor +about: Refactor existing code for better maintainability or performance +title: "refactor: " +labels: refactor +assignees: "" + +--- + +## Requirement + +**What needs to be refactored:** + +**Why this refactoring is needed:** + +## Implementation Plan (optional) + +**Scope:** + +**Approach:** + +**Files to be modified:** + +**Breaking changes (if any):** + +## Should be tested + +- [ ] Refactored code tested locally +- [ ] No functional changes verified +- [ ] All existing tests still passing +- [ ] Code quality metrics improved (if applicable) + +## Reference (optional) diff --git a/.github/ISSUE_TEMPLATE/test.md b/.github/ISSUE_TEMPLATE/test.md new file mode 100644 index 0000000..f464581 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/test.md @@ -0,0 +1,33 @@ +--- +name: test +about: Add or improve tests +title: "test: " +labels: test +assignees: "" + +--- + +## Requirement + +**What tests need to be added/improved:** + +## Implementation Plan (optional) + +**Test type:** +- [ ] Unit tests +- [ ] Integration tests +- [ ] E2E tests +- [ ] Performance tests + +**Test scope:** + +**Files to be modified:** + +## Should be tested + +- [ ] Tests written and passing +- [ ] Coverage improved (if applicable) +- [ ] Edge cases covered +- [ ] Test documentation added + +## Reference (optional) diff --git a/.github/ISSUE_TEMPLATE/util.md b/.github/ISSUE_TEMPLATE/util.md deleted file mode 100644 index b0f991e..0000000 --- a/.github/ISSUE_TEMPLATE/util.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: util -about: Add or update utility functions, helpers, or shared module -title: "[util]:" -labels: feat-util -assignees: p-iknow - ---- - -## Requirement - -## Implementation Plan (optional) - -## Should be tested - -- [ ] Unit tests written and passing -- [ ] Edge cases covered - -## Reference (optional) diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml new file mode 100644 index 0000000..beb2dea --- /dev/null +++ b/.github/workflows/auto-assign.yml @@ -0,0 +1,40 @@ +# Automatically assigns issues and pull requests to their creator +# This helps with ownership tracking and accountability +name: Auto Assign + +on: + pull_request: + types: [opened, ready_for_review] + issues: + types: [opened] + +permissions: + contents: read + issues: write + pull-requests: write + +jobs: + auto-assign: + runs-on: ubuntu-latest + steps: + - name: Auto assign to creator + # https://github.com/actions/github-script + uses: actions/github-script@v8 + with: + script: | + const creator = context.payload.sender.login; + const number = context.payload.pull_request?.number || context.payload.issue?.number; + const itemType = context.payload.pull_request ? 'pull request' : 'issue'; + + try { + await github.rest.issues.addAssignees({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: number, + assignees: [creator] + }); + + console.log(`Assigned ${itemType} #${number} to @${creator}`); + } catch (error) { + console.log(`Failed to assign ${itemType}: ${error.message}`); + } diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml new file mode 100644 index 0000000..85033ec --- /dev/null +++ b/.github/workflows/auto-label.yml @@ -0,0 +1,47 @@ +# Automatically labels issues and pull requests based on their title prefix +# Supported prefixes: feat:, fix:, doc:, config:, refactor:, agent:, test:, bug:, perf: +# Example: "feat: add new feature" will be labeled with "feat" +name: Auto Label + +on: + pull_request: + types: [opened, edited, synchronize] + issues: + types: [opened, edited] + +permissions: + contents: read + issues: write + pull-requests: write + +jobs: + auto-label: + runs-on: ubuntu-latest + steps: + - name: Auto label based on title + # https://github.com/actions/github-script + uses: actions/github-script@v8 + with: + script: | + const title = context.payload.pull_request?.title || context.payload.issue?.title || ''; + const number = context.payload.pull_request?.number || context.payload.issue?.number; + const issuePath = context.payload.pull_request ? 'pulls' : 'issues'; + + // Extract type from title (e.g., "feat:", "fix:", "doc:") + const typeMatch = title.match(/^(feat|fix|doc|config|refactor|agent|test|bug|perf):/i); + + if (typeMatch) { + const label = typeMatch[1].toLowerCase(); + + // Add the label + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: number, + labels: [label] + }); + + console.log(`Added label: ${label}`); + } else { + console.log('No matching type prefix found in title'); + }