@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,93 @@
1
+ ---
2
+ name: tax-planning
3
+ description: When the user wants to optimize tax liability or ensure tax compliance. Also use when the user mentions "tax strategy," "lowering taxes," "tax credits," "deductions," "filing prep," "corporate tax," "VAT audit," or "capital gains planning." Use this for both individual and corporate tax.
4
+ metadata:
5
+ version: 1.1.0
6
+ ---
7
+
8
+ # Tax Planning
9
+
10
+ You are a Tax Strategist. Your goal is to maximize after-tax wealth by leveraging legal tax credits, deductions, and structural optimizations while ensuring full compliance.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Tax Jurisdiction**
15
+ - Which country and local region?
16
+ - Is there a tax treaty involved (for international entities)?
17
+
18
+ 2. **Entity Type**
19
+ - Individual, Sole Proprietorship, LLC, S-Corp, or C-Corp?
20
+ - What is the estimated annual income?
21
+
22
+ 3. **Existing Documentation**
23
+ - Previous year's tax returns.
24
+ - Current year's income/expense logs.
25
+
26
+ ---
27
+
28
+ ## Tax Optimization Framework
29
+
30
+ ### Compliance Limitation
31
+
32
+ **AI cannot file tax returns.**
33
+ This skill is for strategy and automation of calculations. All final tax filings must be prepared or reviewed by a qualified CPA or tax attorney.
34
+
35
+ ### Priority Order
36
+ 1. **Compliance Verification** (Ensuring all basic filings are up to date).
37
+ 2. **Deduction Identification** (Expensing all eligible business costs).
38
+ 3. **Credit Analysis** (Finding dollar-for-dollar tax reductions like R&D credits).
39
+ 4. **Structural Optimization** (Is the entity type the most tax-efficient?).
40
+ 5. **Deferral Strategies** (Timing income and expenses to lower current liability).
41
+
42
+ ---
43
+
44
+ ## Technical Tax Steps
45
+
46
+ ### 1. Categorization Audit
47
+ - Review expense logs to ensure all deductible items are captured (Travel, Meals, Equipment).
48
+ - Identify Section 179 depreciation opportunities for capital assets.
49
+
50
+ ### 2. Credit Screening
51
+ - Screen for industry-specific credits (Energy, R&D, Opportunity Zones).
52
+
53
+ ### 3. Deferral Modeling
54
+ - Compare the impact of contributing to deferred tax accounts (401k, SEP IRA) vs. taxable accounts.
55
+
56
+ ---
57
+
58
+ ## Output Format
59
+
60
+ ### Tax Strategy Report Structure
61
+
62
+ **Executive Summary**
63
+ - Estimated Baseline Liability.
64
+ - Potential Optimized Liability.
65
+ - Total Estimated Savings.
66
+
67
+ **Strategy Details**
68
+ - **Deductions**: List of additional eligible expenses found.
69
+ - **Credits**: Specific tax credits for which the entity qualifies.
70
+ - **Structural**: Recommendations for entity type or income timing changes.
71
+
72
+ **Action Plan**
73
+ 1. Immediate record-keeping improvements.
74
+ 2. Timing-specific actions (e.g., "Purchase equipment before Dec 31").
75
+ 3. Items for CPA review.
76
+
77
+ ---
78
+
79
+ ## Scripts
80
+ - [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.
81
+
82
+ ---
83
+
84
+ ## References
85
+ - [IRS / Local Tax Codes](./references/tax-code-lookup.md): Direct links to source regulations.
86
+ - [Deduction Cheat Sheet](./references/common-deductions.md): List of standard eligible expenses.
87
+
88
+ ---
89
+
90
+ ## Related Skills
91
+ - **financial-analysis**: To audit the income data used for tax planning.
92
+ - **budget-forecast**: To project future tax liabilities.
93
+ - **audit-checklist**: To ensure tax-related internal controls are sound.
@@ -0,0 +1,28 @@
1
+ # Common Deductions: Business Expense Guide
2
+
3
+ A checklist of standard eligible expenses that can lower a business's taxable income.
4
+
5
+ ## 🏛️ Standard Categories
6
+
7
+ ### 1. Operations
8
+ - **Rent/Lease**: Office space or equipment rentals.
9
+ - **Utilities**: Electricity, water, internet, and phone.
10
+ - **Supplies**: Office consumables, software subscriptions (SaaS).
11
+
12
+ ### 2. Marketing & Travel
13
+ - **Advertising**: Online ads, agency fees, print materials.
14
+ - **Travel**: 100% of transport; percentage of meals (varies by year/jurisdiction).
15
+
16
+ ### 3. Personnel
17
+ - **Salaries**: W-2 wages and employer-side payroll taxes.
18
+ - **Benefits**: Health insurance premiums, retirement contributions.
19
+
20
+ ---
21
+
22
+ ## 🔍 Special Deductions
23
+ - **Section 179 (US)**: Immediate expensing of the full purchase price of qualifying equipment.
24
+ - **R&D Credits**: Dollar-for-dollar tax reductions for innovative activities.
25
+
26
+ ## 🔗 Sources
27
+ - [IRS: Deducting Business Expenses](https://www.irs.gov/businesses/small-businesses-self-employed/deducting-business-expenses)
28
+ - [HMRC: Expenses if you're self-employed](https://www.gov.uk/expenses-if-youre-self-employed)
@@ -0,0 +1,25 @@
1
+ # Tax Code Lookup: Global Sources
2
+
3
+ Directories and portals for accessing the most up-to-date tax laws and regulations.
4
+
5
+ ## 🏛️ Major Portals
6
+
7
+ ### United States
8
+ - **IRS (Internal Revenue Service)**: [Official Website](https://www.irs.gov/). Use the "Search" function for specific Publication numbers (e.g., Pub 535 for Business Expenses).
9
+
10
+ ### South Africa
11
+ - **SARS (South African Revenue Service)**: [Official Website](https://www.sars.gov.za/). Key link: [Legal Counsel / Primary Legislation](https://www.sars.gov.za/legal-counsel/primary-legislation/).
12
+
13
+ ### United Kingdom
14
+ - **HMRC (HM Revenue & Customs)**: [Official Manuals](https://www.gov.uk/government/organisations/hm-revenue-customs/about/publications).
15
+
16
+ ---
17
+
18
+ ## 🔍 Best Practices for Searching
19
+ 1. **Check the Year**: Tax laws change annually. Ensure you are looking at the code for the correct filing year.
20
+ 2. **Verify Status**: Ensure a regulation is "In Effect" and hasn't been repealed or superseded.
21
+ 3. **Jurisdiction Check**: Confirm if state/provincial laws override or supplement federal laws.
22
+
23
+ ## 🔗 Sources
24
+ - [OECD: Tax Database](https://www.oecd.org/tax/tax-policy/tax-database/)
25
+ - [IBFD: International Bureau of Fiscal Documentation](https://www.ibfd.org/)
@@ -0,0 +1,21 @@
1
+ # Worked Example - three-statement-modeling
2
+
3
+ ## Ask
4
+
5
+ > Build a simple 3-year integrated model: revenue 1,000 growing 10%, EBITDA margin 25%, D&A 50/yr (capex 60/yr), tax 30%, DSO 45, DPO 30, DIO 0, opening cash 100, no debt, no dividends. Show the three statements and prove the balance sheet balances.
6
+
7
+ ## What a correct response contains
8
+
9
+ A coded model producing IS (NI year 1 = (250-50)x0.7 = 140), WC schedule from days, CFS deriving cash, BS with explicit balance check = 0 all years.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/model_inputs.xlsx`:
14
+
15
+ > Project one year of the linked three-statement model from the attached workbook (evals/files/model_inputs.xlsx): income statement down to net income, cash rollforward, PP&E rollforward, and PROVE the balance sheet balances (assets = liabilities + equity).
16
+
17
+ Expected: Revenue 110.0; net income 13.16; closing cash 26.80; PP&E 81.10; equity 67.90; balance check passes.
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: three-statement-modeling
3
+ description: When the user wants to build an integrated financial model linking income statement, balance sheet, and cash flow. Also use when the user mentions "3-statement model," "integrated model," "balance sheet doesn't balance," "circular reference," "revolver plug," "model drivers," or "financial projections."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Three-Statement Modeling
9
+
10
+ You are a Financial Modeler. Your goal is to build (or debug) an integrated model where the three statements link correctly, the balance sheet balances by construction, and every output traces to a labeled driver.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Purpose & Horizon**
15
+ - Budgeting, valuation feed (company-valuation), debt capacity (credit-analysis), or scenario planning — purpose sets granularity.
16
+ - Monthly (operational, ≤ 24 months) vs. annual (strategic, 5+ years).
17
+
18
+ 2. **Starting Point**
19
+ - Historical statements (≥ 3 years) for ratio calibration; opening balance sheet that actually balances.
20
+
21
+ ---
22
+
23
+ ## Modeling Framework
24
+
25
+ ### Build Order (always)
26
+ 1. **Drivers & assumptions sheet** — every assumption in ONE place, labeled, with historical context alongside.
27
+ 2. **Income statement**: revenue build (price × volume / cohort / segment — never "grow 10%" without basis) → costs (variable as % of revenue, fixed as schedules, stepped where real) → EBITDA → D&A from the asset schedule → interest from the debt schedule → tax → NI.
28
+ 3. **Supporting schedules**: PP&E rollforward (capex, depreciation), working capital (DSO/DIO/DPO days driving AR/inventory/AP), debt schedule (draws, amortization, interest), equity rollforward (NI, dividends, issues).
29
+ 4. **Balance sheet**: every line driven by a schedule — nothing hardcoded.
30
+ 5. **Cash flow statement**: indirect method derived ENTIRELY from IS + BS deltas. Cash from the CFS feeds the BS cash line.
31
+
32
+ ### The Linkages That Make It "Integrated"
33
+ - NI → retained earnings AND CFS top line.
34
+ - D&A: IS expense ↔ PP&E schedule ↔ CFS addback.
35
+ - ΔWC: BS deltas → CFS operating section.
36
+ - Capex: CFS investing ↔ PP&E schedule.
37
+ - Debt draws/repayments: CFS financing ↔ debt schedule ↔ interest on IS.
38
+ - Dividends: equity schedule ↔ CFS financing.
39
+
40
+ ### The Revolver Plug (cash sweep logic)
41
+ `If cash before revolver < minimum cash → draw the shortfall; if excess cash and revolver balance > 0 → repay.` This makes the BS balance by construction and creates the interest↔cash circularity: resolve with opening-balance interest convention (preferred — stable, auditable) or iterative calculation (document it).
42
+
43
+ ### Balance Check Discipline
44
+ `Assets − Liabilities − Equity = 0` displayed on every period, every sheet, conditionally flagged. A model without a visible balance check is untrustworthy by default.
45
+
46
+ ---
47
+
48
+ ## Technical Analysis Steps
49
+
50
+ 1. **Build in the fixed order** (one driver block, then statements, then checks): drivers → statements → checks, with the balance check shown for every period. Nothing here assumes a shell or a spreadsheet engine — write the linkage out, and hand a model long enough to need real compute to the delegated `data_junior`.
51
+ 2. **Calibrate**: projected ratios (margins, days, capex/revenue) vs. 3-year history — every divergence from history needs a stated reason.
52
+ 3. **Stress the plumbing**: zero out revenue growth, spike capex — does the revolver respond, does the BS still balance, does interest update?
53
+
54
+ ---
55
+
56
+ ## Output Format
57
+
58
+ ### Model Package
59
+
60
+ **Assumptions Summary**: driver table with historical vs. projected.
61
+
62
+ **Statements**: IS, BS, CFS with balance check row.
63
+
64
+ **Schedules**: PP&E, WC, debt, equity rollforwards.
65
+
66
+ **Diagnostics**: balance check status, revolver utilization, key ratio trajectory, circularity convention stated.
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: build the linkage line by line from the checks in [Model Integrity Checklist](./references/model-checks.md), show the arithmetic in the answer, and hand anything that needs real compute to the delegated `data_junior`.
72
+
73
+ ---
74
+
75
+ ## References
76
+ - [Model Integrity Checklist](./references/model-checks.md): The full debugging sequence for a model that doesn't balance.
77
+
78
+ ---
79
+
80
+ ## Related Skills
81
+ - **company-valuation**: The DCF consumes this model's FCF.
82
+ - **budget-forecast**: Driver logic for the projections.
83
+ - **credit-analysis**: Covenant and DSCR outputs from the debt schedule.
84
+ - **working-capital-analysis**: The days assumptions driving the WC schedule.
@@ -0,0 +1,32 @@
1
+ # Model Integrity Checklist
2
+
3
+ ## When the Balance Sheet Doesn't Balance — Debug Sequence
4
+ Work in this order; stop when the imbalance first appears.
5
+ 1. **Find the first broken period.** The error is THERE, not where it's biggest (imbalances compound).
6
+ 2. **Opening balance sheet**: does period 0 balance? If not, nothing downstream can.
7
+ 3. **Retained earnings**: RE_close = RE_open + NI − dividends. The #1 culprit — check NI links to the right period and dividends aren't double-counted.
8
+ 4. **Cash**: BS cash must equal CFS ending cash. If CFS is "correct" but BS differs, a BS line moved without a CFS counterpart.
9
+ 5. **Delta audit**: for every BS line, ΔBS must appear somewhere in the CFS (or be a documented non-cash move). Build a delta-vs-CFS mapping table — this finds the missing item mechanically.
10
+ 6. **Non-cash traps**: PIK interest (IS expense, no cash, adds to debt), unrealized FX on monetary items, asset writeoffs/impairments, capitalized interest, leases commencing (ROU + liability appear with no cash), revaluations (OCI, not CFS).
11
+ 7. **Sign conventions**: the eternal ΔWC sign error — AR increase CONSUMES cash (negative in CFS).
12
+
13
+ ## Circularity Management
14
+ Interest → cash → revolver → interest. Options:
15
+ - **Opening balance convention**: interest on opening debt/cash balances. Slight inaccuracy, total stability. Recommended default.
16
+ - **Average balance + iteration**: more precise; in Excel requires iterative calc (risk: silent convergence failures); in Python, loop until |Δinterest| < tolerance.
17
+ - Never mix conventions across tranches.
18
+
19
+ ## Hardcode Hygiene
20
+ - Inputs only on the assumptions sheet.
21
+ - No constants inside formulas.
22
+ - Color convention if spreadsheet-based.
23
+ - One driver block: every statement derives from it, nothing re-typed per schedule.
24
+
25
+ ## Pre-Delivery Test Battery
26
+ 1. Balance check = 0 every period.
27
+ 2. CFS ending cash = BS cash every period.
28
+ 3. Zero-growth test: flat revenue → margins should stay flat; if they drift, a cost is mislinked.
29
+ 4. Revolver test: force a cash shortfall → revolver draws; force surplus → repays to zero before cash builds.
30
+ 5. Depreciation exhaustion: assets never depreciate below zero/residual.
31
+ 6. Ratio reasonableness vs. history: margins, days, capex/revenue, leverage.
32
+ 7. Stress symmetry: +10% and −10% revenue should produce roughly mirrored (not wildly asymmetric) outcomes unless steps/breakpoints explain it.
@@ -0,0 +1,21 @@
1
+ # Worked Example - treasury-management
2
+
3
+ ## Ask
4
+
5
+ > We have $5M in cash but $2M is in Euros and the Euro is dropping. We also have a $1M payroll next week. What should we do?
6
+
7
+ ## What a correct response contains
8
+
9
+ Should identify the immediate liquidity need (payroll) and the FX risk (Euro dropping). Should suggest a cash positioning review and potential FX hedging or conversion. Should provide a structured Treasury Report with a cash flow forecast and risk management recommendations.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/treasury_position.csv`:
14
+
15
+ > From the attached treasury position (evals/files/treasury_position.csv): compute liquidity runway in days, the 6-month NGN/USD forward rate under covered interest parity, and the NGN cost of hedging the $1,000,000 payable forward versus at spot.
16
+
17
+ Expected: Runway 80 days; 6m forward 1,624.39 NGN/USD; hedged cost NGN 1,624,390,244 vs spot 1,500,000,000 - forward premium 8.3%.
18
+
19
+ ## Compute, don't estimate
20
+
21
+ All figures above come from [`scripts/calculate.py`](./scripts/calculate.py) - import its functions rather than doing arithmetic in prose.
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: treasury-management
3
+ description: When the user wants to manage corporate liquidity, investments, or financial risks like FX and interest rates. Also use when the user mentions "cash positioning," "foreign exchange risk," "interest rate hedging," "corporate investment policy," "liquidity planning," or "managing bank relationships."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Treasury Management
9
+
10
+ You are a Corporate Treasurer. Your goal is to ensure the company has enough liquidity to meet its obligations while optimizing the return on excess cash and mitigating financial risks.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Liquidity Context**
15
+ - What is the current cash balance across all entities/accounts?
16
+ - What are the upcoming major cash outflows (Payroll, Debt repayment, CapEx)?
17
+
18
+ 2. **Risk Exposure**
19
+ - Does the company operate in multiple currencies (FX risk)?
20
+ - Does the company have floating-rate debt (Interest rate risk)?
21
+
22
+ 3. **Investment Constraints**
23
+ - What is the company's "Investment Policy Statement" (IPS)? (e.g., Only AAA-rated short-term bonds).
24
+
25
+ ---
26
+
27
+ ## Treasury Framework
28
+
29
+ ### Priority Order
30
+ 1. **Cash Positioning** (Knowing exactly where the money is).
31
+ 2. **Liquidity Forecasting** (Predicting future cash needs).
32
+ 3. **Risk Mitigation** (Hedging FX and interest rate exposure).
33
+ 4. **Yield Optimization** (Investing excess cash within policy limits).
34
+
35
+ ---
36
+
37
+ ## Technical Treasury Steps
38
+
39
+ ### 1. Cash Ladder Construction
40
+ - Map out cash inflows and outflows by day/week/month to identify potential "dry spells."
41
+
42
+ ### 2. FX Exposure Analysis
43
+ - Calculate the "Value at Risk" (VaR) for foreign currency holdings.
44
+ - Recommend Forward contracts or Options to lock in exchange rates.
45
+
46
+ ### 3. Investment Sweep
47
+ - Identify balances sitting in non-interest-bearing accounts that could be moved to money market funds or overnight sweeps.
48
+
49
+ ---
50
+
51
+ ## Output Format
52
+
53
+ ### Treasury Report Structure
54
+
55
+ **Executive Summary**
56
+ - Total Liquidity Position.
57
+ - Net FX Exposure by Currency.
58
+
59
+ **Cash Flow Forecast**
60
+ - 13-week rolling cash forecast table.
61
+ - Identification of "funding gaps."
62
+
63
+ **Risk Management**
64
+ - Recommended hedging actions.
65
+ - Compliance check against Investment Policy.
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
+ - [FX Hedging Basics](./references/fx-hedging.md): Tools and strategies.
76
+ - [Liquidity Ratios](./references/liquidity-metrics.md): Focus on Cash Ratio and Burn Rate.
77
+
78
+ ---
79
+
80
+ ## Related Skills
81
+ - **risk-assessment**: For deeper dive into market volatility impacts.
82
+ - **financial-analysis**: For auditing the source of cash from operations.
83
+ - **budget-forecast**: For aligning the treasury plan with the master budget.
@@ -0,0 +1,27 @@
1
+ # FX Hedging for Treasury
2
+
3
+ ## Exposure Taxonomy
4
+ - **Transaction**: booked receivables/payables in foreign currency — hedge mechanically.
5
+ - **Forecast**: probable future revenues/costs — hedge a declining ratio (e.g., 80% next quarter, 50% out 12 months).
6
+ - **Translation**: net investment in foreign subsidiaries — usually NOT hedged with cash instruments unless covenant/ratio-driven.
7
+ - **Economic/competitive**: pricing-power erosion — managed structurally (sourcing, pricing), not with derivatives.
8
+
9
+ ## Instrument Selection
10
+ | Instrument | Use | Cost Profile |
11
+ |---|---|---|
12
+ | Forward/NDF | Firm exposures, illiquid currencies (NDF for NGN, partial convertibility) | Zero premium; locks rate (forward points = carry) |
13
+ | Vanilla option | Uncertain exposures (bids, forecasts) | Premium; keeps upside |
14
+ | Collar | Premium reduction | Caps both directions |
15
+ | Cross-currency swap | Debt in foreign currency | Converts principal + coupons |
16
+ | Natural hedge | Match currency of revenue and cost/debt | Free — exhaust first |
17
+
18
+ ## High-Carry Currency Reality (NGN and peers)
19
+ Forward points on high-interest-differential currencies make systematic forward hedging expensive (you pay the carry). Alternatives: increase natural hedging, hold hard-currency buffers, hedge selectively around known events, use options when implied vol is cheap relative to realized.
20
+
21
+ ## Hedge Accounting (IFRS 9)
22
+ - Cash flow hedge: effective portion → OCI, recycle when hedged item hits P&L. Documentation at inception: risk, instrument, hedged item, effectiveness method (1:1 critical terms or regression).
23
+ - Forward points/option time value: may be treated as cost of hedging (OCI amortization) — reduces P&L noise.
24
+ - Without hedge accounting, MTM volatility lands in P&L — decide deliberately.
25
+
26
+ ## Policy Skeleton
27
+ Hedge ratios by horizon, approved instruments (no written naked options), counterparty limits by rating, mandatory competitive quotes (≥ 2), monthly effectiveness and exposure reporting to treasury committee.
@@ -0,0 +1,24 @@
1
+ # Liquidity Metrics and Cash Management
2
+
3
+ ## Core Metrics
4
+ - **Daily cash position** = Σ available balances (by currency, by bank) + committed undrawn facilities − same-day obligations.
5
+ - **Cash conversion cycle (CCC)** = DSO + DIO − DPO. Shorter = less funding needed. Track quarterly by business unit.
6
+ - DSO = AR / Revenue × days; DIO = Inventory / COGS × days; DPO = AP / COGS × days.
7
+ - **Minimum liquidity threshold**: ≥ (1 month opex + debt service + a stress buffer); board-approved, never breached silently.
8
+ - **Liquidity headroom** = unrestricted cash + undrawn committed facilities − minimum threshold.
9
+
10
+ ## Forecasting Discipline
11
+ - **13-week rolling forecast** (weekly buckets): receipts from AR aging × collection curve; disbursements from AP, payroll calendar, tax calendar, debt service, capex schedule.
12
+ - Direct method for 13 weeks; indirect (P&L-derived) for 12 months.
13
+ - Variance discipline: weekly actual-vs-forecast, investigate > 10% line variances; rolling re-forecast every week, not month.
14
+
15
+ ## Concentration & Structure
16
+ - Cash pooling: physical sweep vs. notional; watch intercompany loan creation (transfer pricing + thin cap + CBN approvals for cross-border).
17
+ - Counterparty limits: max % of cash per bank, by rating tier; government securities ladder for excess.
18
+ - Trapped cash map: balances by jurisdiction with repatriation constraints (FX controls, dividend capacity) — Nigeria: CBN documentation requirements make this a real planning item.
19
+
20
+ ## Stress Testing
21
+ Run quarterly: top customer non-payment (30/60/90-day), 20% FX devaluation, revolver unavailable, 1-month revenue stop. Headroom must survive the combined moderate scenario; document management actions per trigger.
22
+
23
+ ## Early-Warning Indicators
24
+ DSO creep > 5 days vs. trailing year; payee-initiated payment-term renegotiations; utilization of revolver for payroll (red line); supplier prepayment demands.
@@ -0,0 +1,21 @@
1
+ # Worked Example - variance-analysis
2
+
3
+ ## Ask
4
+
5
+ > We expected to use 1,000 lbs of steel at $5/lb. We actually used 1,100 lbs at $4.50/lb. Calculate the variances.
6
+
7
+ ## What a correct response contains
8
+
9
+ Should calculate Material Price Variance ($0.50 favorable * 1,100 lbs = $550 F). Should calculate Material Usage Variance (100 lbs unfavorable * $5 = $500 U). Should provide a Production Variance Report.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/production_data.xlsx`:
14
+
15
+ > Compute material price, material usage, labor rate, and labor efficiency variances from the attached production workbook (evals/files/production_data.xlsx). Label each favourable/adverse and explain the most material driver.
16
+
17
+ Expected: MPV -25,500 (adverse), MUV -30,000, LRV -15,620 (adverse), LEV 20,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,78 @@
1
+ ---
2
+ name: variance-analysis
3
+ description: When the user wants to analyze the difference between actual and standard costs in manufacturing. Also use when the user mentions "material price variance," "labor efficiency," "overhead variance," "standard costing," or "production audit."
4
+ metadata:
5
+ version: 1.0.0
6
+ ---
7
+
8
+ # Standard Cost Variance Analysis
9
+
10
+ You are a Plant Controller. Your goal is to identify exactly *why* actual production costs differed from the budget—whether due to price, volume, or efficiency.
11
+
12
+ ## Initial Assessment
13
+
14
+ 1. **Standard Inputs**
15
+ - Standard Price ($P_s$) and Standard Quantity ($Q_s$) per unit.
16
+ - Standard Labor Rate ($R_s$) and Standard Hours ($H_s$) per unit.
17
+
18
+ 2. **Actual Results**
19
+ - Actual Price ($P_a$) and Actual Quantity used ($Q_a$).
20
+ - Actual Labor Rate ($R_a$) and Actual Hours worked ($H_a$).
21
+
22
+ ---
23
+
24
+ ## Variance Framework
25
+
26
+ ### Material Variances
27
+ 1. **Price Variance**: `(Standard Price - Actual Price) * Actual Quantity`.
28
+ 2. **Usage Variance**: `(Standard Quantity - Actual Quantity) * Standard Price`.
29
+
30
+ ### Labor Variances
31
+ 1. **Rate Variance**: `(Standard Rate - Actual Rate) * Actual Hours`.
32
+ 2. **Efficiency Variance**: `(Standard Hours - Actual Hours) * Standard Rate`.
33
+
34
+ ---
35
+
36
+ ## Technical Analysis Steps
37
+
38
+ ### 1. Root Cause Identification
39
+ - Was the **Price Variance** due to a bad purchasing deal or a market spike?
40
+ - Was the **Efficiency Variance** due to machine downtime or poor training?
41
+
42
+ ### 2. Overhead Variance
43
+ - Fixed Overhead Spending Variance.
44
+ - Fixed Overhead Volume Variance (Over/Under absorption).
45
+
46
+ ---
47
+
48
+ ## Output Format
49
+
50
+ ### Production Variance Report
51
+
52
+ **Summary Dashboard**
53
+ - **Total Variance**: $X (Favorable/Unfavorable).
54
+ - **Primary Driver**: (e.g., "70% of variance driven by material price").
55
+
56
+ **Variance Table**
57
+ - Material Price | Material Usage | Labor Rate | Labor Efficiency | Overhead.
58
+
59
+ **Corrective Actions**
60
+ - Recommended fixes for unfavorable variances (e.g., "Retrain shift B," "Search for new copper supplier").
61
+
62
+ ---
63
+
64
+ ## Scripts
65
+ - [calculate.py](./scripts/calculate.py): Material, labor, and overhead variance functions. Run with `python3 scripts/calculate.py` to self-test; import the functions for actual computations.
66
+
67
+ ---
68
+
69
+ ## References
70
+ - [Variance Formulas](./references/variance-math.md): Quick look-up for all manufacturing variances.
71
+ - [Absorption vs. Variable Costing](./references/overhead-logic.md): Understanding fixed overhead.
72
+
73
+ ---
74
+
75
+ ## Related Skills
76
+ - **product-profitability**: To see how variances impact SKU-level margins.
77
+ - **budget-forecast**: For setting the "Standard Costs" for the next period.
78
+ - **audit-checklist**: For auditing the accuracy of production reporting.
@@ -0,0 +1,24 @@
1
+ # Overhead Variance Logic: Absorption vs. Variable Costing
2
+
3
+ ## The Four-Way Overhead Variance Split
4
+ **Variable overhead:**
5
+ - Spending: `(Actual VOH rate − Standard rate) × Actual hours` — price of the overhead inputs.
6
+ - Efficiency: `(Actual hours − Standard hours allowed) × Standard VOH rate` — driven by the same hours as labor efficiency.
7
+
8
+ **Fixed overhead:**
9
+ - Spending (budget): `Actual FOH − Budgeted FOH` — the only "real" fixed overhead control variance.
10
+ - Volume: `Budgeted FOH − Applied FOH` where `Applied = Standard hours allowed × FOH rate` — an ARTIFACT of unitizing fixed costs, not a cost control signal. Unfavorable volume variance = produced below denominator level.
11
+
12
+ ## Denominator Choice Matters
13
+ FOH rate = Budgeted FOH / denominator activity. Choosing theoretical vs. practical vs. normal vs. budgeted capacity changes the rate and the volume variance. Practical capacity (recommended, and required for some costing under ASC 330/IAS 2 logic) exposes the cost of idle capacity rather than burying it in product cost.
14
+
15
+ ## Absorption vs. Variable Costing P&L Effect
16
+ - `Absorption income − Variable income = ΔInventory units × FOH rate`
17
+ - Production > sales → absorption income HIGHER (fixed cost parked in inventory). This creates the classic overproduction incentive — producing for the warehouse to flatter margins. Watch for it in bonus-driven plants.
18
+ - IAS 2 / GAAP external reporting REQUIRES absorption; use variable costing internally for CVP and control.
19
+
20
+ ## Under/Over-Applied Overhead Disposal
21
+ Immaterial → close to COGS. Material → prorate across WIP, FG, COGS based on applied overhead in each. Abnormal idle capacity cost → expense immediately, never inventory.
22
+
23
+ ## Interpretation Discipline
24
+ Volume variance tells you about CAPACITY UTILIZATION, spending variance about COST CONTROL. Reporting them as one number invites the wrong fix.
@@ -0,0 +1,35 @@
1
+ # Manufacturing Variance Formulas
2
+
3
+ Quick-reference for calculating standard costing variances in a production environment.
4
+
5
+ ## 🏛️ Material Variances
6
+
7
+ ### Material Price Variance (MPV)
8
+ `MPV = (Standard Price - Actual Price) * Actual Quantity`
9
+ - **Favorable**: If Actual Price < Standard Price.
10
+
11
+ ### Material Usage Variance (MUV)
12
+ `MUV = (Standard Quantity - Actual Quantity) * Standard Price`
13
+ - **Favorable**: If Actual Quantity < Standard Quantity.
14
+
15
+ ---
16
+
17
+ ## 🏛️ Labor Variances
18
+
19
+ ### Labor Rate Variance (LRV)
20
+ `LRV = (Standard Rate - Actual Rate) * Actual Hours`
21
+ - **Favorable**: If Actual Rate < Standard Rate.
22
+
23
+ ### Labor Efficiency Variance (LEV)
24
+ `LEV = (Standard Hours - Actual Hours) * Standard Rate`
25
+ - **Favorable**: If Actual Hours < Standard Hours.
26
+
27
+ ---
28
+
29
+ ## 🔍 Overhead Variances
30
+ - **Variable Overhead Spending**: `(Standard Rate - Actual Rate) * Actual Hours`.
31
+ - **Variable Overhead Efficiency**: `(Standard Hours - Actual Hours) * Standard Rate`.
32
+
33
+ ## 🔗 Sources
34
+ - [CFI: Variance Analysis](https://corporatefinanceinstitute.com/resources/accounting/variance-analysis/)
35
+ - [AccountingCoach: Standard Costing](https://www.accountingcoach.com/standard-costing/explanation)
@@ -0,0 +1,21 @@
1
+ # Worked Example - venture-debt
2
+
3
+ ## Ask
4
+
5
+ > We're a Series B startup with $5M in MRR. We want to borrow $10M in venture debt to avoid dilution. What should we expect for terms?
6
+
7
+ ## What a correct response contains
8
+
9
+ Should identify that venture debt is typically 20-30% of the last equity round or linked to MRR multiples. Should discuss Warrants and Covenants (Minimum Cash/MRR). Should provide a Venture Debt Term Sheet structure.
10
+
11
+ ## File-driven variant
12
+
13
+ With fixture(s) `evals/files/term_sheet.csv`:
14
+
15
+ > Analyze the attached venture-debt term sheet (evals/files/term_sheet.csv): build the 36-month payment schedule (12 IO + 24 amortizing), total cost of debt including fees, warrant shares, and runway extension from net proceeds.
16
+
17
+ Expected: Total interest+fees $1,498,817; warrants 200,000 shares; runway extension 7.1 months; monthly payment in amortization ~$235,367.
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.