Files
orgchain/AGENTS.md
T
teahubxyzandClaude Opus 5.5 2354947d16 Orgchain v1.6: holdings share the mining, every act pays its gas, money crosses holdings
Mining is a lab setting. Split (the default) pays every active holding a
share of each beat, pro rata by a hashrate dial on each holding (0 to 9,
1 unless set), one coinbase output per holding. Last act gives the whole
beat to the holding that acts. Every act is paid by the acting node's own
keys: fees and postage come out of its gas tank (the plain coins at its
Taproot key), which tops up from its own money 0.0001 test BTC at a time.
Each act is checked before anything is signed, so an unfunded node can't
act. A graduating org pays for its own claim, and the lab wallet pays only
for foundings and for holdings that predate lab keys. Sends cross
holdings, the ledger shows gas top-ups, and chain keys are derived once
per page.

The engine's second local change: a coinbase may split its reward across
up to 64 outputs (mineTo), in src/adapters/chain.js.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H4upF5LVwmPDDqrhdUfnXh
2026-10-14 23:16:03 -07:00

2.1 KiB

AGENTS.md

Orgchain is lineage's app for creating and operating lineage holdings on Super Testnet's toy chain.

  • Test-only, always: no mainnet funds, no hidden signing, no custody, and nothing presented as a real key.
  • Lineage semantics live in one place, src/orgchain/lineage.js. The UI never interprets events itself, and every act is vetted by that reducer before it is signed. A new op means a reducer change, its tests and the README's table.
  • The engine (src/adapters, src/upstream, src/storage.js, src/miner.js) is Super Testnet's. Compose with it rather than rewriting it, and keep its tests passing. Preserve upstream licenses and provenance. Its local changes are P2WPKH payments and a coinbase split across up to 64 outputs, both in src/adapters/chain.js (PROVENANCE.md); keep them small and tested.
  • Money lives in src/orgchain/money.js: beats pay the holdings (split by hashrate, or all to the last act), sends spend SegWit coins only, so an inscription can never leave as change, and balances are read off the chain, never stored. Gas (src/orgchain/actions.js): every act is paid by the actor's own keys and checked before anything is signed; the lab wallet pays only for foundings and for holdings that predate lab keys.
  • Keys follow the tree (src/orgchain/keys.js): store roots only (one per holding, one per graduated org) and derive every other key from its position. Every act is signed by whichever key holds the authorizing inscription.
  • A node's chain key is its account's BIP-86 Taproot key (m/86'/1'/account'/0/0); SegWit is BIP-84 at the same account and holds its money. Leaves are HKDF-SHA256 (salt lineage/v0) and must stay byte for byte with lineage's key tree page; tests/keys.test.js holds values read off that page.
  • Secrets show only behind Reveal, reset on every selection, and match the key tree page byte for byte (the tests pin hashes of the page's own output).
  • The page makes no network requests; keep it that way (the deployed CSP sets connect-src 'none').
  • Before shipping: npm test, npm run build, npm run test:e2e.