-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
Summary
Implement CRUD vocabulary for prompt commands, replacing git-like terminology with standard create/read/update operations.
Parent: #668 (ls-prompt-ux milestone)
Phase: 2 of 4 (Non-Breaking)
Design: docs/implementation/ls-prompt-ux-command-redesign.md (section: Phase 2)
Depends on: #727 (Phase 1 - help system)
Goals
Replace git-like terms (pull, push) with CRUD verbs:
- Create:
langstar prompt create <name>(replacespushfor new prompts) - Read:
langstar prompt get <name>(with modifiers for different aspects) - Update:
langstar prompt update <name>(replacespushfor updates)
Implementation Tasks
1. Implement get command with modifiers
- Add
langstar prompt get <name>(default: text only) - Add
langstar prompt get metadata <name>(metadata only) - Add
langstar prompt get model <name>(model info only) - Add
langstar prompt get structured-output <name>(schema only) - Add
langstar prompt get <name> --all(everything) - Support all handle formats (short, full, UUID)
- Add progressive disclosure help for
getcommand
2. Implement create command
- Add
langstar prompt create <name>command - Support
--text <TEXT>for inline template - Support
--text-file <FILE>for file-based template - Support
--metadata <JSON>for metadata - Support
--model <MODEL>for model configuration - Support
--structured-output <FILE>for JSON schema - Support
--publicflag (default: private) - Add progressive disclosure help for
createcommand
3. Implement update command
- Add
langstar prompt update <name>for text updates - Add
langstar prompt update metadata <name>for metadata updates - Add
langstar prompt update model <name>for model updates - Add
langstar prompt update structured-output <name>for schema updates - Support
--text <TEXT>and--text-file <FILE> - Add progressive disclosure help for
updatecommand
4. Deprecation notices
- Mark
pushas deprecated (but keep functional) - Mark
pullas deprecated (but keep functional) - Add deprecation warnings to
pushandpull - Hide
pushandpullfrom main help output - Document migration path:
pull→get,push→create/update
Example Usage
Create new prompt:
# Simple prompt
langstar prompt create my-prompt --text "Hello {name}"
# From file
langstar prompt create my-prompt --text-file template.txt
# With model
langstar prompt create my-prompt \
--text "Answer: {question}" \
--model claude-3-5-sonnet-20241022
# Structured prompt
langstar prompt create data-extractor \
--text-file template.txt \
--structured-output schema.json \
--model claude-3-5-sonnet-20241022Read prompt content:
# Get text only (default)
langstar prompt get my-prompt
# Get metadata
langstar prompt get metadata my-prompt
# Get model info
langstar prompt get model my-prompt
# Get schema
langstar prompt get structured-output my-prompt
# Get everything
langstar prompt get my-prompt --allUpdate prompt:
# Update text
langstar prompt update my-prompt --text "New template"
langstar prompt update my-prompt --text-file new-template.txt
# Update metadata
langstar prompt update metadata my-prompt --public
# Update model
langstar prompt update model my-prompt --model claude-opus-4-5
# Update schema
langstar prompt update structured-output my-prompt --schema new-schema.jsonTesting Requirements
Integration Tests
- Test
createwith inline text - Test
createwith text file - Test
createwith model - Test
createwith structured output (schema) - Test
getdefault (text only) - Test
get metadata - Test
get model - Test
get structured-output - Test
get --all - Test
updatetext - Test
update metadata - Test
update model - Test
update structured-output - Test all commands with all handle formats (short, full, UUID)
Deprecation Tests
- Test
pushshows deprecation warning - Test
pullshows deprecation warning - Test
pushandpullstill work functionally - Test deprecated commands are hidden from main help
Migration Path
Document how to migrate from old commands to new:
# Old: langstar prompt pull my-prompt
# New: langstar prompt get my-prompt
# Old: langstar prompt pull -- "-/my-prompt"
# New: langstar prompt get my-prompt
# Old: langstar prompt push -r my-prompt -t "template"
# New: langstar prompt create my-prompt --text "template"
# Old: langstar prompt push -r my-prompt -t "updated" (update)
# New: langstar prompt update my-prompt --text "updated"Success Criteria
- CRUD commands (
create,get,update) fully functional - All commands support progressive disclosure help
- All handle formats work consistently
- Deprecated commands show warnings but still work
- Migration path is clearly documented
- Tests verify all functionality
References
- Design document: docs/implementation/ls-prompt-ux-command-redesign.md (sections: "Recommended Command Structure", "Detailed Command Specifications")
- Parent issue: ls-prompt-ux milestone - Improve UX consistency across prompt commands #668
- Related: 668.1-handle-consistency Make prompt pull accept same handle formats as prompt get #669 (handle consistency - incorporated into this work)
- Related: prompt push fails with 409 conflict when updating existing prompt - missing parent commit option #719 (409 conflict - may be resolved by proper update semantics)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels