Repository navigation
feat(prompt): add local-first versioned prompt registry - #315
Merged
Merged
Conversation
# Conflicts: # CHANGELOG.md
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.
Summary
Adds a local-first versioned prompt registry (
coding.sh prompt) stored under~/.coding.sh/prompts/<name>/with zero runtime dependencies:coding.sh prompt set <name>— saves immutable versioned text (--text,--file, or stdin) or chat (--messages <JSON|FILE>) prompts with SHA-256 content+config deduplication, optional--config,--label, and--note.coding.sh prompt get <name>— fetches by--versionor--label(defaultlatest), performs single-pass{{var}}rendering with--var key=val, and supports--raw/--json.coding.sh prompt list— lists stored prompts with type, latest version, count, active labels, and updated time.coding.sh prompt label <name> <label> [version]— creates, moves, or deletes (--delete) mutable label pointers (latestprotected).coding.sh prompt diff <name> <a> <b>— computes a line-by-line unified diff between any two versions or labels.docs/guides/evals.md,docs/reference/cli.md,docs/compare/langfuse.md,docs/compare/braintrust.md, andCHANGELOG.md.Verification
tsc --noEmit -p packages/coding.sh: passtest/prompts/store.test.ts(10 unit tests) +test/cli/prompt.test.ts(5 E2E CLI tests) + paths & docs tests: 39 pass, 0 fail (both test files fail when source is reverted)node scripts/lint/slop.mjs --strict-allowlist&node scripts/changelog/add.mjs --check: cleanapps/site/test/*.test.mjs: 161 pass, 0 fail