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
No Comments
vinceamstoutz/symfony-security-auditor
cursor
code-style
comments
refactoring
self-documenting-code
mutation-testing
clean-code
docblocks

A comment is a symptom of code that doesn't speak for itself. Before writing one, fix the code instead.

Install
php artisan boost:add-skill vinceamstoutz/symfony-security-auditor

Save this content to: .cursor/rules/no-comments.md

# No-Comments Rule

A comment is a symptom of code that doesn't speak for itself. Before writing one, fix the code instead.

## Default: no comment

Do not write `//` comment blocks in production or test code. Self-documenting names beat prose every time.

## When tempted to comment, do this instead

| Temptation | Fix |
| --- | --- |
| Explain what a block does | Extract a method with a descriptive name |
| Explain why a value was chosen | Introduce a named constant |
| Explain an algorithm step | Extract + name each step as a private method |
| Pin a mutation-test rationale in a test | Write the assertion so its failure message is clear |
| Explain an `if` condition | Extract a predicate method (`isSingleBalancedBlock`) |

## Allowed (rare, one line only)

A single `//` line is acceptable only for an **external constraint** that truly cannot be expressed in code and would take a reader hours to rediscover:

- A provider quirk not documented in their public API (e.g. a model that rejects a standard option).
- A PCRE engine edge-case that forces an unusual operator.
- A regulatory or third-party requirement that drives a non-obvious choice.

Even then: one line, no multi-sentence prose.

## Never

- Multi-line `//` blocks explaining design rationale.
- "Mutation-pinning" comments in tests (`// Pins the X mutant — removing this assertion allows Y`). If the test name and assertion are clear, the pin is implicit.
- Commented-out code.
- Redundant docblocks on `final readonly` classes that just repeat the constructor parameters.

No-Comments Rule

A comment is a symptom of code that doesn't speak for itself. Before writing one, fix the code instead.

Default: no comment

Do not write // comment blocks in production or test code. Self-documenting names beat prose every time.

When tempted to comment, do this instead

Temptation Fix
Explain what a block does Extract a method with a descriptive name
Explain why a value was chosen Introduce a named constant
Explain an algorithm step Extract + name each step as a private method
Pin a mutation-test rationale in a test Write the assertion so its failure message is clear
Explain an if condition Extract a predicate method (isSingleBalancedBlock)

Allowed (rare, one line only)

A single // line is acceptable only for an external constraint that truly cannot be expressed in code and would take a reader hours to rediscover:

  • A provider quirk not documented in their public API (e.g. a model that rejects a standard option).
  • A PCRE engine edge-case that forces an unusual operator.
  • A regulatory or third-party requirement that drives a non-obvious choice.

Even then: one line, no multi-sentence prose.

Never

  • Multi-line // blocks explaining design rationale.
  • "Mutation-pinning" comments in tests (// Pins the X mutant — removing this assertion allows Y). If the test name and assertion are clear, the pin is implicit.
  • Commented-out code.
  • Redundant docblocks on final readonly classes that just repeat the constructor parameters.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console