Policy Adaptation Gate
Last updated: 2026-02-19
Purpose
Phase C guardrail for rule lifecycle operations:
- Produce reproducible
shadow -> activesuggestions. - Produce reproducible
active -> disabledsuggestions. - Add objective gate checks for urgent disable pressure.
- Carry canary recommendation and rollback payloads per suggestion.
This job is read-only. It does not change rule state.
Command
bash
cd /Users/lucio/Desktop/Aionis
npm run -s job:policy-adaptation-gate -- --scope defaultStrict warning mode:
bash
npm run -s job:policy-adaptation-gate -- --scope default --strict-warningsKey Options
--window-hours <n>: feedback window (default168)--limit <n>: number of shadow+active rules scanned (default200)- Promote thresholds:
--min-promote-positives <n>(default10)--min-promote-distinct-runs <n>(default3)--max-promote-neg-ratio <ratio>(default0.1)--min-promote-score <n>(defaultmin_promote_positives - 1)--min-promote-confidence <ratio>(default0.55)
- Disable thresholds:
--min-disable-negatives <n>(default5)--min-disable-neg-ratio <ratio>(default0.6)--min-disable-confidence <ratio>(default0.6)--stale-active-hours <n>(default336)
- Canary + gate thresholds:
--canary-min-feedback <n>(default20)--urgent-disable-confidence <ratio>(default0.85)--max-urgent-disable-candidates <n>(default0, error)--max-canary-disable-candidates <n>(default3, warning)
Output
JSON output includes:
checks[]gate checkssummarywith pass/fail and candidate countssuggestions.promote_to_active[]suggestions.disable_active[]
Each suggestion includes:
confidencerisk_score+risk_levelcanary_recommendedapplypayloadrollbackpayload
Health Gate Integration
Run policy adaptation gate from health-gate:
bash
npm run -s job:health-gate -- \
--strict-warnings \
--consistency-check-set scope \
--run-policy-adaptation-gateForward custom thresholds:
bash
npm run -s job:health-gate -- \
--run-policy-adaptation-gate \
--policy-adaptation-arg --window-hours \
--policy-adaptation-arg 72 \
--policy-adaptation-arg --max-canary-disable-candidates \
--policy-adaptation-arg 1