Skip to content

ThomasMoreAI/legal-skills-open / br/employment/skills/legal-process-parser-lucianum7

legal-process-parser-lucianum7

Verified

Ingere e audita processos em PDF, TXT ou Markdown, preserva o original, extrai cada página e imagem com rastreabilidade e prepara análises processuais, petições e peças de trabalho com citações internas, controle de lacunas e revisão humana. Use para ingerir autos, localizar trechos, comparar peças, analisar provas e decisões, controlar pendências ou redigir minutas sem inventar fatos.

FileKindSize
LICENSEother1.1 KB
SKILL.mdskill md15.4 KB
agents/openai.yamlconfig450 B
references/document_types.mdmarkdown955 B
references/extraction_rules.mdmarkdown2.1 KB
references/legal_analysis_rules.mdmarkdown975 B
references/pleading_generation_rules.mdmarkdown1.8 KB
references/procedural_analysis_rules.mdmarkdown1.2 KB
references/procedural_progression_rules.mdmarkdown1.9 KB
references/request_intake_rules.mdmarkdown2.9 KB
references/security_rules.mdmarkdown694 B
references/source_policy.mdmarkdown647 B
references/vision_processing_rules.mdmarkdown2.8 KB
references/visual_description_rules.mdmarkdown2.3 KB
schemas/chronology.schema.jsonconfig495 B
schemas/controversy.schema.jsonconfig606 B
schemas/document_piece.schema.jsonconfig712 B
schemas/evidence.schema.jsonconfig580 B
schemas/page.schema.jsonconfig1.4 KB
schemas/procedural_summary.schema.jsonconfig868 B
schemas/process_manifest.schema.jsonconfig4.7 KB
schemas/vision_review.schema.jsonconfig1.3 KB
schemas/visual_element.schema.jsonconfig1.8 KB
scripts/__init__.pyscript71 B
scripts/build_index.pyscript998 B
scripts/build_markdown.pyscript889 B
scripts/compute_hash.pyscript627 B
scripts/detect_scanned_pages.pyscript625 B
scripts/extract_pdf_text.pyscript1.1 KB
scripts/helpers.pyscript87.4 KB
scripts/identify_documents.pyscript849 B
scripts/ingest_document.pyscript24.1 KB
scripts/scope_questions.pyscript2.1 KB
scripts/validate_extraction.pyscript5.8 KB
scripts/validate_links.pyscript2.8 KB
templates/audit_report.mdmarkdown327 B
templates/chronology.mdmarkdown225 B
templates/controversy_matrix.mdmarkdown210 B
templates/image_descriptions.jsonconfig950 B
templates/petition_draft.mdmarkdown1.0 KB
templates/procedural_analysis.mdmarkdown468 B
templates/process_markdown.mdmarkdown1.9 KB
templates/vision_review.jsonconfig856 B
tests/__init__.pyscript1 B
tests/test_pipeline.pyscript16.4 KB
tests/test_platform_adapters.pyscript1.9 KB
tests/test_visual_correction.pyscript4.1 KB

scripts/validate_links.py

View on GitHub
"""Validate local Markdown/assets links in a generated process bundle."""

from __future__ import annotations

import argparse
import json
import re
from pathlib import Path


LINK_RE = re.compile(r"!?(?:\[[^\]]*\])\(([^)]+)\)")


def validate_links(root: Path) -> list[str]:
    errors: list[str] = []
    for markdown_path in sorted(root.rglob("*.md")):
        if "versions" in markdown_path.relative_to(root).parts:
            continue
        try:
            text = markdown_path.read_text(encoding="utf-8-sig")
        except OSError as exc:
            errors.append(f"{markdown_path.relative_to(root)}: leitura falhou ({exc})")
            continue
        for target in LINK_RE.findall(text):
            target = target.strip().split("#", 1)[0].strip()
            if not target or target.startswith(("http://", "https://", "mailto:", "data:", "#")):
                continue
            candidate = (markdown_path.parent / target.replace("\\", "/")).resolve()
            try:
                candidate.relative_to(root.resolve())
            except ValueError:
                errors.append(f"{markdown_path.relative_to(root)}: link fora do pacote: {target}")
                continue
            if not candidate.exists():
                errors.append(f"{markdown_path.relative_to(root)}: asset ausente: {target}")

    image_index_path = root / "images" / "index.json"
    if image_index_path.is_file():
        try:
            index = json.loads(image_index_path.read_text(encoding="utf-8-sig"))
        except (OSError, json.JSONDecodeError) as exc:
            errors.append(f"images/index.json inválido: {exc}")
        else:
            for item in index.get("unique_images", []):
                for field in ("relative_path", "zoom_relative_path"):
                    relative = item.get(field)
                    if not relative:
                        continue
                    candidate = (root / str(relative)).resolve()
                    try:
                        candidate.relative_to(root.resolve())
                    except ValueError:
                        errors.append(f"images/index.json: caminho fora do pacote: {relative}")
                        continue
                    if not candidate.exists():
                        errors.append(f"images/index.json: asset ausente: {relative}")
    return errors


def main() -> int:
    parser = argparse.ArgumentParser(description="Valida links Markdown e assets locais do pacote processual.")
    parser.add_argument("root", type=Path)
    args = parser.parse_args()
    errors = validate_links(args.root.resolve())
    if errors:
        print("\n".join(f"ERRO: {error}" for error in errors))
        return 1
    print("OK: links Markdown e assets locais válidos")
    return 0


if __name__ == "__main__":
    raise SystemExit(main())
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