Kapnet — Full Directory Survey

title: Kapnet — Full Directory Survey created: 2026-06-01 updated: 2026-06-01

title: Kapnet — Full Directory Survey created: 2026-06-01 updated: 2026-06-01 type: concept tags: [kapnet, architecture, bitcoin, nostr, qubes, legal, research] sources: []

Kapnet — Full Directory Survey

Date: 2026-06-01 Scope: Complete exploration of /media/user/6E45-1E47/untitled folder/


Directory Layout

untitled folder/
  kapnet/                    — Main 44-crate Rust workspace (active development)
  handoff/                   — Architecture packet from previous OWL session
    HANDOFF.md               — 4 critical gaps + convergence test plan
    liveness-plan.md         — Bitcoin RPC + Nostr integration roadmap
    qubes-notes.md           — 5-qube QubesOS deployment architecture
    config.rs                — DaemonConfig struct + validation
    config_template.yaml     — Per-node config template
    gossip.rs                — GossipMessage types + GossipState
    sync.rs                  — BraidSynchronizer + KnotSelector
    ws.rs                    — NostrWsAdapter (nostr-sdk 0.35)
    node_lib.rs              — Node struct + process_txxm + build_knot tests
    nostr_lib.rs             — Nostr kinds, RelayConfig, PublicIdentityBinding
    state.rs                 — DaemonState + NostrRelayInfo
    start_nodes.sh           — 4-node startup script
    test_convergence.sh      — Convergence test (submit TXXMs, check knot_id match)
    node_configs/            — alpha/beta/gamma/delta YAML configs
  herme-dir/                 — Architecture design documents
    kapnet_next_pass_architecture_design/
      ARCHITECTURE.md        — 845-line target architecture (new crates, invariants)
      GAP_ANALYSIS.md        — 264-line gap analysis (10 major gaps, priority order)
      DESIGN.md              — Design document
      KCG_LLM_PROMPT.md      — LLM prompt for Kapnet Code Generation
    old context/             — Previous session context (memetic library, reference client, PDF masterzip)
    sheet_txxm_ei_ai_kor3_packet/ — TXXM sheet state control directive + tutorial
  snappp/                    — Original 18-crate workspace (earlier phase)
    kapnet/                  — Cargo.toml shows edition 2021, 15 crates, authors: ["OpenAI"]
  codex 10001.0/             — Codex session snapshot (May 18)
  codex 10001.1/             — Codex session snapshot (May 18, later)
  codex 10001.2 snap/        — Codex session snapshot (May 24)
  Store/                     — Phase zips + logo exports
    kapnet_phase3.zip        — Phase 3: KOR (18 crates, basic types)
    kapnet_phase4.zip        — Phase 4: Metering
    kapnet_phase5.zip        — Phase 5: Blob
    kapnet_phase7.zip        — Phase 7: Braid
    kapnet_phase8.zip        — Phase 8: Knot
    kapnet_phase9.zip        — Phase 9: Node
    kapnet_phase10.zip       — Phase 10: Governance + meta (most complete)
    pluronymous_logo_exports.zip — 3MB logo exports
  some pdfs/                 — Research library (~60 PDFs)
  shortcut/                 — Shortcuts directory
  Print/                    — Print directory
  NativeWit-electrum.json   — Electrum wallet keys (zpub/zprv, BIP32/BIP39)
  Taproot-electrum.json     — Taproot wallet keys (xpub/xprv, BIP32/BIP39)

Key Findings

1. The Architecture Is Real and Substantial

This is not a whitepaper. Kapnet is a 44-crate Rust workspace with:

  • 77/77 tests passing
  • Working Bitcoin RPC adapter (bitcoincore-rpc 0.19)
  • Working Nostr WS adapter (nostr-sdk 0.35) — written but not wired into daemon
  • Full TXXM pipeline: validate → route → meter → execute → package → score → braid → knot
  • Deterministic KScript VM (10 opcodes, bounded execution)
  • Braid DAG with conflict records
  • Knot chain with deterministic selection (heaviest weakwork)
  • Unix socket IPC protocol
  • QubesOS deployment architecture (5 qubes)

2. The 4 Critical Gaps Are Real and Well-Defined

The HANDOFF.md from the previous OWL session is precise:

  1. Gap 1: NostrWsAdapter methods exist in ws.rs but Daemon::run() always calls mock connect_all(). Fix: branch on self.nostr.use_ws.
  2. Gap 2: Keys::generate() called every restart. Fix: load_or_create_keys(path) — already have save_keys and load_keys, just need the wrapper.
  3. Gap 3: No braid tip gossip. Need periodic publish/subscribe of kind 30500-30599 events.
  4. Gap 4: handle_build_knot() may use wrong TXXM source. Verify Arc<RwLock<>> sharing.

3. QubesOS Deployment Is Designed

5-qube architecture:

  • kapnet-daemon — offline, runs kapnetd + Bitcoin RPC
  • kapnet-operator — operator’s interactive session, submits TXXMs
  • kapnet-worker — worker agents (delegate_task), no network
  • kapnet-nostr — Nostr relay bridge, outbound 443 only
  • kapnet-public — public relay observer, read-only

Security: memfs for sensitive state (wiped on shutdown), LUKS for persistent, RPC services for inter-qube communication, crisis mode revocation.

4. Legal Entity Exists

Pluronymous LLC has:

  • Articles of Organization
  • Operating Agreement
  • EIN (2026-04-30)
  • Resignation of Organizer
  • Resolution to Open Bank Account
  • All stored in some pdfs/

5. Research Library Is Extensive

~60 PDFs covering:

  • Bitcoin (Funding Bitcoin, Ordinals, Counterparty, Bitcoin Stamps, LRC20, MimbleWimble)
  • Mathematics (Algorithms, Number Theory, Calculus on Manifolds)
  • Law (Puerto Rico corporate law, SEC Regulation D, Casino and Gambling Act, Cooperatives)
  • Systems (Linux Programming Interface, Writing an OS in Rust, MLS Architecture)
  • Business (Founders Shares, Private Placements, Nonvoting Shares)
  • Game theory and coordination (Debt: The First 5000 Years, softerwar.pdf)

6. The Phase Zips Show Evolution

Phase 3 (18 crates, KOR) → Phase 10 (governance + meta) shows the workspace growing from core types to full protocol. The current 44-crate workspace is the most advanced version.

7. Electrum Wallets Exist

Two wallet keyfiles:

  • NativeWit: zpub/zprv (BIP32, BIP39 seed)
  • Taproot: xpub/xprv (BIP32, BIP39 seed)

These are likely for testing/development, not mainnet funds (mock_fixture is the default bitcoin_source).

8. The ARCHITECTURE.md Describes Next-Pass Target

845-line document defining:

  • 4 invariants (every action is TXXM, daemon is live organ, operator is master context, KOR levels visible)
  • New crates required: kapnet-client, kapnet-storage, kapnet-legal, kapnet-dstor, kapnet-federation
  • HTTP API specification (REST + WebSocket)
  • ODL boundary enforcement (no artifact crosses private→public without operator approval)
  • Contributor permission system (work modes, scopes, IP assignment)

9. The GAP_ANALYSIS.md Identifies 10 Major Gaps

Priority order:

  1. Daemon main loop (actually run TXXM pipeline)
  2. TUI-daemon connection (spawn daemon, live data)
  3. Config overlay editing
  4. HTTP API server
  5. Persistence layer (sled/RocksDB)
  6. Nostr relay connection
  7. Bitcoin observer (OP_RETURN scanning)
  8. Docker deployment
  9. Integration tests
  10. Legal boundary enforcement

10. sheet_txxm_ei_ai_kor3_packet Is a TXXM Directive

A complete packet for sheet.txxm internal state design:

  • Tutorial (PDF + Markdown)
  • Schema (JSON)
  • Hashing reference
  • XLSX template
  • Core rule: “No authority without a row. No row without a hash. No hash without a schema.”

Relationship to Pluronymous Workspace

The /home/user/plr/ workspace (hermqube, mkctp-core, infra, web, overlay, chatroom) is a separate, next-generation workspace that doesn’t directly map to the kapnet crate structure. The kapnet repo is the current-generation implementation. HermQube’s job is to:

  1. Fix the 4 critical gaps in the current kapnet codebase
  2. Run the convergence test
  3. Absorb the architecture into the plr/ workspace as needed
  4. Spawn better HermQubes

The two workspaces may merge or the plr/ workspace may supersede kapnet entirely — that’s an architecture decision for the operator.


Write a comment