Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/box/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "box",
"version": "0.0.3",
"version": "0.0.4",
"description": "Search and reference your documents",
"author": {
"name": "OpenAI",
Expand Down
71 changes: 71 additions & 0 deletions plugins/box/skills/box-legal-workflows-contract/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: box-legal-workflows-contract
description: Automate contract review and monitoring with Box MCP — find new or expiring contracts, compare them against firm templates to flag material variances, write structured contract metadata back to Box for searchability, and produce variance reports with citations. Use this skill when the user mentions contract review or monitoring, NDA or MSA review, contract expiration or renewals, contract metadata, or variance analysis, even if they don't name a specific Box tool.
---

# Contract Review Agent

> **PREREQUISITES:**
>
> - Read [Box foundation skill](../box/SKILL.md) for Box MCP auth, tool selection, base workflows.
> - Read [shared Box legal workflows](../box-legal-workflows/SKILL.md) for Box collaboration role definitions, Box AI usage boundaries, and reusable confirmation phrasings.

Do contract review *in Box*: find contracts with Box search, compare against the firm's template with Box AI, persist results as Box metadata so they stay searchable, and monitor dates with metadata search. This skill is the contract-specific recipe; the underlying Box tool mechanics live in the capability references below. Materiality, risk, and favorability are firm-supplied criteria confirmed by an attorney — the agent extracts facts, stores them, and routes. It does not provide legal advice or decide risk.

## Box capability references

Reach for these for tool mechanics rather than restating them here:

- `../box/references/mcp-search.md` — find contracts; metadata vs. keyword search, folder scoping, template schema lookup
- `../box/references/ai-and-retrieval.md` — compare to template and extract fields; pacing, text-rep/file limits, citations
- `../box/references/content-workflows.md` — metadata templates, `set_file_metadata`, report uploads, file comments
- `../box/references/collaboration.md` — grant the reviewing attorney access

## Box metadata model

Persist review results as file metadata so contracts stay searchable. Find/inspect the firm's template via `../box/references/mcp-search.md`; create one via `../box/references/content-workflows.md` if none exists.

- **Representative fields** (confirm the firm's actual set): `counterparty_name`, `contract_type`, `execution_date`, `effective_date`, `expiration_date`, `auto_renewal`, `notice_period_days`, `contract_value`, `governing_law`, `status` (active/expired/terminated/under_negotiation), `risk_rating`, `review_date`, `next_review_date`, `expiration_alert_date`. Link to matters with `matter_id`, `practice_area`, `matter_owner`.
- The `risk_rating` value is the firm/attorney's determination — store it, don't decide it.

## Contract search recipes

Once contracts carry metadata, use `search_files_metadata` (mechanics in `../box/references/mcp-search.md`; otherwise `search_files_keyword` with date filters):

- New since last review: `execution_date >= 'YYYY-MM-DD' AND execution_date <= 'YYYY-MM-DD'`
- Expiring window: `expiration_date >= 'YYYY-MM-DD' AND expiration_date <= 'YYYY-MM-DD' AND status = 'active'`
- By counterparty / rating: `counterparty_name = 'Acme Corp'` · `risk_rating = 'High'`

## Tool selection


| Contract task | Tool | Notes |
| --------------------------- | ---------------------------------------------- | -------------------------------------------------------------------------- |
| Find new contracts (date) | `search_files_metadata` | Query `execution_date`; fall back to `search_files_keyword` if no metadata |
| Find expiring | `search_files_metadata` | Query `expiration_date` within 30/60/90 days |
| Compare to template | `ai_qa_multi_file` | Contract + firm template in one call |
| Extract metadata (template) | `ai_extract_structured_from_metadata_template` | If a template exists |
| Extract metadata (custom) | `ai_extract_structured_from_fields_enhanced` | Define fields at runtime |
| Write metadata | `set_file_metadata` | Persist extracted/confirmed fields |
| Create variance report | `upload_file` | Write the summary doc |
| Tag attorney | `create_file_comment` | Notify for review/expiration |
| Grant attorney access | `create_collaboration` | If they lack access |


## Workflow

1. **Find**: `search_files_metadata` or `search_files_keyword`. **[CONFIRM: folder ID, date range/cadence]**
2. **Compare to template**: `ai_qa_multi_file` (contract + firm template) → extract clauses that differ, with citations. **[CONFIRM: template file ID]**
3. **Extract metadata**: `ai_extract_structured_from_metadata_template`, or `ai_extract_structured_from_fields_enhanced` if no template.
4. **Persist**: `set_file_metadata`, including the firm-confirmed `risk_rating`. **[CONFIRM: which fields]**
5. **Report**: `upload_file` — factual differences + citations + firm-confirmed rating (observations for attorney review, not recommendations).
6. **Route**: `create_file_comment` to tag the attorney; `create_collaboration` if they need access. **[CONFIRM: attorney, access]**
7. **Monitor expirations**: `search_files_metadata` on the expiration window → `create_file_comment` reminders → `set_file_metadata` (`expiration_alert_sent: yes`).

## Legal guardrails

Box mechanics (external-sharing confirmation, AI pacing/limits/citations, metadata writes) are governed by the capability references above and [shared Box legal workflows](../box-legal-workflows/SKILL.md). Specific to contracts:

- Risk, materiality, and favorability are firm + attorney calls, never the agent's. If the firm has no documented criteria, route to an attorney rather than rating.
- Prompt Box AI to extract differences and cite section/page — not to judge materiality or legal risk.
- Record decisions in Box as the audit trail: the firm-confirmed rating in metadata plus the uploaded summary.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "Box Contract Workflows"
short_description: "Review and monitor contracts in Box"
default_prompt: "Use $box-legal-workflows-contract to review and monitor these contracts in Box."
60 changes: 60 additions & 0 deletions plugins/box/skills/box-legal-workflows-intake/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
name: box-legal-workflows-intake
description: Automate legal client intake and onboarding with Box MCP — review intake documents for completeness against firm requirements, summarize risk for attorney review, route incomplete or high-risk submissions to the right attorney, extract client and matter metadata to Box, and generate engagement letters from Box DocGen templates. Use this skill when the user mentions client intake, client onboarding, new client review, intake documents, or engagement letters.
---

# Client Intake & Onboarding

> **PREREQUISITES:**
> - Read [Box foundation skill](../box/SKILL.md) for Box MCP auth, tool selection, base workflows.
> - Read [shared Box legal workflows](../box-legal-workflows/SKILL.md) for Box collaboration role definitions, Box AI usage boundaries, and reusable confirmation phrasings.
Do client intake *in Box*: inventory the intake folder, check completeness with Box AI against the firm's checklist, extract intake data into Box metadata, route via comments and collaborations, and generate the engagement letter with Box DocGen. This skill is the intake-specific recipe; the underlying Box tool mechanics live in the capability references below. The firm supplies the required-document checklist and risk criteria; conflict, PEP, and sanctions determinations run through the firm's screening system — not the agent or Box AI. Not legal advice.

## Box capability references

Reach for these for tool mechanics rather than restating them here:

- `../box/references/content-workflows.md` — inventory the folder, metadata templates, `set_file_metadata`, file comments
- `../box/references/ai-and-retrieval.md` — completeness checks and data extraction; pacing, limits, citations
- `../box/references/mcp-doc-gen.md` — generate the engagement letter from a template
- `../box/references/collaboration.md` — tag/route the attorney and share with the client
- `../box/references/mcp-search.md` — find/inspect the firm's metadata template

## Box metadata model

Record the intake outcome as file metadata so submissions stay searchable. Find/create the firm's template via `../box/references/mcp-search.md` / `../box/references/content-workflows.md`.

- **Representative fields** (confirm the firm's actual set): `client_name`, `matter_name`, `practice_area`, `matter_owner`, `jurisdiction`, `matter_value`, `intake_status` (complete/incomplete), `risk_rating`, `assigned_attorney`, `decision`, `decision_date`.
- Store the firm/attorney's rating and decision, not the agent's.

## Tool selection

| Intake task | Tool | Notes |
|------|------|-------|
| Inventory submission | `list_folder_content_by_folder_id` | All files in the intake folder |
| Check completeness | `ai_qa_multi_file` | Present/complete/valid vs. firm checklist, with citations |
| Extract intake data | `ai_extract_structured_from_fields_enhanced` | Client, matter, jurisdiction, value |
| Write metadata | `set_file_metadata` | Record status, rating, decision, attorney |
| Tag attorney | `create_file_comment` | Route with the factual summary |
| Grant access | `create_collaboration` | Give the attorney access |
| Generate engagement letter | `create_docgen_batch` | Only if the firm approves |
| Share with client | `add_folder_shared_link` or `create_collaboration` | Confirm audience/expiration |

## Workflow

1. **Inventory**: `list_folder_content_by_folder_id`. **[CONFIRM: intake folder ID]**
2. **Completeness**: `ai_qa_multi_file` — is each required doc (per the firm's checklist) present, complete, and valid, with citations? **[CONFIRM: firm's required-document list]**
3. **Extract intake data**: `ai_extract_structured_from_fields_enhanced` (client_name, matter_name, practice_area, jurisdiction, matter_value, …).
4. **Surface risk indicators (facts only)**: `ai_qa_multi_file` to surface the facts the firm's criteria reference (value, jurisdiction, named parties) with citations. Do **not** use AI to determine conflicts, PEP status, or sanctions — pass names/entities/locations to the firm's screening system.
5. **Persist**: `set_file_metadata` with the firm-confirmed `risk_rating`, `intake_status`, and `decision`.
6. **Route**: `create_file_comment` to tag the attorney with the factual summary; `create_collaboration` for access. **[CONFIRM: who, access level]**
7. **Engagement letter (only if the firm approves)**: `create_docgen_batch` against the firm's template → output to the confirmed folder → share via `create_collaboration` or `add_folder_shared_link`. **[CONFIRM: DocGen template, destination folder, share method/expiration]**

## Legal guardrails

Box mechanics (DocGen template/tag requirements, external-sharing confirmation, AI pacing/limits/citations, metadata writes) are governed by the capability references above and [shared Box legal workflows](../box-legal-workflows/SKILL.md). Specific to intake:

- Conflict, PEP, and sanctions clearance are firm screening + attorney/compliance calls — the agent surfaces the underlying text only and never clears them.
- Risk rating and routing/staffing are firm policy + attorney calls, never the agent's.
- Prompt Box AI to surface facts and cite the source, not to determine risk.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "Box Legal Intake"
short_description: "Run client intake workflows in Box"
default_prompt: "Use $box-legal-workflows-intake to review and route this client intake in Box."
73 changes: 73 additions & 0 deletions plugins/box/skills/box-legal-workflows-ma/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
name: box-legal-workflows-ma
description: Build and manage M&A virtual data rooms with Box MCP — create secure due-diligence folder structures, scope role-based access for internal teams and external parties, validate permissions before sharing, and answer cross-document due-diligence questions with Box AI. Use this skill when the user mentions M&A, deal rooms, data rooms, VDRs, due diligence, or mergers and acquisitions.
---

# M&A Deal Room Management

> **PREREQUISITES:**
> - Read [Box foundation skill](../box/SKILL.md) for Box MCP auth, tool selection, base workflows.
> - Read [shared Box legal workflows](../box-legal-workflows/SKILL.md) for Box collaboration role definitions, Box AI usage boundaries, and reusable confirmation phrasings.
Build and run an M&A data room *in Box*: create the folder hierarchy, scope role-based access with Box collaborations, validate permissions before sharing, and answer due-diligence questions with Box AI plus citations. This skill is the deal-room-specific recipe; the underlying Box tool mechanics live in the capability references below. Deal risk, materiality, and terms are attorney calls. Not legal advice.

## Box capability references

Reach for these for tool mechanics rather than restating them here:

- `../box/references/content-workflows.md` — create the folder hierarchy, upload/copy, classify-and-file submissions
- `../box/references/collaboration.md` — role-based access, shared links, permission audits (`list_item_collaborations`)
- `../box/references/mcp-search.md` — locate documents, folder-scoped search
- `../box/references/ai-and-retrieval.md` — due-diligence Q&A and term extraction with citations

## Folder structure

Create the tree using the MCP tools in `../box/references/content-workflows.md` (top-down, parent before child; reuse the existing folder on a `409` name conflict). Confirm the firm's template first. Example numbered structure — numeric prefixes keep ordering consistent and segregate external submissions:

```
[Deal Name] M&A Deal Room/
├── 01 - Financial Statements/
├── 02 - Legal Documents/
├── 03 - HR & Employment/
├── 04 - Intellectual Property/
├── 05 - Commercial Contracts/
├── 06 - Real Estate & Assets/
├── 07 - IT & Cybersecurity/
└── 08 - External Submissions/
```

## Access model

Scope access least-privilege and folder-specific rather than root (role capabilities and external-sharing confirmation rules are in `../box/references/collaboration.md` and [shared Box legal workflows](../box-legal-workflows/SKILL.md)). Example deal-room mapping (confirm with the user):

- Internal: Deal Lead → Editor/Co-Owner on root; Finance → Viewer on Financial Statements; Legal → Editor on Legal Documents.
- External: External Counsel → Uploader on their own folder; Auditors → Viewer on Financial Statements; Prospective Buyer → Viewer on a curated subset, not the full room.

## Tool selection

| Deal-room task | Tool | Notes |
|------|------|-------|
| Create folders | `create_folder` | Batch the hierarchy, top-down |
| Add files | `upload_file` / `copy_file` | New uploads or copy existing Box files |
| Grant access | `create_collaboration` | Confirm first for any external party |
| Shared link | `add_folder_shared_link` | Confirm audience/expiration |
| Audit/verify access | `list_item_collaborations` | Before and after external changes |
| Find docs | `search_files_keyword` | Scope with `ancestor_folder_id` |
| Due-diligence Q&A | `ai_qa_multi_file` | Cross-document; surface citations |
| Extract terms | `ai_extract_structured_from_fields_enhanced` | Persist with `set_file_metadata` |
| Classify submissions | `ai_qa_single_file` | Then `copy_file` into the right folder |

## Workflow

1. **Setup**: create the folder tree → grant internal access with `create_collaboration`. **[CONFIRM: structure, emails/roles]**
2. **Populate**: `upload_file`/`copy_file`; classify submissions with `ai_qa_single_file`, then `copy_file` into the right category folder.
3. **External access**: `list_item_collaborations` (audit) → **[CONFIRM: who, folders, permission, expiration]**`create_collaboration` or `add_folder_shared_link``list_item_collaborations` (verify).
4. **Due diligence**: `search_files_keyword` (folder-scoped) → `ai_qa_multi_file` → present the answer with citations; `ai_extract_structured_from_fields_enhanced` for terms → `set_file_metadata` to persist.

## Legal guardrails

Box mechanics (external-sharing confirmation, shared-link settings, AI pacing/limits/citations) are governed by the capability references above and [shared Box legal workflows](../box-legal-workflows/SKILL.md). Specific to deal rooms:

- Deal risk, materiality, and term interpretation are attorney calls, never the agent's.
- Validate permissions with `list_item_collaborations` before *and* after external changes — a folder grant exposes everything inside it, including files added later.
- Audit trail: record returned folder/file/collaboration IDs and write DD summaries back to Box.
4 changes: 4 additions & 0 deletions plugins/box/skills/box-legal-workflows-ma/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "Box M&A Deal Rooms"
short_description: "Build and manage M&A deal rooms in Box"
default_prompt: "Use $box-legal-workflows-ma to build or manage this M&A deal room in Box."
Loading