Skip to content

brycewang-stanford/Auto-Empirical-Research-Skills / skills/35-bahayonghang-academic-writing-skills/skills/paper-audit

paper-audit

Verified

Deep-review-first audit for Chinese and English academic papers across LaTeX, Typst, and PDF formats. Use whenever the user wants reviewer-style paper critique, pre-submission readiness checks, pass/fail gate decisions, structured revision roadmaps, or re-audits of revised manuscripts. Trigger even if the user only says "review my paper", "check if this is ready to submit", "audit this PDF", "simulate peer review", "find the biggest problems in this manuscript", or "re-check whether I fixed the review issues". Do not use for direct source editing or compilation-heavy repair; route those to the format-specific writing skills instead.

FileKindSize
SKILL.mdskill md14.3 KB
agents/claims_evidence_reviewer_agent.mdmarkdown354 B
agents/committee_editor_agent.mdmarkdown1.9 KB
agents/committee_literature_agent.mdmarkdown1.9 KB
agents/committee_logic_agent.mdmarkdown1.5 KB
agents/committee_methodology_agent.mdmarkdown1.8 KB
agents/committee_theory_agent.mdmarkdown1.9 KB
agents/critical_reviewer_agent.mdmarkdown8.4 KB
agents/domain_reviewer_agent.mdmarkdown7.1 KB
agents/editor_in_chief_agent.mdmarkdown5.2 KB
agents/evaluation_fairness_reviewer_agent.mdmarkdown371 B
agents/literature_reviewer_agent.mdmarkdown3.6 KB
agents/methodology_reviewer_agent.mdmarkdown7.2 KB
agents/notation_consistency_reviewer_agent.mdmarkdown398 B
agents/prior_art_reviewer_agent.mdmarkdown2.9 KB
agents/section_reviewer_agent.mdmarkdown365 B
agents/self_consistency_reviewer_agent.mdmarkdown420 B
agents/synthesis_agent.mdmarkdown951 B
evals/evals.jsonconfig12.0 KB
evals/fixtures/deep_review_fixture.texother699 B
evals/fixtures/gate_ieee_fixture.texother617 B
evals/fixtures/polish_fixture.texother396 B
evals/fixtures/previous_final_issues.jsonconfig1.1 KB
evals/fixtures/previous_review_report.mdmarkdown205 B
evals/fixtures/quick_audit_fixture.texother538 B
examples/gate_example.mdmarkdown3.5 KB
examples/review_example.mdmarkdown2.5 KB
examples/self_check_example.mdmarkdown2.9 KB
references/AUDIT_GUIDE.mdmarkdown3.4 KB
references/CHANGELOG.mdmarkdown530 B
references/CHECKLIST.mdmarkdown6.0 KB
references/CONSOLIDATION_RULES.mdmarkdown907 B
references/DEEP_REVIEW_CRITERIA.mdmarkdown2.8 KB
references/FORBIDDEN_TERMS.mdmarkdown6.4 KB
references/ISSUE_SCHEMA.mdmarkdown928 B
references/LITERATURE_GROUNDING_GUIDE.mdmarkdown3.3 KB
references/POLISH_GUIDE.mdmarkdown2.3 KB
references/QUALITATIVE_STANDARDS.mdmarkdown5.5 KB
references/QUICK_REFERENCE.mdmarkdown1.1 KB
references/REVIEW_CRITERIA.mdmarkdown2.7 KB
references/REVIEW_LANE_GUIDE.mdmarkdown828 B
references/SCHOLAR_EVAL_GUIDE.mdmarkdown6.4 KB
references/SCORING_SYSTEMS.mdmarkdown1000 B
references/SUBAGENT_TEMPLATES.mdmarkdown987 B
references/TROUBLESHOOTING.mdmarkdown1.4 KB
references/VENUE_RULES.mdmarkdown764 B
references/editorial_decision_standards.mdmarkdown6.7 KB
references/quality_rubrics.mdmarkdown10.8 KB
scripts/audit.pyscript78.4 KB
scripts/build_claim_map.pyscript3.3 KB
scripts/check_citations.pyscript5.6 KB
scripts/check_references.pyscript19.9 KB
scripts/consolidate_review_findings.pyscript5.2 KB
scripts/detect_language.pyscript1.9 KB
scripts/diff_review_issues.pyscript2.0 KB
scripts/literature_compare.pyscript11.4 KB
scripts/literature_search.pyscript22.0 KB
scripts/models/scoring_model.jsonconfig737 B
scripts/parsers.pyscript3.3 KB
scripts/pdf_parser.pyscript11.4 KB
scripts/prepare_review_workspace.pyscript6.8 KB
scripts/render_deep_review_report.pyscript3.5 KB
scripts/report_generator.pyscript36.2 KB
scripts/scholar_eval.pyscript13.7 KB
scripts/scoring_model.pyscript6.2 KB
scripts/verify_quotes.pyscript1.6 KB
scripts/visual_check.pyscript10.7 KB
templates/audit_report_template.mdmarkdown2.8 KB
templates/final_issues_template.jsonconfig498 B
templates/review_report_template.mdmarkdown678 B
templates/revision_roadmap_template.mdmarkdown3.1 KB

scripts/parsers.py

View on GitHub
"""
Parser re-exports for Paper Audit skill.
Provides unified access to DocumentParser, LatexParser, TypstParser,
and the get_parser factory from sibling skills.
"""

import importlib.util
from pathlib import Path
from typing import Any

# Load sibling parsers module by explicit file path to avoid name collision
_SKILLS_ROOT = Path(__file__).resolve().parent.parent.parent
_PARSER_CACHE: dict[str, Any] = {}


def _load_sibling_parsers() -> Any:
    """
    Load sibling parsers module with caching and validation.

    Returns:
        The loaded sibling parsers module.

    Raises:
        ImportError: If sibling parsers cannot be loaded from any candidate path.
    """
    if "sibling" in _PARSER_CACHE:
        return _PARSER_CACHE["sibling"]

    candidates = [_SKILLS_ROOT / "latex-paper-en" / "scripts" / "parsers.py"]
    last_exc: Exception | None = None

    for path in candidates:
        try:
            spec = importlib.util.spec_from_file_location("_sibling_parsers", path)
            if spec is None or spec.loader is None:
                continue
            mod = importlib.util.module_from_spec(spec)
            spec.loader.exec_module(mod)  # type: ignore[union-attr]
            # Validate required attributes
            assert hasattr(mod, "LatexParser"), f"LatexParser missing in {path}"
            assert hasattr(mod, "TypstParser"), f"TypstParser missing in {path}"
            assert hasattr(mod, "DocumentParser"), f"DocumentParser missing in {path}"
            _PARSER_CACHE["sibling"] = mod
            return mod
        except Exception as exc:
            last_exc = exc
            continue

    raise ImportError(f"Cannot load sibling parsers from {_SKILLS_ROOT}: {last_exc}")


_sibling = _load_sibling_parsers()

# Re-export core parser classes
DocumentParser = _sibling.DocumentParser
LatexParser = _sibling.LatexParser
TypstParser = _sibling.TypstParser
extract_title = _sibling.extract_title
extract_abstract = _sibling.extract_abstract
extract_latex_citation_keys = getattr(_sibling, "extract_latex_citation_keys", None)


def get_parser(
    file_path: Any,
    pdf_mode: str = "basic",
    heading_pt: float = 14.0,
    body_pt: float = 12.0,
) -> "DocumentParser":
    """
    Extended factory method supporting PDF in addition to LaTeX/Typst.

    Args:
        file_path: Path to the document file.
        pdf_mode: PDF extraction mode - "basic" (pymupdf) or "enhanced" (pymupdf4llm).
        heading_pt: Font size threshold (pt) for H2-level headings in PDF basic mode.
        body_pt: Font size threshold (pt) for H3-level headings in PDF basic mode.

    Returns:
        Appropriate DocumentParser instance.

    Raises:
        ValueError: If the file format is not supported.
    """
    path_str = str(file_path).lower()

    if path_str.endswith(".typ"):
        return TypstParser()
    elif path_str.endswith(".tex"):
        return LatexParser()
    elif path_str.endswith(".pdf"):
        from pdf_parser import PdfParser

        return PdfParser(mode=pdf_mode, heading_pt=heading_pt, body_pt=body_pt)
    else:
        raise ValueError(
            f"Unsupported format: {Path(file_path).suffix}. Supported formats: .tex, .typ, .pdf"
        )


__all__ = [
    "DocumentParser",
    "LatexParser",
    "TypstParser",
    "get_parser",
    "extract_title",
    "extract_abstract",
    "extract_latex_citation_keys",
]
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall