Skip to content

Commit 40d6400

Browse files
committed
Add usage instructions for prompt files in docs/prompts/ for Ray.InputQuery
1 parent fdb1bd3 commit 40d6400

File tree

2 files changed

+119
-0
lines changed

2 files changed

+119
-0
lines changed

docs/prompts/README.ja.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# docs/prompts/ のプロンプトファイルの使い方
2+
3+
このディレクトリには、Ray.InputQueryのInputクラス自動生成や利用例生成のためのプロンプトが格納されています。
4+
5+
## 使い方
6+
7+
### input-class-generator.md
8+
-
9+
- Inputクラスの自動生成やリファクタリングをAIに依頼する際に、このプロンプトを与えてください。
10+
- 既存のフラットなパラメータリストを構造化されたInputオブジェクトへ変換したい場合に活用します。
11+
- 例:
12+
13+
- ```html
14+
<!-- このHTMLフォームからInputクラスを生成してください -->
15+
<form>
16+
<input name="user_name" type="text">
17+
<input name="user_email" type="email">
18+
<input name="order_id" type="number">
19+
<input name="order_total" type="number">
20+
</form>
21+
```
22+
23+
### usage-generator.md
24+
-
25+
- Inputクラスの利用例や、Ray.MediaQuery・BEAR.Resourceとの連携例をAIに生成させたい場合に、このプロンプトを与えてください。
26+
- Inputクラスの使い方や実装例を知りたい場合に活用します。
27+
- 例:
28+
29+
```php
30+
final class UserRegistrationInput
31+
{
32+
public function __construct(
33+
#[Input] public readonly AccountInput $account,
34+
#[Input] public readonly ProfileInput $profile,
35+
#[Input] public readonly PreferencesInput $preferences
36+
) {}
37+
}
38+
39+
final class AccountInput
40+
{
41+
public function __construct(
42+
#[Input] public readonly string $email,
43+
#[Input] public readonly string $password,
44+
#[Input] public readonly string $passwordConfirm
45+
) {}
46+
}
47+
48+
final class ProfileInput
49+
{
50+
public function __construct(
51+
#[Input] public readonly string $firstName,
52+
#[Input] public readonly string $lastName,
53+
#[Input] public readonly ?string $displayName = null
54+
) {}
55+
}```
56+
57+
---
58+
59+
これらのプロンプトは、Ray.InputQueryの導入・活用・リファクタリング・ドキュメント生成など、AIを活用した開発支援に役立ちます。

docs/prompts/README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# How to Use Prompt Files in docs/prompts/
2+
3+
This directory contains prompts for automatic generation of Ray.InputQuery Input classes and usage examples.
4+
5+
## Usage
6+
7+
### input-class-generator.md
8+
9+
- Use this prompt when asking AI to automatically generate Input classes or perform refactoring.
10+
- Helpful when converting existing flat parameter lists into structured Input objects.
11+
- Example:
12+
13+
```html
14+
<!-- Generate Input classes from this HTML form -->
15+
<form>
16+
<input name="user_name" type="text">
17+
<input name="user_email" type="email">
18+
<input name="order_id" type="number">
19+
<input name="order_total" type="number">
20+
</form>
21+
```
22+
23+
### usage-generator.md
24+
25+
- Use this prompt when asking AI to generate usage examples of Input classes or integration examples with Ray.MediaQuery and BEAR.Resource.
26+
- Helpful when you want to know how to use Input classes or see implementation examples.
27+
- Example:
28+
29+
```php
30+
final class UserRegistrationInput
31+
{
32+
public function __construct(
33+
#[Input] public readonly AccountInput $account,
34+
#[Input] public readonly ProfileInput $profile,
35+
#[Input] public readonly PreferencesInput $preferences
36+
) {}
37+
}
38+
39+
final class AccountInput
40+
{
41+
public function __construct(
42+
#[Input] public readonly string $email,
43+
#[Input] public readonly string $password,
44+
#[Input] public readonly string $passwordConfirm
45+
) {}
46+
}
47+
48+
final class ProfileInput
49+
{
50+
public function __construct(
51+
#[Input] public readonly string $firstName,
52+
#[Input] public readonly string $lastName,
53+
#[Input] public readonly ?string $displayName = null
54+
) {}
55+
}
56+
```
57+
58+
---
59+
60+
These prompts are useful for AI-assisted development support including introduction, utilization, refactoring, and documentation generation for Ray.InputQuery.

0 commit comments

Comments
 (0)