Native first, then plugins, then our code: make the research order a rule with recorded findings
Back to our planProblem
The repo already says "framework first" (docs/guidelines/development.md, write-code → references/reuse.md, pr-review), but it's a suggestion with nothing to show it was followed. Account and email flows (email confirmation, password change) were built largely from scratch: the verification module is ~800 lines plus tests, and decision record 0009 rejected Payload's auth.verify without recording whether an official or open-source plugin, or a mailing service's double opt-in, was checked.
The owner wants a strict, ordered research ladder applied to every feature, with the findings written down.
Summary of the owner's direction (2026-10-22, Claude chat session, transcribed from voice):
Use everything native to the frameworks already in place, for example everything native in Payload. Where something isn't available natively, consider free plugins or add-ons that are official or well established, and go with Next.js and React. If the need is truly unique and has never been implemented anywhere, it becomes part of our own business-logic core layer.
"Check the native configuration, check the native features. And then if they are not there, look for the plugin that is official. If it's not there, look for a open source plugin that's even better than what we need if the official one doesn't work. And then use that. If none of it is there, only then we can write the code."
"This is going to be enterprise scale. If you see the design patterns, enterprise scale, that was intentional."
Proposed fix
AGENTS.md: a ground rule, "Native first, then plugins, then our code", linking to the guideline.docs/guidelines/development.md: replace "Framework First" with the ordered ladder (native config and features of Payload, Next.js, React → official plugins → well-established, free, open-source plugins, preferring one that does more than needed → our own code in the module's core layer), and the findings each step must record.write-code(SKILL.mdstep 1,references/reuse.md): the same ladder, and record findings on the issue.pr-review: the framework-first check needs the recorded findings; missing → changes requested..github/pull_request_template.md: the How prompt asks which native, official and open-source options were checked.- Unchanged on purpose: the enterprise layering. Plugin setup still goes in the owning module's
cms/; only code nothing else provides goes indomain/anduse-cases/.
Acceptance criteria
- Not done: The ladder is stated once in
docs/guidelines/development.md;AGENTS.md,write-codeandpr-reviewpoint to it rather than restating different versions. - Not done: Every new feature's issue (or PR How) records what each step found before custom code is written.
- Not done:
pr-reviewasks for changes when custom code lands without those findings. - Not done: Files stay under 250 lines; Prettier and the PR Policy check pass.
Area
tooling
Priority
High
Generated by Claude Code, opens in a new tab