# Deal Vault for Agents (Finance) Part 1 is for the deal professional. Part 2 is setup instructions for an agent: give them to the agent, and the agent sets up or adapts the system with you. ## Part 1 — For the deal professional **Example use cases.** The center of the vault is an integrated summary of the loan agreement and all its amendments (`_context/facility-summary.md`), with the text of each key provision quoted next to its summary. With it, the agent can: - **Answer borrower questions fast.** Example: the borrower's CFO says the company plans to move assets to new off-shore subsidiary. You ask the agent how the loan agreement treats this plan. It can collect relevant information to analyze and coordinate a plan with counsel, e.g. in this example: foreign subsidiary not currently a loan party; joinder requirements for foreign subsidiaries generally; restrictions on asset transfers to non-loan party subsidiaries, financial statement information about assets associated with current manufacturing facility in US, any other information in your vault pertinent to the topic with source attribution and quotes of excerpted language in the format convenient for you. With organized facts, coordination of next steps between borrower on the business side and counsel is more efficient. You still involve counsel; the agent reduces the effort of collecting the relevant data. - **Review board materials and other business updates against the facility.** The agent reads a new board deck and flags each plan that has consequences under the facility: asset moves, acquisitions, new debt, distributions, a change in the business. If management announces a relocation without considering the loan restrictions, you can tell the business contact early that the plan will need to be worked through under the facility. - **Screen new financial data.** When you receive a reporting package, the agent checks it and flags inconsistencies with earlier data, covenant headroom and the risk of a breach, and large deviations from budget or plan. You then do not rely only on a compliance certificate with every box checked "complies". 1. **Purpose.** Keep each company or deal in a set of plain-text Markdown (`.md`) and CSV (`.csv`) files. Agents read, search, and quote these formats directly, so they are the preferred formats for the vault. A local coding agent reads and writes the files, and you read and edit the same files. Agents do not retain memory between sessions, so all facts, rules, corrections, templates, trackers, and work product must be in the files. You can change agent tools without touching the files. **Obsidian** is a free desktop app. In Obsidian, you can view a folder of Markdown files as linked notes, with search, tables, and templates. A **vault** is the folder that you open in Obsidian as one unit. Obsidian is only a convenient viewer and editor for the files. If your firm does not allow Obsidian, use the same folder system with any Markdown viewer or editor; the agent works the same way. Obsidian has useful community plugins (item 12). They are third-party code, so review their security and data handling before you install them. 2. **One vault per company, or one vault with a folder per company.** Both work. With a vault per company, agents cannot mix facts between companies, and you search one company at a time in Obsidian. With a single vault with `Companies/[name]/`, you can compare companies across a portfolio and keep shared templates in one place. In either setup, the agent stays inside one company folder unless you ask a cross-company question. 3. **Folder tiers.** Folders are numbered by distance from the raw source and by how much you have checked the material. You move files up the tiers; keep each file in one place only. ``` [COMPANY]/ # one vault per company or deal ├── AGENTS.md # company summary, folder map, vault rules ├── _context/ # orientation; you write, agent drafts on request │ ├── overview.md # business, products, customers, history │ ├── entities-and-capital-structure.md # entity chart: loan parties and non-loan parties; debt, equity │ ├── facility-summary.md # loan agreement + all amendments, integrated, with quoted provisions │ ├── investment-thesis.md │ ├── abbreviations.md # short names used in file names │ └── corrections.md # your corrections, stated as rules agents read ├── _inbox/ # agent fallback when no folder fits ├── 0-CONVERTS/ # raw .md / .csv conversions of PDF, Word, Excel ├── 1-SOURCE FILES/ # data room and company reporting, by subject │ ├── AGENTS.md # rules for source file handling, file naming conventions, etc. │ ├── Financials/ │ │ ├── 2026-08 Monthly Reporting Package.md │ │ ├── FY26 Budget/ # one CSV per sheet │ │ └── … │ ├── Loan Documents/ # loan agreement, amendments, security documents │ ├── Customer Contracts/ │ ├── Board Materials/ │ └── … ├── 2-REFERENCE-FILES/ # market data, comparables, industry and advisor reports │ └── … ├── 3-AGENT-WORK/ # default agent output, sorted by topic folders │ ├── Legal Agrement summaries/ │ │ ├── 2026-09 off-shore manufacturing move.md │ │ └── … │ ├── Financial analysis/ │ ├── Structuring analysis/ │ └── … ├── 4-TRACKERS/ # running lists: requests, open questions, KPIs, covenants │ ├── Open items.csv # one row per item: status, owner, dates, source │ ├── KPI log.csv # one row per period │ └── … ├── TEMPLATES/ # templates for recurring notes, reports, trackers │ ├── New financials screen.md # template + instructions for the completing agent │ ├── Loan Facility Summary.md # summary of key loan agreement provisions, structured format with integrated amendment terms │ ├── Board materials review.md │ └── … ├── _TOOLS/ # scripts and helper files └── _archive/ # superseded material ~/Documents/[COMPANY]-ORIGINALS/ # outside the vault: original PDF, Word, Excel, models └── … # same subject folders as 1-SOURCE FILES ``` Move originals (PDF, Word, Excel) out of the vault to the parallel originals tree after conversion. Agents cannot use them, and Obsidian search is slower with them in the vault. Keep working financial models in Excel outside the vault; keep the converted values from them in the vault. 4. **Instruction files.** Before acting, the agent reads Markdown instruction files. - Put rules for all your work in a **global** file: writing style, file-handling rules, source annotation. Each agent tool reads its global file from its own path (for example `~/.claude/CLAUDE.md` for Claude Code; many other tools read `AGENTS.md`). - Put the company summary (business, capital structure, your position, status), the folder tree, and the vault rules in the **vault root `AGENTS.md`**. - Put rules for one folder only (naming conventions, filing categories) in a **folder `AGENTS.md`** in that folder (for example in `1-SOURCE FILES/`). On conflict, the agent follows the file in the closer folder. 5. **Source annotation.** Require agents to annotate every analysis with the source of each fact: - the vault file and the page or section; for a spreadsheet, the sheet and the row or cell (for example `1-SOURCE FILES/Financials/FY26 Budget/P&L.csv`, row "Gross margin", column "Mar-26"); - the URL of any online resource used; - whether the fact is general knowledge, or an inference, and if an inference, from what. For every number, the agent also states the period, the unit and currency, and whether it is actual, budget, or forecast. Mark anything the agent cannot check `UNVERIFIED`. Without this rule you cannot quickly distinguish a sourced number from an invented one. 6. **Trackers.** Keep every running list in `4-TRACKERS/`: diligence requests, open questions for management, covenant compliance by period, KPIs by month, customer lists. Each tracker is one CSV file with one row per item, for example `Open items.csv` with the columns `id`, `item`, `status`, `owner`, `date_requested`, `date_due`, `source`, `notes`. You open it in Excel; the agent reads and updates it directly. If you use Obsidian, you can instead keep one note per item with these fields in the front matter and view them as a table or kanban board with Bases; use this form for items with long discussion or history. When you receive new material, ask the agent to update the trackers from it: close the requests where the new files contain the answer, add the new period's KPIs, and cite the file for each change. Ask it to list items still open after the update. 7. **Templates for recurring work.** For each note, report, or tracker entry you will produce more than once (facility summary, new financials screen, board materials review, customer contract summary, management Q&A log), build one reusable template in `TEMPLATES/`. Write instructions into each template for the agent that will complete it later: what to read, what to compare, thresholds, and red flags. Put the instructions in a comment block at the top of the template body. Keep them out of the front matter (YAML), because Obsidian's Properties editor deletes comments there. A new agent with no memory then produces the same output every time. Examples: - **Facility summary:** read the loan agreement together with all amendments and state the current terms by topic: loan parties and non-loan-party subsidiaries, collateral and excluded assets, negative covenants (debt, liens, investments, asset transfers, distributions, changes in the business), financial covenants and levels, reporting requirements, events of default. For each provision, give the section reference, quote the text, and note which amendment changed it. - **New financials screen:** compare the new period to prior periods and to budget or plan; flag variances above your threshold; flag figures for past periods that changed since the last package, and totals that do not tie; compute covenant tests where the data is sufficient and show the headroom; cite the sheet and row for each number. - **Board materials review:** list each plan or decision in the deck; for each one, state the facility provisions that apply to it, with section references, and the financial amounts involved; flag the points to raise with counsel. - **Customer contract summary:** read the base agreement together with all amendments; state the current terms (price, term, renewal, termination, change-of-control consent); quote the text of key provisions with the section reference. Build the template on two or three real documents first, check the output, fix the template, and then run it on the full set. If you use the Templater plugin, set `TEMPLATES/` as its template folder and use its folder-templates setting to assign a template to a folder. Obsidian then applies the template, including its YAML fields, to every new note that you create in that folder. 8. **Search.** Use three methods: - **Text search** (the agent's file search, or in Obsidian, its search or the Omnisearch plugin). This is keyword search, not search by meaning: if you search for "churn", you will not find "non-renewal", so search several wordings. - **Fields.** Ask the agent to filter notes by their YAML fields, or in Obsidian, use Bases; for example all customers with a change-of-control consent requirement, or all requests open more than two weeks. - **Ask the agent.** For a question across the whole set ("where do we have information about pricing changes in 2025?"), the agent searches the files, reads the matches, and answers with sources. Ask it to list the search terms it used and the folders it searched, so you know what it did not check. 9. **Structured fields for a set of documents.** **Front matter** is a block of YAML fields at the top of a Markdown file, between two `---` lines. Use it to attach key information to the file in a structured form, so that an agent can search and filter files by field without reading every file, and can export the fields of a whole set to a CSV table for Excel. In Obsidian, you can view the same fields as a table with Bases. You do not need one set of fields for the whole vault. Fields for a single document set are already useful. For example, for a set of customer contracts: customer, annual contract value, start date, renewal date, termination rights, change-of-control consent, pricing terms. Define the fields in that set's template (item 7). Start with the fields you need now. Add fields when you have a new question, and have the agent backfill them across the set. For each field, say what a blank means — for example "not in the document" or "not reviewed yet" — so that the agent does not draw wrong conclusions across the set. 10. **Other working rules.** - Agents write to `3-AGENT-WORK/` by default, and update `4-TRACKERS/` when you ask. All other folders are read-only unless you name a location; then the agent writes only there. - Edit in place and minimally. The agent changes only what you asked. For a complex edit, the agent saves a `.bak` copy first and deletes it once you accept the edit. - Store each fact in one place only. Link to the file where it is stored (in Obsidian: `[[note name]]`). - Turn corrections into rules. Record corrections as general rules in `_context/corrections.md`. Agents read the file before similar work. - Give agent notes minimal front matter: `date`, `model`, and a session id if the tool provides one. 11. **Intake and conversion.** Before intake, remove superseded versions. Keep the data room's subject grouping in `1-SOURCE FILES/`. Use a short file-naming convention that starts with the period for recurring reports (`2026-08 Monthly Reporting Package`), so files sort by date. Convert everything to Markdown or CSV. Agents can open many PDF and Excel files, but the agent reads them slowly and uses more of the model's capacity for each read, you cannot search their contents across a large set with ordinary search tools, and the agent often gets tables without their structure. Converted files are fast to search across the whole set, cheap to reread, and easy to cite. A reliable conversion process: - You drop files or whole folders into an inbox folder. A script converts each file by type and logs it. The script puts files that fail into a visible failure folder, with the reason. - Excel → one CSV per sheet (pandas / openpyxl), in a folder named after the workbook. The CSV has values only, without formulas; keep the workbook for the formulas. - PDF with a usable text layer → Markdown with Docling, without OCR. If you OCR a good text layer, you add errors. Tables in PDFs → CSV with Docling's table extraction. - Scanned PDF → OCR (Tesseract, through Docling). - Word (`.docx`) → Markdown with Pandoc (MarkItDown as fallback). - PowerPoint (board decks, management presentations) → Markdown with MarkItDown. - Then run an LLM cleanup pass to remove repeating headers, footers, and page numbers and to check that tables converted correctly. - For complex tables, slides, and charts, add a second LLM pass that rebuilds tables as Markdown or CSV and describes charts and diagrams in words, so the meaning is in the text. To save model usage, run the libraries first and send only the files that the libraries did not convert well to the model. Convert each period's reporting package the same way, so the agent can compare periods row by row. 12. **Obsidian plugins (if you use Obsidian).** These community plugins are useful with the system. Review security and data handling, and check firm policy, before you install them. | Plugin | Use | |---|---| | **Omnisearch** | Full-text search across the vault, including `.txt` and `.csv` if you add them in its settings. Keyword search with fuzzy matching. | | **Embedded-Omnisearch** | Puts an Omnisearch search box inside a note, with results listed in the note. Useful on a company home page. | | **CSV Lite** | Opens and edits `.csv` files as tables. | | **UNITADE** | Opens other extensions (for example `.txt`) as notes, so you can browse and edit them in the vault. | | **HTML Reader** | Opens `.html` files, for example agent-built tables and dashboards. | | **Bases** (core) or **Dataview** | Tables, kanban boards, and queries over YAML fields (items 6 and 9). | | **Templater** | Templates with automatic folder mapping (item 7). | | **Frontmatter Operator** | Bulk-edits YAML fields across notes (add, rename, or delete a field), with undo. Use it when you change a set's fields. | | **Charts** | Charts in a note from a table of numbers, for KPI trends. | | **Timeline View** | Shows notes on a timeline by a date field, for chronologies. | | **Task Tree** | Nested checklists with roll-up progress, for work plans and closing checklists. | | **Simple Mind Map** | Mind maps stored as Markdown, for a deal map that agents can also read and update. | | **Folder Backlinks** | Link to a folder from a note, and see which notes link to each folder. | | **Batch Copy Names and Paths** | Copies the paths of selected notes, to paste into an agent prompt. | | **Terminal** | Runs the agent in a pane inside Obsidian. | | **Enhancing Export** | Exports notes to Word or PDF for sending. Install Pandoc for it, the same program used for Word conversion (item 11). | If you use the **Linter** plugin, turn off format-on-save for agent instruction files and template folders. It can reformat YAML fields and change templates. ## Part 2 — Setup instructions for the agent You are setting up the deal vault system from Part 1. Get the user to a working vault quickly. Survey the system and make the setup decisions yourself. Ask the user only for what you cannot find on the system. Use defaults; the user changes them later if needed. Assume the user does not have Obsidian. Set up the system as plain folders and files: the user reads them in any editor and opens CSV files in Excel, and you do the searching, filtering, and status lists. 1. **Survey the system.** Check the operating system, the agent tools installed and the instruction files they read, whether Obsidian is installed, and which conversion tools are available (Pandoc, Docling, MarkItDown, Python with pandas and openpyxl, Tesseract). Look for existing folders with the company's files. If Obsidian is not installed, offer to install it as an optional viewer. If the user declines or the install is blocked, continue with plain folders and files. 2. **Set up an example company folder.** Create `~/Documents/Deals/Example Co/` for a hypothetical company, with the folder tree from Part 1 item 3, a few example subfolders, the folder `AGENTS.md` in `1-SOURCE FILES/`, and the empty `_context/` files. Write the root `AGENTS.md` in this shape, with placeholders in the Context section: ```markdown # Context Company: … Our position: … Key counterparties: … Status: … (one paragraph; update as the deal moves) See `_context/` for detail. # Vault layout (the vault's actual folder tree) # Agent-written files - Default output location: `3-AGENT-WORK/[topic]/`. Create a topic folder if none fits. - Update `4-TRACKERS/` when the user asks; cite the source file for each change. - All other folders are read-only unless the user names a location; then write only there. - Edit in place and minimally. For complex edits, save a `.bak` first and delete it once the user accepts the edit. - Give new agent notes front matter: `date`, `model`, and a session id if the tool provides one. # Source annotation (binding) Annotate every analysis with the source of each fact: - vault file and page or section; for spreadsheets, sheet and row or cell; - URL of any online resource used; - "general knowledge" for general agent knowledge; - "inferred from …" for inferences, with the basis. For every number, state the period, unit, currency, and actual / budget / forecast. Mark anything the agent cannot check `UNVERIFIED`. # Facility questions For any question about a borrower plan or action, read `_context/facility-summary.md` first, then check the quoted provision against the agreement text. State the sections relied on and the financial amounts involved, and flag points for counsel. # Search Search the files with several wordings for each concept. List the search terms used and the folders searched in the answer. # Templates Before producing a recurring note, report, or tracker entry, check `TEMPLATES/` for a matching template and follow the instructions in its comment block (or its separate instruction file, if one exists). If the work will recur and no template exists, propose one to the user. In contract analysis, cover the base agreement with all amendments, and quote key provision text with its section reference. # Corrections Read `_context/corrections.md` before classifying, summarizing, or analyzing. ``` Then tell the user: "There's an example folder set up for a hypothetical company to get started. You can adjust the folder structure to match your workflow, and we can adjust the references when you're done." 3. **Update references.** When the user has finished adjusting the example folder, update every folder reference in the `AGENTS.md` files and templates to match. 4. **Start the first company.** Copy the adjusted structure to `~/Documents/Deals/[COMPANY]/`. Ask the user where the company's documents are (loan agreement and amendments, latest reporting package, recent board deck, data room download). Copy them into the originals tree. Do not move or change the user's own copies. Fill in the Context section of the company's `AGENTS.md` from the documents. 5. **Convert.** Convert the documents per Part 1 item 11, with the tools already installed. If a needed tool is missing, install it the standard way for the operating system. Write converted files to `0-CONVERTS/`, then file cleaned copies in `1-SOURCE FILES/[subject]/`. 6. **Draft the facility summary.** Draft `_context/facility-summary.md` from the converted loan agreement and all amendments, in the format in Part 1 item 7. Mark every point where an amendment changed the original text. Mark loan parties and non-loan parties in `entities-and-capital-structure.md`. Tell the user to have counsel check the summary before relying on it. 7. **Start with one tracker and one template.** - Create the open-items tracker `4-TRACKERS/Open items.csv` with the columns `id`, `item`, `status`, `owner`, `date_requested`, `date_due`, `source`, `notes`. - Write the new financials screen template (Part 1 item 7) and run it on the latest reporting package. Add other trackers and templates later, when the user repeats a task. 8. **Set up search.** Use ordinary text search over the files (for example `rg` or `grep`). If Obsidian is installed, install Omnisearch, CSV Lite, and Templater if they are missing (Bases is built in), and set Omnisearch to index `.txt` and `.csv`. 9. **Finish.** Give the user a short summary: what you set up, where it is, and three things to try first, for example: - "The CFO wants to move manufacturing to [subsidiary]. What does the facility say?" - "Review the latest board deck against the facility." - "Screen the new reporting package."