You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'content' => 'You are a helpful AI coding assistant focused on the Flight Framework for PHP. You are up to date with all your knowledge from https://docs.flightphp.com. As an expert into the programming language PHP, you are top notch at architecting out proper instructions for FlightPHP projects. Output a single AGENTS.md document only.',
70
+
],
71
+
['role' => 'user', 'content' => $prompt],
72
+
],
73
+
'temperature' => 0.2,
74
+
];
75
+
$jsonData = json_encode($data);
76
+
77
+
// add info line that this may take a few minutes
78
+
$io->info('Generating AI instructions, this may take a few minutes...', true);
You are an AI coding assistant. Update the following project instructions for this Flight PHP project based on the latest user answers. Only output the new instructions, no extra commentary.
119
-
User answers:
120
-
$detailsText
121
-
Current instructions:
122
-
$context
123
-
EOT; // phpcs:ignore
187
+
You are an AI coding assistant. Write or update project instructions for this Flight PHP project based on the latest user answers. Only output the new instructions (markdown suitable for AGENTS.md), no extra commentary.
124
188
125
-
// Read LLM creds
126
-
$creds = $runwayConfig['ai'];
127
-
$apiKey = $creds['api_key'];
128
-
$model = $creds['model'];
129
-
$baseUrl = $creds['base_url'];
189
+
Conventions to encode in the instructions (unless the user answers clearly contradict them):
190
+
- Use App\\ namespaces: App\\Controller, App\\Middleware, App\\Model, App\\Utils, App\\Command
191
+
- Controllers live in app/Controller/; inject flight\\Engine and other services via the DI container (Dice). Do not use the Flight:: facade in the app layer.
192
+
- Prefer flight\\database\\SimplePdo for database access (PdoWrapper is deprecated). Use ActiveRecord for models when an ORM is needed.
193
+
- Prefer Twig for HTML views when a templating engine is used.
194
+
- AGENTS.md is the sole AI instruction surface (no separate Copilot/Cursor/Gemini/Windsurf rule files). Scoped AGENTS.md files under app/ directories are fine when useful.
195
+
- Keep Flight simple and fast; avoid unnecessary abstractions.
130
196
131
-
// Prepare curl call (OpenAI compatible)
132
-
$headers = [
133
-
'Content-Type: application/json',
134
-
'Authorization: Bearer ' . $apiKey,
135
-
];
136
-
$data = [
137
-
'model' => $model,
138
-
'messages' => [
139
-
[
140
-
'role' => 'system',
141
-
'content' => 'You are a helpful AI coding assistant focused on the Flight Framework for PHP. '
142
-
. 'You are up to date with all your knowledge from https://docs.flightphp.com. '
143
-
. 'As an expert into the programming language PHP, '
144
-
. 'you are top notch at architecting out proper instructions for FlightPHP projects.'
145
-
],
146
-
['role' => 'user', 'content' => $prompt],
147
-
],
148
-
'temperature' => 0.2,
149
-
];
150
-
$jsonData = json_encode($data);
197
+
User answers:
198
+
$detailsText
199
+
Current instructions:
200
+
$context
201
+
EOT;
202
+
// phpcs:enable Generic.Files.LineLength
151
203
152
-
// add info line that this may take a few minutes
153
-
$io->info('Generating AI instructions, this may take a few minutes...', true);
0 commit comments