Skip to content

Output File Naming

All output from the AI Legal Assistant is saved as Markdown files in the current working directory. This page documents every naming convention used across the 38 skills.


Naming Format

All output files follow this general pattern:

[TYPE]-[identifier]-[YYYY-MM-DD].md
ComponentDescriptionSource
[TYPE]Uppercase skill output prefixDefined by each skill (e.g., CONTRACT-REVIEW, NDA, GDPR-AUDIT)
[identifier]Document-specific identifierExtracted from the analysed document during the ingestion phase
[YYYY-MM-DD]Date the analysis was generatedToday's date at time of execution

INFO

The identifier field (name, party, address, company, etc.) is extracted automatically from the document being analysed. If the value cannot be determined, a generic placeholder is used. Spaces are replaced with hyphens and special characters are removed.


Complete File Naming Table

SkillCommandFile PatternExample
Contract Review/legal reviewCONTRACT-REVIEW-[name]-[date].mdCONTRACT-REVIEW-Acme-Corp-2025-03-15.md
Contract Comparison/legal compareCONTRACT-COMPARISON-[date].mdCONTRACT-COMPARISON-2025-03-15.md
NDA Generator/legal ndaNDA-[party-name]-[date].mdNDA-TechStart-Ltd-2025-03-15.md
Terms of Service/legal termsTERMS-OF-SERVICE-[company]-[date].mdTERMS-OF-SERVICE-Widgets-Inc-2025-03-15.md
Privacy Policy/legal privacyPRIVACY-POLICY-[company]-[date].mdPRIVACY-POLICY-Widgets-Inc-2025-03-15.md
Property Analysis/legal propertyPROPERTY-ANALYSIS-[address]-[date].mdPROPERTY-ANALYSIS-42-High-Street-2025-03-15.md
Tenancy Review/legal tenancyTENANCY-REVIEW-[address]-[date].mdTENANCY-REVIEW-Flat-3-Oak-Lane-2025-03-15.md
GDPR Audit/legal gdprGDPR-AUDIT-[name]-[date].mdGDPR-AUDIT-DataFlow-Ltd-2025-03-15.md
IP Review/legal ipIP-REVIEW-[name]-[date].mdIP-REVIEW-PatentCo-2025-03-15.md
Debt Review/legal debtDEBT-REVIEW-[debtor]-[date].mdDEBT-REVIEW-Smith-Trading-2025-03-15.md
Immigration Review/legal immigrationIMMIGRATION-REVIEW-[name]-[date].mdIMMIGRATION-REVIEW-J-Patel-2025-03-15.md
Will Review/legal willsWILL-REVIEW-[testator]-[date].mdWILL-REVIEW-E-Thompson-2025-03-15.md
PDF Report/legal report-pdfLEGAL-REPORT-[name]-[date].pdfLEGAL-REPORT-Acme-Corp-2025-03-15.pdf

Identifier Extraction Rules

The [identifier] component varies by skill type. The table below shows where each identifier comes from:

Skill CategoryIdentifier FieldExtraction SourceFallback
Contract skills[name]Name of the primary contracting party or contract titleuntitled
NDA[party-name]Name of the disclosing or receiving partycustom-nda
Terms of Service[company]Company name extracted from the URL domain or document contentURL hostname
Privacy Policy[company]Company name from URL or document headerURL hostname
Property[address]Property address from the lease or tenancy agreementproperty
Tenancy[address]Property address from the tenancy agreementtenancy
GDPR Audit[name]Organisation name from the audited document or policyaudit
IP Review[name]Company name or rights holder from the IP documentip-document
Debt Review[debtor]Name of the debtor party from the debt instrumentdebtor
Immigration[name]Name of the individual or sponsoring employerreview
Will Review[testator]Name of the testator (person making the will)will
Contract Comparison(none)Date only -- no identifier since two documents are compared--

Special Character Handling

OriginalTransformedRule
SpacesHyphens"Acme Corp" becomes Acme-Corp
ApostrophesRemoved"O'Brien" becomes OBrien
AmpersandsRemoved"Smith & Jones" becomes Smith-Jones
Ltd/LimitedKept"TechStart Ltd" stays TechStart-Ltd
Commas, dotsRemoved"123 High St., London" becomes 123-High-St-London

Date Format

All dates use ISO 8601 format: YYYY-MM-DD.

ComponentFormatExample
Year4 digits2025
Month2 digits, zero-padded03
Day2 digits, zero-padded15

The date reflects when the analysis was generated, not the date of the document being analysed.


PDF Reports

The /legal report-pdf command generates a professional PDF file (not Markdown):

AspectDetails
FormatA4 PDF
FilenameLEGAL-REPORT-[name]-[date].pdf
LocationCurrent working directory
ContentsScore gauges, risk charts, colour-coded tables, prioritised action checklist
RequirementsPython 3.8+ and reportlab (pip3 install reportlab)
Scriptscripts/generate_legal_pdf.py

TIP

Run /legal report-pdf after any analysis command to convert the most recent review into a professional client-ready PDF document.


File Contents Structure

Every generated Markdown file follows a consistent internal structure:

1. Disclaimer Block

The standard AI-generated analysis disclaimer at the very top of the file.

2. Document Header

markdown
# CONTRACT REVIEW: Acme Supply Agreement

**Date:** 15 March 2025
**Parties:** Acme Corp Ltd / Widget Supplies Ltd
**Overall Score:** 72/100 (Grade B)
**Risk Summary:** 🔴 2 High | 🟡 5 Medium | 🟢 8 Low

3. Executive Summary

A 2-3 paragraph overview of the key findings.

4. Analysis Body

The main analysis content, which varies by skill type (clause tables, compliance matrices, risk assessments, etc.).

5. Recommendations

Prioritised action items with current text and replacement text.

6. Appendix

Legislation references, glossary of terms, and methodology notes.


Skills Without Named Output Files

Not all skills produce a named output file. Many skills display their results directly in the chat interface without saving to disk:

SkillCommandOutput Method
Risk Analysis/legal risksInline chat display
Plain English/legal plainInline chat display
Negotiate/legal negotiateInline chat display
Missing Protections/legal missingInline chat display
Benchmark/legal benchmarkInline chat display
Employment Review/legal employmentInline chat display
Corporate Review/legal corporateInline chat display
IR35 Assessment/legal ir35Inline chat display
AML Compliance/legal amlInline chat display
Freelancer Review/legal freelancerInline chat display
Board Pack/legal board-packInline chat display
Compliance Audit/legal complianceInline chat display
Consumer Compliance/legal consumerInline chat display
ESG Compliance/legal esgInline chat display
AI Compliance/legal ai-complianceInline chat display
Legislation Tracker/legal legislation-trackerInline chat display
Regulatory Calendar/legal regulatory-calendarInline chat display
Dispute Resolution/legal disputeInline chat display
Due Diligence/legal due-diligenceInline chat display
Agreement Generator/legal agreementVaries by agreement type
Fetch Samples/legal fetch-samplesDownloads sample files

INFO

Skills that produce inline output can be followed by /legal report-pdf to generate a professional PDF version of the most recent analysis.


Example: Full Workflow

bash
# 1. Run a contract review (saves Markdown file)
/legal review service-agreement.pdf
# Output: CONTRACT-REVIEW-CloudTech-Ltd-2025-03-15.md

# 2. Generate a PDF report of the same review
/legal report-pdf
# Output: LEGAL-REPORT-CloudTech-Ltd-2025-03-15.pdf

# 3. Compare two contract versions (saves Markdown file)
/legal compare v1-agreement.pdf v2-agreement.pdf
# Output: CONTRACT-COMPARISON-2025-03-15.md

# 4. Generate an NDA (saves Markdown file)
/legal nda "Mutual NDA between TechStart Ltd and InnovateCo for product discussions"
# Output: NDA-TechStart-Ltd-2025-03-15.md

# 5. Run a risk analysis (inline display only)
/legal risks employment-contract.pdf
# Output: displayed in chat, no file saved

# 6. Run a GDPR audit (saves Markdown file)
/legal gdpr privacy-policy.pdf
# Output: GDPR-AUDIT-DataFlow-Ltd-2025-03-15.md

WARNING

Do not change the file naming conventions without updating both legal/SKILL.md (the orchestrator) and any dashboard code that may reference the patterns. The naming conventions documented in the orchestrator serve as the single source of truth.

AI Legal UK · The Counsel — Established MMXXVI · Built for England & Wales · Not legal advice.