Rule & policy
One implementation, different project limits
A rule knows how to check something. Its policy decides whether it runs, its settings, severity and blocking behaviour. Two projects can use the same assembly with different file-size budgets, without forking the code. This makes the validation logic independently testable and lets pipeline owners change requirements without rebuilding the tool.
{
"schemaVersion": 1,
"pipeline": "projecta",
"rules": {
"core.presubmit.large-file": {
"settings": {
"maxBytes": 5242880
}
}
},
"targets": {
"win64": {
"rules": {
"core.presubmit.large-file": {
"settings": {
"maxBytes": 2621440
}
}
}
}
}
}Without an explicit target, maxBytes is 5,242,880 (5 MiB). With --platform win64, it becomes 2,621,440 (2.5 MiB). The C# implementation stays the same; the requirement changes. This excerpt illustrates parameter selection without reproducing the distribution manifest.