-
Notifications
You must be signed in to change notification settings - Fork 7
add work scope logic expressions #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a453f7a
add ops for workscope logic model
holkexyz c2587b5
update schemas.md and ERD
holkexyz 345d8ab
fix ordering of required fields
holkexyz 3fea1db
rename workScopeExpr.md to workScopeExpr.json
holkexyz ff67b0b
chore: regenerate after rename
holkexyz 129ec98
Merge branch 'develop' into add-ops-schema-for-work-scope-logic-model
holkexyz 6467d84
add knownValues to ops, add workScopeExpr to ERD, update changeset
holkexyz 4d28df3
regenerate SCHEMAS.md
holkexyz 5c982e8
update README workScope example to reflect workScopeExpr and ops options
holkexyz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- | ||
| "@hypercerts-org/lexicon": minor | ||
| --- | ||
|
|
||
| Add work scope logic lexicons (ops and workScopeExpr) | ||
|
|
||
| **New Features:** | ||
|
|
||
| - **New lexicon (`org.hypercerts.helper.ops`):** | ||
| - Operator node record type for work scope logic expressions | ||
| - Supports nested boolean logic operations (AND, OR, NOT) | ||
| - Fields: | ||
| - `op` (required): Operator identifier with knownValues `'all'`, `'any'`, `'not'` | ||
| - `args` (required): Array of strongRefs pointing to `org.hypercerts.helper.workScopeTag` (leaf atoms) or other `org.hypercerts.helper.ops` records (nested expressions) | ||
| - `createdAt` (required): Client-declared timestamp | ||
| - Enables complex work scope logic by allowing operators to reference other operators or scope tags recursively | ||
| - Operator semantics are defined by consuming applications | ||
|
|
||
| - **New lexicon (`org.hypercerts.helper.workScopeExpr`):** | ||
| - A flat boolean expression for simple work-scope definitions: (ALL allOf) AND (ANY anyOf) AND (NONE noneOf) | ||
| - Covers the majority of practical scope definitions without recursion | ||
| - Fields: | ||
| - `version` (required): Schema version integer (start with 1) | ||
| - `label`: Optional short human-readable label for UI display | ||
| - `description`: Optional longer explanation of scope intent | ||
| - `allOf`: Array of strongRefs — all must match for in-scope | ||
| - `anyOf`: Array of strongRefs — at least one must match | ||
| - `noneOf`: Array of strongRefs — none may match (exclusion) | ||
| - `createdAt` (required): Client-declared timestamp | ||
| - An empty expression (all arrays absent/empty) represents an unconstrained scope | ||
|
|
||
| **Usage:** | ||
|
|
||
| The `org.hypercerts.helper.ops` and `org.hypercerts.helper.workScopeExpr` lexicons work together with `org.hypercerts.helper.workScopeTag` to define work scope logic. Use `workScopeExpr` for simple flat include/exclude/require patterns, and `ops` for full nested boolean logic. Both can be referenced via strongRefs in activity records' `workScope` field. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createdAtdescription is inconsistent with the rest of the document.Every other lexicon uses
"Client-declared timestamp when this record was originally created"for this field. Line 307 uses"Timestamp when this work-scope expression was created."which deviates from the established pattern.🔧 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents