M&A Deal Workbench
Analyze M&A deals using the structured deal workbench REST API. Gather deal records,
compare draft terms against playbook rules or policy thresholds, compute dollar
amounts from headline purchase price, and return structured JSON conforming to
the provided answer template.
Quick Start
- Read the provided
input/prompt.txt and input/payloads/answer_template.json.
- Identify the deal ID, client side, and playbook or policy ID from the prompt.
- Gather all relevant workbench records. Use API Reference
for endpoint details.
- Compare each draft term against the applicable playbook rules or policy
thresholds. See Domain Model for field semantics and
Task Patterns for task-type guidance.
- Compute dollar amounts from the headline purchase price unless a source
explicitly states a different basis.
- Return only valid JSON matching the answer template shape. Do not include
explanatory prose, markdown fences, or commentary outside the JSON.
Core Workflow
Step 1: Parse the Task
From the prompt, extract:
deal_id (e.g., PRJ_JUNIPER)
client_side ("seller" or "buyer") -- infer from language like "seller-side counsel" or "buyer-side counsel"
- The applicable playbook ID (e.g.,
PB_SELLER_A, PB_BUYER_A) or policy ID (e.g., POL_MA_2025_A)
- The answer template from
input/payloads/answer_template.json
Step 2: Gather Data
Use GET <TASK_ENV_BASE_URL>/api/deals/<deal_id> to get the deal header
(headline value, parties, structure). Then gather records relevant to the task
type. Common API endpoints are documented in API Reference.
Always fetch, at minimum, the deal record, terms, and the playbook or policy.
Fetch additional records (consents, employees, regulatory, benchmarks,
risk estimates, cap table, material contracts, diligence findings, notes)
based on what the answer template requires.
If cross-table verification is needed, use POST /api/query with the
read-only token as documented in the API reference.
Step 3: Compare and Classify
For each draft term relevant to the answer template:
- Find the draft value from the terms endpoint response.
- Find the corresponding playbook rule or policy threshold.
- Classify the issue status:
draft_exceeds_playbook / draft_below_playbook: draft value is worse than the playbook position
missing_required_term: playbook requires a term absent from the draft
in_policy / out_of_policy: for policy-based comparisons
- Assign risk rating (
LOW, MEDIUM, HIGH) based on risk estimates or:
HIGH: closing certainty, indemnity/escrow with material dollar exposure, missing required protections
MEDIUM: mechanical/administrative gaps, survival periods, allocations
LOW: minor deviations or cosmetic items
- Determine recommended action (
add, revise, delete, accept, escalate, approve, approve_with_conditions, reject)
For playbook-based comparisons, use preferred and fallback values from the
playbook rules. For policy-based comparisons, use threshold values and
check benchmark support when available.
Step 4: Compute Dollar Amounts
Unless a source record specifies a different basis, compute money amounts
from the deal's headline purchase price (headline_value from the deal record):
draft_amount = draft_percent * headline_value / 100
preferred_amount = preferred_percent * headline_value / 100
fallback_amount = fallback_percent * headline_value / 100
delta_to_fallback = |draft_amount - fallback_amount|
Round all dollar values to integers. Round percentages to the precision
specified by the answer template (typically two decimal places for percent
points, four for holder percentages).
Step 5: Populate the Answer Template
Match every field in the answer template. Use only the allowed enums defined
in the template. Leave fields that do not apply to the current issue as null.
Sort issues and priority lists as directed by the template.
Cross-Cutting Rules
Seller-Side Perspective
- Identify terms the buyer's draft imposes that deviate from seller playbook.
- Treat missing seller-protective terms as issues when deal data shows they
are needed (e.g., missing reverse break fee when buyer financing condition
exists; missing HSR covenant when deal size exceeds HSR threshold).
- Prioritize issues that expose the seller to closing risk or economic leakage.
Buyer-Side Perspective
- Identify terms where the seller's draft falls short of buyer playbook
protections.
- Treat missing buyer-protective terms as issues (e.g., missing closing
consents, missing HSR condition, missing escrow provisions).
- Prioritize issues that expose the buyer to indemnity leakage, closing
uncertainty, or employee continuity gaps.
Priority Ordering
Order issues from highest to lowest negotiation priority:
- Closing certainty issues first (financing conditions, regulatory
conditions, reverse break fees, consent conditions).
- Indemnity and escrow economics next (caps, baskets, survival, materiality
scrapes, escrow mechanics).
- Employee and transition terms (continuity, PTO, TSA scope).
- Restrictive covenant terms (non-competes, non-solicits).
- Administrative terms last (governing law, tax allocation, transfer tax
splits).
Source ID Tracking
Use stable IDs from the workbench records. When a term is missing entirely,
use an empty array for source_term_ids. Cross-reference consent IDs,
contract IDs, employee IDs, and regulatory record IDs from the relevant
endpoints.
Reference Files
- API Reference: Complete workbench API surface
- Domain Model: Entity relationships and field semantics
- Task Patterns: Task-type-specific instructions
1---2name: ma-deal-workbench-83description: M&A deal negotiation and analysis using a structured deal workbench API. Use when Codex needs to analyze acquisition agreements, prepare issue registers, closing packages, escalation memos, transition reviews, or deviation matrices from deal workbench data. Triggers on requests involving deal terms, playbook comparisons, purchase-price calculations, consent analysis, employee transition, regulatory review, indemnity economics, or structured M&A position documents. Supports both seller-side and buyer-side perspectives.4metadata:5 source: https://skillmd.com/skills/prism-shadow/ma-deal-workbench-86---78# M&A Deal Workbench910Analyze M&A deals using the structured deal workbench REST API. Gather deal records,11compare draft terms against playbook rules or policy thresholds, compute dollar12amounts from headline purchase price, and return structured JSON conforming to13the provided answer template.1415## Quick Start16171. Read the provided `input/prompt.txt` and `input/payloads/answer_template.json`.182. Identify the deal ID, client side, and playbook or policy ID from the prompt.193. Gather all relevant workbench records. Use [API Reference](references/api_endpoints.md)20 for endpoint details.214. Compare each draft term against the applicable playbook rules or policy22 thresholds. See [Domain Model](references/data_model.md) for field semantics and23 [Task Patterns](references/task_patterns.md) for task-type guidance.245. Compute dollar amounts from the headline purchase price unless a source25 explicitly states a different basis.266. Return only valid JSON matching the answer template shape. Do not include27 explanatory prose, markdown fences, or commentary outside the JSON.2829## Core Workflow3031### Step 1: Parse the Task3233From the prompt, extract:34- `deal_id` (e.g., `PRJ_JUNIPER`)35- `client_side` ("seller" or "buyer") -- infer from language like "seller-side counsel" or "buyer-side counsel"36- The applicable playbook ID (e.g., `PB_SELLER_A`, `PB_BUYER_A`) or policy ID (e.g., `POL_MA_2025_A`)37- The answer template from `input/payloads/answer_template.json`3839### Step 2: Gather Data4041Use `GET <TASK_ENV_BASE_URL>/api/deals/<deal_id>` to get the deal header42(headline value, parties, structure). Then gather records relevant to the task43type. Common API endpoints are documented in [API Reference](references/api_endpoints.md).4445Always fetch, at minimum, the deal record, terms, and the playbook or policy.46Fetch additional records (consents, employees, regulatory, benchmarks,47risk estimates, cap table, material contracts, diligence findings, notes)48based on what the answer template requires.4950If cross-table verification is needed, use `POST /api/query` with the51read-only token as documented in the API reference.5253### Step 3: Compare and Classify5455For each draft term relevant to the answer template:56571. **Find the draft value** from the terms endpoint response.582. **Find the corresponding playbook rule** or policy threshold.593. **Classify the issue status:**60 - `draft_exceeds_playbook` / `draft_below_playbook`: draft value is worse than the playbook position61 - `missing_required_term`: playbook requires a term absent from the draft62 - `in_policy` / `out_of_policy`: for policy-based comparisons634. **Assign risk rating** (`LOW`, `MEDIUM`, `HIGH`) based on risk estimates or:64 - `HIGH`: closing certainty, indemnity/escrow with material dollar exposure, missing required protections65 - `MEDIUM`: mechanical/administrative gaps, survival periods, allocations66 - `LOW`: minor deviations or cosmetic items675. **Determine recommended action** (`add`, `revise`, `delete`, `accept`, `escalate`, `approve`, `approve_with_conditions`, `reject`)6869For playbook-based comparisons, use preferred and fallback values from the70playbook rules. For policy-based comparisons, use threshold values and71check benchmark support when available.7273### Step 4: Compute Dollar Amounts7475Unless a source record specifies a different basis, compute money amounts76from the deal's headline purchase price (`headline_value` from the deal record):7778- `draft_amount = draft_percent * headline_value / 100`79- `preferred_amount = preferred_percent * headline_value / 100`80- `fallback_amount = fallback_percent * headline_value / 100`81- `delta_to_fallback = |draft_amount - fallback_amount|`8283Round all dollar values to integers. Round percentages to the precision84specified by the answer template (typically two decimal places for percent85points, four for holder percentages).8687### Step 5: Populate the Answer Template8889Match every field in the answer template. Use only the allowed enums defined90in the template. Leave fields that do not apply to the current issue as `null`.91Sort issues and priority lists as directed by the template.9293## Cross-Cutting Rules9495### Seller-Side Perspective9697- Identify terms the buyer's draft imposes that deviate from seller playbook.98- Treat missing seller-protective terms as issues when deal data shows they99 are needed (e.g., missing reverse break fee when buyer financing condition100 exists; missing HSR covenant when deal size exceeds HSR threshold).101- Prioritize issues that expose the seller to closing risk or economic leakage.102103### Buyer-Side Perspective104105- Identify terms where the seller's draft falls short of buyer playbook106 protections.107- Treat missing buyer-protective terms as issues (e.g., missing closing108 consents, missing HSR condition, missing escrow provisions).109- Prioritize issues that expose the buyer to indemnity leakage, closing110 uncertainty, or employee continuity gaps.111112### Priority Ordering113114Order issues from highest to lowest negotiation priority:1151. Closing certainty issues first (financing conditions, regulatory116 conditions, reverse break fees, consent conditions).1172. Indemnity and escrow economics next (caps, baskets, survival, materiality118 scrapes, escrow mechanics).1193. Employee and transition terms (continuity, PTO, TSA scope).1204. Restrictive covenant terms (non-competes, non-solicits).1215. Administrative terms last (governing law, tax allocation, transfer tax122 splits).123124### Source ID Tracking125126Use stable IDs from the workbench records. When a term is missing entirely,127use an empty array for `source_term_ids`. Cross-reference consent IDs,128contract IDs, employee IDs, and regulatory record IDs from the relevant129endpoints.130131## Reference Files132133- [API Reference](references/api_endpoints.md): Complete workbench API surface134- [Domain Model](references/data_model.md): Entity relationships and field semantics135- [Task Patterns](references/task_patterns.md): Task-type-specific instructions