Expand description
systemprompt admin access-control — DB → YAML export channel and
catalog/lint inspector.
Subcommands:
-
export-yaml— read role/department rules fromaccess_control_rulesand print them as a YAML snippet matchingAccessControlConfig. Stdout-only — never writes a file. The operator pastes the output into the committed YAML baseline and redeploys. Per-user overrides (rule_type='user') are operational state and intentionally excluded. -
lint— read the liveaccess_control_entitiesandaccess_control_rulestables, then report unknown entities (rules pointing at no catalog row — only possible if the FK was bypassed manually, e.g. mid-migration) and unreachable rules (catalog rows withdefault_included=falseand zero grant rows — entity exists but no user can ever reach it). Exits non-zero on any finding so it can gate CI.