diagnose rule

    1

    Debug and audit Agent Rules policy judgments, violations, and enforcement outcomes using session journals.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    diagnose rule

    Example session with this skill installed

    Why did rule 'no-leak-pii' fail to trigger a correction in session 8f2b1? It looks like there was a violation in the records.

    • Read your context and instructions
    • Compiled the diagnose rule

    I have analyzed the session journals for session 8f2b1 regarding rule no-leak-pii. The investigation shows that while a violation was recorded, the agent did not issue a correction notice due to the active operating mode.

    Rule Diagnosis: no-leak-pii (Session 8f2b1)

    MetricValueNotes
    StatusviolationThe classifier positively identified a policy breach.
    ModeobserveThe rule is currently set to monitor-only.
    DiagnosticokNo service failures or size limits were encountered.
    Outcomeno_actionCorrection suppressed by observe-mode configuration.
    Policy Hash7a2c91...Matches the current version of the PII policy.
    Episode3Finding occurred during the third turn of the session.
    Timestamp2023-10-24T14:22:01ZEvidence found in the response buffer at offset 412.

    The records indicate that the classifier correctly flagged the presence of an email address pattern. However, because the project configuration has this rule set to observe rather than repair, no continue_turn request was generated. The system performed as configured, logging the event without interrupting the agent flow.

    Next steps

    1. Switch the rule to repair mode in agent-rules.config.json if you want active enforcement.
    2. Run status to verify the mode change has been picked up by the plugin.
    3. Check episode 4 records to see if the agent continued to output the flagged pattern.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Rule evaluation and agent behavior can be opaque when a policy triggers or silently fails. This skill provides a systematic way to debug Agent Rules by analyzing session journals, judgment records, and outcome states to explain exactly why a policy behaved the way it did.

    What it does

    • State analysis identifies effective modes and configuration diagnostics from the state directory.
    • Evidence correlation matches specific timestamps and episodes to findings to ensure data accuracy.
    • Status decoding translates internal states like unknown, unavailable, and clear into actionable insights.
    • Outcome verification determines if a violation resulted in a correction, a deduplication event, or a retry limit hit.
    • Diagnostic filtering separates missing evidence or service failures from actual policy abstentions.

    How it works

    1. Run the status command to pull the current configuration and state directory path.
    2. Execute inspect <rule-id> to load current findings and historical record data.
    3. Use the --session <session-id> flag to isolate the specific host interaction in question.
    4. Analyze the session JSON journals to trace the policy hash, raw judgment, and final outcome.

    Frameworks & tools

    This tool interfaces with the agent-rules.js plugin and requires access to session JSON journal files and the project's state directory.

    Why this beats prompting it yourself

    Manual inspection of session journals is error-prone and requires deep knowledge of rule status codes. This skill automatically correlates timestamps and episodes, preventing you from misinterpreting old cached findings or observe-mode violations as failed repairs.

    Use cases

    • Debug why a repair-mode violation failed to trigger a corrective notice.
    • Investigate why a specific rule abstained from judging a suspect response.
    • Audit historical policy outcomes across different session IDs.
    • Verify if a rule failure was caused by service limits or missing evidence.

    Known limitations

    Cannot recover original verdicts via live replay. Evidence is limited to retained records; expired or erased episodes cannot be analyzed.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scanned

    Verified clean 8 days ago

    • Free to download with an account

    Requires

    @jvsteiner/agent-rules
    Node.js

    Listed8 days ago

    What's inside

    Frequently Asked Questions