Problem
customPoliciesPath is a single string in the config — only one custom
policy file can be registered at a time.
If a user tries to add a second file (e.g. a team-shared policy file
alongside a personal one), running failproofai policies --install -c ./new-policies.js overwrites the existing path. There is no way to
load hooks from two separate files simultaneously.
Additionally, scope merging in hooks-config.ts uses a "first scope wins"
strategy — so even across user/project/local scopes, only one
customPoliciesPath ever takes effect.
Expected behaviour
Users should be able to register multiple custom policy files:
Problem
customPoliciesPathis a single string in the config — only one custompolicy file can be registered at a time.
If a user tries to add a second file (e.g. a team-shared policy file
alongside a personal one), running
failproofai policies --install -c ./new-policies.jsoverwrites the existing path. There is no way toload hooks from two separate files simultaneously.
Additionally, scope merging in hooks-config.ts uses a "first scope wins"
strategy — so even across user/project/local scopes, only one
customPoliciesPath ever takes effect.
Expected behaviour
Users should be able to register multiple custom policy files: