refactor(prompts): extract knowledge system prompts to .md, unify product name to dikw#246
Conversation
…duct name to `dikw`
Move the three inline system-prompt constants under domains/knowledge into
packaged prompts/*.md, loaded via prompts.load() like every other prompt
(CLAUDE.md "Don't inline prompts in code"). Constant names, call sites and the
public surface are unchanged:
DEFAULT_SYNTH_SYSTEM -> prompts/synthesize_system.md
_MERGE_SYSTEM -> prompts/lint_fix_orphan_merge_system.md
_GROUNDED_SYSTEM -> prompts/lint_fix_broken_wikilink_grounded_system.md
Unify every packaged prompt's product self-reference from `dikw-core` to `dikw`
(synth + lint + eval). The two lint system prompts, previously a bare
"for `dikw-core`", now open with the same self-intro the other authoring
prompts use ("the **lint-fix** component of `dikw`, an AI-native knowledge
engine that refines raw sources up the ... (DIKW) pyramid").
Guard tests pin: the constants source from the packaged files, no packaged
prompt still says `dikw-core`, and the two lint system prompts carry the
standard self-intro.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 38 minutes and 41 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (15)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Cut the 0.6.4 release and bump every user-facing version reference ahead of tagging. Unlike 0.6.3 (a cadence release with `src/` untouched), 0.6.4 ships a real engine-side change: PR #246 extracted the three inline K-layer system-prompt constants (`DEFAULT_SYNTH_SYSTEM`, `_MERGE_SYSTEM`, `_GROUNDED_SYSTEM`) into packaged `prompts/*.md` and unified every packaged prompt's product self-reference from `dikw-core` to `dikw`. Constant names, call sites, on-disk format, schema, CLI, and API are all unchanged; the wheel now carries three new prompt resource files. - Version bump `0.6.3 -> 0.6.4` (`pyproject.toml` + `uv.lock` self-entry). - CHANGELOG: rename `## Unreleased` -> `## 0.6.4 — …`, open a fresh empty `## Unreleased`. The 0.6.4 heading is awk-extractable by `release.yml`'s notes extractor. - Docs/examples: bump the GHCR image tags (`docs/deployment-docker.md`), the pip-install pin (`docs/getting-started.md`), the compose `.env` default + error-message example (`examples/docker/.env.example`, `docker-compose.yml`), and the bug-report version placeholder. - `examples/docker/Dockerfile` intentionally NOT bumped — `release.yml`'s `sync-dockerfile` job auto-bumps it after the tag publishes to PyPI; its current `0.6.3` is published, so the Dockerfile guard stays green. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
What
Extract the three inline system-prompt constants under
domains/knowledgeintopackaged
prompts/*.md, loaded viaprompts.load(...)like every other prompt(CLAUDE.md "Don't inline prompts in code"). Unify every packaged prompt's product
self-reference from
dikw-coretodikw, and give the two lint system promptsthe same standard self-intro the other authoring prompts already carry.
DEFAULT_SYNTH_SYSTEMprompts/synthesize_system.md_MERGE_SYSTEMprompts/lint_fix_orphan_merge_system.md_GROUNDED_SYSTEMprompts/lint_fix_broken_wikilink_grounded_system.mdprompts.load()returns the text the literals held.
dikw-core→dikwacross all 10 packaged prompts (synth SP, 2 lint usertemplates, 2 lint system prompts, 5 eval judges).
eval/judge.pysystem constantscarry no
dikw-coreand are left untouched.for `dikw-core`and open withthe **lint-fix** component of `dikw`, an AI-native knowledge engine that refines raw sources up the … (DIKW) pyramid— task instructions preserved verbatim.Why
no-baseline-neededK-layer authoring prompts changed, so this is gated by an
evals/BASELINES.mdentry or the
no-baseline-neededlabel. The change is cosmetic: the synth systemprompt is byte-identical modulo the product rename; the two lint system prompts
gain only the standard self-intro framing (no task-instruction change); eval-judge
edits are the product name only (eval is report-only, never blocks). No on-disk
format, schema, CLI, or API change.
Tests
tests/test_synth_prompt_examples.pyadds three guards (TDD, red→green): eachconstant equals its packaged file read independently of the cached
load; noprompts/*.mdstill saysdikw-core; the two lint system prompts carry thestandard self-intro and their task instructions.
Delivery receipt
tools/check.py: ruff + mypy + 2386 passed, 138 skipped (skips = live-Postgres contract, run in CI)eval/judge.pycorrectly untouched\n+ import-time-load findings rejected as nit/by-design with rationaleUnreleasedentry; design.md prompt tree is illustrative (already elides eval prompts) — no changeTriage of rejected findings
\non extracted.md: the synth SP cache key already rotates once via the intendeddikw-core→dikwrename; a trailing\nis byte-stable across calls (no cache regression), immaterial to output, and matches the repo.mdconvention.load:DEFAULT_SYNTH_SYSTEMwas always a module-level constant; packaged resources are guaranteed present (the guard test imports them). Call-timeresolveexists for overridable user prompts; these system prompts are non-overridable, so import-timeloadis the correct, minimal shape.🤖 Generated with Claude Code