feat: configurable working-notes & cluster LLM prompts#15
Merged
Conversation
Add NOTES_PROMPT / CLUSTER_PROMPT env overrides, sent as the model's system prompt; thread data stays the user message. Unset/blank falls back to the original prompts (DEFAULT_NOTES_PROMPT / DEFAULT_CLUSTER_PROMPT). Both prompts fold into the notes/cluster content hash so a prompt change re-renders. Adds docs/configuring-prompts.md.
# Conflicts: # packages/core/src/clusters.test.ts
# Conflicts: # apps/worker/src/context.ts # packages/core/src/clusters.ts # packages/core/src/notes.ts # packages/core/src/pipeline.ts
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.
What
Makes the two LLM summary prompts configurable via env, with verbatim fallback to the current prompts.
NOTES_PROMPTCLUSTER_PROMPTHow
systemprompt; the thread data (title/state/description/discussion) stays theusermessage, assembled in code. Truncation bounds, bot/own-comment exclusion, and output sanitization remain in code and are not overridable.DEFAULT_NOTES_PROMPT/DEFAULT_CLUSTER_PROMPT, which are the original prompts verbatim. An unset secret behaves exactly as before.promptVarmaps blank/whitespace env → undefined so an empty prompt is unrepresentable (schema.min(1).default(...)).Updating in production
Cloudflare secrets, no redeploy (takes effect next event):
See
docs/configuring-prompts.md.Verification
typecheck 13/13 · test 13/13 · lint clean (incl.
no-raw-loops). Merged latestmain(raw-loop refactor) into the branch.