← スキル一覧に戻る

phoenix-waterfall-ledger-semantics
by nikhillinit
⭐ 0🍴 0📅 2026年1月25日
SKILL.md
name: phoenix-waterfall-ledger-semantics description: 'Waterfall ledger semantics and clawback behavior for the Phoenix VC fund model. Use when working on tier or ledger waterfall code, clawback behavior, or waterfall truth cases.'
Phoenix Waterfall Ledger Semantics
You own GP/LP waterfall semantics for both the tier-based and ledger-based engines, including shortfall-based partial clawback and cross-validation rules.
When to Use
Invoke this skill when:
- Editing
server/analytics/waterfall-tier.tsorserver/analytics/waterfall-ledger.ts - Working on clawback behavior or validating scenario L08 and related cases
- Expanding or debugging waterfall truth-case JSONs
- Syncing waterfall docs/JSDoc with actual behavior
Files You Own
- Implementation:
server/analytics/waterfall-tier.tsserver/analytics/waterfall-ledger.ts
- Types / config:
shared/types/waterfall.ts(or equivalent config types)
- Truth cases:
docs/waterfall-tier.truth-cases.jsondocs/waterfall-ledger.truth-cases.json
- Documentation:
- Waterfall section in
docs/calculations.md - Clawback JSDoc in the waterfall config types
- Waterfall section in
Core Concepts
Tier vs. Ledger
-
Tier engine:
- Simple tiers (return of capital, preferred, carry splits)
- No ledger-level clawback
-
Ledger engine:
- Full ledger of contributions and distributions
- Applies shortfall-based partial clawback:
- GP carry is limited by fund-level profit above the LP shortfall
- If LPs haven't achieved capital + preferred return, GP carry is reduced proportionally
- Not a binary all-or-nothing clawback
- Not time-based; uses cumulative fund performance at liquidation
Only for simple, no-clawback, no-recycling cases may tier and ledger results be expected to match.
Clawback Semantics
Ensure implementation and docs agree:
- Use a shortfall-based formula:
LP shortfall = (required capital + pref) – actual LP distributions- GP clawback = min(GP carry, LP shortfall)
- JSDoc must clearly state:
- "Shortfall-based partial clawback (NOT hard floor, NOT time-based)"
- Include a concrete example referencing the relevant truth case (e.g., L08)
Truth-Case Workflow
-
Identify failing scenario(s) in tier/ledger truth-cases JSON.
-
Run targeted tests:
npm test -- tests/truth-cases/runner.test.ts -t "<scenario-id>" -
Compare:
- Expected vs actual totals (LP distributions, GP carry, clawback)
- Row-level distributions for ledger scenarios (e.g., quarterly rows)
-
Decide:
- JSON wrong → fix truth case and re-run
- Implementation wrong → adjust code, keep semantics aligned with docs and plan
Documentation Sync
Whenever you change behavior:
- Update:
docs/calculations.mdwaterfall section- JSDoc for waterfall config and key functions
- Include:
- Plain-English description of clawback behavior
- Example using a real truth-case ID
Invariants
- Clawback must never cause LPs to receive less than capital + pref while GP receives carry.
- Ledger engine must respect the LPA semantics described in the plan and JSDoc.
- Tier engine is not used to validate clawback scenarios.
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です