Skip to content

Commit 34312ea

Browse files
masseaterclaude
andcommitted
test: 全パッケージ・プラグインのテストカバレッジ改善
- packages/cc-plugin-lib, sdd-webapp: テスト追加・改善 - packages/vitest-config: カバレッジ閾値設定追加 - plugins/devkit, mutils, progress-tracker, research, sdd, ui-dev: テスト追加 - lefthook: hook-executable-checkからテストファイルを除外 - 不要なknip.json削除、specs/_archived削除 - CI・knip設定の更新 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e55b52d commit 34312ea

104 files changed

Lines changed: 5203 additions & 1266 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,17 @@ jobs:
3535
with:
3636
bun-version: "1.3.4"
3737
- run: bun install
38-
- run: bunx turbo run test
38+
- run: bunx turbo run test -- --coverage
39+
40+
knip:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
- uses: oven-sh/setup-bun@v2
45+
with:
46+
bun-version: "1.3.4"
47+
- run: bun install
48+
- run: bunx turbo run knip --concurrency=1
3949

4050
build:
4151
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ docs/api/
1616
.serena/
1717

1818
!.claude/.turbo
19+
coverage/

README.md

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,20 @@
1-
# masseater/claude-code-plugin
1+
# claude-code-plugin
22

3-
Claude Codeプラグインのマーケットプレイスリポジトリ
3+
Claude Code プラグインのマーケットプレイスリポジトリ
44

5-
## インストール
5+
## Quick Start
66

77
```bash
8-
# マーケットプレイスを追加
9-
/plugin marketplace add masseater/claude-code-plugin
10-
11-
# プラグインをインストール(例: mutils)
12-
/plugin install mutils@masseater-plugins
8+
bun install
9+
bun run check
10+
bun run test
1311
```
1412

15-
## 含まれるプラグイン
16-
17-
| プラグイン | 説明 |
18-
|-----------|------|
19-
| **mutils** | 汎用ユーティリティコマンド集(hooks付き) |
20-
| **sdd** | Spec Driven Development ワークフロー支援 |
21-
| **eslint-lsp** | ESLint Language Server 統合 |
22-
| **use-codex** | Codex CLI 統合(Web検索、ファイルレビュー) |
23-
| **psp** | Personal Project Setup - Cloudflare向け個人開発Webアプリ |
24-
| **progress-tracker** | セッション進捗ファイルの自動作成・管理 |
25-
| **debug** | プラグインデバッグ用 |
26-
| **swarm** | Agent Teams(swarm)支援 - チーム設計・運用・振り返りガイド |
27-
| **agnix** | AI アシスタント設定ファイルリンター(agnix)統合 |
28-
29-
詳細は各プラグインの README を参照:
30-
- [plugins/mutils/README.md](./plugins/mutils/README.md)
31-
- [plugins/debug/README.md](./plugins/debug/README.md)
32-
33-
## 開発者向け
34-
35-
- ランタイム: [Bun](https://bun.sh/)
36-
- リンター/フォーマッター: [Biome](https://biomejs.dev/)
37-
- Git Hooks: [Lefthook](https://github.com/evilmartians/lefthook)
38-
39-
詳細な開発ガイドは [AGENTS.md](./AGENTS.md) を参照。
13+
## Structure
4014

41-
## 参考資料
15+
| Directory | Description |
16+
|-----------|-------------|
17+
| `plugins/` | プラグイン本体 |
18+
| `packages/` | 共有パッケージ |
4219

43-
- [Claude Code プラグインドキュメント](https://code.claude.com/docs/en/plugins)
44-
- [フック](https://code.claude.com/docs/en/hooks)
45-
- [スキル](https://code.claude.com/docs/en/skills)
46-
- [サブエージェント](https://code.claude.com/docs/en/sub-agents)
20+
詳細は [AGENTS.md](AGENTS.md) を参照。

adr/001-bun-runtime.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
date: 2025-01-01
3+
status: accepted
4+
---
5+
6+
# ADR-001: Bun as Package Manager and Runtime
7+
8+
## Context
9+
10+
This project is a Claude Code plugin monorepo. It needs a package manager for workspace management and a runtime for executing hooks and scripts.
11+
12+
## Decision
13+
14+
Use Bun as the package manager (`packageManager: bun`) and runtime for all tooling. This deviates from the devkit standard (which prescribes pnpm) because:
15+
- Plugins and hooks run as independent Bun scripts (not project code)
16+
- Bun's workspace support is sufficient for this use case
17+
- Single runtime simplifies the toolchain
18+
19+
## Consequences
20+
21+
- All workspace scripts use Bun instead of pnpm + tsx
22+
- `bun install` instead of `pnpm install`
23+
- devDependencies reference `"*"` with Bun workspaces (should use `"workspace:*"`)

bun.lock

Lines changed: 140 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/dev-commands.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- TODO: このファイルは将来 package.json の scripts から自動生成すべき -->
12
# 開発コマンド
23

34
## プラグイン開発(各プラグインディレクトリ内で実行)

knip.json

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,44 @@
44
"interface": true,
55
"type": true
66
},
7-
"tags": ["-lintignore"]
7+
"tags": ["-lintignore"],
8+
"workspaces": {
9+
"packages/cc-plugin-lib": {
10+
"project": ["src/**/*.ts"],
11+
"ignoreDependencies": ["@repo/vitest-config"]
12+
},
13+
"packages/sdd-webapp": {
14+
"entry": ["src/cli.ts", "src/mcp-server.ts", "src/client/main.tsx"],
15+
"project": ["src/**/*.{ts,tsx}"],
16+
"ignoreDependencies": [
17+
"@repo/ts-config",
18+
"@tailwindcss/typography",
19+
"@tailwindcss/vite",
20+
"@vitejs/plugin-react",
21+
"autoprefixer",
22+
"postcss",
23+
"tailwindcss"
24+
],
25+
"vite": false
26+
},
27+
"plugins/agnix": {
28+
"entry": ["hooks/**/*.ts", "!hooks/lib/**"]
29+
},
30+
"plugins/code-review": {
31+
"entry": ["skills/*/scripts/*.ts", "skills/*/env.ts", "skills/*/lib/*.ts"],
32+
"ignoreDependencies": ["@repo/ts-config"]
33+
},
34+
"plugins/eslint-lsp": {
35+
"entry": ["hooks/*.ts"],
36+
"ignoreDependencies": ["bun-types"]
37+
},
38+
"plugins/research": {
39+
"entry": ["skills/*/scripts/*.ts", "env.ts"],
40+
"ignoreDependencies": ["@repo/ts-config"]
41+
},
42+
"plugins/ui-dev": {
43+
"entry": ["hooks/*.ts", "skills/*/scripts/*.ts", "scripts/*.ts", "lib/*.ts", "env.ts"],
44+
"ignoreDependencies": ["@repo/ts-config"]
45+
}
46+
}
847
}

lefthook.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,21 @@ pre-push:
77
git add AGENTS.md .claude-plugin/marketplace.json
88
git commit -m "chore: auto-sync plugin list"
99
fi
10+
docs-api-sync:
11+
run: |
12+
bun run docs
13+
if [ -n "$(git diff --name-only docs/api/)" ]; then
14+
git add docs/api/
15+
git commit -m "docs: auto-sync API reference"
16+
fi
1017
1118
pre-commit:
1219
commands:
1320
hook-executable-check:
14-
glob: "plugins/*/hooks/*.{ts,mjs,js}"
21+
glob: "plugins/*/hooks/**/*.{ts,mjs,js}"
1522
run: |
1623
for file in {staged_files}; do
24+
case "$file" in *.test.*) continue;; esac
1725
if [ ! -x "$file" ]; then
1826
echo "❌ Hook file missing execute permission: $file"
1927
echo " Run: chmod +x $file"

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
"workspaces": ["packages/*", "plugins/*"],
77
"scripts": {
88
"build": "turbo run build",
9-
"check": "eslint && turbo run check --filter='./packages/*' --filter='./plugins/*'",
9+
"check": "eslint && oxfmt --check . && turbo run check --filter='./packages/*' --filter='./plugins/*'",
1010
"test": "turbo run test",
1111
"typecheck": "turbo run typecheck",
1212
"check:docs": "bun -e \"import{check}from'@r_masseater/doc-engine';await check()\"",
1313
"docs": "bun -e \"import{generate}from'@r_masseater/doc-engine';await generate()\"",
1414
"check:plugin-list": "bun -e \"import{checkList}from'@r_masseater/doc-engine';await checkList()\"",
15-
"hooks:plugin-list-sync": "bun -e \"import{generate}from'@r_masseater/doc-engine';await generate()\""
15+
"hooks:plugin-list-sync": "bun -e \"import{generate}from'@r_masseater/doc-engine';await generate()\"",
16+
"knip": "turbo run knip --concurrency=1"
1617
},
1718
"overrides": {
1819
"typescript": "npm:@typescript/native-preview@latest"

packages/cc-plugin-lib/knip.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)