Skip to content

onWrite hook context lacks item identity/content — blocks push-on-write integrations #104

Closed

Description

@unbraind

Summary

The OnWriteHookContext passed to onWrite lifecycle hooks exposes only { path, scope, op } — there is no item id, type, or changed content. This blocks a whole class of useful integrations: a "push-on-write" / mirror hook (e.g. pm-jira / pm-linear syncing a changed item back to the upstream tracker) cannot tell which item changed or what changed without re-reading and diffing the file itself, and cannot do so reliably for deletes.

Why it matters

Two ecosystem sync packages (pm-jira, pm-linear) wanted an opt-in best-effort onWrite hook to mirror pm item changes upstream, but had to fall back to an explicit export --push command because the hook context can't identify the mutated item. A richer context would unlock real bidirectional sync.

Suggested enhancement

Include the changed item's id (and ideally type + a before/after or at least the new frontmatter/metadata) in OnWriteHookContext for create/update/close/delete ops, so hooks can act on the specific change without re-reading and re-parsing the store.

Found while enhancing the pm extension ecosystem against pm-cli 2026.5.31.

Activity

  1. unbraind commented on Jul 11, 2026

    @unbraind
    OwnerAuthor

    pm tracker item:

    • pm-e9ut — SDK extension hook context and manifest capability guardrails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions