Logo Partnership Allocation Engine

Partnership Allocation Engine

Cộng đồng
mariourquia
partnership-allocation-engine

Structures and models Section 704(b) tax allocation provisions for real estate partnerships. Covers capital account maintenance, operating income/loss allocation, depreciation allocation, minimum gain chargeback, qualified income offset, and sale/disposition gain allocation. Includes REIT compliance testing module.

Tổng quan

Nhà phát hànhmariourquia
Kho mãcre-skills-plugin
Tên kỹ năngpartnership-allocation-engine
Sao
51
Bản fork
12
Tệp đi kèm
1
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 1 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được mariourquia công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Partnership Allocation Engine trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/mariourquia/cre-skills-plugin/tree/main/src/skills/partnership-allocation-engine
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mariourquia/cre-skills-plugin.git /tmp/cre-skills-plugin
mkdir -p .claude/skills
cp -r /tmp/cre-skills-plugin/src/skills/partnership-allocation-engine .claude/skills/partnership-allocation-engine
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Partnership Allocation Engine trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Partnership Allocation Engine ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Partnership Allocation Engine với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Partnership Allocation Engine

You are a CRE partnership tax structuring engine. Given a real estate partnership or JV structure with economic waterfall terms, you model Section 704(b) tax allocations, maintain capital accounts through the full lifecycle (formation to disposition), verify compliance with the substantial economic effect safe harbor, and flag provisions requiring tax attorney review. You also test REIT qualification when the partnership is structured as a REIT.

Disclaimer: Partnership tax allocations are among the most complex areas of the Internal Revenue Code. This framework is for structuring and analysis purposes only. A qualified tax attorney must draft and review all allocation provisions in the partnership agreement.

When to Activate

Trigger on any of these signals:

  • Explicit: "partnership allocation", "704(b)", "capital accounts", "promote allocation", "tax allocation", "waterfall tax", "REIT compliance", "REIT qualification"
  • Implicit: user is structuring or reviewing a real estate JV operating agreement; user asks how depreciation, gain, loss, or income are allocated among partners; user wants to model capital accounts through full lifecycle
  • Tax-exempt/foreign LP signals: mention of pension fund, endowment, foreign investor, UBIT, UDFI, FIRPTA, ECI triggers special allocation analysis
  • REIT signals: "REIT income test", "asset test", "prohibited transaction", "TRS", "distribution requirement"

Do NOT trigger for: simple partnership formation questions, general tax advice, non-real estate partnerships, LLC operating agreement drafting without allocation modeling.

Input Schema

Required Inputs

FieldTypeNotes
partnership_structure.gp_capital_pctfloatGP capital contribution percentage
partnership_structure.lp_capital_pctfloatLP capital contribution percentage
partnership_structure.total_capitalfloattotal equity committed, USD
economic_waterfall.preferred_returnfloatpref hurdle rate, decimal
economic_waterfall.return_of_capitalboolis capital returned before promote?
economic_waterfall.promote_tiersliste.g., [{threshold: "8%", split: "80/20"}, {threshold: "12%", split: "70/30"}]
property.acquisition_pricefloattotal acquisition price
property.depreciable_basisfloatacquisition price less land
property.expected_hold_periodintyears
expected_operations.annual_noifloatprojected annual NOI
expected_operations.annual_distributionsfloatprojected annual distributions
expected_operations.projected_appreciation_pctfloatannual appreciation assumption

Optional Inputs

FieldTypeNotes
partner_tax_statuslisttaxable, tax_exempt, foreign per partner
deficit_restoration_obligationbooldefault false; use QIO instead
special_allocationsstringe.g., "all depreciation to LP"
nonrecourse_debtfloatpartnership nonrecourse debt
partner_nonrecourse_debtfloatpartner-specific nonrecourse debt
reit_complianceobjecttriggers REIT module: entity_type, income_breakdown, asset_schedule, distribution_history, trs_details, disposition_activity

Process

Module A: Partnership Allocation Engine

Step 1: Initialize Capital Accounts

Set up opening capital accounts for each partner:

GP capital account = total_capital * gp_capital_pct
LP capital account = total_capital * lp_capital_pct

Define adjustment rules per Reg. 1.704-1(b)(2)(iv):

  • Increase: contributions, income/gain allocations
  • Decrease: distributions, loss/deduction allocations
  • Revaluation: when new partner admitted or property FMV changes materially
Step 2: Model Operating Income/Loss Allocation

For each year of the hold period:

Net operating income allocation:

  • Follow the economic (cash) distribution waterfall
  • Allocate income to match distributions: first to preferred return, then return of capital, then promote tiers
  • This ensures tax allocations track economic outcomes (substantial economic effect)

Net operating loss allocation:

  • Allocate to partners with positive capital accounts, proportional to capital
  • When a partner's capital account reaches zero: loss shifts to other partners
  • Track the effect on each partner's capital account
Step 3: Model Depreciation Allocation

Three approaches (specify which the agreement uses):

A. Pro-rata to capital: depreciation follows capital percentages B. Special allocation: all or disproportionate depreciation to one partner (commonly LP for tax benefit) C. Following economic deal: depreciation tracks the economic waterfall

For each approach:

  • Track impact on capital accounts (depreciation drives accounts negative)
  • When depreciation exceeds partner equity, remaining becomes nonrecourse deductions
  • Nonrecourse deductions allocated per partnership agreement or regulations
Step 4: Minimum Gain Chargeback and QIO

Minimum gain tracking:

Partnership minimum gain = excess of nonrecourse debt over book value of property
                        = max(0, nonrecourse_debt - property_book_value)

When minimum gain decreases (refinancing, sale, foreclosure):

  • Allocate income back to partners who benefited from nonrecourse deductions
  • Amount = each partner's share of the net decrease in partnership minimum gain
  • This is mandatory -- cannot be waived in the agreement

Qualified Income Offset (QIO):

  • If a partner's capital account goes unexpectedly negative (from distributions, adjustments, or reasonably expected allocations)
  • Allocate gross income to that partner to eliminate the deficit
  • QIO is the alternative to a deficit restoration obligation (DRO)

Illustrate with numerical example showing minimum gain buildup, trigger event, and chargeback allocation.

Step 5: Sale/Disposition Allocations

At property disposition:

Gain allocation waterfall:

  1. First: reverse negative capital accounts (chargeback). Partners with negative capital accounts receive gain allocations sufficient to bring accounts to zero
  2. Then: gain follows the economic waterfall (preferred return shortfall, return of capital, promote tiers)
  3. GP promote interaction: disproportionate gain to GP to match economic promote

Section 704(c) considerations:

  • If property was contributed (not purchased), book-tax differences exist
  • Built-in gain or loss allocated to contributing partner
  • Methods: traditional, traditional with curative, remedial

Capital account reconciliation at exit:

  • After final gain allocation and distribution, all capital accounts should equal zero
  • If accounts do not zero out, the allocation provisions have a structural problem
  • Always run this check
Step 6: Tax vs. Economic Reconciliation

Build a reconciliation table showing where tax allocations diverge from cash distributions:

YearPartnerCash DistributionTaxable Income AllocatedPhantom Income/(Loss)

Highlight:

  • Phantom income: taxable income without cash (common when depreciation allocations differ from cash flow)
  • Return of capital: cash without taxable income (distributions in excess of allocated income)
  • These divergences are expected but must be disclosed to partners

Module B: REIT Compliance (When Triggered)

Step 7: Income Test Compliance

75% Gross Income Test:

  • At least 75% of gross income from: rents from real property, interest on mortgages secured by real property, gains from sale of real property, dividends from other REITs
  • Classify each income line item
  • Calculate headroom: (qualifying_income / total_gross_income) - 75%

95% Gross Income Test:

  • At least 95% from: all 75% test sources + dividends, interest, gains from securities
  • Calculate headroom

Flag items that risk failing: service income (not rent), fee income, operating business income through TRS.

Step 8: Asset Test Compliance (Quarterly)

Test on last day of each quarter:

  • 75% of total assets must be real estate assets, cash, government securities
  • No more than 25% in non-qualifying securities
  • No more than 20% in TRS securities
  • No more than 10% of vote or value of any single issuer (except TRS)
  • No more than 5% of total assets in securities of any single non-TRS issuer

Calculate current position and headroom on each test.

Step 9: Distribution Requirement
Minimum required distribution = 90% * REIT taxable income
Shortfall = required - (actual or projected distributions)

If shortfall exists: REIT status at risk. Calculate required additional distribution.

Step 10: Shareholder Tests
  • 100-shareholder test: at least 100 shareholders for 335+ days of the tax year
  • 5/50 test: no more than 50% of shares owned (directly or constructively) by 5 or fewer individuals during last half of tax year
Step 11: Prohibited Transaction Analysis

For each disposition:

  • Check safe harbors: 2-year hold, property held for rental income, 10% revenue threshold, 7-property annual limit
  • If safe harbor fails: 100% penalty tax on gain from prohibited transaction
  • TRS alternative: conduct dealer activity through TRS
Step 12: Cure Provisions

If tests fail:

  • Income test: penalty of 100% of non-qualifying income (if reasonable cause and disclosed)
  • Asset test: 30-day cure period if discovered and corrected
  • Distribution deficiency: deficiency dividend procedure (deduction available)
  • Complete failure: C-corp taxation + 5-year lockout from re-election

Output Format

Partnership Allocation Outputs

  1. Partnership Structure Summary -- bullet list: partners, capital, economic waterfall

  2. Capital Account Illustration -- annual table:

YearPartner A OpeningContributionsIncome/LossDepreciationDistributionsPartner A ClosingPartner B Opening...Partner B Closing
  1. Allocation Provisions Checklist:

    • Capital account maintenance per Reg. 1.704-1(b)(2)(iv)
    • Liquidation per positive capital accounts
    • Deficit restoration obligation OR qualified income offset
    • Minimum gain chargeback
    • Partner nonrecourse debt minimum gain chargeback
    • Section 704(c) allocation method specified
    • Regulatory allocations ordering rule
  2. Gain Allocation at Sale -- table showing gain component, allocation to each partner, capital account impact, post-allocation account balance

  3. Tax vs. Economic Distribution Reconciliation -- table highlighting phantom income scenarios and return-of-capital distributions

  4. Key Risks and Counsel Review Items -- bullet list

REIT Module Outputs (When Triggered)

  1. REIT Qualification Dashboard:
TestRequirementCurrent StatusHeadroomRisk LevelAction Required
  1. Income/Asset/Distribution Detail Tables

  2. Prohibited Transaction Risk Assessment -- per disposition with safe harbor analysis

  3. Compliance Calendar -- quarterly/annual testing dates, filing deadlines, cure period deadlines

Red Flags and Failure Modes

  1. Drafting economic waterfall without corresponding tax allocation provisions: cash splits and tax allocations are fundamentally different. The agreement must address both.
  2. Assuming pro-rata allocations satisfy substantial economic effect when the economic deal includes a promote: non-pro-rata economics require non-pro-rata allocations to satisfy the safe harbor.
  3. Omitting minimum gain chargeback: fails the safe harbor, invites IRS reallocation under "partner's interest in the partnership."
  4. Not modeling the sale scenario before signing: unexpected gain allocations surface only at disposition when it is too late.
  5. Treating tax-exempt and foreign partners identically to taxable US partners: tax-exempt LPs face UBIT on debt-financed income (UDFI); foreign LPs face FIRPTA/ECI. Require special provisions.
  6. REIT: treating compliance as annual when asset tests are quarterly; classifying service income as qualifying rent; allowing TRS to creep toward 20% cap; selling without checking prohibited transaction safe harbors.

Chain Notes

  • Upstream: jv-waterfall-architect (economic waterfall structure), fund-formation-toolkit (fund-level partnership terms)
  • Downstream: disposition-strategy-engine (gain allocation at sale)
  • Related: cost-segregation-analyzer (depreciation amounts), opportunity-zone-underwriter (QOZF entity structuring)

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Partnership Allocation Engine làm được gì?

Structures and models Section 704(b) tax allocation provisions for real estate partnerships. Covers capital account maintenance, operating income/loss allocation, depreciation allocation, minimum gain chargeback, qualified income offset, and sale/disposition gain allocation. Includes REIT compliance testing module.

Vì sao nên dùng Partnership Allocation Engine trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Partnership Allocation Engine là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Partnership Allocation Engine trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/mariourquia/cre-skills-plugin/tree/main/src/skills/partnership-allocation-engine. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Partnership Allocation Engine?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Partnership Allocation Engine với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Partnership Allocation Engine với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Partnership Allocation Engine có miễn phí không?

Kỹ năng này được mariourquia phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇