Skip to content

feat: support multiple compliance documents (PDFs, URLs, markdown) for PR review#2

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/review-pdf-url-guidelines
Draft

feat: support multiple compliance documents (PDFs, URLs, markdown) for PR review#2
Copilot wants to merge 2 commits intomainfrom
copilot/review-pdf-url-guidelines

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 25, 2026

The tool previously accepted only a single --doc source. Organizations maintain compliance requirements across multiple documents (architecture standards, security policies, company guidelines) and PRs need to be checked against all of them simultaneously.

Changes

  • cli.py--doc now uses Click multiple=True; repeat the flag for each source
  • doc_loader.py — added load_documents(sources: List[str]) -> List[ArchitectureDoc]; wraps existing load_document per source
  • reviewer.py_build_prompt, _parse_response, and run_review now accept List[ArchitectureDoc]; prompt includes a clearly labelled section per document
  • types.pyReviewResult gains compliance_docs: List[ArchitectureDoc] for full audit trail
  • reporter.pymeta.compliance_docs written to the JSON report (source + doc_type per entry)
  • README.md — updated CLI examples, report schema table, example JSON, and GitHub Actions workflow

Usage

# backwards-compatible single doc
python -m src.cli review --owner myorg --repo myrepo --pr 42 \
  --doc docs/architecture.pdf

# multiple sources — any mix of PDF, URL, text/markdown
python -m src.cli review --owner myorg --repo myrepo --pr 42 \
  --doc docs/architecture.pdf \
  --doc https://intranet.corp/security-policy \
  --doc docs/company-guidelines.md

The AI prompt enumerates each document as a numbered, labelled section so the model can attribute violations to specific policies. The report meta block records which documents were consulted on each run.


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI changed the title [WIP] Add agent for handling multiple PDFs and document URLs feat: support multiple compliance documents (PDFs, URLs, markdown) for PR review Mar 25, 2026
Copilot AI requested a review from JayPat2003 March 25, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants