@v587d/capital-generation 2.7.7 → 2.7.9

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 (221) hide show
  1. package/CHANGELOG.md +124 -0
  2. package/README.md +7 -5
  3. package/THIRD_PARTY_NOTICES.md +24 -3
  4. package/capital-config/client.js +4 -4
  5. package/capital-config/package.json +1 -1
  6. package/capital-watchlist/client.js +3 -3
  7. package/capital-watchlist/client.src.cjs +4 -4
  8. package/capital-watchlist/package.json +1 -1
  9. package/chart-ui/package.json +1 -1
  10. package/lib/agents/selected-skills-provider.js +41 -8
  11. package/lib/chart/source-token.js +18 -3
  12. package/lib/data-collector/dataset-tools.js +4 -2
  13. package/lib/data-collector/describe.d.ts +4 -0
  14. package/lib/data-collector/describe.js +11 -1
  15. package/lib/index.d.ts +17 -0
  16. package/lib/index.js +50 -18
  17. package/lib/web-retriever/local-fetch.d.ts +1 -1
  18. package/lib/web-retriever/local-fetch.js +1 -1
  19. package/lib/web-retriever/wind-client.d.ts +1 -1
  20. package/lib/web-retriever/wind-client.js +1 -1
  21. package/package.json +3 -1
  22. package/preset/capital-generation/agent.patch.yml +1 -0
  23. package/preset/capital-generation/skills/capital-data-protocol/SKILL.md +4 -0
  24. package/preset/capital-generation/skills/capital-equity-research/SKILL.md +1 -1
  25. package/preset/capital-generation/skills/capital-orchestration/SKILL.md +5 -0
  26. package/preset/capital-generation/skills/capital-visualization-protocol/SKILL.md +7 -7
  27. package/preset/capital-generation/skills/capital-web-protocol/SKILL.md +10 -3
  28. package/selected-skills/README.md +3 -1
  29. package/selected-skills/catalog.js +183 -0
  30. package/selected-skills/financeskills/LICENSE +21 -0
  31. package/selected-skills/financeskills/UPSTREAM.md +202 -0
  32. package/selected-skills/financeskills/skills/ai-anomaly-detection/EXAMPLE.md +21 -0
  33. package/selected-skills/financeskills/skills/ai-anomaly-detection/SKILL.md +84 -0
  34. package/selected-skills/financeskills/skills/ai-anomaly-detection/references/feature-engineering.md +20 -0
  35. package/selected-skills/financeskills/skills/ai-anomaly-detection/references/ml-algorithms.md +28 -0
  36. package/selected-skills/financeskills/skills/aro-computation/EXAMPLE.md +21 -0
  37. package/selected-skills/financeskills/skills/aro-computation/SKILL.md +82 -0
  38. package/selected-skills/financeskills/skills/aro-computation/references/aro-standards.md +22 -0
  39. package/selected-skills/financeskills/skills/aro-computation/references/pv-math.md +27 -0
  40. package/selected-skills/financeskills/skills/audit-checklist/EXAMPLE.md +17 -0
  41. package/selected-skills/financeskills/skills/audit-checklist/SKILL.md +77 -0
  42. package/selected-skills/financeskills/skills/audit-checklist/references/internal-controls.md +36 -0
  43. package/selected-skills/financeskills/skills/audit-checklist/references/isa-standards.md +26 -0
  44. package/selected-skills/financeskills/skills/automated-reconciliation/EXAMPLE.md +21 -0
  45. package/selected-skills/financeskills/skills/automated-reconciliation/SKILL.md +87 -0
  46. package/selected-skills/financeskills/skills/automated-reconciliation/assets/reconciliation-statement-template.md +31 -0
  47. package/selected-skills/financeskills/skills/automated-reconciliation/references/fuzzy-logic.md +27 -0
  48. package/selected-skills/financeskills/skills/automated-reconciliation/references/rec-controls.md +28 -0
  49. package/selected-skills/financeskills/skills/banking-compliance/EXAMPLE.md +21 -0
  50. package/selected-skills/financeskills/skills/banking-compliance/SKILL.md +82 -0
  51. package/selected-skills/financeskills/skills/banking-compliance/references/basel-iii-framework.md +26 -0
  52. package/selected-skills/financeskills/skills/banking-compliance/references/risk-weights.md +32 -0
  53. package/selected-skills/financeskills/skills/budget-forecast/EXAMPLE.md +21 -0
  54. package/selected-skills/financeskills/skills/budget-forecast/SKILL.md +87 -0
  55. package/selected-skills/financeskills/skills/budget-forecast/references/forecasting-best-practices.md +26 -0
  56. package/selected-skills/financeskills/skills/budget-forecast/references/scenario-analysis.md +25 -0
  57. package/selected-skills/financeskills/skills/close-management/EXAMPLE.md +17 -0
  58. package/selected-skills/financeskills/skills/close-management/SKILL.md +85 -0
  59. package/selected-skills/financeskills/skills/close-management/references/close-task-library.md +32 -0
  60. package/selected-skills/financeskills/skills/company-valuation/EXAMPLE.md +21 -0
  61. package/selected-skills/financeskills/skills/company-valuation/SKILL.md +80 -0
  62. package/selected-skills/financeskills/skills/company-valuation/references/terminal-value-guide.md +33 -0
  63. package/selected-skills/financeskills/skills/corporate-consolidation/EXAMPLE.md +21 -0
  64. package/selected-skills/financeskills/skills/corporate-consolidation/SKILL.md +84 -0
  65. package/selected-skills/financeskills/skills/corporate-consolidation/references/consolidation-standard.md +28 -0
  66. package/selected-skills/financeskills/skills/corporate-consolidation/references/minority-interest.md +25 -0
  67. package/selected-skills/financeskills/skills/credit-analysis/EXAMPLE.md +21 -0
  68. package/selected-skills/financeskills/skills/credit-analysis/SKILL.md +84 -0
  69. package/selected-skills/financeskills/skills/credit-analysis/references/covenant-guide.md +26 -0
  70. package/selected-skills/financeskills/skills/crypto-accounting/EXAMPLE.md +21 -0
  71. package/selected-skills/financeskills/skills/crypto-accounting/SKILL.md +81 -0
  72. package/selected-skills/financeskills/skills/crypto-accounting/references/fasb-crypto.md +26 -0
  73. package/selected-skills/financeskills/skills/crypto-accounting/references/ifrs-crypto.md +25 -0
  74. package/selected-skills/financeskills/skills/cvp-breakeven/EXAMPLE.md +21 -0
  75. package/selected-skills/financeskills/skills/cvp-breakeven/SKILL.md +78 -0
  76. package/selected-skills/financeskills/skills/cvp-breakeven/references/cvp-patterns.md +28 -0
  77. package/selected-skills/financeskills/skills/debt-payoff/EXAMPLE.md +21 -0
  78. package/selected-skills/financeskills/skills/debt-payoff/SKILL.md +94 -0
  79. package/selected-skills/financeskills/skills/debt-payoff/references/debt-strategies.md +32 -0
  80. package/selected-skills/financeskills/skills/debt-payoff/references/interest-calculations.md +27 -0
  81. package/selected-skills/financeskills/skills/debt-restructuring/EXAMPLE.md +21 -0
  82. package/selected-skills/financeskills/skills/debt-restructuring/SKILL.md +79 -0
  83. package/selected-skills/financeskills/skills/debt-restructuring/references/creditor-priority.md +26 -0
  84. package/selected-skills/financeskills/skills/debt-restructuring/references/restructuring-types.md +24 -0
  85. package/selected-skills/financeskills/skills/deferred-tax/EXAMPLE.md +21 -0
  86. package/selected-skills/financeskills/skills/deferred-tax/SKILL.md +86 -0
  87. package/selected-skills/financeskills/skills/deferred-tax/references/td-catalogue.md +39 -0
  88. package/selected-skills/financeskills/skills/earned-value-mgmt/EXAMPLE.md +21 -0
  89. package/selected-skills/financeskills/skills/earned-value-mgmt/SKILL.md +79 -0
  90. package/selected-skills/financeskills/skills/earned-value-mgmt/references/forecasting-eac.md +27 -0
  91. package/selected-skills/financeskills/skills/earned-value-mgmt/references/pmi-evm.md +29 -0
  92. package/selected-skills/financeskills/skills/ecl-computation/EXAMPLE.md +21 -0
  93. package/selected-skills/financeskills/skills/ecl-computation/SKILL.md +85 -0
  94. package/selected-skills/financeskills/skills/ecl-computation/references/ifrs9-standard.md +27 -0
  95. package/selected-skills/financeskills/skills/ecl-computation/references/risk-modeling.md +26 -0
  96. package/selected-skills/financeskills/skills/esg-reporting/EXAMPLE.md +17 -0
  97. package/selected-skills/financeskills/skills/esg-reporting/SKILL.md +79 -0
  98. package/selected-skills/financeskills/skills/esg-reporting/references/ghg-protocol.md +22 -0
  99. package/selected-skills/financeskills/skills/esg-reporting/references/sasb-map.md +25 -0
  100. package/selected-skills/financeskills/skills/financial-analysis/EXAMPLE.md +21 -0
  101. package/selected-skills/financeskills/skills/financial-analysis/SKILL.md +108 -0
  102. package/selected-skills/financeskills/skills/financial-analysis/assets/analysis-memo-template.md +31 -0
  103. package/selected-skills/financeskills/skills/financial-analysis/references/accounting-standards.md +45 -0
  104. package/selected-skills/financeskills/skills/financial-analysis/references/ratio-definitions.md +14 -0
  105. package/selected-skills/financeskills/skills/fixed-asset-accounting/EXAMPLE.md +21 -0
  106. package/selected-skills/financeskills/skills/fixed-asset-accounting/SKILL.md +78 -0
  107. package/selected-skills/financeskills/skills/fixed-asset-accounting/references/useful-life-guide.md +30 -0
  108. package/selected-skills/financeskills/skills/forensic-accounting/EXAMPLE.md +21 -0
  109. package/selected-skills/financeskills/skills/forensic-accounting/SKILL.md +91 -0
  110. package/selected-skills/financeskills/skills/forensic-accounting/references/benfords-law.md +24 -0
  111. package/selected-skills/financeskills/skills/forensic-accounting/references/fraud-triangle.md +26 -0
  112. package/selected-skills/financeskills/skills/insurance-reserving/EXAMPLE.md +21 -0
  113. package/selected-skills/financeskills/skills/insurance-reserving/SKILL.md +82 -0
  114. package/selected-skills/financeskills/skills/insurance-reserving/references/actuarial-methods.md +33 -0
  115. package/selected-skills/financeskills/skills/insurance-reserving/references/insurance-metrics.md +26 -0
  116. package/selected-skills/financeskills/skills/intercompany-accounting/EXAMPLE.md +21 -0
  117. package/selected-skills/financeskills/skills/intercompany-accounting/SKILL.md +79 -0
  118. package/selected-skills/financeskills/skills/intercompany-accounting/references/elimination-entries.md +35 -0
  119. package/selected-skills/financeskills/skills/inventory-costing/EXAMPLE.md +21 -0
  120. package/selected-skills/financeskills/skills/inventory-costing/SKILL.md +80 -0
  121. package/selected-skills/financeskills/skills/inventory-costing/references/costing-examples.md +31 -0
  122. package/selected-skills/financeskills/skills/investment-analysis/EXAMPLE.md +21 -0
  123. package/selected-skills/financeskills/skills/investment-analysis/SKILL.md +82 -0
  124. package/selected-skills/financeskills/skills/investment-analysis/references/competitive-advantage.md +31 -0
  125. package/selected-skills/financeskills/skills/investment-analysis/references/valuation-guide.md +29 -0
  126. package/selected-skills/financeskills/skills/journal-entry/EXAMPLE.md +21 -0
  127. package/selected-skills/financeskills/skills/journal-entry/SKILL.md +94 -0
  128. package/selected-skills/financeskills/skills/journal-entry/assets/journal-entry-template.md +21 -0
  129. package/selected-skills/financeskills/skills/journal-entry/references/entry-patterns.md +51 -0
  130. package/selected-skills/financeskills/skills/lbo-modeling/EXAMPLE.md +21 -0
  131. package/selected-skills/financeskills/skills/lbo-modeling/SKILL.md +88 -0
  132. package/selected-skills/financeskills/skills/lbo-modeling/references/debt-structures.md +22 -0
  133. package/selected-skills/financeskills/skills/lbo-modeling/references/lbo-best-practices.md +27 -0
  134. package/selected-skills/financeskills/skills/lease-accounting/EXAMPLE.md +21 -0
  135. package/selected-skills/financeskills/skills/lease-accounting/SKILL.md +88 -0
  136. package/selected-skills/financeskills/skills/lease-accounting/assets/commencement-summary-template.md +28 -0
  137. package/selected-skills/financeskills/skills/lease-accounting/references/ibr-guide.md +26 -0
  138. package/selected-skills/financeskills/skills/net-worth-tracker/EXAMPLE.md +21 -0
  139. package/selected-skills/financeskills/skills/net-worth-tracker/SKILL.md +98 -0
  140. package/selected-skills/financeskills/skills/net-worth-tracker/references/asset-valuation.md +40 -0
  141. package/selected-skills/financeskills/skills/net-worth-tracker/references/net-worth-benchmarks.md +33 -0
  142. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/EXAMPLE.md +17 -0
  143. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/SKILL.md +77 -0
  144. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/references/finbert-guide.md +26 -0
  145. package/selected-skills/financeskills/skills/nlp-earnings-sentiment/references/linguistic-finance.md +23 -0
  146. package/selected-skills/financeskills/skills/oil-gas-valuation/EXAMPLE.md +21 -0
  147. package/selected-skills/financeskills/skills/oil-gas-valuation/SKILL.md +86 -0
  148. package/selected-skills/financeskills/skills/oil-gas-valuation/references/sec-reporting.md +22 -0
  149. package/selected-skills/financeskills/skills/oil-gas-valuation/references/spe-standards.md +25 -0
  150. package/selected-skills/financeskills/skills/personal-budgeting/EXAMPLE.md +21 -0
  151. package/selected-skills/financeskills/skills/personal-budgeting/SKILL.md +100 -0
  152. package/selected-skills/financeskills/skills/personal-budgeting/references/budgeting-methods.md +40 -0
  153. package/selected-skills/financeskills/skills/personal-budgeting/references/spending-categories.md +40 -0
  154. package/selected-skills/financeskills/skills/predictive-burn-rate/EXAMPLE.md +21 -0
  155. package/selected-skills/financeskills/skills/predictive-burn-rate/SKILL.md +82 -0
  156. package/selected-skills/financeskills/skills/predictive-burn-rate/references/startup-metrics.md +27 -0
  157. package/selected-skills/financeskills/skills/predictive-burn-rate/references/time-series-forecasting.md +22 -0
  158. package/selected-skills/financeskills/skills/product-profitability/EXAMPLE.md +21 -0
  159. package/selected-skills/financeskills/skills/product-profitability/SKILL.md +83 -0
  160. package/selected-skills/financeskills/skills/product-profitability/references/allocation-logic.md +28 -0
  161. package/selected-skills/financeskills/skills/product-profitability/references/unit-economics.md +30 -0
  162. package/selected-skills/financeskills/skills/retirement-planning/EXAMPLE.md +21 -0
  163. package/selected-skills/financeskills/skills/retirement-planning/SKILL.md +98 -0
  164. package/selected-skills/financeskills/skills/retirement-planning/references/compound-growth.md +38 -0
  165. package/selected-skills/financeskills/skills/retirement-planning/references/retirement-fundamentals.md +29 -0
  166. package/selected-skills/financeskills/skills/revenue-recognition/EXAMPLE.md +21 -0
  167. package/selected-skills/financeskills/skills/revenue-recognition/SKILL.md +86 -0
  168. package/selected-skills/financeskills/skills/revenue-recognition/assets/allocation-workpaper-template.md +30 -0
  169. package/selected-skills/financeskills/skills/revenue-recognition/references/ifrs15-guide.md +28 -0
  170. package/selected-skills/financeskills/skills/revenue-recognition/references/saas-rev-rec.md +26 -0
  171. package/selected-skills/financeskills/skills/risk-assessment/EXAMPLE.md +21 -0
  172. package/selected-skills/financeskills/skills/risk-assessment/SKILL.md +83 -0
  173. package/selected-skills/financeskills/skills/risk-assessment/references/hedging-guide.md +24 -0
  174. package/selected-skills/financeskills/skills/risk-assessment/references/risk-metrics.md +24 -0
  175. package/selected-skills/financeskills/skills/sox-compliance/EXAMPLE.md +17 -0
  176. package/selected-skills/financeskills/skills/sox-compliance/SKILL.md +88 -0
  177. package/selected-skills/financeskills/skills/sox-compliance/references/sampling-methodology.md +27 -0
  178. package/selected-skills/financeskills/skills/startup-valuation/EXAMPLE.md +21 -0
  179. package/selected-skills/financeskills/skills/startup-valuation/SKILL.md +88 -0
  180. package/selected-skills/financeskills/skills/startup-valuation/references/berkus-method.md +25 -0
  181. package/selected-skills/financeskills/skills/startup-valuation/references/vc-method.md +23 -0
  182. package/selected-skills/financeskills/skills/statement-preparation/EXAMPLE.md +21 -0
  183. package/selected-skills/financeskills/skills/statement-preparation/SKILL.md +86 -0
  184. package/selected-skills/financeskills/skills/statement-preparation/references/accruals-deferrals.md +24 -0
  185. package/selected-skills/financeskills/skills/statement-preparation/references/cash-flow-method.md +32 -0
  186. package/selected-skills/financeskills/skills/tax-efficient-investing/EXAMPLE.md +21 -0
  187. package/selected-skills/financeskills/skills/tax-efficient-investing/SKILL.md +97 -0
  188. package/selected-skills/financeskills/skills/tax-efficient-investing/references/account-types.md +33 -0
  189. package/selected-skills/financeskills/skills/tax-efficient-investing/references/asset-location.md +36 -0
  190. package/selected-skills/financeskills/skills/tax-planning/EXAMPLE.md +21 -0
  191. package/selected-skills/financeskills/skills/tax-planning/SKILL.md +93 -0
  192. package/selected-skills/financeskills/skills/tax-planning/references/common-deductions.md +28 -0
  193. package/selected-skills/financeskills/skills/tax-planning/references/tax-code-lookup.md +25 -0
  194. package/selected-skills/financeskills/skills/three-statement-modeling/EXAMPLE.md +21 -0
  195. package/selected-skills/financeskills/skills/three-statement-modeling/SKILL.md +84 -0
  196. package/selected-skills/financeskills/skills/three-statement-modeling/references/model-checks.md +32 -0
  197. package/selected-skills/financeskills/skills/treasury-management/EXAMPLE.md +21 -0
  198. package/selected-skills/financeskills/skills/treasury-management/SKILL.md +83 -0
  199. package/selected-skills/financeskills/skills/treasury-management/references/fx-hedging.md +27 -0
  200. package/selected-skills/financeskills/skills/treasury-management/references/liquidity-metrics.md +24 -0
  201. package/selected-skills/financeskills/skills/variance-analysis/EXAMPLE.md +21 -0
  202. package/selected-skills/financeskills/skills/variance-analysis/SKILL.md +78 -0
  203. package/selected-skills/financeskills/skills/variance-analysis/references/overhead-logic.md +24 -0
  204. package/selected-skills/financeskills/skills/variance-analysis/references/variance-math.md +35 -0
  205. package/selected-skills/financeskills/skills/venture-debt/EXAMPLE.md +21 -0
  206. package/selected-skills/financeskills/skills/venture-debt/SKILL.md +84 -0
  207. package/selected-skills/financeskills/skills/venture-debt/references/saas-debt-metrics.md +26 -0
  208. package/selected-skills/financeskills/skills/venture-debt/references/venture-lending.md +23 -0
  209. package/selected-skills/financeskills/skills/wacc-computation/EXAMPLE.md +21 -0
  210. package/selected-skills/financeskills/skills/wacc-computation/SKILL.md +98 -0
  211. package/selected-skills/financeskills/skills/wacc-computation/assets/wacc-memo-template.md +40 -0
  212. package/selected-skills/financeskills/skills/wacc-computation/references/beta-math.md +24 -0
  213. package/selected-skills/financeskills/skills/wacc-computation/references/capm-basics.md +24 -0
  214. package/selected-skills/financeskills/skills/working-capital-analysis/EXAMPLE.md +21 -0
  215. package/selected-skills/financeskills/skills/working-capital-analysis/SKILL.md +83 -0
  216. package/selected-skills/financeskills/skills/working-capital-analysis/references/wc-metrics.md +30 -0
  217. package/selected-skills/quant-agent-skills/LICENSE +21 -0
  218. package/selected-skills/quant-agent-skills/UPSTREAM.md +111 -0
  219. package/selected-skills/quant-agent-skills/skills/cross-market-listing-choice/SKILL.md +105 -0
  220. package/selected-skills/quant-agent-skills/skills/cross-market-listing-choice/references/adr-hk-overlay.md +45 -0
  221. package/selected-skills/quant-agent-skills/skills/cross-market-listing-choice/references/ah-overlay.md +44 -0
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: investment-analysis
3
+ description: When the user wants to evaluate the potential profitability and viability of an investment opportunity. Also use when the user mentions "stock valuation," "DCF model," "NPV calculation," "IRR analysis," "buy or sell," "investment thesis," "margin of safety," or "equity research." Use this for stocks, real estate, and private equity.
4
+ metadata:
5
+ version: 1.1.0
6
+ ---
7
+
8
+ # Investment Analysis
9
+
10
+ You are an Equity Research Analyst. Your goal is to determine the intrinsic value of an asset and provide a clear investment recommendation based on a margin of safety.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Asset Context**
15
+ - Publicly traded company, private entity, or real estate?
16
+ - What is the current market price?
17
+ - What is the investor's time horizon?
18
+
19
+ 2. **Data Availability**
20
+ - Do we have 5-10 years of historical financials?
21
+ - Do we have analyst consensus or management guidance?
22
+
23
+ ---
24
+
25
+ ## Analysis Framework
26
+
27
+ ### Priority Order
28
+ 1. **Fundamental Analysis** (Understanding the business model and moats).
29
+ 2. **Financial Modeling** (Building the DCF or LBO model).
30
+ 3. **Relative Valuation** (Comparing Multiples - P/E, EV/EBITDA).
31
+ 4. **Risk Assessment** (Identifying the "Bear Case").
32
+ 5. **Investment Thesis** (Synthesizing findings into a recommendation).
33
+
34
+ ---
35
+
36
+ ## Technical Analysis Steps
37
+
38
+ ### 1. Business Model Review
39
+ - Identify the "Moat" (Brand, Network Effect, Cost Advantage).
40
+ - Analyze the competitive landscape and market share trends.
41
+
42
+ ### 2. Discounted Cash Flow (DCF)
43
+ - Forecast Free Cash Flow (FCF) for 5-10 years.
44
+ - Determine the Weighted Average Cost of Capital (WACC).
45
+ - Calculate the Terminal Value using the perpetuity growth method or exit multiple.
46
+
47
+ ### 3. Multiples Analysis
48
+ - Compare the target's P/E, P/S, and EV/EBITDA to historical averages and industry peers.
49
+
50
+ ---
51
+
52
+ ## Output Format
53
+
54
+ ### Investment Memo Structure
55
+
56
+ **Executive Summary**
57
+ - Recommendation (Buy/Hold/Sell).
58
+ - Target Price and Upside/Downside percentage.
59
+ - The "One Sentence" Thesis.
60
+
61
+ **Detailed Analysis**
62
+ - **Valuation**: Breakdown of DCF assumptions and output.
63
+ - **Moat Analysis**: Qualitative assessment of competitive advantage.
64
+ - **Risks**: Key factors that could invalidate the thesis.
65
+
66
+ ---
67
+
68
+ ## Scripts
69
+ - [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.
70
+
71
+ ---
72
+
73
+ ## References
74
+ - [Valuation Methodologies](./references/valuation-guide.md): Standard practices for DCF and Multiples.
75
+ - [Moat Identification](./references/competitive-advantage.md): How to assess business quality.
76
+
77
+ ---
78
+
79
+ ## Related Skills
80
+ - **financial-analysis**: For the baseline audit of historical numbers.
81
+ - **risk-assessment**: For deeper dive into the downside scenarios.
82
+ - **budget-forecast**: For building the 5-10 year projection used in the DCF.
@@ -0,0 +1,31 @@
1
+ # Competitive Advantage: Identifying Moats
2
+
3
+ Why some companies earn high returns on capital for decades while others fail.
4
+
5
+ ## 🏛️ The Five Types of Moats (Morningstar Framework)
6
+
7
+ ### 1. Network Effect
8
+ The value of a service increases as more people use it (e.g., Visa, Facebook, Microsoft Windows).
9
+
10
+ ### 2. Intangible Assets
11
+ Brands, patents, or regulatory licenses that allow a company to charge more or block competitors (e.g., Coca-Cola, Disney, Pfizer).
12
+
13
+ ### 3. Cost Advantage
14
+ Producing goods or services at a lower cost than competitors due to scale, location, or unique processes (e.g., Walmart, Amazon, Geico).
15
+
16
+ ### 4. Switching Costs
17
+ The time, money, or emotional cost of moving to a competitor is too high (e.g., Oracle Database, ERP systems, Bank accounts).
18
+
19
+ ### 5. Efficient Scale
20
+ A market is so small that it only supports 1-2 profitable players; a new entrant would make everyone unprofitable (e.g., Regional airports, Pipeline companies).
21
+
22
+ ---
23
+
24
+ ## 🔍 Evidence of a Moat
25
+ - Consistent **Return on Invested Capital (ROIC)** > **WACC**.
26
+ - Stable or growing **Market Share**.
27
+ - **Pricing Power** (Ability to raise prices without losing customers).
28
+
29
+ ## 🔗 Sources
30
+ - [Morningstar: The Five Sources of Economic Moats](https://www.morningstar.com/articles/932358/the-five-sources-of-economic-moats)
31
+ - [Pat Dorsey: The Little Book that Builds Wealth](https://www.goodreads.com/book/show/2358514.The_Little_Book_that_Builds_Wealth)
@@ -0,0 +1,29 @@
1
+ # Valuation Guide: DCF & Multiples
2
+
3
+ Standard methodologies for determining the intrinsic and relative value of a business.
4
+
5
+ ## 🏛️ Discounted Cash Flow (DCF)
6
+ The DCF is a "First Principles" valuation based on the present value of future cash flows.
7
+
8
+ ### The Formula
9
+ `Value = Σ [FCF_t / (1 + WACC)^t]`
10
+ - **FCF**: Free Cash Flow (Cash from Ops - CapEx).
11
+ - **WACC**: Weighted Average Cost of Capital (Discount rate).
12
+ - **t**: Time period.
13
+
14
+ ### Key Assumptions
15
+ - **Terminal Growth Rate**: Usually 2-3% (aligned with long-term GDP growth).
16
+ - **Discount Rate**: Reflects the riskiness of the cash flows.
17
+
18
+ ---
19
+
20
+ ## 🔍 Relative Valuation (Multiples)
21
+ Comparing a company to its peers or its own historical history.
22
+
23
+ - **P/E (Price-to-Earnings)**: Most common for profitable companies.
24
+ - **EV/EBITDA**: Used for capital-intensive industries; accounts for debt.
25
+ - **P/S (Price-to-Sales)**: Used for high-growth companies with no net income.
26
+
27
+ ## 🔗 Sources
28
+ - [Aswath Damodaran: Valuation Site](http://pages.stern.nyu.edu/~adamodar/)
29
+ - [Investopedia: Discounted Cash Flow](https://www.investopedia.com/terms/d/dcf.asp)
@@ -0,0 +1,21 @@
1
+ # Worked Example - journal-entry
2
+
3
+ ## Ask
4
+
5
+ > We received legal services worth $25,000 in June but the invoice won't arrive until July. Prepare the June entry.
6
+
7
+ ## What a correct response contains
8
+
9
+ Dr Legal/Professional Fees 25,000 / Cr Accrued Liabilities 25,000, flagged auto-reversing in July, with documentation basis (engagement letter, work confirmation).
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/draft_entries.csv`:
14
+
15
+ > Review the attached draft journal entries (evals/files/draft_entries.csv) before posting. Validate each entry balances, flag any malformed lines, and state which entries are safe to post.
16
+
17
+ Expected: JE-101 and JE-103 are valid. JE-102 is out of balance by $450 (17,500 vs 17,050 - transposition). JE-104 has a line with both a debit and credit (invalid form) - net effect balances but the entry must be re-drafted. Only JE-101 and JE-103 post as-is.
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,94 @@
1
+ ---
2
+ name: journal-entry
3
+ description: When the user wants to prepare, review, or document a journal entry with proper debits, credits, and support. Also use when the user mentions "book an accrual," "post a JE," "adjusting entry," "prepaid amortization," "payroll entry," "reclass," or "reversing entry."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Journal Entry Preparation
9
+
10
+ You are a Senior GL Accountant. Your goal is to produce journal entries that are correct in debit/credit logic, properly supported, and ready to survive both review and audit.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Entry Context**
15
+ - What economic event is being recorded, and in which period does it belong?
16
+ - Entry type: accrual, deferral, depreciation/amortization, reclass, correction, revaluation, or non-routine.
17
+ - Auto-reversing next period? Recurring or one-time?
18
+
19
+ 2. **Support & Authority**
20
+ - Source documents available (invoice, contract, calculation schedule, payroll register).
21
+ - Approval threshold and who must sign.
22
+
23
+ ---
24
+
25
+ ## Entry Framework
26
+
27
+ ### Debit/Credit Mechanics
28
+ - Assets & expenses increase with DEBITS; liabilities, equity, and revenue increase with CREDITS.
29
+ - Every entry balances. Multi-line entries: validate Σdebits = Σcredits before anything else.
30
+
31
+ ### Standard Entry Patterns
32
+ | Event | Entry |
33
+ |---|---|
34
+ | Expense accrual | Dr Expense / Cr Accrued Liability (reverse next period) |
35
+ | Prepaid amortization | Dr Expense / Cr Prepaid Asset |
36
+ | Depreciation | Dr Depreciation Expense / Cr Accumulated Depreciation |
37
+ | Deferred revenue release | Dr Deferred Revenue / Cr Revenue |
38
+ | Payroll | Dr Salary Expense + Dr Employer Burden / Cr Cash + Cr Withholding Liabilities + Cr Pension Payable |
39
+ | Bad debt provision | Dr Impairment Expense / Cr Allowance for ECL |
40
+ | Error correction | Reverse the wrong entry in full, then post correctly — never post net differences |
41
+
42
+ ---
43
+
44
+ ## Technical Analysis Steps
45
+
46
+ ### 1. Period Assignment
47
+ Match the entry to the period the economics occurred (cut-off). For corrections of prior periods, assess materiality: immaterial → current period; material → prior-period restatement treatment.
48
+
49
+ ### 2. Account Selection
50
+ Use the chart of accounts hierarchy; never invent accounts. Question any entry touching suspense/clearing accounts — they need a clearance plan.
51
+
52
+ ### 3. Documentation Standard
53
+ Every JE carries: description (what + why + period), preparer, calculation support, source documents, approval per delegation-of-authority matrix.
54
+
55
+ ---
56
+
57
+ ## Output Format
58
+
59
+ ### Journal Entry Package
60
+
61
+ **Entry Header**
62
+ - Date, period, entity, currency, auto-reverse flag, JE type.
63
+
64
+ **Entry Lines**
65
+ - Account | Account Name | Debit | Credit | Line memo | Cost center.
66
+
67
+ **Support Summary**
68
+ - Basis of calculation, source documents, and assumptions.
69
+
70
+ **Review Checklist**
71
+ - Balanced? Correct period? Correct accounts? Support attached? Approval obtained?
72
+
73
+ ---
74
+
75
+ ## Scripts
76
+ - [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.
77
+
78
+ ---
79
+
80
+ ## References
81
+ - [Entry Patterns Cookbook](./references/entry-patterns.md): Worked entries for the 15 most common close scenarios.
82
+
83
+ ---
84
+
85
+ ## Assets
86
+ - [journal-entry-template.md](./assets/journal-entry-template.md): JE voucher with approval fields.
87
+
88
+ ---
89
+
90
+ ## Related Skills
91
+ - **close-management**: For where each entry type fits in the close calendar.
92
+ - **automated-reconciliation**: Entries often originate from reconciling items.
93
+ - **revenue-recognition**: For the revenue entries' measurement logic.
94
+ - **deferred-tax**: For the tax entries on temporary differences.
@@ -0,0 +1,21 @@
1
+ # Journal Entry Voucher
2
+
3
+ **JE #:** {number} | **Date:** {posting date} | **Period:** {period} | **Type:** {accrual / reversal / standard / adjusting}
4
+
5
+ | Line | Account code | Account name | Dr | Cr | Memo |
6
+ |---|---|---|---|---|---|
7
+ | 1 | | | | | |
8
+ | 2 | | | | | |
9
+ | | | **Totals (must be equal)** | **{x}** | **{x}** | |
10
+
11
+ **Business purpose:** {1-2 sentences - why this entry exists}
12
+
13
+ **Support:** {invoice / contract / calculation reference}
14
+
15
+ **Reversal:** {auto-reverses on {date} / not applicable}
16
+
17
+ Prepared by: AI agent (scripts/calculate.py validate_entry passed: {y/n})
18
+ Reviewed by: ____________ Approved by: ____________
19
+
20
+ ---
21
+ *AI-prepared entry - requires human review and approval before posting.*
@@ -0,0 +1,51 @@
1
+ # Journal Entry Patterns Cookbook
2
+
3
+ All examples balance and state their reversal behavior.
4
+
5
+ ## 1. AP Accrual (service received, no invoice)
6
+ Dr Professional Fees 5,000 / Cr Accrued Liabilities 5,000 — auto-reverse WD1 next period.
7
+
8
+ ## 2. Payroll (gross-to-net)
9
+ Dr Salaries Expense 10,000; Dr Employer Pension Expense 1,000
10
+ Cr Net Pay Payable 7,800; Cr PAYE Payable 2,200; Cr Pension Payable (employee 8% + employer 10% on relevant emoluments under Nigerian PRA 2014, adjust per jurisdiction) 1,000
11
+
12
+ ## 3. Prepaid Insurance (annual premium 12,000 paid 1 March)
13
+ At payment: Dr Prepaid Insurance 12,000 / Cr Cash 12,000
14
+ Monthly: Dr Insurance Expense 1,000 / Cr Prepaid Insurance 1,000
15
+
16
+ ## 4. Depreciation (asset 60,000, 5-yr straight line, no residual)
17
+ Monthly: Dr Depreciation Expense 1,000 / Cr Accumulated Depreciation 1,000
18
+
19
+ ## 5. Deferred Revenue Release (annual SaaS 24,000 billed upfront)
20
+ At billing: Dr AR 24,000 / Cr Deferred Revenue 24,000
21
+ Monthly: Dr Deferred Revenue 2,000 / Cr Revenue 2,000
22
+
23
+ ## 6. Unbilled (Accrued) Revenue
24
+ Dr Contract Asset–Unbilled AR 8,000 / Cr Revenue 8,000; reclass to AR on invoicing.
25
+
26
+ ## 7. Bad Debt / ECL Provision Top-Up
27
+ Dr Impairment Loss 3,500 / Cr Allowance for ECL 3,500. Write-off: Dr Allowance / Cr AR (P&L only if allowance insufficient).
28
+
29
+ ## 8. FX Revaluation (USD payable, NGN books, rate moved against you)
30
+ Dr FX Loss 150,000 / Cr Accounts Payable 150,000 — monetary items at closing rate (IAS 21).
31
+
32
+ ## 9. Inventory Adjustment After Count
33
+ Shortage: Dr Inventory Shrinkage Expense / Cr Inventory. NRV write-down: Dr COGS (or separate line) / Cr Inventory Allowance.
34
+
35
+ ## 10. Accrued Interest on Borrowing
36
+ Dr Interest Expense (EIR basis) / Cr Accrued Interest Payable; payment clears the payable.
37
+
38
+ ## 11. Lease (IFRS 16, monthly)
39
+ Dr Interest Expense X; Dr Lease Liability Y / Cr Cash (X+Y). Separately: Dr ROU Depreciation / Cr Accumulated Depreciation–ROU.
40
+
41
+ ## 12. Correction (expense posted to wrong cost center, same P&L account)
42
+ Dr Expense (CC-200) / Cr Expense (CC-100) — memo references original JE number.
43
+
44
+ ## 13. Reclass Short-Term Portion of Debt
45
+ Dr Long-Term Debt / Cr Current Portion of LTD — every close.
46
+
47
+ ## 14. Bonus Accrual (estimated, year-to-date true-up method)
48
+ Dr Bonus Expense / Cr Accrued Bonus = (expected annual bonus × months elapsed/12) − accrued to date.
49
+
50
+ ## 15. Dividend Declaration
51
+ Dr Retained Earnings / Cr Dividends Payable at declaration; payment clears the liability. (Withholding tax: Cr WHT Payable for the withheld portion at payment.)
@@ -0,0 +1,21 @@
1
+ # Worked Example - lbo-modeling
2
+
3
+ ## Ask
4
+
5
+ > We want to buy a company for $100M (10x EBITDA). We are using $60M in debt and $40M in equity. If we exit in 5 years at the same multiple, what's our IRR?
6
+
7
+ ## What a correct response contains
8
+
9
+ Should calculate the entry EBITDA ($10M). Should identify the need for cash flow projections to pay down debt. Should explain that if debt is paid down, the equity value at exit increases even if the multiple stays the same. Should provide an LBO Analysis Summary structure.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/lbo_assumptions.xlsx`:
14
+
15
+ > Run the LBO described in the attached assumptions workbook (evals/files/lbo_assumptions.xlsx). Compute entry EV, debt and sponsor equity, exit EBITDA and EV, exit equity value, MOIC and IRR. Debt is a bullet (no paydown); ignore cash generation.
16
+
17
+ Expected: Entry EV $400m, debt $240m, equity $160m. Exit EBITDA $73.5m, exit EV $588m, exit equity $348m. MOIC 2.17x, IRR 16.8%.
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,88 @@
1
+ ---
2
+ name: lbo-modeling
3
+ description: When the user wants to model a Leveraged Buyout (LBO) for private equity analysis. Also use when the user mentions "private equity model," "debt capacity analysis," "exit IRR," "MOIC calculation," "sources and uses," or "entry multiple."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # LBO Modeling
9
+
10
+ You are a Private Equity Associate. Your goal is to determine if a company is a viable LBO candidate by modeling debt repayment, cash flow generation, and exit returns (IRR/MOIC).
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Transaction Context**
15
+ - What is the Entry Multiple (e.g., 10x EBITDA)?
16
+ - What is the estimated Exit Multiple?
17
+ - What is the target holding period (usually 3-7 years)?
18
+
19
+ 2. **Financing Assumptions**
20
+ - How much debt can the company support (Debt/EBITDA)?
21
+ - What are the interest rates for different tranches (Senior, Mezzanine)?
22
+
23
+ 3. **Operations & Growth**
24
+ - What is the projected EBITDA growth?
25
+ - What are the ongoing CapEx requirements?
26
+
27
+ ---
28
+
29
+ ## LBO Framework
30
+
31
+ ### Priority Order
32
+ 1. **Sources & Uses** (Calculating the total purchase price and how it's funded).
33
+ 2. **Operations Forecast** (Projecting Revenue to Free Cash Flow).
34
+ 3. **Debt Schedule** (Modeling the mandatory and optional repayment of debt).
35
+ 4. **Returns Analysis** (Calculating Internal Rate of Return (IRR) and Multiple of Invested Capital (MOIC)).
36
+ 5. **Sensitivity Analysis** (Testing returns against entry/exit multiples and growth rates).
37
+
38
+ ---
39
+
40
+ ## Technical Modeling Steps
41
+
42
+ ### 1. Sources & Uses Table
43
+ - **Uses**: Purchase Equity, Refinance Existing Debt, Transaction Fees.
44
+ - **Sources**: New Debt, Sponsor Equity.
45
+
46
+ ### 2. Cash Flow for Debt Service (CFADS)
47
+ - Calculate EBITDA -> Less Taxes -> Less Interest -> Less CapEx -> Less Δ Working Capital.
48
+ - This represents the cash available to pay down principal.
49
+
50
+ ### 3. IRR Calculation
51
+ - `IRR = (Exit Proceeds / Entry Equity)^(1/n) - 1`.
52
+ - MOIC (Multiple of Money) = `Exit Proceeds / Entry Equity`.
53
+
54
+ ---
55
+
56
+ ## Output Format
57
+
58
+ ### LBO Analysis Summary
59
+
60
+ **The Deal**
61
+ - Total Transaction Value.
62
+ - Equity Contribution vs. Debt Funding.
63
+
64
+ **The Returns (Base Case)**
65
+ - **IRR**: (e.g., 22.5%).
66
+ - **MOIC**: (e.g., 2.4x).
67
+ - Exit Date: (e.g., Year 5).
68
+
69
+ **Returns Matrix**
70
+ - Table showing IRR across different Exit Multiples and Revenue Growth scenarios.
71
+
72
+ ---
73
+
74
+ ## Scripts
75
+ - [calculate.py](./scripts/calculate.py): Sources & uses, cash sweep debt schedule, and IRR/MoM functions. Run with `python3 scripts/calculate.py` to self-test; import the functions for actual computations.
76
+
77
+ ---
78
+
79
+ ## References
80
+ - [LBO Modeling Standards](./references/lbo-best-practices.md): Industry conventions.
81
+ - [Debt Tranches Explained](./references/debt-structures.md): Senior vs. Subordinated.
82
+
83
+ ---
84
+
85
+ ## Related Skills
86
+ - **investment-analysis**: For the baseline business quality assessment.
87
+ - **financial-analysis**: For auditing the EBITDA sustainability.
88
+ - **risk-assessment**: For evaluating the bankruptcy risk of high leverage.
@@ -0,0 +1,22 @@
1
+ # LBO Debt Structures
2
+
3
+ ## Typical Capital Stack (top = paid first)
4
+ | Tranche | Leverage | Pricing (indicative) | Features |
5
+ |---|---|---|---|
6
+ | Revolver | undrawn at close | SOFR + 200–350 | Liquidity backstop; springing covenant |
7
+ | Term Loan A | with TLB, 0.5–1.5x | SOFR + 250–350 | Bank-held, 5–10% annual amortization |
8
+ | Term Loan B | 3–4.5x cumulative | SOFR + 350–500, 0–0.5% floor | Institutional, 1% amort, covenant-lite common |
9
+ | Senior Notes / High Yield | +1–2x | Fixed 7–10% | No amort, call protection (NC-2/3) |
10
+ | Mezzanine / PIK | +0.5–1x | 11–14% cash+PIK | Warrants sometimes attached |
11
+ | Sponsor Equity | 40–60% of capital | — | Residual claim |
12
+
13
+ ## Key Terms to Model
14
+ - **Amortization**: TLA meaningful; TLB 1%/yr; notes bullet.
15
+ - **Cash sweep / ECF sweep**: % of excess cash flow, often leverage-ratcheted.
16
+ - **PIK toggle**: interest accrues to principal — compounds against the exit equity.
17
+ - **Call protection**: HY non-call periods and premiums (e.g., 105/102.5/100) matter for refi scenarios.
18
+ - **Covenants**: maintenance (leverage, coverage — tested quarterly, TLA/revolver) vs. incurrence (HY). Model headroom ≥ 15–25% cushion to projections.
19
+ - **OID & financing fees**: amortize into interest expense (effective yield); add cash cost at close.
20
+
21
+ ## Structuring Logic
22
+ More TLA/amortizing debt = faster deleveraging, better IRR from paydown but tighter covenants. More HY/PIK = flexibility, higher cost, returns lean on growth. Match amortization burden to FCF stability of the business.
@@ -0,0 +1,27 @@
1
+ # LBO Modeling Best Practices
2
+
3
+ ## Model Architecture (order matters)
4
+ 1. Transaction assumptions: entry EV (multiple × LTM EBITDA), sources & uses, fees.
5
+ 2. Debt schedule with mandatory amortization + cash sweep.
6
+ 3. Integrated 3-statement projection (or EBITDA-to-FCF bridge for quick models).
7
+ 4. Exit: exit multiple × exit-year EBITDA → equity proceeds → IRR/MoM.
8
+ 5. Sensitivities: entry/exit multiple grid, leverage grid, growth/margin grid.
9
+
10
+ ## Sources & Uses Discipline
11
+ - Uses: equity purchase price + refinanced debt + transaction fees (2–3% of EV) + financing fees (2–3% of debt, capitalized and amortized).
12
+ - Sources: each debt tranche + sponsor equity + management rollover. Must balance to the dollar.
13
+ - Minimum cash to balance sheet — never fund the deal to zero cash.
14
+
15
+ ## Cash Sweep Mechanics
16
+ `FCF available = EBITDA − cash interest − cash taxes − capex − ΔNWC − mandatory amort`
17
+ Sweep order: revolver first, then tranches by seniority (check covenants — some TLBs have 50%/25%/0% ECF sweep tiers by leverage).
18
+
19
+ ## Returns Math
20
+ - `MoM = Exit equity / Entry equity`; `IRR = MoM^(1/years) − 1` for single-flow deals.
21
+ - Value creation bridge at exit: EBITDA growth + multiple expansion + debt paydown = total equity gain. Attribute every deal — if returns are mostly multiple expansion, the thesis is market beta.
22
+ - Target: 20–25% IRR / 2.0–3.0x MoM over 5 years.
23
+
24
+ ## Sanity Checks
25
+ - Leverage: 4–6x total debt/EBITDA typical; interest coverage (EBITDA/cash interest) ≥ 2x in all projection years.
26
+ - Credit stats improve over hold or the model has a problem.
27
+ - Circularity (interest ↔ cash) — use opening-balance interest convention or iterative solve; document which.
@@ -0,0 +1,21 @@
1
+ # Worked Example - lease-accounting
2
+
3
+ ## Ask
4
+
5
+ > We signed a 5-year office lease: 10,000,000 NGN per year paid annually in arrears, IBR 18%, no incentives, no restoration. Compute the initial lease liability and ROU asset and give me year-1 entries.
6
+
7
+ ## What a correct response contains
8
+
9
+ Liability = PV of 5 payments of 10M at 18% = ~31,272,000 NGN. ROU = same. Year 1: interest = ~5,629,000, payment 10M reduces liability to ~26,901,000; ROU depreciation = ~6,254,400/yr straight-line.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/lease_portfolio.csv`:
14
+
15
+ > Using the attached lease portfolio (evals/files/lease_portfolio.csv) — payments annual in arrears, no renewal options, commencement today — measure each lease liability and right-of-use asset at commencement under IFRS 16, and compute total year-1 interest expense and straight-line depreciation. Produce a commencement summary table and the initial journal entry.
16
+
17
+ Expected: Liabilities: L-01 $1,025,049, L-02 $689,597, L-03 $194,383; total $1,909,029 (ROU assets equal liabilities here). Year-1 interest $144,416; year-1 depreciation $339,805.
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,88 @@
1
+ ---
2
+ name: lease-accounting
3
+ description: When the user wants to account for leases under IFRS 16 or ASC 842. Also use when the user mentions "right-of-use asset," "lease liability," "incremental borrowing rate," "lease modification," "operating vs finance lease," "lease term," or "embedded lease."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Lease Accounting (IFRS 16 / ASC 842)
9
+
10
+ You are a Technical Accounting Manager. Your goal is to identify, measure, and account for leases correctly — initial recognition, subsequent measurement, modifications, and disclosure.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Lease Identification**
15
+ - Is there an identified asset (explicit or implicit, no substantive substitution right)?
16
+ - Does the customer control the use (direct how/for what purpose) and obtain substantially all economic benefits?
17
+ - Check embedded leases in service/outsourcing/transport/storage contracts.
18
+
19
+ 2. **Measurement Inputs**
20
+ - Lease term: non-cancellable period + reasonably certain extension/termination options.
21
+ - Payments: fixed, in-substance fixed, index-linked variable (in), usage-based variable (out), residual guarantees, purchase options.
22
+ - Discount rate: rate implicit in lease, else incremental borrowing rate (IBR).
23
+
24
+ ---
25
+
26
+ ## Accounting Framework
27
+
28
+ ### Initial Recognition (lessee)
29
+ - `Lease liability = PV of unpaid lease payments at the discount rate`
30
+ - `ROU asset = liability + prepaid payments + initial direct costs + restoration estimate − incentives received`
31
+
32
+ ### Subsequent Measurement
33
+ - Liability: effective interest method (interest = opening balance × rate; payments reduce balance).
34
+ - ROU asset: depreciate straight-line over shorter of lease term and useful life (to useful life if ownership transfers/purchase option reasonably certain).
35
+ - IFRS 16: single model. ASC 842: finance leases as above; operating leases keep single straight-line lease cost (liability math identical).
36
+
37
+ ### Exemptions
38
+ Short-term (≤ 12 months, no purchase option) and low-value assets (IFRS only, ~$5k new): expense straight-line. Apply policy consistently and disclose.
39
+
40
+ ### Reassessment & Modifications
41
+ - Index/rate change → remeasure liability against ROU (unchanged discount rate).
42
+ - Term/option reassessment → remeasure with REVISED discount rate.
43
+ - Modification adding asset at market rate → separate lease. Scope decrease → reduce ROU proportionately, gain/loss to P&L. Other modifications → remeasure against ROU.
44
+
45
+ ---
46
+
47
+ ## Technical Analysis Steps
48
+
49
+ 1. **Build the amortization schedule** — period, opening liability, interest, payment, closing liability; parallel ROU depreciation track. Verify with code.
50
+ 2. **Classify P&L and cash flow effects** — depreciation + interest (IFRS); principal → financing, interest → policy choice (IFRS) / operating (US GAAP).
51
+ 3. **Transition/portfolio checks** — consistent IBR matrix by currency/term; completeness sweep of contracts > 12 months.
52
+
53
+ ---
54
+
55
+ ## Output Format
56
+
57
+ ### Lease Accounting Memo
58
+
59
+ **Conclusion**: lease/not a lease; classification (US GAAP); exemptions applied.
60
+
61
+ **Measurement**: inputs table (term, rate, payments), initial liability and ROU values.
62
+
63
+ **Schedule**: full amortization table + annual JE summary.
64
+
65
+ **Judgments**: option assessments, IBR derivation, variable payment treatment.
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
+ - [IBR Determination](./references/ibr-guide.md): Building incremental borrowing rates defensibly.
76
+
77
+ ---
78
+
79
+ ## Assets
80
+ - [commencement-summary-template.md](./assets/commencement-summary-template.md): Portfolio measurement and journal entry template.
81
+
82
+ ---
83
+
84
+ ## Related Skills
85
+ - **journal-entry**: For the monthly lease entries.
86
+ - **aro-computation**: Restoration obligations attached to leased sites.
87
+ - **statement-preparation**: Lease presentation and disclosure in statements.
88
+ - **deferred-tax**: ROU/liability temporary differences.
@@ -0,0 +1,28 @@
1
+ # Lease Commencement Summary (IFRS 16 / ASC 842)
2
+
3
+ **Lessee:** {entity} | **Commencement:** {date} | **Discount basis:** {IBR / implicit rate}
4
+
5
+ ## Portfolio Measurement
6
+ | Lease | Asset | Payment | Timing | Term | Rate | Lease liability | ROU asset |
7
+ |---|---|---|---|---|---|---|---|
8
+ | | | | arrears/advance | | | | |
9
+ | **Total** | | | | | | **{x}** | **{x}** |
10
+
11
+ {ROU = liability + prepaid + initial direct costs + dismantling - incentives. State any differences.}
12
+
13
+ ## Year-1 P&L Impact
14
+ | Lease | Interest expense | Depreciation | Total | vs old operating-lease rent |
15
+ |---|---|---|---|---|
16
+
17
+ ## Initial Journal Entry
18
+ | Account | Dr | Cr |
19
+ |---|---|---|
20
+ | Right-of-use asset | {x} | |
21
+ | Lease liability | | {x} |
22
+
23
+ ## Judgments
24
+ - Renewal/termination options {included/excluded - why}
25
+ - Short-term / low-value exemptions applied: {list}
26
+
27
+ ---
28
+ *Present values computed with scripts/calculate.py. AI-prepared - review required.*
@@ -0,0 +1,26 @@
1
+ # Incremental Borrowing Rate (IBR) Determination
2
+
3
+ ## Definition
4
+ The rate the lessee would pay to borrow, over a similar term, with similar security, the amount needed to obtain an asset of similar value in a similar economic environment. It is lease-specific, not the company's WACC and not its existing average debt cost.
5
+
6
+ ## Build-Up Approach (the auditable method)
7
+ `IBR = Reference rate (currency + term matched) + Credit spread (entity, secured basis) + Asset/security adjustment`
8
+
9
+ 1. **Reference rate**: government bond yield in the lease currency, tenor ≈ weighted-average lease payment timing (duration, not full term). NGN leases → FGN bond curve; USD → Treasury curve.
10
+ 2. **Credit spread**: from the entity's traded debt, recent loan pricing, or rating-implied spread matrix. Subsidiaries: stand-alone credit unless parent guarantee exists in the lease.
11
+ 3. **Security adjustment**: leases are effectively secured borrowing → deduct an unsecured-to-secured adjustment (commonly 20–60 bps; property leases at the higher security end).
12
+
13
+ ## Portfolio Practicalities
14
+ - Build an IBR matrix: currency × term bucket (1–3y, 3–5y, 5–10y, 10y+) × entity, refreshed quarterly; apply to new leases by bucket.
15
+ - Document the date of each rate — IBR is set at commencement (or modification), not reporting date.
16
+ - Materiality shortcut: portfolio-level rate permitted for similar leases (IFRS 16.B1).
17
+
18
+ ## Common Audit Findings
19
+ 1. Using WACC or a flat round number across all leases.
20
+ 2. Term mismatch (10-year lease at a 1-year rate).
21
+ 3. Currency mismatch (USD rate on NGN-denominated payments — the inflation differential makes this badly wrong).
22
+ 4. Stale rates applied to new commencements after a rate environment shift.
23
+ 5. No security adjustment documentation.
24
+
25
+ ## Sensitivity
26
+ Disclose/monitor: ±100 bps typically moves the liability ~4–8% on a 10-year lease. High-rate environments (NGN) make the discounting effect dramatic — a 10-year NGN lease at 18% discounts late-year payments to very little.