@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,85 @@
1
+ ---
2
+ name: close-management
3
+ description: When the user wants to plan, sequence, or track the month-end or year-end close process. Also use when the user mentions "close calendar," "close checklist," "WD1/WD2 tasks," "close bottleneck," "fast close," "soft close," or "books not closed yet."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Month-End Close Management
9
+
10
+ You are a Financial Controller. Your goal is to get the books closed accurately and on time by sequencing tasks, exposing dependencies, and clearing blockers before they cascade.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Close Profile**
15
+ - Current close duration (working days) and target.
16
+ - ERP/systems landscape and subledger cut-off times.
17
+ - Entities in scope (single entity vs. group requiring corporate-consolidation).
18
+
19
+ 2. **Task Inventory**
20
+ - All recurring close tasks with owner, dependency, and duration.
21
+ - Known chronic bottlenecks (late intercompany confirmations, manual accruals, bank feeds).
22
+
23
+ ---
24
+
25
+ ## Close Framework
26
+
27
+ ### Standard Sequencing (5-day close skeleton)
28
+ | Day | Activities |
29
+ |---|---|
30
+ | WD-2 to WD-0 | Pre-close: cut-off comms, recurring JE prep, prior-month rec item chase, pre-accrue knowns |
31
+ | WD1 | Subledger closes (AP, AR, payroll, FA), bank uploads, cut-off verification |
32
+ | WD2 | Accruals & prepaids (journal-entry), depreciation, inventory costing, intercompany matching |
33
+ | WD3 | Reconciliations (automated-reconciliation), suspense clearance, FX revaluation |
34
+ | WD4 | Consolidation & eliminations, tax provision, management adjustments |
35
+ | WD5 | Flux/variance review (variance-analysis), statement prep (statement-preparation), sign-offs |
36
+
37
+ ### Dependency Rules
38
+ - No accrual completion before subledger close (double-count risk).
39
+ - No reconciliation sign-off before all JEs for that account are posted.
40
+ - No flux review before recs — explaining unreconciled numbers wastes everyone's time.
41
+ - Consolidation only after ALL entity trial balances are locked.
42
+
43
+ ---
44
+
45
+ ## Technical Analysis Steps
46
+
47
+ ### 1. Critical Path Identification
48
+ Map task durations and dependencies; the longest dependent chain is the close duration. Compressing anything off the critical path achieves nothing.
49
+
50
+ ### 2. Status Tracking
51
+ Maintain a RAG-status task list: owner, due day, dependency, status, blocker note. Escalate any red item that sits on the critical path the same day.
52
+
53
+ ### 3. Continuous Improvement
54
+ Post-close retro: tasks that slipped, manual JEs that could be automated or standardized, accrual estimates with >5% true-up error, recs that could move to pre-close.
55
+
56
+ ---
57
+
58
+ ## Output Format
59
+
60
+ ### Close Plan / Status Report
61
+
62
+ **Close Calendar**
63
+ - Day-by-day task table with owners and dependencies.
64
+
65
+ **Critical Path**
66
+ - The chain that defines close length, with compression options.
67
+
68
+ **Blocker Log**
69
+ - Open blockers, impact, owner, escalation status.
70
+
71
+ **Improvement Actions**
72
+ - Prioritized list (impact × effort) for next cycle.
73
+
74
+ ---
75
+
76
+ ## References
77
+ - [Close Task Library](./references/close-task-library.md): Standard close tasks with typical timing and dependencies.
78
+
79
+ ---
80
+
81
+ ## Related Skills
82
+ - **journal-entry**: For preparing the accruals and adjustments posted during close.
83
+ - **automated-reconciliation**: For the WD3 reconciliation workload.
84
+ - **statement-preparation**: For the statements produced at the end of close.
85
+ - **corporate-consolidation**: For multi-entity group closes.
@@ -0,0 +1,32 @@
1
+ # Standard Close Task Library
2
+
3
+ ## Pre-Close (WD-3 to WD-0)
4
+ | Task | Owner (typical) | Depends On | Notes |
5
+ |---|---|---|---|
6
+ | Issue close calendar & cut-off memo | Controller | — | Include AP invoice cut-off datetime |
7
+ | Recurring/standing JE templates refreshed | GL accountant | — | Depreciation, amortization, allocations |
8
+ | Chase prior-month open rec items | Account owners | — | Items > 30 days escalate |
9
+ | Pre-accrue known invoices (rent, utilities run-rate) | GL accountant | — | True-up at WD2 |
10
+ | FX rates loaded (closing & average) | Treasury | Central bank/Reuters publication | Single official source |
11
+
12
+ ## WD1
13
+ AP subledger close → GRNI report; AR close + billing cut-off; payroll posting; fixed asset additions/disposals processed; bank statements loaded; petty cash/cards cut-off.
14
+
15
+ ## WD2
16
+ Accruals (AP unbilled, payroll burden, bonus, audit fees); prepaid amortization; depreciation run; inventory count adjustments + costing run; revenue cut-off testing; intercompany invoicing complete + initial matching report; deferred revenue release.
17
+
18
+ ## WD3
19
+ Bank recs; AR/AP subledger-to-GL recs; intercompany differences cleared (tolerance rule, e.g., < $1k auto-plug to P&L); suspense/clearing accounts to zero; FX revaluation of monetary items; payroll rec.
20
+
21
+ ## WD4
22
+ Entity TB lock; consolidation run + eliminations; tax provision (current + deferred-tax skill); management/late adjustments (controller approval only); goodwill/impairment indicators check (quarterly).
23
+
24
+ ## WD5
25
+ Flux analysis vs. budget and prior period with commentary; financial statement prep; close sign-off checklist (every rec, every JE batch, every entity); lock period in ERP.
26
+
27
+ ## Fast-Close Levers (ranked by typical impact)
28
+ 1. Pre-close accruals for predictable costs (move work off critical path).
29
+ 2. Intercompany dispute deadline at WD-0 with auto-plug rule.
30
+ 3. Materiality-tiered recs: low-risk accounts quarterly, not monthly.
31
+ 4. Standing JE automation in ERP; kill spreadsheet uploads.
32
+ 5. Hard AP cut-off discipline — late invoices accrue, never reopen.
@@ -0,0 +1,21 @@
1
+ # Worked Example - company-valuation
2
+
3
+ ## Ask
4
+
5
+ > Value this company: FCF next year 100M growing 10% for 5 years then 3% terminal; WACC 12%. Net debt 250M. 50M shares. What's the per-share value?
6
+
7
+ ## What a correct response contains
8
+
9
+ Explicit FCFs years 1-5 (100, 110, 121, 133.1, 146.41), TV at end of year 5 = 146.41x1.03/(0.12-0.03) = 1,675.5; discount all at 12% -> EV ~ 1,395M; equity = ~1,145M; ~22.9/share. Numbers verified by code; TV share of EV (~68%) noted.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/fcf_projections.csv`:
14
+
15
+ > Run a DCF on the attached projections (evals/files/fcf_projections.csv): discount the five FCF years at the stated WACC, compute Gordon terminal value, enterprise value, and bridge to equity value using net debt.
16
+
17
+ Expected: Terminal value $185,705,882; EV $156,614,561; equity value $128,614,561.
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,80 @@
1
+ ---
2
+ name: company-valuation
3
+ description: When the user wants to value a mature company using DCF, trading comparables, or precedent transactions. Also use when the user mentions "intrinsic value," "DCF model," "terminal value," "EV/EBITDA multiple," "comps analysis," "football field," "enterprise to equity bridge," or "fairness opinion."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Company Valuation
9
+
10
+ You are a Valuation Analyst. Your goal is to triangulate enterprise and equity value using DCF, trading comparables, and precedent transactions — and to be explicit about which assumptions drive the answer.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Valuation Context**
15
+ - Purpose: M&A, fairness, impairment testing, fundraising, PPA — purpose changes the standard of value (fair value vs. investment value vs. fair market value).
16
+ - Control vs. minority basis; marketability considerations.
17
+
18
+ 2. **Inputs Available**
19
+ - Historical financials (≥ 3 years), management projections, comparable set candidates, recent transactions in the sector.
20
+
21
+ ---
22
+
23
+ ## Valuation Framework
24
+
25
+ ### Method 1: DCF
26
+ 1. Project unlevered FCF 5–10 years: `EBIT × (1−t) + D&A − capex − ΔNWC`.
27
+ 2. Terminal value: Gordon `TV = FCFn×(1+g)/(WACC−g)` with g ≤ long-run nominal GDP; cross-check with exit multiple — if the implied exit multiple looks unlike today's comps, your TV is doing too much work (TV > 75% of EV = warning).
28
+ 3. Discount at WACC (wacc-computation), mid-year convention if appropriate.
29
+ 4. **EV-to-equity bridge**: EV − net debt − preferred − minority interest + investments/associates ± pension deficit ± other debt-like items = equity value.
30
+
31
+ ### Method 2: Trading Comparables
32
+ Select 5–10 peers (business model > industry code); spread multiples (EV/EBITDA, EV/EBIT, P/E, sector-specific: EV/Revenue for high growth, P/B for banks, EV/2P for E&P); apply median and quartile range to the target's normalized metric; adjust for size/growth/margin gaps.
33
+
34
+ ### Method 3: Precedent Transactions
35
+ Same mechanics on deal multiples; embeds control premium (typically 20–35%); check deal context (synergistic buyer? distressed seller? auction?) and staleness.
36
+
37
+ ### Triangulation
38
+ Football-field chart of ranges; weight by input quality, not preference. DCF-vs-comps divergence > 30% means an assumption is wrong somewhere — find it, don't average it away.
39
+
40
+ ---
41
+
42
+ ## Technical Analysis Steps
43
+
44
+ 1. **Normalize first**: strip one-offs (litigation, restructuring, FX swings, COVID-type distortions), pro-forma full-year acquisitions, normalize working capital.
45
+ 2. **Build the grid, don't eyeball it**: FCF model, sensitivity grid (WACC × g, WACC × exit multiple), bridge waterfall — write the arithmetic out in the answer, and hand a grid that gets long to the delegated `data_junior`.
46
+ 3. **Sanity battery**: implied multiples vs. comps, ROIC vs. WACC trajectory (value creation claim must be defensible), revenue growth vs. market growth + share math.
47
+
48
+ ---
49
+
50
+ ## Output Format
51
+
52
+ ### Valuation Report
53
+
54
+ **Summary**: football field with concluded range and basis of value.
55
+
56
+ **DCF**: assumptions table, FCF build, TV cross-check, sensitivity grid.
57
+
58
+ **Comps/Precedents**: peer table with multiples, target metric normalization, applied range.
59
+
60
+ **Bridge**: EV-to-equity waterfall with every debt-like item itemized.
61
+
62
+ **Key Judgments**: the 3–5 assumptions that actually move the answer.
63
+
64
+ ---
65
+
66
+ ## Scripts
67
+ - [calculate.py](./scripts/calculate.py): Deterministic functions for this skill's core computations, 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 the formulas above and from [Terminal Value & Bridge Guide](./references/terminal-value-guide.md), write the calculation out in the answer, and hand anything that needs real compute to the delegated `data_junior`.
68
+
69
+ ---
70
+
71
+ ## References
72
+ - [Terminal Value & Bridge Guide](./references/terminal-value-guide.md): TV discipline and the full EV-to-equity bridge checklist.
73
+
74
+ ---
75
+
76
+ ## Related Skills
77
+ - **wacc-computation**: The discount rate input.
78
+ - **financial-analysis**: Ratio and trend work feeding normalization.
79
+ - **lbo-modeling**: LBO analysis as a valuation floor check.
80
+ - **startup-valuation**: For pre-revenue/high-growth targets instead of this skill.
@@ -0,0 +1,33 @@
1
+ # Terminal Value Discipline & the EV-to-Equity Bridge
2
+
3
+ ## Terminal Value Sanity Rules
4
+ 1. **Growth cap**: g ≤ long-run nominal GDP of the revenue-weighted geography (2–3% mature markets; higher for NGN-denominated models but then WACC must carry matching inflation — currency consistency or the model is broken).
5
+ 2. **Reinvestment consistency**: terminal year must fund its own growth: `reinvestment rate = g / ROIC`. A 3% growing terminal with zero capex above D&A implies infinite ROIC — auditors and IC committees catch this.
6
+ 3. **Convergence assumption**: competitive economics push ROIC toward WACC; sustaining ROIC ≫ WACC forever needs a moat argument in writing.
7
+ 4. **Cross-check**: implied exit EV/EBITDA = TV / terminal EBITDA. Compare to today's comps; explain any premium.
8
+ 5. **TV share of EV**: > 75% → extend the explicit period; the model is mostly assumption.
9
+
10
+ ## Normalized Terminal Year Checklist
11
+ - EBITDA margin: mid-cycle, not peak/trough.
12
+ - Capex ≈ D&A × (1 + g adjustment); capex < D&A in perpetuity is impossible.
13
+ - NWC investment scales with g.
14
+ - Tax rate: statutory long-run, not this year's ETR quirks.
15
+
16
+ ## EV-to-Equity Bridge (itemize ALL of these)
17
+ ```
18
+ Enterprise Value
19
+ − Gross debt (incl. overdrafts, current portion)
20
+ + Cash & equivalents (haircut trapped/restricted cash)
21
+ − Preferred equity, shareholder loans (terms decide debt vs equity)
22
+ − Minority interest (at fair value if material, not book)
23
+ + Associates/JVs and non-core investments (at fair value)
24
+ − Pension/gratuity deficit (net of tax)
25
+ − Lease liabilities (IF the multiple/FCF was pre-IFRS-16 consistent — match numerator and denominator!)
26
+ − Provisions that are debt-like (decommissioning/ARO funded portion, litigation reserves)
27
+ − Earnouts/contingent consideration payable
28
+ ± FX: bridge items at the same date and rate as EV
29
+ = Equity value → per share: dilute for options/warrants (treasury stock method)
30
+ ```
31
+
32
+ ## The IFRS 16 Trap
33
+ EV/EBITDA post-IFRS-16 (EBITDA excludes rent) vs. pre-IFRS-16 comps (EBITDA includes rent) differ systematically. Pick one convention, restate everything to it, and treat lease liabilities consistently in the bridge. Mixed conventions are the most common comps error since 2019.
@@ -0,0 +1,21 @@
1
+ # Worked Example - corporate-consolidation
2
+
3
+ ## Ask
4
+
5
+ > Parent Co owns 80% of Sub Co. Parent sold $100k of goods to Sub, which are still in Sub's inventory. How do we handle this in consolidation?
6
+
7
+ ## What a correct response contains
8
+
9
+ Should identify this as an intercompany transaction with unrealized profit. Should eliminate the intercompany Sales/COGS ($100k). Should eliminate the unrealized profit from Inventory and COGS. Should calculate the NCI (20%). Should provide a Consolidated Financial Package.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/acquisition.csv`:
14
+
15
+ > Using the attached acquisition data (evals/files/acquisition.csv), compute goodwill under BOTH the full (fair value NCI) and partial (proportionate NCI) methods, NCI at acquisition under each, and NCI's share of year-1 profit after the unrealized-profit adjustment.
16
+
17
+ Expected: Full goodwill $2,300,000; partial goodwill $2,000,000; NCI at acquisition $1,800,000 (full) / $1,500,000 (partial); NCI profit share $190,000.
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,84 @@
1
+ ---
2
+ name: corporate-consolidation
3
+ description: When the user wants to consolidate the financial results of multiple legal entities into a single set of statements. Also use when the user mentions "intercompany eliminations," "minority interest," "NCI calculation," "equity method," "business combinations," or "IFRS 10 / ASC 810."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Corporate Consolidation
9
+
10
+ You are a Group Controller. Your goal is to combine the financial results of a parent company and its subsidiaries as if they were a single economic entity.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Ownership Structure**
15
+ - Which entities are controlled (>50% ownership)?
16
+ - Which entities use the Equity Method (20-50% ownership)?
17
+ - Are there Non-Controlling Interests (NCI)?
18
+
19
+ 2. **Intercompany Transactions**
20
+ - Are there intercompany sales, loans, or management fees?
21
+ - Is there "unrealized profit" in inventory (e.g., Parent sold to Sub but Sub hasn't sold to an external party)?
22
+
23
+ 3. **Currency Conversion**
24
+ - Do subsidiaries use a different functional currency?
25
+
26
+ ---
27
+
28
+ ## Consolidation Framework
29
+
30
+ ### Priority Order
31
+ 1. **Standardization** (Ensuring all subsidiaries use the same accounting policies).
32
+ 2. **Translation** (Converting sub-results to the Parent's reporting currency).
33
+ 3. **Aggregation** (Adding line items together).
34
+ 4. **Eliminations** (Removing intercompany balances and equity investments).
35
+ 5. **NCI Calculation** (Allocating profit and equity to minority owners).
36
+
37
+ ---
38
+
39
+ ## Technical Consolidation Steps
40
+
41
+ ### 1. Intercompany Eliminations
42
+ - **Balance Sheet**: Eliminate intercompany Receivables vs. Payables.
43
+ - **Income Statement**: Eliminate intercompany Sales vs. COGS.
44
+
45
+ ### 2. The Investment Elimination
46
+ - Debit: Subsidiary Equity accounts (Common Stock, RE).
47
+ - Credit: Parent's "Investment in Subsidiary" asset account.
48
+ - Plug: Goodwill or Bargain Purchase Gain.
49
+
50
+ ### 3. Non-Controlling Interest (NCI)
51
+ - Allocate a percentage of the subsidiary's net income and equity to external owners.
52
+
53
+ ---
54
+
55
+ ## Output Format
56
+
57
+ ### Consolidated Financial Package
58
+
59
+ **Consolidation Worksheet**
60
+ - Columns: Parent | Sub A | Sub B | Eliminations | Consolidated Total.
61
+
62
+ **Consolidated Statements**
63
+ - P&L, Balance Sheet, and Cash Flow reflecting the whole group.
64
+
65
+ **Intercompany Log**
66
+ - Detailed list of eliminated transactions for audit verification.
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
+ - [IFRS 10 Summary](./references/consolidation-standard.md): Control and consolidation rules.
77
+ - [NCI Accounting](./references/minority-interest.md): How to calculate and present NCI.
78
+
79
+ ---
80
+
81
+ ## Related Skills
82
+ - **financial-statement-prep**: Consolidation is the final step in group reporting.
83
+ - **audit-checklist**: For auditing the complex elimination entries.
84
+ - **ecl-computation**: For assessing credit risk on a consolidated basis.
@@ -0,0 +1,28 @@
1
+ # Consolidation Standards: IFRS 10 / ASC 810 Essentials
2
+
3
+ ## Control Test (IFRS 10)
4
+ Control = power over relevant activities + exposure to variable returns + ability to use power to affect returns. Consolidate ALL controlled entities; >50% voting rights is the usual but not the only path (de facto control, potential voting rights, structured entities).
5
+
6
+ ## Method Selection
7
+ | Holding/Influence | Method |
8
+ |---|---|
9
+ | Control (usually >50%) | Full consolidation |
10
+ | Joint control — joint venture | Equity method (IFRS 11) |
11
+ | Significant influence (20%–50%) | Equity method |
12
+ | < 20%, no influence | FVTPL/FVOCI financial asset |
13
+
14
+ ## Consolidation Mechanics
15
+ 1. Combine 100% of subsidiary line items (even at < 100% ownership).
16
+ 2. Eliminate parent's investment against subsidiary equity at acquisition; difference = goodwill (or bargain purchase gain).
17
+ 3. Recognize NCI (see minority-interest.md).
18
+ 4. Eliminate ALL intragroup balances, transactions, and unrealized profits (inventory, fixed assets).
19
+ 5. Align accounting policies and reporting dates (gap ≤ 3 months with adjustments).
20
+ 6. Translate foreign subs: assets/liabilities at closing rate, income at average rate, equity at historical; differences → FX translation reserve (OCI/CTA).
21
+
22
+ ## Business Combination (IFRS 3) at Acquisition
23
+ - Identifiable assets/liabilities at fair value (including intangibles not on the target's books: customer relationships, brands).
24
+ - Contingent consideration at fair value; subsequent changes through P&L (if liability-classified).
25
+ - Transaction costs expensed, NOT capitalized.
26
+
27
+ ## Loss of Control
28
+ Derecognize sub, recognize retained stake at fair value, recycle CTA, gain/loss to P&L.
@@ -0,0 +1,25 @@
1
+ # Non-Controlling Interest (NCI)
2
+
3
+ ## Measurement Choice at Acquisition (per transaction, IFRS 3)
4
+ - **Fair value method ("full goodwill")**: NCI at fair value → goodwill includes NCI's share. Required under US GAAP.
5
+ - **Proportionate method ("partial goodwill")**: NCI = NCI% × identifiable net assets at fair value → goodwill is parent's share only. IFRS option.
6
+
7
+ Worked example — Parent buys 80% for 800; identifiable net assets FV = 700; NCI fair value = 190:
8
+ - Full goodwill: (800 + 190) − 700 = **290** (NCI = 190)
9
+ - Partial goodwill: 800 − 80% × 700 = **240** (NCI = 20% × 700 = 140)
10
+
11
+ ## Subsequent Measurement
12
+ `NCI closing = NCI opening + NCI% × sub's comprehensive income − dividends paid to NCI ± NCI share of equity transactions`
13
+
14
+ Allocate losses to NCI even if it goes negative (IFRS 10).
15
+
16
+ ## Profit Attribution
17
+ P&L shows single consolidated profit, then attribution: "attributable to owners of the parent" and "attributable to NCI". NCI share is of the subsidiary's PAT adjusted for fair-value depreciation, unrealized profit eliminations where the sub is the seller (upstream), and intragroup interest.
18
+
19
+ ## Changes in Ownership Without Loss of Control
20
+ Equity transactions — no P&L gain/loss, no goodwill remeasurement. Difference between consideration and NCI adjustment goes to parent equity.
21
+
22
+ ## Common Errors
23
+ 1. Eliminating only the parent's share of intragroup profit (must eliminate 100%).
24
+ 2. Forgetting fair-value adjustment depreciation in NCI's profit share.
25
+ 3. Recording gain on buying out NCI (it's an equity transaction).
@@ -0,0 +1,21 @@
1
+ # Worked Example - credit-analysis
2
+
3
+ ## Ask
4
+
5
+ > Borrower requests a 500M term loan, 5 years. EBITDA 280M (includes a 40M one-off insurance recovery), cash taxes 45M, maintenance capex 60M, existing debt 320M with 38M annual interest, new loan interest ~12%, straight-line amortization. Assess debt service capacity.
6
+
7
+ ## What a correct response contains
8
+
9
+ Normalize EBITDA to 240M. Total debt 820M -> leverage 3.4x. Total interest ~98M, principal 100M/yr. DSCR = (240-45-60)/(98+100) = 135/198 = ~0.68x - fails. Restructure needed: smaller amount, longer tenor, or back-ended amortization.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/borrower_financials.csv`:
14
+
15
+ > Assess the borrower in the attached file (evals/files/borrower_financials.csv): compute interest coverage, net leverage, and DSCR, then measure headroom against both covenants and state which is tighter.
16
+
17
+ Expected: Interest coverage 4.0x; net leverage 3.2x vs max 4.0x (20% headroom); DSCR 1.20x vs min 1.25x (-4.0% headroom). DSCR is the binding constraint.
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,84 @@
1
+ ---
2
+ name: credit-analysis
3
+ description: When the user wants to assess a borrower's creditworthiness, debt capacity, or covenant compliance. Also use when the user mentions "credit memo," "debt service coverage," "leverage ratio," "covenant headroom," "5 Cs of credit," "credit rating," "loan underwriting," or "can they repay."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Credit Analysis
9
+
10
+ You are a Credit Analyst. Your goal is to answer one question with evidence: will this borrower service and repay its obligations through the cycle — and what protects the lender if not?
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Exposure Context**
15
+ - Facility type (term, revolver, project, trade), amount, tenor, seniority, security.
16
+ - Purpose of funds (the second C — speculative purposes change everything).
17
+
18
+ 2. **Information Set**
19
+ - ≥ 3 years financials (audited preferred; note qualifications), projections, bank statements, aging reports, existing debt schedule with covenants.
20
+
21
+ ---
22
+
23
+ ## Credit Framework
24
+
25
+ ### Quantitative Core
26
+ | Ratio | Formula | Typical Comfort (corporate) |
27
+ |---|---|---|
28
+ | Leverage | Total debt / EBITDA | < 3.0x (cyclicals lower) |
29
+ | Interest coverage | EBITDA / Interest | > 3.0x |
30
+ | DSCR | (EBITDA − cash taxes − maintenance capex) / (interest + scheduled principal) | > 1.2–1.3x |
31
+ | FCF/debt | FCF / Total debt | > 10% |
32
+ | Liquidity | (Cash + undrawn committed) / 12-mo obligations | > 1.0x |
33
+ Compute on a NORMALIZED basis (strip one-offs) and on a stressed basis.
34
+
35
+ ### Debt Capacity
36
+ `Max debt ≈ min(target leverage × normalized EBITDA, debt serviceable at stressed DSCR floor)` — the binding constraint is usually the stressed DSCR, not the leverage multiple.
37
+
38
+ ### Qualitative (the part models miss)
39
+ Management quality and track record through downturns; industry position and cyclicality; customer/supplier concentration (> 20% single name = structural risk); FX mismatch between revenue and debt currency (the classic emerging-market killer); group structure and structural subordination.
40
+
41
+ ### Security & Recovery
42
+ Collateral valuation with haircuts (real estate 20–30%, inventory 50%+, receivables by aging quality), perfection status verified (registrations!), guarantee strength (guarantor's own credit), and estimated recovery in liquidation vs. going concern.
43
+
44
+ ---
45
+
46
+ ## Technical Analysis Steps
47
+
48
+ 1. **Compute every ratio from the formula stated above** across history + projection, writing out the arithmetic; trend matters more than the level.
49
+ 2. **Stress test**: revenue −15–25%, margin −200–400 bps, rates +300 bps, FX devaluation scenario for currency-mismatched borrowers; DSCR must stay ≥ 1.0 in the moderate stress or the structure needs work (more equity, shorter tenor, cash sweep, reserves).
50
+ 3. **Covenant design/compliance**: headroom analysis (covenant level vs. projection ≥ 20–25% cushion), definitions audit (what's in "EBITDA"? addback abuse), compliance certificate recalculation — never accept the borrower's spreadsheet.
51
+
52
+ ---
53
+
54
+ ## Output Format
55
+
56
+ ### Credit Memorandum
57
+
58
+ **Recommendation**: approve/decline/structure, amount, tenor, pricing guidance, conditions precedent.
59
+
60
+ **Borrower Analysis**: business, management, industry, the 5 Cs evidence.
61
+
62
+ **Financial Analysis**: ratio table (historic/projected/stressed) with every figure traced to the formula and inputs that produced it.
63
+
64
+ **Risks & Mitigants**: ranked, each with a real mitigant (a "strong sponsor" is not a mitigant without a keepwell).
65
+
66
+ **Security & Documentation**: collateral, covenants proposed with headroom rationale.
67
+
68
+ ---
69
+
70
+ ## Scripts
71
+ - [calculate.py](./scripts/calculate.py): Deterministic functions for this skill's core computations, 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 ratio definitions as written above and in [Covenant Design Guide](./references/covenant-guide.md), show each calculation in the answer, and hand anything that needs real compute to the delegated `data_junior`.
72
+
73
+ ---
74
+
75
+ ## References
76
+ - [Covenant Design Guide](./references/covenant-guide.md): Covenant selection, definitions hygiene, and headroom setting.
77
+
78
+ ---
79
+
80
+ ## Related Skills
81
+ - **financial-analysis**: The ratio engine this skill builds on.
82
+ - **ecl-computation**: Portfolio-level expected loss on the exposure.
83
+ - **debt-restructuring**: When the answer to "can they repay" is no.
84
+ - **risk-assessment**: Enterprise risk context of the borrower.
@@ -0,0 +1,26 @@
1
+ # Covenant Design Guide
2
+
3
+ ## Covenant Taxonomy
4
+ - **Maintenance** (tested quarterly): leverage, coverage, DSCR, minimum net worth, minimum liquidity. Bank-market standard.
5
+ - **Incurrence** (tested on action): limits on additional debt, dividends/restricted payments, asset sales, liens, investments. Bond-market standard; covenant-lite loans import this style.
6
+ - **Information**: monthly/quarterly reporting, compliance certificates, budget delivery, auditor access.
7
+
8
+ ## The Big Four Financial Covenants
9
+ | Covenant | Definition Discipline |
10
+ |---|---|
11
+ | Net leverage | Cap EBITDA addbacks (run-rate synergies ≤ 10–20% of EBITDA, time-boxed); define netted cash (exclude restricted) |
12
+ | Interest coverage | Cash interest, not effective-rate accounting interest; include capitalized interest |
13
+ | DSCR | Include scheduled amortization AND mandatory prepayments; exclude voluntary |
14
+ | Minimum liquidity | Committed undrawn counts only while conditions to draw are met |
15
+
16
+ ## Headroom Setting
17
+ Set covenants off the BORROWER's base case with 20–25% EBITDA cushion at the tightest point, widening over time only with deleveraging. Headroom < 15% = expect waiver requests; > 40% = covenant is decoration. Model the cushion quarterly, not annually — seasonality breaches happen mid-year.
18
+
19
+ ## Definitions Hygiene (where deals are won/lost)
20
+ 1. "EBITDA" addbacks: exceptional items capped and itemized; pro-forma acquisitions limited to completed deals with diligence-quality numbers.
21
+ 2. "Debt": include guarantees, leases (state convention), deferred consideration, factoring with recourse.
22
+ 3. Equity cure: limit frequency (2–3 over life, not consecutive), cash must actually arrive, no over-cure gaming.
23
+ 4. FX: covenant currency and testing-date rates specified; high-volatility currencies need average-rate testing or you covenant FX noise.
24
+
25
+ ## Early Warning Stack (monitor between test dates)
26
+ Utilization creep on the revolver, aged payables stretching, management account delays, auditor change, key customer loss, covenant-adjacent metrics (e.g., 12.1x against a 12.5x cap two quarters running). A covenant breach is a LAGGING indicator — the file should show concern before the certificate does.
@@ -0,0 +1,21 @@
1
+ # Worked Example - crypto-accounting
2
+
3
+ ## Ask
4
+
5
+ > We bought 1 BTC for $50k. It dropped to $30k last month, but now it's at $60k. How do we value it on our GAAP balance sheet?
6
+
7
+ ## What a correct response contains
8
+
9
+ Should identify the GAAP impairment rule (Indefinite-lived intangible asset). Should explain that the asset must be written down to $30k and cannot be written back up to $60k. Should provide a Digital Asset Ledger Summary.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/btc_lots.csv`:
14
+
15
+ > Holdings per the attached lot file (evals/files/btc_lots.csv), reporting under US GAAP (ASU 2023-08). (a) Year-end price is $36,000/unit and prior carrying was $110,000 total: compute the fair-value remeasurement P&L. (b) Separately, if 2.5 units are sold at $70,000 with FIFO cost relief, compute the realized gain.
16
+
17
+ Expected: (a) New carrying $108,000, P&L -2,000. (b) FIFO cost basis $85,000, realized gain $90,000.
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,81 @@
1
+ ---
2
+ name: crypto-accounting
3
+ description: When the user wants to account for digital assets (Cryptocurrency, NFTs) in financial statements. Also use when the user mentions "stablecoin reconciliation," "crypto impairment," "digital asset classification," "accounting for Bitcoin," or "gas fee accounting."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Crypto-Accounting & Digital Assets
9
+
10
+ You are a Digital Asset Controller. Your goal is to apply existing accounting frameworks (like IAS 38 or ASC 350) to the unique properties of blockchain-based assets.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Asset Classification**
15
+ - **Intangible Asset**: Standard for held-for-investment (e.g., BTC, ETH).
16
+ - **Inventory**: If the company is a broker-dealer in digital assets.
17
+ - **Financial Asset**: Rare (usually reserved for assets with contractual rights to cash).
18
+
19
+ 2. **Measurement Model**
20
+ - **Cost Model**: Value at cost, test for impairment (most common under GAAP).
21
+ - **Revaluation Model**: Fair value (allowed under IFRS for active markets).
22
+
23
+ 3. **Transaction Context**
24
+ - Staking rewards, Mining income, Gas fees, Airdrops.
25
+
26
+ ---
27
+
28
+ ## Crypto Framework
29
+
30
+ ### Priority Order
31
+ 1. **Identification & Ownership** (Verifying control via private keys/custody).
32
+ 2. **Cost Basis Tracking** (FIFO or Specific ID for every transaction).
33
+ 3. **Impairment Testing** (Checking if the market price dropped below book value).
34
+ 4. **Income Recognition** (Determining the value of rewards at the moment of receipt).
35
+ 5. **Reconciliation** (Matching on-chain activity to the General Ledger).
36
+
37
+ ---
38
+
39
+ ## Technical Accounting Steps
40
+
41
+ ### 1. Impairment (GAAP Standard)
42
+ - If the price of Bitcoin drops at any point during the quarter, write down the asset to the lowest point.
43
+ - You cannot write it back up under current US GAAP (unless it's sold and repurchased).
44
+
45
+ ### 2. Gas Fee Accounting
46
+ - Generally treated as a transaction cost. Capitalize if part of an acquisition; expense if for a transfer.
47
+
48
+ ---
49
+
50
+ ## Output Format
51
+
52
+ ### Digital Asset Ledger Summary
53
+
54
+ **Inventory Table**
55
+ - Asset | Quantity | Cost Basis | Current FMV | Carrying Value.
56
+
57
+ **Activity Log**
58
+ - Staking Income recognized.
59
+ - Realized Gains/Losses from disposals.
60
+ - Impairment charges taken.
61
+
62
+ **Wallet Reconciliation**
63
+ - Discrepancy report between wallet balance and GL balance.
64
+
65
+ ---
66
+
67
+ ## Scripts
68
+ - [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.
69
+
70
+ ---
71
+
72
+ ## References
73
+ - [IFRS Digital Asset Guide](./references/ifrs-crypto.md): Intangible vs Inventory.
74
+ - [FASB Crypto Update](./references/fasb-crypto.md): New rules on fair value reporting.
75
+
76
+ ---
77
+
78
+ ## Related Skills
79
+ - **ai-anomaly-detection**: To detect unusual wallet activity.
80
+ - **automated-reconciliation**: For matching on-chain data to the ledger.
81
+ - **financial-statement-prep**: For accurately reporting the "Digital Assets" line item.