-
Notifications
You must be signed in to change notification settings - Fork 212
Closed
Labels
Description
Objective
Add string shortcut support for permissions in included files to match the UX of main workflows.
Context
Priority: HIGH
Category: UX Consistency / Feature Parity
Currently:
- Main Schema: Supports both string shortcuts (
"read-all","write-all","read","write") and object form - Included Schema: Only supports object form
This creates an inconsistent UX where users must use verbose object syntax in included files even for simple cases.
Approach
- Open
pkg/parser/schemas/included_file_schema.json - Locate the
permissionsfield definition - Change from single type to
oneOfarray with two options:- String enum:
["read-all", "write-all", "read", "write"] - Object form (existing definition)
- String enum:
- Match the structure from
main_workflow_schema.jsonpermissions.oneOf - Rebuild binary with
make build - Test with included files using string shortcuts
Files to Modify
- Update:
pkg/parser/schemas/included_file_schema.json- Change permissions from object-only to oneOf[string enum, object]
- Add string shortcuts:
read-all,write-all,read,write
Example
After this change, users should be able to write:
# included-security.md
---
permissions: read-all
---Instead of being forced to use:
---
permissions:
contents: read
issues: read
# ... 13 more properties
---Acceptance Criteria
- Included schema permissions field uses oneOf structure
- String shortcuts validate correctly:
read-all,write-all,read,write - Object form still works for granular permissions
- Schema structure matches main workflow schema
- Test workflows with string shortcuts compile successfully
Testing
Create test included file:
---
permissions: read-all
---Compile and verify no validation errors.
AI generated by Planning Assistant
Related to #7944
AI generated by Plan Command for discussion #7935
Reactions are currently unavailable