mirror of
https://github.com/CharlesWiltgen/Axiom.git
synced 2026-09-20 19:58:20 +08:00
30dc90ffa8
Migrate swift-guardrails.sh → standalone swift-guardrails.py (invoked via python3), ending the bash-with-embedded-`python3 -c` approach. Same harness-agnostic input boundary (Claude Code file_path + Codex apply_patch, cwd-relative) and JSON output. - Two tiers: add_block (stops the edit) + add_warn (advisory, no decision field), driven by a _CHECKS registry so each rule is one entry (name, tier, detector, header). - @State without an access level stays a BLOCK; SwiftData to-many @Relationship without a default is a new WARN (warn-first — a new regex check earns block by proving precision). - Per-rule `// axiom-ignore:<name>` escape hatch; Set<T>/Array<T> recall; a multi-line string false-positive guard; UTF-8-safe JSON escaping. - build-codex emits the .py; codex-hooks transform + pre-deploy §12l updated off the old .sh name; codex-hooks.test fixtures updated. 46 behavioral tests.
4.9 KiB
4.9 KiB