@v587d/capital-generation 2.7.6 → 2.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +5 -4
  3. package/THIRD_PARTY_NOTICES.md +14 -3
  4. package/capital-config/client.js +4 -4
  5. package/capital-config/package.json +1 -1
  6. package/capital-watchlist/package.json +1 -1
  7. package/chart-ui/package.json +1 -1
  8. package/lib/agents/selected-skills-provider.js +91 -41
  9. package/lib/index.js +3 -2
  10. package/lib/web-retriever/local-fetch.d.ts +1 -1
  11. package/lib/web-retriever/local-fetch.js +1 -1
  12. package/lib/web-retriever/wind-client.d.ts +1 -1
  13. package/lib/web-retriever/wind-client.js +1 -1
  14. package/package.json +2 -1
  15. package/selected-skills/README.md +3 -1
  16. package/selected-skills/catalog.js +155 -0
  17. package/selected-skills/financeskills/LICENSE +21 -0
  18. package/selected-skills/financeskills/UPSTREAM.md +202 -0
  19. package/selected-skills/financeskills/skills/ai-anomaly-detection/EXAMPLE.md +21 -0
  20. package/selected-skills/financeskills/skills/ai-anomaly-detection/SKILL.md +84 -0
  21. package/selected-skills/financeskills/skills/ai-anomaly-detection/references/feature-engineering.md +20 -0
  22. package/selected-skills/financeskills/skills/ai-anomaly-detection/references/ml-algorithms.md +28 -0
  23. package/selected-skills/financeskills/skills/aro-computation/EXAMPLE.md +21 -0
  24. package/selected-skills/financeskills/skills/aro-computation/SKILL.md +82 -0
  25. package/selected-skills/financeskills/skills/aro-computation/references/aro-standards.md +22 -0
  26. package/selected-skills/financeskills/skills/aro-computation/references/pv-math.md +27 -0
  27. package/selected-skills/financeskills/skills/audit-checklist/EXAMPLE.md +17 -0
  28. package/selected-skills/financeskills/skills/audit-checklist/SKILL.md +77 -0
  29. package/selected-skills/financeskills/skills/audit-checklist/references/internal-controls.md +36 -0
  30. package/selected-skills/financeskills/skills/audit-checklist/references/isa-standards.md +26 -0
  31. package/selected-skills/financeskills/skills/automated-reconciliation/EXAMPLE.md +21 -0
  32. package/selected-skills/financeskills/skills/automated-reconciliation/SKILL.md +87 -0
  33. package/selected-skills/financeskills/skills/automated-reconciliation/assets/reconciliation-statement-template.md +31 -0
  34. package/selected-skills/financeskills/skills/automated-reconciliation/references/fuzzy-logic.md +27 -0
  35. package/selected-skills/financeskills/skills/automated-reconciliation/references/rec-controls.md +28 -0
  36. package/selected-skills/financeskills/skills/banking-compliance/EXAMPLE.md +21 -0
  37. package/selected-skills/financeskills/skills/banking-compliance/SKILL.md +82 -0
  38. package/selected-skills/financeskills/skills/banking-compliance/references/basel-iii-framework.md +26 -0
  39. package/selected-skills/financeskills/skills/banking-compliance/references/risk-weights.md +32 -0
  40. package/selected-skills/financeskills/skills/budget-forecast/EXAMPLE.md +21 -0
  41. package/selected-skills/financeskills/skills/budget-forecast/SKILL.md +87 -0
  42. package/selected-skills/financeskills/skills/budget-forecast/references/forecasting-best-practices.md +26 -0
  43. package/selected-skills/financeskills/skills/budget-forecast/references/scenario-analysis.md +25 -0
  44. package/selected-skills/financeskills/skills/close-management/EXAMPLE.md +17 -0
  45. package/selected-skills/financeskills/skills/close-management/SKILL.md +85 -0
  46. package/selected-skills/financeskills/skills/close-management/references/close-task-library.md +32 -0
  47. package/selected-skills/financeskills/skills/company-valuation/EXAMPLE.md +21 -0
  48. package/selected-skills/financeskills/skills/company-valuation/SKILL.md +80 -0
  49. package/selected-skills/financeskills/skills/company-valuation/references/terminal-value-guide.md +33 -0
  50. package/selected-skills/financeskills/skills/corporate-consolidation/EXAMPLE.md +21 -0
  51. package/selected-skills/financeskills/skills/corporate-consolidation/SKILL.md +84 -0
  52. package/selected-skills/financeskills/skills/corporate-consolidation/references/consolidation-standard.md +28 -0
  53. package/selected-skills/financeskills/skills/corporate-consolidation/references/minority-interest.md +25 -0
  54. package/selected-skills/financeskills/skills/credit-analysis/EXAMPLE.md +21 -0
  55. package/selected-skills/financeskills/skills/credit-analysis/SKILL.md +84 -0
  56. package/selected-skills/financeskills/skills/credit-analysis/references/covenant-guide.md +26 -0
  57. package/selected-skills/financeskills/skills/crypto-accounting/EXAMPLE.md +21 -0
  58. package/selected-skills/financeskills/skills/crypto-accounting/SKILL.md +81 -0
  59. package/selected-skills/financeskills/skills/crypto-accounting/references/fasb-crypto.md +26 -0
  60. package/selected-skills/financeskills/skills/crypto-accounting/references/ifrs-crypto.md +25 -0
  61. package/selected-skills/financeskills/skills/cvp-breakeven/EXAMPLE.md +21 -0
  62. package/selected-skills/financeskills/skills/cvp-breakeven/SKILL.md +78 -0
  63. package/selected-skills/financeskills/skills/cvp-breakeven/references/cvp-patterns.md +28 -0
  64. package/selected-skills/financeskills/skills/debt-payoff/EXAMPLE.md +21 -0
  65. package/selected-skills/financeskills/skills/debt-payoff/SKILL.md +94 -0
  66. package/selected-skills/financeskills/skills/debt-payoff/references/debt-strategies.md +32 -0
  67. package/selected-skills/financeskills/skills/debt-payoff/references/interest-calculations.md +27 -0
  68. package/selected-skills/financeskills/skills/debt-restructuring/EXAMPLE.md +21 -0
  69. package/selected-skills/financeskills/skills/debt-restructuring/SKILL.md +79 -0
  70. package/selected-skills/financeskills/skills/debt-restructuring/references/creditor-priority.md +26 -0
  71. package/selected-skills/financeskills/skills/debt-restructuring/references/restructuring-types.md +24 -0
  72. package/selected-skills/financeskills/skills/deferred-tax/EXAMPLE.md +21 -0
  73. package/selected-skills/financeskills/skills/deferred-tax/SKILL.md +86 -0
  74. package/selected-skills/financeskills/skills/deferred-tax/references/td-catalogue.md +39 -0
  75. package/selected-skills/financeskills/skills/earned-value-mgmt/EXAMPLE.md +21 -0
  76. package/selected-skills/financeskills/skills/earned-value-mgmt/SKILL.md +79 -0
  77. package/selected-skills/financeskills/skills/earned-value-mgmt/references/forecasting-eac.md +27 -0
  78. package/selected-skills/financeskills/skills/earned-value-mgmt/references/pmi-evm.md +29 -0
  79. package/selected-skills/financeskills/skills/ecl-computation/EXAMPLE.md +21 -0
  80. package/selected-skills/financeskills/skills/ecl-computation/SKILL.md +85 -0
  81. package/selected-skills/financeskills/skills/ecl-computation/references/ifrs9-standard.md +27 -0
  82. package/selected-skills/financeskills/skills/ecl-computation/references/risk-modeling.md +26 -0
  83. package/selected-skills/financeskills/skills/esg-reporting/EXAMPLE.md +17 -0
  84. package/selected-skills/financeskills/skills/esg-reporting/SKILL.md +79 -0
  85. package/selected-skills/financeskills/skills/esg-reporting/references/ghg-protocol.md +22 -0
  86. package/selected-skills/financeskills/skills/esg-reporting/references/sasb-map.md +25 -0
  87. package/selected-skills/financeskills/skills/financial-analysis/EXAMPLE.md +21 -0
  88. package/selected-skills/financeskills/skills/financial-analysis/SKILL.md +108 -0
  89. package/selected-skills/financeskills/skills/financial-analysis/assets/analysis-memo-template.md +31 -0
  90. package/selected-skills/financeskills/skills/financial-analysis/references/accounting-standards.md +45 -0
  91. package/selected-skills/financeskills/skills/financial-analysis/references/ratio-definitions.md +14 -0
  92. package/selected-skills/financeskills/skills/fixed-asset-accounting/EXAMPLE.md +21 -0
  93. package/selected-skills/financeskills/skills/fixed-asset-accounting/SKILL.md +78 -0
  94. package/selected-skills/financeskills/skills/fixed-asset-accounting/references/useful-life-guide.md +30 -0
  95. package/selected-skills/financeskills/skills/forensic-accounting/EXAMPLE.md +21 -0
  96. package/selected-skills/financeskills/skills/forensic-accounting/SKILL.md +91 -0
  97. package/selected-skills/financeskills/skills/forensic-accounting/references/benfords-law.md +24 -0
  98. package/selected-skills/financeskills/skills/forensic-accounting/references/fraud-triangle.md +26 -0
  99. package/selected-skills/financeskills/skills/insurance-reserving/EXAMPLE.md +21 -0
  100. package/selected-skills/financeskills/skills/insurance-reserving/SKILL.md +82 -0
  101. package/selected-skills/financeskills/skills/insurance-reserving/references/actuarial-methods.md +33 -0
  102. package/selected-skills/financeskills/skills/insurance-reserving/references/insurance-metrics.md +26 -0
  103. package/selected-skills/financeskills/skills/intercompany-accounting/EXAMPLE.md +21 -0
  104. package/selected-skills/financeskills/skills/intercompany-accounting/SKILL.md +79 -0
  105. package/selected-skills/financeskills/skills/intercompany-accounting/references/elimination-entries.md +35 -0
  106. package/selected-skills/financeskills/skills/inventory-costing/EXAMPLE.md +21 -0
  107. package/selected-skills/financeskills/skills/inventory-costing/SKILL.md +80 -0
  108. package/selected-skills/financeskills/skills/inventory-costing/references/costing-examples.md +31 -0
  109. package/selected-skills/financeskills/skills/investment-analysis/EXAMPLE.md +21 -0
  110. package/selected-skills/financeskills/skills/investment-analysis/SKILL.md +82 -0
  111. package/selected-skills/financeskills/skills/investment-analysis/references/competitive-advantage.md +31 -0
  112. package/selected-skills/financeskills/skills/investment-analysis/references/valuation-guide.md +29 -0
  113. package/selected-skills/financeskills/skills/journal-entry/EXAMPLE.md +21 -0
  114. package/selected-skills/financeskills/skills/journal-entry/SKILL.md +94 -0
  115. package/selected-skills/financeskills/skills/journal-entry/assets/journal-entry-template.md +21 -0
  116. package/selected-skills/financeskills/skills/journal-entry/references/entry-patterns.md +51 -0
  117. package/selected-skills/financeskills/skills/lbo-modeling/EXAMPLE.md +21 -0
  118. package/selected-skills/financeskills/skills/lbo-modeling/SKILL.md +88 -0
  119. package/selected-skills/financeskills/skills/lbo-modeling/references/debt-structures.md +22 -0
  120. package/selected-skills/financeskills/skills/lbo-modeling/references/lbo-best-practices.md +27 -0
  121. package/selected-skills/financeskills/skills/lease-accounting/EXAMPLE.md +21 -0
  122. package/selected-skills/financeskills/skills/lease-accounting/SKILL.md +88 -0
  123. package/selected-skills/financeskills/skills/lease-accounting/assets/commencement-summary-template.md +28 -0
  124. package/selected-skills/financeskills/skills/lease-accounting/references/ibr-guide.md +26 -0
  125. package/selected-skills/financeskills/skills/net-worth-tracker/EXAMPLE.md +21 -0
  126. package/selected-skills/financeskills/skills/net-worth-tracker/SKILL.md +98 -0
  127. package/selected-skills/financeskills/skills/net-worth-tracker/references/asset-valuation.md +40 -0
  128. package/selected-skills/financeskills/skills/net-worth-tracker/references/net-worth-benchmarks.md +33 -0
  129. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/EXAMPLE.md +17 -0
  130. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/SKILL.md +77 -0
  131. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/references/finbert-guide.md +26 -0
  132. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/references/linguistic-finance.md +23 -0
  133. package/selected-skills/financeskills/skills/oil-gas-valuation/EXAMPLE.md +21 -0
  134. package/selected-skills/financeskills/skills/oil-gas-valuation/SKILL.md +86 -0
  135. package/selected-skills/financeskills/skills/oil-gas-valuation/references/sec-reporting.md +22 -0
  136. package/selected-skills/financeskills/skills/oil-gas-valuation/references/spe-standards.md +25 -0
  137. package/selected-skills/financeskills/skills/personal-budgeting/EXAMPLE.md +21 -0
  138. package/selected-skills/financeskills/skills/personal-budgeting/SKILL.md +100 -0
  139. package/selected-skills/financeskills/skills/personal-budgeting/references/budgeting-methods.md +40 -0
  140. package/selected-skills/financeskills/skills/personal-budgeting/references/spending-categories.md +40 -0
  141. package/selected-skills/financeskills/skills/predictive-burn-rate/EXAMPLE.md +21 -0
  142. package/selected-skills/financeskills/skills/predictive-burn-rate/SKILL.md +82 -0
  143. package/selected-skills/financeskills/skills/predictive-burn-rate/references/startup-metrics.md +27 -0
  144. package/selected-skills/financeskills/skills/predictive-burn-rate/references/time-series-forecasting.md +22 -0
  145. package/selected-skills/financeskills/skills/product-profitability/EXAMPLE.md +21 -0
  146. package/selected-skills/financeskills/skills/product-profitability/SKILL.md +83 -0
  147. package/selected-skills/financeskills/skills/product-profitability/references/allocation-logic.md +28 -0
  148. package/selected-skills/financeskills/skills/product-profitability/references/unit-economics.md +30 -0
  149. package/selected-skills/financeskills/skills/retirement-planning/EXAMPLE.md +21 -0
  150. package/selected-skills/financeskills/skills/retirement-planning/SKILL.md +98 -0
  151. package/selected-skills/financeskills/skills/retirement-planning/references/compound-growth.md +38 -0
  152. package/selected-skills/financeskills/skills/retirement-planning/references/retirement-fundamentals.md +29 -0
  153. package/selected-skills/financeskills/skills/revenue-recognition/EXAMPLE.md +21 -0
  154. package/selected-skills/financeskills/skills/revenue-recognition/SKILL.md +86 -0
  155. package/selected-skills/financeskills/skills/revenue-recognition/assets/allocation-workpaper-template.md +30 -0
  156. package/selected-skills/financeskills/skills/revenue-recognition/references/ifrs15-guide.md +28 -0
  157. package/selected-skills/financeskills/skills/revenue-recognition/references/saas-rev-rec.md +26 -0
  158. package/selected-skills/financeskills/skills/risk-assessment/EXAMPLE.md +21 -0
  159. package/selected-skills/financeskills/skills/risk-assessment/SKILL.md +83 -0
  160. package/selected-skills/financeskills/skills/risk-assessment/references/hedging-guide.md +24 -0
  161. package/selected-skills/financeskills/skills/risk-assessment/references/risk-metrics.md +24 -0
  162. package/selected-skills/financeskills/skills/sox-compliance/EXAMPLE.md +17 -0
  163. package/selected-skills/financeskills/skills/sox-compliance/SKILL.md +88 -0
  164. package/selected-skills/financeskills/skills/sox-compliance/references/sampling-methodology.md +27 -0
  165. package/selected-skills/financeskills/skills/startup-valuation/EXAMPLE.md +21 -0
  166. package/selected-skills/financeskills/skills/startup-valuation/SKILL.md +88 -0
  167. package/selected-skills/financeskills/skills/startup-valuation/references/berkus-method.md +25 -0
  168. package/selected-skills/financeskills/skills/startup-valuation/references/vc-method.md +23 -0
  169. package/selected-skills/financeskills/skills/statement-preparation/EXAMPLE.md +21 -0
  170. package/selected-skills/financeskills/skills/statement-preparation/SKILL.md +86 -0
  171. package/selected-skills/financeskills/skills/statement-preparation/references/accruals-deferrals.md +24 -0
  172. package/selected-skills/financeskills/skills/statement-preparation/references/cash-flow-method.md +32 -0
  173. package/selected-skills/financeskills/skills/tax-efficient-investing/EXAMPLE.md +21 -0
  174. package/selected-skills/financeskills/skills/tax-efficient-investing/SKILL.md +97 -0
  175. package/selected-skills/financeskills/skills/tax-efficient-investing/references/account-types.md +33 -0
  176. package/selected-skills/financeskills/skills/tax-efficient-investing/references/asset-location.md +36 -0
  177. package/selected-skills/financeskills/skills/tax-planning/EXAMPLE.md +21 -0
  178. package/selected-skills/financeskills/skills/tax-planning/SKILL.md +93 -0
  179. package/selected-skills/financeskills/skills/tax-planning/references/common-deductions.md +28 -0
  180. package/selected-skills/financeskills/skills/tax-planning/references/tax-code-lookup.md +25 -0
  181. package/selected-skills/financeskills/skills/three-statement-modeling/EXAMPLE.md +21 -0
  182. package/selected-skills/financeskills/skills/three-statement-modeling/SKILL.md +84 -0
  183. package/selected-skills/financeskills/skills/three-statement-modeling/references/model-checks.md +32 -0
  184. package/selected-skills/financeskills/skills/treasury-management/EXAMPLE.md +21 -0
  185. package/selected-skills/financeskills/skills/treasury-management/SKILL.md +83 -0
  186. package/selected-skills/financeskills/skills/treasury-management/references/fx-hedging.md +27 -0
  187. package/selected-skills/financeskills/skills/treasury-management/references/liquidity-metrics.md +24 -0
  188. package/selected-skills/financeskills/skills/variance-analysis/EXAMPLE.md +21 -0
  189. package/selected-skills/financeskills/skills/variance-analysis/SKILL.md +78 -0
  190. package/selected-skills/financeskills/skills/variance-analysis/references/overhead-logic.md +24 -0
  191. package/selected-skills/financeskills/skills/variance-analysis/references/variance-math.md +35 -0
  192. package/selected-skills/financeskills/skills/venture-debt/EXAMPLE.md +21 -0
  193. package/selected-skills/financeskills/skills/venture-debt/SKILL.md +84 -0
  194. package/selected-skills/financeskills/skills/venture-debt/references/saas-debt-metrics.md +26 -0
  195. package/selected-skills/financeskills/skills/venture-debt/references/venture-lending.md +23 -0
  196. package/selected-skills/financeskills/skills/wacc-computation/EXAMPLE.md +21 -0
  197. package/selected-skills/financeskills/skills/wacc-computation/SKILL.md +98 -0
  198. package/selected-skills/financeskills/skills/wacc-computation/assets/wacc-memo-template.md +40 -0
  199. package/selected-skills/financeskills/skills/wacc-computation/references/beta-math.md +24 -0
  200. package/selected-skills/financeskills/skills/wacc-computation/references/capm-basics.md +24 -0
  201. package/selected-skills/financeskills/skills/working-capital-analysis/EXAMPLE.md +21 -0
  202. package/selected-skills/financeskills/skills/working-capital-analysis/SKILL.md +83 -0
  203. package/selected-skills/financeskills/skills/working-capital-analysis/references/wc-metrics.md +30 -0
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: venture-debt
3
+ description: When the user wants to evaluate or structure debt for high-growth, venture-backed startups. Also use when the user mentions "startup loan," "warrants," "venture lending," "debt covenants for tech," "non-dilutive funding," or "growth capital debt."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Venture Debt Analysis
9
+
10
+ You are a Venture Lender. Your goal is to provide non-dilutive capital to startups by structuring debt that accounts for high growth but lacks traditional collateral.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **The Equity Context**
15
+ - Who are the lead VC investors? (Lender follows the equity).
16
+ - How much equity capital has been raised to date?
17
+ - What is the current "Cash Runway"?
18
+
19
+ 2. **The Traction**
20
+ - Monthly Recurring Revenue (MRR) and growth rate.
21
+ - Gross Margins (Software vs. Hardware matters).
22
+
23
+ 3. **Use of Funds**
24
+ - Is this for runway extension, equipment financing, or acquisition?
25
+
26
+ ---
27
+
28
+ ## Venture Debt Framework
29
+
30
+ ### Priority Order
31
+ 1. **Underwriting** (Assessing the probability of the next equity round).
32
+ 2. **Structuring** (Determining the loan amount, interest, and warrants).
33
+ 3. **Covenant Design** (Setting growth/liquidity markers).
34
+ 4. **Monitoring** (Tracking burn rate and traction post-funding).
35
+
36
+ ---
37
+
38
+ ## Technical Lending Steps
39
+
40
+ ### 1. Warrant Calculation
41
+ - Determine the "Warrant Coverage" (e.g., 10% of the loan amount).
42
+ - Calculate the number of shares the lender can buy at the current valuation.
43
+
44
+ ### 2. Debt Service Coverage (DSCR)
45
+ - Unlike traditional companies, startups often have negative DSCR. The underwriter looks at "Runway Extension"—does the debt add 6-9 months to the zero-cash date?
46
+
47
+ ### 3. "MAC" Clause Review
48
+ - Evaluate the "Material Adverse Change" clauses that allow the lender to freeze the line of credit if the startup's health deteriorates.
49
+
50
+ ---
51
+
52
+ ## Output Format
53
+
54
+ ### Venture Debt Term Sheet
55
+
56
+ **The Terms**
57
+ - Loan Amount and Interest Rate (usually Prime + Margin).
58
+ - Repayment Period (Interest-only vs. Amortizing).
59
+ - Warrant Coverage and Strike Price.
60
+
61
+ **Covenants**
62
+ - Minimum Cash requirements.
63
+ - Minimum MRR targets.
64
+
65
+ **Risk Assessment**
66
+ - Probability of "Refinance Risk" (Can they raise the next equity round?).
67
+
68
+ ---
69
+
70
+ ## Scripts
71
+ - [calculate.py](./scripts/calculate.py): Deterministic functions for this skill's core computations. Run `python3 scripts/calculate.py` to self-test; import the functions instead of doing mental math.
72
+
73
+ ---
74
+
75
+ ## References
76
+ - [Venture Debt 101](./references/venture-lending.md): Warrants and covenants.
77
+ - [SaaS Lending Metrics](./references/saas-debt-metrics.md): Underwriting based on MRR.
78
+
79
+ ---
80
+
81
+ ## Related Skills
82
+ - **predictive-burn-rate**: To see if the debt provides enough runway.
83
+ - **startup-valuation**: To determine the value of the warrants.
84
+ - **risk-assessment**: For evaluating the default risk.
@@ -0,0 +1,26 @@
1
+ # SaaS Lending Metrics and Covenants
2
+
3
+ ## Borrowing Base Concepts
4
+ - **ARR-based facilities**: commitment = multiple of ARR (0.3–0.8x), stepping with NRR and growth.
5
+ - **MRR lines**: borrowing base = 3–6x MRR with retention haircuts; recalculated monthly.
6
+
7
+ ## Metrics Lenders Track (and covenant)
8
+ | Metric | Typical Threshold | Notes |
9
+ |---|---|---|
10
+ | Minimum cash / runway | ≥ 6 months runway or fixed floor | The covenant that bites first |
11
+ | ARR growth | > 0–20% YoY minimum | Tested quarterly |
12
+ | Net revenue retention | ≥ 90–100% | Below 90% = churn problem, expect default discussion |
13
+ | Gross margin | ≥ 60–70% | Confirms it's actually software |
14
+ | Burn covenant | actual burn ≤ 110–120% of plan | Plan attached to credit agreement |
15
+ | Performance-to-plan | ≥ 70–80% of board plan revenue | Subjective danger zone |
16
+
17
+ ## Churn and Cohort Analysis for Debt Capacity
18
+ - Gross revenue churn > 2%/month makes MRR-based borrowing bases unstable — lenders haircut aggressively.
19
+ - Logo vs. revenue churn divergence reveals dependence on a few expanding whales (concentration covenant: top customer < 15–20% of ARR).
20
+
21
+ ## Negotiation Priorities (borrower side)
22
+ 1. Kill or objectify MAC/investor-abandonment defaults.
23
+ 2. Cure rights and equity-cure provisions for financial covenants.
24
+ 3. Interest-only period through the next planned raise + 2 quarters.
25
+ 4. Prepayment penalty step-downs (3/2/1) and no make-whole after month 18.
26
+ 5. Warrant coverage on drawn (not committed) amounts.
@@ -0,0 +1,23 @@
1
+ # Venture Lending Fundamentals
2
+
3
+ ## What It Is
4
+ Term debt to VC-backed, typically pre-profit companies, underwritten on enterprise value, investor support, and runway extension logic — not cash flow coverage. Sized at 25–35% of the last equity round.
5
+
6
+ ## Standard Structure
7
+ - **Term**: 36–48 months; 6–12 month interest-only period, then straight-line amortization.
8
+ - **Pricing**: 10–15% all-in — coupon (prime/SOFR + 400–700) + final payment fee (3–8% of principal) + facility fee.
9
+ - **Warrants**: 5–15% warrant coverage (= warrant value / loan amount), struck at last round price, 7–10 year exercise window.
10
+ - **Security**: all-asset lien; IP often via negative pledge rather than direct lien.
11
+ - **MAC/investor-support clauses**: subjective default triggers — negotiate hard.
12
+
13
+ ## All-In Cost (model it, don't trust the coupon)
14
+ IRR of all cash flows: draw − interest − amortization − final fee − warrant value. A "12% coupon" deal with 5% final fee and warrants commonly prices 16–20% all-in.
15
+
16
+ ## Lender Underwriting Lens (useful when negotiating)
17
+ - Quality of the cap table (will insiders bridge?).
18
+ - Runway with the debt ≥ next milestone + 6 months.
19
+ - Loan-to-enterprise-value < 10–20%.
20
+ - Repayment source: next round, not operations — refinancing risk is THE risk.
21
+
22
+ ## When It Makes Sense
23
+ Extend runway between rounds without dilution; finance hardware/inventory working capital. When it doesn't: substituting for unrentable equity, or when amortization starts before revenue inflects — debt service accelerates the death spiral.
@@ -0,0 +1,21 @@
1
+ # Worked Example - wacc-computation
2
+
3
+ ## Ask
4
+
5
+ > Our stock beta is 1.2, the 10-year Treasury is at 4%, and the Equity Risk Premium is 5%. We have $1M in debt at 6% interest and $2M in market cap. Tax rate is 25%. What's our WACC?
6
+
7
+ ## What a correct response contains
8
+
9
+ Should calculate Cost of Equity (4% + 1.2 * 5% = 10%). Should calculate After-tax Cost of Debt (6% * (1 - 0.25) = 4.5%). Should weight the components (1/3 Debt, 2/3 Equity). Should calculate the final WACC ((1/3 * 4.5%) + (2/3 * 10%) = 8.16%). Should provide a WACC Computation Memo.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/comparables.csv`:
14
+
15
+ > Using the attached peer set (evals/files/comparables.csv), estimate WACC for a target with: target D/E 0.60, tax rate 30%, risk-free rate 4.5%, ERP 5.5%, pre-tax cost of debt 8.5%. Unlever each peer at its own structure, take the median unlevered beta, relever at the target structure, and produce your WACC Computation Memo.
16
+
17
+ Expected: Median unlevered beta approx 0.833; relevered beta approx 1.183; cost of equity approx 11.01%; weights 62.5% equity / 37.5% debt; WACC approx 9.11%.
18
+
19
+ ## Compute, don't estimate
20
+
21
+ All figures above come from [`scripts/calculate.py`](./scripts/calculate.py) - import its functions rather than doing arithmetic in prose.
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: wacc-computation
3
+ description: When the user wants to calculate the Weighted Average Cost of Capital (WACC) for valuation or capital budgeting. Also use when the user mentions "cost of equity," "cost of debt," "CAPM," "beta unlevering," "risk-free rate," or "equity risk premium."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # WACC Computation
9
+
10
+ You are a Corporate Finance Manager. Your goal is to determine the minimum return a company must earn on its existing asset base to satisfy its creditors, owners, and other providers of capital.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Capital Structure**
15
+ - Market Value of Equity (Market Cap).
16
+ - Market Value of Debt (or Book Value if Market Value is unavailable).
17
+ - Preferred Stock (if any).
18
+
19
+ 2. **Cost of Equity (CAPM)**
20
+ - Risk-Free Rate ($R_f$): (e.g., 10-year Treasury yield).
21
+ - Beta ($\beta$): (Raw or Unlevered/Relevered).
22
+ - Equity Risk Premium (ERP).
23
+
24
+ 3. **Cost of Debt**
25
+ - Pre-tax Cost of Debt ($R_d$): (Yield to Maturity on existing bonds or marginal borrowing rate).
26
+ - Marginal Tax Rate ($T$).
27
+
28
+ ---
29
+
30
+ ## WACC Framework
31
+
32
+ ### The Formula
33
+ `WACC = (E/V * Re) + (D/V * Rd * (1 - T)) + (P/V * Rp)`
34
+ - **E**: Market Value of Equity.
35
+ - **D**: Market Value of Debt.
36
+ - **P**: Value of Preferred Stock.
37
+ - **V**: Total Value (E + D + P).
38
+ - **Re**: Cost of Equity.
39
+ - **Rd**: Cost of Debt.
40
+ - **Rp**: Cost of Preferred Stock.
41
+
42
+ ### Priority Order
43
+ 1. **Data Collection** (Gathering market prices and rates).
44
+ 2. **Cost of Equity Calculation** (Using CAPM).
45
+ 3. **Cost of Debt Calculation** (After-tax).
46
+ 4. **Weighting** (Using Market Values, not Book Values).
47
+ 5. **Final Computation & Sensitivity**.
48
+
49
+ ---
50
+
51
+ ## Technical Computation Steps
52
+
53
+ ### 1. Unlevering/Relevering Beta
54
+ - If the target company is private or has a weird capital structure, unlever a peer group's beta and relever it based on the target's D/E ratio.
55
+ - `β_unlevered = β_levered / (1 + (1-T)*(D/E))`.
56
+
57
+ ### 2. Market Value of Debt
58
+ - If market prices are unavailable, treat the book value as a proxy or use the "Synthetic Rating" method based on the Interest Coverage Ratio.
59
+
60
+ ---
61
+
62
+ ## Output Format
63
+
64
+ ### WACC Computation Memo
65
+
66
+ **Summary Table**
67
+ - **Final WACC**: (e.g., 8.4%).
68
+ - **Weight of Equity**: (e.g., 70%).
69
+ - **Weight of Debt**: (e.g., 30%).
70
+
71
+ **Component Detail**
72
+ - **Cost of Equity**: Breakdown of CAPM inputs ($R_f$, $\beta$, ERP).
73
+ - **Cost of Debt**: Pre-tax rate and tax adjustment.
74
+
75
+ **Sensitivity Matrix**
76
+ - WACC variance based on different Beta and Equity Risk Premium assumptions.
77
+
78
+ ---
79
+
80
+ ## Scripts
81
+ - [calculate.py](./scripts/calculate.py): CAPM, beta unlevering/relevering, and WACC functions, kept as reviewable material. This plugin's research role has no shell and the scripts are not part of the installed package, so nothing here runs them: work the arithmetic from [CAPM Guide](./references/capm-basics.md) and [Beta Unlevering](./references/beta-math.md), write each step out in the answer, and hand anything that needs real compute to the delegated `data_junior`.
82
+
83
+ ---
84
+
85
+ ## References
86
+ - [CAPM Guide](./references/capm-basics.md): Understanding the components.
87
+ - [Beta Unlevering](./references/beta-math.md): The Hamada equation and adjustments.
88
+
89
+ ---
90
+
91
+ ## Assets
92
+ - [wacc-memo-template.md](./assets/wacc-memo-template.md): WACC memo with beta workpaper and sensitivity grid.
93
+
94
+ ---
95
+
96
+ ## Related Skills
97
+ - **investment-analysis**: WACC is the discount rate for DCF models.
98
+ - **capital-budgeting**: WACC is the hurdle rate for project NPV.
@@ -0,0 +1,40 @@
1
+ # WACC Computation Memo
2
+
3
+ **Target:** {entity} | **Valuation date:** {date} | **Currency:** {ccy}
4
+
5
+ ## Result
6
+ | Component | Value | Weight | Contribution |
7
+ |---|---|---|---|
8
+ | Cost of equity | {Re}% | {We}% | {x.xx}% |
9
+ | After-tax cost of debt | {Rd_at}% | {Wd}% | {x.xx}% |
10
+ | **WACC** | | | **{wacc}%** |
11
+
12
+ ## Cost of Equity Build (CAPM)
13
+ | Input | Value | Source |
14
+ |---|---|---|
15
+ | Risk-free rate | | {govt benchmark, tenor} |
16
+ | Beta (relevered) | | {peer set, median unlevered x target D/E} |
17
+ | Equity risk premium | | |
18
+ | Country risk premium | | {if applicable} |
19
+ | Size premium | | {if applicable} |
20
+
21
+ ## Beta Workpaper
22
+ | Peer | Levered beta | D/E | Tax | Unlevered beta |
23
+ |---|---|---|---|---|
24
+
25
+ Median unlevered: {x.xx} -> relevered at target D/E {x.xx}, tax {xx}%: **{x.xx}**
26
+
27
+ ## Sensitivity
28
+ | WACC | ERP -1% | Base | ERP +1% |
29
+ |---|---|---|---|
30
+ | Beta -0.2 | | | |
31
+ | Base | | | |
32
+ | Beta +0.2 | | | |
33
+
34
+ ## Consistency Checks
35
+ - [ ] Rate currency matches cash-flow currency
36
+ - [ ] Market-value weights (not book)
37
+ - [ ] Marginal (not historical) cost of debt; tax shield usable
38
+
39
+ ---
40
+ *Each figure above traces to the formula and inputs shown beside it. Prepared by an AI agent - review before use in a transaction.*
@@ -0,0 +1,24 @@
1
+ # Beta Unlevering and Relevering
2
+
3
+ ## Why
4
+ Observed (levered) betas embed each comparable's capital structure. To apply a peer's beta to a target, strip out the peer's leverage, average, then relever at the target's structure.
5
+
6
+ ## Hamada Formulas (debt beta = 0, tax shield discounted at Rd)
7
+ - **Unlever**: `βu = βl / (1 + (1 - T) × D/E)`
8
+ - **Relever**: `βl = βu × (1 + (1 - T) × D/E_target)`
9
+
10
+ ## Harris-Pringle (tax shield as risky as assets — common in continuous rebalancing)
11
+ - **Unlever**: `βu = βl / (1 + D/E)`
12
+ - Use when the firm maintains a constant leverage ratio rather than fixed debt.
13
+
14
+ ## Procedure
15
+ 1. Select 5–8 pure-play comparables.
16
+ 2. Pull 2–5 year weekly/monthly regression betas.
17
+ 3. Unlever each at its own D/E (market values) and marginal tax rate.
18
+ 4. Take the median unlevered beta (median resists outliers better than mean).
19
+ 5. Relever at the target's capital structure (target or industry-normal D/E for private firms).
20
+
21
+ ## Sanity Checks
22
+ - Unlevered betas across true comparables should cluster (spread < ~0.3).
23
+ - Asset beta for stable utilities ≈ 0.3–0.5; tech ≈ 1.0–1.4; commodity E&P ≈ 0.9–1.3.
24
+ - If relevered beta > 2.5, re-examine D/E inputs — likely book values leaked in.
@@ -0,0 +1,24 @@
1
+ # CAPM Basics
2
+
3
+ ## The Model
4
+ `Re = Rf + β × ERP (+ size premium + country risk premium, if applicable)`
5
+
6
+ - **Rf (Risk-Free Rate)**: Yield on default-free government bonds matching the cash flow horizon. Standard: 10-year Treasury (USD) or 10-year FGN bond (NGN valuations, with care — embed inflation differential).
7
+ - **β (Beta)**: Sensitivity of the stock's returns to market returns. β > 1 = more volatile than market.
8
+ - **ERP (Equity Risk Premium)**: Expected market return minus Rf. Common practice: 4.5%–6.0% mature-market ERP (Damodaran's updates are the standard citation).
9
+
10
+ ## Adjustments
11
+ - **Size premium**: Add 1%–3% for small caps (Duff & Phelps/Kroll size deciles).
12
+ - **Country risk premium (CRP)**: For emerging markets, add CRP = sovereign default spread × (σ_equity / σ_bond). Apply fully or scaled by the firm's revenue exposure (lambda approach).
13
+ - **Currency consistency**: Match Rf, ERP, and cash flow currency. Never mix a USD risk-free rate with NGN cash flows without adjusting for inflation differential.
14
+
15
+ ## Common Errors
16
+ 1. Using a short-term T-bill rate for long-horizon valuation.
17
+ 2. Using raw regression beta without checking statistical significance (low R² → prefer industry beta).
18
+ 3. Double-counting country risk in both the discount rate and cash flow haircuts.
19
+ 4. Applying historical ERP over too short a window.
20
+
21
+ ## When CAPM Breaks Down
22
+ - Private companies: no observable beta → unlever/relever industry comparables (see beta-math.md).
23
+ - Thinly traded stocks: betas are unreliable → use sector betas.
24
+ - Multi-business firms: compute divisional betas from pure-play comparables.
@@ -0,0 +1,21 @@
1
+ # Worked Example - working-capital-analysis
2
+
3
+ ## Ask
4
+
5
+ > Revenue 7.3B/year, COGS 5.1B/year. AR 1.2B, inventory 900M, AP 700M. Compute the CCC and tell me what 10 days of DSO improvement is worth.
6
+
7
+ ## What a correct response contains
8
+
9
+ DSO = 60 days, DIO = 64.4 days, DPO = 50.1 days, CCC = ~74.3 days. One day of revenue = 20M, so 10 DSO days = ~200M cash release.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/wc_balances.csv`:
14
+
15
+ > From the attached balances (evals/files/wc_balances.csv), compute DSO, DIO, DPO, the cash conversion cycle, and the working-capital funding need it implies. Quantify the cash freed by cutting DSO by 10 days.
16
+
17
+ Expected: DSO 60.0, DIO 77.8, DPO 53.7; CCC 84.1 days; funding need $13,278,279; 10 fewer DSO days frees ~$1,578,082.
18
+
19
+ ## Compute, don't estimate
20
+
21
+ All figures above come from [`scripts/calculate.py`](./scripts/calculate.py) - import its functions rather than doing arithmetic in prose.
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: working-capital-analysis
3
+ description: When the user wants to analyze or optimize working capital — receivables, payables, inventory, and the cash conversion cycle. Also use when the user mentions "DSO," "DPO," "DIO," "cash conversion cycle," "cash tied up," "AR aging," "payment terms," "working capital peg," or "free up cash."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Working Capital Analysis
9
+
10
+ You are a Working Capital Manager. Your goal is to quantify how much cash is tied up in the operating cycle, find where it's stuck, and free it without damaging operations or supplier/customer relationships.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Data Set**
15
+ - Monthly balances (AR, inventory, AP, other WC items) for ≥ 24 months — month-ends hide intra-month peaks; get weekly if financing is tight.
16
+ - Revenue and COGS by month; AR/AP agings; top-10 customer and supplier terms.
17
+
18
+ 2. **Context**
19
+ - Seasonality pattern, growth rate (growth consumes WC mechanically), any deal context (M&A working capital peg) or covenant pressure.
20
+
21
+ ---
22
+
23
+ ## Analysis Framework
24
+
25
+ ### Core Metrics
26
+ - `DSO = AR / Revenue × 365` (use the countback method for seasonal businesses — simple DSO lies when sales swing)
27
+ - `DIO = Inventory / COGS × 365`
28
+ - `DPO = AP / COGS × 365`
29
+ - `CCC = DSO + DIO − DPO`; `Cash impact of 1 day = annual revenue (or COGS) / 365`
30
+
31
+ ### Benchmark & Decompose
32
+ Compare against sector peers and own history. Decompose every deterioration: volume vs. terms vs. discipline:
33
+ - DSO up → mix shift to slower payers? terms creep? billing delays? disputes? collection slack? (aging waterfall answers this)
34
+ - DIO up → safety-stock policy, slow-moving build (inventory-costing matrix), purchasing ahead of price increases, demand miss?
35
+ - DPO down → early payments without discount capture? supplier term renegotiations lost? (Check: paying EARLY with no discount is free lending.)
36
+
37
+ ### Improvement Levers (ranked by speed)
38
+ 1. Billing hygiene: invoice same-day on delivery; e-invoicing; dispute root-cause kill list.
39
+ 2. Collections cadence: dunning calendar, credit holds, collector portfolios with targets.
40
+ 3. Terms governance: standard terms by segment, exception approval matrix, term-vs-price trade explicit.
41
+ 4. Payables: pay ON terms (not before), capture early-pay discounts only when discount APR > cost of funds: `APR = discount%/(1−discount%) × 365/(full term − discount term)`.
42
+ 5. Inventory: SKU-level service-vs-stock optimization, supplier lead-time programs, consignment.
43
+ 6. Structural: receivables financing/factoring, supply chain finance, dynamic discounting (cost these honestly).
44
+
45
+ ---
46
+
47
+ ## Technical Analysis Steps
48
+
49
+ 1. **Compute with code**: monthly metric trends, countback DSO, peak-vs-average WC, cash release quantification per lever (`days improvement × daily revenue/COGS`).
50
+ 2. **Aging quality analysis**: AR aging migration matrix month-over-month (which buckets feed 90+?); concentration of overdue in named accounts.
51
+ 3. **Seasonality-adjusted target**: set targets vs. same-month prior year; an absolute target across a seasonal year guarantees a fake Q-end scramble.
52
+
53
+ ---
54
+
55
+ ## Output Format
56
+
57
+ ### Working Capital Review
58
+
59
+ **Dashboard**: CCC trend, component days, cash tied up vs. benchmark ("X days above peer median = ₦Y trapped").
60
+
61
+ **Diagnosis**: decomposition of each component's movement with evidence.
62
+
63
+ **Opportunity Sizing**: lever-by-lever cash release estimate with implementation difficulty.
64
+
65
+ **Action Plan**: owner, lever, target days, timeline, and the operational risk of each move.
66
+
67
+ ---
68
+
69
+ ## Scripts
70
+ - [calculate.py](./scripts/calculate.py): Deterministic functions for this skill's core computations. Run `python3 scripts/calculate.py` to self-test; import the functions instead of doing mental math.
71
+
72
+ ---
73
+
74
+ ## References
75
+ - [WC Metrics Cookbook](./references/wc-metrics.md): Countback DSO, aging migration analysis, and the discount-APR decision rule.
76
+
77
+ ---
78
+
79
+ ## Related Skills
80
+ - **treasury-management**: WC drives the cash forecast.
81
+ - **financial-analysis**: Ratio context for the balance sheet.
82
+ - **inventory-costing**: The valuation behind DIO.
83
+ - **predictive-burn-rate**: For startups, WC timing is the collections curve.
@@ -0,0 +1,30 @@
1
+ # Working Capital Metrics Cookbook
2
+
3
+ ## Countback DSO (use when sales are seasonal — always, really)
4
+ Walk backwards through monthly sales until AR is exhausted:
5
+ AR = 950; sales: Mar 400, Feb 380, Jan 350.
6
+ - Mar covers 400 (31 days), remaining 550; Feb covers 380 (28 days), remaining 170; Jan: 170/350 × 31 = 15 days.
7
+ - **Countback DSO = 31 + 28 + 15 = 74 days.** Simple DSO (950/avg monthly × 30) would misstate this badly after a strong quarter.
8
+
9
+ ## Aging Migration Matrix
10
+ Track each bucket's flow month-over-month:
11
+ | From \ To | Current | 1–30 | 31–60 | 61–90 | 90+ | Collected |
12
+ |---|---|---|---|---|---|---|
13
+ | Current | — | 22% | — | — | — | 78% |
14
+ | 1–30 | — | — | 35% | — | — | 65% |
15
+ | 31–60 | — | — | — | 48% | — | 52% |
16
+ | 61–90 | — | — | — | — | 60% | 40% |
17
+ Roll rates rising = collections discipline slipping BEFORE headline DSO moves. The 61–90 → 90+ roll rate is your bad-debt early warning and feeds the ECL provision matrix.
18
+
19
+ ## Early-Payment Discount APR Rule
20
+ "2/10 net 45": `APR = 0.02/0.98 × 365/35 = 21.3%`.
21
+ Take the discount if 21.3% > your marginal cost of funds; otherwise pay day 45. Build the table for every supplier's standard terms once — most teams leave easy money on one side or the other.
22
+
23
+ ## Peak vs. Average Working Capital
24
+ Month-end WC understates the intra-month peak (payroll dates, VAT/tax payment days, inventory builds before sales spikes). For facility sizing: estimate peak = month-end + known intra-month swings; for M&A pegs: use a 12-month average to neutralize seasonality and define every account in the peg schedule explicitly (cash-free debt-free fights are won in the definitions).
25
+
26
+ ## Growth's WC Tax
27
+ `ΔWC ≈ (CCC/365) × Δrevenue` (revenue-margin adjusted). A business at CCC 90 days growing revenue by 1B needs ~250M of new cash just to stand still — surface this in every growth plan review.
28
+
29
+ ## Quarter-End Window Dressing Tells
30
+ DPO spikes every quarter-end then normalizes; receivables factored in the last week; inventory cut by delaying receipts. Use intra-period averages to see through it — and don't build the company's own targets in a way that incentivizes the same games.