Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 64 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,31 @@ on:
push:
branches:
- main
pull_request:
types: [closed]
branches:
- main

permissions:
contents: write
issues: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Generate bot app token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.MY_RELEASER_ID }}
private-key: ${{ secrets.MY_RELEASER_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
fetch-depth: 0
persist-credentials: false

Expand All @@ -26,12 +39,24 @@ jobs:

- name: Install dependencies
run: |
npm ci
sudo apt-get update
sudo apt-get install -y jq python3

- name: Setup Bats and bats libs
id: setup-bats
uses: bats-core/bats-action@3.0.1

- name: Run tests
shell: bash
env:
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
TERM: xterm
run: bats tests/

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
Expand All @@ -44,43 +69,51 @@ jobs:
# Configure git to use GITHUB_TOKEN for push
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"

# Save current state
CURRENT_HEAD=$(git rev-parse HEAD)
git diff --quiet || CURRENT_DIFF="changed"
# Check if this is a PR merge event (only run if merged, not just closed)
if [[ "${{ github.event_name }}" == "pull_request" ]] && [[ "${{ github.event.pull_request.merged }}" == "true" ]]; then
echo "PR merged, running final release..."

# Run semantic-release to update version files
npx semantic-release
# Run semantic-release to create GitHub Release and tags
npx semantic-release

# Check if files were modified (semantic-release updated version files)
if ! git diff --quiet; then
echo "Release changes detected, creating PR..."
echo "Release completed!"
else
echo "Push to main, preparing release PR..."

# Get the new version from marketplace.json (all plugins have the same version)
VERSION=$(node -p "require('./.claude-plugin/marketplace.json').plugins[0].version")
# Run semantic-release to update version files only
npx semantic-release

# Commit the changes
git add .
git commit -m "chore(release): ${VERSION}
# Check if files were modified (semantic-release updated version files)
if ! git diff --quiet; then
echo "Release changes detected, creating PR..."

This automated release updates version numbers across all plugins.
"
# Get the new version from marketplace.json (all plugins have the same version)
VERSION=$(node -p "require('./.claude-plugin/marketplace.json').plugins[0].version")

# Create release branch and push (version-specific branch to avoid force-push issues)
RELEASE_BRANCH="release-v${VERSION}"
git checkout -b "${RELEASE_BRANCH}"
git push origin "${RELEASE_BRANCH}"
# Commit the changes
git add .
git commit -m "chore(release): ${VERSION}

# Create PR
if gh pr view "${RELEASE_BRANCH}" --state open >/dev/null 2>&1; then
echo "PR already exists for ${VERSION}"
else
gh pr create --base main --head "${RELEASE_BRANCH}" --title "chore(release): ${VERSION}" --body "Automated release PR created by semantic-release
This automated release updates version numbers across all plugins.
"

# Create release branch and push (version-specific branch to avoid force-push issues)
RELEASE_BRANCH="release-v${VERSION}"
git checkout -b "${RELEASE_BRANCH}"
git push origin "${RELEASE_BRANCH}"

Changes:
- Version bump to ${VERSION}
- All plugin versions updated
"
# Create PR
if gh pr view "${RELEASE_BRANCH}" --state open >/dev/null 2>&1; then
echo "PR already exists for ${VERSION}"
else
gh pr create --base main --head "${RELEASE_BRANCH}" --title "chore(release): ${VERSION}" --body "Automated release PR created by semantic-release

Changes:
- Version bump to ${VERSION}
- All plugin versions updated
"
fi
else
echo "No release needed"
fi
else
echo "No release needed"
fi
1 change: 1 addition & 0 deletions plugins/me/commands/brainstorm.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores requirements and design before implementation."
argument-hint: [<task>]
disable-model-invocation: true
---

Expand Down
1 change: 1 addition & 0 deletions plugins/me/commands/debug.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Use and follow the systematic-debugging skill exactly as written
argument-hint: [<issue>]
---

Use the systematic-debugging skill to debug this issue properly, following the four-phase process to find the root cause before attempting any fixes.
1 change: 1 addition & 0 deletions plugins/me/commands/orchestrate.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: orchestrate
description: Execute sequential agent workflows for complex development tasks
argument-hint: <feature|bugfix|refactor|security|custom> <task>
---

# Orchestrate - Sequential Agent Workflows
Expand Down
33 changes: 33 additions & 0 deletions plugins/me/commands/refactor-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
description: "Safely identify and remove dead code with test verification. Detects unused code, dependencies, and files regardless of programming language or framework."
argument-hint: [<path>]
disable-model-invocation: true
---

Safely identify and remove dead code with test verification:

1. Detect dead code using appropriate tools for the codebase:
- Detect unused exports, functions, classes, and modules
- Find unused dependencies and imports
- Identify unreferenced files and assets
- Look for dead code patterns specific to the project's language

2. Generate comprehensive report in .reports/dead-code-analysis.md

3. Categorize findings by severity:
- SAFE: Test files, unused utilities, commented code
- CAUTION: API routes, components, modules that might be used dynamically
- DANGER: Config files, main entry points, framework-specific files

4. Propose safe deletions only

5. Before each deletion:
- Run full test suite
- Verify tests pass
- Apply change
- Re-run tests
- Rollback if tests fail

6. Show summary of cleaned items

Never delete code without running tests first!
1 change: 1 addition & 0 deletions plugins/me/commands/research.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Web research with citations and evidence-based analysis
argument-hint: [<query>]
---

Use and follow the research skill exactly as written.
1 change: 1 addition & 0 deletions plugins/me/commands/sdd.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Execute commands using subagent-driven development approach
argument-hint: [<command>]
---

Load the subagent-driven-development skill first, then use the skill to execute any task or command.
1 change: 1 addition & 0 deletions plugins/me/commands/verify.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: verify
description: Run comprehensive verification on current codebase state
argument-hint: [quick|full|pre-commit|pre-pr]
---

# Verify - Comprehensive Codebase Verification
Expand Down
Loading