body method
Defines the actual body code. path is passed relative to lib, baseName is the filename, and className is the filename converted to Pascal case.
実際の本体コードを定義します。pathにlibからの相対パス、baseNameにファイル名が渡され、classNameにファイル名をパスカルケースに変換した値が渡されます。
Implementation
@override
String body(String path, String baseName, String className) {
return """
name: 🚀 新規機能の追加
description: 新しい機能やページを作成・追加する際に使用してください
title: "[機能追加] "
labels: ["enhancement", "new-feature"]
body:
- type: markdown
attributes:
value: |
## 新規機能追加依頼
この テンプレートは新しい機能やページを追加する際に使用してください。
Masamuneフレームワークの設計手順に従って実装を行います。
- type: textarea
id: requirements
attributes:
label: 要件定義
description: 実装に必要な詳細な要件を記載してください
placeholder: |
## 機能要件
- [ ] 機能1の説明
- [ ] 機能2の説明
## 非機能要件
- [ ] パフォーマンス要件
- [ ] セキュリティ要件
## UI/UX要件
- [ ] デザイン要件
- [ ] ユーザビリティ要件
validations:
required: true
- type: textarea
id: additional-info
attributes:
label: 補足情報
description: その他の重要な情報があれば記載してください
placeholder: |
- 参考資料のURL
- 関連するIssueのリンク
- 技術的な制約
- 外部依存関係
- type: textarea
id: instructions
attributes:
label: 作業実施の手順やルール
description: ClaudeCodeに依頼する作業実施の手順やルールを記載してください
value: |
@claude
下記の手順やルールに従って、上記の内容の実施を行ってください。
### 作業実施のルール
- FlutterおよびMasamuneフレームワークのルールに従って実施。
- `requirements.md`の代わりに上記の要件定義を参考にアプリケーションの開発を実施。
- `設計書`の作成手順は`documents/rules/designs/**/*.md`を参考に実施。
- `実装`の手順は`documents/rules/impls/**/*.md`を参考に実施。
- `テスト`の手順は`documents/rules/tests/**/*.md`を参考に実施。
- その他、FlutterおよびMasamuneフレームワークの実装のルールや手順については`documents/rules/docs/**/*.md`を参考にする。
- コーディングについては`flutter analyze && dart run custom_lint`を実行しながらErrorやWarningが発生しないように開発を実施。
- PageやWidgetはのアプリケーションUIについては`katana test update`を実行してスクリーンショット画像を作成し、それを確認しながら開発を実施。
- 変更のコミットは`katana git commit`を利用して実施。
- PRの作成は`katana git pull_request`、PRへのコメントは`katana git pull_request_comment`を利用して実施。
### 作業実施の手順
1. 要件定義から実装を実施。
- 実装中に`flutter analyze && dart run custom_lint`や`katana test update`を実行してエラーがないか確認しながら1つずつ実装。
2. `flutter analyze && dart run custom_lint`を実行してErrorやWarningがないか確認。ErrorやWarningが発生していた場合は修正を実施して再度実行。ErrorやWarningがなくなるまで繰り返す。
3. 画面の作成や変更を行った場合は`katana test update`を実行してゴールデンテスト用のスクリーンショット画像を更新。
4. `katana test run`を実行してテストが全てパスするか確認。
5. `katana git commit`を実行して変更をコミット。
6. `katana git pull_request`を実行してPRを作成、既存のPRがある場合は`katana git pull_request_comment`でコメントを追加。
validations:
required: true
""";
}