From 53d422001e858f4baee86818c0e9d6e373ae29d2 Mon Sep 17 00:00:00 2001 From: n0nag0n Date: Fri, 26 Jun 2026 08:09:06 -0600 Subject: [PATCH] feat(ai): generate AGENTS.md in ai:generate-instructions command Also write project AI instructions to AGENTS.md alongside the existing copilot, cursor, gemini, and windsurf output files. --- flight/commands/AiGenerateInstructionsCommand.php | 3 ++- tests/commands/AiGenerateInstructionsCommandTest.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/flight/commands/AiGenerateInstructionsCommand.php b/flight/commands/AiGenerateInstructionsCommand.php index c96d633..7cd9aa1 100644 --- a/flight/commands/AiGenerateInstructionsCommand.php +++ b/flight/commands/AiGenerateInstructionsCommand.php @@ -167,7 +167,7 @@ class AiGenerateInstructionsCommand extends AbstractBaseCommand $io->info( 'Updating .github/copilot-instructions.md, ' . '.cursor/rules/project-overview.mdc, ' - . '.gemini/GEMINI.md and .windsurfrules...', + . '.gemini/GEMINI.md, .windsurfrules and AGENTS.md...', true ); @@ -184,6 +184,7 @@ class AiGenerateInstructionsCommand extends AbstractBaseCommand file_put_contents($this->projectRoot . '.cursor/rules/project-overview.mdc', $instructions); file_put_contents($this->projectRoot . '.gemini/GEMINI.md', $instructions); file_put_contents($this->projectRoot . '.windsurfrules', $instructions); + file_put_contents($this->projectRoot . 'AGENTS.md', $instructions); $io->ok('AI instructions updated successfully.', true); return 0; } diff --git a/tests/commands/AiGenerateInstructionsCommandTest.php b/tests/commands/AiGenerateInstructionsCommandTest.php index 4dce7c7..2b16ab8 100644 --- a/tests/commands/AiGenerateInstructionsCommandTest.php +++ b/tests/commands/AiGenerateInstructionsCommandTest.php @@ -167,6 +167,7 @@ class AiGenerateInstructionsCommandTest extends TestCase $this->assertFileExists($this->baseDir . '.cursor/rules/project-overview.mdc'); $this->assertFileExists($this->baseDir . '.gemini/GEMINI.md'); $this->assertFileExists($this->baseDir . '.windsurfrules'); + $this->assertFileExists($this->baseDir . 'AGENTS.md'); } public function testNoInstructionsReturnedFromLlm()