Skip to content

Adopt clown dynamic system-prompt fragments (RFC-0002 §5) #277

@friedenberg

Description

@friedenberg

Background

clown's plugin protocol (RFC-0002) now supports dynamic, plugin-contributed system-prompt fragments — an optional runtime upgrade from the build-time static .clown-plugin/system-prompt-append.d/ fragments (FDR-0003). A plugin's MCP server can contribute a system-prompt fragment computed at session launch, reflecting live runtime state the static path structurally cannot express.

How it works (clown side, shipped in amarbel-llc/clown@c10b39d):

  • After a plugin server is healthy and before claude is exec'd, clown GETs the server's declared systemPromptPath and appends the 200 body last into claude's --append-system-prompt-file.
  • Best-effort: a non-200 / 204 / timeout degrades to the static prompt and never blocks the launch.
  • For bridged stdio servers, clown-stdio-bridge serves the fixed path /clown/system-prompt by issuing an MCP prompts/get for the well-known system-prompt-append prompt to the wrapped child — so the fragment is child-owned and computed at request time.

References: RFC-0002 §5 (docs/rfcs/0002-clown-plugin-protocol.md), clown-json(5) (systemPromptPath, systemPrompt), clown-plugin-protocol(7) (DYNAMIC SYSTEM-PROMPT CONTRIBUTION). Reference impl: clown-builtin-jobs (cmd/clown/jobmcp.go jobSystemPromptFragment / jobPromptGet).

Migration for dodder

dodder ships a stdio server (plugins/dodder/clown.json.instdioServers.dodder = @dodder@ mcp), so it goes through clown-stdio-bridge.

  1. Opt in: set "systemPrompt": true on the stdioServers.dodder entry in plugins/dodder/clown.json.in. Desugar maps that to systemPromptPath = /clown/system-prompt.
  2. Serve the fragment in the dodder mcp server:
    • advertise a prompts capability in the initialize result;
    • handle prompts/list (advertise a prompt named system-prompt-append);
    • handle prompts/get for that name, returning the fragment as a text message.
  3. Suggested dynamic content (runtime store state): whether a dodder repo is initialized in $PWD, the repo id / genesis, object/zettel counts, configured remotes, and the active type/tag config — live orientation on the store the agent is working against. This complements the dodder-onboarding / dodder-usage skills (which are static) with the actual current repo state.

Acceptance

  • plugins/dodder/clown.json.in stdioServers.dodder.systemPrompt = true
  • dodder mcp advertises prompts capability + answers prompts/list / prompts/get for system-prompt-append
  • fragment is runtime-computed (live repo/store state)
  • verified end-to-end (clown plugin-host log shows appended dynamic prompt fragments count=1)

🤡 filed by Clown (clown 0.3.12+5220e30) — amarbel-llc/clown@5220e30

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions