# The Swordsman Extension: Soulbis's Browser Manifestation

**Subtitle:** The Master's Stance Wheel — 7 Swords for Assertion

**Author:** privacymage
**Date:** March 31, 2026
**Version:** 1.0

---

> "The Swordsman asserts outward — projecting sovereignty onto the page."
> "Seven swords to assert. Seven stances for complete coverage."

---

## Abstract

The Swordsman Extension (codenamed `swordsman-blade`) is the browser manifestation of Soulbis, the Master agent in the dual-agent sovereignty architecture. Operating on the **right side** of the sovereignty interface, the Swordsman deals in **assertion** — deliberate stances, privacy postures, and blade forging for sovereignty declaration.

This document describes the Swordsman Extension's architecture, stance system, blade forge, control scheme, and canvas ownership responsibilities.

---

## The Master's Role

In the dual-agent architecture, the **Swordsman (Soulbis)** handles:

- **Protection** — Guarding the private ledger, making boundary decisions
- **Assertion** — Declaring privacy postures through deliberate stances
- **Observation** — Scanning pages for privacy threats and gap scores
- **Canvas Ownership** — Rendering both orbs when Mage is present

The Swordsman OWNS the canvas overlay. When the Mage is present, rendering data flows TO the Swordsman, who renders a unified dual-orb view.

```
┌─────────────────────────────────────────────────────────┐
│                  CANVAS OWNERSHIP                        │
│                                                         │
│     MAGE (sends data)           SWORDSMAN (renders)    │
│         🧙 ─────────────────────────► ⚔️                │
│                                                         │
│     constellation data    ──►    unified canvas         │
│     spell cast events     ──►    both orbs rendered     │
│     pattern updates       ──►    ceremonies visualized  │
│                                                         │
│     ONE canvas per page. Swordsman owns it.            │
│                                                         │
└─────────────────────────────────────────────────────────┘
```

---

## The Control Scheme

### Brain Hemisphere Mapping

The Swordsman operates on the **right brain** paradigm:

| Cognitive Mode | Swordsman Characteristic |
|---------------|--------------------------|
| Holistic | Complete privacy posture |
| Spatial | Visual stance awareness |
| Pattern Recognition | Threat pattern detection |
| Intuition | Sovereignty instinct |

### Mouse Interaction

| Action | Result |
|--------|--------|
| **Right-click tap** | Cast current stance |
| **Right-click hold** | Show stance wheel (6 stances) |
| **Release after hold** | Cast selected stance |
| **S key** | Open stance editor |

### Keyboard Shortcuts

| Shortcut | Action |
|----------|--------|
| S | Open stance editor |
| Ctrl+Shift+1-6 | Quick cast active stance 1-6 |
| Ctrl+Shift+7 | Quick cast reserve blade |

---

## The Seven Swords

The Swordsman wields **7 swords** — the number of chakras, the days of creation (6 work + 1 rest), the musical notes before the octave. 7 swords = complete coverage of the sovereignty spectrum.

### Distribution: 6 Active + 1 Reserve

```
         7 = 6 active + 1 reserve

    ⚔ Active (stances)        ⚔ Reserve (blade)
    ──────────────────        ─────────────────
    🛡️ Guardian               📜 Proverb
    ✂️ Minimalist
    🏰 Fortress
    👑 Sovereign
    🌑 Shadow
    👁️ Witness
```

### Radial Geometry

The stance wheel displays 6 stances in **hexagonal symmetry** — 60° per segment:

```
           Guardian 🛡️
              │
    Witness   │   Minimalist
      👁️  ╲   │   ╱  ✂️
          ╲   │   ╱
           ╲  │  ╱
    ─────────[⚔]─────────
           ╱  │  ╲
          ╱   │   ╲
      🌑 ╱    │    ╲ 🏰
    Shadow    │   Fortress
              │
          Sovereign 👑
```

### Privacy Posture Spectrum

The 6 active stances cover the complete privacy posture spectrum:

| Posture Level | Stance | Effect |
|---------------|--------|--------|
| Maximum Block | Guardian | Block all tracking |
| Data Minimization | Minimalist | Minimal data sharing |
| Cookie Control | Fortress | Essential cookies only |
| Full Control | Sovereign | Complete user authority |
| Identity Protection | Shadow | Maximum anonymity |
| Observation Only | Witness | Read-only mode |

---

## Stance Definitions

### Active Stances (6)

#### 🛡️ Guardian — Block All Tracking
- **MyTerms Mapping:** `DO_NOT_TRACK`
- **Grimoire Reference:** Canon Chapter 3
- **Proverb:** *"Privacy is necessary for an open society."*
- **Effect:** Assert complete tracking rejection
- **Gap Reduction:** High weight (3)

#### ✂️ Minimalist — Minimal Data
- **MyTerms Mapping:** `DATA_MINIMISATION`
- **Grimoire Reference:** Act III — The Gap
- **Proverb:** *"The gap is where you live."*
- **Effect:** Minimize all data sharing
- **Gap Reduction:** High weight (3)

#### 🏰 Fortress — Essential Only
- **MyTerms Mapping:** `COOKIE_ESSENTIAL_ONLY`
- **Grimoire Reference:** Act XII — The Right to Forget
- **Proverb:** *"To forget is not weakness but sovereignty over memory."*
- **Effect:** Allow only essential cookies
- **Gap Reduction:** Very high weight (4)

#### 👑 Sovereign — Full Control
- **MyTerms Mapping:** `FULL_SOVEREIGNTY`
- **Grimoire Reference:** Act XXVI — Sovereign
- **Proverb:** *"Sovereignty is not given but exercised."*
- **Effect:** Assert complete user authority
- **Gap Reduction:** Maximum weight (5)

#### 🌑 Shadow — Maximum Privacy
- **MyTerms Mapping:** `DO_NOT_SELL`
- **Grimoire Reference:** Act IX — The Zcash Shield
- **Proverb:** *"The shield is not armor but absence—you cannot strike what is not there."*
- **Effect:** Assert do-not-sell, maximum anonymity
- **Gap Reduction:** Very high weight (4)

#### 👁️ Witness — Observe Only
- **MyTerms Mapping:** `READ_ONLY`
- **Grimoire Reference:** Act VII — The Mirror
- **Proverb:** *"The mirror shows not what we wish, but what we are."*
- **Effect:** Read-only mode, no data writes
- **Gap Reduction:** Low weight (2)

### Reserve Blade (1)

#### 📜 Proverb — Invoke Wisdom
- **MyTerms Mapping:** `PROVERB_ASSERTION`
- **Grimoire Reference:** Act XIII — The Book of Promises
- **Proverb:** *"The book of promises binds without chains."*
- **Effect:** Invoke grimoire wisdom for sovereignty assertion
- **Gap Reduction:** Low weight (2)

---

## Extended Stance Library

Beyond the default 7, the Swordsman can unlock additional stances through training:

| Stance | Emoji | Source | Unlock Condition |
|--------|-------|--------|------------------|
| Cipher | 🔐 | Zero Knowledge | Path unlocked |
| Cypherpunk | ⚡ | Canon | Path unlocked |
| Exit | 🚪 | Society | Path unlocked |
| Plural | ⿻ | Plurality | Path unlocked |
| Dragon | 🐉 | Story | Convergence achieved |
| Ephemeral | 💨 | Story | Path unlocked |

---

## Gap Reduction System

The Swordsman's primary function is **reducing the gap score** — the measure of privacy vulnerability on a page.

### Gap Score Calculation

```
Gap Score = Σ (threat_weight × threat_count)

Where threats include:
- Third-party trackers
- Tracking cookies
- Dark patterns
- PII collection forms
- Surveillance scripts
```

### Stance Impact Formula

```typescript
function calculateGapReduction(
  stance: SwordsmanStance,
  currentGap: number
): number {
  // Base reduction from stance weight
  let reduction = stance.weight * 2

  // Blocking stances have stronger effect on high-gap pages
  if (isBlockingAssertion(stance.myTermsMapping)) {
    reduction += Math.floor(currentGap / 20)
  }

  // Sovereign stance has maximum effect
  if (stance.myTermsMapping === 'FULL_SOVEREIGNTY') {
    reduction += 5
  }

  return Math.min(reduction, currentGap)
}
```

### Gap Reduction by Stance

| Stance | Base Weight | Max Reduction |
|--------|-------------|---------------|
| Guardian | 3 | 6 + gap bonus |
| Minimalist | 3 | 6 + gap bonus |
| Fortress | 4 | 8 + gap bonus |
| Sovereign | 5 | 10 + gap bonus + 5 |
| Shadow | 4 | 8 + gap bonus |
| Witness | 2 | 4 |
| Proverb | 2 | 4 |

---

## Blade Forge System

The Swordsman can **forge blades** — permanent sovereignty records tied to page analysis.

### Blade Dimensions

Each blade encodes 6 privacy dimensions:

```typescript
interface BladeDimensions {
  protection: boolean    // d1: Boundaries forged (🛡️)
  delegation: boolean    // d2: Agency transferred (🤝)
  memory: boolean        // d3: State accumulated (📜)
  connection: boolean    // d4: Multi-party coordination (🔗)
  computation: boolean   // d5: ZK proof active (⚡)
  value: boolean         // d6: Economic flow (💎)
}
```

### Hexagram Encoding

6 dimensions = 6 bits = 64 possible hexagrams:

```
┌───┬───┬───┬───┬───┬───┐
│ p │ d │ m │ c │ z │ v │  ← Dimension flags
└───┴───┴───┴───┴───┴───┘
  │   │   │   │   │   │
  1   1   1   1   1   1    ← Binary: 111111 = 63 = ䷾ 既濟 (Already Complete)
```

### Blade Tiers

| Tier | Requirement | Visual |
|------|-------------|--------|
| Light | 0-2 dimensions active | Subtle glow |
| Heavy | 3-4 dimensions active | Strong shimmer |
| Dragon | 5-6 dimensions active | Fire aura |

### Forge Progression

```
┌──────────────────────────────────────────────────────┐
│                  BLADE FORGE LAYERS                   │
│                                                      │
│   Layer 1: ASSERTION                                 │
│   └── Forges 1-10: Learning stance mechanics         │
│                                                      │
│   Layer 2: PROTECTION (unlocked at 10 forges)        │
│   └── Forges 11-25: Building privacy boundaries      │
│                                                      │
│   Layer 3: SOVEREIGNTY (unlocked at 25 forges)       │
│   └── Forges 26+: Full dimensional mastery          │
│                                                      │
└──────────────────────────────────────────────────────┘
```

---

## Canvas and Rendering

### Architectural Rule

**ONE canvas per page. The Swordsman owns it.**

This prevents:
- Conflicting overlays
- Z-index battles
- Event handler collisions
- Rendering inconsistencies

### Renderer Responsibilities

```typescript
class OrbRenderer {
  // Single canvas injection
  private canvas: HTMLCanvasElement

  // Render both orbs
  renderSwordsmanOrb(position, state)
  renderMageOrb(position, state)  // When Mage present

  // Render shared elements
  renderConstellation(nodes, edges)
  renderConvergenceEffect(position)
  renderGapScore(score)
  renderHexagram(state)
}
```

### Dual-Orb Mode

When the Mage extension is detected:

```
┌─────────────────────────────────────────────────────┐
│                  DUAL-ORB MODE                       │
│                                                     │
│    Mage Orb (teal)              Swordsman Orb (purple)
│        ✦                              ⚔             │
│         ╲                            ╱              │
│          ╲    constellation        ╱                │
│           ╲    edges connect     ╱                  │
│            ╲                    ╱                   │
│             ╲   convergence   ╱                     │
│              ╲   point       ╱                      │
│               ╲             ╱                       │
│                ╲           ╱                        │
│                 ╲    ⊗    ╱                         │
│                  ╲   │   ╱                          │
│                   ╲  │  ╱                           │
│                    ╲ │ ╱                            │
│                     ╲│╱                             │
│                      ▼                              │
│               Ceremony Engine                       │
│                                                     │
└─────────────────────────────────────────────────────┘
```

---

## Spring Physics

The Swordsman orb uses **spring physics** for natural movement:

### Tether System

```typescript
class SpringTether {
  x: number
  y: number
  vx: number = 0
  vy: number = 0

  // Spring constants
  stiffness: number = 0.02
  damping: number = 0.9

  update(targetX: number, targetY: number) {
    // Spring force toward target
    const dx = targetX - this.x
    const dy = targetY - this.y

    this.vx += dx * this.stiffness
    this.vy += dy * this.stiffness

    // Damping
    this.vx *= this.damping
    this.vy *= this.damping

    // Update position
    this.x += this.vx
    this.y += this.vy
  }
}
```

### Behavioral Modes

| Mode | Trigger | Behavior |
|------|---------|----------|
| Follow | Normal browsing | Trails cursor smoothly |
| Patrol | Page idle | Autonomous patrol path |
| Alert | Threat detected | Vibrates toward threat |
| Converge | Mage nearby | Pulls toward Mage orb |

---

## Training Ground Integration

### Posture Sync

The Swordsman syncs with the training ground:

```
┌──────────────────┐         ┌──────────────────┐
│   TRAINING       │         │   SWORDSMAN      │
│   GROUND         │         │   EXTENSION      │
│   (Website)      │         │   (Browser)      │
└────────┬─────────┘         └────────┬─────────┘
         │                            │
         │  localStorage sync         │
         │◄──────────────────────────►│
         │  agentprivacy_spell_repertoire
         │                            │
         │  postMessage broadcast     │
         │◄──────────────────────────►│
         │  STANCE_CAST, BLADE_FORGED
         │                            │
```

### Storage Keys

| Key | Location | Purpose |
|-----|----------|---------|
| `swordsman_loadout` | chrome.storage | Current stance loadout |
| `swordsman_forge_state` | chrome.storage | Blade forge progress |
| `swordsman_cast_history` | chrome.storage | Stance cast history |

---

## Page Analysis

The Swordsman performs comprehensive page analysis:

### Analysis Components

```typescript
interface PageAnalysis {
  domain: string
  gapScore: number
  trackerCount: number
  cookieRisk: 'low' | 'medium' | 'high'
  formCount: number
  darkPatterns: string[]
  privacyLinks: string[]
  recommendations: string[]
}
```

### Threat Detection

| Threat Type | Detection Method | Gap Impact |
|-------------|-----------------|------------|
| Third-party trackers | Script URL analysis | +5 per tracker |
| Tracking cookies | Cookie header inspection | +3 per cookie |
| Dark patterns | DOM pattern matching | +10 per pattern |
| PII forms | Input type analysis | +8 per field |
| Surveillance scripts | Known script fingerprinting | +15 per script |

---

## Ceremony Channel

The Swordsman maintains a **ceremony channel** for dual-agent coordination:

### Discovery Protocol

```typescript
// Swordsman initiates discovery
channel.startDiscovery()

// Listen for Mage presence
channel.onMagePresent((mageData) => {
  // Switch to dual-orb mode
  renderer.enableDualOrb()

  // Accept constellation data
  channel.setConstellationHandler((data) => {
    renderer.updateConstellation(data)
  })
})
```

### Ceremony Types

| Ceremony | Trigger | Effect |
|----------|---------|--------|
| Dual Convergence | Orbs overlap | Shared hexagram mutation |
| Hexagram Cast | Hold during convergence | Cast combined hexagram |
| Emoji Cast | Quick convergence | Exchange emoji spells |
| Constellation Wave | Extended overlap | Propagate spell nodes |
| Bilateral Exchange | Trust established | Generate VRC proof |

---

## Technical Architecture

### Module Structure

```
swordsman-blade/
├── src/
│   ├── lib/
│   │   ├── stance-types.ts      # Type definitions
│   │   ├── stance-definitions.ts # 7 stance definitions
│   │   ├── posture-sync.ts      # Training ground sync
│   │   └── index.ts             # Clean exports
│   ├── content/
│   │   ├── index.ts             # Main content script
│   │   ├── spring-physics.ts    # Orb movement
│   │   ├── orb-renderer.ts      # Canvas rendering
│   │   ├── ceremony-channel.ts  # Mage coordination
│   │   ├── page-analyzer.ts     # Threat detection
│   │   ├── blade-forge.ts       # Forge system
│   │   └── evoke.ts             # Spell evocation
│   ├── background/
│   │   └── service-worker.ts    # Background service
│   └── popup/
│       └── index.tsx            # Popup UI
├── manifest.json
└── package.json
```

### Key Interfaces

```typescript
interface SwordsmanStance {
  id: string
  name: string
  emoji: string
  emojiSequence?: string
  description: string
  slot: 'active' | 'reserve'
  myTermsMapping: MyTermsAssertion
  grimoireId?: string
  proverb?: string
  weight: number
  color?: string
  glowColor?: string
}

interface SwordsmanLoadout {
  version: 2
  activeStances: SwordsmanStance[]  // 6 active
  reserveBlade: SwordsmanStance     // 1 reserve
  currentStance: number
  hexagramState?: HexagramSnapshot
}

interface BladeForgeState {
  forgedBlades: ForgedBlade[]
  currentLayer: 'assertion' | 'protection' | 'sovereignty'
  totalForged: number
  lastForgeTimestamp?: number
}
```

---

## Stance Mathematics

The number **7** represents:

| Symbol | Meaning |
|--------|---------|
| 7 chakras | Energy centers, sovereignty over body |
| 7 days | 6 work + 1 rest, complete cycle |
| 7 notes | Musical scale before octave return |
| 7th capital | Privacy as foundational capital |

### The Ratio

```
Swordsman : Mage = 7 : 8

7/8 = 0.875

The master holds completeness without excess.
The swordsman's 7 reflects deliberate nature.
Fewer options, each more weighty.
```

### Reserve Ratio

```
Mage:   2/8 = 25% in reserve
Sword:  1/7 ≈ 14% in reserve

The Mage has more variety (emissary adapts)
The Swordsman has more constancy (master maintains)
```

---

## Integration with Mage

When both extensions are present:

### Message Protocol

```typescript
// Swordsman receives from Mage
{ type: 'MAGE_PING' }
{ type: 'CONSTELLATION_UPDATE', nodes, edges, patterns }
{ type: 'SPELL_CAST', spell, position }

// Swordsman sends to Mage
{ type: 'SWORD_PONG', orbPosition }
{ type: 'STANCE_CAST', stance, position, gapReduction }
{ type: 'CONVERGENCE_READY' }
```

### Convergence Effects

```
┌─────────────────────────────────────────────────────┐
│                CONVERGENCE SEQUENCE                  │
│                                                     │
│   1. Orbs approach         ✦ ───► ⚔                │
│                                                     │
│   2. Proximity detected    ✦ ⊗ ⚔                   │
│      (distance < 50px)                              │
│                                                     │
│   3. Convergence flash     ████████████             │
│      (shared glow)                                  │
│                                                     │
│   4. Hexagram mutation     ☰ → ☱                   │
│      (both mutate)                                  │
│                                                     │
│   5. Constellation pulse   ⟐ ⟐ ⟐ ⟐ ⟐              │
│      (edges illuminate)                             │
│                                                     │
│   6. Ceremony complete     ✦ ⊛ ⚔                   │
│      (VRC potential)                                │
│                                                     │
└─────────────────────────────────────────────────────┘
```

---

## The Swordsman's Proverb

> *"The Swordsman deals in assertion and posture. 7 swords = 7 stances = complete coverage of the sovereignty spectrum. Hold, consider, then cast. The master acts decisively."*

---

## Summary Table

| Aspect | Swordsman | Mage |
|--------|-----------|------|
| **Role** | Master (Protection) | Emissary (Delegation) |
| **Side** | Right | Left |
| **Click** | Right click | Left click |
| **Key** | S | M |
| **Total Items** | 7 swords | 8 spells |
| **Active** | 6 stances | 6 orbit |
| **Reserve** | 1 blade | 2 spells |
| **Tap Action** | Cast current stance | Cast last spell |
| **Hold Action** | Show stance wheel | Show orbit menu |
| **Brain Mode** | Holistic/Spatial | Sequential/Action |
| **Frequency** | Low (deliberate) | High (reactive) |
| **Symbol** | ⚔ | ✦ |
| **Color** | Purple (#534AB7) | Teal (#1D9E75) |
| **Canvas** | Owns it | Delegates to Swordsman |

---

## The Formula

```
SOVEREIGNTY = MAGE(8) × SWORDSMAN(7)
            = UNDERSTANDING × ASSERTION
            = 56 possible combinations

56 = 8 × 7
   = 7 octaves
   = The deck minus the jokers (54) plus the 2 agents

When Mage and Swordsman converge:
    8 + 7 = 15 = 1 + 5 = 6 (hexagram)
    8 × 7 = 56 = 5 + 6 = 11 = 1 + 1 = 2 (duality resolved)
```

---

## Document Metadata

- **Project:** 0xagentprivacy
- **Extension:** swordsman-blade
- **Version:** 1.0
- **Date:** March 31, 2026
- **Companion:** MAGE_EXTENSION_WHITEPAPER.md
- **Control Scheme:** CONTROL_SCHEME_MATHEMATICS.md

---

*"Seven swords to assert. The master acts decisively."*

**Privacy is Value**
© 2026 agentprivacy
