Skip to content

Implement PlaybookNode as installable bundle record with display identity #2570

Closed

Description

@malibio

Overview

NodeSpace has no way to track "these schema extensions, Plays, and seed nodes were installed together as one methodology bundle" (e.g. a Linear-style work-tracking setup). Once installed, such a bundle's artifacts are indistinguishable from any other nodes in the graph — nothing records provenance, nothing lets the UI label a schema-extended task node as "Issue" instead of generic "Task," and nothing gives update/uninstall a record to work from.

Problem Statement

If "Issue" (Linear-style), "Story" (Jira-style), and a spec-driven task-breakdown item are all node_type: "task" with different custom: properties, there's no mechanism today for the UI to render/label a node by its methodology-specific name, for a query to filter "all Linear-style issues" distinctly from bare tasks, or for multiple installed methodologies to coexist without their work-item types being indistinguishable at the type level. ../nodespace-docs/decisions/063-namespace-prefixes-scope.md (ADR-063) solves storage-key collision between schema extensions, not identity/labeling — a different problem.

Proposed Solution

Implement PlaybookNode (node_type: "playbook") exactly as specified in ../nodespace-docs/decisions/075-playbooknode-installable-bundle-record.md (ADR-075): a lightweight install-time bundle record carrying references to what it installed (schema ids, Play ids, seed node ids) plus a kinds[] array giving display identity to the work-item types it establishes.

Architecture Impact

This issue implements ADR-075 in full. It does not reverse or supersede any ADR. It builds on the Play/Playbook terminology established by the docs rename (nodespace-docs 175836f) and #2569 (code-level rename, should land first — see Dependencies).

Implementation Approach

PlaybookNode schema and fields

Register playbook as a schema (likely core/isCore: true, alongside play and log per the existing pattern in playbook-system.md's "Built-in Node Types" section — confirm during implementation) with fields per ADR-075:

  • content (node-level, display name)
  • bundle_version: u32 (properties, author-controlled) — mirror SchemaNode.schema_version's exact type and update-when-definition-changes semantics (packages/nodespace-types/src/schema.rs, default_schema_version/schema_version fields). Do NOT use a semver string like Play's schema_version: "1.0.0" field — that pattern is decorative and has no engine-enforced meaning.
  • installed_schema_ids: Vec<String>, play_ids: Vec<String>, seed_node_ids: Vec<String> (properties)
  • kinds: Vec<{kind_key, node_type, display_name}> (properties)

Display identity resolution

  • Add a relationship type (e.g. derived_from_playbook) from an installed node to its PlaybookNode.
  • Add a System-protected node property (e.g. _extension_kind) holding the kind_key — scoped per-relationship, not a bare global string, so two different PlaybookNodes can each use the same kind_key (e.g. "issue") without collision.
  • Wire generic display-identity resolution into TaskNode rendering (and any other core-type renderer that needs it): follow derived_from_playbook → look up kind_key in the target PlaybookNode's kinds[] → use display_name. No bundle-specific logic hardcoded into any renderer.
  • kinds[] entries must reference an already-create_schema'd node_type — PlaybookNode never defines schema shape itself, only records and labels what was defined elsewhere via create_schema/update_schema.

Install (authoring a PlaybookNode)

PlaybookNode is authored as a summary after the schema/Play calls it references have already run (CLI/agent-driven, consistent with existing schema/Play authoring — no UI investment here, per standing project direction). Determine whether creation goes through the generic create_node path or needs schema-dependency validation analogous to Play's save-time schema-reference validation (all kinds[].node_type entries and installed_schema_ids must exist as real schemas at save time — mirror the validation pattern in ../nodespace-docs/architecture/playbook-system.md's "Schema Dependencies" section).

Uninstall

Per ADR-075 — untrack only, never delete live data:

  1. Deactivate/disable the Play(s) in play_ids.
  2. Delete the PlaybookNode itself (safe — it's a lightweight record).
  3. Leave installed_schema_ids and seed_node_ids untouched — no reference counting, no auto-delete.
  4. Surface to the user, at uninstall time, that nodes referencing this PlaybookNode via derived_from_playbook will fall back to generic type display (e.g. "Issue" → "Task") once the relationship is dangling — this must be disclosed, not a silent side effect.

Update/versioning

A bundle update bumps bundle_version on the same PlaybookNode id — never forks a new node. If schema-version-drift-style checking is warranted (a referenced schema in installed_schema_ids changes underneath an installed PlaybookNode), follow the same disable-and-log pattern Play already uses for its own schema-version drift (see playbook-system.md).

Acceptance Criteria

  • PlaybookNode schema registered with the field set specified above
  • kinds[] display-identity resolution works generically in TaskNode rendering (test: a task-extended node with derived_from_playbook + _extension_kind set renders its kinds[]-declared display_name, not generic "Task")
  • Two different PlaybookNodes can each declare a kind_key with the same string value with no collision (test)
  • Save-time validation rejects a PlaybookNode whose kinds[].node_type or installed_schema_ids reference a schema that doesn't exist
  • Uninstall deactivates referenced Plays and deletes the PlaybookNode, but leaves installed_schema_ids/seed_node_ids nodes untouched (test)
  • Uninstall surfaces the display-identity-fallback consequence to the caller (not a silent side effect)
  • bundle_version bump updates the same node id, does not create a new PlaybookNode (test)
  • Tests pass (bun run test:all)
  • Code passes bun run quality:fix

Technical Specifications

Reference Files

  • ../nodespace-docs/decisions/075-playbooknode-installable-bundle-record.md — the full design this issue implements
  • packages/nodespace-types/src/schema.rs — SchemaNode, schema_version/default_schema_version (the versioning pattern to mirror), SchemaField (protection levels, structure)
  • packages/core/src/models/core_schemas.rs — where core schema registration happens (task, play, log precedent)
  • ../nodespace-docs/architecture/playbook-system.md — "Built-in Node Types," "Schema Dependencies," and "Installation"/"Uninstall" sections — the Play-level precedent this issue's PlaybookNode-level equivalents should follow
  • Frontend TaskNode rendering (packages/desktop-app/src/lib/... — locate exact component during implementation) — where display-identity resolution needs wiring in

Dependencies

Related Issues

Non-Goals

  • Marketplace discovery, distribution, browsing, or install UI — ADR-075 explicitly scopes PlaybookNode as the install-tracking primitive a future marketplace would need, not the marketplace itself
  • Reference-counted or automatic deletion of orphaned schema/seed data on uninstall — explicitly rejected in ADR-075
  • Any specific methodology bundle (Linear-style, Jira-style, spec-driven) — this issue implements the PlaybookNode mechanism only

Activity

  1. malibio commented on Sep 13, 2026

    @malibio
    CollaboratorAuthor

    PlaybookNode's implementation is understood to be deferred, not blocking. #2596 ships the first concrete methodology recipe (Linear-style: cycle schema, task.status/task.priority extensions, two rollover Plays) without any bundle-install record — installed schema/Play state is left as ordinary graph data, no provenance tracking, no display-identity relabeling.

    This issue (#2570) remains valid future work for when multi-bundle coexistence, display-identity resolution (Issue vs. Task), and uninstall bookkeeping become an active need — not a prerequisite for methodology recipes to ship. A companion nodespace-docs update (Status note on ADR-075, or a short new ADR) is planned to record this deferral explicitly.

  2. malibio commented on Sep 13, 2026

    @malibio
    CollaboratorAuthor

    Marked Blocked — status update since the last comment on this issue.

    ADR-078 (../nodespace-docs/decisions/078-schema-extends-relationship-for-field-composition.md) has since evolved into a design where node_type becomes the real extending type (e.g. an Issue instance is genuinely node_type: "issue", not "task"). Under that design, kinds[]'s core original purpose — giving an extended node a display identity distinct from its node_type — may be fully subsumed: display identity would fall out directly from the node's own real node_type plus its schema's content/display name, with no derived_from_playbook relationship or _extension_kind marker needed for that purpose at all.

    Whether PlaybookNode still has independent value purely for bundle-install-tracking/uninstall-bookkeeping (which schemas/Plays/seed-nodes a given install created, for update/uninstall reference — orthogonal to display identity) is an open question currently under active architectural review alongside ADR-078's own finalization.

    Do not pick this up until:

    1. ADR-078 is finalized and implemented, and
    2. It's confirmed whether any of kinds[]'s original scope survives independent of what extends now provides — this issue's design may need a significant rewrite, or may turn out to be unnecessary in its current form, once that's settled.
  3. mstomar125 commented on Sep 15, 2026

    @mstomar125
    Contributor

    Board-accuracy check: the 2026-09-13 comment above says 'Marked Blocked' but the project board's Status field was still showing Backlog — correcting that now.

    Re-verified the blocking condition is still real against current main: ADR-078 (decisions/078-schema-extends-relationship-for-field-composition.md) is still Status: Proposed (last touched 2026-09-14, still being actively revised per its own revision history), and its implementation issue #2598 ('Implement extends schema relationship with real node_type subtype identity') is still open/unimplemented — so both stated unblock conditions ('ADR-078 finalized' and 'implemented') remain unmet. Setting Status to Blocked to match.

  4. malibio commented on Sep 27, 2026

    @malibio
    CollaboratorAuthor

    Moving from stale Blocked to Backlog: its named dependency (#2569) is closed, so nothing structurally blocks this. Deliberately deferred by product decision, not gated by a missing prerequisite — revisit when bundle identity/provenance tracking becomes a priority again.

  5. malibio commented on Oct 4, 2026

    @malibio
    CollaboratorAuthor

    Closing as overtaken by ADR-092 (https://github.com/NodeSpaceAI/nodespace-docs/blob/main/decisions/092-spec-plan-and-decision-are-core-types.md), which supersedes ADR-075 in full. There are no installable bundles, so there is no bundle record to implement; spec, plan and decision are core types instead (#3542).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions