Files
InvoiceShelf/bin/ai-docs.php
Darko Gjorgjijoski b283f08d2c chore: drop Laravel Boost; make AGENTS.md the canonical agent doc
- Remove laravel/boost (+ its deps laravel/mcp, laravel/roster) and Boost's
  .cursor/ skills + MCP registration. No version sweep (composer remove).
- AGENTS.md is now the hand-maintained source of truth (was Boost-generated):
  folds in the CLAUDE.md content + a Conventions section codifying the migration
  FK rule (unsignedInteger for INT-PK refs, not foreignId — MySQL error 3780)
  and the MySQL/PostgreSQL/SQLite cross-DB requirement.
- CLAUDE.md / GEMINI.md / .github/copilot-instructions.md are now gitignored
  symlinks to AGENTS.md, created by bin/ai-docs.php (composer run ai-docs, also
  wired into post-autoload-dump).
2026-06-12 17:06:34 +02:00

32 lines
842 B
PHP

<?php
/*
* Creates the per-tool agent docs as symlinks to the canonical AGENTS.md.
* These symlinks are gitignored; this runs from composer's post-autoload-dump
* (and can be run manually via `composer run ai-docs`).
*/
chdir(__DIR__.'/..');
$links = [
'CLAUDE.md' => 'AGENTS.md',
'GEMINI.md' => 'AGENTS.md',
'.github/copilot-instructions.md' => '../AGENTS.md',
];
@mkdir('.github');
foreach ($links as $link => $target) {
if (is_link($link)) {
continue;
}
if (file_exists($link)) {
@unlink($link); // replace a stale regular file (e.g. the old committed CLAUDE.md)
}
if (@symlink($target, $link)) {
echo "ai-docs: linked {$link} -> {$target}\n";
} else {
fwrite(STDERR, "ai-docs: could not symlink {$link} (symlinks may require privileges on Windows)\n");
}
}