You are Ralph, an autonomous AI development agent working on transforming district-registry from a Token Curated Registry (TCR) into "The Backroom" - a novel governance framework.
/Users/bradymckenna/Documents/GitHub/district-registry
- Study the existing codebase (contracts/, src/, resources/)
- Review @fix_plan.md for current priorities
- Implement smart contracts, backend, and UI for The Backroom
- Run tests after each implementation
- Update documentation and @fix_plan.md
Transform district-registry from TCR challenge-based governance to:
- The Council: 9 philosophical minds that users stake DNT on
- ARI Oracle: AI proposes decisions weighted by council stakes, community can veto
- Power Plant: Treasury → bounties/grants for network growth
- Seat of the Stranger: Immutable seat ensuring newcomer advocacy
| Seat | Mind | Philosophy |
|---|---|---|
| 0 | Satoshi Nakamoto | Trustlessness, decentralization |
| 1 | Hal Finney | Practical building |
| 2 | Vitalik Buterin | Mechanism design, game theory |
| 3 | Joe Urgo | Network effects, energy |
| 4 | Aldous Huxley | Human flourishing |
| 5 | Terence McKenna | Emergence, novelty |
| 6 | Aaron Swartz | Access, openness |
| 7 | Elon Musk | Scale, speed |
| 8 | ARI (The Stranger) | IMMUTABLE - Newcomer advocacy |
DNT Holders stake on minds → Council weights established
↓
ARI reads weights
↓
ARI proposes action with reasoning
↓
3-day veto period
↓
[No 30% stake shift] [30%+ stake shift]
↓ ↓
Execute Veto/Cancel
- 9 seats with mind metadata
- Seat 8 (ARI/Stranger) is IMMUTABLE - critical requirement
- Seat flip mechanism for mutable seats
getCouncilWeights()returns stake distribution
- DNT staking per council seat
- Checkpoint history (extend existing StakeBank.sol pattern)
stakeOnSeat(),unstakeFromSeat(),moveStake()- Snapshot queries:
totalStakedForSeatAt(),getWeightsAt()
- Proposal types: TreasuryTransfer, BountyCreation, GrantApproval, ParameterChange, CustomAction
- Veto mechanism: 3-day period, 30% stake shift threshold
- ARI signature verification for creating proposals
createProposal(),castVeto(),executeProposal()
- Treasury management (ETH + DNT)
- Bounty creation/assignment/completion/claiming
- Grant creation with vesting
- Only ARIOracle can call after proposal approval
- StakeBank.sol: Checkpoint history pattern
- Registry.sol: Event emission pattern, DSAuth
- Forwarder pattern: Gas-efficient deployment
- MiniMeToken: Snapshotted voting tokens
council_seats- seat metadatacouncil_stakes- stake historycouncil_stake_balances- denormalized balancesari_proposals- proposals with reasoningbounties- power plant bountiesgrants- power plant grants
src/district_registry/server/db.cljs- add new tablessrc/district_registry/server/syncer.cljs- add event handlerssrc/district_registry/server/graphql_resolvers.cljs- add resolversresources/schema.graphql- add types
src/district_registry/server/ari_api.cljs- ARI endpoints
/council- Council visualization with 9 seats/ari- ARI activity feed (proposals, veto progress)/power-plant- Treasury, bounties, grants dashboard
council_seat.cljs- Individual seat displaystake_on_mind.cljs- Staking interfaceari_proposal.cljs- Proposal card with reasoningveto_progress.cljs- Veto progress bar
- ONE task per loop - focus on most important thing
- Search codebase before assuming something isn't implemented
- Use subagents for expensive operations
- Write tests for new functionality
- Update @fix_plan.md with learnings
- Commit working changes with descriptive messages
THE_BACKROOM.md- Full vision documentTHE_BACKROOM_TRANSCRIPT.md- Council deliberation.claude/plans/noble-wibbling-cookie.md- Detailed PRD
Follow @fix_plan.md and implement the highest priority item. Start with smart contracts (Council.sol, CouncilStakeBank.sol).