refactor: extract prompts.py into subpackage with .md templates#11
Open
shenxiangzhuang wants to merge 4 commits intozjunlp:mainfrom
Open
refactor: extract prompts.py into subpackage with .md templates#11shenxiangzhuang wants to merge 4 commits intozjunlp:mainfrom
shenxiangzhuang wants to merge 4 commits intozjunlp:mainfrom
Conversation
- Replace monolithic prompts.py with prompts/ subpackage - Move 10 long prompts (>3 lines) to individual .md files under templates/ - Keep 3 short prompts inline in __init__.py - Re-export all variable names so external imports remain unchanged - Add snapshot tests (28 cases) verifying byte-for-byte prompt equality - Add pytest as dev dependency
shenxiangzhuang
commented
Mar 18, 2026
Comment on lines
+35
to
+42
| # Output Format: | ||
| [ | ||
| {{ | ||
| "name": "example-skill-name", | ||
| "description": "Comprehensive trigger description explaining precisely WHEN and WHY to load this skill." | ||
| }}, | ||
| ... | ||
| ] |
Author
Collaborator
|
Thanks for the PR! We'll take a look soon. |
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.

This is more like a suggestion/proposal(and feel free to close it without merge) to use markdown to orgnize the prompt files. Markdown files are more readable in genreal. But, as the comment says, this may also introduce some render issues.
What
Replace the monolithic
prompts.py(892 lines) with aprompts/subpackage:.mdfiles underprompts/templates/__init__.pyWhy
Easier to read, review, and edit prompt content in standalone Markdown files instead of one large Python file.
Commits
285e76b863f988f9e62ac.mdtemplatesc1ae28fpackage-dataconfig so.mdfiles are included in distributionNote
Checkout the first commit (
285e76b) to verify the refactor has zero impact on prompt values — it includes 28 snapshot tests comparing every prompt character-by-character against the original file. Subsequent commits are minor cleanups (removing test scaffolding, trimming leading blank lines).