report-logger

A routing step for completed policy-analysis reports, sending each report to an appropriate archive, GitHub issue, tracker database, or research pull request.

In plain words
What is it for?
Use it after an analysis to choose or automatically determine where to log the report, or to skip logging when requested.
Why use it?
It prevents finished reports from being filed in the wrong place or left unrecorded, based on the report's finding and country context.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/policyengine/policyengine-claude/report-logger
Clone the repo
git clone --depth 1 https://github.com/PolicyEngine/policyengine-claude
Per session 74 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,302 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00074 $0.03302
Opus 5 $0.00037 $0.01651
Sonnet 5 $0.00015 $0.00660
Haiku 4.5 $0.00007 $0.00330

Measured 2d ago against content hash c59d63b7656a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

report-logger scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/report-logger.md · 326 lines

How it starts

The opening of the file, as written. The whole thing — 326 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Report Logger

Final stage of /analyze-policy. Takes the assembled report and the verdict, and writes it to the right destinations.

Inputs

  • report_path: path to the final markdown report (e.g., /tmp/analyze-policy-{policy_id}.md)
  • frontmatter: structured metadata (policy_id, verdict, jurisdiction, anchor_url, tags, etc.)
  • log_to: list of destinations (auto-derived from verdict unless overridden by --log-to)
  • no_log: if true, skip logging entirely
  • command_args: the original $ARGUMENTS passed to /analyze-policy (for traceability)

Routing — runtime prompt, context-aware

Destinations depend on where the analyst is working and what the analysis is for. Rather than a single auto-route, the agent computes a context-aware destination shortlist and prompts the analyst to pick.

If --log-to was explicitly passed: skip the prompt, use the list verbatim. If --no-log: skip the prompt, write nothing. If --auto-confirm AND no --log-to: use the verdict default (local archive only) without prompting.

Otherwise:

Step 1: Detect context

Run these checks in parallel (cheap):

# Current repo
git rev-parse --show-toplevel 2>/dev/null      # e.g., /Users/pavel/policyengine-app-v2
gh repo view --json nameWithOwner -q .nameWithOwner 2>/dev/null  # e.g., PolicyEngine/policyengine-app-v2

# Is there a posts/articles directory? (policyengine-app-v2 shape)
test -d app/src/data/posts/articles && echo "HAS_POSTS_DIR"

# Is there an analyses/ directory? (this repo's shape)
test -d analyses && echo "HAS_ANALYSES_DIR"

# Country from --country flag or from the reform's jurisdiction
echo "$COUNTRY"

Step 2: Build the shortlist

Always include:

  • Local archive (path per resolution order in next section)
  • Skip / no-log (cancel destination)

Append context-specific options:

Context Add this option
Inside policyengine-app-v2 repo (HAS_POSTS_DIR) "Save as draft research post: app/src/data/posts/articles/{slug}.md + update app/src/data/posts/posts.json"
Inside policyengine-skills or any repo with analyses/ "Just the archive in analyses/" (already covered by local archive but make the path explicit)
Verdict is INVESTIGATE "Open GitHub issue in the country's data repo (usPolicyEngine/microcosm; other countries → policyengine-{country}-data) — calibration hypothesis"
Verdict is structural "Open GitHub issue in PolicyEngine/policyengine-{country} (model-change estimate)"
Verdict is PASS* AND inside policyengine-app-v2 "Open draft PR to policyengine-app-v2 with the post body"
Always "Custom path / repo — type a destination spec"

Read the full file on GitHub · 326 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 326 lines · 74 tokens per session scan A c59d63b7656a

Subscribe to this mod's changes

report-logger is an agent published in the GitHub repository PolicyEngine/policyengine-claude (31 stars, last pushed 8d ago), licensed MIT. It adds 74 tokens to every session and 3,302 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.