Possible to use a rule as a fact in another rule?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- backend
Research direction
The issue names no files, tests, or entry points. Start by locating the rule and fact evaluation paths, then clarify how a rule referenced as a fact should be evaluated; done means Rule 2 can reuse Rule 1 without duplicating Field A and existing behavior remains covered.
Written by the indexing model from the issue text.
Description
We're working on better decomposing our facts and rules, and have found that (due to our data model hierarchy), we're having to re-stipulate the same facts in multiple rules. Is it possible to use a rule as a fact in another rule so we can avoid having to copy/paste fact statements into multiple rules which is tedious and error prone?
For example, if Rule 1 states that FieldA must be true, and Rule 2 states that Field A must be true and Field B must be false, is it possible to construct Rule 2 such that Rule 1 must be true and Field B must be false?
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 507
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CacheControl/json-rules-engine
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
CacheControl/json-rules-engine#427 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
CacheControl/json-rules-engine#424 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
CacheControl/json-rules-engine#421 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
CacheControl/json-rules-engine#417 · 1 reaction ·
All issues in CacheControl/json-rules-engine
Similar issues
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
DavidAnson/markdownlint-cli2#940 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficulty 2/5 1-3 hours Newbie friendliness 90/100