upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xx.md72
1 files changed, 72 insertions, 0 deletions
diff --git a/xx.md b/xx.md
new file mode 100644
index 0000000..7025fe9
--- /dev/null
+++ b/xx.md
@@ -0,0 +1,72 @@
1NIP-XX
2======
3
4LLM Stuff
5---------
6
7`draft` `optional`
8
9This NIP defines kinds related to LLM stuff.
10
11# Prompt diffs
12 a way to publish LLM prompts that describe modifications to software projects. Where code diffs usually expire in a couple of releases and require constant upkeep,tThese "prompt diffs" enable way longer-lasting, shareable software modifications.
13
14## Abstract
15
16A prompt diff is a Nostr event that contains instructions for an LLM to modify a codebase. Prompt diffs describe the intent and let LLMs handle the implementation details.
17
18## Event Structure
19
20```json
21{
22 "kind": 496,
23 "content": "<human-readable-description>",
24 "tags": [
25 ["title", "<modification-title>"],
26 ["description", "<prompt>"],
27 ["r", "<git-repository-url>"],
28 ["t", "<tag>"],
29 ["model", "<suggested-llm-model>"],
30 ]
31}
32Required Tags
33
34title - Short title describing the modification
35r - Git repository URL this applies to
36prompt - The actual prompt containing modification instructions
37
38## Optional Tags
39
40t - Hashtags for categorization (#security, #performance, #feature-removal, etc.)
41model - Suggested LLM model that successfully applies this modification
42
43Example: Remove Edit Functionality from Amethyst
44json{
45 "kind": 496,
46 "pubkey": "...",
47 "created_at": 1234567890,
48 "content": "Removes the ability to edit kind:1 text notes in Amethyst",
49 "tags": [
50 ["title", "Remove Kind:1 Edit Functionality"],
51 ["description", "Remove all edit functionality for kind:1 events from the Amethyst Android app. This includes:\n\n1. Find and remove the edit button/icon from the note options menu (three dots menu) for kind:1 events\n2. Remove any edit action handlers, click listeners, or menu item cases related to editing kind:1 notes\n3. Remove or disable any UI components like EditPostView or EditPostDialog that are used for editing existing posts\n4. Keep the edit functionality for other event kinds if they exist (like kind:30023 long-form content)\n5. Remove any edit-related permissions checks or business logic specific to kind:1 events\n6. Clean up any unused imports or resources that were only used for kind:1 editing\n7. Do not remove the ability to create new kind:1 posts, only the ability to edit existing ones\n8. Look for edit functionality in:\n - Note composition screens\n - Note option menus \n - ViewModels handling note actions\n - Any files with names containing 'Edit' and 'Note' or 'Post'\n\nMake sure the app still compiles and runs after these changes. The diff should be clean with no leftover dead code."],
52 ["r", "https://github.com/vitorpamplona/amethyst"],
53 ["t", "noedits"],
54 ["t", "amethyst"],
55 ["model", "claude-3.5-sonnet"],
56 ],
57 "sig": "..."
58}
59
60# Implementation Guidelines
61### For Prompt Authors
62
63Write clear, specific prompts that describe intent rather than implementation
64Include context about why changes should be made in certain locations
65Specify what should NOT be changed to prevent over-modification
66Add test commands to verify the modification works
67Test prompts against the current main branch of the repository
68
69# Security Considerations
70
71* Always review LLM-generated changes before applying
72* Prompt Injection Protection: Clients MUST sanitize repository file contents before passing to LLMs to prevent malicious code comments or documentation from hijacking the modification intent