Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/Tempest/Framework/Installers/AGENTS.md
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions src/Tempest/Framework/Installers/FrameworkInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ 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');

if (PHP_OS_FAMILY !== 'Windows') {
// @phpstan-ignore-next-line
exec("ln -s {$destination} {$claude}");
}
},
);

$this->updateComposer();

$this->console->call('discovery:generate');
Expand Down
10 changes: 10 additions & 0 deletions tests/Integration/Core/FrameworkInstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,20 @@ 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'),
)
->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'),
);
}
}

Expand Down
Loading