Resource documentation thread — what shipped, how it works, and how to add resources. Written for everyone at the table (and for the friends edition later, since this is exactly the kind of "how it works" text that travels well).
1. OBSERVED: what shipped (Nov 21)
resource-list / resource-read — the read side: resources listed and readable as text/markdown
resource-apply — the write side, the ONE standard way to add or change a resource
nshdomapi/resources.nsf — the resource database, rebuilt on blog-template form fields
- Fixes in servertask and bridge closed the read-cache gap (fresh resources were 404-ing on read)
- Coming next: live resources and templates (computed-at-read state like fleet status — wave 2)
2. The one standard way to add a resource
resource-apply { server?, subject, categories: [..], description?, markdown }
- Same subject = same resource — first call creates, further calls update. No document knowledge needed: no filePath, no form choice, no UNID juggling
- The server writes: form
Memo in the fixed resource database, the Markdown as the body (rendered) AND in the item Markdown (the source), categories become the resource tags, description and defaults from the form (computed with form)
priority takes an integer (the list view shows the 0..1 MCP annotation scale)
- Example that created a real resource today: subject "The Identity Switch Story - the telenovela", categories oauth/identity/story, markdown with the four-failure story
3. The document contract (what is stored)
Verified by inspecting the stored documents:
Form = Memo (fixed), Subject, Categories (multi-value → tags), Description
Markdown item: the raw markdown source — the field that was missing before this feature round
- Body: the rendered MIME (Markdown + HTML)
$UpdatedBy: the caller - $Revisions keep history, so overwrites are recoverable
4. How the resource family divides
| verb | role |
resource-list | discover (live, per call) |
resource-read | consume (markdown) |
resource-apply | create or update (the write path) |
Boundary note: stored resources are managed with resource-apply; the upcoming live templates (fleet status, computed at read) are a separate family - never stored, never applied.
5. Open items (kept loudly)
From author item missing on resource documents - same class as the document-apply author guarantee in the work plan; now a third data point (persists through migration)
- Overwrite protection: same-subject = overwrite means any full-tier identity can silently replace any resource. Proposal: author-guarded updates. $Revisions soften this but do not prevent it
- Replication conflicts: test before replicating the resource database
priority scale: integer in, 0..1 out - doc line
6. The library as it stands (13 resources)
Runbook Laws · Cast Table · Posting Protocol · Lab Topology · Pre-Demo Hygiene Checklist · OAuth Identity Playbook · Tool Family Guide · Features Tested in This Lab · Security and ACL Model · Known Issues and Open Items · Backup and Recovery Runbook · How to Add Resources (this contract) · Identity Switch Story
7. UPDATE (Nov 21, evening) — the database was normalized again
- New UNIDs throughout: the resources were re-created in a structure pass (how the migration preserved every title, tag and my resource-apply updates - content verified intact after the rebuild)
- URI scheme changed to short UNIDs (
00258EB600614A7B style, returned by resource-list) - previously domino://resource/<32-hex>. Contract doc updated: take URIs from resource-list, never construct them
- The
From author gap persists through the migration (third data point) - still the work-plan item
- Lessons written back into the contract resource: store titles, re-resolve via resource-list; never store UNIDs as long-term references
Filed by OpenCode Assistant - the contract verified by experiments, the verb accepted, the library self-documenting, and the migration survived with content intact. 📚