Skip to content

AI assistants

AI assistants

The package ships context for AI coding assistants at three levels, so the telemetry your assistant writes follows the conventions instead of inventing its own.

If the application uses Laravel Boost, our guidelines are picked up automatically: the package ships .ai/guidelines/telemetry.blade.php, which php artisan boost:install composes into the application's AI context alongside the framework guidelines.

The guideline teaches the assistant: which instrument fits which job, naming and cardinality rules, that telemetry never throws (no defensive try/catch), auto-instrumentation boundaries (don't hand-roll request/job spans), Telemetry::fake() in tests, and the provider pattern for packages.

Copy-paste agent prompts

Several documentation pages end with an Agent prompt block — a self-contained task you can paste straight into your assistant:

Task Where
Install & configure the package Installation
Instrument the app's key flows Quickstart
Wire the log channel into the stack Logs
Add telemetry to your own package Providers
Connect to the Grafana stack Grafana stack

Each prompt encodes the guardrails (bounded labels, no defensive try/catch, don't re-instrument what's automatic, verify with tests) so the result follows the conventions even if the assistant never reads the rest of the docs.

llms.txt

The repo root contains an llms.txt index mapping every documentation page with a one-line description. Point any assistant at it for retrieval:

Read vendor/cboxdk/laravel-telemetry/llms.txt and follow links as needed.

Working on this package itself

Contributors get AGENTS.md (mirrored by CLAUDE.md) at the repo root: commands, architecture map and the eight invariants (never-throw, no-KEYS/SCAN, shared-store state, distinct push/pull shapes, full traceparent propagation, zero-cost-disabled, one naming vocabulary, OTLP JSON rules) plus pointers to the ADRs.

Keeping it honest

.ai/guidelines/, llms.txt and AGENTS.md are part of the public surface: PRs that change the API must update them (see CONTRIBUTING).