Skip to content

Cross-promote supertool and jit-context to the human via systemMessage, with a config bool to disable #574

Closed

Description

@fdaviddpt

Cross-promote the other Digital-Process-Tools plugins -- supertool and claude-jit-context -- to the human using Remember, occasionally, through a channel the model never sees, with a config bool to turn it off.

The channel is the whole design

Claude Code's hook docs separate three streams, and only one of them reaches a person:

channel who sees it
hookSpecificOutput.additionalContext the model -- "context that Claude can see and act on"
systemMessage the user -- "To surface a message to the user on any platform, return systemMessage in JSON output"
plain stdout on most events neither -- written to the debug log, not shown in the transcript
plain stdout on SessionStart / UserPromptSubmit the model, as context

The promo is addressed to a human, so it goes in systemMessage and must never go in additionalContext or SessionStart stdout. Text in those streams costs tokens on every session, sits beside the user's real memory, can be acted on or echoed by the model, and -- on Antigravity, whose hook executor parses stdout as protojson -- breaks the hook outright rather than printing (the defect already fixed in #563 by discarding delegate stdout).

There is a live example of the wrong field in our own stack, which is worth citing because it shows the cost rather than predicting it: claude-jit-context 0.8.0's scripts/stop-hook.sh:477 emits its end-of-session notice as additionalContext, with body text that itself reads "not addressed to you -- informational only, no action needed". Its own comments record the consequence: line 88 calls that output "exactly the output that blocks a turn", and line 98 handles the harness re-invoking Stop because the hook's own additionalContext blocked the turn (jit #279). Model context is being spent, and turns blocked, to deliver a sentence written for a human. A separate issue belongs on that repo; it is named here only as evidence for the field choice.

What to build

  • A single-line systemMessage, naming one sibling plugin, from a hook Remember already registers.
  • Off switch: a documented boolean in config.json, layered the usual way (per-project > user-global > plugin defaults). Proposed features.plugin_promos, default true, matching the existing features group.
  • Throttle: not once per session. Once per N days per machine, persisted the way the delivery record already is. Proposed cooldowns.promo_seconds.
  • Never on SessionEnd. That path does the final flush and its budget is already the thing that gets cut short; a promo must not make it slower or noisier.
  • Prefer relevance where it is free: mention supertool and claude-jit-context generally, but if a repo-local signal is already at hand, name the one that fits.

Open question -- MEASURE, do not assume

The docs state the general rule and then do not keep it: "Some events discard it or deliver it elsewhere, and each event's section says so" -- but the per-event sections for SessionStart, PostToolUse, SessionEnd and Stop say nothing about systemMessage. Which of Remember's four registered events actually delivers a systemMessage to the screen is currently unknown, not "probably fine".

Settle it with a throwaway probe before writing the feature: a scratch project whose own .claude/settings.json wires a hook emitting {"systemMessage":"PROBE <event>"} on every event, then one real session (open, one prompt, one tool call, close), recording for each event whether the probe appeared on screen, appeared in the transcript, or vanished into the debug log. Not in the plugin, not shipped -- a scratch tree that gets deleted.

Prediction, written down so it can be proven wrong rather than quietly matched: SessionStart delivers; SessionEnd does not; PostToolUse unclear. If only SessionStart delivers, the promo rides there, which is also the least intrusive spot since the user is already reading the handoff block.

Shipping into a channel that silently drops the message is the worst outcome for this feature: identical cost, zero delivery, and nothing anywhere reports the absence -- this repo's own defect class.

Explicitly out of scope

Third-party or paid advertising, and anything that makes the plugin nag harder when disabled. This is cross-promotion of our own plugins in a stream the model cannot read, with a switch that turns it off.

[AI-generated]

Activity

  1. fdaviddpt commented on Sep 5, 2026

    @fdaviddpt
    ContributorAuthor

    Promo text is data, not code

    Added to the design: the messages live in a shipped JSON file, not in the hook script, so a promo can be added, reworded or dropped without touching shell. A GitHub URL is required on every entry -- a promo that names a plugin without saying where to get it is an interruption with no payoff.

    Proposed promos.json beside config.example.json:

    {
      "promos": [
        {
          "id": "supertool",
          "text": "Token-heavy git and GitHub calls? supertool compresses them.",
          "url": "https://github.com/Digital-Process-Tools/claude-supertool"
        },
        {
          "id": "jit-context",
          "text": "Rules your agent keeps forgetting? claude-jit-context injects them only when they match.",
          "url": "https://github.com/Digital-Process-Tools/claude-jit-context"
        }
      ]
    }

    Rules the loader should hold, each of which is a test:

    • An entry with no url is skipped, and the skip is visible -- not silently rendered without the link. Silent degradation to a link-less promo is this repo's own defect class.
    • id is what the throttle records, so rotation shows a different plugin next time rather than the same one forever, and so removing an entry does not shift which one is "next".
    • The file being absent, unreadable or not a JSON object means no promo at all -- never a hardcoded fallback string, which would make a broken file indistinguishable from a working one.
    • text is rendered as-is into systemMessage, single line, no markdown assumptions -- the docs promise delivery "on any platform", and a platform that renders plain text will show whatever punctuation is in the field.
    • Empty promos array is a legitimate "nothing to say", distinct from a missing file. Both produce no output; only one is a fault.

    This also settles who can change promo copy: anyone editing a JSON file in a release, rather than a shell edit inside a hook that runs on every session.

  2. fdaviddpt commented on Sep 5, 2026

    @fdaviddpt
    ContributorAuthor

    Decided: SessionStart only

    Maintainer decision. The promo is emitted from SessionStart and from no other event.

    Why that one, rather than "wherever systemMessage delivers":

    • It is measured. SessionStart fired and delivered on screen at 19:25:19Z in the probe described above. UserPromptSubmit and Stop also deliver, and are deliberately not used: a per-turn channel turns "occasional" into "constant" without anyone editing a throttle. PostToolUse and SessionEnd remain unmeasured and are out of scope regardless.
    • The user is already reading that spot. Remember prints its handoff block at session start; one extra line there is a footer on something being read, not an interruption of something else.
    • SessionEnd stays untouched on principle -- that path does the final flush, and its budget is already the thing that gets cut short.

    This narrows the design above: a single emit site, so the throttle has exactly one caller and the off switch has exactly one thing to gate.

    Copy constraint, from the observed rendering

    The harness prefixes the line with the event name: the probe rendered as

    SessionStart:startup says: PROBE-574 SessionStart -- if you can read this line, ...
    

    So text in promos.json must be short enough to survive that prefix and still read as a tip rather than a diagnostic. A fragment with the URL -- supertool -- fewer tokens on git/gh calls -- github.com/Digital-Process-Tools/claude-supertool -- survives it; a marketing sentence does not. Worth a test asserting a maximum length rather than leaving it to whoever edits the JSON next.

    Not building this yet

    0.28.0 is mid-release. Starting a lane on top of a release in flight is what widened the audited-range gap twice already today, so this waits for the tag.

  3. fdaviddpt commented on Sep 5, 2026

    @fdaviddpt
    ContributorAuthor

    Only promote what is not installed

    Maintainer decision, and it is what makes this feature defensible: a user who already has all four plugins never sees a line, ever. The promo is not "occasional advertising", it is "you do not have this one".

    Where the answer lives (Claude Code)

    ~/.claude/plugins/installed_plugins.json, version: 2, keyed <name>@<marketplace>:

    {
      "version": 2,
      "plugins": {
        "remember@dpt-plugins": [
          { "scope": "user", "installPath": ".../cache/dpt-plugins/remember/0.27.0", "version": "0.27.0", ... }
        ]
      }
    }

    Cheap to read, no process spawn, no network. Each promos.json entry gains the key to look for, so the data file stays the only thing that changes when a plugin is added:

    { "id": "supertool",
      "installed_key": "supertool@dpt-plugins",
      "text": "supertool -- fewer tokens on git/gh calls",
      "url": "https://github.com/Digital-Process-Tools/claude-supertool" }

    The failure direction is the whole design

    Unknown must mean silence, not "not installed". Every one of these produces "no entry found", and only some of them mean the user lacks the plugin:

    • The file is absent, unreadable, or not the expected shape.
    • The host is not Claude Code. Antigravity keeps its config under ~/.gemini/, Codex elsewhere; neither has this file. Remember runs on all three.
    • The plugin was installed from a different marketplace, or manually, so the <name>@<marketplace> key does not match even though the plugin is present.
    • version is 2 today; a future shape change would read as an empty install list.

    If any of those renders as "not installed", we show an ad for a plugin the user already has -- the single most annoying outcome this feature can produce, and the one that gets it uninstalled. So:

    • Resolve to one of three states, never two: installed, not-installed, cannot-tell.
    • cannot-tell suppresses the promo, exactly like installed does. Only a positive, confident not-installed is allowed to speak.
    • The distinction gets a test each, including a positive control -- a fixture where the key IS present must suppress, and a fixture where the file is well-formed and the key genuinely absent must emit. A suppression test alone passes just as well when the emitter is broken and never speaks at all.

    This also means the feature is silently a no-op on Antigravity and Codex until someone measures where those hosts record installs, which is the correct behaviour rather than a gap: cannot-tell is honest there.

    What it costs

    One small JSON read at SessionStart, on the same path that already reads config. If the read fails for any reason, the answer is cannot-tell and nothing is printed -- so the promo can never be the reason a session start gets slower or noisier than it is today.

  4. added
    cohort-6
    on Sep 5, 2026
  5. added 8 commits that reference this issue on Sep 6, 2026
  6. added 3 commits that reference this issue on Oct 4, 2026
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

    cohort-6

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions