From 53a134582a17d865dc2a806da9d13513a665a410 Mon Sep 17 00:00:00 2001 From: brendt Date: Tue, 23 Jun 2026 09:18:01 +0200 Subject: [PATCH 1/3] wip --- src/Tempest/Framework/Installers/AGENTS.md | 9 +++++++++ .../Framework/Installers/FrameworkInstaller.php | 10 ++++++++++ tests/Integration/Core/FrameworkInstallerTest.php | 8 ++++++++ 3 files changed, 27 insertions(+) create mode 100644 src/Tempest/Framework/Installers/AGENTS.md diff --git a/src/Tempest/Framework/Installers/AGENTS.md b/src/Tempest/Framework/Installers/AGENTS.md new file mode 100644 index 000000000..a2ae33a60 --- /dev/null +++ b/src/Tempest/Framework/Installers/AGENTS.md @@ -0,0 +1,9 @@ +## General + +- All documentation for Tempest can be found in vendor/tempest/framework/docs +- Use `php tempest make:` commands to create framework-specific classes. + +## Frontend + +- Use TailwindCSS +- Use Tempest view components where it makes sense \ No newline at end of file diff --git a/src/Tempest/Framework/Installers/FrameworkInstaller.php b/src/Tempest/Framework/Installers/FrameworkInstaller.php index 48edc7328..6ccdeaeb2 100644 --- a/src/Tempest/Framework/Installers/FrameworkInstaller.php +++ b/src/Tempest/Framework/Installers/FrameworkInstaller.php @@ -44,6 +44,16 @@ public function install(): void }, ); + $this->publish( + source: __DIR__ . '/AGENTS.md', + destination: root_path('AGENTS.md'), + callback: function (string $_, string $destination): void { + $claude = root_path('CLAUDE.md'); + + exec("ln -s {$destination} {$claude}"); + }, + ); + $this->updateComposer(); $this->console->call('discovery:generate'); diff --git a/tests/Integration/Core/FrameworkInstallerTest.php b/tests/Integration/Core/FrameworkInstallerTest.php index 1ea18b813..293b3cc75 100644 --- a/tests/Integration/Core/FrameworkInstallerTest.php +++ b/tests/Integration/Core/FrameworkInstallerTest.php @@ -56,6 +56,14 @@ public function test_it_can_force_install(): void path: '.env', content: file_get_contents(__DIR__ . '/../../../.env.example'), ) + ->assertFileExists( + path: 'AGENTS.md', + content: file_get_contents(__DIR__ . '/../../../src/Tempest/Framework/Installers/AGENTS.md'), + ) + ->assertFileExists( + path: 'CLAUDE.md', + content: file_get_contents(__DIR__ . '/../../../src/Tempest/Framework/Installers/AGENTS.md'), + ) ->assertCommandExecuted('composer up'); if (PHP_OS_FAMILY !== 'Windows') { From f373316f4d01ad51eed28e35f4c9b7606a25916c Mon Sep 17 00:00:00 2001 From: brendt Date: Tue, 23 Jun 2026 09:22:37 +0200 Subject: [PATCH 2/3] wip --- src/Tempest/Framework/Installers/FrameworkInstaller.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Tempest/Framework/Installers/FrameworkInstaller.php b/src/Tempest/Framework/Installers/FrameworkInstaller.php index 6ccdeaeb2..3853b17aa 100644 --- a/src/Tempest/Framework/Installers/FrameworkInstaller.php +++ b/src/Tempest/Framework/Installers/FrameworkInstaller.php @@ -50,6 +50,7 @@ public function install(): void callback: function (string $_, string $destination): void { $claude = root_path('CLAUDE.md'); + // @phpstan-ignore-next-line exec("ln -s {$destination} {$claude}"); }, ); From c3aa27dc7aeee97e85f170ce1303c63d6e8f6eb7 Mon Sep 17 00:00:00 2001 From: brendt Date: Tue, 23 Jun 2026 09:23:39 +0200 Subject: [PATCH 3/3] wip --- .../Framework/Installers/FrameworkInstaller.php | 6 ++++-- tests/Integration/Core/FrameworkInstallerTest.php | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Tempest/Framework/Installers/FrameworkInstaller.php b/src/Tempest/Framework/Installers/FrameworkInstaller.php index 3853b17aa..82e8e7011 100644 --- a/src/Tempest/Framework/Installers/FrameworkInstaller.php +++ b/src/Tempest/Framework/Installers/FrameworkInstaller.php @@ -50,8 +50,10 @@ public function install(): void callback: function (string $_, string $destination): void { $claude = root_path('CLAUDE.md'); - // @phpstan-ignore-next-line - exec("ln -s {$destination} {$claude}"); + if (PHP_OS_FAMILY !== 'Windows') { + // @phpstan-ignore-next-line + exec("ln -s {$destination} {$claude}"); + } }, ); diff --git a/tests/Integration/Core/FrameworkInstallerTest.php b/tests/Integration/Core/FrameworkInstallerTest.php index 293b3cc75..397a03365 100644 --- a/tests/Integration/Core/FrameworkInstallerTest.php +++ b/tests/Integration/Core/FrameworkInstallerTest.php @@ -60,14 +60,16 @@ public function test_it_can_force_install(): void path: 'AGENTS.md', content: file_get_contents(__DIR__ . '/../../../src/Tempest/Framework/Installers/AGENTS.md'), ) - ->assertFileExists( - path: 'CLAUDE.md', - content: file_get_contents(__DIR__ . '/../../../src/Tempest/Framework/Installers/AGENTS.md'), - ) ->assertCommandExecuted('composer up'); if (PHP_OS_FAMILY !== 'Windows') { $this->assertTrue(is_executable($this->installer->path('tempest'))); + + $this->installer + ->assertFileExists( + path: 'CLAUDE.md', + content: file_get_contents(__DIR__ . '/../../../src/Tempest/Framework/Installers/AGENTS.md'), + ); } }