RFC: Skill ownership, transfer, and orphan handling #88

Open
opened 2026-02-15 17:15:37 -05:00 by yindo · 0 comments
Owner

Originally created by @aronchick on GitHub (Feb 7, 2026).

Problem

Currently ClawHub has fundamental gaps in skill ownership:

  1. Single owner only - No collaborators, no teams
  2. No transfer mechanism - Can't hand off skills
  3. Orphaned skills - When user deletes account, skills are orphaned with no handling
  4. No fallback - If owner disappears, skill is stuck

Current Behavior

// Skills have ONE owner
skills = defineTable({
  ownerUserId: v.id('users'),  // Single owner
})

// Account deletion leaves skills orphaned
deleteAccount = mutation({
  handler: async (ctx) => {
    await ctx.db.patch(userId, { deletedAt: Date.now() })
    // Skills NOT handled - just orphaned
  }
})

Proposed Solutions (in order of priority)

Phase 1: Ownership Transfer

  • New skillOwnershipTransfers table
  • Mutations: requestTransfer, acceptTransfer, rejectTransfer
  • UI on settings page
  • Effort: 2-3 days

Phase 2: Collaborators

  • New skillCollaborators table
  • Roles: maintainer (can publish), contributor (can publish)
  • Effort: 1 week

Phase 3: Orphan Handling

  • fallbackOwnerUserId field on skills
  • Auto-promote collaborators when owner deleted
  • Orphan status visible in UI
  • Effort: 1 week

Phase 4: Organizations (future)

  • organizations and orgMembers tables
  • Skills owned by orgs instead of users
  • Effort: 2-4 weeks

Immediate Fixes

Before the full architecture work:

  1. Warn on delete: Show user their skills and what happens to them
  2. Mark orphans: Return ownerStatus: 'orphaned' in queries
  3. Block modifications: Orphaned skills can't be updated, clear error message

Questions

  1. Should transfers require recipient approval?
  2. What happens to orphaned skills after X days?
  3. Should popular orphaned skills be \adoptable?

Full analysis: https://github.com/aronchick/clawhub/blob/main/ARCHITECTURE-GAPS.md

Originally created by @aronchick on GitHub (Feb 7, 2026). ## Problem Currently ClawHub has fundamental gaps in skill ownership: 1. **Single owner only** - No collaborators, no teams 2. **No transfer mechanism** - Can't hand off skills 3. **Orphaned skills** - When user deletes account, skills are orphaned with no handling 4. **No fallback** - If owner disappears, skill is stuck ## Current Behavior ```typescript // Skills have ONE owner skills = defineTable({ ownerUserId: v.id('users'), // Single owner }) // Account deletion leaves skills orphaned deleteAccount = mutation({ handler: async (ctx) => { await ctx.db.patch(userId, { deletedAt: Date.now() }) // Skills NOT handled - just orphaned } }) ``` ## Proposed Solutions (in order of priority) ### Phase 1: Ownership Transfer - New `skillOwnershipTransfers` table - Mutations: `requestTransfer`, `acceptTransfer`, `rejectTransfer` - UI on settings page - Effort: 2-3 days ### Phase 2: Collaborators - New `skillCollaborators` table - Roles: maintainer (can publish), contributor (can publish) - Effort: 1 week ### Phase 3: Orphan Handling - `fallbackOwnerUserId` field on skills - Auto-promote collaborators when owner deleted - Orphan status visible in UI - Effort: 1 week ### Phase 4: Organizations (future) - `organizations` and `orgMembers` tables - Skills owned by orgs instead of users - Effort: 2-4 weeks ## Immediate Fixes Before the full architecture work: 1. **Warn on delete**: Show user their skills and what happens to them 2. **Mark orphans**: Return `ownerStatus: 'orphaned'` in queries 3. **Block modifications**: Orphaned skills can't be updated, clear error message ## Questions 1. Should transfers require recipient approval? 2. What happens to orphaned skills after X days? 3. Should popular orphaned skills be \adoptable\? --- Full analysis: https://github.com/aronchick/clawhub/blob/main/ARCHITECTURE-GAPS.md
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/clawhub#88