body method

  1. @override
String body(
  1. String path,
  2. String baseName,
  3. String className
)
override

Defines the actual body code. path is passed relative to lib, baseName is the filename, and className is the filename converted to Pascal case.

実際の本体コードを定義します。pathlibからの相対パス、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: checkboxes
  id: feature-type
  attributes:
    label: 実施対象(複数選択可)
    description: 実施が必要なコンポーネントを選択してください
    options:
      - label: Page設計書の作成
      - label: Model設計書の作成
      - label: Theme設計書の作成
      - label: MetaData設計書の作成
      - label: Plugin設計書の作成
      - label: Controller設計書の作成
      - label: Widget設計書の作成
      - label: MetaDataの実装
      - label: Pluginの実装
      - label: Themeの実装
      - label: Modelの実装
      - label: Controllerの実装
      - label: Widgetの実装
      - label: Pageの実装
      - label: Routerの実装
      - label: モックデータの実装
      - label: Controllerのテストの実装
      - label: Widgetのテストの実装
      - label: Pageのテストの実装

- 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. `documents/rules/designs/design.md`を参考に要件定義から各種設計書を作成。
      2. 作成した各種設計書を元に`documents/rules/impls/impls.md`を参考にしながらアプリケーションの開発を実施。
      3. `documents/rules/tests/tests.md`を参考にしながら各種テストを実施。
      4. `flutter analyze && dart run custom_lint`を実行してErrorやWarningがないか確認。ErrorやWarningが発生していた場合は修正を実施して再度実行。ErrorやWarningがなくなるまで繰り返す。
      5. `katana test update`を実行してゴールデンテスト用のスクリーンショット画像を作成。
      6. `katana test run`を実行してテストが全てパスするか確認。
      7. `katana git commit`を実行して変更をコミット。
      8. `katana git pull_request`を実行してPRを作成、既存のPRがある場合は`katana git pull_request_comment`でコメントを追加。
  validations:
    required: true
""";
}