create-einja-app 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +307 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +1041 -0
- package/dist/cli.js.map +1 -0
- package/package.json +62 -0
- package/templates/turborepo-pandacss/.biomeignore +15 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/biome-format.sh +49 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/design-doc-check.sh +61 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/detect-secrets.sh +62 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/large-file-warning.sh +42 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/playwright-resize.sh +36 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/typecheck.sh +37 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/unset-volta-recursion.sh +32 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/validate-git-commit.sh +239 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/warn-index-ts.sh +34 -0
- package/templates/turborepo-pandacss/.claude/hooks/einja/warn-relative-import.sh +48 -0
- package/templates/turborepo-pandacss/.claude/settings.json +174 -0
- package/templates/turborepo-pandacss/.claude/skills/create-einja-app-release/SKILL.md +186 -0
- package/templates/turborepo-pandacss/.claude/skills/dev-cli-release/SKILL.md +173 -0
- package/templates/turborepo-pandacss/.cursor/commands/spec-create.md +227 -0
- package/templates/turborepo-pandacss/.cursor/commands/start-dev.md +98 -0
- package/templates/turborepo-pandacss/.cursor/commands/task-exec.md +287 -0
- package/templates/turborepo-pandacss/.cursor/commands/task-vibe-kanban-loop.md +532 -0
- package/templates/turborepo-pandacss/.cursor/commands/update-docs-by-task-specs.md +448 -0
- package/templates/turborepo-pandacss/.cursor/mcp.json +45 -0
- package/templates/turborepo-pandacss/.cursor/rules/api-rules.mdc +171 -0
- package/templates/turborepo-pandacss/.cursor/rules/api-test-rules.mdc +181 -0
- package/templates/turborepo-pandacss/.cursor/rules/base-code.mdc +70 -0
- package/templates/turborepo-pandacss/.cursor/rules/base-commit-rules.mdc +174 -0
- package/templates/turborepo-pandacss/.cursor/rules/base-design.mdc +12 -0
- package/templates/turborepo-pandacss/.cursor/rules/base-rules.mdc +231 -0
- package/templates/turborepo-pandacss/.cursor/rules/error-handling-rules.mdc +188 -0
- package/templates/turborepo-pandacss/.cursor/rules/refactor-rules.mdc +93 -0
- package/templates/turborepo-pandacss/.dockerignore +126 -0
- package/templates/turborepo-pandacss/.einja-sync.json +35 -0
- package/templates/turborepo-pandacss/.env.ci +25 -0
- package/templates/turborepo-pandacss/.env.example +35 -0
- package/templates/turborepo-pandacss/.env.personal.example +27 -0
- package/templates/turborepo-pandacss/.envrc +4 -0
- package/templates/turborepo-pandacss/.gitattributes +5 -0
- package/templates/turborepo-pandacss/.husky/pre-commit +1 -0
- package/templates/turborepo-pandacss/.lintstagedrc.js +24 -0
- package/templates/turborepo-pandacss/.mcp.json +45 -0
- package/templates/turborepo-pandacss/.node-version +1 -0
- package/templates/turborepo-pandacss/.templateignore +60 -0
- package/templates/turborepo-pandacss/.vscode/extensions.json +3 -0
- package/templates/turborepo-pandacss/CLAUDE.md +415 -0
- package/templates/turborepo-pandacss/README.md +322 -0
- package/templates/turborepo-pandacss/apps/web/middleware.ts +28 -0
- package/templates/turborepo-pandacss/apps/web/next.config.ts +10 -0
- package/templates/turborepo-pandacss/apps/web/package.json +80 -0
- package/templates/turborepo-pandacss/apps/web/panda.config.ts +114 -0
- package/templates/turborepo-pandacss/apps/web/postcss.config.cjs +6 -0
- package/templates/turborepo-pandacss/apps/web/public/file.svg +1 -0
- package/templates/turborepo-pandacss/apps/web/public/globe.svg +1 -0
- package/templates/turborepo-pandacss/apps/web/public/next.svg +1 -0
- package/templates/turborepo-pandacss/apps/web/public/vercel.svg +1 -0
- package/templates/turborepo-pandacss/apps/web/public/window.svg +1 -0
- package/templates/turborepo-pandacss/apps/web/src/app/(authenticated)/dashboard/page.tsx +79 -0
- package/templates/turborepo-pandacss/apps/web/src/app/(authenticated)/data/_components/UserTable.tsx +203 -0
- package/templates/turborepo-pandacss/apps/web/src/app/(authenticated)/data/page.tsx +57 -0
- package/templates/turborepo-pandacss/apps/web/src/app/(authenticated)/layout-client.tsx +31 -0
- package/templates/turborepo-pandacss/apps/web/src/app/(authenticated)/layout.tsx +17 -0
- package/templates/turborepo-pandacss/apps/web/src/app/(authenticated)/profile/page.tsx +59 -0
- package/templates/turborepo-pandacss/apps/web/src/app/api/auth/[...nextauth]/route.ts +3 -0
- package/templates/turborepo-pandacss/apps/web/src/app/api/auth/signup/route.ts +70 -0
- package/templates/turborepo-pandacss/apps/web/src/app/error.tsx +106 -0
- package/templates/turborepo-pandacss/apps/web/src/app/favicon.ico +0 -0
- package/templates/turborepo-pandacss/apps/web/src/app/global-error.tsx +110 -0
- package/templates/turborepo-pandacss/apps/web/src/app/globals.css +121 -0
- package/templates/turborepo-pandacss/apps/web/src/app/layout.tsx +28 -0
- package/templates/turborepo-pandacss/apps/web/src/app/not-found.tsx +54 -0
- package/templates/turborepo-pandacss/apps/web/src/app/page.module.css +165 -0
- package/templates/turborepo-pandacss/apps/web/src/app/page.test.tsx +52 -0
- package/templates/turborepo-pandacss/apps/web/src/app/page.tsx +284 -0
- package/templates/turborepo-pandacss/apps/web/src/app/signin/page.tsx +296 -0
- package/templates/turborepo-pandacss/apps/web/src/app/signup/page.tsx +395 -0
- package/templates/turborepo-pandacss/apps/web/src/application/use-cases/UserUseCases.test.ts +229 -0
- package/templates/turborepo-pandacss/apps/web/src/application/use-cases/UserUseCases.ts +115 -0
- package/templates/turborepo-pandacss/apps/web/src/components/auth/login-button.tsx +35 -0
- package/templates/turborepo-pandacss/apps/web/src/components/auth/logout-button.tsx +24 -0
- package/templates/turborepo-pandacss/apps/web/src/components/auth/user-avatar.test.tsx +68 -0
- package/templates/turborepo-pandacss/apps/web/src/components/auth/user-avatar.tsx +43 -0
- package/templates/turborepo-pandacss/apps/web/src/components/dashboard/dashboard-stats.tsx +128 -0
- package/templates/turborepo-pandacss/apps/web/src/components/providers/query-provider.tsx +30 -0
- package/templates/turborepo-pandacss/apps/web/src/components/providers/session-provider.tsx +12 -0
- package/templates/turborepo-pandacss/apps/web/src/components/shared/Sidebar.tsx +175 -0
- package/templates/turborepo-pandacss/apps/web/src/components/shared/header.tsx +166 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/accordion.tsx +64 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/alert-dialog.tsx +135 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/alert.tsx +60 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/aspect-ratio.tsx +9 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/avatar.tsx +41 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/badge.tsx +39 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/breadcrumb.tsx +101 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/button.tsx +56 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/card.tsx +75 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/checkbox.tsx +29 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/data-table.tsx +189 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/dialog-hook.tsx +210 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/dialog.tsx +129 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/drawer.tsx +124 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/dropdown-menu.tsx +228 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/form.tsx +152 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/hover-card.tsx +38 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/input.tsx +21 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/label.tsx +21 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/pagination.tsx +105 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/popover.tsx +42 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/progress.tsx +28 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/select.tsx +170 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/separator.tsx +28 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/skeleton.tsx +13 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/sonner.tsx +25 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/table.tsx +92 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/tabs.tsx +54 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/textarea.tsx +18 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/tooltip.tsx +57 -0
- package/templates/turborepo-pandacss/apps/web/src/components/ui/typography.tsx +158 -0
- package/templates/turborepo-pandacss/apps/web/src/lib/auth/guard.ts +36 -0
- package/templates/turborepo-pandacss/apps/web/src/lib/auth/index.ts +22 -0
- package/templates/turborepo-pandacss/apps/web/src/lib/prisma.ts +3 -0
- package/templates/turborepo-pandacss/apps/web/src/lib/utils.ts +6 -0
- package/templates/turborepo-pandacss/apps/web/test/globals.d.ts +1 -0
- package/templates/turborepo-pandacss/apps/web/test/matchers.d.ts +1 -0
- package/templates/turborepo-pandacss/apps/web/test/setup.ts +22 -0
- package/templates/turborepo-pandacss/apps/web/tsconfig.json +37 -0
- package/templates/turborepo-pandacss/apps/web/vitest.config.ts +20 -0
- package/templates/turborepo-pandacss/apps/web/vitest.d.ts +2 -0
- package/templates/turborepo-pandacss/biome.json +60 -0
- package/templates/turborepo-pandacss/components.json +21 -0
- package/templates/turborepo-pandacss/docker-compose.yml +27 -0
- package/templates/turborepo-pandacss/middleware.ts +32 -0
- package/templates/turborepo-pandacss/next.config.ts +10 -0
- package/templates/turborepo-pandacss/package-lock.json +9346 -0
- package/templates/turborepo-pandacss/package.json +64 -0
- package/templates/turborepo-pandacss/packages/config/package.json +41 -0
- package/templates/turborepo-pandacss/packages/config/panda.config.ts +114 -0
- package/templates/turborepo-pandacss/packages/config/src/index.ts +24 -0
- package/templates/turborepo-pandacss/packages/config/src/worktree-config-loader.ts +129 -0
- package/templates/turborepo-pandacss/packages/config/src/worktree-config.ts +75 -0
- package/templates/turborepo-pandacss/packages/config/tsconfig.build.json +19 -0
- package/templates/turborepo-pandacss/packages/config/tsconfig.json +24 -0
- package/templates/turborepo-pandacss/packages/config/typescript/base.json +19 -0
- package/templates/turborepo-pandacss/packages/front-core/package.json +24 -0
- package/templates/turborepo-pandacss/packages/front-core/src/auth/config.ts +84 -0
- package/templates/turborepo-pandacss/packages/front-core/src/auth/index.ts +5 -0
- package/templates/turborepo-pandacss/packages/front-core/src/auth/types/next-auth.d.ts +20 -0
- package/templates/turborepo-pandacss/packages/front-core/src/auth/utils.ts +29 -0
- package/templates/turborepo-pandacss/packages/front-core/src/context/index.ts +2 -0
- package/templates/turborepo-pandacss/packages/front-core/src/hooks/index.ts +2 -0
- package/templates/turborepo-pandacss/packages/front-core/src/index.ts +4 -0
- package/templates/turborepo-pandacss/packages/front-core/src/utils/index.ts +2 -0
- package/templates/turborepo-pandacss/packages/front-core/tsconfig.json +14 -0
- package/templates/turborepo-pandacss/packages/server-core/package.json +32 -0
- package/templates/turborepo-pandacss/packages/server-core/prisma/schema.prisma +102 -0
- package/templates/turborepo-pandacss/packages/server-core/prisma/seed.ts +67 -0
- package/templates/turborepo-pandacss/packages/server-core/prisma.config.ts +8 -0
- package/templates/turborepo-pandacss/packages/server-core/src/__generated__/fabbrica/index.d.ts +270 -0
- package/templates/turborepo-pandacss/packages/server-core/src/__generated__/fabbrica/index.js +484 -0
- package/templates/turborepo-pandacss/packages/server-core/src/core/result.test.ts +78 -0
- package/templates/turborepo-pandacss/packages/server-core/src/core/result.ts +53 -0
- package/templates/turborepo-pandacss/packages/server-core/src/domain/.gitkeep +0 -0
- package/templates/turborepo-pandacss/packages/server-core/src/domain/entities/User.test.ts +232 -0
- package/templates/turborepo-pandacss/packages/server-core/src/domain/entities/User.ts +105 -0
- package/templates/turborepo-pandacss/packages/server-core/src/domain/repository-interfaces/IUserRepository.ts +101 -0
- package/templates/turborepo-pandacss/packages/server-core/src/infrastructure/database/client.ts +15 -0
- package/templates/turborepo-pandacss/packages/server-core/src/infrastructure/database/mappers/UserMapper.test.ts +278 -0
- package/templates/turborepo-pandacss/packages/server-core/src/infrastructure/database/mappers/UserMapper.ts +103 -0
- package/templates/turborepo-pandacss/packages/server-core/src/infrastructure/database/repositories/UserRepository.test.ts +317 -0
- package/templates/turborepo-pandacss/packages/server-core/src/infrastructure/database/repositories/UserRepository.ts +169 -0
- package/templates/turborepo-pandacss/packages/server-core/src/testing/factories/index.ts +22 -0
- package/templates/turborepo-pandacss/packages/server-core/src/testing/factories/user.factory.ts +123 -0
- package/templates/turborepo-pandacss/packages/server-core/src/testing/fixtures/users.ts +92 -0
- package/templates/turborepo-pandacss/packages/server-core/src/testing/helpers/date.ts +49 -0
- package/templates/turborepo-pandacss/packages/server-core/src/testing/helpers/password.ts +50 -0
- package/templates/turborepo-pandacss/packages/server-core/src/testing/index.ts +26 -0
- package/templates/turborepo-pandacss/packages/server-core/tsconfig.json +14 -0
- package/templates/turborepo-pandacss/packages/server-core/vitest.config.ts +15 -0
- package/templates/turborepo-pandacss/packages/ui/package.json +37 -0
- package/templates/turborepo-pandacss/packages/ui/src/accordion.tsx +66 -0
- package/templates/turborepo-pandacss/packages/ui/src/alert-dialog.tsx +157 -0
- package/templates/turborepo-pandacss/packages/ui/src/alert.tsx +66 -0
- package/templates/turborepo-pandacss/packages/ui/src/aspect-ratio.tsx +11 -0
- package/templates/turborepo-pandacss/packages/ui/src/avatar.tsx +53 -0
- package/templates/turborepo-pandacss/packages/ui/src/badge.tsx +46 -0
- package/templates/turborepo-pandacss/packages/ui/src/breadcrumb.tsx +108 -0
- package/templates/turborepo-pandacss/packages/ui/src/button.tsx +59 -0
- package/templates/turborepo-pandacss/packages/ui/src/card.tsx +92 -0
- package/templates/turborepo-pandacss/packages/ui/src/checkbox.tsx +32 -0
- package/templates/turborepo-pandacss/packages/ui/src/data-table.tsx +216 -0
- package/templates/turborepo-pandacss/packages/ui/src/dialog-hook.tsx +226 -0
- package/templates/turborepo-pandacss/packages/ui/src/dialog.tsx +143 -0
- package/templates/turborepo-pandacss/packages/ui/src/drawer.tsx +135 -0
- package/templates/turborepo-pandacss/packages/ui/src/dropdown-menu.tsx +257 -0
- package/templates/turborepo-pandacss/packages/ui/src/form.tsx +168 -0
- package/templates/turborepo-pandacss/packages/ui/src/hover-card.tsx +44 -0
- package/templates/turborepo-pandacss/packages/ui/src/input.tsx +21 -0
- package/templates/turborepo-pandacss/packages/ui/src/label.tsx +24 -0
- package/templates/turborepo-pandacss/packages/ui/src/lib/utils.ts +6 -0
- package/templates/turborepo-pandacss/packages/ui/src/pagination.tsx +126 -0
- package/templates/turborepo-pandacss/packages/ui/src/popover.tsx +48 -0
- package/templates/turborepo-pandacss/packages/ui/src/progress.tsx +31 -0
- package/templates/turborepo-pandacss/packages/ui/src/select.tsx +185 -0
- package/templates/turborepo-pandacss/packages/ui/src/separator.tsx +28 -0
- package/templates/turborepo-pandacss/packages/ui/src/skeleton.tsx +13 -0
- package/templates/turborepo-pandacss/packages/ui/src/sonner.tsx +25 -0
- package/templates/turborepo-pandacss/packages/ui/src/table.tsx +116 -0
- package/templates/turborepo-pandacss/packages/ui/src/tabs.tsx +66 -0
- package/templates/turborepo-pandacss/packages/ui/src/textarea.tsx +18 -0
- package/templates/turborepo-pandacss/packages/ui/src/tooltip.tsx +61 -0
- package/templates/turborepo-pandacss/packages/ui/src/typography.tsx +187 -0
- package/templates/turborepo-pandacss/packages/ui/tsconfig.json +20 -0
- package/templates/turborepo-pandacss/panda.config.ts +114 -0
- package/templates/turborepo-pandacss/pnpm-lock.yaml +9032 -0
- package/templates/turborepo-pandacss/pnpm-workspace.yaml +11 -0
- package/templates/turborepo-pandacss/postcss.config.cjs +6 -0
- package/templates/turborepo-pandacss/prisma/schema.prisma +82 -0
- package/templates/turborepo-pandacss/public/file.svg +1 -0
- package/templates/turborepo-pandacss/public/globe.svg +1 -0
- package/templates/turborepo-pandacss/public/next.svg +1 -0
- package/templates/turborepo-pandacss/public/vercel.svg +1 -0
- package/templates/turborepo-pandacss/public/window.svg +1 -0
- package/templates/turborepo-pandacss/scripts/cli-template-update.ts +387 -0
- package/templates/turborepo-pandacss/scripts/env-show.ts +129 -0
- package/templates/turborepo-pandacss/scripts/env.ts +555 -0
- package/templates/turborepo-pandacss/scripts/init.sh +92 -0
- package/templates/turborepo-pandacss/scripts/setup-dev.ts +640 -0
- package/templates/turborepo-pandacss/scripts/template-update.ts +277 -0
- package/templates/turborepo-pandacss/scripts/worktree/dev.ts +872 -0
- package/templates/turborepo-pandacss/test/globals.d.ts +1 -0
- package/templates/turborepo-pandacss/test/setup.ts +22 -0
- package/templates/turborepo-pandacss/tsconfig.json +46 -0
- package/templates/turborepo-pandacss/turbo.json +57 -0
- package/templates/turborepo-pandacss/vitest.config.ts +20 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cli-release
|
|
3
|
+
description: "@einja/cli パッケージをビルド・テストし、NPMに公開するSkill"
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash
|
|
6
|
+
- Read
|
|
7
|
+
- Glob
|
|
8
|
+
- Grep
|
|
9
|
+
- AskUserQuestion
|
|
10
|
+
- TodoWrite
|
|
11
|
+
- TodoRead
|
|
12
|
+
- Task
|
|
13
|
+
- MCPSearch
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# cli-release Skill: @einja/cli パッケージ公開エンジン
|
|
17
|
+
|
|
18
|
+
## 役割
|
|
19
|
+
|
|
20
|
+
`@einja/cli` パッケージをビルド・テストし、NPMに公開します。
|
|
21
|
+
|
|
22
|
+
## 参照ドキュメント
|
|
23
|
+
|
|
24
|
+
- `packages/cli/RELEASING.md` - 詳細なリリース手順、トラブルシューティング、NPM_TOKEN設定方法
|
|
25
|
+
|
|
26
|
+
## 実行手順
|
|
27
|
+
|
|
28
|
+
### 1. 前提条件の確認
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
git branch --show-current # mainブランチであること
|
|
32
|
+
git status --porcelain # 未コミット変更の確認
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
#### 未コミット変更がある場合
|
|
36
|
+
|
|
37
|
+
**AskUserQuestion**で対処方法を確認:
|
|
38
|
+
|
|
39
|
+
- **コミットしてからリリース**: 全ての変更をコミット・プッシュ後にリリース
|
|
40
|
+
- **スタッシュしてリリース**: 変更を一時退避してリリース後に復元
|
|
41
|
+
- **そのままリリース**: 未コミット変更は放置し、**package.jsonのバージョン更新のみ**コミットしてリリース
|
|
42
|
+
|
|
43
|
+
### 2. バージョン種別の決定
|
|
44
|
+
|
|
45
|
+
現在のバージョンと最近の変更を表示後、**AskUserQuestion**で確認:
|
|
46
|
+
|
|
47
|
+
- patch(推奨): バグ修正・軽微な改善
|
|
48
|
+
- minor: 後方互換性のある機能追加
|
|
49
|
+
- major: 破壊的変更
|
|
50
|
+
|
|
51
|
+
### 3. ビルド・テスト
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pnpm --filter @einja/cli build
|
|
55
|
+
pnpm --filter @einja/cli test
|
|
56
|
+
pnpm --filter @einja/cli typecheck
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 4. バージョン更新・コミット・プッシュ
|
|
60
|
+
|
|
61
|
+
#### 通常パターン(未コミット変更なし)
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
cd packages/cli
|
|
65
|
+
npm version {patch|minor|major}
|
|
66
|
+
git push origin main
|
|
67
|
+
git push origin cli-v{version}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
#### 未コミット変更ありでそのままリリースする場合
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm version {patch|minor|major} --no-git-tag-version --prefix packages/cli
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**重要**: 未コミット変更は放置し、**package.jsonのみ**をコミット:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# package.jsonのみステージング
|
|
80
|
+
git add packages/cli/package.json
|
|
81
|
+
|
|
82
|
+
# バージョン更新のみコミット
|
|
83
|
+
git commit -m "chore(cli): v{version}にバージョンアップ"
|
|
84
|
+
|
|
85
|
+
# タグ作成
|
|
86
|
+
git tag cli-v{version}
|
|
87
|
+
|
|
88
|
+
# プッシュ
|
|
89
|
+
git push origin main
|
|
90
|
+
git push origin cli-v{version}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
task-committer には委託しない(全変更をコミットしてしまうため)。
|
|
94
|
+
|
|
95
|
+
### 5. GitHub Actions 監視・自律修正
|
|
96
|
+
|
|
97
|
+
タグプッシュ後、GitHub Actions の完了を監視する。
|
|
98
|
+
|
|
99
|
+
#### 5.1 監視ループ
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# 最新のワークフロー実行を取得
|
|
103
|
+
gh run list --workflow=release-cli.yml --limit=1 --json databaseId,status,conclusion
|
|
104
|
+
|
|
105
|
+
# 出力例: [{"databaseId":123,"status":"in_progress","conclusion":null}]
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
- `status: in_progress` → 30秒待機して再確認
|
|
109
|
+
- `status: completed, conclusion: success` → 成功、ステップ6へ
|
|
110
|
+
- `status: completed, conclusion: failure` → 失敗、5.2へ
|
|
111
|
+
|
|
112
|
+
#### 5.2 失敗時の原因特定
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
gh run view {run_id} --log-failed
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
#### 5.3 原因別の自律修正
|
|
119
|
+
|
|
120
|
+
| 原因 | 対処 |
|
|
121
|
+
|------|------|
|
|
122
|
+
| ビルドエラー | コードを修正 |
|
|
123
|
+
| テストエラー | テストを修正 |
|
|
124
|
+
| NPM_TOKEN エラー | ユーザーに設定確認を依頼して終了 |
|
|
125
|
+
| バージョン重複 | 次のpatchバージョンで再実行 |
|
|
126
|
+
|
|
127
|
+
#### 5.4 修正後の再リリース
|
|
128
|
+
|
|
129
|
+
**重要**: 同じタグ名は使えないため、バージョンを上げて再リリース
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# 1. 修正をコミット
|
|
133
|
+
git add -A
|
|
134
|
+
git commit -m "fix(cli): CIエラーを修正"
|
|
135
|
+
|
|
136
|
+
# 2. 新しいバージョンに更新
|
|
137
|
+
npm version patch --no-git-tag-version --prefix packages/cli
|
|
138
|
+
|
|
139
|
+
# 3. バージョン更新をコミット
|
|
140
|
+
git add packages/cli/package.json
|
|
141
|
+
git commit -m "chore(cli): v{new_version}にバージョンアップ"
|
|
142
|
+
|
|
143
|
+
# 4. 新しいタグを作成・プッシュ
|
|
144
|
+
git tag cli-v{new_version}
|
|
145
|
+
git push origin main
|
|
146
|
+
git push origin cli-v{new_version}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
#### 5.5 リトライ制限
|
|
150
|
+
|
|
151
|
+
最大3回まで自動リトライ。3回失敗したらユーザーに報告して終了。
|
|
152
|
+
|
|
153
|
+
### 6. 完了報告
|
|
154
|
+
|
|
155
|
+
```markdown
|
|
156
|
+
## 📦 @einja/cli リリース完了
|
|
157
|
+
|
|
158
|
+
### リリース情報
|
|
159
|
+
- **バージョン**: {old} → {new}
|
|
160
|
+
- **タグ**: cli-v{version}
|
|
161
|
+
|
|
162
|
+
### GitHub Actions
|
|
163
|
+
- **ステータス**: ✅ SUCCESS
|
|
164
|
+
- **URL**: https://github.com/einja-inc/einja-management-template/actions/runs/{run_id}
|
|
165
|
+
|
|
166
|
+
### 確認コマンド
|
|
167
|
+
npm view @einja/cli
|
|
168
|
+
npx @einja/cli --version
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
**最終更新**: 2025-01-10
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "タスクの仕様書(requirements.md、design.md、tasks.md)を段階的に作成・修正するワークフローを実行します。ARGUMENTS: タスク内容の説明またはAsanaタスクURL(必須)、既存仕様書のパス(オプション)"
|
|
3
|
+
allowed-tools: Read, Write, Edit, MultiEdit, Bash, Grep, Glob, TodoRead, TodoWrite, mcp__asana__*, mcp__figma_dev_mode__*, mcp__github__*
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
> **⚠️ Cursor での動作について**
|
|
7
|
+
>
|
|
8
|
+
> このコマンドは `.claude/agents/` 配下のサブエージェント定義ファイルを参照します。
|
|
9
|
+
> サブエージェント呼び出し箇所では、該当する `.md` ファイルを Read で読み込み、
|
|
10
|
+
> そのプロンプト内容に従って処理を実行してください。
|
|
11
|
+
>
|
|
12
|
+
> **サブエージェント実行の手順**:
|
|
13
|
+
> 1. サブエージェント `.md` ファイルを Read で読み込む
|
|
14
|
+
> 2. YAML フロントマターを除外し、本文プロンプトを取得
|
|
15
|
+
> 3. プロンプトの指示に従って処理を実行
|
|
16
|
+
> 4. プロンプト内の「出力形式」に従った報告を生成
|
|
17
|
+
|
|
18
|
+
# タスク仕様書作成コマンド
|
|
19
|
+
|
|
20
|
+
## あなたの役割
|
|
21
|
+
プロダクト開発のシニアテクニカルアーキテクト兼シニアプロダクトエンジニアとして、ATDD(受け入れテスト駆動開発)に基づく仕様書を段階的に作成します。
|
|
22
|
+
|
|
23
|
+
## タスク管理
|
|
24
|
+
TodoWriteツールを使用して全体の進捗を可視化し、ユーザーに現在の状況を明確に伝えます:
|
|
25
|
+
- 各仕様書作成フェーズ(requirements.md、design.md、GitHub Issueへのタスク記述)をトップレベルタスクとして管理
|
|
26
|
+
- エージェント起動前にタスクを「in_progress」に更新
|
|
27
|
+
- エージェント完了後に「completed」に更新
|
|
28
|
+
- ユーザー承認待ちの状態も明示的に表示
|
|
29
|
+
|
|
30
|
+
## 実行手順
|
|
31
|
+
|
|
32
|
+
### 1. 外部リソースの確認
|
|
33
|
+
|
|
34
|
+
**AsanaタスクURL**の場合:
|
|
35
|
+
- AsanaMCPでタスク情報を取得(タイトル、説明、カスタムフィールド)
|
|
36
|
+
- タスクIDから適切なディレクトリ名を生成
|
|
37
|
+
|
|
38
|
+
**FigmaURL**が含まれる場合:
|
|
39
|
+
- FigmaDevModeMCPでデザイン分析
|
|
40
|
+
- UI要件、コンポーネント仕様、デザイントークンを抽出
|
|
41
|
+
|
|
42
|
+
### 2. GitHub Issue作成(最初に実行)
|
|
43
|
+
|
|
44
|
+
1. **GitHub IssueをMCPで作成**
|
|
45
|
+
- タイトル: ユーザー指定またはAsanaタスクから取得
|
|
46
|
+
- 本文: 空または簡易的な説明
|
|
47
|
+
- `mcp__github__create_issue` を使用
|
|
48
|
+
- **Issue番号を取得して記録**
|
|
49
|
+
|
|
50
|
+
2. **Issue番号に基づいてディレクトリパスを決定**
|
|
51
|
+
- パス指定あり → 指定ディレクトリを使用
|
|
52
|
+
- パス指定なし → `/docs/specs/issues/{機能カテゴリ名}/issue{issue番号}-{機能名}/` で自動作成
|
|
53
|
+
|
|
54
|
+
### 3. 段階的仕様書作成
|
|
55
|
+
**重要**: 各段階で必ずユーザー承認を得て、コミット&プッシュしてから次へ進行すること。
|
|
56
|
+
|
|
57
|
+
#### Phase 1: requirements.md(要件定義書)
|
|
58
|
+
|
|
59
|
+
1. **spec-requirements-generator の処理を実行**:
|
|
60
|
+
|
|
61
|
+
**📖 サブエージェントプロンプトの読み込み**
|
|
62
|
+
- `.claude/agents/specs/spec-requirements-generator.md` を Read ツールで読み込む
|
|
63
|
+
- YAML フロントマター(`---` で囲まれた部分)を除外
|
|
64
|
+
- 本文のプロンプト内容を取得
|
|
65
|
+
|
|
66
|
+
**🔨 プロンプトに従った処理の実行**
|
|
67
|
+
- 取得したプロンプト内容に記載された手順・指示に従って処理を実行
|
|
68
|
+
- プロンプト内の「ステップ0: 依頼事項の解析と不明点の解消」から順次実行
|
|
69
|
+
- エージェント内で既存コードの分析を実施(Serena MCP使用)
|
|
70
|
+
- ATDD形式のユーザーストーリーと受け入れ基準を作成
|
|
71
|
+
- プロンプト内の「出力とファイル分割」セクションに従ってファイル作成
|
|
72
|
+
|
|
73
|
+
**📋 完了報告**
|
|
74
|
+
- 作成したファイルのパスと概要を報告
|
|
75
|
+
- サブエージェント定義に記載された構造化マークダウン形式で出力
|
|
76
|
+
|
|
77
|
+
2. **ユーザーに内容確認を依頼**
|
|
78
|
+
- 作成したファイルのパスと概要を提示
|
|
79
|
+
- 確認ポイントを明示(要件の過不足、受け入れ基準の明確性など)
|
|
80
|
+
|
|
81
|
+
3. **ユーザー承認後、コミット&プッシュ**
|
|
82
|
+
- コミットメッセージ: `docs: add requirements for {feature-name}`
|
|
83
|
+
- ブランチは現在のブランチにプッシュ
|
|
84
|
+
- 他のメンバーがレビューできるようにする
|
|
85
|
+
|
|
86
|
+
4. **承認を得てから次のステップ(design.md)に進む**
|
|
87
|
+
|
|
88
|
+
#### Phase 2: design.md(設計書)
|
|
89
|
+
|
|
90
|
+
1. **spec-design-generator の処理を実行**:
|
|
91
|
+
|
|
92
|
+
**📖 サブエージェントプロンプトの読み込み**
|
|
93
|
+
- `.claude/agents/specs/spec-design-generator.md` を Read ツールで読み込む
|
|
94
|
+
- YAML フロントマターを除外
|
|
95
|
+
- 本文のプロンプト内容を取得
|
|
96
|
+
|
|
97
|
+
**🔨 プロンプトに従った処理の実行**
|
|
98
|
+
- 取得したプロンプト内容に記載された手順・指示に従って処理を実行
|
|
99
|
+
- プロンプト内の「ステップ0: 依頼事項の解析と不明点の解消」から順次実行
|
|
100
|
+
- エージェント内で既存アーキテクチャの調査を実施(Serena MCP使用)
|
|
101
|
+
- 技術アーキテクチャとデータモデルを設計
|
|
102
|
+
- requirements.mdの内容を参照
|
|
103
|
+
- プロンプト内の「出力とファイル分割」セクションに従ってファイル作成
|
|
104
|
+
- Codex MCPでレビューと改善ループを実施
|
|
105
|
+
|
|
106
|
+
**📋 完了報告**
|
|
107
|
+
- 作成したファイルのパスと概要を報告
|
|
108
|
+
- サブエージェント定義に記載された構造化マークダウン形式で出力
|
|
109
|
+
|
|
110
|
+
2. **ユーザーに内容確認を依頼**
|
|
111
|
+
- 作成したファイルのパスと概要を提示
|
|
112
|
+
- 確認ポイントを明示(アーキテクチャの妥当性、実装方針など)
|
|
113
|
+
|
|
114
|
+
3. **ユーザー承認後、コミット&プッシュ**
|
|
115
|
+
- コミットメッセージ: `docs: add design for {feature-name}`
|
|
116
|
+
- ブランチは現在のブランチにプッシュ
|
|
117
|
+
|
|
118
|
+
4. **承認を得てから次のステップ(GitHub Issueへのタスク記述)に進む**
|
|
119
|
+
|
|
120
|
+
#### Phase 3: GitHub Issueへのタスク記述
|
|
121
|
+
|
|
122
|
+
1. **spec-tasks-generator の処理を実行**:
|
|
123
|
+
|
|
124
|
+
**📖 サブエージェントプロンプトの読み込み**
|
|
125
|
+
- `.claude/agents/specs/spec-tasks-generator.md` を Read ツールで読み込む
|
|
126
|
+
- YAML フロントマターを除外
|
|
127
|
+
- 本文のプロンプト内容を取得
|
|
128
|
+
|
|
129
|
+
**🔨 プロンプトに従った処理の実行**
|
|
130
|
+
- 取得したプロンプト内容に記載された手順・指示に従って処理を実行
|
|
131
|
+
- エージェント内で実装の影響範囲を分析(Serena MCP使用)
|
|
132
|
+
- 実装タスクの分解と依存関係を定義
|
|
133
|
+
- requirements.mdとdesign.mdの内容を参照
|
|
134
|
+
- **GitHub Issueの説明文にタスク一覧を記述**(tasks.mdファイルは作成しない)
|
|
135
|
+
- `mcp__github__issue_write`(method: update)を使用してIssue本文を更新
|
|
136
|
+
|
|
137
|
+
**📋 完了報告**
|
|
138
|
+
- 更新したGitHub IssueのURLを報告
|
|
139
|
+
- タスク分解の概要を報告
|
|
140
|
+
|
|
141
|
+
2. **ユーザーに内容確認を依頼**
|
|
142
|
+
- 更新したGitHub IssueのURL(#{issue_number})と概要を提示
|
|
143
|
+
- 確認ポイントを明示(タスク分解の粒度、依存関係の妥当性など)
|
|
144
|
+
|
|
145
|
+
3. **ユーザー承認後、以下の処理を実行**
|
|
146
|
+
|
|
147
|
+
a. **Issueブランチ作成(MCP)**
|
|
148
|
+
- `mcp__github__create_branch` を使用
|
|
149
|
+
- branch: `issue/{issue番号}`
|
|
150
|
+
- from_branch: デフォルトブランチ(main/masterなど)
|
|
151
|
+
|
|
152
|
+
b. **仕様書ファイルをプッシュ(MCP)**
|
|
153
|
+
- `mcp__github__push_files` を使用
|
|
154
|
+
- branch: `issue/{issue番号}`
|
|
155
|
+
- files: requirements.md, design.md(または分割された各ファイル)
|
|
156
|
+
- message: `docs: add specs for {feature-name} (Issue #{issue_number})`
|
|
157
|
+
|
|
158
|
+
c. **PR作成(MCP)**
|
|
159
|
+
- `mcp__github__create_pull_request` を使用
|
|
160
|
+
- base: デフォルトブランチ
|
|
161
|
+
- head: `issue/{issue番号}`
|
|
162
|
+
- title: `docs: {機能名} 仕様書`
|
|
163
|
+
- body: `Issue #{issue番号} の仕様書を作成しました。`
|
|
164
|
+
- **PR URLを記録**
|
|
165
|
+
|
|
166
|
+
d. **GitHub Issue説明文を更新(MCP)**
|
|
167
|
+
- `mcp__github__issue_write` を使用(method: update)
|
|
168
|
+
- 本文に以下を含める:
|
|
169
|
+
- Spec PR へのリンク
|
|
170
|
+
- 要件ドキュメントへのリンク(requirements.mdまたはrequirements/README.md)
|
|
171
|
+
- 設計ドキュメントへのリンク(design.mdまたはdesign/README.md)
|
|
172
|
+
- タスク一覧(Phase別チェックボックス形式)
|
|
173
|
+
|
|
174
|
+
4. **全ての仕様書作成が完了したことを報告**
|
|
175
|
+
- GitHub Issue URLを明記
|
|
176
|
+
- Spec PR URLを明記
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
### 4. 既存ファイル処理
|
|
180
|
+
- 既存ファイルは内容確認後に次段階へ進行
|
|
181
|
+
- 修正指示がある場合のみ該当エージェントで再生成
|
|
182
|
+
|
|
183
|
+
### 5. 成果物の構成
|
|
184
|
+
|
|
185
|
+
#### 基本構成(各ファイルが1000行以下の場合)
|
|
186
|
+
```
|
|
187
|
+
/docs/specs/issues/
|
|
188
|
+
└── {機能カテゴリ名}/
|
|
189
|
+
└── issue{issue番号}-{機能名}/
|
|
190
|
+
├── requirements.md # 要件定義書(ATDD形式)
|
|
191
|
+
└── design.md # 設計書(技術詳細)
|
|
192
|
+
|
|
193
|
+
(注: タスク一覧はGitHub Issueに記述)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
#### 分割構成(ファイルが1000行超過の場合)
|
|
197
|
+
```
|
|
198
|
+
/docs/specs/issues/
|
|
199
|
+
└── {機能カテゴリ名}/
|
|
200
|
+
└── issue{issue番号}-{機能名}/
|
|
201
|
+
├── requirements/ # 要件定義書ディレクトリ
|
|
202
|
+
│ ├── README.md # 目次
|
|
203
|
+
│ ├── overview.md # 概要とスコープ
|
|
204
|
+
│ ├── stories.md # ユーザーストーリー
|
|
205
|
+
│ └── technical.md # 技術要件
|
|
206
|
+
└── design/ # 設計書ディレクトリ
|
|
207
|
+
├── README.md # 目次
|
|
208
|
+
├── architecture.md # アーキテクチャ
|
|
209
|
+
├── implementation.md # 実装詳細
|
|
210
|
+
└── quality.md # 品質と運用
|
|
211
|
+
|
|
212
|
+
(注: タスク一覧はGitHub Issueに記述)
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**自動分割機能**:
|
|
216
|
+
- 各エージェント(requirements/design)は生成後に自動的にファイルサイズをチェック
|
|
217
|
+
- 1000行を超える場合、意味のあるまとまりで2-3個のパートに自動分割
|
|
218
|
+
- README.mdで全体構成とナビゲーションを提供
|
|
219
|
+
- 分割されたファイルも他エージェントから正しく参照可能
|
|
220
|
+
|
|
221
|
+
## 重要な原則
|
|
222
|
+
- 段階的開発:各フェーズの承認を必須
|
|
223
|
+
- ATDD形式による受け入れ基準の明確化
|
|
224
|
+
- Next.js + Hono + Prisma技術スタック対応
|
|
225
|
+
- Asana/Figma連携によるトレーサビリティ確保
|
|
226
|
+
|
|
227
|
+
実行を開始します...
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "ローカル開発環境を起動します"
|
|
3
|
+
allowed-tools: Bash
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ローカル開発環境起動コマンド
|
|
7
|
+
|
|
8
|
+
## コマンドの目的
|
|
9
|
+
|
|
10
|
+
開発サーバーを起動します。`pnpm dev` は自動的にWorktree環境を検出し、適切なポート・DB設定を行います。
|
|
11
|
+
|
|
12
|
+
**新機能**: 複数のClaude CodeやCodexセッションが並列で実行されている場合でも、ポート競合を自動解決します。
|
|
13
|
+
|
|
14
|
+
## 実行手順
|
|
15
|
+
|
|
16
|
+
### 通常起動(フォアグラウンド)
|
|
17
|
+
```bash
|
|
18
|
+
# 開発サーバー起動(Worktree対応・自動セットアップ)
|
|
19
|
+
# 同じポートを使用しているプロセスがあれば自動終了してから起動
|
|
20
|
+
pnpm dev
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### バックグラウンド起動(推奨:並列セッション時)
|
|
24
|
+
```bash
|
|
25
|
+
# バックグラウンドで起動(ログは log/dev.log に出力)
|
|
26
|
+
pnpm dev:bg
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 管理コマンド
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# 開発サーバーの状態確認
|
|
33
|
+
pnpm dev:status
|
|
34
|
+
|
|
35
|
+
# ログをリアルタイムで確認
|
|
36
|
+
pnpm dev:logs
|
|
37
|
+
|
|
38
|
+
# 開発サーバーを停止
|
|
39
|
+
pnpm dev:stop
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## オプション
|
|
43
|
+
|
|
44
|
+
| オプション | 説明 |
|
|
45
|
+
|-----------|------|
|
|
46
|
+
| `--background`, `-b` | バックグラウンドで起動(ログはlog/dev.logに出力) |
|
|
47
|
+
| `--no-kill` | 既存プロセスを終了せずにポート競合時はエラー |
|
|
48
|
+
| `--setup-only` | 環境セットアップのみ(サーバー起動なし) |
|
|
49
|
+
| `--stop` | 実行中の開発サーバーを停止 |
|
|
50
|
+
| `--status` | 開発サーバーのステータス表示 |
|
|
51
|
+
|
|
52
|
+
## 注意事項
|
|
53
|
+
|
|
54
|
+
- 初回実行時は `pnpm dev:setup` で環境セットアップが必要です
|
|
55
|
+
- `pnpm dev` はWorktree環境を自動検出してポート・DB名を調整します
|
|
56
|
+
- **並列実行時**: 同じポートを使用しているプロセスは自動的に終了されます
|
|
57
|
+
- ログファイルは `log/dev.log` に出力されます
|
|
58
|
+
|
|
59
|
+
## ターミナルから直接実行する場合
|
|
60
|
+
|
|
61
|
+
### 初回セットアップ
|
|
62
|
+
```bash
|
|
63
|
+
pnpm dev:setup # .env作成、DB起動・初期化
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 開発サーバー起動
|
|
67
|
+
```bash
|
|
68
|
+
pnpm dev # フォアグラウンド(全自動・Worktree対応)
|
|
69
|
+
pnpm dev:bg # バックグラウンド(Claude Code/Codex並列実行時推奨)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### セットアップのみ(開発サーバーは手動起動)
|
|
73
|
+
```bash
|
|
74
|
+
pnpm env:prepare
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## トラブルシューティング
|
|
78
|
+
|
|
79
|
+
### ポートが解放されない場合
|
|
80
|
+
```bash
|
|
81
|
+
# ステータス確認
|
|
82
|
+
pnpm dev:status
|
|
83
|
+
|
|
84
|
+
# 強制終了
|
|
85
|
+
pnpm dev:stop
|
|
86
|
+
|
|
87
|
+
# 特定ポートのプロセスを確認
|
|
88
|
+
lsof -i :3000
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### ログが見たい場合
|
|
92
|
+
```bash
|
|
93
|
+
# リアルタイムログ
|
|
94
|
+
pnpm dev:logs
|
|
95
|
+
|
|
96
|
+
# または直接
|
|
97
|
+
tail -f log/dev.log
|
|
98
|
+
```
|