docs: establish the Depends dependency-declaration semantic - #51
Merged
Conversation
NAPs legitimately rest on other NAPs (a miner publishes through `relay`; an identity surface points byte fields at `resource`). Until now those edges were implicit in prose with bare spec ids. Introduce a track-level semantic to declare them explicitly. - AGENTS.md: new "Dependencies — declare, don't imply" section. Each NAP names its dependencies in a `Depends:` preamble block, by domain, tagged with a kind (wire | capability | layering) and strength (required | optional). Add the owner/importer rule that kills wire entanglement: a `wire` dependency is directional — one owner defines the shared type, importers reference it and MUST NOT redefine it. Extend the doc-sync table accordingly. - NAP-WORD-TEMPLATE / NAP-N-TEMPLATE: add the `Depends:` block (replacing the ad-hoc `Requires:` field in NAP-N). - README: add a Deps column to both registries, giving a registry-level dependency graph; declared by domain, never spec id. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
Adopt the Depends semantic (#51). relay imports the ResourceSidecarEntry type owned by the resource domain — it never redefines it. Add the Depends block and sharpen the import wording so the wire dependency is directional, not mutual. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
Adopt the Depends semantic (#51) and enforce the owner/importer rule. resource owns the ResourceSidecarEntry type and the hydration contract; it no longer "amends" relay's wire. The carrier domain (e.g. relay) owns its own resources? field, default-OFF policy, and allowlist. This de-entangles the one mutual-amendment edge in the registry into a directional dependency. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
Adopt the Depends block (#51): the domains this NAP rests on, declared by domain with kind and strength. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
Adopt the Depends block (#51): the domains this NAP rests on, declared by domain with kind and strength. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
Adopt the Depends block (#51): the domains this NAP rests on, declared by domain with kind and strength. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
Adopt the Depends block (#51): the domains this NAP rests on, declared by domain with kind and strength. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
Adopt the Depends block (#51): the domains this NAP rests on, declared by domain with kind and strength. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
Adopt the Depends block (#51): the domains this NAP rests on, declared by domain with kind and strength. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
Adopt the Depends block (#51): the domains this NAP rests on, declared by domain with kind and strength. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
Adopt the Depends block (#51): transport and any further domains declared by domain with kind and strength, superseding the ad-hoc Requires field. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
Adopt the Depends block (#51): transport and any further domains declared by domain with kind and strength, superseding the ad-hoc Requires field. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
Adopt the Depends block (#51): transport and any further domains declared by domain with kind and strength, superseding the ad-hoc Requires field. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
Adopt the Depends block (#51): transport and any further domains declared by domain with kind and strength, superseding the ad-hoc Requires field. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
Adopt the Depends block (#51): transport and any further domains declared by domain with kind and strength, superseding the ad-hoc Requires field. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On rollout, identity's relay mention and cvm's relay mention proved to be comparisons / boundary notes, not dependency edges. Drop them so the Deps column matches the specs' Depends blocks. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dskvr
added a commit
that referenced
this pull request
Jun 17, 2026
* spec: add NUB-IDENTITY -- read-only user identity queries
Defines the identity NUB with 9 query methods (getPublicKey, getRelays,
getProfile, getFollows, getList, getZaps, getMutes, getBlocked, getBadges).
All queries are strictly read-only. No signing, encryption, or decryption
is exposed through this interface.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs: clarify picture/banner URLs flow through NUB-RESOURCE
Adds a note paragraph after the ProfileData interface clarifying that
napplets fetch picture and banner bytes via window.napplet.resource.bytes(url)
per NUB-RESOURCE. Napplets cannot use direct <img src=https://...> loads
under the NIP-5D iframe sandbox (sandbox='allow-scripts', no
allow-same-origin); the shell is the sole network-fetch broker.
No wire change, no type change — documentation-only addition. Pre-amendment
napplets that already use resource.bytes(url) for these fields continue to
work; the clarification only documents the existing contract more clearly.
The standard NUB-RESOURCE policy (private-IP block list at DNS-resolution
time, MIME byte-sniffing, optional SVG rasterization) applies — there is no
privileged 'identity bytes' path that bypasses Default Resource Policy.
* docs: rename proposal terminology to NAP
* Stop identity users from polling for signer readiness
The identity interface now defines a snapshot-plus-push flow so napplets can get the current shell-user pubkey once and react to later signer changes without polling. The spec keeps shell-user identity separate from the NIP-5D source-bound napplet session identity and uses an empty pubkey string for signed-out states.
Constraint: Existing request/result wire format remains the baseline for identity queries
Rejected: Require napplets to poll getPublicKey until non-empty | creates runtime churn and stale subscriptions
Confidence: high
Scope-risk: narrow
Directive: Keep identity.changed about shell-user identity only; do not use it to renegotiate napplet session identity
Tested: git diff --check
Not-tested: No runtime implementation exists in this repo
* Use unpadded numbered NAP template notation
This PR branch now uses NAP-N / NAP-{N} and unpadded examples instead of fixed-width NAP-NN or NAP-01 style wording. That keeps the open identity PR aligned with the unbounded numbered-NAP convention.
Constraint: Numbered NAPs are unbounded; leading zero and NN notation imply a 99-spec limit
Rejected: Update only numbered NAP PRs | this branch still carried stale documentation templates
Confidence: high
Scope-risk: narrow
Directive: Keep numbered NAP identifiers unpadded in docs, templates, files, titles, and PR bodies
Tested: git diff --cached --check; rg for padded NAP references
Not-tested: GitHub merge state until post-push audit
* docs(NAP-IDENTITY): align header to seam framing (Domain + web binding)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: move NAP-IDENTITY spec into naps/ directory
Relocate NAP-IDENTITY.md -> naps/NAP-IDENTITY.md to match the naps/ layout (#37).
Repoint the README registry link where present.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* NAP-IDENTITY: declare dependencies via the Depends semantic
Adopt the Depends block (#51): the domains this NAP rests on,
declared by domain with kind and strength.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* chore: drop .planning/ and stale SPEC.md from PR surface
.planning/ is local-only and must never be pushed (AGENTS.md); SPEC.md was
deleted from master. Both rode in via a shared ancestor and don't belong on
this spec PR. Additive removal — no history rewrite.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: sandwich <dskvr@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.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.
Summary
An audit of merged and proposed NAPs surfaced valid cross-NAP dependencies — a miner publishes through
relay, identity/media byte fields resolve throughresource, andrelay.eventembeds aresource-owned type. These edges are legitimate but were declared only implicitly, as bare spec ids in prose. This introduces a track-level semantic to declare them, by domain, with a kind and strength — and an owner/importer rule that resolves the one real wire entanglement.Changes
Depends:preamble block, by domain (aligned withshell.supports()and the manifest["requires", …]tag), never a bare spec id in prose.wire(embeds a type owned by another domain) ·capability(calls another domain's surface) ·layering(shell-internal, invisible to the napplet).required(gate onshell.supports) ·optional(degrade gracefully).wiredependency is directional — one owner defines the shared type, importers reference it and MUST NOT redefine it. Mutual amendment is a bug.Depends:blocks, the Deps column, and wire-dependency edits.Depends:block (supersedes the ad-hocRequires:field in NAP-N).Downstream
relayimportsresource'sResourceSidecarEntry) on NAP-RELAY: Relay proxy interface #2/NAP-RESOURCE: Sandboxed resource fetching (https / blossom / htree / nostr / data) #13, andDepends:blocks on NAP-IDENTITY: read-only user identity queries #12, NAP-MEDIA: Media session control #10, NAP-POW: NIP-13 proof-of-work miner interface #39, NAP-CVM: native ContextVM bridge #31, NAP-UPLOAD: shell-mediated file and blob upload #33, NAP-OUTBOX: outbox-aware relay routing #32.master; opened as a PR here because it introduces a new authoring paradigm worth a visible review.Depends:block needed.🤖 Generated with Claude Code