
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Rules suck unless when designing system because you remember that bug that was causing clients to get denied and cost you a week of sleep? Pepperidge Farm remembers.
Don't be hip be a square and make some rules now.
Note - You need use the defined ruleName as the key of your rule object inside the config
Possible comparisons method avaliable
CompareTwo(dataItemPath, dataItemTwoPath, operand)
- Compare two values aganist eachother.
{
ruleName: "Bounds Example",
...,
dataItemPath: 'a',
dataItemTwoPath: 'b',
operand: '===',
...
}
//When using >, <, <=, >= you should use number types, strings will use the length of the string as the comparison number
{
ruleName: "Bounds Example",
...,
dataItemPath: 'a',
dataItemTwoPath: 'b.c',
operand: '>',
...
}
CompareBounds(dataItemPath, lowerBound, upperBound, operand?)
- Check if a number is within a given range
//Examples
{
ruleName: "Bounds Example",
...,
lowerBound: 10,
upperBound: 30,
dataItemPath: 'a',
operand: '>=', //for this type any of >=, <=, >, < these but it only checks for the = sign
... //it will always evaluate as lowerBound </= dataItem </= upperBound
}
CompareBaseline(dataItemPath, baseline, operand)
- Compare a number or a list of numbers aganist of constant (baseline)
Can be used on a collection (Array<nummber>
)
Will evaluate in this order dataItem operand baseline
keep this in mind when defining your rule configs
{
ruleName: "Bounds Example",
...,
dataItemPath: 'a.b', //Equal 60 here
baseline: 100,
operand: '<=' // dataItem <= baseline or 60 <= 100 === true
}
CompareBaselineTolerance(dataItem, baseline, tolerance, operand?)
- Checks if a given value is within a given tolerance,
Example
100 is greater than or equal 60 +/-10%
or in number form54 < 100 || 66 < 100
{
ruleName: "Bounds Example",
...,
dataItemPath: 'a.b', //Equal 200 here
baseline: 100,
tolerance: 10, // will be 10%
operand: '<=' // baseline - 10% <= dataItem <= baseline + 10% or 90 <= 200 || 110 <= 200
}
If you need to compare some more complex information or just a larger number of data items you can chain existing rules together using dependent rules.
Accepted operators
- &&
and ||
Example
{
ruleName: "Test Dependent Rule",
operand: "&&", // || is the only other accepted operator,
ruleNames: ["RuleOne","RuleTwo"]
}
This repo is named after my dog who recently passed away. A dog who didn't listen to shit or follow the rules and I name a rule validation, seems fitting to me.
RIP buddy 2008-2020
FAQs
basic rules engine
The npm package aries-js receives a total of 1 weekly downloads. As such, aries-js popularity was classified as not popular.
We found that aries-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.