Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Agents
taldres/laravel-immutable-attributes
claude-code
cursor
model
attributes
laravel
eloquent
immutable
data-integrity

This repository is a Laravel package. Keep the package focused, idiomatic, and easy for Laravel developers to install, test, and maintain.

Install
php artisan boost:add-skill taldres/laravel-immutable-attributes

Save this content to: AGENTS.md

# Laravel Immutable Attributes

This repository is a Laravel package. Keep the package focused, idiomatic, and easy for Laravel developers to install, test, and maintain.

## Package Conventions

- Use Laravel-native package APIs and the existing service provider shape before adding abstractions.
- Keep package names, namespaces, Composer metadata, documentation, and examples aligned with `taldres/laravel-immutable-attributes`.
- Add only the files and dependencies needed for the package behavior being implemented.
- Prefer explicit Laravel package code over helper abstractions unless the extension point is real.
- Keep tests focused on observable package behavior through public APIs and documentation promises.

## Project Rules

- Code, comments, commit messages and docs are in English. Comments only explain a non-obvious why.
- The package is two model traits, a builder with its trait, two attributes and two exceptions. It has no service provider, config, migrations or routes; keep it that way unless a feature cannot work without one.
- `GuardsImmutableAttributes` covers the model's save path only. Eloquent builder writes are guarded only for a model that opts in with `GuardsImmutableQueries`. `DB::table()`, `toBase()` and raw SQL stay unguarded on purpose, as the escape hatch for deliberate corrections.
- Every write path the README lists as guarded or not guarded has a test that pins it.
- Write the implementation from Laravel's own APIs. Do not copy code from other immutability packages or from closed framework pull requests.

## Attribution

- Do not add `Co-authored-by:` trailers to commits.
- Do not add any other AI attribution, such as "Generated with ..." lines, to commit messages or pull request descriptions.
- Commits are authored by the configured git user only.

## Laravel Boost

This package is developed with [Laravel Boost](https://laravel.com/docs/boost).

- Before changes that depend on Laravel behavior, search the documentation with the Boost `search-docs` tool. The MCP
  server is configured in `.mcp.json` and runs through Testbench in the local environment:
  `APP_ENV=local APP_DEBUG=true vendor/bin/testbench boost:mcp`. Boost only runs when the environment is `local`.
- The Boost skills of the package live in `resources/boost/skills`; the `package-generate-skill` skill updates them.

## Quick Commands

- Full validation: `composer test`
- Formatting check: `composer lint:check`
- Static analysis: `composer analyse`
- Pest tests: `composer test:unit`

## Local Skills

- `package-scaffold`: use when adding package capabilities or wiring them through the service provider, including commands, migrations, routes, config, views, translations, assets, middleware, publish tags, workbench files, and console-only behavior.
- `package-testing`: use when adding or changing package tests with Pest 4/5 and Orchestra Testbench.
- `package-release`: use when preparing changelog, release notes, tags, or GitHub release workflow changes.
- `package-pull-request`: use when opening, titling, labelling or describing a pull request; the title becomes a line of the release notes and the label picks its section.
- `package-compatibility`: use when reviewing code, dependencies, or CI against the PHP and Laravel support matrix.
- `package-generate-skill`: use when updating the bundled Boost skill from the package implementation, README, and examples.

Laravel Immutable Attributes

This repository is a Laravel package. Keep the package focused, idiomatic, and easy for Laravel developers to install, test, and maintain.

Package Conventions

  • Use Laravel-native package APIs and the existing service provider shape before adding abstractions.
  • Keep package names, namespaces, Composer metadata, documentation, and examples aligned with taldres/laravel-immutable-attributes.
  • Add only the files and dependencies needed for the package behavior being implemented.
  • Prefer explicit Laravel package code over helper abstractions unless the extension point is real.
  • Keep tests focused on observable package behavior through public APIs and documentation promises.

Project Rules

  • Code, comments, commit messages and docs are in English. Comments only explain a non-obvious why.
  • The package is two model traits, a builder with its trait, two attributes and two exceptions. It has no service provider, config, migrations or routes; keep it that way unless a feature cannot work without one.
  • GuardsImmutableAttributes covers the model's save path only. Eloquent builder writes are guarded only for a model that opts in with GuardsImmutableQueries. DB::table(), toBase() and raw SQL stay unguarded on purpose, as the escape hatch for deliberate corrections.
  • Every write path the README lists as guarded or not guarded has a test that pins it.
  • Write the implementation from Laravel's own APIs. Do not copy code from other immutability packages or from closed framework pull requests.

Attribution

  • Do not add Co-authored-by: trailers to commits.
  • Do not add any other AI attribution, such as "Generated with ..." lines, to commit messages or pull request descriptions.
  • Commits are authored by the configured git user only.

Laravel Boost

This package is developed with Laravel Boost.

  • Before changes that depend on Laravel behavior, search the documentation with the Boost search-docs tool. The MCP server is configured in .mcp.json and runs through Testbench in the local environment: APP_ENV=local APP_DEBUG=true vendor/bin/testbench boost:mcp. Boost only runs when the environment is local.
  • The Boost skills of the package live in resources/boost/skills; the package-generate-skill skill updates them.

Quick Commands

  • Full validation: composer test
  • Formatting check: composer lint:check
  • Static analysis: composer analyse
  • Pest tests: composer test:unit

Local Skills

  • package-scaffold: use when adding package capabilities or wiring them through the service provider, including commands, migrations, routes, config, views, translations, assets, middleware, publish tags, workbench files, and console-only behavior.
  • package-testing: use when adding or changing package tests with Pest 4/5 and Orchestra Testbench.
  • package-release: use when preparing changelog, release notes, tags, or GitHub release workflow changes.
  • package-pull-request: use when opening, titling, labelling or describing a pull request; the title becomes a line of the release notes and the label picks its section.
  • package-compatibility: use when reviewing code, dependencies, or CI against the PHP and Laravel support matrix.
  • package-generate-skill: use when updating the bundled Boost skill from the package implementation, README, and examples.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package