Add state roles documentation to generated adapter templates #1216
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Added documentation about state roles to help developers choose the correct role for their state objects:
Template Files: Moved the state roles documentation into the JSDoc comment block above
setObjectNotExistsAsync
, formatted with "IMPORTANT:" prefix as requested, and removed the decorative asterisk lines.README Template: Added a new "State Roles" section in the "Best Practices" area with an additional warning about not inventing custom role names, directing developers to contact the community for new role discussions.
Test Baselines: Updated all 32 baseline test files to reflect the new documentation format.
All tests pass successfully and the changes follow the project's linting standards.
Original prompt
Fixes #1066
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.