Skip to content

Commit db511ee

Browse files
authored
✨ feat: Add Claude Code plugin manifest and CI pipeline (#6)
* feat: add Claude Code plugin manifest Add .claude-plugin/ directory with plugin.json and marketplace.json for distribution as a Claude Code plugin. Not yet submitted to the marketplace — note added to README inviting community interest. Closes #5 * docs: use first person in plugin note * chore: set plugin version to 0.1.0 * ci: add release workflow for tagged builds Builds linux/darwin binaries (amd64 + arm64) and creates a GitHub release on tag push. Ready for v0.1.0. * ci: add release pipeline matching tapes structure - ci.yaml: build + cross-platform smoke tests on push/PR - cut-release.yaml: manual workflow_dispatch to cut a release (v0.1.0) - release.yaml: build and upload binaries on release publish - pr.yaml: conventional commit title check on PRs - Remove old release.yml * docs: add AGENTS.md with release and PR conventions Add AGENTS.md matching tapes structure with project overview, release pipeline docs, and PR title conventions (emoji + type: description). Update pr.yaml to accept optional emoji prefix in PR titles.
1 parent 488de15 commit db511ee

File tree

8 files changed

+305
-0
lines changed

8 files changed

+305
-0
lines changed

.claude-plugin/marketplace.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "papercomputeco-tools",
3+
"owner": { "name": "papercomputeco" },
4+
"plugins": [
5+
{
6+
"name": "sweeper",
7+
"source": ".",
8+
"description": "Agent-powered code maintenance with parallel sub-agents and tapes-driven learning",
9+
"version": "0.1.0"
10+
}
11+
]
12+
}

.claude-plugin/plugin.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "sweeper",
3+
"version": "0.1.0",
4+
"description": "Agent-powered code maintenance with parallel sub-agents, VM isolation, and tapes-driven learning",
5+
"author": { "name": "papercomputeco" },
6+
"repository": "https://github.com/papercomputeco/sweeper",
7+
"license": "Apache-2.0",
8+
"keywords": ["lint", "maintenance", "agents", "code-quality"],
9+
"skills": "./skills/"
10+
}

.github/workflows/ci.yaml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
build:
17+
name: Build
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Go
25+
uses: actions/setup-go@v5
26+
with:
27+
go-version-file: go.mod
28+
29+
- name: Run tests
30+
run: go test ./...
31+
32+
- name: Build binaries
33+
run: |
34+
mkdir -p build/darwin/arm64 build/darwin/amd64 build/linux/amd64 build/linux/arm64
35+
GOOS=darwin GOARCH=arm64 go build -o build/darwin/arm64/sweeper .
36+
GOOS=darwin GOARCH=amd64 go build -o build/darwin/amd64/sweeper .
37+
GOOS=linux GOARCH=amd64 go build -o build/linux/amd64/sweeper .
38+
GOOS=linux GOARCH=arm64 go build -o build/linux/arm64/sweeper .
39+
40+
- name: Upload darwin arm64 binaries
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: darwin-arm64-binaries
44+
path: build/darwin/arm64/
45+
retention-days: 1
46+
47+
- name: Upload darwin amd64 binaries
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: darwin-amd64-binaries
51+
path: build/darwin/amd64/
52+
retention-days: 1
53+
54+
- name: Upload linux amd64 binaries
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: linux-amd64-binaries
58+
path: build/linux/amd64/
59+
retention-days: 1
60+
61+
- name: Upload linux arm64 binaries
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: linux-arm64-binaries
65+
path: build/linux/arm64/
66+
retention-days: 1
67+
68+
smoke:
69+
name: Smoke Test (${{ matrix.os }})
70+
needs: build
71+
runs-on: ${{ matrix.runner }}
72+
73+
strategy:
74+
fail-fast: false
75+
matrix:
76+
include:
77+
- os: macOS 15 (arm64)
78+
runner: macos-15
79+
artifact: darwin-arm64-binaries
80+
- os: macOS 15 (amd64)
81+
runner: macos-15-intel
82+
artifact: darwin-amd64-binaries
83+
- os: Linux (amd64)
84+
runner: ubuntu-latest
85+
artifact: linux-amd64-binaries
86+
- os: Linux (arm64)
87+
runner: ubuntu-22.04-arm
88+
artifact: linux-arm64-binaries
89+
90+
steps:
91+
- name: Download binaries
92+
uses: actions/download-artifact@v4
93+
with:
94+
name: ${{ matrix.artifact }}
95+
path: ./bin
96+
97+
- name: Run canary
98+
run: |
99+
chmod +x ./bin/sweeper
100+
./bin/sweeper version

.github/workflows/cut-release.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Cut Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
create-release:
11+
name: Cut New GitHub Release
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Create GitHub App token
21+
uses: actions/create-github-app-token@v2
22+
id: app-token
23+
with:
24+
app-id: ${{ secrets.PAPER_COMPUTE_CO_BOT_APP_ID }}
25+
private-key: ${{ secrets.PAPER_COMPUTE_CO_BOT_PRIVATE_KEY }}
26+
27+
- name: Determine next version
28+
id: version
29+
run: |
30+
latest=$(gh release list --limit 1 --json tagName -q '.[0].tagName' 2>/dev/null || echo "")
31+
if [ -z "$latest" ]; then
32+
echo "tag=v0.1.0" >> "$GITHUB_OUTPUT"
33+
else
34+
echo "tag=$latest" >> "$GITHUB_OUTPUT"
35+
fi
36+
env:
37+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
38+
39+
- name: Create release
40+
run: |
41+
gh release create "${{ steps.version.outputs.tag }}" \
42+
--generate-notes \
43+
--title "${{ steps.version.outputs.tag }}"
44+
env:
45+
GH_TOKEN: ${{ steps.app-token.outputs.token }}

.github/workflows/pr.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Check PR
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: read
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
check-pr-title:
17+
name: Check PR Title
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Check conventional commit title
25+
run: |
26+
title="${{ github.event.pull_request.title }}"
27+
if ! echo "$title" | grep -qP '^(\p{So} )?(feat|fix|docs|chore|ci|refactor|test|perf|build|style|revert)(\(.+\))?!?: .+'; then
28+
echo "::error::PR title must follow: [emoji] type: description"
29+
echo "Valid types: feat, fix, docs, chore, ci, refactor, test, perf, build, style, revert"
30+
echo "Examples: '✨ feat: Add new feature' or 'fix: Correct bug'"
31+
exit 1
32+
fi

.github/workflows/release.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version-file: go.mod
22+
23+
- name: Build binaries
24+
run: |
25+
mkdir -p build/darwin/arm64 build/darwin/amd64 build/linux/amd64 build/linux/arm64
26+
GOOS=darwin GOARCH=arm64 go build -ldflags "-X main.version=${{ github.event.release.tag_name }}" -o build/darwin/arm64/sweeper .
27+
GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.version=${{ github.event.release.tag_name }}" -o build/darwin/amd64/sweeper .
28+
GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=${{ github.event.release.tag_name }}" -o build/linux/amd64/sweeper .
29+
GOOS=linux GOARCH=arm64 go build -ldflags "-X main.version=${{ github.event.release.tag_name }}" -o build/linux/arm64/sweeper .
30+
31+
- name: Upload artifacts to release
32+
run: |
33+
mkdir -p dist
34+
for file in $(find build -type f); do
35+
rel_path="${file#build/}"
36+
os=$(dirname "$rel_path" | cut -d'/' -f1)
37+
arch=$(dirname "$rel_path" | cut -d'/' -f2)
38+
filename=$(basename "$file")
39+
new_name="${filename}-${os}-${arch}"
40+
cp "$file" "dist/$new_name"
41+
done
42+
43+
gh release upload "${{ github.event.release.tag_name }}" dist/*
44+
env:
45+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

AGENTS.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# AGENTS.md
2+
3+
### Don't
4+
5+
- Do not write design documents or implementation plans to disk (no `docs/plans/` or similar).
6+
Discuss plans in conversation only.
7+
8+
### Do
9+
10+
- Follow idiomatic Go and prefer using the `func NewExampleStruct() *ExampleStruct`
11+
paradigm seen throughout.
12+
- Run `go test ./...` before committing.
13+
14+
### Project Overview
15+
16+
`sweeper` is an agent-powered code maintenance tool that dispatches parallel
17+
Claude Code sub-agents to fix lint issues across a codebase, each running in
18+
its own isolated environment.
19+
20+
**Language:** Go 1.25+
21+
**Go Module:** `github.com/papercomputeco/sweeper`
22+
23+
### Project Structure
24+
25+
- `skills/` - Skill definitions for Claude Code and opencode integrations.
26+
- `.claude-plugin/` - Claude Code plugin manifest and marketplace catalog.
27+
- `.github/` - GitHub metadata and action workflows.
28+
29+
### Releases
30+
31+
Releases follow the same pipeline as [tapes](https://github.com/papercomputeco/tapes):
32+
33+
- **`cut-release.yaml`** — manual `workflow_dispatch` to create a new GitHub release (first release: `v0.1.0`).
34+
- **`release.yaml`** — triggers on release publish, builds cross-platform binaries and uploads them as release artifacts.
35+
- **`ci.yaml`** — builds binaries and runs cross-platform smoke tests on push to `main` and PRs.
36+
37+
### PR and Commit Conventions
38+
39+
PR titles are validated by CI and feed into auto-generated release notes.
40+
Use this format:
41+
42+
```
43+
<emoji> <type>: <Short description>
44+
```
45+
46+
| Type | Emoji | When to use |
47+
|---------|-------|------------------------------------|
48+
| `feat` || New functionality |
49+
| `fix` | 🐛 | Bug fix |
50+
| `chore` | 🧹 | Maintenance, CI, deps, cleanup |
51+
| `perf` || Performance improvement |
52+
53+
Examples:
54+
- `✨ feat: Add VM isolation for sub-agents`
55+
- `🐛 fix: Correct retry strategy escalation`
56+
- `🧹 chore: Update CI workflow to match tapes`
57+
58+
Squash-merge commits inherit the PR title, so the PR title **is** the commit
59+
message that lands on `main`.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ cp -r skills/sweeper/ /path/to/your-project/.claude/skills/sweeper/
9090

9191
Claude will orchestrate `sweeper run` with the right flags based on your project.
9292

93+
> **Plugin support:** This repo includes a `.claude-plugin/` manifest for distribution as a Claude Code plugin, but it is not yet published to the plugin marketplace. If there is community interest, I am happy to submit it.
94+
9395
### opencode
9496

9597
To use sweeper as a skill in [opencode](https://opencode.ai) (a terminal-based AI coding agent):

0 commit comments

Comments
 (0)