Explore the build library
consultance.ai
Deal Copilot
Build libraryControlsAboutCase studiesBlogBook an audit
consultance.ai

Systems

WorkflowsDeal CopilotPrivate knowledgeFinance automationBuild library

Company

About usCase studiesBlogContact

Start a conversation

Free AI auditfounder@consultance.ai

Teams

Investment bankingCFOs & financePrivate equityPrivate creditReal estateProperty managementProfessional servicesOther industriesAll industries

Legal

Privacy policyTerms of service

Our approach

Audit the workflow.Build in your environment.Hand over a system you own.
Build something useful © 2026 consultance.ai
Build library/LBO Structured Review Prompt Pack

Finance and data

LBO Structured Review Prompt Pack

For PE associates, lenders and corp dev teams reviewing a buyout: 12 prompts that pull a public target's filed numbers from SEC filings, build the EBITDA bridge, test debt capacity and write the committee memo.

Medium setup4 steps12 prompts
Open the setup guide Discuss an implementation
Finance and data

Start with the guided setup

Follow the setup below in your own workspace. For a demonstration of the prompt-copying process, open the optional walkthrough.

Watch the setup walkthrough
Step 1 · setup
Three minutes, four steps, nothing to install by hand

Claude sets it up for you. You just paste.

Never used Claude? It is free and takes 30 seconds to open. Copy the instruction below, paste it into Claude, and it reads this page and walks you through everything, one question at a time.

  1. Tell Claude how to talk to you

    One tap. It changes how much Claude explains, and how slowly it goes. You can change it any time.

  2. Copy your setup instruction

    A short instruction plus a link to this page lands on your clipboard. First copy asks for your email once. That unlocks every button across the whole library.

  3. Open Claude in a new tab

    Free account, no card, 30 seconds. This tab stays open so you can come back.

    Open claude.ai
  4. Paste, send, and answer one question

    Claude reads this page, asks one question about your work, then guides you step by step until your first output is right. If anything looks wrong, tell Claude what you see, and it fixes it with you.

▸Prefer the full prompt instead of the link? (optional)
Click to copy
I am comfortable copy-pasting and following instructions, but I am not a developer.
There is nothing to install for this one and no commands to type: it all happens inside Claude. If any instruction below implies a Terminal, translate it into the equivalent click path for me instead.
- Plain English. Define jargon the first time it appears.
- One step at a time, then wait for me to confirm before the next one.
- Tell me what success looks like at each step, and diagnose any error before moving on.

Follow the instructions below with those rules applied.

If you can browse the web, open and read this page in full first, it has the complete guide and every prompt you will run (the vault is under the-vault anchor): https://consultance.ai/library/pe-lbo-diligence-kill#the-vault . If you cannot open links, tell me and I will paste the page in, do not guess the prompts.

You are my setup guide from consultance.ai for the PE LBO Structured Review Pack. Be calm and practical, one step at a time, and wait for me after each step. Define every term the first time you use it.

First message: ask me only this, "Which fits your deal: one deal with a handful of documents you can upload, a folder of data room files, or a public company whose 10-K and 10-Q you want pulled from SEC filings?" Then follow the matching branch. This is the same routing as the pack's prompt 01.

## Branch 1: one deal, a handful of documents you can upload (UI path, not a Terminal install)
This is not a Terminal install. Nothing to download.
1. Open Claude in your browser or the desktop app. In the model picker, select Claude Opus 5.5.
2. Create a Project for the deal (a Project is a private workspace with its own files). Name it after the deal.
3. Upload the documents you have into the Project: audited statements, the latest interim, the commitment letter or term sheet, the management adjustments schedule.
4. Your documents go only to your own Claude account, never to us. Use a Team or Enterprise plan, or turn model training off in settings, before you upload confidential material.
5. Go to the first-session drill below.

## Branch 2 and 3: a data room folder, or a public target (Terminal install, Claude Code)
Use this for a folder of many files or spreadsheets (branch 2, often a private target), for material that cannot be uploaded anywhere, and for a public target whose filings you want pulled (branch 3).
Claude Code is Anthropic's coding tool that runs in your Terminal and can write files and run commands in a folder.
1. Install Claude Code. On macOS, Linux or WSL, paste this into Terminal (Terminal is the app where you type commands):
   curl -fsSL https://claude.ai/install.sh | bash
   Then open a new Terminal window and run:
   claude --version
   Success looks like a version number. On Windows, use the PowerShell line on https://docs.claude.com/en/docs/claude-code/overview rather than guessing it.
   Branch 2 (data room folder): skip steps 2 and 4. Go to step 3, open Claude Code in the folder that holds the data room, paste prompt 01, choose data source (D), and skip prompts 04 and 05.
2. Branch 3 only. Check Python. Run:
   python3 --version
   You need 3.10 or higher (for example 3.12 or 3.13). A stock Mac prints 3.9.6, which cannot install the pack's tools: install Python from python.org first, open a new Terminal, and check again.
3. Make a folder for the deal, for example ~/deals/target, go into it with cd, and run: claude
4. Branch 3 only. Paste prompt 01 from the page and answer its questions, including your name and email (prompt 01 asks for them because the SEC requires them on every request), then paste prompt 04. Claude Code writes three files, installs the one library the pack uses (edgartools, which reads SEC filings, free, no key) and runs a test. Success is the line "1 passed".
5. Common errors: "No matching distribution found" means Python is below 3.10 (go back to step 2). "circular import" means a file in the folder is named like a Python module (rename it). The SEC wants your real name and email on every request; prompt 01 asks for them and prompts 04 and 05 use them.

## First-session drill (all branches)
1. Run prompt 02, the calibration run, on its built-in sample. Every line must say MATCH before you load a real deal. It stops once on purpose, on a missing interest rate: that is the pack refusing to guess.
2. Run prompt 03 on your deal: it writes the six-line big picture, quotes your thesis and lists the documents that are missing.
3. Public target (branch 3): run prompt 05 with your decision date. It prints which filings it used and which it excluded as later than your date.
4. Good output: every figure carries a tier and a source (an accession number or a document and page), and every finding has one tag. Check the tie-out in prompt 10 before you trust the memo in prompt 11.

Rules for guiding me: one step at a time; name the exact button or command; do NOT tell me something is "not possible" before checking which branch I am on; you are the guide, the committee decision stays with me.
Step 2 · run it on your data

Step 1 set it up. These 12 prompts do the work.

the vault

The 12 prompts

Grab the whole pack as one file, or tap any prompt below to copy it on its own. Placeholders that look like {{THIS}} get swapped for your own numbers — and if you ran Step 1, Claude fills them in for you.

One .md file · all 12 prompts, numbered, in order · nothing left out.
Click to copy
<role>You are a leveraged finance practitioner who has reviewed many buyout structures. You are a colleague, not a prosecutor: you build the picture first, test only what bears on the decision, and retire a flag once the context explains it.</role>

<surface>
Where are you running this? Pick the one that matches, and I will say so if it is the wrong place.
(A) Claude app, a private Project: one deal, a handful of documents you can upload. Chat is correct here.
(B) Claude Code, pointed at a folder: a data room export, many files, spreadsheets to parse, or a PUBLIC target whose filings you want pulled from SEC EDGAR (prompts 04 and 05 need this).
(C) Claude Code locally, or your company's own deployment: material that cannot be uploaded anywhere.
Model: select Claude Opus 5.5 in the model picker for every judgment prompt (03, 06 to 11). Claude Sonnet 5 is fine for a first read of a very large data room in 03. Do not switch model inside a prompt.
STOP and re-route, do not continue anyway, when: you paste a file path, a folder or a screenshot of a file list into chat (that is a Claude Code job, open Claude Code in that folder); the material arrives truncated or is too large to hold (name the documents missing and do not score what you could not read); a figure is needed from a document you have not provided (I ask once, name the document, then stop).
</surface>

<onboarding>
Ask one block at a time. Wait for each answer.
1. DEAL TYPE: (A) take-private of a public company (B) platform buyout of a private company. Not covered: add-ons and carve-outs (standalone and transition service costs, allocated overhead and synergies need their own checks, which this pack does not have). If the deal is one of those, say so and stop.
2. DATA SOURCE, pick all that apply: (A) upload documents to this Project (B) paste figures (C) upload the model workbook as a file (D) Claude Code reading a data room folder (E) Claude Code pulling a public target's 10-K and 10-Q from SEC EDGAR with prompts 04 and 05 (F) a mix.
3. DECISION DATE: the date the decision is taken. Everything filed or known after it is excluded. For a past deal this is how you test the pack blind.
4. YOUR THESIS, in your words: why this deal works, and your role (sponsor, lender, co-investor, seller).
5. TOKENS: {{TARGET_NAME}}, {{CIK_OR_TICKER}} (public only), {{DECISION_DATE}}, {{ENTRY_EV}}, {{HOLD_YEARS}}, {{HURDLE_IRR}}, {{EXIT_MULTIPLE}}. Claude Code only: {{PROJECT_DIR}} (the deal folder). Public target only: {{SEC_NAME}} and {{SEC_EMAIL}}, your real name and email, which the SEC requires on every filings request.
Then offer: CONVERSATION mode (you state the question, I ask for what I need and run only the prompts that bear on it) or FULL sequence 03 to 12. Conversation is the default.
</onboarding>

<rules>
EVIDENCE TIERS. TIER 1: a filed or signed document (10-K, 10-Q, merger proxy, commitment letter, audited statements), cited by accession number or document and page. TIER 2: a figure keyed or exported by a person (model workbook, management schedule). TIER 3: marketing (CIM narrative, press release, teaser): it generates a question and never a number. Every load-bearing figure carries its tier and source id.
MISSING OR BAD INPUT. A missing figure is OPEN: ask once, naming the document that would carry it. Two sources that disagree are both shown with their source ids; never pick one. A document dated after the decision date is excluded and named as excluded. Never invent a number, a rate or a term; a figure not in the documents is labelled ASSUMPTION with a range, and the verdict is run at both ends of the range.
FLAGS. Every finding is tagged CHANGES THE DECISION, WORTH A QUESTION, or EXPLAINED BY CONTEXT, after testing it against the normal patterns below. Only CHANGES THE DECISION reaches the verdict. EXPLAINED BY CONTEXT is listed once and closed; a closed flag never colours a later prompt. WORTH A QUESTION only if the answer could move leverage, cover or IRR by a stated amount (default: 0.25x leverage, 0.25x cover, 2 points of IRR) or change the verdict. Before raising any question, test it twice: is it on the normal patterns list (then it goes to "Checked, normal"), and is it an input simply not provided, such as a rate, fees or a drawn amount (then it goes to OPEN with the document that would carry it)? Only what passes both tests and alone could move a figure past the threshold is a question. One question is one item, stating the figure it moves and by how much. Conventions, rounding, disclosed one-offs and timing go in one untagged line: "Checked, normal: ...".
NORMAL PATTERNS (test every flag against these first): a named one-time charge added back once in five years; a large equity check (it does not change what the debt can carry); the same line tagged with a different XBRL concept in two filings; captive finance debt serviced by its own receivables (abnormal if above eligible receivables, with recourse to corporate borrowers, or refinanced with corporate term debt); an undrawn revolver or ABL commitment (not funded debt); balance sheet cash used as a source; amortization of acquired intangibles inside D&A; a 10-K/A filed after the decision date; bridge commitments replaced by notes at close; convertible notes outstanding at signing; fees and OID in uses; one down year of revenue in a mature business (abnormal when operating income falls several times faster: run the downside). Precedence: arithmetic and recurrence outrank this list (a "one-time" charge taken four years running is a cost).
ARITHMETIC. Carry full precision, round at the end, show the working so a person can re-derive every figure. A tie-out that breaks by more than 0.5% on the same basis blocks.
VERDICTS allowed: PROCEED, PROCEED ON CONDITIONS, PROCEED ONLY ON CHANGED TERMS (name the terms), DECLINE, NO VIEW (only with a named deciding question that is split and would flip the verdict; "the future is uncertain" is not one). A block stops the verdict, not the analysis: keep running the other checks and print what happens by default if nobody acts.
PRIVACY. Your documents go only to your own Claude account, never to us. Use a Team or Enterprise plan, or turn model training off, before loading confidential material.
</rules>

<adapt>
How to adapt this pack: change the NORMAL PATTERNS for your sector (add yours, keep the format: pattern, why normal, what makes it abnormal); change the materiality defaults in FLAGS to your fund's; swap prompt 07's model structure for your house template; add tranches in 07. Keep the tiers, the decision date and the blocking tie-out.
</adapt>

Confirm the five blocks back to me in one table, state the surface and model, then say which prompt runs next.
Click to copy
<task>Run this synthetic sample deal through the pack's logic before any real data. Compare your output with the expected output below line by line. MATCH is judged on substance to the stated rounding; a normal pattern cleared as EXPLAINED BY CONTEXT counts as a match. If one figure does not match, say which and STOP. Do not load real data until every line matches.</task>

<sample>
Target: Harbor Components (synthetic). Decision date 2026-03-31. Role: lender.
Thesis: "Steady industrial demand; 4% EBITDA growth; the debt pays down from free cash flow."
10-K FY2025 (TIER 1): operating income 52.0; D&A 18.0; stock comp 4.0; litigation settlement 6.0 recorded in Q3 2025 (note 12: first settlement in five years, no other claims pending).
10-Q Q1 2026 (TIER 1): operating income 14.0 (Q1 2025: 12.0); D&A 4.6 (Q1 2025: 4.4). Stock comp flat.
Commitment letter (TIER 1): EV 8.0x adjusted EBITDA before stock comp; term loan 4.0x at 8.0%; second lien 1.0x, rate: page missing from the upload; revolver 50.0, undrawn at close. Fees 12.0.
Plan (TIER 2): capex 15.0, cash taxes 8.0, working capital build 2.0 a year; EBITDA +4% a year; exit year 5 at 8.0x; all free cash flow after interest repays the term loan.
</sample>

Expected output:
1. STOP fires once: "Second lien rate is missing from the commitment letter (page not in the upload). Provide it; I will not assume it." Resume only when given 11.0%.
2. LTM: OI 52.0 + 14.0 - 12.0 = 54.0. D&A 18.0 + 4.6 - 4.4 = 18.2. EBITDA 72.2.
3. Bridge: + litigation 6.0 = 78.2 (EXPLAINED BY CONTEXT: named, first in five years). With stock comp added back 82.2, shown on its own line, not used for sizing.
4. Structure: EV 8.0 x 78.2 = 625.6. Term loan 312.8, second lien 78.2, total 391.0 = 5.0x. Revolver: EXPLAINED BY CONTEXT, undrawn, not debt. Equity 625.6 + 12.0 - 391.0 = 246.6.
5. Interest 312.8 x 8.0% = 25.02; 78.2 x 11.0% = 8.60; total 33.63. Cover 78.2 / 33.63 = 2.33x. Breakeven EBITDA decline to 1.0x cover: 1 - 33.63/78.2 = 57.0%.
6. FCF before interest 78.2 - 15.0 - 8.0 - 2.0 = 53.2; after interest 19.57 (held flat, a simplification the output states).
7. Exit: EBITDA 78.2 x 1.04^5 = 95.14; EV 761.14; debt 391.0 - 5 x 19.57 = 293.13; equity 468.01. MOIC 468.01 / 246.6 = 1.90x. IRR 1.90^(1/5) - 1 = 13.7%.
8. Tie-out: sources = uses (391.0 + 246.6 = 625.6 + 12.0); MOIC re-derived; all PASS.
9. Verdict: PROCEED. No CHANGES THE DECISION flags. "Checked, normal: litigation add-back, undrawn revolver."

Output columns: line, expected, yours, MATCH or MISMATCH. Then one line: "Calibration passed" or the first mismatch.
Click to copy
<role>Deal lead opening the file.</role>
<task>Using the data source from prompt 01:
1. In six lines: what the company sells, to whom, how it makes money, what it costs to keep running (capex, people), the rate environment on the decision date, and the human's thesis quoted.
2. Index the documents present against what this review needs: last audited year, latest interim, merger agreement or commitment letters with tranche terms, debt agreements of debt that survives, management adjustments schedule, customer concentration, related party notes. Each absent item is OPEN, with the prompt it blocks.
3. The three facts the thesis depends on, and which document proves each.
4. Read management transcripts, footnotes and related party notes for anything that changes a figure the model will use (a related party lease that resets rent, a customer above 10% of revenue). Tag each.</task>
<trap>A data room that is complete for a quality of earnings review can still lack the one document the structure turns on: the tranche terms. Without rates and amortization there is no debt capacity, whatever else is present.</trap>
<stop>If no document states the purchase price and the debt tranches (merger agreement, commitment letter or term sheet), say so and stop the structure prompts (07 to 09); 04 to 06 can still run.</stop>
<output_format>Big picture (six lines), document index table (document, present or absent, tier, blocks prompt), the three thesis facts, tagged findings, "Checked, normal:" line, "Next step:".</output_format>
Click to copy
<role>Engineer setting up a small, tested workspace that pulls a public target's filed numbers.</role>
<task>Run in Claude Code. Create this tree at {{PROJECT_DIR}} and write every file exactly as given. Do not summarise the plan back to me. Print `ls -R` when done.
{{PROJECT_DIR}}/scripts/pull_filed.py : pulls 10-K and 10-Q XBRL facts filed on or before a date, builds LTM
{{PROJECT_DIR}}/scripts/tie.py : ties model inputs to the filed LTM, exits 1 on a break
{{PROJECT_DIR}}/tests/test_pull.py : known-answer test on a real filing
Then run, one at a time, and show the output of each:
cd {{PROJECT_DIR}}
python3 --version   (3.10 or higher; if lower, stop and install Python from python.org first)
python3 -m venv .venv
.venv/bin/python -m pip install edgartools==5.59.1 pytest==9.1.1
EDGAR_IDENTITY="{{SEC_NAME}} {{SEC_EMAIL}}" .venv/bin/python -m pytest -q
PASS CONDITION: "1 passed". The test pulls Twitter's FY2021 10-K and must read revenue 5,077,482,000 and operating income -492,739,000. Any other result: stop and use the debug table in prompt 05.
Always call .venv/bin/python, never python3, inside this workspace. {{SEC_NAME}} and {{SEC_EMAIL}} come from prompt 01: the SEC requires a real name and email on every request and allows at most 10 requests per second. If they were not captured, ask for them once and stop.

FILE scripts/pull_filed.py
import sys, csv, os, datetime as dt, warnings
warnings.filterwarnings("ignore")
from edgar import Company, set_identity
ITEMS = {
    "revenue": ["RevenueFromContractWithCustomerExcludingAssessedTax", "Revenues", "SalesRevenueNet"],
    "operating_income": ["OperatingIncomeLoss"],
    "d_and_a": ["DepreciationDepletionAndAmortization", "DepreciationAndAmortization",
                "DepreciationAmortizationAndAccretionNet", "OtherDepreciationAndAmortization"],
    "stock_comp": ["ShareBasedCompensation", "AllocatedShareBasedCompensationExpense"],
    "interest_expense": ["InterestExpense", "InterestExpenseDebt"],
    "net_income": ["NetIncomeLoss"],
    "cfo": ["NetCashProvidedByUsedInOperatingActivities"],
    "capex": ["PaymentsToAcquirePropertyPlantAndEquipment", "PaymentsToAcquireProductiveAssets"],
}
BALANCE = {"cash": ["CashAndCashEquivalentsAtCarryingValue"],
           "short_term_investments": ["ShortTermInvestments", "MarketableSecuritiesCurrent", "AvailableForSaleSecuritiesDebtSecuritiesCurrent"]}
def facts(filing):
    df = filing.xbrl().facts.to_dataframe()
    df = df[~df["is_dimensioned"].fillna(False).astype(bool)]
    df = df[df["numeric_value"].notna()]
    df["c"] = df["concept"].str.split(":").str[-1]
    return df
def durations(df, cands):
    for c in cands:
        d = df[(df["c"] == c) & (df["period_type"] == "duration")]
        if len(d):
            d = d.assign(days=(d["period_end"].astype("datetime64[ns]") - d["period_start"].astype("datetime64[ns]")).dt.days)
            return c, d
    return None, None
def main():
    who, ident, as_of = sys.argv[1], sys.argv[2], dt.date.fromisoformat(sys.argv[3])
    set_identity(who)
    co = Company(int(ident) if ident.isdigit() else ident)
    fl = co.get_filings(form=["10-K", "10-Q"])
    rows = [f for f in fl if f.filing_date <= as_of]
    later = [f for f in fl if f.filing_date > as_of]
    if not rows: sys.exit(f"STOP: no 10-K or 10-Q filed on or before {as_of}.")
    tenk = next((f for f in rows if f.form == "10-K"), None)
    if tenk is None: sys.exit("STOP: no 10-K on or before the as-of date inside the listing.")
    q = next((f for f in rows if f.form == "10-Q" and f.filing_date > tenk.filing_date), None)
    print(f"{co.name} CIK {co.cik} as of {as_of}")
    print(f"USED 10-K {tenk.accession_no} filed {tenk.filing_date}" + (f"; 10-Q {q.accession_no} filed {q.filing_date}" if q else "; no later 10-Q"))
    print(f"EXCLUDED as after the as-of date: {len(later)} periodic filing(s)" + (f", first {later[-1].form} filed {later[-1].filing_date}" if later else ""))
    os.makedirs("out", exist_ok=True)
    try:
        fk = facts(tenk); fq = facts(q) if q else None
    except Exception as e:
        sys.exit(f"STOP: no usable XBRL in the filing ({e}). Filings before 2009 to 2011 carry none; read the statements from the filing text instead.")
    src = lambda f: (f.form, f.accession_no, str(f.filing_date))
    ff, lt = [], []
    for item, cands in ITEMS.items():
        c, d = durations(fk, cands)
        if c is None:
            near = sorted(set(fk[(fk["period_type"] == "duration") & fk["c"].str.contains(cands[0][:10])]["c"]))[:6]
            ff.append([item, "NOT FOUND", "", "", "", *src(tenk)]); lt.append([item, f"NOT FOUND in XBRL under {cands}; nearby tags {near}. Read the statement line in the filing text, do not substitute"]); continue
        years = d[(d["days"] > 350) & (d["days"] < 380)].sort_values("period_end").drop_duplicates("period_end")
        fy = years.iloc[-1]
        for _, y in years.iterrows(): ff.append([item, c, y["period_start"], y["period_end"], y["numeric_value"], *src(tenk)])
        if q is None:
            lt.append([item, f"LTM = FY {fy['numeric_value']:.0f} ({fy['period_end']})", fy["numeric_value"]]); continue
        c2, d2 = durations(fq, [c] + [x for x in cands if x != c])
        if c2 and c2 != c:
            print(f"NOTE {item}: 10-K tags {c}, 10-Q tags {c2}. Same line, different tag; check the two labels match.")
        ytd = d2[d2["period_start"] > fy["period_start"]] if c2 else None
        if ytd is None or not len(ytd):
            lt.append([item, f"STOP: {c} missing from the 10-Q; LTM not built"]); continue
        cur = ytd[ytd["period_end"] == ytd["period_end"].max()].sort_values("days").iloc[-1]
        prior = d2[(d2["period_end"] < cur["period_end"]) & (abs(d2["days"] - cur["days"]) < 8) & (d2["period_start"] <= fy["period_start"]) & (d2["period_end"] <= fy["period_end"])]
        if not len(prior):
            lt.append([item, f"STOP: prior-year YTD for {c} not in the 10-Q; LTM not built"]); continue
        pr = prior.sort_values("period_end").iloc[-1]
        val = fy["numeric_value"] + cur["numeric_value"] - pr["numeric_value"]
        ff.append([item, c, cur["period_start"], cur["period_end"], cur["numeric_value"], *src(q)])
        ff.append([item, c, pr["period_start"], pr["period_end"], pr["numeric_value"], *src(q)])
        lt.append([item, f"LTM {val:.0f} ({c2}) = FY {fy['numeric_value']:.0f} + YTD {cur['numeric_value']:.0f} ({cur['period_start']} to {cur['period_end']}) - prior YTD {pr['numeric_value']:.0f} ({pr['period_start']} to {pr['period_end']})", val])
    last = fq if q is not None else fk
    lf = q if q is not None else tenk
    inst = last[last["period_type"] == "instant"]
    assets = inst[inst["c"] == "Assets"]
    bdate = assets["period_instant"].max() if len(assets) else inst["period_instant"].max()
    inst = inst[inst["period_instant"] == bdate]
    for item, cands in BALANCE.items():
        hit = inst[inst["c"].isin(cands)]
        ff.append([item, hit.iloc[0]["c"] if len(hit) else "NOT FOUND", "", bdate, hit.iloc[0]["numeric_value"] if len(hit) else "", *src(lf)])
    debt = inst[inst["c"].str.contains("Debt|Notes|Borrowing|FinanceLease", regex=True) & ~inst["c"].str.contains("Investment|Receivable|Securities|Fair|Issuance|Proceeds|Repayment|PropertyPlant|Asset", regex=True)]
    with open("out/debt_lines.csv", "w", newline="") as fh:
        w = csv.writer(fh); w.writerow(["concept", "as_of", "value", "form", "accession", "filed"])
        for _, r in debt.drop_duplicates("c").iterrows(): w.writerow([r["c"], bdate, r["numeric_value"], *src(lf)])
    with open("out/filed_facts.csv", "w", newline="") as fh:
        w = csv.writer(fh); w.writerow(["item", "concept", "period_start", "period_end", "value", "form", "accession", "filed"]); w.writerows(ff)
    with open("out/ltm.csv", "w", newline="") as fh:
        w = csv.writer(fh); w.writerow(["item", "working", "ltm_value"]); w.writerows([r + [""] * (3 - len(r)) for r in lt])
    for r in lt: print(" | ".join(map(str, r[:2])))
    print(f"Balance sheet date {bdate}; debt lines written to out/debt_lines.csv ({len(debt.drop_duplicates('c'))} rows). TIER 1 source: the accessions above.")
if __name__ == "__main__":
    main()

FILE scripts/tie.py
import csv, sys
ltm = {r["item"]: r["ltm_value"] for r in csv.DictReader(open("out/ltm.csv"))}
breaks = 0
for r in csv.DictReader(open(sys.argv[1])):
    filed = ltm.get(r["item"], "")
    if filed in ("", None):
        print(f"{r['item']}: OPEN, no filed LTM figure (see out/ltm.csv)"); continue
    m, f = float(r["value"]), float(filed)
    gap = (m - f) / abs(f) if f else float("inf")
    ok = abs(gap) <= 0.005
    breaks += not ok
    print(f"{r['item']}: model {m:,.0f} vs filed {f:,.0f} gap {gap:+.2%} {'TIES' if ok else 'BREAK'}")
sys.exit(1 if breaks else 0)

FILE tests/test_pull.py
import subprocess, csv, os, sys, pathlib
ROOT = pathlib.Path(__file__).resolve().parents[1]
def test_known_filing(tmp_path):
    who = os.environ.get("EDGAR_IDENTITY")
    assert who, "set EDGAR_IDENTITY to your real name and email, as prompt 01 captured"
    r = subprocess.run([sys.executable, str(ROOT / "scripts/pull_filed.py"), who, "1418091", "2022-03-01"], cwd=tmp_path, capture_output=True, text=True)
    assert r.returncode == 0, r.stdout + r.stderr
    ltm = {x["item"]: x["ltm_value"] for x in csv.DictReader(open(tmp_path / "out/ltm.csv"))}
    assert float(ltm["revenue"]) == 5077482000
    assert float(ltm["operating_income"]) == -492739000
</task>
<trap>Naming a script after a Python standard library module (gettext.py, csv.py, email.py) inside this folder breaks `from edgar import ...` with a circular import error. Keep the names above.</trap>
<stop>If the test does not print "1 passed", do not run prompt 05 on a live target. Say which line failed and stop.</stop>
Click to copy
<role>Analyst building the LTM from filed numbers only.</role>
<task>In the workspace from prompt 04:
1. Run: .venv/bin/python scripts/pull_filed.py "{{SEC_NAME}} {{SEC_EMAIL}}" {{CIK_OR_TICKER}} {{DECISION_DATE}}
2. Report the USED and EXCLUDED lines, then the LTM table from out/ltm.csv with the working for each line, each figure TIER 1 with its accession number.
3. Read every NOTE line: open both filings' statements and confirm the two labels describe the same line before accepting the LTM.
4. From out/debt_lines.csv, list debt on the balance sheet date. Mark which tranches the deal documents say are refinanced, and which survive; "all or a portion" leaves the amount OPEN, never assumed.
5. Write model_inputs.csv (columns item,value) with every LTM figure the model will use, then run .venv/bin/python scripts/tie.py model_inputs.csv. Any BREAK blocks prompts 06 to 09 until the input is corrected or the difference is explained in writing with a source.</task>
<trap>The lookahead cut. A 10-K/A or a later 10-Q often restates the very quarter you are reviewing; using it tests the deal with facts nobody had. The script excludes anything filed after the decision date: keep it that way even when the later number looks better.</trap>
<debug>
Symptom: "STOP: no usable XBRL". Cause: an older filing (before about 2009 to 2011) has no XBRL. Fix: read the income statement, cash flow and debt note from the filing text; tag them TIER 1 with the page.
Symptom: an LTM line says STOP, tag missing from the 10-Q. Cause: the 10-Q tags the line under a concept not in the list. Fix: open the 10-Q cash flow statement, find the label, add that concept to the list in ITEMS, re-run.
Symptom: NOT FOUND for D&A. Cause: filers use OtherDepreciationAndAmortization or a company tag. Fix: the script prints nearby tags; confirm against the statement label.
Symptom: segment revenue appears instead of the total. Cause: dimensioned facts. Fix: the script drops them; if you edit it, keep the is_dimensioned filter.
</debug>
<stop>If the decision date falls before the first 10-K in the listing, or the pull prints STOP for operating income, D&A or interest, say so and stop; do not build EBITDA from the part that loaded.</stop>
Click to copy
<role>Quality of earnings reviewer.</role>
<task>Using the data source from prompt 01 (the LTM from prompt 05 when the target is public):
1. Reported EBITDA = operating income + D&A, with the working, for the LTM and each prior year in out/filed_facts.csv or the audited statements.
2. Each adjustment on its own row: amount, the document and page that names it, recurring or one-time (test: did it occur in any of the prior four years), and a tag.
3. Stock comp on its own line. Show EBITDA before and after adding it back; size the debt on the before figure unless the documents show it will be replaced by equity that costs the business no cash.
4. Cash conversion: CFO minus capex against EBITDA. A gap above a third needs a named cause (working capital, taxes, capitalised costs).
5. Private targets only: tie revenue and EBITDA in the adjustments schedule to the audited statements and the trial balance; a proof of cash for the latest year if bank statements are present.</task>
<trap>A management adjustment that recurs is a cost. "Restructuring", "integration" or "one-time" charges taken three years running belong in EBITDA, whatever the label says.</trap>
<stop>If the management adjustments schedule is absent and the filings do not name an adjustment, do not add it back; list it as OPEN and stop that row.</stop>
<output_format>Bridge table (line, amount, source id, tier, recurring or one-time, tag), EBITDA before and after stock comp, cash conversion line, "Checked, normal:" line.</output_format>
Click to copy
<role>Leveraged finance analyst.</role>
<task>From the merger agreement, commitment letters or term sheet (TIER 1) and the EBITDA from prompt 06:
1. Sources and uses to the dollar: purchase equity, refinanced debt, fees, OID; sponsor equity, rollover, each debt tranche actually funded at close, company cash.
2. Tranche table: amount, secured or not, rate (from the document, else ASSUMPTION with a range), amortization, maturity. Commitments that are not drawn at close are listed apart and are not debt.
3. Year by year for {{HOLD_YEARS}} years: EBITDA, cash taxes, capex, working capital, interest, mandatory amortization, sweep, closing debt.
4. Exit at {{EXIT_MULTIPLE}}x: exit equity, MOIC, IRR.</task>
<trap>Counting every commitment as debt. Revolvers, ABLs and bridges replaced by notes inflate leverage; captive receivables facilities are judged against their receivables, not corporate EBITDA, unless they exceed eligible receivables or have corporate recourse.</trap>
<stop>If a funded tranche has no rate in any document, say so and stop the model for that tranche; do not assume it silently. Offer an ASSUMPTION range only after the human confirms none exists.</stop>
<output_format>Sources and uses, tranche table, annual table, exit table. Every figure with a source id and tier.</output_format>
Click to copy
<role>Returns reviewer.</role>
<task>Using the model from prompt 07:
1. IRR and MOIC grid: exit multiple ({{EXIT_MULTIPLE}}x minus 2 to plus 1) by EBITDA growth (-5% to +5% a year).
2. A named downside: the worst EBITDA fall in the company's own filed history, or the sector's last downturn, applied in year 1. State which and why.
3. The EBITDA level at which the equity returns only its money (MOIC 1.0x) and the one at which it clears {{HURDLE_IRR}}%.</task>
<trap>A downside of "EBITDA minus 10%" chosen because it is round tells nothing. Use a fall this business or sector has actually had, with the source.</trap>
<stop>If the model from prompt 07 is blocked or incomplete, do not build a grid on the partial model; say which input is missing and stop.</stop>
Click to copy
<role>Lender assessing whether the cash flow carries the debt.</role>
<task>Using the data source from prompt 01 and the model from prompt 07:
1. At close: total funded debt / EBITDA (before stock comp), senior secured / EBITDA, cash interest cover (EBITDA / cash interest), free cash flow after interest (CFO - capex - incremental interest).
2. Rate paths: base, +200bps, +400bps on floating tranches. Cover and FCF after interest each year.
3. Breakeven: the EBITDA decline at which cover reaches 1.0x, against the downside from prompt 08.
4. Covenants from the credit agreement if one is provided (leverage, cover, fixed charge), headroom each year and the first breach. If covenant-lite, say so and judge liquidity instead.
5. The one structure change that most improves the weakest metric (less debt, more equity, longer amortization), with its effect on IRR.</task>
<trap>A large equity check is not credit support. Lenders are repaid from cash flow; if free cash flow is negative before new interest, no equity percentage makes the debt serviceable.</trap>
<stop>If no rate exists for a floating tranche and no base rate for the decision date is given, stop the rate paths and ask for them.</stop>
<output_format>Metrics table by year and path, breakeven line, covenant table or "covenant-lite: liquidity view", the structure fix with its IRR cost.</output_format>
Click to copy
<role>Model reviewer. You recompute; you do not copy.</role>
<task>Re-derive each figure a second way and compare:
1. Sources = uses, to the dollar.
2. MOIC = exit equity / entry equity; IRR from the equity cash flows, and the check MOIC^(1/years) - 1 for a single entry and exit.
3. Closing debt = opening debt - amortization - sweep, each year.
4. The EBITDA in 07 and 09 equals the EBITDA before stock comp from 06; for a public target, equals the LTM that tie.py passed.
5. Interest = tranche x rate, each tranche, each year.</task>
<trap>Rounding makes clean numbers disagree. Compare at full precision on the same basis; a gap from display rounding is not a break.</trap>
<review_gate>Any gap above 0.5% on the same basis is a FAIL. A FAIL blocks prompt 11: say what to fix and do not write the memo. This rule is for arithmetic only; judgment flags are handled by tags, never here. Keep running the other four checks so no second break hides behind the first. What unblocks it: the input corrected, or a named person explaining the difference in writing with a source.</review_gate>
<stop>If an earlier prompt was not run, mark its checks NOT RUN and stop; never mark them PASS.</stop>
<output_format>Table: check, value A, value B, gap, PASS or FAIL. One verdict line.</output_format>
Click to copy
<role>Deal lead writing for the committee.</role>
<task>Using prompts 03 to 10:
1. The thesis, quoted, and whether the evidence supports it, tested apart from the verdict on the structure.
2. Findings: only CHANGES THE DECISION items in the body, each with the figure, the source id and the working. WORTH A QUESTION items as a numbered list, one item per question, each with the figure it moves, by how much, and who answers it. OPEN inputs in a separate list. EXPLAINED BY CONTEXT once, in one line.
3. Verdict from the allowed list in prompt 01, with one line of reason tied to debt capacity and returns.
4. If the verdict is not PROCEED: the changed terms that would make it one (for example the debt the free cash flow carries at 1.5x cover), quantified.
5. What happens by default if nobody acts on the open questions.</task>
<trap>An early flag that the context later explained still steers a memo written in one pass. Rebuild the findings list from the tags only; a closed flag does not return.</trap>
<stop>If prompt 10 shows an open FAIL, do not write the memo. Say which check and stop.</stop>
<output_format>Two pages at most. Plain English.</output_format>
Click to copy
<role>You build one self-contained HTML page that shows this run's result honestly. You create no figures.</role>
<task>From prompts 03 to 11 in this conversation, build "{{TARGET_NAME}} Deal Screen" with, in order: header (target, decision date, deal type, surface, run date); verdict band (the prompt 11 verdict quoted, and a line if any prompt 10 check failed); returns tiles (entry EV, equity, MOIC, IRR, downside IRR, hurdle); debt capacity tiles (leverage, cover, FCF after interest, breakeven decline); year by year debt table; gate scorecard (tie-out, earnings quality, debt capacity, returns vs hurdle, downside) with status PASS, FAIL, CONDITION or NOT PRODUCED; findings with tags; EBITDA bridge; returns grid with cells below the hurdle marked; questions with who answers each, and OPEN inputs; NOT COVERED (prompts not run, missing documents, every ASSUMPTION, and: "Desk review of the documents supplied. No management meetings, site visits, customer calls, market study, tax or legal work, or audit."); footer with the source tag legend.</task>
<constraints>Every figure exactly as an earlier prompt stated it, with a source tag (P03 to P11). A figure never produced reads "not produced". Two prompts that disagree are shown side by side. No score, grade or probability. One .html file, inline CSS and JS, no network calls, light and dark via prefers-color-scheme, status words next to colours, print clean.</constraints>
<trap>A page that looks complete over a partial run is worse than no page. NOT PRODUCED must be visible, never a blank or a zero.</trap>
<stop>If prompt 11 was not produced, do not build the page; say which prompt to run first.</stop>
<output_format>The HTML in one fenced block. Then: "Save the block above as deal-screen.html and open it in a browser." Then "Next step:" and the one figure a reviewer should challenge first.</output_format>
🔥 optional · live interactive tool

Open the LBO returns and covenant calculator

Browser-based. No signup. Drop in your numbers and see the trade in real time. Opens in a new tab so the prompts stay where you left them.

Launch the live tool

60 days and a $250K associate, or two weeks in your own Claude.

AI just collapsed PE due diligence from 60 days to 2 weeks. 9 prompts run the LBO model, the quality of earnings, the covenant stress test, a reconciliation self-check, and the IC memo on your own deal — the work a $250K associate burns 60 days on, without the all-nighter or the $1M Big 4 FDD engagement.

Path A · free

Run the build independently

The setup rail and every prompt above are free and stay free. The cost is your time, and the risk of wiring it wrong on live data.

Back to the prompts
Path B · done with you

Connect it to your operation

We deliver a private deal-room workspace: the prompts loaded into your Claude tenant, governed connectors to your VDR and market data, an IC memo template wired to your fund format, and partner review gates so nothing reaches committee unchecked. You get IC-ready diligence in two weeks without an unchecked figure in front of the committee.

Book a build call
data safety

Before you use live numbers

  • • Run last quarter's numbers first. Live data is not a test bed.
  • • Nothing here uploads to us. It runs in your own Claude account, on your own machine.
  • • A named human reviews and signs every output before it reaches a board, lender, or client.
  • • Mask account numbers and names to the minimum the task needs.
the fine print

Straight answers on ownership

Prompt set authored by consultance.ai. edgartools is MIT licensed. Your documents go only to your own Claude account; we never see them. Use a Team or Enterprise plan, or turn model training off, before loading confidential deal material.

Read this far? You want IC-ready diligence in two weeks, not 60 days. Let us build the deal room — with partner gates before committee.

Book a build callBack to the library

Want this wired into your stack instead of running it yourself? That is our AI deal desk and finance automation service.

Newsletter

New builds, as they ship

One short note when a new build ships: what it does, who it is for, and how to run it in your own Claude.

Free. One email a week at most. Unsubscribe in one click.

More like this

Related builds

All builds
Finance and data
Finance and data

Month End Close AI Agent Team

For controllers and CFOs: a 12 agent month end close team in your own Claude that preps reconciliations, accruals, entries and flux notes as a structured review. You approve every ledger post.

Setup guide
Finance and data
Finance and data

Ramp Claude Connector Setup Guide

For controllers and finance ops teams on Ramp: Claude setup steps plus 12 read only prompts for spend baseline, close readiness, accruals and flux. Replaces the manual Ramp export to Excel.

Setup guide
Finance and data
Finance and data

Claude and NetSuite Setup Guide

For controllers, CFOs and FP&A leads on NetSuite: the setup steps for Oracle's Claude connector plus 12 read only prompts for close, receivables, payables and cash.

Setup guide
Get the free kitBook a call

Share with your workflow owner.

Bring the relevant team into the conversation with the build and setup guide.

Forward by email
in one line

What is LBO Structured Review Prompt Pack?

LBO Structured Review Prompt Pack is a finance and data build in the consultance.ai AI Build Library. For PE associates, lenders and corp dev teams reviewing a buyout: 12 prompts that pull a public target's filed numbers from SEC filings, build the EBITDA bridge, test debt capacity and write the committee memo. It fits PE associates and VPs, leveraged finance lenders, search funds and corp dev teams reviewing a buyout structure before committee. Setup difficulty is Medium, with 4 plain-English steps.

What does LBO Structured Review Prompt Pack do?

For PE associates, lenders and corp dev teams reviewing a buyout: 12 prompts that pull a public target's filed numbers from SEC filings, build the EBITDA bridge, test debt capacity and write the committee memo.

Who is LBO Structured Review Prompt Pack for?

It fits PE associates and VPs, leveraged finance lenders, search funds and corp dev teams reviewing a buyout structure before committee.

How hard is LBO Structured Review Prompt Pack to set up?

Medium to set up — one guided setup instruction covering 4 plain-English steps, plus 12 ready-to-run prompts on the resource page.

How would consultance.ai build this out?

We would deliver a private deal-room workspace: the prompts loaded into your Claude account, the filings pull wired to your pipeline of targets, your house model template in prompt 07, and review gates so nothing reaches committee unchecked.

What are the licensing terms?

Prompt set authored by consultance.ai. edgartools is MIT licensed. Your documents go only to your own Claude account; we never see them. Use a Team or Enterprise plan, or turn model training off, before loading confidential deal material.

Connect this build to your workflow.

Discuss how LBO Structured Review Prompt Pack fits your systems, controls, and team. We define the integration, review process, and deployment requirements with you.

This build comes from our AI consulting and AI implementation practice — see the full AI in finance guide and how we work with CFO teams.

Book an audit