policy-rule-add

Add policy rules to PolicyAgent with predicate logic, flag codes, and rationale strings.

Updated May 2, 2026
One-click install
npx skills add https://github.com/gmanch94/agora --skill policy-rule-add
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: policy-rule-add
Source: https://github.com/gmanch94/agora/tree/main/.claude/skills/policy-rule-add
Command: npx skills add https://github.com/gmanch94/agora --skill policy-rule-add

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents inconsistent policy enforcement by standardizing how new legal/eligibility/budget/cost-cap rules are added to PolicyAgent, including stable flag codes and audit-ready rationale strings.

Core Features & Use Cases

  • Uniform rule structure: Ensures new PolicyAgent predicates, flags, and rationale formatting follow the existing conventions.
  • Safe extensibility with guardrails: Guides hard vs soft flag behavior, trigger conditions, and side-effect-free predicate methods.
  • Quality through required testing and documentation: Requires positive/negative tests and a PRD row update to keep staff console rendering consistent.
  • Real example use cases: Add a CONTU-style copyright rule, block patrons based on eligibility, warn on an ISBN denylist, or flag ISO 18626 cost-cap violations.

Quick Start

Ask the AI to generate the exact code, test, and documentation diffs needed to add your new PolicyAgent rule using the conventions in this Skill.

Frequently Asked Questions about policy-rule-add

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new policy rule to PolicyAgent with consistent flag codes and audit rationale?

Adding a new policy rule involves translating legal or eligibility requirements into predicate logic, stable flag codes, and audit-ready rationale strings. You then wire the predicate into PolicyAgent.run behind a trigger condition to maintain consistent enforcement.

What is the standard structure for creating ISO 18626 cost cap or CONTU-style copyright rules?

The standard structure for policy rule creation requires a new predicate method, wiring it into PolicyAgent.run, updating tests and PRD, and optionally adding an Alembic migration. This ensures side-effect-free predicate methods and consistent staff console rendering.

Do I need to write tests and update the PRD when adding a new eligibility or denylist check?

Yes, adding eligibility or denylist checks requires positive and negative tests along with a PRD row update. These quality guardrails keep staff console rendering consistent and ensure safe extensibility with hard or soft flag behavior.

When should I add an Alembic migration for a new budget or overdue-related policy rule?

You should add an Alembic migration when your new budget or overdue-related policy rule reads a new persistent table. This database schema update is optional and only required if the predicate logic depends on querying newly introduced persistent data.

How do I configure hard vs soft flag behavior for a new PolicyAgent predicate?

Configuring hard vs soft flag behavior involves defining trigger conditions and side-effect-free predicate methods within the PolicyAgent. This safe extensibility guardrail ensures your rule blocks patrons or warns based on the specific eligibility or cost-cap violation logic.

What's the best way to standardize audit rationale strings for policy enforcement rules?

The best way to standardize audit rationale strings is to follow existing conventions when turning legal requirements into predicate logic. This standardization prevents inconsistent policy enforcement and maintains uniform formatting across all flag codes and rationale outputs.