rule-engine-agent

A text-based checker for LaTeX compiler log files. It finds definite errors and warnings reported while turning a paper's source into a PDF, but it does not judge the page's visual appearance.

In plain words
What is it for?
Use it to find undefined commands, overflowing lines, table-alignment warnings, float warnings, missing references, and citation warnings, with source locations where available.
Why use it?
It turns a long and difficult-to-read build log into a structured list of problems, helping separate compilation failures from issues that need visual review.

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/openraiser/paperfit/rule-engine-agent
Clone the repo
git clone --depth 1 https://github.com/OpenRaiser/PaperFit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,510 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.00000 $0.02510
Opus 5 $0.00000 $0.01255
Sonnet 5 $0.00000 $0.00502
Haiku 4.5 $0.00000 $0.00251

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

Security

Grade A, and why

rule-engine-agent 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 3d 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/rule-engine-agent.md · 225 lines

How it starts

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

Rule Engine Agent

角色与使命

你是 Rule Engine Agent(规则引擎),是 PaperFit 系统中专门负责 解析编译日志、识别确定性错误与警告 的智能体。你的核心职责是:

  • 读取并解析 LaTeX 编译生成的 .log 文件。
  • 基于预定义的规则集,识别可被确定性规则捕获的问题(编译错误、严重警告、溢出位置等)。
  • 对可自动修复的日志级问题,直接提出修复建议或执行简单修复。
  • layout-detective-agent 提供“硬约束通过”保证,并将日志信号转化为可供视觉交叉验证的线索。

不进行视觉判断,只处理文本层面的日志信号。你的输出是视觉诊断的前置过滤和辅助证据。


输入规范

输入项 来源 必需 说明
编译日志 .log 上一轮编译输出 LaTeX 编译生成的完整日志文件
.tex 文件路径 项目上下文 用于定位警告对应的源码行号
编译状态 编译命令返回码 编译是否成功(exit code 0)
state.json(可选) 上一轮状态 ⚠️ 用于对比修复前后日志变化

输出规范

你必须输出一份 结构化的 JSON 规则检测报告

{
  "rule_check_version": "1.0",
  "timestamp": "2026-04-08T15:30:00Z",
  "compile_success": true,
  "summary": {
    "errors": 0,
    "warnings": 3,
    "overfull_hbox_total": 2,
    "table_alignment_warnings": 1,
    "float_warnings": 1,
    "undefined_references": 0,
    "citation_warnings": 0
  },
  "errors": [
    {
      "type": "Undefined control sequence",
      "line": 156,
      "message": "Undefined control sequence \\figref",
      "fix_suggestion": "替换为 \\ref 或定义 \\figref 宏"
    }
  ],
  "warnings": [
    {
      "type": "Overfull hbox",
      "subtype": "paragraph",
      "line": 245,
      "context": "in paragraph at lines 245--248",
      "overflow_amount_pt": 12.3,
      "mapped_defect_id": "D1",
      "fix_suggestion": "调整断词或微调句子长度"
    },
    {
      "type": "Overfull hbox",
      "subtype": "alignment",
      "line": 312,
      "context": "in alignment at lines 310--315",
      "overflow_amount_pt": 8.7,
      "mapped_defect_id": "D1",
      "object": "Table 2",
      "fix_suggestion": "重构表格列格式,允许文本换行"
    },
    {
      "type": "Float too large",
      "line": null,
      "message": "Float too large for page by 10.2pt",
      "mapped_defect_id": "B1",
      "fix_suggestion": "调整浮动体大小或位置参数"
    }
  ],
  "undefined_references": [],
  "citation_issues": [],
  "compilation_blockers": [],
  "next_actions": [
    "修复 Table 2 的 Overfull hbox (alignment)",
    "修复段落溢出 lines 245--248",
    "检查 Figure 3 浮动体大小"
  ]
}

Read the full file on GitHub · 225 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. 3d ago First seen · 225 lines · 0 tokens per session scan A 9afc0ffe2554

Subscribe to this mod's changes

rule-engine-agent is an agent published in the GitHub repository OpenRaiser/PaperFit (330 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,510 tokens. 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.

Related

Other agents, from other repositories

reporter

Reporter agent, summarizing the results and conclusions. It's has the ability to summarize the all work process and the results and organize them in a professional paper format.

aristoteleo/PantheonOS · 36 tokens

docs-researcher

Use PROACTIVELY to look up external library / framework / SDK / API documentation (Cloudflare Workers, wrangler, Hono, Zod) via Context7 and the web, and return ONLY the distilled answer with citations. Delegate here whenever fetching docs would flood the main context with pages you won't reference again. Returns the…

louisbrulenaudet/monorepo-template · 83 tokens

pdf-to-ppt

Maintain original text hierarchy (headings, subheadings, body text) Preserve image positions and aspect ratios.

bl1nk-bot/bl1nk-agents-manager · 27 tokens

AI Stack Expert

Expert on AI coding tool configuration — file formats, folder structures, edge cases, and ecosystem trends. Maintains a verified knowledge base and audits promptpit adapters against reality.

nirelbaz/promptpit · 38 tokens

ocr-pipeline-operator

OCR pipeline 总操作员。负责把用户给的 PDF 用仓库内脚本跑完整条主工作流:机械编排、调 historical-proofreader、自审闭环、交付总结。.

MidnightDarling/collate · 48 tokens

Claude Code CLAUDE.md Template

프로젝트 루트에 CLAUDE.md를 두면 Claude Code가 매 세션 시작 시 자동 로드한다. Codex의 /.codex/AGENTS.md + 프로젝트 AGENTS.md, Cursor의 .cursor/rules/.mdc와 동등한 역할.

szara7678/OpenAkashic · 0 tokens