# LedgerLeaf Complete Agent Instructions Updated: 2026-07-17 Instruction-Version: 4 Canonical-Origin: https://app.783e0811.prd.gh0stcloud.de Use this endpoint as LedgerLeaf's full public report-authoring contract. When a user asks you to create a stock analysis report for LedgerLeaf, produce one complete Markdown file that can be uploaded at https://app.783e0811.prd.gh0stcloud.de/reports/upload. The output should be useful to an investor, but it must not claim to be personalized investment advice. Make uncertainty visible. Cite public sources. Separate facts, estimates, assumptions, and opinions. ## Supported Upload Format LedgerLeaf accepts `.md` and `.markdown` files up to 5 MB. Reports may include YAML front matter. Front matter is parsed into report metadata before the user saves the report. Supported `reportType` values: `Stock Analysis`, `Company Evaluation`, `Earnings Review`, `Investment Thesis`, `Risk Analysis`, `Other`. Required front matter fields: - `title`: 3 to 180 characters. - `ticker`: 1 to 12 letters, numbers, dots, or hyphens. Use the primary listed ticker when known. - `company`: 2 to 140 characters. - `reportType`: One of the supported values. - `summary`: 10 to 500 characters. - `tags`: Up to 12 concise tags. Optional front matter fields: - `rating`: Examples: `Buy`, `Hold`, `Sell`, `Watch`, `Not Rated`. - `currentPrice`: Include currency and data date when known. - `targetPrice`: Include currency and horizon when applicable. - `currency`: ISO-style currency code such as `USD`, `EUR`, `CHF`. - `riskLevel`: Examples: `Low`, `Medium`, `High`, `Elevated`, `Speculative`. ## YAML Template ```yaml --- title: "Company Name - Investment Thesis" ticker: "TICK" company: "Company Name" reportType: "Investment Thesis" summary: "One or two sentences describing the investment question, stance, and key driver." tags: - "Sector" - "Stage" - "Region" rating: "Not Rated" currentPrice: "Unavailable" targetPrice: "Unavailable" currency: "USD" riskLevel: "Medium" --- ``` Quote YAML strings that contain colons, brackets, percent signs, or unusual punctuation. Keep metadata concise; put the analysis in the Markdown body. ## Required Markdown Structure Use this order unless the user asks for a different report type: ```markdown # Company Name - Report Type > Prepared date: YYYY-MM-DD. Data as of: YYYY-MM-DD or "source dates vary". This report is informational and not personalized investment advice. ## Executive Summary ## Key Metrics | Metric | Value | | --- | ---: | | Rating | Not Rated | | Current Price | Unavailable | | Target Price | Unavailable | | Potential Upside/Downside | Unavailable | | Exchange | Unavailable | | Report Date | YYYY-MM-DD | | Author | Unavailable | | Company Stage | Mature compounder | | Risk Level | Medium | ## Stage Classification ## Business & Industry ## Financial Quality ## Valuation ## Scenario Analysis ## Catalysts & Monitoring Plan ## Risks ## Sources & Method ## Disclosures & Limitations ``` LedgerLeaf promotes the `## Key Metrics` table into prominent report callouts, so keep that table simple with exactly two columns: `Metric` and `Value`. ## Research Quality Rules - Start from public primary sources when available: annual reports, quarterly filings, shareholder letters, earnings releases, investor presentations, exchange filings, regulator filings, and official company pages. - Use reputable market and industry sources for prices, estimates, peer data, and macro context. Cite links inline in Markdown. - State the publication date or data date for material financial figures. - Explain the basis for every rating or price target. Include the valuation method and the time horizon. - Give a fair presentation of risks that could stop the thesis, rating, or price target from working. - Separate base case, upside case, and downside case assumptions. - Do not invent exact numbers, recent prices, analyst estimates, or filings. If browsing or data access is unavailable, write `Unavailable` or `Not verified` and explain the gap. - If the analyst, sponsor, or user has a position or conflict, disclose it in `## Disclosures & Limitations`. - Avoid promotional language. Prefer direct, auditable claims. ## Stage-Aware Analysis Framework Classify the company stage before choosing metrics and valuation methods. A report may combine stages when a company has multiple segments. | Company Stage | Markers | Analysis Focus | Valuation Emphasis | | --- | --- | --- | --- | | Pre-revenue or product validation | Little or no recurring revenue, limited operating history, high cash burn, product-market fit still unproven. | Addressable market, product evidence, founder quality, runway, funding access, regulatory path, and survival probability. | Scenario analysis, milestone valuation, comparable transactions, user or pipeline metrics when justified. Avoid false precision in DCF. | | Early growth | Fast revenue growth from a small base, negative or volatile margins, heavy reinvestment, customer concentration risk. | Revenue quality, retention, CAC/LTV, gross margin path, unit economics, sales efficiency, dilution, and path to break-even. | Forward revenue or gross-profit multiples, probability-weighted DCF, and explicit downside funding scenarios. | | High growth and scaling | Large market opportunity, accelerating or durable growth, improving margins, operating leverage beginning to appear. | Competitive moat, reinvestment runway, margin expansion, cohort quality, international or product expansion, execution capacity. | DCF with staged margin assumptions, EV/sales, EV/gross profit, EV/EBITDA if earnings are meaningful, and sensitivity tables. | | Mature compounder | Growth near or above GDP, established margins, recurring free cash flow, stable balance sheet, active capital allocation. | ROIC, cash conversion, pricing power, competitive durability, dividends, buybacks, debt capacity, and management allocation discipline. | DCF, dividend discount model when applicable, P/E, EV/EBITDA, EV/FCF, and peer premium or discount analysis. | | Cyclical, turnaround, or transition | Earnings heavily tied to cycles, restructuring, portfolio shift, commodity exposure, or uncertain strategic reset. | Mid-cycle margins, normalized earnings, cost actions, debt maturities, working capital, cycle indicators, and execution milestones. | Mid-cycle earnings, sum-of-the-parts, NAV where relevant, trough/base/upside cases, and balance-sheet stress tests. | | Decline or distress | Shrinking market, negative free cash flow, covenant pressure, refinancing risk, asset sales, or going-concern questions. | Liquidity runway, debt stack, covenants, asset value, liquidation priority, restructuring options, and terminal decline rate. | Liquidation value, recovery analysis, asset value, book multiples, and explicit probability of impairment or bankruptcy. | ## Report Type Guidance - `Stock Analysis`: Balanced overview with thesis, business quality, valuation, risks, and monitoring plan. - `Company Evaluation`: Focus on business model, competitive position, governance, financial quality, and durability. A rating is optional. - `Earnings Review`: Anchor on the latest reported period, revisions to guidance, estimate changes, margin drivers, balance sheet changes, and next-quarter watch items. - `Investment Thesis`: Make the case for or against ownership over a stated horizon. Include variant perception, catalysts, valuation, and kill criteria. - `Risk Analysis`: Lead with downside, balance sheet, operational, regulatory, market, and thesis risks. Include probability and impact where justified. - `Other`: Use only when the user asks for a format outside the standard categories. ## Valuation Discipline Every valuation section should include: - Valuation date and currency. - Methods used and why they fit the company stage. - Peer set or comparable basis when using multiples. - Key assumptions, including growth, margin, discount rate, terminal value, or normalized cycle level as applicable. - Sensitivity table or scenario table. - Clear reason the market may be mispricing the company, if the report makes an investment call. Example scenario table: | Case | Core Assumptions | Implied Value | Probability | Thesis Meaning | | --- | --- | ---: | ---: | --- | | Downside | Lower growth, margin pressure, multiple compression | Unavailable | 25% | Defines loss case | | Base | Current strategy executes with normal risk | Unavailable | 50% | Central estimate | | Upside | Faster adoption, stronger margins, rerating | Unavailable | 25% | Bull case | ## Source And Disclosure Section End with: - `## Sources & Method`: Bullet list of public sources and a short method note. - `## Disclosures & Limitations`: State that the report is informational, not personalized investment advice, and identify any known conflicts or missing data. ## Research Standards Reflected - [CFA Institute Standard I(B) Independence and Objectivity](https://www.cfainstitute.org/standards/professionals/code-ethics-standards/standards-of-practice-i-b): Use reasonable care and judgment, state independent recommendations clearly, and keep research free from bias. - [CFA Institute Standard VI(A) Avoid or Disclose Conflicts](https://www.cfainstitute.org/standards/professionals/code-ethics-standards/standards-of-practice-vi-a): Prominently disclose conflicts that could impair independence or objectivity. - [FINRA Rule 2241 Research Analysts and Research Reports](https://www.finra.org/rules-guidance/rulebooks/finra-rules/2241): Base purported facts on reliable information, explain valuation method, and present risks to the rating or price target. - [SEC Regulation Analyst Certification](https://www.sec.gov/divisions/marketreg/mregacfaq0803.htm): Research reports should reflect the analyst's genuine views and disclose compensation links where applicable. - [Aswath Damodaran, Corporate Life Cycle](https://pages.stern.nyu.edu/adamodar/New_Home_Page/CLC/CLCPreface.html): Adapt valuation and analysis focus to whether a company is young, scaling, mature, declining, or distressed. ## Related Resources - Short discovery file: https://app.783e0811.prd.gh0stcloud.de/llms.txt - JSON Schema: https://app.783e0811.prd.gh0stcloud.de/schemas/report.schema.json - Schema documentation: https://app.783e0811.prd.gh0stcloud.de/docs/report-schema.md - Validation endpoint: https://app.783e0811.prd.gh0stcloud.de/api/reports/validate - API specification: https://app.783e0811.prd.gh0stcloud.de/openapi.json