A new Laravel application can record project rules as the team makes decisions. An established application already has years of conventions encoded in its controllers, models, tests, directory structure, and deliberate absences.

When a team installs Laravel Boost, either the codebase or the humans have to supply context on that history. Our goal at Laravel is to provide the best developer experience across everything we touch, and it felt less than ideal to offer teams no help documenting their existing conventions.

In that pursuit, we tried two methods: deterministic extractors and an extraction skill.

My first attempt was the hand-written detectors. The implementation was fast and deterministic, but it also recorded patterns with very different levels of value. The version we kept uses an agent skill to collect evidence and lets the developer approve each proposed rule.