docs(design): case-as-workspace — the type fix, the orbit fix, and the identity question#184
Merged
Merged
Conversation
A design draft, NOT approved: a self-contained brief a fresh session can
be handed as its starting prompt (§7), and a list of what only the
maintainer can settle (§6).
The proposal was "use a case entity as the workspace, with the case npub
as the capturing identity." Measured against the real registry, it splits
cleanly in two:
- The workspace half is mostly BUILT. `entity-field-schemas.js:66-71`
already gives `case` four authored-only fields — the project reading —
and all of Phase 20 assumes it. Only `entity-model.js:46-49`'s comment
and `llm-prompts.js:383` ("cases named in the text") are stale, and
they are why the model proposes papers and lawsuits as cases.
- The identity half is forbidden in part and buys no segregation:
`publishOwnedKeysManifest` already emits one primary-signed kind-30069
listing every owned entity pubkey with no case scoping, so per-case
keys would be re-linked on the wire by the researcher's own event.
It also collides with the custody rule (TEAM_CASE_DESIGN.md:104-110)
and orphans 30054/30055/30063/30064 at forked coordinates.
The presenting complaint has a smaller cause. `collectCaseEntityIds`
(`case-bundle.js:34-49`) is claim-only while `memberUrlSets`
(`case-membership.js:34-60`) is the Phase-20.1 tag-OR-claim union; the
COVID case was built entirely by tagging, so its orbit resolves to 1
entity (itself) instead of 265, and the side panel's unscoped flat list
of all 283 is what "keeps growing and growing."
Proposes no score, no aggregation, no wire change in CW.1-CW.5.
PHILOSOPHY.md and CASE_DOSSIER_DESIGN.md §2.2 govern where this
disagrees. Phase number unclaimed — 28 is the next free slot.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Answers "think this through with all of the implications and write a prompt that can be merged to main that I can pass to the next Claude Code session."
This is a design draft. NOT approved. §6 is the list of things only you can settle. §7 is a self-contained "start here" brief for a fresh session. Merging it commits you to nothing.
The proposal splits in two, and the halves have very different prices
The workspace half is mostly already built.
entity-field-schemas.js:66-71givescasefour fields, allprovenance: 'authored'— the only type in the registry with zero sourced fields. That is the project reading, shipped. All of Phase 20 assumes it. Only two things are stale: the type comment atentity-model.js:46-49("a real-world story under assessment") andllm-prompts.js:383, which literally asks the model for "cases named in the text" and then interpolatesENTITY_TYPESwith no definition of any type. The model is obeying the prompt — that is why it proposed Proximal Origin and the litigation as cases.The identity half is forbidden in part, and buys no segregation.
publishOwnedKeysManifest(reader/index.js:5039-5054) already publishes one primary-signed kind-30069 listing every owned entity pubkey, with no case scoping and a fixedd. Bricks & Minifigs and COVID case keys would appear side by side in a single event signed by the same primary — segregation on the wire is zero, and worse than the status quo, because today the linkage is only inferable from behavior. It also collides with the custody rule (TEAM_CASE_DESIGN.md:104-110), orphans 30054/30055/30063/30064 at forked coordinates, and is structurally impossible for NIP-07 users.The presenting complaint has a much smaller cause
Membership is defined twice and the two disagree:
memberUrlSetscase-membership.js:34-60collectCaseEntityIdscase-bundle.js:34-49You built the COVID workspace entirely by tagging — 49 member articles, 0 claims
aboutthe case. Measured:The articles and the graph work; the entity orbit is what is empty. The flat list of all 283 in the side panel (
sidepanel/index.js:107, no case filter) is "the entities list will keep growing and growing."Corrections to figures in circulation
suggested_byseparates project from subject with 100% accuracy on this data: every user-made case is a project, every LLM-made case is a subject.Pre-deadline set: CW.1–CW.5 — five PRs, zero wire changes, zero migrations
update, never delete-and-recreate)collectCaseEntityIdstag-inclusiverestoreDerivedKeysguard when derivation root ≠ active primaryCW.10 (per-case identity binding) is blocked on §6 Q3/Q4. The case entity's key signing captured content is recommended never.
§6 needs your call
Q1 does
casemean workspace, full stop (rec: yes — and it retires "Bricks & Minifigs scandal" as the canonical example) · Q2 should the bundle widen with the orbit (rec: no, separate PR — it exports private keys) · Q3 per-case profiles: enforce or leave prescribed (rec: prescribed; the measured evidence says identity was never the problem — your two projects share 0 entities and 0 URLs) · Q4 amend the custody rule (rec: no) · Q5 partition vs dedupe (rec: dedupe first — your duplication is intra-case name drift, which partitioning multiplies) · Q6 shouldgenerateEntityIdstop hashing the type · Q7 shouldxray-portaljoinWORKSPACE_DATABASESPhase number unclaimed — 28 is the next free slot; confirm before claiming.
🤖 Generated with Claude Code