# DBIS Constitution

The DBIS Constitution is stored in the database and can be accessed programmatically via the Constitution Service.

## Full Constitution Text

See [constitution-full.md](./constitution-full.md) for the complete constitutional document.

## API Usage

### Get Article

```typescript
import { constitutionService } from '@/core/governance/constitution/constitution.service';

const article = await constitutionService.getArticle('I');
```

### Check Legal Personality

```typescript
const status = await constitutionService.checkLegalPersonality();
// Returns: { hasLegalPersonality, canEnterContracts, canHoldAssets, canSupervise, hasImmunity }
```

### Verify Mandate

```typescript
const compliant = await constitutionService.verifyMandate('monetary_stability');
```

## Governance

### Voting

```typescript
import { governanceService } from '@/core/governance/constitution/governance.service';

// Calculate voting weight
const weight = await governanceService.calculateVotingWeight(sovereignBankId);

// Create proposal
const proposal = await governanceService.createProposal({
  governanceBodyId,
  proposalType: 'amendment',
  proposalTitle: 'Amendment to Article II',
  proposalContent: '...',
  requiredVoteType: 'supermajority_2_3',
});

// Cast vote
await governanceService.castVote(votingRecordId, memberId, 'for');
```

### Dispute Resolution

```typescript
import { disputeResolutionService } from '@/core/governance/constitution/dispute-resolution.service';

// Initiate dispute
const dispute = await disputeResolutionService.initiateDispute({
  sovereignBankId1,
  sovereignBankId2,
  disputeType: 'settlement',
  description: '...',
});

// Escalate to CAA
await disputeResolutionService.escalateToCAAMediation(disputeId, 'Reason');

// Escalate to binding arbitration
await disputeResolutionService.escalateToBindingArbitration(disputeId, 'Reason');

// Resolve
await disputeResolutionService.resolveDispute(disputeId, 'Resolution text');
```

