Skip to content

fix: don't inject memory context into system prompt, but user prompt instead.#131

Merged
wey-gu merged 1 commit into
nowledge-co:mainfrom
frostming:fix/bub-prompt
Mar 17, 2026
Merged

fix: don't inject memory context into system prompt, but user prompt instead.#131
wey-gu merged 1 commit into
nowledge-co:mainfrom
frostming:fix/bub-prompt

Conversation

@frostming

@frostming frostming commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Signed-off-by: Frost Ming me@frostming.com

Summary by CodeRabbit

  • New Features

    • Added dynamic prompt building with context-aware behavior
  • Refactor

    • Enhanced memory and recall functionality
    • Streamlined prompt construction and state management
    • Updated system guidance delivery

…instead.

Signed-off-by: Frost Ming <me@frostming.com>
@wey-gu

wey-gu commented Mar 17, 2026

Copy link
Copy Markdown
Member

THANKS A LOT @frostming gege!!

@wey-gu wey-gu merged commit 1919742 into nowledge-co:main Mar 17, 2026
@coderabbitai

coderabbitai Bot commented Mar 17, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8eff2f3b-753a-487c-abba-43423cd349c5

📥 Commits

Reviewing files that changed from the base of the PR and between 5429f88 and c20dc29.

📒 Files selected for processing (4)
  • nowledge-mem-bub-plugin/pyproject.toml
  • nowledge-mem-bub-plugin/src/bub_skills/__init__.py
  • nowledge-mem-bub-plugin/src/nowledge_mem_bub/plugin.py
  • nowledge-mem-bub-plugin/src/skills/nowledge-mem/SKILL.md

📝 Walkthrough

Walkthrough

Refactored memory and prompt building in the plugin by introducing a new build_prompt hook that replaces the load_state method with an internal _load_memory helper. Updated system_prompt to return constant strings. Modified wheel packaging configuration in pyproject.toml.

Changes

Cohort / File(s) Summary
Configuration & Initialization
pyproject.toml, src/bub_skills/__init__.py
Updated wheel packaging target path from src/bub_skills to src/skills in pyproject.toml. Removed namespace marker comment from __init__.py.
Plugin Hook Refactoring
src/nowledge_mem_bub/plugin.py
Introduced new public build_prompt(message, session_id, state) hook replacing load_state(). Added private helpers _builtin_build_prompt() and _load_memory() to manage prompt construction and memory loading. Simplified system_prompt() to return constant strings directly. Reorganized save_state() for compact formatting while preserving thread management behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 The skills path now redirects with grace,
Old hooks retire to make room and space—
New prompts are built with memory's embrace,
Constants return at a steady pace,
Simpler logic runs the race! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can generate a title for your PR based on the changes.

Add @coderabbitai placeholder anywhere in the title of your PR and CodeRabbit will replace it with a title based on the changes in the PR. You can change the placeholder by changing the reviews.auto_title_placeholder setting.

@frostming frostming deleted the fix/bub-prompt branch March 17, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants