Files
hub/tasks/architecture/storage/document-org-ownership-transfer.md
glm-5.1 2b63cda1c7 Setup repo: migrate architecture specs, code stubs, and tasks from alkhub_ts
Copy architecture docs, ADRs, storage domain specs, research, reviews,
and 56 storage architecture tasks from the alkhub_ts monorepo. Adapt for
standalone @alkdev/hub repo structure (src/ not packages/hub/).

Sanitize all sensitive information:
- Replace private IPs (10.0.0.1) with localhost defaults
- Remove internal server hostnames (dev1, ns528096)
- Replace /workspace/ private paths with npm package references
- Remove hardcoded credentials from examples
- Rewrite infrastructure.md without private network details

Add Deno project scaffolding: deno.json (pinned deps), .gitignore,
AGENTS.md, entry point. Migrate existing code stubs (crypto, config
types, logger) with updated import paths.
2026-05-25 10:56:32 +00:00

38 lines
1.4 KiB
Markdown

---
id: document-org-ownership-transfer
name: Document Org Ownership Transfer Workflow
status: completed
depends_on: [resolve-org-dual-ownership]
scope: narrow
risk: low
impact: isolated
level: implementation
---
## Description
W16: RESTRICT prevents deletion of accounts that own organizations, but no ownership transfer mechanism is documented. This depends on C13 (dual ownership model) being resolved first, since the transfer workflow depends on whether `ownerId` or `membershipLevel: "owner"` is authoritative.
Add transfer documentation: "Before deleting an account, transfer all owned organizations via `org.transferOwnership` operation." Document the transfer pattern in identity.md.
## Acceptance Criteria
- [ ] `identity.md` documents the `org.transferOwnership` operation/workflow
- [ ] Precondition: transfer must happen before account deletion (RESTRICT constraint)
- [ ] Transfer includes updating `organizations.ownerId` to the new owner
- [ ] Transfer includes updating `organization_members.membershipLevel` if membership-based ownership is in use
- [ ] Dependency on C13 resolution noted (the authoritative ownership field determines what gets transferred)
## References
- docs/reviews/storage-architecture-review-2026-04-21.md#W16
- docs/architecture/storage/identity.md:44
- docs/architecture/storage/table-reference.md:56
## Notes
> To be filled by implementation agent
## Summary
> To be filled on completion