create-einja-app 0.2.6 → 0.2.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-einja-app",
3
- "version": "0.2.6",
3
+ "version": "0.2.9",
4
4
  "description": "CLI tool to create new projects with Einja Management Template",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,4 +1,30 @@
1
- # .env.local(暗号化)から復号された .env を読み込み
1
+ # @einja:managed:start
2
2
  dotenv_if_exists .env
3
- # 個人用トークン
4
- dotenv_if_exists .env.personal
3
+
4
+ # メインワークツリーの.env.personalを共有
5
+ get_main_worktree() {
6
+ local current_worktree=""
7
+ while IFS= read -r line; do
8
+ if [[ "$line" == "worktree "* ]]; then
9
+ current_worktree="${line#worktree }"
10
+ elif [[ "$line" == "bare" ]]; then
11
+ current_worktree=""
12
+ elif [[ -z "$line" && -n "$current_worktree" ]]; then
13
+ echo "$current_worktree"
14
+ return
15
+ fi
16
+ done < <(git worktree list --porcelain 2>/dev/null)
17
+ if [[ -n "$current_worktree" ]]; then
18
+ echo "$current_worktree"
19
+ fi
20
+ }
21
+
22
+ MAIN_WORKTREE=$(get_main_worktree)
23
+ if [ -n "$MAIN_WORKTREE" ] && [ -f "$MAIN_WORKTREE/.env.personal" ]; then
24
+ dotenv_if_exists "$MAIN_WORKTREE/.env.personal"
25
+ fi
26
+ # @einja:managed:end
27
+
28
+ # @einja:seed:start id="project-env"
29
+ # プロジェクト固有の環境設定を追加
30
+ # @einja:seed:end
@@ -0,0 +1,128 @@
1
+ name: タスク実装
2
+ description: 新機能・バグ修正のタスク管理用Issue
3
+ title: "[機能名]"
4
+ labels: ["task"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ ## タスク実装用Issue
10
+
11
+ このテンプレートは新機能やバグ修正のタスク管理に使用します。
12
+
13
+ - type: textarea
14
+ id: as-is
15
+ attributes:
16
+ label: AS-IS(現状)
17
+ description: requirements.mdから抽出した現在の状態・問題点
18
+ placeholder: |
19
+ 現在の実装状況と課題を記載
20
+
21
+ **現在の実装状況**:
22
+ - 状況1
23
+ - 状況2
24
+
25
+ **現状の課題**:
26
+ - 課題1
27
+ - 課題2
28
+ validations:
29
+ required: true
30
+
31
+ - type: textarea
32
+ id: to-be
33
+ attributes:
34
+ label: TO-BE(目標状態)
35
+ description: requirements.mdから抽出した実装後の期待する状態
36
+ placeholder: |
37
+ 実現したい姿と期待される改善を記載
38
+
39
+ **実現したい姿**:
40
+ - 姿1
41
+ - 姿2
42
+
43
+ **期待される改善**:
44
+ - 改善1
45
+ - 改善2
46
+ validations:
47
+ required: true
48
+
49
+ - type: textarea
50
+ id: approach
51
+ attributes:
52
+ label: 対応方針
53
+ description: design.mdから抽出した技術的アプローチ、使用ライブラリ、実装方針
54
+ placeholder: |
55
+ 技術選定、アーキテクチャ、実装方針を記載
56
+
57
+ **技術スタック**:
58
+ - フレームワーク: Next.js 15
59
+ - データベース: PostgreSQL
60
+ - 認証: NextAuth.js
61
+
62
+ **主要な実装方針**:
63
+ - 方針1
64
+ - 方針2
65
+ validations:
66
+ required: true
67
+
68
+ - type: textarea
69
+ id: tasks
70
+ attributes:
71
+ label: タスク一覧
72
+ description: 実装するタスクグループのリスト
73
+ placeholder: |
74
+ ### Phase 1: [フェーズ名]
75
+
76
+ - [ ] 1.1 [タスクグループ名]
77
+
78
+ - 1.1.1 [タスク名]
79
+ - サブタスク内容
80
+ - **要件**: Story 1
81
+ - **依存関係**: なし
82
+ - **完了条件**: [テスト条件]が通ること(AC1.1を満たす)
83
+ - **対応設計**: design.md「[セクション名]」セクション
84
+ - **シナリオテスト**: なし(基盤構築タスク、UIフロー未実装のため)
85
+
86
+ - 1.1.2 [タスク名]
87
+ - サブタスク内容
88
+ - **要件**: Story 1
89
+ - **依存関係**: 1.1.1
90
+ - **完了条件**: [テスト条件]が通ること(AC1.2を満たす)
91
+ - **対応設計**: design.md「[セクション名]」セクション
92
+ - **シナリオテスト**: シナリオ1 Step 1-3(部分実行)
93
+
94
+ - [ ] 1.2 [タスクグループ名]
95
+
96
+ - 1.2.1 [タスク名]
97
+ - サブタスク内容
98
+ - **要件**: Story 2
99
+ - **依存関係**: 1.1
100
+ - **完了条件**: [テスト条件]が通ること(AC2.1を満たす)
101
+ - **対応設計**: design.md「[セクション名]」セクション
102
+ - **シナリオテスト**: シナリオ1 全Step(フル実行)
103
+
104
+ ### Phase 2: [フェーズ名]
105
+
106
+ - [ ] 2.1 [タスクグループ名]
107
+
108
+ - 2.1.1 [タスク名]
109
+ - サブタスク内容
110
+ - **要件**: Story 3
111
+ - **依存関係**: Phase 1完了
112
+ - **完了条件**: [テスト条件]が通ること(AC3.1を満たす)
113
+ - **対応設計**: design.md「[セクション名]」セクション
114
+ - **シナリオテスト**: シナリオ2 全Step
115
+ value: |
116
+ ### Phase 1: [フェーズ名]
117
+
118
+ - [ ] 1.1 [タスクグループ名]
119
+
120
+ - 1.1.1 [タスク名]
121
+ - [サブタスク内容]
122
+ - **要件**: Story 1
123
+ - **依存関係**: なし
124
+ - **完了条件**: [テスト条件](AC1.1を満たす)
125
+ - **対応設計**: design.md「[セクション名]」セクション
126
+ - **シナリオテスト**: なし(理由を記載)
127
+ validations:
128
+ required: true
@@ -410,7 +410,7 @@ export const { handlers, signIn, signOut, auth } = NextAuth(authOptions);
410
410
  - @docs/einja/memory/decisions.md - 過去の意思決定記録(セッション跨ぎで継承)
411
411
  - @docs/einja/memory/patterns.md - 再利用可能なパターン(セッション跨ぎで継承)
412
412
 
413
- <!-- @einja:template-exclude:start -->
413
+ <!-- @einja:excluded:start -->
414
414
  ## このリポジトリ限定の設定
415
415
 
416
416
  このセクションはテンプレート生成時に除外され、CLIで他リポジトリにコピーされません。
@@ -439,4 +439,4 @@ export const { handlers, signIn, signOut, auth } = NextAuth(authOptions);
439
439
  | `CLAUDE.md` | `scaffolds/CLAUDE.md.template` | **変換生成** |
440
440
 
441
441
  **コピー先のファイルは直接編集禁止**(ビルド時に上書きされる)
442
- <!-- @einja:template-exclude:end -->
442
+ <!-- @einja:excluded:end -->
@@ -168,11 +168,11 @@ function transformImports(content: string): string {
168
168
  }
169
169
 
170
170
  /**
171
- * @einja:template-exclude マーカーを除去し、除外後の空行・水平線をクリーンアップ
171
+ * @einja:excluded マーカーを除去し、除外後の空行・水平線をクリーンアップ
172
172
  */
173
173
  function removeExcludeMarkers(content: string): string {
174
174
  const excludePattern =
175
- /<!-- @einja:template-exclude:start -->[\s\S]*?<!-- @einja:template-exclude:end -->/g;
175
+ /<!-- @einja:excluded:start -->[\s\S]*?<!-- @einja:excluded:end -->/g;
176
176
  let result = content.replace(excludePattern, "");
177
177
 
178
178
  // 連続する水平線を1つに
@@ -190,7 +190,7 @@ function removeExcludeMarkers(content: string): string {
190
190
  function transformFileContent(filePath: string, content: string): string {
191
191
  const fileName = filePath.split("/").pop() || "";
192
192
 
193
- // ルートREADME.mdの変換(@einja:template-exclude マーカー除去)
193
+ // ルートREADME.mdの変換(@einja:excluded マーカー除去)
194
194
  if (filePath === "README.md") {
195
195
  return removeExcludeMarkers(content);
196
196
  }